unhead 2.1.12 → 2.1.15

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 CHANGED
@@ -1,6 +1,6 @@
1
- import { a as createUnhead } from './shared/unhead.Ct24BOby.mjs';
1
+ import { a as createUnhead } from './shared/unhead.CaI5ZD4O.mjs';
2
2
  import { H as HasElementTags } from './shared/unhead.yem5I2v_.mjs';
3
- import { i as isMetaArrayDupeKey, a as normalizeProps, d as dedupeKey, h as hashTag } from './shared/unhead.B5FWS6X0.mjs';
3
+ import { i as isMetaArrayDupeKey, a as normalizeProps, d as dedupeKey, h as hashTag } from './shared/unhead.B3VbJo7Y.mjs';
4
4
  import 'hookable';
5
5
  import './shared/unhead.CbpEuj3y.mjs';
6
6
 
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- export { u as useHead, a as useHeadSafe, b as useSeoMeta, c as useServerHead, d as useServerHeadSafe, e as useServerSeoMeta } from './shared/unhead._ybhDo-G.mjs';
2
- export { c as createHeadCore, a as createUnhead } from './shared/unhead.Ct24BOby.mjs';
1
+ export { u as useHead, a as useHeadSafe, b as useSeoMeta, c as useServerHead, d as useServerHeadSafe, e as useServerSeoMeta } from './shared/unhead.Dh1cQCTe.mjs';
2
+ export { c as createHeadCore, a as createUnhead } from './shared/unhead.CaI5ZD4O.mjs';
3
3
  export { u as useScript } from './shared/unhead.BnoAbrHA.mjs';
4
- import './shared/unhead.0eF0fa-Y.mjs';
4
+ import './shared/unhead.D4vSFytZ.mjs';
5
5
  import './shared/unhead.DQc16pHI.mjs';
6
6
  import './shared/unhead.yem5I2v_.mjs';
7
7
  import 'hookable';
8
- import './shared/unhead.B5FWS6X0.mjs';
8
+ import './shared/unhead.B3VbJo7Y.mjs';
9
9
  import './shared/unhead.CbpEuj3y.mjs';
package/dist/legacy.mjs CHANGED
@@ -1,12 +1,12 @@
1
- import { a as createUnhead } from './shared/unhead.Ct24BOby.mjs';
2
- import { D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin, A as AliasSortingPlugin } from './shared/unhead.Chhckluj.mjs';
3
- export { u as useHead, a as useHeadSafe, b as useSeoMeta, c as useServerHead, d as useServerHeadSafe, e as useServerSeoMeta } from './shared/unhead._ybhDo-G.mjs';
1
+ import { a as createUnhead } from './shared/unhead.CaI5ZD4O.mjs';
2
+ import { D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin, A as AliasSortingPlugin } from './shared/unhead.TxTMM7cM.mjs';
3
+ export { u as useHead, a as useHeadSafe, b as useSeoMeta, c as useServerHead, d as useServerHeadSafe, e as useServerSeoMeta } from './shared/unhead.Dh1cQCTe.mjs';
4
4
  export { u as useScript } from './shared/unhead.BnoAbrHA.mjs';
5
5
  import 'hookable';
6
- import './shared/unhead.B5FWS6X0.mjs';
6
+ import './shared/unhead.B3VbJo7Y.mjs';
7
7
  import './shared/unhead.yem5I2v_.mjs';
8
8
  import './shared/unhead.CbpEuj3y.mjs';
9
- import './shared/unhead.0eF0fa-Y.mjs';
9
+ import './shared/unhead.D4vSFytZ.mjs';
10
10
  import './shared/unhead.DQc16pHI.mjs';
11
11
  import './shared/unhead.BYvz9V1x.mjs';
12
12
 
package/dist/plugins.mjs CHANGED
@@ -1,6 +1,6 @@
1
- export { A as AliasSortingPlugin, D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin } from './shared/unhead.Chhckluj.mjs';
2
- import { d as defineHeadPlugin } from './shared/unhead.0eF0fa-Y.mjs';
3
- export { F as FlatMetaPlugin, S as SafeInputPlugin } from './shared/unhead.0eF0fa-Y.mjs';
1
+ export { A as AliasSortingPlugin, D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin } from './shared/unhead.TxTMM7cM.mjs';
2
+ import { d as defineHeadPlugin } from './shared/unhead.D4vSFytZ.mjs';
3
+ export { F as FlatMetaPlugin, S as SafeInputPlugin } from './shared/unhead.D4vSFytZ.mjs';
4
4
  import './shared/unhead.CbpEuj3y.mjs';
