sibujs 4.2.0 → 4.4.0
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/README.md +23 -4
- package/dist/browser.cjs +1 -1
- package/dist/browser.js +4 -4
- package/dist/build.cjs +30 -8
- package/dist/build.js +10 -10
- package/dist/cdn.dev.global.js +10 -10
- package/dist/cdn.full.dev.global.js +400 -0
- package/dist/cdn.full.global.js +398 -0
- package/dist/cdn.global.js +10 -10
- package/dist/{chunk-P3DHXBR6.js → chunk-36S2YPP4.js} +1 -1
- package/dist/{chunk-7ALC7KGE.js → chunk-3BTTCZ5J.js} +1 -1
- package/dist/{chunk-QL4UREZO.js → chunk-4Z3SPQ67.js} +3 -3
- package/dist/{chunk-XZ2N525U.js → chunk-6GSIXTWX.js} +4 -4
- package/dist/{chunk-7VEC3UD2.js → chunk-7GIHSAWB.js} +1 -1
- package/dist/{chunk-FOWBJZDL.js → chunk-7NBDXVHS.js} +1 -1
- package/dist/{chunk-HZEBO22J.js → chunk-ADM46X22.js} +38 -16
- package/dist/{chunk-QCFLDD7C.js → chunk-HFCOH2GN.js} +4 -4
- package/dist/{chunk-NEYWS4EX.js → chunk-HQSEH5F6.js} +3 -3
- package/dist/{chunk-OUWAIXIK.js → chunk-LQFGQNMV.js} +3 -3
- package/dist/{chunk-KE4KWRDY.js → chunk-LYVUX7NT.js} +2 -2
- package/dist/{chunk-BNKV4REK.js → chunk-M2F7TZHH.js} +2 -2
- package/dist/{chunk-HECVW343.js → chunk-NVNJH22U.js} +1 -1
- package/dist/{chunk-6ZGI3RBE.js → chunk-PNIRUQ4C.js} +2 -2
- package/dist/{chunk-VJE6DDYM.js → chunk-R25EFXXC.js} +40 -26
- package/dist/{chunk-BMYYZWHX.js → chunk-RR7M3FHM.js} +1 -1
- package/dist/{chunk-3VTSPNC5.js → chunk-SKPTERHP.js} +1 -1
- package/dist/{chunk-GDUNQCCW.js → chunk-UCALUKB5.js} +4 -4
- package/dist/{chunk-HJEPKZ2O.js → chunk-VCTAEPSB.js} +1 -1
- package/dist/{chunk-2LOYNGBY.js → chunk-W2EQ7X2L.js} +1 -1
- package/dist/{chunk-SF3TB4K6.js → chunk-XLO7SLIX.js} +5 -5
- package/dist/{contracts-Hg6ITAEF.d.cts → contracts-DBdg9J_a.d.cts} +25 -4
- package/dist/{contracts-Hg6ITAEF.d.ts → contracts-DBdg9J_a.d.ts} +25 -4
- package/dist/data.cjs +1 -1
- package/dist/data.js +6 -6
- package/dist/devtools.cjs +1 -1
- package/dist/devtools.js +4 -4
- package/dist/ecosystem.cjs +1 -1
- package/dist/ecosystem.js +7 -7
- package/dist/extras.cjs +36 -27
- package/dist/extras.d.cts +1 -1
- package/dist/extras.d.ts +1 -1
- package/dist/extras.js +20 -20
- package/dist/index.cjs +30 -8
- package/dist/index.d.cts +36 -4
- package/dist/index.d.ts +36 -4
- package/dist/index.js +10 -10
- package/dist/motion.cjs +1 -1
- package/dist/motion.js +3 -3
- package/dist/patterns.cjs +36 -27
- package/dist/patterns.d.cts +1 -1
- package/dist/patterns.d.ts +1 -1
- package/dist/patterns.js +6 -6
- package/dist/performance.cjs +1 -1
- package/dist/performance.js +4 -4
- package/dist/plugins.cjs +4 -3
- package/dist/plugins.d.cts +10 -2
- package/dist/plugins.d.ts +10 -2
- package/dist/plugins.js +9 -8
- package/dist/ssr.cjs +1 -1
- package/dist/ssr.js +7 -7
- package/dist/testing.cjs +1 -1
- package/dist/testing.js +2 -2
- package/dist/ui.cjs +36 -27
- package/dist/ui.d.cts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +7 -7
- package/dist/widgets.cjs +1 -1
- package/dist/widgets.js +6 -6
- package/package.json +7 -1
package/dist/patterns.cjs
CHANGED
|
@@ -603,7 +603,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
603
603
|
}
|
|
604
604
|
|
|
605
605
|
// src/reactivity/track.ts
|
|
606
|
-
var _runtimeVersion = true ? "4.
|
|
606
|
+
var _runtimeVersion = true ? "4.4.0" : "dev";
|
|
607
607
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
608
608
|
function resolveReactiveApi() {
|
|
609
609
|
const g = globalThis;
|
|
@@ -1701,31 +1701,39 @@ var validators = {
|
|
|
1701
1701
|
};
|
|
1702
1702
|
function validateProps(props, schema) {
|
|
1703
1703
|
const result = { ...props };
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1704
|
+
if (typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : DEV) {
|
|
1705
|
+
const errors = [];
|
|
1706
|
+
for (const [key, def] of Object.entries(schema)) {
|
|
1707
|
+
const propDef = typeof def === "function" ? { type: def } : def;
|
|
1708
|
+
if (result[key] == null && propDef.default !== void 0) {
|
|
1709
|
+
result[key] = typeof propDef.default === "function" ? propDef.default() : propDef.default;
|
|
1710
|
+
}
|
|
1711
|
+
if (propDef.required && result[key] == null) {
|
|
1712
|
+
errors.push(`Prop '${key}' is required`);
|
|
1713
|
+
continue;
|
|
1714
|
+
}
|
|
1715
|
+
if (result[key] == null) continue;
|
|
1716
|
+
if (propDef.type) {
|
|
1717
|
+
const typeResult = propDef.type(result[key], key);
|
|
1718
|
+
if (typeResult !== true) errors.push(typeResult);
|
|
1719
|
+
}
|
|
1720
|
+
if (propDef.validator) {
|
|
1721
|
+
const validResult = propDef.validator(result[key], key);
|
|
1722
|
+
if (validResult !== true) errors.push(validResult);
|
|
1723
|
+
}
|
|
1720
1724
|
}
|
|
1721
|
-
if (
|
|
1722
|
-
|
|
1723
|
-
|
|
1725
|
+
if (errors.length > 0) {
|
|
1726
|
+
devWarn(`Prop validation errors:
|
|
1727
|
+
${errors.map((e) => ` - ${e}`).join("\n")}`);
|
|
1724
1728
|
}
|
|
1729
|
+
return result;
|
|
1725
1730
|
}
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1731
|
+
for (const [key, def] of Object.entries(schema)) {
|
|
1732
|
+
if (typeof def === "function") continue;
|
|
1733
|
+
const fallback = def.default;
|
|
1734
|
+
if (result[key] == null && fallback !== void 0) {
|
|
1735
|
+
result[key] = typeof fallback === "function" ? fallback() : fallback;
|
|
1736
|
+
}
|
|
1729
1737
|
}
|
|
1730
1738
|
return result;
|
|
1731
1739
|
}
|
|
@@ -1736,10 +1744,11 @@ function defineStrictComponent(config) {
|
|
|
1736
1744
|
};
|
|
1737
1745
|
}
|
|
1738
1746
|
function assertType(value, validator, label) {
|
|
1739
|
-
if (typeof
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1747
|
+
if (typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : DEV) {
|
|
1748
|
+
const result = validator(value, label || "value");
|
|
1749
|
+
if (result !== true) {
|
|
1750
|
+
throw new TypeError(`[SibuJS Contract] ${result}`);
|
|
1751
|
+
}
|
|
1743
1752
|
}
|
|
1744
1753
|
}
|
|
1745
1754
|
function createGuard(validator) {
|
package/dist/patterns.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ComponentProps, P as PropDef, a as PropSchema, R as RenderProp, V as Validator, b as assertType, c as compose, d as createGuard, e as createSlots, f as defineComponent, g as defineSlottedComponent, h as defineStrictComponent, v as validateProps, i as validators, w as withBoundary, j as withDefaults, k as withProps, l as withWrapper } from './contracts-
|
|
1
|
+
export { C as ComponentProps, P as PropDef, a as PropSchema, R as RenderProp, V as Validator, b as assertType, c as compose, d as createGuard, e as createSlots, f as defineComponent, g as defineSlottedComponent, h as defineStrictComponent, v as validateProps, i as validators, w as withBoundary, j as withDefaults, k as withProps, l as withWrapper } from './contracts-DBdg9J_a.cjs';
|
|
2
2
|
|
|
3
3
|
interface MachineConfig<S extends string, E extends string, C extends object = Record<string, unknown>> {
|
|
4
4
|
initial: S;
|
package/dist/patterns.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ComponentProps, P as PropDef, a as PropSchema, R as RenderProp, V as Validator, b as assertType, c as compose, d as createGuard, e as createSlots, f as defineComponent, g as defineSlottedComponent, h as defineStrictComponent, v as validateProps, i as validators, w as withBoundary, j as withDefaults, k as withProps, l as withWrapper } from './contracts-
|
|
1
|
+
export { C as ComponentProps, P as PropDef, a as PropSchema, R as RenderProp, V as Validator, b as assertType, c as compose, d as createGuard, e as createSlots, f as defineComponent, g as defineSlottedComponent, h as defineStrictComponent, v as validateProps, i as validators, w as withBoundary, j as withDefaults, k as withProps, l as withWrapper } from './contracts-DBdg9J_a.js';
|
|
2
2
|
|
|
3
3
|
interface MachineConfig<S extends string, E extends string, C extends object = Record<string, unknown>> {
|
|
4
4
|
initial: S;
|
package/dist/patterns.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
optimisticList,
|
|
6
6
|
persisted,
|
|
7
7
|
timeline
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LQFGQNMV.js";
|
|
9
9
|
import {
|
|
10
10
|
RenderProp,
|
|
11
11
|
assertType,
|
|
@@ -21,13 +21,13 @@ import {
|
|
|
21
21
|
withDefaults,
|
|
22
22
|
withProps,
|
|
23
23
|
withWrapper
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-R25EFXXC.js";
|
|
25
25
|
import "./chunk-H3SRKIYX.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-W2EQ7X2L.js";
|
|
27
|
+
import "./chunk-7GIHSAWB.js";
|
|
28
28
|
import "./chunk-5DXA2J44.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-NVNJH22U.js";
|
|
30
|
+
import "./chunk-3BTTCZ5J.js";
|
|
31
31
|
import "./chunk-2WLZ6757.js";
|
|
32
32
|
export {
|
|
33
33
|
RenderProp,
|
package/dist/performance.cjs
CHANGED
|
@@ -790,7 +790,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
790
790
|
}
|
|
791
791
|
|
|
792
792
|
// src/reactivity/track.ts
|
|
793
|
-
var _runtimeVersion = true ? "4.
|
|
793
|
+
var _runtimeVersion = true ? "4.4.0" : "dev";
|
|
794
794
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
795
795
|
function resolveReactiveApi() {
|
|
796
796
|
const g = globalThis;
|
package/dist/performance.js
CHANGED
|
@@ -33,17 +33,17 @@ import {
|
|
|
33
33
|
transitionState,
|
|
34
34
|
uniqueId,
|
|
35
35
|
yieldToMain
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-M2F7TZHH.js";
|
|
37
37
|
import {
|
|
38
38
|
trustHTML
|
|
39
39
|
} from "./chunk-NIOYEGBQ.js";
|
|
40
40
|
import "./chunk-IXKSNWV5.js";
|
|
41
41
|
import "./chunk-7ZHH77QA.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-7GIHSAWB.js";
|
|
43
43
|
import "./chunk-5DXA2J44.js";
|
|
44
44
|
import "./chunk-QKRPLZ2V.js";
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-NVNJH22U.js";
|
|
46
|
+
import "./chunk-3BTTCZ5J.js";
|
|
47
47
|
import "./chunk-2WLZ6757.js";
|
|
48
48
|
export {
|
|
49
49
|
DOMPool,
|
package/dist/plugins.cjs
CHANGED
|
@@ -1887,7 +1887,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
1887
1887
|
}
|
|
1888
1888
|
|
|
1889
1889
|
// src/reactivity/track.ts
|
|
1890
|
-
var _runtimeVersion = true ? "4.
|
|
1890
|
+
var _runtimeVersion = true ? "4.4.0" : "dev";
|
|
1891
1891
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
1892
1892
|
function resolveReactiveApi() {
|
|
1893
1893
|
const g2 = globalThis;
|
|
@@ -4435,7 +4435,7 @@ function Suspense(props) {
|
|
|
4435
4435
|
console.error("[Suspense] Fallback error:", error);
|
|
4436
4436
|
return;
|
|
4437
4437
|
}
|
|
4438
|
-
if (!
|
|
4438
|
+
if (!fallback || fallback.nodeType !== 1) return;
|
|
4439
4439
|
const parent = commitTarget(myGeneration);
|
|
4440
4440
|
if (!parent) {
|
|
4441
4441
|
release(fallback);
|
|
@@ -4451,7 +4451,8 @@ function Suspense(props) {
|
|
|
4451
4451
|
try {
|
|
4452
4452
|
const result = props.nodes();
|
|
4453
4453
|
let element;
|
|
4454
|
-
|
|
4454
|
+
const isNode = typeof result?.nodeType === "number";
|
|
4455
|
+
if (!isNode && result != null && typeof result.then === "function") {
|
|
4455
4456
|
showFallback(myGeneration);
|
|
4456
4457
|
element = await result;
|
|
4457
4458
|
} else {
|
package/dist/plugins.d.cts
CHANGED
|
@@ -552,8 +552,16 @@ declare function RouterLink(props: {
|
|
|
552
552
|
* because ownership is the correct primitive to express that with.
|
|
553
553
|
*/
|
|
554
554
|
declare function Suspense(props: {
|
|
555
|
-
|
|
556
|
-
|
|
555
|
+
/** Shown while `nodes` is pending. An element, or a function returning one. */
|
|
556
|
+
fallback?: (() => HTMLElement) | HTMLElement;
|
|
557
|
+
/**
|
|
558
|
+
* The content. May be an element, or any thenable resolving to one —
|
|
559
|
+
* `PromiseLike`, not `Promise`, because a promise from another realm or a
|
|
560
|
+
* custom thenable is awaited just the same. The previous type admitted only
|
|
561
|
+
* `Promise`, so the very values the runtime was fixed to handle still had to
|
|
562
|
+
* be cast at the call site.
|
|
563
|
+
*/
|
|
564
|
+
nodes: () => HTMLElement | PromiseLike<HTMLElement>;
|
|
557
565
|
}): Node;
|
|
558
566
|
/**
|
|
559
567
|
* Creates a lazy-loaded component.
|
package/dist/plugins.d.ts
CHANGED
|
@@ -552,8 +552,16 @@ declare function RouterLink(props: {
|
|
|
552
552
|
* because ownership is the correct primitive to express that with.
|
|
553
553
|
*/
|
|
554
554
|
declare function Suspense(props: {
|
|
555
|
-
|
|
556
|
-
|
|
555
|
+
/** Shown while `nodes` is pending. An element, or a function returning one. */
|
|
556
|
+
fallback?: (() => HTMLElement) | HTMLElement;
|
|
557
|
+
/**
|
|
558
|
+
* The content. May be an element, or any thenable resolving to one —
|
|
559
|
+
* `PromiseLike`, not `Promise`, because a promise from another realm or a
|
|
560
|
+
* custom thenable is awaited just the same. The previous type admitted only
|
|
561
|
+
* `Promise`, so the very values the runtime was fixed to handle still had to
|
|
562
|
+
* be cast at the call site.
|
|
563
|
+
*/
|
|
564
|
+
nodes: () => HTMLElement | PromiseLike<HTMLElement>;
|
|
557
565
|
}): Node;
|
|
558
566
|
/**
|
|
559
567
|
* Creates a lazy-loaded component.
|
package/dist/plugins.js
CHANGED
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
} from "./chunk-WWV3SJ3L.js";
|
|
36
36
|
import {
|
|
37
37
|
span
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-36S2YPP4.js";
|
|
39
39
|
import {
|
|
40
40
|
escapeScriptJson,
|
|
41
41
|
renderToString,
|
|
@@ -43,8 +43,8 @@ import {
|
|
|
43
43
|
} from "./chunk-NIOYEGBQ.js";
|
|
44
44
|
import {
|
|
45
45
|
resolveClassValue
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
46
|
+
} from "./chunk-PNIRUQ4C.js";
|
|
47
|
+
import "./chunk-VCTAEPSB.js";
|
|
48
48
|
import {
|
|
49
49
|
isUrlAttribute,
|
|
50
50
|
sanitizeStyleAttribute,
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
} from "./chunk-7ZHH77QA.js";
|
|
57
57
|
import {
|
|
58
58
|
effect
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-7GIHSAWB.js";
|
|
60
60
|
import {
|
|
61
61
|
getRequestStore
|
|
62
62
|
} from "./chunk-5DXA2J44.js";
|
|
@@ -66,10 +66,10 @@ import {
|
|
|
66
66
|
} from "./chunk-QKRPLZ2V.js";
|
|
67
67
|
import {
|
|
68
68
|
signal
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-NVNJH22U.js";
|
|
70
70
|
import {
|
|
71
71
|
track
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-3BTTCZ5J.js";
|
|
73
73
|
import {
|
|
74
74
|
devWarn,
|
|
75
75
|
isDev
|
|
@@ -1706,7 +1706,7 @@ function Suspense(props) {
|
|
|
1706
1706
|
console.error("[Suspense] Fallback error:", error);
|
|
1707
1707
|
return;
|
|
1708
1708
|
}
|
|
1709
|
-
if (!
|
|
1709
|
+
if (!fallback || fallback.nodeType !== 1) return;
|
|
1710
1710
|
const parent = commitTarget(myGeneration);
|
|
1711
1711
|
if (!parent) {
|
|
1712
1712
|
release(fallback);
|
|
@@ -1722,7 +1722,8 @@ function Suspense(props) {
|
|
|
1722
1722
|
try {
|
|
1723
1723
|
const result = props.nodes();
|
|
1724
1724
|
let element;
|
|
1725
|
-
|
|
1725
|
+
const isNode = typeof result?.nodeType === "number";
|
|
1726
|
+
if (!isNode && result != null && typeof result.then === "function") {
|
|
1726
1727
|
showFallback(myGeneration);
|
|
1727
1728
|
element = await result;
|
|
1728
1729
|
} else {
|
package/dist/ssr.cjs
CHANGED
|
@@ -1641,7 +1641,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
|
|
1643
1643
|
// src/reactivity/track.ts
|
|
1644
|
-
var _runtimeVersion = true ? "4.
|
|
1644
|
+
var _runtimeVersion = true ? "4.4.0" : "dev";
|
|
1645
1645
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
1646
1646
|
function resolveReactiveApi() {
|
|
1647
1647
|
const g2 = globalThis;
|
package/dist/ssr.js
CHANGED
|
@@ -23,9 +23,9 @@ import {
|
|
|
23
23
|
wasm,
|
|
24
24
|
worker,
|
|
25
25
|
workerFn
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-HQSEH5F6.js";
|
|
27
27
|
import "./chunk-52XFPGSN.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-36S2YPP4.js";
|
|
29
29
|
import {
|
|
30
30
|
collectStream,
|
|
31
31
|
deserializeState,
|
|
@@ -46,15 +46,15 @@ import {
|
|
|
46
46
|
suspenseSwapScript,
|
|
47
47
|
trustHTML
|
|
48
48
|
} from "./chunk-NIOYEGBQ.js";
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-PNIRUQ4C.js";
|
|
50
|
+
import "./chunk-VCTAEPSB.js";
|
|
51
51
|
import "./chunk-IXKSNWV5.js";
|
|
52
52
|
import "./chunk-7ZHH77QA.js";
|
|
53
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-7GIHSAWB.js";
|
|
54
54
|
import "./chunk-5DXA2J44.js";
|
|
55
55
|
import "./chunk-QKRPLZ2V.js";
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-NVNJH22U.js";
|
|
57
|
+
import "./chunk-3BTTCZ5J.js";
|
|
58
58
|
import "./chunk-2WLZ6757.js";
|
|
59
59
|
export {
|
|
60
60
|
Head,
|
package/dist/testing.cjs
CHANGED
|
@@ -2130,7 +2130,7 @@ function forEachSubscriber(signal, visit) {
|
|
|
2130
2130
|
}
|
|
2131
2131
|
|
|
2132
2132
|
// src/reactivity/track.ts
|
|
2133
|
-
var _runtimeVersion = true ? "4.
|
|
2133
|
+
var _runtimeVersion = true ? "4.4.0" : "dev";
|
|
2134
2134
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
2135
2135
|
function resolveReactiveApi() {
|
|
2136
2136
|
const g = globalThis;
|
package/dist/testing.js
CHANGED
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./chunk-7ZHH77QA.js";
|
|
4
4
|
import {
|
|
5
5
|
effect
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7GIHSAWB.js";
|
|
7
7
|
import "./chunk-5DXA2J44.js";
|
|
8
8
|
import {
|
|
9
9
|
replaceChildrenSafely
|
|
10
10
|
} from "./chunk-QKRPLZ2V.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-3BTTCZ5J.js";
|
|
12
12
|
import "./chunk-2WLZ6757.js";
|
|
13
13
|
|
|
14
14
|
// src/testing/a11y.ts
|
package/dist/ui.cjs
CHANGED
|
@@ -726,7 +726,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
726
726
|
}
|
|
727
727
|
|
|
728
728
|
// src/reactivity/track.ts
|
|
729
|
-
var _runtimeVersion = true ? "4.
|
|
729
|
+
var _runtimeVersion = true ? "4.4.0" : "dev";
|
|
730
730
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
731
731
|
function resolveReactiveApi() {
|
|
732
732
|
const g = globalThis;
|
|
@@ -3188,31 +3188,39 @@ var validators = {
|
|
|
3188
3188
|
};
|
|
3189
3189
|
function validateProps(props, schema) {
|
|
3190
3190
|
const result = { ...props };
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3191
|
+
if (typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : DEV) {
|
|
3192
|
+
const errors = [];
|
|
3193
|
+
for (const [key, def] of Object.entries(schema)) {
|
|
3194
|
+
const propDef = typeof def === "function" ? { type: def } : def;
|
|
3195
|
+
if (result[key] == null && propDef.default !== void 0) {
|
|
3196
|
+
result[key] = typeof propDef.default === "function" ? propDef.default() : propDef.default;
|
|
3197
|
+
}
|
|
3198
|
+
if (propDef.required && result[key] == null) {
|
|
3199
|
+
errors.push(`Prop '${key}' is required`);
|
|
3200
|
+
continue;
|
|
3201
|
+
}
|
|
3202
|
+
if (result[key] == null) continue;
|
|
3203
|
+
if (propDef.type) {
|
|
3204
|
+
const typeResult = propDef.type(result[key], key);
|
|
3205
|
+
if (typeResult !== true) errors.push(typeResult);
|
|
3206
|
+
}
|
|
3207
|
+
if (propDef.validator) {
|
|
3208
|
+
const validResult = propDef.validator(result[key], key);
|
|
3209
|
+
if (validResult !== true) errors.push(validResult);
|
|
3210
|
+
}
|
|
3207
3211
|
}
|
|
3208
|
-
if (
|
|
3209
|
-
|
|
3210
|
-
|
|
3212
|
+
if (errors.length > 0) {
|
|
3213
|
+
devWarn(`Prop validation errors:
|
|
3214
|
+
${errors.map((e) => ` - ${e}`).join("\n")}`);
|
|
3211
3215
|
}
|
|
3216
|
+
return result;
|
|
3212
3217
|
}
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3218
|
+
for (const [key, def] of Object.entries(schema)) {
|
|
3219
|
+
if (typeof def === "function") continue;
|
|
3220
|
+
const fallback = def.default;
|
|
3221
|
+
if (result[key] == null && fallback !== void 0) {
|
|
3222
|
+
result[key] = typeof fallback === "function" ? fallback() : fallback;
|
|
3223
|
+
}
|
|
3216
3224
|
}
|
|
3217
3225
|
return result;
|
|
3218
3226
|
}
|
|
@@ -3223,10 +3231,11 @@ function defineStrictComponent(config) {
|
|
|
3223
3231
|
};
|
|
3224
3232
|
}
|
|
3225
3233
|
function assertType(value, validator, label) {
|
|
3226
|
-
if (typeof
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3234
|
+
if (typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : DEV) {
|
|
3235
|
+
const result = validator(value, label || "value");
|
|
3236
|
+
if (result !== true) {
|
|
3237
|
+
throw new TypeError(`[SibuJS Contract] ${result}`);
|
|
3238
|
+
}
|
|
3230
3239
|
}
|
|
3231
3240
|
}
|
|
3232
3241
|
function createGuard(validator) {
|
package/dist/ui.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as AttributeSource, a as AttributeValue, B as BoundFieldProps, C as CustomElementOptions, F as FieldConfig, b as FocusTrap, c as FormConfig, d as FormField, e as FormReturn, I as IntersectionResult, M as MaskOptions, T as Toast, f as ToastInstance, V as ValidatorFn, g as VirtualList, h as VirtualListProps, _ as __resetDialogStack, i as announce, j as aria, k as bindAttrs, l as bindBoolAttr, m as bindData, n as bindField, o as creditCardMask, p as custom, q as dateMask, r as defineElement, s as dialog, t as email, u as eventBus, v as focus, w as form, x as hotkey, y as infiniteScroll, z as inputMask, D as intersection, E as lazyLoad, G as matchesPattern, H as max, J as maxLength, K as min, L as minLength, N as pagination, O as phoneMask, P as removeScopedStyle, Q as required, R as scopedStyle, S as ssnMask, U as svgElement, W as timeMask, X as toast, Y as withScopedStyle, Z as zipMask } from './customElement-CNZxEB9G.cjs';
|
|
2
|
-
export { C as ComponentProps, P as PropDef, a as PropSchema, R as RenderProp, V as Validator, b as assertType, c as compose, d as createGuard, e as createSlots, f as defineComponent, g as defineSlottedComponent, h as defineStrictComponent, v as validateProps, i as validators, w as withBoundary, j as withDefaults, k as withProps, l as withWrapper } from './contracts-
|
|
2
|
+
export { C as ComponentProps, P as PropDef, a as PropSchema, R as RenderProp, V as Validator, b as assertType, c as compose, d as createGuard, e as createSlots, f as defineComponent, g as defineSlottedComponent, h as defineStrictComponent, v as validateProps, i as validators, w as withBoundary, j as withDefaults, k as withProps, l as withWrapper } from './contracts-DBdg9J_a.cjs';
|
|
3
3
|
|
|
4
4
|
interface FormActionHandle<TArgs extends unknown[], TResult> {
|
|
5
5
|
/** Invoke the action. Rejections become `error()`, resolutions `result()`. */
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as AttributeSource, a as AttributeValue, B as BoundFieldProps, C as CustomElementOptions, F as FieldConfig, b as FocusTrap, c as FormConfig, d as FormField, e as FormReturn, I as IntersectionResult, M as MaskOptions, T as Toast, f as ToastInstance, V as ValidatorFn, g as VirtualList, h as VirtualListProps, _ as __resetDialogStack, i as announce, j as aria, k as bindAttrs, l as bindBoolAttr, m as bindData, n as bindField, o as creditCardMask, p as custom, q as dateMask, r as defineElement, s as dialog, t as email, u as eventBus, v as focus, w as form, x as hotkey, y as infiniteScroll, z as inputMask, D as intersection, E as lazyLoad, G as matchesPattern, H as max, J as maxLength, K as min, L as minLength, N as pagination, O as phoneMask, P as removeScopedStyle, Q as required, R as scopedStyle, S as ssnMask, U as svgElement, W as timeMask, X as toast, Y as withScopedStyle, Z as zipMask } from './customElement-CNZxEB9G.js';
|
|
2
|
-
export { C as ComponentProps, P as PropDef, a as PropSchema, R as RenderProp, V as Validator, b as assertType, c as compose, d as createGuard, e as createSlots, f as defineComponent, g as defineSlottedComponent, h as defineStrictComponent, v as validateProps, i as validators, w as withBoundary, j as withDefaults, k as withProps, l as withWrapper } from './contracts-
|
|
2
|
+
export { C as ComponentProps, P as PropDef, a as PropSchema, R as RenderProp, V as Validator, b as assertType, c as compose, d as createGuard, e as createSlots, f as defineComponent, g as defineSlottedComponent, h as defineStrictComponent, v as validateProps, i as validators, w as withBoundary, j as withDefaults, k as withProps, l as withWrapper } from './contracts-DBdg9J_a.js';
|
|
3
3
|
|
|
4
4
|
interface FormActionHandle<TArgs extends unknown[], TResult> {
|
|
5
5
|
/** Invoke the action. Rejections become `error()`, resolutions `result()`. */
|
package/dist/ui.js
CHANGED
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
toast,
|
|
39
39
|
withScopedStyle,
|
|
40
40
|
zipMask
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-XLO7SLIX.js";
|
|
42
42
|
import {
|
|
43
43
|
RenderProp,
|
|
44
44
|
assertType,
|
|
@@ -54,27 +54,27 @@ import {
|
|
|
54
54
|
withDefaults,
|
|
55
55
|
withProps,
|
|
56
56
|
withWrapper
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-R25EFXXC.js";
|
|
58
58
|
import {
|
|
59
59
|
createId
|
|
60
60
|
} from "./chunk-CCSJMTRN.js";
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-VCTAEPSB.js";
|
|
62
|
+
import "./chunk-W2EQ7X2L.js";
|
|
63
63
|
import "./chunk-IXKSNWV5.js";
|
|
64
64
|
import {
|
|
65
65
|
globalSingleton
|
|
66
66
|
} from "./chunk-7ZHH77QA.js";
|
|
67
67
|
import {
|
|
68
68
|
effect
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-7GIHSAWB.js";
|
|
70
70
|
import "./chunk-5DXA2J44.js";
|
|
71
71
|
import {
|
|
72
72
|
registerDisposer
|
|
73
73
|
} from "./chunk-QKRPLZ2V.js";
|
|
74
74
|
import {
|
|
75
75
|
signal
|
|
76
|
-
} from "./chunk-
|
|
77
|
-
import "./chunk-
|
|
76
|
+
} from "./chunk-NVNJH22U.js";
|
|
77
|
+
import "./chunk-3BTTCZ5J.js";
|
|
78
78
|
import "./chunk-2WLZ6757.js";
|
|
79
79
|
|
|
80
80
|
// src/ui/formAction.ts
|
package/dist/widgets.cjs
CHANGED
|
@@ -600,7 +600,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
// src/reactivity/track.ts
|
|
603
|
-
var _runtimeVersion = true ? "4.
|
|
603
|
+
var _runtimeVersion = true ? "4.4.0" : "dev";
|
|
604
604
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
605
605
|
function resolveReactiveApi() {
|
|
606
606
|
const g = globalThis;
|
package/dist/widgets.js
CHANGED
|
@@ -8,15 +8,15 @@ import {
|
|
|
8
8
|
select,
|
|
9
9
|
tabs,
|
|
10
10
|
tooltip
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-HFCOH2GN.js";
|
|
12
|
+
import "./chunk-RR7M3FHM.js";
|
|
13
13
|
import "./chunk-CCSJMTRN.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-W2EQ7X2L.js";
|
|
15
15
|
import "./chunk-IXKSNWV5.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-7GIHSAWB.js";
|
|
17
17
|
import "./chunk-5DXA2J44.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-NVNJH22U.js";
|
|
19
|
+
import "./chunk-3BTTCZ5J.js";
|
|
20
20
|
import "./chunk-2WLZ6757.js";
|
|
21
21
|
export {
|
|
22
22
|
accordion,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sibujs",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "A lightweight, function-based frontend framework that combines the best of React, Svelte, and Vue — with zero VDOM and maximum simplicity. Designed for developers who want fine-grained reactivity and full control without compilation or magic.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"frontend",
|
|
@@ -133,6 +133,12 @@
|
|
|
133
133
|
},
|
|
134
134
|
"./cdn-dev": {
|
|
135
135
|
"default": "./dist/cdn.dev.global.js"
|
|
136
|
+
},
|
|
137
|
+
"./cdn-full": {
|
|
138
|
+
"default": "./dist/cdn.full.global.js"
|
|
139
|
+
},
|
|
140
|
+
"./cdn-full-dev": {
|
|
141
|
+
"default": "./dist/cdn.full.dev.global.js"
|
|
136
142
|
}
|
|
137
143
|
},
|
|
138
144
|
"publishConfig": {
|