From 9ca0bdd70f7d0c588eb66d6bf08de0f5cd18f261 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Nov 2025 14:41:08 +0000 Subject: [PATCH 1/3] Initial plan From abf5b9c5a95d65741d19f3bcada337c66f6c8186 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Nov 2025 14:45:25 +0000 Subject: [PATCH 2/3] Initial plan for fixing CI Co-authored-by: TylerJDev <26746305+TylerJDev@users.noreply.github.com> --- custom-elements.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom-elements.json b/custom-elements.json index b72b006..9a61c69 100644 --- a/custom-elements.json +++ b/custom-elements.json @@ -9,11 +9,11 @@ { "kind": "variable", "name": "ImageCropElement", - "default": "class extends HTMLElement {\n static define(tag = \"image-crop\", registry = customElements) {\n registry.define(tag, this);\n return this;\n }\n connectedCallback() {\n if (constructedElements.has(this))\n return;\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.innerHTML = `\n\n\n
\n \"\"\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n`;\n const box = shadowRoot.querySelector(\"[data-crop-box]\");\n if (!(box instanceof HTMLElement))\n return;\n const image = shadowRoot.querySelector(\"img\");\n if (!(image instanceof HTMLImageElement))\n return;\n constructedElements.set(this, { box, image });\n image.addEventListener(\"load\", () => {\n this.loaded = true;\n setInitialPosition(this);\n });\n this.addEventListener(\"mouseleave\", stopUpdate);\n this.addEventListener(\"touchend\", stopUpdate);\n this.addEventListener(\"mouseup\", stopUpdate);\n box.addEventListener(\"mousedown\", startUpdate);\n box.addEventListener(\"touchstart\", startUpdate, { passive: true });\n this.addEventListener(\"keydown\", moveCropArea);\n this.addEventListener(\"keydown\", updateCropArea);\n if (this.src)\n image.src = this.src;\n }\n static get observedAttributes() {\n return [\"src\"];\n }\n get src() {\n return this.getAttribute(\"src\");\n }\n set src(val) {\n if (val) {\n this.setAttribute(\"src\", val);\n } else {\n this.removeAttribute(\"src\");\n }\n }\n get loaded() {\n return this.hasAttribute(\"loaded\");\n }\n set loaded(val) {\n if (val) {\n this.setAttribute(\"loaded\", \"\");\n } else {\n this.removeAttribute(\"loaded\");\n }\n }\n attributeChangedCallback(attribute, oldValue, newValue) {\n const { image } = constructedElements.get(this) || {};\n if (attribute === \"src\") {\n this.loaded = false;\n if (image)\n image.src = newValue;\n }\n }\n}" + "default": "class extends HTMLElement {\n static" }, { "kind": "variable", - "name": "dist_default", + "name": "index_default", "default": "ImageCropElement" } ], @@ -30,7 +30,7 @@ "kind": "js", "name": "default", "declaration": { - "name": "dist_default", + "name": "index_default", "module": "dist/bundle.js" } } From 75dd14d672d7d8d9e48ef63b0d0f9e26e7945041 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Nov 2025 14:51:15 +0000 Subject: [PATCH 3/3] Use Playwright Docker container to fix browser installation Co-authored-by: TylerJDev <26746305+TylerJDev@users.noreply.github.com> --- .github/workflows/nodejs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 4bb5031..c56a2d7 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -4,6 +4,8 @@ on: push jobs: build: runs-on: ubuntu-latest + container: + image: mcr.microsoft.com/playwright:v1.56.1-noble steps: - uses: actions/checkout@v2 - name: Use Node.js 18.x