@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.
- package/README.md +2 -2
- package/dist/bundles/common.d.ts +1 -1
- package/dist/bundles/common.d.ts.map +1 -1
- package/dist/bundles/minimal.d.ts +2 -16
- package/dist/bundles/minimal.d.ts.map +1 -1
- package/dist/bundles/production-minimal.d.ts +2 -16
- package/dist/bundles/production-minimal.d.ts.map +1 -1
- package/dist/common.js +403 -827
- package/dist/compiler/advanced-parser.d.ts.map +1 -1
- package/dist/compiler/index.js +14 -8
- package/dist/component-XAzF1xqs.js +487 -0
- package/dist/component-base-x2XmHFjy.js +255 -0
- package/dist/components/index.d.ts +4 -38
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +7 -4167
- package/dist/components/wrapper.d.ts +5 -152
- package/dist/components/wrapper.d.ts.map +1 -1
- package/dist/concatenated-component-ByPl3_FF.js +2933 -0
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/layout.d.ts +47 -4
- package/dist/constants/layout.d.ts.map +1 -1
- package/dist/constants/layout.js +84 -0
- package/dist/css-classes/index.js +176 -0
- package/dist/{dom-bridge-Cx-s6Ihx.js → dom-bridge-CAa1N2zX.js} +28 -28
- package/dist/{effect-CytAc9em.js → effect-B9Knft0b.js} +3 -3
- package/dist/essential.js +395 -825
- package/dist/index-DCPJFUm9.js +1407 -0
- package/dist/index-DIvMCJQO.js +268 -0
- package/dist/index-vdsiw6gQ.js +777 -0
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +395 -825
- package/dist/minimal-prod.js +101 -155
- package/dist/minimal.js +104 -170
- package/dist/modifiers/background.d.ts +41 -11
- package/dist/modifiers/background.d.ts.map +1 -1
- package/dist/modifiers/base.d.ts +6 -33
- package/dist/modifiers/base.d.ts.map +1 -1
- package/dist/modifiers/base.js +487 -0
- package/dist/modifiers/builder.d.ts +103 -195
- package/dist/modifiers/builder.d.ts.map +1 -1
- package/dist/modifiers/builder.js +9 -0
- package/dist/modifiers/core.d.ts +9 -401
- package/dist/modifiers/core.d.ts.map +1 -1
- package/dist/modifiers/{utils.d.ts → factories.d.ts} +18 -5
- package/dist/modifiers/factories.d.ts.map +1 -0
- package/dist/modifiers/index.d.ts +8 -52
- package/dist/modifiers/index.d.ts.map +1 -1
- package/dist/modifiers/index.js +38 -0
- package/dist/modifiers/presets.d.ts +368 -0
- package/dist/modifiers/presets.d.ts.map +1 -0
- package/dist/modifiers/registry.js +10 -0
- package/dist/modifiers/types.d.ts +39 -211
- package/dist/modifiers/types.d.ts.map +1 -1
- package/dist/modifiers/types.js +4 -0
- package/dist/performance-optimizer-stub-CtfXUwl4.js +38 -0
- package/dist/plugins/index.d.ts +5 -6
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +147 -297
- package/dist/plugins/simplified-index.d.ts +5 -6
- package/dist/plugins/simplified-index.d.ts.map +1 -1
- package/dist/production-minimal-BY_gMc-l.js +2532 -0
- package/dist/reactive/index.js +96 -95
- package/dist/reactive/types.js +4 -0
- package/dist/runtime/dom-bridge.js +5 -5
- package/dist/runtime/element-override.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +0 -7
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/renderer.d.ts.map +1 -1
- package/dist/runtime/renderer.js +7 -8
- package/dist/runtime/semantic-role-manager.d.ts.map +1 -1
- package/dist/runtime/types.js +1 -0
- package/dist/{scheduler-7SvC3a21.js → scheduler-BKeqwrYE.js} +130 -130
- package/dist/validation/build-time-stub.d.ts +33 -0
- package/dist/validation/build-time-stub.d.ts.map +1 -0
- package/dist/validation/debug-tools-stub.d.ts +67 -0
- package/dist/validation/debug-tools-stub.d.ts.map +1 -0
- package/dist/validation/index.d.ts +23 -78
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +609 -6470
- package/dist/validation/lifecycle-validation.d.ts.map +1 -1
- package/dist/validation/performance-optimizer-stub.d.ts +50 -0
- package/dist/validation/performance-optimizer-stub.d.ts.map +1 -0
- package/dist/validation/plugin-registration.d.ts +5 -1
- package/dist/validation/plugin-registration.d.ts.map +1 -1
- package/dist/validation/production-bypass-core.d.ts +69 -0
- package/dist/validation/production-bypass-core.d.ts.map +1 -0
- package/package.json +41 -5
- package/dist/ScrollView-h-6wYMAm.js +0 -515
- package/dist/Spacer-BbteDQ9I.js +0 -5337
- package/dist/binding-CmdpowkI.js +0 -2276
- package/dist/components/BasicInput.d.ts +0 -116
- package/dist/components/BasicInput.d.ts.map +0 -1
- package/dist/components/Button.d.ts +0 -252
- package/dist/components/Button.d.ts.map +0 -1
- package/dist/components/Divider.d.ts +0 -141
- package/dist/components/Divider.d.ts.map +0 -1
- package/dist/components/EnhancedLink.d.ts +0 -365
- package/dist/components/EnhancedLink.d.ts.map +0 -1
- package/dist/components/Form.d.ts +0 -141
- package/dist/components/Form.d.ts.map +0 -1
- package/dist/components/Grid.d.ts +0 -698
- package/dist/components/Grid.d.ts.map +0 -1
- package/dist/components/GridResponsive.d.ts +0 -214
- package/dist/components/GridResponsive.d.ts.map +0 -1
- package/dist/components/Image.d.ts +0 -162
- package/dist/components/Image.d.ts.map +0 -1
- package/dist/components/List.d.ts +0 -287
- package/dist/components/List.d.ts.map +0 -1
- package/dist/components/Menu.d.ts +0 -159
- package/dist/components/Menu.d.ts.map +0 -1
- package/dist/components/Picker.d.ts +0 -153
- package/dist/components/Picker.d.ts.map +0 -1
- package/dist/components/ScrollView.d.ts +0 -222
- package/dist/components/ScrollView.d.ts.map +0 -1
- package/dist/components/Section.d.ts +0 -153
- package/dist/components/Section.d.ts.map +0 -1
- package/dist/components/Show.d.ts +0 -64
- package/dist/components/Show.d.ts.map +0 -1
- package/dist/components/Spacer.d.ts +0 -35
- package/dist/components/Spacer.d.ts.map +0 -1
- package/dist/components/Text.d.ts +0 -242
- package/dist/components/Text.d.ts.map +0 -1
- package/dist/components/Toggle.d.ts +0 -207
- package/dist/components/Toggle.d.ts.map +0 -1
- package/dist/concatenated-component-DPcl2TEO.js +0 -6779
- package/dist/context--zQFIImS.js +0 -283
- package/dist/debug/index.d.ts +0 -61
- package/dist/debug/index.d.ts.map +0 -1
- package/dist/debug.js +0 -178
- package/dist/developer-experience/enhanced-errors.d.ts +0 -128
- package/dist/developer-experience/enhanced-errors.d.ts.map +0 -1
- package/dist/developer-experience/enhanced-types.d.ts +0 -281
- package/dist/developer-experience/enhanced-types.d.ts.map +0 -1
- package/dist/developer-experience/index.d.ts +0 -44
- package/dist/developer-experience/index.d.ts.map +0 -1
- package/dist/index-Nfi2SBQh.js +0 -3268
- package/dist/modifiers/attributes.d.ts +0 -203
- package/dist/modifiers/attributes.d.ts.map +0 -1
- package/dist/modifiers/backdrop.d.ts +0 -59
- package/dist/modifiers/backdrop.d.ts.map +0 -1
- package/dist/modifiers/border.d.ts +0 -217
- package/dist/modifiers/border.d.ts.map +0 -1
- package/dist/modifiers/effects.d.ts +0 -159
- package/dist/modifiers/effects.d.ts.map +0 -1
- package/dist/modifiers/elements.d.ts +0 -240
- package/dist/modifiers/elements.d.ts.map +0 -1
- package/dist/modifiers/filters.d.ts +0 -275
- package/dist/modifiers/filters.d.ts.map +0 -1
- package/dist/modifiers/flexbox.d.ts +0 -82
- package/dist/modifiers/flexbox.d.ts.map +0 -1
- package/dist/modifiers/font.d.ts +0 -71
- package/dist/modifiers/font.d.ts.map +0 -1
- package/dist/modifiers/grid.d.ts +0 -92
- package/dist/modifiers/grid.d.ts.map +0 -1
- package/dist/modifiers/margin.d.ts +0 -128
- package/dist/modifiers/margin.d.ts.map +0 -1
- package/dist/modifiers/padding.d.ts +0 -204
- package/dist/modifiers/padding.d.ts.map +0 -1
- package/dist/modifiers/responsive/advanced-utilities.d.ts +0 -118
- package/dist/modifiers/responsive/advanced-utilities.d.ts.map +0 -1
- package/dist/modifiers/responsive/breakpoints.d.ts +0 -81
- package/dist/modifiers/responsive/breakpoints.d.ts.map +0 -1
- package/dist/modifiers/responsive/css-generator.d.ts +0 -100
- package/dist/modifiers/responsive/css-generator.d.ts.map +0 -1
- package/dist/modifiers/responsive/dev-tools.d.ts +0 -107
- package/dist/modifiers/responsive/dev-tools.d.ts.map +0 -1
- package/dist/modifiers/responsive/index.d.ts +0 -29
- package/dist/modifiers/responsive/index.d.ts.map +0 -1
- package/dist/modifiers/responsive/layout-patterns.d.ts +0 -230
- package/dist/modifiers/responsive/layout-patterns.d.ts.map +0 -1
- package/dist/modifiers/responsive/performance.d.ts +0 -130
- package/dist/modifiers/responsive/performance.d.ts.map +0 -1
- package/dist/modifiers/responsive/responsive-builder.d.ts +0 -133
- package/dist/modifiers/responsive/responsive-builder.d.ts.map +0 -1
- package/dist/modifiers/responsive/responsive-modifier.d.ts +0 -123
- package/dist/modifiers/responsive/responsive-modifier.d.ts.map +0 -1
- package/dist/modifiers/responsive/types.d.ts +0 -183
- package/dist/modifiers/responsive/types.d.ts.map +0 -1
- package/dist/modifiers/responsive/utilities.d.ts +0 -149
- package/dist/modifiers/responsive/utilities.d.ts.map +0 -1
- package/dist/modifiers/scroll.d.ts +0 -143
- package/dist/modifiers/scroll.d.ts.map +0 -1
- package/dist/modifiers/shadows.d.ts +0 -114
- package/dist/modifiers/shadows.d.ts.map +0 -1
- package/dist/modifiers/size.d.ts +0 -113
- package/dist/modifiers/size.d.ts.map +0 -1
- package/dist/modifiers/text.d.ts +0 -147
- package/dist/modifiers/text.d.ts.map +0 -1
- package/dist/modifiers/transformations.d.ts +0 -329
- package/dist/modifiers/transformations.d.ts.map +0 -1
- package/dist/modifiers/transitions.d.ts +0 -98
- package/dist/modifiers/transitions.d.ts.map +0 -1
- package/dist/modifiers/typography.d.ts +0 -192
- package/dist/modifiers/typography.d.ts.map +0 -1
- package/dist/modifiers/utility.d.ts +0 -69
- package/dist/modifiers/utility.d.ts.map +0 -1
- package/dist/modifiers/utils.d.ts.map +0 -1
- package/dist/plugins/simplified-error-handler.d.ts +0 -83
- package/dist/plugins/simplified-error-handler.d.ts.map +0 -1
- package/dist/runtime/dev-tools.d.ts +0 -240
- package/dist/runtime/dev-tools.d.ts.map +0 -1
- package/dist/runtime/development-warnings.d.ts +0 -42
- package/dist/runtime/development-warnings.d.ts.map +0 -1
- package/dist/runtime/error-boundary.d.ts +0 -302
- package/dist/runtime/error-boundary.d.ts.map +0 -1
- package/dist/runtime/error-recovery.d.ts +0 -267
- package/dist/runtime/error-recovery.d.ts.map +0 -1
- package/dist/runtime/error-reporting.d.ts +0 -287
- package/dist/runtime/error-reporting.d.ts.map +0 -1
- package/dist/runtime/error-utils.d.ts +0 -204
- package/dist/runtime/error-utils.d.ts.map +0 -1
- package/dist/runtime/performance.d.ts +0 -217
- package/dist/runtime/performance.d.ts.map +0 -1
- package/dist/sui-compat.d.ts +0 -110
- package/dist/sui-compat.d.ts.map +0 -1
- package/dist/validation/advanced-debugging.d.ts +0 -319
- package/dist/validation/advanced-debugging.d.ts.map +0 -1
- package/dist/validation/build-time/detection.d.ts +0 -32
- package/dist/validation/build-time/detection.d.ts.map +0 -1
- package/dist/validation/build-time/index.d.ts +0 -84
- package/dist/validation/build-time/index.d.ts.map +0 -1
- package/dist/validation/build-time/plugins.d.ts +0 -75
- package/dist/validation/build-time/plugins.d.ts.map +0 -1
- package/dist/validation/build-time/rules.d.ts +0 -73
- package/dist/validation/build-time/rules.d.ts.map +0 -1
- package/dist/validation/build-time/transformer.d.ts +0 -23
- package/dist/validation/build-time/transformer.d.ts.map +0 -1
- package/dist/validation/build-time/types.d.ts +0 -212
- package/dist/validation/build-time/types.d.ts.map +0 -1
- package/dist/validation/comprehensive.d.ts +0 -160
- package/dist/validation/comprehensive.d.ts.map +0 -1
- package/dist/validation/debug-tools.d.ts +0 -251
- package/dist/validation/debug-tools.d.ts.map +0 -1
- package/dist/validation/developer-experience.d.ts +0 -243
- package/dist/validation/developer-experience.d.ts.map +0 -1
- package/dist/validation/documentation-integration.d.ts +0 -269
- package/dist/validation/documentation-integration.d.ts.map +0 -1
- package/dist/validation/enhanced-runtime.d.ts +0 -279
- package/dist/validation/enhanced-runtime.d.ts.map +0 -1
- package/dist/validation/error-reporting.d.ts +0 -186
- package/dist/validation/error-reporting.d.ts.map +0 -1
- package/dist/validation/ide-integration.d.ts +0 -328
- package/dist/validation/ide-integration.d.ts.map +0 -1
- package/dist/validation/performance-optimizer.d.ts +0 -218
- package/dist/validation/performance-optimizer.d.ts.map +0 -1
- package/dist/validation/production-bypass.d.ts +0 -175
- package/dist/validation/production-bypass.d.ts.map +0 -1
- package/dist/validation/simple.d.ts +0 -111
- package/dist/validation/simple.d.ts.map +0 -1
- package/dist/viewport/adapters/web-adapter.d.ts +0 -227
- package/dist/viewport/adapters/web-adapter.d.ts.map +0 -1
- package/dist/viewport/components.d.ts +0 -131
- package/dist/viewport/components.d.ts.map +0 -1
- package/dist/viewport/environment.d.ts +0 -75
- package/dist/viewport/environment.d.ts.map +0 -1
- package/dist/viewport/index.d.ts +0 -138
- package/dist/viewport/index.d.ts.map +0 -1
- package/dist/viewport/index.js +0 -2085
- package/dist/viewport/platform-detection.d.ts +0 -59
- package/dist/viewport/platform-detection.d.ts.map +0 -1
- package/dist/viewport/types.d.ts +0 -301
- package/dist/viewport/types.d.ts.map +0 -1
- package/dist/viewport/viewport-manager.d.ts +0 -118
- package/dist/viewport/viewport-manager.d.ts.map +0 -1
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { J as n, i as f, g as h } from "./scheduler-BKeqwrYE.js";
|
|
2
|
+
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
|
+
const d = {
|
|
4
|
+
sanitizeClassNames: !0,
|
|
5
|
+
sanitizationRules: {
|
|
6
|
+
allowNumbers: !0,
|
|
7
|
+
allowUnderscores: !0,
|
|
8
|
+
customReplacements: {}
|
|
9
|
+
},
|
|
10
|
+
enableCaching: !0,
|
|
11
|
+
maxCacheSize: 1e3,
|
|
12
|
+
warnDuplicateClasses: process.env.NODE_ENV === "development",
|
|
13
|
+
warnInvalidClasses: process.env.NODE_ENV === "development"
|
|
14
|
+
};
|
|
15
|
+
class p {
|
|
16
|
+
constructor(s = {}) {
|
|
17
|
+
o(this, "config"), o(this, "classCache"), o(this, "processingCache"), this.config = { ...d, ...s };
|
|
18
|
+
const e = (() => {
|
|
19
|
+
try {
|
|
20
|
+
return typeof Map < "u" && typeof Map == "function";
|
|
21
|
+
} catch {
|
|
22
|
+
return !1;
|
|
23
|
+
}
|
|
24
|
+
})();
|
|
25
|
+
this.classCache = e ? /* @__PURE__ */ new Map() : {}, this.processingCache = e ? /* @__PURE__ */ new Map() : {};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Cache helper methods to work with both Map and plain object fallbacks
|
|
29
|
+
*/
|
|
30
|
+
cacheHas(s, e) {
|
|
31
|
+
try {
|
|
32
|
+
return s instanceof Map ? s.has(e) : e in s;
|
|
33
|
+
} catch {
|
|
34
|
+
return e in s;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
cacheGet(s, e) {
|
|
38
|
+
try {
|
|
39
|
+
return s instanceof Map ? s.get(e) : s[e];
|
|
40
|
+
} catch {
|
|
41
|
+
return s[e];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
cacheSet(s, e, t) {
|
|
45
|
+
try {
|
|
46
|
+
s instanceof Map ? s.set(e, t) : s[e] = t;
|
|
47
|
+
} catch {
|
|
48
|
+
s[e] = t;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
cacheDelete(s, e) {
|
|
52
|
+
try {
|
|
53
|
+
s instanceof Map ? s.delete(e) : delete s[e];
|
|
54
|
+
} catch {
|
|
55
|
+
delete s[e];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
cacheClear(s) {
|
|
59
|
+
try {
|
|
60
|
+
s instanceof Map ? s.clear() : Object.keys(s).forEach((e) => delete s[e]);
|
|
61
|
+
} catch {
|
|
62
|
+
Object.keys(s).forEach((t) => delete s[t]);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
cacheSize(s) {
|
|
66
|
+
try {
|
|
67
|
+
return s instanceof Map ? s.size : Object.keys(s).length;
|
|
68
|
+
} catch {
|
|
69
|
+
return Object.keys(s).length;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
cacheKeys(s) {
|
|
73
|
+
try {
|
|
74
|
+
return s instanceof Map ? s.keys() : Object.keys(s);
|
|
75
|
+
} catch {
|
|
76
|
+
return Object.keys(s);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Process CSS classes from various input formats
|
|
81
|
+
*/
|
|
82
|
+
processClasses(s) {
|
|
83
|
+
if (!s) return [];
|
|
84
|
+
if (n(s) || f(s)) {
|
|
85
|
+
const r = s();
|
|
86
|
+
return this.processClasses(r);
|
|
87
|
+
}
|
|
88
|
+
const e = this.getCacheKey(s);
|
|
89
|
+
if (this.config.enableCaching && this.cacheHas(this.classCache, e))
|
|
90
|
+
return this.cacheGet(this.classCache, e);
|
|
91
|
+
let t = [];
|
|
92
|
+
if (typeof s == "string")
|
|
93
|
+
t = s.trim().split(/\s+/).filter(Boolean);
|
|
94
|
+
else if (Array.isArray(s))
|
|
95
|
+
t = s.flatMap((r) => {
|
|
96
|
+
if (r == null || r === "")
|
|
97
|
+
return [];
|
|
98
|
+
const c = (typeof r == "string" ? r : String(r)).trim();
|
|
99
|
+
return typeof r != "string" && c ? [c] : c.split(/\s+/);
|
|
100
|
+
}).filter(Boolean);
|
|
101
|
+
else {
|
|
102
|
+
const r = String(s).trim();
|
|
103
|
+
t = r ? [r] : [];
|
|
104
|
+
}
|
|
105
|
+
const a = this.processClassArray(t);
|
|
106
|
+
return this.config.enableCaching && this.setCachedClasses(e, a), a;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Process an array of class names
|
|
110
|
+
*/
|
|
111
|
+
processClassArray(s) {
|
|
112
|
+
let e = s;
|
|
113
|
+
return this.config.sanitizeClassNames && (e = e.map((t) => this.sanitizeClassName(t))), e = this.deduplicateClasses(e), this.config.warnDuplicateClasses && s.length !== e.length && console.warn(
|
|
114
|
+
"[tachUI] Duplicate CSS classes detected and removed:",
|
|
115
|
+
s.filter((t, a) => s.indexOf(t) !== a)
|
|
116
|
+
), e;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Sanitize class name to be valid CSS identifier
|
|
120
|
+
*/
|
|
121
|
+
sanitizeClassName(s) {
|
|
122
|
+
if (!s || typeof s != "string") return "";
|
|
123
|
+
const e = this.config.sanitizationRules;
|
|
124
|
+
let t = s.trim();
|
|
125
|
+
t.includes(" ") && (t = t.replace(/\s+/g, "-"), this.config.warnInvalidClasses && console.warn(`[tachUI] CSS class names cannot contain spaces. Converted "${s}" to "${t}"`)), Object.entries(e.customReplacements || {}).forEach(([r, C]) => {
|
|
126
|
+
t = t.replace(new RegExp(r, "g"), C);
|
|
127
|
+
});
|
|
128
|
+
let a = "a-zA-Z\\-\\.";
|
|
129
|
+
return e.allowNumbers && (a += "0-9"), e.allowUnderscores && (a += "_"), a += ":\\[\\]/%", t = t.replace(new RegExp(`[^${a}]`, "g"), "-"), /^[0-9]/.test(t) && (t = "cls-" + t), t = t.replace(/---+/g, "--"), this.config.warnInvalidClasses && t !== s.trim() && console.warn(`[tachUI] CSS class "${s}" sanitized to "${t}"`), t;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Deduplicate classes while preserving first occurrence order
|
|
133
|
+
*/
|
|
134
|
+
deduplicateClasses(s) {
|
|
135
|
+
return [...new Set(s.filter(Boolean))];
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Combine tachUI classes with user-provided CSS classes
|
|
139
|
+
* User classes come AFTER tachUI classes for proper CSS cascade
|
|
140
|
+
*/
|
|
141
|
+
combineClasses(s, e) {
|
|
142
|
+
const t = this.processClasses(e), a = [...s, ...t];
|
|
143
|
+
return this.deduplicateClasses(a);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Update configuration
|
|
147
|
+
*/
|
|
148
|
+
updateConfig(s) {
|
|
149
|
+
this.config = { ...this.config, ...s }, this.clearCaches();
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Get current configuration
|
|
153
|
+
*/
|
|
154
|
+
getConfig() {
|
|
155
|
+
return { ...this.config };
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Clear all caches
|
|
159
|
+
*/
|
|
160
|
+
clearCaches() {
|
|
161
|
+
this.cacheClear(this.classCache), this.cacheClear(this.processingCache);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Get cache statistics for debugging
|
|
165
|
+
*/
|
|
166
|
+
getCacheStats() {
|
|
167
|
+
return {
|
|
168
|
+
size: this.cacheSize(this.classCache),
|
|
169
|
+
maxSize: this.config.maxCacheSize,
|
|
170
|
+
hitRate: 0
|
|
171
|
+
// TODO: Implement hit rate tracking if needed
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Generate cache key for input
|
|
176
|
+
*/
|
|
177
|
+
getCacheKey(s) {
|
|
178
|
+
return Array.isArray(s) ? s.join("|") : s;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Set cached classes with LRU eviction
|
|
182
|
+
*/
|
|
183
|
+
setCachedClasses(s, e) {
|
|
184
|
+
if (this.cacheSize(this.classCache) >= this.config.maxCacheSize) {
|
|
185
|
+
const t = this.cacheKeys(this.classCache), a = Array.isArray(t) ? t[0] : t.next().value;
|
|
186
|
+
a !== void 0 && this.cacheDelete(this.classCache, a);
|
|
187
|
+
}
|
|
188
|
+
this.cacheSet(this.classCache, s, e);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const l = new p();
|
|
192
|
+
function b(i) {
|
|
193
|
+
l.updateConfig(i);
|
|
194
|
+
}
|
|
195
|
+
function w() {
|
|
196
|
+
return l.getConfig();
|
|
197
|
+
}
|
|
198
|
+
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 {
|
|
200
|
+
constructor() {
|
|
201
|
+
S(this, "cssClassManager", l);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Process CSS classes from props and integrate with component classes
|
|
205
|
+
*/
|
|
206
|
+
processComponentClasses(s, e = []) {
|
|
207
|
+
if (!s.css)
|
|
208
|
+
return e;
|
|
209
|
+
const t = this.cssClassManager.processClasses(s.css);
|
|
210
|
+
return this.cssClassManager.combineClasses(e, t);
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Create class string for DOM nodes - handles both static and reactive classes
|
|
214
|
+
*/
|
|
215
|
+
createClassString(s, e = []) {
|
|
216
|
+
return s.css && (n(s.css) || f(s.css)) ? h(() => this.processComponentClasses(s, e).join(" ")) : this.processComponentClasses(s, e).join(" ");
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Create class array for components that need array format
|
|
220
|
+
*/
|
|
221
|
+
createClassArray(s, e = []) {
|
|
222
|
+
return s.css && n(s.css) ? h(() => this.processComponentClasses(s, e)) : this.processComponentClasses(s, e);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Validate CSS classes for development warnings
|
|
226
|
+
*/
|
|
227
|
+
validateCSSClasses(s) {
|
|
228
|
+
if (process.env.NODE_ENV !== "development" || !s.css)
|
|
229
|
+
return;
|
|
230
|
+
const e = s.css;
|
|
231
|
+
if (typeof e == "string" || Array.isArray(e) || n(e) || console.warn("[tachUI] css must be a string, array of strings, or signal. Got:", typeof e), Array.isArray(e)) {
|
|
232
|
+
const a = e.filter((r) => typeof r != "string");
|
|
233
|
+
a.length > 0 && console.warn("[tachUI] All items in css array must be strings. Invalid items:", a);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Get debug information about processed classes
|
|
238
|
+
*/
|
|
239
|
+
getClassDebugInfo(s, e = []) {
|
|
240
|
+
const t = s.css ? this.cssClassManager.processClasses(s.css) : [], a = this.processComponentClasses(s, e);
|
|
241
|
+
return {
|
|
242
|
+
base: e,
|
|
243
|
+
user: t,
|
|
244
|
+
processed: a,
|
|
245
|
+
final: a.join(" ")
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
export {
|
|
250
|
+
p as C,
|
|
251
|
+
b as a,
|
|
252
|
+
v as b,
|
|
253
|
+
l as c,
|
|
254
|
+
w as g
|
|
255
|
+
};
|
|
@@ -1,45 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TachUI Component System
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* the
|
|
4
|
+
* Core component infrastructure and utilities that provide
|
|
5
|
+
* the foundation for building reactive UI components.
|
|
6
6
|
*/
|
|
7
|
-
export type { ModifiableComponent, ModifierBuilder
|
|
7
|
+
export type { ModifiableComponent, ModifierBuilder } from '../modifiers/types';
|
|
8
8
|
export type { ComponentInstance, ComponentProps, DOMNode, } from '../runtime/types';
|
|
9
|
-
export type { BasicInputProps, BasicInputTheme, BasicInputType, } from './BasicInput';
|
|
10
|
-
export { BasicInput, BasicInputStyles, BasicInputUtils, } from './BasicInput';
|
|
11
|
-
export type { BaseGridProps, GridAlignment, GridItemConfig, GridProps, GridRowProps, LazyHGridProps, LazyVGridProps, ResponsiveGridItemConfig, } from './Grid';
|
|
12
|
-
export { BaseGridComponent, EnhancedGrid, EnhancedGridRow, EnhancedLazyHGrid, EnhancedLazyVGrid, Grid, GridCSSGenerator, GridItem, GridRow, LazyHGrid, LazyVGrid, } from './Grid';
|
|
13
|
-
export type { ButtonProps, ButtonRole, ButtonSize, ButtonState, ButtonTheme, ButtonVariant, } from './Button';
|
|
14
|
-
export { Button, ButtonStyles, defaultButtonTheme, EnhancedButton, } from './Button';
|
|
15
|
-
export type { DividerProps, DividerTheme, } from './Divider';
|
|
16
|
-
export { Divider, DividerStyles, DividerUtils, defaultDividerTheme, } from './Divider';
|
|
17
|
-
export type { FormData, BasicFormProps, ValidationError, } from './Form';
|
|
18
|
-
export { BasicFormImplementation, BasicForm, BasicFormStyles, BasicFormValidation, } from './Form';
|
|
19
|
-
export type { ImageContentMode, ImageLoadingState, ImageLoadingStrategy, ImageProps, ImageResizeMode, } from './Image';
|
|
20
|
-
export { EnhancedImage, Image, ImageContentModes, ImageStates, ImageUtils, } from './Image';
|
|
21
|
-
export type { EnhancedLinkProps, OpenURLAction, } from './EnhancedLink';
|
|
22
|
-
export { Link, LinkUtils, } from './EnhancedLink';
|
|
23
|
-
export type { ForEachProps, ForProps, ListProps, ListSection, ListStyle, SelectionMode, SwipeAction, VirtualScrollConfig, } from './List';
|
|
24
|
-
export { EnhancedList, For, ForEach, ForEachComponent, List, ListUtils, } from './List';
|
|
25
|
-
export type { MenuItem, MenuPlacement, MenuProps, MenuTheme, } from './Menu';
|
|
26
|
-
export { defaultMenuTheme, Menu, MenuStyles, MenuUtils, } from './Menu';
|
|
27
|
-
export type { PickerOption, PickerProps, } from './Picker';
|
|
28
|
-
export { EnhancedPicker, Picker, PickerStyles, PickerUtils, } from './Picker';
|
|
29
|
-
export type { ContentOffset, PullToRefreshState, ScrollBehavior, ScrollDirection, ScrollEdges, ScrollEventInfo, ScrollViewProps, } from './ScrollView';
|
|
30
|
-
export { EnhancedScrollView, ScrollView, ScrollViewUtils, } from './ScrollView';
|
|
31
|
-
export type { SectionProps } from './Section';
|
|
32
|
-
export { EnhancedSection, Section, SectionStyles, SectionWithHeader, SectionWithHeaderFooter, } from './Section';
|
|
33
|
-
export type { ShowProps } from './Show';
|
|
34
|
-
export { Show, Unless, When, } from './Show';
|
|
35
|
-
export type { SpacerProps } from './Spacer';
|
|
36
|
-
export { Spacer } from './Spacer';
|
|
37
|
-
export type { TextFormatting, TextProps, } from './Text';
|
|
38
|
-
export { Text, // Enhanced Text is now the primary Text export
|
|
39
|
-
TextFormat, TextStyles, Typography, } from './Text';
|
|
40
|
-
export type { ToggleProps } from './Toggle';
|
|
41
|
-
export { EnhancedToggle, Toggle, ToggleStyles, ToggleUtils, ToggleWithLabel, } from './Toggle';
|
|
42
9
|
export type { WrapperOptions } from './wrapper';
|
|
43
|
-
export { createModifiableComponentFactory, createReactiveWrapper,
|
|
44
|
-
Layout, VStack, withModifierSupport, withModifiers, wrapComponent, ZStack, } from './wrapper';
|
|
10
|
+
export { createModifiableComponentFactory, createReactiveWrapper, Layout, withModifierSupport, withModifiers, wrapComponent, } from './wrapper';
|
|
45
11
|
//# 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,
|
|
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"}
|