transitions-refine 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "transitions-refine",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Live, agent-driven Refine panel for CSS/Motion transitions — injects a timeline + Refine UI and runs transitions.dev suggestions via your coding agent.",
5
5
  "type": "module",
6
6
  "bin": {
package/server/inject.mjs CHANGED
@@ -19,6 +19,10 @@ const DEMO_PATH = fileURLToPath(new URL("../demo.html", import.meta.url));
19
19
  const REACT_URL = "https://esm.sh/react@19";
20
20
  const REACT_DOM_URL = "https://esm.sh/react-dom@19";
21
21
  const REACT_DOM_CLIENT_URL = "https://esm.sh/react-dom@19/client";
22
+ // `deps=` (not `external=`) so esm.sh resolves border-beam's own react/react-dom
23
+ // to the same esm.sh/react@19 the panel uses — one React instance, no import map
24
+ // required on the host page.
25
+ const BORDER_BEAM_URL = "https://esm.sh/border-beam@1.2.0?deps=react@19,react-dom@19";
22
26
 
23
27
  const CUT_MARKER = "// ── demo boxes ──";
24
28
 
@@ -46,7 +50,8 @@ function buildJs(scriptSrc) {
46
50
  js = js
47
51
  .replace(/import\s+React\s+from\s+["']react["'];?/, `import React from "${REACT_URL}";`)
48
52
  .replace(/import\s+\{\s*createRoot\s*\}\s+from\s+["']react-dom\/client["'];?/, `import { createRoot } from "${REACT_DOM_CLIENT_URL}";`)
49
- .replace(/import\s+\{\s*createPortal\s*\}\s+from\s+["']react-dom["'];?/, `import { createPortal } from "${REACT_DOM_URL}";`);
53
+ .replace(/import\s+\{\s*createPortal\s*\}\s+from\s+["']react-dom["'];?/, `import { createPortal } from "${REACT_DOM_URL}";`)
54
+ .replace(/import\s+\{\s*BorderBeam\s*\}\s+from\s+["']border-beam["'];?/, `import { BorderBeam } from "${BORDER_BEAM_URL}";`);
50
55
 
51
56
  // Point the relay client at whatever origin served this module, so the panel
52
57
  // works on any port the CLI chose (the script is served BY the relay).