@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
package/README.md CHANGED
@@ -24,9 +24,9 @@ tachUI core provides a SwiftUI-inspired declarative framework for building web a
24
24
  ### Installation
25
25
 
26
26
  ```bash
27
- npm install @tachui/core@0.8.0-alpha
27
+ npm install @tachui/core@0.9.0
28
28
  # or
29
- pnpm add @tachui/core@0.8.0-alpha
29
+ pnpm add @tachui/core@0.9.0
30
30
  ```
31
31
 
32
32
  ### Basic Example
@@ -101,6 +101,8 @@ Text('Hello tachUI')
101
101
  .build()
102
102
  ```
103
103
 
104
+ > **Modifier registration:** Starting in 0.8.0 the concrete modifier implementations live in `@tachui/modifiers`. Import `@tachui/modifiers/preload/basic` (and optional bundles like `preload/effects`) once during app bootstrap so the builder proxy in `@tachui/core` can resolve the modifier factories from the shared registry.
105
+
104
106
  ### Available Modifiers
105
107
 
106
108
  - **Layout**: `.frame()`, `.padding()`, `.margin()`, `.position()`
@@ -164,6 +166,60 @@ tachUI's architecture provides:
164
166
  - **Memory-safe cleanup** - WeakMap-based automatic cleanup
165
167
  - **Sub-millisecond updates** - Direct DOM manipulation
166
168
 
169
+ ### Concatenation Optimization (New in 0.8.1-alpha)
170
+
171
+ Revolutionary bundle size reduction for component concatenation patterns:
172
+
173
+ ```typescript
174
+ // Before: Uses full 87.76KB concatenation runtime
175
+ Text('Hello').build().concat(Text('World').build())
176
+
177
+ // After: Smart optimization with 94.9% bundle reduction
178
+ // • Static patterns: 0KB runtime (compile-time concatenation)
179
+ // • Dynamic patterns: 1.2-1.9KB selective runtime based on accessibility needs
180
+ ```
181
+
182
+ - **Automatic Detection**: TypeScript AST analysis finds `.build().concat()` patterns
183
+ - **Smart Runtime Selection**: Minimal (1.18KB), ARIA (1.42KB), or Full (1.93KB) based on component needs
184
+ - **CLI Integration**: Use `tachui analyze --concatenation` for optimization insights
185
+ - **Production Ready**: 27 tests passing, handles 250+ files in <500ms
186
+
187
+ ## Modifier Type Generation
188
+
189
+ tachUI ships tooling to keep modifier chaining types in sync with the registry.
190
+
191
+ ### One-off generation
192
+
193
+ ```bash
194
+ pnpm --filter @tachui/core generate-modifier-types
195
+ ```
196
+
197
+ ### CI verification / conflict detection
198
+
199
+ ```bash
200
+ # Verifies that generated files are up to date
201
+ pnpm --filter @tachui/core generate-modifier-types -- --check
202
+
203
+ # Optionally fail when metadata conflicts are detected
204
+ pnpm --filter @tachui/core generate-modifier-types -- --check --fail-on-conflict
205
+ ```
206
+
207
+ ### Watch mode
208
+
209
+ ```bash
210
+ pnpm --filter @tachui/core generate-modifier-types -- --watch
211
+ ```
212
+
213
+ ### Monorepo generation
214
+
215
+ Generate declarations for multiple packages at once:
216
+
217
+ ```bash
218
+ pnpm --filter @tachui/core generate-modifier-types:monorepo -- --packages core,forms,navigation
219
+ ```
220
+
221
+ The tooling automatically hydrates modifier metadata via `@tachui/modifiers` (for runtime definitions) and `@tachui/devtools` (for parameter signatures/documentation).
222
+
167
223
  ## Plugin Ecosystem
168
224
 
169
225
  Extend tachUI with additional packages:
@@ -1 +1 @@
1
- {"version":3,"file":"AssetCollection.d.ts","sourceRoot":"","sources":["../../src/assets/AssetCollection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAgC;IAE9C,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAIrC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS;IAIpC,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC;IAK5B,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,KAAK,GAAG,OAAO,CAAC;CAwE3C"}
1
+ {"version":3,"file":"AssetCollection.d.ts","sourceRoot":"","sources":["../../src/assets/AssetCollection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAKpC,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAgC;IAE9C,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAIrC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS;IAIpC,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC;IAK5B,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,KAAK,GAAG,OAAO,CAAC;CAmI3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"ColorAsset.d.ts","sourceRoot":"","sources":["../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,IAAI,CAAC,EAAE,MAAM,CAAA;gBAEjB,OAAO,EAAE,iBAAiB;IAyCtC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,iBAAiB,GAAG,UAAU;IAInD;;;OAGG;IACH,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,qBAAqB;IAmI1D,MAAM,CAAC,eAAe,IAAI,MAAM;IAIhC,OAAO,IAAI,MAAM;CAsBlB"}
@@ -23,4 +23,5 @@ export declare function createImageAsset(defaultPath: string, light?: string, da
23
23
  export declare function createFontAsset(family: string, fallbacks?: string[], name?: string, options?: FontAssetOptions): FontAsset;
24
24
  export declare function getAssetInfo(): AssetInfo[];
25
25
  export declare function listAssetNames(): string[];
26
+ export { LinearGradient, StateGradient, RadialGradient } from '../gradients';
26
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AASzD,eAAO,MAAM,MAAM,EAAE,eAAgD,CAAA;AAGrE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,CAAA;AACnD,cAAc,SAAS,CAAA;AACvB,OAAO,EACL,gBAAgB,IAAI,UAAU,EAC9B,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,aAAa,CAAA;AAGpB,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A"}
@@ -0,0 +1,486 @@
1
+ import { A as g } from "../index-JQ1sW1SK.js";
2
+ import { L as se, R as ne, k as ae } from "../index-JQ1sW1SK.js";
3
+ import { I as A, J as _, k as R } from "../theme-BFaKUcjZ.js";
4
+ export * from "@tachui/types/assets";
5
+ var V = Object.defineProperty, E = (n, e, t) => e in n ? V(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, x = (n, e, t) => E(n, typeof e != "symbol" ? e + "" : e, t);
6
+ class i extends g {
7
+ constructor(e) {
8
+ if (super(e.name), x(this, "default"), x(this, "light"), x(this, "dark"), !e.default)
9
+ throw new Error(
10
+ `ColorAsset "${e.name}" must specify a default color`
11
+ );
12
+ const t = i.validateColor(e.default);
13
+ if (!t.isValid)
14
+ throw new Error(
15
+ `Invalid default color format for asset "${e.name}": ${t.error}`
16
+ );
17
+ if (e.light) {
18
+ const a = i.validateColor(e.light);
19
+ if (!a.isValid)
20
+ throw new Error(
21
+ `Invalid light color format for asset "${e.name}": ${a.error}`
22
+ );
23
+ }
24
+ if (e.dark) {
25
+ const a = i.validateColor(e.dark);
26
+ if (!a.isValid)
27
+ throw new Error(
28
+ `Invalid dark color format for asset "${e.name}": ${a.error}`
29
+ );
30
+ }
31
+ this.default = e.default, this.light = e.light, this.dark = e.dark;
32
+ }
33
+ static init(e) {
34
+ return new i(e);
35
+ }
36
+ /**
37
+ * Validates a color string format
38
+ * Supports: hex, rgb, rgba, hsl, hsla, and named colors
39
+ */
40
+ static validateColor(e) {
41
+ if (!e || typeof e != "string")
42
+ return {
43
+ isValid: !1,
44
+ error: "Color must be a non-empty string"
45
+ };
46
+ const t = e.trim();
47
+ if (/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(t))
48
+ return { isValid: !0, format: "hex" };
49
+ const s = /^rgb\s*\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)$/;
50
+ if (s.test(t)) {
51
+ const l = t.match(s), [, c, h, m] = l.map(Number);
52
+ return c <= 255 && h <= 255 && m <= 255 ? { isValid: !0, format: "rgb" } : {
53
+ isValid: !1,
54
+ error: "RGB values must be between 0 and 255"
55
+ };
56
+ }
57
+ const r = /^rgba\s*\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]*\.?[0-9]+)\s*\)$/;
58
+ if (r.test(t)) {
59
+ const l = t.match(r), [, c, h, m, S] = l, p = Number(c), C = Number(h), k = Number(m), w = Number(S);
60
+ return p <= 255 && C <= 255 && k <= 255 && w >= 0 && w <= 1 ? { isValid: !0, format: "rgba" } : {
61
+ isValid: !1,
62
+ error: "RGBA values must be: RGB 0-255, alpha 0-1"
63
+ };
64
+ }
65
+ const o = /^hsl\s*\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})%\s*,\s*([0-9]{1,3})%\s*\)$/;
66
+ if (o.test(t)) {
67
+ const l = t.match(o), [, c, h, m] = l.map(Number);
68
+ return c <= 360 && h <= 100 && m <= 100 ? { isValid: !0, format: "hsl" } : {
69
+ isValid: !1,
70
+ error: "HSL values must be: H 0-360, S/L 0-100%"
71
+ };
72
+ }
73
+ const d = /^hsla\s*\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})%\s*,\s*([0-9]{1,3})%\s*,\s*([0-9]*\.?[0-9]+)\s*\)$/;
74
+ if (d.test(t)) {
75
+ const l = t.match(d), [, c, h, m, S] = l, p = Number(c), C = Number(h), k = Number(m), w = Number(S);
76
+ return p <= 360 && C <= 100 && k <= 100 && w >= 0 && w <= 1 ? { isValid: !0, format: "hsla" } : {
77
+ isValid: !1,
78
+ error: "HSLA values must be: H 0-360, S/L 0-100%, alpha 0-1"
79
+ };
80
+ }
81
+ return [
82
+ "transparent",
83
+ "currentColor",
84
+ "inherit",
85
+ "initial",
86
+ "unset",
87
+ "black",
88
+ "white",
89
+ "red",
90
+ "green",
91
+ "blue",
92
+ "yellow",
93
+ "cyan",
94
+ "magenta",
95
+ "gray",
96
+ "grey",
97
+ "orange",
98
+ "purple",
99
+ "pink",
100
+ "brown",
101
+ "navy",
102
+ "teal",
103
+ "lime",
104
+ "olive",
105
+ "maroon",
106
+ "silver",
107
+ "aqua",
108
+ "fuchsia"
109
+ ].includes(t.toLowerCase()) ? { isValid: !0, format: "named" } : t.startsWith("var(--") && t.endsWith(")") ? { isValid: !0, format: "named" } : {
110
+ isValid: !1,
111
+ error: "Unsupported color format. Supported: hex, rgb, rgba, hsl, hsla, named colors, CSS custom properties"
112
+ };
113
+ }
114
+ static getCurrentTheme() {
115
+ return A();
116
+ }
117
+ resolve() {
118
+ const e = R() !== null;
119
+ let t;
120
+ return e ? t = _()() : t = i.getCurrentTheme(), t === "dark" ? this.dark || this.default : this.light || this.default;
121
+ }
122
+ }
123
+ var N = Object.defineProperty, L = (n, e, t) => e in n ? N(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, b = (n, e, t) => L(n, typeof e != "symbol" ? e + "" : e, t);
124
+ class F extends g {
125
+ constructor(e) {
126
+ if (super(e.name), b(this, "default"), b(this, "light"), b(this, "dark"), b(this, "alt"), b(this, "placeholder"), !e.default)
127
+ throw new Error(`ImageAsset "${e.name}" must specify a default image path`);
128
+ this.default = e.default, this.light = e.light, this.dark = e.dark, this.alt = e.options?.alt, this.placeholder = e.options?.placeholder;
129
+ }
130
+ static init(e) {
131
+ return new F(e);
132
+ }
133
+ static getCurrentTheme() {
134
+ return A();
135
+ }
136
+ resolve() {
137
+ const e = R() !== null;
138
+ let t;
139
+ return e ? t = _()() : t = F.getCurrentTheme(), t === "dark" ? this.dark || this.default : this.light || this.default;
140
+ }
141
+ // Additional accessors
142
+ get src() {
143
+ return this.resolve();
144
+ }
145
+ get lightSrc() {
146
+ return this.light || this.default;
147
+ }
148
+ get darkSrc() {
149
+ return this.dark || this.default;
150
+ }
151
+ get defaultSrc() {
152
+ return this.default;
153
+ }
154
+ }
155
+ var G = Object.defineProperty, I = (n, e, t) => e in n ? G(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, v = (n, e, t) => I(n, typeof e != "symbol" ? e + "" : e, t);
156
+ class f extends g {
157
+ constructor(e, t = [], a = "", s = {}) {
158
+ super(a || e), v(this, "family"), v(this, "fallbacks"), v(this, "options"), v(this, "loaded", !1), v(this, "loadPromise", null), this.family = e, this.fallbacks = t, this.options = {
159
+ loading: "lazy",
160
+ fontDisplay: "swap",
161
+ preconnect: !0,
162
+ ...s
163
+ }, this.options.loading === "eager" && this.load();
164
+ }
165
+ /**
166
+ * Static factory method for SwiftUI-style initialization
167
+ */
168
+ static init(e, t = [], a, s = {}) {
169
+ return new f(e, t, a, s);
170
+ }
171
+ /**
172
+ * Get the full font-family CSS value including fallbacks
173
+ */
174
+ get value() {
175
+ return [this.family, ...this.fallbacks].map((t) => t.includes(" ") ? `"${t}"` : t).join(", ");
176
+ }
177
+ /**
178
+ * Load the font if not already loaded
179
+ */
180
+ async load() {
181
+ if (!(this.loaded || !this.options.fontUrl)) {
182
+ if (this.loadPromise)
183
+ return this.loadPromise;
184
+ this.loadPromise = this.loadFont(), await this.loadPromise, this.loaded = !0;
185
+ }
186
+ }
187
+ /**
188
+ * Internal font loading implementation
189
+ */
190
+ async loadFont() {
191
+ const { fontUrl: e, preconnect: t } = this.options;
192
+ if (e) {
193
+ if (t && typeof document < "u" && document.querySelector)
194
+ try {
195
+ const s = new URL(e).origin;
196
+ if (!document.querySelector(`link[rel="preconnect"][href="${s}"]`)) {
197
+ const r = document.createElement("link");
198
+ r.rel = "preconnect", r.href = s, r.crossOrigin = "anonymous", document.head.appendChild(r);
199
+ }
200
+ } catch {
201
+ }
202
+ if (e.endsWith(".css") || e.includes("fonts.googleapis.com") ? await this.loadFontCSS(e) : await this.loadFontFile(e), "fonts" in document)
203
+ try {
204
+ await document.fonts.ready;
205
+ const s = `16px ${this.family.includes(" ") ? `"${this.family}"` : this.family}`;
206
+ document.fonts.check(s) || console.warn(`⚠️ Font "${this.family}" may not have loaded correctly`);
207
+ } catch {
208
+ }
209
+ }
210
+ }
211
+ /**
212
+ * Load a CSS file containing @font-face rules
213
+ */
214
+ async loadFontCSS(e) {
215
+ return new Promise((t, a) => {
216
+ if (document.querySelector(`link[href="${e}"]`)) {
217
+ t();
218
+ return;
219
+ }
220
+ const r = document.createElement("link");
221
+ r.rel = "stylesheet", r.href = e, r.onload = () => {
222
+ t();
223
+ }, r.onerror = (o) => {
224
+ console.warn(`⚠️ Failed to load font CSS for ${this.family}:`, e), t();
225
+ }, document.head.appendChild(r);
226
+ });
227
+ }
228
+ /**
229
+ * Load a font file directly and create @font-face rule
230
+ */
231
+ async loadFontFile(e) {
232
+ const { fontFormat: t, fontDisplay: a, weightRange: s, widthRange: r } = this.options;
233
+ let o = "";
234
+ t ? o = `format('${t}')` : e.endsWith(".woff2") ? o = "format('woff2')" : e.endsWith(".woff") ? o = "format('woff')" : e.endsWith(".ttf") && (o = "format('truetype')");
235
+ let d = `
236
+ @font-face {
237
+ font-family: "${this.family}";
238
+ src: url("${e}") ${o};
239
+ font-display: ${a || "swap"};
240
+ `;
241
+ s && (d += `font-weight: ${s[0]} ${s[1]};
242
+ `), r && (d += `font-stretch: ${r[0]}% ${r[1]}%;
243
+ `), d += "}";
244
+ const $ = document.createElement("style");
245
+ if ($.textContent = d, document.head.appendChild($), "FontFace" in window)
246
+ try {
247
+ const l = new FontFace(this.family, `url(${e})`, {
248
+ display: a || "swap",
249
+ weight: s ? `${s[0]} ${s[1]}` : void 0,
250
+ stretch: r ? `${r[0]}% ${r[1]}%` : void 0
251
+ });
252
+ await l.load(), document.fonts.add(l);
253
+ } catch {
254
+ }
255
+ }
256
+ /**
257
+ * Create a CSS variable for this font
258
+ */
259
+ toCSSVariable(e) {
260
+ return `${e || `--font-${this.name.toLowerCase().replace(/\s+/g, "-")}`}: ${this.value};`;
261
+ }
262
+ /**
263
+ * Get debug information
264
+ */
265
+ [Symbol.for("nodejs.util.inspect.custom")]() {
266
+ return `FontAsset(${this.family}, loaded: ${this.loaded})`;
267
+ }
268
+ /**
269
+ * Resolve the font value (required by Asset base class)
270
+ */
271
+ resolve() {
272
+ return this.options.loading === "lazy" && !this.loaded && this.options.fontUrl && this.load(), this.value;
273
+ }
274
+ }
275
+ const H = {
276
+ ultraLight: 100,
277
+ thin: 200,
278
+ light: 300,
279
+ regular: 400,
280
+ medium: 500,
281
+ semibold: 600,
282
+ bold: 700,
283
+ heavy: 800,
284
+ black: 900
285
+ }, z = {
286
+ ultraCondensed: 50,
287
+ extraCondensed: 62.5,
288
+ condensed: 75,
289
+ semiCondensed: 87.5,
290
+ normal: 100,
291
+ semiExpanded: 112.5,
292
+ expanded: 125,
293
+ extraExpanded: 150,
294
+ ultraExpanded: 200
295
+ }, P = {
296
+ sansSerif: ["system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica Neue", "Arial", "sans-serif"],
297
+ serif: ["Georgia", "Cambria", "Times New Roman", "Times", "serif"],
298
+ monospace: ["ui-monospace", "SFMono-Regular", "SF Mono", "Consolas", "Liberation Mono", "Menlo", "Courier", "monospace"],
299
+ cursive: ["cursive"],
300
+ fantasy: ["fantasy"]
301
+ };
302
+ function j(n = "sansSerif", e) {
303
+ return new f("", [...P[n]], e || `system-${n}`);
304
+ }
305
+ function O(n, e = [400], t, a = {}) {
306
+ const s = e.join(";"), o = `https://fonts.googleapis.com/css2?family=${n.replace(/\s+/g, "+")}:wght@${s}&display=swap`;
307
+ return new f(
308
+ n,
309
+ [...P.sansSerif],
310
+ t || n.toLowerCase().replace(/\s+/g, "-"),
311
+ {
312
+ ...a,
313
+ fontUrl: o,
314
+ preconnect: !0
315
+ }
316
+ );
317
+ }
318
+ function J(n, e, t, a = [...P.sansSerif], s) {
319
+ const r = {};
320
+ return t.slant && (r.slnt = t.slant), t.optical && (r.opsz = t.optical), t.custom && Object.assign(r, t.custom), new f(n, a, s, {
321
+ fontUrl: e,
322
+ weightRange: t.weight,
323
+ widthRange: t.width,
324
+ variableAxes: r,
325
+ fontDisplay: "swap"
326
+ });
327
+ }
328
+ var T = Object.defineProperty, W = (n, e, t) => e in n ? T(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, B = (n, e, t) => W(n, e + "", t);
329
+ class D {
330
+ constructor() {
331
+ B(this, "assets", /* @__PURE__ */ new Map());
332
+ }
333
+ add(e, t) {
334
+ this.assets.set(e, t);
335
+ }
336
+ get(e) {
337
+ return this.assets.get(e);
338
+ }
339
+ getAll() {
340
+ return new Map(this.assets);
341
+ }
342
+ // Proxy handler for dot notation access
343
+ asProxy() {
344
+ return new Proxy(
345
+ {},
346
+ {
347
+ get: (e, t) => {
348
+ if (t === "toString" || t === "valueOf")
349
+ return () => "[Assets]";
350
+ const a = this.assets.get(t);
351
+ if (a)
352
+ return a instanceof i ? new Proxy(a, {
353
+ get: (s, r) => r === "light" || r === "dark" ? s[r] : r === "resolve" ? () => s.resolve() : r === "toString" || r === "valueOf" ? () => s.resolve() : s[r],
354
+ has: (s, r) => r === "resolve" ? !0 : r in s
355
+ }) : a instanceof F ? new Proxy(a, {
356
+ get: (s, r) => r === "lightSrc" || r === "darkSrc" || r === "src" || r === "defaultSrc" ? s[r] : r === "resolve" ? () => s.resolve() : r === "toString" || r === "valueOf" ? () => s.resolve() : s[r],
357
+ has: (s, r) => r === "resolve" ? !0 : r in s
358
+ }) : a instanceof f ? new Proxy(a, {
359
+ get: (s, r) => r === "family" || r === "fallbacks" || r === "options" ? s[r] : r === "resolve" ? () => s.resolve() : r === "toString" || r === "valueOf" ? () => s.resolve() : s[r],
360
+ has: (s, r) => r === "resolve" ? !0 : r in s
361
+ }) : a;
362
+ },
363
+ // Add ownKeys handler to support Object.keys() enumeration
364
+ ownKeys: (e) => Array.from(this.assets.keys()),
365
+ // Add has handler to support 'in' operator
366
+ has: (e, t) => this.assets.has(t)
367
+ }
368
+ );
369
+ }
370
+ }
371
+ const y = new D(), q = y.asProxy(), K = q;
372
+ function u(n, e) {
373
+ if (typeof n == "string" && e instanceof g)
374
+ y.add(n, e);
375
+ else if (n instanceof g && typeof e == "string")
376
+ y.add(e, n);
377
+ else if (n instanceof g && e === void 0)
378
+ y.add(n.name, n);
379
+ else
380
+ throw new Error("registerAsset requires either (name, asset), (asset), or (asset, overrideName)");
381
+ }
382
+ function Q(n, e, t = "") {
383
+ return i.init({
384
+ default: n,
385
+ light: n,
386
+ dark: e,
387
+ name: t
388
+ });
389
+ }
390
+ function X(n, e, t, a = "", s) {
391
+ return F.init({
392
+ default: n,
393
+ light: e,
394
+ dark: t,
395
+ name: a,
396
+ options: s
397
+ });
398
+ }
399
+ function Y(n, e = [], t = "", a) {
400
+ return f.init(n, e, t, a);
401
+ }
402
+ function Z() {
403
+ const n = y.getAll(), e = [];
404
+ for (const [t, a] of n) {
405
+ let s = "custom";
406
+ a instanceof i ? s = "color" : a instanceof F ? s = "image" : a instanceof f && (s = "font"), e.push({
407
+ name: t,
408
+ type: s,
409
+ asset: a
410
+ });
411
+ }
412
+ return e.sort((t, a) => t.name.localeCompare(a.name));
413
+ }
414
+ function ee() {
415
+ return Array.from(y.getAll().keys()).sort();
416
+ }
417
+ u(i.init({
418
+ default: "#007AFF",
419
+ light: "#007AFF",
420
+ dark: "#0A84FF",
421
+ name: "systemBlue"
422
+ }));
423
+ u(i.init({
424
+ default: "#34C759",
425
+ light: "#34C759",
426
+ dark: "#30D158",
427
+ name: "systemGreen"
428
+ }));
429
+ u(i.init({
430
+ default: "#FF3B30",
431
+ light: "#FF3B30",
432
+ dark: "#FF453A",
433
+ name: "systemRed"
434
+ }));
435
+ u(i.init({
436
+ default: "#FF9500",
437
+ light: "#FF9500",
438
+ dark: "#FF9F0A",
439
+ name: "systemOrange"
440
+ }));
441
+ u(i.init({
442
+ default: "#5856D6",
443
+ light: "#5856D6",
444
+ dark: "#5E5CE6",
445
+ name: "systemPurple"
446
+ }));
447
+ u(i.init({
448
+ default: "#FF2D55",
449
+ light: "#FF2D55",
450
+ dark: "#FF375F",
451
+ name: "systemPink"
452
+ }));
453
+ u(i.init({
454
+ default: "#8E8E93",
455
+ name: "systemGray"
456
+ }));
457
+ u(i.init({
458
+ default: "#000000",
459
+ name: "systemBlack"
460
+ }));
461
+ u(i.init({
462
+ default: "#FFFFFF",
463
+ name: "systemWhite"
464
+ }));
465
+ export {
466
+ g as Asset,
467
+ K as Assets,
468
+ i as ColorAsset,
469
+ f as FontAsset,
470
+ H as FontWeight,
471
+ z as FontWidth,
472
+ F as ImageAsset,
473
+ se as LinearGradient,
474
+ ne as RadialGradient,
475
+ ae as StateGradient,
476
+ P as SystemFonts,
477
+ Q as createColorAsset,
478
+ Y as createFontAsset,
479
+ O as createGoogleFont,
480
+ X as createImageAsset,
481
+ j as createSystemFont,
482
+ J as createVariableFont,
483
+ Z as getAssetInfo,
484
+ ee as listAssetNames,
485
+ u as registerAsset
486
+ };
@@ -1,70 +1,10 @@
1
1
  /**
2
- * TypeScript types and interfaces for TachUI Assets System
3
- */
4
- import type { Asset } from './Asset';
5
- import type { ColorAsset } from './ColorAsset';
6
- import type { ImageAsset } from './ImageAsset';
7
- import type { FontAsset } from './FontAsset';
8
- export type { Asset };
9
- /**
10
- * Interface for ColorAsset with theme-specific access
11
- */
12
- export interface ColorAssetProxy extends ColorAsset {
13
- light: string;
14
- dark: string;
15
- toString(): string;
16
- valueOf(): string;
17
- }
18
- /**
19
- * Interface for ImageAsset with theme-specific access
20
- */
21
- export interface ImageAssetProxy extends ImageAsset {
22
- lightSrc: string;
23
- darkSrc: string;
24
- toString(): string;
25
- valueOf(): string;
26
- }
27
- /**
28
- * Built-in system assets interface
29
- */
30
- export interface SystemAssets {
31
- systemBlue: ColorAssetProxy;
32
- systemGreen: ColorAssetProxy;
33
- systemRed: ColorAssetProxy;
34
- systemOrange: ColorAssetProxy;
35
- systemPurple: ColorAssetProxy;
36
- systemPink: ColorAssetProxy;
37
- systemGray: ColorAssetProxy;
38
- systemBlack: ColorAssetProxy;
39
- systemWhite: ColorAssetProxy;
40
- }
41
- /**
42
- * Interface for FontAsset with convenient access
43
- */
44
- export interface FontAssetProxy extends FontAsset {
45
- toString(): string;
46
- valueOf(): string;
47
- }
48
- /**
49
- * Main Assets interface with extensible custom asset support
50
- */
51
- export interface AssetsInterface extends SystemAssets {
52
- [key: string]: ColorAssetProxy | ImageAssetProxy | FontAssetProxy | Asset;
53
- }
54
- /**
55
- * Asset discovery information
56
- */
57
- export interface AssetInfo {
58
- name: string;
59
- type: 'color' | 'image' | 'font' | 'custom';
60
- asset: Asset;
61
- }
62
- /**
63
- * Color validation result
64
- */
65
- export interface ColorValidationResult {
66
- isValid: boolean;
67
- format?: 'hex' | 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'named';
68
- error?: string;
69
- }
2
+ * TachUI Asset System Types
3
+ * Re-exported from @tachui/types for backward compatibility
4
+ */
5
+ export * from '@tachui/types/assets';
6
+ export type { Asset } from './Asset';
7
+ export type { ColorAsset } from './ColorAsset';
8
+ export type { ImageAsset } from './ImageAsset';
9
+ export type { FontAsset } from './FontAsset';
70
10
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/assets/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAG5C,YAAY,EAAE,KAAK,EAAE,CAAA;AAErB;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,IAAI,MAAM,CAAA;IAClB,OAAO,IAAI,MAAM,CAAA;CAClB;AA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