@tachui/core 0.8.0-alpha → 0.8.5-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.
Files changed (176) hide show
  1. package/README.md +58 -2
  2. package/dist/assets/AssetCollection.d.ts.map +1 -1
  3. package/dist/assets/ColorAsset.d.ts.map +1 -1
  4. package/dist/assets/index.d.ts +1 -0
  5. package/dist/assets/index.d.ts.map +1 -1
  6. package/dist/assets/index.js +486 -0
  7. package/dist/assets/types.d.ts +8 -68
  8. package/dist/assets/types.d.ts.map +1 -1
  9. package/dist/binding-CYpEQquE.js +308 -0
  10. package/dist/build-plugins/index.d.ts +3 -0
  11. package/dist/build-plugins/index.d.ts.map +1 -0
  12. package/dist/build-plugins/modifier-types.d.ts +12 -0
  13. package/dist/build-plugins/modifier-types.d.ts.map +1 -0
  14. package/dist/build-tools/typegen-runner.d.ts +29 -0
  15. package/dist/build-tools/typegen-runner.d.ts.map +1 -0
  16. package/dist/bundles/assets.d.ts +19 -0
  17. package/dist/bundles/assets.d.ts.map +1 -0
  18. package/dist/bundles/context.d.ts +22 -0
  19. package/dist/bundles/context.d.ts.map +1 -0
  20. package/dist/bundles/minimal.d.ts +8 -2
  21. package/dist/bundles/minimal.d.ts.map +1 -1
  22. package/dist/common.js +427 -393
  23. package/dist/compiler/codegen.d.ts.map +1 -1
  24. package/dist/compiler/index.js +6 -1393
  25. package/dist/compiler/parser.d.ts +1 -1
  26. package/dist/compiler/parser.d.ts.map +1 -1
  27. package/dist/compiler/plugin.d.ts.map +1 -1
  28. package/dist/compiler/types.d.ts +28 -0
  29. package/dist/compiler/types.d.ts.map +1 -1
  30. package/dist/{component-XAzF1xqs.js → component-CECyfUOE.js} +80 -68
  31. package/dist/{component-base-x2XmHFjy.js → component-base-CJ__jTlr.js} +9 -7
  32. package/dist/component-context-B6qX_Qsg.js +176 -0
  33. package/dist/components/factory.d.ts +24 -0
  34. package/dist/components/factory.d.ts.map +1 -0
  35. package/dist/components/index.d.ts +3 -2
  36. package/dist/components/index.d.ts.map +1 -1
  37. package/dist/components/index.js +8 -6
  38. package/dist/components/wrapper.d.ts +70 -30
  39. package/dist/components/wrapper.d.ts.map +1 -1
  40. package/dist/concatenated-component-_tF1eMvy.js +2288 -0
  41. package/dist/concatenation/concatenated-component.d.ts +16 -2
  42. package/dist/concatenation/concatenated-component.d.ts.map +1 -1
  43. package/dist/concatenation/text-optimizer.d.ts.map +1 -1
  44. package/dist/config.d.ts +7 -0
  45. package/dist/config.d.ts.map +1 -0
  46. package/dist/constants/layout.d.ts +2 -9
  47. package/dist/constants/layout.d.ts.map +1 -1
  48. package/dist/css-classes/index.js +15 -173
  49. package/dist/{effect-B9Knft0b.js → effect-DGmdACI2.js} +3 -3
  50. package/dist/enhanced-renderer-Bwqsh8Ku.js +172 -0
  51. package/dist/essential.js +425 -391
  52. package/dist/{index-DIvMCJQO.js → factories-Co2Lv2kJ.js} +13 -13
  53. package/dist/factory-D7jAY5Kn.js +485 -0
  54. package/dist/gradients/css-generator.js +99 -0
  55. package/dist/gradients/index.js +56 -0
  56. package/dist/gradients/reactive.d.ts.map +1 -1
  57. package/dist/gradients/types.d.ts +3 -91
  58. package/dist/gradients/types.d.ts.map +1 -1
  59. package/dist/hooks-DeLasj54.js +446 -0
  60. package/dist/index-JQ1sW1SK.js +2049 -0
  61. package/dist/index-X8MVY78C.js +618 -0
  62. package/dist/index.d.ts +8 -1
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +426 -392
  65. package/dist/minimal-prod.js +94 -93
  66. package/dist/minimal.js +126 -106
  67. package/dist/modifiers/alignment.d.ts +5 -0
  68. package/dist/modifiers/alignment.d.ts.map +1 -0
  69. package/dist/modifiers/base.d.ts +6 -7
  70. package/dist/modifiers/base.d.ts.map +1 -1
  71. package/dist/modifiers/base.js +24 -16
  72. package/dist/modifiers/builder.d.ts +28 -165
  73. package/dist/modifiers/builder.d.ts.map +1 -1
  74. package/dist/modifiers/builder.js +7 -7
  75. package/dist/modifiers/core.d.ts +0 -1
  76. package/dist/modifiers/core.d.ts.map +1 -1
  77. package/dist/modifiers/corner-radius.d.ts +8 -0
  78. package/dist/modifiers/corner-radius.d.ts.map +1 -0
  79. package/dist/modifiers/index.d.ts +9 -6
  80. package/dist/modifiers/index.d.ts.map +1 -1
  81. package/dist/modifiers/index.js +36 -30
  82. package/dist/modifiers/layout-priority.d.ts +8 -0
  83. package/dist/modifiers/layout-priority.d.ts.map +1 -0
  84. package/dist/modifiers/opacity.d.ts +8 -0
  85. package/dist/modifiers/opacity.d.ts.map +1 -0
  86. package/dist/modifiers/presets.d.ts.map +1 -1
  87. package/dist/modifiers/proxy.d.ts +4 -0
  88. package/dist/modifiers/proxy.d.ts.map +1 -0
  89. package/dist/modifiers/registration-utils.d.ts +7 -0
  90. package/dist/modifiers/registration-utils.d.ts.map +1 -0
  91. package/dist/modifiers/registry.d.ts +18 -9
  92. package/dist/modifiers/registry.d.ts.map +1 -1
  93. package/dist/modifiers/registry.js +2 -2
  94. package/dist/modifiers/type-generator.d.ts +82 -0
  95. package/dist/modifiers/type-generator.d.ts.map +1 -0
  96. package/dist/modifiers/types.d.ts +2 -479
  97. package/dist/modifiers/types.d.ts.map +1 -1
  98. package/dist/modifiers/types.js +1 -4
  99. package/dist/observed-object-DepiqSgg.js +269 -0
  100. package/dist/optimization-CbKNA9w4.js +21 -0
  101. package/dist/plugin-BCAdZXKq.js +1680 -0
  102. package/dist/plugins/index.js +28 -8
  103. package/dist/plugins/simplified-lazy-loader.d.ts.map +1 -1
  104. package/dist/presets-B9x94uRn.js +381 -0
  105. package/dist/proxy-Cqmbiyx0.js +175 -0
  106. package/dist/reactive/cleanup.d.ts.map +1 -1
  107. package/dist/reactive/computed.d.ts +1 -1
  108. package/dist/reactive/computed.d.ts.map +1 -1
  109. package/dist/reactive/context.d.ts +4 -3
  110. package/dist/reactive/context.d.ts.map +1 -1
  111. package/dist/reactive/index.d.ts +1 -0
  112. package/dist/reactive/index.d.ts.map +1 -1
  113. package/dist/reactive/index.js +84 -490
  114. package/dist/reactive/signal-list.d.ts +100 -0
  115. package/dist/reactive/signal-list.d.ts.map +1 -0
  116. package/dist/reactive/signal.d.ts.map +1 -1
  117. package/dist/reactive/types.d.ts +2 -89
  118. package/dist/reactive/types.d.ts.map +1 -1
  119. package/dist/reactive/types.js +1 -4
  120. package/dist/registration-utils-CNsN4eoU.js +27 -0
  121. package/dist/runtime/component.d.ts.map +1 -1
  122. package/dist/runtime/concatenation-aria.d.ts +24 -0
  123. package/dist/runtime/concatenation-aria.d.ts.map +1 -0
  124. package/dist/runtime/concatenation-aria.js +58 -0
  125. package/dist/runtime/concatenation-full.d.ts +30 -0
  126. package/dist/runtime/concatenation-full.d.ts.map +1 -0
  127. package/dist/runtime/concatenation-full.js +85 -0
  128. package/dist/runtime/concatenation-minimal.d.ts +25 -0
  129. package/dist/runtime/concatenation-minimal.d.ts.map +1 -0
  130. package/dist/runtime/concatenation-minimal.js +45 -0
  131. package/dist/runtime/context.d.ts.map +1 -1
  132. package/dist/runtime/dom-bridge.d.ts +1 -1
  133. package/dist/runtime/dom-bridge.d.ts.map +1 -1
  134. package/dist/runtime/dom-bridge.js +239 -12
  135. package/dist/runtime/event-delegation.d.ts +59 -0
  136. package/dist/runtime/event-delegation.d.ts.map +1 -0
  137. package/dist/runtime/index.d.ts +3 -1
  138. package/dist/runtime/index.d.ts.map +1 -1
  139. package/dist/runtime/index.js +96 -0
  140. package/dist/runtime/layout-scheduler.d.ts +89 -0
  141. package/dist/runtime/layout-scheduler.d.ts.map +1 -0
  142. package/dist/runtime/props.d.ts.map +1 -1
  143. package/dist/runtime/renderer.d.ts +54 -2
  144. package/dist/runtime/renderer.d.ts.map +1 -1
  145. package/dist/runtime/renderer.js +11 -7
  146. package/dist/runtime/semantic-role-manager.d.ts.map +1 -1
  147. package/dist/runtime/types.d.ts +2 -226
  148. package/dist/runtime/types.d.ts.map +1 -1
  149. package/dist/runtime/types.js +1 -1
  150. package/dist/scheduler-DI_8ykMk.js +169 -0
  151. package/dist/signal-list-BdpxSodS.js +525 -0
  152. package/dist/state/index.js +319 -0
  153. package/dist/theme-BFaKUcjZ.js +677 -0
  154. package/dist/utils/clone-helpers.d.ts +11 -0
  155. package/dist/utils/clone-helpers.d.ts.map +1 -0
  156. package/dist/validation/index.js +28 -26
  157. package/dist/version.d.ts +19 -0
  158. package/dist/version.d.ts.map +1 -0
  159. package/dist/version.js +6 -0
  160. package/package.json +69 -9
  161. package/dist/concatenated-component-ByPl3_FF.js +0 -2933
  162. package/dist/dom-bridge-CAa1N2zX.js +0 -406
  163. package/dist/index-DCPJFUm9.js +0 -1407
  164. package/dist/index-vdsiw6gQ.js +0 -777
  165. package/dist/modifiers/as-html-validator.d.ts +0 -20
  166. package/dist/modifiers/as-html-validator.d.ts.map +0 -1
  167. package/dist/modifiers/as-html.d.ts +0 -65
  168. package/dist/modifiers/as-html.d.ts.map +0 -1
  169. package/dist/modifiers/background.d.ts +0 -51
  170. package/dist/modifiers/background.d.ts.map +0 -1
  171. package/dist/modifiers/basic-sanitizer.d.ts +0 -54
  172. package/dist/modifiers/basic-sanitizer.d.ts.map +0 -1
  173. package/dist/modifiers/css.d.ts +0 -86
  174. package/dist/modifiers/css.d.ts.map +0 -1
  175. package/dist/production-minimal-BY_gMc-l.js +0 -2532
  176. package/dist/scheduler-BKeqwrYE.js +0 -814
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import type { ASTNode } from './types';
8
8
  /**
9
- * Parse SwiftUI syntax code into an AST
9
+ * Parse SwiftUI syntax code into an AST with concatenation optimization
10
10
  */
