@unhead/schema 0.0.1 → 0.0.2

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 +24 -5
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { HeadTag as HeadTag$1, MergeHead, Merge, Base as Base$1, DefinedValueOrEmptyObject, Link as Link$1, DataKeys, Style as Style$1, Script as Script$1, Noscript as Noscript$1, HtmlAttributes as HtmlAttributes$1, BodyAttributes as BodyAttributes$1, Meta as Meta$1, Stringable } from '@zhead/schema';
2
- export { MergeHead, TagKey } from '@zhead/schema';
1
+ import { HeadTag as HeadTag$1, MergeHead, BodyAttributes as BodyAttributes$1, HtmlAttributes as HtmlAttributes$1, Merge, Base as Base$1, DefinedValueOrEmptyObject, Link as Link$1, DataKeys, Style as Style$1, Script as Script$1, Noscript as Noscript$1, Meta as Meta$1, Stringable } from '@zhead/schema';
2
+ export { DataKeys, DefinedValueOrEmptyObject, MergeHead, TagKey } from '@zhead/schema';
3
3
 
4
4
  interface ResolvesDuplicates {
5
5
  /**
@@ -92,6 +92,24 @@ interface SchemaAugmentations extends MergeHead {
92
92
  noscript: TagUserProperties;
93
93
  }
94
94
  declare type MaybeArray<T> = T | T[];
95
+ declare type BaseBodyAttr = BodyAttributes$1;
96
+ declare type BaseHtmlAttr = HtmlAttributes$1;
97
+ interface BodyAttr extends Omit<BaseBodyAttr, 'class'> {
98
+ /**
99
+ * The class global attribute is a space-separated list of the case-sensitive classes of the element.
100
+ *
101
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class
102
+ */
103
+ class?: MaybeArray<string> | Record<string, boolean>;
104
+ }
105
+ interface HtmlAttr extends Omit<HtmlAttributes$1, 'class'> {
106
+ /**
107
+ * The class global attribute is a space-separated list of the case-sensitive classes of the element.
108
+ *
109
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class
110
+ */
111
+ class?: MaybeArray<string> | Record<string, boolean>;
112
+ }
95
113
  interface BaseMeta extends Omit<Meta$1, 'content'> {
96
114
  /**
97
115
  * This attribute contains the value for the http-equiv, name or property attribute, depending on which is used.
@@ -103,6 +121,7 @@ interface BaseMeta extends Omit<Meta$1, 'content'> {
103
121
  content?: MaybeArray<Stringable>;
104
122
  }
105
123
  declare type EntryAugmentation = undefined | Record<string, any>;
124
+
106
125
  declare type Title = string;
107
126
  declare type TitleTemplate = string | null | ((title?: string) => string);
108
127
  declare type Base<E extends EntryAugmentation = {}> = Partial<Merge<SchemaAugmentations['base'], Base$1>> & DefinedValueOrEmptyObject<E>;
@@ -111,8 +130,8 @@ declare type Meta<E extends EntryAugmentation = {}> = BaseMeta & DataKeys & Sche
111
130
  declare type Style<E extends EntryAugmentation = {}> = Style$1 & DataKeys & SchemaAugmentations['style'] & DefinedValueOrEmptyObject<E>;
112
131
  declare type Script<E extends EntryAugmentation = {}> = Script$1 & DataKeys & SchemaAugmentations['script'] & DefinedValueOrEmptyObject<E>;
113
132
  declare type Noscript<E extends EntryAugmentation = {}> = Noscript$1 & DataKeys & SchemaAugmentations['noscript'] & DefinedValueOrEmptyObject<E>;
114
- declare type HtmlAttributes<E extends EntryAugmentation = {}> = HtmlAttributes$1 & DataKeys & SchemaAugmentations['htmlAttrs'] & DefinedValueOrEmptyObject<E>;
115
- declare type BodyAttributes<E extends EntryAugmentation = {}> = BodyAttributes$1 & DataKeys & SchemaAugmentations['bodyAttrs'] & DefinedValueOrEmptyObject<E>;
133
+ declare type HtmlAttributes<E extends EntryAugmentation = {}> = HtmlAttr & DataKeys & SchemaAugmentations['htmlAttrs'] & DefinedValueOrEmptyObject<E>;
134
+ declare type BodyAttributes<E extends EntryAugmentation = {}> = BodyAttr & DataKeys & SchemaAugmentations['bodyAttrs'] & DefinedValueOrEmptyObject<E>;
116
135
  interface Head<E extends MergeHead = SchemaAugmentations> {
117
136
  /**
118
137
  * The <title> HTML element defines the document's title that is shown in a browser's title bar or a page's tab.
@@ -182,4 +201,4 @@ interface Head<E extends MergeHead = SchemaAugmentations> {
182
201
  bodyAttrs?: BodyAttributes<E['bodyAttrs']>;
183
202
  }
184
203
 
185
- export { Base, BodyAttributes, EntryAugmentation, Head, HeadTag, HeadTagKeys, HtmlAttributes, InnerContent, Link, Meta, Never, Noscript, ResolvesDuplicates, SchemaAugmentations, Script, Style, TagInternalProperties, TagPosition, TagPriority, TagUserProperties, Title, TitleTemplate, UserAttributesConfig, UserTagConfigWithoutInnerContent };
204
+ export { Base, BaseBodyAttr, BaseHtmlAttr, BodyAttributes, EntryAugmentation, Head, HeadTag, HeadTagKeys, HtmlAttributes, InnerContent, Link, MaybeArray, Meta, Never, Noscript, ResolvesDuplicates, SchemaAugmentations, Script, Style, TagInternalProperties, TagPosition, TagPriority, TagUserProperties, Title, TitleTemplate, UserAttributesConfig, UserTagConfigWithoutInnerContent };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/schema",
3
3
  "type": "module",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "packageManager": "pnpm@7.14.0",
6
6
  "author": "Harlan Wilton <harlan@harlanzw.com>",
7
7
  "license": "MIT",