@unhead/shared 1.8.0-beta.0 → 1.8.0-beta.10
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/index.cjs +3 -0
- package/dist/index.d.cts +5 -3
- package/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.mjs +3 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -605,6 +605,8 @@ function tagWeight(tag) {
|
|
|
605
605
|
}
|
|
606
606
|
const SortModifiers = [{ prefix: "before:", offset: -1 }, { prefix: "after:", offset: 1 }];
|
|
607
607
|
|
|
608
|
+
const NetworkEvents = ["onload", "onerror", "onabort", "onprogress", "onloadstart"];
|
|
609
|
+
|
|
608
610
|
const sepSub = "%separator";
|
|
609
611
|
function processTemplateParams(s, p, sep) {
|
|
610
612
|
if (typeof s !== "string" || !s.includes("%"))
|
|
@@ -645,6 +647,7 @@ function processTemplateParams(s, p, sep) {
|
|
|
645
647
|
|
|
646
648
|
exports.HasElementTags = HasElementTags;
|
|
647
649
|
exports.IsBrowser = IsBrowser;
|
|
650
|
+
exports.NetworkEvents = NetworkEvents;
|
|
648
651
|
exports.SelfClosingTags = SelfClosingTags;
|
|
649
652
|
exports.SortModifiers = SortModifiers;
|
|
650
653
|
exports.TAG_ALIASES = TAG_ALIASES;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HeadPluginInput, HeadTag, BaseMeta, MetaFlatInput, Head, MaybeArray, HeadSafe, HeadEntry, TemplateParams } from '@unhead/schema';
|
|
2
2
|
|
|
3
3
|
type Arrayable<T> = T | Array<T>;
|
|
4
4
|
declare function asArray<T>(value: Arrayable<T>): T[];
|
|
@@ -12,7 +12,7 @@ declare const TagConfigKeys: string[];
|
|
|
12
12
|
declare const IsBrowser: boolean;
|
|
13
13
|
declare const composableNames: string[];
|
|
14
14
|
|
|
15
|
-
declare function defineHeadPlugin(plugin:
|
|
15
|
+
declare function defineHeadPlugin(plugin: HeadPluginInput): HeadPluginInput;
|
|
16
16
|
|
|
17
17
|
declare function hashCode(s: string): string;
|
|
18
18
|
declare function hashTag(tag: HeadTag): string;
|
|
@@ -58,6 +58,8 @@ declare const SortModifiers: {
|
|
|
58
58
|
offset: number;
|
|
59
59
|
}[];
|
|
60
60
|
|
|
61
|
+
declare const NetworkEvents: string[];
|
|
62
|
+
|
|
61
63
|
declare function processTemplateParams(s: string, p: TemplateParams, sep: string): string;
|
|
62
64
|
|
|
63
|
-
export { type Arrayable, HasElementTags, IsBrowser, SelfClosingTags, SortModifiers, TAG_ALIASES, TAG_WEIGHTS, TagConfigKeys, TagEntityBits, TagsWithInnerContent, UniqueTags, ValidHeadTags, asArray, composableNames, defineHeadPlugin, hashCode, hashTag, normaliseClassProp, normaliseEntryTags, normaliseProps, normaliseTag, packMeta, processTemplateParams, resolveMetaKeyType, resolveMetaKeyValue, resolvePackedMetaObjectValue, resolveTitleTemplate, tagDedupeKey, tagWeight, unpackMeta, whitelistSafeInput };
|
|
65
|
+
export { type Arrayable, HasElementTags, IsBrowser, NetworkEvents, SelfClosingTags, SortModifiers, TAG_ALIASES, TAG_WEIGHTS, TagConfigKeys, TagEntityBits, TagsWithInnerContent, UniqueTags, ValidHeadTags, asArray, composableNames, defineHeadPlugin, hashCode, hashTag, normaliseClassProp, normaliseEntryTags, normaliseProps, normaliseTag, packMeta, processTemplateParams, resolveMetaKeyType, resolveMetaKeyValue, resolvePackedMetaObjectValue, resolveTitleTemplate, tagDedupeKey, tagWeight, unpackMeta, whitelistSafeInput };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HeadPluginInput, HeadTag, BaseMeta, MetaFlatInput, Head, MaybeArray, HeadSafe, HeadEntry, TemplateParams } from '@unhead/schema';
|
|
2
2
|
|
|
3
3
|
type Arrayable<T> = T | Array<T>;
|
|
4
4
|
declare function asArray<T>(value: Arrayable<T>): T[];
|
|
@@ -12,7 +12,7 @@ declare const TagConfigKeys: string[];
|
|
|
12
12
|
declare const IsBrowser: boolean;
|
|
13
13
|
declare const composableNames: string[];
|
|
14
14
|
|
|
15
|
-
declare function defineHeadPlugin(plugin:
|
|
15
|
+
declare function defineHeadPlugin(plugin: HeadPluginInput): HeadPluginInput;
|
|
16
16
|
|
|
17
17
|
declare function hashCode(s: string): string;
|
|
18
18
|
declare function hashTag(tag: HeadTag): string;
|
|
@@ -58,6 +58,8 @@ declare const SortModifiers: {
|
|
|
58
58
|
offset: number;
|
|
59
59
|
}[];
|
|
60
60
|
|
|
61
|
+
declare const NetworkEvents: string[];
|
|
62
|
+
|
|
61
63
|
declare function processTemplateParams(s: string, p: TemplateParams, sep: string): string;
|
|
62
64
|
|
|
63
|
-
export { type Arrayable, HasElementTags, IsBrowser, SelfClosingTags, SortModifiers, TAG_ALIASES, TAG_WEIGHTS, TagConfigKeys, TagEntityBits, TagsWithInnerContent, UniqueTags, ValidHeadTags, asArray, composableNames, defineHeadPlugin, hashCode, hashTag, normaliseClassProp, normaliseEntryTags, normaliseProps, normaliseTag, packMeta, processTemplateParams, resolveMetaKeyType, resolveMetaKeyValue, resolvePackedMetaObjectValue, resolveTitleTemplate, tagDedupeKey, tagWeight, unpackMeta, whitelistSafeInput };
|
|
65
|
+
export { type Arrayable, HasElementTags, IsBrowser, NetworkEvents, SelfClosingTags, SortModifiers, TAG_ALIASES, TAG_WEIGHTS, TagConfigKeys, TagEntityBits, TagsWithInnerContent, UniqueTags, ValidHeadTags, asArray, composableNames, defineHeadPlugin, hashCode, hashTag, normaliseClassProp, normaliseEntryTags, normaliseProps, normaliseTag, packMeta, processTemplateParams, resolveMetaKeyType, resolveMetaKeyValue, resolvePackedMetaObjectValue, resolveTitleTemplate, tagDedupeKey, tagWeight, unpackMeta, whitelistSafeInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HeadPluginInput, HeadTag, BaseMeta, MetaFlatInput, Head, MaybeArray, HeadSafe, HeadEntry, TemplateParams } from '@unhead/schema';
|
|
2
2
|
|
|
3
3
|
type Arrayable<T> = T | Array<T>;
|
|
4
4
|
declare function asArray<T>(value: Arrayable<T>): T[];
|
|
@@ -12,7 +12,7 @@ declare const TagConfigKeys: string[];
|
|
|
12
12
|
declare const IsBrowser: boolean;
|
|
13
13
|
declare const composableNames: string[];
|
|
14
14
|
|
|
15
|
-
declare function defineHeadPlugin(plugin:
|
|
15
|
+
declare function defineHeadPlugin(plugin: HeadPluginInput): HeadPluginInput;
|
|
16
16
|
|
|
17
17
|
declare function hashCode(s: string): string;
|
|
18
18
|
declare function hashTag(tag: HeadTag): string;
|
|
@@ -58,6 +58,8 @@ declare const SortModifiers: {
|
|
|
58
58
|
offset: number;
|
|
59
59
|
}[];
|
|
60
60
|
|
|
61
|
+
declare const NetworkEvents: string[];
|
|
62
|
+
|
|
61
63
|
declare function processTemplateParams(s: string, p: TemplateParams, sep: string): string;
|
|
62
64
|
|
|
63
|
-
export { type Arrayable, HasElementTags, IsBrowser, SelfClosingTags, SortModifiers, TAG_ALIASES, TAG_WEIGHTS, TagConfigKeys, TagEntityBits, TagsWithInnerContent, UniqueTags, ValidHeadTags, asArray, composableNames, defineHeadPlugin, hashCode, hashTag, normaliseClassProp, normaliseEntryTags, normaliseProps, normaliseTag, packMeta, processTemplateParams, resolveMetaKeyType, resolveMetaKeyValue, resolvePackedMetaObjectValue, resolveTitleTemplate, tagDedupeKey, tagWeight, unpackMeta, whitelistSafeInput };
|
|
65
|
+
export { type Arrayable, HasElementTags, IsBrowser, NetworkEvents, SelfClosingTags, SortModifiers, TAG_ALIASES, TAG_WEIGHTS, TagConfigKeys, TagEntityBits, TagsWithInnerContent, UniqueTags, ValidHeadTags, asArray, composableNames, defineHeadPlugin, hashCode, hashTag, normaliseClassProp, normaliseEntryTags, normaliseProps, normaliseTag, packMeta, processTemplateParams, resolveMetaKeyType, resolveMetaKeyValue, resolvePackedMetaObjectValue, resolveTitleTemplate, tagDedupeKey, tagWeight, unpackMeta, whitelistSafeInput };
|
package/dist/index.mjs
CHANGED
|
@@ -603,6 +603,8 @@ function tagWeight(tag) {
|
|
|
603
603
|
}
|
|
604
604
|
const SortModifiers = [{ prefix: "before:", offset: -1 }, { prefix: "after:", offset: 1 }];
|
|
605
605
|
|
|
606
|
+
const NetworkEvents = ["onload", "onerror", "onabort", "onprogress", "onloadstart"];
|
|
607
|
+
|
|
606
608
|
const sepSub = "%separator";
|
|
607
609
|
function processTemplateParams(s, p, sep) {
|
|
608
610
|
if (typeof s !== "string" || !s.includes("%"))
|
|
@@ -641,4 +643,4 @@ function processTemplateParams(s, p, sep) {
|
|
|
641
643
|
return s;
|
|
642
644
|
}
|
|
643
645
|
|
|
644
|
-
export { HasElementTags, IsBrowser, SelfClosingTags, SortModifiers, TAG_ALIASES, TAG_WEIGHTS, TagConfigKeys, TagEntityBits, TagsWithInnerContent, UniqueTags, ValidHeadTags, asArray$1 as asArray, composableNames, defineHeadPlugin, hashCode, hashTag, normaliseClassProp, normaliseEntryTags, normaliseProps, normaliseTag, packMeta, processTemplateParams, resolveMetaKeyType, resolveMetaKeyValue, resolvePackedMetaObjectValue, resolveTitleTemplate, tagDedupeKey, tagWeight, unpackMeta, whitelistSafeInput };
|
|
646
|
+
export { HasElementTags, IsBrowser, NetworkEvents, SelfClosingTags, SortModifiers, TAG_ALIASES, TAG_WEIGHTS, TagConfigKeys, TagEntityBits, TagsWithInnerContent, UniqueTags, ValidHeadTags, asArray$1 as asArray, composableNames, defineHeadPlugin, hashCode, hashTag, normaliseClassProp, normaliseEntryTags, normaliseProps, normaliseTag, packMeta, processTemplateParams, resolveMetaKeyType, resolveMetaKeyValue, resolvePackedMetaObjectValue, resolveTitleTemplate, tagDedupeKey, tagWeight, unpackMeta, whitelistSafeInput };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhead/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.8.0-beta.
|
|
4
|
+
"version": "1.8.0-beta.10",
|
|
5
5
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@unhead/schema": "1.8.0-beta.
|
|
37
|
+
"@unhead/schema": "1.8.0-beta.10"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"packrup": "^0.1.0"
|