sibujs 4.3.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 +1 -1
- 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-7UK6BSAT.js → chunk-36S2YPP4.js} +1 -1
- package/dist/{chunk-TSL64O5L.js → chunk-3BTTCZ5J.js} +1 -1
- package/dist/{chunk-ZVYNIUOG.js → chunk-4Z3SPQ67.js} +3 -3
- package/dist/{chunk-7BPN4MXR.js → chunk-6GSIXTWX.js} +4 -4
- package/dist/{chunk-7BJLKDBI.js → chunk-7GIHSAWB.js} +1 -1
- package/dist/{chunk-L4B3Y3OM.js → chunk-7NBDXVHS.js} +1 -1
- package/dist/{chunk-2LSY4WDM.js → chunk-ADM46X22.js} +9 -9
- package/dist/{chunk-G7GPNB6N.js → chunk-HFCOH2GN.js} +4 -4
- package/dist/{chunk-7GQIRV27.js → chunk-HQSEH5F6.js} +3 -3
- package/dist/{chunk-USS5ENJ2.js → chunk-LQFGQNMV.js} +3 -3
- package/dist/{chunk-UD6YE2GW.js → chunk-LYVUX7NT.js} +2 -2
- package/dist/{chunk-AAHT6AKT.js → chunk-M2F7TZHH.js} +2 -2
- package/dist/{chunk-MYA5HEK5.js → chunk-NVNJH22U.js} +1 -1
- package/dist/{chunk-XGCZ45NH.js → chunk-PNIRUQ4C.js} +2 -2
- package/dist/{chunk-VJE6DDYM.js → chunk-R25EFXXC.js} +40 -26
- package/dist/{chunk-IYHM4FWD.js → chunk-RR7M3FHM.js} +1 -1
- package/dist/{chunk-RE6KLGMV.js → chunk-SKPTERHP.js} +1 -1
- package/dist/{chunk-R4EF7V3K.js → chunk-UCALUKB5.js} +4 -4
- package/dist/{chunk-7UBG6LDP.js → chunk-VCTAEPSB.js} +1 -1
- package/dist/{chunk-3E5YNK2F.js → chunk-W2EQ7X2L.js} +1 -1
- package/dist/{chunk-GZYQNIPS.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 +1 -1
- 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 +1 -1
- package/dist/plugins.js +6 -6
- 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
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
div,
|
|
8
8
|
span
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-36S2YPP4.js";
|
|
10
10
|
import {
|
|
11
11
|
STATIC_VALUE_RESOLVER,
|
|
12
12
|
planHeadElementEntry,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-7ZHH77QA.js";
|
|
21
21
|
import {
|
|
22
22
|
effect
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-7GIHSAWB.js";
|
|
24
24
|
import {
|
|
25
25
|
registerDisposer,
|
|
26
26
|
replaceChildrenSafely
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
batch,
|
|
30
30
|
signal
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-NVNJH22U.js";
|
|
32
32
|
|
|
33
33
|
// src/platform/head.ts
|
|
34
34
|
function escapeScriptJsonLocal(json) {
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-H3SRKIYX.js";
|
|
5
5
|
import {
|
|
6
6
|
derived
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-W2EQ7X2L.js";
|
|
8
8
|
import {
|
|
9
9
|
effect
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7GIHSAWB.js";
|
|
11
11
|
import {
|
|
12
12
|
batch,
|
|
13
13
|
signal
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NVNJH22U.js";
|
|
15
15
|
|
|
16
16
|
// src/patterns/machine.ts
|
|
17
17
|
function machine(config) {
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
} from "./chunk-52XFPGSN.js";
|
|
7
7
|
import {
|
|
8
8
|
effect
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7GIHSAWB.js";
|
|
10
10
|
import {
|
|
11
11
|
batch,
|
|
12
12
|
signal
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NVNJH22U.js";
|
|
14
14
|
import {
|
|
15
15
|
reportError
|
|
16
16
|
} from "./chunk-2WLZ6757.js";
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
} from "./chunk-7ZHH77QA.js";
|
|
7
7
|
import {
|
|
8
8
|
effect
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7GIHSAWB.js";
|
|
10
10
|
import {
|
|
11
11
|
dispose,
|
|
12
12
|
replaceChildrenSafely
|
|
13
13
|
} from "./chunk-QKRPLZ2V.js";
|
|
14
14
|
import {
|
|
15
15
|
signal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NVNJH22U.js";
|
|
17
17
|
import {
|
|
18
18
|
DEV,
|
|
19
19
|
devWarn,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bindAttribute,
|
|
3
3
|
setSafeAttribute
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VCTAEPSB.js";
|
|
5
5
|
import {
|
|
6
6
|
isEventHandlerAttr,
|
|
7
7
|
sanitizeCSSValue,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-QKRPLZ2V.js";
|
|
14
14
|
import {
|
|
15
15
|
reactiveBinding
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3BTTCZ5J.js";
|
|
17
17
|
import {
|
|
18
18
|
DEV,
|
|
19
19
|
devWarn,
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEV,
|
|
3
|
+
devWarn
|
|
4
|
+
} from "./chunk-2WLZ6757.js";
|
|
5
|
+
|
|
1
6
|
// src/patterns/hoc.ts
|
|
2
7
|
function withWrapper(WrappedComponent, wrapper) {
|
|
3
8
|
return (props) => wrapper(WrappedComponent, props);
|
|
@@ -113,31 +118,39 @@ var validators = {
|
|
|
113
118
|
};
|
|
114
119
|
function validateProps(props, schema) {
|
|
115
120
|
const result = { ...props };
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
121
|
+
if (typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : DEV) {
|
|
122
|
+
const errors = [];
|
|
123
|
+
for (const [key, def] of Object.entries(schema)) {
|
|
124
|
+
const propDef = typeof def === "function" ? { type: def } : def;
|
|
125
|
+
if (result[key] == null && propDef.default !== void 0) {
|
|
126
|
+
result[key] = typeof propDef.default === "function" ? propDef.default() : propDef.default;
|
|
127
|
+
}
|
|
128
|
+
if (propDef.required && result[key] == null) {
|
|
129
|
+
errors.push(`Prop '${key}' is required`);
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if (result[key] == null) continue;
|
|
133
|
+
if (propDef.type) {
|
|
134
|
+
const typeResult = propDef.type(result[key], key);
|
|
135
|
+
if (typeResult !== true) errors.push(typeResult);
|
|
136
|
+
}
|
|
137
|
+
if (propDef.validator) {
|
|
138
|
+
const validResult = propDef.validator(result[key], key);
|
|
139
|
+
if (validResult !== true) errors.push(validResult);
|
|
140
|
+
}
|
|
132
141
|
}
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
|
|
142
|
+
if (errors.length > 0) {
|
|
143
|
+
devWarn(`Prop validation errors:
|
|
144
|
+
${errors.map((e) => ` - ${e}`).join("\n")}`);
|
|
136
145
|
}
|
|
146
|
+
return result;
|
|
137
147
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
148
|
+
for (const [key, def] of Object.entries(schema)) {
|
|
149
|
+
if (typeof def === "function") continue;
|
|
150
|
+
const fallback = def.default;
|
|
151
|
+
if (result[key] == null && fallback !== void 0) {
|
|
152
|
+
result[key] = typeof fallback === "function" ? fallback() : fallback;
|
|
153
|
+
}
|
|
141
154
|
}
|
|
142
155
|
return result;
|
|
143
156
|
}
|
|
@@ -148,10 +161,11 @@ function defineStrictComponent(config) {
|
|
|
148
161
|
};
|
|
149
162
|
}
|
|
150
163
|
function assertType(value, validator, label) {
|
|
151
|
-
if (typeof
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
164
|
+
if (typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : DEV) {
|
|
165
|
+
const result = validator(value, label || "value");
|
|
166
|
+
if (result !== true) {
|
|
167
|
+
throw new TypeError(`[SibuJS Contract] ${result}`);
|
|
168
|
+
}
|
|
155
169
|
}
|
|
156
170
|
}
|
|
157
171
|
function createGuard(validator) {
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./chunk-WWV3SJ3L.js";
|
|
4
4
|
import {
|
|
5
5
|
tagFactory
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PNIRUQ4C.js";
|
|
7
7
|
import {
|
|
8
8
|
derived
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-W2EQ7X2L.js";
|
|
10
10
|
import {
|
|
11
11
|
effect
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7GIHSAWB.js";
|
|
13
13
|
import {
|
|
14
14
|
batch,
|
|
15
15
|
signal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NVNJH22U.js";
|
|
17
17
|
|
|
18
18
|
// src/ecosystem/adapters/mobx.ts
|
|
19
19
|
function mobXAdapter(options) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bindAttribute,
|
|
3
3
|
setSafeAttribute
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VCTAEPSB.js";
|
|
5
5
|
import {
|
|
6
6
|
derived
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-W2EQ7X2L.js";
|
|
8
8
|
import {
|
|
9
9
|
isEventHandlerAttr
|
|
10
10
|
} from "./chunk-IXKSNWV5.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-7ZHH77QA.js";
|
|
14
14
|
import {
|
|
15
15
|
effect
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7GIHSAWB.js";
|
|
17
17
|
import {
|
|
18
18
|
dispose,
|
|
19
19
|
registerDisposer,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
} from "./chunk-QKRPLZ2V.js";
|
|
22
22
|
import {
|
|
23
23
|
signal
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-NVNJH22U.js";
|
|
25
25
|
import {
|
|
26
26
|
track
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-3BTTCZ5J.js";
|
|
28
28
|
import {
|
|
29
29
|
reportError
|
|
30
30
|
} from "./chunk-2WLZ6757.js";
|
|
@@ -182,6 +182,15 @@ declare function withProps<OuterProps extends object, InnerProps extends object>
|
|
|
182
182
|
/**
|
|
183
183
|
* Runtime prop validation and strict typing contracts for SibuJS.
|
|
184
184
|
* Provides runtime type checking for component props in development mode.
|
|
185
|
+
*
|
|
186
|
+
* Both diagnostics here gate on `DEV`, the same foldable flag the rest of the
|
|
187
|
+
* framework uses, so a `__SIBU_DEV__: false` define removes them and their
|
|
188
|
+
* message text entirely. They used to test `process.env.NODE_ENV` directly,
|
|
189
|
+
* which is not a `define` target and does not exist in a browser at all — so
|
|
190
|
+
* every browser build treated itself as development: `validateProps` ran and
|
|
191
|
+
* warned, `assertType` threw, and the strings shipped. That went unnoticed
|
|
192
|
+
* while these functions were reachable only through a bundler; putting
|
|
193
|
+
* `patterns` on the CDN made them a production artifact.
|
|
185
194
|
*/
|
|
186
195
|
/** Validator function: returns true if valid, or an error message string. */
|
|
187
196
|
type Validator<T = unknown> = (value: T, propName: string) => true | string;
|
|
@@ -212,9 +221,19 @@ type PropSchema<Props> = {
|
|
|
212
221
|
[K in keyof Props]: PropDef<Props[K]> | Validator<Props[K]>;
|
|
213
222
|
};
|
|
214
223
|
/**
|
|
215
|
-
* Validate props against a schema
|
|
216
|
-
*
|
|
217
|
-
*
|
|
224
|
+
* Validate props against a schema, returning the props with defaults applied.
|
|
225
|
+
*
|
|
226
|
+
* Defaults are production behaviour; the checking is development-only and is
|
|
227
|
+
* compiled out of production builds. The two are not interchangeable when the
|
|
228
|
+
* schema's callbacks touch outside state: a validator that runs in development
|
|
229
|
+
* and not in production can leave a later property's default factory reading
|
|
230
|
+
* different state. Keep defaults and validators free of side effects if the
|
|
231
|
+
* two modes must agree exactly.
|
|
232
|
+
*
|
|
233
|
+
* @param props - The props to validate. Not mutated.
|
|
234
|
+
* @param schema - Per-property definitions, in either the shorthand
|
|
235
|
+
* (a bare {@link Validator}) or object form.
|
|
236
|
+
* @returns A new object: the props, plus any defaults that applied.
|
|
218
237
|
*/
|
|
219
238
|
declare function validateProps<Props extends object>(props: Partial<Props>, schema: PropSchema<Props>): Props;
|
|
220
239
|
/**
|
|
@@ -228,7 +247,9 @@ declare function defineStrictComponent<Props extends object>(config: {
|
|
|
228
247
|
}): (props: Partial<Props>) => HTMLElement;
|
|
229
248
|
/**
|
|
230
249
|
* Assert that a value satisfies a contract at runtime.
|
|
231
|
-
*
|
|
250
|
+
*
|
|
251
|
+
* No-op in production builds — genuinely, now. The previous guard returned early
|
|
252
|
+
* only when `process` existed, so in a browser it fell through and threw.
|
|
232
253
|
*/
|
|
233
254
|
declare function assertType<T>(value: unknown, validator: Validator<T>, label?: string): asserts value is T;
|
|
234
255
|
/**
|
|
@@ -182,6 +182,15 @@ declare function withProps<OuterProps extends object, InnerProps extends object>
|
|
|
182
182
|
/**
|
|
183
183
|
* Runtime prop validation and strict typing contracts for SibuJS.
|
|
184
184
|
* Provides runtime type checking for component props in development mode.
|
|
185
|
+
*
|
|
186
|
+
* Both diagnostics here gate on `DEV`, the same foldable flag the rest of the
|
|
187
|
+
* framework uses, so a `__SIBU_DEV__: false` define removes them and their
|
|
188
|
+
* message text entirely. They used to test `process.env.NODE_ENV` directly,
|
|
189
|
+
* which is not a `define` target and does not exist in a browser at all — so
|
|
190
|
+
* every browser build treated itself as development: `validateProps` ran and
|
|
191
|
+
* warned, `assertType` threw, and the strings shipped. That went unnoticed
|
|
192
|
+
* while these functions were reachable only through a bundler; putting
|
|
193
|
+
* `patterns` on the CDN made them a production artifact.
|
|
185
194
|
*/
|
|
186
195
|
/** Validator function: returns true if valid, or an error message string. */
|
|
187
196
|
type Validator<T = unknown> = (value: T, propName: string) => true | string;
|
|
@@ -212,9 +221,19 @@ type PropSchema<Props> = {
|
|
|
212
221
|
[K in keyof Props]: PropDef<Props[K]> | Validator<Props[K]>;
|
|
213
222
|
};
|
|
214
223
|
/**
|
|
215
|
-
* Validate props against a schema
|
|
216
|
-
*
|
|
217
|
-
*
|
|
224
|
+
* Validate props against a schema, returning the props with defaults applied.
|
|
225
|
+
*
|
|
226
|
+
* Defaults are production behaviour; the checking is development-only and is
|
|
227
|
+
* compiled out of production builds. The two are not interchangeable when the
|
|
228
|
+
* schema's callbacks touch outside state: a validator that runs in development
|
|
229
|
+
* and not in production can leave a later property's default factory reading
|
|
230
|
+
* different state. Keep defaults and validators free of side effects if the
|
|
231
|
+
* two modes must agree exactly.
|
|
232
|
+
*
|
|
233
|
+
* @param props - The props to validate. Not mutated.
|
|
234
|
+
* @param schema - Per-property definitions, in either the shorthand
|
|
235
|
+
* (a bare {@link Validator}) or object form.
|
|
236
|
+
* @returns A new object: the props, plus any defaults that applied.
|
|
218
237
|
*/
|
|
219
238
|
declare function validateProps<Props extends object>(props: Partial<Props>, schema: PropSchema<Props>): Props;
|
|
220
239
|
/**
|
|
@@ -228,7 +247,9 @@ declare function defineStrictComponent<Props extends object>(config: {
|
|
|
228
247
|
}): (props: Partial<Props>) => HTMLElement;
|
|
229
248
|
/**
|
|
230
249
|
* Assert that a value satisfies a contract at runtime.
|
|
231
|
-
*
|
|
250
|
+
*
|
|
251
|
+
* No-op in production builds — genuinely, now. The previous guard returned early
|
|
252
|
+
* only when `process` existed, so in a browser it fell through and threw.
|
|
232
253
|
*/
|
|
233
254
|
declare function assertType<T>(value: unknown, validator: Validator<T>, label?: string): asserts value is T;
|
|
234
255
|
/**
|
package/dist/data.cjs
CHANGED
|
@@ -604,7 +604,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
// src/reactivity/track.ts
|
|
607
|
-
var _runtimeVersion = true ? "4.
|
|
607
|
+
var _runtimeVersion = true ? "4.4.0" : "dev";
|
|
608
608
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
609
609
|
function resolveReactiveApi() {
|
|
610
610
|
const g = globalThis;
|
package/dist/data.js
CHANGED
|
@@ -20,15 +20,15 @@ import {
|
|
|
20
20
|
syncAdapter,
|
|
21
21
|
throttle,
|
|
22
22
|
withRetry
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-6GSIXTWX.js";
|
|
24
|
+
import "./chunk-7NBDXVHS.js";
|
|
25
|
+
import "./chunk-W2EQ7X2L.js";
|
|
26
26
|
import "./chunk-IXKSNWV5.js";
|
|
27
27
|
import "./chunk-7ZHH77QA.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-7GIHSAWB.js";
|
|
29
29
|
import "./chunk-5DXA2J44.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-NVNJH22U.js";
|
|
31
|
+
import "./chunk-3BTTCZ5J.js";
|
|
32
32
|
import "./chunk-2WLZ6757.js";
|
|
33
33
|
export {
|
|
34
34
|
__resetQueryCache,
|
package/dist/devtools.cjs
CHANGED
|
@@ -736,7 +736,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
736
736
|
}
|
|
737
737
|
|
|
738
738
|
// src/reactivity/track.ts
|
|
739
|
-
var _runtimeVersion = true ? "4.
|
|
739
|
+
var _runtimeVersion = true ? "4.4.0" : "dev";
|
|
740
740
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
741
741
|
function resolveReactiveApi() {
|
|
742
742
|
const g = globalThis;
|
package/dist/devtools.js
CHANGED
|
@@ -35,14 +35,14 @@ import {
|
|
|
35
35
|
trackCleanup,
|
|
36
36
|
walkDependencyGraph,
|
|
37
37
|
withErrorTracking
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-4Z3SPQ67.js";
|
|
39
39
|
import "./chunk-IXKSNWV5.js";
|
|
40
40
|
import "./chunk-7ZHH77QA.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-7GIHSAWB.js";
|
|
42
42
|
import "./chunk-5DXA2J44.js";
|
|
43
43
|
import "./chunk-QKRPLZ2V.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-NVNJH22U.js";
|
|
45
|
+
import "./chunk-3BTTCZ5J.js";
|
|
46
46
|
import {
|
|
47
47
|
isDev
|
|
48
48
|
} from "./chunk-2WLZ6757.js";
|
package/dist/ecosystem.cjs
CHANGED
|
@@ -597,7 +597,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
597
597
|
}
|
|
598
598
|
|
|
599
599
|
// src/reactivity/track.ts
|
|
600
|
-
var _runtimeVersion = true ? "4.
|
|
600
|
+
var _runtimeVersion = true ? "4.4.0" : "dev";
|
|
601
601
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
602
602
|
function resolveReactiveApi() {
|
|
603
603
|
const g = globalThis;
|
package/dist/ecosystem.js
CHANGED
|
@@ -7,18 +7,18 @@ import {
|
|
|
7
7
|
mobXAdapter,
|
|
8
8
|
reduxAdapter,
|
|
9
9
|
zustandAdapter
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UCALUKB5.js";
|
|
11
11
|
import "./chunk-WWV3SJ3L.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-PNIRUQ4C.js";
|
|
13
|
+
import "./chunk-VCTAEPSB.js";
|
|
14
|
+
import "./chunk-W2EQ7X2L.js";
|
|
15
15
|
import "./chunk-IXKSNWV5.js";
|
|
16
16
|
import "./chunk-7ZHH77QA.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-7GIHSAWB.js";
|
|
18
18
|
import "./chunk-5DXA2J44.js";
|
|
19
19
|
import "./chunk-QKRPLZ2V.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-NVNJH22U.js";
|
|
21
|
+
import "./chunk-3BTTCZ5J.js";
|
|
22
22
|
import "./chunk-2WLZ6757.js";
|
|
23
23
|
export {
|
|
24
24
|
antdAdapter,
|
package/dist/extras.cjs
CHANGED
|
@@ -888,7 +888,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
888
888
|
}
|
|
889
889
|
|
|
890
890
|
// src/reactivity/track.ts
|
|
891
|
-
var _runtimeVersion = true ? "4.
|
|
891
|
+
var _runtimeVersion = true ? "4.4.0" : "dev";
|
|
892
892
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
893
893
|
function resolveReactiveApi() {
|
|
894
894
|
const g2 = globalThis;
|
|
@@ -5122,31 +5122,39 @@ var validators = {
|
|
|
5122
5122
|
};
|
|
5123
5123
|
function validateProps(props, schema) {
|
|
5124
5124
|
const result = { ...props };
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5125
|
+
if (typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : DEV) {
|
|
5126
|
+
const errors = [];
|
|
5127
|
+
for (const [key, def] of Object.entries(schema)) {
|
|
5128
|
+
const propDef = typeof def === "function" ? { type: def } : def;
|
|
5129
|
+
if (result[key] == null && propDef.default !== void 0) {
|
|
5130
|
+
result[key] = typeof propDef.default === "function" ? propDef.default() : propDef.default;
|
|
5131
|
+
}
|
|
5132
|
+
if (propDef.required && result[key] == null) {
|
|
5133
|
+
errors.push(`Prop '${key}' is required`);
|
|
5134
|
+
continue;
|
|
5135
|
+
}
|
|
5136
|
+
if (result[key] == null) continue;
|
|
5137
|
+
if (propDef.type) {
|
|
5138
|
+
const typeResult = propDef.type(result[key], key);
|
|
5139
|
+
if (typeResult !== true) errors.push(typeResult);
|
|
5140
|
+
}
|
|
5141
|
+
if (propDef.validator) {
|
|
5142
|
+
const validResult = propDef.validator(result[key], key);
|
|
5143
|
+
if (validResult !== true) errors.push(validResult);
|
|
5144
|
+
}
|
|
5141
5145
|
}
|
|
5142
|
-
if (
|
|
5143
|
-
|
|
5144
|
-
|
|
5146
|
+
if (errors.length > 0) {
|
|
5147
|
+
devWarn(`Prop validation errors:
|
|
5148
|
+
${errors.map((e) => ` - ${e}`).join("\n")}`);
|
|
5145
5149
|
}
|
|
5150
|
+
return result;
|
|
5146
5151
|
}
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5152
|
+
for (const [key, def] of Object.entries(schema)) {
|
|
5153
|
+
if (typeof def === "function") continue;
|
|
5154
|
+
const fallback = def.default;
|
|
5155
|
+
if (result[key] == null && fallback !== void 0) {
|
|
5156
|
+
result[key] = typeof fallback === "function" ? fallback() : fallback;
|
|
5157
|
+
}
|
|
5150
5158
|
}
|
|
5151
5159
|
return result;
|
|
5152
5160
|
}
|
|
@@ -5157,10 +5165,11 @@ function defineStrictComponent(config) {
|
|
|
5157
5165
|
};
|
|
5158
5166
|
}
|
|
5159
5167
|
function assertType(value, validator, label2) {
|
|
5160
|
-
if (typeof
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5168
|
+
if (typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : DEV) {
|
|
5169
|
+
const result = validator(value, label2 || "value");
|
|
5170
|
+
if (result !== true) {
|
|
5171
|
+
throw new TypeError(`[SibuJS Contract] ${result}`);
|
|
5172
|
+
}
|
|
5164
5173
|
}
|
|
5165
5174
|
}
|
|
5166
5175
|
function createGuard(validator) {
|
package/dist/extras.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ConflictStrategy, InfiniteQueryOptions, InfiniteQueryResult, LoaderRoute, MutationOptions, MutationResult, OfflineStore, OfflineStoreOptions, QueryOptions, QueryResult, Resource, ResourceOptions, RetryOptions, RouteLoaderFn, SyncAdapter, SyncChange, SyncConflict, SyncResult, __resetQueryCache, calculateDelay, clearQueryCache, debounce, executeLoader, getQueryData, infiniteQuery, invalidateQueries, loaderData, mutation, offlineStore, preloadRoute, previous, query, resource, setQueryData, socket, stream, syncAdapter, throttle, withRetry } from './data.cjs';
|
|
2
2
|
export { AnimationFrameOptions, BoundsRect, GamepadSnapshot, ImageLoaderState, KeyboardOptions, MouseOptions, MutationObserverOptions, SpeakOptions, SwipeDirection, SwipeOptions, TextSelectionState, UrlStateOptions, animationFrame, battery, bounds, broadcast, clipboard, colorScheme, draggable, dropZone, favicon, formatCurrency, formatNumber, fullscreen, gamepad, geo, idle, imageLoader, keyboard, media, mouse, mutationObserver, network, online, permissions, pointerLock, resize, scroll, speech, svgFavicon, swipe, textSelection, title, urlState, vibrate, visibility, wakeLock, windowSize } from './browser.cjs';
|
|
3
3
|
export { GlobalStore, MachineConfig, MachineReturn, Middleware, PersistOptions, Selector, StoreActionMap, TimeTravelReturn, globalStore, machine, optimistic, optimisticList, persisted, timeline } from './patterns.cjs';
|
|
4
|
-
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-
|
|
4
|
+
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';
|
|
5
5
|
export { AnimationPreset, PresetOptions, SlideDirection, SpringOptions, TransitionGroup, TransitionGroupOptions, TransitionOptions, animate, bounceIn, bounceOut, fadeIn, fadeOut, flipIn, prefersReducedMotion, pulse, reducedMotion, scaleDown, scaleUp, sequence, shake, slideIn, slideOut, spring, springSignal, stagger, transition, viewTransition } from './motion.cjs';
|
|
6
6
|
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';
|
|
7
7
|
export { ChunkConfig, DOMPool, Features, NormalizeResult, NormalizedEntities, NormalizedSchema, NormalizedState, NormalizedStoreActions, Priority, PriorityLevel, block, cloneTemplate, conditional, createChunkRegistry, deferredValue, denormalize, devOnly, flushScheduler, getDOMPool, hoistable, lazyChunk, noSideEffect, normalize, normalizedStore, pendingTasks, precompile, prefetch, preloadImage, preloadModule, preloadModules, preloadResource, processInChunks, pure, resetIdCounter, scheduleUpdate, setIdPrefix, startTransition, staticTemplate, transitionState, uniqueId, yieldToMain } from './performance.cjs';
|
package/dist/extras.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ConflictStrategy, InfiniteQueryOptions, InfiniteQueryResult, LoaderRoute, MutationOptions, MutationResult, OfflineStore, OfflineStoreOptions, QueryOptions, QueryResult, Resource, ResourceOptions, RetryOptions, RouteLoaderFn, SyncAdapter, SyncChange, SyncConflict, SyncResult, __resetQueryCache, calculateDelay, clearQueryCache, debounce, executeLoader, getQueryData, infiniteQuery, invalidateQueries, loaderData, mutation, offlineStore, preloadRoute, previous, query, resource, setQueryData, socket, stream, syncAdapter, throttle, withRetry } from './data.js';
|
|
2
2
|
export { AnimationFrameOptions, BoundsRect, GamepadSnapshot, ImageLoaderState, KeyboardOptions, MouseOptions, MutationObserverOptions, SpeakOptions, SwipeDirection, SwipeOptions, TextSelectionState, UrlStateOptions, animationFrame, battery, bounds, broadcast, clipboard, colorScheme, draggable, dropZone, favicon, formatCurrency, formatNumber, fullscreen, gamepad, geo, idle, imageLoader, keyboard, media, mouse, mutationObserver, network, online, permissions, pointerLock, resize, scroll, speech, svgFavicon, swipe, textSelection, title, urlState, vibrate, visibility, wakeLock, windowSize } from './browser.js';
|
|
3
3
|
export { GlobalStore, MachineConfig, MachineReturn, Middleware, PersistOptions, Selector, StoreActionMap, TimeTravelReturn, globalStore, machine, optimistic, optimisticList, persisted, timeline } from './patterns.js';
|
|
4
|
-
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-
|
|
4
|
+
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';
|
|
5
5
|
export { AnimationPreset, PresetOptions, SlideDirection, SpringOptions, TransitionGroup, TransitionGroupOptions, TransitionOptions, animate, bounceIn, bounceOut, fadeIn, fadeOut, flipIn, prefersReducedMotion, pulse, reducedMotion, scaleDown, scaleUp, sequence, shake, slideIn, slideOut, spring, springSignal, stagger, transition, viewTransition } from './motion.js';
|
|
6
6
|
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';
|
|
7
7
|
export { ChunkConfig, DOMPool, Features, NormalizeResult, NormalizedEntities, NormalizedSchema, NormalizedState, NormalizedStoreActions, Priority, PriorityLevel, block, cloneTemplate, conditional, createChunkRegistry, deferredValue, denormalize, devOnly, flushScheduler, getDOMPool, hoistable, lazyChunk, noSideEffect, normalize, normalizedStore, pendingTasks, precompile, prefetch, preloadImage, preloadModule, preloadModules, preloadResource, processInChunks, pure, resetIdCounter, scheduleUpdate, setIdPrefix, startTransition, staticTemplate, transitionState, uniqueId, yieldToMain } from './performance.js';
|