unhead 2.1.4 → 2.1.5
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/dist/client.d.mts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.mjs +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/legacy.d.mts +3 -3
- package/dist/legacy.d.ts +3 -3
- package/dist/legacy.mjs +3 -3
- package/dist/parser.d.mts +1 -1
- package/dist/parser.d.ts +1 -1
- package/dist/plugins.d.mts +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/scripts.d.mts +3 -3
- package/dist/scripts.d.ts +3 -3
- package/dist/scripts.mjs +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.mjs +2 -2
- package/dist/shared/{unhead.Btq-XLkr.d.ts → unhead.B_NszWhX.d.ts} +1 -1
- package/dist/shared/{unhead.B578PsDV.mjs → unhead.BnoAbrHA.mjs} +14 -11
- package/dist/shared/{unhead.BFfcxOoW.mjs → unhead.CB8hTExd.mjs} +1 -1
- package/dist/shared/{unhead.CsiVfkwJ.d.ts → unhead.ChAQb_uO.d.ts} +1 -1
- package/dist/shared/{unhead.CC7bAF1a.d.mts → unhead.D1Xv45s3.d.mts} +1 -1
- package/dist/shared/{unhead.BUCuVRIf.d.mts → unhead.DKj0fe9v.d.mts} +1 -1
- package/dist/shared/{unhead.BUCuVRIf.d.ts → unhead.DKj0fe9v.d.ts} +1 -1
- package/dist/shared/{unhead.CBPtX666.d.mts → unhead.MXxTEjru.d.mts} +1 -1
- package/dist/shared/{unhead.eK9_7LaY.mjs → unhead.fVVqDC1O.mjs} +8 -3
- 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 +1 -1
- package/package.json +1 -1
package/dist/client.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as ResolvableHead, r as CreateClientHeadOptions, U as Unhead, I as RenderDomHeadOptions } from './shared/unhead.
|
|
1
|
+
import { R as ResolvableHead, r as CreateClientHeadOptions, U as Unhead, I as RenderDomHeadOptions } from './shared/unhead.DKj0fe9v.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, r as CreateClientHeadOptions, U as Unhead, I as RenderDomHeadOptions } from './shared/unhead.
|
|
1
|
+
import { R as ResolvableHead, r as CreateClientHeadOptions, U as Unhead, I as RenderDomHeadOptions } from './shared/unhead.DKj0fe9v.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.CB8hTExd.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.fVVqDC1O.mjs';
|
|
4
4
|
import 'hookable';
|
|
5
5
|
import './shared/unhead.CbpEuj3y.mjs';
|
|
6
6
|
|
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, s as HeadEntryOptions, p 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.MXxTEjru.mjs';
|
|
2
|
+
import { U as Unhead, R as ResolvableHead, s as HeadEntryOptions, p as ActiveHeadEntry, a8 as UseSeoMetaInput, C as CreateHeadOptions } from './shared/unhead.DKj0fe9v.mjs';
|
|
3
|
+
export { u as useScript } from './shared/unhead.D1Xv45s3.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, s as HeadEntryOptions, p 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.ChAQb_uO.js';
|
|
2
|
+
import { U as Unhead, R as ResolvableHead, s as HeadEntryOptions, p as ActiveHeadEntry, a8 as UseSeoMetaInput, C as CreateHeadOptions } from './shared/unhead.DKj0fe9v.js';
|
|
3
|
+
export { u as useScript } from './shared/unhead.B_NszWhX.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.
|
|
3
|
-
export { u as useScript } from './shared/unhead.
|
|
2
|
+
export { c as createHeadCore, a as createUnhead } from './shared/unhead.CB8hTExd.mjs';
|
|
3
|
+
export { u as useScript } from './shared/unhead.BnoAbrHA.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.fVVqDC1O.mjs';
|
|
9
9
|
import './shared/unhead.CbpEuj3y.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.DKj0fe9v.mjs';
|
|
4
|
+
export { u as useScript } from './shared/unhead.D1Xv45s3.mjs';
|
|
5
|
+
import './shared/unhead.MXxTEjru.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.DKj0fe9v.js';
|
|
4
|
+
export { u as useScript } from './shared/unhead.B_NszWhX.js';
|
|
5
|
+
import './shared/unhead.ChAQb_uO.js';
|
|
6
6
|
import 'hookable';
|
|
7
7
|
|
|
8
8
|
declare const activeHead: {
|
package/dist/legacy.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as createUnhead } from './shared/unhead.
|
|
1
|
+
import { a as createUnhead } from './shared/unhead.CB8hTExd.mjs';
|
|
2
2
|
import { D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin, A as AliasSortingPlugin } from './shared/unhead.ckV6dpEQ.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
|
-
export { u as useScript } from './shared/unhead.
|
|
4
|
+
export { u as useScript } from './shared/unhead.BnoAbrHA.mjs';
|
|
5
5
|
import 'hookable';
|
|
6
|
-
import './shared/unhead.
|
|
6
|
+
import './shared/unhead.fVVqDC1O.mjs';
|
|
7
7
|
import './shared/unhead.yem5I2v_.mjs';
|
|
8
8
|
import './shared/unhead.CbpEuj3y.mjs';
|
|
9
9
|
import './shared/unhead.CApf5sj3.mjs';
|
package/dist/parser.d.mts
CHANGED
package/dist/parser.d.ts
CHANGED
package/dist/plugins.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as HeadPluginInput, U as Unhead, m as HeadPluginOptions } from './shared/unhead.
|
|
1
|
+
import { n as HeadPluginInput, U as Unhead, m as HeadPluginOptions } from './shared/unhead.DKj0fe9v.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 { n as HeadPluginInput, U as Unhead, m as HeadPluginOptions } from './shared/unhead.
|
|
1
|
+
import { n as HeadPluginInput, U as Unhead, m as HeadPluginOptions } from './shared/unhead.DKj0fe9v.js';
|
|
2
2
|
import 'hookable';
|
|
3
3
|
|
|
4
4
|
declare const AliasSortingPlugin: HeadPluginInput;
|
package/dist/scripts.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as RecordingEntry } from './shared/unhead.
|
|
2
|
-
export { A as AsVoidFunctions, E as EventHandlerOptions, i 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 { j as RecordingEntry } from './shared/unhead.DKj0fe9v.mjs';
|
|
2
|
+
export { A as AsVoidFunctions, E as EventHandlerOptions, i 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.DKj0fe9v.mjs';
|
|
3
|
+
export { r as resolveScriptKey, u as useScript } from './shared/unhead.D1Xv45s3.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 { j as RecordingEntry } from './shared/unhead.
|
|
2
|
-
export { A as AsVoidFunctions, E as EventHandlerOptions, i 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 { j as RecordingEntry } from './shared/unhead.DKj0fe9v.js';
|
|
2
|
+
export { A as AsVoidFunctions, E as EventHandlerOptions, i 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.DKj0fe9v.js';
|
|
3
|
+
export { r as resolveScriptKey, u as useScript } from './shared/unhead.B_NszWhX.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/scripts.mjs
CHANGED
package/dist/server.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ResolvableHead, q as CreateServerHeadOptions, U as Unhead, v as RenderSSRHeadOptions, au as HeadTag } from './shared/unhead.
|
|
2
|
-
export { u as SSRHeadPayload } from './shared/unhead.
|
|
1
|
+
import { R as ResolvableHead, q as CreateServerHeadOptions, U as Unhead, v as RenderSSRHeadOptions, au as HeadTag } from './shared/unhead.DKj0fe9v.mjs';
|
|
2
|
+
export { u as SSRHeadPayload } from './shared/unhead.DKj0fe9v.mjs';
|
|
3
3
|
import { PreparedHtmlTemplate } from './parser.mjs';
|
|
4
4
|
import 'hookable';
|
|
5
5
|
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ResolvableHead, q as CreateServerHeadOptions, U as Unhead, v as RenderSSRHeadOptions, au as HeadTag } from './shared/unhead.
|
|
2
|
-
export { u as SSRHeadPayload } from './shared/unhead.
|
|
1
|
+
import { R as ResolvableHead, q as CreateServerHeadOptions, U as Unhead, v as RenderSSRHeadOptions, au as HeadTag } from './shared/unhead.DKj0fe9v.js';
|
|
2
|
+
export { u as SSRHeadPayload } from './shared/unhead.DKj0fe9v.js';
|
|
3
3
|
import { PreparedHtmlTemplate } from './parser.js';
|
|
4
4
|
import 'hookable';
|
|
5
5
|
|
package/dist/server.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as createUnhead } from './shared/unhead.
|
|
1
|
+
import { a as createUnhead } from './shared/unhead.CB8hTExd.mjs';
|
|
2
2
|
import { T as TagsWithInnerContent, S as SelfClosingTags } from './shared/unhead.yem5I2v_.mjs';
|
|
3
3
|
import { parseHtmlForUnheadExtraction, applyHeadToHtml, parseHtmlForIndexes } from './parser.mjs';
|
|
4
4
|
import 'hookable';
|
|
5
|
-
import './shared/unhead.
|
|
5
|
+
import './shared/unhead.fVVqDC1O.mjs';
|
|
6
6
|
import './shared/unhead.CbpEuj3y.mjs';
|
|
7
7
|
|
|
8
8
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -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.DKj0fe9v.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated compute key manually
|
|
@@ -135,7 +135,8 @@ function useScript(head, _input, _options) {
|
|
|
135
135
|
id,
|
|
136
136
|
status: "awaitingLoad",
|
|
137
137
|
remove() {
|
|
138
|
-
script.
|
|
138
|
+
script._triggerAbortControllers?.forEach((ac) => ac.abort());
|
|
139
|
+
script._triggerAbortControllers?.clear();
|
|
139
140
|
script._triggerPromises = [];
|
|
140
141
|
script._warmupEl?.dispose();
|
|
141
142
|
if (script.entry) {
|
|
@@ -172,7 +173,8 @@ function useScript(head, _input, _options) {
|
|
|
172
173
|
return script._warmupEl;
|
|
173
174
|
},
|
|
174
175
|
load(cb) {
|
|
175
|
-
script.
|
|
176
|
+
script._triggerAbortControllers?.forEach((ac) => ac.abort());
|
|
177
|
+
script._triggerAbortControllers?.clear();
|
|
176
178
|
script._triggerPromises = [];
|
|
177
179
|
if (!script.entry) {
|
|
178
180
|
syncStatus("loading");
|
|
@@ -208,19 +210,20 @@ function useScript(head, _input, _options) {
|
|
|
208
210
|
if (head.ssr) {
|
|
209
211
|
return;
|
|
210
212
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
213
|
+
const abortController = new AbortController();
|
|
214
|
+
script._triggerAbortControllers = script._triggerAbortControllers || /* @__PURE__ */ new Set();
|
|
215
|
+
script._triggerAbortControllers.add(abortController);
|
|
216
|
+
const abortPromise = new Promise((resolve) => {
|
|
217
|
+
abortController.signal.addEventListener("abort", () => {
|
|
218
|
+
script._triggerAbortControllers?.delete(abortController);
|
|
219
|
+
resolve();
|
|
218
220
|
});
|
|
219
|
-
}
|
|
221
|
+
});
|
|
222
|
+
script._triggerAbortController = abortController;
|
|
220
223
|
script._triggerPromises = script._triggerPromises || [];
|
|
221
224
|
const idx = script._triggerPromises.push(Promise.race([
|
|
222
225
|
trigger.then((v) => typeof v === "undefined" || v ? script.load : void 0),
|
|
223
|
-
|
|
226
|
+
abortPromise
|
|
224
227
|
]).catch(() => {
|
|
225
228
|
}).then((res) => {
|
|
226
229
|
res?.();
|
|
@@ -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.fVVqDC1O.mjs';
|
|
3
3
|
import { t as tagWeight, s as sortTags } from './unhead.CbpEuj3y.mjs';
|
|
4
4
|
import { c as UsesMergeStrategy, V as ValidHeadTags } from './unhead.yem5I2v_.mjs';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a5 as RawInput, R as ResolvableHead, az as ResolvableValue, aA as ResolvableProperties, ag as LinkWithoutEvents, ab as DataKeys, K as SchemaAugmentations, Q as UnheadMeta, ai as ScriptWithoutEvents, O as UnheadHtmlAttributes, N as UnheadBodyAttributesWithoutEvents } from './unhead.
|
|
1
|
+
import { a5 as RawInput, R as ResolvableHead, az as ResolvableValue, aA as ResolvableProperties, ag as LinkWithoutEvents, ab as DataKeys, K as SchemaAugmentations, Q as UnheadMeta, ai as ScriptWithoutEvents, O as UnheadHtmlAttributes, N as UnheadBodyAttributesWithoutEvents } from './unhead.DKj0fe9v.js';
|
|
2
2
|
|
|
3
3
|
type Base = RawInput<'base'>;
|
|
4
4
|
type HtmlAttributes = RawInput<'htmlAttrs'>;
|
|
@@ -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.DKj0fe9v.mjs';
|
|
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, K as SchemaAugmentations, Q as UnheadMeta, ai as ScriptWithoutEvents, O as UnheadHtmlAttributes, N as UnheadBodyAttributesWithoutEvents } from './unhead.
|
|
1
|
+
import { a5 as RawInput, R as ResolvableHead, az as ResolvableValue, aA as ResolvableProperties, ag as LinkWithoutEvents, ab as DataKeys, K as SchemaAugmentations, Q as UnheadMeta, ai as ScriptWithoutEvents, O as UnheadHtmlAttributes, N as UnheadBodyAttributesWithoutEvents } from './unhead.DKj0fe9v.mjs';
|
|
2
2
|
|
|
3
3
|
type Base = RawInput<'base'>;
|
|
4
4
|
type HtmlAttributes = RawInput<'htmlAttrs'>;
|
|
@@ -19,9 +19,11 @@ function dedupeKey(tag) {
|
|
|
19
19
|
return name;
|
|
20
20
|
if (name === "link" && props.rel === "canonical")
|
|
21
21
|
return "canonical";
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
if (name === "link" && props.rel === "alternate") {
|
|
23
|
+
const altKey = props.hreflang || props.type;
|
|
24
|
+
if (altKey) {
|
|
25
|
+
return `alternate:${altKey}`;
|
|
26
|
+
}
|
|
25
27
|
}
|
|
26
28
|
if (props.charset)
|
|
27
29
|
return "charset";
|
|
@@ -43,6 +45,9 @@ function dedupeKey(tag) {
|
|
|
43
45
|
if (props.id) {
|
|
44
46
|
return `${name}:id:${props.id}`;
|
|
45
47
|
}
|
|
48
|
+
if (name === "link" && props.rel === "alternate") {
|
|
49
|
+
return `alternate:${props.href || ""}`;
|
|
50
|
+
}
|
|
46
51
|
if (TagsWithInnerContent.has(name)) {
|
|
47
52
|
const v = tag.textContent || tag.innerHTML;
|
|
48
53
|
if (v) {
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as Booleanable, e as ReferrerPolicy } from './shared/unhead.
|
|
2
|
-
export { p as ActiveHeadEntry, ax as Arrayable, A as AsVoidFunctions, ae as BodyAttributesWithoutEvents, af as BodyEvents, r as CreateClientHeadOptions, C as CreateHeadOptions, q as CreateServerHeadOptions, ab as DataKeys, aC as DeepResolvableProperties, y as DomBeforeRenderCtx, J as DomPluginOptions, x as DomRenderTagContext, D as DomState, w as EntryResolveCtx, E as EventHandlerOptions, ad as GlobalAttributes, at as HasTemplateParams, a6 as Head, H as HeadEntry, s as HeadEntryOptions, G as HeadHooks, o as HeadPlugin, n as HeadPluginInput, m as HeadPluginOptions, au as HeadTag, av as HeadTagKeys, t as HookResult, ac as HttpEventAttributes, an as InnerContent, am as InnerContentVal, ag as LinkWithoutEvents, L as MaybeArray, T as MaybeEventFnHandlers, aa as MergeHead, ah as MetaFlat, M as MetaFlatInput, ay as Never, as as ProcessesTemplateParams, P as PropResolver, a5 as RawInput, j as RecordingEntry, I as RenderDomHeadOptions, v as RenderSSRHeadOptions, Y as ResolvableBase, a3 as ResolvableBodyAttributes, R as ResolvableHead, a2 as ResolvableHtmlAttributes, Z as ResolvableLink, _ as ResolvableMeta, a1 as ResolvableNoscript, aA as ResolvableProperties, a0 as ResolvableScript, $ as ResolvableStyle, a4 as ResolvableTemplateParams, V as ResolvableTitle, X as ResolvableTitleTemplate, aB as ResolvableUnion, az as ResolvableValue, a7 as ResolvedHead, aj as ResolvesDuplicates, l as RuntimeMode, u as SSRHeadPayload, F as SSRRenderContext, K as SchemaAugmentations, i as ScriptInstance, ai as ScriptWithoutEvents, S as SerializableHead, z as ShouldRenderContext, k as SideEffectsRecord, aw as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, ar as TemplateParams, U as Unhead, N as UnheadBodyAttributesWithoutEvents, O as UnheadHtmlAttributes, Q 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.DKj0fe9v.mjs';
|
|
2
|
+
export { p as ActiveHeadEntry, ax as Arrayable, A as AsVoidFunctions, ae as BodyAttributesWithoutEvents, af as BodyEvents, r as CreateClientHeadOptions, C as CreateHeadOptions, q as CreateServerHeadOptions, ab as DataKeys, aC as DeepResolvableProperties, y as DomBeforeRenderCtx, J as DomPluginOptions, x as DomRenderTagContext, D as DomState, w as EntryResolveCtx, E as EventHandlerOptions, ad as GlobalAttributes, at as HasTemplateParams, a6 as Head, H as HeadEntry, s as HeadEntryOptions, G as HeadHooks, o as HeadPlugin, n as HeadPluginInput, m as HeadPluginOptions, au as HeadTag, av as HeadTagKeys, t as HookResult, ac as HttpEventAttributes, an as InnerContent, am as InnerContentVal, ag as LinkWithoutEvents, L as MaybeArray, T as MaybeEventFnHandlers, aa as MergeHead, ah as MetaFlat, M as MetaFlatInput, ay as Never, as as ProcessesTemplateParams, P as PropResolver, a5 as RawInput, j as RecordingEntry, I as RenderDomHeadOptions, v as RenderSSRHeadOptions, Y as ResolvableBase, a3 as ResolvableBodyAttributes, R as ResolvableHead, a2 as ResolvableHtmlAttributes, Z as ResolvableLink, _ as ResolvableMeta, a1 as ResolvableNoscript, aA as ResolvableProperties, a0 as ResolvableScript, $ as ResolvableStyle, a4 as ResolvableTemplateParams, V as ResolvableTitle, X as ResolvableTitleTemplate, aB as ResolvableUnion, az as ResolvableValue, a7 as ResolvedHead, aj as ResolvesDuplicates, l as RuntimeMode, u as SSRHeadPayload, F as SSRRenderContext, K as SchemaAugmentations, i as ScriptInstance, ai as ScriptWithoutEvents, S as SerializableHead, z as ShouldRenderContext, k as SideEffectsRecord, aw as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, ar as TemplateParams, U as Unhead, N as UnheadBodyAttributesWithoutEvents, O as UnheadHtmlAttributes, Q 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.DKj0fe9v.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.MXxTEjru.mjs';
|
|
4
|
+
export { r as resolveScriptKey, u as useScript } from './shared/unhead.D1Xv45s3.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 { p as ActiveHeadEntry, ax as Arrayable, A as AsVoidFunctions, ae as BodyAttributesWithoutEvents, af as BodyEvents, r as CreateClientHeadOptions, C as CreateHeadOptions, q as CreateServerHeadOptions, ab as DataKeys, aC as DeepResolvableProperties, y as DomBeforeRenderCtx, J as DomPluginOptions, x as DomRenderTagContext, D as DomState, w as EntryResolveCtx, E as EventHandlerOptions, ad as GlobalAttributes, at as HasTemplateParams, a6 as Head, H as HeadEntry, s as HeadEntryOptions, G as HeadHooks, o as HeadPlugin, n as HeadPluginInput, m as HeadPluginOptions, au as HeadTag, av as HeadTagKeys, t as HookResult, ac as HttpEventAttributes, an as InnerContent, am as InnerContentVal, ag as LinkWithoutEvents, L as MaybeArray, T as MaybeEventFnHandlers, aa as MergeHead, ah as MetaFlat, M as MetaFlatInput, ay as Never, as as ProcessesTemplateParams, P as PropResolver, a5 as RawInput, j as RecordingEntry, I as RenderDomHeadOptions, v as RenderSSRHeadOptions, Y as ResolvableBase, a3 as ResolvableBodyAttributes, R as ResolvableHead, a2 as ResolvableHtmlAttributes, Z as ResolvableLink, _ as ResolvableMeta, a1 as ResolvableNoscript, aA as ResolvableProperties, a0 as ResolvableScript, $ as ResolvableStyle, a4 as ResolvableTemplateParams, V as ResolvableTitle, X as ResolvableTitleTemplate, aB as ResolvableUnion, az as ResolvableValue, a7 as ResolvedHead, aj as ResolvesDuplicates, l as RuntimeMode, u as SSRHeadPayload, F as SSRRenderContext, K as SchemaAugmentations, i as ScriptInstance, ai as ScriptWithoutEvents, S as SerializableHead, z as ShouldRenderContext, k as SideEffectsRecord, aw as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, ar as TemplateParams, U as Unhead, N as UnheadBodyAttributesWithoutEvents, O as UnheadHtmlAttributes, Q 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.DKj0fe9v.js';
|
|
2
|
+
export { p as ActiveHeadEntry, ax as Arrayable, A as AsVoidFunctions, ae as BodyAttributesWithoutEvents, af as BodyEvents, r as CreateClientHeadOptions, C as CreateHeadOptions, q as CreateServerHeadOptions, ab as DataKeys, aC as DeepResolvableProperties, y as DomBeforeRenderCtx, J as DomPluginOptions, x as DomRenderTagContext, D as DomState, w as EntryResolveCtx, E as EventHandlerOptions, ad as GlobalAttributes, at as HasTemplateParams, a6 as Head, H as HeadEntry, s as HeadEntryOptions, G as HeadHooks, o as HeadPlugin, n as HeadPluginInput, m as HeadPluginOptions, au as HeadTag, av as HeadTagKeys, t as HookResult, ac as HttpEventAttributes, an as InnerContent, am as InnerContentVal, ag as LinkWithoutEvents, L as MaybeArray, T as MaybeEventFnHandlers, aa as MergeHead, ah as MetaFlat, M as MetaFlatInput, ay as Never, as as ProcessesTemplateParams, P as PropResolver, a5 as RawInput, j as RecordingEntry, I as RenderDomHeadOptions, v as RenderSSRHeadOptions, Y as ResolvableBase, a3 as ResolvableBodyAttributes, R as ResolvableHead, a2 as ResolvableHtmlAttributes, Z as ResolvableLink, _ as ResolvableMeta, a1 as ResolvableNoscript, aA as ResolvableProperties, a0 as ResolvableScript, $ as ResolvableStyle, a4 as ResolvableTemplateParams, V as ResolvableTitle, X as ResolvableTitleTemplate, aB as ResolvableUnion, az as ResolvableValue, a7 as ResolvedHead, aj as ResolvesDuplicates, l as RuntimeMode, u as SSRHeadPayload, F as SSRRenderContext, K as SchemaAugmentations, i as ScriptInstance, ai as ScriptWithoutEvents, S as SerializableHead, z as ShouldRenderContext, k as SideEffectsRecord, aw as Stringable, aq as TagKey, al as TagPosition, ao as TagPriority, ap as TagUserProperties, ar as TemplateParams, U as Unhead, N as UnheadBodyAttributesWithoutEvents, O as UnheadHtmlAttributes, Q 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.DKj0fe9v.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.ChAQb_uO.js';
|
|
4
|
+
export { r as resolveScriptKey, u as useScript } from './shared/unhead.B_NszWhX.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, Q 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, Q as UnheadMeta, ah as MetaFlat, R as ResolvableHead, P as PropResolver, U as Unhead, ar as TemplateParams } from './shared/unhead.DKj0fe9v.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, Q 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, Q as UnheadMeta, ah as MetaFlat, R as ResolvableHead, P as PropResolver, U as Unhead, ar as TemplateParams } from './shared/unhead.DKj0fe9v.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.fVVqDC1O.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.CbpEuj3y.mjs';
|
|
5
5
|
export { p as processTemplateParams } from './shared/unhead.BYvz9V1x.mjs';
|