@zhead/schema
Advanced tools
Comparing version 0.5.2 to 0.5.3
@@ -1,10 +0,5 @@ | ||
declare type Stringable = string | boolean | number; | ||
interface UnsafeKeys { | ||
[key: string]: Stringable; | ||
interface BodyAttributes { | ||
} | ||
interface BodyAttributes extends UnsafeKeys { | ||
} | ||
interface HtmlAttributes extends UnsafeKeys { | ||
interface HtmlAttributes { | ||
/** | ||
@@ -143,4 +138,9 @@ * The lang global attribute helps define the language of an element: the language that non-editable elements are | ||
} | ||
declare type LinkEntries = Partial<Link & UnsafeKeys>[]; | ||
declare type LinkEntries<T extends Record<string, any>> = Partial<Link & T>[]; | ||
declare type Stringable = string | boolean | number; | ||
interface UnsafeKeys { | ||
[key: string]: Stringable; | ||
} | ||
interface MetaFlat { | ||
@@ -768,3 +768,3 @@ /** | ||
} | ||
declare type MetaEntries = Partial<Meta & UnsafeKeys>[]; | ||
declare type MetaEntries<T extends Record<string, any> = UnsafeKeys> = Partial<Meta & T>[]; | ||
@@ -844,24 +844,8 @@ interface Script { | ||
type: '' | 'text/javascript' | 'module'; | ||
/** | ||
* @internal This property is used to dedupe the link tags | ||
*/ | ||
key: string; | ||
/** | ||
* @internal Content of the script tag | ||
*/ | ||
children: string; | ||
} | ||
declare type ScriptEntries = Partial<Script & UnsafeKeys>[]; | ||
declare type ScriptEntries<T extends Record<string, any>> = Partial<Script & T>[]; | ||
interface Noscript { | ||
/** | ||
* @internal This property is used to dedupe the link tags | ||
*/ | ||
key: string; | ||
/** | ||
* @internal Content of the script tag | ||
*/ | ||
children: string; | ||
} | ||
declare type NoscriptEntries = Partial<Noscript & UnsafeKeys>[]; | ||
declare type NoscriptEntries<T extends Record<string, any>> = Partial<Noscript & T>[]; | ||
@@ -890,12 +874,4 @@ interface Style { | ||
title: string; | ||
/** | ||
* @internal This property is used to dedupe the link tags | ||
*/ | ||
key: string; | ||
/** | ||
* @internal Content of the script tag | ||
*/ | ||
children: string; | ||
} | ||
declare type StyleEntries = Partial<Style & UnsafeKeys>[]; | ||
declare type StyleEntries<T extends Record<string, any>> = Partial<Style & T>[]; | ||
@@ -908,3 +884,3 @@ interface Base { | ||
*/ | ||
href?: string; | ||
href: string; | ||
/** | ||
@@ -916,6 +892,6 @@ * A keyword or author-defined name of the default browsing context to show the results of navigation from <a>, | ||
*/ | ||
target?: string; | ||
target: string; | ||
} | ||
interface Head { | ||
interface Head<E extends Record<string, any> = UnsafeKeys> { | ||
/** | ||
@@ -938,3 +914,3 @@ * The <title> HTML element defines the document's title that is shown in a browser's title bar or a page's tab. | ||
*/ | ||
base?: Base; | ||
base?: Partial<Base>; | ||
/** | ||
@@ -947,3 +923,3 @@ * The <link> HTML element specifies relationships between the current document and an external resource. | ||
*/ | ||
link?: LinkEntries; | ||
link?: LinkEntries<E>; | ||
/** | ||
@@ -954,3 +930,3 @@ * The <meta> element represents metadata that cannot be expressed in other HTML elements, like <link> or <script>. | ||
*/ | ||
meta?: MetaEntries; | ||
meta?: MetaEntries<E>; | ||
/** | ||
@@ -962,3 +938,3 @@ * The <style> HTML element contains style information for a document, or part of a document. | ||
*/ | ||
style?: StyleEntries; | ||
style?: StyleEntries<E>; | ||
/** | ||
@@ -969,3 +945,3 @@ * The <script> HTML element is used to embed executable code or data; this is typically used to embed or refer to JavaScript code. | ||
*/ | ||
script?: ScriptEntries; | ||
script?: ScriptEntries<E>; | ||
/** | ||
@@ -977,3 +953,3 @@ * The <noscript> HTML element defines a section of HTML to be inserted if a script type on the page is unsupported | ||
*/ | ||
noscript?: NoscriptEntries; | ||
noscript?: NoscriptEntries<E>; | ||
/** | ||
@@ -984,3 +960,3 @@ * Attributes for the <html> HTML element. | ||
*/ | ||
htmlAttrs?: HtmlAttributes; | ||
htmlAttrs?: Partial<HtmlAttributes & E>; | ||
/** | ||
@@ -991,5 +967,5 @@ * Attributes for the <body> HTML element. | ||
*/ | ||
bodyAttrs?: BodyAttributes; | ||
bodyAttrs?: Partial<BodyAttributes & E>; | ||
} | ||
export { Base, BodyAttributes, Head, HtmlAttributes, Link, LinkEntries, Meta, MetaEntries, MetaFlat, MetaFlatInput, Noscript, NoscriptEntries, Script, ScriptEntries, Style, StyleEntries }; | ||
export { Base, BodyAttributes, Head, HtmlAttributes, Link, LinkEntries, Meta, MetaEntries, MetaFlat, MetaFlatInput, Noscript, NoscriptEntries, Script, ScriptEntries, Stringable, Style, StyleEntries, UnsafeKeys }; |
{ | ||
"name": "@zhead/schema", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"packageManager": "pnpm@7.8.0", | ||
@@ -5,0 +5,0 @@ "author": "Harlan Wilton <harlan@harlanzw.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41496
948