diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..edbf02d --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ + +# Generated from the committed Impression package; verify snapshot hashes. +packages/ui/ diff --git a/AGENTS.md b/AGENTS.md index dbc40a7..f15796c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,13 +1,13 @@ # Repository instructions -This package-only repository owns the Notenv and CTX9 application design system and shared browser identity protocol. Shared packages are Apache-2.0 and new releases target public npm; publication readiness and source visibility are recorded in `docs/public-distribution.md`. +This package-only repository publishes the Notenv and CTX9 application design system and owns the shared browser identity protocol. UI source is edited in Impression at `packages/ui`; this repository retains reviewed public release snapshots. Shared packages are Apache-2.0 and new releases target public npm; publication readiness and source visibility are recorded in `docs/public-distribution.md`. `@ctx9/identity` reuses the Better Auth authority with application-owned PostgreSQL, enrollment/recovery authorization, credential-event persistence and membership resolution. Keep private Platform provisioning and installation data in its adapter. Read `docs/identity-authority.md` before changing that boundary. - Always work on master unless instructed not to. - Read `docs/style-guide.md`, `docs/component-inventory.md`, `docs/error-handling.md`, `docs/source-provenance.md`, and `docs/package-release.md` before changing public exports. - Shared internal UI uses Impression's semantic light and dark themes. CTX9 applications may default to dark, but they do not own a separate CTX9 theme. -- Impression internal components and style policy are the canonical source for `@ctx9/ui`. Never import Impression at runtime or copy Impression public-marketing and product-specific components. +- Edit `@ctx9/ui` in Impression `packages/ui`. Prepare a snapshot from an exact committed revision with Impression `pnpm ui:export`, then review it here. Never hand-edit snapshot components, import Impression at runtime, or copy public-marketing or product-specific components. - Non-trivial UI work requires Matt's explicit direction before changing real components. The phase 3 shared UI consolidation plan is that direction for the Impression-aligned replacement. - Keep `@ctx9/web-auth` framework-neutral. Persistence stays behind injected interfaces; applications keep separate clients, databases, cookies, and authorization policy. - Never add parent-domain cookies, browser bearer-token storage, callback transaction material in logs, or shared session persistence. diff --git a/docs/package-release.md b/docs/package-release.md index 2cdd4bb..fcb387c 100644 --- a/docs/package-release.md +++ b/docs/package-release.md @@ -1,5 +1,31 @@ # Package release and consumption +## Preparing UI snapshots + +Impression `packages/ui` is the authoritative editable UI source. Its workspace +consumer needs no public release. Other applications retain exact npm versions +and use those versions in development and production. + +After committing UI changes in Impression, run: + +```sh +pnpm ui:export --ref --out --version +``` + +Review the staged allowlisted UI files in a ctx9-web release branch. The exporter +records the source revision and SHA-256 file hashes in `snapshot.json`; it removes +the local private flag, selects the public version and adds the archive build +hook. Replace the UI snapshot as a whole, including removal of retired files. +Do not copy private application files, history, credentials or build artifacts. +Do not edit generated UI components here or automatically sync every app push. + +Keep all three public package versions aligned under the existing release policy. +Run complete checks and isolated archive installation. Matt must confirm before +publishing through the protected immutable tag workflow below. A snapshot import +or package release does not deploy applications. Identity and web-auth continue +to be developed here. The retired sibling-development helper requires a breaking +public release when its removal is first published; do not reuse version 10.1.0. + ## 10.1.0 Button hover and chat icon Every Button variant exposes `group/btn`, including native buttons, `href` @@ -82,7 +108,7 @@ three packages match the retained CI bytes; Cosign verifies their provenance against the exact workflow, tag and source commit. See the [read-back receipt](evidence/public-npm-9.3.1-2026-10-21.json). -GitHub `ContextNine/ctx9-web` is the canonical source. New releases beginning with the public-distribution candidate 9.0.1 target public npm through `.github/workflows/publish.yml`. GitLab continues to check mirrored refs and retains historical private releases. It does not publish new versions. See [public distribution](public-distribution.md) for publication requirements and current acceptance state. +GitHub `ContextNine/ctx9-web` is the public release source; UI implementation is owned by Impression `packages/ui`. New releases beginning with the public-distribution candidate 9.0.1 target public npm through `.github/workflows/publish.yml`. GitLab continues to check mirrored refs and retains historical private releases. It does not publish new versions. See [public distribution](public-distribution.md) for publication requirements and current acceptance state. The historical private-release procedures and evidence below describe versions through 9.0.0. They are not the publication procedure for new versions. diff --git a/docs/source-provenance.md b/docs/source-provenance.md index f78c139..0496450 100644 --- a/docs/source-provenance.md +++ b/docs/source-provenance.md @@ -2,6 +2,10 @@ Reference repository: Impression +From the workspace migration onward, editable UI source lives in Impression +`packages/ui`. Future imports include `packages/ui/snapshot.json` with the exact +source commit and file hashes. Historical provenance below remains retained. + NewChatIcon moves Impression `f58e456c`'s Lucide square pen into the shared package. The 2.5 stroke, visible overflow, full-contrast hover colour and reduced-motion colour-only behavior are retained. Matt's November 23 request diff --git a/eslint.config.js b/eslint.config.js index 561a959..f461a88 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -10,6 +10,9 @@ export default defineConfig( "**/coverage/**", "**/*.d.ts", "**/tailwind.config.cjs", + "packages/ui/*config.js", + "packages/ui/vitest.config.ts", + "packages/ui/scripts/**", ], }, eslint.configs.recommended, diff --git a/package.json b/package.json index 652a6d5..0756ad7 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "styles:check": "tsx scripts/check-styles.ts", "test": "vitest run", "typecheck": "pnpm --recursive typecheck", - "check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm build && pnpm test && pnpm styles:check && pnpm packages:check && pnpm provenance:check && pnpm archives:check && pnpm install:check" + "check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm build && pnpm test && pnpm styles:check && pnpm packages:check && pnpm snapshot:check && pnpm provenance:check && pnpm archives:check && pnpm install:check", + "snapshot:check": "tsx scripts/check-ui-snapshot.ts" }, "devDependencies": { "@eslint/js": "9.39.1", diff --git a/packages/ui/README.md b/packages/ui/README.md index f5e05c3..c2053d5 100644 --- a/packages/ui/README.md +++ b/packages/ui/README.md @@ -2,19 +2,12 @@ Impression-aligned controls and application compositions for internal products, with one light theme and one dark theme. Import `@ctx9/ui/styles.css` exactly once in the application root. -Licensed under Apache-2.0, published on public npm. See `NOTICE`, `THIRD_PARTY_NOTICES.md` and `dist/fonts/licenses/` for bundled third-party attribution. Source and release acceptance are at [ContextNine/ctx9-web](https://github.com/ContextNine/ctx9-web). +Licensed under Apache-2.0, published on public npm. See `NOTICE`, `THIRD_PARTY_NOTICES.md` and `dist/fonts/licenses/` for bundled third-party attribution. Editable source lives in Impression at `packages/ui`. Public release snapshots and release acceptance are at [ContextNine/ctx9-web](https://github.com/ContextNine/ctx9-web). ```tsx -import "@ctx9/ui/styles.css"; -import { - ApplicationLayout, - AuthShell, - Button, - DataTable, - Input, - NavigationProvider, - NewChatIcon, -} from "@ctx9/ui"; +import '@ctx9/ui/styles.css'; + +import { ApplicationLayout, AuthShell, Button, DataTable, Input, NavigationProvider, NewChatIcon } from '@ctx9/ui'; ``` The package owns: diff --git a/packages/ui/SOURCE.md b/packages/ui/SOURCE.md new file mode 100644 index 0000000..37ff46f --- /dev/null +++ b/packages/ui/SOURCE.md @@ -0,0 +1,7 @@ +# Source + +Imported from ContextNine/ctx9-web, `packages/ui`, commit +`b10204c5dfcb826afe08a5c1cbc2544fcb7d2fd8`, version 10.1.0. + +This directory is now the authoritative editable UI source. Public release snapshots +are prepared explicitly in ctx9-web. Preserve the licenses and notices. diff --git a/packages/ui/eslint.config.js b/packages/ui/eslint.config.js new file mode 100644 index 0000000..84fe016 --- /dev/null +++ b/packages/ui/eslint.config.js @@ -0,0 +1,26 @@ +import eslint from '@eslint/js'; +import { defineConfig } from 'eslint/config'; +import tseslint from 'typescript-eslint'; + +export default defineConfig( + { + ignores: ['**/dist/**', '**/.ctx9-ui-dev/**', '**/coverage/**', '**/*.d.ts', '**/tailwind.config.cjs'], + }, + eslint.configs.recommended, + ...tseslint.configs.strictTypeChecked, + ...tseslint.configs.stylisticTypeChecked, + { + languageOptions: { + parserOptions: { + projectService: { + allowDefaultProject: ['eslint.config.js', 'postcss.config.js', 'vitest.config.ts', 'scripts/*.mjs'], + }, + tsconfigRootDir: import.meta.dirname, + }, + }, + rules: { + '@typescript-eslint/consistent-type-imports': 'error', + '@typescript-eslint/no-explicit-any': 'error', + }, + }, +); diff --git a/packages/ui/package.json b/packages/ui/package.json index 8b62ef8..a7f9e11 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -2,28 +2,17 @@ "name": "@ctx9/ui", "version": "10.1.0", "description": "Shared Impression and CTX9 internal application UI", - "license": "Apache-2.0", "repository": { "type": "git", "url": "git+https://github.com/ContextNine/ctx9-web.git", "directory": "packages/ui" }, - "type": "module", + "license": "Apache-2.0", "sideEffects": [ "./dist/styles.css" ], - "files": [ - "dist", - "README.md", - "LICENSE", - "NOTICE", - "THIRD_PARTY_NOTICES.md" - ], + "type": "module", "exports": { - "./dev": { - "types": "./dist/dev.d.ts", - "default": "./dist/dev.js" - }, "./style-policy": { "types": "./dist/style-policy.d.ts", "default": "./dist/style-policy.js" @@ -35,27 +24,33 @@ "./styles.css": "./dist/styles.css", "./icon.svg": "./dist/assets/icon.svg" }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, "bin": { - "ctx9-ui-dev": "./dist/dev-cli.js", "ctx9-ui-style-check": "./dist/style-policy-cli.js" }, + "files": [ + "dist", + "README.md", + "LICENSE", + "NOTICE", + "THIRD_PARTY_NOTICES.md" + ], "scripts": { - "build": "pnpm clean && tsc -p tsconfig.build.json && tailwindcss -c tailwind.config.cjs -i src/styles.css -o dist/styles.css --postcss ../../postcss.config.js --no-autoprefixer --minify && mkdir -p dist/assets dist/fonts && cp src/assets/icon.svg dist/assets/icon.svg && cp -R src/fonts/. dist/fonts/", + "build": "tsc -p tsconfig.build.json && pnpm run build:css && node scripts/copy-assets.mjs", + "build:css": "tailwindcss -c tailwind.config.cjs -i src/styles.css -o dist/styles.css --postcss postcss.config.js --no-autoprefixer --minify", + "check": "pnpm typecheck && pnpm lint && pnpm build && pnpm test:unit && node scripts/check-package.mjs", "clean": "rm -rf dist", - "prepack": "pnpm build", - "typecheck": "tsc -p tsconfig.json --noEmit" + "format": "prettier --check .", + "lint": "eslint src", + "test:unit": "vitest run", + "typecheck": "tsc -p tsconfig.json --noEmit", + "prepack": "pnpm clean && pnpm build" }, "dependencies": { - "typescript": "5.9.3", "@radix-ui/react-alert-dialog": "1.1.15", "@radix-ui/react-avatar": "1.1.2", + "@radix-ui/react-checkbox": "1.3.3", "@radix-ui/react-collapsible": "1.1.12", "@radix-ui/react-context-menu": "2.2.16", - "@radix-ui/react-checkbox": "1.3.3", "@radix-ui/react-dialog": "1.1.15", "@radix-ui/react-dropdown-menu": "2.1.16", "@radix-ui/react-label": "2.1.8", @@ -74,33 +69,47 @@ "cmdk": "1.1.1", "date-fns": "4.1.0", "framer-motion": "12.23.24", + "lucide-react": "0.546.0", "motion-dom": "12.23.23", "motion-utils": "12.23.6", - "lucide-react": "0.546.0", - "react-day-picker": "9.11.1", + "radix-ui": "1.4.3", "react-colorful": "5.6.1", + "react-day-picker": "9.11.1", "react-hook-form": "7.66.1", "react-resizable-panels": "3.0.6", - "radix-ui": "1.4.3", "recharts": "3.8.1", "sonner": "1.7.4", - "tailwind-merge": "3.4.0" - }, - "engines": { - "node": "^22.16.0 || ^24.21.0 || ^26.11.1" - }, - "peerDependencies": { - "react": "19.1.0", - "react-dom": "19.1.0" + "tailwind-merge": "3.4.0", + "typescript": "5.9.3" }, "devDependencies": { + "@eslint/js": "9.39.1", "@testing-library/react": "16.2.0", "@testing-library/user-event": "14.6.4", + "@types/node": "22.19.1", "@types/react": "19.1.17", "@types/react-dom": "19.1.11", + "autoprefixer": "10.4.22", + "eslint": "9.39.1", "jsdom": "30.0.1", + "postcss": "8.5.18", "react": "19.1.0", "react-dom": "19.1.0", + "tailwindcss": "3.4.17", + "tailwindcss-animate": "1.0.7", + "typescript-eslint": "8.67.0", + "vitest": "4.1.10", "vitest-axe": "0.1.0" + }, + "peerDependencies": { + "react": "19.1.0", + "react-dom": "19.1.0" + }, + "engines": { + "node": "^22.16.0 || ^24.21.0 || ^26.11.1" + }, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" } } diff --git a/packages/ui/postcss.config.js b/packages/ui/postcss.config.js new file mode 100644 index 0000000..5242ed4 --- /dev/null +++ b/packages/ui/postcss.config.js @@ -0,0 +1,9 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: { + // Impression's Next 15 CSS targets, not the CLI's bundled prefixer defaults. + overrideBrowserslist: ['chrome 64', 'edge 79', 'firefox 67', 'opera 51', 'safari 12'], + }, + }, +}; diff --git a/packages/ui/scripts/check-package.mjs b/packages/ui/scripts/check-package.mjs new file mode 100644 index 0000000..f8b0c19 --- /dev/null +++ b/packages/ui/scripts/check-package.mjs @@ -0,0 +1,27 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { readFile } from 'node:fs/promises'; + +const fonts = { + 'geist-sans-variable.woff2': '46525b05bbf4527d263f8624ca7024c7d0dce3c64430267d30c31c6dd3821e4d', + 'inter-normal-variable.ttf': '29160a80ff49ddcab2c97711247e08b1fab27a484a329ce8b813d820dc559031', + 'jetbrains-mono-latin-variable.woff2': '18be452724bfdc236c074ca94a249a7f41a86752c7d04ab258ce9ed5651f6a7e', +}; +for (const [name, expected] of Object.entries(fonts)) { + assert.equal( + createHash('sha256') + .update(await readFile(`dist/fonts/${name}`)) + .digest('hex'), + expected, + name, + ); +} +for (const name of ['geist', 'inter', 'jetbrains-mono']) { + assert.match(await readFile(`dist/fonts/licenses/${name}-ofl.txt`, 'utf8'), /SIL OPEN FONT LICENSE/); +} +for (const name of ['LICENSE', 'NOTICE', 'THIRD_PARTY_NOTICES.md', 'dist/assets/icon.svg', 'dist/styles.css']) { + assert.ok((await readFile(name)).length, name); +} +const entry = await readFile('dist/button.js', 'utf8'); +assert.match(entry, /["']use client["']/); +console.log('UI package assets, licenses and client entry passed'); diff --git a/packages/ui/scripts/copy-assets.mjs b/packages/ui/scripts/copy-assets.mjs new file mode 100644 index 0000000..45bdcf6 --- /dev/null +++ b/packages/ui/scripts/copy-assets.mjs @@ -0,0 +1,5 @@ +import { cp, mkdir } from 'node:fs/promises'; + +await mkdir('dist/assets', { recursive: true }); +await cp('src/assets', 'dist/assets', { recursive: true }); +await cp('src/fonts', 'dist/fonts', { recursive: true }); diff --git a/packages/ui/snapshot.json b/packages/ui/snapshot.json new file mode 100644 index 0000000..ddd6083 --- /dev/null +++ b/packages/ui/snapshot.json @@ -0,0 +1,111 @@ +{ + "source": "Impression packages/ui", + "commit": "e658edcec5f5dd61b42d8c009e5c7253f871e5cd", + "version": "10.1.0", + "manifestChanges": [ + "private removed", + "version selected", + "prepack cleans and builds archive" + ], + "files": { + "LICENSE": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "NOTICE": "5452952b4f6ea71b97d27c3e096eed9e4c6bd956bbfa51903264c9c5d958c696", + "README.md": "465dd9e3169c7c27853934cdc039187fecb4d85d69aaa6872b8ca2710c6e743e", + "SOURCE.md": "0ce76d5c94a61739c65e589763a2a869a5d1cd7d6924dc4f60e12cd188dc285a", + "THIRD_PARTY_NOTICES.md": "9e51130c5594a59614b4580c99e3771f4e36df0ae024b3702354796cd3bc7c73", + "eslint.config.js": "0f73e58aa585e23eef95ec2e13b48d5850873056a0e783747303c94f2a874aed", + "package.json": "a68c75eaa5f898b8a7e5e0b0155103608b9a441b8962a053c765b5f7dcce5eed", + "postcss.config.js": "0e436940a2dc70c8c9d769b04fc44cc7a559a4019be4220a580c256428fd4de6", + "scripts/check-package.mjs": "92eb414e6ec7b24e05f3b0dcebb16c581bc5d67e6c7387c955f0b2202d698641", + "scripts/copy-assets.mjs": "82c40ae12f44af2213ce3427a3189dbf1f31e6516d4ea2b93b597bf79ffb76b1", + "src/alert-dialog.tsx": "1a038f9d0776457b3ae647834b9e05e296289dc9d97a79091adc463fafe439ae", + "src/alert.tsx": "1c67097ed3ecc372c2c9d709392ecc60f55d81d3cf8b41b39965a436c198465e", + "src/applications.ts": "1d21091222a59e1fdf4d0e2a9e89188accd30eec796a70f0ebe4841101e3bdc6", + "src/assets/icon.svg": "97eb91e24f9168b318d774eb34d582e112334c19c447bc1d29abb9a1de2b5835", + "src/assistant-choice-option.tsx": "a2074432545a88a07ae4ac9a25754158b2a9f5f2b968531528782e654c8c3927", + "src/assistant-question-field.tsx": "4ceee18356a44aa3d3a65e79da7cec6764eebd1b49943a22513589ecd931d289", + "src/avatar.tsx": "c71dc2c3d37ede8f2c6d06715ddfb840b56bef31cf0c0a342b05d11bb27e4142", + "src/badge.tsx": "ca7662fcfa120d04a955554d743b983b56ee6c42f512ca01cdca889c0a456b06", + "src/bottom-gradient.tsx": "0db2ba6b2edb8e6006cf04b363e469087c7109909e3702ae2d10c3ea43727f9f", + "src/breadcrumb.tsx": "85dbb83e0376f3564ac94fc8389b8b412e654d6f7b755b38361c5c9a55f51aa3", + "src/button.tsx": "8061aaaa1e8dbfa67e71649c7128c2bb096a6145544516f6931f189034bdee7b", + "src/card-tile.ts": "4378f4d286e6eabe5b036a77500b8b4631352629528f540f14f2b378739398ea", + "src/card.tsx": "f8d52446f928f64f4aec4a13b3910377e013677cdf649b2ac9e93b100c5dbf8b", + "src/chart.tsx": "92574cac29e3c960703b19a18f3ec69b7a5f942d84a3a7b2b3e7c83d1af5ca24", + "src/checkbox.tsx": "37dc3d1395961f7d088195b0d4f5440112715bbd4a8d4d1b49471ca279ff801a", + "src/cn.ts": "a57311276ac7a1a9a907904eeb60205261576958a68e87b016087b3554372726", + "src/collapsible.tsx": "00138abc7c57e142424fbf429ba5950f5d2306f5523be9c0466affcef882660b", + "src/color-picker.tsx": "97f6832e49595284662e1c370196fcaf6647733d0eeace9aba71f57e601d9825", + "src/color-swatch.tsx": "acce41703ae0d57f095f6ec04dd6205ed464bcae7e26333fbeb5c9acbfe98ce0", + "src/command.tsx": "4a96f4455ce0aaaf8ab91b0e3efc9406791ef9f7c6b2d5aa0aa747f7fc29b2ed", + "src/common.ts": "9eb42bd2604006ed26e9497ff8817a4ec0a855e9ce852209043bc1c120af381c", + "src/context-menu.tsx": "6c96e91054148bbc82b2768d31176d3e6be70e4f02898013960d7de06ef2753f", + "src/control-glow.tsx": "b29e69310e1763f7b1cb0c5b3da392002e2e1f995bd4af9e5d153c8984348833", + "src/control-shape.ts": "c7f852e0e6016a9d6cf9fd8554a12894c9e54da2f3f701260bcfaa1400b9e6bc", + "src/control-variants.ts": "cfd6cf3c402f741fea0c6ffb77def4d4088629f2363cd8e2a6a702375b016425", + "src/data-table.tsx": "0cd460a79f6648d3ad0ee40f0495115979c3ef7ea5460b3c8bd96ebadfeeb1f1", + "src/date-time.tsx": "1c9c8aa12f0b21e46b65a458117abcbbb6eb47ea3e17671d9565ea82fd59f2fd", + "src/dialog.tsx": "7f4adff6d98e3e9cb6cea97d48d9ea43415fbe34658a8c066be16a72b7a840d0", + "src/dropdown-menu.tsx": "6d7f4edddec47e90c669f2fe264748f219004c10537e53a6461c15eff014678f", + "src/error.ts": "0a1b1abb42db000ce314eda75147123c9655a32e4f208f390296ef3953e0215b", + "src/feedback.tsx": "689b822779a7cca940d6d4b5f80029d3efe8b84b3e25f9a26d3fdd9429c48cad", + "src/fonts/geist-sans-variable.woff2": "46525b05bbf4527d263f8624ca7024c7d0dce3c64430267d30c31c6dd3821e4d", + "src/fonts/inter-normal-variable.ttf": "29160a80ff49ddcab2c97711247e08b1fab27a484a329ce8b813d820dc559031", + "src/fonts/jetbrains-mono-latin-variable.woff2": "18be452724bfdc236c074ca94a249a7f41a86752c7d04ab258ce9ed5651f6a7e", + "src/fonts/licenses/geist-ofl.txt": "930853ee1daa68554d9e35c8a9175affb74f699fad9a5da6ee5ebe76379d9137", + "src/fonts/licenses/inter-ofl.txt": "5b9321a4298cfeb6b34354164a1c3afc3db114569984c502b9b35d988fd58c57", + "src/fonts/licenses/jetbrains-mono-ofl.txt": "403581b69dac5cff4079205e01c6b467e56af449ecbd7247693ddb1baafa005b", + "src/form.tsx": "e86bed2cb95297710060728c6ce5758ba9f6e9a389528ca83d53a1d161640b2a", + "src/format.ts": "bc51048bca9e68970c30923de4006687a86d475a6de39c03121accd9a7ce5b57", + "src/funky-loader-button.tsx": "ac61999cb42dacb0f9c1e9dfccc59ed84897e5b633d25fc84bf9c776ba74657f", + "src/icon-button.tsx": "b519e7e2067c4949c0854342834021dcf343b7f6b68ca38805f2695d4f1a5cec", + "src/impression-recipes.ts": "7a2772ae2a6ea3b7bf5291351c46649d01ea56ebd5292a8ec87c1cedf3892613", + "src/index.ts": "f76e5d42fd0583ff9afe6ed1e4529779a606c4702985aacd4ef6452e74429d24", + "src/input.tsx": "8c1bb0de4f46f96c230966223243396434e2f1b9af6771d683d0b2c32a956088", + "src/label.tsx": "e569d450787c7858893c3e63b34974f24a5c87fb493f51a7ee4900177f05fdb7", + "src/link-tabs.tsx": "d551e06f55897f24d3d358dfdd1ca51a1635739ba797f9edf71a5ce52162f209", + "src/menu-variants.ts": "ea0db64832628129b4bd129a7c29d3b5e9c1533b8cadafb51539848a29c84342", + "src/multiple-selector.integration.test.tsx": "e95a0bdc5a04cd82ba91393274347a63888724d637aa05e3f261b10e90452b26", + "src/multiple-selector.tsx": "15df19291cf90740a4c9ba85bfa0f4a21d0991bd6bcd6a2b51da5e0ca2d62f62", + "src/navigation-row.tsx": "e5884c4b74e5760f2ce760f1b85f573c81f0d7f560352a01537833669f925fb2", + "src/navigation.tsx": "da5b9cbc4e559759efb7ecc497947fdc1f50cc9d86865f3760a9893b07fc93df", + "src/new-chat-icon.tsx": "6229a41c0426a7dcec2b00bac48b92acafc740b7177d62f33b12b3e62b5304a5", + "src/number-select.tsx": "0cbbf1b19fb5c68d77873ae38d08b60b48420fae970a52ef5896a0e31ebaab5a", + "src/page-layout.tsx": "5bb51fdbd8a0b668bc4208c1b8ef683e09f53bdb4317185c5bc316b2eca1f076", + "src/pagination.tsx": "f9c6a4614ec8928ee1f8b388aeca59d84c4c5dc8514798258bee46700aa88b35", + "src/popover.tsx": "53a559bd471f8403126eef93b4e4beffaacdc9aa398e471ff07693068a5d4e17", + "src/portal-boundary.tsx": "ad555068bc554d03bd4542a477ee7f4ff9968e194b3729156aa94979b492c0df", + "src/resizable.tsx": "b861b89f17694fc9a2c069df2cbd32b298da6059d8c4eaf031b8d2c85f42eada", + "src/scroll-area.tsx": "9f35054ac2729fc1362d5c965f87d763e1830a8cdf363d895d30cab460c1a48a", + "src/select.tsx": "46f9e2fe74d2b5731f4ba6ee51428c666af8d29b167222db5c319c438b1b6365", + "src/selection-button.tsx": "b7dea0d02845372009c87936338368299c9dec60b7b8399904c5b6337b363282", + "src/separator.tsx": "1c7c8832f8801082df9766d44ed01364554e9b58c502962edbdc7d647d63efc3", + "src/settings-dialog.tsx": "634f826f0e99d5181c183d37ce354784c6cda370dd87d6b5bc6e210bea00800c", + "src/sheet.tsx": "3270ed00f363c97838fd5689e2e6aa93e49a5a1381cb64a3a7eed1a099ee34e2", + "src/shell.tsx": "ca60c7da957bf653962351f6bf6e84bafdd7a2f8d108bb96737d682b19bfc62d", + "src/shimmer-border-button.tsx": "a880d766ccf5ca4edd58e15c672a5d2a77da093f704309479ae57355a28b667e", + "src/sidebar.tsx": "6d073c7bbafdd0e4ae7b8b8120425c7e2dd5fc52afe8851eda46d739300bdd88", + "src/skeleton.tsx": "da0ae3246c3103a19204a4c7fe67ab3dbfe42cc8f27590b1c3fa7b53d5e0a456", + "src/sonner.tsx": "043610360b74ea057ee9cffab09a862f92e8b48761fe3c6e08ccd846fdf9b35f", + "src/source-badge.tsx": "6d8f2180b4a611298a480a8ee730398289a36ab4937be78a54c9b75563b57ab8", + "src/style-policy-cli.ts": "799f7ec571ffe1364251e64622efcb9125881d5149ef1cecccbe8dcd6ef80256", + "src/style-policy.integration.test.ts": "4279218b20a5da02d7f14264f469a9c068fe2f1fc17a8fa3811c27ce6d06eb05", + "src/style-policy.ts": "343db70eae4e9b183e4a3049c0d13ea1f41ba404eca36c000f5da0abbec02bcd", + "src/styles.css": "98374e8f6ecbb3142626fc47f7ad064318037c1054445cd623af8e23d42ec1d8", + "src/switch.tsx": "c079b9edc9b9c678af41e4b043f8d70b97179b092615d8e062544361615cad69", + "src/table.tsx": "d21a118123ff684bb6c584b8e30af345c3a3003b9cf966a8d3b7373109139872", + "src/tabs.tsx": "c1c8a6e4af74009ff5207f80747c35d13e34093be4a576cae5b4b98add1d2d73", + "src/textarea.tsx": "ae519002951cb0c391f1b72bf9445d9236d4f0fdcea63e61ce3e28cf11d82eca", + "src/toast.tsx": "44c88939d87c73b066ec460982ea047b442d14f7ddbf9a6ce989ff81ad638e5e", + "src/toggle-group.tsx": "79c29c15eb35061c72c293c86a6fae3dc8212ca0ac4f84f98b72e08066132d7b", + "src/toggle.tsx": "ea5b68448cd2b9257db948e9d01a455420e1d14c595800c45b8841b66ea45947", + "src/tooltip.tsx": "f56be19b485e4cd1025b6e9db8a52c1700dc5985289b23051a1a9fa829c44ddd", + "src/ui.integration.test.tsx": "1886f3841396b7cb117c19e3ca87f6997857ff7f6c24cefd644d5ee77c13ddfd", + "src/use-debounce-value.ts": "5b9d2a1badd0d5dfe5ac927861dce6ce49ebfccb45a701304a3f2907895a0fec", + "src/use-mobile.ts": "f0635b8269b53f5057f50ec53d235db20f8dd805bebaffc73955ba1ca60b44c9", + "tailwind.config.cjs": "72e9e5325fbe2178f72b582bc0d1932a81bd8f406ff07a1172d849ddda9434d0", + "tsconfig.build.json": "6d83ee6b78baaf5e7c4d9ba59b83574b0a7545eceeecb893d9af412ef01be971", + "tsconfig.json": "b0a5d04547e49efa277e7b4fc49b895ca7bf174c4b393ead6108e54a356be0f4", + "vitest.config.ts": "0dcdc06c52e3c220ead2c44a9a5fa2887790d8eb620465c570d9c05b95fa691d" + } +} diff --git a/packages/ui/src/alert-dialog.tsx b/packages/ui/src/alert-dialog.tsx index 560a49d..b6e4ebf 100644 --- a/packages/ui/src/alert-dialog.tsx +++ b/packages/ui/src/alert-dialog.tsx @@ -1,46 +1,35 @@ -"use client"; +'use client'; -import * as React from "react"; -import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"; +import * as React from 'react'; +import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'; -import { cn } from "./cn.js"; -import type { AppIcon } from "./shell.js"; -import { buttonVariants } from "./button.js"; +import type { AppIcon } from './shell.js'; +import { buttonVariants } from './button.js'; +import { cn } from './cn.js'; const AlertDialog = AlertDialogPrimitive.Root; -type OwnedAppearance = Omit & { +type OwnedAppearance = Omit & { className?: never; style?: never; }; const AlertDialogTrigger = React.forwardRef< React.ComponentRef, - OwnedAppearance< - React.ComponentPropsWithoutRef - > ->((props, ref) => ( - -)); + OwnedAppearance> +>((props, ref) => ); AlertDialogTrigger.displayName = AlertDialogPrimitive.Trigger.displayName; const AlertDialogPortal = AlertDialogPrimitive.Portal; const AlertDialogOverlay = React.forwardRef< React.ComponentRef, - OwnedAppearance< - React.ComponentPropsWithoutRef - > + OwnedAppearance> >((props, ref) => ( , - OwnedAppearance< - React.ComponentPropsWithoutRef - > + OwnedAppearance> >((props, ref) => ( @@ -60,7 +47,7 @@ const AlertDialogContent = React.forwardRef< {...props} ref={ref} className={cn( - "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", + 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg', )} style={undefined} /> @@ -68,76 +55,46 @@ const AlertDialogContent = React.forwardRef< )); AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName; -const AlertDialogHeader = ( - props: OwnedAppearance>, -) => ( -
+const AlertDialogHeader = (props: OwnedAppearance>) => ( +
); -AlertDialogHeader.displayName = "AlertDialogHeader"; +AlertDialogHeader.displayName = 'AlertDialogHeader'; -const AlertDialogFooter = ( - props: OwnedAppearance>, -) => ( -
+const AlertDialogFooter = (props: OwnedAppearance>) => ( +
); -AlertDialogFooter.displayName = "AlertDialogFooter"; +AlertDialogFooter.displayName = 'AlertDialogFooter'; const AlertDialogTitle = React.forwardRef< React.ComponentRef, - OwnedAppearance< - React.ComponentPropsWithoutRef - > + OwnedAppearance> >((props, ref) => ( - + )); AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName; const AlertDialogDescription = React.forwardRef< React.ComponentRef, - OwnedAppearance< - React.ComponentPropsWithoutRef - > + OwnedAppearance> >((props, ref) => ( - + )); -AlertDialogDescription.displayName = - AlertDialogPrimitive.Description.displayName; +AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName; /** Confirm action. `tone="danger"` marks the irreversible step in red. */ const AlertDialogAction = React.forwardRef< React.ComponentRef, - OwnedAppearance< - React.ComponentPropsWithoutRef - > & { icon?: AppIcon; tone?: "default" | "danger" } ->(({ icon: Icon, tone = "default", children, ...props }, ref) => ( + OwnedAppearance> & { + icon?: AppIcon; + tone?: 'default' | 'danger'; + } +>(({ icon: Icon, tone = 'default', children, ...props }, ref) => ( @@ -149,17 +106,12 @@ AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName; const AlertDialogCancel = React.forwardRef< React.ComponentRef, - OwnedAppearance< - React.ComponentPropsWithoutRef - > & { icon?: AppIcon } + OwnedAppearance> & { icon?: AppIcon } >(({ icon: Icon, children, ...props }, ref) => ( {Icon &&