@tachui/core 0.7.1-alpha → 0.8.0-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 (265) hide show
  1. package/README.md +2 -2
  2. package/dist/bundles/common.d.ts +1 -1
  3. package/dist/bundles/common.d.ts.map +1 -1
  4. package/dist/bundles/minimal.d.ts +2 -16
  5. package/dist/bundles/minimal.d.ts.map +1 -1
  6. package/dist/bundles/production-minimal.d.ts +2 -16
  7. package/dist/bundles/production-minimal.d.ts.map +1 -1
  8. package/dist/common.js +403 -827
  9. package/dist/compiler/advanced-parser.d.ts.map +1 -1
  10. package/dist/compiler/index.js +14 -8
  11. package/dist/component-XAzF1xqs.js +487 -0
  12. package/dist/component-base-x2XmHFjy.js +255 -0
  13. package/dist/components/index.d.ts +4 -38
  14. package/dist/components/index.d.ts.map +1 -1
  15. package/dist/components/index.js +7 -4167
  16. package/dist/components/wrapper.d.ts +5 -152
  17. package/dist/components/wrapper.d.ts.map +1 -1
  18. package/dist/concatenated-component-ByPl3_FF.js +2933 -0
  19. package/dist/constants/index.d.ts +1 -1
  20. package/dist/constants/layout.d.ts +47 -4
  21. package/dist/constants/layout.d.ts.map +1 -1
  22. package/dist/constants/layout.js +84 -0
  23. package/dist/css-classes/index.js +176 -0
  24. package/dist/{dom-bridge-Cx-s6Ihx.js → dom-bridge-CAa1N2zX.js} +28 -28
  25. package/dist/{effect-CytAc9em.js → effect-B9Knft0b.js} +3 -3
  26. package/dist/essential.js +395 -825
  27. package/dist/index-DCPJFUm9.js +1407 -0
  28. package/dist/index-DIvMCJQO.js +268 -0
  29. package/dist/index-vdsiw6gQ.js +777 -0
  30. package/dist/index.d.ts +9 -9
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +395 -825
  33. package/dist/minimal-prod.js +101 -155
  34. package/dist/minimal.js +104 -170
  35. package/dist/modifiers/background.d.ts +41 -11
  36. package/dist/modifiers/background.d.ts.map +1 -1
  37. package/dist/modifiers/base.d.ts +6 -33
  38. package/dist/modifiers/base.d.ts.map +1 -1
  39. package/dist/modifiers/base.js +487 -0
  40. package/dist/modifiers/builder.d.ts +103 -195
  41. package/dist/modifiers/builder.d.ts.map +1 -1
  42. package/dist/modifiers/builder.js +9 -0
  43. package/dist/modifiers/core.d.ts +9 -401
  44. package/dist/modifiers/core.d.ts.map +1 -1
  45. package/dist/modifiers/{utils.d.ts → factories.d.ts} +18 -5
  46. package/dist/modifiers/factories.d.ts.map +1 -0
  47. package/dist/modifiers/index.d.ts +8 -52
  48. package/dist/modifiers/index.d.ts.map +1 -1
  49. package/dist/modifiers/index.js +38 -0
  50. package/dist/modifiers/presets.d.ts +368 -0
  51. package/dist/modifiers/presets.d.ts.map +1 -0
  52. package/dist/modifiers/registry.js +10 -0
  53. package/dist/modifiers/types.d.ts +39 -211
  54. package/dist/modifiers/types.d.ts.map +1 -1
  55. package/dist/modifiers/types.js +4 -0
  56. package/dist/performance-optimizer-stub-CtfXUwl4.js +38 -0
  57. package/dist/plugins/index.d.ts +5 -6
  58. package/dist/plugins/index.d.ts.map +1 -1
  59. package/dist/plugins/index.js +147 -297
  60. package/dist/plugins/simplified-index.d.ts +5 -6
  61. package/dist/plugins/simplified-index.d.ts.map +1 -1
  62. package/dist/production-minimal-BY_gMc-l.js +2532 -0
  63. package/dist/reactive/index.js +96 -95
  64. package/dist/reactive/types.js +4 -0
  65. package/dist/runtime/dom-bridge.js +5 -5
  66. package/dist/runtime/element-override.d.ts.map +1 -1
  67. package/dist/runtime/index.d.ts +0 -7
  68. package/dist/runtime/index.d.ts.map +1 -1
  69. package/dist/runtime/renderer.d.ts.map +1 -1
  70. package/dist/runtime/renderer.js +7 -8
  71. package/dist/runtime/semantic-role-manager.d.ts.map +1 -1
  72. package/dist/runtime/types.js +1 -0
  73. package/dist/{scheduler-7SvC3a21.js → scheduler-BKeqwrYE.js} +130 -130
  74. package/dist/validation/build-time-stub.d.ts +33 -0
  75. package/dist/validation/build-time-stub.d.ts.map +1 -0
  76. package/dist/validation/debug-tools-stub.d.ts +67 -0
  77. package/dist/validation/debug-tools-stub.d.ts.map +1 -0
  78. package/dist/validation/index.d.ts +23 -78
  79. package/dist/validation/index.d.ts.map +1 -1
  80. package/dist/validation/index.js +609 -6470
  81. package/dist/validation/lifecycle-validation.d.ts.map +1 -1
  82. package/dist/validation/performance-optimizer-stub.d.ts +50 -0
  83. package/dist/validation/performance-optimizer-stub.d.ts.map +1 -0
  84. package/dist/validation/plugin-registration.d.ts +5 -1
  85. package/dist/validation/plugin-registration.d.ts.map +1 -1
  86. package/dist/validation/production-bypass-core.d.ts +69 -0
  87. package/dist/validation/production-bypass-core.d.ts.map +1 -0
  88. package/package.json +41 -5
  89. package/dist/ScrollView-h-6wYMAm.js +0 -515
  90. package/dist/Spacer-BbteDQ9I.js +0 -5337
  91. package/dist/binding-CmdpowkI.js +0 -2276
  92. package/dist/components/BasicInput.d.ts +0 -116
  93. package/dist/components/BasicInput.d.ts.map +0 -1
  94. package/dist/components/Button.d.ts +0 -252
  95. package/dist/components/Button.d.ts.map +0 -1
  96. package/dist/components/Divider.d.ts +0 -141
  97. package/dist/components/Divider.d.ts.map +0 -1
  98. package/dist/components/EnhancedLink.d.ts +0 -365
  99. package/dist/components/EnhancedLink.d.ts.map +0 -1
  100. package/dist/components/Form.d.ts +0 -141
  101. package/dist/components/Form.d.ts.map +0 -1
  102. package/dist/components/Grid.d.ts +0 -698
  103. package/dist/components/Grid.d.ts.map +0 -1
  104. package/dist/components/GridResponsive.d.ts +0 -214
  105. package/dist/components/GridResponsive.d.ts.map +0 -1
  106. package/dist/components/Image.d.ts +0 -162
  107. package/dist/components/Image.d.ts.map +0 -1
  108. package/dist/components/List.d.ts +0 -287
  109. package/dist/components/List.d.ts.map +0 -1
  110. package/dist/components/Menu.d.ts +0 -159
  111. package/dist/components/Menu.d.ts.map +0 -1
  112. package/dist/components/Picker.d.ts +0 -153
  113. package/dist/components/Picker.d.ts.map +0 -1
  114. package/dist/components/ScrollView.d.ts +0 -222
  115. package/dist/components/ScrollView.d.ts.map +0 -1
  116. package/dist/components/Section.d.ts +0 -153
  117. package/dist/components/Section.d.ts.map +0 -1
  118. package/dist/components/Show.d.ts +0 -64
  119. package/dist/components/Show.d.ts.map +0 -1
  120. package/dist/components/Spacer.d.ts +0 -35
  121. package/dist/components/Spacer.d.ts.map +0 -1
  122. package/dist/components/Text.d.ts +0 -242
  123. package/dist/components/Text.d.ts.map +0 -1
  124. package/dist/components/Toggle.d.ts +0 -207
  125. package/dist/components/Toggle.d.ts.map +0 -1
  126. package/dist/concatenated-component-DPcl2TEO.js +0 -6779
  127. package/dist/context--zQFIImS.js +0 -283
  128. package/dist/debug/index.d.ts +0 -61
  129. package/dist/debug/index.d.ts.map +0 -1
  130. package/dist/debug.js +0 -178
  131. package/dist/developer-experience/enhanced-errors.d.ts +0 -128
  132. package/dist/developer-experience/enhanced-errors.d.ts.map +0 -1
  133. package/dist/developer-experience/enhanced-types.d.ts +0 -281
  134. package/dist/developer-experience/enhanced-types.d.ts.map +0 -1
  135. package/dist/developer-experience/index.d.ts +0 -44
  136. package/dist/developer-experience/index.d.ts.map +0 -1
  137. package/dist/index-Nfi2SBQh.js +0 -3268
  138. package/dist/modifiers/attributes.d.ts +0 -203
  139. package/dist/modifiers/attributes.d.ts.map +0 -1
  140. package/dist/modifiers/backdrop.d.ts +0 -59
  141. package/dist/modifiers/backdrop.d.ts.map +0 -1
  142. package/dist/modifiers/border.d.ts +0 -217
  143. package/dist/modifiers/border.d.ts.map +0 -1
  144. package/dist/modifiers/effects.d.ts +0 -159
  145. package/dist/modifiers/effects.d.ts.map +0 -1
  146. package/dist/modifiers/elements.d.ts +0 -240
  147. package/dist/modifiers/elements.d.ts.map +0 -1
  148. package/dist/modifiers/filters.d.ts +0 -275
  149. package/dist/modifiers/filters.d.ts.map +0 -1
  150. package/dist/modifiers/flexbox.d.ts +0 -82
  151. package/dist/modifiers/flexbox.d.ts.map +0 -1
  152. package/dist/modifiers/font.d.ts +0 -71
  153. package/dist/modifiers/font.d.ts.map +0 -1
  154. package/dist/modifiers/grid.d.ts +0 -92
  155. package/dist/modifiers/grid.d.ts.map +0 -1
  156. package/dist/modifiers/margin.d.ts +0 -128
  157. package/dist/modifiers/margin.d.ts.map +0 -1
  158. package/dist/modifiers/padding.d.ts +0 -204
  159. package/dist/modifiers/padding.d.ts.map +0 -1
  160. package/dist/modifiers/responsive/advanced-utilities.d.ts +0 -118
  161. package/dist/modifiers/responsive/advanced-utilities.d.ts.map +0 -1
  162. package/dist/modifiers/responsive/breakpoints.d.ts +0 -81
  163. package/dist/modifiers/responsive/breakpoints.d.ts.map +0 -1
  164. package/dist/modifiers/responsive/css-generator.d.ts +0 -100
  165. package/dist/modifiers/responsive/css-generator.d.ts.map +0 -1
  166. package/dist/modifiers/responsive/dev-tools.d.ts +0 -107
  167. package/dist/modifiers/responsive/dev-tools.d.ts.map +0 -1
  168. package/dist/modifiers/responsive/index.d.ts +0 -29
  169. package/dist/modifiers/responsive/index.d.ts.map +0 -1
  170. package/dist/modifiers/responsive/layout-patterns.d.ts +0 -230
  171. package/dist/modifiers/responsive/layout-patterns.d.ts.map +0 -1
  172. package/dist/modifiers/responsive/performance.d.ts +0 -130
  173. package/dist/modifiers/responsive/performance.d.ts.map +0 -1
  174. package/dist/modifiers/responsive/responsive-builder.d.ts +0 -133
  175. package/dist/modifiers/responsive/responsive-builder.d.ts.map +0 -1
  176. package/dist/modifiers/responsive/responsive-modifier.d.ts +0 -123
  177. package/dist/modifiers/responsive/responsive-modifier.d.ts.map +0 -1
  178. package/dist/modifiers/responsive/types.d.ts +0 -183
  179. package/dist/modifiers/responsive/types.d.ts.map +0 -1
  180. package/dist/modifiers/responsive/utilities.d.ts +0 -149
  181. package/dist/modifiers/responsive/utilities.d.ts.map +0 -1
  182. package/dist/modifiers/scroll.d.ts +0 -143
  183. package/dist/modifiers/scroll.d.ts.map +0 -1
  184. package/dist/modifiers/shadows.d.ts +0 -114
  185. package/dist/modifiers/shadows.d.ts.map +0 -1
  186. package/dist/modifiers/size.d.ts +0 -113
  187. package/dist/modifiers/size.d.ts.map +0 -1
  188. package/dist/modifiers/text.d.ts +0 -147
  189. package/dist/modifiers/text.d.ts.map +0 -1
  190. package/dist/modifiers/transformations.d.ts +0 -329
  191. package/dist/modifiers/transformations.d.ts.map +0 -1
  192. package/dist/modifiers/transitions.d.ts +0 -98
  193. package/dist/modifiers/transitions.d.ts.map +0 -1
  194. package/dist/modifiers/typography.d.ts +0 -192
  195. package/dist/modifiers/typography.d.ts.map +0 -1
  196. package/dist/modifiers/utility.d.ts +0 -69
  197. package/dist/modifiers/utility.d.ts.map +0 -1
  198. package/dist/modifiers/utils.d.ts.map +0 -1
  199. package/dist/plugins/simplified-error-handler.d.ts +0 -83
  200. package/dist/plugins/simplified-error-handler.d.ts.map +0 -1
  201. package/dist/runtime/dev-tools.d.ts +0 -240
  202. package/dist/runtime/dev-tools.d.ts.map +0 -1
  203. package/dist/runtime/development-warnings.d.ts +0 -42
  204. package/dist/runtime/development-warnings.d.ts.map +0 -1
  205. package/dist/runtime/error-boundary.d.ts +0 -302
  206. package/dist/runtime/error-boundary.d.ts.map +0 -1
  207. package/dist/runtime/error-recovery.d.ts +0 -267
  208. package/dist/runtime/error-recovery.d.ts.map +0 -1
  209. package/dist/runtime/error-reporting.d.ts +0 -287
  210. package/dist/runtime/error-reporting.d.ts.map +0 -1
  211. package/dist/runtime/error-utils.d.ts +0 -204
  212. package/dist/runtime/error-utils.d.ts.map +0 -1
  213. package/dist/runtime/performance.d.ts +0 -217
  214. package/dist/runtime/performance.d.ts.map +0 -1
  215. package/dist/sui-compat.d.ts +0 -110
  216. package/dist/sui-compat.d.ts.map +0 -1
  217. package/dist/validation/advanced-debugging.d.ts +0 -319
  218. package/dist/validation/advanced-debugging.d.ts.map +0 -1
  219. package/dist/validation/build-time/detection.d.ts +0 -32
  220. package/dist/validation/build-time/detection.d.ts.map +0 -1
  221. package/dist/validation/build-time/index.d.ts +0 -84
  222. package/dist/validation/build-time/index.d.ts.map +0 -1
  223. package/dist/validation/build-time/plugins.d.ts +0 -75
  224. package/dist/validation/build-time/plugins.d.ts.map +0 -1
  225. package/dist/validation/build-time/rules.d.ts +0 -73
  226. package/dist/validation/build-time/rules.d.ts.map +0 -1
  227. package/dist/validation/build-time/transformer.d.ts +0 -23
  228. package/dist/validation/build-time/transformer.d.ts.map +0 -1
  229. package/dist/validation/build-time/types.d.ts +0 -212
  230. package/dist/validation/build-time/types.d.ts.map +0 -1
  231. package/dist/validation/comprehensive.d.ts +0 -160
  232. package/dist/validation/comprehensive.d.ts.map +0 -1
  233. package/dist/validation/debug-tools.d.ts +0 -251
  234. package/dist/validation/debug-tools.d.ts.map +0 -1
  235. package/dist/validation/developer-experience.d.ts +0 -243
  236. package/dist/validation/developer-experience.d.ts.map +0 -1
  237. package/dist/validation/documentation-integration.d.ts +0 -269
  238. package/dist/validation/documentation-integration.d.ts.map +0 -1
  239. package/dist/validation/enhanced-runtime.d.ts +0 -279
  240. package/dist/validation/enhanced-runtime.d.ts.map +0 -1
  241. package/dist/validation/error-reporting.d.ts +0 -186
  242. package/dist/validation/error-reporting.d.ts.map +0 -1
  243. package/dist/validation/ide-integration.d.ts +0 -328
  244. package/dist/validation/ide-integration.d.ts.map +0 -1
  245. package/dist/validation/performance-optimizer.d.ts +0 -218
  246. package/dist/validation/performance-optimizer.d.ts.map +0 -1
  247. package/dist/validation/production-bypass.d.ts +0 -175
  248. package/dist/validation/production-bypass.d.ts.map +0 -1
  249. package/dist/validation/simple.d.ts +0 -111
  250. package/dist/validation/simple.d.ts.map +0 -1
  251. package/dist/viewport/adapters/web-adapter.d.ts +0 -227
  252. package/dist/viewport/adapters/web-adapter.d.ts.map +0 -1
  253. package/dist/viewport/components.d.ts +0 -131
  254. package/dist/viewport/components.d.ts.map +0 -1
  255. package/dist/viewport/environment.d.ts +0 -75
  256. package/dist/viewport/environment.d.ts.map +0 -1
  257. package/dist/viewport/index.d.ts +0 -138
  258. package/dist/viewport/index.d.ts.map +0 -1
  259. package/dist/viewport/index.js +0 -2085
  260. package/dist/viewport/platform-detection.d.ts +0 -59
  261. package/dist/viewport/platform-detection.d.ts.map +0 -1
  262. package/dist/viewport/types.d.ts +0 -301
  263. package/dist/viewport/types.d.ts.map +0 -1
  264. package/dist/viewport/viewport-manager.d.ts +0 -118
  265. package/dist/viewport/viewport-manager.d.ts.map +0 -1
