@repere/react 0.1.1 → 0.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"RepereProvider.d.ts","sourceRoot":"","sources":["../../src/components/RepereProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAUhD,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAO/D,UAAU,mBAAmB;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,MAAM,EACN,KAAK,EACL,SAAS,EACT,KAAK,GACN,EAAE,mBAAmB,kDAkHrB"}
1
+ {"version":3,"file":"RepereProvider.d.ts","sourceRoot":"","sources":["../../src/components/RepereProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAUhD,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAO/D,UAAU,mBAAmB;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,MAAM,EACN,KAAK,EACL,SAAS,EACT,KAAK,GACN,EAAE,mBAAmB,kDAqHrB"}
@@ -4,10 +4,11 @@ interface UseBeaconPositionParams {
4
4
  position: Position;
5
5
  offset?: Offset;
6
6
  zIndex?: number;
7
+ delay?: number;
7
8
  enabled?: boolean;
8
9
  debug?: boolean;
9
10
  }
10
- export declare function useBeaconPosition({ targetSelector, position, offset, zIndex, enabled, debug, }: UseBeaconPositionParams): {
11
+ export declare function useBeaconPosition({ targetSelector, position, offset, zIndex, delay, enabled, debug, }: UseBeaconPositionParams): {
11
12
  calculatedPosition: CalculatedBeaconPosition | null;
12
13
  targetElement: HTMLElement | null;
13
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useBeaconPosition.d.ts","sourceRoot":"","sources":["../../src/hooks/useBeaconPosition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI/E,UAAU,uBAAuB;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,cAAc,EACd,QAAQ,EACR,MAAM,EACN,MAAa,EACb,OAAc,EACd,KAAa,GACd,EAAE,uBAAuB;;;EAkCzB"}
1
+ {"version":3,"file":"useBeaconPosition.d.ts","sourceRoot":"","sources":["../../src/hooks/useBeaconPosition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI/E,UAAU,uBAAuB;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,cAAc,EACd,QAAQ,EACR,MAAM,EACN,MAAa,EACb,KAAK,EACL,OAAc,EACd,KAAa,GACd,EAAE,uBAAuB;;;EAkCzB"}
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { jsx as g, jsxs as J } from "react/jsx-runtime";
2
- import { createContext as K, useContext as Q, useMemo as y, useState as C, useEffect as $, useCallback as A, isValidElement as N, cloneElement as W, useId as Z, forwardRef as b } from "react";
3
- import { createPortal as ee } from "react-dom";
1
+ import { jsx as g, jsxs as Q } from "react/jsx-runtime";
2
+ import { createContext as W, useContext as Z, useMemo as w, useState as k, useEffect as B, useCallback as A, isValidElement as F, cloneElement as ee, useId as te, forwardRef as x } from "react";
3
+ import { createPortal as oe } from "react-dom";
4
4
  import { motion as M } from "motion/react";
5
5
  var m = /* @__PURE__ */ ((e) => (e.TopLeft = "top-left", e.TopCenter = "top-center", e.TopRight = "top-right", e.RightCenter = "right-center", e.BottomRight = "bottom-right", e.BottomCenter = "bottom-center", e.BottomLeft = "bottom-left", e.LeftCenter = "left-center", e))(m || {});
6
- const te = m.TopRight;
7
- class oe {
6
+ const ne = m.TopRight;
7
+ class ie {
8
8
  state = /* @__PURE__ */ new Map();
9
9
  isDismissed(t) {
10
10
  return this.state.get(t)?.isDismissed ?? !1;
@@ -25,70 +25,70 @@ class oe {
25
25
  return Array.from(this.state.values());
26
26
  }
27
27
  }
28
- var v = /* @__PURE__ */ ((e) => (e.Fade = "fade", e.Scale = "scale", e.Grow = "grow", e.Shrink = "shrink", e.SlideUp = "slide-up", e.SlideDown = "slide-down", e.SlideLeft = "slide-left", e.SlideRight = "slide-right", e.None = "none", e))(v || {});
29
- const ne = {
30
- [v.SlideDown]: {
28
+ var f = /* @__PURE__ */ ((e) => (e.Fade = "fade", e.Scale = "scale", e.Grow = "grow", e.Shrink = "shrink", e.SlideUp = "slide-up", e.SlideDown = "slide-down", e.SlideLeft = "slide-left", e.SlideRight = "slide-right", e.None = "none", e))(f || {});
29
+ const se = {
30
+ [f.SlideDown]: {
31
31
  initial: { y: -20, opacity: 0 },
32
32
  animate: { y: 0, opacity: 1 },
33
33
  exit: { y: -20, opacity: 0 }
34
34
  },
35
- [v.SlideUp]: {
35
+ [f.SlideUp]: {
36
36
  initial: { y: 20, opacity: 0 },
37
37
  animate: { y: 0, opacity: 1 },
38
38
  exit: { y: 20, opacity: 0 }
39
39
  },
40
- [v.SlideLeft]: {
40
+ [f.SlideLeft]: {
41
41
  initial: { x: 20, opacity: 0 },
42
42
  animate: { x: 0, opacity: 1 },
43
43
  exit: { x: 20, opacity: 0 }
44
44
  },
45
- [v.SlideRight]: {
45
+ [f.SlideRight]: {
46
46
  initial: { x: -20, opacity: 0 },
47
47
  animate: { x: 0, opacity: 1 },
48
48
  exit: { x: -20, opacity: 0 }
49
49
  },
50
- [v.Fade]: {
50
+ [f.Fade]: {
51
51
  initial: { opacity: 0 },
52
52
  animate: { opacity: 1 },
53
53
  exit: { opacity: 0 }
54
54
  },
55
- [v.Shrink]: {
55
+ [f.Shrink]: {
56
56
  initial: { scale: 1.1, opacity: 0 },
57
57
  animate: { scale: 1, opacity: 1 },
58
58
  exit: { scale: 0.9, opacity: 0 }
59
59
  },
60
- [v.Grow]: {
60
+ [f.Grow]: {
61
61
  initial: { scale: 0.9, opacity: 0 },
62
62
  animate: { scale: 1, opacity: 1 },
63
63
  exit: { scale: 1.1, opacity: 0 }
64
64
  },
65
- [v.Scale]: {
65
+ [f.Scale]: {
66
66
  initial: { scale: 0, opacity: 0 },
67
67
  animate: { scale: 1, opacity: 1 },
68
68
  exit: { scale: 0, opacity: 0 }
69
69
  },
70
- [v.None]: {
70
+ [f.None]: {
71
71
  initial: {},
72
72
  animate: {},
73
73
  exit: {}
74
74
  }
75
75
  };
76
- function z(e) {
76
+ function L(e) {
77
77
  return e ? typeof e == "string" ? { variant: e } : e : null;
78
78
  }
79
- function L(e, t) {
80
- const o = z(e), i = z(t);
81
- return !o && !i ? null : o ? i ? {
82
- variant: i.variant ?? o.variant,
83
- duration: i.duration ?? o.duration,
84
- delay: i.delay ?? o.delay,
85
- ease: i.ease ?? o.ease
86
- } : o : i;
79
+ function T(e, t) {
80
+ const o = L(e), n = L(t);
81
+ return !o && !n ? null : o ? n ? {
82
+ variant: n.variant ?? o.variant,
83
+ duration: n.duration ?? o.duration,
84
+ delay: n.delay ?? o.delay,
85
+ ease: n.ease ?? o.ease
86
+ } : o : n;
87
87
  }
88
- function B(e) {
89
- const t = z(e);
88
+ function $(e) {
89
+ const t = L(e);
90
90
  if (!t) return null;
91
- const o = ne[t.variant];
91
+ const o = se[t.variant];
92
92
  return o ? {
93
93
  variants: o,
94
94
  transition: {
@@ -100,29 +100,29 @@ function B(e) {
100
100
  }
101
101
  } : (console.warn(`[Repere] Unknown animation variant: ${t.variant}`), null);
102
102
  }
103
- function ie(e, t) {
104
- const o = (n) => {
105
- const a = n.match(/(-?\d+)%/);
103
+ function re(e, t) {
104
+ const o = (i) => {
105
+ const a = i.match(/(-?\d+)%/);
106
106
  return a ? parseFloat(a[1]) : 0;
107
- }, i = o(e.x), r = o(e.y), s = (n = 0) => r === 0 && n === 0 ? `translate(${i}%, 0)` : n === 0 ? `translate(${i}%, ${r}%)` : `translate(${i}%, calc(${r}% + ${n}px))`;
107
+ }, n = o(e.x), s = o(e.y), r = (i = 0) => s === 0 && i === 0 ? `translate(${n}%, 0)` : i === 0 ? `translate(${n}%, ${s}%)` : `translate(${n}%, calc(${s}% + ${i}px))`;
108
108
  return {
109
109
  initial: {
110
110
  ...t.initial,
111
- transform: s(t.initial.y || 0)
111
+ transform: r(t.initial.y || 0)
112
112
  },
113
113
  animate: {
114
114
  ...t.animate,
115
- transform: s(t.animate.y || 0)
115
+ transform: r(t.animate.y || 0)
116
116
  },
117
117
  exit: {
118
118
  ...t.exit,
119
- transform: s(t.exit.y || 0)
119
+ transform: r(t.exit.y || 0)
120
120
  }
121
121
  };
122
122
  }
123
- function se(e, t) {
123
+ function ae(e, t) {
124
124
  if (!e && !t) return {};
125
- const o = e?.variants, i = e?.transition, r = t?.variants, s = t?.transition, n = s?.ease ?? i?.ease ?? [0.4, 0, 0.2, 1], a = Array.isArray(n) ? `cubic-bezier(${n.join(", ")})` : n;
125
+ const o = e?.variants, n = e?.transition, s = t?.variants, r = t?.transition, i = r?.ease ?? n?.ease ?? [0.4, 0, 0.2, 1], a = Array.isArray(i) ? `cubic-bezier(${i.join(", ")})` : i;
126
126
  return {
127
127
  // Initial state (when opening starts) - from onOpen animation
128
128
  "--repere-initial-opacity": o?.initial.opacity ?? 0,
@@ -135,23 +135,23 @@ function se(e, t) {
135
135
  "--repere-animate-y": `${o?.animate.y ?? 0}px`,
136
136
  "--repere-animate-scale": o?.animate.scale ?? 1,
137
137
  // Exit state (when closing) - from onClose animation
138
- "--repere-exit-opacity": r?.exit.opacity ?? 0,
139
- "--repere-exit-x": `${r?.exit.x ?? 0}px`,
140
- "--repere-exit-y": `${r?.exit.y ?? 0}px`,
141
- "--repere-exit-scale": r?.exit.scale ?? 1,
138
+ "--repere-exit-opacity": s?.exit.opacity ?? 0,
139
+ "--repere-exit-x": `${s?.exit.x ?? 0}px`,
140
+ "--repere-exit-y": `${s?.exit.y ?? 0}px`,
141
+ "--repere-exit-scale": s?.exit.scale ?? 1,
142
142
  // Transition timing
143
- "--repere-transition-duration": `${s?.duration ?? i?.duration ?? 0.3}s`,
143
+ "--repere-transition-duration": `${r?.duration ?? n?.duration ?? 0.3}s`,
144
144
  "--repere-transition-timing": a
145
145
  };
146
146
  }
147
- function re(e, t) {
148
- const o = e?.transition.duration ?? 0, i = t?.transition.duration ?? 0;
149
- return Math.max(o, i) * 1e3;
147
+ function le(e, t) {
148
+ const o = e?.transition.duration ?? 0, n = t?.transition.duration ?? 0;
149
+ return Math.max(o, n) * 1e3;
150
150
  }
151
- function ae(e) {
151
+ function ce(e) {
152
152
  return new Promise((t) => setTimeout(t, e));
153
153
  }
154
- function le(e, t) {
154
+ function pe(e, t) {
155
155
  if (t instanceof RegExp)
156
156
  return t.test(e);
157
157
  if (t === e)
@@ -162,7 +162,7 @@ function le(e, t) {
162
162
  }
163
163
  return !1;
164
164
  }
165
- class ce {
165
+ class de {
166
166
  store;
167
167
  debug;
168
168
  constructor(t, o = {}) {
@@ -173,45 +173,45 @@ class ce {
173
173
  * This supports wildcards - e.g., path="*" will match all pages
174
174
  */
175
175
  findMatchingPages(t, o) {
176
- const i = t.filter((r) => typeof r.path == "function" ? r.path(o) : le(o, r.path));
176
+ const n = t.filter((s) => typeof s.path == "function" ? s.path(o) : pe(o, s.path));
177
177
  return this.debug && console.log(
178
178
  "[BeaconManager] Path:",
179
179
  o,
180
180
  "Matched pages:",
181
- i.map((r) => r.id).join(", ") || "none"
182
- ), i;
181
+ n.map((s) => s.id).join(", ") || "none"
182
+ ), n;
183
183
  }
184
184
  /**
185
185
  * Get all active (non-dismissed) beacons for the current path
186
186
  * Includes beacons from all matching pages (supports wildcards)
187
187
  */
188
188
  async getActiveBeacons(t, o) {
189
- const i = this.findMatchingPages(t, o);
190
- if (i.length === 0)
189
+ const n = this.findMatchingPages(t, o);
190
+ if (n.length === 0)
191
191
  return this.debug && console.log("[BeaconManager] No matching pages found"), [];
192
192
  this.debug && console.log(
193
193
  "[BeaconManager] Found",
194
- i.length,
194
+ n.length,
195
195
  "matching page(s):",
196
- i.map((a) => a.id).join(", ")
196
+ n.map((a) => a.id).join(", ")
197
197
  );
198
- const r = [], s = /* @__PURE__ */ new Set();
199
- for (const a of i)
198
+ const s = [], r = /* @__PURE__ */ new Set();
199
+ for (const a of n)
200
200
  for (const l of a.beacons) {
201
- if (s.has(l.id)) {
201
+ if (r.has(l.id)) {
202
202
  this.debug && console.warn(
203
203
  `[BeaconManager] Duplicate beacon ID "${l.id}" in page "${a.id}", skipping`
204
204
  );
205
205
  continue;
206
206
  }
207
- s.add(l.id), r.push(l);
207
+ r.add(l.id), s.push(l);
208
208
  }
209
- const n = [];
210
- for (const a of r)
209
+ const i = [];
210
+ for (const a of s)
211
211
  await Promise.resolve(
212
212
  this.store.isDismissed(a.id)
213
- ) ? this.debug && console.log("[BeaconManager] Beacon", a.id, "is dismissed") : n.push(a);
214
- return this.debug && console.log("[BeaconManager] Active beacons:", n.length), n;
213
+ ) ? this.debug && console.log("[BeaconManager] Beacon", a.id, "is dismissed") : i.push(a);
214
+ return this.debug && console.log("[BeaconManager] Active beacons:", i.length), i;
215
215
  }
216
216
  /**
217
217
  * Get the store instance
@@ -220,46 +220,46 @@ class ce {
220
220
  return this.store;
221
221
  }
222
222
  }
223
- function pe(e, t = m.TopRight, o = { x: 0, y: 0 }) {
224
- const { x: i = 0, y: r = 0 } = o;
225
- let s = 0, n = 0, a = "0", l = "0";
223
+ function N(e, t = m.TopRight, o = { x: 0, y: 0 }) {
224
+ const { x: n = 0, y: s = 0 } = o;
225
+ let r = 0, i = 0, a = "0", l = "0";
226
226
  switch (t) {
227
227
  // Top positions
228
228
  case m.TopLeft:
229
- s = e.top + window.scrollY, n = e.left + window.scrollX, a = "-50%", l = "-100%";
229
+ r = e.top + window.scrollY, i = e.left + window.scrollX, a = "-50%", l = "-100%";
230
230
  break;
231
231
  case m.TopCenter:
232
- s = e.top + window.scrollY, n = e.left + window.scrollX + e.width / 2, a = "-50%", l = "-100%";
232
+ r = e.top + window.scrollY, i = e.left + window.scrollX + e.width / 2, a = "-50%", l = "-100%";
233
233
  break;
234
234
  case m.TopRight:
235
- s = e.top + window.scrollY, n = e.right + window.scrollX, a = "-50%", l = "-100%";
235
+ r = e.top + window.scrollY, i = e.right + window.scrollX, a = "-50%", l = "-100%";
236
236
  break;
237
237
  // Right positions
238
238
  case m.RightCenter:
239
- s = e.top + window.scrollY + e.height / 2, n = e.right + window.scrollX, a = "0", l = "-50%";
239
+ r = e.top + window.scrollY + e.height / 2, i = e.right + window.scrollX, a = "0", l = "-50%";
240
240
  break;
241
241
  // Bottom positions
242
242
  case m.BottomLeft:
243
- s = e.bottom + window.scrollY, n = e.left + window.scrollX, a = "-50%", l = "0";
243
+ r = e.bottom + window.scrollY, i = e.left + window.scrollX, a = "-50%", l = "0";
244
244
  break;
245
245
  case m.BottomCenter:
246
- s = e.bottom + window.scrollY, n = e.left + window.scrollX + e.width / 2, a = "-50%", l = "0";
246
+ r = e.bottom + window.scrollY, i = e.left + window.scrollX + e.width / 2, a = "-50%", l = "0";
247
247
  break;
248
248
  case m.BottomRight:
249
- s = e.bottom + window.scrollY, n = e.right + window.scrollX, a = "-50%", l = "0";
249
+ r = e.bottom + window.scrollY, i = e.right + window.scrollX, a = "-50%", l = "0";
250
250
  break;
251
251
  // Left positions
252
252
  case m.LeftCenter:
253
- s = e.top + window.scrollY + e.height / 2, n = e.left + window.scrollX, a = "-100%", l = "-50%";
253
+ r = e.top + window.scrollY + e.height / 2, i = e.left + window.scrollX, a = "-100%", l = "-50%";
254
254
  break;
255
255
  }
256
- return s += r, n += i, {
257
- top: s,
258
- left: n,
256
+ return r += s, i += n, {
257
+ top: r,
258
+ left: i,
259
259
  translate: { x: a, y: l }
260
260
  };
261
261
  }
262
- class de {
262
+ class ue {
263
263
  tracked = /* @__PURE__ */ new Map();
264
264
  scrollListener = null;
265
265
  resizeListener = null;
@@ -272,34 +272,92 @@ class de {
272
272
  /**
273
273
  * Subscribe to position updates for an element
274
274
  */
275
- subscribe(t, o, i, r = {}) {
276
- const s = t;
277
- return this.tracked.has(s) || this.tracked.set(s, {
275
+ subscribe(t, o, n, s = {}) {
276
+ const r = t;
277
+ this.tracked.has(r) || this.tracked.set(r, {
278
278
  selector: t,
279
279
  position: o,
280
- offset: r.offset,
281
- zIndex: r.zIndex ?? 9999,
282
- callbacks: /* @__PURE__ */ new Set(),
283
- element: null
284
- }), this.tracked.get(s)?.callbacks.add(i), this.tracked.size === 1 && this.startListening(), this.updatePosition(s), () => {
285
- const n = this.tracked.get(s);
286
- n && (n.callbacks.delete(i), n.callbacks.size === 0 && (this.tracked.delete(s), this.tracked.size === 0 && this.stopListening()));
280
+ offset: s.offset,
281
+ zIndex: s.zIndex ?? 9999,
282
+ delay: s.delay,
283
+ callbacks: /* @__PURE__ */ new Map(),
284
+ element: null,
285
+ delayTimeoutIds: /* @__PURE__ */ new Map()
286
+ });
287
+ const i = this.tracked.get(r);
288
+ return i ? (i.callbacks.set(n, {
289
+ callback: n,
290
+ needsInitialDelay: (s.delay ?? 0) > 0
291
+ }), this.tracked.size === 1 && this.startListening(), this.scheduleInitialUpdate(r, n), () => {
292
+ const a = this.tracked.get(r);
293
+ if (a) {
294
+ const l = a.delayTimeoutIds.get(n);
295
+ if (l !== void 0 && (clearTimeout(l), a.delayTimeoutIds.delete(n)), a.callbacks.delete(n), a.callbacks.size === 0) {
296
+ for (const [, c] of a.delayTimeoutIds)
297
+ clearTimeout(c);
298
+ a.delayTimeoutIds.clear(), this.tracked.delete(r), this.tracked.size === 0 && this.stopListening();
299
+ }
300
+ }
301
+ }) : () => {
287
302
  };
288
303
  }
304
+ scheduleInitialUpdate(t, o) {
305
+ const n = this.tracked.get(t);
306
+ if (!n) return;
307
+ const s = n.callbacks.get(o);
308
+ if (s)
309
+ if (s.needsInitialDelay && n.delay && n.delay > 0) {
310
+ this.debug && console.log(
311
+ `[PositionTracker] Delaying initial position calculation for ${t} by ${n.delay}ms`
312
+ );
313
+ const r = setTimeout(() => {
314
+ this.debug && console.log(
315
+ `[PositionTracker] Calculating position for ${t} after delay`
316
+ );
317
+ const i = n.callbacks.get(o);
318
+ i && (i.needsInitialDelay = !1), n.delayTimeoutIds.delete(o), this.updatePositionForCallback(t, o);
319
+ }, n.delay);
320
+ n.delayTimeoutIds.set(o, r);
321
+ } else
322
+ this.updatePositionForCallback(t, o);
323
+ }
324
+ updatePositionForCallback(t, o) {
325
+ const n = this.tracked.get(t);
326
+ if (!n) return;
327
+ const s = document.querySelector(n.selector);
328
+ if (!s) {
329
+ this.debug && console.log(`[PositionTracker] Element not found: ${n.selector}`), n.element = null, o(null);
330
+ return;
331
+ }
332
+ n.element = s;
333
+ const r = s.getBoundingClientRect(), i = {
334
+ ...N(
335
+ r,
336
+ n.position,
337
+ n.offset
338
+ ),
339
+ position: "fixed",
340
+ zIndex: n.zIndex
341
+ };
342
+ this.debug && console.log(
343
+ `[PositionTracker] Updated position for ${n.selector}:`,
344
+ i
345
+ ), o(i);
346
+ }
289
347
  updatePosition(t) {
290
348
  const o = this.tracked.get(t);
291
349
  if (!o) return;
292
- const i = document.querySelector(o.selector);
293
- if (!i) {
350
+ const n = document.querySelector(o.selector);
351
+ if (!n) {
294
352
  this.debug && console.log(`[PositionTracker] Element not found: ${o.selector}`), o.element = null;
295
- for (const n of o.callbacks)
296
- n(null);
353
+ for (const [i] of o.callbacks)
354
+ i(null);
297
355
  return;
298
356
  }
299
- o.element = i;
300
- const r = i.getBoundingClientRect(), s = {
301
- ...pe(
302
- r,
357
+ o.element = n;
358
+ const s = n.getBoundingClientRect(), r = {
359
+ ...N(
360
+ s,
303
361
  o.position,
304
362
  o.offset
305
363
  ),
@@ -308,10 +366,10 @@ class de {
308
366
  };
309
367
  this.debug && console.log(
310
368
  `[PositionTracker] Updated position for ${o.selector}:`,
311
- s
369
+ r
312
370
  );
313
- for (const n of o.callbacks)
314
- n(s);
371
+ for (const [i] of o.callbacks)
372
+ i(r);
315
373
  }
316
374
  updateAllPositions = () => {
317
375
  for (const [t] of this.tracked)
@@ -332,84 +390,90 @@ class de {
332
390
  * Clean up all listeners and subscriptions
333
391
  */
334
392
  destroy() {
393
+ for (const [, t] of this.tracked) {
394
+ for (const [, o] of t.delayTimeoutIds)
395
+ clearTimeout(o);
396
+ t.delayTimeoutIds.clear();
397
+ }
335
398
  this.stopListening(), this.tracked.clear();
336
399
  }
337
400
  }
338
- const j = K(null);
339
- function k() {
340
- const e = Q(j);
401
+ const j = W(null);
402
+ function I() {
403
+ const e = Z(j);
341
404
  if (!e)
342
405
  throw new Error("useRepereContext must be used within a Repere provider.");
343
406
  return e;
344
407
  }
345
- function ue(e, t) {
346
- const o = y(() => {
347
- const n = t.trigger?.animations?.onRender, a = e.trigger?.animations?.onRender;
348
- return B(L(n, a));
349
- }, [t.trigger?.animations, e.trigger?.animations]), i = y(() => {
350
- const n = t.trigger?.animations?.onDismiss, a = e.trigger?.animations?.onDismiss;
351
- return B(L(n, a));
408
+ function me(e, t) {
409
+ const o = w(() => {
410
+ const i = t.trigger?.animations?.onRender, a = e.trigger?.animations?.onRender;
411
+ return $(T(i, a));
412
+ }, [t.trigger?.animations, e.trigger?.animations]), n = w(() => {
413
+ const i = t.trigger?.animations?.onDismiss, a = e.trigger?.animations?.onDismiss;
414
+ return $(T(i, a));
352
415
  }, [
353
416
  t.trigger?.animations?.onDismiss,
354
417
  e.trigger?.animations?.onDismiss
355
- ]), r = y(() => {
356
- const n = t.popover?.animations?.onOpen, a = e.popover?.animations?.onOpen;
357
- return B(L(n, a));
358
- }, [t.popover?.animations?.onOpen, e.popover?.animations?.onOpen]), s = y(() => {
359
- const n = t.popover?.animations?.onClose, a = e.popover?.animations?.onClose;
360
- return B(L(n, a));
418
+ ]), s = w(() => {
419
+ const i = t.popover?.animations?.onOpen, a = e.popover?.animations?.onOpen;
420
+ return $(T(i, a));
421
+ }, [t.popover?.animations?.onOpen, e.popover?.animations?.onOpen]), r = w(() => {
422
+ const i = t.popover?.animations?.onClose, a = e.popover?.animations?.onClose;
423
+ return $(T(i, a));
361
424
  }, [
362
425
  t.popover?.animations?.onClose,
363
426
  e.popover?.animations?.onClose
364
427
  ]);
365
428
  return {
366
429
  triggerAnimation: o,
367
- triggerDismissAnimation: i,
368
- popoverOpenAnimation: r,
369
- popoverCloseAnimation: s
430
+ triggerDismissAnimation: n,
431
+ popoverOpenAnimation: s,
432
+ popoverCloseAnimation: r
370
433
  };
371
434
  }
372
- function me({
435
+ function ge({
373
436
  targetSelector: e,
374
437
  position: t,
375
438
  offset: o,
376
- zIndex: i = 9999,
439
+ zIndex: n = 9999,
440
+ delay: s,
377
441
  enabled: r = !0,
378
- debug: s = !1
442
+ debug: i = !1
379
443
  }) {
380
- const [n, a] = C(null), l = y(() => new de(s), [s]);
381
- return $(() => {
444
+ const [a, l] = k(null), c = w(() => new ue(i), [i]);
445
+ return B(() => {
382
446
  if (!r) {
383
- a(null);
447
+ l(null);
384
448
  return;
385
449
  }
386
- return l.subscribe(
450
+ return c.subscribe(
387
451
  e,
388
452
  t,
389
- a,
390
- { offset: o, zIndex: i }
453
+ l,
454
+ { offset: o, zIndex: n, delay: s }
391
455
  );
392
- }, [l, e, t, o, i, r]), $(() => () => l.destroy(), [l]), {
393
- calculatedPosition: n,
394
- targetElement: n ? document.querySelector(e) : null
456
+ }, [c, e, t, o, n, s, r]), B(() => () => c.destroy(), [c]), {
457
+ calculatedPosition: a,
458
+ targetElement: a ? document.querySelector(e) : null
395
459
  };
396
460
  }
397
- function ge() {
398
- const [e, t] = C(!1), [o, i] = C(
461
+ function fe() {
462
+ const [e, t] = k(!1), [o, n] = k(
399
463
  null
400
- ), r = A((l) => {
401
- i(l);
402
- }, []), s = A(
464
+ ), s = A((l) => {
465
+ n(l);
466
+ }, []), r = A(
403
467
  () => o?.togglePopover(),
404
468
  [o]
405
- ), n = A(
469
+ ), i = A(
406
470
  () => o?.showPopover(),
407
471
  [o]
408
472
  ), a = A(
409
473
  () => o?.hidePopover(),
410
474
  [o]
411
475
  );
412
- return $(() => {
476
+ return B(() => {
413
477
  if (!o) return;
414
478
  const l = (c) => {
415
479
  t(c.newState === "open");
@@ -418,14 +482,14 @@ function ge() {
418
482
  }, [o]), {
419
483
  isOpen: e,
420
484
  popoverElement: o,
421
- handlePopoverRef: r,
422
- togglePopover: s,
423
- showPopover: n,
485
+ handlePopoverRef: s,
486
+ togglePopover: r,
487
+ showPopover: i,
424
488
  hidePopover: a
425
489
  };
426
490
  }
427
491
  function ve(e, t) {
428
- return e ? N(e) ? e : /* @__PURE__ */ g(
492
+ return e ? F(e) ? e : /* @__PURE__ */ g(
429
493
  e,
430
494
  {
431
495
  beacon: t.beacon,
@@ -438,7 +502,7 @@ function ve(e, t) {
438
502
  }
439
503
  function he(e, t) {
440
504
  let o;
441
- return N(e) ? o = e : o = /* @__PURE__ */ g(
505
+ return F(e) ? o = e : o = /* @__PURE__ */ g(
442
506
  e,
443
507
  {
444
508
  beacon: t.beacon,
@@ -446,138 +510,140 @@ function he(e, t) {
446
510
  onDismiss: t.handleDismiss,
447
511
  onClose: t.hidePopover
448
512
  }
449
- ), W(o, {
513
+ ), ee(o, {
450
514
  // @ts-expect-error - cloneElement ref typing doesn't handle callback refs properly
451
515
  ref: t.handlePopoverRef,
452
516
  id: t.popoverId,
453
517
  popover: "auto"
454
518
  });
455
519
  }
456
- function fe(e, t) {
457
- const o = e.trigger?.position || t.trigger?.position || te, i = e.trigger?.zIndex || t.trigger?.zIndex || 9999, r = e.trigger?.offset, s = e.popover?.position || t.popover?.position || o, n = e.popover?.offset || t.popover?.offset || { x: 0, y: 0 };
520
+ function ye(e, t) {
521
+ const o = e.trigger?.position || t.trigger?.position || ne, n = e.trigger?.zIndex || t.trigger?.zIndex || 9999, s = e.trigger?.offset, r = e.trigger?.delay ?? t.trigger?.delay, i = e.popover?.position || t.popover?.position || o, a = e.popover?.offset || t.popover?.offset || { x: 0, y: 0 };
458
522
  return {
459
523
  position: o,
460
- zIndex: i,
461
- offset: r,
462
- popoverPosition: s,
463
- popoverOffset: n
524
+ zIndex: n,
525
+ offset: s,
526
+ delay: r,
527
+ popoverPosition: i,
528
+ popoverOffset: a
464
529
  };
465
530
  }
466
531
  function we({
467
532
  beacon: e,
468
533
  config: t,
469
534
  store: o,
470
- onDismiss: i,
471
- debug: r
535
+ onDismiss: n,
536
+ debug: s
472
537
  }) {
473
- const s = Z(), [n, a] = C(!1), { position: l, zIndex: c, offset: d, popoverPosition: w, popoverOffset: p } = fe(e, t), { calculatedPosition: u, targetElement: h } = me({
538
+ const r = te(), [i, a] = k(!1), { position: l, zIndex: c, offset: d, delay: h, popoverPosition: p, popoverOffset: v } = ye(e, t), { calculatedPosition: u, targetElement: b } = ge({
474
539
  targetSelector: e.selector,
475
540
  position: l,
476
541
  offset: d,
477
542
  zIndex: c,
543
+ delay: h,
478
544
  enabled: !0,
479
- debug: r
545
+ debug: s
480
546
  }), {
481
- isOpen: x,
482
- popoverElement: R,
483
- handlePopoverRef: P,
484
- togglePopover: f,
485
- showPopover: O,
486
- hidePopover: I
487
- } = ge(), {
488
- triggerAnimation: _,
547
+ isOpen: C,
548
+ popoverElement: P,
549
+ handlePopoverRef: y,
550
+ togglePopover: R,
551
+ showPopover: q,
552
+ hidePopover: O
553
+ } = fe(), {
554
+ triggerAnimation: G,
489
555
  triggerDismissAnimation: D,
490
- popoverOpenAnimation: G,
491
- popoverCloseAnimation: T
492
- } = ue(e, t), E = async () => {
493
- a(!0), R?.hidePopover();
494
- const H = re(
556
+ popoverOpenAnimation: V,
557
+ popoverCloseAnimation: z
558
+ } = me(e, t), E = async () => {
559
+ a(!0), P?.hidePopover();
560
+ const K = le(
495
561
  D,
496
- T
562
+ z
497
563
  );
498
- await ae(H), await Promise.resolve(o.dismiss(e.id)), i();
499
- }, V = {
564
+ await ce(K), await Promise.resolve(o.dismiss(e.id)), n();
565
+ }, H = {
500
566
  beaconId: e.id,
501
567
  position: l,
502
- popoverPosition: w,
503
- popoverOffset: p,
568
+ popoverPosition: p,
569
+ popoverOffset: v,
504
570
  calculatedPosition: u,
505
- isOpen: x,
506
- isDismissing: n,
507
- toggle: f,
508
- open: O,
509
- close: I,
571
+ isOpen: C,
572
+ isDismissing: i,
573
+ toggle: R,
574
+ open: q,
575
+ close: O,
510
576
  dismiss: E,
511
- triggerAnimation: _,
577
+ triggerAnimation: G,
512
578
  triggerDismissAnimation: D,
513
- popoverOpenAnimation: G,
514
- popoverCloseAnimation: T,
515
- popoverId: s
516
- }, q = e.trigger?.component || t.trigger?.component, S = e.popover.component || t.popover?.component;
517
- return !u || !h ? (r && console.warn(
518
- `[Repere] ${e.id} waiting for target element: position=${!!u}, element=${!!h}`
519
- ), null) : S ? /* @__PURE__ */ J(j.Provider, { value: V, children: [
520
- ve(q, {
579
+ popoverOpenAnimation: V,
580
+ popoverCloseAnimation: z,
581
+ popoverId: r
582
+ }, J = e.trigger?.component || t.trigger?.component, S = e.popover.component || t.popover?.component;
583
+ return !u || !b ? (s && console.warn(
584
+ `[Repere] ${e.id} waiting for target element: position=${!!u}, element=${!!b}`
585
+ ), null) : S ? /* @__PURE__ */ Q(j.Provider, { value: H, children: [
586
+ ve(J, {
521
587
  beacon: e,
522
588
  calculatedPosition: u,
523
589
  position: l,
524
- isOpen: x,
525
- togglePopover: f
590
+ isOpen: C,
591
+ togglePopover: R
526
592
  }),
527
593
  he(S, {
528
594
  beacon: e,
529
595
  position: l,
530
596
  handleDismiss: E,
531
- hidePopover: I,
532
- handlePopoverRef: P,
533
- popoverId: s
597
+ hidePopover: O,
598
+ handlePopoverRef: y,
599
+ popoverId: r
534
600
  })
535
- ] }) : (r && console.warn(
601
+ ] }) : (s && console.warn(
536
602
  "[Repere] No popover component provided for beacon:",
537
603
  e.id
538
604
  ), null);
539
605
  }
540
- function Be({
606
+ function $e({
541
607
  config: e,
542
608
  currentPath: t,
543
609
  enabled: o = !0,
544
- debug: i = !1
610
+ debug: n = !1
545
611
  }) {
546
- const r = y(
547
- () => e.store || new oe(),
612
+ const s = w(
613
+ () => e.store || new ie(),
548
614
  [e.store]
549
- ), s = y(
550
- () => new ce(r, { debug: i }),
551
- [r, i]
552
- ), [n, a] = C([]), [l, c] = C(
615
+ ), r = w(
616
+ () => new de(s, { debug: n }),
617
+ [s, n]
618
+ ), [i, a] = k([]), [l, c] = k(
553
619
  /* @__PURE__ */ new Set()
554
620
  );
555
- $(() => {
621
+ B(() => {
556
622
  if (!o) {
557
623
  a([]), c(/* @__PURE__ */ new Set());
558
624
  return;
559
625
  }
560
626
  (async () => {
561
- const u = await s.getActiveBeacons(
627
+ const v = await r.getActiveBeacons(
562
628
  e.pages,
563
629
  t
564
630
  );
565
- a(u);
631
+ a(v);
566
632
  })();
567
- }, [s, e.pages, t, o]);
633
+ }, [r, e.pages, t, o]);
568
634
  const d = (p) => {
569
- c((u) => /* @__PURE__ */ new Set([...u, p]));
570
- }, w = n.filter(
635
+ c((v) => /* @__PURE__ */ new Set([...v, p]));
636
+ }, h = i.filter(
571
637
  (p) => !l.has(p.id)
572
638
  );
573
- return w.length === 0 ? null : ee(
574
- w.map((p) => /* @__PURE__ */ g(
639
+ return h.length === 0 ? null : oe(
640
+ h.map((p) => /* @__PURE__ */ g(
575
641
  we,
576
642
  {
577
643
  beacon: p,
578
644
  config: e,
579
- store: r,
580
- debug: i,
645
+ store: s,
646
+ debug: n,
581
647
  onDismiss: () => d(p.id)
582
648
  },
583
649
  p.id
@@ -585,47 +651,47 @@ function Be({
585
651
  document.body
586
652
  );
587
653
  }
588
- const X = b(
654
+ const X = x(
589
655
  ({
590
656
  children: e,
591
657
  style: t,
592
658
  popover: o = "auto",
593
- disableAnimation: i,
659
+ disableAnimation: n,
594
660
  // Destructure and discard internal props so they don't spread to DOM
595
- beacon: r,
596
- position: s,
597
- onDismiss: n,
661
+ beacon: s,
662
+ position: r,
663
+ onDismiss: i,
598
664
  onClose: a,
599
665
  ...l
600
666
  }, c) => {
601
667
  const {
602
668
  beaconId: d,
603
- popoverOpenAnimation: w,
669
+ popoverOpenAnimation: h,
604
670
  popoverCloseAnimation: p,
605
- popoverPosition: u,
606
- popoverOffset: h
607
- } = k(), x = A(
608
- (f) => {
609
- typeof c == "function" ? c(f) : c && (c.current = f);
671
+ popoverPosition: v,
672
+ popoverOffset: u
673
+ } = I(), b = A(
674
+ (y) => {
675
+ typeof c == "function" ? c(y) : c && (c.current = y);
610
676
  },
611
677
  [c]
612
678
  ), P = {
613
679
  positionAnchor: d ? `--repere-trigger-${d}` : void 0,
614
- ...h && {
615
- marginLeft: h.x || 0,
616
- marginTop: h.y || 0
680
+ ...u && {
681
+ marginLeft: u.x || 0,
682
+ marginTop: u.y || 0
617
683
  },
618
- ...se(w, p),
684
+ ...ae(h, p),
619
685
  ...t
620
686
  };
621
687
  return /* @__PURE__ */ g(
622
688
  "div",
623
689
  {
624
- ref: x,
690
+ ref: b,
625
691
  role: "dialog",
626
692
  "aria-labelledby": `repere-popover-${d}`,
627
693
  "data-repere-popover": "",
628
- "data-position": u,
694
+ "data-position": v,
629
695
  popover: o,
630
696
  ...l,
631
697
  style: P,
@@ -635,38 +701,38 @@ const X = b(
635
701
  }
636
702
  );
637
703
  X.displayName = "ReperePopover";
638
- const ye = b(
704
+ const be = x(
639
705
  ({
640
706
  children: e = "Got it",
641
707
  onClick: t,
642
708
  as: o,
643
- ...i
644
- }, r) => {
645
- const s = k(), n = s?.dismiss || (() => {
646
- }), a = s?.popoverId;
709
+ ...n
710
+ }, s) => {
711
+ const r = I(), i = r?.dismiss || (() => {
712
+ }), a = r?.popoverId;
647
713
  return /* @__PURE__ */ g(
648
714
  o || "button",
649
715
  {
650
- ref: r,
716
+ ref: s,
651
717
  onClick: (d) => {
652
- n(), t?.(d);
718
+ i(), t?.(d);
653
719
  },
654
720
  popovertarget: a,
655
721
  popovertargetaction: "hide",
656
- ...i,
722
+ ...n,
657
723
  children: e
658
724
  }
659
725
  );
660
726
  }
661
- ), xe = Object.assign(ye, {
727
+ ), xe = Object.assign(be, {
662
728
  displayName: "ReperePopover.AcknowledgeButton"
663
- }), Y = b(({ children: e = "×", ...t }, o) => {
664
- const r = k()?.popoverId;
729
+ }), Y = x(({ children: e = "×", ...t }, o) => {
730
+ const s = I()?.popoverId;
665
731
  return /* @__PURE__ */ g(
666
732
  "button",
667
733
  {
668
734
  ref: o,
669
- popovertarget: r,
735
+ popovertarget: s,
670
736
  popovertargetaction: "hide",
671
737
  "aria-label": "Close",
672
738
  ...t,
@@ -675,75 +741,75 @@ const ye = b(
675
741
  );
676
742
  });
677
743
  Y.displayName = "ReperePopover.CloseButton";
678
- const F = b(
744
+ const U = x(
679
745
  ({ children: e, ...t }, o) => /* @__PURE__ */ g("div", { ref: o, ...t, children: e })
680
746
  );
681
- F.displayName = "ReperePopover.Content";
682
- const U = b(
747
+ U.displayName = "ReperePopover.Content";
748
+ const _ = x(
683
749
  ({ children: e, ...t }, o) => /* @__PURE__ */ g("div", { ref: o, ...t, children: e })
684
750
  );
685
- U.displayName = "ReperePopover.Footer";
686
- const be = b(
687
- ({ children: e, as: t, ...o }, i) => {
688
- const s = k()?.beaconId || "unknown";
689
- return /* @__PURE__ */ g(t || "h3", { ref: i, id: `repere-popover-${s}`, ...o, children: e });
751
+ _.displayName = "ReperePopover.Footer";
752
+ const Pe = x(
753
+ ({ children: e, as: t, ...o }, n) => {
754
+ const r = I()?.beaconId || "unknown";
755
+ return /* @__PURE__ */ g(t || "h3", { ref: n, id: `repere-popover-${r}`, ...o, children: e });
690
756
  }
691
- ), Pe = Object.assign(be, {
757
+ ), ke = Object.assign(Pe, {
692
758
  displayName: "ReperePopover.Title"
693
- }), $e = Object.assign(X, {
694
- Title: Pe,
695
- Content: F,
696
- Footer: U,
759
+ }), Be = Object.assign(X, {
760
+ Title: ke,
761
+ Content: U,
762
+ Footer: _,
697
763
  AcknowledgeButton: xe,
698
764
  CloseButton: Y
699
- }), Ce = b(
765
+ }), Ce = x(
700
766
  ({
701
767
  children: e,
702
768
  as: t,
703
769
  style: o,
704
- disableAnimation: i,
705
- ...r
706
- }, s) => {
770
+ disableAnimation: n,
771
+ ...s
772
+ }, r) => {
707
773
  const {
708
- calculatedPosition: n,
774
+ calculatedPosition: i,
709
775
  beaconId: a,
710
776
  triggerAnimation: l,
711
777
  triggerDismissAnimation: c,
712
778
  isDismissing: d,
713
- popoverId: w
714
- } = k(), p = t || "button", u = y(() => !t || t === "button" ? M.button : M.create(p), [t, p]);
715
- if (!n) return null;
716
- const h = {
717
- position: n.position,
718
- top: n.top,
719
- left: n.left,
720
- zIndex: n.zIndex,
779
+ popoverId: h
780
+ } = I(), p = t || "button", v = w(() => !t || t === "button" ? M.button : M.create(p), [t, p]);
781
+ if (!i) return null;
782
+ const u = {
783
+ position: i.position,
784
+ top: i.top,
785
+ left: i.left,
786
+ zIndex: i.zIndex,
721
787
  pointerEvents: "auto",
722
788
  cursor: "pointer",
723
789
  anchorName: `--repere-trigger-${a}`
724
- }, x = o ? { ...h, ...o } : h, R = !i && (l || c), P = {
725
- ref: s,
726
- popovertarget: w,
790
+ }, b = o ? { ...u, ...o } : u, C = !n && (l || c), P = {
791
+ ref: r,
792
+ popovertarget: h,
727
793
  "aria-label": `Beacon trigger for ${a}`,
728
794
  "data-repere-trigger": "",
729
- ...r
795
+ ...s
730
796
  };
731
- if (R) {
732
- const f = d && c ? c : l;
733
- if (!f) return null;
734
- const O = ie(
735
- n.translate,
736
- f.variants
797
+ if (C) {
798
+ const y = d && c ? c : l;
799
+ if (!y) return null;
800
+ const R = re(
801
+ i.translate,
802
+ y.variants
737
803
  );
738
804
  return /* @__PURE__ */ g(
739
- u,
805
+ v,
740
806
  {
741
807
  initial: "initial",
742
808
  animate: d ? "exit" : "animate",
743
- variants: O,
744
- transition: f.transition,
809
+ variants: R,
810
+ transition: y.transition,
745
811
  ...P,
746
- style: x,
812
+ style: b,
747
813
  children: e
748
814
  }
749
815
  );
@@ -753,20 +819,20 @@ const be = b(
753
819
  {
754
820
  ...P,
755
821
  style: {
756
- ...x,
757
- translate: `${n.translate.x} ${n.translate.y}`
822
+ ...b,
823
+ translate: `${i.translate.x} ${i.translate.y}`
758
824
  },
759
825
  children: e
760
826
  }
761
827
  );
762
828
  }
763
- ), Oe = Object.assign(Ce, {
829
+ ), Le = Object.assign(Ce, {
764
830
  displayName: "RepereTrigger"
765
831
  });
766
832
  export {
767
- v as Animation,
768
- Be as Beacons,
833
+ f as Animation,
834
+ $e as Beacons,
769
835
  m as Position,
770
- $e as ReperePopover,
771
- Oe as RepereTrigger
836
+ Be as ReperePopover,
837
+ Le as RepereTrigger
772
838
  };
@@ -4,6 +4,7 @@ export declare function resolveBeaconConfig(beacon: Beacon, config: RepereReactC
4
4
  position: Position;
5
5
  zIndex: number;
6
6
  offset: Offset | undefined;
7
+ delay: number | undefined;
7
8
  popoverPosition: Position;
8
9
  popoverOffset: Offset;
9
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"resolveBeaconConfig.d.ts","sourceRoot":"","sources":["../../src/utils/resolveBeaconConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB;;;;;;EAqB5E"}
1
+ {"version":3,"file":"resolveBeaconConfig.d.ts","sourceRoot":"","sources":["../../src/utils/resolveBeaconConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB;;;;;;;EAwB5E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repere/react",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -13,6 +13,9 @@
13
13
  "files": [
14
14
  "dist"
15
15
  ],
16
+ "dependencies": {
17
+ "@repere/core": "0.1.1"
18
+ },
16
19
  "peerDependencies": {
17
20
  "motion": "^12.0.0",
18
21
  "react": "^18.0.0 || ^19.0.0",
@@ -27,8 +30,7 @@
27
30
  "react": "^19.2.3",
28
31
  "react-dom": "^19.2.3",
29
32
  "vite": "^7.3.0",
30
- "vite-plugin-dts": "^4.5.4",
31
- "@repere/core": "0.0.3"
33
+ "vite-plugin-dts": "^4.5.4"
32
34
  },
33
35
  "keywords": [
34
36
  "react",