@tachui/core 0.8.23 → 0.8.24
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/dist/assets/index.js +41 -40
- package/dist/{binding-DCV5PKkK.js → binding-DCr-JHsC.js} +9 -9
- package/dist/build-tools/typegen-runner.d.ts +4 -0
- package/dist/build-tools/typegen-runner.d.ts.map +1 -1
- package/dist/cleanup-BR8UpYPX.js +61 -0
- package/dist/common.js +272 -277
- package/dist/{component-D-O9yq0P.js → component-BzvSm8rM.js} +19 -19
- package/dist/{component-base-C41K3NTe.js → component-base-Do2EdQkr.js} +32 -33
- package/dist/{component-context-B9HI2nZH.js → component-context-C7Y6Xu6h.js} +1 -1
- package/dist/components/index.js +1 -1
- package/dist/computed-CA4Cgtoe.js +407 -0
- package/dist/{concatenated-component-2Gzy5e2c.js → concatenated-component-CA54ng_j.js} +43 -44
- package/dist/css-classes/index.js +2 -2
- package/dist/{effect-BsW3fy1q.js → effect-DgNm6jk9.js} +3 -3
- package/dist/{enhanced-renderer-t9Ni2EEG.js → enhanced-renderer-D05CCloF.js} +26 -28
- package/dist/essential.js +276 -281
- package/dist/factories-B05hE6kc.js +644 -0
- package/dist/{factory-gqfMcmOy.js → factory-B1YXfgU1.js} +23 -29
- package/dist/full.d.ts +12 -0
- package/dist/full.d.ts.map +1 -0
- package/dist/full.js +436 -0
- package/dist/gradients/index.js +53 -53
- package/dist/hooks-w_FYPLjI.js +158 -0
- package/dist/{index-DL9Cys3t.js → index-CmQmIgPK.js} +220 -233
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +295 -300
- package/dist/minimal-prod.js +106 -108
- package/dist/minimal.js +97 -98
- package/dist/modifiers/base.d.ts.map +1 -1
- package/dist/modifiers/base.js +121 -120
- package/dist/modifiers/builder.js +1 -1
- package/dist/modifiers/index.js +22 -23
- package/dist/modifiers/registry.js +1 -1
- package/dist/{observed-object-p1CLdrFm.js → observed-object-DCoyucmV.js} +3 -3
- package/dist/optimization-D9t53vNJ.js +308 -0
- package/dist/{proxy-Cp0QUXME.js → proxy-B7ZIqGd0.js} +3 -3
- package/dist/reactive/index.js +87 -85
- package/dist/runtime/dom-bridge.js +15 -17
- package/dist/runtime/index.js +71 -71
- package/dist/runtime/renderer.js +10 -11
- package/dist/signal-BRoiFOO7.js +262 -0
- package/dist/{signal-list-07gNXGiW.js → signal-list-_Eid-N7_.js} +285 -176
- package/dist/state/index.js +43 -44
- package/dist/theme-D5-09a8N.js +26 -0
- package/dist/validation/index.js +24 -26
- package/dist/version.js +1 -1
- package/package.json +16 -3
- package/dist/factories-B3-rmvkB.js +0 -268
- package/dist/hooks-WGmpzYgD.js +0 -446
- package/dist/optimization-CbKNA9w4.js +0 -21
- package/dist/presets-B9x94uRn.js +0 -381
- package/dist/scheduler-DppMK9mR.js +0 -169
- package/dist/theme-CRLPHryV.js +0 -687
- package/dist/{index-JQ1sW1SK.js → index-7vhCZc7g.js} +1 -1
package/dist/state/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { p as g, C as p, c as u, o as
|
|
2
|
-
import { O as
|
|
3
|
-
import {
|
|
4
|
-
import { B as
|
|
5
|
-
import "../
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import "
|
|
9
|
-
import { d as O } from "../component-context-B9HI2nZH.js";
|
|
1
|
+
import { p as g, C as p, c as u, o as l, m, E as c } from "../observed-object-DCoyucmV.js";
|
|
2
|
+
import { O as P, e as R, a as z, i as W, b as K, d as k } from "../observed-object-DCoyucmV.js";
|
|
3
|
+
import { b as f, d as _, S as h } from "../binding-DCr-JHsC.js";
|
|
4
|
+
import { B as q, a as J, c as L, e as Q, i as X, f as Y, u as Z } from "../binding-DCr-JHsC.js";
|
|
5
|
+
import { c as te, a as ne } from "../computed-CA4Cgtoe.js";
|
|
6
|
+
import { c as re } from "../effect-DgNm6jk9.js";
|
|
7
|
+
import { d as ie } from "../signal-BRoiFOO7.js";
|
|
8
|
+
import { d as O } from "../component-context-C7Y6Xu6h.js";
|
|
10
9
|
var w = Object.defineProperty, v = (s, e, n) => e in s ? w(s, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : s[e] = n, a = (s, e, n) => v(s, typeof e != "symbol" ? e + "" : e, n);
|
|
11
10
|
class j {
|
|
12
11
|
constructor(e) {
|
|
@@ -162,7 +161,7 @@ class y {
|
|
|
162
161
|
return new Map(this.metadata);
|
|
163
162
|
}
|
|
164
163
|
}
|
|
165
|
-
function
|
|
164
|
+
function U(s) {
|
|
166
165
|
return new j(s);
|
|
167
166
|
}
|
|
168
167
|
const d = class i {
|
|
@@ -202,10 +201,10 @@ const d = class i {
|
|
|
202
201
|
};
|
|
203
202
|
a(d, "instance");
|
|
204
203
|
let o = d;
|
|
205
|
-
function
|
|
204
|
+
function N(s, e) {
|
|
206
205
|
o.getInstance().register(s, e);
|
|
207
206
|
}
|
|
208
|
-
function
|
|
207
|
+
function V(s) {
|
|
209
208
|
o.getInstance().unregister(s);
|
|
210
209
|
}
|
|
211
210
|
function M(s) {
|
|
@@ -217,7 +216,7 @@ function E() {
|
|
|
217
216
|
function I() {
|
|
218
217
|
return o.getInstance().getDebugInfo();
|
|
219
218
|
}
|
|
220
|
-
function
|
|
219
|
+
function x() {
|
|
221
220
|
if (typeof window < "u" && process.env.NODE_ENV === "development") {
|
|
222
221
|
const s = window.__TACHUI_DEBUG__ || {};
|
|
223
222
|
s.stateManagers = {
|
|
@@ -229,8 +228,8 @@ function $() {
|
|
|
229
228
|
);
|
|
230
229
|
}
|
|
231
230
|
}
|
|
232
|
-
const
|
|
233
|
-
function
|
|
231
|
+
const A = g;
|
|
232
|
+
function $(s) {
|
|
234
233
|
return console.warn("useEnvironmentObject is deprecated, use EnvironmentObject instead"), c(s);
|
|
235
234
|
}
|
|
236
235
|
const D = {
|
|
@@ -263,13 +262,13 @@ const D = {
|
|
|
263
262
|
}
|
|
264
263
|
return null;
|
|
265
264
|
}
|
|
266
|
-
},
|
|
265
|
+
}, G = {
|
|
267
266
|
State: h,
|
|
268
267
|
EnvironmentObject: c,
|
|
269
268
|
createStateBinding: _,
|
|
270
269
|
createBinding: f,
|
|
271
|
-
makeObservable:
|
|
272
|
-
observable:
|
|
270
|
+
makeObservable: m,
|
|
271
|
+
observable: l,
|
|
273
272
|
createEnvironmentKey: O,
|
|
274
273
|
provideEnvironmentObject: g,
|
|
275
274
|
createObservableEnvironmentObject: u,
|
|
@@ -277,43 +276,43 @@ const D = {
|
|
|
277
276
|
StateUtils: D
|
|
278
277
|
};
|
|
279
278
|
export {
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
q as BindingImpl,
|
|
280
|
+
J as BindingUtils,
|
|
282
281
|
p as CommonEnvironmentKeys,
|
|
283
282
|
c as EnvironmentObject,
|
|
284
|
-
|
|
285
|
-
|
|
283
|
+
P as ObservableObjectBase,
|
|
284
|
+
R as ObservedObject,
|
|
286
285
|
h as State,
|
|
287
286
|
j as StateManagerImpl,
|
|
288
287
|
D as StateUtils,
|
|
289
288
|
f as createBinding,
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
289
|
+
te as createComputed,
|
|
290
|
+
re as createEffect,
|
|
291
|
+
L as createEnhancedBinding,
|
|
293
292
|
O as createEnvironmentKey,
|
|
294
|
-
|
|
295
|
-
|
|
293
|
+
A as createEnvironmentObjectProvider,
|
|
294
|
+
ne as createMemo,
|
|
296
295
|
u as createObservableEnvironmentObject,
|
|
297
|
-
|
|
298
|
-
|
|
296
|
+
z as createObservableStore,
|
|
297
|
+
ie as createSignal,
|
|
299
298
|
_ as createStateBinding,
|
|
300
|
-
|
|
301
|
-
|
|
299
|
+
U as createStateManager,
|
|
300
|
+
G as default,
|
|
302
301
|
E as getAllStateManagers,
|
|
303
302
|
M as getStateManager,
|
|
304
303
|
I as getStateManagerDebugInfo,
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
304
|
+
x as initializeStateDebugging,
|
|
305
|
+
Q as isBinding,
|
|
306
|
+
X as isEnhancedBinding,
|
|
307
|
+
W as isEnvironmentObject,
|
|
308
|
+
K as isObservableObject,
|
|
309
|
+
k as isObservedObject,
|
|
310
|
+
Y as isState,
|
|
311
|
+
m as makeObservable,
|
|
312
|
+
l as observable,
|
|
314
313
|
g as provideEnvironmentObject,
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
314
|
+
N as registerStateManager,
|
|
315
|
+
V as unregisterStateManager,
|
|
316
|
+
Z as unwrapValue,
|
|
317
|
+
$ as useEnvironmentObject
|
|
319
318
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { d as n } from "./signal-BRoiFOO7.js";
|
|
2
|
+
import { c as m } from "./computed-CA4Cgtoe.js";
|
|
3
|
+
const [t, o] = n("light");
|
|
4
|
+
function c() {
|
|
5
|
+
const e = t();
|
|
6
|
+
return e === "system" ? r() : e;
|
|
7
|
+
}
|
|
8
|
+
function u(e) {
|
|
9
|
+
o(e);
|
|
10
|
+
}
|
|
11
|
+
const s = m(() => {
|
|
12
|
+
const e = t();
|
|
13
|
+
return e === "system" ? r() : e;
|
|
14
|
+
});
|
|
15
|
+
function h() {
|
|
16
|
+
return s;
|
|
17
|
+
}
|
|
18
|
+
function r() {
|
|
19
|
+
return typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
h as a,
|
|
23
|
+
r as d,
|
|
24
|
+
c as g,
|
|
25
|
+
u as s
|
|
26
|
+
};
|
package/dist/validation/index.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import { i as E } from "../theme-CRLPHryV.js";
|
|
3
|
-
import "@tachui/types/reactive";
|
|
1
|
+
import { i as E } from "../signal-BRoiFOO7.js";
|
|
4
2
|
const f = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
|
|
5
3
|
function $(o) {
|
|
6
4
|
const e = `${o.packageName}:${o.componentName}`;
|
|
7
5
|
f.set(e, o), l.has(o.packageName) || l.set(o.packageName, /* @__PURE__ */ new Set()), l.get(o.packageName).add(o.componentName);
|
|
8
6
|
}
|
|
9
|
-
function
|
|
7
|
+
function X(o, e) {
|
|
10
8
|
const t = `${o}:${e}`;
|
|
11
9
|
f.delete(t);
|
|
12
10
|
const n = l.get(o);
|
|
@@ -76,7 +74,7 @@ function U(o, e) {
|
|
|
76
74
|
}
|
|
77
75
|
};
|
|
78
76
|
}
|
|
79
|
-
function
|
|
77
|
+
function Y() {
|
|
80
78
|
const o = Array.from(l.entries()).map(
|
|
81
79
|
([e, t]) => ({
|
|
82
80
|
name: e,
|
|
@@ -88,24 +86,24 @@ function te() {
|
|
|
88
86
|
packages: o
|
|
89
87
|
};
|
|
90
88
|
}
|
|
91
|
-
function
|
|
89
|
+
function ee(o, e, t) {
|
|
92
90
|
const n = k(o, e);
|
|
93
91
|
n && n.validate && n.validate(t);
|
|
94
92
|
}
|
|
95
|
-
function
|
|
93
|
+
function te(o, e) {
|
|
96
94
|
return f.has(`${o}:${e}`);
|
|
97
95
|
}
|
|
98
|
-
function
|
|
96
|
+
function oe() {
|
|
99
97
|
return Array.from(l.keys());
|
|
100
98
|
}
|
|
101
|
-
function
|
|
99
|
+
function ne(o) {
|
|
102
100
|
const e = l.get(o);
|
|
103
101
|
return e ? Array.from(e) : [];
|
|
104
102
|
}
|
|
105
|
-
function
|
|
103
|
+
function ie() {
|
|
106
104
|
f.clear(), l.clear(), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && console.info("🔍 Cleared all plugin validators");
|
|
107
105
|
}
|
|
108
|
-
const
|
|
106
|
+
const re = {
|
|
109
107
|
/**
|
|
110
108
|
* Register a simple plugin with basic validation
|
|
111
109
|
*/
|
|
@@ -608,7 +606,7 @@ const C = class V {
|
|
|
608
606
|
};
|
|
609
607
|
J(C, "instance");
|
|
610
608
|
let G = C;
|
|
611
|
-
const
|
|
609
|
+
const ae = G.getInstance(), se = {
|
|
612
610
|
startSession: (o) => "stub-session",
|
|
613
611
|
endSession: () => null,
|
|
614
612
|
logEvent: (o, e, t) => {
|
|
@@ -682,7 +680,7 @@ const K = {
|
|
|
682
680
|
isCIEnvironment: D,
|
|
683
681
|
isDevelopmentEnvironment: v,
|
|
684
682
|
shouldEnableValidation: y
|
|
685
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
683
|
+
}, Symbol.toStringTag, { value: "Module" })), le = {
|
|
686
684
|
/**
|
|
687
685
|
* Log all validation rules including all phase enhancements
|
|
688
686
|
*/
|
|
@@ -781,7 +779,7 @@ Developer Experience:`), console.info("• Core validation and error reporting")
|
|
|
781
779
|
return console.error("Failed to gather complete validation stats:", o), { error: o instanceof Error ? o.message : String(o) };
|
|
782
780
|
}
|
|
783
781
|
}
|
|
784
|
-
},
|
|
782
|
+
}, ce = {
|
|
785
783
|
/**
|
|
786
784
|
* Development mode with full validation
|
|
787
785
|
*/
|
|
@@ -836,31 +834,31 @@ export {
|
|
|
836
834
|
K as BuildTimeDevTools,
|
|
837
835
|
w as ComponentLifecycleTracker,
|
|
838
836
|
A as LifecycleValidationUtils,
|
|
839
|
-
|
|
837
|
+
re as PluginValidationHelper,
|
|
840
838
|
s as ProductionModeManager,
|
|
841
839
|
B as ProductionUtils,
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
840
|
+
se as ValidationDebugUtils,
|
|
841
|
+
le as ValidationDevTools,
|
|
842
|
+
ce as ValidationSetup,
|
|
843
|
+
ie as clearAllValidators,
|
|
846
844
|
q as createProductionOptimizedFunction,
|
|
847
845
|
T as detectBuildEnvironment,
|
|
848
846
|
k as getComponentValidator,
|
|
849
847
|
Z as getEnvironmentConfig,
|
|
850
|
-
|
|
848
|
+
ne as getPackageComponents,
|
|
851
849
|
b as getPrimaryBuildTool,
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
850
|
+
oe as getRegisteredPackages,
|
|
851
|
+
Y as getValidationStats,
|
|
852
|
+
te as hasValidator,
|
|
855
853
|
D as isCIEnvironment,
|
|
856
854
|
v as isDevelopmentEnvironment,
|
|
857
855
|
u as lifecycleTracker,
|
|
858
856
|
$ as registerComponentValidator,
|
|
859
857
|
N as registerPluginValidation,
|
|
860
858
|
y as shouldEnableValidation,
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
859
|
+
X as unregisterComponentValidator,
|
|
860
|
+
ee as validateComponent,
|
|
861
|
+
ae as validationDebugger,
|
|
864
862
|
x as withProductionOptimization,
|
|
865
863
|
z as withProductionOptimizedModifier
|
|
866
864
|
};
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachui/core",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.24",
|
|
4
4
|
"description": "tachUI core framework with reactive system and compiler",
|
|
5
5
|
"homepage": "https://tachui.dev/",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
7
8
|
"main": "./dist/index.js",
|
|
8
9
|
"module": "./dist/index.js",
|
|
9
10
|
"types": "./dist/index.d.ts",
|
|
@@ -12,6 +13,10 @@
|
|
|
12
13
|
"types": "./dist/index.d.ts",
|
|
13
14
|
"import": "./dist/index.js"
|
|
14
15
|
},
|
|
16
|
+
"./full": {
|
|
17
|
+
"types": "./dist/full.d.ts",
|
|
18
|
+
"import": "./dist/full.js"
|
|
19
|
+
},
|
|
15
20
|
"./minimal": {
|
|
16
21
|
"types": "./dist/minimal.d.ts",
|
|
17
22
|
"import": "./dist/minimal.js"
|
|
@@ -64,10 +69,18 @@
|
|
|
64
69
|
"types": "./dist/build-plugins/index.d.ts",
|
|
65
70
|
"import": "./dist/build-plugins/index.js"
|
|
66
71
|
},
|
|
72
|
+
"./build-tools": {
|
|
73
|
+
"types": "./dist/build-plugins/index.d.ts",
|
|
74
|
+
"import": "./dist/build-plugins/index.js"
|
|
75
|
+
},
|
|
67
76
|
"./build-plugins/modifier-types": {
|
|
68
77
|
"types": "./dist/build-plugins/modifier-types.d.ts",
|
|
69
78
|
"import": "./dist/build-plugins/modifier-types.js"
|
|
70
79
|
},
|
|
80
|
+
"./build-tools/modifier-types": {
|
|
81
|
+
"types": "./dist/build-plugins/modifier-types.d.ts",
|
|
82
|
+
"import": "./dist/build-plugins/modifier-types.js"
|
|
83
|
+
},
|
|
71
84
|
"./runtime/types": {
|
|
72
85
|
"types": "./dist/runtime/types.d.ts",
|
|
73
86
|
"import": "./dist/runtime/types.js"
|
|
@@ -141,8 +154,8 @@
|
|
|
141
154
|
"dist"
|
|
142
155
|
],
|
|
143
156
|
"dependencies": {
|
|
144
|
-
"@tachui/types": "0.8.
|
|
145
|
-
"@tachui/registry": "0.8.
|
|
157
|
+
"@tachui/types": "0.8.24",
|
|
158
|
+
"@tachui/registry": "0.8.24"
|
|
146
159
|
},
|
|
147
160
|
"devDependencies": {
|
|
148
161
|
"@types/jsdom": "^21.1.6",
|
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
import "./scheduler-DppMK9mR.js";
|
|
2
|
-
import { i as m } from "./theme-CRLPHryV.js";
|
|
3
|
-
import "@tachui/types/reactive";
|
|
4
|
-
import { c as d } from "./effect-BsW3fy1q.js";
|
|
5
|
-
import { BaseModifier as C } from "./modifiers/base.js";
|
|
6
|
-
var g = Object.defineProperty, v = (e, t, s) => t in e ? g(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, M = (e, t, s) => v(e, typeof t != "symbol" ? t + "" : t, s);
|
|
7
|
-
const b = {
|
|
8
|
-
/**
|
|
9
|
-
* Check if a value is a reactive signal
|
|
10
|
-
*/
|
|
11
|
-
isReactive(e) {
|
|
12
|
-
return m(e);
|
|
13
|
-
},
|
|
14
|
-
/**
|
|
15
|
-
* Resolve a potentially reactive value
|
|
16
|
-
*/
|
|
17
|
-
resolveValue(e) {
|
|
18
|
-
return m(e) ? e() : e;
|
|
19
|
-
},
|
|
20
|
-
/**
|
|
21
|
-
* Create a reactive effect for a value
|
|
22
|
-
*/
|
|
23
|
-
createReactiveEffect(e, t) {
|
|
24
|
-
if (m(e)) {
|
|
25
|
-
const s = d(() => {
|
|
26
|
-
const n = e();
|
|
27
|
-
t(n);
|
|
28
|
-
});
|
|
29
|
-
return () => s.dispose();
|
|
30
|
-
}
|
|
31
|
-
return null;
|
|
32
|
-
},
|
|
33
|
-
/**
|
|
34
|
-
* Merge modifier properties
|
|
35
|
-
*/
|
|
36
|
-
mergeProperties(e, t) {
|
|
37
|
-
const s = { ...e };
|
|
38
|
-
for (const [n, o] of Object.entries(t))
|
|
39
|
-
o !== void 0 && (s[n] = o);
|
|
40
|
-
return s;
|
|
41
|
-
},
|
|
42
|
-
/**
|
|
43
|
-
* Convert a CSS property name to camelCase
|
|
44
|
-
*/
|
|
45
|
-
toCamelCase(e) {
|
|
46
|
-
return e.replace(
|
|
47
|
-
/-([a-z])/g,
|
|
48
|
-
(t, s) => s.toUpperCase()
|
|
49
|
-
);
|
|
50
|
-
},
|
|
51
|
-
/**
|
|
52
|
-
* Convert a camelCase property to CSS kebab-case
|
|
53
|
-
*/
|
|
54
|
-
toKebabCase(e) {
|
|
55
|
-
return e.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
56
|
-
},
|
|
57
|
-
/**
|
|
58
|
-
* Normalize a CSS value
|
|
59
|
-
*/
|
|
60
|
-
normalizeCSSValue(e) {
|
|
61
|
-
return typeof e == "number" ? `${e}px` : typeof e == "string" ? e : String(e);
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
function c(e, t, s) {
|
|
65
|
-
class n extends C {
|
|
66
|
-
constructor() {
|
|
67
|
-
super(...arguments), M(this, "type", e), M(this, "priority", t);
|
|
68
|
-
}
|
|
69
|
-
apply(r, i) {
|
|
70
|
-
return s(r, i, this.properties);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return (o) => new n(o);
|
|
74
|
-
}
|
|
75
|
-
function j(e, t, s = 100) {
|
|
76
|
-
return c(e, s, (n, o, r) => {
|
|
77
|
-
if (o.element instanceof HTMLElement) {
|
|
78
|
-
const i = t(r);
|
|
79
|
-
Object.assign(o.element.style, i);
|
|
80
|
-
}
|
|
81
|
-
return n;
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
function A(e, t, s = 100) {
|
|
85
|
-
return () => c(e, s, (n, o) => (o.element instanceof HTMLElement && Object.assign(o.element.style, t), n))({});
|
|
86
|
-
}
|
|
87
|
-
function O(e, ...t) {
|
|
88
|
-
return console.warn("createComponentVariant is not yet implemented"), e;
|
|
89
|
-
}
|
|
90
|
-
function V(e, t = "combined", s = 999) {
|
|
91
|
-
return c(t, s, (n, o, r) => {
|
|
92
|
-
let i = n;
|
|
93
|
-
for (const p of e) {
|
|
94
|
-
const f = p.apply(i, o);
|
|
95
|
-
f && typeof f == "object" && "type" in f && (i = f);
|
|
96
|
-
}
|
|
97
|
-
return i;
|
|
98
|
-
})({});
|
|
99
|
-
}
|
|
100
|
-
function P(e, t) {
|
|
101
|
-
return c(
|
|
102
|
-
`conditional-${t.type}`,
|
|
103
|
-
t.priority,
|
|
104
|
-
(s, n, o) => {
|
|
105
|
-
if (b.resolveValue(e))
|
|
106
|
-
return t.apply(s, n);
|
|
107
|
-
if (m(e)) {
|
|
108
|
-
const i = d(() => {
|
|
109
|
-
const p = e();
|
|
110
|
-
n.element && p && t.apply(s, n);
|
|
111
|
-
});
|
|
112
|
-
if (!s.dispose)
|
|
113
|
-
s.dispose = () => i.dispose();
|
|
114
|
-
else {
|
|
115
|
-
const p = s.dispose;
|
|
116
|
-
s.dispose = () => {
|
|
117
|
-
i.dispose(), p();
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return s;
|
|
122
|
-
}
|
|
123
|
-
)({});
|
|
124
|
-
}
|
|
125
|
-
function T(e, t) {
|
|
126
|
-
return c("state", 500, (s, n, o) => {
|
|
127
|
-
let r = s;
|
|
128
|
-
const i = (f) => {
|
|
129
|
-
const a = t[f] || [];
|
|
130
|
-
for (const y of a) {
|
|
131
|
-
const l = y.apply(r, n);
|
|
132
|
-
l && typeof l == "object" && "type" in l && (r = l);
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
i(e());
|
|
136
|
-
const p = d(() => {
|
|
137
|
-
const f = e();
|
|
138
|
-
i(f);
|
|
139
|
-
});
|
|
140
|
-
if (!s.dispose)
|
|
141
|
-
s.dispose = () => p.dispose();
|
|
142
|
-
else {
|
|
143
|
-
const f = s.dispose;
|
|
144
|
-
s.dispose = () => {
|
|
145
|
-
p.dispose(), f();
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
return r;
|
|
149
|
-
})({});
|
|
150
|
-
}
|
|
151
|
-
function z(e, t = []) {
|
|
152
|
-
return c("responsive", 100, (s, n, o) => {
|
|
153
|
-
let r = s;
|
|
154
|
-
const i = () => {
|
|
155
|
-
const a = window.innerWidth;
|
|
156
|
-
let y = t;
|
|
157
|
-
for (const [l, u] of Object.entries(e)) {
|
|
158
|
-
const w = parseInt(l);
|
|
159
|
-
a >= w && (y = u);
|
|
160
|
-
}
|
|
161
|
-
for (const l of y) {
|
|
162
|
-
const u = l.apply(r, n);
|
|
163
|
-
u && typeof u == "object" && "type" in u && (r = u);
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
i();
|
|
167
|
-
const p = () => i();
|
|
168
|
-
window.addEventListener("resize", p);
|
|
169
|
-
const f = () => window.removeEventListener("resize", p);
|
|
170
|
-
if (!s.dispose)
|
|
171
|
-
s.dispose = f;
|
|
172
|
-
else {
|
|
173
|
-
const a = s.dispose;
|
|
174
|
-
s.dispose = () => {
|
|
175
|
-
f(), a();
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
return r;
|
|
179
|
-
})({});
|
|
180
|
-
}
|
|
181
|
-
function D(e) {
|
|
182
|
-
return c("class", 50, (t, s, n) => {
|
|
183
|
-
if (!s.element) return t;
|
|
184
|
-
const o = (r) => {
|
|
185
|
-
const i = Array.isArray(r) ? r : r.split(" ").filter(Boolean);
|
|
186
|
-
s.element instanceof HTMLElement && s.element.classList.add(...i);
|
|
187
|
-
};
|
|
188
|
-
if (m(e)) {
|
|
189
|
-
let r = [];
|
|
190
|
-
const i = d(() => {
|
|
191
|
-
const p = e(), f = Array.isArray(p) ? p : p.split(" ").filter(Boolean);
|
|
192
|
-
s.element instanceof HTMLElement && (s.element.classList.remove(...r), s.element.classList.add(...f), r = f);
|
|
193
|
-
});
|
|
194
|
-
if (!t.dispose)
|
|
195
|
-
t.dispose = () => i.dispose();
|
|
196
|
-
else {
|
|
197
|
-
const p = t.dispose;
|
|
198
|
-
t.dispose = () => {
|
|
199
|
-
i.dispose(), p();
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
} else
|
|
203
|
-
o(e);
|
|
204
|
-
return t;
|
|
205
|
-
})({});
|
|
206
|
-
}
|
|
207
|
-
function H(e) {
|
|
208
|
-
return c("style", 200, (t, s, n) => {
|
|
209
|
-
if (!s.element) return t;
|
|
210
|
-
const o = (r) => {
|
|
211
|
-
if (s.element instanceof HTMLElement)
|
|
212
|
-
for (const [i, p] of Object.entries(r)) {
|
|
213
|
-
const f = b.toKebabCase(i), a = b.normalizeCSSValue(p);
|
|
214
|
-
s.element.style.setProperty(f, a);
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
if (m(e)) {
|
|
218
|
-
const r = d(() => {
|
|
219
|
-
const i = e();
|
|
220
|
-
o(i);
|
|
221
|
-
});
|
|
222
|
-
if (!t.dispose)
|
|
223
|
-
t.dispose = () => r.dispose();
|
|
224
|
-
else {
|
|
225
|
-
const i = t.dispose;
|
|
226
|
-
t.dispose = () => {
|
|
227
|
-
r.dispose(), i();
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
} else
|
|
231
|
-
o(e);
|
|
232
|
-
return t;
|
|
233
|
-
})({});
|
|
234
|
-
}
|
|
235
|
-
function R(e) {
|
|
236
|
-
return c("event", 300, (t, s, n) => {
|
|
237
|
-
if (!s.element) return t;
|
|
238
|
-
const o = [];
|
|
239
|
-
for (const [i, p] of Object.entries(e))
|
|
240
|
-
s.element.addEventListener(i, p), o.push(() => {
|
|
241
|
-
s.element?.removeEventListener(i, p);
|
|
242
|
-
});
|
|
243
|
-
const r = () => o.forEach((i) => i());
|
|
244
|
-
if (!t.dispose)
|
|
245
|
-
t.dispose = r;
|
|
246
|
-
else {
|
|
247
|
-
const i = t.dispose;
|
|
248
|
-
t.dispose = () => {
|
|
249
|
-
r(), i();
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
return t;
|
|
253
|
-
})({});
|
|
254
|
-
}
|
|
255
|
-
export {
|
|
256
|
-
j as a,
|
|
257
|
-
A as b,
|
|
258
|
-
c,
|
|
259
|
-
O as d,
|
|
260
|
-
V as e,
|
|
261
|
-
P as f,
|
|
262
|
-
D as g,
|
|
263
|
-
H as h,
|
|
264
|
-
R as i,
|
|
265
|
-
b as m,
|
|
266
|
-
z as r,
|
|
267
|
-
T as s
|
|
268
|
-
};
|