voodoojs 0.4.6
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 +77 -0
- package/dist/chunk-234ZLC6W.js +401 -0
- package/dist/chunk-4HQEOXTK.js +10271 -0
- package/dist/chunk-5777LJVW.js +64 -0
- package/dist/chunk-5CKGDARU.js +1845 -0
- package/dist/chunk-A2UOVQBP.js +82 -0
- package/dist/chunk-E27NRARW.js +16 -0
- package/dist/chunk-JZIYRIY6.js +1196 -0
- package/dist/chunk-NNU6WOOU.js +641 -0
- package/dist/chunk-PQZEVFVZ.js +448 -0
- package/dist/chunk-RJUNPXQF.js +946 -0
- package/dist/chunk-U76IRJKH.js +72 -0
- package/dist/essential.cjs +13889 -0
- package/dist/essential.d.cts +24 -0
- package/dist/essential.d.ts +24 -0
- package/dist/essential.js +51 -0
- package/dist/gpu.cjs +2008 -0
- package/dist/gpu.d.cts +68 -0
- package/dist/gpu.d.ts +68 -0
- package/dist/gpu.js +273 -0
- package/dist/http.cjs +467 -0
- package/dist/http.d.cts +148 -0
- package/dist/http.d.ts +148 -0
- package/dist/http.js +7 -0
- package/dist/index-CaLD-0oh.d.cts +608 -0
- package/dist/index-CaLD-0oh.d.ts +608 -0
- package/dist/index-DTllqUtj.d.cts +261 -0
- package/dist/index-DTllqUtj.d.ts +261 -0
- package/dist/index.cjs +23063 -0
- package/dist/index.d.cts +1603 -0
- package/dist/index.d.ts +1603 -0
- package/dist/index.js +6924 -0
- package/dist/query-CKJ4oSpG.d.cts +1595 -0
- package/dist/query-DQFRmu3u.d.ts +1595 -0
- package/dist/reactivity.cjs +676 -0
- package/dist/reactivity.d.cts +188 -0
- package/dist/reactivity.d.ts +188 -0
- package/dist/reactivity.js +4 -0
- package/dist/socket.cjs +2685 -0
- package/dist/socket.d.cts +167 -0
- package/dist/socket.d.ts +167 -0
- package/dist/socket.js +238 -0
- package/dist/style-XEUAGGJK.js +5 -0
- package/dist/utils.cjs +397 -0
- package/dist/utils.d.cts +111 -0
- package/dist/utils.d.ts +111 -0
- package/dist/utils.js +4 -0
- package/dist/voodoo.core.js +8213 -0
- package/dist/voodoo.core.min.js +146 -0
- package/dist/voodoo.full.js +21193 -0
- package/dist/voodoo.full.min.js +1784 -0
- package/dist/voodoo.js +14185 -0
- package/dist/voodoo.min.js +420 -0
- package/package.json +127 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { config } from './chunk-5777LJVW.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Voodoo.js v0.4.6
|
|
5
|
+
* JavaScript feels like magic.
|
|
6
|
+
* (c) 2026 Voodoo.js contributors. MIT License.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// src/runtime/avisos.ts
|
|
10
|
+
function inDevelopment() {
|
|
11
|
+
return config.devtools === true;
|
|
12
|
+
}
|
|
13
|
+
function describeElement(el) {
|
|
14
|
+
if (!el) return "(no element)";
|
|
15
|
+
let out = el.tagName.toLowerCase();
|
|
16
|
+
if (el.id) out += `#${el.id}`;
|
|
17
|
+
const classes = (el.getAttribute("class") || "").trim().split(/\s+/).filter(Boolean);
|
|
18
|
+
if (classes.length) out += `.${classes.slice(0, 2).join(".")}`;
|
|
19
|
+
return `<${out}>`;
|
|
20
|
+
}
|
|
21
|
+
function warn(message) {
|
|
22
|
+
if (!inDevelopment()) return;
|
|
23
|
+
console.warn(`[Voodoo] ${message}`);
|
|
24
|
+
}
|
|
25
|
+
var alreadyWarned = /* @__PURE__ */ new Set();
|
|
26
|
+
function warnOnce(key, message) {
|
|
27
|
+
if (!inDevelopment()) return;
|
|
28
|
+
if (alreadyWarned.has(key)) return;
|
|
29
|
+
alreadyWarned.add(key);
|
|
30
|
+
console.warn(`[Voodoo] ${message}`);
|
|
31
|
+
}
|
|
32
|
+
var AUXILIARY_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
33
|
+
"confirm-title",
|
|
34
|
+
"confirm-label",
|
|
35
|
+
"confirm-cancel",
|
|
36
|
+
"hold-duration"
|
|
37
|
+
]);
|
|
38
|
+
function warnUnknownDirective(el, raw, name) {
|
|
39
|
+
if (!inDevelopment()) return;
|
|
40
|
+
if (AUXILIARY_ATTRIBUTES.has(name)) return;
|
|
41
|
+
warnOnce(
|
|
42
|
+
`unknown-directive:${name}`,
|
|
43
|
+
`unknown directive "${raw}" at ${describeElement(el)}. No directive named "${name}" was registered. Check the spelling or register with V.directive("${name}", ...).`
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function warnUnknownComponent(el, name) {
|
|
47
|
+
warnOnce(
|
|
48
|
+
`unknown-component:${name}`,
|
|
49
|
+
`component "${name}" not registered at ${describeElement(el)}. Register with V.component("${name}", { ... }) before using the tag, or remove the attribute to leave the element as plain HTML.`
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
function warnInvalidExpression(el, raw, expression, err) {
|
|
53
|
+
if (!inDevelopment()) return;
|
|
54
|
+
const reason = err instanceof Error ? err.message.split("\n")[0] : String(err);
|
|
55
|
+
warn(
|
|
56
|
+
`invalid expression in ${raw}="${expression}" on element ${describeElement(el)}.
|
|
57
|
+
Reason: ${reason}
|
|
58
|
+
Suggestion: attribute expressions accept a single value. If the logic spans more than one line, move it to a component method and call the method here.`
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
function warnDuplicateKey(el, key, expression) {
|
|
62
|
+
if (!inDevelopment()) return;
|
|
63
|
+
warn(
|
|
64
|
+
`duplicate key "${String(key)}" in v-for="${expression}" on element ${describeElement(el)}. Two rows with the same key cause the list to reuse the wrong block when reordering. Use a unique key, like the item id.`
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function warnRequiredProp(el, component, prop) {
|
|
68
|
+
if (!inDevelopment()) return;
|
|
69
|
+
warn(
|
|
70
|
+
`required prop "${prop}" missing from component "${component}" at ${describeElement(el)}. Pass the value on the tag with ${prop}="..." for a fixed value or :${prop}="expression" for a state value.`
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function warnAlias(alias, canonical) {
|
|
74
|
+
warnOnce(
|
|
75
|
+
`alias:${alias}`,
|
|
76
|
+
`"${alias}" is an alias for "${canonical}" and still works, but the official name is "${canonical}". Prefer "${canonical}" in new code.`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { describeElement, inDevelopment, warn, warnAlias, warnDuplicateKey, warnInvalidExpression, warnOnce, warnRequiredProp, warnUnknownComponent, warnUnknownDirective };
|
|
81
|
+
//# sourceMappingURL=chunk-A2UOVQBP.js.map
|
|
82
|
+
//# sourceMappingURL=chunk-A2UOVQBP.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Voodoo.js v0.4.6
|
|
3
|
+
* JavaScript feels like magic.
|
|
4
|
+
* (c) 2026 Voodoo.js contributors. MIT License.
|
|
5
|
+
*/
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
13
|
+
|
|
14
|
+
export { __export, __publicField };
|
|
15
|
+
//# sourceMappingURL=chunk-E27NRARW.js.map
|
|
16
|
+
//# sourceMappingURL=chunk-E27NRARW.js.map
|