sibujs 4.13.1 → 4.14.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/browser.cjs +15 -2
- package/dist/browser.js +9 -7
- package/dist/build.cjs +880 -281
- package/dist/build.d.cts +68 -3
- package/dist/build.d.ts +68 -3
- package/dist/build.js +88 -30
- 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-5RIBLY2N.js → chunk-2TTRW2TE.js} +6 -6
- package/dist/{chunk-J6FW5TV6.js → chunk-3HEX6QJQ.js} +5 -3
- package/dist/chunk-3HZOSMPX.js +90 -0
- package/dist/{chunk-QKFVMIAV.js → chunk-4FJSAUKB.js} +11 -3
- package/dist/{chunk-OIKD7YDY.js → chunk-4TQDTWWN.js} +6 -5
- package/dist/{chunk-5XUGJM3J.js → chunk-7ILEHTVX.js} +1 -1
- package/dist/{chunk-EU7T7EB3.js → chunk-A454RAEK.js} +4 -4
- package/dist/{chunk-QC3NP47A.js → chunk-AE32RGWX.js} +10 -6
- package/dist/{chunk-EXXSN3BW.js → chunk-B3HOT4TK.js} +1 -1
- package/dist/{chunk-QZ47OZ25.js → chunk-BKZ5N6NK.js} +8 -6
- package/dist/{chunk-2O6JJCUR.js → chunk-BNXRWZZV.js} +49 -8
- package/dist/chunk-BOYKGGVD.js +2015 -0
- package/dist/{chunk-22OPSWMF.js → chunk-CCKUNHVU.js} +2 -2
- package/dist/{chunk-CPQKWCJ2.js → chunk-CJ7KS3DF.js} +16 -10
- package/dist/chunk-CNPT6NKV.js +1859 -0
- package/dist/{chunk-2NC56RGY.js → chunk-F67F77IA.js} +2 -2
- package/dist/{chunk-TUCPL2HB.js → chunk-GIJ33UJZ.js} +1 -1
- package/dist/chunk-GVAMIU6K.js +195 -0
- package/dist/{chunk-K4LNUT5L.js → chunk-HQIAL7F2.js} +8 -6
- package/dist/{chunk-C73VBPEF.js → chunk-JTFQ7IL4.js} +8 -8
- package/dist/{chunk-AM6DZLBM.js → chunk-LJMX4SQ7.js} +2 -2
- package/dist/{chunk-4UTGDVSA.js → chunk-MIRKTVH4.js} +7 -14
- package/dist/{chunk-YFTBCCVH.js → chunk-N7A6FKWW.js} +5 -3
- package/dist/chunk-NT3ZYB5S.js +167 -0
- package/dist/{chunk-VFPLWUT7.js → chunk-QS6GMWDD.js} +151 -86
- package/dist/chunk-R5U7XKVJ.js +16 -0
- package/dist/{chunk-ADZHPN2B.js → chunk-RVR5NPFL.js} +3 -3
- package/dist/{chunk-F2UWOZ6J.js → chunk-RVWJGWCL.js} +2 -2
- package/dist/{chunk-NYNYSPK7.js → chunk-S37PZD6I.js} +30 -45
- package/dist/{chunk-G3Z2FEBR.js → chunk-SVULV7O4.js} +119 -26
- package/dist/{chunk-PBJYCE2Z.js → chunk-TLS4NVIB.js} +5 -5
- package/dist/{chunk-KC62VURU.js → chunk-UUIKJJIK.js} +10 -8
- package/dist/chunk-UYTYNCMZ.js +199 -0
- package/dist/chunk-VM2U5LEL.js +2596 -0
- package/dist/{chunk-J4X7ICH4.js → chunk-Y4LUM2XS.js} +8 -6
- package/dist/data.cjs +265 -35
- package/dist/data.d.cts +31 -1
- package/dist/data.d.ts +31 -1
- package/dist/data.js +16 -10
- package/dist/devtools.cjs +15 -2
- package/dist/devtools.js +9 -7
- package/dist/{dispose-GEIG2KOF.js → dispose-EIHHHDC7.js} +3 -1
- package/dist/ecosystem.cjs +62 -23
- package/dist/ecosystem.js +14 -12
- package/dist/extras.cjs +3520 -270
- package/dist/extras.d.cts +3 -3
- package/dist/extras.d.ts +3 -3
- package/dist/extras.js +39 -29
- package/dist/index.cjs +442 -253
- package/dist/index.d.cts +93 -283
- package/dist/index.d.ts +93 -283
- package/dist/index.js +26 -16
- package/dist/motion.cjs +12 -1
- package/dist/motion.js +6 -4
- package/dist/patterns.cjs +15 -2
- package/dist/patterns.js +10 -8
- package/dist/performance.cjs +36 -2
- package/dist/performance.d.cts +2 -2
- package/dist/performance.d.ts +2 -2
- package/dist/performance.js +14 -10
- package/dist/plugins.cjs +5225 -1807
- package/dist/plugins.d.cts +8 -834
- package/dist/plugins.d.ts +8 -834
- package/dist/plugins.js +64 -2329
- package/dist/prerenderServer-MXJEVWA3.js +350 -0
- package/dist/renderRoute-DP20XwMS.d.cts +86 -0
- package/dist/renderRoute-fxgsm2Ir.d.ts +86 -0
- package/dist/routeHead-CE9SV-cH.d.cts +995 -0
- package/dist/routeHead-DzVxPviY.d.ts +995 -0
- package/dist/{routeMiddleware-B1sp4P7a.d.ts → routeMiddleware-BySbueoE.d.ts} +0 -25
- package/dist/{routeMiddleware-CedQTsLK.d.cts → routeMiddleware-CijZD5eW.d.cts} +0 -25
- package/dist/ssr-JpGpHnpC.d.cts +841 -0
- package/dist/ssr-JpGpHnpC.d.ts +841 -0
- package/dist/{ssr-VBM6J5SJ.js → ssr-NECEU4X4.js} +15 -6
- package/dist/ssr-dom.cjs +1862 -0
- package/dist/ssr-dom.d.cts +341 -0
- package/dist/ssr-dom.d.ts +341 -0
- package/dist/ssr-dom.js +19 -0
- package/dist/ssr.cjs +7630 -2064
- package/dist/ssr.d.cts +63 -5
- package/dist/ssr.d.ts +63 -5
- package/dist/ssr.js +136 -14
- package/dist/testing.cjs +6543 -87
- package/dist/testing.d.cts +80 -1
- package/dist/testing.d.ts +80 -1
- package/dist/testing.js +117 -4
- package/dist/ui.cjs +36 -2
- package/dist/ui.js +17 -14
- package/dist/widgets.cjs +14 -1
- package/dist/widgets.js +11 -9
- package/package.json +9 -2
- package/dist/chunk-2F4PSJ5Z.js +0 -765
- package/dist/chunk-7XHATCIH.js +0 -121
- package/dist/chunk-B36ADEIR.js +0 -21
- package/dist/ssr-Db0Sgdu3.d.cts +0 -245
- package/dist/ssr-Db0Sgdu3.d.ts +0 -245
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isUnsafeKey,
|
|
3
|
+
readOwnGlobal
|
|
4
|
+
} from "./chunk-62BDYGAG.js";
|
|
5
|
+
import {
|
|
6
|
+
getRequestStore
|
|
7
|
+
} from "./chunk-UYTYNCMZ.js";
|
|
8
|
+
|
|
9
|
+
// src/utils/transfer.ts
|
|
10
|
+
var TRANSFER_GLOBAL = "__SIBU_TRANSFER__";
|
|
11
|
+
var TRANSFER_VERSION = 1;
|
|
12
|
+
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.transfer.v1");
|
|
13
|
+
function registry() {
|
|
14
|
+
const g = globalThis;
|
|
15
|
+
let r = g[REGISTRY_KEY];
|
|
16
|
+
if (!r) {
|
|
17
|
+
r = { collectors: /* @__PURE__ */ new Map(), payload: void 0 };
|
|
18
|
+
g[REGISTRY_KEY] = r;
|
|
19
|
+
}
|
|
20
|
+
return r;
|
|
21
|
+
}
|
|
22
|
+
function registerTransferCollector(section, collect) {
|
|
23
|
+
registry().collectors.set(section, collect);
|
|
24
|
+
}
|
|
25
|
+
function collectTransfer() {
|
|
26
|
+
if (!getRequestStore()) return null;
|
|
27
|
+
const out = {};
|
|
28
|
+
let any = false;
|
|
29
|
+
for (const [section, collect] of registry().collectors) {
|
|
30
|
+
const entries = collect();
|
|
31
|
+
if (!entries) continue;
|
|
32
|
+
const safe = {};
|
|
33
|
+
for (const key of Object.keys(entries)) if (!isUnsafeKey(key)) safe[key] = entries[key];
|
|
34
|
+
if (Object.keys(safe).length > 0) {
|
|
35
|
+
out[section] = safe;
|
|
36
|
+
any = true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (!any) return null;
|
|
40
|
+
out.v = TRANSFER_VERSION;
|
|
41
|
+
return out;
|
|
42
|
+
}
|
|
43
|
+
function isPlainRecord(value) {
|
|
44
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
45
|
+
const proto = Object.getPrototypeOf(value);
|
|
46
|
+
return proto === Object.prototype || proto === null;
|
|
47
|
+
}
|
|
48
|
+
function readPayload() {
|
|
49
|
+
const r = registry();
|
|
50
|
+
if (r.payload !== void 0) return r.payload;
|
|
51
|
+
r.payload = null;
|
|
52
|
+
if (typeof window === "undefined" || getRequestStore()) return null;
|
|
53
|
+
const raw = readOwnGlobal(TRANSFER_GLOBAL);
|
|
54
|
+
if (!isPlainRecord(raw) || raw.v !== TRANSFER_VERSION) return null;
|
|
55
|
+
const sections = /* @__PURE__ */ Object.create(null);
|
|
56
|
+
for (const key of Object.keys(raw)) {
|
|
57
|
+
const section = raw[key];
|
|
58
|
+
if (key === "v" || isUnsafeKey(key) || !isPlainRecord(section)) continue;
|
|
59
|
+
const entries = /* @__PURE__ */ Object.create(null);
|
|
60
|
+
for (const k of Object.keys(section)) if (!isUnsafeKey(k)) entries[k] = section[k];
|
|
61
|
+
sections[key] = entries;
|
|
62
|
+
}
|
|
63
|
+
r.payload = sections;
|
|
64
|
+
return sections;
|
|
65
|
+
}
|
|
66
|
+
function takeTransferred(section, key) {
|
|
67
|
+
const entries = readPayload()?.[section];
|
|
68
|
+
if (!entries || !Object.hasOwn(entries, key)) return void 0;
|
|
69
|
+
const value = entries[key];
|
|
70
|
+
delete entries[key];
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
function takeTransferredSection(section) {
|
|
74
|
+
const payload = readPayload();
|
|
75
|
+
const entries = payload?.[section];
|
|
76
|
+
if (!payload || !entries) return {};
|
|
77
|
+
delete payload[section];
|
|
78
|
+
return entries;
|
|
79
|
+
}
|
|
80
|
+
function __resetTransfer() {
|
|
81
|
+
registry().payload = void 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export {
|
|
85
|
+
registerTransferCollector,
|
|
86
|
+
collectTransfer,
|
|
87
|
+
takeTransferred,
|
|
88
|
+
takeTransferredSection,
|
|
89
|
+
__resetTransfer
|
|
90
|
+
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
drainNotificationQueue,
|
|
3
|
-
emitDevtools,
|
|
4
3
|
notifySubscribers,
|
|
5
4
|
queueSignalNotification,
|
|
6
5
|
recordDependency
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MIRKTVH4.js";
|
|
8
7
|
import {
|
|
9
8
|
DEV
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NT3ZYB5S.js";
|
|
11
10
|
|
|
12
11
|
// src/reactivity/batch.ts
|
|
13
12
|
var batchDepth = 0;
|
|
@@ -59,6 +58,14 @@ var batch = API.batch;
|
|
|
59
58
|
var enqueueBatchedSignal = API.enqueueBatchedSignal;
|
|
60
59
|
var isBatching = API.isBatching;
|
|
61
60
|
|
|
61
|
+
// src/core/devtoolsHook.ts
|
|
62
|
+
function emitDevtools(hook, event, payload) {
|
|
63
|
+
try {
|
|
64
|
+
hook.emit(event, payload);
|
|
65
|
+
} catch {
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
62
69
|
// src/core/signals/signal.ts
|
|
63
70
|
var _g = globalThis;
|
|
64
71
|
function signal(initial, options) {
|
|
@@ -145,6 +152,7 @@ export {
|
|
|
145
152
|
batch,
|
|
146
153
|
enqueueBatchedSignal,
|
|
147
154
|
isBatching,
|
|
155
|
+
emitDevtools,
|
|
148
156
|
signal,
|
|
149
157
|
external
|
|
150
158
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderToString
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BOYKGGVD.js";
|
|
4
4
|
import {
|
|
5
5
|
globalSingleton
|
|
6
6
|
} from "./chunk-7ZHH77QA.js";
|
|
7
7
|
import {
|
|
8
8
|
sanitizeUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-B3HOT4TK.js";
|
|
10
10
|
import {
|
|
11
11
|
reportError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-S37PZD6I.js";
|
|
13
13
|
|
|
14
14
|
// src/plugins/modular.ts
|
|
15
15
|
function createModuleRegistry() {
|
|
@@ -154,6 +154,7 @@ var MODULE_ENTRY_POINTS = {
|
|
|
154
154
|
ui: "./ui.ts",
|
|
155
155
|
widgets: "./widgets.ts",
|
|
156
156
|
ssr: "./ssr.ts",
|
|
157
|
+
"ssr/dom": "./ssr-dom.ts",
|
|
157
158
|
devtools: "./devtools.ts",
|
|
158
159
|
performance: "./performance.ts",
|
|
159
160
|
ecosystem: "./ecosystem.ts",
|
|
@@ -170,7 +171,7 @@ var CDN_ENTRY_POINTS = {
|
|
|
170
171
|
};
|
|
171
172
|
var packageInfo = {
|
|
172
173
|
name: "sibujs",
|
|
173
|
-
version: true ? "4.
|
|
174
|
+
version: true ? "4.14.0" : "dev",
|
|
174
175
|
entryPoints: MODULE_ENTRY_POINTS,
|
|
175
176
|
/**
|
|
176
177
|
* Generate the package.json `exports` map. Module entries resolve to the
|
|
@@ -315,7 +316,7 @@ var env = {
|
|
|
315
316
|
};
|
|
316
317
|
|
|
317
318
|
// src/plugins/versioning.ts
|
|
318
|
-
var VERSION = true ? "4.
|
|
319
|
+
var VERSION = true ? "4.14.0" : "dev";
|
|
319
320
|
var NUM = "(?:0|[1-9]\\d*)";
|
|
320
321
|
var PRE_ID = `(?:${NUM}|\\d*[a-zA-Z-][0-9a-zA-Z-]*)`;
|
|
321
322
|
var BUILD_ID = "[0-9a-zA-Z-]+";
|
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
} from "./chunk-7ZHH77QA.js";
|
|
10
10
|
import {
|
|
11
11
|
effect
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AE32RGWX.js";
|
|
13
13
|
import {
|
|
14
14
|
sanitizeUrl
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-B3HOT4TK.js";
|
|
16
16
|
import {
|
|
17
17
|
batch,
|
|
18
18
|
signal
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4FJSAUKB.js";
|
|
20
20
|
import {
|
|
21
21
|
reportError
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-S37PZD6I.js";
|
|
23
23
|
|
|
24
24
|
// src/browser/media.ts
|
|
25
25
|
function media(query) {
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isSSR
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UYTYNCMZ.js";
|
|
4
|
+
import {
|
|
5
|
+
emitDevtools
|
|
6
|
+
} from "./chunk-4FJSAUKB.js";
|
|
4
7
|
import {
|
|
5
8
|
cleanup,
|
|
6
|
-
emitDevtools,
|
|
7
9
|
getOwnerScope,
|
|
8
10
|
retrack,
|
|
9
11
|
runWithOwnerScope,
|
|
10
12
|
untracked
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MIRKTVH4.js";
|
|
12
14
|
import {
|
|
13
|
-
devAssert,
|
|
14
15
|
reportError
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-S37PZD6I.js";
|
|
17
|
+
import {
|
|
18
|
+
devAssert
|
|
19
|
+
} from "./chunk-NT3ZYB5S.js";
|
|
16
20
|
|
|
17
21
|
// src/core/signals/effect.ts
|
|
18
22
|
var _g = globalThis;
|
|
@@ -94,7 +98,7 @@ function disposeEffect(ctx) {
|
|
|
94
98
|
}
|
|
95
99
|
function effect(effectFn, options) {
|
|
96
100
|
devAssert(typeof effectFn === "function", "effect: argument must be a function.");
|
|
97
|
-
if (isSSR()) return () => {
|
|
101
|
+
if (isSSR() && !options?.server) return () => {
|
|
98
102
|
};
|
|
99
103
|
const ctx = {
|
|
100
104
|
fn: effectFn,
|
|
@@ -4,19 +4,21 @@ import {
|
|
|
4
4
|
} from "./chunk-62BDYGAG.js";
|
|
5
5
|
import {
|
|
6
6
|
derived
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-N7A6FKWW.js";
|
|
8
8
|
import {
|
|
9
9
|
effect
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AE32RGWX.js";
|
|
11
11
|
import {
|
|
12
12
|
batch,
|
|
13
13
|
signal
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4FJSAUKB.js";
|
|
15
15
|
import {
|
|
16
|
-
DEV,
|
|
17
|
-
devWarn,
|
|
18
16
|
reportError
|
|
19
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-S37PZD6I.js";
|
|
18
|
+
import {
|
|
19
|
+
DEV,
|
|
20
|
+
devWarn
|
|
21
|
+
} from "./chunk-NT3ZYB5S.js";
|
|
20
22
|
|
|
21
23
|
// src/patterns/machine.ts
|
|
22
24
|
function ownEntry(table, key) {
|
|
@@ -6,33 +6,39 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
div,
|
|
8
8
|
span
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7ILEHTVX.js";
|
|
10
10
|
import {
|
|
11
11
|
STATIC_VALUE_RESOLVER,
|
|
12
12
|
planHeadElementEntry,
|
|
13
|
-
planMetaEntry
|
|
14
|
-
|
|
13
|
+
planMetaEntry,
|
|
14
|
+
recordServerHead,
|
|
15
|
+
serializeHeadEntry,
|
|
16
|
+
serializePlannedHeadEntry
|
|
17
|
+
} from "./chunk-BOYKGGVD.js";
|
|
15
18
|
import {
|
|
16
19
|
globalSingleton
|
|
17
20
|
} from "./chunk-7ZHH77QA.js";
|
|
18
21
|
import {
|
|
19
22
|
effect
|
|
20
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-AE32RGWX.js";
|
|
21
24
|
import {
|
|
22
25
|
sanitizeUrl
|
|
23
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-B3HOT4TK.js";
|
|
27
|
+
import {
|
|
28
|
+
getRequestStore
|
|
29
|
+
} from "./chunk-UYTYNCMZ.js";
|
|
24
30
|
import {
|
|
25
31
|
batch,
|
|
26
32
|
signal
|
|
27
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-4FJSAUKB.js";
|
|
28
34
|
import {
|
|
29
35
|
bindOwnerScope
|
|
30
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-MIRKTVH4.js";
|
|
31
37
|
import {
|
|
32
38
|
registerDisposer,
|
|
33
39
|
replaceChildrenSafely,
|
|
34
40
|
reportError
|
|
35
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-S37PZD6I.js";
|
|
36
42
|
|
|
37
43
|
// src/platform/head.ts
|
|
38
44
|
function escapeScriptJsonLocal(json) {
|
|
@@ -86,8 +92,43 @@ function applyMetaEntry(metaProps, managedElements) {
|
|
|
86
92
|
retract();
|
|
87
93
|
};
|
|
88
94
|
}
|
|
95
|
+
function headEntryKey(tag, attrs) {
|
|
96
|
+
const lower = (v) => (v ?? "").toLowerCase();
|
|
97
|
+
if (tag === "meta") {
|
|
98
|
+
if (attrs.name) return `meta:name:${lower(attrs.name)}`;
|
|
99
|
+
if (attrs.property) return `meta:property:${lower(attrs.property)}`;
|
|
100
|
+
if (attrs["http-equiv"]) return `meta:http-equiv:${lower(attrs["http-equiv"])}`;
|
|
101
|
+
return `meta:${JSON.stringify(attrs)}`;
|
|
102
|
+
}
|
|
103
|
+
const rel = lower(attrs.rel);
|
|
104
|
+
if (rel === "canonical") return "link:rel:canonical";
|
|
105
|
+
if (rel === "alternate" && attrs.hreflang) return `link:hreflang:${lower(attrs.hreflang)}`;
|
|
106
|
+
return `link:${rel}:${attrs.href ?? ""}`;
|
|
107
|
+
}
|
|
108
|
+
function resolveHeadForServer(props) {
|
|
109
|
+
const layer = { tags: [] };
|
|
110
|
+
if (props.title != null) layer.title = CLIENT_RESOLVER.resolveValue("title", props.title);
|
|
111
|
+
for (const entry of props.meta ?? []) {
|
|
112
|
+
const plan = planMetaEntry(entry, CLIENT_RESOLVER);
|
|
113
|
+
if (plan.kind === "drop") continue;
|
|
114
|
+
const attrs = Object.fromEntries(plan.attributes);
|
|
115
|
+
layer.tags.push({ key: headEntryKey("meta", attrs), html: serializePlannedHeadEntry("meta", plan.attributes) });
|
|
116
|
+
}
|
|
117
|
+
for (const attrs of props.link ?? []) {
|
|
118
|
+
const html = serializeHeadEntry("link", attrs);
|
|
119
|
+
if (html) layer.tags.push({ key: headEntryKey("link", attrs), html });
|
|
120
|
+
}
|
|
121
|
+
return layer;
|
|
122
|
+
}
|
|
123
|
+
function recordHeadForServer(props, anchor) {
|
|
124
|
+
const withdraw = recordServerHead(() => resolveHeadForServer(props));
|
|
125
|
+
if (!withdraw) return false;
|
|
126
|
+
registerDisposer(anchor, withdraw);
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
89
129
|
function Head(props) {
|
|
90
130
|
const anchor = document.createComment("sibu-head");
|
|
131
|
+
if (getRequestStore()?.ssr && recordHeadForServer(props, anchor)) return anchor;
|
|
91
132
|
const managedElements = [];
|
|
92
133
|
const effectCleanups = [];
|
|
93
134
|
const cleanup = () => {
|