@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.
Files changed (55) hide show
  1. package/dist/assets/index.js +41 -40
  2. package/dist/{binding-DCV5PKkK.js → binding-DCr-JHsC.js} +9 -9
  3. package/dist/build-tools/typegen-runner.d.ts +4 -0
  4. package/dist/build-tools/typegen-runner.d.ts.map +1 -1
  5. package/dist/cleanup-BR8UpYPX.js +61 -0
  6. package/dist/common.js +272 -277
  7. package/dist/{component-D-O9yq0P.js → component-BzvSm8rM.js} +19 -19
  8. package/dist/{component-base-C41K3NTe.js → component-base-Do2EdQkr.js} +32 -33
  9. package/dist/{component-context-B9HI2nZH.js → component-context-C7Y6Xu6h.js} +1 -1
  10. package/dist/components/index.js +1 -1
  11. package/dist/computed-CA4Cgtoe.js +407 -0
  12. package/dist/{concatenated-component-2Gzy5e2c.js → concatenated-component-CA54ng_j.js} +43 -44
  13. package/dist/css-classes/index.js +2 -2
  14. package/dist/{effect-BsW3fy1q.js → effect-DgNm6jk9.js} +3 -3
  15. package/dist/{enhanced-renderer-t9Ni2EEG.js → enhanced-renderer-D05CCloF.js} +26 -28
  16. package/dist/essential.js +276 -281
  17. package/dist/factories-B05hE6kc.js +644 -0
  18. package/dist/{factory-gqfMcmOy.js → factory-B1YXfgU1.js} +23 -29
  19. package/dist/full.d.ts +12 -0
  20. package/dist/full.d.ts.map +1 -0
  21. package/dist/full.js +436 -0
  22. package/dist/gradients/index.js +53 -53
  23. package/dist/hooks-w_FYPLjI.js +158 -0
  24. package/dist/{index-DL9Cys3t.js → index-CmQmIgPK.js} +220 -233
  25. package/dist/index.d.ts +0 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +295 -300
  28. package/dist/minimal-prod.js +106 -108
  29. package/dist/minimal.js +97 -98
  30. package/dist/modifiers/base.d.ts.map +1 -1
  31. package/dist/modifiers/base.js +121 -120
  32. package/dist/modifiers/builder.js +1 -1
  33. package/dist/modifiers/index.js +22 -23
  34. package/dist/modifiers/registry.js +1 -1
  35. package/dist/{observed-object-p1CLdrFm.js → observed-object-DCoyucmV.js} +3 -3
  36. package/dist/optimization-D9t53vNJ.js +308 -0
  37. package/dist/{proxy-Cp0QUXME.js → proxy-B7ZIqGd0.js} +3 -3
  38. package/dist/reactive/index.js +87 -85
  39. package/dist/runtime/dom-bridge.js +15 -17
  40. package/dist/runtime/index.js +71 -71
  41. package/dist/runtime/renderer.js +10 -11
  42. package/dist/signal-BRoiFOO7.js +262 -0
  43. package/dist/{signal-list-07gNXGiW.js → signal-list-_Eid-N7_.js} +285 -176
  44. package/dist/state/index.js +43 -44
  45. package/dist/theme-D5-09a8N.js +26 -0
  46. package/dist/validation/index.js +24 -26
  47. package/dist/version.js +1 -1
  48. package/package.json +16 -3
  49. package/dist/factories-B3-rmvkB.js +0 -268
  50. package/dist/hooks-WGmpzYgD.js +0 -446
  51. package/dist/optimization-CbKNA9w4.js +0 -21
  52. package/dist/presets-B9x94uRn.js +0 -381
  53. package/dist/scheduler-DppMK9mR.js +0 -169
  54. package/dist/theme-CRLPHryV.js +0 -687
  55. package/dist/{index-JQ1sW1SK.js → index-7vhCZc7g.js} +1 -1
