voodoojs 0.10.0 → 0.10.1

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Voodoo.js v0.10.0
2
+ * Voodoo.js v0.10.1
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.10.0";
6828
+ var version2 = "0.10.1";
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
  };