sibujs 4.10.1 → 4.12.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 +2 -2
- package/dist/browser.cjs +1 -1
- package/dist/browser.js +4 -4
- package/dist/build.cjs +19 -1
- package/dist/build.js +13 -12
- package/dist/cdn.dev.global.js +12 -12
- package/dist/cdn.full.dev.global.js +13 -13
- package/dist/cdn.full.global.js +12 -12
- package/dist/cdn.global.js +12 -12
- package/dist/{chunk-FC6KCJSA.js → chunk-2F4PSJ5Z.js} +162 -67
- package/dist/{chunk-JZMLRF2G.js → chunk-653KGQS2.js} +3 -3
- package/dist/chunk-AM6DZLBM.js +181 -0
- package/dist/{chunk-NROLUUCO.js → chunk-B2Y5BJSP.js} +1 -1
- package/dist/{chunk-WHZKRSHQ.js → chunk-CI4W6XAU.js} +4 -4
- package/dist/{chunk-GEQNWNYS.js → chunk-DFZL3AX7.js} +6 -6
- package/dist/{chunk-6DYRY2NF.js → chunk-EMB5PG7V.js} +1 -1
- package/dist/{chunk-3ACAAQIN.js → chunk-F2UWOZ6J.js} +4 -0
- package/dist/{chunk-DA2LJXK3.js → chunk-HXT2RNH5.js} +1 -1
- package/dist/{chunk-BNZDDNBR.js → chunk-IHA62NGJ.js} +1 -1
- package/dist/{chunk-42REZXE4.js → chunk-LEUEKK4G.js} +2 -2
- package/dist/{chunk-CYUU3XXG.js → chunk-LXBMVGVB.js} +3 -3
- package/dist/{chunk-LYM6TT2R.js → chunk-LYTUTXQP.js} +4 -4
- package/dist/{chunk-2D47RVVK.js → chunk-NAVLCP4S.js} +4 -4
- package/dist/{chunk-MJZUXQHR.js → chunk-NB7TFSJE.js} +5 -5
- package/dist/{chunk-ADJEMTRC.js → chunk-QLG5IK7F.js} +4 -4
- package/dist/{chunk-LK3VK47W.js → chunk-RK7EPQPG.js} +1 -1
- package/dist/{chunk-YNE4FSVX.js → chunk-T5O2CUHV.js} +1 -1
- package/dist/{chunk-GVVZPMA5.js → chunk-WFRQ6D7H.js} +1 -1
- package/dist/{chunk-2T73SWKF.js → chunk-WH4U2VUE.js} +5 -3
- package/dist/{chunk-DS6PFIZK.js → chunk-XX4BRMWF.js} +15 -3
- package/dist/{chunk-HZQEL575.js → chunk-ZJCHY2IB.js} +1 -1
- package/dist/{chunk-CID4BYBF.js → chunk-ZPY2UAKM.js} +3 -3
- package/dist/{chunk-CZINTERN.js → chunk-ZTYCCBU3.js} +19 -11
- package/dist/data.cjs +1 -1
- package/dist/data.js +5 -5
- package/dist/devtools.cjs +1 -1
- package/dist/devtools.js +4 -4
- package/dist/ecosystem.cjs +9 -1
- package/dist/ecosystem.d.cts +1 -1
- package/dist/ecosystem.d.ts +1 -1
- package/dist/ecosystem.js +8 -8
- package/dist/extras.cjs +368 -154
- package/dist/extras.d.cts +2 -2
- package/dist/extras.d.ts +2 -2
- package/dist/extras.js +23 -22
- package/dist/index.cjs +19 -1
- package/dist/index.d.cts +91 -90
- package/dist/index.d.ts +91 -90
- package/dist/index.js +13 -12
- package/dist/motion.cjs +1 -1
- package/dist/motion.js +3 -3
- package/dist/patterns.cjs +1 -1
- package/dist/patterns.js +5 -5
- package/dist/performance.cjs +1 -1
- package/dist/performance.d.cts +2 -2
- package/dist/performance.d.ts +2 -2
- package/dist/performance.js +7 -6
- package/dist/plugins.cjs +482 -120
- package/dist/plugins.d.cts +20 -6
- package/dist/plugins.d.ts +20 -6
- package/dist/plugins.js +153 -23
- package/dist/{ssr-C8hgIAw7.d.cts → ssr-Db0Sgdu3.d.cts} +7 -4
- package/dist/{ssr-C8hgIAw7.d.ts → ssr-Db0Sgdu3.d.ts} +7 -4
- package/dist/{ssr-5OWAH3U2.js → ssr-VBM6J5SJ.js} +4 -2
- package/dist/ssr.cjs +346 -128
- package/dist/ssr.d.cts +1 -1
- package/dist/ssr.d.ts +1 -1
- package/dist/ssr.js +10 -9
- package/dist/{tagFactory-BL2fymez.d.ts → tagFactory-Bnd_Nph9.d.ts} +1 -1
- package/dist/{tagFactory-8qL9LCIx.d.cts → tagFactory-DkytnJws.d.cts} +1 -1
- package/dist/testing.cjs +1 -1
- package/dist/testing.js +2 -2
- package/dist/ui.cjs +251 -24
- package/dist/ui.d.cts +111 -1
- package/dist/ui.d.ts +111 -1
- package/dist/ui.js +130 -8
- package/dist/widgets.cjs +1 -1
- package/dist/widgets.js +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -176,7 +176,7 @@ dispose(); // remove the matchMedia listener
|
|
|
176
176
|
```
|
|
177
177
|
|
|
178
178
|
### `sibujs/ui` — UI utilities
|
|
179
|
-
`form` & `formAction` (validation/binding), `virtualList`, `intersection`, `inputMask`, `a11y` / `a11yPrimitives`, `scopedStyle`, `reactiveAttr`, `dialog`, `toast`, `infiniteScroll`, `pagination`, `eventBus`, `timers`, `hover`, `scrollLock`, `lazyEffect`, plus composable/HOC patterns.
|
|
179
|
+
`form` & `formAction` (validation/binding), `virtualList`, `intersection`, `inputMask`, `a11y` / `a11yPrimitives`, `scopedStyle`, `reactiveAttr`, `dialog`, `toast`, `embed` (allowlisted third-party players), `infiniteScroll`, `pagination`, `eventBus`, `timers`, `hover`, `scrollLock`, `lazyEffect`, plus composable/HOC patterns.
|
|
180
180
|
|
|
181
181
|
### `sibujs/widgets` — Pre-built components
|
|
182
182
|
Accessible `Combobox`, `Tabs`, `Accordion`, `Popover`, `Select`, `Tooltip`, `FileUpload`, `contentEditable`, and `datePicker`.
|
|
@@ -191,7 +191,7 @@ Accessible `Combobox`, `Tabs`, `Accordion`, `Popover`, `Select`, `Tooltip`, `Fil
|
|
|
191
191
|
**Router** — `createRouter`, `Route`/`Outlet`/`RouterLink`, nested routes, guards (`beforeEach`, `beforeResolve`, `afterEach`), programmatic navigation, `preloadRoute`, memory router, and per-route transitions. **i18n** — `setLocale`, `t`, `translated`, `Trans`, `registerTranslations`, live locale switching for text and attributes. Plus the plugin system (`modular`, `ecosystem`, `versioning`, `startup`).
|
|
192
192
|
|
|
193
193
|
### `sibujs/ssr` — Server rendering
|
|
194
|
-
`renderToString
|
|
194
|
+
`renderToString` (HTML, SVG and MathML; needs a server DOM such as happy-dom or jsdom), `renderToReadableStream`, `renderToDocument`, `hydrate`, streaming `Suspense`, `head` management, static site generation, incremental regeneration, route actions/middleware, scroll restoration, service worker & web/wasm workers, and microfrontend helpers.
|
|
195
195
|
|
|
196
196
|
### `sibujs/performance` — Scheduling & optimization
|
|
197
197
|
Concurrent rendering (`startTransition`, `scheduleUpdate`), cooperative `scheduler`, `domRecycler`, `compiled` templates, `chunkLoader`, `bundleOptimize`, and `normalize`.
|
package/dist/browser.cjs
CHANGED
|
@@ -700,7 +700,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
700
700
|
}
|
|
701
701
|
|
|
702
702
|
// src/reactivity/track.ts
|
|
703
|
-
var _runtimeVersion = true ? "4.
|
|
703
|
+
var _runtimeVersion = true ? "4.12.0" : "dev";
|
|
704
704
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
705
705
|
function resolveReactiveApi() {
|
|
706
706
|
const g = globalThis;
|
package/dist/browser.js
CHANGED
|
@@ -36,15 +36,15 @@ import {
|
|
|
36
36
|
visibility,
|
|
37
37
|
wakeLock,
|
|
38
38
|
windowSize
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-LEUEKK4G.js";
|
|
40
40
|
import "./chunk-52XFPGSN.js";
|
|
41
41
|
import "./chunk-62BDYGAG.js";
|
|
42
42
|
import "./chunk-7ZHH77QA.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-EMB5PG7V.js";
|
|
44
44
|
import "./chunk-EXXSN3BW.js";
|
|
45
45
|
import "./chunk-7XHATCIH.js";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-IHA62NGJ.js";
|
|
47
|
+
import "./chunk-B2Y5BJSP.js";
|
|
48
48
|
import "./chunk-NYNYSPK7.js";
|
|
49
49
|
export {
|
|
50
50
|
__resetSpeechCoordinator,
|
package/dist/build.cjs
CHANGED
|
@@ -3574,7 +3574,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
3574
3574
|
}
|
|
3575
3575
|
|
|
3576
3576
|
// src/reactivity/track.ts
|
|
3577
|
-
var _runtimeVersion = true ? "4.
|
|
3577
|
+
var _runtimeVersion = true ? "4.12.0" : "dev";
|
|
3578
3578
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
3579
3579
|
function resolveReactiveApi() {
|
|
3580
3580
|
const g2 = globalThis;
|
|
@@ -3856,6 +3856,16 @@ function bindChildNode(placeholder, getter) {
|
|
|
3856
3856
|
return reactiveBinding2(commit, placeholder);
|
|
3857
3857
|
}
|
|
3858
3858
|
|
|
3859
|
+
// src/core/rendering/requireDocument.ts
|
|
3860
|
+
function noDocument() {
|
|
3861
|
+
throw new Error(
|
|
3862
|
+
"[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first." + (DEV ? ' There is no global `document`, and SibuJS builds live DOM nodes, on the server too. For example: import { GlobalRegistrator } from "@happy-dom/global-registrator"; GlobalRegistrator.register(); See SSR in AGENTS.md \xA710.' : "")
|
|
3863
|
+
);
|
|
3864
|
+
}
|
|
3865
|
+
function requireDocument() {
|
|
3866
|
+
if (typeof document === "undefined") noDocument();
|
|
3867
|
+
}
|
|
3868
|
+
|
|
3859
3869
|
// src/core/rendering/tagFactory.ts
|
|
3860
3870
|
var SVG_NS4 = "http://www.w3.org/2000/svg";
|
|
3861
3871
|
var CLOBBER_RISKY_IDS = /* @__PURE__ */ new Set([
|
|
@@ -4036,6 +4046,7 @@ function tagFactory(tag, ns) {
|
|
|
4036
4046
|
if (blocked) {
|
|
4037
4047
|
throw new Error(`tagFactory: refusing to create <${tag}> \u2014 tag is blocked for security reasons.`);
|
|
4038
4048
|
}
|
|
4049
|
+
if (typeof document === "undefined") noDocument();
|
|
4039
4050
|
const el = ns ? document.createElementNS(ns, tag) : document.createElement(tag);
|
|
4040
4051
|
if (first === void 0) return el;
|
|
4041
4052
|
if (typeof first === "string") {
|
|
@@ -6121,6 +6132,7 @@ function releaseBranchNode(node, owned) {
|
|
|
6121
6132
|
node.parentNode?.removeChild(node);
|
|
6122
6133
|
}
|
|
6123
6134
|
function when(condition, thenBranch, elseBranch) {
|
|
6135
|
+
requireDocument();
|
|
6124
6136
|
const anchor = document.createComment("when");
|
|
6125
6137
|
let currentNode = null;
|
|
6126
6138
|
let lastCondition;
|
|
@@ -6164,6 +6176,7 @@ function when(condition, thenBranch, elseBranch) {
|
|
|
6164
6176
|
return anchor;
|
|
6165
6177
|
}
|
|
6166
6178
|
function match(value, cases, fallback) {
|
|
6179
|
+
requireDocument();
|
|
6167
6180
|
const anchor = document.createComment("match");
|
|
6168
6181
|
let currentNode = null;
|
|
6169
6182
|
let lastKey;
|
|
@@ -6306,6 +6319,7 @@ function each(getArray, render, options) {
|
|
|
6306
6319
|
options && typeof options.key === "function",
|
|
6307
6320
|
"each: options.key must be a function that returns a unique key per item."
|
|
6308
6321
|
);
|
|
6322
|
+
requireDocument();
|
|
6309
6323
|
const anchor = document.createComment("each:anchor");
|
|
6310
6324
|
const end = document.createComment("each:end");
|
|
6311
6325
|
const oldKeysBufA = [];
|
|
@@ -6513,6 +6527,7 @@ function each(getArray, render, options) {
|
|
|
6513
6527
|
|
|
6514
6528
|
// src/core/rendering/fragment.ts
|
|
6515
6529
|
function Fragment(nodes) {
|
|
6530
|
+
requireDocument();
|
|
6516
6531
|
const frag = document.createDocumentFragment();
|
|
6517
6532
|
for (const child of nodes) {
|
|
6518
6533
|
if (child == null || typeof child === "boolean") continue;
|
|
@@ -6879,6 +6894,7 @@ function __renderParsedTemplate(tree, values) {
|
|
|
6879
6894
|
return renderTemplate(tree, values);
|
|
6880
6895
|
}
|
|
6881
6896
|
function renderTemplate(tmpl, values) {
|
|
6897
|
+
requireDocument();
|
|
6882
6898
|
if (tmpl.length === 1 && tmpl[0].t === 0) {
|
|
6883
6899
|
return executeElement(tmpl[0].el, values);
|
|
6884
6900
|
}
|
|
@@ -6924,6 +6940,7 @@ function renderTemplate(tmpl, values) {
|
|
|
6924
6940
|
|
|
6925
6941
|
// src/core/rendering/keepAlive.ts
|
|
6926
6942
|
function KeepAlive(activeKey, cases, options) {
|
|
6943
|
+
requireDocument();
|
|
6927
6944
|
const anchor = document.createComment("keep-alive");
|
|
6928
6945
|
const cache2 = /* @__PURE__ */ new Map();
|
|
6929
6946
|
const lruOrder = [];
|
|
@@ -7089,6 +7106,7 @@ function unmountRange(start, end) {
|
|
|
7089
7106
|
|
|
7090
7107
|
// src/core/rendering/portal.ts
|
|
7091
7108
|
function Portal(nodes, target) {
|
|
7109
|
+
requireDocument();
|
|
7092
7110
|
const anchor = document.createComment("portal");
|
|
7093
7111
|
const container = target || document.body;
|
|
7094
7112
|
let portalContent = null;
|
package/dist/build.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
index_exports
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ZTYCCBU3.js";
|
|
4
|
+
import "./chunk-T5O2CUHV.js";
|
|
5
|
+
import "./chunk-2F4PSJ5Z.js";
|
|
6
|
+
import "./chunk-AM6DZLBM.js";
|
|
7
|
+
import "./chunk-HXT2RNH5.js";
|
|
8
|
+
import "./chunk-WFRQ6D7H.js";
|
|
8
9
|
import "./chunk-62BDYGAG.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-WH4U2VUE.js";
|
|
11
|
+
import "./chunk-XX4BRMWF.js";
|
|
12
|
+
import "./chunk-F2UWOZ6J.js";
|
|
13
|
+
import "./chunk-RK7EPQPG.js";
|
|
13
14
|
import "./chunk-7ZHH77QA.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-EMB5PG7V.js";
|
|
15
16
|
import {
|
|
16
17
|
isEventHandlerAttr,
|
|
17
18
|
isHtmlContentAttribute,
|
|
@@ -19,8 +20,8 @@ import {
|
|
|
19
20
|
} from "./chunk-EXXSN3BW.js";
|
|
20
21
|
import "./chunk-7XHATCIH.js";
|
|
21
22
|
import "./chunk-5HZXGZ6T.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-IHA62NGJ.js";
|
|
24
|
+
import "./chunk-B2Y5BJSP.js";
|
|
24
25
|
import "./chunk-NYNYSPK7.js";
|
|
25
26
|
|
|
26
27
|
// src/build/sourceEdit.ts
|