@tachui/data 0.8.15 → 0.8.16
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/List.js +45 -45
- package/package.json +5 -5
package/dist/List.js
CHANGED
|
@@ -2,6 +2,7 @@ var Oe = Object.defineProperty;
|
|
|
2
2
|
var Pe = (n, e, t) => e in n ? Oe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var m = (n, e, t) => Pe(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { withModifiers as pe, ComponentWithCSSClasses as ke, processElementOverride as Le, h as w, text as De, clonePropsPreservingReactivity as me, resetLifecycleState as ge, createSignal as N, isSignal as S, createEffect as R } from "@tachui/core";
|
|
5
|
+
import "@tachui/core/reactive";
|
|
5
6
|
import "@tachui/modifiers";
|
|
6
7
|
const y = {
|
|
7
8
|
Clean: 0,
|
|
@@ -67,10 +68,10 @@ class Ae {
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
|
-
var Fe = Object.defineProperty, Be = (n, e, t) => e in n ? Fe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t,
|
|
71
|
+
var Fe = Object.defineProperty, Be = (n, e, t) => e in n ? Fe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, ie = (n, e, t) => Be(n, typeof e != "symbol" ? e + "" : e, t);
|
|
71
72
|
let We = 0, Ue = class {
|
|
72
73
|
constructor(e) {
|
|
73
|
-
|
|
74
|
+
ie(this, "id"), ie(this, "observers", /* @__PURE__ */ new Set()), ie(this, "_value"), this.id = ++We, this._value = e;
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
77
|
* Get the current value and track dependency
|
|
@@ -137,7 +138,7 @@ function Qe() {
|
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
140
|
}
|
|
140
|
-
function
|
|
141
|
+
function he(n) {
|
|
141
142
|
const e = new Ue(n), t = e.getValue.bind(e);
|
|
142
143
|
t.peek = e.peek.bind(e);
|
|
143
144
|
const s = e.set.bind(e);
|
|
@@ -457,7 +458,7 @@ function st(n, e) {
|
|
|
457
458
|
function B(n) {
|
|
458
459
|
return typeof n == "function" && Symbol.for("tachui.computed") in n;
|
|
459
460
|
}
|
|
460
|
-
const [rt, Ss] =
|
|
461
|
+
const [rt, Ss] = he("light");
|
|
461
462
|
st(() => {
|
|
462
463
|
const n = rt();
|
|
463
464
|
return n === "system" ? it() : n;
|
|
@@ -491,7 +492,7 @@ let at = class {
|
|
|
491
492
|
}
|
|
492
493
|
};
|
|
493
494
|
new at();
|
|
494
|
-
let
|
|
495
|
+
let ne = null;
|
|
495
496
|
const b = class b {
|
|
496
497
|
constructor() {
|
|
497
498
|
m(this, "instanceId");
|
|
@@ -780,9 +781,9 @@ m(b, "instanceCount", 0), m(b, "FORBIDDEN_NAMES", /* @__PURE__ */ new Set([
|
|
|
780
781
|
"toString",
|
|
781
782
|
"valueOf"
|
|
782
783
|
])), m(b, "NAME_PATTERN", /^[a-zA-Z_$][a-zA-Z0-9_$]*$/);
|
|
783
|
-
let
|
|
784
|
+
let de = b;
|
|
784
785
|
function lt() {
|
|
785
|
-
return
|
|
786
|
+
return ne || (ne = new de()), ne;
|
|
786
787
|
}
|
|
787
788
|
const x = lt();
|
|
788
789
|
function T(n, e = {}) {
|
|
@@ -1617,7 +1618,7 @@ const xe = class W {
|
|
|
1617
1618
|
Mt(xe, "instance");
|
|
1618
1619
|
let It = xe;
|
|
1619
1620
|
const xt = It.getInstance();
|
|
1620
|
-
var Tt = Object.defineProperty, $t = (n, e, t) => e in n ? Tt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t,
|
|
1621
|
+
var Tt = Object.defineProperty, $t = (n, e, t) => e in n ? Tt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, oe = (n, e, t) => $t(n, typeof e != "symbol" ? e + "" : e, t);
|
|
1621
1622
|
const Nt = /* @__PURE__ */ new Set([
|
|
1622
1623
|
"click",
|
|
1623
1624
|
"dblclick",
|
|
@@ -1646,7 +1647,7 @@ const Nt = /* @__PURE__ */ new Set([
|
|
|
1646
1647
|
]);
|
|
1647
1648
|
class Rt {
|
|
1648
1649
|
constructor() {
|
|
1649
|
-
|
|
1650
|
+
oe(this, "containerListeners", /* @__PURE__ */ new WeakMap()), oe(this, "elementHandlers", /* @__PURE__ */ new WeakMap()), oe(this, "handlerCounts", /* @__PURE__ */ new WeakMap());
|
|
1650
1651
|
}
|
|
1651
1652
|
/**
|
|
1652
1653
|
* Register an event handler with delegation
|
|
@@ -1756,9 +1757,9 @@ class Rt {
|
|
|
1756
1757
|
}), this.containerListeners.delete(e)), this.handlerCounts.delete(e);
|
|
1757
1758
|
}
|
|
1758
1759
|
}
|
|
1759
|
-
const
|
|
1760
|
+
const ae = new Rt();
|
|
1760
1761
|
var Ot = Object.defineProperty, Pt = (n, e, t) => e in n ? Ot(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, j = (n, e, t) => Pt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
1761
|
-
const
|
|
1762
|
+
const le = "__tachuiManagedComponentId";
|
|
1762
1763
|
class Te {
|
|
1763
1764
|
constructor() {
|
|
1764
1765
|
j(this, "nodeMap", /* @__PURE__ */ new WeakMap()), j(this, "cleanupMap", /* @__PURE__ */ new WeakMap()), j(this, "renderedNodes", /* @__PURE__ */ new Set()), j(this, "elementToContainer", /* @__PURE__ */ new WeakMap()), j(this, "metrics", {
|
|
@@ -1853,7 +1854,7 @@ class Te {
|
|
|
1853
1854
|
a === "key" || a === "children" || i && i[a] === l || this.applyProp(e, a, l, s);
|
|
1854
1855
|
});
|
|
1855
1856
|
const o = t.componentId;
|
|
1856
|
-
if (o ? (e.getAttribute("data-component-id") !== String(o) && (e.setAttribute("data-component-id", String(o)), this.recordAttributeWrite()), e[
|
|
1857
|
+
if (o ? (e.getAttribute("data-component-id") !== String(o) && (e.setAttribute("data-component-id", String(o)), this.recordAttributeWrite()), e[le] = !0) : e.hasAttribute("data-component-id") && e[le] === !0 && (e.removeAttribute("data-component-id"), this.recordAttributeRemoval(), e[le] = !1), t.__appliedProps = { ...r }, "componentMetadata" in t && t.componentMetadata) {
|
|
1857
1858
|
const a = t.componentMetadata;
|
|
1858
1859
|
if (a.overriddenTo && a.originalType && t.tag)
|
|
1859
1860
|
try {
|
|
@@ -2126,8 +2127,8 @@ class Te {
|
|
|
2126
2127
|
let i = t.slice(2).toLowerCase();
|
|
2127
2128
|
i === "focus" ? i = "focusin" : i === "blur" && (i = "focusout");
|
|
2128
2129
|
const o = r || this.elementToContainer.get(e);
|
|
2129
|
-
if (o &&
|
|
2130
|
-
const h =
|
|
2130
|
+
if (o && ae.shouldDelegate(i)) {
|
|
2131
|
+
const h = ae.register(
|
|
2131
2132
|
o,
|
|
2132
2133
|
e,
|
|
2133
2134
|
i,
|
|
@@ -2142,7 +2143,7 @@ class Te {
|
|
|
2142
2143
|
} catch (c) {
|
|
2143
2144
|
console.error(`Event handler error for ${t}:`, c);
|
|
2144
2145
|
}
|
|
2145
|
-
}, l =
|
|
2146
|
+
}, l = ae.shouldBePassive(i) ? { passive: !0 } : void 0;
|
|
2146
2147
|
e.addEventListener(i, a, l), this.addCleanup(e, () => {
|
|
2147
2148
|
e.removeEventListener(i, a, l);
|
|
2148
2149
|
});
|
|
@@ -2656,7 +2657,7 @@ function $(n) {
|
|
|
2656
2657
|
}
|
|
2657
2658
|
return n._modifiableComponent;
|
|
2658
2659
|
}
|
|
2659
|
-
function
|
|
2660
|
+
function ue(n) {
|
|
2660
2661
|
if (!$e())
|
|
2661
2662
|
return n;
|
|
2662
2663
|
const e = we.get(n);
|
|
@@ -2688,7 +2689,7 @@ function de(n) {
|
|
|
2688
2689
|
const f = u.build.bind(u);
|
|
2689
2690
|
return (...p) => {
|
|
2690
2691
|
const v = f(...p);
|
|
2691
|
-
return v && typeof v == "object" && !Array.isArray(v) ?
|
|
2692
|
+
return v && typeof v == "object" && !Array.isArray(v) ? ue(
|
|
2692
2693
|
v
|
|
2693
2694
|
) : v;
|
|
2694
2695
|
};
|
|
@@ -2729,8 +2730,8 @@ function de(n) {
|
|
|
2729
2730
|
throw new Error(
|
|
2730
2731
|
`Modifier '${String(l)}' is not callable`
|
|
2731
2732
|
);
|
|
2732
|
-
const
|
|
2733
|
-
return
|
|
2733
|
+
const re = fe.apply(E, k);
|
|
2734
|
+
return re && re !== E ? re : o;
|
|
2734
2735
|
};
|
|
2735
2736
|
t.set(l, v), s.set(
|
|
2736
2737
|
l,
|
|
@@ -2762,7 +2763,7 @@ function de(n) {
|
|
|
2762
2763
|
const c = Reflect.get(a, l, a);
|
|
2763
2764
|
return typeof c == "function" ? l === "clone" ? (...u) => {
|
|
2764
2765
|
const f = c.apply(a, u);
|
|
2765
|
-
return f && typeof f == "object" ?
|
|
2766
|
+
return f && typeof f == "object" ? ue(f) : f;
|
|
2766
2767
|
} : (r.has(l) || r.set(l, c.bind(a)), r.get(l)) : c;
|
|
2767
2768
|
}
|
|
2768
2769
|
},
|
|
@@ -3007,7 +3008,7 @@ const Ne = class q {
|
|
|
3007
3008
|
*/
|
|
3008
3009
|
registerProvider(e, t, s) {
|
|
3009
3010
|
this.providerStack.has(e) || this.providerStack.set(e, []);
|
|
3010
|
-
const r = this.providerStack.get(e), [i, o] =
|
|
3011
|
+
const r = this.providerStack.get(e), [i, o] = he(t), a = {
|
|
3011
3012
|
value: t,
|
|
3012
3013
|
signal: [i, o],
|
|
3013
3014
|
subscribers: /* @__PURE__ */ new Set(),
|
|
@@ -3025,7 +3026,7 @@ const Ne = class q {
|
|
|
3025
3026
|
const s = this.providerStack.get(e), r = s && s.length > 0 ? s[s.length - 1] : null;
|
|
3026
3027
|
if (r)
|
|
3027
3028
|
return this.currentComponent && (r.subscribers.add(this.currentComponent.id), this.currentComponent.consumers.add(e)), [r.signal[0], !0];
|
|
3028
|
-
const [i] =
|
|
3029
|
+
const [i] = he(t);
|
|
3029
3030
|
return [i, !1];
|
|
3030
3031
|
}
|
|
3031
3032
|
/**
|
|
@@ -3112,8 +3113,7 @@ let Zt = Ne, Xt = class {
|
|
|
3112
3113
|
clear() {
|
|
3113
3114
|
this.registry.clear();
|
|
3114
3115
|
}
|
|
3115
|
-
}
|
|
3116
|
-
class Jt {
|
|
3116
|
+
}, Jt = class {
|
|
3117
3117
|
constructor() {
|
|
3118
3118
|
M(this, "services", /* @__PURE__ */ new Map()), M(this, "factories", /* @__PURE__ */ new Map()), M(this, "singletons", /* @__PURE__ */ new Map()), M(this, "scoped", /* @__PURE__ */ new Map()), M(this, "dependencies", /* @__PURE__ */ new Map());
|
|
3119
3119
|
}
|
|
@@ -3174,11 +3174,11 @@ class Jt {
|
|
|
3174
3174
|
getRegistered() {
|
|
3175
3175
|
return [...this.services.keys(), ...this.factories.keys()];
|
|
3176
3176
|
}
|
|
3177
|
-
}
|
|
3177
|
+
};
|
|
3178
3178
|
new Jt();
|
|
3179
3179
|
new Xt();
|
|
3180
3180
|
new Te();
|
|
3181
|
-
var es = Object.defineProperty, ts = (n, e, t) => e in n ? es(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t,
|
|
3181
|
+
var es = Object.defineProperty, ts = (n, e, t) => e in n ? es(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, ce = (n, e, t) => ts(n, typeof e != "symbol" ? e + "" : e, t);
|
|
3182
3182
|
const ss = {
|
|
3183
3183
|
sanitizeClassNames: !0,
|
|
3184
3184
|
sanitizationRules: {
|
|
@@ -3193,7 +3193,7 @@ const ss = {
|
|
|
3193
3193
|
};
|
|
3194
3194
|
let rs = class {
|
|
3195
3195
|
constructor(e = {}) {
|
|
3196
|
-
|
|
3196
|
+
ce(this, "config"), ce(this, "classCache"), ce(this, "processingCache"), this.config = { ...ss, ...e };
|
|
3197
3197
|
const t = (() => {
|
|
3198
3198
|
try {
|
|
3199
3199
|
return typeof Map < "u" && typeof Map == "function";
|
|
@@ -3370,10 +3370,10 @@ let rs = class {
|
|
|
3370
3370
|
new rs();
|
|
3371
3371
|
function is(n, e, t = {}, ...s) {
|
|
3372
3372
|
const r = new n(e, ...s);
|
|
3373
|
-
return $e() && t.prewarmProxy !== !1 &&
|
|
3373
|
+
return $e() && t.prewarmProxy !== !1 && ue(r), r;
|
|
3374
3374
|
}
|
|
3375
3375
|
var ns = Object.defineProperty, os = (n, e, t) => e in n ? ns(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, D = (n, e, t) => os(n, typeof e != "symbol" ? e + "" : e, t);
|
|
3376
|
-
|
|
3376
|
+
class se extends ke {
|
|
3377
3377
|
constructor(e) {
|
|
3378
3378
|
super(), this.props = e, D(this, "type", "component"), D(this, "id"), D(this, "mounted", !1), D(this, "cleanup", []), D(this, "effectiveTag"), D(this, "validationResult"), this.id = `text-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
3379
3379
|
const t = this.resolveDefaultTag(), s = Le(
|
|
@@ -3435,21 +3435,21 @@ let as = class ue extends ke {
|
|
|
3435
3435
|
return e.deep ? this.deepClone() : this.shallowClone();
|
|
3436
3436
|
}
|
|
3437
3437
|
shallowClone() {
|
|
3438
|
-
const e = me(this.props), t = new
|
|
3438
|
+
const e = me(this.props), t = new se(e);
|
|
3439
3439
|
return ge(t), t;
|
|
3440
3440
|
}
|
|
3441
3441
|
deepClone() {
|
|
3442
3442
|
const e = me(this.props, {
|
|
3443
3443
|
deep: !0
|
|
3444
|
-
}), t = new
|
|
3444
|
+
}), t = new se(e);
|
|
3445
3445
|
return ge(t), t;
|
|
3446
3446
|
}
|
|
3447
|
-
}
|
|
3447
|
+
}
|
|
3448
3448
|
function Re(n, e) {
|
|
3449
3449
|
const t = {
|
|
3450
3450
|
content: n,
|
|
3451
3451
|
...e
|
|
3452
|
-
}, s = is(
|
|
3452
|
+
}, s = is(se, t);
|
|
3453
3453
|
return pe(s);
|
|
3454
3454
|
}
|
|
3455
3455
|
function z(n) {
|
|
@@ -3467,8 +3467,8 @@ Object.assign(Re, {
|
|
|
3467
3467
|
H5: z(5),
|
|
3468
3468
|
H6: z(6)
|
|
3469
3469
|
});
|
|
3470
|
-
var
|
|
3471
|
-
class
|
|
3470
|
+
var as = Object.defineProperty, ls = (n, e, t) => e in n ? as(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, g = (n, e, t) => ls(n, typeof e != "symbol" ? e + "" : e, t);
|
|
3471
|
+
class cs {
|
|
3472
3472
|
constructor(e) {
|
|
3473
3473
|
this.props = e, g(this, "type", "component"), g(this, "id"), g(this, "mounted", !1), g(this, "cleanup", []), g(this, "scrollElement", null), g(this, "contentOffsetSignal"), g(this, "setContentOffset"), g(this, "contentSizeSignal"), g(this, "setContentSize"), g(this, "setIsScrolling"), g(this, "pullToRefreshStateSignal"), g(this, "setPullToRefreshState"), g(this, "scrollEventThrottle"), g(this, "lastScrollTime", 0), g(this, "scrollVelocity", { x: 0, y: 0 }), g(this, "lastScrollOffset", { x: 0, y: 0 }), g(this, "pullStartY", 0), g(this, "isPulling", !1), g(this, "handleScroll", (h) => {
|
|
3474
3474
|
if (!this.scrollElement) return;
|
|
@@ -3803,11 +3803,11 @@ class hs {
|
|
|
3803
3803
|
return [c];
|
|
3804
3804
|
}
|
|
3805
3805
|
}
|
|
3806
|
-
function
|
|
3807
|
-
const e = new
|
|
3806
|
+
function hs(n = {}) {
|
|
3807
|
+
const e = new cs(n);
|
|
3808
3808
|
return pe(e);
|
|
3809
3809
|
}
|
|
3810
|
-
const
|
|
3810
|
+
const ds = `
|
|
3811
3811
|
@keyframes spin {
|
|
3812
3812
|
from { transform: rotate(0deg); }
|
|
3813
3813
|
to { transform: rotate(360deg); }
|
|
@@ -3815,10 +3815,10 @@ const us = `
|
|
|
3815
3815
|
`;
|
|
3816
3816
|
if (typeof document < "u") {
|
|
3817
3817
|
const n = document.createElement("style");
|
|
3818
|
-
n.textContent =
|
|
3818
|
+
n.textContent = ds, document.head.appendChild(n);
|
|
3819
3819
|
}
|
|
3820
3820
|
process.env.NODE_ENV;
|
|
3821
|
-
class
|
|
3821
|
+
class us {
|
|
3822
3822
|
constructor(e) {
|
|
3823
3823
|
m(this, "type", "component");
|
|
3824
3824
|
m(this, "id");
|
|
@@ -4239,14 +4239,14 @@ class ps {
|
|
|
4239
4239
|
children: s,
|
|
4240
4240
|
onScroll: this.handleListScroll
|
|
4241
4241
|
};
|
|
4242
|
-
return new
|
|
4242
|
+
return new hs(r).render();
|
|
4243
4243
|
}
|
|
4244
4244
|
}
|
|
4245
4245
|
function Z(n) {
|
|
4246
|
-
const e = new
|
|
4246
|
+
const e = new us(n);
|
|
4247
4247
|
return pe(e);
|
|
4248
4248
|
}
|
|
4249
|
-
const
|
|
4249
|
+
const Ms = {
|
|
4250
4250
|
/**
|
|
4251
4251
|
* Create a simple list from array
|
|
4252
4252
|
*/
|
|
@@ -4292,7 +4292,7 @@ const As = {
|
|
|
4292
4292
|
}
|
|
4293
4293
|
};
|
|
4294
4294
|
export {
|
|
4295
|
-
|
|
4295
|
+
us as E,
|
|
4296
4296
|
Z as L,
|
|
4297
|
-
|
|
4297
|
+
Ms as a
|
|
4298
4298
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachui/data",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.16",
|
|
4
4
|
"description": "Data display and organization components for tachUI framework",
|
|
5
5
|
"homepage": "https://tachui.dev/",
|
|
6
6
|
"type": "module",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@tachui/core": "0.8.
|
|
29
|
-
"@tachui/flow-control": "0.8.
|
|
30
|
-
"@tachui/mobile": "0.8.
|
|
31
|
-
"@tachui/primitives": "0.8.
|
|
28
|
+
"@tachui/core": "0.8.16",
|
|
29
|
+
"@tachui/flow-control": "0.8.16",
|
|
30
|
+
"@tachui/mobile": "0.8.16",
|
|
31
|
+
"@tachui/primitives": "0.8.16"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^20.0.0",
|