@tachui/core 0.8.0-alpha → 0.8.1-alpha

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,133 +1,134 @@
1
1
  import { infinity as c } from "./constants/layout.js";
2
- import { LayoutModifier as d } from "./modifiers/base.js";
3
- import { C as y, u as U } from "./concatenated-component-ByPl3_FF.js";
4
- import { a as D, j as R, R as B, L as W, v as H } from "./production-minimal-BY_gMc-l.js";
5
- import { G as I, W as z } from "./scheduler-BKeqwrYE.js";
6
- import { c as A } from "./effect-B9Knft0b.js";
7
- import { d as S, g as L, p as F, c as q } from "./dom-bridge-CAa1N2zX.js";
2
+ import { LayoutModifier as l } from "./modifiers/base.js";
3
+ import { C as b, u as D } from "./concatenated-component-ByPl3_FF.js";
4
+ import { a as j, j as z, R as I, L as A, v as G } from "./production-minimal-BY_gMc-l.js";
5
+ import { p as P, E as k } from "./observed-object-Cos-FtjP.js";
6
+ import "./scheduler-BKeqwrYE.js";
7
+ import "typescript";
8
8
  import "./component-XAzF1xqs.js";
9
9
  import "./index-vdsiw6gQ.js";
10
+ import "./dom-bridge-CAa1N2zX.js";
10
11
  import "./component-base-x2XmHFjy.js";
11
12
  import "./plugins/index.js";
12
13
  import "./validation/index.js";
