unhead 2.0.2 → 2.0.3
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.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/legacy.mjs +1 -1
- package/dist/server.d.mts +10 -3
- package/dist/server.d.ts +10 -3
- package/dist/server.mjs +1 -1
- package/dist/shared/{unhead.Txd0XTIP.mjs → unhead.DGkFBTYv.mjs} +1 -1
- package/dist/types.d.mts +2 -1
- package/dist/types.d.ts +2 -1
- package/package.json +1 -1
package/dist/client.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createUnhead } from './shared/unhead.
|
|
1
|
+
import { a as createUnhead } from './shared/unhead.DGkFBTYv.mjs';
|
|
2
2
|
import { H as HasElementTags } from './shared/unhead.yem5I2v_.mjs';
|
|
3
3
|
import { h as hashTag, i as isMetaArrayDupeKey, a as normalizeProps, d as dedupeKey } from './shared/unhead.Cp0iF6eN.mjs';
|
|
4
4
|
import 'hookable';
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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.DGkFBTYv.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';
|
package/dist/legacy.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createUnhead } from './shared/unhead.
|
|
1
|
+
import { a as createUnhead } from './shared/unhead.DGkFBTYv.mjs';
|
|
2
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';
|
package/dist/server.d.mts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import { R as ResolvableHead, p as CreateServerHeadOptions, U as Unhead, u as RenderSSRHeadOptions,
|
|
1
|
+
import { R as ResolvableHead, p as CreateServerHeadOptions, U as Unhead, u as RenderSSRHeadOptions, a4 as SerializableHead, au as HeadTag } from './shared/unhead.JxZtZHOQ.mjs';
|
|
2
|
+
export { t as SSRHeadPayload } from './shared/unhead.JxZtZHOQ.mjs';
|
|
2
3
|
import 'hookable';
|
|
3
4
|
|
|
4
5
|
declare function createHead<T = ResolvableHead>(options?: CreateServerHeadOptions): Unhead<T>;
|
|
5
6
|
|
|
6
|
-
declare function renderSSRHead(head: Unhead<any>, options?: RenderSSRHeadOptions): Promise<
|
|
7
|
+
declare function renderSSRHead(head: Unhead<any>, options?: RenderSSRHeadOptions): Promise<{
|
|
8
|
+
headTags: string;
|
|
9
|
+
bodyTags: string;
|
|
10
|
+
bodyTagsOpen: string;
|
|
11
|
+
htmlAttrs: string;
|
|
12
|
+
bodyAttrs: string;
|
|
13
|
+
}>;
|
|
7
14
|
|
|
8
15
|
declare function transformHtmlTemplate(head: Unhead<any>, html: string, options?: RenderSSRHeadOptions): Promise<string>;
|
|
9
16
|
|
|
@@ -25,4 +32,4 @@ declare function ssrRenderTags<T extends HeadTag>(tags: T[], options?: RenderSSR
|
|
|
25
32
|
declare function escapeHtml(str: string): string;
|
|
26
33
|
declare function tagToString<T extends HeadTag>(tag: T): string;
|
|
27
34
|
|
|
28
|
-
export { CreateServerHeadOptions,
|
|
35
|
+
export { CreateServerHeadOptions, Unhead, createHead, escapeHtml, extractUnheadInputFromHtml, propsToString, renderSSRHead, ssrRenderTags, tagToString, transformHtmlTemplate };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import { R as ResolvableHead, p as CreateServerHeadOptions, U as Unhead, u as RenderSSRHeadOptions,
|
|
1
|
+
import { R as ResolvableHead, p as CreateServerHeadOptions, U as Unhead, u as RenderSSRHeadOptions, a4 as SerializableHead, au as HeadTag } from './shared/unhead.JxZtZHOQ.js';
|
|
2
|
+
export { t as SSRHeadPayload } from './shared/unhead.JxZtZHOQ.js';
|
|
2
3
|
import 'hookable';
|
|
3
4
|
|
|
4
5
|
declare function createHead<T = ResolvableHead>(options?: CreateServerHeadOptions): Unhead<T>;
|
|
5
6
|
|
|
6
|
-
declare function renderSSRHead(head: Unhead<any>, options?: RenderSSRHeadOptions): Promise<
|
|
7
|
+
declare function renderSSRHead(head: Unhead<any>, options?: RenderSSRHeadOptions): Promise<{
|
|
8
|
+
headTags: string;
|
|
9
|
+
bodyTags: string;
|
|
10
|
+
bodyTagsOpen: string;
|
|
11
|
+
htmlAttrs: string;
|
|
12
|
+
bodyAttrs: string;
|
|
13
|
+
}>;
|
|
7
14
|
|
|
8
15
|
declare function transformHtmlTemplate(head: Unhead<any>, html: string, options?: RenderSSRHeadOptions): Promise<string>;
|
|
9
16
|
|
|
@@ -25,4 +32,4 @@ declare function ssrRenderTags<T extends HeadTag>(tags: T[], options?: RenderSSR
|
|
|
25
32
|
declare function escapeHtml(str: string): string;
|
|
26
33
|
declare function tagToString<T extends HeadTag>(tag: T): string;
|
|
27
34
|
|
|
28
|
-
export { CreateServerHeadOptions,
|
|
35
|
+
export { CreateServerHeadOptions, Unhead, createHead, escapeHtml, extractUnheadInputFromHtml, propsToString, renderSSRHead, ssrRenderTags, tagToString, transformHtmlTemplate };
|
package/dist/server.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createUnhead } from './shared/unhead.
|
|
1
|
+
import { a as createUnhead } from './shared/unhead.DGkFBTYv.mjs';
|
|
2
2
|
import { T as TagsWithInnerContent, S as SelfClosingTags$1 } from './shared/unhead.yem5I2v_.mjs';
|
|
3
3
|
import 'hookable';
|
|
4
4
|
import './shared/unhead.Cp0iF6eN.mjs';
|
|
@@ -116,7 +116,7 @@ function createUnhead(resolvedOptions = {}) {
|
|
|
116
116
|
head._title = title?.textContent;
|
|
117
117
|
if (titleTemplate) {
|
|
118
118
|
const titleTemplateFn = titleTemplate?.textContent;
|
|
119
|
-
head._titleTemplate =
|
|
119
|
+
head._titleTemplate = titleTemplateFn;
|
|
120
120
|
if (titleTemplateFn) {
|
|
121
121
|
let newTitle = typeof titleTemplateFn === "function" ? titleTemplateFn(title?.textContent) : titleTemplateFn;
|
|
122
122
|
if (typeof newTitle === "string" && !head.plugins.has("template-params")) {
|
package/dist/types.d.mts
CHANGED
package/dist/types.d.ts
CHANGED