basalt-ui 1.0.0 → 1.0.1
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/AGENTS.md +11 -11
- package/CHANGELOG.md +12 -0
- package/README.md +31 -44
- package/agent/skills/basalt-app/SKILL.md +137 -0
- package/agent/skills/basalt-charts/SKILL.md +179 -0
- package/agent/skills/basalt-design/SKILL.md +249 -0
- package/agent/templates/CLAUDE-block.md.tpl +8 -5
- package/configs/check.yml +8 -8
- package/configs/lefthook.yml +9 -5
- package/dist/cli/index.d.ts +46 -27
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +98 -116
- package/dist/surfaces.d.ts +11 -1
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +6 -0
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +3 -0
- package/llms.txt +2 -2
- package/package.json +2 -2
- package/src/cli/check-theme.test.ts +12 -2
- package/src/cli/help.test.ts +93 -0
- package/src/cli/index.ts +207 -169
- package/src/cli/placement-engine.test.ts +194 -0
- package/src/cli/tarball-parity.test.ts +44 -0
- package/src/cli/template-format.test.ts +64 -0
- package/src/surfaces.ts +20 -1
- package/src/tokens/index.ts +6 -0
- /package/bin/{basalt.mjs → basalt-ui.mjs} +0 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Placement-engine contract tests. init/sync write into consumers' git-tracked trees, which makes
|
|
3
|
+
* this the highest-risk code in the repo — every ownership promise the managed/seed model makes is
|
|
4
|
+
* asserted here:
|
|
5
|
+
*
|
|
6
|
+
* - sync is idempotent (second run is a byte-level no-op, manifest stable)
|
|
7
|
+
* - a locally-edited managed file is never clobbered (skipped + reported; --check exits 1)
|
|
8
|
+
* - --force overwrites managed files but never touches seeds
|
|
9
|
+
* - a seed is recreated only when missing
|
|
10
|
+
* - block-splicing preserves surrounding host content, appends when markers are absent, and
|
|
11
|
+
* errors loudly on duplicate markers instead of silently picking one
|
|
12
|
+
* - --check performs zero writes (filesystem is byte-identical afterwards)
|
|
13
|
+
* - exit codes: 0 clean / 1 drift
|
|
14
|
+
*/
|
|
15
|
+
import { afterEach, beforeEach, describe, expect, it } from 'bun:test'
|
|
16
|
+
import {
|
|
17
|
+
existsSync,
|
|
18
|
+
mkdirSync,
|
|
19
|
+
mkdtempSync,
|
|
20
|
+
readdirSync,
|
|
21
|
+
readFileSync,
|
|
22
|
+
rmSync,
|
|
23
|
+
statSync,
|
|
24
|
+
writeFileSync,
|
|
25
|
+
} from 'node:fs'
|
|
26
|
+
import { tmpdir } from 'node:os'
|
|
27
|
+
import { join, relative, resolve } from 'node:path'
|
|
28
|
+
import { fileURLToPath } from 'node:url'
|
|
29
|
+
|
|
30
|
+
import { init, sync } from './index.ts'
|
|
31
|
+
|
|
32
|
+
const PKG_ROOT = fileURLToPath(new URL('../../', import.meta.url))
|
|
33
|
+
const SHIPPED_RULE = readFileSync(resolve(PKG_ROOT, 'agent/rules/basalt-tokens.md'), 'utf8')
|
|
34
|
+
const SHIPPED_SKILL = readFileSync(resolve(PKG_ROOT, 'agent/skills/basalt-design/SKILL.md'), 'utf8')
|
|
35
|
+
|
|
36
|
+
let dir: string
|
|
37
|
+
|
|
38
|
+
beforeEach(() => {
|
|
39
|
+
dir = mkdtempSync(resolve(tmpdir(), 'basalt-engine-'))
|
|
40
|
+
writeFileSync(join(dir, 'package.json'), JSON.stringify({ name: 'fixture' }))
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
afterEach(() => {
|
|
44
|
+
rmSync(dir, { recursive: true, force: true })
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
function read(relPath: string): string {
|
|
48
|
+
return readFileSync(join(dir, relPath), 'utf8')
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function write(relPath: string, content: string): void {
|
|
52
|
+
const abs = join(dir, relPath)
|
|
53
|
+
mkdirSync(resolve(abs, '..'), { recursive: true })
|
|
54
|
+
writeFileSync(abs, content, 'utf8')
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Byte-level snapshot of every file under the fixture dir — the zero-writes/idempotency oracle. */
|
|
58
|
+
function snapshotDir(root: string = dir): Map<string, string> {
|
|
59
|
+
const out = new Map<string, string>()
|
|
60
|
+
function walk(d: string): void {
|
|
61
|
+
for (const name of readdirSync(d)) {
|
|
62
|
+
const abs = resolve(d, name)
|
|
63
|
+
if (statSync(abs).isDirectory()) walk(abs)
|
|
64
|
+
else out.set(relative(root, abs), readFileSync(abs, 'utf8'))
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
walk(root)
|
|
68
|
+
return out
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function silenced<T>(fn: () => T): T {
|
|
72
|
+
const originalLog = console.log
|
|
73
|
+
const originalError = console.error
|
|
74
|
+
console.log = () => {}
|
|
75
|
+
console.error = () => {}
|
|
76
|
+
try {
|
|
77
|
+
return fn()
|
|
78
|
+
} finally {
|
|
79
|
+
console.log = originalLog
|
|
80
|
+
console.error = originalError
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
describe('managed vs seed placement', () => {
|
|
85
|
+
it('init places rules AND skills as managed files, plus the toolchain seeds', () => {
|
|
86
|
+
silenced(() => init(dir))
|
|
87
|
+
expect(read('.claude/rules/basalt-tokens.md')).toBe(SHIPPED_RULE)
|
|
88
|
+
expect(read('.claude/skills/basalt-design/SKILL.md')).toBe(SHIPPED_SKILL)
|
|
89
|
+
expect(existsSync(join(dir, '.claude/skills/basalt-app/SKILL.md'))).toBe(true)
|
|
90
|
+
expect(existsSync(join(dir, '.claude/skills/basalt-charts/SKILL.md'))).toBe(true)
|
|
91
|
+
// Seeds are references, not copies — the toolchain auto-updates through node_modules.
|
|
92
|
+
expect(read('.oxlintrc.json')).toContain('./node_modules/basalt-ui/configs/oxlint.json')
|
|
93
|
+
expect(read('lefthook.yml')).toContain('node_modules/basalt-ui/configs/lefthook.yml')
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
it('sync is idempotent: the second run is a byte-level no-op and the manifest is stable', () => {
|
|
97
|
+
silenced(() => init(dir))
|
|
98
|
+
expect(silenced(() => sync({}, dir))).toBe(0)
|
|
99
|
+
const before = snapshotDir()
|
|
100
|
+
expect(silenced(() => sync({}, dir))).toBe(0)
|
|
101
|
+
expect(snapshotDir()).toEqual(before)
|
|
102
|
+
expect(silenced(() => sync({ check: true }, dir))).toBe(0)
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
it('a locally-edited managed file is never clobbered: skipped by sync, --check exits 1', () => {
|
|
106
|
+
silenced(() => init(dir))
|
|
107
|
+
write('.claude/rules/basalt-tokens.md', '# my local law\n')
|
|
108
|
+
expect(silenced(() => sync({}, dir))).toBe(0)
|
|
109
|
+
expect(read('.claude/rules/basalt-tokens.md')).toBe('# my local law\n')
|
|
110
|
+
expect(silenced(() => sync({ check: true }, dir))).toBe(1)
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
it('--force overwrites a drifted managed file but never touches a seed', () => {
|
|
114
|
+
silenced(() => init(dir))
|
|
115
|
+
write('.claude/rules/basalt-tokens.md', '# my local law\n')
|
|
116
|
+
write('.claude/skills/basalt-design/SKILL.md', '# my local skill\n')
|
|
117
|
+
write('DESIGN.md', '# my design\n')
|
|
118
|
+
write('lefthook.yml', 'pre-commit:\n commands: {}\n')
|
|
119
|
+
silenced(() => sync({ force: true }, dir))
|
|
120
|
+
expect(read('.claude/rules/basalt-tokens.md')).toBe(SHIPPED_RULE)
|
|
121
|
+
expect(read('.claude/skills/basalt-design/SKILL.md')).toBe(SHIPPED_SKILL)
|
|
122
|
+
expect(read('DESIGN.md')).toBe('# my design\n')
|
|
123
|
+
expect(read('lefthook.yml')).toBe('pre-commit:\n commands: {}\n')
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
it('a seed is recreated only when missing; an edited seed never drifts --check', () => {
|
|
127
|
+
silenced(() => init(dir))
|
|
128
|
+
rmSync(join(dir, 'DESIGN.md'))
|
|
129
|
+
silenced(() => sync({}, dir))
|
|
130
|
+
expect(existsSync(join(dir, 'DESIGN.md'))).toBe(true)
|
|
131
|
+
write('DESIGN.md', '# my design\n')
|
|
132
|
+
silenced(() => sync({}, dir))
|
|
133
|
+
expect(read('DESIGN.md')).toBe('# my design\n')
|
|
134
|
+
expect(silenced(() => sync({ check: true }, dir))).toBe(0)
|
|
135
|
+
})
|
|
136
|
+
|
|
137
|
+
it('a pre-existing consumer file at a managed dest is kept by init, then treated as drift', () => {
|
|
138
|
+
write('.claude/rules/basalt-tokens.md', '# predates basalt\n')
|
|
139
|
+
silenced(() => init(dir))
|
|
140
|
+
expect(read('.claude/rules/basalt-tokens.md')).toBe('# predates basalt\n')
|
|
141
|
+
expect(silenced(() => sync({ check: true }, dir))).toBe(1)
|
|
142
|
+
silenced(() => sync({ force: true }, dir))
|
|
143
|
+
expect(read('.claude/rules/basalt-tokens.md')).toBe(SHIPPED_RULE)
|
|
144
|
+
})
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
describe('block splicing (managed with markers)', () => {
|
|
148
|
+
it('appends the block when markers are absent, preserving existing host content', () => {
|
|
149
|
+
write('CLAUDE.md', '# fixture app\n\nMy own instructions.\n')
|
|
150
|
+
silenced(() => init(dir))
|
|
151
|
+
const host = read('CLAUDE.md')
|
|
152
|
+
expect(host.startsWith('# fixture app\n\nMy own instructions.')).toBe(true)
|
|
153
|
+
expect(host).toContain('<!-- basalt:begin')
|
|
154
|
+
expect(host).toContain('<!-- basalt:end -->')
|
|
155
|
+
})
|
|
156
|
+
|
|
157
|
+
it('replaces only the marked region on sync, preserving content before and after', () => {
|
|
158
|
+
silenced(() => init(dir))
|
|
159
|
+
// A stale region from an older basalt-ui, embedded in consumer-owned host content.
|
|
160
|
+
write(
|
|
161
|
+
'CLAUDE.md',
|
|
162
|
+
'# above\n\n<!-- basalt:begin 0.9.9 -->\nstale body\n<!-- basalt:end -->\n\n# below\n',
|
|
163
|
+
)
|
|
164
|
+
silenced(() => sync({ force: true }, dir))
|
|
165
|
+
const after = read('CLAUDE.md')
|
|
166
|
+
expect(after.startsWith('# above\n')).toBe(true)
|
|
167
|
+
expect(after.trimEnd().endsWith('# below')).toBe(true)
|
|
168
|
+
expect(after).not.toContain('stale body')
|
|
169
|
+
expect(after.match(/<!-- basalt:begin/g)?.length).toBe(1)
|
|
170
|
+
})
|
|
171
|
+
|
|
172
|
+
it('errors loudly on duplicate begin markers instead of silently picking one', () => {
|
|
173
|
+
silenced(() => init(dir))
|
|
174
|
+
const block = read('CLAUDE.md')
|
|
175
|
+
write('CLAUDE.md', `${block}\n\n${block}`)
|
|
176
|
+
expect(() => silenced(() => sync({}, dir))).toThrow(/duplicate/)
|
|
177
|
+
expect(() => silenced(() => sync({ check: true }, dir))).toThrow(/duplicate/)
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
|
|
181
|
+
describe('--check performs zero writes', () => {
|
|
182
|
+
it('leaves the filesystem byte-identical on a clean tree AND on a drifted tree', () => {
|
|
183
|
+
silenced(() => init(dir))
|
|
184
|
+
const clean = snapshotDir()
|
|
185
|
+
expect(silenced(() => sync({ check: true }, dir))).toBe(0)
|
|
186
|
+
expect(snapshotDir()).toEqual(clean)
|
|
187
|
+
|
|
188
|
+
write('.claude/rules/basalt-tokens.md', '# my local law\n')
|
|
189
|
+
rmSync(join(dir, 'DESIGN.md'))
|
|
190
|
+
const drifted = snapshotDir()
|
|
191
|
+
expect(silenced(() => sync({ check: true }, dir))).toBe(1)
|
|
192
|
+
expect(snapshotDir()).toEqual(drifted)
|
|
193
|
+
})
|
|
194
|
+
})
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fast tarball-parity approximation: every source path the CLI reads via readSource must exist on
|
|
3
|
+
* disk AND be covered by a package.json `files` entry — otherwise `init`/`sync` silently skip it
|
|
4
|
+
* for every npm consumer while working fine in this repo (exactly how the skills shipped outside
|
|
5
|
+
* the tarball at 1.0.0). The authoritative check against the real packed artifact runs in
|
|
6
|
+
* scripts/pack-test.sh (check-tarball-parity.mjs); this one runs on every `bun test`.
|
|
7
|
+
*/
|
|
8
|
+
import { describe, expect, it } from 'bun:test'
|
|
9
|
+
import { existsSync, readFileSync } from 'node:fs'
|
|
10
|
+
import { resolve } from 'node:path'
|
|
11
|
+
import { fileURLToPath } from 'node:url'
|
|
12
|
+
|
|
13
|
+
import { managedFiles } from './index.ts'
|
|
14
|
+
|
|
15
|
+
const PKG_ROOT = fileURLToPath(new URL('../../', import.meta.url))
|
|
16
|
+
const pkg = JSON.parse(readFileSync(resolve(PKG_ROOT, 'package.json'), 'utf8')) as {
|
|
17
|
+
files: string[]
|
|
18
|
+
bin: Record<string, string>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** True when `path` is matched by one of the `files` entries (dir prefix or exact file). */
|
|
22
|
+
function coveredByFilesField(path: string): boolean {
|
|
23
|
+
return pkg.files.some((entry) => {
|
|
24
|
+
const dir = entry.endsWith('/') ? entry : `${entry}/`
|
|
25
|
+
return path === entry || path.startsWith(dir)
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const sources = [...new Set(managedFiles({ hasRouter: true, hasQuery: true }).map((f) => f.source))]
|
|
30
|
+
|
|
31
|
+
describe('tarball parity (files-field approximation)', () => {
|
|
32
|
+
it.each(sources)('CLI-read source %s exists and is covered by the files field', (source) => {
|
|
33
|
+
expect(existsSync(resolve(PKG_ROOT, source))).toBe(true)
|
|
34
|
+
expect(coveredByFilesField(source)).toBe(true)
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
it('every bin entry points at a shipped file', () => {
|
|
38
|
+
for (const binPath of Object.values(pkg.bin)) {
|
|
39
|
+
const rel = binPath.replace(/^\.\//, '')
|
|
40
|
+
expect(existsSync(resolve(PKG_ROOT, rel))).toBe(true)
|
|
41
|
+
expect(coveredByFilesField(rel)).toBe(true)
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
})
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format-idempotency for every shipped template that lands in a consumer VERBATIM — the `managed`
|
|
3
|
+
* files (rules, skills, the marker-spliced CLAUDE block; see `./index.ts`'s `managedFiles()`).
|
|
4
|
+
* `seed` templates are excluded: they are a one-time starting point the consumer immediately owns
|
|
5
|
+
* and may reformat however they like, so their shipped formatting is not load-bearing.
|
|
6
|
+
*
|
|
7
|
+
* basalt-ui itself MANDATES oxfmt in the shipped lefthook/CI templates — so if a shipped `copy`/
|
|
8
|
+
* `block` template's bytes are not already oxfmt-clean, the first thing a consumer does (run
|
|
9
|
+
* `basalt sync`, or just commit) puts oxlint/oxfmt and `sync --check` in permanent disagreement:
|
|
10
|
+
* `basalt sync` writes the drifted bytes, the lefthook pre-commit hook's own `oxfmt --check`
|
|
11
|
+
* rejects the commit, running `oxfmt` to fix it re-drifts the file from what `sync --check`
|
|
12
|
+
* expects. This is exactly how `CLAUDE-block.md.tpl` shipped: no blank line after
|
|
13
|
+
* `<!-- basalt:begin -->`, which oxfmt's own block-HTML-comment rule then rewrites, re-triggering
|
|
14
|
+
* drift forever. Assert every copy/block template round-trips through the exact oxfmt binary +
|
|
15
|
+
* config basalt-ui ships, unchanged — this class of "basalt's own gates fighting each other" bug
|
|
16
|
+
* must not recur.
|
|
17
|
+
*/
|
|
18
|
+
import { spawnSync } from 'node:child_process'
|
|
19
|
+
import { readFileSync } from 'node:fs'
|
|
20
|
+
import { resolve } from 'node:path'
|
|
21
|
+
import { describe, expect, it } from 'bun:test'
|
|
22
|
+
|
|
23
|
+
import { RULE_NAMES, SKILL_NAMES } from './index'
|
|
24
|
+
|
|
25
|
+
const PKG_ROOT = resolve(import.meta.dir, '../..')
|
|
26
|
+
const REPO_ROOT = resolve(PKG_ROOT, '../..')
|
|
27
|
+
const OXFMT_BIN = resolve(REPO_ROOT, 'node_modules/.bin/oxfmt')
|
|
28
|
+
const OXFMT_CONFIG = resolve(PKG_ROOT, 'configs/oxfmt.json')
|
|
29
|
+
|
|
30
|
+
/** Format `content` through the exact oxfmt binary + config basalt-ui ships; assert it is a no-op. */
|
|
31
|
+
function expectOxfmtNoop(fileName: string, content: string): void {
|
|
32
|
+
const result = spawnSync(OXFMT_BIN, ['--stdin-filepath', fileName, '-c', OXFMT_CONFIG], {
|
|
33
|
+
input: content,
|
|
34
|
+
encoding: 'utf8',
|
|
35
|
+
})
|
|
36
|
+
expect(result.status).toBe(0)
|
|
37
|
+
expect(result.stdout).toBe(content)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
describe('shipped managed templates are oxfmt-clean', () => {
|
|
41
|
+
it('CLAUDE-block.md.tpl (managed, marker-spliced) round-trips unchanged with placeholders filled', () => {
|
|
42
|
+
const tpl = readFileSync(resolve(PKG_ROOT, 'agent/templates/CLAUDE-block.md.tpl'), 'utf8')
|
|
43
|
+
const filled = tpl
|
|
44
|
+
.replace(/\{\{BASALT_VERSION\}\}/g, '1.0.0')
|
|
45
|
+
.replace(/\{\{APP_NAME\}\}/g, 'app')
|
|
46
|
+
expectOxfmtNoop('CLAUDE.md', filled)
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
it.each(RULE_NAMES)('agent/rules/basalt-%s.md (managed) round-trips unchanged', (name) => {
|
|
50
|
+
const content = readFileSync(resolve(PKG_ROOT, `agent/rules/basalt-${name}.md`), 'utf8')
|
|
51
|
+
expectOxfmtNoop(`basalt-${name}.md`, content)
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
it.each(SKILL_NAMES)('agent/skills/%s/SKILL.md (managed) round-trips unchanged', (name) => {
|
|
55
|
+
const content = readFileSync(resolve(PKG_ROOT, `agent/skills/${name}/SKILL.md`), 'utf8')
|
|
56
|
+
expectOxfmtNoop('SKILL.md', content)
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
it('configs/oxfmt.json (seeded verbatim as .oxfmtrc.json) round-trips unchanged', () => {
|
|
60
|
+
// A seed, but its bytes land verbatim and oxfmt itself reads the result — keep it clean too.
|
|
61
|
+
const content = readFileSync(resolve(PKG_ROOT, 'configs/oxfmt.json'), 'utf8')
|
|
62
|
+
expectOxfmtNoop('.oxfmtrc.json', content)
|
|
63
|
+
})
|
|
64
|
+
})
|
package/src/surfaces.ts
CHANGED
|
@@ -29,7 +29,8 @@ export type RuleName =
|
|
|
29
29
|
| 'agent'
|
|
30
30
|
| 'content'
|
|
31
31
|
|
|
32
|
-
/** The 3
|
|
32
|
+
/** The 3 shipped skill names (agent/skills/basalt-{name}/SKILL.md, placed into a consumer's
|
|
33
|
+
* .claude/skills/ by `basalt-ui init`/`sync` — the same managed path the rules take).
|
|
33
34
|
*
|
|
34
35
|
* @example
|
|
35
36
|
* const s: SkillName = 'basalt-app'
|
|
@@ -487,3 +488,21 @@ export const RULE_NAMES = [
|
|
|
487
488
|
.map((s) => s.rule),
|
|
488
489
|
),
|
|
489
490
|
] as const satisfies readonly RuleName[]
|
|
491
|
+
|
|
492
|
+
// ── PROJECTION 1b — SKILL_NAMES ───────────────────────────────────────────────────────────────────
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Derived, deduped set of doctrine skill names. Same projection shape as RULE_NAMES — the CLI's
|
|
496
|
+
* managed-file manifest and check-coverage both consume it, so a skill referenced by any doctrine
|
|
497
|
+
* surface is guaranteed a `agent/skills/{name}/SKILL.md` placement path.
|
|
498
|
+
*
|
|
499
|
+
* @example
|
|
500
|
+
* SKILL_NAMES.includes('basalt-design') // true
|
|
501
|
+
*/
|
|
502
|
+
export const SKILL_NAMES = [
|
|
503
|
+
...new Set(
|
|
504
|
+
(Object.values(SURFACES) as readonly SurfaceSpec[])
|
|
505
|
+
.filter((s): s is DoctrineSpec => s.kind === 'doctrine')
|
|
506
|
+
.flatMap((s) => [...s.skill]),
|
|
507
|
+
),
|
|
508
|
+
] as const satisfies readonly SkillName[]
|
package/src/tokens/index.ts
CHANGED
|
@@ -11,6 +11,12 @@
|
|
|
11
11
|
|
|
12
12
|
import { ACCENT, FILL, INK, NEUTRAL, SEMANTIC, SHADOW, STATUS, SURFACE } from './palette'
|
|
13
13
|
|
|
14
|
+
// The raw hue families + pair-picker — the building blocks a consumer's series module composes
|
|
15
|
+
// (`hrv: p(BP.blue)`). The doctrine sends every consumer here, so they are public surface, not
|
|
16
|
+
// palette internals; dropping them from this barrel hard-fails the consumer's build (1.0.0 bug,
|
|
17
|
+
// pinned by scripts/export-surface.json).
|
|
18
|
+
export { BP, p } from './palette'
|
|
19
|
+
|
|
14
20
|
/** A per-theme color pair: a hue keeps its identity but shifts shade across schemes. */
|
|
15
21
|
export type ColorPair = { light: string; dark: string }
|
|
16
22
|
|
|
File without changes
|