@@ -1,283 +0,0 @@
1
- import { a as p, b as C } from "./scheduler-7SvC3a21.js";
2
- import { h as m } from "./dom-bridge-Cx-s6Ihx.js";
3
- var x = Object.defineProperty, w = (n, e, t) => e in n ? x(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, o = (n, e, t) => w(n, typeof e != "symbol" ? e + "" : e, t);
4
- const g = class l {
5
- constructor() {
6
- o(this, "contexts", /* @__PURE__ */ new Map()), o(this, "providerStack", /* @__PURE__ */ new Map()), o(this, "currentComponent", null);
7
- }
8
- static getInstance() {
9
- return l.instance || (l.instance = new l()), l.instance;
10
- }
11
- /**
12
- * Set the current component context for provider resolution
13
- */
14
- setCurrentComponent(e) {
15
- this.currentComponent = e;
16
- }
17
- /**
18
- * Get the current component context
19
- */
20
- getCurrentComponent() {
21
- return this.currentComponent;
22
- }
23
- /**
24
- * Register a context provider
25
- */
26
- registerProvider(e, t, r) {
27
- this.providerStack.has(e) || this.providerStack.set(e, []);
28
- const s = this.providerStack.get(e), [i, c] = p(t), a = {
29
- value: t,
30
- signal: [i, c],
31
- subscribers: /* @__PURE__ */ new Set(),
32
- providers: /* @__PURE__ */ new Set([r])
33
- };
34
- return s.push(a), r.providers.set(e, a), () => {
35
- const d = s.indexOf(a);
36
- d !== -1 && s.splice(d, 1), r.providers.delete(e), a.subscribers.clear(), a.providers.clear();
37
- };
38
- }
39
- /**
40
- * Get context value with reactive subscription
41
- */
42
- getContextValue(e, t) {
43
- const r = this.providerStack.get(e), s = r && r.length > 0 ? r[r.length - 1] : null;
44
- if (s)
45
- return this.currentComponent && (s.subscribers.add(this.currentComponent.id), this.currentComponent.consumers.add(e)), [s.signal[0], !0];
46
- const [i] = p(t);
47
- return [i, !1];
48
- }
49
- /**
50
- * Update context value and notify subscribers
51
- */
52
- updateContextValue(e, t) {
53
- const r = this.providerStack.get(e), s = r && r.length > 0 ? r[r.length - 1] : null;
54
- return s ? (s.value = t, s.signal[1](t), !0) : !1;
55
- }
56
- /**
57
- * Get all registered contexts (for debugging)
58
- */
59
- getAllContexts() {
60
- const e = /* @__PURE__ */ new Map();
61
- for (const [t, r] of this.providerStack.entries())
62
- r.length > 0 && e.set(t, r[r.length - 1]);
63
- return e;
64
- }
65
- /**
66
- * Clear all contexts (for testing)
67
- */
68
- clear() {
69
- this.contexts.clear(), this.providerStack.clear(), this.currentComponent = null;
70
- }
71
- };
72
- o(g, "instance");
73
- let f = g;
74
- class u {
75
- constructor() {
76
- o(this, "registry", f.getInstance());
77
- }
78
- /**
79
- * Create a context provider component
80
- */
81
- createProvider(e, t, r) {
82
- return {
83
- type: "component",
84
- render: () => {
85
- const s = this.registry.registerProvider(
86
- e.symbol,
87
- t,
88
- m(`provider_${e.symbol.toString()}`)
89
- ), i = r.flatMap((c) => {
90
- const a = c.render();
91
- return Array.isArray(a) ? a : [a];
92
- });
93
- return [
94
- {
95
- type: "element",
96
- tag: "div",
97
- props: { "data-context-provider": e.displayName || "provider" },
98
- children: i,
99
- dispose: s
100
- }
101
- ];
102
- },
103
- props: { children: r },
104
- id: `provider_${Date.now()}`,
105
- children: r
106
- };
107
- }
108
- /**
109
- * Set current component for context resolution
110
- */
111
- setCurrentComponent(e) {
112
- this.registry.setCurrentComponent(e);
113
- }
114
- /**
115
- * Update a context value
116
- */
117
- updateContext(e, t) {
118
- return this.registry.updateContextValue(e.symbol, t);
119
- }
120
- /**
121
- * Get all active contexts (for debugging)
122
- */
123
- getAllContexts() {
124
- return this.registry.getAllContexts();
125
- }
126
- /**
127
- * Clear all contexts
128
- */
129
- clear() {
130
- this.registry.clear();
131
- }
132
- }
133
- function h(n, e = {}) {
134
- return {
135
- symbol: Symbol(e.displayName || "TachUIContext"),
136
- defaultValue: n,
137
- displayName: e.displayName
138
- };
139
- }
140
- function b(n) {
141
- const e = f.getInstance(), [t, r] = e.getContextValue(n.symbol, n.defaultValue);
142
- return r || console.warn(
143
- `Context ${n.displayName || "unnamed"} used without a Provider. Using default value.`
144
- ), t;
145
- }
146
- function V(n, e) {
147
- return (t) => function(s) {
148
- return new u().createProvider(n, e, [t(s)]);
149
- };
150
- }
151
- function M(n, e) {
152
- return {
153
- type: "component",
154
- render: () => {
155
- const t = b(n), s = C(() => {
156
- const i = t();
157
- return e(i);
158
- })().render();
159
- return Array.isArray(s) ? s : [s];
160
- },
161
- props: {},
162
- id: `consumer_${Date.now()}`
163
- };
164
- }
165
- class y {
166
- constructor() {
167
- o(this, "services", /* @__PURE__ */ new Map()), o(this, "factories", /* @__PURE__ */ new Map()), o(this, "singletons", /* @__PURE__ */ new Map()), o(this, "scoped", /* @__PURE__ */ new Map()), o(this, "dependencies", /* @__PURE__ */ new Map());
168
- }
169
- /**
170
- * Register a service with the container
171
- */
172
- register(e, t, r = {}) {
173
- this.services.set(e, t), r.dependencies && this.dependencies.set(e, r.dependencies), r.singleton && this.singletons.set(e, null), r.scoped && this.scoped.set(e, null);
174
- }
175
- /**
176
- * Resolve a service from the container
177
- */
178
- resolve(e) {
179
- if (this.singletons.has(e)) {
180
- let t = this.singletons.get(e);
181
- return t === null && (t = this.createInstance(e), this.singletons.set(e, t)), t;
182
- }
183
- if (this.scoped.has(e)) {
184
- let t = this.scoped.get(e);
185
- return t === null && (t = this.createInstance(e), this.scoped.set(e, t)), t;
186
- }
187
- return this.createInstance(e);
188
- }
189
- /**
190
- * Create instance with dependency injection
191
- */
192
- createInstance(e) {
193
- const r = (this.dependencies.get(e) || []).map((c) => this.resolve(c)), s = this.factories.get(e);
194
- if (s)
195
- return s(...r);
196
- const i = this.services.get(e);
197
- if (i) {
198
- if (typeof i == "function")
199
- try {
200
- return new i(...r);
201
- } catch {
202
- return i(...r);
203
- }
204
- return i;
205
- }
206
- throw new Error(`Service ${String(e)} not found in DI container`);
207
- }
208
- /**
209
- * Check if service is registered
210
- */
211
- has(e) {
212
- return this.services.has(e) || this.factories.has(e);
213
- }
214
- /**
215
- * Clear the container
216
- */
217
- clear() {
218
- this.services.clear(), this.factories.clear(), this.singletons.clear(), this.scoped.clear(), this.dependencies.clear();
219
- }
220
- /**
221
- * Get all registered services (for debugging)
222
- */
223
- getRegistered() {
224
- return [...this.services.keys(), ...this.factories.keys()];
225
- }
226
- }
227
- const v = new y();
228
- function S(n) {
229
- return v.resolve(n);
230
- }
231
- function N(n) {
232
- return (e) => {
233
- const t = n || e.name;
234
- return v.register(t, e), e;
235
- };
236
- }
237
- const _ = {
238
- /**
239
- * Create multiple contexts at once
240
- */
241
- createContextGroup(n, e = {}) {
242
- const t = {};
243
- for (const [r, s] of Object.entries(n))
244
- t[r] = h(s, {
245
- displayName: e.prefix ? `${e.prefix}.${r}` : r
246
- });
247
- return t;
248
- },
249
- /**
250
- * Combine multiple context providers
251
- */
252
- combineProviders(n, e, t) {
253
- const r = new u();
254
- let s = t;
255
- for (const [i, c] of Object.entries(n)) {
256
- const a = e[i];
257
- s = [r.createProvider(c, a, s)];
258
- }
259
- return s[0];
260
- },
261
- /**
262
- * Create context with validation
263
- */
264
- createValidatedContext(n, e, t = {}) {
265
- return {
266
- ...h(n, t),
267
- validate: e
268
- };
269
- }
270
- }, A = new u();
271
- export {
272
- u as C,
273
- y as D,
274
- N as I,
275
- h as a,
276
- M as b,
277
- _ as c,
278
- A as d,
279
- v as g,
280
- S as i,
281
- b as u,
282
- V as w
283
- };
@@ -1,61 +0,0 @@
1
- /**
2
- * TachUI Debug System
3
- *
4
- * Provides visual debugging tools for component hierarchy and layout
5
- */
6
- export interface DebugConfig {
7
- enabled: boolean;
8
- showLabels: boolean;
9
- showBounds: boolean;
10
- logComponentTree: boolean;
11
- }
12
- declare class DebugManager {
13
- private config;
14
- private componentTree;
15
- /**
16
- * Enable debug mode with optional configuration
17
- */
18
- enable(options?: Partial<DebugConfig>): void;
19
- /**
20
- * Disable debug mode
21
- */
22
- disable(): void;
23
- /**
24
- * Check if debug mode is enabled
25
- */
26
- isEnabled(): boolean;
27
- /**
28
- * Get current debug configuration
29
- */
30
- getConfig(): DebugConfig;
31
- /**
32
- * Add debug attributes to DOM element
33
- */
34
- addDebugAttributes(element: HTMLElement, componentType: string, debugLabel?: string): void;
35
- /**
36
- * Log component to tree (for hierarchical debugging)
37
- */
38
- logComponent(type: string, label?: string, depth?: number): void;
39
- /**
40
- * Print component tree to console
41
- */
42
- printComponentTree(): void;
43
- /**
44
- * Get icon for component type
45
- */
46
- private getComponentIcon;
47
- /**
48
- * Inject debug CSS styles
49
- */
50
- private injectDebugStyles;
51
- /**
52
- * Remove debug CSS styles
53
- */
54
- private removeDebugStyles;
55
- }
56
- export declare const debugManager: DebugManager;
57
- export declare const enableDebug: (options?: Partial<DebugConfig>) => void;
58
- export declare const disableDebug: () => void;
59
- export declare const isDebugEnabled: () => boolean;
60
- export {};
61
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/debug/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,OAAO,CAAA;IACnB,gBAAgB,EAAE,OAAO,CAAA;CAC1B;AAED,cAAM,YAAY;IAChB,OAAO,CAAC,MAAM,CAKb;IAED,OAAO,CAAC,aAAa,CAA4D;IAEjF;;OAEG;IACH,MAAM,CAAC,OAAO,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,IAAI;IAkBhD;;OAEG;IACH,OAAO,IAAI,IAAI;IAQf;;OAEG;IACH,SAAS,IAAI,OAAO;IAIpB;;OAEG;IACH,SAAS,IAAI,WAAW;IAIxB;;OAEG;IACH,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI;IAsB1F;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,GAAE,MAAU,GAAG,IAAI;IAUnE;;OAEG;IACH,kBAAkB,IAAI,IAAI;IAe1B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAiBxB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA6DzB;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAW1B;AAGD,eAAO,MAAM,YAAY,cAAqB,CAAA;AAG9C,eAAO,MAAM,WAAW,GAAI,UAAU,OAAO,CAAC,WAAW,CAAC,SAAiC,CAAA;AAC3F,eAAO,MAAM,YAAY,YAA+B,CAAA;AACxD,eAAO,MAAM,cAAc,eAAiC,CAAA"}
package/dist/debug.js DELETED
@@ -1,178 +0,0 @@
1
- var r = Object.defineProperty, u = (o, e, t) => e in o ? r(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, s = (o, e, t) => u(o, typeof e != "symbol" ? e + "" : e, t);
2
- class d {
3
- constructor() {
4
- s(this, "config", {
5
- enabled: !1,
6
- showLabels: !1,
7
- showBounds: !1,
8
- logComponentTree: !1
9
- }), s(this, "componentTree", []);
10
- }
11
- /**
12
- * Enable debug mode with optional configuration
13
- */
14
- enable(e = {}) {
15
- this.config = {
16
- enabled: !0,
17
- showLabels: !0,
18
- showBounds: !0,
19
- logComponentTree: !0,
20
- ...e
21
- }, this.config.enabled && this.injectDebugStyles();
22
- }
23
- /**
24
- * Disable debug mode
25
- */
26
- disable() {
27
- this.config.enabled = !1, this.removeDebugStyles();
28
- }
29
- /**
30
- * Check if debug mode is enabled
31
- */
32
- isEnabled() {
33
- return this.config.enabled;
34
- }
35
- /**
36
- * Get current debug configuration
37
- */
38
- getConfig() {
39
- return { ...this.config };
40
- }
41
- /**
42
- * Add debug attributes to DOM element
43
- */
44
- addDebugAttributes(e, t, n) {
45
- this.config.enabled && (e.setAttribute("data-tachui-component", t), n && e.setAttribute("data-tachui-label", n), (this.config.showLabels || this.config.showBounds) && e.classList.add("tachui-debug"), this.config.showLabels && n && e.classList.add("tachui-debug-labeled"), this.config.showBounds && e.classList.add("tachui-debug-bounds"));
46
- }
47
- /**
48
- * Log component to tree (for hierarchical debugging)
49
- */
50
- logComponent(e, t, n = 0) {
51
- !this.config.enabled || !this.config.logComponentTree || this.componentTree.push({
52
- label: t || `<${e}>`,
53
- type: e,
54
- depth: n
55
- });
56
- }
57
- /**
58
- * Print component tree to console
59
- */
60
- printComponentTree() {
61
- !this.config.enabled || !this.config.logComponentTree || (console.group("🌳 TachUI Component Tree:"), this.componentTree.forEach(({ label: e, type: t, depth: n }) => {
62
- const i = " ".repeat(n), l = this.getComponentIcon(t);
63
- console.log(`${i}${l} ${t}: "${e}"`);
64
- }), console.groupEnd(), this.componentTree = []);
65
- }
66
- /**
67
- * Get icon for component type
68
- */
69
- getComponentIcon(e) {
70
- const t = {
71
- VStack: "📚",
72
- HStack: "➡️",
73
- ZStack: "📑",
74
- Button: "🔘",
75
- Text: "📝",
76
- Image: "🖼️",
77
- ScrollView: "📜",
78
- List: "📋",
79
- Form: "📋",
80
- Section: "📁",
81
- default: "🧩"
82
- };
83
- return t[e] || t.default;
84
- }
85
- /**
86
- * Inject debug CSS styles
87
- */
88
- injectDebugStyles() {
89
- if (document.getElementById("tachui-debug-styles")) return;
90
- const e = `
91
- /* TachUI Debug Styles */
92
- .tachui-debug {
93
- position: relative;
94
- }
95
-
96
- .tachui-debug-bounds {
97
- outline: 1px dashed rgba(255, 0, 0, 0.3) !important;
98
- outline-offset: -1px;
99
- }
100
-
101
- .tachui-debug-labeled::before {
102
- content: attr(data-tachui-label);
103
- position: absolute;
104
- top: -1px;
105
- left: -1px;
106
- background: rgba(255, 0, 0, 0.9);
107
- color: white;
108
- font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
109
- font-size: 10px;
110
- font-weight: bold;
111
- line-height: 1;
112
- padding: 2px 4px;
113
- border-radius: 2px;
114
- z-index: 9999;
115
- pointer-events: none;
116
- white-space: nowrap;
117
- max-width: 200px;
118
- overflow: hidden;
119
- text-overflow: ellipsis;
120
- }
121
-
122
- .tachui-debug-labeled:hover::before {
123
- background: rgba(255, 0, 0, 1);
124
- max-width: none;
125
- white-space: normal;
126
- }
127
-
128
- /* Component type indicators */
129
- [data-tachui-component="VStack"] {
130
- border-left: 2px solid rgba(0, 255, 0, 0.5) !important;
131
- }
132
-
133
- [data-tachui-component="HStack"] {
134
- border-top: 2px solid rgba(0, 0, 255, 0.5) !important;
135
- }
136
-
137
- [data-tachui-component="Button"] {
138
- box-shadow: inset 0 0 0 1px rgba(255, 165, 0, 0.5) !important;
139
- }
140
- `, t = document.createElement("style");
141
- t.id = "tachui-debug-styles", t.textContent = e, document.head.appendChild(t);
142
- }
143
- /**
144
- * Remove debug CSS styles
145
- */
146
- removeDebugStyles() {
147
- const e = document.getElementById("tachui-debug-styles");
148
- e && e.remove(), document.querySelectorAll(".tachui-debug").forEach((t) => {
149
- t.classList.remove("tachui-debug", "tachui-debug-labeled", "tachui-debug-bounds");
150
- });
151
- }
152
- }
153
- const a = new d(), c = (o) => a.enable(o), b = () => a.disable(), g = () => a.isEnabled();
154
- if (typeof window < "u") {
155
- const e = new URLSearchParams(window.location.search).get("debug");
156
- e === "true" || e === "1" ? (a.enable({
157
- enabled: !0,
158
- showLabels: !0,
159
- showBounds: !0,
160
- logComponentTree: !0
161
- }), console.log("🔧 TachUI Debug Mode: Enabled via URL parameter (?debug=true)")) : e === "labels" ? (a.enable({
162
- enabled: !0,
163
- showLabels: !0,
164
- showBounds: !1,
165
- logComponentTree: !1
166
- }), console.log("🔧 TachUI Debug Mode: Labels only (?debug=labels)")) : e === "bounds" && (a.enable({
167
- enabled: !0,
168
- showLabels: !1,
169
- showBounds: !0,
170
- logComponentTree: !1
171
- }), console.log("🔧 TachUI Debug Mode: Bounds only (?debug=bounds)"));
172
- }
173
- export {
174
- a as debugManager,
175
- b as disableDebug,
176
- c as enableDebug,
177
- g as isDebugEnabled
178
- };
@@ -1,128 +0,0 @@
1
- /**
2
- * Enhanced Error Messages and Developer Experience (Phase Maroon Week 2)
3
- *
4
- * Provides better error messages, debugging aids, and developer-friendly
5
- * error reporting for the TachUI framework.
6
- */
7
- import type { Modifier } from '../modifiers/types';
8
- import type { ComponentInstance } from '../runtime/types';
9
- /**
10
- * Enhanced error with developer-friendly context
11
- */
12
- export interface EnhancedTachUIError extends Error {
13
- code: string;
14
- category: 'modifier' | 'component' | 'runtime' | 'reactive' | 'validation';
15
- severity: 'warning' | 'error' | 'fatal';
16
- component?: string;
17
- suggestion: string;
18
- documentation?: string;
19
- examples?: string[];
20
- relatedErrors?: string[];
21
- }
22
- /**
23
- * Developer experience error factory
24
- */
25
- export declare class DeveloperErrorFactory {
26
- /**
27
- * Create modifier validation error
28
- */
29
- static modifierValidationError(modifier: string, issue: string, component?: ComponentInstance): EnhancedTachUIError;
30
- /**
31
- * Create component validation error
32
- */
33
- static componentValidationError(componentType: string, prop: string, expectedType: string, actualValue: any): EnhancedTachUIError;
34
- /**
35
- * Create reactive system error
36
- */
37
- static reactiveSystemError(operation: string, issue: string, context?: string): EnhancedTachUIError;
38
- /**
39
- * Create runtime error
40
- */
41
- static runtimeError(operation: string, issue: string, component?: string): EnhancedTachUIError;
42
- /**
43
- * Get modifier-specific suggestion
44
- */
45
- private static getModifierSuggestion;
46
- /**
47
- * Get modifier examples
48
- */
49
- private static getModifierExamples;
50
- /**
51
- * Get component examples
52
- */
53
- private static getComponentExamples;
54
- /**
55
- * Get type conversion suggestion
56
- */
57
- private static getTypeConversionSuggestion;
58
- /**
59
- * Get reactive system suggestion
60
- */
61
- private static getReactiveSuggestion;
62
- /**
63
- * Get reactive examples
64
- */
65
- private static getReactiveExamples;
66
- /**
67
- * Get runtime suggestion
68
- */
69
- private static getRuntimeSuggestion;
70
- }
71
- /**
72
- * Enhanced warning system
73
- */
74
- export declare class DeveloperWarnings {
75
- private static warningsSeen;
76
- /**
77
- * Warn about deprecated API usage
78
- */
79
- static deprecation(oldAPI: string, newAPI: string, component?: string, willBeRemovedIn?: string): void;
80
- /**
81
- * Warn about performance issues
82
- */
83
- static performance(issue: string, suggestion: string, component?: string): void;
84
- /**
85
- * Warn about accessibility issues
86
- */
87
- static accessibility(issue: string, suggestion: string, component?: string): void;
88
- /**
89
- * Clear warning cache (for testing)
90
- */
91
- static clearWarnings(): void;
92
- }
93
- /**
94
- * Type validation helpers
95
- */
96
- export declare class TypeValidation {
97
- /**
98
- * Validate component props with enhanced error messages
99
- */
100
- static validateComponentProps<T extends Record<string, any>>(componentType: string, props: T, schema: Record<keyof T, {
101
- type: string;
102
- required?: boolean;
103
- validator?: (value: any) => boolean;
104
- message?: string;
105
- }>): void;
106
- /**
107
- * Validate type
108
- */
109
- private static validateType;
110
- /**
111
- * Validate modifier combination
112
- */
113
- static validateModifierCombination(modifiers: Modifier[]): void;
114
- }
115
- /**
116
- * Development mode utilities
117
- */
118
- export declare const devMode: {
119
- /**
120
- * Enable enhanced error reporting in development
121
- */
122
- enableEnhancedErrors(): void;
123
- /**
124
- * Log component tree for debugging
125
- */
126
- logComponentTree(root: any, depth?: number): void;
127
- };
128
- //# sourceMappingURL=enhanced-errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enhanced-errors.d.ts","sourceRoot":"","sources":["../../src/developer-experience/enhanced-errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,KAAK;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ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