@repere/core 0.0.0 → 0.0.2

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.
Files changed (2) hide show
  1. package/dist/index.js +184 -189
  2. package/package.json +6 -3
package/dist/index.js CHANGED
@@ -1,24 +1,18 @@
1
- var h = Object.defineProperty;
2
- var p = (e, i, t) => i in e ? h(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t;
3
- var c = (e, i, t) => p(e, typeof i != "symbol" ? i + "" : i, t);
4
- var d = /* @__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))(d || {});
5
- const x = d.TopRight;
1
+ var c = /* @__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))(c || {});
2
+ const g = c.TopRight;
6
3
  class m {
7
- constructor() {
8
- c(this, "state", /* @__PURE__ */ new Map());
4
+ state = /* @__PURE__ */ new Map();
5
+ isDismissed(t) {
6
+ return this.state.get(t)?.isDismissed ?? !1;
9
7
  }
10
- isDismissed(i) {
11
- const t = this.state.get(i);
12
- return (t == null ? void 0 : t.isDismissed) ?? !1;
13
- }
14
- dismiss(i) {
15
- this.state.set(i, {
16
- id: i,
8
+ dismiss(t) {
9
+ this.state.set(t, {
10
+ id: t,
17
11
  isDismissed: !0
18
12
  });
19
13
  }
20
- reset(i) {
21
- this.state.delete(i);
14
+ reset(t) {
15
+ this.state.delete(t);
22
16
  }
23
17
  resetAll() {
24
18
  this.state.clear();
@@ -27,193 +21,193 @@ class m {
27
21
  return Array.from(this.state.values());
28
22
  }
29
23
  }
30
- var u = /* @__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))(u || {});
31
- const g = {
32
- [u.SlideDown]: {
24
+ var d = /* @__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))(d || {});
25
+ const f = {
26
+ [d.SlideDown]: {
33
27
  initial: { y: -20, opacity: 0 },
34
28
  animate: { y: 0, opacity: 1 },
35
29
  exit: { y: -20, opacity: 0 }
36
30
  },
37
- [u.SlideUp]: {
31
+ [d.SlideUp]: {
38
32
  initial: { y: 20, opacity: 0 },
39
33
  animate: { y: 0, opacity: 1 },
40
34
  exit: { y: 20, opacity: 0 }
41
35
  },
42
- [u.SlideLeft]: {
36
+ [d.SlideLeft]: {
43
37
  initial: { x: 20, opacity: 0 },
44
38
  animate: { x: 0, opacity: 1 },
45
39
  exit: { x: 20, opacity: 0 }
46
40
  },
47
- [u.SlideRight]: {
41
+ [d.SlideRight]: {
48
42
  initial: { x: -20, opacity: 0 },
49
43
  animate: { x: 0, opacity: 1 },
50
44
  exit: { x: -20, opacity: 0 }
51
45
  },
52
- [u.Fade]: {
46
+ [d.Fade]: {
53
47
  initial: { opacity: 0 },
54
48
  animate: { opacity: 1 },
55
49
  exit: { opacity: 0 }
56
50
  },
57
- [u.Shrink]: {
51
+ [d.Shrink]: {
58
52
  initial: { scale: 1.1, opacity: 0 },
59
53
  animate: { scale: 1, opacity: 1 },
60
54
  exit: { scale: 0.9, opacity: 0 }
61
55
  },
62
- [u.Grow]: {
56
+ [d.Grow]: {
63
57
  initial: { scale: 0.9, opacity: 0 },
64
58
  animate: { scale: 1, opacity: 1 },
65
59
  exit: { scale: 1.1, opacity: 0 }
66
60
  },
67
- [u.Scale]: {
61
+ [d.Scale]: {
68
62
  initial: { scale: 0, opacity: 0 },
69
63
  animate: { scale: 1, opacity: 1 },
70
64
  exit: { scale: 0, opacity: 0 }
71
65
  },
72
- [u.None]: {
66
+ [d.None]: {
73
67
  initial: {},
74
68
  animate: {},
75
69
  exit: {}
76
70
  }
77
71
  };
78
- function f(e) {
72
+ function u(e) {
79
73
  return e ? typeof e == "string" ? { variant: e } : e : null;
80
74
  }
81
- function v(e, i) {
82
- const t = f(e), s = f(i);
83
- return !t && !s ? null : t ? s ? {
84
- variant: s.variant ?? t.variant,
85
- duration: s.duration ?? t.duration,
86
- delay: s.delay ?? t.delay,
87
- ease: s.ease ?? t.ease
88
- } : t : s;
75
+ function y(e, t) {
76
+ const i = u(e), s = u(t);
77
+ return !i && !s ? null : i ? s ? {
78
+ variant: s.variant ?? i.variant,
79
+ duration: s.duration ?? i.duration,
80
+ delay: s.delay ?? i.delay,
81
+ ease: s.ease ?? i.ease
82
+ } : i : s;
89
83
  }
90
- function k(e) {
91
- const i = f(e);
92
- if (!i) return null;
93
- const t = g[i.variant];
94
- return t ? {
95
- variants: t,
84
+ function w(e) {
85
+ const t = u(e);
86
+ if (!t) return null;
87
+ const i = f[t.variant];
88
+ return i ? {
89
+ variants: i,
96
90
  transition: {
97
- duration: (i.duration || 300) / 1e3,
91
+ duration: (t.duration || 300) / 1e3,
98
92
  // Convert ms to seconds
99
- delay: (i.delay || 0) / 1e3,
100
- ease: i.ease || [0.4, 0, 0.2, 1]
93
+ delay: (t.delay || 0) / 1e3,
94
+ ease: t.ease || [0.4, 0, 0.2, 1]
101
95
  // cubic-bezier
102
96
  }
103
- } : (console.warn(`[Repere] Unknown animation variant: ${i.variant}`), null);
97
+ } : (console.warn(`[Repere] Unknown animation variant: ${t.variant}`), null);
104
98
  }
105
- function L(e, i) {
106
- const t = (o) => {
107
- const a = o.match(/(-?\d+)%/);
108
- return a ? parseFloat(a[1]) : 0;
109
- }, s = t(e.x), r = t(e.y), n = (o = 0) => r === 0 && o === 0 ? `translate(${s}%, 0)` : o === 0 ? `translate(${s}%, ${r}%)` : `translate(${s}%, calc(${r}% + ${o}px))`;
99
+ function b(e, t) {
100
+ const i = (r) => {
101
+ const n = r.match(/(-?\d+)%/);
102
+ return n ? parseFloat(n[1]) : 0;
103
+ }, s = i(e.x), a = i(e.y), o = (r = 0) => a === 0 && r === 0 ? `translate(${s}%, 0)` : r === 0 ? `translate(${s}%, ${a}%)` : `translate(${s}%, calc(${a}% + ${r}px))`;
110
104
  return {
111
105
  initial: {
112
- ...i.initial,
113
- transform: n(i.initial.y || 0)
106
+ ...t.initial,
107
+ transform: o(t.initial.y || 0)
114
108
  },
115
109
  animate: {
116
- ...i.animate,
117
- transform: n(i.animate.y || 0)
110
+ ...t.animate,
111
+ transform: o(t.animate.y || 0)
118
112
  },
119
113
  exit: {
120
- ...i.exit,
121
- transform: n(i.exit.y || 0)
114
+ ...t.exit,
115
+ transform: o(t.exit.y || 0)
122
116
  }
123
117
  };
124
118
  }
125
- function z(e, i) {
126
- if (!e && !i) return {};
127
- const t = e == null ? void 0 : e.variants, s = e == null ? void 0 : e.transition, r = i == null ? void 0 : i.variants, n = i == null ? void 0 : i.transition, o = (n == null ? void 0 : n.ease) ?? (s == null ? void 0 : s.ease) ?? [0.4, 0, 0.2, 1], a = Array.isArray(o) ? `cubic-bezier(${o.join(", ")})` : o;
119
+ function x(e, t) {
120
+ if (!e && !t) return {};
121
+ const i = e?.variants, s = e?.transition, a = t?.variants, o = t?.transition, r = o?.ease ?? s?.ease ?? [0.4, 0, 0.2, 1], n = Array.isArray(r) ? `cubic-bezier(${r.join(", ")})` : r;
128
122
  return {
129
123
  // Initial state (when opening starts) - from onOpen animation
130
- "--repere-initial-opacity": (t == null ? void 0 : t.initial.opacity) ?? 0,
131
- "--repere-initial-x": `${(t == null ? void 0 : t.initial.x) ?? 0}px`,
132
- "--repere-initial-y": `${(t == null ? void 0 : t.initial.y) ?? 0}px`,
133
- "--repere-initial-scale": (t == null ? void 0 : t.initial.scale) ?? 1,
124
+ "--repere-initial-opacity": i?.initial.opacity ?? 0,
125
+ "--repere-initial-x": `${i?.initial.x ?? 0}px`,
126
+ "--repere-initial-y": `${i?.initial.y ?? 0}px`,
127
+ "--repere-initial-scale": i?.initial.scale ?? 1,
134
128
  // Animate state (fully open) - from onOpen animation
135
- "--repere-animate-opacity": (t == null ? void 0 : t.animate.opacity) ?? 1,
136
- "--repere-animate-x": `${(t == null ? void 0 : t.animate.x) ?? 0}px`,
137
- "--repere-animate-y": `${(t == null ? void 0 : t.animate.y) ?? 0}px`,
138
- "--repere-animate-scale": (t == null ? void 0 : t.animate.scale) ?? 1,
129
+ "--repere-animate-opacity": i?.animate.opacity ?? 1,
130
+ "--repere-animate-x": `${i?.animate.x ?? 0}px`,
131
+ "--repere-animate-y": `${i?.animate.y ?? 0}px`,
132
+ "--repere-animate-scale": i?.animate.scale ?? 1,
139
133
  // Exit state (when closing) - from onClose animation
140
- "--repere-exit-opacity": (r == null ? void 0 : r.exit.opacity) ?? 0,
141
- "--repere-exit-x": `${(r == null ? void 0 : r.exit.x) ?? 0}px`,
142
- "--repere-exit-y": `${(r == null ? void 0 : r.exit.y) ?? 0}px`,
143
- "--repere-exit-scale": (r == null ? void 0 : r.exit.scale) ?? 1,
134
+ "--repere-exit-opacity": a?.exit.opacity ?? 0,
135
+ "--repere-exit-x": `${a?.exit.x ?? 0}px`,
136
+ "--repere-exit-y": `${a?.exit.y ?? 0}px`,
137
+ "--repere-exit-scale": a?.exit.scale ?? 1,
144
138
  // Transition timing
145
- "--repere-transition-duration": `${(n == null ? void 0 : n.duration) ?? (s == null ? void 0 : s.duration) ?? 0.3}s`,
146
- "--repere-transition-timing": a
139
+ "--repere-transition-duration": `${o?.duration ?? s?.duration ?? 0.3}s`,
140
+ "--repere-transition-timing": n
147
141
  };
148
142
  }
149
- function $(e, i) {
150
- const t = (e == null ? void 0 : e.transition.duration) ?? 0, s = (i == null ? void 0 : i.transition.duration) ?? 0;
151
- return Math.max(t, s) * 1e3;
143
+ function v(e, t) {
144
+ const i = e?.transition.duration ?? 0, s = t?.transition.duration ?? 0;
145
+ return Math.max(i, s) * 1e3;
152
146
  }
153
- function B(e) {
154
- return new Promise((i) => setTimeout(i, e));
147
+ function k(e) {
148
+ return new Promise((t) => setTimeout(t, e));
155
149
  }
156
- function y(e, i) {
157
- if (i instanceof RegExp)
158
- return i.test(e);
159
- if (i === e)
150
+ function p(e, t) {
151
+ if (t instanceof RegExp)
152
+ return t.test(e);
153
+ if (t === e)
160
154
  return !0;
161
- if (i.includes("*")) {
162
- const t = i.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
163
- return new RegExp(`^${t}$`).test(e);
155
+ if (t.includes("*")) {
156
+ const i = t.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
157
+ return new RegExp(`^${i}$`).test(e);
164
158
  }
165
159
  return !1;
166
160
  }
167
- class S {
168
- constructor(i, t = {}) {
169
- c(this, "store");
170
- c(this, "debug");
171
- this.store = i, this.debug = t.debug ?? !1;
161
+ class L {
162
+ store;
163
+ debug;
164
+ constructor(t, i = {}) {
165
+ this.store = t, this.debug = i.debug ?? !1;
172
166
  }
173
167
  /**
174
168
  * Find all pages that match the current path
175
169
  * This supports wildcards - e.g., path="*" will match all pages
176
170
  */
177
- findMatchingPages(i, t) {
178
- const s = i.filter((r) => typeof r.path == "function" ? r.path(t) : y(t, r.path));
171
+ findMatchingPages(t, i) {
172
+ const s = t.filter((a) => typeof a.path == "function" ? a.path(i) : p(i, a.path));
179
173
  return this.debug && console.log(
180
174
  "[BeaconManager] Path:",
181
- t,
175
+ i,
182
176
  "Matched pages:",
183
- s.map((r) => r.id).join(", ") || "none"
177
+ s.map((a) => a.id).join(", ") || "none"
184
178
  ), s;
185
179
  }
186
180
  /**
187
181
  * Get all active (non-dismissed) beacons for the current path
188
182
  * Includes beacons from all matching pages (supports wildcards)
189
183
  */
190
- async getActiveBeacons(i, t) {
191
- const s = this.findMatchingPages(i, t);
184
+ async getActiveBeacons(t, i) {
185
+ const s = this.findMatchingPages(t, i);
192
186
  if (s.length === 0)
193
187
  return this.debug && console.log("[BeaconManager] No matching pages found"), [];
194
188
  this.debug && console.log(
195
189
  "[BeaconManager] Found",
196
190
  s.length,
197
191
  "matching page(s):",
198
- s.map((a) => a.id).join(", ")
192
+ s.map((n) => n.id).join(", ")
199
193
  );
200
- const r = [], n = /* @__PURE__ */ new Set();
201
- for (const a of s)
202
- for (const l of a.beacons) {
203
- if (n.has(l.id)) {
194
+ const a = [], o = /* @__PURE__ */ new Set();
195
+ for (const n of s)
196
+ for (const l of n.beacons) {
197
+ if (o.has(l.id)) {
204
198
  this.debug && console.warn(
205
- `[BeaconManager] Duplicate beacon ID "${l.id}" in page "${a.id}", skipping`
199
+ `[BeaconManager] Duplicate beacon ID "${l.id}" in page "${n.id}", skipping`
206
200
  );
207
201
  continue;
208
202
  }
209
- n.add(l.id), r.push(l);
203
+ o.add(l.id), a.push(l);
210
204
  }
211
- const o = [];
212
- for (const a of r)
205
+ const r = [];
206
+ for (const n of a)
213
207
  await Promise.resolve(
214
- this.store.isDismissed(a.id)
215
- ) ? this.debug && console.log("[BeaconManager] Beacon", a.id, "is dismissed") : o.push(a);
216
- return this.debug && console.log("[BeaconManager] Active beacons:", o.length), o;
208
+ this.store.isDismissed(n.id)
209
+ ) ? this.debug && console.log("[BeaconManager] Beacon", n.id, "is dismissed") : r.push(n);
210
+ return this.debug && console.log("[BeaconManager] Active beacons:", r.length), r;
217
211
  }
218
212
  /**
219
213
  * Get the store instance
@@ -222,101 +216,103 @@ class S {
222
216
  return this.store;
223
217
  }
224
218
  }
225
- function w(e, i = d.TopRight, t = { x: 0, y: 0 }) {
226
- const { x: s = 0, y: r = 0 } = t;
227
- let n = 0, o = 0, a = "0", l = "0";
228
- switch (i) {
229
- case d.TopLeft:
230
- n = e.top + window.scrollY, o = e.left + window.scrollX, a = "-50%", l = "-100%";
219
+ function h(e, t = c.TopRight, i = { x: 0, y: 0 }) {
220
+ const { x: s = 0, y: a = 0 } = i;
221
+ let o = 0, r = 0, n = "0", l = "0";
222
+ switch (t) {
223
+ // Top positions
224
+ case c.TopLeft:
225
+ o = e.top + window.scrollY, r = e.left + window.scrollX, n = "-50%", l = "-100%";
231
226
  break;
232
- case d.TopCenter:
233
- n = e.top + window.scrollY, o = e.left + window.scrollX + e.width / 2, a = "-50%", l = "-100%";
227
+ case c.TopCenter:
228
+ o = e.top + window.scrollY, r = e.left + window.scrollX + e.width / 2, n = "-50%", l = "-100%";
234
229
  break;
235
- case d.TopRight:
236
- n = e.top + window.scrollY, o = e.right + window.scrollX, a = "-50%", l = "-100%";
230
+ case c.TopRight:
231
+ o = e.top + window.scrollY, r = e.right + window.scrollX, n = "-50%", l = "-100%";
237
232
  break;
238
- case d.RightCenter:
239
- n = e.top + window.scrollY + e.height / 2, o = e.right + window.scrollX, a = "0", l = "-50%";
233
+ // Right positions
234
+ case c.RightCenter:
235
+ o = e.top + window.scrollY + e.height / 2, r = e.right + window.scrollX, n = "0", l = "-50%";
240
236
  break;
241
- case d.BottomLeft:
242
- n = e.bottom + window.scrollY, o = e.left + window.scrollX, a = "-50%", l = "0";
237
+ // Bottom positions
238
+ case c.BottomLeft:
239
+ o = e.bottom + window.scrollY, r = e.left + window.scrollX, n = "-50%", l = "0";
243
240
  break;
244
- case d.BottomCenter:
245
- n = e.bottom + window.scrollY, o = e.left + window.scrollX + e.width / 2, a = "-50%", l = "0";
241
+ case c.BottomCenter:
242
+ o = e.bottom + window.scrollY, r = e.left + window.scrollX + e.width / 2, n = "-50%", l = "0";
246
243
  break;
247
- case d.BottomRight:
248
- n = e.bottom + window.scrollY, o = e.right + window.scrollX, a = "-50%", l = "0";
244
+ case c.BottomRight:
245
+ o = e.bottom + window.scrollY, r = e.right + window.scrollX, n = "-50%", l = "0";
249
246
  break;
250
- case d.LeftCenter:
251
- n = e.top + window.scrollY + e.height / 2, o = e.left + window.scrollX, a = "-100%", l = "-50%";
247
+ // Left positions
248
+ case c.LeftCenter:
249
+ o = e.top + window.scrollY + e.height / 2, r = e.left + window.scrollX, n = "-100%", l = "-50%";
252
250
  break;
253
251
  }
254
- return n += r, o += s, {
255
- top: n,
256
- left: o,
257
- translate: { x: a, y: l }
252
+ return o += a, r += s, {
253
+ top: o,
254
+ left: r,
255
+ translate: { x: n, y: l }
258
256
  };
259
257
  }
260
- class M {
261
- constructor(i = !1) {
262
- c(this, "tracked", /* @__PURE__ */ new Map());
263
- c(this, "scrollListener", null);
264
- c(this, "resizeListener", null);
265
- c(this, "resizeObserver", null);
266
- c(this, "mutationObserver", null);
267
- c(this, "debug", !1);
268
- c(this, "updateAllPositions", () => {
269
- for (const [i] of this.tracked)
270
- this.updatePosition(i);
271
- });
272
- this.debug = i;
258
+ class z {
259
+ tracked = /* @__PURE__ */ new Map();
260
+ scrollListener = null;
261
+ resizeListener = null;
262
+ resizeObserver = null;
263
+ mutationObserver = null;
264
+ debug = !1;
265
+ constructor(t = !1) {
266
+ this.debug = t;
273
267
  }
274
268
  /**
275
269
  * Subscribe to position updates for an element
276
270
  */
277
- subscribe(i, t, s, r = {}) {
278
- const n = i;
279
- this.tracked.has(n) || this.tracked.set(n, {
280
- selector: i,
281
- position: t,
282
- offset: r.offset,
283
- zIndex: r.zIndex ?? 9999,
271
+ subscribe(t, i, s, a = {}) {
272
+ const o = t;
273
+ return this.tracked.has(o) || this.tracked.set(o, {
274
+ selector: t,
275
+ position: i,
276
+ offset: a.offset,
277
+ zIndex: a.zIndex ?? 9999,
284
278
  callbacks: /* @__PURE__ */ new Set(),
285
279
  element: null
286
- });
287
- const o = this.tracked.get(n);
288
- return o == null || o.callbacks.add(s), this.tracked.size === 1 && this.startListening(), this.updatePosition(n), () => {
289
- const a = this.tracked.get(n);
290
- a && (a.callbacks.delete(s), a.callbacks.size === 0 && (this.tracked.delete(n), this.tracked.size === 0 && this.stopListening()));
280
+ }), this.tracked.get(o)?.callbacks.add(s), this.tracked.size === 1 && this.startListening(), this.updatePosition(o), () => {
281
+ const n = this.tracked.get(o);
282
+ n && (n.callbacks.delete(s), n.callbacks.size === 0 && (this.tracked.delete(o), this.tracked.size === 0 && this.stopListening()));
291
283
  };
292
284
  }
293
- updatePosition(i) {
294
- const t = this.tracked.get(i);
295
- if (!t) return;
296
- const s = document.querySelector(t.selector);
285
+ updatePosition(t) {
286
+ const i = this.tracked.get(t);
287
+ if (!i) return;
288
+ const s = document.querySelector(i.selector);
297
289
  if (!s) {
298
- this.debug && console.log(`[PositionTracker] Element not found: ${t.selector}`), t.element = null;
299
- for (const a of t.callbacks)
300
- a(null);
290
+ this.debug && console.log(`[PositionTracker] Element not found: ${i.selector}`), i.element = null;
291
+ for (const n of i.callbacks)
292
+ n(null);
301
293
  return;
302
294
  }
303
- t.element = s;
304
- const r = s.getBoundingClientRect(), o = {
305
- ...w(
306
- r,
307
- t.position,
308
- t.offset
295
+ i.element = s;
296
+ const a = s.getBoundingClientRect(), r = {
297
+ ...h(
298
+ a,
299
+ i.position,
300
+ i.offset
309
301
  ),
310
302
  position: "fixed",
311
- zIndex: t.zIndex
303
+ zIndex: i.zIndex
312
304
  };
313
305
  this.debug && console.log(
314
- `[PositionTracker] Updated position for ${t.selector}:`,
315
- o
306
+ `[PositionTracker] Updated position for ${i.selector}:`,
307
+ r
316
308
  );
317
- for (const a of t.callbacks)
318
- a(o);
309
+ for (const n of i.callbacks)
310
+ n(r);
319
311
  }
312
+ updateAllPositions = () => {
313
+ for (const [t] of this.tracked)
314
+ this.updatePosition(t);
315
+ };
320
316
  startListening() {
321
317
  this.scrollListener = this.updateAllPositions, window.addEventListener("scroll", this.scrollListener, !0), this.resizeListener = this.updateAllPositions, window.addEventListener("resize", this.resizeListener), "ResizeObserver" in window && (this.resizeObserver = new ResizeObserver(this.updateAllPositions)), this.mutationObserver = new MutationObserver(() => {
322
318
  this.updateAllPositions();
@@ -326,8 +322,7 @@ class M {
326
322
  });
327
323
  }
328
324
  stopListening() {
329
- var i, t;
330
- this.scrollListener && (window.removeEventListener("scroll", this.scrollListener, !0), this.scrollListener = null), this.resizeListener && (window.removeEventListener("resize", this.resizeListener), this.resizeListener = null), (i = this.resizeObserver) == null || i.disconnect(), this.resizeObserver = null, (t = this.mutationObserver) == null || t.disconnect(), this.mutationObserver = null;
325
+ this.scrollListener && (window.removeEventListener("scroll", this.scrollListener, !0), this.scrollListener = null), this.resizeListener && (window.removeEventListener("resize", this.resizeListener), this.resizeListener = null), this.resizeObserver?.disconnect(), this.resizeObserver = null, this.mutationObserver?.disconnect(), this.mutationObserver = null;
331
326
  }
332
327
  /**
333
328
  * Clean up all listeners and subscriptions
@@ -337,16 +332,16 @@ class M {
337
332
  }
338
333
  }
339
334
  export {
340
- u as Animation,
341
- S as BeaconManager,
342
- x as DEFAULT_POSITION,
335
+ d as Animation,
336
+ L as BeaconManager,
337
+ g as DEFAULT_POSITION,
343
338
  m as MemoryStore,
344
- d as Position,
345
- M as PositionTracker,
346
- $ as calculateDismissDuration,
347
- L as combineTranslateWithAnimation,
348
- k as getAnimationConfig,
349
- z as getPopoverAnimationStyles,
350
- v as mergeAnimationConfigs,
351
- B as waitForAnimations
339
+ c as Position,
340
+ z as PositionTracker,
341
+ v as calculateDismissDuration,
342
+ b as combineTranslateWithAnimation,
343
+ w as getAnimationConfig,
344
+ x as getPopoverAnimationStyles,
345
+ y as mergeAnimationConfigs,
346
+ k as waitForAnimations
352
347
  };
package/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "@repere/core",
3
- "version": "0.0.0",
3
+ "version": "0.0.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
8
8
  "types": "./dist/index.d.ts",
9
9
  "import": "./dist/index.js"
10
- },
11
- "./styles.css": "./dist/styles.css"
10
+ }
12
11
  },
13
12
  "files": [
14
13
  "dist"
@@ -29,6 +28,10 @@
29
28
  "publishConfig": {
30
29
  "access": "public"
31
30
  },
31
+ "devDependencies": {
32
+ "vite": "^7.3.0",
33
+ "vite-plugin-dts": "^4.5.4"
34
+ },
32
35
  "scripts": {
33
36
  "dev": "vite build --watch",
34
37
  "build": "vite build",