@@ -1,12 +1,11 @@
1
- import { p as g, C as p, c as u, o as m, m as l, E as c } from "../observed-object-p1CLdrFm.js";
2
- import { O as z, e as W, a as K, i as k, b as F, d as q } from "../observed-object-p1CLdrFm.js";
3
- import { d as f, e as _, S as h } from "../binding-DCV5PKkK.js";
4
- import { B as L, b as Q, c as X, f as Y, a as Z, i as ee, u as te } from "../binding-DCV5PKkK.js";
5
- import "../scheduler-DppMK9mR.js";
6
- import { a as se, b as re, c as ae } from "../theme-CRLPHryV.js";
7
- import { c as oe } from "../effect-BsW3fy1q.js";
8
- import "@tachui/types/reactive";
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 V(s) {
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 x(s, e) {
204
+ function N(s, e) {
206
205
  o.getInstance().register(s, e);
207
206
  }
208
- function A(s) {
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 G = g;
233
- function T(s) {
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
- }, H = {
265
+ }, G = {
267
266
  State: h,
268
267
  EnvironmentObject: c,
269
268
  createStateBinding: _,
270
269
  createBinding: f,
271
- makeObservable: l,
272
- observable: m,
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
- L as BindingImpl,
281
- Q as BindingUtils,
279
+ q as BindingImpl,
280
+ J as BindingUtils,
282
281
  p as CommonEnvironmentKeys,
283
282
  c as EnvironmentObject,
284
- z as ObservableObjectBase,
285
- W as ObservedObject,
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
- se as createComputed,
291
- oe as createEffect,
292
- X as createEnhancedBinding,
289
+ te as createComputed,
290
+ re as createEffect,
291
+ L as createEnhancedBinding,
293
292
  O as createEnvironmentKey,
294
- G as createEnvironmentObjectProvider,
295
- re as createMemo,
293
+ A as createEnvironmentObjectProvider,
294
+ ne as createMemo,
296
295
  u as createObservableEnvironmentObject,
297
- K as createObservableStore,
298
- ae as createSignal,
296
+ z as createObservableStore,
297
+ ie as createSignal,
299
298
  _ as createStateBinding,
300
- V as createStateManager,
301
- H as default,
299
+ U as createStateManager,
300
+ G as default,
302
301
  E as getAllStateManagers,
303
302
  M as getStateManager,
304
303
  I as getStateManagerDebugInfo,
305
- $ as initializeStateDebugging,
306
- Y as isBinding,
307
- Z as isEnhancedBinding,
308
- k as isEnvironmentObject,
309
- F as isObservableObject,
310
- q as isObservedObject,
311
- ee as isState,
312
- l as makeObservable,
313
- m as observable,
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
- x as registerStateManager,
316
- A as unregisterStateManager,
317
- te as unwrapValue,
318
- T as useEnvironmentObject
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
+ };
@@ -1,12 +1,10 @@
1
- import "../scheduler-DppMK9mR.js";
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 ee(o, e) {
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 te() {
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 oe(o, e, t) {
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 ne(o, e) {
93
+ function te(o, e) {
96
94
  return f.has(`${o}:${e}`);
97
95
  }
98
- function ie() {
96
+ function oe() {
99
97
  return Array.from(l.keys());
100
98
  }
101
- function re(o) {
99
+ function ne(o) {
102
100
  const e = l.get(o);
103
101
  return e ? Array.from(e) : [];
104
102
  }
105
- function ae() {
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 se = {
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 le = G.getInstance(), ce = {
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" })), de = {
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
- }, ue = {
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
- se as PluginValidationHelper,
837
+ re as PluginValidationHelper,
840
838
  s as ProductionModeManager,
841
839
  B as ProductionUtils,
842
- ce as ValidationDebugUtils,
843
- de as ValidationDevTools,
844
- ue as ValidationSetup,
845
- ae as clearAllValidators,
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
- re as getPackageComponents,
848
+ ne as getPackageComponents,
851
849
  b as getPrimaryBuildTool,
852
- ie as getRegisteredPackages,
853
- te as getValidationStats,
854
- ne as hasValidator,
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
- ee as unregisterComponentValidator,
862
- oe as validateComponent,
863
- le as validationDebugger,
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
@@ -1,4 +1,4 @@
1
- const c = "@tachui/core", o = "0.8.23", n = c, t = o, s = o;
1
+ const c = "@tachui/core", o = "0.8.24", n = c, t = o, s = o;
2
2
  export {
3
3
  n as TACHUI_PACKAGE,
4
4
  t as TACHUI_PACKAGE_VERSION,
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@tachui/core",
3
- "version": "0.8.23",
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.23",
145
- "@tachui/registry": "0.8.23"
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
- };