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 CHANGED
@@ -22,7 +22,7 @@ npm install voodoojs
22
22
  Or drop it into a page, with nothing else:
23
23
 
24
24
  ```html
25
- <script src="https://cdn.jsdelivr.net/npm/voodoojs@0.7/dist/voodoo.min.js" defer></script>
25
+ <script src="https://cdn.jsdelivr.net/npm/voodoojs@0.10/dist/voodoo.min.js" defer></script>
26
26
 
27
27
  <div v-data="{ count: 0 }">
28
28
  <button @click="count++">Clicked { count } times</button>
@@ -1,7 +1,7 @@
1
- import { __publicField } from './chunk-3JV2AYK6.js';
1
+ import { __publicField } from './chunk-EYGQD7OP.js';
2
2
 
3
3
  /**
4
- * Voodoo.js v0.10.0
4
+ * Voodoo.js v0.11.0
5
5
  * JavaScript feels like magic.
6
6
  * (c) 2026 Voodoo.js contributors. MIT License.
7
7
  */
@@ -637,5 +637,5 @@ function traverse(value, seen = /* @__PURE__ */ new Set()) {
637
637
  }
638
638
 
639
639
  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 };
640
- //# sourceMappingURL=chunk-H64IUSGJ.js.map
641
- //# sourceMappingURL=chunk-H64IUSGJ.js.map
640
+ //# sourceMappingURL=chunk-5GWN7E6N.js.map
641
+ //# sourceMappingURL=chunk-5GWN7E6N.js.map
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Voodoo.js v0.10.0
2
+ * Voodoo.js v0.11.0
3
3
  * JavaScript feels like magic.
4
4
  * (c) 2026 Voodoo.js contributors. MIT License.
5
5
  */
@@ -12,5 +12,5 @@ var __export = (target, all) => {
12
12
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
13
13
 
14
14
  export { __export, __publicField };
15
- //# sourceMappingURL=chunk-3JV2AYK6.js.map
16
- //# sourceMappingURL=chunk-3JV2AYK6.js.map
15
+ //# sourceMappingURL=chunk-EYGQD7OP.js.map
16
+ //# sourceMappingURL=chunk-EYGQD7OP.js.map
@@ -1,7 +1,7 @@
1
- import { __export } from './chunk-3JV2AYK6.js';
1
+ import { __export } from './chunk-EYGQD7OP.js';
2
2
 
3
3
  /**
4
- * Voodoo.js v0.10.0
4
+ * Voodoo.js v0.11.0
5
5
  * JavaScript feels like magic.
6
6
  * (c) 2026 Voodoo.js contributors. MIT License.
7
7
  */
@@ -397,5 +397,5 @@ var device = {
397
397
  };
398
398
 
399
399
  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, utils_exports, uuid };
400
- //# sourceMappingURL=chunk-H3RGM7PR.js.map
401
- //# sourceMappingURL=chunk-H3RGM7PR.js.map
400
+ //# sourceMappingURL=chunk-FBQPFIHZ.js.map
401
+ //# sourceMappingURL=chunk-FBQPFIHZ.js.map
@@ -1,8 +1,8 @@
1
- import { reactive } from './chunk-H64IUSGJ.js';
2
- import { warnOnce } from './chunk-EYNFAYEV.js';
1
+ import { reactive } from './chunk-5GWN7E6N.js';
2
+ import { warnOnce } from './chunk-OTRGHJIJ.js';
3
3
 
4
4
  /**
5
- * Voodoo.js v0.10.0
5
+ * Voodoo.js v0.11.0
6
6
  * JavaScript feels like magic.
7
7
  * (c) 2026 Voodoo.js contributors. MIT License.
8
8
  */
@@ -942,5 +942,5 @@ Object.defineProperty(factory, "open", {
942
942
  var socket = factory;
943
943
 
944
944
  export { ENGINE, SIO, createSocket, decodeEngine, decodeSocketIo, devtoolsBus, encodeSocketIo, engineURL, resolveSocketURL, socket, socketSupported };
945
- //# sourceMappingURL=chunk-HW75QJLQ.js.map
946
- //# sourceMappingURL=chunk-HW75QJLQ.js.map
945
+ //# sourceMappingURL=chunk-KAS77SGY.js.map
946
+ //# sourceMappingURL=chunk-KAS77SGY.js.map
@@ -1,10 +1,10 @@
1
- import { reactive, handleError, EffectScope, effect } from './chunk-H64IUSGJ.js';
2
- import { inDevelopment, warnInvalidExpression, warnUnknownDirective } from './chunk-EYNFAYEV.js';
3
- import { config, directives, components } from './chunk-PXUSD6TT.js';
4
- import { __publicField } from './chunk-3JV2AYK6.js';
1
+ import { reactive, handleError, EffectScope, effect } from './chunk-5GWN7E6N.js';
2
+ import { inDevelopment, warnInvalidExpression, warnUnknownDirective } from './chunk-OTRGHJIJ.js';
3
+ import { config, directives, components } from './chunk-WIXAZJYS.js';
4
+ import { __publicField } from './chunk-EYGQD7OP.js';
5
5
 
6
6
  /**
7
- * Voodoo.js v0.10.0
7
+ * Voodoo.js v0.11.0
8
8
  * JavaScript feels like magic.
9
9
  * (c) 2026 Voodoo.js contributors. MIT License.
10
10
  */
@@ -2043,12 +2043,27 @@ function resolveComponentTag(tagName) {
2043
2043
  var componentAliases = /* @__PURE__ */ new Map();
2044
2044
  var started = false;
2045
2045
  var observer = null;
2046
+ var startHooks = [];
2047
+ function onStart(hook) {
2048
+ startHooks.push(hook);
2049
+ }
2050
+ function runPhase(target, after) {
2051
+ for (const hook of startHooks) {
2052
+ try {
2053
+ hook(target, after);
2054
+ } catch (error) {
2055
+ console.error("[Voodoo] a start hook failed", error);
2056
+ }
2057
+ }
2058
+ }
2046
2059
  function start(root) {
2047
2060
  if (typeof document === "undefined") return;
2048
2061
  const target = root ?? config.root ?? document.body;
2049
2062
  if (!target) return;
2050
2063
  Object.assign(allowedGlobals, config.globals);
2064
+ runPhase(target, false);
2051
2065
  walk(target, rootScope);
2066
+ runPhase(target, true);
2052
2067
  if (!started) {
2053
2068
  started = true;
2054
2069
  if (config.autoDiscover) observeDOM(target);
@@ -2086,6 +2101,6 @@ function refresh(root) {
2086
2101
  walk(root ?? document.body, root ? findScope(root.parentNode) : rootScope);
2087
2102
  }
2088
2103
 
2089
- export { Scope, VoodooRuntimeError, VoodooSyntaxError, addCleanup, allowedGlobals, clearParseCache, closestDirective, collectDirectives, componentAliases, destroy, evaluate, evaluateIn, findScope, getEffectScopes, getScope, hadDirectives, hasAttr, hasDirective, hasDirectives, isInitialized, magic, magics, markInitialized, markNodeScope, markSkipChildren, originalAttributes, parse, parseAttribute, queryDirective, readAttr, refresh, removeQuietly, restoreAttributes, rootScope, setComponentMounter, start, stopObserving, stringify, tokenize, unwrap, walk };
2090
- //# sourceMappingURL=chunk-OUEXXXTU.js.map
2091
- //# sourceMappingURL=chunk-OUEXXXTU.js.map
2104
+ export { Scope, VoodooRuntimeError, VoodooSyntaxError, addCleanup, allowedGlobals, clearParseCache, closestDirective, collectDirectives, componentAliases, destroy, evaluate, evaluateIn, findScope, getEffectScopes, getScope, hadDirectives, hasAttr, hasDirective, hasDirectives, isInitialized, magic, magics, markInitialized, markNodeScope, markSkipChildren, onStart, originalAttributes, parse, parseAttribute, queryDirective, readAttr, refresh, removeQuietly, restoreAttributes, rootScope, setComponentMounter, start, stopObserving, stringify, tokenize, unwrap, walk };
2105
+ //# sourceMappingURL=chunk-NUBOX6YQ.js.map
2106
+ //# sourceMappingURL=chunk-NUBOX6YQ.js.map
@@ -1,7 +1,7 @@
1
- import { config } from './chunk-PXUSD6TT.js';
1
+ import { config } from './chunk-WIXAZJYS.js';
2
2
 
3
3
  /**
4
- * Voodoo.js v0.10.0
4
+ * Voodoo.js v0.11.0
5
5
  * JavaScript feels like magic.
6
6
  * (c) 2026 Voodoo.js contributors. MIT License.
7
7
  */
@@ -78,5 +78,5 @@ function warnAlias(alias, canonical) {
78
78
  }
79
79
 
80
80
  export { describeElement, inDevelopment, warn, warnAlias, warnDuplicateKey, warnInvalidExpression, warnOnce, warnRequiredProp, warnUnknownComponent, warnUnknownDirective };
81
- //# sourceMappingURL=chunk-EYNFAYEV.js.map
82
- //# sourceMappingURL=chunk-EYNFAYEV.js.map
81
+ //# sourceMappingURL=chunk-OTRGHJIJ.js.map
82
+ //# sourceMappingURL=chunk-OTRGHJIJ.js.map
@@ -1,14 +1,14 @@
1
- import { http, HttpError, request } from './chunk-IK4MQQTO.js';
2
- import { stringify, markInitialized, markSkipChildren, destroy, walk, removeQuietly, evaluateIn, addCleanup, markNodeScope, setComponentMounter, closestDirective, magic, readAttr, hasAttr, componentAliases, Scope, queryDirective, parse, evaluate, parseAttribute, originalAttributes, hasDirective, findScope, VoodooRuntimeError, VoodooSyntaxError, allowedGlobals, clearParseCache, tokenize, getScope, stopObserving, refresh, start, magics, rootScope, isInitialized, restoreAttributes, hasDirectives } from './chunk-OUEXXXTU.js';
3
- import { ref, reactive, handleError, nextTick, queuePostFlush, warn, watch, EffectScope, computed, effect, toRaw, flushSync, effectScope, stop, unref, markRaw, watchEffect, shallowRef, setErrorHandler } from './chunk-H64IUSGJ.js';
4
- import { warnDuplicateKey, warn as warn$1, describeElement, warnUnknownComponent, warnAlias, warnRequiredProp } from './chunk-EYNFAYEV.js';
5
- import { parseDuration, debounce, utils_exports, throttle, uid, device, escapeHtml } from './chunk-H3RGM7PR.js';
6
- import { injectStyle, ensureTokens } from './chunk-TFDCAZYU.js';
7
- import { defineDirective, config, PRIORITY, directives, normalizeComponentName, components, usePlugin } from './chunk-PXUSD6TT.js';
8
- import { __publicField } from './chunk-3JV2AYK6.js';
1
+ import { http, HttpError, request } from './chunk-VQEJ4DTE.js';
2
+ import { stringify, markInitialized, markSkipChildren, destroy, walk, removeQuietly, evaluateIn, addCleanup, markNodeScope, setComponentMounter, closestDirective, magic, readAttr, hasAttr, componentAliases, Scope, queryDirective, parse, evaluate, parseAttribute, originalAttributes, hasDirective, findScope, VoodooRuntimeError, VoodooSyntaxError, allowedGlobals, clearParseCache, tokenize, getScope, stopObserving, refresh, start, magics, rootScope, isInitialized, restoreAttributes, hasDirectives } from './chunk-NUBOX6YQ.js';
3
+ import { ref, reactive, handleError, nextTick, queuePostFlush, warn, watch, EffectScope, computed, effect, toRaw, flushSync, effectScope, stop, unref, markRaw, watchEffect, shallowRef, setErrorHandler } from './chunk-5GWN7E6N.js';
4
+ import { warnDuplicateKey, warn as warn$1, describeElement, warnUnknownComponent, warnAlias, warnRequiredProp } from './chunk-OTRGHJIJ.js';
5
+ import { parseDuration, debounce, utils_exports, throttle, uid, device, escapeHtml } from './chunk-FBQPFIHZ.js';
6
+ import { injectStyle, ensureTokens } from './chunk-QL2GIGVQ.js';
7
+ import { defineDirective, config, PRIORITY, directives, normalizeComponentName, components, usePlugin } from './chunk-WIXAZJYS.js';
8
+ import { __publicField } from './chunk-EYGQD7OP.js';
9
9
 
10
10
  /**
11
- * Voodoo.js v0.10.0
11
+ * Voodoo.js v0.11.0
12
12
  * JavaScript feels like magic.
13
13
  * (c) 2026 Voodoo.js contributors. MIT License.
14
14
  */
@@ -2662,7 +2662,7 @@ var jsonStylesInjected = false;
2662
2662
  function injectJSONStyles() {
2663
2663
  if (jsonStylesInjected) return;
2664
2664
  jsonStylesInjected = true;
2665
- void import('./style-NW74ROC5.js').then(({ injectStyle: injectStyle2 }) => {
2665
+ void import('./style-ZM3TAT4K.js').then(({ injectStyle: injectStyle2 }) => {
2666
2666
  injectStyle2(
2667
2667
  "json-render",
2668
2668
  `
