@tachui/core 0.8.23 → 0.8.25

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 (56) 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-Bz6LZlk6.js +653 -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 +188 -181
  32. package/dist/modifiers/builder.js +1 -1
  33. package/dist/modifiers/factories.d.ts.map +1 -1
  34. package/dist/modifiers/index.js +22 -23
  35. package/dist/modifiers/registry.js +1 -1
  36. package/dist/{observed-object-p1CLdrFm.js → observed-object-DCoyucmV.js} +3 -3
  37. package/dist/optimization-D9t53vNJ.js +308 -0
  38. package/dist/{proxy-Cp0QUXME.js → proxy-B7ZIqGd0.js} +3 -3
  39. package/dist/reactive/index.js +87 -85
  40. package/dist/runtime/dom-bridge.js +15 -17
  41. package/dist/runtime/index.js +71 -71
  42. package/dist/runtime/renderer.js +10 -11
  43. package/dist/signal-BRoiFOO7.js +262 -0
  44. package/dist/{signal-list-07gNXGiW.js → signal-list-_Eid-N7_.js} +285 -176
  45. package/dist/state/index.js +43 -44
  46. package/dist/theme-D5-09a8N.js +26 -0
  47. package/dist/validation/index.js +24 -26
  48. package/dist/version.js +1 -1
  49. package/package.json +16 -3
  50. package/dist/factories-B3-rmvkB.js +0 -268
  51. package/dist/hooks-WGmpzYgD.js +0 -446
  52. package/dist/optimization-CbKNA9w4.js +0 -21
  53. package/dist/presets-B9x94uRn.js +0 -381
  54. package/dist/scheduler-DppMK9mR.js +0 -169
  55. package/dist/theme-CRLPHryV.js +0 -687
  56. package/dist/{index-JQ1sW1SK.js → index-7vhCZc7g.js} +1 -1
