@unhead/schema 1.0.6 → 1.0.8

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +10 -5
  2. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MaybePromiseProps, HeadTag as HeadTag$1, MergeHead, BaseBodyAttributes, HtmlAttributes as HtmlAttributes$1, Merge, Base as Base$1, DefinedValueOrEmptyObject, LinkBase, HttpEventAttributes, DataKeys, Style as Style$1, ScriptBase, Noscript as Noscript$1, BodyEvents, Meta as Meta$1, Stringable } from '@zhead/schema';
2
- export { DataKeys, DefinedValueOrEmptyObject, MergeHead, MetaFlatInput, TagKey } from '@zhead/schema';
2
+ export { DataKeys, DefinedValueOrEmptyObject, MergeHead, MetaFlatInput, SpeculationRules, TagKey } from '@zhead/schema';
3
3
  import { NestedHooks, Hookable } from 'hookable';
4
4
 
5
5
  interface ResolvesDuplicates {
@@ -38,23 +38,24 @@ interface TagPosition {
38
38
  */
39
39
  body?: true;
40
40
  }
41
+ type InnerContentVal = string | Record<string, any>;
41
42
  interface InnerContent {
42
43
  /**
43
44
  * Text content of the tag.
44
45
  *
45
46
  * Alias for children
46
47
  */
47
- innerHTML?: string;
48
+ innerHTML?: InnerContentVal;
48
49
  /**
49
50
  * Sets the textContent of an element.
50
51
  */
51
- children?: string;
52
+ children?: InnerContentVal;
52
53
  /**
53
54
  * Sets the textContent of an element. This will be HTML encoded.
54
55
  *
55
56
  * Alias for children
56
57
  */
57
- textContent?: string;
58
+ textContent?: InnerContentVal;
58
59
  }
59
60
  interface TagPriority {
60
61
  /**
@@ -346,6 +347,10 @@ interface Unhead<Input extends {} = Head> {
346
347
  * Resolved options
347
348
  */
348
349
  resolvedOptions: CreateHeadOptions;
350
+ /**
351
+ * Use a head plugin, loads the plugins hooks.
352
+ */
353
+ use: (plugin: HeadPlugin) => void;
349
354
  /**
350
355
  * @internal
351
356
  */
@@ -356,4 +361,4 @@ interface Unhead<Input extends {} = Head> {
356
361
  _elMap: Record<string, Element>;
357
362
  }
358
363
 
359
- export { ActiveHeadEntry, Base, BaseBodyAttr, BaseHtmlAttr, BeforeRenderContext, BodyAttributes, CreateHeadOptions, DomRenderTagContext, EntryAugmentation, EntryResolveCtx, Head, HeadEntry, HeadEntryOptions, HeadHooks, HeadPlugin, HeadTag, HeadTagKeys, HookResult, HtmlAttributes, InnerContent, Link, MaybeArray, MaybeFunctionEntries, Meta, Never, Noscript, ResolvesDuplicates, RuntimeMode, SSRHeadPayload, SSRRenderContext, SchemaAugmentations, Script, SideEffectsRecord, Style, TagInternalProperties, TagPosition, TagPriority, TagUserProperties, Title, TitleTemplate, Unhead, UserAttributesConfig, UserTagConfigWithoutInnerContent, ValidTagPositions };
364
+ export { ActiveHeadEntry, Base, BaseBodyAttr, BaseHtmlAttr, BeforeRenderContext, BodyAttributes, CreateHeadOptions, DomRenderTagContext, EntryAugmentation, EntryResolveCtx, Head, HeadEntry, HeadEntryOptions, HeadHooks, HeadPlugin, HeadTag, HeadTagKeys, HookResult, HtmlAttributes, InnerContent, InnerContentVal, Link, MaybeArray, MaybeFunctionEntries, Meta, Never, Noscript, ResolvesDuplicates, RuntimeMode, SSRHeadPayload, SSRRenderContext, SchemaAugmentations, Script, SideEffectsRecord, Style, TagInternalProperties, TagPosition, TagPriority, TagUserProperties, Title, TitleTemplate, Unhead, UserAttributesConfig, UserTagConfigWithoutInnerContent, ValidTagPositions };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@unhead/schema",
3
3
  "type": "module",
4
- "version": "1.0.6",
5
- "packageManager": "pnpm@7.17.1",
4
+ "version": "1.0.8",
5
+ "packageManager": "pnpm@7.18.1",
6
6
  "author": "Harlan Wilton <harlan@harlanzw.com>",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -35,7 +35,7 @@
35
35
  "dist"
36
36
  ],
37
37
  "dependencies": {
38
- "@zhead/schema": "^1.0.4",
38
+ "@zhead/schema": "^1.0.7",
39
39
  "hookable": "^5.4.2"
40
40
  },
41
41
  "scripts": {