unhead 2.0.0-rc.9 → 2.0.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.
- package/README.md +13 -13
- package/client.d.ts +1 -1
- package/dist/client.d.mts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.mjs +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/legacy.d.mts +3 -3
- package/dist/legacy.d.ts +3 -3
- package/dist/legacy.mjs +4 -4
- package/dist/plugins.d.mts +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.mjs +2 -2
- package/dist/scripts.d.mts +3 -3
- package/dist/scripts.d.ts +3 -3
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.mjs +13 -6
- package/dist/shared/{unhead.BkcHHdrX.d.mts → unhead.B5FB8Wd_.d.mts} +1 -1
- package/dist/shared/{unhead.DJoUvcL9.d.ts → unhead.BKXGwhbK.d.ts} +1 -1
- package/dist/shared/{unhead.Bgfk1w0V.d.ts → unhead.BadLEBHk.d.ts} +1 -1
- package/dist/shared/{unhead.C_bu7yih.d.mts → unhead.ByFhhdEl.d.mts} +1 -1
- package/dist/shared/{unhead.kVuXtrDW.mjs → unhead.C13swrCa.mjs} +1 -1
- package/dist/shared/{unhead.xsi8MZXD.mjs → unhead.Cp0iF6eN.mjs} +16 -16
- package/dist/shared/{unhead.DnNYlT4k.mjs → unhead.DeCxexjU.mjs} +12 -1
- package/dist/shared/{unhead.CfkTQyqT.d.ts → unhead.JxZtZHOQ.d.mts} +21 -4
- package/dist/shared/{unhead.CfkTQyqT.d.mts → unhead.JxZtZHOQ.d.ts} +21 -4
- package/dist/shared/{unhead.CoND8kck.mjs → unhead.Txd0XTIP.mjs} +4 -2
- package/dist/types.d.mts +4 -4
- package/dist/types.d.ts +4 -4
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.mjs +2 -2
- package/legacy.d.ts +1 -1
- package/package.json +1 -1
- package/plugins.d.ts +1 -1
- package/scripts.d.ts +1 -1
- package/server.d.ts +1 -1
- package/types.d.ts +1 -1
- package/utils.d.ts +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# `unhead`
|
|
2
|
-
|
|
3
|
-
Visit the [documentation site](https://unhead.unjs.io/) for guides and API references.
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm i unhead
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## License
|
|
12
|
-
|
|
13
|
-
MIT License © 2022-PRESENT [Harlan Wilton](https://github.com/harlan-zw)
|
|
1
|
+
# `unhead`
|
|
2
|
+
|
|
3
|
+
Visit the [documentation site](https://unhead.unjs.io/) for guides and API references.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i unhead
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## License
|
|
12
|
+
|
|
13
|
+
MIT License © 2022-PRESENT [Harlan Wilton](https://github.com/harlan-zw)
|
package/client.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dist/client.mjs'
|
|
1
|
+
export * from './dist/client.mjs'
|
package/dist/client.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as ResolvableHead, q as CreateClientHeadOptions, U as Unhead, G as RenderDomHeadOptions } from './shared/unhead.
|
|
1
|
+
import { R as ResolvableHead, q as CreateClientHeadOptions, U as Unhead, G as RenderDomHeadOptions } from './shared/unhead.JxZtZHOQ.mjs';
|
|
2
2
|
import 'hookable';
|
|
3
3
|
|
|
4
4
|
declare function createHead<T = ResolvableHead>(options?: CreateClientHeadOptions): Unhead<T>;
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as ResolvableHead, q as CreateClientHeadOptions, U as Unhead, G as RenderDomHeadOptions } from './shared/unhead.
|
|
1
|
+
import { R as ResolvableHead, q as CreateClientHeadOptions, U as Unhead, G as RenderDomHeadOptions } from './shared/unhead.JxZtZHOQ.js';
|
|
2
2
|
import 'hookable';
|
|
3
3
|
|
|
4
4
|
declare function createHead<T = ResolvableHead>(options?: CreateClientHeadOptions): Unhead<T>;
|
package/dist/client.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as createUnhead } from './shared/unhead.
|
|
1
|
+
import { a as createUnhead } from './shared/unhead.Txd0XTIP.mjs';
|
|
2
2
|
import { H as HasElementTags } from './shared/unhead.yem5I2v_.mjs';
|
|
3
|
-
import { h as hashTag, i as isMetaArrayDupeKey, a as normalizeProps, d as dedupeKey } from './shared/unhead.
|
|
3
|
+
import { h as hashTag, i as isMetaArrayDupeKey, a as normalizeProps, d as dedupeKey } from './shared/unhead.Cp0iF6eN.mjs';
|
|
4
4
|
import 'hookable';
|
|
5
5
|
import './shared/unhead.DZbvapt-.mjs';
|
|
6
6
|
|
|
@@ -93,7 +93,7 @@ async function renderDOMHead(head, options = {}) {
|
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
for (const k in tag.props) {
|
|
96
|
-
if (!Object.
|
|
96
|
+
if (!Object.prototype.hasOwnProperty.call(tag.props, k))
|
|
97
97
|
continue;
|
|
98
98
|
const value = tag.props[k];
|
|
99
99
|
if (k.startsWith("on") && typeof value === "function") {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as HeadSafe } from './shared/unhead.
|
|
2
|
-
import { U as Unhead, R as ResolvableHead, r as HeadEntryOptions, o as ActiveHeadEntry, a8 as UseSeoMetaInput, C as CreateHeadOptions } from './shared/unhead.
|
|
3
|
-
export { u as useScript } from './shared/unhead.
|
|
1
|
+
import { H as HeadSafe } from './shared/unhead.ByFhhdEl.mjs';
|
|
2
|
+
import { U as Unhead, R as ResolvableHead, r as HeadEntryOptions, o as ActiveHeadEntry, a8 as UseSeoMetaInput, C as CreateHeadOptions } from './shared/unhead.JxZtZHOQ.mjs';
|
|
3
|
+
export { u as useScript } from './shared/unhead.B5FB8Wd_.mjs';
|
|
4
4
|
import 'hookable';
|
|
5
5
|
|
|
6
6
|
declare function useHead<T extends Unhead<any>, I = ResolvableHead>(unhead: T, input?: ResolvableHead, options?: HeadEntryOptions): ActiveHeadEntry<I>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as HeadSafe } from './shared/unhead.
|
|
2
|
-
import { U as Unhead, R as ResolvableHead, r as HeadEntryOptions, o as ActiveHeadEntry, a8 as UseSeoMetaInput, C as CreateHeadOptions } from './shared/unhead.
|
|
3
|
-
export { u as useScript } from './shared/unhead.
|
|
1
|
+
import { H as HeadSafe } from './shared/unhead.BadLEBHk.js';
|
|
2
|
+
import { U as Unhead, R as ResolvableHead, r as HeadEntryOptions, o as ActiveHeadEntry, a8 as UseSeoMetaInput, C as CreateHeadOptions } from './shared/unhead.JxZtZHOQ.js';
|
|
3
|
+
export { u as useScript } from './shared/unhead.BKXGwhbK.js';
|
|
4
4
|
import 'hookable';
|
|
5
5
|
|
|
6
6
|
declare function useHead<T extends Unhead<any>, I = ResolvableHead>(unhead: T, input?: ResolvableHead, options?: HeadEntryOptions): ActiveHeadEntry<I>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { u as useHead, a as useHeadSafe, b as useSeoMeta, c as useServerHead, d as useServerHeadSafe, e as useServerSeoMeta } from './shared/unhead.BPM0-cfG.mjs';
|
|
2
|
-
export { c as createHeadCore, a as createUnhead } from './shared/unhead.
|
|
2
|
+
export { c as createHeadCore, a as createUnhead } from './shared/unhead.Txd0XTIP.mjs';
|
|
3
3
|
export { u as useScript } from './shared/unhead.B578PsDV.mjs';
|
|
4
4
|
import './shared/unhead.CApf5sj3.mjs';
|
|
5
5
|
import './shared/unhead.DQc16pHI.mjs';
|
|
6
6
|
import './shared/unhead.yem5I2v_.mjs';
|
|
7
7
|
import 'hookable';
|
|
8
|
-
import './shared/unhead.
|
|
8
|
+
import './shared/unhead.Cp0iF6eN.mjs';
|
|
9
9
|
import './shared/unhead.DZbvapt-.mjs';
|
package/dist/legacy.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createUnhead } from './index.mjs';
|
|
2
2
|
export { useHead, useHeadSafe, useSeoMeta, useServerHead, useServerHeadSafe, useServerSeoMeta } from './index.mjs';
|
|
3
|
-
import { U as Unhead, R as ResolvableHead, C as CreateHeadOptions } from './shared/unhead.
|
|
4
|
-
export { u as useScript } from './shared/unhead.
|
|
5
|
-
import './shared/unhead.
|
|
3
|
+
import { U as Unhead, R as ResolvableHead, C as CreateHeadOptions } from './shared/unhead.JxZtZHOQ.mjs';
|
|
4
|
+
export { u as useScript } from './shared/unhead.B5FB8Wd_.mjs';
|
|
5
|
+
import './shared/unhead.ByFhhdEl.mjs';
|
|
6
6
|
import 'hookable';
|
|
7
7
|
|
|
8
8
|
declare const activeHead: {
|
package/dist/legacy.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createUnhead } from './index.js';
|
|
2
2
|
export { useHead, useHeadSafe, useSeoMeta, useServerHead, useServerHeadSafe, useServerSeoMeta } from './index.js';
|
|
3
|
-
import { U as Unhead, R as ResolvableHead, C as CreateHeadOptions } from './shared/unhead.
|
|
4
|
-
export { u as useScript } from './shared/unhead.
|
|
5
|
-
import './shared/unhead.
|
|
3
|
+
import { U as Unhead, R as ResolvableHead, C as CreateHeadOptions } from './shared/unhead.JxZtZHOQ.js';
|
|
4
|
+
export { u as useScript } from './shared/unhead.BKXGwhbK.js';
|
|
5
|
+
import './shared/unhead.BadLEBHk.js';
|
|
6
6
|
import 'hookable';
|
|
7
7
|
|
|
8
8
|
declare const activeHead: {
|
package/dist/legacy.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { a as createUnhead } from './shared/unhead.
|
|
2
|
-
import { D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin, A as AliasSortingPlugin } from './shared/unhead.
|
|
1
|
+
import { a as createUnhead } from './shared/unhead.Txd0XTIP.mjs';
|
|
2
|
+
import { D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin, A as AliasSortingPlugin } from './shared/unhead.DeCxexjU.mjs';
|
|
3
3
|
export { u as useHead, a as useHeadSafe, b as useSeoMeta, c as useServerHead, d as useServerHeadSafe, e as useServerSeoMeta } from './shared/unhead.BPM0-cfG.mjs';
|
|
4
4
|
export { u as useScript } from './shared/unhead.B578PsDV.mjs';
|
|
5
5
|
import 'hookable';
|
|
6
|
-
import './shared/unhead.
|
|
6
|
+
import './shared/unhead.Cp0iF6eN.mjs';
|
|
7
7
|
import './shared/unhead.yem5I2v_.mjs';
|
|
8
8
|
import './shared/unhead.DZbvapt-.mjs';
|
|
9
9
|
import './shared/unhead.CApf5sj3.mjs';
|
|
10
10
|
import './shared/unhead.DQc16pHI.mjs';
|
|
11
|
-
import './shared/unhead.
|
|
11
|
+
import './shared/unhead.C13swrCa.mjs';
|
|
12
12
|
|
|
13
13
|
const activeHead = { value: null };
|
|
14
14
|
function getActiveHead() {
|
package/dist/plugins.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as HeadPluginInput, U as Unhead, l as HeadPluginOptions } from './shared/unhead.
|
|
1
|
+
import { m as HeadPluginInput, U as Unhead, l as HeadPluginOptions } from './shared/unhead.JxZtZHOQ.mjs';
|
|
2
2
|
import 'hookable';
|
|
3
3
|
|
|
4
4
|
declare const AliasSortingPlugin: HeadPluginInput;
|
package/dist/plugins.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as HeadPluginInput, U as Unhead, l as HeadPluginOptions } from './shared/unhead.
|
|
1
|
+
import { m as HeadPluginInput, U as Unhead, l as HeadPluginOptions } from './shared/unhead.JxZtZHOQ.js';
|
|
2
2
|
import 'hookable';
|
|
3
3
|
|
|
4
4
|
declare const AliasSortingPlugin: HeadPluginInput;
|
package/dist/plugins.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { A as AliasSortingPlugin, D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin } from './shared/unhead.
|
|
1
|
+
export { A as AliasSortingPlugin, D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin } from './shared/unhead.DeCxexjU.mjs';
|
|
2
2
|
import { d as defineHeadPlugin } from './shared/unhead.CApf5sj3.mjs';
|
|
3
3
|
export { F as FlatMetaPlugin, S as SafeInputPlugin } from './shared/unhead.CApf5sj3.mjs';
|
|
4
4
|
import './shared/unhead.DZbvapt-.mjs';
|
|
5
|
-
import './shared/unhead.
|
|
5
|
+
import './shared/unhead.C13swrCa.mjs';
|
|
6
6
|
import './shared/unhead.DQc16pHI.mjs';
|
|
7
7
|
import './shared/unhead.yem5I2v_.mjs';
|
|
8
8
|
|
package/dist/scripts.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as RecordingEntry } from './shared/unhead.
|
|
2
|
-
export { A as AsVoidFunctions, E as EventHandlerOptions, S as ScriptInstance, h as UseFunctionType, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, W as WarmupStrategy } from './shared/unhead.
|
|
3
|
-
export { r as resolveScriptKey, u as useScript } from './shared/unhead.
|
|
1
|
+
import { i as RecordingEntry } from './shared/unhead.JxZtZHOQ.mjs';
|
|
2
|
+
export { A as AsVoidFunctions, E as EventHandlerOptions, S as ScriptInstance, h as UseFunctionType, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, W as WarmupStrategy } from './shared/unhead.JxZtZHOQ.mjs';
|
|
3
|
+
export { r as resolveScriptKey, u as useScript } from './shared/unhead.B5FB8Wd_.mjs';
|
|
4
4
|
import 'hookable';
|
|
5
5
|
|
|
6
6
|
declare function createSpyProxy<T extends Record<string, any> | any[]>(target: T, onApply: (stack: RecordingEntry[][]) => void): T;
|
package/dist/scripts.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as RecordingEntry } from './shared/unhead.
|
|
2
|
-
export { A as AsVoidFunctions, E as EventHandlerOptions, S as ScriptInstance, h as UseFunctionType, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, W as WarmupStrategy } from './shared/unhead.
|
|
3
|
-
export { r as resolveScriptKey, u as useScript } from './shared/unhead.
|
|
1
|
+
import { i as RecordingEntry } from './shared/unhead.JxZtZHOQ.js';
|
|
2
|
+
export { A as AsVoidFunctions, E as EventHandlerOptions, S as ScriptInstance, h as UseFunctionType, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, W as WarmupStrategy } from './shared/unhead.JxZtZHOQ.js';
|
|
3
|
+
export { r as resolveScriptKey, u as useScript } from './shared/unhead.BKXGwhbK.js';
|
|
4
4
|
import 'hookable';
|
|
5
5
|
|
|
6
6
|
declare function createSpyProxy<T extends Record<string, any> | any[]>(target: T, onApply: (stack: RecordingEntry[][]) => void): T;
|
package/dist/server.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as ResolvableHead, p as CreateServerHeadOptions, U as Unhead, u as RenderSSRHeadOptions, t as SSRHeadPayload, a4 as SerializableHead, au as HeadTag } from './shared/unhead.
|
|
1
|
+
import { R as ResolvableHead, p as CreateServerHeadOptions, U as Unhead, u as RenderSSRHeadOptions, t as SSRHeadPayload, a4 as SerializableHead, au as HeadTag } from './shared/unhead.JxZtZHOQ.mjs';
|
|
2
2
|
import 'hookable';
|
|
3
3
|
|
|
4
4
|
declare function createHead<T = ResolvableHead>(options?: CreateServerHeadOptions): Unhead<T>;
|
package/dist/server.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as ResolvableHead, p as CreateServerHeadOptions, U as Unhead, u as RenderSSRHeadOptions, t as SSRHeadPayload, a4 as SerializableHead, au as HeadTag } from './shared/unhead.
|
|
1
|
+
import { R as ResolvableHead, p as CreateServerHeadOptions, U as Unhead, u as RenderSSRHeadOptions, t as SSRHeadPayload, a4 as SerializableHead, au as HeadTag } from './shared/unhead.JxZtZHOQ.js';
|
|
2
2
|
import 'hookable';
|
|
3
3
|
|
|
4
4
|
declare function createHead<T = ResolvableHead>(options?: CreateServerHeadOptions): Unhead<T>;
|
package/dist/server.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { a as createUnhead } from './shared/unhead.
|
|
1
|
+
import { a as createUnhead } from './shared/unhead.Txd0XTIP.mjs';
|
|
2
2
|
import { T as TagsWithInnerContent, S as SelfClosingTags$1 } from './shared/unhead.yem5I2v_.mjs';
|
|
3
3
|
import 'hookable';
|
|
4
|
-
import './shared/unhead.
|
|
4
|
+
import './shared/unhead.Cp0iF6eN.mjs';
|
|
5
5
|
import './shared/unhead.DZbvapt-.mjs';
|
|
6
6
|
|
|
7
|
+
// @__NO_SIDE_EFFECTS__
|
|
7
8
|
function createHead(options = {}) {
|
|
8
9
|
const unhead = createUnhead({
|
|
9
10
|
...options,
|
|
@@ -15,6 +16,7 @@ function createHead(options = {}) {
|
|
|
15
16
|
if (k && k.startsWith("on") && typeof v === "function") {
|
|
16
17
|
return `this.dataset.${k}fired = true`;
|
|
17
18
|
}
|
|
19
|
+
return v;
|
|
18
20
|
}
|
|
19
21
|
],
|
|
20
22
|
init: [
|
|
@@ -35,18 +37,23 @@ function createHead(options = {}) {
|
|
|
35
37
|
...options.init || []
|
|
36
38
|
]
|
|
37
39
|
});
|
|
40
|
+
unhead._ssrPayload = {};
|
|
38
41
|
unhead.use({
|
|
39
42
|
key: "server",
|
|
40
43
|
hooks: {
|
|
41
44
|
"tags:resolve": function(ctx) {
|
|
42
45
|
const title = ctx.tagMap.get("title");
|
|
43
46
|
const titleTemplate = ctx.tagMap.get("titleTemplate");
|
|
44
|
-
|
|
45
|
-
const payload = {
|
|
47
|
+
let payload = {
|
|
46
48
|
title: title?.mode === "server" ? unhead._title : void 0,
|
|
47
|
-
titleTemplate: titleTemplate?.mode === "server" ? unhead._titleTemplate : void 0
|
|
48
|
-
templateParams: templateParams?.mode === "server" ? unhead._templateParams : void 0
|
|
49
|
+
titleTemplate: titleTemplate?.mode === "server" ? unhead._titleTemplate : void 0
|
|
49
50
|
};
|
|
51
|
+
if (Object.keys(unhead._ssrPayload || {}).length > 0) {
|
|
52
|
+
payload = {
|
|
53
|
+
...unhead._ssrPayload,
|
|
54
|
+
...payload
|
|
55
|
+
};
|
|
56
|
+
}
|
|
50
57
|
if (Object.values(payload).some(Boolean)) {
|
|
51
58
|
ctx.tags.push({
|
|
52
59
|
tag: "script",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as Unhead, a as UseScriptInput, b as UseScriptOptions, c as UseScriptReturn, d as UseScriptResolvedInput } from './unhead.
|
|
1
|
+
import { U as Unhead, a as UseScriptInput, b as UseScriptOptions, c as UseScriptReturn, d as UseScriptResolvedInput } from './unhead.JxZtZHOQ.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated compute key manually
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as Unhead, a as UseScriptInput, b as UseScriptOptions, c as UseScriptReturn, d as UseScriptResolvedInput } from './unhead.
|
|
1
|
+
import { U as Unhead, a as UseScriptInput, b as UseScriptOptions, c as UseScriptReturn, d as UseScriptResolvedInput } from './unhead.JxZtZHOQ.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated compute key manually
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a5 as RawInput, R as ResolvableHead, az as ResolvableValue, aA as ResolvableProperties, ag as LinkWithoutEvents, ab as DataKeys, J as SchemaAugmentations, O as UnheadMeta, ai as ScriptWithoutEvents, N as UnheadHtmlAttributes, L as UnheadBodyAttributesWithoutEvents } from './unhead.
|
|
1
|
+
import { a5 as RawInput, R as ResolvableHead, az as ResolvableValue, aA as ResolvableProperties, ag as LinkWithoutEvents, ab as DataKeys, J as SchemaAugmentations, O as UnheadMeta, ai as ScriptWithoutEvents, N as UnheadHtmlAttributes, L as UnheadBodyAttributesWithoutEvents } from './unhead.JxZtZHOQ.js';
|
|
2
2
|
|
|
3
3
|
type Base = RawInput<'base'>;
|
|
4
4
|
type HtmlAttributes = RawInput<'htmlAttrs'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a5 as RawInput, R as ResolvableHead, az as ResolvableValue, aA as ResolvableProperties, ag as LinkWithoutEvents, ab as DataKeys, J as SchemaAugmentations, O as UnheadMeta, ai as ScriptWithoutEvents, N as UnheadHtmlAttributes, L as UnheadBodyAttributesWithoutEvents } from './unhead.
|
|
1
|
+
import { a5 as RawInput, R as ResolvableHead, az as ResolvableValue, aA as ResolvableProperties, ag as LinkWithoutEvents, ab as DataKeys, J as SchemaAugmentations, O as UnheadMeta, ai as ScriptWithoutEvents, N as UnheadHtmlAttributes, L as UnheadBodyAttributesWithoutEvents } from './unhead.JxZtZHOQ.mjs';
|
|
2
2
|
|
|
3
3
|
type Base = RawInput<'base'>;
|
|
4
4
|
type HtmlAttributes = RawInput<'htmlAttrs'>;
|
|
@@ -11,7 +11,7 @@ function sub(p, token, isJson = false) {
|
|
|
11
11
|
val = p[token];
|
|
12
12
|
}
|
|
13
13
|
if (val !== void 0) {
|
|
14
|
-
return isJson ? (val || "").replace(/</g, "\\u003C").replace(/"/g, '\\"') : val || "";
|
|
14
|
+
return isJson ? (val || "").replace(/\\/g, "\\\\").replace(/</g, "\\u003C").replace(/"/g, '\\"') : val || "";
|
|
15
15
|
}
|
|
16
16
|
return void 0;
|
|
17
17
|
}
|
|
@@ -45,13 +45,14 @@ function hashTag(tag) {
|
|
|
45
45
|
|
|
46
46
|
function walkResolver(val, resolve, key) {
|
|
47
47
|
const type = typeof val;
|
|
48
|
+
if (type === "function") {
|
|
49
|
+
if (!key || key !== "titleTemplate" && !(key[0] === "o" && key[1] === "n")) {
|
|
50
|
+
val = val();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
48
53
|
let v;
|
|
49
|
-
if (
|
|
50
|
-
v = type === "function" ? val() : val;
|
|
51
|
-
} else if (resolve && (key === "titleTemplate" || key[0] === "o" && key[1] === "n")) {
|
|
54
|
+
if (resolve) {
|
|
52
55
|
v = resolve(key, val);
|
|
53
|
-
} else if (resolve) {
|
|
54
|
-
v = type === "function" ? resolve(key, val()) : resolve(key, val);
|
|
55
56
|
}
|
|
56
57
|
if (Array.isArray(v)) {
|
|
57
58
|
return v.map((r) => walkResolver(r, resolve));
|
|
@@ -127,7 +128,7 @@ function normalizeProps(tag, input) {
|
|
|
127
128
|
const strValue = String(value);
|
|
128
129
|
const isDataKey = key.startsWith("data-");
|
|
129
130
|
if (strValue === "true" || strValue === "") {
|
|
130
|
-
tag.props[key] = isDataKey ?
|
|
131
|
+
tag.props[key] = isDataKey ? strValue : true;
|
|
131
132
|
} else if (!value && isDataKey && strValue === "false") {
|
|
132
133
|
tag.props[key] = "false";
|
|
133
134
|
} else if (value !== void 0) {
|
|
@@ -152,20 +153,19 @@ function normalizeEntryToTags(input, propResolvers) {
|
|
|
152
153
|
if (!input) {
|
|
153
154
|
return [];
|
|
154
155
|
}
|
|
155
|
-
const tags = [];
|
|
156
156
|
if (typeof input === "function") {
|
|
157
|
-
|
|
157
|
+
input = input();
|
|
158
158
|
}
|
|
159
|
-
|
|
160
|
-
let res = val;
|
|
159
|
+
const resolvers = (key, val) => {
|
|
161
160
|
for (let i = 0; i < propResolvers.length; i++) {
|
|
162
|
-
|
|
163
|
-
if (v !== void 0)
|
|
164
|
-
res = v;
|
|
161
|
+
val = propResolvers[i](key, val);
|
|
165
162
|
}
|
|
166
|
-
return
|
|
167
|
-
}
|
|
168
|
-
|
|
163
|
+
return val;
|
|
164
|
+
};
|
|
165
|
+
input = resolvers(void 0, input);
|
|
166
|
+
const tags = [];
|
|
167
|
+
input = walkResolver(input, resolvers);
|
|
168
|
+
Object.entries(input || {}).forEach(([key, value]) => {
|
|
169
169
|
if (value === void 0)
|
|
170
170
|
return;
|
|
171
171
|
for (const v of Array.isArray(value) ? value : [value])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as defineHeadPlugin } from './unhead.CApf5sj3.mjs';
|
|
2
2
|
import { s as sortTags } from './unhead.DZbvapt-.mjs';
|
|
3
|
-
import { p as processTemplateParams } from './unhead.
|
|
3
|
+
import { p as processTemplateParams } from './unhead.C13swrCa.mjs';
|
|
4
4
|
|
|
5
5
|
const formatKey = (k) => !k.includes(":key") ? k.split(":").join(":key:") : k;
|
|
6
6
|
const AliasSortingPlugin = defineHeadPlugin({
|
|
@@ -115,6 +115,17 @@ const TemplateParamsPlugin = /* @__PURE__ */ defineHeadPlugin((head) => {
|
|
|
115
115
|
return {
|
|
116
116
|
key: "template-params",
|
|
117
117
|
hooks: {
|
|
118
|
+
"entries:normalize": (ctx) => {
|
|
119
|
+
const params = ctx.tags.filter((t) => t.tag === "templateParams" && t.mode === "server")?.[0]?.props || {};
|
|
120
|
+
if (Object.keys(params).length) {
|
|
121
|
+
head._ssrPayload = {
|
|
122
|
+
templateParams: {
|
|
123
|
+
...head._ssrPayload?.templateParams || {},
|
|
124
|
+
...params
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
},
|
|
118
129
|
"tags:resolve": ({ tagMap, tags }) => {
|
|
119
130
|
const params = tagMap.get("templateParams")?.props || {};
|
|
120
131
|
const sep = params.separator || "|";
|
|
@@ -9,8 +9,18 @@ type UseScriptResolvedInput = Omit<ScriptWithoutEvents, 'src'> & {
|
|
|
9
9
|
src: string;
|
|
10
10
|
} & DataKeys & MaybeEventFnHandlers<HttpEventAttributes> & SchemaAugmentations['script'];
|
|
11
11
|
type BaseScriptApi = Record<symbol | string, any>;
|
|
12
|
+
type HasDiscriminatedParameters<T> = T extends {
|
|
13
|
+
(first: infer A, ...rest1: any[]): any;
|
|
14
|
+
(first: infer B, ...rest2: any[]): any;
|
|
15
|
+
} ? A extends B ? B extends A ? false : true : true : false;
|
|
16
|
+
type HasDifferentParameterCounts<T> = T extends {
|
|
17
|
+
(...args: infer A): any;
|
|
18
|
+
} & {
|
|
19
|
+
(...args: infer B): any;
|
|
20
|
+
} ? A['length'] extends B['length'] ? B['length'] extends A['length'] ? false : true : true : false;
|
|
21
|
+
type IsOverloadedFunction<T> = HasDiscriminatedParameters<T> extends true ? true : HasDifferentParameterCounts<T> extends true ? true : false;
|
|
12
22
|
type AsVoidFunctions<T extends BaseScriptApi> = {
|
|
13
|
-
[
|
|
23
|
+
[K in keyof T]: T[K] extends any[] ? T[K] : T[K] extends (...args: infer A) => any ? IsOverloadedFunction<T[K]> extends true ? T[K] : (...args: A) => void : T[K] extends Record<any, any> ? AsVoidFunctions<T[K]> : never;
|
|
14
24
|
};
|
|
15
25
|
type UseScriptInput = string | UseScriptResolvedInput;
|
|
16
26
|
type UseFunctionType<T, U> = T extends {
|
|
@@ -907,7 +917,7 @@ interface MetaFlat extends MetaFlatArticle, MetaFlatBook, MetaFlatProfile {
|
|
|
907
917
|
*
|
|
908
918
|
* @see https://developers.google.com/search/docs/crawling-indexing/special-tags
|
|
909
919
|
*/
|
|
910
|
-
google
|
|
920
|
+
google?:
|
|
911
921
|
/**
|
|
912
922
|
* When users search for your site, Google Search results sometimes display a search box specific to your site,
|
|
913
923
|
* along with other direct links to your site. This tag tells Google not to show the sitelinks search box.
|
|
@@ -922,7 +932,7 @@ interface MetaFlat extends MetaFlatArticle, MetaFlatBook, MetaFlatProfile {
|
|
|
922
932
|
*
|
|
923
933
|
* @see https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag
|
|
924
934
|
*/
|
|
925
|
-
googlebot
|
|
935
|
+
googlebot?:
|
|
926
936
|
/**
|
|
927
937
|
* When Google recognizes that the contents of a page aren't in the language that the user likely wants to read,
|
|
928
938
|
* Google may provide a translated title link and snippet in search results.
|
|
@@ -2035,6 +2045,9 @@ interface TagResolveContext {
|
|
|
2035
2045
|
tags: HeadTag[];
|
|
2036
2046
|
}
|
|
2037
2047
|
interface HeadHooks {
|
|
2048
|
+
/**
|
|
2049
|
+
* @deprecated use Unhead options to setup instead
|
|
2050
|
+
*/
|
|
2038
2051
|
'init': (ctx: Unhead<any>) => HookResult;
|
|
2039
2052
|
'entries:updated': (ctx: Unhead<any>) => HookResult;
|
|
2040
2053
|
'entries:resolve': (ctx: EntryResolveCtx<any>) => HookResult;
|
|
@@ -2164,7 +2177,7 @@ interface ActiveHeadEntry<Input> {
|
|
|
2164
2177
|
*/
|
|
2165
2178
|
_poll: (rm?: boolean) => void;
|
|
2166
2179
|
}
|
|
2167
|
-
type PropResolver = (key
|
|
2180
|
+
type PropResolver = (key?: string, value?: any, tag?: HeadTag) => any;
|
|
2168
2181
|
interface CreateHeadOptions {
|
|
2169
2182
|
document?: Document;
|
|
2170
2183
|
plugins?: HeadPluginInput[];
|
|
@@ -2293,6 +2306,10 @@ interface Unhead<Input = ResolvableHead> {
|
|
|
2293
2306
|
* @internal
|
|
2294
2307
|
*/
|
|
2295
2308
|
_titleTemplate?: string;
|
|
2309
|
+
/**
|
|
2310
|
+
* @internal
|
|
2311
|
+
*/
|
|
2312
|
+
_ssrPayload?: ResolvableHead;
|
|
2296
2313
|
}
|
|
2297
2314
|
interface DomState {
|
|
2298
2315
|
title: string;
|
|
@@ -9,8 +9,18 @@ type UseScriptResolvedInput = Omit<ScriptWithoutEvents, 'src'> & {
|
|
|
9
9
|
src: string;
|
|
10
10
|
} & DataKeys & MaybeEventFnHandlers<HttpEventAttributes> & SchemaAugmentations['script'];
|
|
11
11
|
type BaseScriptApi = Record<symbol | string, any>;
|
|
12
|
+
type HasDiscriminatedParameters<T> = T extends {
|
|
13
|
+
(first: infer A, ...rest1: any[]): any;
|
|
14
|
+
(first: infer B, ...rest2: any[]): any;
|
|
15
|
+
} ? A extends B ? B extends A ? false : true : true : false;
|
|
16
|
+
type HasDifferentParameterCounts<T> = T extends {
|
|
17
|
+
(...args: infer A): any;
|
|
18
|
+
} & {
|
|
19
|
+
(...args: infer B): any;
|
|
20
|
+
} ? A['length'] extends B['length'] ? B['length'] extends A['length'] ? false : true : true : false;
|
|
21
|
+
type IsOverloadedFunction<T> = HasDiscriminatedParameters<T> extends true ? true : HasDifferentParameterCounts<T> extends true ? true : false;
|
|
12
22
|
type AsVoidFunctions<T extends BaseScriptApi> = {
|
|
13
|
-
[
|
|
23
|
+
[K in keyof T]: T[K] extends any[] ? T[K] : T[K] extends (...args: infer A) => any ? IsOverloadedFunction<T[K]> extends true ? T[K] : (...args: A) => void : T[K] extends Record<any, any> ? AsVoidFunctions<T[K]> : never;
|
|
14
24
|
};
|
|
15
25
|
type UseScriptInput = string | UseScriptResolvedInput;
|
|
16
26
|
type UseFunctionType<T, U> = T extends {
|
|
@@ -907,7 +917,7 @@ interface MetaFlat extends MetaFlatArticle, MetaFlatBook, MetaFlatProfile {
|
|
|
907
917
|
*
|
|
908
918
|
* @see https://developers.google.com/search/docs/crawling-indexing/special-tags
|
|
909
919
|
*/
|
|
910
|
-
google
|
|
920
|
+
google?:
|
|
911
921
|
/**
|
|
912
922
|
* When users search for your site, Google Search results sometimes display a search box specific to your site,
|
|
913
923
|
* along with other direct links to your site. This tag tells Google not to show the sitelinks search box.
|
|
@@ -922,7 +932,7 @@ interface MetaFlat extends MetaFlatArticle, MetaFlatBook, MetaFlatProfile {
|
|
|
922
932
|
*
|
|
923
933
|
* @see https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag
|
|
924
934
|
*/
|
|
925
|
-
googlebot
|
|
935
|
+
googlebot?:
|
|
926
936
|
/**
|
|
927
937
|
* When Google recognizes that the contents of a page aren't in the language that the user likely wants to read,
|
|
928
938
|
* Google may provide a translated title link and snippet in search results.
|
|
@@ -2035,6 +2045,9 @@ interface TagResolveContext {
|
|
|
2035
2045
|
tags: HeadTag[];
|
|
2036
2046
|
}
|
|
2037
2047
|
interface HeadHooks {
|
|
2048
|
+
/**
|
|
2049
|
+
* @deprecated use Unhead options to setup instead
|
|
2050
|
+
*/
|
|
2038
2051
|
'init': (ctx: Unhead<any>) => HookResult;
|
|
2039
2052
|
'entries:updated': (ctx: Unhead<any>) => HookResult;
|
|
2040
2053
|
'entries:resolve': (ctx: EntryResolveCtx<any>) => HookResult;
|
|
@@ -2164,7 +2177,7 @@ interface ActiveHeadEntry<Input> {
|
|
|
2164
2177
|
*/
|
|
2165
2178
|
_poll: (rm?: boolean) => void;
|
|
2166
2179
|
}
|
|
2167
|
-
type PropResolver = (key
|
|
2180
|
+
type PropResolver = (key?: string, value?: any, tag?: HeadTag) => any;
|
|
2168
2181
|
interface CreateHeadOptions {
|
|
2169
2182
|
document?: Document;
|
|
2170
2183
|
plugins?: HeadPluginInput[];
|
|
@@ -2293,6 +2306,10 @@ interface Unhead<Input = ResolvableHead> {
|
|
|
2293
2306
|
* @internal
|
|
2294
2307
|
*/
|
|
2295
2308
|
_titleTemplate?: string;
|
|
2309
|
+
/**
|
|
2310
|
+
* @internal
|
|
2311
|
+
*/
|
|
2312
|
+
_ssrPayload?: ResolvableHead;
|
|
2296
2313
|
}
|
|
2297
2314
|
interface DomState {
|
|
2298
2315
|
title: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHooks } from 'hookable';
|
|
2
|
-
import { n as normalizeEntryToTags, d as dedupeKey, i as isMetaArrayDupeKey } from './unhead.
|
|
2
|
+
import { n as normalizeEntryToTags, d as dedupeKey, i as isMetaArrayDupeKey } from './unhead.Cp0iF6eN.mjs';
|
|
3
3
|
import { t as tagWeight, s as sortTags } from './unhead.DZbvapt-.mjs';
|
|
4
4
|
import { c as UsesMergeStrategy, V as ValidHeadTags } from './unhead.yem5I2v_.mjs';
|
|
5
5
|
|
|
@@ -12,9 +12,11 @@ function registerPlugin(head, p) {
|
|
|
12
12
|
head.hooks.addHooks(plugin.hooks || {});
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
// @__NO_SIDE_EFFECTS__
|
|
15
16
|
function createHeadCore(resolvedOptions = {}) {
|
|
16
|
-
return createUnhead(resolvedOptions);
|
|
17
|
+
return /* @__PURE__ */ createUnhead(resolvedOptions);
|
|
17
18
|
}
|
|
19
|
+
// @__NO_SIDE_EFFECTS__
|
|
18
20
|
function createUnhead(resolvedOptions = {}) {
|
|
19
21
|
const hooks = createHooks();
|
|
20
22
|
hooks.addHooks(resolvedOptions.hooks || {});
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as Booleanable, e as ReferrerPolicy } from './shared/unhead.
|
|
2
|
-
export { o as ActiveHeadEntry, ax as Arrayable, A as AsVoidFunctions, ae as BodyAttributesWithoutEvents, af as BodyEvents, q as CreateClientHeadOptions, C as CreateHeadOptions, p as CreateServerHeadOptions, ab as DataKeys, aC as DeepResolvableProperties, x as DomBeforeRenderCtx, I as DomPluginOptions, w as DomRenderTagContext, D as DomState, v as EntryResolveCtx, E as EventHandlerOptions, ad as GlobalAttributes, at as HasTemplateParams, a6 as Head, H as HeadEntry, r as HeadEntryOptions, F as HeadHooks, n as HeadPlugin, m as HeadPluginInput, l as HeadPluginOptions, au as HeadTag, av as HeadTagKeys, s as HookResult, ac as HttpEventAttributes, an as InnerContent, am as InnerContentVal, ag as LinkWithoutEvents, K as MaybeArray, Q as MaybeEventFnHandlers, aa as MergeHead, ah as MetaFlat, M as MetaFlatInput, ay as Never, as as ProcessesTemplateParams, P as PropResolver, a5 as RawInput, i as RecordingEntry, G as RenderDomHeadOptions, u as RenderSSRHeadOptions, X as ResolvableBase, a2 as ResolvableBodyAttributes, R as ResolvableHead, a1 as ResolvableHtmlAttributes, Y as ResolvableLink, Z as ResolvableMeta, a0 as ResolvableNoscript, aA as ResolvableProperties, $ as ResolvableScript, _ as ResolvableStyle, a3 as ResolvableTemplateParams, T as ResolvableTitle, V as ResolvableTitleTemplate, aB as ResolvableUnion, az as ResolvableValue, a7 as ResolvedHead, aj as ResolvesDuplicates, k as RuntimeMode, t as SSRHeadPayload, z as SSRRenderContext, J as SchemaAugmentations, S as ScriptInstance, ai as ScriptWithoutEvents, a4 as SerializableHead, y as ShouldRenderContext, j as SideEffectsRecord, aw as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, ar as TemplateParams, U as Unhead, L as UnheadBodyAttributesWithoutEvents, N as UnheadHtmlAttributes, O as UnheadMeta, h as UseFunctionType, a9 as UseHeadInput, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, a8 as UseSeoMetaInput, ak as ValidTagPositions, W as WarmupStrategy } from './shared/unhead.
|
|
3
|
-
export { B as Base, j as BodyAttributes, H as HeadSafe, g as HtmlAttributes, L as Link, M as Meta, N as Noscript, S as SafeBodyAttr, a as SafeHtmlAttr, c as SafeLink, b as SafeMeta, e as SafeNoscript, d as SafeScript, f as SafeStyle, i as Script, h as Style } from './shared/unhead.
|
|
4
|
-
export { r as resolveScriptKey, u as useScript } from './shared/unhead.
|
|
1
|
+
import { B as Booleanable, e as ReferrerPolicy } from './shared/unhead.JxZtZHOQ.mjs';
|
|
2
|
+
export { o as ActiveHeadEntry, ax as Arrayable, A as AsVoidFunctions, ae as BodyAttributesWithoutEvents, af as BodyEvents, q as CreateClientHeadOptions, C as CreateHeadOptions, p as CreateServerHeadOptions, ab as DataKeys, aC as DeepResolvableProperties, x as DomBeforeRenderCtx, I as DomPluginOptions, w as DomRenderTagContext, D as DomState, v as EntryResolveCtx, E as EventHandlerOptions, ad as GlobalAttributes, at as HasTemplateParams, a6 as Head, H as HeadEntry, r as HeadEntryOptions, F as HeadHooks, n as HeadPlugin, m as HeadPluginInput, l as HeadPluginOptions, au as HeadTag, av as HeadTagKeys, s as HookResult, ac as HttpEventAttributes, an as InnerContent, am as InnerContentVal, ag as LinkWithoutEvents, K as MaybeArray, Q as MaybeEventFnHandlers, aa as MergeHead, ah as MetaFlat, M as MetaFlatInput, ay as Never, as as ProcessesTemplateParams, P as PropResolver, a5 as RawInput, i as RecordingEntry, G as RenderDomHeadOptions, u as RenderSSRHeadOptions, X as ResolvableBase, a2 as ResolvableBodyAttributes, R as ResolvableHead, a1 as ResolvableHtmlAttributes, Y as ResolvableLink, Z as ResolvableMeta, a0 as ResolvableNoscript, aA as ResolvableProperties, $ as ResolvableScript, _ as ResolvableStyle, a3 as ResolvableTemplateParams, T as ResolvableTitle, V as ResolvableTitleTemplate, aB as ResolvableUnion, az as ResolvableValue, a7 as ResolvedHead, aj as ResolvesDuplicates, k as RuntimeMode, t as SSRHeadPayload, z as SSRRenderContext, J as SchemaAugmentations, S as ScriptInstance, ai as ScriptWithoutEvents, a4 as SerializableHead, y as ShouldRenderContext, j as SideEffectsRecord, aw as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, ar as TemplateParams, U as Unhead, L as UnheadBodyAttributesWithoutEvents, N as UnheadHtmlAttributes, O as UnheadMeta, h as UseFunctionType, a9 as UseHeadInput, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, a8 as UseSeoMetaInput, ak as ValidTagPositions, W as WarmupStrategy } from './shared/unhead.JxZtZHOQ.mjs';
|
|
3
|
+
export { B as Base, j as BodyAttributes, H as HeadSafe, g as HtmlAttributes, L as Link, M as Meta, N as Noscript, S as SafeBodyAttr, a as SafeHtmlAttr, c as SafeLink, b as SafeMeta, e as SafeNoscript, d as SafeScript, f as SafeStyle, i as Script, h as Style } from './shared/unhead.ByFhhdEl.mjs';
|
|
4
|
+
export { r as resolveScriptKey, u as useScript } from './shared/unhead.B5FB8Wd_.mjs';
|
|
5
5
|
export { createSpyProxy } from './scripts.mjs';
|
|
6
6
|
import 'hookable';
|
|
7
7
|
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as Booleanable, e as ReferrerPolicy } from './shared/unhead.
|
|
2
|
-
export { o as ActiveHeadEntry, ax as Arrayable, A as AsVoidFunctions, ae as BodyAttributesWithoutEvents, af as BodyEvents, q as CreateClientHeadOptions, C as CreateHeadOptions, p as CreateServerHeadOptions, ab as DataKeys, aC as DeepResolvableProperties, x as DomBeforeRenderCtx, I as DomPluginOptions, w as DomRenderTagContext, D as DomState, v as EntryResolveCtx, E as EventHandlerOptions, ad as GlobalAttributes, at as HasTemplateParams, a6 as Head, H as HeadEntry, r as HeadEntryOptions, F as HeadHooks, n as HeadPlugin, m as HeadPluginInput, l as HeadPluginOptions, au as HeadTag, av as HeadTagKeys, s as HookResult, ac as HttpEventAttributes, an as InnerContent, am as InnerContentVal, ag as LinkWithoutEvents, K as MaybeArray, Q as MaybeEventFnHandlers, aa as MergeHead, ah as MetaFlat, M as MetaFlatInput, ay as Never, as as ProcessesTemplateParams, P as PropResolver, a5 as RawInput, i as RecordingEntry, G as RenderDomHeadOptions, u as RenderSSRHeadOptions, X as ResolvableBase, a2 as ResolvableBodyAttributes, R as ResolvableHead, a1 as ResolvableHtmlAttributes, Y as ResolvableLink, Z as ResolvableMeta, a0 as ResolvableNoscript, aA as ResolvableProperties, $ as ResolvableScript, _ as ResolvableStyle, a3 as ResolvableTemplateParams, T as ResolvableTitle, V as ResolvableTitleTemplate, aB as ResolvableUnion, az as ResolvableValue, a7 as ResolvedHead, aj as ResolvesDuplicates, k as RuntimeMode, t as SSRHeadPayload, z as SSRRenderContext, J as SchemaAugmentations, S as ScriptInstance, ai as ScriptWithoutEvents, a4 as SerializableHead, y as ShouldRenderContext, j as SideEffectsRecord, aw as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, ar as TemplateParams, U as Unhead, L as UnheadBodyAttributesWithoutEvents, N as UnheadHtmlAttributes, O as UnheadMeta, h as UseFunctionType, a9 as UseHeadInput, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, a8 as UseSeoMetaInput, ak as ValidTagPositions, W as WarmupStrategy } from './shared/unhead.
|
|
3
|
-
export { B as Base, j as BodyAttributes, H as HeadSafe, g as HtmlAttributes, L as Link, M as Meta, N as Noscript, S as SafeBodyAttr, a as SafeHtmlAttr, c as SafeLink, b as SafeMeta, e as SafeNoscript, d as SafeScript, f as SafeStyle, i as Script, h as Style } from './shared/unhead.
|
|
4
|
-
export { r as resolveScriptKey, u as useScript } from './shared/unhead.
|
|
1
|
+
import { B as Booleanable, e as ReferrerPolicy } from './shared/unhead.JxZtZHOQ.js';
|
|
2
|
+
export { o as ActiveHeadEntry, ax as Arrayable, A as AsVoidFunctions, ae as BodyAttributesWithoutEvents, af as BodyEvents, q as CreateClientHeadOptions, C as CreateHeadOptions, p as CreateServerHeadOptions, ab as DataKeys, aC as DeepResolvableProperties, x as DomBeforeRenderCtx, I as DomPluginOptions, w as DomRenderTagContext, D as DomState, v as EntryResolveCtx, E as EventHandlerOptions, ad as GlobalAttributes, at as HasTemplateParams, a6 as Head, H as HeadEntry, r as HeadEntryOptions, F as HeadHooks, n as HeadPlugin, m as HeadPluginInput, l as HeadPluginOptions, au as HeadTag, av as HeadTagKeys, s as HookResult, ac as HttpEventAttributes, an as InnerContent, am as InnerContentVal, ag as LinkWithoutEvents, K as MaybeArray, Q as MaybeEventFnHandlers, aa as MergeHead, ah as MetaFlat, M as MetaFlatInput, ay as Never, as as ProcessesTemplateParams, P as PropResolver, a5 as RawInput, i as RecordingEntry, G as RenderDomHeadOptions, u as RenderSSRHeadOptions, X as ResolvableBase, a2 as ResolvableBodyAttributes, R as ResolvableHead, a1 as ResolvableHtmlAttributes, Y as ResolvableLink, Z as ResolvableMeta, a0 as ResolvableNoscript, aA as ResolvableProperties, $ as ResolvableScript, _ as ResolvableStyle, a3 as ResolvableTemplateParams, T as ResolvableTitle, V as ResolvableTitleTemplate, aB as ResolvableUnion, az as ResolvableValue, a7 as ResolvedHead, aj as ResolvesDuplicates, k as RuntimeMode, t as SSRHeadPayload, z as SSRRenderContext, J as SchemaAugmentations, S as ScriptInstance, ai as ScriptWithoutEvents, a4 as SerializableHead, y as ShouldRenderContext, j as SideEffectsRecord, aw as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, ar as TemplateParams, U as Unhead, L as UnheadBodyAttributesWithoutEvents, N as UnheadHtmlAttributes, O as UnheadMeta, h as UseFunctionType, a9 as UseHeadInput, g as UseScriptContext, a as UseScriptInput, b as UseScriptOptions, d as UseScriptResolvedInput, c as UseScriptReturn, f as UseScriptStatus, a8 as UseSeoMetaInput, ak as ValidTagPositions, W as WarmupStrategy } from './shared/unhead.JxZtZHOQ.js';
|
|
3
|
+
export { B as Base, j as BodyAttributes, H as HeadSafe, g as HtmlAttributes, L as Link, M as Meta, N as Noscript, S as SafeBodyAttr, a as SafeHtmlAttr, c as SafeLink, b as SafeMeta, e as SafeNoscript, d as SafeScript, f as SafeStyle, i as Script, h as Style } from './shared/unhead.BadLEBHk.js';
|
|
4
|
+
export { r as resolveScriptKey, u as useScript } from './shared/unhead.BKXGwhbK.js';
|
|
5
5
|
export { createSpyProxy } from './scripts.js';
|
|
6
6
|
import 'hookable';
|
|
7
7
|
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { au as HeadTag, O as UnheadMeta, ah as MetaFlat, R as ResolvableHead, P as PropResolver, U as Unhead, ar as TemplateParams } from './shared/unhead.
|
|
1
|
+
import { au as HeadTag, O as UnheadMeta, ah as MetaFlat, R as ResolvableHead, P as PropResolver, U as Unhead, ar as TemplateParams } from './shared/unhead.JxZtZHOQ.mjs';
|
|
2
2
|
import 'hookable';
|
|
3
3
|
|
|
4
4
|
declare const SelfClosingTags: Set<string>;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { au as HeadTag, O as UnheadMeta, ah as MetaFlat, R as ResolvableHead, P as PropResolver, U as Unhead, ar as TemplateParams } from './shared/unhead.
|
|
1
|
+
import { au as HeadTag, O as UnheadMeta, ah as MetaFlat, R as ResolvableHead, P as PropResolver, U as Unhead, ar as TemplateParams } from './shared/unhead.JxZtZHOQ.js';
|
|
2
2
|
import 'hookable';
|
|
3
3
|
|
|
4
4
|
declare const SelfClosingTags: Set<string>;
|
package/dist/utils.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { D as DupeableTags, H as HasElementTags, M as MetaTagsArrayable, b as ScriptNetworkEvents, S as SelfClosingTags, a as TagConfigKeys, T as TagsWithInnerContent, U as UniqueTags, c as UsesMergeStrategy, V as ValidHeadTags } from './shared/unhead.yem5I2v_.mjs';
|
|
2
|
-
export { d as dedupeKey, h as hashTag, i as isMetaArrayDupeKey, n as normalizeEntryToTags, a as normalizeProps, w as walkResolver } from './shared/unhead.
|
|
2
|
+
export { d as dedupeKey, h as hashTag, i as isMetaArrayDupeKey, n as normalizeEntryToTags, a as normalizeProps, w as walkResolver } from './shared/unhead.Cp0iF6eN.mjs';
|
|
3
3
|
export { r as resolveMetaKeyType, a as resolveMetaKeyValue, b as resolvePackedMetaObjectValue, u as unpackMeta } from './shared/unhead.DQc16pHI.mjs';
|
|
4
4
|
export { s as sortTags, t as tagWeight } from './shared/unhead.DZbvapt-.mjs';
|
|
5
|
-
export { p as processTemplateParams } from './shared/unhead.
|
|
5
|
+
export { p as processTemplateParams } from './shared/unhead.C13swrCa.mjs';
|
package/legacy.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dist/legacy.mjs'
|
|
1
|
+
export * from './dist/legacy.mjs'
|
package/package.json
CHANGED
package/plugins.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dist/plugins.mjs'
|
|
1
|
+
export * from './dist/plugins.mjs'
|
package/scripts.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dist/scripts.mjs'
|
|
1
|
+
export * from './dist/scripts.mjs'
|
package/server.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dist/server.mjs'
|
|
1
|
+
export * from './dist/server.mjs'
|
package/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dist/types'
|
|
1
|
+
export * from './dist/types'
|
package/utils.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dist/utils'
|
|
1
|
+
export * from './dist/utils'
|