voodoojs 0.10.0 → 0.11.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 +1 -1
- package/dist/{chunk-H64IUSGJ.js → chunk-5GWN7E6N.js} +4 -4
- package/dist/{chunk-3JV2AYK6.js → chunk-EYGQD7OP.js} +3 -3
- package/dist/{chunk-H3RGM7PR.js → chunk-FBQPFIHZ.js} +4 -4
- package/dist/{chunk-HW75QJLQ.js → chunk-KAS77SGY.js} +5 -5
- package/dist/{chunk-OUEXXXTU.js → chunk-NUBOX6YQ.js} +23 -8
- package/dist/{chunk-EYNFAYEV.js → chunk-OTRGHJIJ.js} +4 -4
- package/dist/{chunk-QWQPKMUH.js → chunk-PBZCYF2Y.js} +13 -13
- package/dist/{chunk-TFDCAZYU.js → chunk-QL2GIGVQ.js} +4 -4
- package/dist/{chunk-WGMUFP5Q.js → chunk-TZJSPNLV.js} +5 -5
- package/dist/{chunk-IK4MQQTO.js → chunk-VQEJ4DTE.js} +6 -6
- package/dist/{chunk-PXUSD6TT.js → chunk-WIXAZJYS.js} +3 -3
- package/dist/essential.cjs +14 -2
- package/dist/essential.js +10 -10
- package/dist/gpu.cjs +1 -1
- package/dist/gpu.js +10 -10
- package/dist/http.cjs +1 -1
- package/dist/http.js +5 -5
- package/dist/index.cjs +53 -5
- package/dist/index.js +56 -23
- package/dist/reactivity.cjs +1 -1
- package/dist/reactivity.js +2 -2
- package/dist/socket.cjs +1 -1
- package/dist/socket.js +9 -9
- package/dist/style-ZM3TAT4K.js +5 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +2 -2
- package/dist/voodoo.core.js +14 -4
- package/dist/voodoo.core.min.js +13 -13
- package/dist/voodoo.full.js +55 -8
- package/dist/voodoo.full.min.js +37 -37
- package/dist/voodoo.js +14 -4
- package/dist/voodoo.min.js +21 -21
- package/package.json +1 -1
- package/dist/style-NW74ROC5.js +0 -5
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { core, sound, hotkey, palette, registerMask, unmask, applyMask, masks, mask, clearErrors, showFieldError, showFormErrors, messages, serializeForm, validate, validator, dialog, prompt, confirm, alert, modal, VoodooCollection, fromHtml, ready2, query, viewTransition, defineComponent, storage, ensurePalette, instances, storeNames, allStores } from './chunk-
|
|
2
|
-
export { VoodooCollection, alert, allStores, applyMask, cache, clearErrors, clipboard, confirm, cookie, createApp, createResource, defineComponent, dialog, ready as documentReady, enter, fadeIn, fadeOut, fromHtml, hotkey, instances, leave, mask, masks, modal, mountComponent, network, palette, prompt, query, ready2 as ready, registerMask, removeStore, createResource as resource, screen, serializeForm, session, showFormErrors, slideDown, slideUp, sound, efeitos as soundEffects, storage, store, storeNames, theme, toast, unmask, url, validate, validator, viewTransition, whenElement, whenReady } from './chunk-
|
|
3
|
-
export { gpu, reflectWgsl } from './chunk-
|
|
4
|
-
import { http } from './chunk-
|
|
5
|
-
export { HttpError, http, request } from './chunk-
|
|
6
|
-
import { devtoolsBus } from './chunk-
|
|
7
|
-
export { createSocket, devtoolsBus, socket, socketSupported } from './chunk-
|
|
8
|
-
import { magic, markSkipChildren,
|
|
9
|
-
export { Scope, VoodooRuntimeError, VoodooSyntaxError, addCleanup, allowedGlobals, clearParseCache, destroy, evaluate, findScope, getScope, magic, magics, parse, refresh, rootScope, start, stringify, tokenize, walk } from './chunk-
|
|
10
|
-
import { reactive, warn, handleError,
|
|
11
|
-
export { EffectScope, computed, effect, effectScope, flushSync, isReactive, markRaw, nextTick, reactive, ref, shallowRef, stop, toRaw, unref, watch, watchEffect } from './chunk-
|
|
12
|
-
import { warnAlias } from './chunk-
|
|
13
|
-
import { parseDuration, formatNumber, formatCurrency, formatDate, relativeTime, device, setFormatDefaults, uid, merge, escapeHtml, truncate, get, titleCase } from './chunk-
|
|
14
|
-
export { capitalize, chunk, clone, debounce, device, escapeHtml, formatCurrency, formatDate, formatFileSize, formatNumber, formatPercent, get, groupBy, isBrowser, matchesMedia, memoize, merge, once, parseDuration, random, relativeTime, sample, set, setFormatDefaults, sleep, slugify, sortBy, stripTags, throttle, titleCase, truncate, uid, unique, uuid } from './chunk-
|
|
15
|
-
import { ensureTokens, injectStyle } from './chunk-
|
|
16
|
-
export { ensureTokens, injectStyle } from './chunk-
|
|
17
|
-
import { defineDirective, PRIORITY, config } from './chunk-
|
|
18
|
-
export { PRIORITY, config, defineDirective } from './chunk-
|
|
19
|
-
import './chunk-
|
|
1
|
+
import { core, sound, hotkey, palette, registerMask, unmask, applyMask, masks, mask, clearErrors, showFieldError, showFormErrors, messages, serializeForm, validate, validator, dialog, prompt, confirm, alert, modal, VoodooCollection, fromHtml, ready2, query, viewTransition, defineComponent, storage, ensurePalette, instances, storeNames, allStores } from './chunk-PBZCYF2Y.js';
|
|
2
|
+
export { VoodooCollection, alert, allStores, applyMask, cache, clearErrors, clipboard, confirm, cookie, createApp, createResource, defineComponent, dialog, ready as documentReady, enter, fadeIn, fadeOut, fromHtml, hotkey, instances, leave, mask, masks, modal, mountComponent, network, palette, prompt, query, ready2 as ready, registerMask, removeStore, createResource as resource, screen, serializeForm, session, showFormErrors, slideDown, slideUp, sound, efeitos as soundEffects, storage, store, storeNames, theme, toast, unmask, url, validate, validator, viewTransition, whenElement, whenReady } from './chunk-PBZCYF2Y.js';
|
|
3
|
+
export { gpu, reflectWgsl } from './chunk-TZJSPNLV.js';
|
|
4
|
+
import { http } from './chunk-VQEJ4DTE.js';
|
|
5
|
+
export { HttpError, http, request } from './chunk-VQEJ4DTE.js';
|
|
6
|
+
import { devtoolsBus } from './chunk-KAS77SGY.js';
|
|
7
|
+
export { createSocket, devtoolsBus, socket, socketSupported } from './chunk-KAS77SGY.js';
|
|
8
|
+
import { magic, markSkipChildren, onStart, rootScope, findScope, destroy, readAttr, evaluate, parse, Scope, getScope, walk, unwrap, addCleanup, hadDirectives, collectDirectives, getEffectScopes, evaluateIn } from './chunk-NUBOX6YQ.js';
|
|
9
|
+
export { Scope, VoodooRuntimeError, VoodooSyntaxError, addCleanup, allowedGlobals, clearParseCache, destroy, evaluate, findScope, getScope, magic, magics, parse, refresh, rootScope, start, stringify, tokenize, walk } from './chunk-NUBOX6YQ.js';
|
|
10
|
+
import { reactive, warn, handleError, effect, queuePostFlush, nextTick } from './chunk-5GWN7E6N.js';
|
|
11
|
+
export { EffectScope, computed, effect, effectScope, flushSync, isReactive, markRaw, nextTick, reactive, ref, shallowRef, stop, toRaw, unref, watch, watchEffect } from './chunk-5GWN7E6N.js';
|
|
12
|
+
import { warnAlias } from './chunk-OTRGHJIJ.js';
|
|
13
|
+
import { parseDuration, formatNumber, formatCurrency, formatDate, relativeTime, device, setFormatDefaults, uid, merge, escapeHtml, truncate, get, titleCase } from './chunk-FBQPFIHZ.js';
|
|
14
|
+
export { capitalize, chunk, clone, debounce, device, escapeHtml, formatCurrency, formatDate, formatFileSize, formatNumber, formatPercent, get, groupBy, isBrowser, matchesMedia, memoize, merge, once, parseDuration, random, relativeTime, sample, set, setFormatDefaults, sleep, slugify, sortBy, stripTags, throttle, titleCase, truncate, uid, unique, uuid } from './chunk-FBQPFIHZ.js';
|
|
15
|
+
import { ensureTokens, injectStyle } from './chunk-QL2GIGVQ.js';
|
|
16
|
+
export { ensureTokens, injectStyle } from './chunk-QL2GIGVQ.js';
|
|
17
|
+
import { defineDirective, PRIORITY, config } from './chunk-WIXAZJYS.js';
|
|
18
|
+
export { PRIORITY, config, defineDirective } from './chunk-WIXAZJYS.js';
|
|
19
|
+
import './chunk-EYGQD7OP.js';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Voodoo.js v0.
|
|
22
|
+
* Voodoo.js v0.11.0
|
|
23
23
|
* JavaScript feels like magic.
|
|
24
24
|
* (c) 2026 Voodoo.js contributors. MIT License.
|
|
25
25
|
*/
|
|
@@ -6555,6 +6555,10 @@ var OPAQUE = /* @__PURE__ */ new Set([
|
|
|
6555
6555
|
"NOSCRIPT"
|
|
6556
6556
|
]);
|
|
6557
6557
|
magic("$__jsx", (scope) => scope);
|
|
6558
|
+
onStart((root, after) => {
|
|
6559
|
+
if (after) activateJsx();
|
|
6560
|
+
else extractJsx(root);
|
|
6561
|
+
});
|
|
6558
6562
|
var TEMPLATE = /* @__PURE__ */ Symbol("voodoo.jsx.template");
|
|
6559
6563
|
function isTemplate(value) {
|
|
6560
6564
|
return typeof value === "object" && value !== null && TEMPLATE in value;
|
|
@@ -6627,6 +6631,30 @@ function collect(start2, offset) {
|
|
|
6627
6631
|
if (!closed) return null;
|
|
6628
6632
|
return { source, templates, nodes, tail };
|
|
6629
6633
|
}
|
|
6634
|
+
function recoverFromTable(collected) {
|
|
6635
|
+
const empties = collected.source.match(/\(\s*\)/g);
|
|
6636
|
+
if (!empties) return false;
|
|
6637
|
+
const first = collected.nodes[0];
|
|
6638
|
+
const last = collected.nodes[collected.nodes.length - 1];
|
|
6639
|
+
const table = [last?.nextSibling, first?.previousSibling].map((from) => {
|
|
6640
|
+
let node = from ?? null;
|
|
6641
|
+
while (node && node.nodeType === Node.TEXT_NODE && !(node.textContent ?? "").trim()) {
|
|
6642
|
+
node = node === last?.nextSibling ? node.nextSibling : node.previousSibling;
|
|
6643
|
+
}
|
|
6644
|
+
return node && node.nodeType === Node.ELEMENT_NODE ? node : null;
|
|
6645
|
+
}).find((el) => el?.tagName === "TABLE");
|
|
6646
|
+
if (!table) return false;
|
|
6647
|
+
const body = table.querySelector("tbody");
|
|
6648
|
+
if (!body) return false;
|
|
6649
|
+
const rows = Array.from(body.children).filter((el) => el.tagName === "TR");
|
|
6650
|
+
if (rows.length !== empties.length) return false;
|
|
6651
|
+
let index = 0;
|
|
6652
|
+
collected.source = collected.source.replace(/\(\s*\)/g, () => `($t(${index++}, $__jsx))`);
|
|
6653
|
+
collected.templates = rows;
|
|
6654
|
+
collected.host = body;
|
|
6655
|
+
collected.nodes.push(...rows);
|
|
6656
|
+
return true;
|
|
6657
|
+
}
|
|
6630
6658
|
function render(value, templates, scope, out) {
|
|
6631
6659
|
if (value == null || value === false || value === true) return;
|
|
6632
6660
|
if (Array.isArray(value)) {
|
|
@@ -6668,7 +6696,11 @@ function applyRegions(root, parentScope) {
|
|
|
6668
6696
|
continue;
|
|
6669
6697
|
}
|
|
6670
6698
|
const collected = collect(child, open);
|
|
6671
|
-
if (!collected
|
|
6699
|
+
if (!collected) {
|
|
6700
|
+
child = next;
|
|
6701
|
+
continue;
|
|
6702
|
+
}
|
|
6703
|
+
if (collected.templates.length === 0 && !recoverFromTable(collected)) {
|
|
6672
6704
|
child = next;
|
|
6673
6705
|
continue;
|
|
6674
6706
|
}
|
|
@@ -6691,8 +6723,9 @@ function install(parent, collected, hint) {
|
|
|
6691
6723
|
if (tail && tail.offset < (tail.node.textContent ?? "").length) {
|
|
6692
6724
|
tail.node.splitText(tail.offset);
|
|
6693
6725
|
}
|
|
6726
|
+
const target = collected.host ?? parent;
|
|
6694
6727
|
const anchor = document.createComment("v-jsx");
|
|
6695
|
-
|
|
6728
|
+
target.insertBefore(anchor, collected.host ? collected.host.firstChild : nodes[0]);
|
|
6696
6729
|
for (const node of nodes) node.remove();
|
|
6697
6730
|
let rendered = [];
|
|
6698
6731
|
pending.push(() => activateRegion());
|
|
@@ -6708,7 +6741,7 @@ function install(parent, collected, hint) {
|
|
|
6708
6741
|
render(value, templates, local, out);
|
|
6709
6742
|
for (const node of rendered) node.remove();
|
|
6710
6743
|
rendered = out;
|
|
6711
|
-
for (const node of out)
|
|
6744
|
+
for (const node of out) target.insertBefore(node, anchor);
|
|
6712
6745
|
});
|
|
6713
6746
|
addCleanup(anchor, () => {
|
|
6714
6747
|
runner.effect.stop();
|
package/dist/reactivity.cjs
CHANGED
package/dist/reactivity.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { EffectScope, ITERATE_KEY, ReactiveEffect, TriggerType, computed, effect, effectScope, enableTracking, flushSync, getActiveEffect, getActiveScope, handleError, hasChanged, isReactive, isRef, markRaw, nextTick, pauseTracking, queueJob, queuePostFlush, reactive, ref, resetTracking, setErrorHandler, shallowRef, stop, toRaw, track, trigger, unref, warn, watch, watchEffect } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { EffectScope, ITERATE_KEY, ReactiveEffect, TriggerType, computed, effect, effectScope, enableTracking, flushSync, getActiveEffect, getActiveScope, handleError, hasChanged, isReactive, isRef, markRaw, nextTick, pauseTracking, queueJob, queuePostFlush, reactive, ref, resetTracking, setErrorHandler, shallowRef, stop, toRaw, track, trigger, unref, warn, watch, watchEffect } from './chunk-5GWN7E6N.js';
|
|
2
|
+
import './chunk-EYGQD7OP.js';
|
|
3
3
|
//# sourceMappingURL=reactivity.js.map
|
|
4
4
|
//# sourceMappingURL=reactivity.js.map
|
package/dist/socket.cjs
CHANGED
package/dist/socket.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { socketSupported, createSocket, socket } from './chunk-
|
|
2
|
-
export { ENGINE, SIO, createSocket, decodeEngine, decodeSocketIo, encodeSocketIo, engineURL, resolveSocketURL, socket, socketSupported } from './chunk-
|
|
3
|
-
import { evaluateIn, readAttr } from './chunk-
|
|
4
|
-
import { reactive } from './chunk-
|
|
5
|
-
import { warnAlias } from './chunk-
|
|
6
|
-
import { parseDuration } from './chunk-
|
|
7
|
-
import { defineDirective, PRIORITY, config } from './chunk-
|
|
8
|
-
import './chunk-
|
|
1
|
+
import { socketSupported, createSocket, socket } from './chunk-KAS77SGY.js';
|
|
2
|
+
export { ENGINE, SIO, createSocket, decodeEngine, decodeSocketIo, encodeSocketIo, engineURL, resolveSocketURL, socket, socketSupported } from './chunk-KAS77SGY.js';
|
|
3
|
+
import { evaluateIn, readAttr } from './chunk-NUBOX6YQ.js';
|
|
4
|
+
import { reactive } from './chunk-5GWN7E6N.js';
|
|
5
|
+
import { warnAlias } from './chunk-OTRGHJIJ.js';
|
|
6
|
+
import { parseDuration } from './chunk-FBQPFIHZ.js';
|
|
7
|
+
import { defineDirective, PRIORITY, config } from './chunk-WIXAZJYS.js';
|
|
8
|
+
import './chunk-EYGQD7OP.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Voodoo.js v0.
|
|
11
|
+
* Voodoo.js v0.11.0
|
|
12
12
|
* JavaScript feels like magic.
|
|
13
13
|
* (c) 2026 Voodoo.js contributors. MIT License.
|
|
14
14
|
*/
|
package/dist/utils.cjs
CHANGED
package/dist/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { capitalize, chunk, clone, debounce, device, escapeHtml, formatCurrency, formatDate, formatFileSize, formatNumber, formatPercent, get, groupBy, isBrowser, matchesMedia, memoize, merge, once, parseDuration, random, relativeTime, sample, set, setFormatDefaults, sleep, slugify, sortBy, stripTags, throttle, titleCase, truncate, uid, unique, uuid } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { capitalize, chunk, clone, debounce, device, escapeHtml, formatCurrency, formatDate, formatFileSize, formatNumber, formatPercent, get, groupBy, isBrowser, matchesMedia, memoize, merge, once, parseDuration, random, relativeTime, sample, set, setFormatDefaults, sleep, slugify, sortBy, stripTags, throttle, titleCase, truncate, uid, unique, uuid } from './chunk-FBQPFIHZ.js';
|
|
2
|
+
import './chunk-EYGQD7OP.js';
|
|
3
3
|
//# sourceMappingURL=utils.js.map
|
|
4
4
|
//# sourceMappingURL=utils.js.map
|
package/dist/voodoo.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Voodoo.js v0.
|
|
2
|
+
* Voodoo.js v0.11.0
|
|
3
3
|
* JavaScript feels like magic.
|
|
4
4
|
* (c) 2026 Voodoo.js contributors. MIT License.
|
|
5
5
|
*/
|
|
@@ -2916,13 +2916,25 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
2916
2916
|
var componentAliases = /* @__PURE__ */ new Map();
|
|
2917
2917
|
var started = false;
|
|
2918
2918
|
var observer = null;
|
|
2919
|
+
var startHooks = [];
|
|
2920
|
+
function runPhase(target, after) {
|
|
2921
|
+
for (const hook of startHooks) {
|
|
2922
|
+
try {
|
|
2923
|
+
hook(target, after);
|
|
2924
|
+
} catch (error) {
|
|
2925
|
+
console.error("[Voodoo] a start hook failed", error);
|
|
2926
|
+
}
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2919
2929
|
function start(root) {
|
|
2920
2930
|
var _a2;
|
|
2921
2931
|
if (typeof document === "undefined") return;
|
|
2922
2932
|
const target = (_a2 = root != null ? root : config.root) != null ? _a2 : document.body;
|
|
2923
2933
|
if (!target) return;
|
|
2924
2934
|
Object.assign(allowedGlobals, config.globals);
|
|
2935
|
+
runPhase(target, false);
|
|
2925
2936
|
walk(target, rootScope);
|
|
2937
|
+
runPhase(target, true);
|
|
2926
2938
|
if (!started) {
|
|
2927
2939
|
started = true;
|
|
2928
2940
|
if (config.autoDiscover) observeDOM(target);
|
|
@@ -6813,7 +6825,7 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
6813
6825
|
Object.defineProperties(rootScope.data, Object.getOwnPropertyDescriptors(values));
|
|
6814
6826
|
return rootScope.data;
|
|
6815
6827
|
}
|
|
6816
|
-
var version2 = "0.
|
|
6828
|
+
var version2 = "0.11.0";
|
|
6817
6829
|
var core = {
|
|
6818
6830
|
// Utilities first: Voodoo's own names can override.
|
|
6819
6831
|
...utils_exports,
|
|
@@ -8453,9 +8465,7 @@ ${block(':root:not([data-theme="light"])', dark.vars)}
|
|
|
8453
8465
|
const boot = () => {
|
|
8454
8466
|
theme.init();
|
|
8455
8467
|
applySavedPalette();
|
|
8456
|
-
if (typeof V2.extractJsx === "function") V2.extractJsx();
|
|
8457
8468
|
V2.start();
|
|
8458
|
-
if (typeof V2.activateJsx === "function") V2.activateJsx();
|
|
8459
8469
|
if (typeof V2.enableXrayShortcut === "function") V2.enableXrayShortcut();
|
|
8460
8470
|
if (config.devtools) mountDevtools(V2);
|
|
8461
8471
|
};
|