@@ -1,33 +1,33 @@
1
- import { h as t, C as n, P as o, R as r, d as s, j as m, c as i, e as C, i as c, a as l, f as p, k as u, l as g, g as d, p as M, w as E } from "../component-D-O9yq0P.js";
2
- import { C as x, a as R, E as h, c as v, b as D, d as O, g as A, p as b, r as w, s as I, w as y } from "../component-context-B9HI2nZH.js";
3
- import { A as L, C as T, D as P, F as V, I as j, c as F, a as _, b as k, d as B, g as G, i as N, m as U, o as q, e as W, f as z, h as H, j as K, s as Y, k as J, u as Q, l as X, n as Z, p as $, w as ee, q as ae } from "../hooks-WGmpzYgD.js";
4
- import { DOMBridgeDebug as ne, getComponentFromElement as oe, mountComponentChildren as re, mountComponentTree as se, mountRoot as me, unmountComponent as ie, unmountComponentEnhanced as Ce, updateComponent as ce } from "./dom-bridge.js";
5
- import { L as pe, l as ue, b as ge, m as de, u as Me, a as Ee } from "../optimization-CbKNA9w4.js";
6
- import { C as xe, D as Re, k as he, E as ve, S as De, q as Oe, V as Ae, v as be, l as we, o as Ie, n as ye, g as Se, w as Le, i as Te, h as Pe, x as Ve, p as je, r as Fe, f as _e, u as ke, j as Be, t as Ge } from "../concatenated-component-2Gzy5e2c.js";
1
+ import { g as t, C as n, P as o, R as r, c as s, h as m, a as i, b as C, i as c, d as p, e as u, j as l, k as g, f as d, p as M, w as f } from "../component-BzvSm8rM.js";
2
+ import { C as x, a as R, E as h, c as v, b as D, d as O, g as A, p as b, r as w, s as y, w as I } from "../component-context-C7Y6Xu6h.js";
3
+ import { C as L, D as T, I as P, L as V, c as F, a as _, b as j, d as k, g as B, i as G, l as N, h as U, m as W, e as q, f as z, u as H, w as K } from "../optimization-D9t53vNJ.js";
4
+ import { DOMBridgeDebug as J, getComponentFromElement as Q, mountComponentChildren as X, mountComponentTree as Z, mountRoot as $, unmountComponent as ee, unmountComponentEnhanced as ae, updateComponent as te } from "./dom-bridge.js";
5
+ import { j as oe, D as re, l as se, E as me, S as ie, u as Ce, V as ce, w as pe, n as ue, q as le, o as ge, g as de, x as Me, i as fe, h as Ee, y as xe, p as Re, r as he, f as ve, v as De, k as Oe, t as Ae } from "../concatenated-component-CA54ng_j.js";
6
+ import { A as we, F as ye, m as Ie, o as Se, a as Le, b as Te, c as Pe, d as Ve, s as Fe, e as _e, u as je, w as ke, f as Be, g as Ge } from "../hooks-w_FYPLjI.js";
7
7
  export {
8
- L as AnimationManager,
9
- xe as COMPONENT_ELIGIBILITY,
8
+ we as AnimationManager,
9
+ oe as COMPONENT_ELIGIBILITY,
10
10
  t as ChildrenManager,
11
11
  x as ComponentContextDebug,
12
12
  R as ComponentContextSymbol,
13
13
  n as ComponentManager,
14
- T as ContextManager,
15
- P as DIContainer,
16
- ne as DOMBridgeDebug,
17
- Re as DOMRenderer,
18
- he as ElementTagValidator,
14
+ L as ContextManager,
15
+ T as DIContainer,
16
+ J as DOMBridgeDebug,
17
+ re as DOMRenderer,
18
+ se as ElementTagValidator,
19
19
  h as EnvironmentSymbol,
20
- ve as EventDelegator,
21
- V as FocusManager,
22
- j as Injectable,
23
- pe as LifecycleManager,
20
+ me as EventDelegator,
21
+ ye as FocusManager,
22
+ P as Injectable,
23
+ V as LifecycleManager,
24
24
  o as PropsManager,
25
25
  r as RefManager,
26
- De as SEMANTIC_TAG_ROLES,
27
- Oe as SemanticRoleManager,
28
- Ae as VALID_HTML_TAGS,
29
- be as applySemanticAttributes,
30
- we as configureElementOverrides,
26
+ ie as SEMANTIC_TAG_ROLES,
27
+ Ce as SemanticRoleManager,
28
+ ce as VALID_HTML_TAGS,
29
+ pe as applySemanticAttributes,
30
+ ue as configureElementOverrides,
31
31
  v as consumeEnvironmentValue,
32
32
  F as contextUtils,
33
33
  s as createAdvancedComponent,
@@ -35,62 +35,62 @@ export {
35
35
  i as createComponent,
36
36
  D as createComponentContext,
37
37
  _ as createContext,
38
- k as createContextConsumer,
39
- Ie as createElementOverrideValidator,
38
+ j as createContextConsumer,
39
+ le as createElementOverrideValidator,
40
40
  O as createEnvironmentKey,
41
41
  C as createFragment,
42
42
  c as createPropsManager,
43
- l as createReactiveComponent,
44
- p as createRef,
45
- u as createRefManager,
43
+ p as createReactiveComponent,
44
+ u as createRef,
45
+ l as createRefManager,
46
46
  g as defaultChildrenRenderer,
47
- B as defaultContextManager,
47
+ k as defaultContextManager,
48
48
  d as forwardRef,
49
- oe as getComponentFromElement,
49
+ Q as getComponentFromElement,
50
50
  A as getCurrentComponentContext,
51
- ye as getElementOverrideConfig,
52
- Se as getRendererMetrics,
53
- Le as getSemanticRole,
54
- G as globalDI,
55
- Te as globalEventDelegator,
56
- Pe as h,
57
- Ve as hasAutoARIA,
58
- N as inject,
59
- ue as lazy,
60
- ge as memo,
61
- U as migrateFromSetTimeout,
62
- de as mount,
63
- re as mountComponentChildren,
64
- se as mountComponentTree,
65
- me as mountRoot,
66
- q as onDOMError,
67
- W as onDOMReady,
68
- z as onError,
69
- H as onMount,
70
- K as onUnmount,
71
- je as processElementOverride,
51
+ ge as getElementOverrideConfig,
52
+ de as getRendererMetrics,
53
+ Me as getSemanticRole,
54
+ B as globalDI,
55
+ fe as globalEventDelegator,
56
+ Ee as h,
57
+ xe as hasAutoARIA,
58
+ G as inject,
59
+ N as lazy,
60
+ U as memo,
61
+ Ie as migrateFromSetTimeout,
62
+ W as mount,
63
+ X as mountComponentChildren,
64
+ Z as mountComponentTree,
65
+ $ as mountRoot,
66
+ Se as onDOMError,
67
+ Le as onDOMReady,
68
+ Te as onError,
69
+ Pe as onMount,
70
+ Ve as onUnmount,
71
+ Re as processElementOverride,
72
72
  M as propsUtils,
73
73
  b as provideEnvironmentValue,
74
- Fe as renderComponent,
75
- _e as resetRendererMetrics,
74
+ he as renderComponent,
75
+ ve as resetRendererMetrics,
76
76
  w as runWithComponentContext,
77
- ke as semanticRoleManager,
78
- I as setCurrentComponentContext,
79
- Y as setupOutsideClickDetection,
80
- J as setupPositioning,
81
- Be as shouldWarnOnOverride,
82
- Ge as text,
83
- Me as unmount,
84
- ie as unmountComponent,
85
- Ce as unmountComponentEnhanced,
86
- ce as updateComponent,
87
- Ee as updateProps,
88
- Q as useContext,
89
- X as useLifecycle,
90
- y as withComponentContext,
91
- Z as withDOMAccess,
92
- $ as withErrorBoundary,
93
- E as withLifecycle,
94
- ee as withProvider,
95
- ae as withReactiveAsset
77
+ De as semanticRoleManager,
78
+ y as setCurrentComponentContext,
79
+ Fe as setupOutsideClickDetection,
80
+ _e as setupPositioning,
81
+ Oe as shouldWarnOnOverride,
82
+ Ae as text,
83
+ q as unmount,
84
+ ee as unmountComponent,
85
+ ae as unmountComponentEnhanced,
86
+ te as updateComponent,
87
+ z as updateProps,
88
+ H as useContext,
89
+ je as useLifecycle,
90
+ I as withComponentContext,
91
+ ke as withDOMAccess,
92
+ Be as withErrorBoundary,
93
+ f as withLifecycle,
94
+ K as withProvider,
95
+ Ge as withReactiveAsset
96
96
  };
@@ -1,13 +1,12 @@
1
- import { D as m, g as n, h as p, r as a, f as d, t as M } from "../concatenated-component-2Gzy5e2c.js";
2
- import "../scheduler-DppMK9mR.js";
3
- import "../theme-CRLPHryV.js";
4
- import "../effect-BsW3fy1q.js";
5
- import "@tachui/types/reactive";
1
+ import { D as n, g as a, h as i, r as m, f as p, t as d } from "../concatenated-component-CA54ng_j.js";
2
+ import "../computed-CA4Cgtoe.js";
3
+ import "../signal-BRoiFOO7.js";
4
+ import "../effect-DgNm6jk9.js";
6
5
  export {
7
- m as DOMRenderer,
8
- n as getRendererMetrics,
9
- p as h,
10
- a as renderComponent,
11
- d as resetRendererMetrics,
12
- M as text
6
+ n as DOMRenderer,
7
+ a as getRendererMetrics,
8
+ i as h,
9
+ m as renderComponent,
10
+ p as resetRendererMetrics,
11
+ d as text
13
12
  };
@@ -0,0 +1,262 @@
1
+ import { ComputationState as i } from "@tachui/types/reactive";
2
+ var w = Object.defineProperty, C = (e, t, r) => t in e ? w(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, s = (e, t, r) => C(e, typeof t != "symbol" ? t + "" : t, r);
3
+ let f = 0, d = 0;
4
+ const m = Math.random().toString(36).substr(2, 6);
5
+ let l = null, h = null, p = !1;
6
+ const g = /* @__PURE__ */ new Set();
7
+ g.add(m);
8
+ const n = {
9
+ get currentComputation() {
10
+ return l;
11
+ },
12
+ set currentComputation(e) {
13
+ l = e;
14
+ },
15
+ get currentOwner() {
16
+ return h;
17
+ },
18
+ set currentOwner(e) {
19
+ h = e;
20
+ },
21
+ get isBatching() {
22
+ return p;
23
+ },
24
+ set isBatching(e) {
25
+ p = e;
26
+ }
27
+ };
28
+ function O() {
29
+ return n.currentComputation;
30
+ }
31
+ function M() {
32
+ return n.currentOwner;
33
+ }
34
+ function y() {
35
+ return n.isBatching;
36
+ }
37
+ class _ {
38
+ constructor(t = null) {
39
+ s(this, "id"), s(this, "parent"), s(this, "context", /* @__PURE__ */ new Map()), s(this, "cleanups", []), s(this, "sources", /* @__PURE__ */ new Set()), s(this, "disposed", !1), this.id = ++d, this.parent = t;
40
+ }
41
+ dispose() {
42
+ if (!this.disposed) {
43
+ this.disposed = !0;
44
+ for (const t of this.sources)
45
+ t.dispose();
46
+ this.sources.clear();
47
+ for (const t of this.cleanups)
48
+ try {
49
+ t();
50
+ } catch (r) {
51
+ console.error("Error in cleanup function:", r);
52
+ }
53
+ this.cleanups.length = 0, this.parent && !this.parent.disposed && this.parent.sources.delete(this);
54
+ }
55
+ }
56
+ }
57
+ class S {
58
+ constructor(t, r = null) {
59
+ s(this, "id"), s(this, "owner"), s(this, "fn"), s(this, "sources", /* @__PURE__ */ new Set()), s(this, "observers", /* @__PURE__ */ new Set()), s(this, "state", i.Dirty), s(this, "value"), this.id = ++f, this.fn = t, this.owner = r, r && !r.disposed && r.sources.add(this);
60
+ }
61
+ execute() {
62
+ if (this.state === i.Disposed)
63
+ return this.value;
64
+ for (const r of this.sources)
65
+ r && typeof r == "object" && "removeObserver" in r && r.removeObserver(this);
66
+ this.sources.clear();
67
+ const t = n.currentComputation;
68
+ n.currentComputation = this;
69
+ try {
70
+ return this.state = i.Clean, this.value = this.fn(), this.value;
71
+ } catch (r) {
72
+ throw this.state = i.Disposed, (typeof process > "u" || process.env.NODE_ENV !== "test") && console.error("Error in computation:", r), r;
73
+ } finally {
74
+ n.currentComputation = t;
75
+ }
76
+ }
77
+ dispose() {
78
+ if (this.state !== i.Disposed) {
79
+ this.state = i.Disposed;
80
+ for (const t of this.sources)
81
+ t && typeof t == "object" && "removeObserver" in t && t.removeObserver(this);
82
+ this.sources.clear();
83
+ for (const t of this.observers)
84
+ t.sources.delete(this);
85
+ this.observers.clear(), this.owner && !this.owner.disposed && this.owner.sources.delete(this);
86
+ }
87
+ }
88
+ }
89
+ function U(e) {
90
+ const t = new _(n.currentOwner), r = n.currentOwner;
91
+ n.currentOwner = t;
92
+ try {
93
+ return e(() => t.dispose());
94
+ } finally {
95
+ n.currentOwner = r;
96
+ }
97
+ }
98
+ function N(e, t) {
99
+ const r = n.currentOwner;
100
+ n.currentOwner = e;
101
+ try {
102
+ return t();
103
+ } finally {
104
+ n.currentOwner = r;
105
+ }
106
+ }
107
+ function $() {
108
+ return n.currentOwner;
109
+ }
110
+ let c = null;
111
+ function B(e) {
112
+ c = e;
113
+ }
114
+ function j(e) {
115
+ if (n.isBatching)
116
+ return e();
117
+ const t = n.isBatching;
118
+ n.isBatching = !0;
119
+ try {
120
+ const r = e();
121
+ return !t && c && c(), r;
122
+ } finally {
123
+ n.isBatching = t;
124
+ }
125
+ }
126
+ function z(e) {
127
+ const t = n.currentComputation;
128
+ n.currentComputation = null;
129
+ try {
130
+ return e();
131
+ } finally {
132
+ n.currentComputation = t;
133
+ }
134
+ }
135
+ function A(e, t) {
136
+ const r = new S(
137
+ e,
138
+ t || n.currentOwner
139
+ );
140
+ return r.execute(), r;
141
+ }
142
+ function R() {
143
+ return {
144
+ computation: n.currentComputation,
145
+ batch: n.isBatching
146
+ };
147
+ }
148
+ const q = {
149
+ getCurrentComputation: () => n.currentComputation,
150
+ getCurrentOwner: () => n.currentOwner,
151
+ getComputationCount: () => f,
152
+ getOwnerCount: () => d,
153
+ isBatching: () => n.isBatching,
154
+ getModuleInstances: () => Array.from(g),
155
+ getModuleId: () => m
156
+ };
157
+ var D = Object.defineProperty, I = (e, t, r) => t in e ? D(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, a = (e, t, r) => I(e, typeof t != "symbol" ? t + "" : t, r);
158
+ let x = 0;
159
+ class P {
160
+ constructor(t) {
161
+ a(this, "id"), a(this, "observers", /* @__PURE__ */ new Set()), a(this, "_value"), this.id = ++x, this._value = t;
162
+ }
163
+ /**
164
+ * Get the current value and track dependency
165
+ */
166
+ getValue() {
167
+ const t = O();
168
+ return t && t.state !== i.Disposed && (this.observers.add(t), t.sources.add(this)), this._value;
169
+ }
170
+ /**
171
+ * Get the current value without tracking dependency
172
+ */
173
+ peek() {
174
+ return this._value;
175
+ }
176
+ /**
177
+ * Set a new value and notify observers
178
+ */
179
+ set(t) {
180
+ const r = typeof t == "function" ? t(this._value) : t;
181
+ return r !== this._value && (this._value = r, this.notify()), r;
182
+ }
183
+ /**
184
+ * Notify all observers that this signal has changed
185
+ */
186
+ notify() {
187
+ for (const t of this.observers)
188
+ t.state !== i.Disposed && (t.state = i.Dirty, F(t));
189
+ }
190
+ /**
191
+ * Remove an observer (cleanup)
192
+ */
193
+ removeObserver(t) {
194
+ this.observers.delete(t);
195
+ }
196
+ /**
197
+ * Get debug information about this signal
198
+ */
199
+ [Symbol.for("tachui.debug")]() {
200
+ return {
201
+ id: this.id,
202
+ value: this._value,
203
+ observerCount: this.observers.size,
204
+ type: "Signal"
205
+ };
206
+ }
207
+ }
208
+ const o = /* @__PURE__ */ new Set();
209
+ let u = !1;
210
+ function F(e) {
211
+ o.add(e), !u && !y() && queueMicrotask(v);
212
+ }
213
+ function v() {
214
+ if (!u) {
215
+ u = !0;
216
+ try {
217
+ for (; o.size > 0; ) {
218
+ const e = Array.from(o).sort((t, r) => t.id - r.id);
219
+ o.clear();
220
+ for (const t of e)
221
+ t.state === i.Dirty && t.execute();
222
+ }
223
+ } finally {
224
+ u = !1;
225
+ }
226
+ }
227
+ }
228
+ function G(e) {
229
+ const t = new P(e), r = t.getValue.bind(t);
230
+ r.peek = t.peek.bind(t);
231
+ const b = t.set.bind(t);
232
+ return Object.defineProperty(r, Symbol.for("tachui.signal"), {
233
+ value: t,
234
+ enumerable: !1
235
+ }), [r, b];
236
+ }
237
+ function Q(e) {
238
+ return typeof e == "function" && Symbol.for("tachui.signal") in e;
239
+ }
240
+ function V(e) {
241
+ return e[Symbol.for("tachui.signal")] || null;
242
+ }
243
+ B(v);
244
+ export {
245
+ S as C,
246
+ q as D,
247
+ R as a,
248
+ j as b,
249
+ U as c,
250
+ G as d,
251
+ V as e,
252
+ v as f,
253
+ $ as g,
254
+ O as h,
255
+ Q as i,
256
+ M as j,
257
+ y as k,
258
+ A as l,
259
+ N as r,
260
+ B as s,
261
+ z as u
262
+ };