@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,6 +1,7 @@
1
- import { A as p } from "../index-JQ1sW1SK.js";
2
- import { L as it, R as ot, k as lt } from "../index-JQ1sW1SK.js";
3
- import { J as C, K as S, k as x } from "../theme-CRLPHryV.js";
1
+ import { A as p } from "../index-7vhCZc7g.js";
2
+ import { L as ot, R as lt, k as ct } from "../index-7vhCZc7g.js";
3
+ import { g as C, a as S } from "../theme-D5-09a8N.js";
4
+ import { h as x } from "../signal-BRoiFOO7.js";
4
5
  export * from "@tachui/types/assets";
5
6
  var H = Object.defineProperty, M = (i, t, e) => t in i ? H(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, y = (i, t, e) => M(i, typeof t != "symbol" ? t + "" : t, e);
6
7
  const E = class a extends p {
@@ -286,12 +287,12 @@ const E = class a extends p {
286
287
  }
287
288
  const o = e.match(a.HSLA_REGEX);
288
289
  if (o) {
289
- const [, l, u, h, f] = o, [d, m, G] = a.hslToRgb(
290
+ const [, l, u, h, f] = o, [d, m, k] = a.hslToRgb(
290
291
  Number(l),
291
292
  Number(u) / 100,
292
293
  Number(h) / 100
293
294
  );
294
- return { r: d, g: m, b: G, a: Number(f) };
295
+ return { r: d, g: m, b: k, a: Number(f) };
295
296
  }
296
297
  const c = a.NAMED_COLOR_RGB[e.toLowerCase()];
297
298
  if (c) {
@@ -523,7 +524,7 @@ class w extends p {
523
524
  return this.options.loading === "lazy" && !this.loaded && this.options.fontUrl && this.load(), this.value;
524
525
  }
525
526
  }
526
- const q = {
527
+ const z = {
527
528
  ultraLight: 100,
528
529
  thin: 200,
529
530
  light: 300,
@@ -533,7 +534,7 @@ const q = {
533
534
  bold: 700,
534
535
  heavy: 800,
535
536
  black: 900
536
- }, z = {
537
+ }, U = {
537
538
  ultraCondensed: 50,
538
539
  extraCondensed: 62.5,
539
540
  condensed: 75,
@@ -550,10 +551,10 @@ const q = {
550
551
  cursive: ["cursive"],
551
552
  fantasy: ["fantasy"]
552
553
  };
553
- function U(i = "sansSerif", t) {
554
+ function j(i = "sansSerif", t) {
554
555
  return new w("", [...R[i]], t || `system-${i}`);
555
556
  }
556
- function j(i, t = [400], e, r = {}) {
557
+ function K(i, t = [400], e, r = {}) {
557
558
  const n = t.join(";"), o = `https://fonts.googleapis.com/css2?family=${i.replace(/\s+/g, "+")}:wght@${n}&display=swap`;
558
559
  return new w(
559
560
  i,
@@ -566,7 +567,7 @@ function j(i, t = [400], e, r = {}) {
566
567
  }
567
568
  );
568
569
  }
569
- function K(i, t, e, r = [...R.sansSerif], n) {
570
+ function J(i, t, e, r = [...R.sansSerif], n) {
570
571
  const s = {};
571
572
  return e.slant && (s.slnt = e.slant), e.optical && (s.opsz = e.optical), e.custom && Object.assign(s, e.custom), new w(i, r, n, {
572
573
  fontUrl: t,
@@ -619,7 +620,7 @@ class O {
619
620
  );
620
621
  }
621
622
  }
622
- const b = new O(), N = b.asProxy(), J = N;
623
+ const b = new O(), N = b.asProxy(), Q = N;
623
624
  function $(...i) {
624
625
  if (i.length === 0)
625
626
  throw new Error("registerAsset requires at least one argument");
@@ -649,7 +650,7 @@ function $(...i) {
649
650
  "registerAsset requires either (name, asset), (asset), (asset, overrideName), or (...assets)"
650
651
  );
651
652
  }
652
- function Q(i, t, e = "") {
653
+ function Y(i, t, e = "") {
653
654
  return g.init({
654
655
  default: i,
655
656
  light: i,
@@ -657,7 +658,7 @@ function Q(i, t, e = "") {
657
658
  name: e
658
659
  });
659
660
  }
660
- function Y(i, t, e, r = "", n) {
661
+ function Z(i, t, e, r = "", n) {
661
662
  return F.init({
662
663
  default: i,
663
664
  light: t,
@@ -666,10 +667,10 @@ function Y(i, t, e, r = "", n) {
666
667
  options: n
667
668
  });
668
669
  }
669
- function Z(i, t = [], e = "", r) {
670
+ function _(i, t = [], e = "", r) {
670
671
  return w.init(i, t, e, r);
671
672
  }
672
- function _() {
673
+ function tt() {
673
674
  const i = b.getAll(), t = [];
674
675
  for (const [e, r] of i) {
675
676
  let n = "custom";
@@ -681,10 +682,10 @@ function _() {
681
682
  }
682
683
  return t.sort((e, r) => e.name.localeCompare(r.name));
683
684
  }
684
- function tt(i) {
685
+ function et(i) {
685
686
  return b.get(i);
686
687
  }
687
- function k(i) {
688
+ function G(i) {
688
689
  if (i instanceof g)
689
690
  return !0;
690
691
  if (!i || typeof i != "object")
@@ -692,16 +693,16 @@ function k(i) {
692
693
  const t = i;
693
694
  return typeof t.resolve == "function" && typeof t.opacity == "function" && typeof t.saturate == "function" && typeof t.brighten == "function" && typeof t.contrast == "function" && typeof t.rotateHue == "function";
694
695
  }
695
- function et(i) {
696
+ function rt(i) {
696
697
  const t = N[i];
697
- return k(t) ? t : void 0;
698
+ return G(t) ? t : void 0;
698
699
  }
699
- function rt(i, t = "asset") {
700
- if (!k(i))
700
+ function st(i, t = "asset") {
701
+ if (!G(i))
701
702
  throw new Error(`Asset "${t}" is not a ColorAsset`);
702
703
  return i;
703
704
  }
704
- function st() {
705
+ function nt() {
705
706
  return Array.from(b.getAll().keys()).sort();
706
707
  }
707
708
  $(g.init({
@@ -754,27 +755,27 @@ $(g.init({
754
755
  }));
755
756
  export {
756
757
  p as Asset,
757
- J as Assets,
758
+ Q as Assets,
758
759
  g as ColorAsset,
759
760
  w as FontAsset,
760
- q as FontWeight,
761
- z as FontWidth,
761
+ z as FontWeight,
762
+ U as FontWidth,
762
763
  F as ImageAsset,
763
- it as LinearGradient,
764
- ot as RadialGradient,
765
- lt as StateGradient,
764
+ ot as LinearGradient,
765
+ lt as RadialGradient,
766
+ ct as StateGradient,
766
767
  R as SystemFonts,
767
- rt as asColorAsset,
768
- Q as createColorAsset,
769
- Z as createFontAsset,
770
- j as createGoogleFont,
771
- Y as createImageAsset,
772
- U as createSystemFont,
773
- K as createVariableFont,
774
- tt as getAsset,
775
- _ as getAssetInfo,
776
- et as getColorAsset,
777
- k as isColorAsset,
778
- st as listAssetNames,
768
+ st as asColorAsset,
769
+ Y as createColorAsset,
770
+ _ as createFontAsset,
771
+ K as createGoogleFont,
772
+ Z as createImageAsset,
773
+ j as createSystemFont,
774
+ J as createVariableFont,
775
+ et as getAsset,
776
+ tt as getAssetInfo,
777
+ rt as getColorAsset,
778
+ G as isColorAsset,
779
+ nt as listAssetNames,
779
780
  $ as registerAsset
780
781
  };
@@ -1,6 +1,6 @@
1
- import { c as l, l as f } from "./theme-CRLPHryV.js";
2
- import { c as w } from "./effect-BsW3fy1q.js";
3
- import { g as m } from "./component-context-B9HI2nZH.js";
1
+ import { d as l, j as f } from "./signal-BRoiFOO7.js";
2
+ import { c as w } from "./effect-DgNm6jk9.js";
3
+ import { g as m } from "./component-context-C7Y6Xu6h.js";
4
4
  var b = Object.defineProperty, $ = (e, t, n) => t in e ? b(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, _ = (e, t, n) => $(e, typeof t != "symbol" ? t + "" : t, n);
5
5
  class y {
6
6
  constructor(t, n, r, s = {}) {
@@ -297,12 +297,12 @@ const A = {
297
297
  export {
298
298
  c as B,
299
299
  M as S,
300
- T as a,
301
- A as b,
300
+ A as a,
301
+ u as b,
302
302
  g as c,
303
- u as d,
304
- E as e,
305
- N as f,
306
- C as i,
303
+ E as d,
304
+ N as e,
305
+ C as f,
306
+ T as i,
307
307
  F as u
308
308
  };
@@ -1,6 +1,10 @@
1
1
  /**
2
2
  * Shared utilities for modifier type generation tooling.
3
3
  * These helpers are reused by the CLI script and the Vite plugin.
4
+ *
5
+ * Note: This file is an internal source helper and is not currently the
6
+ * backing implementation for the `@tachui/core/build-tools` package export.
7
+ * That export aliases `src/build-plugins/index.ts` for compatibility.
4
8
  */
5
9
  import type { GeneratedModifierArtifacts } from '../modifiers/type-generator';
6
10
  export interface HydratorCandidate {
@@ -1 +1 @@
1
- {"version":3,"file":"typegen-runner.d.ts","sourceRoot":"","sources":["../../src/build-tools/typegen-runner.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AAE7E,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CACxB;AAID,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,EAYhD,CAAA;AAED,wBAAsB,eAAe,CACnC,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAyEf;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAA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AChC,OAAO,GAAE,mBAAwB,GAChC;IAAE,eAAe,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAoBnD;AAED,wBAAsB,aAAa,CACjC,SAAS,EAAE,0BAA0B,EACrC,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAED,wBAAsB,cAAc,CAClC,SAAS,EAAE,0BAA0B,EACrC,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD"}
@@ -0,0 +1,61 @@
1
+ import { j as s } from "./signal-BRoiFOO7.js";
2
+ function r(e) {
3
+ const n = s();
4
+ n && !n.disposed ? n.cleanups.push(e) : __DEV__ && console.warn("onCleanup called outside of reactive context");
5
+ }
6
+ function c(e) {
7
+ "dispose" in e && typeof e.dispose == "function" && e.dispose();
8
+ }
9
+ function u(e) {
10
+ const [n, o] = e();
11
+ return r(o), n;
12
+ }
13
+ function a() {
14
+ const e = [];
15
+ let n = !1;
16
+ return {
17
+ add(o) {
18
+ if (n) {
19
+ __DEV__ && console.warn("Adding cleanup to disposed group");
20
+ return;
21
+ }
22
+ e.push(o);
23
+ },
24
+ dispose() {
25
+ if (!n) {
26
+ n = !0;
27
+ for (const o of e)
28
+ try {
29
+ o();
30
+ } catch (t) {
31
+ console.error("Error in cleanup function:", t);
32
+ }
33
+ e.length = 0;
34
+ }
35
+ },
36
+ get disposed() {
37
+ return n;
38
+ }
39
+ };
40
+ }
41
+ function p(e, n) {
42
+ const o = setTimeout(e, n);
43
+ return r(() => clearTimeout(o)), o;
44
+ }
45
+ function d(e, n) {
46
+ const o = setInterval(e, n);
47
+ return r(() => clearInterval(o)), o;
48
+ }
49
+ function l(e, n, o, t) {
50
+ e.addEventListener(n, o, t), r(() => e.removeEventListener(n, o, t));
51
+ }
52
+ typeof globalThis.__DEV__ > "u" && (globalThis.__DEV__ = process.env.NODE_ENV !== "production");
53
+ export {
54
+ l as a,
55
+ d as b,
56
+ a as c,
57
+ u as d,
58
+ p as e,
59
+ c as f,
60
+ r as o
61
+ };