@unhead/schema 1.1.27 → 1.1.28

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 +9 -2
  2. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -109,6 +109,8 @@ type Never<T> = {
109
109
  type UserTagConfigWithoutInnerContent = TagPriority & TagPosition & ResolvesDuplicates & Never<InnerContent>;
110
110
  type UserAttributesConfig = ResolvesDuplicates & TagPriority & Never<InnerContent & TagPosition>;
111
111
  interface SchemaAugmentations extends MergeHead {
112
+ title: TagPriority;
113
+ titleTemplate: TagPriority;
112
114
  base: UserAttributesConfig;
113
115
  htmlAttrs: UserAttributesConfig;
114
116
  bodyAttrs: UserAttributesConfig;
@@ -151,8 +153,13 @@ type EntryAugmentation = undefined | Record<string, any>;
151
153
  type MaybeFunctionEntries<T> = {
152
154
  [key in keyof T]?: T[key] | ((e: Event) => void);
153
155
  };
154
- type Title = string | null;
155
- type TitleTemplate = string | null | ((title?: string) => string | null);
156
+ type TitleTemplateResolver = string | ((title?: string) => string | null);
157
+ type Title = MaybePromiseProps<string | ({
158
+ textContent: string;
159
+ } & SchemaAugmentations['title']) | null>;
160
+ type TitleTemplate = TitleTemplateResolver | null | ({
161
+ textContent: TitleTemplateResolver;
162
+ } & SchemaAugmentations['titleTemplate']);
156
163
  type Base<E extends EntryAugmentation = {}> = Partial<Merge<SchemaAugmentations['base'], MaybePromiseProps<Base$1>>> & DefinedValueOrEmptyObject<E>;
157
164
  type Link<E extends EntryAugmentation = {}> = MaybePromiseProps<LinkBase> & MaybeFunctionEntries<HttpEventAttributes> & DataKeys & SchemaAugmentations['link'] & DefinedValueOrEmptyObject<E>;
158
165
  type Meta<E extends EntryAugmentation = {}> = MaybePromiseProps<BaseMeta> & DataKeys & SchemaAugmentations['meta'] & DefinedValueOrEmptyObject<E>;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@unhead/schema",
3
3
  "type": "module",
4
- "version": "1.1.27",
5
- "packageManager": "pnpm@8.5.0",
4
+ "version": "1.1.28",
5
+ "packageManager": "pnpm@8.6.2",
6
6
  "author": "Harlan Wilton <harlan@harlanzw.com>",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -36,7 +36,7 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "hookable": "^5.5.3",
39
- "zhead": "^2.0.4"
39
+ "zhead": "^2.0.7"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "unbuild .",