unhead 3.0.5 → 3.1.0

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.
@@ -0,0 +1,236 @@
1
+ import { V as ValidationRuleId } from './shared/unhead.Dl_lRDXb.mjs';
2
+ export { a as RuleConfig, b as RuleSeverity, R as RulesConfig, d as VALIDATION_RULE_IDS, c as ValidationRuleOptions } from './shared/unhead.Dl_lRDXb.mjs';
3
+
4
+ declare const URL_META_KEYS: Set<string>;
5
+ declare const KNOWN_META_PROPERTIES: Set<string>;
6
+ declare const KNOWN_META_NAMES: Set<string>;
7
+ declare const TAG_PRIORITY_ALIASES: readonly ["critical", "high", "low"];
8
+ type TagPriorityAlias = typeof TAG_PRIORITY_ALIASES[number];
9
+ /**
10
+ * Deprecated v2 tag-prop names with their v3 replacement, used by both the
11
+ * runtime validate plugin and the eslint plugin.
12
+ */
13
+ declare const DEPRECATED_PROPS: Record<string, {
14
+ replacement: string;
15
+ ruleId: 'deprecated-prop-children' | 'deprecated-prop-hid-vmid' | 'deprecated-prop-body';
16
+ }>;
17
+
18
+ declare function levenshtein(a: string, b: string): number;
19
+ declare function findClosestMatch(value: string, knownSet: Set<string>): string | undefined;
20
+
21
+ /**
22
+ * Materialized view of a single head tag (`<meta>`, `<link>`, `<script>`, etc.)
23
+ * suitable for parser-agnostic predicate checks. Adapters in the eslint-plugin
24
+ * and the CLI walk their respective ASTs and produce one of these per tag.
25
+ *
26
+ * `props` only contains entries whose value is statically resolvable to a
27
+ * primitive. `keys` contains every key that appeared in the source, including
28
+ * those whose value couldn't be resolved (computed expressions, identifier
29
+ * references, etc.). Predicates that need to know "did this key appear at all"
30
+ * read `keys`; predicates that need the value read `props`.
31
+ */
32
+ interface TagInput {
33
+ /** Tag list this came from in the head input (`meta` / `link` / `script` / `noscript` / `style`). */
34
+ tagType: 'meta' | 'link' | 'script' | 'noscript' | 'style';
35
+ /** Statically-resolvable props. */
36
+ props: Record<string, string | number | boolean>;
37
+ /** Every prop name that appeared in source, resolvable or not. */
38
+ keys: Set<string>;
39
+ /** Adapter-supplied opaque marker for the whole tag literal. */
40
+ loc?: unknown;
41
+ /** Adapter-supplied opaque marker for individual prop values. */
42
+ propLocs?: Record<string, unknown>;
43
+ /** Whether this tag literal lives inside an array element (vs standalone, e.g. inside `defineLink(...)`). */
44
+ inArray?: boolean;
45
+ }
46
+ /**
47
+ * Top-level head input passed to `useHead` / `useSeoMeta`. Only the scalar
48
+ * top-level keys we actually validate are surfaced; tag-array predicates run
49
+ * against per-tag {@link TagInput}s instead.
50
+ */
51
+ interface HeadInputView {
52
+ /** Name of the calling composable (`useHead`, `useSeoMeta`, …). */
53
+ callee: string;
54
+ /** Statically-resolvable scalar props (currently `title`, `titleTemplate`). */
55
+ props: Record<string, string>;
56
+ /** Every top-level key that appeared, resolvable or not. */
57
+ keys: Set<string>;
58
+ loc?: unknown;
59
+ propLocs?: Record<string, unknown>;
60
+ }
61
+ /**
62
+ * A logical fix described in source-agnostic terms. Each adapter knows how to
63
+ * translate this into either an ESLint `RuleFixer` call or a `magic-string`
64
+ * edit.
65
+ */
66
+ type PredicateFix = {
67
+ type: 'rename-prop';
68
+ key: string;
69
+ newKey: string;
70
+ }
71
+ /** Replace the value half of `key: value` with literal source text. */
72
+ | {
73
+ type: 'replace-prop-value';
74
+ key: string;
75
+ newSource: string;
76
+ }
77
+ /** Replace the entire `key: value` pair with literal source text. */
78
+ | {
79
+ type: 'replace-prop';
80
+ key: string;
81
+ newSource: string;
82
+ }
83
+ /** Insert source text immediately after the named prop (caller supplies the leading `, `). */
84
+ | {
85
+ type: 'insert-after-prop';
86
+ afterKey: string;
87
+ insert: string;
88
+ }
89
+ /** Remove a property and its surrounding comma. */
90
+ | {
91
+ type: 'remove-prop';
92
+ key: string;
93
+ }
94
+ /** Wrap the whole tag literal with a call expression: `wrapWith(<tag>)`. */
95
+ | {
96
+ type: 'wrap-tag';
97
+ wrapWith: string;
98
+ };
99
+ interface DiagnosticSuggestion {
100
+ /** Already-formatted, human-readable suggestion label. */
101
+ message: string;
102
+ fix: PredicateFix;
103
+ }
104
+ interface Diagnostic {
105
+ ruleId: ValidationRuleId;
106
+ /** Already-formatted, human-readable diagnostic message. */
107
+ message: string;
108
+ /**
109
+ * Optional narrowed location:
110
+ * - `{ kind: 'tag' }` (default) → `tag.loc`
111
+ * - `{ kind: 'prop-key', key }` → key half of the named prop
112
+ * - `{ kind: 'prop-value', key }` → value half of the named prop
113
+ * - `{ kind: 'prop', key }` → whole `key: value` pair
114
+ */
115
+ at?: {
116
+ kind: 'tag';
117
+ } | {
118
+ kind: 'prop-key';
119
+ key: string;
120
+ } | {
121
+ kind: 'prop-value';
122
+ key: string;
123
+ } | {
124
+ kind: 'prop';
125
+ key: string;
126
+ };
127
+ /** Autofix to apply when the diagnostic is unambiguous. */
128
+ fix?: PredicateFix;
129
+ /** Editor suggestions when an autofix would be too risky to apply blindly. */
130
+ suggestions?: DiagnosticSuggestion[];
131
+ }
132
+ /**
133
+ * Optional context passed by the adapter. Predicates that don't need any of
134
+ * these should ignore the argument entirely.
135
+ */
136
+ interface PredicateContext {
137
+ /**
138
+ * Map of canonical helper names (`defineLink`, `defineScript`) to the local
139
+ * binding they're imported under (`'defineLink'` for an unaliased import,
140
+ * `'dl'` for `import { defineLink as dl }`). Predicates emit fixes using
141
+ * the local binding so renamed imports stay valid.
142
+ */
143
+ importedHelpers?: Map<string, string>;
144
+ }
145
+ type TagPredicate = (tag: TagInput, ctx?: PredicateContext) => Diagnostic[];
146
+ type HeadInputPredicate = (input: HeadInputView, ctx?: PredicateContext) => Diagnostic[];
147
+
148
+ declare const emptyMetaContent: TagPredicate;
149
+
150
+ declare const noDeprecatedProps: TagPredicate;
151
+
152
+ declare const noHtmlInTitle: HeadInputPredicate;
153
+
154
+ declare const noUnknownMeta: TagPredicate;
155
+
156
+ declare const nonAbsoluteCanonical: TagPredicate;
157
+
158
+ declare const numericTagPriority: TagPredicate;
159
+
160
+ /**
161
+ * Suggests wrapping per-tag object literals with their `defineX` helper so
162
+ * the v3 discriminated-union types narrow correctly.
163
+ *
164
+ * Adapter responsibilities:
165
+ * - Only call this for tags that live inside an array (`tag.inArray === true`).
166
+ * - Pass `ctx.importedHelpers` so the predicate knows when to surface a hard
167
+ * autofix (helper already imported) vs a suggestion (would need an import).
168
+ */
169
+ declare const preferDefineHelpers: TagPredicate;
170
+
171
+ declare const preloadMissingAs: TagPredicate;
172
+ declare const preloadFontCrossorigin: TagPredicate;
173
+
174
+ declare const robotsConflict: TagPredicate;
175
+
176
+ declare const deferOnModuleScript: TagPredicate;
177
+ declare const scriptSrcWithContent: TagPredicate;
178
+
179
+ declare const twitterHandleMissingAt: TagPredicate;
180
+
181
+ declare const viewportUserScalable: TagPredicate;
182
+
183
+ /**
184
+ * Subset of the runtime `HeadTag` shape this adapter needs. We don't import
185
+ * `HeadTag` from `../types` to keep the predicate module free of runtime
186
+ * coupling — anything compatible with this shape works.
187
+ */
188
+ interface RuntimeHeadTag {
189
+ tag: string;
190
+ props: Record<string, any>;
191
+ innerHTML?: string;
192
+ textContent?: string;
193
+ /** Top-level priority field on resolved runtime tags. */
194
+ tagPriority?: string | number;
195
+ }
196
+ /**
197
+ * Adapt a runtime tag (post-resolve `HeadTag`) into a {@link TagInput} that
198
+ * predicates can read. Coerces `props.content` to a string and lowercases
199
+ * `meta[name]` to mirror HTML's case-insensitive `name=` semantics, matching
200
+ * the runtime `ValidatePlugin`'s pre-existing behaviour.
201
+ *
202
+ * Returns `undefined` when the tag is not one of the validated tag types
203
+ * (`title`, `base`, etc. are handled separately).
204
+ */
205
+ declare function tagInputFromRuntime(tag: RuntimeHeadTag): TagInput | undefined;
206
+ /**
207
+ * Adapt a `<title>` runtime tag (`tag.tag === 'title'`) into a
208
+ * {@link HeadInputView} so the `no-html-in-title` predicate can run against
209
+ * the resolved title text.
210
+ */
211
+ declare function titleInputFromRuntime(titleTag: RuntimeHeadTag): HeadInputView | undefined;
212
+
213
+ declare const tagPredicates: {
214
+ 'defer-on-module-script': TagPredicate;
215
+ 'empty-meta-content': TagPredicate;
216
+ 'no-deprecated-props': TagPredicate;
217
+ 'no-unknown-meta': TagPredicate;
218
+ 'non-absolute-canonical': TagPredicate;
219
+ 'numeric-tag-priority': TagPredicate;
220
+ 'preload-font-crossorigin': TagPredicate;
221
+ 'preload-missing-as': TagPredicate;
222
+ 'robots-conflict': TagPredicate;
223
+ 'script-src-with-content': TagPredicate;
224
+ 'twitter-handle-missing-at': TagPredicate;
225
+ 'viewport-user-scalable': TagPredicate;
226
+ };
227
+ /** Migration-only tag predicates — opt-in via the `migration` config preset. */
228
+ declare const migrationTagPredicates: {
229
+ 'prefer-define-helpers': TagPredicate;
230
+ };
231
+ declare const headInputPredicates: {
232
+ 'no-html-in-title': HeadInputPredicate;
233
+ };
234
+
235
+ export { DEPRECATED_PROPS, KNOWN_META_NAMES, KNOWN_META_PROPERTIES, TAG_PRIORITY_ALIASES, URL_META_KEYS, ValidationRuleId, deferOnModuleScript, emptyMetaContent, findClosestMatch, headInputPredicates, levenshtein, migrationTagPredicates, noDeprecatedProps, noHtmlInTitle, noUnknownMeta, nonAbsoluteCanonical, numericTagPriority, preferDefineHelpers, preloadFontCrossorigin, preloadMissingAs, robotsConflict, scriptSrcWithContent, tagInputFromRuntime, tagPredicates, titleInputFromRuntime, twitterHandleMissingAt, viewportUserScalable };
236
+ export type { Diagnostic, DiagnosticSuggestion, HeadInputPredicate, HeadInputView, PredicateContext, PredicateFix, RuntimeHeadTag, TagInput, TagPredicate, TagPriorityAlias };
@@ -0,0 +1,236 @@
1
+ import { V as ValidationRuleId } from './shared/unhead.Dl_lRDXb.js';
2
+ export { a as RuleConfig, b as RuleSeverity, R as RulesConfig, d as VALIDATION_RULE_IDS, c as ValidationRuleOptions } from './shared/unhead.Dl_lRDXb.js';
3
+
4
+ declare const URL_META_KEYS: Set<string>;
5
+ declare const KNOWN_META_PROPERTIES: Set<string>;
6
+ declare const KNOWN_META_NAMES: Set<string>;
7
+ declare const TAG_PRIORITY_ALIASES: readonly ["critical", "high", "low"];
8
+ type TagPriorityAlias = typeof TAG_PRIORITY_ALIASES[number];
9
+ /**
10
+ * Deprecated v2 tag-prop names with their v3 replacement, used by both the
11
+ * runtime validate plugin and the eslint plugin.
12
+ */
13
+ declare const DEPRECATED_PROPS: Record<string, {
14
+ replacement: string;
15
+ ruleId: 'deprecated-prop-children' | 'deprecated-prop-hid-vmid' | 'deprecated-prop-body';
16
+ }>;
17
+
18
+ declare function levenshtein(a: string, b: string): number;
19
+ declare function findClosestMatch(value: string, knownSet: Set<string>): string | undefined;
20
+
21
+ /**
22
+ * Materialized view of a single head tag (`<meta>`, `<link>`, `<script>`, etc.)
23
+ * suitable for parser-agnostic predicate checks. Adapters in the eslint-plugin
24
+ * and the CLI walk their respective ASTs and produce one of these per tag.
25
+ *
26
+ * `props` only contains entries whose value is statically resolvable to a
27
+ * primitive. `keys` contains every key that appeared in the source, including
28
+ * those whose value couldn't be resolved (computed expressions, identifier
29
+ * references, etc.). Predicates that need to know "did this key appear at all"
30
+ * read `keys`; predicates that need the value read `props`.
31
+ */
32
+ interface TagInput {
33
+ /** Tag list this came from in the head input (`meta` / `link` / `script` / `noscript` / `style`). */
34
+ tagType: 'meta' | 'link' | 'script' | 'noscript' | 'style';
35
+ /** Statically-resolvable props. */
36
+ props: Record<string, string | number | boolean>;
37
+ /** Every prop name that appeared in source, resolvable or not. */
38
+ keys: Set<string>;
39
+ /** Adapter-supplied opaque marker for the whole tag literal. */
40
+ loc?: unknown;
41
+ /** Adapter-supplied opaque marker for individual prop values. */
42
+ propLocs?: Record<string, unknown>;
43
+ /** Whether this tag literal lives inside an array element (vs standalone, e.g. inside `defineLink(...)`). */
44
+ inArray?: boolean;
45
+ }
46
+ /**
47
+ * Top-level head input passed to `useHead` / `useSeoMeta`. Only the scalar
48
+ * top-level keys we actually validate are surfaced; tag-array predicates run
49
+ * against per-tag {@link TagInput}s instead.
50
+ */
51
+ interface HeadInputView {
52
+ /** Name of the calling composable (`useHead`, `useSeoMeta`, …). */
53
+ callee: string;
54
+ /** Statically-resolvable scalar props (currently `title`, `titleTemplate`). */
55
+ props: Record<string, string>;
56
+ /** Every top-level key that appeared, resolvable or not. */
57
+ keys: Set<string>;
58
+ loc?: unknown;
59
+ propLocs?: Record<string, unknown>;
60
+ }
61
+ /**
62
+ * A logical fix described in source-agnostic terms. Each adapter knows how to
63
+ * translate this into either an ESLint `RuleFixer` call or a `magic-string`
64
+ * edit.
65
+ */
66
+ type PredicateFix = {
67
+ type: 'rename-prop';
68
+ key: string;
69
+ newKey: string;
70
+ }
71
+ /** Replace the value half of `key: value` with literal source text. */
72
+ | {
73
+ type: 'replace-prop-value';
74
+ key: string;
75
+ newSource: string;
76
+ }
77
+ /** Replace the entire `key: value` pair with literal source text. */
78
+ | {
79
+ type: 'replace-prop';
80
+ key: string;
81
+ newSource: string;
82
+ }
83
+ /** Insert source text immediately after the named prop (caller supplies the leading `, `). */
84
+ | {
85
+ type: 'insert-after-prop';
86
+ afterKey: string;
87
+ insert: string;
88
+ }
89
+ /** Remove a property and its surrounding comma. */
90
+ | {
91
+ type: 'remove-prop';
92
+ key: string;
93
+ }
94
+ /** Wrap the whole tag literal with a call expression: `wrapWith(<tag>)`. */
95
+ | {
96
+ type: 'wrap-tag';
97
+ wrapWith: string;
98
+ };
99
+ interface DiagnosticSuggestion {
100
+ /** Already-formatted, human-readable suggestion label. */
101
+ message: string;
102
+ fix: PredicateFix;
103
+ }
104
+ interface Diagnostic {
105
+ ruleId: ValidationRuleId;
106
+ /** Already-formatted, human-readable diagnostic message. */
107
+ message: string;
108
+ /**
109
+ * Optional narrowed location:
110
+ * - `{ kind: 'tag' }` (default) → `tag.loc`
111
+ * - `{ kind: 'prop-key', key }` → key half of the named prop
112
+ * - `{ kind: 'prop-value', key }` → value half of the named prop
113
+ * - `{ kind: 'prop', key }` → whole `key: value` pair
114
+ */
115
+ at?: {
116
+ kind: 'tag';
117
+ } | {
118
+ kind: 'prop-key';
119
+ key: string;
120
+ } | {
121
+ kind: 'prop-value';
122
+ key: string;
123
+ } | {
124
+ kind: 'prop';
125
+ key: string;
126
+ };
127
+ /** Autofix to apply when the diagnostic is unambiguous. */
128
+ fix?: PredicateFix;
129
+ /** Editor suggestions when an autofix would be too risky to apply blindly. */
130
+ suggestions?: DiagnosticSuggestion[];
131
+ }
132
+ /**
133
+ * Optional context passed by the adapter. Predicates that don't need any of
134
+ * these should ignore the argument entirely.
135
+ */
136
+ interface PredicateContext {
137
+ /**
138
+ * Map of canonical helper names (`defineLink`, `defineScript`) to the local
139
+ * binding they're imported under (`'defineLink'` for an unaliased import,
140
+ * `'dl'` for `import { defineLink as dl }`). Predicates emit fixes using
141
+ * the local binding so renamed imports stay valid.
142
+ */
143
+ importedHelpers?: Map<string, string>;
144
+ }
145
+ type TagPredicate = (tag: TagInput, ctx?: PredicateContext) => Diagnostic[];
146
+ type HeadInputPredicate = (input: HeadInputView, ctx?: PredicateContext) => Diagnostic[];
147
+
148
+ declare const emptyMetaContent: TagPredicate;
149
+
150
+ declare const noDeprecatedProps: TagPredicate;
151
+
152
+ declare const noHtmlInTitle: HeadInputPredicate;
153
+
154
+ declare const noUnknownMeta: TagPredicate;
155
+
156
+ declare const nonAbsoluteCanonical: TagPredicate;
157
+
158
+ declare const numericTagPriority: TagPredicate;
159
+
160
+ /**
161
+ * Suggests wrapping per-tag object literals with their `defineX` helper so
162
+ * the v3 discriminated-union types narrow correctly.
163
+ *
164
+ * Adapter responsibilities:
165
+ * - Only call this for tags that live inside an array (`tag.inArray === true`).
166
+ * - Pass `ctx.importedHelpers` so the predicate knows when to surface a hard
167
+ * autofix (helper already imported) vs a suggestion (would need an import).
168
+ */
169
+ declare const preferDefineHelpers: TagPredicate;
170
+
171
+ declare const preloadMissingAs: TagPredicate;
172
+ declare const preloadFontCrossorigin: TagPredicate;
173
+
174
+ declare const robotsConflict: TagPredicate;
175
+
176
+ declare const deferOnModuleScript: TagPredicate;
177
+ declare const scriptSrcWithContent: TagPredicate;
178
+
179
+ declare const twitterHandleMissingAt: TagPredicate;
180
+
181
+ declare const viewportUserScalable: TagPredicate;
182
+
183
+ /**
184
+ * Subset of the runtime `HeadTag` shape this adapter needs. We don't import
185
+ * `HeadTag` from `../types` to keep the predicate module free of runtime
186
+ * coupling — anything compatible with this shape works.
187
+ */
188
+ interface RuntimeHeadTag {
189
+ tag: string;
190
+ props: Record<string, any>;
191
+ innerHTML?: string;
192
+ textContent?: string;
193
+ /** Top-level priority field on resolved runtime tags. */
194
+ tagPriority?: string | number;
195
+ }
196
+ /**
197
+ * Adapt a runtime tag (post-resolve `HeadTag`) into a {@link TagInput} that
198
+ * predicates can read. Coerces `props.content` to a string and lowercases
199
+ * `meta[name]` to mirror HTML's case-insensitive `name=` semantics, matching
200
+ * the runtime `ValidatePlugin`'s pre-existing behaviour.
201
+ *
202
+ * Returns `undefined` when the tag is not one of the validated tag types
203
+ * (`title`, `base`, etc. are handled separately).
204
+ */
205
+ declare function tagInputFromRuntime(tag: RuntimeHeadTag): TagInput | undefined;
206
+ /**
207
+ * Adapt a `<title>` runtime tag (`tag.tag === 'title'`) into a
208
+ * {@link HeadInputView} so the `no-html-in-title` predicate can run against
209
+ * the resolved title text.
210
+ */
211
+ declare function titleInputFromRuntime(titleTag: RuntimeHeadTag): HeadInputView | undefined;
212
+
213
+ declare const tagPredicates: {
214
+ 'defer-on-module-script': TagPredicate;
215
+ 'empty-meta-content': TagPredicate;
216
+ 'no-deprecated-props': TagPredicate;
217
+ 'no-unknown-meta': TagPredicate;
218
+ 'non-absolute-canonical': TagPredicate;
219
+ 'numeric-tag-priority': TagPredicate;
220
+ 'preload-font-crossorigin': TagPredicate;
221
+ 'preload-missing-as': TagPredicate;
222
+ 'robots-conflict': TagPredicate;
223
+ 'script-src-with-content': TagPredicate;
224
+ 'twitter-handle-missing-at': TagPredicate;
225
+ 'viewport-user-scalable': TagPredicate;
226
+ };
227
+ /** Migration-only tag predicates — opt-in via the `migration` config preset. */
228
+ declare const migrationTagPredicates: {
229
+ 'prefer-define-helpers': TagPredicate;
230
+ };
231
+ declare const headInputPredicates: {
232
+ 'no-html-in-title': HeadInputPredicate;
233
+ };
234
+
235
+ export { DEPRECATED_PROPS, KNOWN_META_NAMES, KNOWN_META_PROPERTIES, TAG_PRIORITY_ALIASES, URL_META_KEYS, ValidationRuleId, deferOnModuleScript, emptyMetaContent, findClosestMatch, headInputPredicates, levenshtein, migrationTagPredicates, noDeprecatedProps, noHtmlInTitle, noUnknownMeta, nonAbsoluteCanonical, numericTagPriority, preferDefineHelpers, preloadFontCrossorigin, preloadMissingAs, robotsConflict, scriptSrcWithContent, tagInputFromRuntime, tagPredicates, titleInputFromRuntime, twitterHandleMissingAt, viewportUserScalable };
236
+ export type { Diagnostic, DiagnosticSuggestion, HeadInputPredicate, HeadInputView, PredicateContext, PredicateFix, RuntimeHeadTag, TagInput, TagPredicate, TagPriorityAlias };
@@ -0,0 +1,49 @@
1
+ export { D as DEPRECATED_PROPS, K as KNOWN_META_NAMES, a as KNOWN_META_PROPERTIES, T as TAG_PRIORITY_ALIASES, U as URL_META_KEYS, d as deferOnModuleScript, e as emptyMetaContent, f as findClosestMatch, h as headInputPredicates, l as levenshtein, m as migrationTagPredicates, n as noDeprecatedProps, b as noHtmlInTitle, c as noUnknownMeta, g as nonAbsoluteCanonical, i as numericTagPriority, p as preferDefineHelpers, j as preloadFontCrossorigin, k as preloadMissingAs, r as robotsConflict, s as scriptSrcWithContent, t as tagInputFromRuntime, o as tagPredicates, q as titleInputFromRuntime, u as twitterHandleMissingAt, v as viewportUserScalable } from './shared/unhead.ebqUBTt1.mjs';
2
+
3
+ const VALIDATION_RULE_IDS = [
4
+ "canonical-og-url-mismatch",
5
+ "charset-not-early",
6
+ "defer-on-module-script",
7
+ "deprecated-option-mode",
8
+ "deprecated-prop-body",
9
+ "deprecated-prop-children",
10
+ "deprecated-prop-hid-vmid",
11
+ "duplicate-resource-hint",
12
+ "empty-meta-content",
13
+ "empty-title",
14
+ "html-in-title",
15
+ "inline-script-size",
16
+ "inline-style-size",
17
+ "meta-beyond-1mb",
18
+ "missing-alias-sorting-plugin",
19
+ "missing-description",
20
+ "missing-template-params-plugin",
21
+ "missing-title",
22
+ "non-absolute-canonical",
23
+ "non-absolute-og-url",
24
+ "numeric-tag-priority",
25
+ "og-image-missing-dimensions",
26
+ "og-missing-description",
27
+ "og-missing-title",
28
+ "possible-typo",
29
+ "preconnect-missing-crossorigin",
30
+ "prefer-define-helpers",
31
+ "prefetch-preload-conflict",
32
+ "preload-async-defer-conflict",
33
+ "preload-fetchpriority-conflict",
34
+ "preload-font-crossorigin",
35
+ "preload-missing-as",
36
+ "preload-not-modulepreload",
37
+ "redundant-dns-prefetch",
38
+ "render-blocking-script",
39
+ "robots-conflict",
40
+ "script-src-with-content",
41
+ "too-many-fetchpriority-high",
42
+ "too-many-preconnects",
43
+ "too-many-preloads",
44
+ "twitter-handle-missing-at",
45
+ "unresolved-template-param",
46
+ "viewport-user-scalable"
47
+ ];
48
+
49
+ export { VALIDATION_RULE_IDS };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unhead",
3
3
  "type": "module",