@@ -2949,7 +2949,7 @@ function data(values) {
2949
2949
  Object.defineProperties(rootScope.data, Object.getOwnPropertyDescriptors(values));
2950
2950
  return rootScope.data;
2951
2951
  }
2952
- var version2 = "0.10.0";
2952
+ var version2 = "0.11.0";
2953
2953
  var core = {
2954
2954
  // Utilities first: Voodoo's own names can override.
2955
2955
  ...utils_exports,
@@ -10271,5 +10271,5 @@ defineDirective(
10271
10271
  );
10272
10272
 
10273
10273
  export { VoodooCollection, alert, allStores, applyMask, cache, clearErrors, clipboard, confirm, cookie, core, createApp, createResource, defineComponent, dialog, efeitos, ensurePalette, enter, fadeIn, fadeOut, fromHtml, hotkey, instances, leave, mask, masks, messages, modal, mountComponent, network, palette, prompt, query, ready, ready2, registerMask, removeStore, screen, serializeForm, session, showFieldError, showFormErrors, slideDown, slideUp, sound, storage, store, storeNames, theme, toast, unmask, url, validate, validator, viewTransition, whenElement, whenReady };
10274
- //# sourceMappingURL=chunk-QWQPKMUH.js.map
10275
- //# sourceMappingURL=chunk-QWQPKMUH.js.map
10274
+ //# sourceMappingURL=chunk-PBZCYF2Y.js.map
10275
+ //# sourceMappingURL=chunk-PBZCYF2Y.js.map
@@ -1,7 +1,7 @@
1
- import { config } from './chunk-PXUSD6TT.js';
1
+ import { config } from './chunk-WIXAZJYS.js';
2
2
 
3
3
  /**
4
- * Voodoo.js v0.10.0
4
+ * Voodoo.js v0.11.0
5
5
  * JavaScript feels like magic.
6
6
  * (c) 2026 Voodoo.js contributors. MIT License.
7
7
  */
@@ -68,5 +68,5 @@ function ensureTokens() {
68
68
  }
69
69
 
70
70
  export { BASE_TOKENS, ensureTokens, injectStyle };
71
- //# sourceMappingURL=chunk-TFDCAZYU.js.map
72
- //# sourceMappingURL=chunk-TFDCAZYU.js.map
71
+ //# sourceMappingURL=chunk-QL2GIGVQ.js.map
72
+ //# sourceMappingURL=chunk-QL2GIGVQ.js.map
@@ -1,8 +1,8 @@
1
- import { handleError } from './chunk-H64IUSGJ.js';
2
- import { warn } from './chunk-EYNFAYEV.js';
1
+ import { handleError } from './chunk-5GWN7E6N.js';
2
+ import { warn } from './chunk-OTRGHJIJ.js';
3
3
 
4
4
  /**
5
- * Voodoo.js v0.10.0
5
+ * Voodoo.js v0.11.0
6
6
  * JavaScript feels like magic.
7
7
  * (c) 2026 Voodoo.js contributors. MIT License.
8
8
  */
@@ -1192,5 +1192,5 @@ var gpu = {
1192
1192
  };
1193
1193
 
1194
1194
  export { clock, compute, describeWgslType, destroy, effect, findEntry, flattenValue, frame, frameLoop, gpu, inferStruct, init, packStruct, reflectBindings, reflectEntries, reflectStructs, reflectWgsl, resetShared, shared, splitTopLevel, stripWgslComments, supported, surface, target, uniforms, writeField, writeStruct };
1195
- //# sourceMappingURL=chunk-WGMUFP5Q.js.map
1196
- //# sourceMappingURL=chunk-WGMUFP5Q.js.map
1195
+ //# sourceMappingURL=chunk-TZJSPNLV.js.map
1196
+ //# sourceMappingURL=chunk-TZJSPNLV.js.map
@@ -1,9 +1,9 @@
1
- import { warnOnce } from './chunk-EYNFAYEV.js';
2
- import { parseDuration } from './chunk-H3RGM7PR.js';
3
- import { __publicField } from './chunk-3JV2AYK6.js';
1
+ import { warnOnce } from './chunk-OTRGHJIJ.js';
2
+ import { parseDuration } from './chunk-FBQPFIHZ.js';
3
+ import { __publicField } from './chunk-EYGQD7OP.js';
4
4
 
5
5
  /**
6
- * Voodoo.js v0.10.0
6
+ * Voodoo.js v0.11.0
7
7
  * JavaScript feels like magic.
8
8
  * (c) 2026 Voodoo.js contributors. MIT License.
9
9
  */
@@ -444,5 +444,5 @@ var http = {
444
444
  };
445
445
 
446
446
  export { HttpError, clearCache, flushOfflineQueue, http, request };
447
- //# sourceMappingURL=chunk-IK4MQQTO.js.map
448
- //# sourceMappingURL=chunk-IK4MQQTO.js.map
447
+ //# sourceMappingURL=chunk-VQEJ4DTE.js.map
448
+ //# sourceMappingURL=chunk-VQEJ4DTE.js.map
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Voodoo.js v0.10.0
2
+ * Voodoo.js v0.11.0
3
3
  * JavaScript feels like magic.
4
4
  * (c) 2026 Voodoo.js contributors. MIT License.
5
5
  */
@@ -61,5 +61,5 @@ function usePlugin(V, plugin, options) {
61
61
  }
62
62
 
63
63
  export { PRIORITY, components, config, defineDirective, directives, normalizeComponentName, usePlugin };
64
- //# sourceMappingURL=chunk-PXUSD6TT.js.map
65
- //# sourceMappingURL=chunk-PXUSD6TT.js.map
64
+ //# sourceMappingURL=chunk-WIXAZJYS.js.map
65
+ //# sourceMappingURL=chunk-WIXAZJYS.js.map
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  /**
6
- * Voodoo.js v0.10.0
6
+ * Voodoo.js v0.11.0
7
7
  * JavaScript feels like magic.
8
8
  * (c) 2026 Voodoo.js contributors. MIT License.
9
9
  */
@@ -2931,12 +2931,24 @@ function resolveComponentTag(tagName) {
2931
2931
  var componentAliases = /* @__PURE__ */ new Map();
2932
2932
  var started = false;
2933
2933
  var observer = null;
2934
+ var startHooks = [];
2935
+ function runPhase(target, after) {
2936
+ for (const hook of startHooks) {
2937
+ try {
2938
+ hook(target, after);
2939
+ } catch (error) {
2940
+ console.error("[Voodoo] a start hook failed", error);
2941
+ }
2942
+ }
2943
+ }
2934
2944
  function start(root) {
2935
2945
  if (typeof document === "undefined") return;
2936
2946
  const target = root ?? config.root ?? document.body;
2937
2947
  if (!target) return;
2938
2948
  Object.assign(allowedGlobals, config.globals);
2949
+ runPhase(target, false);
2939
2950
  walk(target, rootScope);
2951
+ runPhase(target, true);
2940
2952
  if (!started) {
2941
2953
  started = true;
2942
2954
  if (config.autoDiscover) observeDOM(target);
@@ -6752,7 +6764,7 @@ function data(values) {
6752
6764
  Object.defineProperties(rootScope.data, Object.getOwnPropertyDescriptors(values));
6753
6765
  return rootScope.data;
6754
6766
  }
6755
- var version2 = "0.10.0";
6767
+ var version2 = "0.11.0";
6756
6768
  var core = {
6757
6769
  // Utilities first: Voodoo's own names can override.
6758
6770
  ...utils_exports,
package/dist/essential.js CHANGED
@@ -1,15 +1,15 @@
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 } from './chunk-QWQPKMUH.js';
2
- import './chunk-IK4MQQTO.js';
3
- import { magic } from './chunk-OUEXXXTU.js';
4
- import './chunk-H64IUSGJ.js';
5
- import './chunk-EYNFAYEV.js';
6
- import './chunk-H3RGM7PR.js';
7
- import './chunk-TFDCAZYU.js';
8
- import './chunk-PXUSD6TT.js';
9
- import './chunk-3JV2AYK6.js';
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 } from './chunk-PBZCYF2Y.js';
2
+ import './chunk-VQEJ4DTE.js';
3
+ import { magic } from './chunk-NUBOX6YQ.js';
4
+ import './chunk-5GWN7E6N.js';
5
+ import './chunk-OTRGHJIJ.js';
6
+ import './chunk-FBQPFIHZ.js';
7
+ import './chunk-QL2GIGVQ.js';
8
+ import './chunk-WIXAZJYS.js';
9
+ import './chunk-EYGQD7OP.js';
10
10
 
11
11
  /**
12
- * Voodoo.js v0.10.0
12
+ * Voodoo.js v0.11.0
13
13
  * JavaScript feels like magic.
14
14
  * (c) 2026 Voodoo.js contributors. MIT License.
15
15
  */
package/dist/gpu.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  /**
6
- * Voodoo.js v0.10.0
6
+ * Voodoo.js v0.11.0
7
7
  * JavaScript feels like magic.
8
8
  * (c) 2026 Voodoo.js contributors. MIT License.
9
9
  */
package/dist/gpu.js CHANGED
@@ -1,15 +1,15 @@
1
- import { supported, clock, shared, gpu, surface, effect, frameLoop, frame } from './chunk-WGMUFP5Q.js';
2
- export { clock, compute, describeWgslType, destroy, effect, findEntry, flattenValue, frame, frameLoop, gpu, inferStruct, init, packStruct, reflectBindings, reflectEntries, reflectStructs, reflectWgsl, resetShared, shared, splitTopLevel, stripWgslComments, supported, surface, target, uniforms, writeField, writeStruct } from './chunk-WGMUFP5Q.js';
3
- import { http } from './chunk-IK4MQQTO.js';
4
- import { originalAttributes, destroy } from './chunk-OUEXXXTU.js';
5
- import { handleError } from './chunk-H64IUSGJ.js';
6
- import { warn, describeElement } from './chunk-EYNFAYEV.js';
7
- import './chunk-H3RGM7PR.js';
8
- import { defineDirective } from './chunk-PXUSD6TT.js';
9
- import './chunk-3JV2AYK6.js';
1
+ import { supported, clock, shared, gpu, surface, effect, frameLoop, frame } from './chunk-TZJSPNLV.js';
2
+ export { clock, compute, describeWgslType, destroy, effect, findEntry, flattenValue, frame, frameLoop, gpu, inferStruct, init, packStruct, reflectBindings, reflectEntries, reflectStructs, reflectWgsl, resetShared, shared, splitTopLevel, stripWgslComments, supported, surface, target, uniforms, writeField, writeStruct } from './chunk-TZJSPNLV.js';
3
+ import { http } from './chunk-VQEJ4DTE.js';
4
+ import { originalAttributes, destroy } from './chunk-NUBOX6YQ.js';
5
+ import { handleError } from './chunk-5GWN7E6N.js';
6
+ import { warn, describeElement } from './chunk-OTRGHJIJ.js';
7
+ import './chunk-FBQPFIHZ.js';
8
+ import { defineDirective } from './chunk-WIXAZJYS.js';
9
+ import './chunk-EYGQD7OP.js';
10
10
 
11
11
  /**
12
- * Voodoo.js v0.10.0
12
+ * Voodoo.js v0.11.0
13
13
  * JavaScript feels like magic.
14
14
  * (c) 2026 Voodoo.js contributors. MIT License.
15
15
  */
package/dist/http.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  /**
4
- * Voodoo.js v0.10.0
4
+ * Voodoo.js v0.11.0
5
5
  * JavaScript feels like magic.
6
6
  * (c) 2026 Voodoo.js contributors. MIT License.
7
7
  */
package/dist/http.js CHANGED
@@ -1,7 +1,7 @@
1
- export { HttpError, clearCache, flushOfflineQueue, http, request } from './chunk-IK4MQQTO.js';
2
- import './chunk-EYNFAYEV.js';
3
- import './chunk-H3RGM7PR.js';
4
- import './chunk-PXUSD6TT.js';
5
- import './chunk-3JV2AYK6.js';
1
+ export { HttpError, clearCache, flushOfflineQueue, http, request } from './chunk-VQEJ4DTE.js';
2
+ import './chunk-OTRGHJIJ.js';
3
+ import './chunk-FBQPFIHZ.js';
4
+ import './chunk-WIXAZJYS.js';
5
+ import './chunk-EYGQD7OP.js';
6
6
  //# sourceMappingURL=http.js.map
7
7
  //# sourceMappingURL=http.js.map
package/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  /**
6
- * Voodoo.js v0.10.0
6
+ * Voodoo.js v0.11.0
7
7
  * JavaScript feels like magic.
8
8
  * (c) 2026 Voodoo.js contributors. MIT License.
9
9
  */
@@ -2939,12 +2939,27 @@ function resolveComponentTag(tagName) {
2939
2939
  var componentAliases = /* @__PURE__ */ new Map();
2940
2940
  var started = false;
2941
2941
  var observer = null;
2942
+ var startHooks = [];
2943
+ function onStart(hook) {
2944
+ startHooks.push(hook);
2945
+ }
2946
+ function runPhase(target2, after) {
2947
+ for (const hook of startHooks) {
2948
+ try {
2949
+ hook(target2, after);
2950
+ } catch (error) {
2951
+ console.error("[Voodoo] a start hook failed", error);
2952
+ }
2953
+ }
2954
+ }
2942
2955
  function start(root) {
2943
2956
  if (typeof document === "undefined") return;
2944
2957
  const target2 = root ?? exports.config.root ?? document.body;
2945
2958
  if (!target2) return;
2946
2959
  Object.assign(allowedGlobals, exports.config.globals);
2960
+ runPhase(target2, false);
2947
2961
  walk(target2, rootScope);
2962
+ runPhase(target2, true);
2948
2963
  if (!started) {
2949
2964
  started = true;
2950
2965
  if (exports.config.autoDiscover) observeDOM(target2);
@@ -6763,7 +6778,7 @@ function data(values) {
6763
6778
  Object.defineProperties(rootScope.data, Object.getOwnPropertyDescriptors(values));
6764
6779
  return rootScope.data;
6765
6780
  }
6766
- var version2 = "0.10.0";
6781
+ var version2 = "0.11.0";
6767
6782
  var core = {
6768
6783
  // Utilities first: Voodoo's own names can override.
6769
6784
  ...utils_exports,
@@ -20700,6 +20715,10 @@ var OPAQUE = /* @__PURE__ */ new Set([
20700
20715
  "NOSCRIPT"
20701
20716
  ]);
20702
20717
  magic("$__jsx", (scope) => scope);
20718
+ onStart((root, after) => {
20719
+ if (after) activateJsx();
20720
+ else extractJsx(root);
20721
+ });
20703
20722
  var TEMPLATE = /* @__PURE__ */ Symbol("voodoo.jsx.template");
20704
20723
  function isTemplate(value) {
20705
20724
  return typeof value === "object" && value !== null && TEMPLATE in value;
@@ -20772,6 +20791,30 @@ function collect(start2, offset) {
20772
20791
  if (!closed) return null;
20773
20792
  return { source, templates, nodes, tail };
20774
20793
  }
20794
+ function recoverFromTable(collected) {
20795
+ const empties = collected.source.match(/\(\s*\)/g);
20796
+ if (!empties) return false;
20797
+ const first = collected.nodes[0];
20798
+ const last = collected.nodes[collected.nodes.length - 1];
20799
+ const table = [last?.nextSibling, first?.previousSibling].map((from) => {
20800
+ let node = from ?? null;
20801
+ while (node && node.nodeType === Node.TEXT_NODE && !(node.textContent ?? "").trim()) {
20802
+ node = node === last?.nextSibling ? node.nextSibling : node.previousSibling;
20803
+ }
20804
+ return node && node.nodeType === Node.ELEMENT_NODE ? node : null;
20805
+ }).find((el) => el?.tagName === "TABLE");
20806
+ if (!table) return false;
20807
+ const body = table.querySelector("tbody");
20808
+ if (!body) return false;
20809
+ const rows = Array.from(body.children).filter((el) => el.tagName === "TR");
20810
+ if (rows.length !== empties.length) return false;
20811
+ let index = 0;
20812
+ collected.source = collected.source.replace(/\(\s*\)/g, () => `($t(${index++}, $__jsx))`);
20813
+ collected.templates = rows;
20814
+ collected.host = body;
20815
+ collected.nodes.push(...rows);
20816
+ return true;
20817
+ }
20775
20818
  function render2(value, templates, scope, out) {
20776
20819
  if (value == null || value === false || value === true) return;
20777
20820
  if (Array.isArray(value)) {
@@ -20813,7 +20856,11 @@ function applyRegions(root, parentScope) {
20813
20856
  continue;
20814
20857
  }
20815
20858
  const collected = collect(child, open);
20816
- if (!collected || collected.templates.length === 0) {
20859
+ if (!collected) {
20860
+ child = next;
20861
+ continue;
20862
+ }
20863
+ if (collected.templates.length === 0 && !recoverFromTable(collected)) {
20817
20864
  child = next;
20818
20865
  continue;
20819
20866
  }
@@ -20836,8 +20883,9 @@ function install(parent, collected, hint) {
20836
20883
  if (tail && tail.offset < (tail.node.textContent ?? "").length) {
20837
20884
  tail.node.splitText(tail.offset);
20838
20885
  }
20886
+ const target2 = collected.host ?? parent;
20839
20887
  const anchor = document.createComment("v-jsx");
20840
- parent.insertBefore(anchor, nodes[0]);
20888
+ target2.insertBefore(anchor, collected.host ? collected.host.firstChild : nodes[0]);
20841
20889
  for (const node of nodes) node.remove();
20842
20890
  let rendered = [];
20843
20891
  pending.push(() => activateRegion());
@@ -20853,7 +20901,7 @@ function install(parent, collected, hint) {
20853
20901
  render2(value, templates, local, out);
20854
20902
  for (const node of rendered) node.remove();
20855
20903
  rendered = out;
20856
- for (const node of out) parent.insertBefore(node, anchor);
20904
+ for (const node of out) target2.insertBefore(node, anchor);
20857
20905
  });
20858
20906
  addCleanup(anchor, () => {
20859
20907
  runner.effect.stop();