@nanisoft/prism-ui 0.7.0 → 0.8.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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +30 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -0
- package/dist/components/ui/breadcrumb.d.ts +6 -2
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +5 -3
- package/dist/components/ui/dialog.d.ts +12 -1
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +2 -2
- package/dist/components/ui/live-region.d.ts +78 -0
- package/dist/components/ui/live-region.d.ts.map +1 -0
- package/dist/components/ui/live-region.js +48 -0
- package/dist/components/ui/mark.d.ts +44 -0
- package/dist/components/ui/mark.d.ts.map +1 -0
- package/dist/components/ui/mark.js +79 -0
- package/dist/components/ui/pagination.d.ts +24 -6
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +23 -9
- package/dist/components/ui/product-switcher.d.ts +7 -0
- package/dist/components/ui/product-switcher.d.ts.map +1 -1
- package/dist/components/ui/product-switcher.js +2 -2
- package/dist/components/ui/slider.d.ts +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/tree.d.ts +115 -0
- package/dist/components/ui/tree.d.ts.map +1 -0
- package/dist/components/ui/tree.js +137 -0
- package/dist/styles.css +31 -0
- package/gates/README.md +98 -0
- package/gates/cli.mjs +133 -0
- package/gates/hidden-state.mjs +243 -0
- package/gates/index.mjs +81 -0
- package/gates/laws.mjs +170 -0
- package/gates/links.mjs +187 -0
- package/gates/pack-boundary.mjs +421 -0
- package/gates/pin.mjs +130 -0
- package/gates/retired-line.mjs +314 -0
- package/gates/run.mjs +320 -0
- package/gates/runtime-token-read.mjs +129 -0
- package/gates/stylesheet-ownership.mjs +207 -0
- package/package.json +14 -2
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The token-read law's runtime form: no token is read at runtime.
|
|
3
|
+
*
|
|
4
|
+
* The clause was written about canvas, because a canvas reads a computed style
|
|
5
|
+
* from one element and paints it into pixels. The pack is a runtime attribute on
|
|
6
|
+
* an ancestor, so a scoped boundary hands that read the pack's light values on a
|
|
7
|
+
* dark page, and a painted pixel does not move when the pack beneath it changes.
|
|
8
|
+
* A reader with dark mode stored and a reader without it are served different
|
|
9
|
+
* colours from the same markup, and nothing in the rendered page says so.
|
|
10
|
+
*
|
|
11
|
+
* It generalises from canvas to any runtime token read, and it holds its shape
|
|
12
|
+
* from the original clause: **a read with a hard-coded fallback is a read that
|
|
13
|
+
* cannot fail, and a read that cannot fail hides its own failure.** The token
|
|
14
|
+
* build publishes the replacement, which is a token-driven inline replacement
|
|
15
|
+
* painted in the HTML: it resolves through the cascade, holds every pack, and
|
|
16
|
+
* ships no client code. So the fix is deletion rather than repair, and this gate
|
|
17
|
+
* asserts the deletion.
|
|
18
|
+
*
|
|
19
|
+
* What this gate does not do is forbid client code. Three of the four consumer
|
|
20
|
+
* repositories ship none and one ships exactly one component for a reason its own
|
|
21
|
+
* gate explains; whether a given repository has a client boundary is that
|
|
22
|
+
* repository's business, and a gate that forbade one would be a law about one
|
|
23
|
+
* site's structure pretending to be a law about all of them. What is universal is
|
|
24
|
+
* the read, because a read resolves once and paints a value that never follows the
|
|
25
|
+
* cascade.
|
|
26
|
+
*
|
|
27
|
+
* Coverage is asserted: the declared roots must hold at least as many source files
|
|
28
|
+
* as the consumer declares as its floor, so a renamed directory cannot empty this
|
|
29
|
+
* run and report a repository that reads nothing.
|
|
30
|
+
*/
|
|
31
|
+
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs'
|
|
32
|
+
import path from 'node:path'
|
|
33
|
+
|
|
34
|
+
import { law } from './laws.mjs'
|
|
35
|
+
import { CoverageError, finding, floor } from './run.mjs'
|
|
36
|
+
|
|
37
|
+
/** Every way a program resolves a custom property from a live element. */
|
|
38
|
+
const RUNTIME_READ = /getPropertyValue|getComputedStyle|documentElement\.style\.|style\.setProperty/
|
|
39
|
+
|
|
40
|
+
/** The retired line's runtime read helpers, which a half-finished removal leaves behind. */
|
|
41
|
+
const RETIRED_READS = /prismCssVarKey|prismBrandPacks|PrismThemeModeProvider/
|
|
42
|
+
|
|
43
|
+
/** How a canvas or an inline replacement is painted, for the message that names the fix. */
|
|
44
|
+
const PAINTS = /getContext\(|<canvas|document\.createElement\(['"]canvas['"]\)/
|
|
45
|
+
|
|
46
|
+
export function run({ root, config }) {
|
|
47
|
+
const l = law('runtime-token-read')
|
|
48
|
+
const findings = []
|
|
49
|
+
const notes = []
|
|
50
|
+
const sourceRoots = config.sourceRoots ?? ['app', 'components', 'lib']
|
|
51
|
+
const minFiles = config.minFiles ?? 5
|
|
52
|
+
|
|
53
|
+
const missing = sourceRoots.filter((declared) => !existsSync(path.join(root, declared)))
|
|
54
|
+
if (missing.length > 0) {
|
|
55
|
+
throw new CoverageError(
|
|
56
|
+
`${missing.length} of ${sourceRoots.length} declared source roots do not resolve: ${missing.join(', ')}.\n` +
|
|
57
|
+
' A gate that read nothing reports a repository that reads nothing, which is the cleanest possible\n' +
|
|
58
|
+
' reading of this law and the one this gate must never give by accident.',
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const skip = new Set(['node_modules', '.next', 'out', '.git', '.wrangler', '.source'])
|
|
63
|
+
const files = []
|
|
64
|
+
const visit = (dir) => {
|
|
65
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
66
|
+
if (skip.has(entry.name)) continue
|
|
67
|
+
const full = path.join(dir, entry.name)
|
|
68
|
+
if (entry.isDirectory() || statSync(full).isDirectory()) visit(full)
|
|
69
|
+
else if (/\.(tsx?|mjs|jsx?)$/.test(entry.name)) files.push(full)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
for (const declared of sourceRoots) visit(path.join(root, declared))
|
|
73
|
+
floor('source file(s)', files.length, minFiles)
|
|
74
|
+
|
|
75
|
+
const relative = (file) => path.relative(root, file).split(path.sep).join('/')
|
|
76
|
+
let clientModules = 0
|
|
77
|
+
|
|
78
|
+
for (const file of files) {
|
|
79
|
+
const source = readFileSync(file, 'utf8')
|
|
80
|
+
const where = relative(file)
|
|
81
|
+
if (/^\s*['"]use client['"]/m.test(source)) clientModules += 1
|
|
82
|
+
|
|
83
|
+
source.split('\n').forEach((line, index) => {
|
|
84
|
+
const read = line.match(RUNTIME_READ)
|
|
85
|
+
if (read) {
|
|
86
|
+
const paints = PAINTS.test(source)
|
|
87
|
+
findings.push(
|
|
88
|
+
finding(
|
|
89
|
+
`${where}:${index + 1}`,
|
|
90
|
+
'runtime-token-read',
|
|
91
|
+
`"${read[0]}" resolves a token from a live element. ${paints ? 'A canvas reads it once and paints\n' +
|
|
92
|
+
' pixels, so a scoped boundary hands it the light values on a dark page and a painted pixel does not\n' +
|
|
93
|
+
' move when the pack beneath it does. ' : ''}A read with a hard-coded fallback is a read that cannot\n` +
|
|
94
|
+
' fail, and a read that cannot fail hides its own failure.',
|
|
95
|
+
),
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
const retired = line.match(RETIRED_READS)
|
|
99
|
+
if (retired) {
|
|
100
|
+
findings.push(
|
|
101
|
+
finding(
|
|
102
|
+
`${where}:${index + 1}`,
|
|
103
|
+
'retired-runtime-read',
|
|
104
|
+
`"${retired[0]}" is the retired line's runtime read helper. The theme is two attributes on the document\n` +
|
|
105
|
+
' element and a blocking script the design system ships.',
|
|
106
|
+
),
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
notes.push(
|
|
113
|
+
`${l.id}: ${findings.length} finding(s) across ${files.length} source file(s) read, floor ${minFiles}; roots: ${sourceRoots.join(', ')}`,
|
|
114
|
+
)
|
|
115
|
+
notes.push(
|
|
116
|
+
`${l.id}: ${clientModules} module(s) carry a client directive. Whether this repository has a client boundary at\n` +
|
|
117
|
+
' all is its own business; what is universal is the read, because a read resolves once and a resolved\n' +
|
|
118
|
+
' value does not follow the cascade.',
|
|
119
|
+
)
|
|
120
|
+
notes.push(
|
|
121
|
+
`${l.id}: every directory this run did not read, printed so an exclusion is arguable: ${[...skip].sort().join(', ')}`,
|
|
122
|
+
)
|
|
123
|
+
notes.push(
|
|
124
|
+
`${l.id}: the honest limit: this is a lexical scan. It cannot see a computed \`import()\` or a \`require\` assembled at\n` +
|
|
125
|
+
' runtime, and it does not attempt to decide whether a read it found is load-bearing.',
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
return { law: l, findings, notes }
|
|
129
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Two laws about one sheet: what it may not own, and what it may not read.
|
|
3
|
+
*
|
|
4
|
+
* **Ownership.** Prism's base rules sit in `@layer base` and a consumer's sheet
|
|
5
|
+
* is unlayered, so an unlayered declaration outranks a layered one at any
|
|
6
|
+
* specificity regardless of import order, and a consumer that imported its sheet
|
|
7
|
+
* first would have exactly the same outcome. The layer is not the cause of these
|
|
8
|
+
* failures; it is the reason they were invisible, because nobody can tell from a
|
|
9
|
+
* screenshot that the site won.
|
|
10
|
+
*
|
|
11
|
+
* A site declaration **competes** when it can match the same element, for a
|
|
12
|
+
* property the design system's base declares, with shorthands expanded. Two looser
|
|
13
|
+
* definitions were tried and rejected: "any declaration of a property the base
|
|
14
|
+
* declares anywhere" is 1,478 rows across this family and says that every
|
|
15
|
+
* declaration in CSS touches something a reset already sets; "any declaration of a
|
|
16
|
+
* property the base declares" is 98 rows of which 55 match no element on the
|
|
17
|
+
* current line. The list below is the narrow one, and it needs no cascade to
|
|
18
|
+
* decide: an unlayered bare-element declaration for a property the base declares
|
|
19
|
+
* **is** the defect, whatever the cascade then does with it.
|
|
20
|
+
*
|
|
21
|
+
* A focus rule is a finding whatever it declares. The design system draws its
|
|
22
|
+
* ring on the component as a `box-shadow`, so a site `outline` does not compete
|
|
23
|
+
* with it; it draws a second band over the real one, and on anything that is not
|
|
24
|
+
* a Prism Component it is the only thing standing between a keyboard reader and
|
|
25
|
+
* no indicator at all.
|
|
26
|
+
*
|
|
27
|
+
* **The token read.** A custom property that resolves to nothing does not paint a
|
|
28
|
+
* wrong colour. The declaration it appears in is invalid at computed-value time,
|
|
29
|
+
* so a shorthand erases itself and a longhand reverts to its initial value: a page
|
|
30
|
+
* ground reverts to transparent, an inherited ink reverts to the browser default,
|
|
31
|
+
* and a hairline reverts to `border-style: none`, which is a box with no edge
|
|
32
|
+
* rather than a box with a wrong-coloured one. Ninety-eight of the 219 dead reads
|
|
33
|
+
* in the four repositories were shorthands. The reference is the design system's
|
|
34
|
+
* emitted stylesheet, read through its own export map, so a renamed token is a
|
|
35
|
+
* finding rather than a silent erasure.
|
|
36
|
+
*
|
|
37
|
+
* **The runtime form is the same law.** A read in JavaScript with a hard-coded
|
|
38
|
+
* fallback is a read that cannot fail, which is why the original clause was
|
|
39
|
+
* written about canvas: the pack is a runtime attribute on an ancestor, a canvas
|
|
40
|
+
* reads a computed style from one element, and a scoped boundary hands it the
|
|
41
|
+
* pack's light values on a dark page. The shipped form of that law is the gate
|
|
42
|
+
* that forbids the client read, and a repository that has no client code has
|
|
43
|
+
* nothing left to check.
|
|
44
|
+
*
|
|
45
|
+
* Coverage: the declared sheets must resolve and must hold at least as many
|
|
46
|
+
* declarations as the site declares as its floor. A floor on *findings* would fail
|
|
47
|
+
* a correct sheet, and a floor on nothing would pass an unread one, so the floor
|
|
48
|
+
* is on declarations read.
|
|
49
|
+
*/
|
|
50
|
+
import { law } from './laws.mjs'
|
|
51
|
+
import {
|
|
52
|
+
CoverageError,
|
|
53
|
+
blankComments,
|
|
54
|
+
cssBlocks,
|
|
55
|
+
declaredProperties,
|
|
56
|
+
designSystem,
|
|
57
|
+
finding,
|
|
58
|
+
floor,
|
|
59
|
+
read,
|
|
60
|
+
} from './run.mjs'
|
|
61
|
+
|
|
62
|
+
/** The properties the design system's own base layer declares, so a bare-element rule competes. */
|
|
63
|
+
const COMPETING_PROPERTIES = [
|
|
64
|
+
'background',
|
|
65
|
+
'background-color',
|
|
66
|
+
'color',
|
|
67
|
+
'font-family',
|
|
68
|
+
'outline',
|
|
69
|
+
'outline-style',
|
|
70
|
+
'border-color',
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
/** Any focus selector. The design system owns the indicator; a consumer drawing one is a second one. */
|
|
74
|
+
const FOCUS_SELECTOR = /:focus(-visible)?\b/
|
|
75
|
+
|
|
76
|
+
/** A `color-mix()` that takes a custom property as an operand erases itself rather than repainting. */
|
|
77
|
+
const DEAD_OPERAND = /color-mix\([^)]*var\(/g
|
|
78
|
+
|
|
79
|
+
export function run({ root, config }) {
|
|
80
|
+
const l = law('stylesheet-ownership')
|
|
81
|
+
const readLaw = law('token-read')
|
|
82
|
+
const findings = []
|
|
83
|
+
const notes = []
|
|
84
|
+
const sheets = config.sheets ?? ['app/globals.css']
|
|
85
|
+
const supplied = config.supplied ?? {}
|
|
86
|
+
const minDeclarations = config.minDeclarations ?? 20
|
|
87
|
+
|
|
88
|
+
const missing = sheets.filter((sheet) => read(root, sheet) === null)
|
|
89
|
+
if (missing.length > 0) {
|
|
90
|
+
throw new CoverageError(
|
|
91
|
+
`${missing.length} of ${sheets.length} configured stylesheets do not resolve: ${missing.join(', ')}.\n` +
|
|
92
|
+
' A gate that read nothing reports a clean sheet, so an unresolved root fails the run.',
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const system = designSystem(root)
|
|
97
|
+
const emitted = system.styles()
|
|
98
|
+
const emittedProperties = declaredProperties(emitted)
|
|
99
|
+
|
|
100
|
+
let rules = 0
|
|
101
|
+
let declarations = 0
|
|
102
|
+
let competing = 0
|
|
103
|
+
let deadReads = 0
|
|
104
|
+
|
|
105
|
+
for (const sheet of sheets) {
|
|
106
|
+
const source = blankComments(read(root, sheet))
|
|
107
|
+
for (const block of cssBlocks(source)) {
|
|
108
|
+
rules += 1
|
|
109
|
+
for (const declaration of block.body.split(';')) {
|
|
110
|
+
if (/^[a-z-]+\s*:/.test(declaration.trim())) declarations += 1
|
|
111
|
+
}
|
|
112
|
+
for (const selector of block.selectors) {
|
|
113
|
+
if (FOCUS_SELECTOR.test(selector)) {
|
|
114
|
+
competing += 1
|
|
115
|
+
findings.push(
|
|
116
|
+
finding(
|
|
117
|
+
`${sheet}:${block.line}`,
|
|
118
|
+
'focus-indicator',
|
|
119
|
+
`${selector} draws a focus indicator in this repository's own sheet. The design system draws its\n` +
|
|
120
|
+
' ring on the component, and a plain anchor keeps the browser\'s own. A site rule is a second\n' +
|
|
121
|
+
" band over the first or the suppression of the second, and a shorthand whose colour token\n" +
|
|
122
|
+
' stops resolving suppresses it rather than failing to draw one.',
|
|
123
|
+
),
|
|
124
|
+
)
|
|
125
|
+
continue
|
|
126
|
+
}
|
|
127
|
+
// A bare-element selector: `body`, `a`, `*`, `html`. A class in the selector makes
|
|
128
|
+
// the rule this repository's own surface, which is a different question.
|
|
129
|
+
const hasClass = selector.includes('.') || selector.includes('[') || selector.includes(':')
|
|
130
|
+
if (hasClass) continue
|
|
131
|
+
for (const property of COMPETING_PROPERTIES) {
|
|
132
|
+
if (!new RegExp(`(?:^|[;{\\s])${property}\\s*:`, 'm').test(block.body)) continue
|
|
133
|
+
competing += 1
|
|
134
|
+
findings.push(
|
|
135
|
+
finding(
|
|
136
|
+
`${sheet}:${block.line}`,
|
|
137
|
+
'competes-with-base',
|
|
138
|
+
`${selector} declares ${property}, which the design system's own base layer declares. The base is\n` +
|
|
139
|
+
" layered and this sheet is not, so this rule wins the cascade at any specificity and silently\n" +
|
|
140
|
+
" replaces the design system's.",
|
|
141
|
+
),
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const dead = [...block.body.matchAll(DEAD_OPERAND)]
|
|
146
|
+
competing += dead.length
|
|
147
|
+
if (dead.length > 0) {
|
|
148
|
+
findings.push(
|
|
149
|
+
finding(
|
|
150
|
+
`${sheet}:${block.line}`,
|
|
151
|
+
'dead-operand',
|
|
152
|
+
'color-mix() takes a var() as an operand. A custom property that resolves to nothing does not paint a\n' +
|
|
153
|
+
' wrong colour: a shorthand with one dead operand erases the whole declaration, so the rule stops\n' +
|
|
154
|
+
' existing.',
|
|
155
|
+
),
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
floor('declarations read', declarations, minDeclarations)
|
|
162
|
+
|
|
163
|
+
for (const sheet of sheets) {
|
|
164
|
+
const source = blankComments(read(root, sheet))
|
|
165
|
+
const own = declaredProperties(source)
|
|
166
|
+
for (const match of source.matchAll(/var\((--[a-z0-9-]+)/g)) {
|
|
167
|
+
const property = match[1]
|
|
168
|
+
if (own.has(property) || emittedProperties.has(property) || property in supplied) continue
|
|
169
|
+
deadReads += 1
|
|
170
|
+
const line = source.slice(0, match.index).split('\n').length
|
|
171
|
+
findings.push(
|
|
172
|
+
finding(
|
|
173
|
+
`${sheet}:${line}`,
|
|
174
|
+
'dead-read',
|
|
175
|
+
`var(${property}) names a custom property nothing declares. The declaration is invalid at\n` +
|
|
176
|
+
' computed-value time, so a shorthand erases itself and a longhand reverts to its initial value.\n' +
|
|
177
|
+
' This is not a wrong colour; it is no declaration at all.',
|
|
178
|
+
),
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
notes.push(
|
|
184
|
+
`${l.id}: ${sheets.length} sheet(s), ${rules} rule(s) and ${declarations} declaration(s) read, floor ${minDeclarations}`,
|
|
185
|
+
)
|
|
186
|
+
notes.push(`${l.id}: sheets read: ${sheets.join(', ')}`)
|
|
187
|
+
notes.push(
|
|
188
|
+
`${l.id}: ${competing} competing declaration(s); properties the design system's base declares: ${COMPETING_PROPERTIES.join(', ')}`,
|
|
189
|
+
)
|
|
190
|
+
notes.push(
|
|
191
|
+
`${readLaw.id}: ${deadReads} dead read(s). Every var() in this repository's own sheet names a property the\n` +
|
|
192
|
+
` emitted stylesheet declares (${emittedProperties.size} properties), the sheet itself declares, or one of\n` +
|
|
193
|
+
` ${Object.keys(supplied).length} the build supplies.`,
|
|
194
|
+
)
|
|
195
|
+
for (const [property, why] of Object.entries(supplied)) notes.push(`${readLaw.id}: supplied: ${property} is ${why}`)
|
|
196
|
+
notes.push(
|
|
197
|
+
`${l.id}: the reference is ${'`@nanisoft/prism-ui/styles.css`'}, resolved through the installed package's own export map,\n` +
|
|
198
|
+
' so a renamed subpath is an error here rather than a run that reports every property as undeclared.',
|
|
199
|
+
)
|
|
200
|
+
notes.push(
|
|
201
|
+
`${l.id}: the honest limit, printed on every run: this is a text scan over selectors and declarations, not a\n` +
|
|
202
|
+
' cascade resolution. It cannot see a class-scoped rule that competes, an inline style prop, a sheet it\n' +
|
|
203
|
+
" was not pointed at, or a change to the design system's base layer.",
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
return { law: l, findings, notes, also: [readLaw] }
|
|
207
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanisoft/prism-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Prism's React component, block and page library.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,10 +57,21 @@
|
|
|
57
57
|
"default": "./dist/catalog.js"
|
|
58
58
|
},
|
|
59
59
|
"./styles.css": "./dist/styles.css",
|
|
60
|
+
"./gates": {
|
|
61
|
+
"default": "./gates/index.mjs"
|
|
62
|
+
},
|
|
63
|
+
"./gates/*": {
|
|
64
|
+
"default": "./gates/*.mjs"
|
|
65
|
+
},
|
|
60
66
|
"./package.json": "./package.json"
|
|
61
67
|
},
|
|
68
|
+
"bin": {
|
|
69
|
+
"prism-gates": "./gates/cli.mjs"
|
|
70
|
+
},
|
|
62
71
|
"files": [
|
|
63
72
|
"dist",
|
|
73
|
+
"gates",
|
|
74
|
+
"!gates/__tests__",
|
|
64
75
|
"THIRD-PARTY-NOTICES.md"
|
|
65
76
|
],
|
|
66
77
|
"engines": {
|
|
@@ -101,7 +112,8 @@
|
|
|
101
112
|
"sync": "node scripts/sync-registry.mjs",
|
|
102
113
|
"validate": "node scripts/validate-registry.mjs",
|
|
103
114
|
"build": "node scripts/build.mjs && pnpm sync && pnpm validate && node scripts/check-catalogue.mjs && shadcn build && node scripts/check-surface.mjs && node scripts/check-focus-indicators.mjs && node scripts/check-item-docs.mjs && node scripts/check-block-copy.mjs && node scripts/check-item-category.mjs && node scripts/check-block-imports.mjs",
|
|
104
|
-
"check": "node scripts/validate-registry.mjs && node scripts/check-catalogue.mjs && node scripts/check-surface.mjs && node scripts/check-focus-indicators.mjs && node scripts/check-pack-boundary.mjs && node scripts/check-vector-ink.mjs && node scripts/check-client-budget.mjs && node scripts/check-theme-resolution.mjs && node scripts/check-boot-budget.mjs && node scripts/check-item-docs.mjs && node scripts/check-block-copy.mjs && node scripts/check-item-category.mjs && node scripts/check-block-imports.mjs",
|
|
115
|
+
"check": "node scripts/validate-registry.mjs && node scripts/check-catalogue.mjs && node scripts/check-surface.mjs && node scripts/check-focus-indicators.mjs && node scripts/check-pack-boundary.mjs && node scripts/check-vector-ink.mjs && node scripts/check-client-budget.mjs && node scripts/check-theme-resolution.mjs && node scripts/check-boot-budget.mjs && node scripts/check-item-docs.mjs && node scripts/check-block-copy.mjs && node scripts/check-item-category.mjs && node scripts/check-block-imports.mjs && node scripts/check-gate-kit.mjs",
|
|
116
|
+
"check:gate-kit": "node scripts/check-gate-kit.mjs",
|
|
105
117
|
"check:vector-ink": "node scripts/check-vector-ink.mjs",
|
|
106
118
|
"check:client-budget": "node scripts/check-client-budget.mjs",
|
|
107
119
|
"check:pack-boundary": "node scripts/check-pack-boundary.mjs",
|