@estiva-app/ui 0.22.0 → 0.23.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/README.md +21 -0
- package/dist/Banner.d.ts +20 -2
- package/dist/Banner.d.ts.map +1 -1
- package/dist/ContainerHeader.d.ts +25 -0
- package/dist/ContainerHeader.d.ts.map +1 -0
- package/dist/EmptyState.d.ts +10 -1
- package/dist/EmptyState.d.ts.map +1 -1
- package/dist/gates/app-checks.d.ts.map +1 -1
- package/dist/gates/{chunk-ZGJ2J5NU.js → chunk-EA33NP5B.js} +275 -11
- package/dist/gates/chunk-EA33NP5B.js.map +7 -0
- package/dist/gates/{chunk-AUXD4GCY.js → chunk-GTQZEHPC.js} +15 -1
- package/dist/gates/chunk-GTQZEHPC.js.map +7 -0
- package/dist/gates/cli.js +1 -1
- package/dist/gates/create-app.d.ts +2 -0
- package/dist/gates/create-app.d.ts.map +1 -1
- package/dist/gates/create-app.js +1 -1
- package/dist/gates/index.js +25 -3
- package/dist/gates/index.js.map +2 -2
- package/dist/gates/status.d.ts +2 -0
- package/dist/gates/status.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +69 -48
- package/dist/index.js.map +4 -4
- package/dist/registry/app-DQI6WLHR.js +10 -0
- package/dist/registry/app.d.ts +21 -0
- package/dist/registry/app.d.ts.map +1 -0
- package/dist/registry/build-LGFCCOLR.js +27 -0
- package/dist/registry/build-LGFCCOLR.js.map +7 -0
- package/dist/registry/build.d.ts +68 -2
- package/dist/registry/build.d.ts.map +1 -1
- package/dist/registry/{chunk-MRSBS5OP.js → chunk-E4JNV7PC.js} +68 -12
- package/dist/registry/chunk-E4JNV7PC.js.map +7 -0
- package/dist/registry/{chunk-QDYGB3QN.js → chunk-NJN4MQAM.js} +60 -15
- package/dist/registry/chunk-NJN4MQAM.js.map +7 -0
- package/dist/registry/{chunk-IJNCYVH4.js → chunk-W2B2G7OE.js} +34 -9
- package/dist/registry/chunk-W2B2G7OE.js.map +7 -0
- package/dist/registry/chunk-WMFF3MPP.js +648 -0
- package/dist/registry/chunk-WMFF3MPP.js.map +7 -0
- package/dist/registry/cli.js +81 -26
- package/dist/registry/cli.js.map +3 -3
- package/dist/registry/find.d.ts +12 -1
- package/dist/registry/find.d.ts.map +1 -1
- package/dist/registry/index.d.ts +5 -2
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +11 -3
- package/dist/registry/schema.d.ts +83 -6
- package/dist/registry/schema.d.ts.map +1 -1
- package/package.json +2 -2
- package/registry.json +233 -88
- package/src/Banner.mdx +17 -4
- package/src/Banner.stories.tsx +22 -0
- package/src/Banner.test.tsx +35 -0
- package/src/Banner.tsx +34 -9
- package/src/ContainerHeader.mdx +56 -0
- package/src/ContainerHeader.stories.tsx +62 -0
- package/src/ContainerHeader.test.tsx +47 -0
- package/src/ContainerHeader.tsx +45 -0
- package/src/EmptyState.mdx +12 -0
- package/src/EmptyState.stories.tsx +6 -1
- package/src/EmptyState.test.tsx +18 -1
- package/src/EmptyState.tsx +14 -1
- package/src/gates/app-checks.ts +23 -1
- package/src/gates/create-app.test.ts +77 -6
- package/src/gates/create-app.ts +288 -15
- package/src/gates/status.ts +16 -0
- package/src/index.ts +1 -0
- package/src/registry/app.test.ts +562 -0
- package/src/registry/app.ts +854 -0
- package/src/registry/build.ts +114 -25
- package/src/registry/cli.ts +105 -42
- package/src/registry/find.ts +45 -8
- package/src/registry/index.ts +8 -1
- package/src/registry/registry.test.ts +5 -5
- package/src/registry/schema.ts +163 -12
- package/dist/gates/chunk-AUXD4GCY.js.map +0 -7
- package/dist/gates/chunk-ZGJ2J5NU.js.map +0 -7
- package/dist/registry/build-GOVLABI6.js +0 -13
- package/dist/registry/chunk-IJNCYVH4.js.map +0 -7
- package/dist/registry/chunk-MRSBS5OP.js.map +0 -7
- package/dist/registry/chunk-QDYGB3QN.js.map +0 -7
- /package/dist/registry/{build-GOVLABI6.js.map → app-DQI6WLHR.js.map} +0 -0
package/dist/gates/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/gates/token-lint.ts", "../../src/gates/gate-config.ts", "../../src/gates/app-checks.ts"],
|
|
4
|
-
"sourcesContent": ["/// <reference types=\"node\" />\n/**\n * The token contract as lint settings, written once (docs/GATES.md \u00A723).\n *\n * Until UIG-10 this block was pasted into every repo: `eslint.config.js` here,\n * `eslint.tokens.js` in Peek, `eslint.config.js` in Ship. Katerina ruled on 17 September that a\n * gate piece ships in the package and an app imports it, so this is that one\n * copy. Peek and Ship move onto it in UIG-32.\n *\n * Two configs, as the copies had:\n *\n * - `tokenLint` \u2014 a class Tailwind does not generate (the doubled token name,\n * `bg-bg-surface`), Tailwind's own type ramp or palette, a raw colour, an\n * opacity modifier on a token colour.\n * - `tokenValues` \u2014 UIG-28: type, corners and shadows written by hand, and an\n * inline style that sets a colour (errors); heights, spacing and border\n * widths written by hand (warnings, never blocking).\n *\n * The patterns are the same for everyone. Only the words differ: an app is told\n * to use \"the package\", the package is told to add the token to `tokens.css`.\n * Measured on 17 September: the UIG-28 block was byte for byte the same in Peek\n * and Ship, and this repository's had the same patterns with seven messages\n * worded for the package.\n *\n * Where the plugin looks: every `className`, every `cn()` / `clsx()` argument,\n * and the values of a class map whose name ends in `Styles` / `_STYLES` or\n * `Classes` / `_CLASSES`. A class map named any other way is invisible to it.\n *\n * Tests are out of `tokenValues` (ruling of 13 September): a test mounts markup\n * to test it. A kept hand-written value says why:\n * `// eslint-disable-next-line <rule> -- @estiva-escape: <reason>` (A2).\n */\nimport { createRequire } from 'node:module'\nimport { fileURLToPath } from 'node:url'\nimport type { Linter } from 'eslint'\nimport betterTailwindcss from 'eslint-plugin-better-tailwindcss'\nimport { getDefaultSelectors } from 'eslint-plugin-better-tailwindcss/defaults'\nimport { parser as typescriptParser } from 'typescript-eslint'\n\n/** Who reads the messages. */\nexport type TokenAudience = 'app' | 'package'\n\nexport interface TokenLintOptions {\n /** The Tailwind config the unknown-class rule reads, relative to where ESLint runs. */\n tailwindConfig?: string\n /** `app` (the default) names the package; `package` names `tokens.css` and the preset. */\n audience?: TokenAudience\n}\n\n/** What the token lint never reads: build output. */\nexport const TOKEN_LINT_IGNORES = ['dist/', 'storybook-static/', 'node_modules/']\n\nconst CLASS_MAP_SELECTOR = {\n kind: 'variable',\n name: '^(?:[A-Z][A-Z0-9_]*_(?:STYLES|CLASSES)|[a-z][a-zA-Z0-9]*(?:Styles|Classes))$',\n match: [{ type: 'strings' }, { type: 'objectValues' }],\n}\n\nconst WORDS = {\n app: {\n ramp: \"Tailwind's type ramp is not a token. Use the ramp from the package: text-body-2, text-caption, text-h3, text-btn-default...\",\n palette: \"Tailwind's palette is not a token. Use a colour from the package (bg-bg-surface, text-text-primary, border-border-subtle...); a colour with no token is a missing token.\",\n raw: 'A raw colour is a missing token: add it to the package (tokens.css in every theme block, and the preset), or say why not in an eslint-disable comment.',\n opacity: 'An opacity modifier on a token colour compiles to nothing. A transparent colour is a token of its own (D16): add it to the package.',\n type: '$0 is type written by hand. A token from the package sets the size, line height, letter spacing and weight together (text-body-2, text-caption, text-h5...); if none fits, add one to the package, or say why not in an eslint-disable comment.',\n corner: '$0 is a corner written by hand, and no token has it. Use a corner from the package (rounded-sm 4px, rounded-md 6px, rounded-lg 8px...), or say why not in an eslint-disable comment.',\n shadow: '$0 is a shadow written by hand. Use a shadow from the package (shadow-sm, shadow-md, shadow-focus-ring, drop-shadow-glow-success...); a shadow with no token is a missing token.',\n },\n package: {\n ramp: \"Tailwind's type ramp is not a token. Use the ramp in tailwind-preset.js: text-body-2, text-caption, text-h3, text-btn-default...\",\n palette: \"Tailwind's palette is not a token. Use a colour from tailwind-preset.js (bg-bg-surface, text-text-primary, border-border-subtle...); a colour with no token is a missing token.\",\n raw: 'A raw colour is a missing token: add it to tokens.css in every theme block and to the preset, or say why not in an eslint-disable comment.',\n opacity: 'An opacity modifier on a token colour compiles to nothing. A transparent colour is a token of its own (D16): add it to tokens.css in every theme block and to the preset.',\n type: '$0 is type written by hand. A token from tailwind-preset.js sets the size, line height, letter spacing and weight together (text-body-2, text-caption, text-h5...); if none fits, add one to the preset and to cn.ts, or say why not in an eslint-disable comment.',\n corner: '$0 is a corner written by hand, and no token has it. Use a corner from tailwind-preset.js (rounded-sm 4px, rounded-md 6px, rounded-lg 8px...), or say why not in an eslint-disable comment.',\n shadow: '$0 is a shadow written by hand. Use a shadow from tailwind-preset.js (shadow-sm, shadow-md, shadow-focus-ring, drop-shadow-glow-success...); a shadow with no token is a missing token.',\n },\n} satisfies Record<TokenAudience, Record<string, string>>\n\n/**\n * The class rules. `no-unknown-classes` reads the app's own Tailwind config, so\n * it knows exactly what the preset and the app generate.\n */\nexport function tokenLint({ tailwindConfig = 'tailwind.config.js', audience = 'app' }: TokenLintOptions = {}): Linter.Config {\n const words = WORDS[audience]\n return {\n files: ['**/*.{ts,tsx}'],\n languageOptions: {\n parser: typescriptParser,\n parserOptions: { ecmaFeatures: { jsx: true } },\n },\n plugins: { 'better-tailwindcss': betterTailwindcss },\n settings: {\n 'better-tailwindcss': {\n tailwindConfig,\n selectors: [...getDefaultSelectors(), CLASS_MAP_SELECTOR],\n },\n },\n rules: {\n 'better-tailwindcss/no-unknown-classes': 'error',\n 'better-tailwindcss/no-restricted-classes': [\n 'error',\n {\n restrict: [\n { pattern: '^(?:[a-z0-9-]+:)*text-(?:xs|sm|base|lg|xl|[2-9]xl)$', message: words.ramp },\n {\n pattern:\n '^(?:[a-z0-9-]+:)*(?:text|bg|border|ring|outline|fill|stroke|decoration|divide|placeholder|from|via|to|accent|caret|shadow)-(?:black|white|slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)(?:-[0-9]{2,3})?(?:/[0-9]{1,3})?$',\n message: words.palette,\n },\n { pattern: '^(?:[a-z0-9-]+:)*[a-z-]+-\\\\[[^\\\\]]*(?:#[0-9a-fA-F]{3}|rgba?\\\\(|hsla?\\\\(|oklch\\\\()', message: words.raw },\n {\n pattern: '^(?:[a-z0-9-]+:)*(?:text|bg|border|ring|outline|fill|stroke|decoration|divide|placeholder|from|via|to|accent|caret|shadow)-(?:bg|text|border|accent|info|warning|success|error)-[a-z-]+/[0-9]{1,3}$',\n message: words.opacity,\n },\n ],\n },\n ],\n },\n }\n}\n\n// UIG-28's patterns. The variant part reads arbitrary variants too\n// (`[&_pre]:`, `data-[state]:`, `group-hover/row:`). A colour inside `text-[\u2026]`\n// is left to the raw-colour rule of `tokenLint`.\nconst V = '^(?:(?:[^:\\\\[\\\\]\\\\s]|\\\\[[^\\\\]]*\\\\])+:)*!?'\nconst NOT_COLOUR = '(?!color:|#|rgba?\\\\(|hsla?\\\\(|oklch\\\\(|var\\\\()'\nconst HAND_WRITTEN = {\n type: `${V}(?:text-\\\\[${NOT_COLOUR}|text-\\\\[length:|leading-\\\\[|tracking-\\\\[)[^\\\\]]+\\\\](?:/\\\\S*)?$`,\n corner: `${V}rounded(?:-(?:t|r|b|l|s|e|tl|tr|br|bl|ss|se|es|ee))?-\\\\[[^\\\\]]+\\\\]$`,\n shadow: `${V}(?:shadow|drop-shadow)-\\\\[(?!color:)[^\\\\]]+\\\\]$`,\n spacing: `${V}-?(?:w|h|size|min-w|min-h|max-w|max-h|p[xytrblse]?|m[xytrblse]?|gap(?:-[xy])?|space-[xy]|inset(?:-[xy])?|top|right|bottom|left|translate-[xy]|basis|indent|scroll-[mp][xytrblse]?|border-spacing(?:-[xy])?)-\\\\[[^\\\\]]+\\\\]$`,\n width: `${V}(?:border(?:-[xytrblse])?|divide-[xy]|outline|ring|ring-offset)-\\\\[(?:length:)?-?[0-9.]+(?:px|rem|em)?\\\\]$`,\n}\n\nconst INLINE_STYLE_TOKEN_PROPERTIES =\n '/^(color|background|backgroundColor|backgroundImage|fill|stroke|fontSize|border|borderTop|borderRight|borderBottom|borderLeft|borderBlock|borderInline|borderStyle|boxShadow|textShadow)$|Color$/'\n\ninterface Preset {\n theme: { extend: { fontSize: Record<string, string | [string, unknown]>; borderRadius: Record<string, string> } }\n}\n\n/**\n * The preset, loaded the way Tailwind loads it: it imports `tailwindcss/plugin`,\n * which a plain `import` cannot resolve. Read from beside this module, so an app\n * and this repository read the one preset the package ships.\n */\nfunction loadPreset(): Preset {\n const require = createRequire(import.meta.url)\n const loadConfig = require('tailwindcss/loadConfig') as (path: string) => Preset\n return loadConfig(fileURLToPath(new URL('../../tailwind-preset.js', import.meta.url)))\n}\n\n/**\n * UIG-28: the values the tokens already name, written by hand (Katerina's\n * rulings B11, B12, C3 of 13 September and R2 of 15 September). Register it\n * after `tokenLint`, whose parser and plugin settings it borrows. Under its own\n * rule names, `token-values` and `token-spacing` (the same plugin twice, so one\n * runs as errors and one as warnings): an escape for a hand-written size then\n * cannot also silence a raw colour on the same line.\n */\nexport function tokenValues({ audience = 'app' }: Pick<TokenLintOptions, 'audience'> = {}): Linter.Config {\n const words = WORDS[audience]\n const preset = loadPreset()\n // `text-[14px]` names the token of that size, read from the preset, so the\n // message stays true when the ramp changes.\n const tokensBySize: Record<string, string[]> = {}\n for (const [name, value] of Object.entries(preset.theme.extend.fontSize)) {\n const size = Array.isArray(value) ? value[0] : value\n ;(tokensBySize[size] ??= []).push(`text-${name}`)\n }\n const cornersBySize: Record<string, string[]> = {}\n for (const [name, size] of Object.entries(preset.theme.extend.borderRadius)) (cornersBySize[size] ??= []).push(name === 'DEFAULT' ? 'rounded' : `rounded-${name}`)\n\n return {\n files: ['**/*.{ts,tsx}'],\n ignores: ['**/*.test.ts', '**/*.test.tsx'],\n plugins: { 'token-values': betterTailwindcss, 'token-spacing': betterTailwindcss },\n rules: {\n 'token-values/no-restricted-classes': [\n 'error',\n {\n restrict: [\n ...Object.entries(tokensBySize).map(([size, names]) => ({\n pattern: `${V}text-\\\\[${size.replace('.', '\\\\.')}\\\\](?:/\\\\S*)?$`,\n message: `$0 is the type ramp written by hand. Use ${names.join(' or ')}.`,\n })),\n {\n pattern: HAND_WRITTEN.type,\n message: words.type,\n },\n ...Object.entries(cornersBySize).map(([size, names]) => ({\n pattern: `${V}rounded(?:-(?:t|r|b|l|s|e|tl|tr|br|bl|ss|se|es|ee))?-\\\\[${size.replace('.', '\\\\.')}\\\\]$`,\n message: `$0 is a corner written by hand. Use ${names.join(' or ')} (with the same side, if it has one).`,\n })),\n {\n pattern: HAND_WRITTEN.corner,\n message: words.corner,\n },\n {\n pattern: HAND_WRITTEN.shadow,\n message: words.shadow,\n },\n ],\n },\n ],\n 'token-spacing/no-restricted-classes': [\n 'warn',\n {\n restrict: [\n {\n pattern: HAND_WRITTEN.spacing,\n message: '$0 is a size or a space written by hand. Use a step of the spacing scale (p-3, h-9, gap-2...) if one fits. Reported, not blocked.',\n },\n {\n pattern: HAND_WRITTEN.width,\n message: '$0 is a border or ring width written by hand. Use border, border-2, ring-1... if one fits. Reported, not blocked.',\n },\n ],\n },\n ],\n 'no-restricted-syntax': [\n 'error',\n {\n selector: `JSXAttribute[name.name=\"style\"] > JSXExpressionContainer > ObjectExpression > Property[key.name=${INLINE_STYLE_TOKEN_PROPERTIES}]`,\n message: 'An inline style that sets a colour, a font size, a border or a shadow is outside the token contract: use a token class. If the value is computed (a palette, a size from a prop), say why in an eslint-disable comment. Width, height and transforms are fine.',\n },\n ],\n },\n }\n}\n", "/// <reference types=\"node\" />\n/**\n * Where the UI Guardrails' rules apply, written once (docs/GATES.md \u00A723).\n *\n * Until UIG-10 every repo wrote this itself: `eslint.gates.js` (the rules and\n * where they apply) and `eslint.gates.config.js` (the gate: those rules alone)\n * in Peek, in Ship's `web/`, and here pointed inward. The rules were always the\n * package's; these two files were copies. Now they are two functions.\n *\n * Where: every `.ts` and `.tsx` under `src`, stories included (a story is what\n * people read and copy), tests not (a test mounts markup to test it) \u2014\n * Katerina's rulings of 13 September; `.ts` since UIG-8. This package's own\n * inward set reads `.tsx` only, as it always has.\n *\n * A place that keeps something says why, on the line above:\n * `// @estiva-escape: <reason>`, or `{/* @estiva-escape: <reason> *\\/}` as a\n * JSX child. Never `eslint-disable`: the count refuses it.\n */\nimport type { ESLint, Linter } from 'eslint'\nimport betterTailwindcss from 'eslint-plugin-better-tailwindcss'\nimport { parser as typescriptParser } from 'typescript-eslint'\nimport estiva from '../eslint/index'\nimport { TOKEN_LINT_IGNORES } from './token-lint'\n\nexport interface GateConfigOptions {\n /** `app` (the default) runs `configs.recommended`; `package` runs this package's inward set. */\n audience?: 'app' | 'package'\n /**\n * Plugins whose `eslint-disable` directives appear in the source, registered\n * here with every rule off. ESLint refuses a directive for a rule it does not\n * know, so without them the gate would fail on another lint's comments.\n * The token lint's names are registered already.\n */\n quiet?: Record<string, ESLint.Plugin>\n /** Folders the gate never reads, beside build output. */\n ignores?: string[]\n}\n\n/**\n * The rules and where they apply \u2014 one config object, to add beside\n * everything else an app's `eslint.config.js` runs, so an editor shows a\n * refusal where the element is typed.\n */\nexport function gateLint({ audience = 'app' }: Pick<GateConfigOptions, 'audience'> = {}): Linter.Config {\n return {\n ...(audience === 'package' ? estiva.configs.package : estiva.configs.recommended),\n files: audience === 'package' ? ['src/**/*.tsx'] : ['src/**/*.{ts,tsx}'],\n ignores: ['**/*.test.ts', '**/*.test.tsx'],\n languageOptions: {\n parser: typescriptParser,\n parserOptions: { ecmaFeatures: { jsx: true } },\n },\n }\n}\n\n/**\n * The gate: the rules on their own \u2014 `npm run lint:rules`, CI's job `gate`, and\n * the config the editor hook lints a proposed write with. It fails on a gate\n * rule and on nothing else, so a backlog in the full lint never blocks it.\n */\nexport function gateConfig({ audience = 'app', quiet = {}, ignores = [] }: GateConfigOptions = {}): Linter.Config[] {\n return [\n { ignores: [...TOKEN_LINT_IGNORES, ...ignores] },\n {\n plugins: {\n ...quiet,\n 'better-tailwindcss': betterTailwindcss,\n 'token-values': betterTailwindcss,\n 'token-spacing': betterTailwindcss,\n },\n // Every other config's directives are unused here, because their rules are\n // off here. Reporting them would be this config complaining about the\n // others' business.\n linterOptions: { reportUnusedDisableDirectives: 'off' },\n },\n gateLint({ audience }),\n ]\n}\n", "/// <reference types=\"node\" />\n/**\n * The gate checks every app runs, written once (docs/GATES.md \u00A723).\n *\n * Until UIG-10 Peek and Ship each wrote them into their own\n * `scripts/gates-checks.mjs`. 65 different checks for finished tickets, counted\n * on 17 September: 28 were identical in both, 21 were the same check written two\n * ways, 2 read each app's real page, and 14 read code only one app has. This is\n * the first three groups as one list. The fourth stays in the app's own checks\n * file, beside this list.\n *\n * Where Peek and Ship wrote one check two ways, the check here runs both, so it\n * passes wherever either did: the raw-link probe with both of their texts, the\n * token probes against each token config the app has.\n *\n * `scripts/gates-compare.mjs` holds this list to Peek's and Ship's: every check\n * of theirs must be here, or be about code only that app has, or the comparison\n * fails and names it.\n *\n * A check for a ticket not built yet is a first guess at the evidence, taken\n * from the ticket's own text; the ticket that builds it changes it here.\n */\nimport type { CheckResult, GateCheck, GateHelpers, GateTicket } from './status'\n\nexport interface AppCheckOptions {\n /** Where the app is inside the repository: `web` in Ship, `.` elsewhere. */\n app?: string\n /** A real page of the app, relative to the app, full of elements that are not controls. */\n page: string\n /** The ticket the gate chain is listed under, and whether this repo owns it: UIG-3 in Peek, UIG-4 in Ship. */\n chain?: { ref: string; owner: boolean }\n /** The token lint configs the app has, relative to the app. */\n tokenConfigs?: string[]\n /** The name of the app's header component a hand-made header row should name (UIG-22's first guess). */\n headers?: string[]\n}\n\nexport const APP_TICKET_TITLES: Record<string, string> = {\n 'UIG-2': 'The tracking rails \u2014 GATES.md, the status script, the guide committed',\n 'UIG-3': 'Tracer bullet \u2014 one rule, end to end, blocking in Peek',\n 'UIG-4': 'The same chain, blocking in Ship',\n 'UIG-6': 'Branch protection \u2014 the backstop, all three repos',\n 'UIG-7': 'Lint rule \u2014 every remaining raw element',\n 'UIG-8': 'Lint rule \u2014 forbid the reach',\n 'UIG-9': 'Lint rule \u2014 the className allow-list',\n 'UIG-13': \"The registry widens to Peek's 115 and Ship's 74, with classification\",\n 'UIG-19': 'Lock the contract in CI, and make the three Storybooks one search',\n 'UIG-20': 'The Claude skill, reading the registry',\n 'UIG-21': 'CLAUDE.md becomes an index, not a lecture',\n 'UIG-22': 'Fingerprint \u2014 a hand-made header row',\n 'UIG-23': 'Fingerprint \u2014 a hand-made empty state',\n 'UIG-24': 'Fingerprint \u2014 a browser tooltip where ours belongs',\n 'UIG-25': 'Fingerprint \u2014 a component copied out by hand',\n 'UIG-27': 'The components the apps had to build themselves \u2014 Link, ProgressBar, EmptyState padding',\n 'UIG-28': 'Close the two holes in the token contract \u2014 arbitrary values, and inline style',\n 'UIG-30': 'RichText \u2014 one component that draws a message\\'s text, for both apps',\n 'UIG-32': 'Peek and Ship take their gate pieces from the package',\n}\n\n/** Run several checks as one: the first that does not pass is the answer. */\nfunction all(h: GateHelpers, steps: (() => CheckResult | Promise<CheckResult>)[], label: string): () => Promise<CheckResult> {\n return async () => {\n for (const step of steps) {\n const r = await step()\n if (r.result !== 'pass') return r\n }\n return h.PASS(label)\n }\n}\n\nexport function appChecks(h: GateHelpers, { app = '.', page, chain = { ref: 'UIG-3', owner: false }, tokenConfigs = ['eslint.tokens.config.js', 'eslint.config.js'], headers = ['ContainerHeader', 'SectionHeader'] }: AppCheckOptions): GateTicket[] {\n const WEB = app === '.' ? '' : `${app.replace(/\\/$/, '')}/`\n const cwd = app === '.' ? undefined : app\n const PROBE = 'src/components/__gates_probe__.tsx'\n const GATES = 'eslint.gates.config.js'\n const at = (rel: string) => `${WEB}${rel}`\n const probe = (code: string, expect: 'error' | 'warning' | 'none', mentions?: string, file = PROBE, config = GATES) => () =>\n h.lint({ ...(cwd ? { cwd } : {}), config, file, code, expect, mentions })\n const component = (body: string) => `export function Probe() {\\n return ${body}\\n}\\n`\n const installed = at('node_modules/@estiva-app/ui/dist/index.d.ts')\n const realPage = (): Promise<CheckResult> => h.lint({ ...(cwd ? { cwd } : {}), config: GATES, file: page, code: h.read(at(page)), expect: 'none' })\n const button = component('<button type=\"button\">x</button>')\n const ticket = (ref: string, checks: GateCheck[], owner = false): GateTicket => ({ ref, title: APP_TICKET_TITLES[ref], owner, checks })\n\n const tokenProbe = (code: string, expect: 'error' | 'warning' | 'none', mentions?: string, file = PROBE) =>\n all(h, tokenConfigs.map((config) => probe(code, expect, mentions, file, config)), `${tokenConfigs.join(' and ')}: as expected`)\n\n return [\n ticket('UIG-2', [\n { what: 'npm run gates:status is wired', run: () => h.script('package.json', 'gates:status') },\n ]),\n ticket(chain.ref, [\n { what: 'the gate lint config loads', run: () => h.loads(at(GATES)) },\n { what: `${at('package.json')} has lint:rules`, run: () => h.script(at('package.json'), 'lint:rules') },\n { what: 'CI runs lint:rules', run: () => h.ci('lint:rules') },\n { what: 'the committed hook runs the gate lint', run: () => h.hook('.claude/settings.json', 'gates') },\n { what: '.gates-count.json is committed and parses', run: () => h.json(h.exists('.gates-count.json') ? '.gates-count.json' : at('.gates-count.json')) },\n { what: 'a raw <button> is an error naming Button', run: probe(button, 'error', 'Button') },\n { what: 'the same in a story', run: probe(button, 'error', 'Button', 'src/stories/__gates_probe__.stories.tsx') },\n { what: 'a test file is not checked, while source is', run: async () => {\n const source = await probe(button, 'error', 'Button')()\n if (source.result !== 'pass') return h.FAIL(`source is not checked yet, so this proves nothing: ${source.detail}`)\n return probe(button, 'none', undefined, 'src/components/__gates_probe__.test.tsx')()\n } },\n { what: 'the debt list exists', run: () => h.file('docs/GATES-DEBT.md') },\n ], chain.owner),\n ticket('UIG-6', [\n { what: 'GitHub requires the check gate to merge into main', run: () => h.protectedBranch(/^gate$/) },\n { what: \"CI's job gate runs lint:rules\", run: () => h.ciJob('gate', 'lint:rules') },\n ]),\n ticket('UIG-7', [\n { what: 'a raw <input> is an error naming TextInput', run: probe(component('<input />'), 'error', 'TextInput') },\n { what: 'a raw <a> is an error naming Link', run: all(h, [probe(component('<a href=\"/topics\">Topics</a>'), 'error', 'Link'), probe(component('<a href=\"/issues\">Issues</a>'), 'error', 'Link')], 'a raw <a> is an error naming Link') },\n { what: 'a raw <form> is an error naming Form, and a file input one naming FilePicker', run: async () => {\n const form = await probe(component('<form />'), 'error', '`Form`')()\n if (form.result !== 'pass') return form\n return probe(component('<input type=\"file\" />'), 'error', 'FilePicker')()\n } },\n { what: '<textarea>, <select>, <dialog> and <label> name Textarea, Select, DialogShell and Field', run: async () => {\n for (const [element, part] of [['textarea', 'Textarea'], ['select', 'Select'], ['dialog', 'DialogShell'], ['label', 'Field']]) {\n const one = await probe(component(`<${element} />`), 'error', `\\`${part}\\``)()\n if (one.result !== 'pass') return one\n }\n return h.PASS('all four are errors, each naming its part')\n } },\n { what: 'an element the package has no part for is an error that says to ask for one', run: probe(component('<iframe title=\"Map\" />'), 'error', 'ask Katerina') },\n { what: 'an escaped element is not an error, while the same element is', run: async () => {\n const raw = await probe(component('<form />'), 'error')()\n if (raw.result !== 'pass') return h.FAIL(`a raw <form> is not caught yet, so this proves nothing: ${raw.detail}`)\n return probe('export function Probe() {\\n return (\\n // @estiva-escape: a probe that keeps its element on purpose\\n <form />\\n )\\n}\\n', 'none')()\n } },\n { what: 'a real page, full of elements that are not controls, gets no error', run: realPage },\n ]),\n ticket('UIG-8', [\n { what: 'a Base UI import is an error naming the part built on it', run: probe(\"import { Popover } from '@base-ui/react/popover'\\nexport const Probe = Popover\\n\", 'error', '`Popover`') },\n { what: 'createPortal is an error naming the floating parts', run: probe(\"import { createPortal } from 'react-dom'\\nexport const Probe = (to: HTMLElement) => createPortal(<span />, to)\\n\", 'error', '`DialogShell`') },\n { what: 'a key listener on the whole page is an error, in a .ts file too', run: probe(\"export function listen() {\\n window.addEventListener('keydown', () => {})\\n}\\n\", 'error', '`DialogShell`', 'src/lib/__gates_probe__.ts') },\n { what: 'arrow keys by hand are an error; Enter in a field is not', run: async () => {\n const arrows = await probe(\"export const onKeyDown = (e: KeyboardEvent) => e.key === 'ArrowDown'\\n\", 'error', '`Menu`', 'src/lib/__gates_probe__.ts')()\n if (arrows.result !== 'pass') return arrows\n return probe(\"export const onKeyDown = (e: KeyboardEvent) => e.key === 'Enter'\\n\", 'none', undefined, 'src/lib/__gates_probe__.ts')()\n } },\n { what: 'a hand-written role=\"option\" is an error naming Select', run: probe(component('<div role=\"option\" />'), 'error', '`Select`') },\n { what: 'tabIndex={0} on a div is an error; tabIndex={-1} is not', run: async () => {\n const zero = await probe(component('<div tabIndex={0} />'), 'error', '`Button`')()\n if (zero.result !== 'pass') return h.FAIL(`tabIndex={0} is not caught yet, so this proves nothing: ${zero.detail}`)\n return probe(component('<div tabIndex={-1} />'), 'none')()\n } },\n { what: 'overflow-y-auto is an error naming ScrollArea', run: probe(component('<div className=\"h-64 overflow-y-auto\" />'), 'error', '`ScrollArea`') },\n { what: 'an escaped listener is not an error, while the same listener is', run: async () => {\n const raw = await probe(\"export function listen() {\\n document.addEventListener('mousedown', () => {})\\n}\\n\", 'error', undefined, 'src/lib/__gates_probe__.ts')()\n if (raw.result !== 'pass') return h.FAIL(`a page listener is not caught yet, so this proves nothing: ${raw.detail}`)\n return probe(\"export function listen() {\\n // @estiva-escape: a probe that keeps its listener on purpose\\n document.addEventListener('mousedown', () => {})\\n}\\n\", 'none', undefined, 'src/lib/__gates_probe__.ts')()\n } },\n { what: 'a real page gets no error', run: realPage },\n ]),\n ticket('UIG-9', [\n { what: 'a border passed into Button is an error naming Button', run: probe(`import { Button } from '@estiva-app/ui'\\n${component('<Button className=\"border\">x</Button>')}`, 'error', 'on `Button` changes how it looks') },\n { what: 'placement passed into Button is not', run: probe(`import { Button } from '@estiva-app/ui'\\n${component('<Button className=\"mt-2 w-full flex-1 relative\">x</Button>')}`, 'none') },\n { what: 'an escaped look is not an error, while the same look is', run: async () => {\n const raw = await probe(`import { Link } from '@estiva-app/ui'\\n${component('<Link href=\"/x\" className=\"after:absolute after:inset-0\">x</Link>')}`, 'error', '`Link`')()\n if (raw.result !== 'pass') return h.FAIL(`a restyled part is not caught yet, so this proves nothing: ${raw.detail}`)\n return probe(`import { Link } from '@estiva-app/ui'\\nexport function Probe() {\\n return (\\n // @estiva-escape: a probe that keeps its row link on purpose\\n <Link href=\"/x\" className=\"after:absolute after:inset-0\">x</Link>\\n )\\n}\\n`, 'none')()\n } },\n { what: 'a real page gets no error', run: realPage },\n ]),\n ticket('UIG-13', [\n { what: 'registry.json is committed and has entries', run: () => h.json(h.exists('registry.json') ? 'registry.json' : at('registry.json'), (d) => ((d as { entries?: unknown[]; components?: unknown[] }).entries ?? (d as { components?: unknown[] }).components ?? []).length > 0, 'registry.json has entries') },\n ]),\n ticket('UIG-19', [\n { what: 'the usage-page contract runs in CI', run: () => h.ci(/[\\w:-]*contract[\\w:-]*/) },\n ]),\n ticket('UIG-20', [\n { what: 'a committed skill runs ui:find', run: () => (h.listFiles('.claude/skills', (n) => n === 'SKILL.md').some((f) => h.read(f).includes('ui:find')) ? h.PASS('a skill runs ui:find') : h.FAIL('no skill in .claude/skills runs ui:find')) },\n ]),\n ticket('UIG-21', [\n { what: 'path-scoped instructions exist', run: () => (h.listFiles('.claude/rules', (n) => n.endsWith('.md')).some((f) => /^paths:/m.test(h.read(f))) ? h.PASS('.claude/rules has paths: instructions') : h.FAIL('no .claude/rules file with paths:')) },\n ]),\n ticket('UIG-22', [\n { what: 'a hand-made header row is an error naming the header part', run: all(h, headers.map((name) => probe(component(`<section className=\"flex flex-col\"><div className=\"flex items-center px-3 py-2\"><span>${name === 'SectionHeader' ? 'Issues' : 'Folders'}</span></div><div /></section>`), 'error', name)), 'a hand-made header row is an error naming the header part') },\n ]),\n ticket('UIG-23', [\n { what: 'a hand-made empty line is an error naming EmptyState', run: probe(\"export function Probe({ items }: { items: string[] }) {\\n return <div>{items.length === 0 ? <p className=\\\"text-text-secondary\\\">Nothing here</p> : items.map((i) => <span key={i}>{i}</span>)}</div>\\n}\\n\", 'error', 'EmptyState') },\n ]),\n ticket('UIG-24', [\n { what: 'a title= is an error naming WithTooltip', run: probe(`import { Button } from '@estiva-app/ui'\\n${component('<Button title=\"Delete\">x</Button>')}`, 'error', 'WithTooltip') },\n ]),\n ticket('UIG-25', [\n { what: \"SectionLabel's class list, typed by hand, is a warning\", run: probe(component('<span className=\"text-[10px] uppercase tracking-wide text-text-muted\">Label</span>'), 'warning', 'SectionLabel') },\n ]),\n ticket('UIG-27', [\n { what: 'the installed package has Link', run: () => h.contains(installed, /\\bLink\\b/, 'the installed @estiva-app/ui exports Link') },\n { what: 'the installed package has ProgressBar', run: () => h.contains(installed, /\\bProgressBar\\b/, 'the installed @estiva-app/ui exports ProgressBar') },\n ]),\n ticket('UIG-28', [\n { what: 'text-[14px] is an error', run: tokenProbe(component('<div className=\"text-[14px]\">x</div>'), 'error') },\n { what: 'a colour in an inline style is an error', run: tokenProbe(component(\"<div style={{ backgroundColor: '#ff0000' }}>x</div>\"), 'error') },\n { what: 'h-[240px] is a warning', run: tokenProbe(component('<div className=\"h-[240px]\">x</div>'), 'warning') },\n { what: 'h-[240px] is not an error', run: tokenProbe(component('<div className=\"h-[240px]\">x</div>'), 'none') },\n { what: 'a hand-written line height behind an arbitrary variant is an error', run: tokenProbe(component('<div className=\"[&_p]:leading-[1.4]\">x</div>'), 'error') },\n { what: 'a raw colour in a class is an error (the pattern that matched nothing, R1)', run: tokenProbe(component('<div className=\"bg-[#5c69dc]\">x</div>'), 'error', 'raw colour') },\n { what: 'a width and height from a prop pass', run: tokenProbe(\"export function Probe({ size }: { size: number }) {\\n return <div style={{ width: size, height: size }}>x</div>\\n}\\n\", 'none') },\n { what: 'a test file is not checked for hand-written values, while source is', run: all(h, tokenConfigs.map((config) => async () => {\n const code = component(\"<div className=\\\"text-[14px]\\\" style={{ color: 'red' }}>x</div>\")\n const source = await probe(code, 'error', undefined, PROBE, config)()\n if (source.result !== 'pass') return h.FAIL(`source is not checked yet, so this proves nothing: ${source.detail}`)\n return probe(code, 'none', undefined, 'src/components/__gates_probe__.test.tsx', config)()\n }), 'a test file is not checked for hand-written values, while source is') },\n ]),\n ticket('UIG-30', [\n { what: 'the installed package has RichText', run: () => h.contains(installed, /\\bRichText\\b/, 'the installed @estiva-app/ui exports RichText') },\n ]),\n // Katerina's ruling of 17 September (docs/GATES.md \u00A723): one copy, in the package. An app made\n // by create-estiva-app passes this from its first commit; Peek and Ship do once UIG-32 lands.\n ticket('UIG-32', [\n { what: 'the gate pieces come from the package, and no repo keeps a copy', run: all(h, [\n () => h.contains(at('eslint.gates.config.js'), /from '@estiva-app\\/ui\\/gates'/, 'the gate config imports @estiva-app/ui/gates'),\n () => h.hook('.claude/settings.json', '@estiva-app/ui/dist/gates/cli.js'),\n // `estiva-gates status` where npm can find the command; by path where it cannot,\n // because the install is in the app's folder and the script is in the repo's top one (Ship).\n () => h.contains('package.json', /\"gates:status\":\\s*\"[^\"]*(?:estiva-gates|@estiva-app\\/ui\\/dist\\/gates\\/cli\\.js)[^\"]*status/, \"gates:status runs the package's engine\"),\n () => (h.exists('scripts/gates-status.mjs') ? h.FAIL('scripts/gates-status.mjs is a copy of the status engine: run estiva-gates status instead') : h.PASS('no copy of the status engine')),\n ], 'the gate config, the hook and gates:status are the package\\'s; no copy of the engine') },\n ]),\n ]\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAgCA,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAE9B,OAAO,uBAAuB;AAC9B,SAAS,2BAA2B;AACpC,SAAS,UAAU,wBAAwB;AAapC,IAAM,qBAAqB,CAAC,SAAS,qBAAqB,eAAe;AAEhF,IAAM,qBAAqB;AAAA,EACzB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO,CAAC,EAAE,MAAM,UAAU,GAAG,EAAE,MAAM,eAAe,CAAC;AACvD;AAEA,IAAM,QAAQ;AAAA,EACZ,KAAK;AAAA,IACH,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,SAAS;AAAA,IACT,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AAAA,EACA,SAAS;AAAA,IACP,MA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AAClI,cAAM,OAAO,UAAU,+DAAiE;AACxF,cAAM,SAAS,MAAM,MAAM,MAAM,SAAS,QAAW,OAAO,MAAM,EAAE;AACpE,YAAI,OAAO,WAAW,OAAQ,QAAO,EAAE,KAAK,sDAAsD,OAAO,MAAM,EAAE;AACjH,eAAO,MAAM,MAAM,QAAQ,QAAW,2CAA2C,MAAM,EAAE;AAAA,MAC3F,CAAC,GAAG,qEAAqE,EAAE;AAAA,IAC7E,CAAC;AAAA,IACD,OAAO,UAAU;AAAA,MACf,EAAE,MAAM,sCAAsC,KAAK,MAAM,EAAE,SAAS,WAAW,gBAAgB,+CAA+C,EAAE;AAAA,IAClJ,CAAC;AAAA;AAAA;AAAA,IAGD,OAAO,UAAU;AAAA,MACf,EAAE,MAAM,mEAAmE,KAAK,IAAI,GAAG;AAAA,QACrF,MAAM,EAAE,SAAS,GAAG,wBAAwB,GAAG,iCAAiC,8CAA8C;AAAA,QAC9H,MAAM,EAAE,KAAK,yBAAyB,kCAAkC;AAAA;AAAA;AAAA,QAGxE,MAAM,EAAE,SAAS,gBAAgB,6FAA6F,wCAAwC;AAAA,QACtK,MAAO,EAAE,OAAO,0BAA0B,IAAI,EAAE,KAAK,0FAA0F,IAAI,EAAE,KAAK,8BAA8B;AAAA,MAC1L,GAAG,qFAAsF,EAAE;AAAA,IAC7F,CAAC;AAAA,EACH;AACF;",
|
|
4
|
+
"sourcesContent": ["/// <reference types=\"node\" />\n/**\n * The token contract as lint settings, written once (docs/GATES.md \u00A723).\n *\n * Until UIG-10 this block was pasted into every repo: `eslint.config.js` here,\n * `eslint.tokens.js` in Peek, `eslint.config.js` in Ship. Katerina ruled on 17 September that a\n * gate piece ships in the package and an app imports it, so this is that one\n * copy. Peek and Ship move onto it in UIG-32.\n *\n * Two configs, as the copies had:\n *\n * - `tokenLint` \u2014 a class Tailwind does not generate (the doubled token name,\n * `bg-bg-surface`), Tailwind's own type ramp or palette, a raw colour, an\n * opacity modifier on a token colour.\n * - `tokenValues` \u2014 UIG-28: type, corners and shadows written by hand, and an\n * inline style that sets a colour (errors); heights, spacing and border\n * widths written by hand (warnings, never blocking).\n *\n * The patterns are the same for everyone. Only the words differ: an app is told\n * to use \"the package\", the package is told to add the token to `tokens.css`.\n * Measured on 17 September: the UIG-28 block was byte for byte the same in Peek\n * and Ship, and this repository's had the same patterns with seven messages\n * worded for the package.\n *\n * Where the plugin looks: every `className`, every `cn()` / `clsx()` argument,\n * and the values of a class map whose name ends in `Styles` / `_STYLES` or\n * `Classes` / `_CLASSES`. A class map named any other way is invisible to it.\n *\n * Tests are out of `tokenValues` (ruling of 13 September): a test mounts markup\n * to test it. A kept hand-written value says why:\n * `// eslint-disable-next-line <rule> -- @estiva-escape: <reason>` (A2).\n */\nimport { createRequire } from 'node:module'\nimport { fileURLToPath } from 'node:url'\nimport type { Linter } from 'eslint'\nimport betterTailwindcss from 'eslint-plugin-better-tailwindcss'\nimport { getDefaultSelectors } from 'eslint-plugin-better-tailwindcss/defaults'\nimport { parser as typescriptParser } from 'typescript-eslint'\n\n/** Who reads the messages. */\nexport type TokenAudience = 'app' | 'package'\n\nexport interface TokenLintOptions {\n /** The Tailwind config the unknown-class rule reads, relative to where ESLint runs. */\n tailwindConfig?: string\n /** `app` (the default) names the package; `package` names `tokens.css` and the preset. */\n audience?: TokenAudience\n}\n\n/** What the token lint never reads: build output. */\nexport const TOKEN_LINT_IGNORES = ['dist/', 'storybook-static/', 'node_modules/']\n\nconst CLASS_MAP_SELECTOR = {\n kind: 'variable',\n name: '^(?:[A-Z][A-Z0-9_]*_(?:STYLES|CLASSES)|[a-z][a-zA-Z0-9]*(?:Styles|Classes))$',\n match: [{ type: 'strings' }, { type: 'objectValues' }],\n}\n\nconst WORDS = {\n app: {\n ramp: \"Tailwind's type ramp is not a token. Use the ramp from the package: text-body-2, text-caption, text-h3, text-btn-default...\",\n palette: \"Tailwind's palette is not a token. Use a colour from the package (bg-bg-surface, text-text-primary, border-border-subtle...); a colour with no token is a missing token.\",\n raw: 'A raw colour is a missing token: add it to the package (tokens.css in every theme block, and the preset), or say why not in an eslint-disable comment.',\n opacity: 'An opacity modifier on a token colour compiles to nothing. A transparent colour is a token of its own (D16): add it to the package.',\n type: '$0 is type written by hand. A token from the package sets the size, line height, letter spacing and weight together (text-body-2, text-caption, text-h5...); if none fits, add one to the package, or say why not in an eslint-disable comment.',\n corner: '$0 is a corner written by hand, and no token has it. Use a corner from the package (rounded-sm 4px, rounded-md 6px, rounded-lg 8px...), or say why not in an eslint-disable comment.',\n shadow: '$0 is a shadow written by hand. Use a shadow from the package (shadow-sm, shadow-md, shadow-focus-ring, drop-shadow-glow-success...); a shadow with no token is a missing token.',\n },\n package: {\n ramp: \"Tailwind's type ramp is not a token. Use the ramp in tailwind-preset.js: text-body-2, text-caption, text-h3, text-btn-default...\",\n palette: \"Tailwind's palette is not a token. Use a colour from tailwind-preset.js (bg-bg-surface, text-text-primary, border-border-subtle...); a colour with no token is a missing token.\",\n raw: 'A raw colour is a missing token: add it to tokens.css in every theme block and to the preset, or say why not in an eslint-disable comment.',\n opacity: 'An opacity modifier on a token colour compiles to nothing. A transparent colour is a token of its own (D16): add it to tokens.css in every theme block and to the preset.',\n type: '$0 is type written by hand. A token from tailwind-preset.js sets the size, line height, letter spacing and weight together (text-body-2, text-caption, text-h5...); if none fits, add one to the preset and to cn.ts, or say why not in an eslint-disable comment.',\n corner: '$0 is a corner written by hand, and no token has it. Use a corner from tailwind-preset.js (rounded-sm 4px, rounded-md 6px, rounded-lg 8px...), or say why not in an eslint-disable comment.',\n shadow: '$0 is a shadow written by hand. Use a shadow from tailwind-preset.js (shadow-sm, shadow-md, shadow-focus-ring, drop-shadow-glow-success...); a shadow with no token is a missing token.',\n },\n} satisfies Record<TokenAudience, Record<string, string>>\n\n/**\n * The class rules. `no-unknown-classes` reads the app's own Tailwind config, so\n * it knows exactly what the preset and the app generate.\n */\nexport function tokenLint({ tailwindConfig = 'tailwind.config.js', audience = 'app' }: TokenLintOptions = {}): Linter.Config {\n const words = WORDS[audience]\n return {\n files: ['**/*.{ts,tsx}'],\n languageOptions: {\n parser: typescriptParser,\n parserOptions: { ecmaFeatures: { jsx: true } },\n },\n plugins: { 'better-tailwindcss': betterTailwindcss },\n settings: {\n 'better-tailwindcss': {\n tailwindConfig,\n selectors: [...getDefaultSelectors(), CLASS_MAP_SELECTOR],\n },\n },\n rules: {\n 'better-tailwindcss/no-unknown-classes': 'error',\n 'better-tailwindcss/no-restricted-classes': [\n 'error',\n {\n restrict: [\n { pattern: '^(?:[a-z0-9-]+:)*text-(?:xs|sm|base|lg|xl|[2-9]xl)$', message: words.ramp },\n {\n pattern:\n '^(?:[a-z0-9-]+:)*(?:text|bg|border|ring|outline|fill|stroke|decoration|divide|placeholder|from|via|to|accent|caret|shadow)-(?:black|white|slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)(?:-[0-9]{2,3})?(?:/[0-9]{1,3})?$',\n message: words.palette,\n },\n { pattern: '^(?:[a-z0-9-]+:)*[a-z-]+-\\\\[[^\\\\]]*(?:#[0-9a-fA-F]{3}|rgba?\\\\(|hsla?\\\\(|oklch\\\\()', message: words.raw },\n {\n pattern: '^(?:[a-z0-9-]+:)*(?:text|bg|border|ring|outline|fill|stroke|decoration|divide|placeholder|from|via|to|accent|caret|shadow)-(?:bg|text|border|accent|info|warning|success|error)-[a-z-]+/[0-9]{1,3}$',\n message: words.opacity,\n },\n ],\n },\n ],\n },\n }\n}\n\n// UIG-28's patterns. The variant part reads arbitrary variants too\n// (`[&_pre]:`, `data-[state]:`, `group-hover/row:`). A colour inside `text-[\u2026]`\n// is left to the raw-colour rule of `tokenLint`.\nconst V = '^(?:(?:[^:\\\\[\\\\]\\\\s]|\\\\[[^\\\\]]*\\\\])+:)*!?'\nconst NOT_COLOUR = '(?!color:|#|rgba?\\\\(|hsla?\\\\(|oklch\\\\(|var\\\\()'\nconst HAND_WRITTEN = {\n type: `${V}(?:text-\\\\[${NOT_COLOUR}|text-\\\\[length:|leading-\\\\[|tracking-\\\\[)[^\\\\]]+\\\\](?:/\\\\S*)?$`,\n corner: `${V}rounded(?:-(?:t|r|b|l|s|e|tl|tr|br|bl|ss|se|es|ee))?-\\\\[[^\\\\]]+\\\\]$`,\n shadow: `${V}(?:shadow|drop-shadow)-\\\\[(?!color:)[^\\\\]]+\\\\]$`,\n spacing: `${V}-?(?:w|h|size|min-w|min-h|max-w|max-h|p[xytrblse]?|m[xytrblse]?|gap(?:-[xy])?|space-[xy]|inset(?:-[xy])?|top|right|bottom|left|translate-[xy]|basis|indent|scroll-[mp][xytrblse]?|border-spacing(?:-[xy])?)-\\\\[[^\\\\]]+\\\\]$`,\n width: `${V}(?:border(?:-[xytrblse])?|divide-[xy]|outline|ring|ring-offset)-\\\\[(?:length:)?-?[0-9.]+(?:px|rem|em)?\\\\]$`,\n}\n\nconst INLINE_STYLE_TOKEN_PROPERTIES =\n '/^(color|background|backgroundColor|backgroundImage|fill|stroke|fontSize|border|borderTop|borderRight|borderBottom|borderLeft|borderBlock|borderInline|borderStyle|boxShadow|textShadow)$|Color$/'\n\ninterface Preset {\n theme: { extend: { fontSize: Record<string, string | [string, unknown]>; borderRadius: Record<string, string> } }\n}\n\n/**\n * The preset, loaded the way Tailwind loads it: it imports `tailwindcss/plugin`,\n * which a plain `import` cannot resolve. Read from beside this module, so an app\n * and this repository read the one preset the package ships.\n */\nfunction loadPreset(): Preset {\n const require = createRequire(import.meta.url)\n const loadConfig = require('tailwindcss/loadConfig') as (path: string) => Preset\n return loadConfig(fileURLToPath(new URL('../../tailwind-preset.js', import.meta.url)))\n}\n\n/**\n * UIG-28: the values the tokens already name, written by hand (Katerina's\n * rulings B11, B12, C3 of 13 September and R2 of 15 September). Register it\n * after `tokenLint`, whose parser and plugin settings it borrows. Under its own\n * rule names, `token-values` and `token-spacing` (the same plugin twice, so one\n * runs as errors and one as warnings): an escape for a hand-written size then\n * cannot also silence a raw colour on the same line.\n */\nexport function tokenValues({ audience = 'app' }: Pick<TokenLintOptions, 'audience'> = {}): Linter.Config {\n const words = WORDS[audience]\n const preset = loadPreset()\n // `text-[14px]` names the token of that size, read from the preset, so the\n // message stays true when the ramp changes.\n const tokensBySize: Record<string, string[]> = {}\n for (const [name, value] of Object.entries(preset.theme.extend.fontSize)) {\n const size = Array.isArray(value) ? value[0] : value\n ;(tokensBySize[size] ??= []).push(`text-${name}`)\n }\n const cornersBySize: Record<string, string[]> = {}\n for (const [name, size] of Object.entries(preset.theme.extend.borderRadius)) (cornersBySize[size] ??= []).push(name === 'DEFAULT' ? 'rounded' : `rounded-${name}`)\n\n return {\n files: ['**/*.{ts,tsx}'],\n ignores: ['**/*.test.ts', '**/*.test.tsx'],\n plugins: { 'token-values': betterTailwindcss, 'token-spacing': betterTailwindcss },\n rules: {\n 'token-values/no-restricted-classes': [\n 'error',\n {\n restrict: [\n ...Object.entries(tokensBySize).map(([size, names]) => ({\n pattern: `${V}text-\\\\[${size.replace('.', '\\\\.')}\\\\](?:/\\\\S*)?$`,\n message: `$0 is the type ramp written by hand. Use ${names.join(' or ')}.`,\n })),\n {\n pattern: HAND_WRITTEN.type,\n message: words.type,\n },\n ...Object.entries(cornersBySize).map(([size, names]) => ({\n pattern: `${V}rounded(?:-(?:t|r|b|l|s|e|tl|tr|br|bl|ss|se|es|ee))?-\\\\[${size.replace('.', '\\\\.')}\\\\]$`,\n message: `$0 is a corner written by hand. Use ${names.join(' or ')} (with the same side, if it has one).`,\n })),\n {\n pattern: HAND_WRITTEN.corner,\n message: words.corner,\n },\n {\n pattern: HAND_WRITTEN.shadow,\n message: words.shadow,\n },\n ],\n },\n ],\n 'token-spacing/no-restricted-classes': [\n 'warn',\n {\n restrict: [\n {\n pattern: HAND_WRITTEN.spacing,\n message: '$0 is a size or a space written by hand. Use a step of the spacing scale (p-3, h-9, gap-2...) if one fits. Reported, not blocked.',\n },\n {\n pattern: HAND_WRITTEN.width,\n message: '$0 is a border or ring width written by hand. Use border, border-2, ring-1... if one fits. Reported, not blocked.',\n },\n ],\n },\n ],\n 'no-restricted-syntax': [\n 'error',\n {\n selector: `JSXAttribute[name.name=\"style\"] > JSXExpressionContainer > ObjectExpression > Property[key.name=${INLINE_STYLE_TOKEN_PROPERTIES}]`,\n message: 'An inline style that sets a colour, a font size, a border or a shadow is outside the token contract: use a token class. If the value is computed (a palette, a size from a prop), say why in an eslint-disable comment. Width, height and transforms are fine.',\n },\n ],\n },\n }\n}\n", "/// <reference types=\"node\" />\n/**\n * Where the UI Guardrails' rules apply, written once (docs/GATES.md \u00A723).\n *\n * Until UIG-10 every repo wrote this itself: `eslint.gates.js` (the rules and\n * where they apply) and `eslint.gates.config.js` (the gate: those rules alone)\n * in Peek, in Ship's `web/`, and here pointed inward. The rules were always the\n * package's; these two files were copies. Now they are two functions.\n *\n * Where: every `.ts` and `.tsx` under `src`, stories included (a story is what\n * people read and copy), tests not (a test mounts markup to test it) \u2014\n * Katerina's rulings of 13 September; `.ts` since UIG-8. This package's own\n * inward set reads `.tsx` only, as it always has.\n *\n * A place that keeps something says why, on the line above:\n * `// @estiva-escape: <reason>`, or `{/* @estiva-escape: <reason> *\\/}` as a\n * JSX child. Never `eslint-disable`: the count refuses it.\n */\nimport type { ESLint, Linter } from 'eslint'\nimport betterTailwindcss from 'eslint-plugin-better-tailwindcss'\nimport { parser as typescriptParser } from 'typescript-eslint'\nimport estiva from '../eslint/index'\nimport { TOKEN_LINT_IGNORES } from './token-lint'\n\nexport interface GateConfigOptions {\n /** `app` (the default) runs `configs.recommended`; `package` runs this package's inward set. */\n audience?: 'app' | 'package'\n /**\n * Plugins whose `eslint-disable` directives appear in the source, registered\n * here with every rule off. ESLint refuses a directive for a rule it does not\n * know, so without them the gate would fail on another lint's comments.\n * The token lint's names are registered already.\n */\n quiet?: Record<string, ESLint.Plugin>\n /** Folders the gate never reads, beside build output. */\n ignores?: string[]\n}\n\n/**\n * The rules and where they apply \u2014 one config object, to add beside\n * everything else an app's `eslint.config.js` runs, so an editor shows a\n * refusal where the element is typed.\n */\nexport function gateLint({ audience = 'app' }: Pick<GateConfigOptions, 'audience'> = {}): Linter.Config {\n return {\n ...(audience === 'package' ? estiva.configs.package : estiva.configs.recommended),\n files: audience === 'package' ? ['src/**/*.tsx'] : ['src/**/*.{ts,tsx}'],\n ignores: ['**/*.test.ts', '**/*.test.tsx'],\n languageOptions: {\n parser: typescriptParser,\n parserOptions: { ecmaFeatures: { jsx: true } },\n },\n }\n}\n\n/**\n * The gate: the rules on their own \u2014 `npm run lint:rules`, CI's job `gate`, and\n * the config the editor hook lints a proposed write with. It fails on a gate\n * rule and on nothing else, so a backlog in the full lint never blocks it.\n */\nexport function gateConfig({ audience = 'app', quiet = {}, ignores = [] }: GateConfigOptions = {}): Linter.Config[] {\n return [\n { ignores: [...TOKEN_LINT_IGNORES, ...ignores] },\n {\n plugins: {\n ...quiet,\n 'better-tailwindcss': betterTailwindcss,\n 'token-values': betterTailwindcss,\n 'token-spacing': betterTailwindcss,\n },\n // Every other config's directives are unused here, because their rules are\n // off here. Reporting them would be this config complaining about the\n // others' business.\n linterOptions: { reportUnusedDisableDirectives: 'off' },\n },\n gateLint({ audience }),\n ]\n}\n", "/// <reference types=\"node\" />\n/**\n * The gate checks every app runs, written once (docs/GATES.md \u00A723).\n *\n * Until UIG-10 Peek and Ship each wrote them into their own\n * `scripts/gates-checks.mjs`. 65 different checks for finished tickets, counted\n * on 17 September: 28 were identical in both, 21 were the same check written two\n * ways, 2 read each app's real page, and 14 read code only one app has. This is\n * the first three groups as one list. The fourth stays in the app's own checks\n * file, beside this list.\n *\n * Where Peek and Ship wrote one check two ways, the check here runs both, so it\n * passes wherever either did: the raw-link probe with both of their texts, the\n * token probes against each token config the app has.\n *\n * `scripts/gates-compare.mjs` holds this list to Peek's and Ship's: every check\n * of theirs must be here, or be about code only that app has, or the comparison\n * fails and names it.\n *\n * A check for a ticket not built yet is a first guess at the evidence, taken\n * from the ticket's own text; the ticket that builds it changes it here.\n */\nimport type { CheckResult, GateCheck, GateHelpers, GateTicket } from './status'\n\nexport interface AppCheckOptions {\n /** Where the app is inside the repository: `web` in Ship, `.` elsewhere. */\n app?: string\n /** A real page of the app, relative to the app, full of elements that are not controls. */\n page: string\n /** The ticket the gate chain is listed under, and whether this repo owns it: UIG-3 in Peek, UIG-4 in Ship. */\n chain?: { ref: string; owner: boolean }\n /** The token lint configs the app has, relative to the app. */\n tokenConfigs?: string[]\n /** The name of the app's header component a hand-made header row should name (UIG-22's first guess). */\n headers?: string[]\n}\n\nexport const APP_TICKET_TITLES: Record<string, string> = {\n 'UIG-2': 'The tracking rails \u2014 GATES.md, the status script, the guide committed',\n 'UIG-3': 'Tracer bullet \u2014 one rule, end to end, blocking in Peek',\n 'UIG-4': 'The same chain, blocking in Ship',\n 'UIG-6': 'Branch protection \u2014 the backstop, all three repos',\n 'UIG-7': 'Lint rule \u2014 every remaining raw element',\n 'UIG-8': 'Lint rule \u2014 forbid the reach',\n 'UIG-9': 'Lint rule \u2014 the className allow-list',\n 'UIG-10': 'create-app \u2014 a command that makes a new Estiva app that runs',\n 'UIG-13': \"The registry widens to Peek's 115 and Ship's 74, with classification\",\n 'UIG-19': 'Lock the contract in CI, and make the three Storybooks one search',\n 'UIG-20': 'The Claude skill, reading the registry',\n 'UIG-21': 'CLAUDE.md becomes an index, not a lecture',\n 'UIG-22': 'Fingerprint \u2014 a hand-made header row',\n 'UIG-23': 'Fingerprint \u2014 a hand-made empty state',\n 'UIG-24': 'Fingerprint \u2014 a browser tooltip where ours belongs',\n 'UIG-25': 'Fingerprint \u2014 a component copied out by hand',\n 'UIG-27': 'The components the apps had to build themselves \u2014 Link, ProgressBar, EmptyState padding',\n 'UIG-28': 'Close the two holes in the token contract \u2014 arbitrary values, and inline style',\n 'UIG-30': 'RichText \u2014 one component that draws a message\\'s text, for both apps',\n 'UIG-32': 'Peek and Ship take their gate pieces from the package',\n}\n\n/** Run several checks as one: the first that does not pass is the answer. */\nfunction all(h: GateHelpers, steps: (() => CheckResult | Promise<CheckResult>)[], label: string): () => Promise<CheckResult> {\n return async () => {\n for (const step of steps) {\n const r = await step()\n if (r.result !== 'pass') return r\n }\n return h.PASS(label)\n }\n}\n\nexport function appChecks(h: GateHelpers, { app = '.', page, chain = { ref: 'UIG-3', owner: false }, tokenConfigs = ['eslint.tokens.config.js', 'eslint.config.js'], headers = ['ContainerHeader', 'SectionHeader'] }: AppCheckOptions): GateTicket[] {\n const WEB = app === '.' ? '' : `${app.replace(/\\/$/, '')}/`\n const cwd = app === '.' ? undefined : app\n const PROBE = 'src/components/__gates_probe__.tsx'\n const GATES = 'eslint.gates.config.js'\n const at = (rel: string) => `${WEB}${rel}`\n const probe = (code: string, expect: 'error' | 'warning' | 'none', mentions?: string, file = PROBE, config = GATES) => () =>\n h.lint({ ...(cwd ? { cwd } : {}), config, file, code, expect, mentions })\n const component = (body: string) => `export function Probe() {\\n return ${body}\\n}\\n`\n const installed = at('node_modules/@estiva-app/ui/dist/index.d.ts')\n const realPage = (): Promise<CheckResult> => h.lint({ ...(cwd ? { cwd } : {}), config: GATES, file: page, code: h.read(at(page)), expect: 'none' })\n const button = component('<button type=\"button\">x</button>')\n const ticket = (ref: string, checks: GateCheck[], owner = false): GateTicket => ({ ref, title: APP_TICKET_TITLES[ref], owner, checks })\n\n const tokenProbe = (code: string, expect: 'error' | 'warning' | 'none', mentions?: string, file = PROBE) =>\n all(h, tokenConfigs.map((config) => probe(code, expect, mentions, file, config)), `${tokenConfigs.join(' and ')}: as expected`)\n\n return [\n ticket('UIG-2', [\n { what: 'npm run gates:status is wired', run: () => h.script('package.json', 'gates:status') },\n ]),\n ticket(chain.ref, [\n { what: 'the gate lint config loads', run: () => h.loads(at(GATES)) },\n { what: `${at('package.json')} has lint:rules`, run: () => h.script(at('package.json'), 'lint:rules') },\n { what: 'CI runs lint:rules', run: () => h.ci('lint:rules') },\n { what: 'the committed hook runs the gate lint', run: () => h.hook('.claude/settings.json', 'gates') },\n { what: '.gates-count.json is committed and parses', run: () => h.json(h.exists('.gates-count.json') ? '.gates-count.json' : at('.gates-count.json')) },\n { what: 'a raw <button> is an error naming Button', run: probe(button, 'error', 'Button') },\n { what: 'the same in a story', run: probe(button, 'error', 'Button', 'src/stories/__gates_probe__.stories.tsx') },\n { what: 'a test file is not checked, while source is', run: async () => {\n const source = await probe(button, 'error', 'Button')()\n if (source.result !== 'pass') return h.FAIL(`source is not checked yet, so this proves nothing: ${source.detail}`)\n return probe(button, 'none', undefined, 'src/components/__gates_probe__.test.tsx')()\n } },\n { what: 'the debt list exists', run: () => h.file('docs/GATES-DEBT.md') },\n ], chain.owner),\n ticket('UIG-6', [\n { what: 'GitHub requires the check gate to merge into main', run: () => h.protectedBranch(/^gate$/) },\n { what: \"CI's job gate runs lint:rules\", run: () => h.ciJob('gate', 'lint:rules') },\n ]),\n ticket('UIG-7', [\n { what: 'a raw <input> is an error naming TextInput', run: probe(component('<input />'), 'error', 'TextInput') },\n { what: 'a raw <a> is an error naming Link', run: all(h, [probe(component('<a href=\"/topics\">Topics</a>'), 'error', 'Link'), probe(component('<a href=\"/issues\">Issues</a>'), 'error', 'Link')], 'a raw <a> is an error naming Link') },\n { what: 'a raw <form> is an error naming Form, and a file input one naming FilePicker', run: async () => {\n const form = await probe(component('<form />'), 'error', '`Form`')()\n if (form.result !== 'pass') return form\n return probe(component('<input type=\"file\" />'), 'error', 'FilePicker')()\n } },\n { what: '<textarea>, <select>, <dialog> and <label> name Textarea, Select, DialogShell and Field', run: async () => {\n for (const [element, part] of [['textarea', 'Textarea'], ['select', 'Select'], ['dialog', 'DialogShell'], ['label', 'Field']]) {\n const one = await probe(component(`<${element} />`), 'error', `\\`${part}\\``)()\n if (one.result !== 'pass') return one\n }\n return h.PASS('all four are errors, each naming its part')\n } },\n { what: 'an element the package has no part for is an error that says to ask for one', run: probe(component('<iframe title=\"Map\" />'), 'error', 'ask Katerina') },\n { what: 'an escaped element is not an error, while the same element is', run: async () => {\n const raw = await probe(component('<form />'), 'error')()\n if (raw.result !== 'pass') return h.FAIL(`a raw <form> is not caught yet, so this proves nothing: ${raw.detail}`)\n return probe('export function Probe() {\\n return (\\n // @estiva-escape: a probe that keeps its element on purpose\\n <form />\\n )\\n}\\n', 'none')()\n } },\n { what: 'a real page, full of elements that are not controls, gets no error', run: realPage },\n ]),\n ticket('UIG-8', [\n { what: 'a Base UI import is an error naming the part built on it', run: probe(\"import { Popover } from '@base-ui/react/popover'\\nexport const Probe = Popover\\n\", 'error', '`Popover`') },\n { what: 'createPortal is an error naming the floating parts', run: probe(\"import { createPortal } from 'react-dom'\\nexport const Probe = (to: HTMLElement) => createPortal(<span />, to)\\n\", 'error', '`DialogShell`') },\n { what: 'a key listener on the whole page is an error, in a .ts file too', run: probe(\"export function listen() {\\n window.addEventListener('keydown', () => {})\\n}\\n\", 'error', '`DialogShell`', 'src/lib/__gates_probe__.ts') },\n { what: 'arrow keys by hand are an error; Enter in a field is not', run: async () => {\n const arrows = await probe(\"export const onKeyDown = (e: KeyboardEvent) => e.key === 'ArrowDown'\\n\", 'error', '`Menu`', 'src/lib/__gates_probe__.ts')()\n if (arrows.result !== 'pass') return arrows\n return probe(\"export const onKeyDown = (e: KeyboardEvent) => e.key === 'Enter'\\n\", 'none', undefined, 'src/lib/__gates_probe__.ts')()\n } },\n { what: 'a hand-written role=\"option\" is an error naming Select', run: probe(component('<div role=\"option\" />'), 'error', '`Select`') },\n { what: 'tabIndex={0} on a div is an error; tabIndex={-1} is not', run: async () => {\n const zero = await probe(component('<div tabIndex={0} />'), 'error', '`Button`')()\n if (zero.result !== 'pass') return h.FAIL(`tabIndex={0} is not caught yet, so this proves nothing: ${zero.detail}`)\n return probe(component('<div tabIndex={-1} />'), 'none')()\n } },\n { what: 'overflow-y-auto is an error naming ScrollArea', run: probe(component('<div className=\"h-64 overflow-y-auto\" />'), 'error', '`ScrollArea`') },\n { what: 'an escaped listener is not an error, while the same listener is', run: async () => {\n const raw = await probe(\"export function listen() {\\n document.addEventListener('mousedown', () => {})\\n}\\n\", 'error', undefined, 'src/lib/__gates_probe__.ts')()\n if (raw.result !== 'pass') return h.FAIL(`a page listener is not caught yet, so this proves nothing: ${raw.detail}`)\n return probe(\"export function listen() {\\n // @estiva-escape: a probe that keeps its listener on purpose\\n document.addEventListener('mousedown', () => {})\\n}\\n\", 'none', undefined, 'src/lib/__gates_probe__.ts')()\n } },\n { what: 'a real page gets no error', run: realPage },\n ]),\n ticket('UIG-9', [\n { what: 'a border passed into Button is an error naming Button', run: probe(`import { Button } from '@estiva-app/ui'\\n${component('<Button className=\"border\">x</Button>')}`, 'error', 'on `Button` changes how it looks') },\n { what: 'placement passed into Button is not', run: probe(`import { Button } from '@estiva-app/ui'\\n${component('<Button className=\"mt-2 w-full flex-1 relative\">x</Button>')}`, 'none') },\n { what: 'an escaped look is not an error, while the same look is', run: async () => {\n const raw = await probe(`import { Link } from '@estiva-app/ui'\\n${component('<Link href=\"/x\" className=\"after:absolute after:inset-0\">x</Link>')}`, 'error', '`Link`')()\n if (raw.result !== 'pass') return h.FAIL(`a restyled part is not caught yet, so this proves nothing: ${raw.detail}`)\n return probe(`import { Link } from '@estiva-app/ui'\\nexport function Probe() {\\n return (\\n // @estiva-escape: a probe that keeps its row link on purpose\\n <Link href=\"/x\" className=\"after:absolute after:inset-0\">x</Link>\\n )\\n}\\n`, 'none')()\n } },\n { what: 'a real page gets no error', run: realPage },\n ]),\n // UIG-10, reopened 18 September: a tab holds one relay client, the way Peek and Ship hold\n // theirs and a made app is written to. Measured on both mains that day: one each, and no\n // socket opened any other way. A second holder, or a socket of the app's own, is a second\n // connection the relay signs in and budgets separately.\n ticket('UIG-10', [\n { what: 'the app holds one relay client, at module level, and opens no socket of its own', run: () => {\n const sources = h.listFiles(at('src'), (n) => /\\.tsx?$/.test(n) && !/\\.(test|stories)\\.tsx?$/.test(n))\n const own = sources.filter((f) => /\\bcreateLiveClient\\(|\\bcreateLiveRelay\\(|\\bnew WebSocket\\(/.test(h.read(f)))\n if (own.length) return h.FAIL(`opens a socket of its own (${own.join(', ')}): hold one client from createLiveClientHolder()`)\n const holders = sources.filter((f) => /^\\s*(?:export\\s+)?const\\s+\\w+\\s*=\\s*createLiveClientHolder\\(\\)/m.test(h.read(f)))\n if (holders.length !== 1) return h.FAIL(holders.length ? `${holders.length} client holders (${holders.join(', ')}): a tab holds one` : 'no module-level createLiveClientHolder(): the app has no relay client')\n return h.PASS(`one client for the tab, held in ${holders[0]}`)\n } },\n ]),\n // Built by UIG-13, 18 September. An app's catalogue is built fresh from its code\n // and never committed: the package is public and the apps are private (Katerina).\n ticket('UIG-13', [\n { what: \"npm run ui:find is the package's search, over the package and this app\", run: () => h.contains(at('package.json'), /\"ui:find\":\\s*\"estiva-ui find\\b/, \"ui:find runs the package's estiva-ui find\") },\n { what: \"npm run registry:check is the package's check\", run: () => h.contains(at('package.json'), /\"registry:check\":\\s*\"estiva-ui check\\b/, 'registry:check runs estiva-ui check') },\n { what: \"CI's job gate refuses a part with no description\", run: () => h.ciJob('gate', 'registry:check') },\n // In the .gitignore of the app's own folder, where `estiva-ui build` would write it.\n { what: 'the catalogue is never committed: git ignores registry.json', run: () => h.contains(at('.gitignore'), /^\\/?registry\\.json\\r?$/m, `${at('.gitignore')} ignores registry.json`) },\n { what: 'every part is described and sorted, and every file is accounted for', run: () => h.catalogue(at('.')) },\n ]),\n ticket('UIG-19', [\n { what: 'the usage-page contract runs in CI', run: () => h.ci(/[\\w:-]*contract[\\w:-]*/) },\n ]),\n ticket('UIG-20', [\n { what: 'a committed skill runs ui:find', run: () => (h.listFiles('.claude/skills', (n) => n === 'SKILL.md').some((f) => h.read(f).includes('ui:find')) ? h.PASS('a skill runs ui:find') : h.FAIL('no skill in .claude/skills runs ui:find')) },\n ]),\n ticket('UIG-21', [\n { what: 'path-scoped instructions exist', run: () => (h.listFiles('.claude/rules', (n) => n.endsWith('.md')).some((f) => /^paths:/m.test(h.read(f))) ? h.PASS('.claude/rules has paths: instructions') : h.FAIL('no .claude/rules file with paths:')) },\n ]),\n ticket('UIG-22', [\n { what: 'a hand-made header row is an error naming the header part', run: all(h, headers.map((name) => probe(component(`<section className=\"flex flex-col\"><div className=\"flex items-center px-3 py-2\"><span>${name === 'SectionHeader' ? 'Issues' : 'Folders'}</span></div><div /></section>`), 'error', name)), 'a hand-made header row is an error naming the header part') },\n ]),\n ticket('UIG-23', [\n { what: 'a hand-made empty line is an error naming EmptyState', run: probe(\"export function Probe({ items }: { items: string[] }) {\\n return <div>{items.length === 0 ? <p className=\\\"text-text-secondary\\\">Nothing here</p> : items.map((i) => <span key={i}>{i}</span>)}</div>\\n}\\n\", 'error', 'EmptyState') },\n ]),\n ticket('UIG-24', [\n { what: 'a title= is an error naming WithTooltip', run: probe(`import { Button } from '@estiva-app/ui'\\n${component('<Button title=\"Delete\">x</Button>')}`, 'error', 'WithTooltip') },\n ]),\n ticket('UIG-25', [\n { what: \"SectionLabel's class list, typed by hand, is a warning\", run: probe(component('<span className=\"text-[10px] uppercase tracking-wide text-text-muted\">Label</span>'), 'warning', 'SectionLabel') },\n ]),\n ticket('UIG-27', [\n { what: 'the installed package has Link', run: () => h.contains(installed, /\\bLink\\b/, 'the installed @estiva-app/ui exports Link') },\n { what: 'the installed package has ProgressBar', run: () => h.contains(installed, /\\bProgressBar\\b/, 'the installed @estiva-app/ui exports ProgressBar') },\n ]),\n ticket('UIG-28', [\n { what: 'text-[14px] is an error', run: tokenProbe(component('<div className=\"text-[14px]\">x</div>'), 'error') },\n { what: 'a colour in an inline style is an error', run: tokenProbe(component(\"<div style={{ backgroundColor: '#ff0000' }}>x</div>\"), 'error') },\n { what: 'h-[240px] is a warning', run: tokenProbe(component('<div className=\"h-[240px]\">x</div>'), 'warning') },\n { what: 'h-[240px] is not an error', run: tokenProbe(component('<div className=\"h-[240px]\">x</div>'), 'none') },\n { what: 'a hand-written line height behind an arbitrary variant is an error', run: tokenProbe(component('<div className=\"[&_p]:leading-[1.4]\">x</div>'), 'error') },\n { what: 'a raw colour in a class is an error (the pattern that matched nothing, R1)', run: tokenProbe(component('<div className=\"bg-[#5c69dc]\">x</div>'), 'error', 'raw colour') },\n { what: 'a width and height from a prop pass', run: tokenProbe(\"export function Probe({ size }: { size: number }) {\\n return <div style={{ width: size, height: size }}>x</div>\\n}\\n\", 'none') },\n { what: 'a test file is not checked for hand-written values, while source is', run: all(h, tokenConfigs.map((config) => async () => {\n const code = component(\"<div className=\\\"text-[14px]\\\" style={{ color: 'red' }}>x</div>\")\n const source = await probe(code, 'error', undefined, PROBE, config)()\n if (source.result !== 'pass') return h.FAIL(`source is not checked yet, so this proves nothing: ${source.detail}`)\n return probe(code, 'none', undefined, 'src/components/__gates_probe__.test.tsx', config)()\n }), 'a test file is not checked for hand-written values, while source is') },\n ]),\n ticket('UIG-30', [\n { what: 'the installed package has RichText', run: () => h.contains(installed, /\\bRichText\\b/, 'the installed @estiva-app/ui exports RichText') },\n ]),\n // Katerina's ruling of 17 September (docs/GATES.md \u00A723): one copy, in the package. An app made\n // by create-estiva-app passes this from its first commit; Peek and Ship do once UIG-32 lands.\n ticket('UIG-32', [\n { what: 'the gate pieces come from the package, and no repo keeps a copy', run: all(h, [\n () => h.contains(at('eslint.gates.config.js'), /from '@estiva-app\\/ui\\/gates'/, 'the gate config imports @estiva-app/ui/gates'),\n () => h.hook('.claude/settings.json', '@estiva-app/ui/dist/gates/cli.js'),\n // `estiva-gates status` where npm can find the command; by path where it cannot,\n // because the install is in the app's folder and the script is in the repo's top one (Ship).\n () => h.contains('package.json', /\"gates:status\":\\s*\"[^\"]*(?:estiva-gates|@estiva-app\\/ui\\/dist\\/gates\\/cli\\.js)[^\"]*status/, \"gates:status runs the package's engine\"),\n () => (h.exists('scripts/gates-status.mjs') ? h.FAIL('scripts/gates-status.mjs is a copy of the status engine: run estiva-gates status instead') : h.PASS('no copy of the status engine')),\n ], 'the gate config, the hook and gates:status are the package\\'s; no copy of the engine') },\n ]),\n ]\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;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/status.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export interface GateHelpers {
|
|
|
38
38
|
protectedBranch(pattern: RegExp): CheckResult;
|
|
39
39
|
gh(args: string[], label: string): CheckResult;
|
|
40
40
|
share(files: string[], test: (file: string) => boolean, label: string): CheckResult;
|
|
41
|
+
/** Build the catalogue of the app in `appDir` (UIG-13): passes when every part is described and sorted. */
|
|
42
|
+
catalogue(appDir: string): Promise<CheckResult>;
|
|
41
43
|
}
|
|
42
44
|
export interface GateCheck {
|
|
43
45
|
what: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/gates/status.ts"],"names":[],"mappings":"AAkCA,MAAM,MAAM,WAAW,GAAG;IAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAC1F,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;AAE9B,MAAM,WAAW,SAAS;IACxB,wEAAwE;IACxE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAA;IACd,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;IACpC,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,iDAAiD;AACjD,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAA;IACjC,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAA;IACjC,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAA;IACjC,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAA;IACpC,MAAM,CAAC,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M,CAAA;IACb,uFAAuF;IACvF,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,oFAAoF;AACpF,wBAAsB,SAAS,CAAC,EAAE,IAAoB,EAAE,GAAS,EAAE,IAAY,EAAE,MAAc,EAAE,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAkFtI"}
|
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export { Property, type PropertyProps } from './Property';
|
|
|
57
57
|
export { Reaction, type ReactionProps } from './Reaction';
|
|
58
58
|
export { SearchInput, type SearchInputProps } from './SearchInput';
|
|
59
59
|
export { SectionHeader, type SectionAction, type SectionHeaderProps } from './SectionHeader';
|
|
60
|
+
export { ContainerHeader, type ContainerHeaderProps } from './ContainerHeader';
|
|
60
61
|
export { CollapsibleSection, type CollapsibleSectionProps } from './CollapsibleSection';
|
|
61
62
|
export { SectionLabel } from './SectionLabel';
|
|
62
63
|
export { Tabs, type TabDef, type TabsProps } from './Tabs';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACrG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC1F,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM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,EAAE,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC9E,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC1D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAA;AAC5G,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -678,27 +678,10 @@ function AvatarGroup({ members, size = 24 }) {
|
|
|
678
678
|
|
|
679
679
|
// src/Banner.tsx
|
|
680
680
|
import { IconX as IconX2 } from "@tabler/icons-react";
|
|
681
|
-
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
682
|
-
var TONE_STYLES = {
|
|
683
|
-
ok: "bg-success-muted text-success-default",
|
|
684
|
-
error: "bg-error-muted text-error-default",
|
|
685
|
-
info: "bg-info-muted text-info-default",
|
|
686
|
-
warning: "bg-warning-muted text-warning-default"
|
|
687
|
-
};
|
|
688
|
-
function Banner({ tone, children, onDismiss, dismissLabel = "Dismiss", className }) {
|
|
689
|
-
const role = tone === "error" ? "alert" : "status";
|
|
690
|
-
if (!onDismiss) {
|
|
691
|
-
return /* @__PURE__ */ jsx12("div", { role, className: cn("px-4 py-2 text-body-2", TONE_STYLES[tone], className), children });
|
|
692
|
-
}
|
|
693
|
-
return /* @__PURE__ */ jsxs7("div", { role, className: cn("flex items-center gap-3 px-4 py-2 text-body-2", TONE_STYLES[tone], className), children: [
|
|
694
|
-
/* @__PURE__ */ jsx12("span", { className: "min-w-0 flex-1", children }),
|
|
695
|
-
/* @__PURE__ */ jsx12(IconButton, { variant: "current", "aria-label": dismissLabel, onClick: onDismiss, className: "-mr-1 shrink-0", children: /* @__PURE__ */ jsx12(IconX2, { size: 16, stroke: 1.5 }) })
|
|
696
|
-
] });
|
|
697
|
-
}
|
|
698
681
|
|
|
699
682
|
// src/Button.tsx
|
|
700
683
|
import { Button as BaseButton3 } from "@base-ui/react/button";
|
|
701
|
-
import { jsx as
|
|
684
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
702
685
|
function Button({
|
|
703
686
|
variant = "muted",
|
|
704
687
|
size = "default",
|
|
@@ -712,7 +695,7 @@ function Button({
|
|
|
712
695
|
}) {
|
|
713
696
|
const hasLeadingIcon = !!leadingIcon;
|
|
714
697
|
const formBusy = useFormBusy();
|
|
715
|
-
const button = /* @__PURE__ */
|
|
698
|
+
const button = /* @__PURE__ */ jsxs7(
|
|
716
699
|
BaseButton3,
|
|
717
700
|
{
|
|
718
701
|
type,
|
|
@@ -759,7 +742,29 @@ function Button({
|
|
|
759
742
|
]
|
|
760
743
|
}
|
|
761
744
|
);
|
|
762
|
-
return disabledReason ? /* @__PURE__ */
|
|
745
|
+
return disabledReason ? /* @__PURE__ */ jsx12(TooltipTrigger, { label: disabledReason, children: button }) : button;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
// src/Banner.tsx
|
|
749
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
750
|
+
var TONE_STYLES = {
|
|
751
|
+
ok: "bg-success-muted text-success-default",
|
|
752
|
+
error: "bg-error-muted text-error-default",
|
|
753
|
+
info: "bg-info-muted text-info-default",
|
|
754
|
+
warning: "bg-warning-muted text-warning-default"
|
|
755
|
+
};
|
|
756
|
+
function Banner({ tone, children, icon, action, onDismiss, dismissLabel = "Dismiss", className }) {
|
|
757
|
+
const role = tone === "error" ? "alert" : "status";
|
|
758
|
+
if (!onDismiss && !icon && !action) {
|
|
759
|
+
return /* @__PURE__ */ jsx13("div", { role, className: cn("px-4 py-2 text-body-2", TONE_STYLES[tone], className), children });
|
|
760
|
+
}
|
|
761
|
+
const oneLine = Boolean(icon || action);
|
|
762
|
+
return /* @__PURE__ */ jsxs8("div", { role, className: cn("flex items-center gap-3 px-4 py-2 text-body-2", TONE_STYLES[tone], className), children: [
|
|
763
|
+
icon && /* @__PURE__ */ jsx13("span", { className: "flex shrink-0", children: icon }),
|
|
764
|
+
/* @__PURE__ */ jsx13("span", { className: cn("min-w-0 flex-1", oneLine && "truncate"), children }),
|
|
765
|
+
action && /* @__PURE__ */ jsx13(Button, { variant: "muted", size: "small", className: "shrink-0", onClick: action.onClick, children: action.label }),
|
|
766
|
+
onDismiss && /* @__PURE__ */ jsx13(IconButton, { variant: "current", "aria-label": dismissLabel, onClick: onDismiss, className: "-mr-1 shrink-0", children: /* @__PURE__ */ jsx13(IconX2, { size: 16, stroke: 1.5 }) })
|
|
767
|
+
] });
|
|
763
768
|
}
|
|
764
769
|
|
|
765
770
|
// src/Checkbox.tsx
|
|
@@ -1281,13 +1286,14 @@ var VIEWPORT_PAD3 = 8;
|
|
|
1281
1286
|
// src/EmptyState.tsx
|
|
1282
1287
|
import { IconMessage2 } from "@tabler/icons-react";
|
|
1283
1288
|
import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1284
|
-
function EmptyState({ icon, message, scope = "page", className }) {
|
|
1289
|
+
function EmptyState({ icon, message, scope = "page", action, className }) {
|
|
1285
1290
|
if (scope === "section") {
|
|
1286
1291
|
return /* @__PURE__ */ jsx20("p", { className: cn("text-caption text-text-muted", className), children: message });
|
|
1287
1292
|
}
|
|
1288
1293
|
return /* @__PURE__ */ jsxs14("div", { className: cn("flex flex-1 flex-col items-center justify-center gap-2", className), children: [
|
|
1289
1294
|
/* @__PURE__ */ jsx20("span", { className: "text-text-secondary", children: icon ?? /* @__PURE__ */ jsx20(IconMessage2, { size: 16, stroke: 1.5 }) }),
|
|
1290
|
-
/* @__PURE__ */ jsx20("p", { className: "text-body-2 text-text-secondary text-center", children: message })
|
|
1295
|
+
/* @__PURE__ */ jsx20("p", { className: "text-body-2 text-text-secondary text-center", children: message }),
|
|
1296
|
+
action && /* @__PURE__ */ jsx20(Button, { variant: "outlined", className: "mt-2", onClick: action.onClick, children: action.label })
|
|
1291
1297
|
] });
|
|
1292
1298
|
}
|
|
1293
1299
|
|
|
@@ -2741,10 +2747,24 @@ function SectionHeader({ title, chevron = false, isExpanded = true, onToggle, tr
|
|
|
2741
2747
|
);
|
|
2742
2748
|
}
|
|
2743
2749
|
|
|
2750
|
+
// src/ContainerHeader.tsx
|
|
2751
|
+
import { IconChevronDown as IconChevronDown3 } from "@tabler/icons-react";
|
|
2752
|
+
import { jsx as jsx50, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2753
|
+
function ContainerHeader({ title, chevron = false, actions, className }) {
|
|
2754
|
+
const text = typeof title === "string";
|
|
2755
|
+
return /* @__PURE__ */ jsxs34("div", { className: cn("flex h-12 shrink-0 items-center justify-between overflow-hidden border-b border-border-subtle py-2 pr-4 pl-5", className), children: [
|
|
2756
|
+
/* @__PURE__ */ jsx50("div", { className: cn("flex items-center gap-2 overflow-hidden", text ? "shrink-0" : "min-w-0 flex-1"), children: /* @__PURE__ */ jsxs34("div", { className: cn("flex items-center gap-1", text ? "shrink-0" : "min-w-0 flex-1"), children: [
|
|
2757
|
+
text ? /* @__PURE__ */ jsx50("span", { className: "whitespace-nowrap text-body-2-strong text-text-primary", children: title }) : /* @__PURE__ */ jsx50("div", { className: "min-w-0 flex-1", children: title }),
|
|
2758
|
+
chevron && /* @__PURE__ */ jsx50(IconChevronDown3, { size: 12, stroke: 1.5, className: "shrink-0 text-text-secondary" })
|
|
2759
|
+
] }) }),
|
|
2760
|
+
actions && /* @__PURE__ */ jsx50("div", { className: "flex shrink-0 items-center justify-end gap-3", children: /* @__PURE__ */ jsx50("div", { className: "flex shrink-0 items-center gap-1", children: actions }) })
|
|
2761
|
+
] });
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2744
2764
|
// src/CollapsibleSection.tsx
|
|
2745
2765
|
import { useState as useState7 } from "react";
|
|
2746
2766
|
import { Collapsible } from "@base-ui/react/collapsible";
|
|
2747
|
-
import { jsx as
|
|
2767
|
+
import { jsx as jsx51, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
2748
2768
|
var OPEN = "open";
|
|
2749
2769
|
var CLOSED = "closed";
|
|
2750
2770
|
function readStored(key) {
|
|
@@ -2771,14 +2791,14 @@ function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenC
|
|
|
2771
2791
|
writeStored(storageKey, next);
|
|
2772
2792
|
onOpenChange?.(next);
|
|
2773
2793
|
};
|
|
2774
|
-
return /* @__PURE__ */
|
|
2775
|
-
/* @__PURE__ */
|
|
2776
|
-
/* @__PURE__ */
|
|
2794
|
+
return /* @__PURE__ */ jsxs35(Collapsible.Root, { open, onOpenChange: setOpen, className: cn("flex flex-col", className), children: [
|
|
2795
|
+
/* @__PURE__ */ jsx51(SectionHeader, { title, chevron: true, isExpanded: open, trailing, actions, showActions, className: "shrink-0", render: /* @__PURE__ */ jsx51(Collapsible.Trigger, {}) }),
|
|
2796
|
+
/* @__PURE__ */ jsx51(
|
|
2777
2797
|
Collapsible.Panel,
|
|
2778
2798
|
{
|
|
2779
2799
|
hiddenUntilFound: true,
|
|
2780
2800
|
className: "h-[var(--collapsible-panel-height)] overflow-hidden transition-[height] duration-150 ease-out motion-reduce:transition-none data-[starting-style]:h-0 data-[ending-style]:h-0",
|
|
2781
|
-
children: /* @__PURE__ */
|
|
2801
|
+
children: /* @__PURE__ */ jsx51("div", { className: cn("flex flex-col", contentClassName), children })
|
|
2782
2802
|
}
|
|
2783
2803
|
)
|
|
2784
2804
|
] });
|
|
@@ -2786,9 +2806,9 @@ function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenC
|
|
|
2786
2806
|
|
|
2787
2807
|
// src/Tabs.tsx
|
|
2788
2808
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
2789
|
-
import { jsx as
|
|
2809
|
+
import { jsx as jsx52, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
2790
2810
|
function Tabs({ tabs, active, onChange, size = "default", className, ...aria }) {
|
|
2791
|
-
return /* @__PURE__ */
|
|
2811
|
+
return /* @__PURE__ */ jsx52(
|
|
2792
2812
|
BaseTabs.Root,
|
|
2793
2813
|
{
|
|
2794
2814
|
value: active,
|
|
@@ -2796,14 +2816,14 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
2796
2816
|
if (details.reason === "none") onChange(value);
|
|
2797
2817
|
},
|
|
2798
2818
|
className,
|
|
2799
|
-
children: /* @__PURE__ */
|
|
2819
|
+
children: /* @__PURE__ */ jsx52(
|
|
2800
2820
|
BaseTabs.List,
|
|
2801
2821
|
{
|
|
2802
2822
|
activateOnFocus: true,
|
|
2803
2823
|
"aria-label": aria["aria-label"],
|
|
2804
2824
|
"aria-labelledby": aria["aria-labelledby"],
|
|
2805
2825
|
className: "flex items-center gap-2",
|
|
2806
|
-
children: tabs.map((tab) => /* @__PURE__ */
|
|
2826
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsxs36(
|
|
2807
2827
|
BaseTabs.Tab,
|
|
2808
2828
|
{
|
|
2809
2829
|
value: tab.id,
|
|
@@ -2816,9 +2836,9 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
2816
2836
|
),
|
|
2817
2837
|
children: [
|
|
2818
2838
|
tab.icon,
|
|
2819
|
-
/* @__PURE__ */
|
|
2839
|
+
/* @__PURE__ */ jsxs36("span", { className: "flex items-baseline", children: [
|
|
2820
2840
|
tab.label,
|
|
2821
|
-
tab.count !== void 0 ? /* @__PURE__ */
|
|
2841
|
+
tab.count !== void 0 ? /* @__PURE__ */ jsx52("span", { className: "ml-2.5 font-mono text-caption tabular-nums text-text-secondary", children: tab.count }) : null
|
|
2822
2842
|
] })
|
|
2823
2843
|
]
|
|
2824
2844
|
},
|
|
@@ -2834,7 +2854,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
2834
2854
|
import { createContext as createContext5, useContext as useContext5, useMemo as useMemo4 } from "react";
|
|
2835
2855
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
2836
2856
|
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck, IconCircleX } from "@tabler/icons-react";
|
|
2837
|
-
import { jsx as
|
|
2857
|
+
import { jsx as jsx53, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
2838
2858
|
var SURFACE_STYLES = {
|
|
2839
2859
|
success: "bg-success-muted signal:bg-bg-inset signal:border signal:border-border-default signal:shadow-md",
|
|
2840
2860
|
brand: "bg-accent-muted signal:bg-bg-inset signal:border signal:border-border-default signal:shadow-md",
|
|
@@ -2870,16 +2890,16 @@ var pillClassName = (type, hasAction, className) => cn(
|
|
|
2870
2890
|
);
|
|
2871
2891
|
function LeadingIcon({ type }) {
|
|
2872
2892
|
const Icon = ICONS[type];
|
|
2873
|
-
return /* @__PURE__ */
|
|
2893
|
+
return /* @__PURE__ */ jsx53(Icon, { size: 16, stroke: 1.5, className: cn("text-text-primary shrink-0", ICON_STYLES[type]) });
|
|
2874
2894
|
}
|
|
2875
2895
|
function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAction, className }) {
|
|
2876
2896
|
const hasAction = !!(actionLabel && onAction);
|
|
2877
|
-
return /* @__PURE__ */
|
|
2878
|
-
/* @__PURE__ */
|
|
2879
|
-
leadingIcon && /* @__PURE__ */
|
|
2880
|
-
/* @__PURE__ */
|
|
2897
|
+
return /* @__PURE__ */ jsxs37("div", { className: pillClassName(type, hasAction, className), children: [
|
|
2898
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
2899
|
+
leadingIcon && /* @__PURE__ */ jsx53(LeadingIcon, { type }),
|
|
2900
|
+
/* @__PURE__ */ jsx53("span", { className: LABEL_CLASSES, children: label })
|
|
2881
2901
|
] }),
|
|
2882
|
-
hasAction && /* @__PURE__ */
|
|
2902
|
+
hasAction && /* @__PURE__ */ jsx53(Button, { variant: "outlined", size: "small", onClick: onAction, children: actionLabel })
|
|
2883
2903
|
] });
|
|
2884
2904
|
}
|
|
2885
2905
|
var ToastContext = createContext5(null);
|
|
@@ -2900,9 +2920,9 @@ function ToastProvider({ children }) {
|
|
|
2900
2920
|
}),
|
|
2901
2921
|
[manager]
|
|
2902
2922
|
);
|
|
2903
|
-
return /* @__PURE__ */
|
|
2923
|
+
return /* @__PURE__ */ jsx53(ToastContext.Provider, { value, children: /* @__PURE__ */ jsxs37(BaseToast.Provider, { toastManager: manager, limit: VISIBLE_TOASTS, children: [
|
|
2904
2924
|
children,
|
|
2905
|
-
/* @__PURE__ */
|
|
2925
|
+
/* @__PURE__ */ jsx53(BaseToast.Portal, { children: /* @__PURE__ */ jsx53(BaseToast.Viewport, { className: "fixed bottom-4 left-4 z-[100] flex flex-col-reverse items-start gap-2 pointer-events-none", children: /* @__PURE__ */ jsx53(ToastList, {}) }) })
|
|
2906
2926
|
] }) });
|
|
2907
2927
|
}
|
|
2908
2928
|
function ToastList() {
|
|
@@ -2910,25 +2930,25 @@ function ToastList() {
|
|
|
2910
2930
|
return toasts.map((toast) => {
|
|
2911
2931
|
const type = toast.type ?? "neutral";
|
|
2912
2932
|
const { leadingIcon = true, actionLabel, onAction } = toast.data ?? {};
|
|
2913
|
-
return /* @__PURE__ */
|
|
2933
|
+
return /* @__PURE__ */ jsxs37(
|
|
2914
2934
|
BaseToast.Root,
|
|
2915
2935
|
{
|
|
2916
2936
|
toast,
|
|
2917
2937
|
swipeDirection: ["left", "down"],
|
|
2918
2938
|
className: pillClassName(type, !!actionLabel, "pointer-events-auto data-[limited]:hidden"),
|
|
2919
2939
|
children: [
|
|
2920
|
-
/* @__PURE__ */
|
|
2921
|
-
leadingIcon && /* @__PURE__ */
|
|
2922
|
-
/* @__PURE__ */
|
|
2940
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
2941
|
+
leadingIcon && /* @__PURE__ */ jsx53(LeadingIcon, { type }),
|
|
2942
|
+
/* @__PURE__ */ jsx53(BaseToast.Title, { render: /* @__PURE__ */ jsx53("span", {}), className: LABEL_CLASSES })
|
|
2923
2943
|
] }),
|
|
2924
|
-
actionLabel && /* @__PURE__ */
|
|
2944
|
+
actionLabel && /* @__PURE__ */ jsx53(
|
|
2925
2945
|
BaseToast.Action,
|
|
2926
2946
|
{
|
|
2927
2947
|
onClick: () => {
|
|
2928
2948
|
onAction?.();
|
|
2929
2949
|
close(toast.id);
|
|
2930
2950
|
},
|
|
2931
|
-
render: /* @__PURE__ */
|
|
2951
|
+
render: /* @__PURE__ */ jsx53(Button, { variant: "outlined", size: "small", children: actionLabel })
|
|
2932
2952
|
}
|
|
2933
2953
|
)
|
|
2934
2954
|
]
|
|
@@ -2962,6 +2982,7 @@ export {
|
|
|
2962
2982
|
CommandPaletteSearch,
|
|
2963
2983
|
CommandPaletteWorking,
|
|
2964
2984
|
ConfirmDialog,
|
|
2985
|
+
ContainerHeader,
|
|
2965
2986
|
DialogShell,
|
|
2966
2987
|
Divider,
|
|
2967
2988
|
EditableText,
|