4
- "version": "3.0.5",
4
+ "version": "3.1.0",
5
5
  "description": "Full-stack <head> manager built for any framework.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -73,6 +73,14 @@
73
73
  "types": "./dist/parser.d.ts",
74
74
  "default": "./dist/parser.mjs"
75
75
  },
76
+ "./validate": {
77
+ "types": "./dist/validate.d.ts",
78
+ "default": "./dist/validate.mjs"
79
+ },
80
+ "./stream/unplugin": {
81
+ "types": "./dist/stream/unplugin.d.ts",
82
+ "default": "./dist/stream/unplugin.mjs"
83
+ },
76
84
  "./stream/vite": {
77
85
  "types": "./dist/stream/vite.d.ts",
78
86
  "default": "./dist/stream/vite.mjs"
@@ -120,6 +128,12 @@
120
128
  "parser": [
121
129
  "dist/parser.d.ts"
122
130
  ],
131
+ "validate": [
132
+ "dist/validate.d.ts"
133
+ ],
134
+ "stream/unplugin": [
135
+ "dist/stream/unplugin.d.ts"
136
+ ],
123
137
  "stream/vite": [
124
138
  "dist/stream/vite.d.ts"
125
139
  ],
@@ -163,12 +177,13 @@
163
177
  }
164
178
  },
165
179
  "dependencies": {
166
- "hookable": "^6.1.1"
180
+ "hookable": "^6.1.1",
181
+ "unplugin": "^3.0.0"
167
182
  },
168
183
  "devDependencies": {
169
184
  "@rollup/plugin-node-resolve": "^16.0.3",
170
185
  "rollup": "^4.60.2",
171
- "vite": "^8.0.9"
186
+ "vite": "^8.0.10"
172
187
  },
173
188
  "scripts": {
174
189
  "build": "unbuild",