sibujs 4.0.0 → 4.1.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 +5 -1
- package/dist/browser.cjs +9 -2
- package/dist/browser.js +4 -4
- package/dist/build.cjs +93 -14
- package/dist/build.js +10 -10
- package/dist/cdn.global.js +10 -10
- package/dist/{chunk-F64ZPCFE.js → chunk-4RH6D7GR.js} +3 -3
- package/dist/{chunk-WOOMUJFT.js → chunk-4U7KD3RY.js} +3 -3
- package/dist/{chunk-O3QQ3XOL.js → chunk-5GJ5RTHA.js} +1 -1
- package/dist/{chunk-GCSGGA3Q.js → chunk-ANGSYNPX.js} +77 -14
- package/dist/{chunk-VFHIVEPF.js → chunk-BMSN6NWQ.js} +3 -3
- package/dist/{chunk-ACBT6UZS.js → chunk-D3SZ4LVS.js} +9 -2
- package/dist/{chunk-EWEE7NBF.js → chunk-DAKLOMKS.js} +2 -2
- package/dist/{chunk-Z2CE42DB.js → chunk-DCDS2PQ6.js} +1 -1
- package/dist/{chunk-WN6WDFCB.js → chunk-FB7KQXZI.js} +4 -4
- package/dist/{chunk-6LG2T7LO.js → chunk-FMHIQNMP.js} +4 -4
- package/dist/{chunk-DQVUBVNX.js → chunk-I3VI34DP.js} +10 -11
- package/dist/{chunk-E62UADKL.js → chunk-IM7N5WR4.js} +1 -1
- package/dist/{chunk-RRIDJQ5C.js → chunk-KSOEJGFO.js} +1 -1
- package/dist/{chunk-3EKJK5FZ.js → chunk-LOFZHP6V.js} +2 -2
- package/dist/{chunk-ES2GERY2.js → chunk-MRAMKDHQ.js} +1 -1
- package/dist/{chunk-PBQEW5VW.js → chunk-PFTDGEPZ.js} +1 -1
- package/dist/{chunk-4MFZMLUU.js → chunk-SHDVWATN.js} +1 -1
- package/dist/{chunk-W55YHPEP.js → chunk-UFSQEO7P.js} +14 -2
- package/dist/{chunk-DR7H6UGM.js → chunk-XIHMS2Y6.js} +5 -5
- package/dist/{chunk-NF3LYCQH.js → chunk-XSZRJW76.js} +4 -4
- package/dist/data.cjs +9 -2
- package/dist/data.js +6 -6
- package/dist/devtools.cjs +9 -2
- package/dist/devtools.js +4 -4
- package/dist/ecosystem.cjs +16 -9
- package/dist/ecosystem.js +7 -7
- package/dist/extras.cjs +16 -9
- package/dist/extras.js +19 -19
- package/dist/index.cjs +94 -14
- package/dist/index.d.cts +133 -1
- package/dist/index.d.ts +133 -1
- package/dist/index.js +12 -10
- package/dist/motion.cjs +9 -2
- package/dist/motion.js +3 -3
- package/dist/patterns.cjs +9 -2
- package/dist/patterns.js +5 -5
- package/dist/performance.cjs +9 -2
- package/dist/performance.js +4 -4
- package/dist/plugins.cjs +16 -9
- package/dist/plugins.js +6 -6
- package/dist/ssr.cjs +16 -9
- package/dist/ssr.js +7 -7
- package/dist/testing.cjs +9 -2
- package/dist/testing.js +2 -2
- package/dist/ui.cjs +9 -2
- package/dist/ui.js +6 -6
- package/dist/widgets.cjs +9 -2
- package/dist/widgets.js +6 -6
- package/package.json +7 -1
|
@@ -135,40 +135,40 @@ import {
|
|
|
135
135
|
use,
|
|
136
136
|
var_,
|
|
137
137
|
video
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-MRAMKDHQ.js";
|
|
139
139
|
import {
|
|
140
140
|
trustHTML
|
|
141
141
|
} from "./chunk-HYCCIYNS.js";
|
|
142
142
|
import {
|
|
143
143
|
watch
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-KSOEJGFO.js";
|
|
145
145
|
import {
|
|
146
146
|
__resetIdCounter,
|
|
147
147
|
createId
|
|
148
148
|
} from "./chunk-CCSJMTRN.js";
|
|
149
149
|
import {
|
|
150
150
|
context
|
|
151
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-5GJ5RTHA.js";
|
|
152
152
|
import {
|
|
153
153
|
SVG_NS,
|
|
154
154
|
bindChildNode,
|
|
155
155
|
tagFactory
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-I3VI34DP.js";
|
|
157
157
|
import {
|
|
158
158
|
bindAttribute,
|
|
159
159
|
bindDynamic,
|
|
160
160
|
setSafeAttribute
|
|
161
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-SHDVWATN.js";
|
|
162
162
|
import {
|
|
163
163
|
derived
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-DCDS2PQ6.js";
|
|
165
165
|
import {
|
|
166
166
|
globalSingleton
|
|
167
167
|
} from "./chunk-7ZHH77QA.js";
|
|
168
168
|
import {
|
|
169
169
|
effect,
|
|
170
170
|
on
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-PFTDGEPZ.js";
|
|
172
172
|
import {
|
|
173
173
|
disableSSR,
|
|
174
174
|
enableSSR,
|
|
@@ -190,11 +190,13 @@ import {
|
|
|
190
190
|
import {
|
|
191
191
|
batch,
|
|
192
192
|
enqueueBatchedSignal,
|
|
193
|
+
external,
|
|
193
194
|
isBatching,
|
|
194
195
|
signal
|
|
195
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-UFSQEO7P.js";
|
|
196
197
|
import {
|
|
197
198
|
notifySubscribers,
|
|
199
|
+
reactiveBinding,
|
|
198
200
|
recordDependency,
|
|
199
201
|
resumeTracking,
|
|
200
202
|
retrack,
|
|
@@ -202,7 +204,7 @@ import {
|
|
|
202
204
|
suspendTracking,
|
|
203
205
|
track,
|
|
204
206
|
untracked
|
|
205
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-D3SZ4LVS.js";
|
|
206
208
|
import {
|
|
207
209
|
__export,
|
|
208
210
|
devAssert,
|
|
@@ -292,6 +294,7 @@ __export(index_exports, {
|
|
|
292
294
|
enhance: () => enhance,
|
|
293
295
|
enhanceAll: () => enhanceAll,
|
|
294
296
|
enqueueBatchedSignal: () => enqueueBatchedSignal,
|
|
297
|
+
external: () => external,
|
|
295
298
|
fieldset: () => fieldset,
|
|
296
299
|
figcaption: () => figcaption,
|
|
297
300
|
figure: () => figure,
|
|
@@ -3173,6 +3176,7 @@ function drainTeardowns(teardowns, label2) {
|
|
|
3173
3176
|
}
|
|
3174
3177
|
}
|
|
3175
3178
|
}
|
|
3179
|
+
var EACH_KEYS = ["text", "attr", "class", "show", "on", "cleanup"];
|
|
3176
3180
|
function resolveTarget(root, target) {
|
|
3177
3181
|
if (target == null) return root;
|
|
3178
3182
|
if (typeof target !== "string") return target;
|
|
@@ -3183,6 +3187,11 @@ function resolveTarget(root, target) {
|
|
|
3183
3187
|
return null;
|
|
3184
3188
|
}
|
|
3185
3189
|
}
|
|
3190
|
+
function bindNode(el, commit) {
|
|
3191
|
+
if (isSSR()) return () => {
|
|
3192
|
+
};
|
|
3193
|
+
return reactiveBinding(commit, el);
|
|
3194
|
+
}
|
|
3186
3195
|
function readControlValue(el) {
|
|
3187
3196
|
if (el instanceof HTMLInputElement) {
|
|
3188
3197
|
if (el.type === "checkbox") return el.checked;
|
|
@@ -3206,6 +3215,50 @@ function writeControlValue(el, value) {
|
|
|
3206
3215
|
const next = value == null ? "" : String(value);
|
|
3207
3216
|
if (el.value !== next) el.value = next;
|
|
3208
3217
|
}
|
|
3218
|
+
function applyEachBindings(ctx, el, spec, index) {
|
|
3219
|
+
const where = `ctx.each[${index}]`;
|
|
3220
|
+
if (isDev()) {
|
|
3221
|
+
for (const key of Object.keys(spec)) {
|
|
3222
|
+
devAssert(
|
|
3223
|
+
EACH_KEYS.includes(key),
|
|
3224
|
+
`${where}: unknown binding "${key}". Expected one of: ${EACH_KEYS.join(", ")}.`
|
|
3225
|
+
);
|
|
3226
|
+
}
|
|
3227
|
+
}
|
|
3228
|
+
if (spec.text !== void 0) {
|
|
3229
|
+
devAssert(typeof spec.text === "function", `${where}: "text" must be a function returning the value.`);
|
|
3230
|
+
ctx.text(el, spec.text);
|
|
3231
|
+
}
|
|
3232
|
+
if (spec.attr !== void 0) {
|
|
3233
|
+
for (const name of Object.keys(spec.attr)) {
|
|
3234
|
+
const value = spec.attr[name];
|
|
3235
|
+
devAssert(typeof value === "function", `${where}: attr["${name}"] must be a function returning the value.`);
|
|
3236
|
+
ctx.attr(el, name, value);
|
|
3237
|
+
}
|
|
3238
|
+
}
|
|
3239
|
+
if (spec.class !== void 0) {
|
|
3240
|
+
for (const name of Object.keys(spec.class)) {
|
|
3241
|
+
const on2 = spec.class[name];
|
|
3242
|
+
devAssert(typeof on2 === "function", `${where}: class["${name}"] must be a function returning a boolean.`);
|
|
3243
|
+
ctx.classed(el, name, on2);
|
|
3244
|
+
}
|
|
3245
|
+
}
|
|
3246
|
+
if (spec.show !== void 0) {
|
|
3247
|
+
devAssert(typeof spec.show === "function", `${where}: "show" must be a function returning a boolean.`);
|
|
3248
|
+
ctx.show(el, spec.show);
|
|
3249
|
+
}
|
|
3250
|
+
if (spec.on !== void 0) {
|
|
3251
|
+
for (const event of Object.keys(spec.on)) {
|
|
3252
|
+
const handler = spec.on[event];
|
|
3253
|
+
devAssert(typeof handler === "function", `${where}: on["${String(event)}"] must be a function.`);
|
|
3254
|
+
ctx.on(el, event, handler);
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
if (spec.cleanup !== void 0) {
|
|
3258
|
+
devAssert(typeof spec.cleanup === "function", `${where}: "cleanup" must be a function.`);
|
|
3259
|
+
ctx.cleanup(spec.cleanup);
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3209
3262
|
function enhance(target, setup) {
|
|
3210
3263
|
const root = typeof target === "string" ? typeof document !== "undefined" ? document.querySelector(target) : null : target;
|
|
3211
3264
|
if (!root) {
|
|
@@ -3256,7 +3309,7 @@ function enhance(target, setup) {
|
|
|
3256
3309
|
text: (t, value) => {
|
|
3257
3310
|
bind(t, (el) => {
|
|
3258
3311
|
teardowns.push(
|
|
3259
|
-
|
|
3312
|
+
bindNode(el, () => {
|
|
3260
3313
|
const v = value();
|
|
3261
3314
|
const next = v == null ? "" : String(v);
|
|
3262
3315
|
if (el.textContent !== next) el.textContent = next;
|
|
@@ -3267,7 +3320,7 @@ function enhance(target, setup) {
|
|
|
3267
3320
|
attr: (t, name, value) => {
|
|
3268
3321
|
bind(t, (el) => {
|
|
3269
3322
|
teardowns.push(
|
|
3270
|
-
|
|
3323
|
+
bindNode(el, () => {
|
|
3271
3324
|
const v = value();
|
|
3272
3325
|
const next = v == null ? null : String(v);
|
|
3273
3326
|
setSafeAttribute(el, name, next, { syncValueProperty: false, label: "enhance attr()" });
|
|
@@ -3278,7 +3331,7 @@ function enhance(target, setup) {
|
|
|
3278
3331
|
classed: (t, name, on2) => {
|
|
3279
3332
|
bind(t, (el) => {
|
|
3280
3333
|
teardowns.push(
|
|
3281
|
-
|
|
3334
|
+
bindNode(el, () => {
|
|
3282
3335
|
el.classList.toggle(name, Boolean(on2()));
|
|
3283
3336
|
})
|
|
3284
3337
|
);
|
|
@@ -3288,7 +3341,7 @@ function enhance(target, setup) {
|
|
|
3288
3341
|
bind(t, (el) => {
|
|
3289
3342
|
const prevHidden = el.hidden;
|
|
3290
3343
|
teardowns.push(
|
|
3291
|
-
|
|
3344
|
+
bindNode(el, () => {
|
|
3292
3345
|
el.hidden = !when2();
|
|
3293
3346
|
})
|
|
3294
3347
|
);
|
|
@@ -3303,7 +3356,7 @@ function enhance(target, setup) {
|
|
|
3303
3356
|
const [get, set] = state;
|
|
3304
3357
|
const evt = options?.event ?? (control instanceof HTMLSelectElement || control instanceof HTMLInputElement && (control.type === "checkbox" || control.type === "radio") ? "change" : "input");
|
|
3305
3358
|
teardowns.push(
|
|
3306
|
-
|
|
3359
|
+
bindNode(el, () => {
|
|
3307
3360
|
writeControlValue(control, get());
|
|
3308
3361
|
})
|
|
3309
3362
|
);
|
|
@@ -3312,6 +3365,16 @@ function enhance(target, setup) {
|
|
|
3312
3365
|
teardowns.push(() => control.removeEventListener(evt, onInput));
|
|
3313
3366
|
});
|
|
3314
3367
|
},
|
|
3368
|
+
each: (target_, describe) => {
|
|
3369
|
+
devAssert(typeof describe === "function", "ctx.each: second argument must be a function.");
|
|
3370
|
+
const elements = typeof target_ === "string" ? ctx.refs(target_) : Array.from(target_);
|
|
3371
|
+
for (let i2 = 0; i2 < elements.length; i2++) {
|
|
3372
|
+
const el = elements[i2];
|
|
3373
|
+
const spec = describe(el, i2);
|
|
3374
|
+
if (spec == null) continue;
|
|
3375
|
+
applyEachBindings(ctx, el, spec, i2);
|
|
3376
|
+
}
|
|
3377
|
+
},
|
|
3315
3378
|
cleanup: (fn) => {
|
|
3316
3379
|
teardowns.push(fn);
|
|
3317
3380
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
div,
|
|
8
8
|
span
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MRAMKDHQ.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-PFTDGEPZ.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-UFSQEO7P.js";
|
|
32
32
|
|
|
33
33
|
// src/platform/head.ts
|
|
34
34
|
function escapeScriptJsonLocal(json) {
|
|
@@ -222,7 +222,14 @@ function reactiveBinding(commit, ownerNode) {
|
|
|
222
222
|
subscriber._disposed = false;
|
|
223
223
|
subscriber._errorPhase = "binding";
|
|
224
224
|
subscriber._errorNode = ownerNode;
|
|
225
|
-
|
|
225
|
+
try {
|
|
226
|
+
run();
|
|
227
|
+
} catch (err) {
|
|
228
|
+
subscriber._disposed = true;
|
|
229
|
+
subscriber._errorNode = void 0;
|
|
230
|
+
cleanup(subscriber);
|
|
231
|
+
throw err;
|
|
232
|
+
}
|
|
226
233
|
return subscriber._dispose ?? (subscriber._dispose = () => {
|
|
227
234
|
subscriber._disposed = true;
|
|
228
235
|
subscriber._errorNode = void 0;
|
|
@@ -454,7 +461,7 @@ function forEachSubscriber(signal, visit) {
|
|
|
454
461
|
|
|
455
462
|
// src/reactivity/track.ts
|
|
456
463
|
var _isDev = isDev();
|
|
457
|
-
var _runtimeVersion = true ? "4.
|
|
464
|
+
var _runtimeVersion = true ? "4.1.0" : "dev";
|
|
458
465
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
459
466
|
function resolveReactiveApi() {
|
|
460
467
|
const g = globalThis;
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
} from "./chunk-52XFPGSN.js";
|
|
7
7
|
import {
|
|
8
8
|
effect
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PFTDGEPZ.js";
|
|
10
10
|
import {
|
|
11
11
|
batch,
|
|
12
12
|
signal
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-UFSQEO7P.js";
|
|
14
14
|
import {
|
|
15
15
|
reportError
|
|
16
16
|
} from "./chunk-VPP2FONR.js";
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./chunk-WWV3SJ3L.js";
|
|
4
4
|
import {
|
|
5
5
|
tagFactory
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I3VI34DP.js";
|
|
7
7
|
import {
|
|
8
8
|
derived
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DCDS2PQ6.js";
|
|
10
10
|
import {
|
|
11
11
|
effect
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PFTDGEPZ.js";
|
|
13
13
|
import {
|
|
14
14
|
batch,
|
|
15
15
|
signal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UFSQEO7P.js";
|
|
17
17
|
|
|
18
18
|
// src/ecosystem/adapters/mobx.ts
|
|
19
19
|
function mobXAdapter(options) {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
watch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KSOEJGFO.js";
|
|
4
4
|
import {
|
|
5
5
|
createId
|
|
6
6
|
} from "./chunk-CCSJMTRN.js";
|
|
7
7
|
import {
|
|
8
8
|
derived
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DCDS2PQ6.js";
|
|
10
10
|
import {
|
|
11
11
|
stripHtml
|
|
12
12
|
} from "./chunk-5INI7D2L.js";
|
|
13
13
|
import {
|
|
14
14
|
effect
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PFTDGEPZ.js";
|
|
16
16
|
import {
|
|
17
17
|
batch,
|
|
18
18
|
signal
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-UFSQEO7P.js";
|
|
20
20
|
|
|
21
21
|
// src/widgets/Combobox.ts
|
|
22
22
|
var boundComboboxes = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bindAttribute,
|
|
3
3
|
setSafeAttribute
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SHDVWATN.js";
|
|
5
5
|
import {
|
|
6
6
|
isEventHandlerAttr,
|
|
7
7
|
sanitizeCSSValue,
|
|
@@ -12,9 +12,8 @@ import {
|
|
|
12
12
|
registerDisposer
|
|
13
13
|
} from "./chunk-DHDZ7IVN.js";
|
|
14
14
|
import {
|
|
15
|
-
reactiveBinding
|
|
16
|
-
|
|
17
|
-
} from "./chunk-ACBT6UZS.js";
|
|
15
|
+
reactiveBinding
|
|
16
|
+
} from "./chunk-D3SZ4LVS.js";
|
|
18
17
|
import {
|
|
19
18
|
devWarn,
|
|
20
19
|
isDev,
|
|
@@ -136,9 +135,9 @@ function toKebab(prop) {
|
|
|
136
135
|
}
|
|
137
136
|
function applyStyle(el, style) {
|
|
138
137
|
if (typeof style === "function") {
|
|
139
|
-
const teardown =
|
|
138
|
+
const teardown = reactiveBinding(() => {
|
|
140
139
|
el.setAttribute("style", sanitizeStyleAttribute(String(style())));
|
|
141
|
-
});
|
|
140
|
+
}, el);
|
|
142
141
|
registerDisposer(el, teardown);
|
|
143
142
|
return;
|
|
144
143
|
}
|
|
@@ -152,9 +151,9 @@ function applyStyle(el, style) {
|
|
|
152
151
|
const name = toKebab(prop);
|
|
153
152
|
if (typeof val === "function") {
|
|
154
153
|
const getter = val;
|
|
155
|
-
const teardown =
|
|
154
|
+
const teardown = reactiveBinding(() => {
|
|
156
155
|
htmlEl.style.setProperty(name, sanitizeCSSValue(String(getter())));
|
|
157
|
-
});
|
|
156
|
+
}, el);
|
|
158
157
|
registerDisposer(el, teardown);
|
|
159
158
|
} else {
|
|
160
159
|
htmlEl.style.setProperty(name, sanitizeCSSValue(String(val)));
|
|
@@ -167,9 +166,9 @@ function applyClass(el, cls) {
|
|
|
167
166
|
return;
|
|
168
167
|
}
|
|
169
168
|
if (typeof cls === "function") {
|
|
170
|
-
const teardown =
|
|
169
|
+
const teardown = reactiveBinding(() => {
|
|
171
170
|
el.setAttribute("class", cls());
|
|
172
|
-
});
|
|
171
|
+
}, el);
|
|
173
172
|
registerDisposer(el, teardown);
|
|
174
173
|
return;
|
|
175
174
|
}
|
|
@@ -194,7 +193,7 @@ function applyClass(el, cls) {
|
|
|
194
193
|
}
|
|
195
194
|
el.setAttribute("class", r);
|
|
196
195
|
};
|
|
197
|
-
const teardown =
|
|
196
|
+
const teardown = reactiveBinding(update, el);
|
|
198
197
|
registerDisposer(el, teardown);
|
|
199
198
|
} else {
|
|
200
199
|
el.setAttribute("class", result);
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
} from "./chunk-7ZHH77QA.js";
|
|
7
7
|
import {
|
|
8
8
|
effect
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PFTDGEPZ.js";
|
|
10
10
|
import {
|
|
11
11
|
dispose,
|
|
12
12
|
replaceChildrenSafely
|
|
13
13
|
} from "./chunk-DHDZ7IVN.js";
|
|
14
14
|
import {
|
|
15
15
|
signal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UFSQEO7P.js";
|
|
17
17
|
import {
|
|
18
18
|
devWarn,
|
|
19
19
|
isDev,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
notifySubscribers,
|
|
4
4
|
queueSignalNotification,
|
|
5
5
|
recordDependency
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-D3SZ4LVS.js";
|
|
7
7
|
import {
|
|
8
8
|
isDev
|
|
9
9
|
} from "./chunk-VPP2FONR.js";
|
|
@@ -129,10 +129,22 @@ function signal(initial, options) {
|
|
|
129
129
|
}
|
|
130
130
|
return [get, set];
|
|
131
131
|
}
|
|
132
|
+
function external(options) {
|
|
133
|
+
const [version, bump] = signal(0, options?.name ? { name: options.name } : void 0);
|
|
134
|
+
return {
|
|
135
|
+
track() {
|
|
136
|
+
version();
|
|
137
|
+
},
|
|
138
|
+
invalidate() {
|
|
139
|
+
bump((n) => n + 1);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
132
143
|
|
|
133
144
|
export {
|
|
134
145
|
batch,
|
|
135
146
|
enqueueBatchedSignal,
|
|
136
147
|
isBatching,
|
|
137
|
-
signal
|
|
148
|
+
signal,
|
|
149
|
+
external
|
|
138
150
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bindAttribute,
|
|
3
3
|
setSafeAttribute
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SHDVWATN.js";
|
|
5
5
|
import {
|
|
6
6
|
derived
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DCDS2PQ6.js";
|
|
8
8
|
import {
|
|
9
9
|
isEventHandlerAttr
|
|
10
10
|
} from "./chunk-5INI7D2L.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-7ZHH77QA.js";
|
|
14
14
|
import {
|
|
15
15
|
effect
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PFTDGEPZ.js";
|
|
17
17
|
import {
|
|
18
18
|
dispose,
|
|
19
19
|
registerDisposer,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
} from "./chunk-DHDZ7IVN.js";
|
|
22
22
|
import {
|
|
23
23
|
signal
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-UFSQEO7P.js";
|
|
25
25
|
import {
|
|
26
26
|
track
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-D3SZ4LVS.js";
|
|
28
28
|
import {
|
|
29
29
|
reportError
|
|
30
30
|
} from "./chunk-VPP2FONR.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
context
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5GJ5RTHA.js";
|
|
4
4
|
import {
|
|
5
5
|
derived
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DCDS2PQ6.js";
|
|
7
7
|
import {
|
|
8
8
|
sanitizeUrl
|
|
9
9
|
} from "./chunk-5INI7D2L.js";
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
} from "./chunk-7ZHH77QA.js";
|
|
13
13
|
import {
|
|
14
14
|
effect
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PFTDGEPZ.js";
|
|
16
16
|
import {
|
|
17
17
|
getRequestScopedCache
|
|
18
18
|
} from "./chunk-TIRZCERI.js";
|
|
19
19
|
import {
|
|
20
20
|
batch,
|
|
21
21
|
signal
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-UFSQEO7P.js";
|
|
23
23
|
|
|
24
24
|
// src/data/abort.ts
|
|
25
25
|
function isAbortError(error) {
|
package/dist/data.cjs
CHANGED
|
@@ -372,7 +372,14 @@ function reactiveBinding(commit, ownerNode) {
|
|
|
372
372
|
subscriber._disposed = false;
|
|
373
373
|
subscriber._errorPhase = "binding";
|
|
374
374
|
subscriber._errorNode = ownerNode;
|
|
375
|
-
|
|
375
|
+
try {
|
|
376
|
+
run();
|
|
377
|
+
} catch (err) {
|
|
378
|
+
subscriber._disposed = true;
|
|
379
|
+
subscriber._errorNode = void 0;
|
|
380
|
+
cleanup(subscriber);
|
|
381
|
+
throw err;
|
|
382
|
+
}
|
|
376
383
|
return subscriber._dispose ?? (subscriber._dispose = () => {
|
|
377
384
|
subscriber._disposed = true;
|
|
378
385
|
subscriber._errorNode = void 0;
|
|
@@ -604,7 +611,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
604
611
|
|
|
605
612
|
// src/reactivity/track.ts
|
|
606
613
|
var _isDev2 = isDev();
|
|
607
|
-
var _runtimeVersion = true ? "4.
|
|
614
|
+
var _runtimeVersion = true ? "4.1.0" : "dev";
|
|
608
615
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
609
616
|
function resolveReactiveApi() {
|
|
610
617
|
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-XSZRJW76.js";
|
|
24
|
+
import "./chunk-5GJ5RTHA.js";
|
|
25
|
+
import "./chunk-DCDS2PQ6.js";
|
|
26
26
|
import "./chunk-5INI7D2L.js";
|
|
27
27
|
import "./chunk-7ZHH77QA.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-PFTDGEPZ.js";
|
|
29
29
|
import "./chunk-TIRZCERI.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-UFSQEO7P.js";
|
|
31
|
+
import "./chunk-D3SZ4LVS.js";
|
|
32
32
|
import "./chunk-VPP2FONR.js";
|
|
33
33
|
export {
|
|
34
34
|
__resetQueryCache,
|
package/dist/devtools.cjs
CHANGED
|
@@ -499,7 +499,14 @@ function reactiveBinding(commit, ownerNode) {
|
|
|
499
499
|
subscriber._disposed = false;
|
|
500
500
|
subscriber._errorPhase = "binding";
|
|
501
501
|
subscriber._errorNode = ownerNode;
|
|
502
|
-
|
|
502
|
+
try {
|
|
503
|
+
run();
|
|
504
|
+
} catch (err) {
|
|
505
|
+
subscriber._disposed = true;
|
|
506
|
+
subscriber._errorNode = void 0;
|
|
507
|
+
cleanup(subscriber);
|
|
508
|
+
throw err;
|
|
509
|
+
}
|
|
503
510
|
return subscriber._dispose ?? (subscriber._dispose = () => {
|
|
504
511
|
subscriber._disposed = true;
|
|
505
512
|
subscriber._errorNode = void 0;
|
|
@@ -731,7 +738,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
731
738
|
|
|
732
739
|
// src/reactivity/track.ts
|
|
733
740
|
var _isDev2 = isDev();
|
|
734
|
-
var _runtimeVersion = true ? "4.
|
|
741
|
+
var _runtimeVersion = true ? "4.1.0" : "dev";
|
|
735
742
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
736
743
|
function resolveReactiveApi() {
|
|
737
744
|
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-4RH6D7GR.js";
|
|
39
39
|
import "./chunk-5INI7D2L.js";
|
|
40
40
|
import "./chunk-7ZHH77QA.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-PFTDGEPZ.js";
|
|
42
42
|
import "./chunk-TIRZCERI.js";
|
|
43
43
|
import "./chunk-DHDZ7IVN.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-UFSQEO7P.js";
|
|
45
|
+
import "./chunk-D3SZ4LVS.js";
|
|
46
46
|
import {
|
|
47
47
|
isDev
|
|
48
48
|
} from "./chunk-VPP2FONR.js";
|