@supernovaio/prototyping-tooling 0.9.5 → 0.9.7-alpha.0

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.
@@ -31,6 +31,8 @@ export declare class AnnotationOverlay {
31
31
  deactivate(): void;
32
32
  /** Selects a dot by ID — highlights its elements and applies selected style. Called from the parent. */
33
33
  selectDot(annotationId: string): void;
34
+ /** Clears any selected annotation highlight and restores hover behavior. */
35
+ clearSelectedAnnotation(): void;
34
36
  /** Enters accumulation mode — subsequent clicks toggle elements in/out of the annotation. */
35
37
  enterAccumulation(annotationId: string, existingElements: AnnotationElementInfo[]): void;
36
38
  /** Exits accumulation mode and returns final annotation data (or null if empty). */
@@ -1 +1 @@
1
- {"version":3,"file":"AnnotationOverlay.d.ts","sourceRoot":"","sources":["../../../src/client/annotation/AnnotationOverlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,OAAO,KAAK,EAAkB,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AA6B1G;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,gBAAgB,CAA8B;IACtD,OAAO,CAAC,cAAc,CAA8B;IACpD,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,IAAI,CAA6B;IAEzC,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,eAAe,CAA2B;IAClD,OAAO,CAAC,eAAe,CAAQ;IAC/B,OAAO,CAAC,oBAAoB,CAAsB;IAClD,OAAO,CAAC,wBAAwB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A6CtB,OAAO,CAAC,eAAe,CA+BtB;IAED,OAAO,CAAC,MAAM,CAAC,cAAc,CAAI;IAEjC,OAAO,CAAC,eAAe,CActB;IAED,OAAO,CAAC,aAAa,CA2CpB;IAED,OAAO,CAAC,WAAW,CAGlB;IAED,OAAO,CAAC,aAAa,CAcpB;IAED,OAAO,CAAC,WAAW,CAElB;IAED,OAAO,CAAC,kBAAkB,CAA0G;IAEpI,kEAAkE;IAClE,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAUrD,gFAAgF;IAChF,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAUzC,OAAO,CAAC,4BAA4B;IA8CpC,OAAO,CAAC,mBAAmB,CAE1B;IAED,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,eAAe;CAWxB"}
@@ -10,6 +10,8 @@ import type { ForgeClientOptions } from "./types.js";
10
10
  export declare class ForgeClient {
11
11
  private static instance;
12
12
  private messenger;
13
+ private readyIntervalId;
14
+ private isConnectedToHost;
13
15
  private selectMode;
14
16
  private designMode;
15
17
  private hoverDisabled;
@@ -1 +1 @@
1
- {"version":3,"file":"ForgeClient.d.ts","sourceRoot":"","sources":["../../../src/client/general/ForgeClient.ts"],"names":[],"mappings":"AACA,OAAO,EAA+C,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAOhH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD;;;;;;GAMG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA2B;IAClD,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,iBAAiB,CAAmB;IAC5C,OAAO,CAAC,iBAAiB,CAAiC;IAC1D,OAAO,CAAC,gBAAgB,CAAsB;I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AO,CAAC,CAAwB;IAExC,OAAO;IA4BP,4EAA4E;IAC5E,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,WAAW;IAO7D,6FAA6F;IAC7F,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAI5C,2FAA2F;IAC3F,kBAAkB,CAAC,WAAW,EAAE,qBAAqB,EAAE,GAAG,IAAI;IAS9D,OAAO,CAAC,oBAAoB;IAuF5B,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,aAAa;IAiBrB,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,SAAS;IAwBjB,OAAO,CAAC,uBAAuB;IAkB/B,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,yBAAyB;CAkBlC"}
package/dist/client.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as $, c as X, R as Y, d as U, Z as C, C as v, M as O, B as M, e as B, P as G, i as W, a as V, T as j } from "./constants-BXKWBfHg.js";
1
+ import { b as X, c as Y, R as U, d as B, Z as A, C as v, M as O, B as H, e as G, P as V, i as W, a as j, T as k } from "./constants-DqGvo09s.js";
2
2
  import { d as c } from "./debug-CLzmqn3R.js";
3
3
  class z {
4
4
  registry = /* @__PURE__ */ new Map();
@@ -23,7 +23,7 @@ class z {
23
23
  return !t && n[e] && (t = this.registry.get(n[e])), t ? Object.entries(t.props).filter(([o, i]) => i.editable).map(([o, i]) => ({ name: o, type: i.type, options: i.options, default: i.default, editable: i.editable, label: i.label })) : [];
24
24
  }
25
25
  }
26
- function H(r) {
26
+ function M(r) {
27
27
  if (r.id)
28
28
  return [`*[@id="${r.id}"]`];
29
29
  const e = [];
@@ -43,35 +43,35 @@ function b(r) {
43
43
  }
44
44
  const u = { FunctionComponent: 0, ClassComponent: 1, IndeterminateComponent: 2, HostRoot: 3, HostPortal: 4, HostComponent: 5, HostText: 6, Fragment: 7, Mode: 8, ContextConsumer: 9, ContextProvider: 10, ForwardRef: 11, Profiler: 12, SuspenseComponent: 13, MemoComponent: 14, SimpleMemoComponent: 15, LazyComponent: 16, IncompleteClassComponent: 17, DehydratedFragment: 18, SuspenseListComponent: 19, ScopeComponent: 21, OffscreenComponent: 22, LegacyHiddenComponent: 23, CacheComponent: 24, TracingMarkerComponent: 25, HostHoistable: 26, HostSingleton: 27, IncompleteFunctionComponent: 28, Throw: 29, ViewTransitionComponent: 30, ActivityComponent: 31 }, K = /* @__PURE__ */ new Set(["Component", "PureComponent", "Fragment", "Suspense", "Profiler", "StrictMode", "Routes", "Route", "Outlet", "Root", "ErrorBoundaryHandler", "HotReload", "Hot"]), J = [/Boundary$/, /BoundaryHandler$/, /Provider$/, /Consumer$/, /^(Inner|Outer)/, /Router$/, /^Client(Page|Segment|Root)/, /^Server(Root|Component|Render)/, /^RSC/, /Context$/, /^Hot(Reload)?$/, /^(Dev|React)(Overlay|Tools|Root)/, /Overlay$/, /Handler$/, /^With[A-Z]/, /Wrapper$/, /^Root$/];
45
45
  let T = null;
46
- function N(r) {
46
+ function x(r) {
47
47
  const e = (t) => t.some((n) => n.startsWith("__reactFiber$") || n.startsWith("__reactInternalInstance$") || n.startsWith("__reactProps$"));
48
48
  return e(Object.keys(r)) || e(Object.getOwnPropertyNames(r));
49
49
  }
50
50
  function q() {
51
51
  if (T !== null) return T;
52
52
  if (typeof document > "u") return !1;
53
- if (document.body && N(document.body))
53
+ if (document.body && x(document.body))
54
54
  return c("client", "Detected React on document.body"), T = !0, !0;
55
- for (const e of Y) {
55
+ for (const e of U) {
56
56
  const t = document.querySelector(e);
57
57
  if (t) {
58
- if (N(t))
58
+ if (x(t))
59
59
  return c("client", "Detected React on", e), T = !0, !0;
60
60
  for (const n of t.children)
61
- if (N(n))
61
+ if (x(n))
62
62
  return c("client", "Detected React on child of", e), T = !0, !0;
63
63
  }
64
64
  }
65
65
  if (document.body) {
66
66
  for (const e of document.body.children)
67
- if (N(e))
67
+ if (x(e))
68
68
  return c("client", "Detected React on body child:", e.tagName), T = !0, !0;
69
69
  }
70
70
  const r = document.querySelectorAll("*");
71
71
  for (const e of r) {
72
- if (N(e))
72
+ if (x(e))
73
73
  return c("client", "Detected React on deep scan:", e.tagName), T = !0, !0;
74
- if (r.length > U) break;
74
+ if (r.length > B) break;
75
75
  }
76
76
  return c("client", "React NOT detected on page"), T = !1, !1;
77
77
  }
@@ -91,7 +91,7 @@ function Z(r) {
91
91
  });
92
92
  return i && r[i] || null;
93
93
  }
94
- function A(r) {
94
+ function I(r) {
95
95
  return r ? r.displayName ? r.displayName : r.name ? r.name : null : null;
96
96
  }
97
97
  function Q(r) {
@@ -100,18 +100,18 @@ function Q(r) {
100
100
  if (e === u.ForwardRef) {
101
101
  const i = n;
102
102
  if (i?.render) {
103
- const s = A(i.render);
103
+ const s = I(i.render);
104
104
  if (s) return s;
105
105
  }
106
- return i?.displayName ? i.displayName : A(t);
106
+ return i?.displayName ? i.displayName : I(t);
107
107
  }
108
108
  if (e === u.MemoComponent || e === u.SimpleMemoComponent) {
109
109
  const i = n;
110
110
  if (i?.type) {
111
- const s = A(i.type);
111
+ const s = I(i.type);
112
112
  if (s) return s;
113
113
  }
114
- return i?.displayName ? i.displayName : A(t);
114
+ return i?.displayName ? i.displayName : I(t);
115
115
  }
116
116
  if (e === u.ContextProvider) {
117
117
  const i = t;
@@ -123,9 +123,9 @@ function Q(r) {
123
123
  }
124
124
  if (e === u.LazyComponent) {
125
125
  const i = n;
126
- return i?._status === 1 && i._result ? A(i._result) : null;
126
+ return i?._status === 1 && i._result ? I(i._result) : null;
127
127
  }
128
- return e === u.IncompleteClassComponent || e === u.IncompleteFunctionComponent || e === u.FunctionComponent || e === u.ClassComponent || e === u.IndeterminateComponent ? A(t) : null;
128
+ return e === u.IncompleteClassComponent || e === u.IncompleteFunctionComponent || e === u.FunctionComponent || e === u.ClassComponent || e === u.IndeterminateComponent ? I(t) : null;
129
129
  }
130
130
  function ee(r) {
131
131
  return r.length <= 2 || r.length <= 3 && r === r.toLowerCase();
@@ -133,7 +133,7 @@ function ee(r) {
133
133
  function te(r) {
134
134
  return !(K.has(r) || J.some((e) => e.test(r)));
135
135
  }
136
- function ne(r, e = $, t = X) {
136
+ function ne(r, e = X, t = Y) {
137
137
  if (!q())
138
138
  return c("client", "isReactPage() = false"), { path: null, components: [] };
139
139
  const n = [];
@@ -149,20 +149,20 @@ function ne(r, e = $, t = X) {
149
149
  return n.length === 0 ? { path: null, components: [] } : { path: n.slice().reverse().map((i) => `<${i}>`).join(" "), components: n };
150
150
  }
151
151
  let S = null, E = null;
152
- function x(r, e, t, n = "solid") {
152
+ function N(r, e, t, n = "solid") {
153
153
  const o = document.createElement("div");
154
- return Object.assign(o.style, { position: "fixed", left: `${r.left}px`, top: `${r.top}px`, width: `${r.width}px`, height: `${r.height}px`, border: `1px ${n} ${e}`, backgroundColor: t, pointerEvents: "none", zIndex: C.HOVER_OVERLAY, borderRadius: "2px" }), o;
154
+ return Object.assign(o.style, { position: "fixed", left: `${r.left}px`, top: `${r.top}px`, width: `${r.width}px`, height: `${r.height}px`, border: `1px ${n} ${e}`, backgroundColor: t, pointerEvents: "none", zIndex: A.HOVER_OVERLAY, borderRadius: "2px" }), o;
155
155
  }
156
156
  function oe(r) {
157
- L();
157
+ R();
158
158
  const e = r.getBoundingClientRect();
159
- S = x(e, v.SELECT_OVERLAY_BORDER, v.SELECT_OVERLAY_BG), S.className = "forge-overlay", document.body.appendChild(S);
159
+ S = N(e, v.SELECT_OVERLAY_BORDER, v.SELECT_OVERLAY_BG), S.className = "forge-overlay", document.body.appendChild(S);
160
160
  }
161
- function L() {
161
+ function R() {
162
162
  S && (S.remove(), S = null);
163
163
  }
164
164
  function ie() {
165
- return E || (E = document.createElement("div"), Object.assign(E.style, { position: "fixed", top: "0", left: "0", width: "100%", height: "100%", backgroundColor: "transparent", pointerEvents: "auto", zIndex: C.HIT_TEST_OVERLAY, cursor: "crosshair" }), E.className = "forge-hit-test-overlay", document.body.appendChild(E), E);
165
+ return E || (E = document.createElement("div"), Object.assign(E.style, { position: "fixed", top: "0", left: "0", width: "100%", height: "100%", backgroundColor: "transparent", pointerEvents: "auto", zIndex: A.HIT_TEST_OVERLAY, cursor: "crosshair" }), E.className = "forge-hit-test-overlay", document.body.appendChild(E), E);
166
166
  }
167
167
  function se() {
168
168
  E && (E.remove(), E = null);
@@ -204,6 +204,13 @@ class D {
204
204
  const t = this.dots.get(e);
205
205
  t && (this.removeHoverOverlay(), this.hoverSuppressed = !0, this.highlightAnnotationElements(t));
206
206
  }
207
+ clearSelectedAnnotation() {
208
+ if (this.accumulationId) {
209
+ this.removeHoverOverlay(), this.hoverSuppressed = !1;
210
+ return;
211
+ }
212
+ this.removeHoverOverlay(), this.clearAnnotationHighlights(), this.hoverSuppressed = !1;
213
+ }
207
214
  enterAccumulation(e, t) {
208
215
  if (this.accumulationId !== e) {
209
216
  this.accumulationId = e, this.accumulationElements = [], this.clearAnnotationHighlights();
@@ -236,10 +243,10 @@ class D {
236
243
  const o = document.querySelectorAll(`[data-forge-id="${t}"]`);
237
244
  o.length > 1 && (n = Array.from(o).indexOf(e));
238
245
  }
239
- return { xpath: b(H(e)), forgeId: t, forgeIdIndex: n };
246
+ return { xpath: b(M(e)), forgeId: t, forgeIdIndex: n };
240
247
  }
241
248
  elementToInfo(e) {
242
- return { elementTag: e.tagName.toLowerCase(), xpath: H(e), componentName: e.getAttribute("data-component") || void 0, componentPath: this.getComponentPath(e) || void 0, forgeId: e.getAttribute("data-forge-id") || void 0, forgeIdIndex: this.resolveForgeIdIndex(e), sourcePos: e.getAttribute("data-source-pos") || void 0 };
249
+ return { elementTag: e.tagName.toLowerCase(), xpath: M(e), componentName: e.getAttribute("data-component") || void 0, componentPath: this.getComponentPath(e) || void 0, forgeId: e.getAttribute("data-forge-id") || void 0, forgeIdIndex: this.resolveForgeIdIndex(e), sourcePos: e.getAttribute("data-source-pos") || void 0 };
243
250
  }
244
251
  resolveForgeIdIndex(e) {
245
252
  const t = e.getAttribute("data-forge-id");
@@ -254,7 +261,7 @@ class D {
254
261
  this.messenger.send({ type: "ACCUMULATION_UPDATED", annotation: { id: this.accumulationId, dotX: 0, dotY: 0, mode: "single", elements: [], xpaths: [], elementTag: "" }, origin: O });
255
262
  return;
256
263
  }
257
- const n = e[e.length - 1].getBoundingClientRect(), o = n.left + n.width / 2, i = n.bottom, s = e.map((g) => this.elementToInfo(g)), a = e.map((g) => this.elementToLocator(g)), l = this.getAnchorRect(a), h = o - 2, d = i - M - 2, m = l && l.width > 0 && l.height > 0 ? { x: (h - l.left) / l.width, y: (d - l.top) / l.height } : { x: 0, y: 0 }, p = s[0];
264
+ const n = e[e.length - 1].getBoundingClientRect(), o = n.left + n.width / 2, i = n.bottom, s = e.map((g) => this.elementToInfo(g)), a = e.map((g) => this.elementToLocator(g)), l = this.getAnchorRect(a), h = o - 2, d = i - H - 2, m = l && l.width > 0 && l.height > 0 ? { x: (h - l.left) / l.width, y: (d - l.top) / l.height } : { x: 0, y: 0 }, p = s[0];
258
265
  this.messenger.send({ type: "ACCUMULATION_UPDATED", annotation: { id: this.accumulationId, dotX: o, dotY: i, anchorOffset: m, mode: e.length > 1 ? "multi" : "single", elements: s, xpaths: s.map((g) => b(g.xpath)), elementTag: p.elementTag, componentName: p.componentName, componentPath: p.componentPath, forgeId: p.forgeId, sourcePos: p.sourcePos }, origin: O });
259
266
  }
260
267
  removeDot(e) {
@@ -301,7 +308,7 @@ class D {
301
308
  this.repositionHoverOverlay();
302
309
  };
303
310
  createHitTestOverlay() {
304
- this.hitTestOverlay || (this.hitTestOverlay = document.createElement("div"), Object.assign(this.hitTestOverlay.style, { position: "fixed", top: "0", left: "0", width: "100%", height: "100%", backgroundColor: "transparent", pointerEvents: "auto", zIndex: C.HIT_TEST_OVERLAY, cursor: "crosshair" }), this.hitTestOverlay.className = "forge-annotation-hit-test", document.body.appendChild(this.hitTestOverlay));
311
+ this.hitTestOverlay || (this.hitTestOverlay = document.createElement("div"), Object.assign(this.hitTestOverlay.style, { position: "fixed", top: "0", left: "0", width: "100%", height: "100%", backgroundColor: "transparent", pointerEvents: "auto", zIndex: A.HIT_TEST_OVERLAY, cursor: "crosshair" }), this.hitTestOverlay.className = "forge-annotation-hit-test", document.body.appendChild(this.hitTestOverlay));
305
312
  }
306
313
  removeHitTestOverlay() {
307
314
  this.hitTestOverlay && (this.hitTestOverlay.remove(), this.hitTestOverlay = null);
@@ -309,7 +316,7 @@ class D {
309
316
  showHoverOverlay(e, t, n) {
310
317
  this.hoverOverlay && (this.hoverOverlay.remove(), this.hoverOverlay = null), this.lastHoveredElement = e;
311
318
  const o = e.getBoundingClientRect(), i = t === v.ANNOTATION_MULTI ? v.ANNOTATION_MULTI_BG : v.ANNOTATION_SINGLE_BG;
312
- this.hoverOverlay = x(o, t, i, "solid"), this.hoverOverlay.style.transition = "all 0.05s ease", this.hoverOverlay.className = "forge-annotation-hover", document.body.appendChild(this.hoverOverlay), this.showComponentTooltip(n || e, o);
319
+ this.hoverOverlay = N(o, t, i, "solid"), this.hoverOverlay.style.transition = "all 0.05s ease", this.hoverOverlay.className = "forge-annotation-hover", document.body.appendChild(this.hoverOverlay), this.showComponentTooltip(n || e, o);
313
320
  }
314
321
  removeHoverOverlay() {
315
322
  this.hoverOverlay && (this.hoverOverlay.remove(), this.hoverOverlay = null), this.lastHoveredElement = null, this.removeComponentTooltip();
@@ -354,12 +361,12 @@ class D {
354
361
  if (i) {
355
362
  const s = i.getBoundingClientRect();
356
363
  n.push(s);
357
- const a = x(s, v.ANNOTATION_SINGLE, v.ANNOTATION_SINGLE_BG, "solid");
364
+ const a = N(s, v.ANNOTATION_SINGLE, v.ANNOTATION_SINGLE_BG, "solid");
358
365
  a.className = "forge-annotation-highlight", document.body.appendChild(a), this.annotationHighlights.push(a);
359
366
  }
360
367
  }
361
368
  if (t && n.length > 1) {
362
- const o = Math.min(...n.map((d) => d.left)), i = Math.min(...n.map((d) => d.top)), s = Math.max(...n.map((d) => d.right)), a = Math.max(...n.map((d) => d.bottom)), l = new DOMRect(o, i, s - o, a - i), h = x(l, v.ANNOTATION_SINGLE, "transparent", "dashed");
369
+ const o = Math.min(...n.map((d) => d.left)), i = Math.min(...n.map((d) => d.top)), s = Math.max(...n.map((d) => d.right)), a = Math.max(...n.map((d) => d.bottom)), l = new DOMRect(o, i, s - o, a - i), h = N(l, v.ANNOTATION_SINGLE, "transparent", "dashed");
363
370
  h.className = "forge-annotation-bounding-rect", document.body.appendChild(h), this.annotationHighlights.push(h);
364
371
  }
365
372
  }
@@ -404,7 +411,7 @@ class D {
404
411
  const n = this.getComponentPath(e);
405
412
  if (!n) return;
406
413
  const o = document.createElement("div");
407
- Object.assign(o.style, { position: "fixed", zIndex: C.TOOLTIP, backgroundColor: "rgba(30, 30, 30, 0.92)", color: "#e4e4e7", padding: "4px 10px", borderRadius: "6px", fontSize: "11px", fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif", fontWeight: "500", letterSpacing: "0.3px", whiteSpace: "nowrap", pointerEvents: "none", backdropFilter: "blur(8px)", boxShadow: "0 2px 8px rgba(0,0,0,0.3)", transition: "opacity 0.1s ease" }), o.textContent = n.map((l) => `<${l}>`).join(" "), o.className = "forge-annotation-component-tooltip", document.body.appendChild(o);
414
+ Object.assign(o.style, { position: "fixed", zIndex: A.TOOLTIP, backgroundColor: "rgb(238, 248, 255)", color: "rgba(26, 88, 208, 1)", border: "1px solid rgba(86, 153, 255, 0.3)", padding: "4px", borderRadius: "5px", fontSize: "12px", fontFamily: "Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif", whiteSpace: "nowrap", pointerEvents: "none", boxShadow: "0 2px 8px rgba(0,0,0,0.3)", transition: "opacity 0.1s ease" }), o.textContent = n.map((l) => `<${l}>`).join(" "), o.className = "forge-annotation-component-tooltip", document.body.appendChild(o);
408
415
  const i = o.getBoundingClientRect();
409
416
  let s = t.left + t.width / 2 - i.width / 2, a = t.top - i.height - 6;
410
417
  s < 4 && (s = 4), s + i.width > window.innerWidth - 4 && (s = window.innerWidth - i.width - 4), a < 4 && (a = t.bottom + 6), o.style.left = `${s}px`, o.style.top = `${a}px`, this.componentTooltip = o;
@@ -413,7 +420,7 @@ class D {
413
420
  this.componentTooltip && (this.componentTooltip.remove(), this.componentTooltip = null);
414
421
  }
415
422
  showDragRect(e, t, n, o) {
416
- this.dragRect || (this.dragRect = document.createElement("div"), Object.assign(this.dragRect.style, { position: "fixed", border: `1px dashed ${v.ANNOTATION_MULTI}`, backgroundColor: v.DRAG_RECT_BG, pointerEvents: "none", zIndex: C.HOVER_OVERLAY, borderRadius: "4px" }), this.dragRect.className = "forge-annotation-drag-rect", document.body.appendChild(this.dragRect)), Object.assign(this.dragRect.style, { left: `${Math.min(e, n)}px`, top: `${Math.min(t, o)}px`, width: `${Math.abs(n - e)}px`, height: `${Math.abs(o - t)}px` });
423
+ this.dragRect || (this.dragRect = document.createElement("div"), Object.assign(this.dragRect.style, { position: "fixed", border: `1px dashed ${v.ANNOTATION_MULTI}`, backgroundColor: v.DRAG_RECT_BG, pointerEvents: "none", zIndex: A.HOVER_OVERLAY, borderRadius: "4px" }), this.dragRect.className = "forge-annotation-drag-rect", document.body.appendChild(this.dragRect)), Object.assign(this.dragRect.style, { left: `${Math.min(e, n)}px`, top: `${Math.min(t, o)}px`, width: `${Math.abs(n - e)}px`, height: `${Math.abs(o - t)}px` });
417
424
  }
418
425
  removeDragRect() {
419
426
  this.dragRect && (this.dragRect.remove(), this.dragRect = null), this.clearDragHighlights();
@@ -421,7 +428,7 @@ class D {
421
428
  showDragHighlights(e) {
422
429
  this.clearDragHighlights();
423
430
  for (const t of e) {
424
- const n = t.getBoundingClientRect(), o = x(n, v.ANNOTATION_MULTI, v.ANNOTATION_MULTI_BG, "solid");
431
+ const n = t.getBoundingClientRect(), o = N(n, v.ANNOTATION_MULTI, v.ANNOTATION_MULTI_BG, "solid");
425
432
  o.className = "forge-annotation-drag-highlight", document.body.appendChild(o), this.dragHighlights.push(o);
426
433
  }
427
434
  }
@@ -430,12 +437,12 @@ class D {
430
437
  this.dragHighlights = [];
431
438
  }
432
439
  createDot(e, t, n, o, i, s = []) {
433
- const a = this.getAnchorRect(s), l = e - 2, h = t - M - 2, d = a && a.width > 0 && a.height > 0 ? { rx: (l - a.left) / a.width, ry: (h - a.top) / a.height } : { rx: 0, ry: 0 };
440
+ const a = this.getAnchorRect(s), l = e - 2, h = t - H - 2, d = a && a.width > 0 && a.height > 0 ? { rx: (l - a.left) / a.width, ry: (h - a.top) / a.height } : { rx: 0, ry: 0 };
434
441
  this.createDotAtPosition(l, h, n, o, i, s, d);
435
442
  }
436
443
  createDotAtPosition(e, t, n, o, i, s, a) {
437
444
  const l = document.createElement("div");
438
- Object.assign(l.style, { position: "fixed", left: `${e}px`, top: `${t}px`, minWidth: `${B}px`, height: `${M}px`, borderRadius: "50% 50% 50% 0", backgroundColor: "#FFFFFF", border: "1px solid #1A58D0", cursor: "pointer", zIndex: C.ANNOTATION_DOT, transition: "transform 0.15s ease", display: this.markersVisible ? "flex" : "none", alignItems: "center", justifyContent: "center", padding: "0 4px", fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif", fontSize: "11px", fontWeight: "700", color: "#1A58D0", lineHeight: "1", userSelect: "none" }), l.textContent = String(i), l.className = "forge-annotation-dot", l.dataset.annotationId = o, l.addEventListener("mouseenter", () => {
445
+ Object.assign(l.style, { position: "fixed", left: `${e}px`, top: `${t}px`, minWidth: `${G}px`, height: `${H}px`, borderRadius: "50% 50% 50% 0", backgroundColor: "#FFFFFF", border: "1px solid #1A58D0", cursor: "pointer", zIndex: A.ANNOTATION_DOT, transition: "transform 0.15s ease", display: this.markersVisible ? "flex" : "none", alignItems: "center", justifyContent: "center", padding: "0 4px", fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif", fontSize: "11px", fontWeight: "700", color: "#1A58D0", lineHeight: "1", userSelect: "none", boxShadow: "0px 1px 3px -1px rgba(9, 18, 42, 0.06), 0px 1px 3px -3px rgba(9, 18, 42, 0.1)" }), l.textContent = String(i), l.className = "forge-annotation-dot", l.dataset.annotationId = o, l.addEventListener("mouseenter", () => {
439
446
  l.style.transform = "scale(1.05)", this.removeHoverOverlay();
440
447
  }), l.addEventListener("mouseleave", () => {
441
448
  l.style.transform = "scale(1)";
@@ -494,8 +501,8 @@ class D {
494
501
  if (!y || m.has(y) || g instanceof SVGElement && g.tagName.toLowerCase() !== "svg" || g.closest?.("svg") && g.tagName.toLowerCase() !== "svg") return;
495
502
  const f = this.findTopmostWithSameForgeId(g);
496
503
  if (m.has(f.getAttribute("data-forge-id") || "")) return;
497
- const R = f.getBoundingClientRect();
498
- R.right >= i && R.left <= a && R.bottom >= s && R.top <= l && (m.add(y), d.push(f));
504
+ const L = f.getBoundingClientRect();
505
+ L.right >= i && L.left <= a && L.bottom >= s && L.top <= l && (m.add(y), d.push(f));
499
506
  }), this.dragScopeParent) {
500
507
  const p = this.findForgeIdParent(this.dragScopeParent);
501
508
  if (p)
@@ -592,7 +599,7 @@ class D {
592
599
  createAnnotationFromElements(e, t, n, o, i) {
593
600
  const s = i || ae();
594
601
  this.hoverSuppressed = !0, this.removeHoverOverlay();
595
- const a = e.map((f) => this.elementToInfo(f)), l = a.map((f) => ({ xpath: b(f.xpath), forgeId: f.forgeId, forgeIdIndex: f.forgeIdIndex })), h = this.getAnchorRect(l), d = n - 2, m = o - M - 2, p = h && h.width > 0 && h.height > 0 ? { x: (d - h.left) / h.width, y: (m - h.top) / h.height } : { x: 0, y: 0 };
602
+ const a = e.map((f) => this.elementToInfo(f)), l = a.map((f) => ({ xpath: b(f.xpath), forgeId: f.forgeId, forgeIdIndex: f.forgeIdIndex })), h = this.getAnchorRect(l), d = n - 2, m = o - H - 2, p = h && h.width > 0 && h.height > 0 ? { x: (d - h.left) / h.width, y: (m - h.top) / h.height } : { x: 0, y: 0 };
596
603
  this.pendingAnnotations.set(s, { dotX: n, dotY: o, mode: t, locators: l }), this.clearDragHighlights(), this.highlightLocators(l, t === "multi");
597
604
  const g = a[0], y = { id: s, dotX: n, dotY: o, anchorOffset: p, mode: t, elements: a, xpaths: a.map((f) => b(f.xpath)), elementTag: g.elementTag, componentName: g.componentName, componentPath: g.componentPath, forgeId: g.forgeId, sourcePos: g.sourcePos };
598
605
  c("annotation", "Annotation created (pending):", y), this.messenger.send({ type: "ANNOTATION_CREATED", annotation: y, origin: O });
@@ -622,7 +629,7 @@ class le {
622
629
  this.hitTestOverlay && (this.hitTestOverlay.removeEventListener("mousemove", this.handleMouseOver), this.hitTestOverlay.removeEventListener("mouseout", this.handleMouseOut), this.hitTestOverlay.removeEventListener("click", this.handleClick)), document.removeEventListener("scroll", this.handleScroll, !0), se(), this.hitTestOverlay = null;
623
630
  }
624
631
  clearHover() {
625
- this.hoveredElement = null, L();
632
+ this.hoveredElement = null, R();
626
633
  }
627
634
  findTopmostElementWithSameId(e) {
628
635
  const t = e.getAttribute("data-forge-id");
@@ -636,7 +643,7 @@ class le {
636
643
  return o;
637
644
  }
638
645
  handleSelectModeClick(e) {
639
- const t = b(H(e));
646
+ const t = b(M(e));
640
647
  c("client", "Element clicked, XPath:", t), this.messenger.send({ type: "XPATH_REPORT", xpath: t, origin: O }), this.messenger.send({ type: "SELECT_MODE_DISABLED", origin: O });
641
648
  }
642
649
  handleMouseOver = (e) => {
@@ -652,16 +659,16 @@ class le {
652
659
  };
653
660
  handleMouseOut = (e) => {
654
661
  if (!this.callbacks.getSelectMode() && !this.callbacks.getDesignMode()) return;
655
- e.target === this.hoveredElement && (this.hoveredElement = null, L());
662
+ e.target === this.hoveredElement && (this.hoveredElement = null, R());
656
663
  };
657
664
  handleClick = (e) => {
658
665
  if (!this.callbacks.getSelectMode() && !this.callbacks.getDesignMode()) return;
659
666
  e.preventDefault(), e.stopPropagation(), this.hitTestOverlay && (this.hitTestOverlay.style.pointerEvents = "none");
660
667
  const t = document.elementFromPoint(e.clientX, e.clientY);
661
- this.hitTestOverlay && (this.hitTestOverlay.style.pointerEvents = "auto"), t && t !== document.body && t !== document.documentElement && (this.callbacks.getSelectMode() && this.callbacks.onSelectClick(t), this.callbacks.getDesignMode() && (L(), this.hoveredElement = null, this.callbacks.onDesignClick(t)));
668
+ this.hitTestOverlay && (this.hitTestOverlay.style.pointerEvents = "auto"), t && t !== document.body && t !== document.documentElement && (this.callbacks.getSelectMode() && this.callbacks.onSelectClick(t), this.callbacks.getDesignMode() && (R(), this.hoveredElement = null, this.callbacks.onDesignClick(t)));
662
669
  };
663
670
  handleScroll = () => {
664
- (this.callbacks.getSelectMode() || this.callbacks.getDesignMode()) && (this.hoveredElement = null, L());
671
+ (this.callbacks.getSelectMode() || this.callbacks.getDesignMode()) && (this.hoveredElement = null, R());
665
672
  };
666
673
  }
667
674
  let w = null, _ = null, P = null;
@@ -674,12 +681,12 @@ async function ce() {
674
681
  const o = t.default;
675
682
  P = typeof o == "function" ? o : o.default;
676
683
  }
677
- function k(r) {
684
+ function F(r) {
678
685
  return typeof r == "boolean" ? { type: "JSXExpressionContainer", expression: { type: "BooleanLiteral", value: r, loc: null }, loc: null } : typeof r == "number" ? { type: "JSXExpressionContainer", expression: { type: "NumericLiteral", value: r, loc: null }, loc: null } : { type: "StringLiteral", value: String(r), loc: null };
679
686
  }
680
- function F(r, e, t) {
687
+ function $(r, e, t) {
681
688
  const n = r.node.attributes.find((o) => o.type === "JSXAttribute" && o.name.type === "JSXIdentifier" && o.name.name === e);
682
- return n && n.type === "JSXAttribute" ? (n.value = k(t), !0) : (r.node.attributes.push({ type: "JSXAttribute", name: { type: "JSXIdentifier", name: e }, value: k(t), loc: null }), !0);
689
+ return n && n.type === "JSXAttribute" ? (n.value = F(t), !0) : (r.node.attributes.push({ type: "JSXAttribute", name: { type: "JSXIdentifier", name: e }, value: F(t), loc: null }), !0);
683
690
  }
684
691
  async function he(r, e, t, n, o) {
685
692
  try {
@@ -694,12 +701,12 @@ async function he(r, e, t, n, o) {
694
701
  const d = `${h.start.line}:${h.start.column}`;
695
702
  a.set(d, l);
696
703
  const m = l.node.attributes.find((p) => p.type === "JSXAttribute" && p.name.type === "JSXIdentifier" && p.name.name === "data-forge-id" && p.value?.type === "StringLiteral");
697
- m && m.type === "JSXAttribute" && m.value.value === e && (s = F(l, t, n));
704
+ m && m.type === "JSXAttribute" && m.value.value === e && (s = $(l, t, n));
698
705
  } }), !s && o) {
699
706
  const l = o.split(":");
700
707
  if (l.length >= 5) {
701
708
  const h = `${l[l.length - 4]}:${l[l.length - 3]}`, d = a.get(h);
702
- d && (s = F(d, t, n));
709
+ d && (s = $(d, t, n));
703
710
  }
704
711
  }
705
712
  if (s)
@@ -750,7 +757,7 @@ class ge {
750
757
  }
751
758
  const n = this.selectController.findTopmostElementWithSameId(e), o = n.getAttribute("data-component"), i = n.getAttribute("data-source-pos"), s = o || n.tagName.toLowerCase();
752
759
  this.clearSelection(), this.selectedElement = n, this.applyHighlight(n);
753
- const a = n.textContent?.trim() || "", l = n.tagName.toLowerCase(), h = b(H(n)), d = this.componentRegistry.getEditableProps(s), m = this.extractPropValues(n, d);
760
+ const a = n.textContent?.trim() || "", l = n.tagName.toLowerCase(), h = b(M(n)), d = this.componentRegistry.getEditableProps(s), m = this.extractPropValues(n, d);
754
761
  c("client", "Element selected in design mode:", { forgeId: t, sourcePos: i, text: a, type: l, componentName: s, editableProps: d, propValues: m }), this.messenger.send({ type: "ELEMENT_SELECTED", forgeId: t, sourcePos: i || void 0, text: a, elementType: l, xpath: h, componentName: s, editableProps: d, propValues: m, origin: O });
755
762
  }
756
763
  updateText(e, t) {
@@ -808,9 +815,11 @@ class ge {
808
815
  return t ? e[t] : null;
809
816
  }
810
817
  }
811
- class I {
818
+ class C {
812
819
  static instance = null;
813
820
  messenger;
821
+ readyIntervalId = null;
822
+ isConnectedToHost = !1;
814
823
  selectMode = !1;
815
824
  designMode = !1;
816
825
  hoverDisabled = !1;
@@ -820,10 +829,10 @@ class I {
820
829
  designController;
821
830
  onError;
822
831
  constructor(e) {
823
- this.onError = e?.onError, c("client", "ForgeClient initialized"), this.messenger = new G(), this.componentRegistry = new z(), this.selectController = new le(this.messenger, { getSelectMode: () => this.selectMode, getDesignMode: () => this.designMode, getHoverDisabled: () => this.hoverDisabled, getSelectedDesignElement: () => this.designController.getSelectedElement(), onSelectClick: (t) => this.handleSelectClick(t), onDesignClick: (t) => this.handleDesignClick(t) }), this.designController = new ge(this.messenger, this.componentRegistry, this.selectController), this.setupMessageListener(), this.sendReady(), this.setupForgeIdPropagation(), window.__forgeClient = this;
832
+ this.onError = e?.onError, c("client", "ForgeClient initialized"), this.messenger = new V(), this.componentRegistry = new z(), this.selectController = new le(this.messenger, { getSelectMode: () => this.selectMode, getDesignMode: () => this.designMode, getHoverDisabled: () => this.hoverDisabled, getSelectedDesignElement: () => this.designController.getSelectedElement(), onSelectClick: (t) => this.handleSelectClick(t), onDesignClick: (t) => this.handleDesignClick(t) }), this.designController = new ge(this.messenger, this.componentRegistry, this.selectController), this.setupMessageListener(), this.sendReady(), this.setupForgeIdPropagation(), window.__forgeClient = this;
824
833
  }
825
834
  static getInstance(e) {
826
- return I.instance || (I.instance = new I(e)), I.instance;
835
+ return C.instance || (C.instance = new C(e)), C.instance;
827
836
  }
828
837
  enableAnnotationMode(e) {
829
838
  this.setAnnotationMode(e);
@@ -835,8 +844,8 @@ class I {
835
844
  c("client", "Setting up message listener..."), this.messenger.onMessage((e) => {
836
845
  if (W(e.data) || !e.data || typeof e.data != "object" || !("origin" in e.data)) return;
837
846
  const t = e.data;
838
- if (t.origin === V) {
839
- c("client", "Received message from host:", t);
847
+ if (t.origin === j) {
848
+ this.isConnectedToHost || (this.isConnectedToHost = !0, this.readyIntervalId !== null && (window.clearInterval(this.readyIntervalId), this.readyIntervalId = null, c("client", "Host connection detected, stopped CHILD_READY retries"))), c("client", "Received message from host:", t);
840
849
  try {
841
850
  switch (t.type) {
842
851
  case "ENABLE_SELECT_MODE":
@@ -863,6 +872,9 @@ class I {
863
872
  case "SELECT_ANNOTATION":
864
873
  this.annotationOverlay?.selectDot(t.annotationId);
865
874
  break;
875
+ case "UNSELECT_ANNOTATION":
876
+ this.annotationOverlay?.clearSelectedAnnotation();
877
+ break;
866
878
  case "ENTER_ACCUMULATION":
867
879
  this.annotationOverlay && this.annotationOverlay.enterAccumulation(t.annotationId, t.elements);
868
880
  break;
@@ -908,8 +920,14 @@ class I {
908
920
  }
909
921
  sendReady() {
910
922
  c("client", "Scheduling CHILD_READY message..."), setTimeout(() => {
911
- c("client", "Sending CHILD_READY message to parent"), this.messenger.send({ type: "CHILD_READY", origin: O });
912
- }, j.CHILD_READY_DELAY);
923
+ this.isConnectedToHost || (c("client", "Sending CHILD_READY message to parent"), this.messenger.send({ type: "CHILD_READY", origin: O }), this.readyIntervalId === null && (this.readyIntervalId = window.setInterval(() => {
924
+ if (this.isConnectedToHost) {
925
+ this.readyIntervalId !== null && (window.clearInterval(this.readyIntervalId), this.readyIntervalId = null);
926
+ return;
927
+ }
928
+ c("client", "Retrying CHILD_READY message to parent"), this.messenger.send({ type: "CHILD_READY", origin: O });
929
+ }, k.CHILD_READY_RETRY_INTERVAL)));
930
+ }, k.CHILD_READY_DELAY);
913
931
  }
914
932
  setupForgeIdPropagation() {
915
933
  const e = () => {
@@ -938,8 +956,8 @@ class I {
938
956
  }
939
957
  }
940
958
  }
941
- I.getInstance();
959
+ C.getInstance();
942
960
  export {
943
- I as ForgeClient,
944
- G as ParentMessenger
961
+ C as ForgeClient,
962
+ V as ParentMessenger
945
963
  };
@@ -5,7 +5,7 @@ function o(n) {
5
5
  }
6
6
  return !1;
7
7
  }
8
- class a {
8
+ class E {
9
9
  targetWindow;
10
10
  targetOrigin;
11
11
  constructor(e, s = "*") {
@@ -23,7 +23,7 @@ class a {
23
23
  };
24
24
  }
25
25
  }
26
- class r {
26
+ class a {
27
27
  send(e, s) {
28
28
  window.parent && window.parent !== window && window.parent.postMessage(e, s || "*");
29
29
  }
@@ -36,20 +36,20 @@ class r {
36
36
  };
37
37
  }
38
38
  }
39
- const E = "host", O = "sandbox", T = { HIT_TEST_OVERLAY: "9998", HOVER_OVERLAY: "9999", ANNOTATION_DOT: "10000", TOOLTIP: "10001" }, _ = { SELECT_OVERLAY_BORDER: "#1A58D0", SELECT_OVERLAY_BG: "#45ADFF17", DESIGN_SELECTION_OUTLINE: "#9333ea", ANNOTATION_SINGLE: "#1A58D0", ANNOTATION_MULTI: "#1A58D0", ANNOTATION_SINGLE_BG: "#45ADFF17", ANNOTATION_MULTI_BG: "#45ADFF17", DRAG_RECT_BG: "#45ADFF17" }, i = 20, A = 20, N = { CHILD_READY_DELAY: 1e3, CONNECTION_TIMEOUT: 5e3 }, c = ["#root", "#app", "#__next", "[data-reactroot]"], I = 200, d = 30, w = 6;
39
+ const r = "host", T = "sandbox", O = { HIT_TEST_OVERLAY: "9998", HOVER_OVERLAY: "9999", ANNOTATION_DOT: "10000", TOOLTIP: "10001" }, _ = { SELECT_OVERLAY_BORDER: "#1A58D0", SELECT_OVERLAY_BG: "#45ADFF17", DESIGN_SELECTION_OUTLINE: "#9333ea", ANNOTATION_SINGLE: "#1A58D0", ANNOTATION_MULTI: "#1A58D0", ANNOTATION_SINGLE_BG: "#45ADFF17", ANNOTATION_MULTI_BG: "#45ADFF17", DRAG_RECT_BG: "#45ADFF17" }, A = 20, N = 20, i = { CHILD_READY_DELAY: 1e3, CHILD_READY_RETRY_INTERVAL: 3e3, CONNECTION_TIMEOUT: 5e3 }, I = ["#root", "#app", "#__next", "[data-reactroot]"], c = 200, d = 30, L = 6;
40
40
  export {
41
- i as B,
41
+ A as B,
42
42
  _ as C,
43
- O as M,
44
- r as P,
45
- c as R,
46
- N as T,
47
- a as W,
48
- T as Z,
49
- E as a,
50
- w as b,
43
+ T as M,
44
+ a as P,
45
+ I as R,
46
+ i as T,
47
+ E as W,
48
+ O as Z,
49
+ r as a,
50
+ L as b,
51
51
  d as c,
52
- I as d,
53
- A as e,
52
+ c as d,
53
+ N as e,
54
54
  o as i
55
55
  };
@@ -32,6 +32,8 @@ export declare class ForgeHost {
32
32
  deleteAnnotation(annotationId: string): void;
33
33
  /** Selects an annotation dot in the child — highlights its elements and applies selected style. */
34
34
  selectAnnotation(annotationId: string): void;
35
+ /** Clears the selected annotation highlight in the child. */
36
+ unselectAnnotation(): void;
35
37
  /** Enters accumulation mode — the child will toggle elements on click for this annotation. */
36
38
  enterAccumulation(annotationId: string, elements: AnnotationElementInfo[]): void;
37
39
  /** Exits accumulation mode — the child will finalize and send the annotation. */
@@ -1 +1 @@
1
- {"version":3,"file":"ForgeHost.d.ts","sourceRoot":"","sources":["../../src/host/ForgeHost.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAuB,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC5G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAE9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAI9D;;;;;GAKG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,SAAS,CAA+B;IAChD,OAAO,CAAC,MAAM,CAAmC;IACjD,OAAO,CAAC,aAAa,CAA6C;IAClE,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,iBAAiB,CAA4B;IACrD,OAAO,CAAC,iBAAiB,CAAyC;gBAEtD,MAAM,EAAE,iBAAiB;IAMrC;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA6C9B,OAAO,CAAC,gBAAgB;IA+ExB,+DAA+D;IAC/D,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAQxC,iEAAiE;IACjE,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAQxC,mDAAmD;IACnD,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAQ5C,iDAAiD;IACjD,gBAAgB,CAAC,YAAY,EAAE,M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AC7D,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAK5D,gEAAgE;IAChE,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAOtD,mEAAmE;IACnE,aAAa,IAAI,IAAI;IAKrB,2EAA2E;IAC3E,kBAAkB,CAAC,WAAW,EAAE,qBAAqB,EAAE,GAAG,IAAI;IAK9D,6DAA6D;IAC7D,eAAe,IAAI,IAAI;IAOvB,+DAA+D;IAC/D,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,IAAI;IAOzE,0DAA0D;IAC1D,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAOnE,mEAAmE;IACnE,EAAE,CAAC,CAAC,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IAU5E,OAAO,CAAC,IAAI;IASZ,6CAA6C;IAC7C,SAAS,IAAI,gBAAgB;IAI7B,iEAAiE;IACjE,UAAU,IAAI,IAAI;CAanB"}
package/dist/host.js CHANGED
@@ -1,6 +1,6 @@
1
- import { T as c, W as h, a as i, i as d, M as E } from "./constants-BXKWBfHg.js";
1
+ import { T as c, W as h, a as i, i as d, M as E } from "./constants-DqGvo09s.js";
2
2
  import { d as n } from "./debug-CLzmqn3R.js";
3
- class p {
3
+ class u {
4
4
  iframe;
5
5
  messenger = null;
6
6
  status = "disconnected";
@@ -16,14 +16,14 @@ class p {
16
16
  this.status = "connecting";
17
17
  const t = () => {
18
18
  this.readyCheckCleanup && (this.readyCheckCleanup(), this.readyCheckCleanup = null);
19
- }, a = (o) => {
19
+ }, r = (o) => {
20
20
  if (!d(o.data) && (n("host", "Received message:", o.data, "from origin:", o.origin), o.data && typeof o.data == "object" && "type" in o.data)) {
21
- const r = o.data;
22
- r.origin === E && r.type === "CHILD_READY" && (n("host", "CHILD_READY received from sandbox, finishing connection"), t(), this.finishConnection(), e());
21
+ const a = o.data;
22
+ a.origin === E && a.type === "CHILD_READY" && (n("host", "CHILD_READY received from sandbox, finishing connection"), t(), this.finishConnection(), e());
23
23
  }
24
24
  };
25
- n("host", "Setting up message listener for CHILD_READY"), window.addEventListener("message", a), this.readyCheckCleanup = () => {
26
- window.removeEventListener("message", a);
25
+ n("host", "Setting up message listener for CHILD_READY"), window.addEventListener("message", r), this.readyCheckCleanup = () => {
26
+ window.removeEventListener("message", r);
27
27
  }, setTimeout(() => {
28
28
  this.status === "connecting" && (n("host", "Connection timeout - child did not respond"), t(), this.status = "disconnected", s(new Error("Connection timeout - child app did not respond")));
29
29
  }, c.CONNECTION_TIMEOUT);
@@ -50,8 +50,8 @@ class p {
50
50
  break;
51
51
  case "ELEMENT_SELECTED": {
52
52
  n("host", "ELEMENT_SELECTED received:", t);
53
- const a = t.editableProps.map((o) => ({ name: o.name, type: o.type, options: o.options, default: o.default, editable: o.editable, label: o.label }));
54
- this.emit("element-selected", { forgeId: t.forgeId, sourcePos: t.sourcePos, text: t.text, type: t.elementType, xpath: t.xpath, componentName: t.componentName, editableProps: a, propValues: t.propValues });
53
+ const r = t.editableProps.map((o) => ({ name: o.name, type: o.type, options: o.options, default: o.default, editable: o.editable, label: o.label }));
54
+ this.emit("element-selected", { forgeId: t.forgeId, sourcePos: t.sourcePos, text: t.text, type: t.elementType, xpath: t.xpath, componentName: t.componentName, editableProps: r, propValues: t.propValues });
55
55
  break;
56
56
  }
57
57
  case "REGISTER_COMPONENTS":
@@ -93,6 +93,9 @@ class p {
93
93
  selectAnnotation(e) {
94
94
  !this.messenger || this.status !== "connected" || this.messenger.send({ type: "SELECT_ANNOTATION", annotationId: e, origin: i });
95
95
  }
96
+ unselectAnnotation() {
97
+ !this.messenger || this.status !== "connected" || this.messenger.send({ type: "UNSELECT_ANNOTATION", origin: i });
98
+ }
96
99
  enterAccumulation(e, s) {
97
100
  !this.messenger || this.status !== "connected" || this.messenger.send({ type: "ENTER_ACCUMULATION", annotationId: e, elements: s, origin: i });
98
101
  }
@@ -138,8 +141,8 @@ class p {
138
141
  }
139
142
  emit(e, ...s) {
140
143
  const t = this.eventHandlers.get(e);
141
- t && t.forEach((a) => {
142
- a(...s);
144
+ t && t.forEach((r) => {
145
+ r(...s);
143
146
  });
144
147
  }
145
148
  getStatus() {
@@ -150,5 +153,5 @@ class p {
150
153
  }
151
154
  }
152
155
  export {
153
- p as ForgeHost
156
+ u as ForgeHost
154
157
  };
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { ForgeHost as r } from "./host.js";
2
2
  import { ForgeClient as t } from "./client.js";
3
3
  import { a as S, u as m } from "./useDesignMode-VIipNUSj.js";
4
4
  import { e as p } from "./debug-CLzmqn3R.js";
5
- import { a as E, M as g } from "./constants-BXKWBfHg.js";
5
+ import { a as E, M as g } from "./constants-DqGvo09s.js";
6
6
  export {
7
7
  t as ForgeClient,
8
8
  r as ForgeHost,
@@ -18,6 +18,7 @@ export declare const BADGE_HEIGHT = 20;
18
18
  export declare const BADGE_MIN_WIDTH = 20;
19
19
  export declare const TIMEOUTS: {
20
20
  readonly CHILD_READY_DELAY: 1000;
21
+ readonly CHILD_READY_RETRY_INTERVAL: 3000;
21
22
  readonly CONNECTION_TIMEOUT: 5000;
22
23
  };
23
24
  export declare const REACT_ROOT_SELECTORS: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/shared/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO;;;;;CAKV,CAAA;AAGV,eAAO,MAAM,MAAM;;;;;;;;;CAST,CAAA;AAGV,eAAO,MAAM,YAAY,KAAK,CAAA;AAC9B,eAAO,MAAM,eAAe,KAAK,CAAA;AAGjC,eAAO,MAAM,QAAQ;;;CAGX,CAAA;AAGV,eAAO,MAAM,oBAAoB,UAAmD,CAAA;AAGpF,eAAO,MAAM,iBAAiB,MAAM,CAAA;AACpC,eAAO,MAAM,mBAAmB,KAAK,CAAA;AACrC,eAAO,MAAM,cAAc,IAAI,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/shared/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO;;;;;CAKV,CAAA;AAGV,eAAO,MAAM,MAAM;;;;;;;;;CAST,CAAA;AAGV,eAAO,MAAM,YAAY,KAAK,CAAA;AAC9B,eAAO,MAAM,eAAe,KAAK,CAAA;AAGjC,eAAO,MAAM,QAAQ;;;;CAIX,CAAA;AAGV,eAAO,MAAM,oBAAoB,UAAmD,CAAA;AAGpF,eAAO,MAAM,iBAAiB,MAAM,CAAA;AACpC,eAAO,MAAM,mBAAmB,KAAK,CAAA;AACrC,eAAO,MAAM,cAAc,IAAI,CAAA"}
@@ -26,6 +26,9 @@ export type HostToClientMessage = {
26
26
  type: "SELECT_ANNOTATION";
27
27
  annotationId: string;
28
28
  origin: typeof MESSAGE_ORIGIN_HOST;
29
+ } | {
30
+ type: "UNSELECT_ANNOTATION";
31
+ origin: typeof MESSAGE_ORIGIN_HOST;
29
32
  } | {
30
33
  type: "ANNOTATION_UPDATE_ORDERS";
31
34
  orders: Record<string, number>;
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/shared/events.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,EAAG,MAAe,CAAA;AAClD,eAAO,MAAM,sBAAsB,EAAG,SAAkB,CAAA;AAExD,MAAM,MAAM,aAAa,GAAG,OAAO,mBAAmB,GAAG,OAAO,sBAAsB,CAAA;AAItF,MAAM,MAAM,mBAAmB,GAC3B;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,mBAAmB,CAAA;CAAE,GACpF;IAAE,IAAI,EAAE,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,EAAE,MAAM,EAAE,CAAA;IAClB,OAAO,CAAC,EAAE,GAAG,CAAA;IACb,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;CACtC;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,mBAAmB,GAAG,mBAAmB;IACzE,IAAI,EAAE,CAAC,CAAA;IACP,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernovaio/prototyping-tooling",
3
- "version": "0.9.5",
3
+ "version": "0.9.7-alpha.0",
4
4
  "description": "Prototyping Tooling — iframe communication bridge for design-to-code workflows",
5
5
  "type": "module",
6
6
  "license": "MIT",