11
11
  export declare function parseSwiftUISyntax(code: string, filename: string): ASTNode[];
12
12
  //# sourceMappingURL=parser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/compiler/parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAA8D,MAAM,SAAS,CAAA;AAElG;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,EAAE,CAG5E"}
1
+ {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/compiler/parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,OAAO,EAKR,MAAM,SAAS,CAAA;AAEhB;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,EAAE,CAO5E"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/compiler/plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAmB,MAAM,MAAM,CAAA;AAGnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,mBAAwB,GAAG,MAAM,CAyF5E"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/compiler/plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAmB,MAAM,MAAM,CAAA;AAInD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,mBAAwB,GAAG,MAAM,CAqI5E"}
@@ -111,6 +111,34 @@ export interface ArrayExpressionNode extends Expression {
111
111
  type: 'ArrayExpression';
112
112
  elements: Expression[];
113
113
  }
114
+ /**
115
+ * Concatenation AST Node (Compile-time Optimization)
116
+ */
117
+ export interface ConcatenationNode extends ASTNode {
118
+ type: 'Concatenation';
119
+ left: ComponentNode;
120
+ right: ComponentNode | ConcatenationNode;
121
+ optimizable: boolean;
122
+ staticContent?: PrecomputedContent;
123
+ }
124
+ export interface PrecomputedContent {
125
+ segments: ConcatenatedSegment[];
126
+ aria: AccessibilityStructure;
127
+ totalSegments: number;
128
+ }
129
+ export interface ConcatenatedSegment {
130
+ componentType: string;
131
+ content?: string;
132
+ styles?: Record<string, any>;
133
+ href?: string;
134
+ accessibility?: Record<string, any>;
135
+ }
136
+ export interface AccessibilityStructure {
137
+ label?: string;
138
+ role?: string;
139
+ description?: string;
140
+ flowTargets?: string[];
141
+ }
114
142
  export interface LiteralExpression extends Expression {
115
143
  type: 'Literal';
116
144
  value: string | number | boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/compiler/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAElB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAA;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,cAAc,CAAA;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,QAAQ,CAAA;IACf,GAAG,EAAE,QAAQ,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,M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AAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAClC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IAClD,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;CAC5C"}
@@ -1,10 +1,12 @@
1
- import { G as P, g as R, o as _ } from "./scheduler-BKeqwrYE.js";
2
- import { c as y } from "./effect-B9Knft0b.js";
3
- import { b as x } from "./dom-bridge-CAa1N2zX.js";
4
- var K = Object.defineProperty, $ = (n, e, r) => e in n ? K(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r, f = (n, e, r) => $(n, typeof e != "symbol" ? e + "" : e, r);
5
- class v {
1
+ import { o as x } from "./scheduler-DI_8ykMk.js";
2
+ import { c as P, a as _ } from "./theme-BFaKUcjZ.js";
3
+ import "@tachui/types/reactive";
4
+ import { c as h } from "./effect-DGmdACI2.js";
5
+ import { b as K, r as $ } from "./component-context-B6qX_Qsg.js";
6
+ var Q = Object.defineProperty, N = (n, e, r) => e in n ? Q(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r, p = (n, e, r) => N(n, typeof e != "symbol" ? e + "" : e, r);
7
+ class b {
6
8
  constructor(e, r) {
7
- this.validator = r, f(this, "propsSignal"), f(this, "childrenSignal"), f(this, "changedKeys", /* @__PURE__ */ new Set()), this.propsSignal = P(this.validateAndMergeProps(e)), this.childrenSignal = P(e.children), y(() => {
9
+ this.validator = r, p(this, "propsSignal"), p(this, "childrenSignal"), p(this, "changedKeys", /* @__PURE__ */ new Set()), this.propsSignal = P(this.validateAndMergeProps(e)), this.childrenSignal = P(e.children), h(() => {
8
10
  const t = this.propsSignal[0]();
9
11
  this.trackChanges(t);
10
12
  });
@@ -46,13 +48,13 @@ class v {
46
48
  * Create reactive computed for a specific prop
47
49
  */
48
50
  createPropComputed(e) {
49
- return R(() => this.getProps()[e]);
51
+ return _(() => this.getProps()[e]);
50
52
  }
51
53
  /**
52
54
  * Create effect that runs when specific props change
53
55
  */
54
56
  createPropsEffect(e, r) {
55
- const t = y(() => {
57
+ const t = h(() => {
56
58
  const o = this.getProps(), i = this.getChangedKeys();
57
59
  (i.length === 0 || e.some((l) => i.includes(l))) && r(
58
60
  o,
@@ -82,7 +84,7 @@ class v {
82
84
  }
83
85
  class d {
84
86
  constructor(e = null) {
85
- f(this, "childrenSignal"), this.childrenSignal = P(e);
87
+ p(this, "childrenSignal"), this.childrenSignal = P(e);
86
88
  }
87
89
  /**
88
90
  * Get current children reactively
@@ -145,18 +147,23 @@ class d {
145
147
  Array.isArray(o) ? r.push(...o) : r.push(o);
146
148
  } else if (Array.isArray(t))
147
149
  r.push(...this.renderChildrenArray(t));
148
- else if (typeof t == "object" && "render" in t) {
149
- const o = t.render();
150
- Array.isArray(o) ? r.push(...o) : r.push(o);
150
+ else if (j(t)) {
151
+ const i = t.build().render();
152
+ Array.isArray(i) ? r.push(...i) : r.push(i);
153
+ } else if (typeof t == "object" && t !== null && "render" in t) {
154
+ let o = t;
155
+ "build" in t && typeof t.build == "function" && (o = t.build());
156
+ const i = o.render();
157
+ Array.isArray(i) ? r.push(...i) : r.push(i);
151
158
  }
152
159
  }
153
160
  }
154
161
  return r;
155
162
  }
156
163
  }
157
- class p {
164
+ class g {
158
165
  constructor(e = null) {
159
- f(this, "ref"), this.ref = { current: e };
166
+ p(this, "ref"), this.ref = { current: e };
160
167
  }
161
168
  /**
162
169
  * Get the ref object
@@ -198,16 +205,19 @@ class p {
198
205
  };
199
206
  }
200
207
  }
201
- function B(n, e) {
202
- return new v(n, e);
208
+ function G(n, e) {
209
+ return new b(n, e);
203
210
  }
204
- function G(n) {
211
+ function T(n) {
205
212
  return new d(n);
206
213
  }
207
- function I(n) {
208
- return new p(n);
214
+ function j(n) {
215
+ return typeof n != "object" || n === null || !("build" in n && typeof n.build == "function") ? !1 : !("render" in n && typeof n.render == "function");
216
+ }
217
+ function W(n) {
218
+ return new g(n);
209
219
  }
210
- const b = {
220
+ const S = {
211
221
  /**
212
222
  * Compare props for changes
213
223
  */
@@ -247,14 +257,14 @@ const b = {
247
257
  delete r[t];
248
258
  return r;
249
259
  }
250
- }, L = (n) => new d(n).renderChildren();
251
- var Q = Object.defineProperty, N = (n, e, r) => e in n ? Q(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r, u = (n, e, r) => N(n, typeof e != "symbol" ? e + "" : e, r);
252
- const S = class h {
260
+ }, z = (n) => new d(n).renderChildren();
261
+ var O = Object.defineProperty, q = (n, e, r) => e in n ? O(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r, u = (n, e, r) => q(n, typeof e != "symbol" ? e + "" : e, r);
262
+ const E = class f {
253
263
  constructor() {
254
264
  u(this, "components", /* @__PURE__ */ new Map()), u(this, "contexts", /* @__PURE__ */ new Map()), u(this, "cleanupQueue", /* @__PURE__ */ new Set()), u(this, "updateQueue", /* @__PURE__ */ new Set()), u(this, "isUpdating", !1);
255
265
  }
256
266
  static getInstance() {
257
- return h.instance || (h.instance = new h()), h.instance;
267
+ return f.instance || (f.instance = new f()), f.instance;
258
268
  }
259
269
  /**
260
270
  * Register a new component instance
@@ -346,43 +356,45 @@ const S = class h {
346
356
  }), this.cleanupQueue.clear(), this.updateQueue.clear();
347
357
  }
348
358
  };
349
- u(S, "instance");
350
- let O = S;
359
+ u(E, "instance");
360
+ let F = E;
351
361
  function m(n, e = {}) {
352
362
  const r = (t) => {
353
- const o = E(), i = O.getInstance(), s = [], l = x(o), C = new v(t, {
363
+ const o = R(), i = F.getInstance(), s = [], l = K(o), C = new b(t, {
354
364
  defaults: e.defaultProps || void 0,
355
365
  ...e.validation
356
- }), w = new d(t.children), U = new p();
357
- let c, A = !1;
366
+ }), w = new d(t.children), U = new g();
367
+ let c, A = !1, v = !1;
358
368
  const M = {
359
369
  type: "component",
360
- render: () => {
370
+ render: () => $(l, () => {
361
371
  if (e.lifecycle?.onMount && !A) {
362
372
  const a = e.lifecycle.onMount();
363
373
  typeof a == "function" && s.push(a), A = !0;
364
374
  }
365
- y(() => {
375
+ v || (v = !0, h(() => {
376
+ x(() => {
377
+ e.lifecycle?.onUnmount && e.lifecycle.onUnmount(), s.forEach((a) => a()), i.unregisterComponent(o);
378
+ });
379
+ })), h(() => {
366
380
  const a = C.getProps();
367
381
  if (c && e.lifecycle?.onPropsChange) {
368
- const g = b.compareProps(c, a);
369
- g.length > 0 && e.lifecycle.onPropsChange(c, a, g);
382
+ const y = S.compareProps(c, a);
383
+ y.length > 0 && e.lifecycle.onPropsChange(c, a, y);
370
384
  }
371
385
  c && e.lifecycle?.onUpdate && e.lifecycle.onUpdate(c, a), c = { ...a };
372
- }), y(() => {
386
+ }), h(() => {
373
387
  const a = w.getChildren();
374
388
  e.lifecycle?.onChildrenChange && c && e.lifecycle.onChildrenChange(c.children, a);
375
- }), _(() => {
376
- e.lifecycle?.onUnmount && e.lifecycle.onUnmount(), s.forEach((a) => a()), i.unregisterComponent(o);
377
389
  });
378
390
  try {
379
391
  e.lifecycle?.onRender && e.lifecycle.onRender();
380
- const a = C.getProps(), g = w.getChildren();
381
- return c && e.shouldUpdate && !e.shouldUpdate(c, a) ? [] : n(a, g);
392
+ const a = C.getProps(), y = w.getChildren();
393
+ return c && e.shouldUpdate && !e.shouldUpdate(c, a) ? [] : n(a, y);
382
394
  } catch (a) {
383
395
  throw e.lifecycle?.onError && e.lifecycle.onError(a), a;
384
396
  }
385
- },
397
+ }),
386
398
  props: C.getProps(),
387
399
  children: w.getChildren(),
388
400
  context: l,
@@ -391,14 +403,14 @@ function m(n, e = {}) {
391
403
  ref: t.ref,
392
404
  mounted: !1
393
405
  };
394
- return t.ref && p.applyRef(t.ref, U.getRef()), i.registerComponent(M), M;
406
+ return t.ref && g.applyRef(t.ref, U.getRef()), i.registerComponent(M), M;
395
407
  };
396
408
  return e.displayName && (r.displayName = e.displayName), e.defaultProps && (r.defaultProps = e.defaultProps), r;
397
409
  }
398
- function E() {
410
+ function R() {
399
411
  return `component_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
400
412
  }
401
- function V(n, e) {
413
+ function H(n, e) {
402
414
  const r = (t) => {
403
415
  const o = n(t), i = o.cleanup || [], s = [];
404
416
  if (e.onMount) {
@@ -412,12 +424,12 @@ function V(n, e) {
412
424
  };
413
425
  return r.displayName = `withLifecycle(${n.displayName || "Component"})`, r;
414
426
  }
415
- function D(n) {
427
+ function J(n) {
416
428
  return m(n, {
417
- shouldUpdate: (e, r) => !b.shallowEqual(e, r)
429
+ shouldUpdate: (e, r) => !S.shallowEqual(e, r)
418
430
  });
419
431
  }
420
- function z(n) {
432
+ function X(n) {
421
433
  return m(
422
434
  (e, r) => {
423
435
  const t = new d(r || e.children);
@@ -437,9 +449,9 @@ function z(n) {
437
449
  }
438
450
  );
439
451
  }
440
- function H(n, e = {}) {
452
+ function Y(n, e = {}) {
441
453
  return m((r, t) => {
442
- const o = new v(r, e.validation), i = new d(t || r.children), s = new p();
454
+ const o = new b(r, e.validation), i = new d(t || r.children), s = new g();
443
455
  return n(r, t || r.children, {
444
456
  propsManager: o,
445
457
  childrenManager: i,
@@ -447,41 +459,41 @@ function H(n, e = {}) {
447
459
  });
448
460
  }, e);
449
461
  }
450
- function J(n) {
462
+ function Z(n) {
451
463
  const e = new d(n);
452
464
  return {
453
465
  type: "component",
454
466
  render: () => e.renderChildren(),
455
467
  props: { children: n },
456
468
  children: n,
457
- id: E()
469
+ id: R()
458
470
  };
459
471
  }
460
- function T(n = null) {
461
- return p.createRef(n);
472
+ function ee(n = null) {
473
+ return g.createRef(n);
462
474
  }
463
- function W(n) {
475
+ function re(n) {
464
476
  return m((e) => {
465
477
  const { ref: r, ...t } = e;
466
478
  return n(t, r || void 0);
467
479
  });
468
480
  }
469
481
  export {
470
- O as C,
471
- v as P,
472
- p as R,
473
- m as a,
474
- J as b,
475
- H as c,
476
- D as d,
477
- T as e,
478
- W as f,
479
- d as g,
480
- G as h,
481
- B as i,
482
- I as j,
483
- L as k,
482
+ F as C,
483
+ b as P,
484
+ g as R,
485
+ J as a,
486
+ X as b,
487
+ m as c,
488
+ Y as d,
489
+ Z as e,
490
+ ee as f,
491
+ re as g,
492
+ d as h,
493
+ G as i,
494
+ T as j,
495
+ W as k,
484
496
  z as l,
485
- b as p,
486
- V as w
497
+ S as p,
498
+ H as w
487
499
  };
@@ -1,4 +1,6 @@
1
- import { J as n, i as f, g as h } from "./scheduler-BKeqwrYE.js";
1
+ import "./scheduler-DI_8ykMk.js";
2
+ import { i as n, d as f, a as h } from "./theme-BFaKUcjZ.js";
3
+ import "@tachui/types/reactive";
2
4
  var g = Object.defineProperty, u = (i, s, e) => s in i ? g(i, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[s] = e, o = (i, s, e) => u(i, typeof s != "symbol" ? s + "" : s, e);
3
5
  const d = {
4
6
  sanitizeClassNames: !0,
@@ -189,14 +191,14 @@ class p {
189
191
  }
190
192
  }
191
193
  const l = new p();
192
- function b(i) {
194
+ function v(i) {
193
195
  l.updateConfig(i);
194
196
  }
195
- function w() {
197
+ function z() {
196
198
  return l.getConfig();
197
199
  }
198
200
  var m = Object.defineProperty, y = (i, s, e) => s in i ? m(i, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[s] = e, S = (i, s, e) => y(i, s + "", e);
199
- class v {
201
+ class M {
200
202
  constructor() {
201
203
  S(this, "cssClassManager", l);
202
204
  }
@@ -248,8 +250,8 @@ class v {
248
250
  }
249
251
  export {
250
252
  p as C,
251
- b as a,
252
- v as b,
253
+ v as a,
254
+ M as b,
253
255
  l as c,
254
- w as g
256
+ z as g
255
257
  };
@@ -0,0 +1,176 @@
1
+ import { l as u } from "./theme-BFaKUcjZ.js";
2
+ var d = Object.defineProperty, l = (e, t, n) => t in e ? d(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, r = (e, t, n) => l(e, typeof t != "symbol" ? t + "" : t, n);
3
+ const a = Symbol("TachUI.ComponentContext"), v = Symbol("TachUI.Environment");
4
+ let o = null;
5
+ class m {
6
+ constructor(t, n) {
7
+ r(this, "id"), r(this, "parent"), r(this, "providers", /* @__PURE__ */ new Map()), r(this, "consumers", /* @__PURE__ */ new Set()), r(this, "cleanup", /* @__PURE__ */ new Set()), r(this, "stateStore", /* @__PURE__ */ new Map()), r(this, "bindingStore", /* @__PURE__ */ new Map()), r(this, "createdAt", Date.now()), r(this, "updateCount", 0), this.id = t, this.parent = n;
8
+ }
9
+ /**
10
+ * Store state value for a property
11
+ */
12
+ setState(t, n) {
13
+ this.stateStore.set(t, n), this.updateCount++;
14
+ }
15
+ /**
16
+ * Get state value for a property
17
+ */
18
+ getState(t) {
19
+ return this.stateStore.get(t);
20
+ }
21
+ /**
22
+ * Check if state exists for a property
23
+ */
24
+ hasState(t) {
25
+ return this.stateStore.has(t);
26
+ }
27
+ /**
28
+ * Store binding for a property
29
+ */
30
+ setBinding(t, n) {
31
+ this.bindingStore.set(t, n);
32
+ }
33
+ /**
34
+ * Get binding for a property
35
+ */
36
+ getBinding(t) {
37
+ return this.bindingStore.get(t);
38
+ }
39
+ /**
40
+ * Provide a value for dependency injection
41
+ */
42
+ provide(t, n) {
43
+ this.providers.set(t, n);
44
+ }
45
+ /**
46
+ * Consume a value from dependency injection hierarchy
47
+ */
48
+ consume(t) {
49
+ if (this.consumers.add(t), this.providers.has(t))
50
+ return this.providers.get(t);
51
+ let n = this.parent;
52
+ for (; n; ) {
53
+ if (n.providers.has(t))
54
+ return n.providers.get(t);
55
+ n = n.parent;
56
+ }
57
+ }
58
+ /**
59
+ * Register cleanup function
60
+ */
61
+ onCleanup(t) {
62
+ this.cleanup.add(t);
63
+ }
64
+ /**
65
+ * Dispose of context and run cleanup
66
+ */
67
+ dispose() {
68
+ for (const t of this.cleanup)
69
+ try {
70
+ t();
71
+ } catch (n) {
72
+ console.error(`Error in component context cleanup (${this.id}):`, n);
73
+ }
74
+ this.cleanup.clear(), this.stateStore.clear(), this.bindingStore.clear(), this.providers.clear(), this.consumers.clear();
75
+ }
76
+ /**
77
+ * Get performance metrics
78
+ */
79
+ getMetrics() {
80
+ return {
81
+ id: this.id,
82
+ createdAt: this.createdAt,
83
+ updateCount: this.updateCount,
84
+ stateCount: this.stateStore.size,
85
+ bindingCount: this.bindingStore.size,
86
+ providerCount: this.providers.size,
87
+ consumerCount: this.consumers.size
88
+ };
89
+ }
90
+ }
91
+ function C(e, t) {
92
+ return new m(e, t);
93
+ }
94
+ function p() {
95
+ if (o)
96
+ return o;
97
+ let e = u();
98
+ for (; e; ) {
99
+ if (e.context.has(a))
100
+ return e.context.get(a);
101
+ e = e.parent;
102
+ }
103
+ throw new Error(
104
+ "@State can only be used within a component context. Make sure you are using @State inside a TachUI component render function."
105
+ );
106
+ }
107
+ function g(e) {
108
+ o = e;
109
+ }
110
+ function f(e, t) {
111
+ const n = o;
112
+ o = e;
113
+ const i = u();
114
+ i && i.context.set(a, e);
115
+ try {
116
+ return t();
117
+ } finally {
118
+ o === e && (o = n), i && (n ? i.context.set(a, n) : i.context.delete(a));
119
+ }
120
+ }
121
+ function S(e, t) {
122
+ return (n) => {
123
+ const i = t || `component-${Math.random().toString(36).substr(2, 9)}`, c = C(i, o || void 0);
124
+ return f(c, () => {
125
+ const s = e(n);
126
+ return s.context = c, s.cleanup || (s.cleanup = []), s.cleanup.push(() => c.dispose()), s;
127
+ });
128
+ };
129
+ }
130
+ function w(e, t) {
131
+ return {
132
+ symbol: Symbol(`Environment.${e}`),
133
+ defaultValue: t,
134
+ name: e
135
+ };
136
+ }
137
+ function b(e, t) {
138
+ p().provide(e.symbol, t);
139
+ }
140
+ function E(e) {
141
+ const n = p().consume(e.symbol);
142
+ if (n !== void 0)
143
+ return n;
144
+ if (e.defaultValue !== void 0)
145
+ return e.defaultValue;
146
+ throw new Error(
147
+ `Environment value for '${e.name}' not found. Make sure to provide this value higher in the component hierarchy.`
148
+ );
149
+ }
150
+ const y = {
151
+ getCurrentContext: () => o,
152
+ getContextHierarchy: () => {
153
+ const e = [];
154
+ let t = o || void 0;
155
+ for (; t; )
156
+ e.push(t), t = t.parent;
157
+ return e;
158
+ },
159
+ getContextMetrics: (e) => {
160
+ const t = e || o;
161
+ return t ? t.getMetrics() : null;
162
+ }
163
+ };
164
+ export {
165
+ y as C,
166
+ v as E,
167
+ a,
168
+ C as b,
169
+ E as c,
170
+ w as d,
171
+ p as g,
172
+ b as p,
173
+ f as r,
174
+ g as s,
175
+ S as w
176
+ };
@@ -0,0 +1,24 @@
1
+ import type { ComponentInstance, ComponentProps } from '../runtime/types';
2
+ /**
3
+ * Options for class-based component creation.
4
+ */
5
+ export interface CreateComponentOptions {
6
+ /**
7
+ * When true, the returned instance is immediately wrapped in the modifier proxy.
8
+ * Defaults to true so that downstream code can access modifier methods without
9
+ * re-wrapping manually. Legacy paths that apply modifiers separately can set
10
+ * this to false.
11
+ */
12
+ prewarmProxy?: boolean;
13
+ }
14
+ /**
15
+ * Instantiate a class-based component and ensure modifier proxy state is primed.
16
+ *
17
+ * This helper mirrors SwiftUI's component allocation flow while keeping
18
+ * TachUI's modifier proxy cache in sync. When proxy mode is enabled the
19
+ * instance is registered with the proxy cache so subsequent `withModifiers`
20
+ * calls can reuse the same proxy. When proxy mode is disabled the raw
21
+ * instance is returned.
22
+ */
23
+ export declare function createComponentInstance<P extends ComponentProps, R extends ComponentInstance<P>, Args extends unknown[]>(ComponentClass: new (props: P, ...rest: Args) => R, props: P, options?: CreateComponentOptions, ...rest: Args): R;
24
+ //# sourceMappingURL=factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/components/factory.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEzE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,CAAC,SAAS,cAAc,EACxB,CAAC,SAAS,iBAAiB,CAAC,CAAC,CAAC,EAC9B,IAAI,SAAS,OAAO,EAAE,EAEtB,cAAc,EAAE,KAAK,KAAK,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,IAAI,KAAK,CAAC,EAClD,KAAK,EAAE,CAAC,EACR,OAAO,GAAE,sBAA2B,EACpC,GAAG,IAAI,EAAE,IAAI,GACZ,CAAC,CAQH"}
@@ -6,6 +6,7 @@
6
6
  */
7
7
  export type { ModifiableComponent, ModifierBuilder } from '../modifiers/types';
8
8
  export type { ComponentInstance, ComponentProps, DOMNode, } from '../runtime/types';
9
- export type { WrapperOptions } from './wrapper';
10
- export { createModifiableComponentFactory, createReactiveWrapper, Layout, withModifierSupport, withModifiers, wrapComponent, } from './wrapper';
9
+ export type { WrapperOptions, BaseLayoutProps, VStackLayoutProps, HStackLayoutProps, ZStackLayoutProps, } from './wrapper';
10
+ export { createModifiableComponentFactory, createReactiveWrapper, Layout, LayoutComponent, withModifierSupport, withModifiers, wrapComponent, } from './wrapper';
11
+ export { createComponentInstance, type CreateComponentOptions } from './factory';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAC9E,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,OAAO,GACR,MAAM,kBAAkB,CAAA;AAGzB,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,EACL,gCAAgC,EAChC,qBAAqB,EACrB,MAAM,EACN,mBAAmB,EACnB,aAAa,EACb,aAAa,GACd,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAC9E,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,OAAO,GACR,MAAM,kBAAkB,CAAA;AAGzB,YAAY,EACV,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,gCAAgC,EAChC,qBAAqB,EACrB,MAAM,EACN,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,aAAa,GACd,MAAM,WAAW,CAAA;AAElB,OAAO,EAAE,uBAAuB,EAAE,KAAK,sBAAsB,EAAE,MAAM,WAAW,CAAA"}
@@ -1,9 +1,11 @@
1
- import { L as o, c as r, a as t, w as i, b as p, d as s } from "../index-vdsiw6gQ.js";
1
+ import { L as o, b as t, f as r, c as n, a as p, w as s, d as i, e as c } from "../factory-D7jAY5Kn.js";
2
2
  export {
3
3
  o as Layout,
4
- r as createModifiableComponentFactory,
5
- t as createReactiveWrapper,
6
- i as withModifierSupport,
7
- p as withModifiers,
8
- s as wrapComponent
4
+ t as LayoutComponent,
5
+ r as createComponentInstance,
6
+ n as createModifiableComponentFactory,
7
+ p as createReactiveWrapper,
8
+ s as withModifierSupport,
9
+ i as withModifiers,
10
+ c as wrapComponent
9
11
  };