13
- function Pe() {
14
- return new d({
14
+ function le() {
15
+ return new l({
15
16
  frame: {
16
17
  maxWidth: c
17
18
  }
18
19
  });
19
20
  }
20
- function De() {
21
- return new d({
21
+ function de() {
22
+ return new l({
22
23
  frame: {
23
24
  maxHeight: c
24
25
  }
25
26
  });
26
27
  }
27
- function Ie() {
28
- return new d({
28
+ function pe() {
29
+ return new l({
29
30
  frame: {
30
31
  maxWidth: c,
31
32
  maxHeight: c
32
33
  }
33
34
  });
34
35
  }
35
- function ze() {
36
- return new d({
36
+ function he() {
37
+ return new l({
37
38
  frame: {
38
39
  width: c,
39
40
  height: c
40
41
  }
41
42
  });
42
43
  }
43
- function Ae(n) {
44
- return new d({
44
+ function ge(r) {
45
+ return new l({
45
46
  frame: {
46
- width: n,
47
+ width: r,
47
48
  maxHeight: c
48
49
  }
49
50
  });
50
51
  }
51
- function $e(n) {
52
- return new d({
52
+ function me(r) {
53
+ return new l({
53
54
  frame: {
54
- height: n,
55
+ height: r,
55
56
  maxWidth: c
56
57
  }
57
58
  });
58
59
  }
59
- function ke(n, e) {
60
- return new d({
60
+ function fe(r, e) {
61
+ return new l({
61
62
  frame: {
62
63
  width: c,
63
64
  height: c,
64
- maxWidth: n,
65
+ maxWidth: r,
65
66
  maxHeight: e
66
67
  }
67
68
  });
68
69
  }
69
- function Ge(n, e, t, r) {
70
- return new d({
70
+ function be(r, e, t, n) {
71
+ return new l({
71
72
  frame: {
72
73
  width: c,
73
74
  height: c,
74
- minWidth: n,
75
+ minWidth: r,
75
76
  maxWidth: e,
76
77
  minHeight: t,
77
- maxHeight: r
78
+ maxHeight: n
78
79
  }
79
80
  });
80
81
  }
81
- function Ue() {
82
- return new d({
82
+ function ye() {
83
+ return new l({
83
84
  frame: {
84
85
  maxWidth: c,
85
86
  maxHeight: c
86
87
  }
87
88
  });
88
89
  }
89
- function Re() {
90
- return new d({
90
+ function Se() {
91
+ return new l({
91
92
  frame: {
92
93
  width: "100vw",
93
94
  height: "100vh"
94
95
  }
95
96
  });
96
97
  }
97
- function Be() {
98
- return new d({
98
+ function ve() {
99
+ return new l({
99
100
  frame: {
100
101
  width: c,
101
102
  height: c
102
103
  }
103
104
  });
104
105
  }
105
- function We() {
106
- return new d({
106
+ function we() {
107
+ return new l({
107
108
  frame: {
108
109
  width: c
109
110
  }
110
111
  });
111
112
  }
112
- const He = Symbol.for("tachui.concat");
113
- function Le(n) {
114
- return n && typeof n == "object" && typeof n.isConcatenatable == "function" && n.isConcatenatable();
113
+ const Ce = Symbol.for("tachui.concat");
114
+ function xe(r) {
115
+ return r && typeof r == "object" && typeof r.isConcatenatable == "function" && r.isConcatenatable();
115
116
  }
116
- function Fe(n) {
117
- return n && typeof n == "object" && n.constructor.name === "ConcatenatedComponent";
117
+ function Oe(r) {
118
+ return r && typeof r == "object" && r.constructor.name === "ConcatenatedComponent";
118
119
  }
119
- const qe = Symbol.for("tachui.concat");
120
- class Ke {
120
+ const _e = Symbol.for("tachui.concat");
121
+ class Me {
121
122
  /**
122
123
  * Concatenate this component with another concatenatable component
123
124
  */
124
125
  concat(e) {
125
- const t = this.toSegment(), r = e.toSegment();
126
- return e instanceof y ? new y(
126
+ const t = this.toSegment(), n = e.toSegment();
127
+ return e instanceof b ? new b(
127
128
  [t, ...e.segments],
128
129
  this.mergeMetadata(e.metadata, e.segments.length + 1)
129
- ) : new y(
130
- [t, r],
130
+ ) : new b(
131
+ [t, n],
131
132
  this.createMetadata(2)
132
133
  );
133
134
  }
@@ -186,10 +187,10 @@ class Ke {
186
187
  return t === "inline" && e === "inline" ? "inline" : t === "block" && e === "block" ? "block" : "mixed";
187
188
  }
188
189
  }
189
- function Je(n) {
190
- const e = n;
190
+ function Ee(r) {
191
+ const e = r;
191
192
  return e.concat = function(t) {
192
- const r = {
193
+ const n = {
193
194
  id: this.id,
194
195
  component: this,
195
196
  modifiers: this.modifiers || [],
@@ -198,15 +199,15 @@ function Je(n) {
198
199
  return Array.isArray(s) ? s[0] : s;
199
200
  }
200
201
  }, i = t.toSegment();
201
- return t instanceof y ? new y(
202
- [r, ...t.segments],
202
+ return t instanceof b ? new b(
203
+ [n, ...t.segments],
203
204
  {
204
205
  totalSegments: t.segments.length + 1,
205
206
  accessibilityRole: "group",
206
207
  semanticStructure: "mixed"
207
208
  }
208
- ) : new y(
209
- [r, i],
209
+ ) : new b(
210
+ [n, i],
210
211
  {
211
212
  totalSegments: 2,
212
213
  accessibilityRole: "group",
@@ -227,8 +228,8 @@ function Je(n) {
227
228
  return !0;
228
229
  }, e;
229
230
  }
230
- const h = /* @__PURE__ */ new Map(), K = 300 * 1e3, T = 100;
231
- class Xe {
231
+ const p = /* @__PURE__ */ new Map(), N = 300 * 1e3, E = 100;
232
+ class Te {
232
233
  /**
233
234
  * Optimize an array of segments by merging compatible adjacent text segments
234
235
  * Enhanced with caching and performance monitoring
@@ -236,23 +237,23 @@ class Xe {
236
237
  static optimize(e) {
237
238
  const t = performance.now();
238
239
  if (e.length < 2) return e;
239
- const r = this.generateCacheKey(e), i = this.getCachedOptimization(r);
240
+ const n = this.generateCacheKey(e), i = this.getCachedOptimization(n);
240
241
  if (i)
241
242
  return i.optimizedSegments;
242
243
  const s = this.performOptimization(e), a = performance.now() - t, o = {
243
244
  ...this.getOptimizationStats(e, s),
244
245
  processingTimeMs: a
245
246
  };
246
- return this.cacheOptimization(r, s, o), process.env.NODE_ENV === "development" && a > 5 && console.log(`TachUI Concatenation: Optimization took ${a.toFixed(2)}ms for ${e.length} segments`), s;
247
+ return this.cacheOptimization(n, s, o), process.env.NODE_ENV === "development" && a > 5 && console.log(`TachUI Concatenation: Optimization took ${a.toFixed(2)}ms for ${e.length} segments`), s;
247
248
  }
248
249
  /**
249
250
  * Core optimization algorithm separated for clarity
250
251
  */
251
252
  static performOptimization(e) {
252
253
  const t = [];
253
- for (const r of e) {
254
+ for (const n of e) {
254
255
  const i = t[t.length - 1];
255
- i && this.canMergeTextSegments(i, r) ? t[t.length - 1] = this.mergeTextSegments(i, r) : t.push(r);
256
+ i && this.canMergeTextSegments(i, n) ? t[t.length - 1] = this.mergeTextSegments(i, n) : t.push(n);
256
257
  }
257
258
  return t;
258
259
  }
@@ -260,8 +261,8 @@ class Xe {
260
261
  * Generate a cache key from segments
261
262
  */
262
263
  static generateCacheKey(e) {
263
- return e.map((r) => {
264
- const i = r.component, s = this.extractTextContent(i), a = this.hashModifiers(r.modifiers);
264
+ return e.map((n) => {
265
+ const i = n.component, s = this.extractTextContent(i), a = this.hashModifiers(n.modifiers);
265
266
  return `${i.constructor.name}:${s}:${a}`;
266
267
  }).join("|");
267
268
  }
@@ -274,8 +275,8 @@ class Xe {
274
275
  const t = e.map((i) => ({
275
276
  type: i.type,
276
277
  props: i.properties
277
- })), r = JSON.stringify(t);
278
- return typeof btoa == "function" ? btoa(r).substring(0, 8) : this.simpleHash(r).toString(16).substring(0, 8);
278
+ })), n = JSON.stringify(t);
279
+ return typeof btoa == "function" ? btoa(n).substring(0, 8) : this.simpleHash(n).toString(16).substring(0, 8);
279
280
  } catch {
280
281
  return "hash-error";
281
282
  }
@@ -285,8 +286,8 @@ class Xe {
285
286
  */
286
287
  static simpleHash(e) {
287
288
  let t = 0;
288
- for (let r = 0; r < e.length; r++) {
289
- const i = e.charCodeAt(r);
289
+ for (let n = 0; n < e.length; n++) {
290
+ const i = e.charCodeAt(n);
290
291
  t = (t << 5) - t + i, t = t & t;
291
292
  }
292
293
  return Math.abs(t);
@@ -295,20 +296,20 @@ class Xe {
295
296
  * Get cached optimization result
296
297
  */
297
298
  static getCachedOptimization(e) {
298
- const t = h.get(e);
299
- return t ? Date.now() - t.timestamp > K ? (h.delete(e), null) : t : null;
299
+ const t = p.get(e);
300
+ return t ? Date.now() - t.timestamp > N ? (p.delete(e), null) : t : null;
300
301
  }
301
302
  /**
302
303
  * Cache optimization result
303
304
  */
304
- static cacheOptimization(e, t, r) {
305
- if (h.size >= T) {
306
- const i = h.keys().next().value;
307
- i && h.delete(i);
305
+ static cacheOptimization(e, t, n) {
306
+ if (p.size >= E) {
307
+ const i = p.keys().next().value;
308
+ i && p.delete(i);
308
309
  }
309
- h.set(e, {
310
+ p.set(e, {
310
311
  optimizedSegments: t,
311
- stats: r,
312
+ stats: n,
312
313
  timestamp: Date.now()
313
314
  });
314
315
  }
@@ -316,15 +317,15 @@ class Xe {
316
317
  * Clear optimization cache (useful for testing)
317
318
  */
318
319
  static clearCache() {
319
- h.clear();
320
+ p.clear();
320
321
  }
321
322
  /**
322
323
  * Get cache statistics
323
324
  */
324
325
  static getCacheStats() {
325
326
  return {
326
- size: h.size,
327
- maxSize: T,
327
+ size: p.size,
328
+ maxSize: E,
328
329
  hitRate: 0
329
330
  // Would need to track hits/misses to calculate this
330
331
  };
@@ -340,8 +341,8 @@ class Xe {
340
341
  */
341
342
  static modifiersCompatible(e, t) {
342
343
  if (e.length !== t.length) return !1;
343
- for (let r = 0; r < e.length; r++)
344
- if (!this.modifierEqual(e[r], t[r]))
344
+ for (let n = 0; n < e.length; n++)
345
+ if (!this.modifierEqual(e[n], t[n]))
345
346
  return !1;
346
347
  return !0;
347
348
  }
@@ -360,13 +361,13 @@ class Xe {
360
361
  * Merge two text segments into a single segment
361
362
  */
362
363
  static mergeTextSegments(e, t) {
363
- const r = e.component, i = t.component, s = this.extractTextContent(r), a = this.extractTextContent(i), o = s + a;
364
+ const n = e.component, i = t.component, s = this.extractTextContent(n), a = this.extractTextContent(i), o = s + a;
364
365
  return {
365
366
  id: `merged-${e.id}-${t.id}`,
366
- component: this.createMergedTextComponent(o, r.props, e.modifiers),
367
+ component: this.createMergedTextComponent(o, n.props, e.modifiers),
367
368
  modifiers: e.modifiers,
368
369
  // Use modifiers from first segment (they're identical)
369
- render: () => this.createMergedTextComponent(o, r.props, e.modifiers).render()[0]
370
+ render: () => this.createMergedTextComponent(o, n.props, e.modifiers).render()[0]
370
371
  };
371
372
  }
372
373
  /**
@@ -379,7 +380,7 @@ class Xe {
379
380
  /**
380
381
  * Create a new merged text component
381
382
  */
382
- static createMergedTextComponent(e, t, r) {
383
+ static createMergedTextComponent(e, t, n) {
383
384
  const i = {
384
385
  ...t,
385
386
  content: e
@@ -390,7 +391,7 @@ class Xe {
390
391
  props: i,
391
392
  mounted: !1,
392
393
  cleanup: [],
393
- modifiers: r,
394
+ modifiers: n,
394
395
  render() {
395
396
  const s = globalThis.__tachui_runtime;
396
397
  if (s && s.h && s.text) {
@@ -407,8 +408,8 @@ class Xe {
407
408
  static shouldOptimize(e) {
408
409
  if (e.length < 2) return !1;
409
410
  let t = 0;
410
- for (let r = 0; r < e.length - 1; r++) {
411
- const i = e[r], s = e[r + 1];
411
+ for (let n = 0; n < e.length - 1; n++) {
412
+ const i = e[n], s = e[n + 1];
412
413
  i.component.constructor.name === "EnhancedText" && s.component.constructor.name === "EnhancedText" && t++;
413
414
  }
414
415
  return t > 0;
@@ -417,30 +418,30 @@ class Xe {
417
418
  * Get optimization statistics (enhanced for Phase 4.1)
418
419
  */
419
420
  static getOptimizationStats(e, t) {
420
- const r = e.length - t.length, i = e.length > 0 ? Math.round(r / e.length * 100) : 0;
421
+ const n = e.length - t.length, i = e.length > 0 ? Math.round(n / e.length * 100) : 0;
421
422
  return {
422
423
  originalCount: e.length,
423
424
  optimizedCount: t.length,
424
425
  reductionPercent: i,
425
- textSegmentsMerged: r
426
+ textSegmentsMerged: n
426
427
  };
427
428
  }
428
429
  /**
429
430
  * Advanced optimization analysis for performance monitoring
430
431
  */
431
432
  static analyzeOptimizationOpportunities(e) {
432
- let t = 0, r = 0, i = 0, s = 0;
433
+ let t = 0, n = 0, i = 0, s = 0;
433
434
  for (let o = 0; o < e.length; o++) {
434
- const u = e[o];
435
- switch (u.component.constructor.name) {
435
+ const d = e[o];
436
+ switch (d.component.constructor.name) {
436
437
  case "EnhancedText":
437
438
  if (t++, o < e.length - 1) {
438
- const b = e[o + 1];
439
- this.canMergeTextSegments(u, b) && s++;
439
+ const f = e[o + 1];
440
+ this.canMergeTextSegments(d, f) && s++;
440
441
  }
441
442
  break;
442
443
  case "EnhancedImage":
443
- r++;
444
+ n++;
444
445
  break;
445
446
  case "EnhancedButton":
446
447
  case "EnhancedLinkComponent":
@@ -452,43 +453,43 @@ class Xe {
452
453
  return {
453
454
  totalSegments: e.length,
454
455
  textSegments: t,
455
- imageSegments: r,
456
+ imageSegments: n,
456
457
  interactiveSegments: i,
457
458
  optimizableTextPairs: s,
458
459
  estimatedReductionPercent: a
459
460
  };
460
461
  }
461
462
  }
462
- class Ye {
463
+ class je {
463
464
  // Placeholder implementation
464
465
  }
465
- function Ze() {
466
+ function Ve() {
466
467
  }
467
- function Qe() {
468
+ function De() {
468
469
  }
469
- function et() {
470
+ function ze() {
470
471
  }
471
- function tt() {
472
+ function Ie() {
472
473
  }
473
- class J extends D {
474
+ class U extends j {
474
475
  constructor(e, t) {
475
476
  super(e), this.definitions = t;
476
477
  }
477
478
  resolve() {
478
479
  const e = this.getCurrentTheme(), t = this.definitions[e] || this.definitions.light;
479
- return U(t);
480
+ return D(t);
480
481
  }
481
482
  getCurrentTheme() {
482
483
  return typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
483
484
  }
484
485
  }
485
- function nt(n) {
486
- return new J("gradient-asset", n);
486
+ function Ae(r) {
487
+ return new U("gradient-asset", r);
487
488
  }
488
- var X = Object.defineProperty, Y = (n, e, t) => e in n ? X(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, j = (n, e, t) => Y(n, typeof e != "symbol" ? e + "" : e, t);
489
- class E extends D {
490
- constructor(e, t, r) {
491
- super(e), this.reactiveDefinition = t, j(this, "currentGradient"), j(this, "subscriptions", []), j(this, "updateCallback"), this.updateCallback = r, this.currentGradient = this.resolveStaticGradient(), this.setupSignalSubscriptions();
489
+ var $ = Object.defineProperty, R = (r, e, t) => e in r ? $(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, x = (r, e, t) => R(r, typeof e != "symbol" ? e + "" : e, t);
490
+ class O extends j {
491
+ constructor(e, t, n) {
492
+ super(e), this.reactiveDefinition = t, x(this, "currentGradient"), x(this, "subscriptions", []), x(this, "updateCallback"), this.updateCallback = n, this.currentGradient = this.resolveStaticGradient(), this.setupSignalSubscriptions();
492
493
  }
493
494
  /**
494
495
  * Resolve current gradient to CSS
@@ -518,12 +519,12 @@ class E extends D {
518
519
  const { type: e, options: t } = this.reactiveDefinition;
519
520
  switch (e) {
520
521
  case "linear":
521
- return W(this.resolveLinearOptions(t));
522
+ return A(this.resolveLinearOptions(t));
522
523
  case "radial":
523
- return B(this.resolveRadialOptions(t));
524
+ return I(this.resolveRadialOptions(t));
524
525
  case "angular":
525
526
  case "conic":
526
- return R(this.resolveAngularOptions(t));
527
+ return z(this.resolveAngularOptions(t));
527
528
  default:
528
529
  throw new Error(`Unsupported reactive gradient type: ${e}`);
529
530
  }
@@ -566,16 +567,16 @@ class E extends D {
566
567
  this.subscribeToSignalsInOptions(this.reactiveDefinition.options);
567
568
  }
568
569
  subscribeToSignalsInOptions(e) {
569
- for (const [t, r] of Object.entries(e))
570
- if (Array.isArray(r))
571
- r.forEach((i) => {
570
+ for (const [t, n] of Object.entries(e))
571
+ if (Array.isArray(n))
572
+ n.forEach((i) => {
572
573
  if (this.isSignal(i)) {
573
574
  const s = i.subscribe(() => this.handleSignalChange());
574
575
  this.subscriptions.push(s);
575
576
  }
576
577
  });
577
- else if (this.isSignal(r)) {
578
- const i = r.subscribe(() => this.handleSignalChange());
578
+ else if (this.isSignal(n)) {
579
+ const i = n.subscribe(() => this.handleSignalChange());
579
580
  this.subscriptions.push(i);
580
581
  }
581
582
  }
@@ -590,17 +591,17 @@ class E extends D {
590
591
  return t(e);
591
592
  }
592
593
  }
593
- class l extends H {
594
- constructor(e, t, r) {
595
- const i = l.resolveStateOptions(t);
596
- super(e, i), this.reactiveStateGradients = t, this.updateCallback = r, j(this, "reactiveSubscriptions", []), this.setupStateSignalSubscriptions();
594
+ class u extends G {
595
+ constructor(e, t, n) {
596
+ const i = u.resolveStateOptions(t);
597
+ super(e, i), this.reactiveStateGradients = t, this.updateCallback = n, x(this, "reactiveSubscriptions", []), this.setupStateSignalSubscriptions();
597
598
  }
598
599
  /**
599
600
  * Update reactive state configuration
600
601
  */
601
602
  updateReactiveState(e) {
602
603
  this.cleanupStateSubscriptions(), this.reactiveStateGradients = e;
603
- const t = l.resolveStateOptions(e);
604
+ const t = u.resolveStateOptions(e);
604
605
  this.updateStateGradients(t), this.setupStateSignalSubscriptions(), this.notifyStateUpdate();
605
606
  }
606
607
  /**
@@ -611,10 +612,10 @@ class l extends H {
611
612
  }
612
613
  static resolveStateOptions(e) {
613
614
  const t = {
614
- default: l.resolveValue(e.default),
615
+ default: u.resolveValue(e.default),
615
616
  animation: e.animation
616
617
  };
617
- return e.hover && (t.hover = l.resolveValue(e.hover)), e.active && (t.active = l.resolveValue(e.active)), e.focus && (t.focus = l.resolveValue(e.focus)), e.disabled && (t.disabled = l.resolveValue(e.disabled)), t;
618
+ return e.hover && (t.hover = u.resolveValue(e.hover)), e.active && (t.active = u.resolveValue(e.active)), e.focus && (t.focus = u.resolveValue(e.focus)), e.disabled && (t.disabled = u.resolveValue(e.disabled)), t;
618
619
  }
619
620
  static resolveValue(e) {
620
621
  return e !== null && typeof e == "object" && "value" in e && "subscribe" in e ? e.value : e;
@@ -624,61 +625,61 @@ class l extends H {
624
625
  }
625
626
  setupStateSignalSubscriptions() {
626
627
  Object.entries(this.reactiveStateGradients).forEach(([e, t]) => {
627
- if (e !== "animation" && l.isSignal(t)) {
628
- const r = t.subscribe(() => this.handleStateSignalChange());
629
- this.reactiveSubscriptions.push(r);
628
+ if (e !== "animation" && u.isSignal(t)) {
629
+ const n = t.subscribe(() => this.handleStateSignalChange());
630
+ this.reactiveSubscriptions.push(n);
630
631
  }
631
632
  });
632
633
  }
633
634
  handleStateSignalChange() {
634
- const e = l.resolveStateOptions(this.reactiveStateGradients);
635
+ const e = u.resolveStateOptions(this.reactiveStateGradients);
635
636
  this.updateStateGradients(e), this.notifyStateUpdate();
636
637
  }
637
638
  notifyStateUpdate() {
638
639
  this.updateCallback && this.updateCallback();
639
640
  }
640
641
  }
641
- const V = {
642
+ const _ = {
642
643
  /**
643
644
  * Create a reactive linear gradient
644
645
  */
645
- linear: (n, e) => new E(
646
+ linear: (r, e) => new O(
646
647
  "reactive-linear",
647
- { type: "linear", options: n, __reactive: !0 },
648
+ { type: "linear", options: r, __reactive: !0 },
648
649
  e
649
650
  ),
650
651
  /**
651
652
  * Create a reactive radial gradient
652
653
  */
653
- radial: (n, e) => new E(
654
+ radial: (r, e) => new O(
654
655
  "reactive-radial",
655
- { type: "radial", options: n, __reactive: !0 },
656
+ { type: "radial", options: r, __reactive: !0 },
656
657
  e
657
658
  ),
658
659
  /**
659
660
  * Create a reactive angular gradient
660
661
  */
661
- angular: (n, e) => new E(
662
+ angular: (r, e) => new O(
662
663
  "reactive-angular",
663
- { type: "angular", options: n, __reactive: !0 },
664
+ { type: "angular", options: r, __reactive: !0 },
664
665
  e
665
666
  ),
666
667
  /**
667
668
  * Create a reactive state gradient
668
669
  */
669
- state: (n, e, t) => new l(n, e, t)
670
- }, rt = {
670
+ state: (r, e, t) => new u(r, e, t)
671
+ }, Ge = {
671
672
  /**
672
673
  * Create an animated gradient that cycles through colors
673
674
  */
674
- createAnimatedGradient: (n, e = 3e3) => {
675
+ createAnimatedGradient: (r, e = 3e3) => {
675
676
  const t = {
676
- value: n[0],
677
- subscribe: (r) => () => {
677
+ value: r[0],
678
+ subscribe: (n) => () => {
678
679
  }
679
680
  };
680
- return V.linear({
681
- colors: [t, n[1]],
681
+ return _.linear({
682
+ colors: [t, r[1]],
682
683
  startPoint: "top",
683
684
  endPoint: "bottom"
684
685
  });
@@ -686,9 +687,9 @@ const V = {
686
687
  /**
687
688
  * Create a progress gradient that fills based on a signal
688
689
  */
689
- createProgressGradient: (n, e = "#007AFF") => V.linear({
690
+ createProgressGradient: (r, e = "#007AFF") => _.linear({
690
691
  colors: [e, "transparent"],
691
- stops: [n, n],
692
+ stops: [r, r],
692
693
  // Both stops use the same signal
693
694
  startPoint: "leading",
694
695
  endPoint: "trailing"
@@ -696,103 +697,103 @@ const V = {
696
697
  /**
697
698
  * Create a data-driven gradient that reflects numeric values
698
699
  */
699
- createDataGradient: (n, e, t, r = ["#ff0000", "#ffff00", "#00ff00"]) => V.linear({
700
- colors: r,
700
+ createDataGradient: (r, e, t, n = ["#ff0000", "#ffff00", "#00ff00"]) => _.linear({
701
+ colors: n,
701
702
  startPoint: "top",
702
703
  endPoint: "bottom"
703
704
  })
704
- }, it = {
705
+ }, Pe = {
705
706
  /**
706
707
  * Check if a background value is reactive
707
708
  */
708
- isReactiveBackground: (n) => n instanceof E || n instanceof l,
709
+ isReactiveBackground: (r) => r instanceof O || r instanceof u,
709
710
  /**
710
711
  * Create a reactive background from a signal
711
712
  */
712
- fromSignal: (n) => V.state("signal-background", {
713
- default: n
713
+ fromSignal: (r) => _.state("signal-background", {
714
+ default: r
714
715
  })
715
716
  };
716
- function M(n, e = {}) {
717
- const { fallback: t, errorFallback: r, timeout: i = 1e4, preload: s = "never" } = e;
718
- let a = !1, o = null, u = !1, m = null, b = null;
719
- const O = async () => {
720
- a || u || o || b || (a = !0, u = !0, m = null, b = (async () => {
717
+ function M(r, e = {}) {
718
+ const { fallback: t, errorFallback: n, timeout: i = 1e4, preload: s = "never" } = e;
719
+ let a = !1, o = null, d = !1, m = null, f = null;
720
+ const w = async () => {
721
+ a || d || o || f || (a = !0, d = !0, m = null, f = (async () => {
721
722
  try {
722
- const f = await Promise.race([
723
- n(),
723
+ const g = await Promise.race([
724
+ r(),
724
725
  new Promise(
725
- (_, x) => setTimeout(() => x(new Error("Component load timeout")), i)
726
+ (y, C) => setTimeout(() => C(new Error("Component load timeout")), i)
726
727
  )
727
728
  ]);
728
- o = "default" in f ? f.default : f;
729
- } catch (f) {
730
- const _ = f;
731
- (typeof process > "u" || process.env.NODE_ENV !== "test") && console.error("Failed to load lazy component:", _), m = _;
729
+ o = "default" in g ? g.default : g;
730
+ } catch (g) {
731
+ const y = g;
732
+ (typeof process > "u" || process.env.NODE_ENV !== "test") && console.error("Failed to load lazy component:", y), m = y;
732
733
  } finally {
733
- u = !1, b = null;
734
+ d = !1, f = null;
734
735
  }
735
- })(), await b);
736
+ })(), await f);
736
737
  };
737
738
  return s === "idle" && typeof requestIdleCallback < "u" ? requestIdleCallback(() => {
738
- O().catch(() => {
739
+ w().catch(() => {
739
740
  });
740
741
  }) : s === "idle" ? setTimeout(() => {
741
- O().catch(() => {
742
+ w().catch(() => {
742
743
  });
743
- }, 100) : s === "immediate" && O().catch(() => {
744
- }), (f) => {
745
- if (!a && !u && !o && O().catch(() => {
744
+ }, 100) : s === "immediate" && w().catch(() => {
745
+ }), (g) => {
746
+ if (!a && !d && !o && w().catch(() => {
746
747
  }), m)
747
- return r ? r(m) : N(m);
748
- if (u || !o)
749
- return t || Q();
748
+ return n ? n(m) : T(m);
749
+ if (d || !o)
750
+ return t || H();
750
751
  try {
751
- return typeof o == "function" ? o(f) : o;
752
- } catch (_) {
753
- const x = _;
754
- return (typeof process > "u" || process.env.NODE_ENV !== "test") && console.error("Error rendering lazy component:", x), N(x);
752
+ return typeof o == "function" ? o(g) : o;
753
+ } catch (y) {
754
+ const C = y;
755
+ return (typeof process > "u" || process.env.NODE_ENV !== "test") && console.error("Error rendering lazy component:", C), T(C);
755
756
  }
756
757
  };
757
758
  }
758
- function st(n) {
759
+ function ke(r) {
759
760
  return {
760
761
  type: "component",
761
762
  render: () => ({
762
763
  type: "element",
763
764
  tag: "div",
764
765
  props: { class: "tachui-suspense" },
765
- children: n.children.map(() => ({
766
+ children: r.children.map(() => ({
766
767
  type: "element",
767
768
  tag: "div",
768
769
  children: []
769
770
  }))
770
771
  }),
771
- props: n,
772
+ props: r,
772
773
  id: `suspense-${Math.random().toString(36).substr(2, 9)}`
773
774
  };
774
775
  }
775
- function Z(n) {
776
- return n().then((e) => e && typeof e == "object" && "default" in e ? e.default : e);
776
+ function B(r) {
777
+ return r().then((e) => e && typeof e == "object" && "default" in e ? e.default : e);
777
778
  }
778
- function at(n, e = {}) {
779
+ function Ne(r, e = {}) {
779
780
  const t = {};
780
- for (const [r, i] of Object.entries(n))
781
- t[r] = M(i, e);
781
+ for (const [n, i] of Object.entries(r))
782
+ t[n] = M(i, e);
782
783
  return t;
783
784
  }
784
- function ot(n) {
785
- const e = Object.entries(n).map(
786
- async ([t, r]) => [t, await Z(r)]
785
+ function Ue(r) {
786
+ const e = Object.entries(r).map(
787
+ async ([t, n]) => [t, await B(n)]
787
788
  );
788
789
  return Promise.all(e).then((t) => {
789
- const r = {};
790
+ const n = {};
790
791
  for (const [i, s] of t)
791
- r[i] = s;
792
- return r;
792
+ n[i] = s;
793
+ return n;
793
794
  });
794
795
  }
795
- function Q() {
796
+ function H() {
796
797
  return {
797
798
  type: "element",
798
799
  tag: "div",
@@ -808,7 +809,7 @@ function Q() {
808
809
  ]
809
810
  };
810
811
  }
811
- function N(n) {
812
+ function T(r) {
812
813
  return {
813
814
  type: "element",
814
815
  tag: "div",
@@ -819,293 +820,41 @@ function N(n) {
819
820
  children: [
820
821
  {
821
822
  type: "text",
822
- text: `Failed to load component: ${n.message}`
823
+ text: `Failed to load component: ${r.message}`
823
824
  }
824
825
  ]
825
826
  };
826
827
  }
827
- function ct(n, e = {}) {
828
- const { rootMargin: t = "50px", threshold: r = 0.1, ...i } = e;
828
+ function $e(r, e = {}) {
829
+ const { rootMargin: t = "50px", threshold: n = 0.1, ...i } = e;
829
830
  return i.preload === "visible" && typeof IntersectionObserver < "u" ? (s) => {
830
- const a = M(n, { ...i, preload: "never" });
831
+ const a = M(r, { ...i, preload: "never" });
831
832
  return setTimeout(() => {
832
833
  a(s);
833
834
  }, 100), a(s);
834
- } : M(n, i);
835
- }
836
- var ee = Object.defineProperty, te = (n, e, t) => e in n ? ee(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, g = (n, e, t) => te(n, typeof e != "symbol" ? e + "" : e, t);
837
- class ne {
838
- constructor(e) {
839
- g(this, "_signal"), g(this, "_setter"), g(this, "_subscribers", /* @__PURE__ */ new Set());
840
- const [t, r] = I(e);
841
- this._signal = t, this._setter = r;
842
- }
843
- get value() {
844
- return this._signal();
845
- }
846
- set value(e) {
847
- this._setter(e), this.notifySubscribers();
848
- }
849
- /**
850
- * Update a property of the environment object
851
- */
852
- updateProperty(e, t) {
853
- const i = { ...this._signal(), [e]: t };
854
- this._setter(i), this.notifySubscribers();
855
- }
856
- /**
857
- * Subscribe to changes
858
- */
859
- subscribe(e) {
860
- return this._subscribers.add(e), () => this._subscribers.delete(e);
861
- }
862
- notifySubscribers() {
863
- for (const e of this._subscribers)
864
- try {
865
- e();
866
- } catch (t) {
867
- console.error("Error in environment object subscriber:", t);
868
- }
869
- }
870
- /**
871
- * Create a reactive effect that runs when this object changes
872
- */
873
- onChange(e) {
874
- const t = A(() => {
875
- e(this._signal());
876
- });
877
- return () => t.dispose();
878
- }
879
- }
880
- class $ {
881
- constructor(e, t) {
882
- g(this, "key"), g(this, "componentContext"), g(this, "_cachedValue"), g(this, "_subscriptionCleanup"), this.key = e, this.componentContext = t, t.onCleanup(() => {
883
- this._subscriptionCleanup && this._subscriptionCleanup();
884
- });
885
- }
886
- get wrappedValue() {
887
- if (this._cachedValue === void 0 && (this._cachedValue = q(this.key), this._cachedValue && typeof this._cachedValue == "object" && "subscribe" in this._cachedValue)) {
888
- const e = this._cachedValue;
889
- typeof e.subscribe == "function" && (this._subscriptionCleanup = e.subscribe(() => {
890
- this.componentContext.setState(`_env_${this.key.name}_trigger`, Date.now());
891
- }));
892
- }
893
- return this._cachedValue;
894
- }
895
- get projectedValue() {
896
- return this;
897
- }
898
- }
899
- function re(n) {
900
- const e = L();
901
- return new $(n, e);
902
- }
903
- function ie(n, e) {
904
- F(n, e);
905
- }
906
- function ut(n, e) {
907
- return new ne(e);
908
- }
909
- function lt(n) {
910
- return n && typeof n == "object" && "wrappedValue" in n && "key" in n && "componentContext" in n && n instanceof $;
911
- }
912
- const dt = {
913
- /**
914
- * Application theme
915
- */
916
- Theme: S("Theme", {
917
- mode: "light",
918
- primaryColor: "#007AFF",
919
- secondaryColor: "#5856D6"
920
- }),
921
- /**
922
- * Localization service
923
- */
924
- Localization: S("Localization"),
925
- /**
926
- * Navigation service
927
- */
928
- Navigation: S("Navigation"),
929
- /**
930
- * Application configuration
931
- */
932
- Config: S("Config"),
933
- /**
934
- * User authentication
935
- */
936
- Auth: S("Auth")
937
- };
938
- var se = Object.defineProperty, ae = (n, e, t) => e in n ? se(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, C = (n, e, t) => ae(n, typeof e != "symbol" ? e + "" : e, t);
939
- class k {
940
- constructor() {
941
- C(this, "_objectWillChange"), C(this, "_notifyCount", 0);
942
- const [e, t] = I(void 0);
943
- this._objectWillChange = {
944
- getValue: e,
945
- peek: e
946
- }, this._notifySetter = t;
947
- }
948
- get objectWillChange() {
949
- return this._objectWillChange;
950
- }
951
- /**
952
- * Notify observers that the object has changed
953
- * Call this method whenever properties of the object change
954
- */
955
- notifyChange() {
956
- this._notifyCount++;
957
- const e = this._notifySetter;
958
- e && e(void 0);
959
- }
960
- /**
961
- * Get the current notification count (for debugging)
962
- */
963
- get notificationCount() {
964
- return this._notifyCount;
965
- }
966
- }
967
- class oe {
968
- constructor(e, t, r, i = {}) {
969
- C(this, "_object"), C(this, "_metadata"), C(this, "_effectCleanup"), this._object = e, this._metadata = {
970
- type: "ObservedObject",
971
- propertyName: r,
972
- componentId: t.id,
973
- options: i
974
- }, this.setupObservation();
975
- const s = z();
976
- s && s.cleanups.push(() => {
977
- this.cleanup();
978
- });
979
- }
980
- get wrappedValue() {
981
- return this._object;
982
- }
983
- get projectedValue() {
984
- return this;
985
- }
986
- /**
987
- * Get property wrapper metadata
988
- */
989
- get metadata() {
990
- return this._metadata;
991
- }
992
- /**
993
- * Set up reactive observation of the object
994
- */
995
- setupObservation() {
996
- const e = A(() => {
997
- this._object.objectWillChange();
998
- });
999
- this._effectCleanup = () => e.dispose();
1000
- }
1001
- /**
1002
- * Cleanup observation
1003
- */
1004
- cleanup() {
1005
- this._effectCleanup && (this._effectCleanup(), this._effectCleanup = void 0);
1006
- }
1007
- /**
1008
- * Replace the observed object (advanced usage)
1009
- */
1010
- updateObject(e) {
1011
- this.cleanup(), this._object = e, this.setupObservation();
1012
- }
1013
- }
1014
- const ce = (n, e = {}) => {
1015
- const t = le(), r = de() || "observedObject";
1016
- return new oe(n, t, r, e);
1017
- };
1018
- function ue(n, e = {}) {
1019
- const t = new k();
1020
- return new Proxy(n, {
1021
- set(i, s, a) {
1022
- const o = i[s], u = Reflect.set(i, s, a);
1023
- return u && o !== a && e.autoNotify !== !1 && t.notifyChange(), u;
1024
- },
1025
- get(i, s) {
1026
- return s === "objectWillChange" ? t.objectWillChange : s === "notifyChange" ? () => t.notifyChange() : s === "notificationCount" ? t.notificationCount : Reflect.get(i, s);
1027
- }
1028
- });
1029
- }
1030
- function ht(n = {}) {
1031
- return (e) => class extends e {
1032
- constructor(...t) {
1033
- super(...t), C(this, "_observableBase", new k()), n.autoNotify !== !1 && this.setupAutoNotification();
1034
- }
1035
- get objectWillChange() {
1036
- return this._observableBase.objectWillChange;
1037
- }
1038
- get notificationCount() {
1039
- return this._observableBase.notificationCount;
1040
- }
1041
- notifyChange() {
1042
- this._observableBase.notifyChange();
1043
- }
1044
- setupAutoNotification() {
1045
- const t = Object.getOwnPropertyNames(this);
1046
- for (const r of t) {
1047
- if (r.startsWith("_") || typeof this[r] == "function")
1048
- continue;
1049
- let i = this[r];
1050
- Object.defineProperty(this, r, {
1051
- get: () => i,
1052
- set: (s) => {
1053
- i !== s && (i = s, this.notifyChange());
1054
- },
1055
- enumerable: !0,
1056
- configurable: !0
1057
- });
1058
- }
1059
- }
1060
- };
835
+ } : M(r, i);
1061
836
  }
1062
- function le() {
1063
- const n = z();
1064
- if (!n?.context.has(P))
1065
- throw new Error("@ObservedObject can only be used within a component context");
1066
- return n.context.get(P);
1067
- }
1068
- function de() {
1069
- try {
1070
- const n = new Error().stack;
1071
- if (n)
1072
- return n.match(/at (\w+)\./)?.[1] || null;
1073
- } catch {
1074
- }
1075
- return null;
1076
- }
1077
- const P = Symbol("TachUI.ComponentContext");
1078
- function he(n) {
1079
- return n && typeof n == "object" && "objectWillChange" in n && "notifyChange" in n;
1080
- }
1081
- function pt(n) {
1082
- return n && typeof n == "object" && "wrappedValue" in n && "projectedValue" in n && he(n.wrappedValue);
1083
- }
1084
- function ft(n, e = {}) {
1085
- return ue({ ...n }, e);
1086
- }
1087
- const gt = ce;
1088
- var pe = Object.defineProperty, fe = (n, e, t) => e in n ? pe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, p = (n, e, t) => fe(n, typeof e != "symbol" ? e + "" : e, t);
1089
- class ge {
837
+ var L = Object.defineProperty, W = (r, e, t) => e in r ? L(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, h = (r, e, t) => W(r, typeof e != "symbol" ? e + "" : e, t);
838
+ class F {
1090
839
  constructor(e) {
1091
- this.componentContext = e, p(this, "states", /* @__PURE__ */ new Map()), p(this, "bindings", /* @__PURE__ */ new Map()), p(this, "observedObjects", /* @__PURE__ */ new Map()), p(this, "environmentObjects", /* @__PURE__ */ new Map()), p(this, "registry"), this.registry = new me();
840
+ this.componentContext = e, h(this, "states", /* @__PURE__ */ new Map()), h(this, "bindings", /* @__PURE__ */ new Map()), h(this, "observedObjects", /* @__PURE__ */ new Map()), h(this, "environmentObjects", /* @__PURE__ */ new Map()), h(this, "registry"), this.registry = new q();
1092
841
  }
1093
842
  /**
1094
843
  * Register a @State property wrapper
1095
844
  */
1096
845
  registerState(e, t = {}) {
1097
- const r = e.metadata;
1098
- if (r) {
1099
- const i = `${r.componentId}_${r.propertyName}`;
1100
- this.states.set(i, e), this.registry.register(r), process.env.NODE_ENV === "development" && this.setupStateDebugging(e, r);
846
+ const n = e.metadata;
847
+ if (n) {
848
+ const i = `${n.componentId}_${n.propertyName}`;
849
+ this.states.set(i, e), this.registry.register(n), process.env.NODE_ENV === "development" && this.setupStateDebugging(e, n);
1101
850
  }
1102
851
  }
1103
852
  /**
1104
853
  * Register a @Binding property wrapper
1105
854
  */
1106
855
  registerBinding(e, t = {}) {
1107
- const r = `${this.componentContext.id}_${t.name || "binding"}_${Date.now()}`;
1108
- this.bindings.set(r, e);
856
+ const n = `${this.componentContext.id}_${t.name || "binding"}_${Date.now()}`;
857
+ this.bindings.set(n, e);
1109
858
  const i = {
1110
859
  type: "Binding",
1111
860
  propertyName: t.name || "binding",
@@ -1118,20 +867,20 @@ class ge {
1118
867
  * Register an @ObservedObject property wrapper
1119
868
  */
1120
869
  registerObservedObject(e, t = {}) {
1121
- const r = e.metadata;
1122
- if (r) {
1123
- const i = `${r.componentId}_${r.propertyName}`;
1124
- this.observedObjects.set(i, e), this.registry.register(r), process.env.NODE_ENV === "development" && this.setupObservedObjectDebugging(e, r);
870
+ const n = e.metadata;
871
+ if (n) {
872
+ const i = `${n.componentId}_${n.propertyName}`;
873
+ this.observedObjects.set(i, e), this.registry.register(n), process.env.NODE_ENV === "development" && this.setupObservedObjectDebugging(e, n);
1125
874
  }
1126
875
  }
1127
876
  /**
1128
877
  * Register an @EnvironmentObject property wrapper
1129
878
  */
1130
879
  registerEnvironmentObject(e, t) {
1131
- const r = e.metadata;
1132
- if (r) {
1133
- const i = `${r.componentId}_${r.propertyName}`;
1134
- this.environmentObjects.set(i, e), this.registry.register(r);
880
+ const n = e.metadata;
881
+ if (n) {
882
+ const i = `${n.componentId}_${n.propertyName}`;
883
+ this.environmentObjects.set(i, e), this.registry.register(n);
1135
884
  }
1136
885
  }
1137
886
  /**
@@ -1175,8 +924,8 @@ class ge {
1175
924
  */
1176
925
  setupStateDebugging(e, t) {
1177
926
  if (typeof window < "u") {
1178
- const r = window.__TACHUI_DEBUG__ || {};
1179
- r.states || (r.states = {}), r.states[`${t.componentId}_${t.propertyName}`] = {
927
+ const n = window.__TACHUI_DEBUG__ || {};
928
+ n.states || (n.states = {}), n.states[`${t.componentId}_${t.propertyName}`] = {
1180
929
  state: e,
1181
930
  metadata: t,
1182
931
  getValue: () => e.wrappedValue,
@@ -1184,7 +933,7 @@ class ge {
1184
933
  e.projectedValue.set(i);
1185
934
  },
1186
935
  getBinding: () => e.projectedValue
1187
- }, window.__TACHUI_DEBUG__ = r;
936
+ }, window.__TACHUI_DEBUG__ = n;
1188
937
  }
1189
938
  }
1190
939
  /**
@@ -1192,27 +941,27 @@ class ge {
1192
941
  */
1193
942
  setupObservedObjectDebugging(e, t) {
1194
943
  if (typeof window < "u") {
1195
- const r = window.__TACHUI_DEBUG__ || {};
1196
- r.observedObjects || (r.observedObjects = {}), r.observedObjects[`${t.componentId}_${t.propertyName}`] = {
944
+ const n = window.__TACHUI_DEBUG__ || {};
945
+ n.observedObjects || (n.observedObjects = {}), n.observedObjects[`${t.componentId}_${t.propertyName}`] = {
1197
946
  observedObject: e,
1198
947
  metadata: t,
1199
948
  getObject: () => e.wrappedValue,
1200
949
  getNotificationCount: () => e.wrappedValue.notificationCount || 0,
1201
950
  triggerChange: () => e.wrappedValue.notifyChange()
1202
- }, window.__TACHUI_DEBUG__ = r;
951
+ }, window.__TACHUI_DEBUG__ = n;
1203
952
  }
1204
953
  }
1205
954
  }
1206
- class me {
955
+ class q {
1207
956
  constructor() {
1208
- p(this, "metadata", /* @__PURE__ */ new Map());
957
+ h(this, "metadata", /* @__PURE__ */ new Map());
1209
958
  }
1210
959
  /**
1211
960
  * Register property wrapper metadata
1212
961
  */
1213
962
  register(e) {
1214
- const t = e.componentId, r = this.metadata.get(t) || [];
1215
- r.push(e), this.metadata.set(t, r);
963
+ const t = e.componentId, n = this.metadata.get(t) || [];
964
+ n.push(e), this.metadata.set(t, n);
1216
965
  }
1217
966
  /**
1218
967
  * Unregister a specific property wrapper
@@ -1240,15 +989,15 @@ class me {
1240
989
  return new Map(this.metadata);
1241
990
  }
1242
991
  }
1243
- function mt(n) {
1244
- return new ge(n);
992
+ function Re(r) {
993
+ return new F(r);
1245
994
  }
1246
- const G = class v {
995
+ const V = class S {
1247
996
  constructor() {
1248
- p(this, "managers", /* @__PURE__ */ new Map());
997
+ h(this, "managers", /* @__PURE__ */ new Map());
1249
998
  }
1250
999
  static getInstance() {
1251
- return v.instance || (v.instance = new v()), v.instance;
1000
+ return S.instance || (S.instance = new S()), S.instance;
1252
1001
  }
1253
1002
  register(e, t) {
1254
1003
  this.managers.set(e, t);
@@ -1267,141 +1016,129 @@ const G = class v {
1267
1016
  */
1268
1017
  getDebugInfo() {
1269
1018
  const e = {};
1270
- for (const [t, r] of this.managers)
1019
+ for (const [t, n] of this.managers)
1271
1020
  e[t] = {
1272
- states: r.getStates().size,
1273
- bindings: r.getBindings().size,
1274
- observedObjects: r.getObservedObjects().size,
1275
- environmentObjects: r.getEnvironmentObjects().size,
1276
- metadata: r.getRegistry().getMetadata(t)
1021
+ states: n.getStates().size,
1022
+ bindings: n.getBindings().size,
1023
+ observedObjects: n.getObservedObjects().size,
1024
+ environmentObjects: n.getEnvironmentObjects().size,
1025
+ metadata: n.getRegistry().getMetadata(t)
1277
1026
  };
1278
1027
  return e;
1279
1028
  }
1280
1029
  };
1281
- p(G, "instance");
1282
- let w = G;
1283
- function bt(n, e) {
1284
- w.getInstance().register(n, e);
1030
+ h(V, "instance");
1031
+ let v = V;
1032
+ function Be(r, e) {
1033
+ v.getInstance().register(r, e);
1285
1034
  }
1286
- function yt(n) {
1287
- w.getInstance().unregister(n);
1035
+ function He(r) {
1036
+ v.getInstance().unregister(r);
1288
1037
  }
1289
- function be(n) {
1290
- return w.getInstance().getManager(n);
1038
+ function J(r) {
1039
+ return v.getInstance().getManager(r);
1291
1040
  }
1292
- function ye() {
1293
- return w.getInstance().getAllManagers();
1041
+ function K() {
1042
+ return v.getInstance().getAllManagers();
1294
1043
  }
1295
- function Ce() {
1296
- return w.getInstance().getDebugInfo();
1044
+ function Q() {
1045
+ return v.getInstance().getDebugInfo();
1297
1046
  }
1298
- function Ct() {
1047
+ function Le() {
1299
1048
  if (typeof window < "u" && process.env.NODE_ENV === "development") {
1300
- const n = window.__TACHUI_DEBUG__ || {};
1301
- n.stateManagers = {
1302
- getAll: ye,
1303
- getDebugInfo: Ce,
1304
- getManager: be
1305
- }, window.__TACHUI_DEBUG__ = n, console.log(
1049
+ const r = window.__TACHUI_DEBUG__ || {};
1050
+ r.stateManagers = {
1051
+ getAll: K,
1052
+ getDebugInfo: Q,
1053
+ getManager: J
1054
+ }, window.__TACHUI_DEBUG__ = r, console.log(
1306
1055
  "TachUI State Management debugging enabled. Use window.__TACHUI_DEBUG__.stateManagers"
1307
1056
  );
1308
1057
  }
1309
1058
  }
1310
- const _t = ie;
1311
- function St(n) {
1312
- return console.warn("useEnvironmentObject is deprecated, use EnvironmentObject instead"), re(n);
1059
+ const We = P;
1060
+ function Fe(r) {
1061
+ return console.warn("useEnvironmentObject is deprecated, use EnvironmentObject instead"), k(r);
1313
1062
  }
1314
- const vt = {
1063
+ const qe = {
1315
1064
  /**
1316
1065
  * Check if a value is any kind of property wrapper
1317
1066
  */
1318
- isPropertyWrapper(n) {
1319
- return n && typeof n == "object" && "wrappedValue" in n && "projectedValue" in n;
1067
+ isPropertyWrapper(r) {
1068
+ return r && typeof r == "object" && "wrappedValue" in r && "projectedValue" in r;
1320
1069
  },
1321
1070
  /**
1322
1071
  * Extract the wrapped value from any property wrapper
1323
1072
  */
1324
- unwrap(n) {
1325
- return this.isPropertyWrapper(n) ? n.wrappedValue : n;
1073
+ unwrap(r) {
1074
+ return this.isPropertyWrapper(r) ? r.wrappedValue : r;
1326
1075
  },
1327
1076
  /**
1328
1077
  * Create a debug snapshot of all property wrappers in a component
1329
1078
  */
1330
- createDebugSnapshot(n) {
1079
+ createDebugSnapshot(r) {
1331
1080
  if (typeof window < "u") {
1332
1081
  const e = window.__TACHUI_DEBUG__;
1333
1082
  if (e)
1334
1083
  return {
1335
- states: e.states ? Object.keys(e.states).filter((t) => t.startsWith(n)).reduce((t, r) => (t[r] = e.states[r].getValue(), t), {}) : {},
1336
- observedObjects: e.observedObjects ? Object.keys(e.observedObjects).filter((t) => t.startsWith(n)).reduce((t, r) => (t[r] = {
1337
- notificationCount: e.observedObjects[r].getNotificationCount(),
1338
- object: e.observedObjects[r].getObject()
1084
+ states: e.states ? Object.keys(e.states).filter((t) => t.startsWith(r)).reduce((t, n) => (t[n] = e.states[n].getValue(), t), {}) : {},
1085
+ observedObjects: e.observedObjects ? Object.keys(e.observedObjects).filter((t) => t.startsWith(r)).reduce((t, n) => (t[n] = {
1086
+ notificationCount: e.observedObjects[n].getNotificationCount(),
1087
+ object: e.observedObjects[n].getObject()
1339
1088
  }, t), {}) : {}
1340
1089
  };
1341
1090
  }
1342
1091
  return null;
1343
1092
  }
1344
- }, wt = "0.1.0";
1093
+ }, Je = "0.1.0";
1345
1094
  export {
1346
- mt as $,
1347
- it as A,
1348
- Ze as B,
1349
- He as C,
1350
- Qe as D,
1351
- et as E,
1352
- tt as F,
1353
- J as G,
1354
- _t as H,
1355
- St as I,
1356
- vt as J,
1357
- dt as K,
1358
- Ye as L,
1359
- ut as M,
1360
- re as N,
1361
- lt as O,
1362
- ie as P,
1363
- ft as Q,
1364
- E as R,
1365
- st as S,
1366
- Xe as T,
1367
- he as U,
1368
- wt as V,
1369
- pt as W,
1370
- ue as X,
1371
- k as Y,
1372
- gt as Z,
1373
- ht as _,
1374
- Fe as a,
1375
- ye as a0,
1376
- be as a1,
1377
- Ce as a2,
1378
- Ct as a3,
1379
- bt as a4,
1380
- ge as a5,
1381
- yt as a6,
1382
- Ke as b,
1383
- qe as c,
1384
- De as d,
1385
- Ie as e,
1386
- Pe as f,
1387
- ze as g,
1388
- Ae as h,
1389
- Le as i,
1390
- $e as j,
1391
- ke as k,
1392
- Ue as l,
1393
- Je as m,
1394
- Re as n,
1395
- Be as o,
1396
- We as p,
1397
- at as q,
1398
- Ge as r,
1399
- ct as s,
1095
+ Pe as A,
1096
+ Ve as B,
1097
+ Ce as C,
1098
+ De as D,
1099
+ ze as E,
1100
+ Ie as F,
1101
+ U as G,
1102
+ We as H,
1103
+ Fe as I,
1104
+ qe as J,
1105
+ Re as K,
1106
+ je as L,
1107
+ K as M,
1108
+ J as N,
1109
+ Q as O,
1110
+ Le as P,
1111
+ Be as Q,
1112
+ O as R,
1113
+ ke as S,
1114
+ Te as T,
1115
+ F as U,
1116
+ Je as V,
1117
+ He as W,
1118
+ Oe as a,
1119
+ Me as b,
1120
+ _e as c,
1121
+ de as d,
1122
+ pe as e,
1123
+ le as f,
1124
+ he as g,
1125
+ ge as h,
1126
+ xe as i,
1127
+ me as j,
1128
+ fe as k,
1129
+ ye as l,
1130
+ Ee as m,
1131
+ Se as n,
1132
+ ve as o,
1133
+ we as p,
1134
+ Ne as q,
1135
+ be as r,
1136
+ $e as s,
1400
1137
  M as t,
1401
- Z as u,
1402
- ot as v,
1403
- nt as w,
1404
- l as x,
1405
- V as y,
1406
- rt as z
1138
+ B as u,
1139
+ Ue as v,
1140
+ Ae as w,
1141
+ u as x,
1142
+ _ as y,
1143
+ Ge as z
1407
1144
  };