5
5
  import './shared/unhead.BYvz9V1x.mjs';
6
6
  import './shared/unhead.DQc16pHI.mjs';
package/dist/server.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { a as createUnhead } from './shared/unhead.Ct24BOby.mjs';
1
+ import { a as createUnhead } from './shared/unhead.CaI5ZD4O.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.B5FWS6X0.mjs';
5
+ import './shared/unhead.B3VbJo7Y.mjs';
6
6
  import './shared/unhead.CbpEuj3y.mjs';
7
7
 
8
8
  // @__NO_SIDE_EFFECTS__
@@ -20,10 +20,10 @@ function dedupeKey(tag) {
20
20
  if (name === "link" && props.rel === "canonical")
21
21
  return "canonical";
22
22
  if (name === "link" && props.rel === "alternate") {
23
- const altKey = props.hreflang || props.type;
24
- if (altKey) {
25
- return `alternate:${altKey}`;
26
- }
23
+ if (props.hreflang)
24
+ return `alternate:${props.hreflang}`;
25
+ if (props.type)
26
+ return `alternate:${props.type}:${props.href || ""}`;
27
27
  }
28
28
  if (props.charset)
29
29
  return "charset";
@@ -1,5 +1,5 @@
1
1
  import { createHooks } from 'hookable';
2
- import { n as normalizeEntryToTags, d as dedupeKey, h as hashTag, i as isMetaArrayDupeKey } from './unhead.B5FWS6X0.mjs';
2
+ import { n as normalizeEntryToTags, d as dedupeKey, h as hashTag, i as isMetaArrayDupeKey } from './unhead.B3VbJo7Y.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
 
@@ -35,8 +35,8 @@ const WhitelistAttributes = {
35
35
  };
36
36
  const BlockedLinkRels = /* @__PURE__ */ new Set(["canonical", "modulepreload", "prerender", "preload", "prefetch", "dns-prefetch", "preconnect", "manifest", "pingback"]);
37
37
  const SafeAttrName = /^[a-z][a-z0-9\-]*[a-z0-9]$/i;
38
- const HtmlEntityHex = /&#x([0-9a-f]{1,6});?/gi;
39
- const HtmlEntityDec = /&#(\d{1,7});?/g;
38
+ const HtmlEntityHex = /&#x([0-9a-f]+);?/gi;
39
+ const HtmlEntityDec = /&#(\d+);?/g;
40
40
  const HtmlEntityNamed = /&(tab|newline|colon|semi|lpar|rpar|sol|bsol|comma|period|excl|num|dollar|percnt|amp|apos|ast|plus|lt|gt|equals|quest|at|lsqb|rsqb|lcub|rcub|vert|hat|grave|tilde|nbsp);?/gi;
41
41
  const ControlChars = /[\x00-\x20]+/g;
42
42
  const NamedEntityMap = {
@@ -1,4 +1,4 @@
1
- import { S as SafeInputPlugin, F as FlatMetaPlugin } from './unhead.0eF0fa-Y.mjs';
1
+ import { S as SafeInputPlugin, F as FlatMetaPlugin } from './unhead.D4vSFytZ.mjs';
2
2
 
3
3
  function useHead(unhead, input, options = {}) {
4
4
  return unhead.push(input || {}, options);
@@ -1,4 +1,4 @@
1
- import { d as defineHeadPlugin } from './unhead.0eF0fa-Y.mjs';
1
+ import { d as defineHeadPlugin } from './unhead.D4vSFytZ.mjs';
2
2
  import { s as sortTags } from './unhead.CbpEuj3y.mjs';
3
3
  import { p as processTemplateParams } from './unhead.BYvz9V1x.mjs';
4
4
 
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.B5FWS6X0.mjs';
2
+ export { d as dedupeKey, h as hashTag, i as isMetaArrayDupeKey, n as normalizeEntryToTags, a as normalizeProps, w as walkResolver } from './shared/unhead.B3VbJo7Y.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';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unhead",
3
3
  "type": "module",
4
- "version": "2.1.12",
4
+ "version": "2.1.15",
5
5
  "description": "Full-stack <head> manager built for any framework.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "publishConfig": {
12
12
  "access": "public",
13
- "tag": "next"
13
+ "tag": "2x"
14
14
  },
15
15
  "license": "MIT",
16
16
  "funding": "https://github.com/sponsors/harlan-zw",