@exxatdesignux/ui 0.5.10 → 0.5.12
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/CHANGELOG.md +37 -0
- package/bin/cli.mjs +70 -1
- package/bin/init.mjs +18 -4
- package/bin/sync-extras.mjs +28 -4
- package/consumer-extras/README.md +41 -5
- package/consumer-extras/cursor-rules/exxat-accessibility.mdc +2 -1
- package/consumer-extras/cursor-rules/exxat-board-cards.mdc +5 -3
- package/consumer-extras/cursor-rules/exxat-breadcrumbs-no-back.mdc +1 -0
- package/consumer-extras/cursor-rules/exxat-card-vs-list-rows.mdc +1 -0
- package/consumer-extras/cursor-rules/exxat-centralized-list-dataset.mdc +4 -2
- package/consumer-extras/cursor-rules/exxat-collaboration-access.mdc +1 -0
- package/consumer-extras/cursor-rules/exxat-command-menu.mdc +3 -2
- package/consumer-extras/cursor-rules/exxat-data-tables.mdc +5 -3
- package/consumer-extras/cursor-rules/exxat-dedicated-search-surfaces.mdc +7 -0
- package/consumer-extras/cursor-rules/exxat-drawer-vs-dialog.mdc +2 -1
- package/consumer-extras/cursor-rules/exxat-ds-agents.mdc +13 -2
- package/consumer-extras/cursor-rules/exxat-fontawesome-icons.mdc +1 -0
- package/consumer-extras/cursor-rules/exxat-hub-supported-views.mdc +6 -4
- package/consumer-extras/cursor-rules/exxat-kbd-shortcuts.mdc +6 -5
- package/consumer-extras/cursor-rules/exxat-kpi-flat-band.mdc +1 -0
- package/consumer-extras/cursor-rules/exxat-kpi-max-four.mdc +1 -0
- package/consumer-extras/cursor-rules/exxat-kpi-trends.mdc +1 -0
- package/consumer-extras/cursor-rules/exxat-library-hub-header.mdc +2 -1
- package/consumer-extras/cursor-rules/exxat-list-page-connected-views.mdc +6 -2
- package/consumer-extras/cursor-rules/exxat-list-page-view-shells.mdc +2 -1
- package/consumer-extras/cursor-rules/exxat-mono-ids.mdc +2 -1
- package/consumer-extras/cursor-rules/exxat-nav-single-active.mdc +4 -3
- package/consumer-extras/cursor-rules/exxat-no-image-pixel-copy.mdc +25 -14
- package/consumer-extras/cursor-rules/exxat-no-slds-leakage.mdc +8 -2
- package/consumer-extras/cursor-rules/exxat-no-toast.mdc +1 -0
- package/consumer-extras/cursor-rules/exxat-no-vaul.mdc +2 -1
- package/consumer-extras/cursor-rules/exxat-page-header-actions.mdc +6 -4
- package/consumer-extras/cursor-rules/exxat-page-vs-drawer.mdc +2 -1
- package/consumer-extras/cursor-rules/exxat-person-identity-display.mdc +1 -0
- package/consumer-extras/cursor-rules/exxat-primary-nav-secondary-panel.mdc +2 -1
- package/consumer-extras/cursor-rules/exxat-reuse-before-custom.mdc +1 -0
- package/consumer-extras/cursor-rules/exxat-sidebar-shell.mdc +13 -7
- package/consumer-extras/cursor-rules/exxat-table-properties-drawer.mdc +5 -3
- package/consumer-extras/cursor-rules/exxat-table-row-preview.mdc +1 -0
- package/consumer-extras/cursor-rules/exxat-tabs-chrome.mdc +6 -4
- package/consumer-extras/cursor-rules/exxat-token-discipline.mdc +6 -0
- package/consumer-extras/cursor-rules/exxat-ux-discovery-protocol.mdc +92 -12
- package/consumer-extras/cursor-rules/exxat-ux-principles.mdc +1 -0
- package/consumer-extras/cursor-skills/exxat-ds-skill/SKILL.md +1 -1
- package/consumer-extras/cursor-skills/exxat-kpi-trends/SKILL.md +5 -3
- package/consumer-extras/cursor-skills/exxat-senior-ux/SKILL.md +70 -17
- package/consumer-extras/patterns/command-menu-pattern.md +2 -2
- package/consumer-extras/patterns/consumer-upgrade-checklist.md +1 -1
- package/consumer-extras/patterns/jobs/README.md +1 -1
- package/consumer-extras/patterns/perf-memory-pattern.md +115 -150
- package/consumer-extras/scripts/dev-guard.mjs +156 -0
- package/consumer-extras/templates/README.md +23 -0
- package/consumer-extras/templates/handoff.md +190 -0
- package/dist/hooks/use-app-theme.d.ts +1 -1
- package/package.json +2 -2
- package/{template → template-vite}/.claude/skills/exxat-ds-skill/SKILL.md +184 -23
- package/template-vite/.cursor/rules/exxat-accessibility.mdc +40 -0
- package/template-vite/.cursor/rules/exxat-board-cards.mdc +28 -0
- package/template-vite/.cursor/rules/exxat-breadcrumbs-no-back.mdc +22 -0
- package/template-vite/.cursor/rules/exxat-card-vs-list-rows.mdc +22 -0
- package/template-vite/.cursor/rules/exxat-centralized-list-dataset.mdc +46 -0
- package/template-vite/.cursor/rules/exxat-collaboration-access.mdc +33 -0
- package/{template → template-vite}/.cursor/rules/exxat-command-menu.mdc +5 -5
- package/template-vite/.cursor/rules/exxat-data-tables.mdc +47 -0
- package/template-vite/.cursor/rules/exxat-dedicated-search-surfaces.mdc +32 -0
- package/template-vite/.cursor/rules/exxat-drawer-vs-dialog.mdc +23 -0
- package/template-vite/.cursor/rules/exxat-ds-agents.mdc +87 -0
- package/template-vite/.cursor/rules/exxat-fontawesome-icons.mdc +32 -0
- package/template-vite/.cursor/rules/exxat-hub-supported-views.mdc +56 -0
- package/{template → template-vite}/.cursor/rules/exxat-kbd-shortcuts.mdc +1 -0
- package/template-vite/.cursor/rules/exxat-kpi-flat-band.mdc +29 -0
- package/template-vite/.cursor/rules/exxat-kpi-max-four.mdc +22 -0
- package/template-vite/.cursor/rules/exxat-kpi-trends.mdc +32 -0
- package/template-vite/.cursor/rules/exxat-library-hub-header.mdc +29 -0
- package/template-vite/.cursor/rules/exxat-list-page-connected-views.mdc +28 -0
- package/template-vite/.cursor/rules/exxat-list-page-view-shells.mdc +32 -0
- package/{template → template-vite}/.cursor/rules/exxat-mono-ids.mdc +1 -0
- package/template-vite/.cursor/rules/exxat-nav-single-active.mdc +32 -0
- package/template-vite/.cursor/rules/exxat-no-image-pixel-copy.mdc +46 -0
- package/template-vite/.cursor/rules/exxat-no-slds-leakage.mdc +84 -0
- package/{template → template-vite}/.cursor/rules/exxat-no-toast.mdc +2 -2
- package/template-vite/.cursor/rules/exxat-no-vaul.mdc +26 -0
- package/template-vite/.cursor/rules/exxat-page-header-actions.mdc +33 -0
- package/{template → template-vite}/.cursor/rules/exxat-page-vs-drawer.mdc +5 -3
- package/template-vite/.cursor/rules/exxat-person-identity-display.mdc +48 -0
- package/template-vite/.cursor/rules/exxat-primary-nav-secondary-panel.mdc +53 -0
- package/template-vite/.cursor/rules/exxat-reuse-before-custom.mdc +37 -0
- package/template-vite/.cursor/rules/exxat-sidebar-shell.mdc +41 -0
- package/template-vite/.cursor/rules/exxat-table-properties-drawer.mdc +79 -0
- package/template-vite/.cursor/rules/exxat-table-row-preview.mdc +25 -0
- package/template-vite/.cursor/rules/exxat-tabs-chrome.mdc +33 -0
- package/template-vite/.cursor/rules/exxat-token-discipline.mdc +109 -0
- package/template-vite/.cursor/rules/exxat-ux-discovery-protocol.mdc +202 -0
- package/template-vite/.cursor/rules/exxat-ux-principles.mdc +187 -0
- package/template-vite/.cursor/skills/exxat-accessibility/SKILL.md +282 -0
- package/template-vite/.cursor/skills/exxat-board-cards/SKILL.md +68 -0
- package/template-vite/.cursor/skills/exxat-card-vs-list-rows/SKILL.md +20 -0
- package/template-vite/.cursor/skills/exxat-centralized-list-dataset/SKILL.md +99 -0
- package/template-vite/.cursor/skills/exxat-collaboration-access/SKILL.md +35 -0
- package/template-vite/.cursor/skills/exxat-dedicated-search-surfaces/SKILL.md +45 -0
- package/template-vite/.cursor/skills/exxat-drawer-vs-dialog/SKILL.md +20 -0
- package/template-vite/.cursor/skills/exxat-ds-skill/SKILL.md +893 -0
- package/template-vite/.cursor/skills/exxat-ds-skill/references/accessibility.md +142 -0
- package/template-vite/.cursor/skills/exxat-ds-skill/references/coach-marks.md +169 -0
- package/template-vite/.cursor/skills/exxat-ds-skill/references/data-table-pattern.md +392 -0
- package/template-vite/.cursor/skills/exxat-fontawesome-icons/SKILL.md +31 -0
- package/template-vite/.cursor/skills/exxat-kpi-flat-band/SKILL.md +38 -0
- package/template-vite/.cursor/skills/exxat-kpi-max-four/SKILL.md +19 -0
- package/template-vite/.cursor/skills/exxat-kpi-trends/SKILL.md +29 -0
- package/template-vite/.cursor/skills/exxat-list-page-view-shells/SKILL.md +36 -0
- package/template-vite/.cursor/skills/exxat-mono-ids/SKILL.md +56 -0
- package/template-vite/.cursor/skills/exxat-primary-nav-secondary-panel/SKILL.md +49 -0
- package/template-vite/.cursor/skills/exxat-senior-ux/SKILL.md +198 -0
- package/template-vite/.cursor/skills/exxat-token-economy/SKILL.md +287 -0
- package/template-vite/.cursor/skills/exxat-ux-audit/SKILL.md +303 -0
- package/{template → template-vite}/components/ask-leo-sidebar.tsx +10 -8
- package/{template → template-vite}/components/command-menu.tsx +1 -1
- package/{template → template-vite}/components/data-views/library-folder-tree-branch.tsx +1 -1
- package/{template → template-vite}/components/dedicated-search-recents.tsx +1 -1
- package/{template → template-vite}/components/dedicated-search-url-composer.tsx +1 -1
- package/{template → template-vite}/components/library-client.tsx +1 -1
- package/{template → template-vite}/components/library-hub-client.tsx +2 -2
- package/{template → template-vite}/components/library-secondary-nav.tsx +2 -2
- package/{template → template-vite}/components/library-table.tsx +35 -27
- package/{template → template-vite}/components/new-library-item-form.tsx +1 -1
- package/{template → template-vite}/components/page-breadcrumb-trail.tsx +1 -1
- package/{template → template-vite}/components/settings-client.tsx +1 -1
- package/{template → template-vite}/components/sidebar/app-sidebar.tsx +2 -2
- package/{template → template-vite}/components/sidebar/nav-main.tsx +1 -1
- package/{template → template-vite}/components/sidebar/nav-user.tsx +1 -1
- package/{template → template-vite}/components/sidebar/secondary-nav.tsx +1 -1
- package/{template → template-vite}/components/system-banner-slot.tsx +1 -1
- package/{template → template-vite}/components/templates/discovery-hub-template.tsx +2 -2
- package/{template → template-vite}/components/templates/new-focus-template.tsx +1 -1
- package/{template → template-vite}/components/tokens-secondary-nav.tsx +2 -2
- package/{template → template-vite}/components/tokens-themes-client.tsx +1 -1
- package/{template → template-vite}/hooks/use-secondary-panel-hub-nav.ts +1 -1
- package/template-vite/index.html +49 -0
- package/template-vite/lib/next-compat.tsx +98 -0
- package/{template → template-vite}/package.json +15 -27
- package/template-vite/scripts/port-next-imports.mjs +70 -0
- package/template-vite/src/App.tsx +103 -0
- package/template-vite/src/main.tsx +50 -0
- package/{template/app/(app)/error.tsx → template-vite/src/pages/_error.tsx} +12 -24
- package/{template/app/(app)/loading.tsx → template-vite/src/pages/_loading.tsx} +4 -2
- package/template-vite/src/pages/_not-found.tsx +17 -0
- package/template-vite/src/pages/dashboard.tsx +48 -0
- package/{template/app/(app)/help/page.tsx → template-vite/src/pages/help.tsx} +3 -2
- package/{template/app/(app)/library/layout.tsx → template-vite/src/pages/library/_layout.tsx} +18 -16
- package/{template/app/(app)/library/all/page.tsx → template-vite/src/pages/library/all.tsx} +1 -1
- package/{template/app/(app)/library/new/page.tsx → template-vite/src/pages/library/new.tsx} +12 -18
- package/template-vite/src/routes.tsx +72 -0
- package/{template/app → template-vite/src/styles}/globals.css +6 -2
- package/{template → template-vite}/tsconfig.json +5 -14
- package/template-vite/vite.config.ts +52 -0
- package/consumer-extras/cursor-rules/exxat-dashboard-view-charts.mdc +0 -53
- package/template/.agents/skills/shadcn/SKILL.md +0 -242
- package/template/.agents/skills/shadcn/agents/openai.yml +0 -5
- package/template/.agents/skills/shadcn/assets/shadcn-small.png +0 -0
- package/template/.agents/skills/shadcn/assets/shadcn.png +0 -0
- package/template/.agents/skills/shadcn/cli.md +0 -257
- package/template/.agents/skills/shadcn/customization.md +0 -202
- package/template/.agents/skills/shadcn/evals/evals.json +0 -47
- package/template/.agents/skills/shadcn/mcp.md +0 -94
- package/template/.agents/skills/shadcn/rules/base-vs-radix.md +0 -306
- package/template/.agents/skills/shadcn/rules/composition.md +0 -195
- package/template/.agents/skills/shadcn/rules/forms.md +0 -192
- package/template/.agents/skills/shadcn/rules/icons.md +0 -101
- package/template/.agents/skills/shadcn/rules/styling.md +0 -162
- package/template/.cursor/rules/exxat-accessibility.mdc +0 -33
- package/template/.cursor/rules/exxat-data-tables.mdc +0 -32
- package/template/.cursor/rules/exxat-ds-agents.mdc +0 -26
- package/template/.cursor/rules/exxat-list-page-connected-views.mdc +0 -16
- package/template/.cursor/rules/exxat-table-properties-drawer.mdc +0 -40
- package/template/.nvmrc +0 -1
- package/template/.prettierignore +0 -7
- package/template/Logo/Exxat_Prism.svg +0 -39
- package/template/Logo/Exxat_one.svg +0 -36
- package/template/app/(app)/dashboard/loading.tsx +0 -18
- package/template/app/(app)/dashboard/page.tsx +0 -36
- package/template/app/(app)/layout.tsx +0 -77
- package/template/app/global-error.tsx +0 -63
- package/template/app/layout.tsx +0 -133
- package/template/app/page.tsx +0 -9
- package/template/docs/HANDBOOK.md +0 -187
- package/template/docs/blueprints/README.md +0 -86
- package/template/docs/blueprints/_template.md +0 -91
- package/template/docs/blueprints/board-card.md +0 -123
- package/template/docs/blueprints/data-table.md +0 -139
- package/template/docs/blueprints/key-metrics.md +0 -128
- package/template/docs/blueprints/list-page-template.md +0 -123
- package/template/docs/blueprints/page-header.md +0 -130
- package/template/docs/card-vs-rows-pattern.md +0 -36
- package/template/docs/collaboration-access-pattern.md +0 -116
- package/template/docs/command-menu-pattern.md +0 -45
- package/template/docs/component-selection-guide.md +0 -224
- package/template/docs/components-audit-2026-05.md +0 -158
- package/template/docs/consumer-upgrade-checklist.md +0 -52
- package/template/docs/data-views-pattern.md +0 -185
- package/template/docs/drawer-vs-dialog-pattern.md +0 -50
- package/template/docs/glossary.md +0 -59
- package/template/docs/hub-supported-views-pattern.md +0 -53
- package/template/docs/jobs/README.md +0 -59
- package/template/docs/jobs/record-detail.md +0 -177
- package/template/docs/kpi-flat-band-pattern.md +0 -57
- package/template/docs/kpi-strip-max-four-pattern.md +0 -30
- package/template/docs/kpi-trend-pattern.md +0 -58
- package/template/docs/large-dataset-strategy.md +0 -155
- package/template/docs/library-hub-header-pattern.md +0 -25
- package/template/docs/migrations/0001-brand-deep-alias-stabilization.md +0 -95
- package/template/docs/migrations/0002-exxat-token-namespace.md +0 -154
- package/template/docs/migrations/0003-globals-css-canonical.md +0 -110
- package/template/docs/migrations/README.md +0 -100
- package/template/docs/migrations/_template.md +0 -64
- package/template/docs/modern-saas-patterns.md +0 -165
- package/template/docs/perf-memory-pattern.md +0 -206
- package/template/docs/reference-implementations.md +0 -153
- package/template/docs/shell-surface-elevation-pattern.md +0 -52
- package/template/docs/token-taxonomy.md +0 -416
- package/template/docs/voice-and-tone.md +0 -262
- package/template/ecosystem.config.cjs +0 -32
- package/template/next.config.mjs +0 -216
- package/template/postcss.config.mjs +0 -8
- package/template/public/favicon/favicon.ico +0 -0
- package/template/tests/setup.ts +0 -26
- package/template/vitest.config.ts +0 -18
- /package/{template → template-vite}/.cursor/rules/exxat-dashboard-view-charts.mdc +0 -0
- /package/{template → template-vite}/.prettierrc +0 -0
- /package/{template → template-vite}/AGENTS.md +0 -0
- /package/{template → template-vite}/README.md +0 -0
- /package/{template → template-vite}/components/.gitkeep +0 -0
- /package/{template → template-vite}/components/ask-leo-composer.tsx +0 -0
- /package/{template → template-vite}/components/brand-color-picker.tsx +0 -0
- /package/{template → template-vite}/components/chart-area-interactive.tsx +0 -0
- /package/{template → template-vite}/components/charts-overview.tsx +0 -0
- /package/{template → template-vite}/components/collaboration-access-flow.tsx +0 -0
- /package/{template → template-vite}/components/columns-client.tsx +0 -0
- /package/{template → template-vite}/components/columns-showcase.tsx +0 -0
- /package/{template → template-vite}/components/dashboard-promo-banner.tsx +0 -0
- /package/{template → template-vite}/components/dashboard-quota-progress-card.tsx +0 -0
- /package/{template → template-vite}/components/dashboard-report-charts.tsx +0 -0
- /package/{template → template-vite}/components/dashboard-section-heading.tsx +0 -0
- /package/{template → template-vite}/components/dashboard-tabs.tsx +0 -0
- /package/{template → template-vite}/components/data-table/filter-date-calendar.tsx +0 -0
- /package/{template → template-vite}/components/data-table/filter-text-value-input.tsx +0 -0
- /package/{template → template-vite}/components/data-table/index.tsx +0 -0
- /package/{template → template-vite}/components/data-table/pagination.tsx +0 -0
- /package/{template → template-vite}/components/data-table/types.ts +0 -0
- /package/{template → template-vite}/components/data-table/use-table-state.test.ts +0 -0
- /package/{template → template-vite}/components/data-table/use-table-state.ts +0 -0
- /package/{template → template-vite}/components/data-views/board-card-primitives.tsx +0 -0
- /package/{template → template-vite}/components/data-views/data-row-list.tsx +0 -0
- /package/{template → template-vite}/components/data-views/finder-panel-view.tsx +0 -0
- /package/{template → template-vite}/components/data-views/folder-grid-view.tsx +0 -0
- /package/{template → template-vite}/components/data-views/hub-table.tsx +0 -0
- /package/{template → template-vite}/components/data-views/index.ts +0 -0
- /package/{template → template-vite}/components/data-views/list-page-board-card.tsx +0 -0
- /package/{template → template-vite}/components/data-views/list-page-board-template.tsx +0 -0
- /package/{template → template-vite}/components/data-views/list-page-connected-view-body.tsx +0 -0
- /package/{template → template-vite}/components/data-views/list-page-split-details-placeholder.tsx +0 -0
- /package/{template → template-vite}/components/data-views/list-page-split-hub-chrome.tsx +0 -0
- /package/{template → template-vite}/components/data-views/list-page-split-hub-tokens.ts +0 -0
- /package/{template → template-vite}/components/data-views/list-page-tree-column-header.tsx +0 -0
- /package/{template → template-vite}/components/data-views/list-page-tree-panel-shell.tsx +0 -0
- /package/{template → template-vite}/components/data-views/list-page-view-frame.tsx +0 -0
- /package/{template → template-vite}/components/data-views/os-folder-glyph.tsx +0 -0
- /package/{template → template-vite}/components/data-views/outline-tree-menu.tsx +0 -0
- /package/{template → template-vite}/components/data-views/table-cells.tsx +0 -0
- /package/{template → template-vite}/components/dev-chunk-load-recovery.tsx +0 -0
- /package/{template → template-vite}/components/export-drawer.test.tsx +0 -0
- /package/{template → template-vite}/components/export-drawer.tsx +0 -0
- /package/{template → template-vite}/components/exxat-product-logo.tsx +0 -0
- /package/{template → template-vite}/components/folder-details-shell.tsx +0 -0
- /package/{template → template-vite}/components/form-layout-01.tsx +0 -0
- /package/{template → template-vite}/components/hub-tree-panel-view.tsx +0 -0
- /package/{template → template-vite}/components/invite-collaborators-drawer.tsx +0 -0
- /package/{template → template-vite}/components/key-metrics-ask-leo-bridge.tsx +0 -0
- /package/{template → template-vite}/components/key-metrics.tsx +0 -0
- /package/{template → template-vite}/components/leo-insight-indicator.tsx +0 -0
- /package/{template → template-vite}/components/leo-typing-dots.tsx +0 -0
- /package/{template → template-vite}/components/library-board-view.tsx +0 -0
- /package/{template → template-vite}/components/library-dashboard-charts.tsx +0 -0
- /package/{template → template-vite}/components/library-favorite-button.tsx +0 -0
- /package/{template → template-vite}/components/library-new-folder-sheet.tsx +0 -0
- /package/{template → template-vite}/components/library-os-folder-view.tsx +0 -0
- /package/{template → template-vite}/components/library-page-header.tsx +0 -0
- /package/{template → template-vite}/components/library-panel-activator.tsx +0 -0
- /package/{template → template-vite}/components/list-hub-status-badge.tsx +0 -0
- /package/{template → template-vite}/components/list-page-dashboard-charts.tsx +0 -0
- /package/{template → template-vite}/components/onboarding/getting-started.tsx +0 -0
- /package/{template → template-vite}/components/onboarding/index.ts +0 -0
- /package/{template → template-vite}/components/onboarding/onboarding-01.tsx +0 -0
- /package/{template → template-vite}/components/onboarding/onboarding-02.tsx +0 -0
- /package/{template → template-vite}/components/onboarding/onboarding-03.tsx +0 -0
- /package/{template → template-vite}/components/onboarding/onboarding-04.tsx +0 -0
- /package/{template → template-vite}/components/page-header.tsx +0 -0
- /package/{template → template-vite}/components/product-switcher.tsx +0 -0
- /package/{template → template-vite}/components/product-wordmark.tsx +0 -0
- /package/{template → template-vite}/components/settings-appearance-card.tsx +0 -0
- /package/{template → template-vite}/components/settings-form-row.tsx +0 -0
- /package/{template → template-vite}/components/sidebar/app-sidebar-dynamic.tsx +0 -0
- /package/{template → template-vite}/components/sidebar/index.ts +0 -0
- /package/{template → template-vite}/components/sidebar/nav-documents.tsx +0 -0
- /package/{template → template-vite}/components/sidebar/nav-secondary.tsx +0 -0
- /package/{template → template-vite}/components/sidebar/secondary-panel.tsx +0 -0
- /package/{template → template-vite}/components/sidebar/sidebar-auto-collapse.tsx +0 -0
- /package/{template → template-vite}/components/sidebar/sidebar-auto-open.tsx +0 -0
- /package/{template → template-vite}/components/sidebar/sidebar-shell.tsx +0 -0
- /package/{template → template-vite}/components/site-header.tsx +0 -0
- /package/{template → template-vite}/components/table-properties/column-row.tsx +0 -0
- /package/{template → template-vite}/components/table-properties/draggable-list.ts +0 -0
- /package/{template → template-vite}/components/table-properties/drawer-button.tsx +0 -0
- /package/{template → template-vite}/components/table-properties/drawer.tsx +0 -0
- /package/{template → template-vite}/components/table-properties/filter-card.tsx +0 -0
- /package/{template → template-vite}/components/table-properties/index.ts +0 -0
- /package/{template → template-vite}/components/table-properties/sort-card.tsx +0 -0
- /package/{template → template-vite}/components/table-properties/types.ts +0 -0
- /package/{template → template-vite}/components/task-list-panel.tsx +0 -0
- /package/{template → template-vite}/components/task-priority-badge.tsx +0 -0
- /package/{template → template-vite}/components/templates/dedicated-search-landing-template.tsx +0 -0
- /package/{template → template-vite}/components/templates/dedicated-search-results-template.tsx +0 -0
- /package/{template → template-vite}/components/templates/list-page.tsx +0 -0
- /package/{template → template-vite}/components/templates/nested-secondary-panel-shell.tsx +0 -0
- /package/{template → template-vite}/components/templates/primary-page-template.tsx +0 -0
- /package/{template → template-vite}/components/templates/secondary-panel-hub-template.tsx +0 -0
- /package/{template → template-vite}/components/theme-color-sync.tsx +0 -0
- /package/{template → template-vite}/components/theme-provider.tsx +0 -0
- /package/{template → template-vite}/components/tinted-icon-disc.tsx +0 -0
- /package/{template → template-vite}/components/tokens-hub-auxiliary-views.tsx +0 -0
- /package/{template → template-vite}/components/tokens-themes-section.tsx +0 -0
- /package/{template → template-vite}/components/ui/accordion.tsx +0 -0
- /package/{template → template-vite}/components/ui/ai-thinking-surface.tsx +0 -0
- /package/{template → template-vite}/components/ui/alert-dialog.tsx +0 -0
- /package/{template → template-vite}/components/ui/avatar.tsx +0 -0
- /package/{template → template-vite}/components/ui/badge.tsx +0 -0
- /package/{template → template-vite}/components/ui/banner.tsx +0 -0
- /package/{template → template-vite}/components/ui/breadcrumb.tsx +0 -0
- /package/{template → template-vite}/components/ui/button.tsx +0 -0
- /package/{template → template-vite}/components/ui/calendar.tsx +0 -0
- /package/{template → template-vite}/components/ui/card.tsx +0 -0
- /package/{template → template-vite}/components/ui/chart.tsx +0 -0
- /package/{template → template-vite}/components/ui/checkbox.tsx +0 -0
- /package/{template → template-vite}/components/ui/coach-mark.tsx +0 -0
- /package/{template → template-vite}/components/ui/collapsible.tsx +0 -0
- /package/{template → template-vite}/components/ui/command.tsx +0 -0
- /package/{template → template-vite}/components/ui/context-menu.tsx +0 -0
- /package/{template → template-vite}/components/ui/date-picker-field.tsx +0 -0
- /package/{template → template-vite}/components/ui/dialog.tsx +0 -0
- /package/{template → template-vite}/components/ui/dot-pattern.tsx +0 -0
- /package/{template → template-vite}/components/ui/drag-handle-grip.tsx +0 -0
- /package/{template → template-vite}/components/ui/dropdown-menu.tsx +0 -0
- /package/{template → template-vite}/components/ui/field.tsx +0 -0
- /package/{template → template-vite}/components/ui/form.tsx +0 -0
- /package/{template → template-vite}/components/ui/hover-card.tsx +0 -0
- /package/{template → template-vite}/components/ui/input-group.tsx +0 -0
- /package/{template → template-vite}/components/ui/input-mask.tsx +0 -0
- /package/{template → template-vite}/components/ui/input.tsx +0 -0
- /package/{template → template-vite}/components/ui/kbd.tsx +0 -0
- /package/{template → template-vite}/components/ui/label.tsx +0 -0
- /package/{template → template-vite}/components/ui/leo-icon.tsx +0 -0
- /package/{template → template-vite}/components/ui/payment-card-fields.tsx +0 -0
- /package/{template → template-vite}/components/ui/popover.tsx +0 -0
- /package/{template → template-vite}/components/ui/radio-group.tsx +0 -0
- /package/{template → template-vite}/components/ui/resizable.tsx +0 -0
- /package/{template → template-vite}/components/ui/scroll-area.tsx +0 -0
- /package/{template → template-vite}/components/ui/select.tsx +0 -0
- /package/{template → template-vite}/components/ui/selection-tile-grid.tsx +0 -0
- /package/{template → template-vite}/components/ui/separator.tsx +0 -0
- /package/{template → template-vite}/components/ui/sheet.tsx +0 -0
- /package/{template → template-vite}/components/ui/sidebar.tsx +0 -0
- /package/{template → template-vite}/components/ui/skeleton.tsx +0 -0
- /package/{template → template-vite}/components/ui/slider.tsx +0 -0
- /package/{template → template-vite}/components/ui/sonner.tsx +0 -0
- /package/{template → template-vite}/components/ui/status-badge.tsx +0 -0
- /package/{template → template-vite}/components/ui/table.tsx +0 -0
- /package/{template → template-vite}/components/ui/tabs.tsx +0 -0
- /package/{template → template-vite}/components/ui/textarea.tsx +0 -0
- /package/{template → template-vite}/components/ui/tip.tsx +0 -0
- /package/{template → template-vite}/components/ui/toggle-group.tsx +0 -0
- /package/{template → template-vite}/components/ui/toggle-switch.tsx +0 -0
- /package/{template → template-vite}/components/ui/toggle.tsx +0 -0
- /package/{template → template-vite}/components/ui/tooltip.tsx +0 -0
- /package/{template → template-vite}/components/ui/view-segmented-control.tsx +0 -0
- /package/{template → template-vite}/components.json +0 -0
- /package/{template → template-vite}/contexts/chart-variant-context.tsx +0 -0
- /package/{template → template-vite}/contexts/command-menu-context.tsx +0 -0
- /package/{template → template-vite}/contexts/dashboard-view-context.tsx +0 -0
- /package/{template → template-vite}/contexts/product-context.tsx +0 -0
- /package/{template → template-vite}/contexts/system-banner-context.tsx +0 -0
- /package/{template → template-vite}/eslint.config.mjs +0 -0
- /package/{template → template-vite}/fontawesome-subset.manifest.json +0 -0
- /package/{template → template-vite}/hooks/.gitkeep +0 -0
- /package/{template → template-vite}/hooks/use-app-theme.ts +0 -0
- /package/{template → template-vite}/hooks/use-coach-mark.ts +0 -0
- /package/{template → template-vite}/hooks/use-location-hash.ts +0 -0
- /package/{template → template-vite}/hooks/use-mobile.ts +0 -0
- /package/{template → template-vite}/hooks/use-mod-key-label.ts +0 -0
- /package/{template → template-vite}/hooks/use-sidebar-reflow-zoom.ts +0 -0
- /package/{template → template-vite}/lib/.gitkeep +0 -0
- /package/{template → template-vite}/lib/ask-leo-route-context.ts +0 -0
- /package/{template → template-vite}/lib/chart-keyboard-selection.test.ts +0 -0
- /package/{template → template-vite}/lib/chart-keyboard-selection.ts +0 -0
- /package/{template → template-vite}/lib/chart-line-dash.ts +0 -0
- /package/{template → template-vite}/lib/chunk-load-error.ts +0 -0
- /package/{template → template-vite}/lib/coach-mark-registry.ts +0 -0
- /package/{template → template-vite}/lib/collaborator-access.ts +0 -0
- /package/{template → template-vite}/lib/command-menu-config.ts +0 -0
- /package/{template → template-vite}/lib/command-menu-search-data.ts +0 -0
- /package/{template → template-vite}/lib/conditional-rule-match.ts +0 -0
- /package/{template → template-vite}/lib/dashboard-customize-coach-mark.ts +0 -0
- /package/{template → template-vite}/lib/dashboard-layout-merge.ts +0 -0
- /package/{template → template-vite}/lib/data-list-display-options.ts +0 -0
- /package/{template → template-vite}/lib/data-list-persistence.ts +0 -0
- /package/{template → template-vite}/lib/data-list-view-registry.ts +0 -0
- /package/{template → template-vite}/lib/data-list-view-surface.ts +0 -0
- /package/{template → template-vite}/lib/data-list-view.ts +0 -0
- /package/{template → template-vite}/lib/data-view-dashboard-storage.ts +0 -0
- /package/{template → template-vite}/lib/date-filter.ts +0 -0
- /package/{template → template-vite}/lib/dedicated-search-recents.ts +0 -0
- /package/{template → template-vite}/lib/dedicated-search-url.ts +0 -0
- /package/{template → template-vite}/lib/dev-log.test.ts +0 -0
- /package/{template → template-vite}/lib/dev-log.ts +0 -0
- /package/{template → template-vite}/lib/discovery-hub.ts +0 -0
- /package/{template → template-vite}/lib/editable-target.ts +0 -0
- /package/{template → template-vite}/lib/exxat-palette.json +0 -0
- /package/{template → template-vite}/lib/exxat-palette.ts +0 -0
- /package/{template → template-vite}/lib/floating-sheet-panel.ts +0 -0
- /package/{template → template-vite}/lib/full-hub-supported-views.ts +0 -0
- /package/{template → template-vite}/lib/hub-connected-view-renderers.ts +0 -0
- /package/{template → template-vite}/lib/initials-from-name.ts +0 -0
- /package/{template → template-vite}/lib/library-authoring.ts +0 -0
- /package/{template → template-vite}/lib/library-dedicated-search.ts +0 -0
- /package/{template → template-vite}/lib/library-hub-search.ts +0 -0
- /package/{template → template-vite}/lib/library-nav.ts +0 -0
- /package/{template → template-vite}/lib/library-recent-searches.ts +0 -0
- /package/{template → template-vite}/lib/library-supported-views.ts +0 -0
- /package/{template → template-vite}/lib/list-hub-supported-views.ts +0 -0
- /package/{template → template-vite}/lib/list-page-table-properties.ts +0 -0
- /package/{template → template-vite}/lib/list-status-badges.ts +0 -0
- /package/{template → template-vite}/lib/logo-dev.ts +0 -0
- /package/{template → template-vite}/lib/mailto.ts +0 -0
- /package/{template → template-vite}/lib/mock/dashboard.ts +0 -0
- /package/{template → template-vite}/lib/mock/library-folders.ts +0 -0
- /package/{template → template-vite}/lib/mock/library-header-collaborators.ts +0 -0
- /package/{template → template-vite}/lib/mock/library-inspector.ts +0 -0
- /package/{template → template-vite}/lib/mock/library-kpi.ts +0 -0
- /package/{template → template-vite}/lib/mock/library.ts +0 -0
- /package/{template → template-vite}/lib/mock/navigation.tsx +0 -0
- /package/{template → template-vite}/lib/motion-ui.ts +0 -0
- /package/{template → template-vite}/lib/product-brand.ts +0 -0
- /package/{template → template-vite}/lib/raf-throttle.ts +0 -0
- /package/{template → template-vite}/lib/row-height.ts +0 -0
- /package/{template → template-vite}/lib/sidebar-state-cookie.ts +0 -0
- /package/{template → template-vite}/lib/stock-portrait.ts +0 -0
- /package/{template → template-vite}/lib/table-state-lifecycle.ts +0 -0
- /package/{template → template-vite}/lib/utils.test.ts +0 -0
- /package/{template → template-vite}/lib/utils.ts +0 -0
- /package/{template → template-vite}/public/.gitkeep +0 -0
- /package/{template → template-vite}/public/Illustration/Rotation.svg +0 -0
- /package/{template → template-vite}/public/avatars/user.svg +0 -0
- /package/{template/public → template-vite/public/favicon}/favicon.ico +0 -0
- /package/{template/app → template-vite/public}/favicon.ico +0 -0
- /package/{template → template-vite}/public/folders/icons8-folder-windows-11.svg +0 -0
- /package/{template → template-vite}/public/logos/exxat-one.svg +0 -0
- /package/{template → template-vite}/public/logos/exxat-prism.svg +0 -0
- /package/{template → template-vite}/public/mock-schools/emory.svg +0 -0
- /package/{template → template-vite}/public/mock-schools/rush.svg +0 -0
- /package/{template → template-vite}/scripts/fontawesome-subset-audit.mjs +0 -0
- /package/{template → template-vite}/scripts/pm2-startup-macos.sh +0 -0
- /package/{template → template-vite}/skills-lock.json +0 -0
- /package/{template/app/(app)/columns/page.tsx → template-vite/src/pages/columns.tsx} +0 -0
- /package/{template/app/(app)/library/find/page.tsx → template-vite/src/pages/library/find.tsx} +0 -0
- /package/{template/app/(app)/library/page.tsx → template-vite/src/pages/library/index.tsx} +0 -0
- /package/{template/app/(app)/library/list/page.tsx → template-vite/src/pages/library/list.tsx} +0 -0
- /package/{template/app/(app)/settings/page.tsx → template-vite/src/pages/settings.tsx} +0 -0
- /package/{template/app/(app)/tokens-themes/page.tsx → template-vite/src/pages/tokens-themes.tsx} +0 -0
- /package/{template → template-vite}/stores/app-store.ts +0 -0
- /package/{template → template-vite}/types/react-payment-inputs.d.ts +0 -0
package/{template/app/(app)/library/layout.tsx → template-vite/src/pages/library/_layout.tsx}
RENAMED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
1
|
import * as React from "react"
|
|
4
|
-
import {
|
|
2
|
+
import { Outlet, useLocation } from "react-router-dom"
|
|
5
3
|
|
|
6
4
|
import { useSecondaryPanel } from "@/components/sidebar"
|
|
7
5
|
import {
|
|
@@ -14,36 +12,36 @@ import {
|
|
|
14
12
|
const LIBRARY_FOCUSED_FLOW_PATHS: readonly string[] = ["/library/new"]
|
|
15
13
|
|
|
16
14
|
function isLibraryFocusedFlow(pathname: string): boolean {
|
|
17
|
-
return LIBRARY_FOCUSED_FLOW_PATHS.some(
|
|
15
|
+
return LIBRARY_FOCUSED_FLOW_PATHS.some(
|
|
16
|
+
p => pathname === p || pathname.startsWith(`${p}/`),
|
|
17
|
+
)
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Keeps the nested secondary panel open across library navigations.
|
|
22
|
-
*
|
|
23
|
-
*
|
|
22
|
+
* Hub root, dedicated search surfaces, and focused authoring stay full-width.
|
|
23
|
+
*
|
|
24
|
+
* Mirrors the Next `app/(app)/library/layout.tsx` 1:1 — only the
|
|
25
|
+
* `usePathname` import comes from `react-router-dom` instead of
|
|
26
|
+
* `next/navigation`, and `<Outlet />` replaces the `children` prop.
|
|
24
27
|
*/
|
|
25
|
-
export
|
|
26
|
-
const pathname =
|
|
28
|
+
export function LibraryLayout() {
|
|
29
|
+
const { pathname } = useLocation()
|
|
27
30
|
const { openPanel, closePanel, activePanel } = useSecondaryPanel()
|
|
28
31
|
const closePanelRef = React.useRef(closePanel)
|
|
29
32
|
const openPanelRef = React.useRef(openPanel)
|
|
30
|
-
|
|
31
|
-
// route effect below on every render. `useEffect` (no deps) updates the
|
|
32
|
-
// refs after each render; React's `refs` rule disallows direct ref writes
|
|
33
|
-
// during render so the assignment lives here instead.
|
|
33
|
+
|
|
34
34
|
React.useEffect(() => {
|
|
35
35
|
closePanelRef.current = closePanel
|
|
36
36
|
openPanelRef.current = openPanel
|
|
37
37
|
})
|
|
38
38
|
|
|
39
|
-
/** Leaving `/library/*` entirely — close nested panel without forcing primary sidebar open (⌘B / cookie). */
|
|
40
39
|
React.useEffect(() => {
|
|
41
40
|
return () => {
|
|
42
41
|
closePanelRef.current({ mainSidebar: "leave" })
|
|
43
42
|
}
|
|
44
43
|
}, [])
|
|
45
44
|
|
|
46
|
-
/** Only react to route changes — refs carry latest open/close. */
|
|
47
45
|
React.useEffect(() => {
|
|
48
46
|
const isDiscoveryHubRoot =
|
|
49
47
|
pathname === LIBRARY_ENTRY_PATH || pathname === `${LIBRARY_ENTRY_PATH}/`
|
|
@@ -51,7 +49,11 @@ export default function LibraryLayout({ children }: { children: React.ReactNode
|
|
|
51
49
|
const isDedicatedSearchSurface =
|
|
52
50
|
pathname === LIBRARY_HUB_FIND_PATH || pathname === LIBRARY_LIST_PATH
|
|
53
51
|
|
|
54
|
-
if (
|
|
52
|
+
if (
|
|
53
|
+
isDiscoveryHubRoot ||
|
|
54
|
+
isDedicatedSearchSurface ||
|
|
55
|
+
isLibraryFocusedFlow(pathname)
|
|
56
|
+
) {
|
|
55
57
|
closePanelRef.current({ mainSidebar: "leave" })
|
|
56
58
|
return undefined
|
|
57
59
|
}
|
|
@@ -62,5 +64,5 @@ export default function LibraryLayout({ children }: { children: React.ReactNode
|
|
|
62
64
|
return undefined
|
|
63
65
|
}, [pathname, activePanel])
|
|
64
66
|
|
|
65
|
-
return
|
|
67
|
+
return <Outlet />
|
|
66
68
|
}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* `/library/new` — focused authoring page for a new question.
|
|
3
|
-
*
|
|
4
|
-
* The composer (`NewLibraryItemForm`) owns the `NewFocusTemplate` (form-inspector
|
|
5
|
-
* variant) underneath. This route file is intentionally thin so the same composer
|
|
6
|
-
* can be mounted from other entry points (deep-link, command palette).
|
|
7
|
-
*
|
|
8
|
-
* Folder pre-selection: callers may pass `?folderId=<id>` so users dropped into
|
|
9
|
-
* the composer from a folder-scoped library land with that folder pre-selected
|
|
10
|
-
* in the metadata rail.
|
|
11
|
-
*/
|
|
1
|
+
import { useSearchParams } from "react-router-dom"
|
|
12
2
|
|
|
13
3
|
import { NewLibraryItemForm } from "@/components/new-library-item-form"
|
|
14
4
|
import {
|
|
@@ -18,15 +8,19 @@ import {
|
|
|
18
8
|
import { generateDraftQuestionId } from "@/lib/library-authoring"
|
|
19
9
|
import { newQuestionBackNav } from "@/lib/library-nav"
|
|
20
10
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
/**
|
|
12
|
+
* `/library/new` — focused authoring page for a new question.
|
|
13
|
+
*
|
|
14
|
+
* Reads `?folderId=<id>` from the URL via `useSearchParams` (RR DOM
|
|
15
|
+
* v7 — same shape as the Next equivalent). The Next variant used the
|
|
16
|
+
* Next 15 async server-component `searchParams: Promise<...>` API; in
|
|
17
|
+
* the Vite SPA we read params synchronously on every render.
|
|
18
|
+
*/
|
|
19
|
+
export default function NewQuestionPage() {
|
|
20
|
+
const [searchParams] = useSearchParams()
|
|
27
21
|
const folders: LibraryFolder[] = DEFAULT_LIBRARY_FOLDERS
|
|
28
22
|
|
|
29
|
-
const requested =
|
|
23
|
+
const requested = searchParams.get("folderId") ?? undefined
|
|
30
24
|
const matched = requested ? folders.find(f => f.id === requested) : undefined
|
|
31
25
|
const defaultFolderId = matched?.id
|
|
32
26
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Suspense, lazy } from "react"
|
|
2
|
+
import { Navigate, type RouteObject } from "react-router-dom"
|
|
3
|
+
|
|
4
|
+
import { LoadingFallback } from "./pages/_loading"
|
|
5
|
+
import { RouteError } from "./pages/_error"
|
|
6
|
+
import { LibraryLayout } from "./pages/library/_layout"
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Route table — mirrors the Next `app/(app)/...` filesystem routes 1:1.
|
|
10
|
+
*
|
|
11
|
+
* Lazy-load each leaf so the initial bundle is small (mirrors what
|
|
12
|
+
* `next/dynamic` did on the Next side). `<Suspense>` shows the same
|
|
13
|
+
* skeleton fallback the Next loading.tsx files used.
|
|
14
|
+
*
|
|
15
|
+
* Every route is wrapped by `App` in main.tsx (sidebar, providers,
|
|
16
|
+
* command menu). Library routes get an extra `LibraryLayout` shell
|
|
17
|
+
* that drives the secondary panel — same as the Next library/layout.tsx.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
const lazyPage = (loader: () => Promise<{ default: React.ComponentType }>) => {
|
|
21
|
+
const Lazy = lazy(loader)
|
|
22
|
+
return (
|
|
23
|
+
<Suspense fallback={<LoadingFallback />}>
|
|
24
|
+
<Lazy />
|
|
25
|
+
</Suspense>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const routes: RouteObject[] = [
|
|
30
|
+
{ index: true, element: <Navigate to="/dashboard" replace /> },
|
|
31
|
+
{
|
|
32
|
+
path: "dashboard",
|
|
33
|
+
element: lazyPage(() => import("./pages/dashboard")),
|
|
34
|
+
errorElement: <RouteError />,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
path: "library",
|
|
38
|
+
element: <LibraryLayout />,
|
|
39
|
+
errorElement: <RouteError />,
|
|
40
|
+
children: [
|
|
41
|
+
{ index: true, element: lazyPage(() => import("./pages/library/index")) },
|
|
42
|
+
{ path: "all", element: lazyPage(() => import("./pages/library/all")) },
|
|
43
|
+
{ path: "find", element: lazyPage(() => import("./pages/library/find")) },
|
|
44
|
+
{ path: "list", element: lazyPage(() => import("./pages/library/list")) },
|
|
45
|
+
{ path: "new", element: lazyPage(() => import("./pages/library/new")) },
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
path: "columns",
|
|
50
|
+
element: lazyPage(() => import("./pages/columns")),
|
|
51
|
+
errorElement: <RouteError />,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
path: "tokens-themes",
|
|
55
|
+
element: lazyPage(() => import("./pages/tokens-themes")),
|
|
56
|
+
errorElement: <RouteError />,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
path: "settings",
|
|
60
|
+
element: lazyPage(() => import("./pages/settings")),
|
|
61
|
+
errorElement: <RouteError />,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
path: "help",
|
|
65
|
+
element: lazyPage(() => import("./pages/help")),
|
|
66
|
+
errorElement: <RouteError />,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
path: "*",
|
|
70
|
+
element: lazyPage(() => import("./pages/_not-found")),
|
|
71
|
+
},
|
|
72
|
+
]
|
|
@@ -16,5 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
@import "@exxatdesignux/ui/globals.css";
|
|
18
18
|
|
|
19
|
-
/* Ensure Tailwind scans the shared UI package for utility classes (repo-relative — stable with pnpm +
|
|
20
|
-
@source "
|
|
19
|
+
/* Ensure Tailwind scans the shared UI package for utility classes (repo-relative — stable with pnpm + Vite). */
|
|
20
|
+
@source "../../node_modules/@exxatdesignux/ui/src";
|
|
21
|
+
|
|
22
|
+
/* Designer template lives at src/styles/globals.css (one level deeper than
|
|
23
|
+
Next's app/globals.css), so @source needs an extra `..` to reach the
|
|
24
|
+
consumer's node_modules from this file's location. */
|
|
@@ -14,23 +14,14 @@
|
|
|
14
14
|
"allowImportingTsExtensions": true,
|
|
15
15
|
"jsx": "react-jsx",
|
|
16
16
|
"incremental": true,
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
"name": "next"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
17
|
+
"useDefineForClassFields": true,
|
|
18
|
+
"verbatimModuleSyntax": false,
|
|
19
|
+
"types": ["vite/client", "node"],
|
|
23
20
|
"baseUrl": ".",
|
|
24
21
|
"paths": {
|
|
25
22
|
"@/*": ["./*"]
|
|
26
23
|
}
|
|
27
24
|
},
|
|
28
|
-
"include": [
|
|
29
|
-
|
|
30
|
-
"**/*.ts",
|
|
31
|
-
"**/*.tsx",
|
|
32
|
-
".next/types/**/*.ts",
|
|
33
|
-
".next/dev/types/**/*.ts"
|
|
34
|
-
],
|
|
35
|
-
"exclude": ["node_modules"]
|
|
25
|
+
"include": ["**/*.ts", "**/*.tsx"],
|
|
26
|
+
"exclude": ["node_modules", "dist"]
|
|
36
27
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineConfig } from "vite"
|
|
2
|
+
import react from "@vitejs/plugin-react"
|
|
3
|
+
import tailwindcss from "@tailwindcss/vite"
|
|
4
|
+
import path from "node:path"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Vite config — lightweight designer stack for the Exxat DS template.
|
|
8
|
+
*
|
|
9
|
+
* Why Vite over Next.js for designers:
|
|
10
|
+
* - Cold start ~300–500 ms vs 8–12 s with Next + Turbopack
|
|
11
|
+
* - Resident memory ~250–400 MB vs 1.4–4 GB with Next dev server
|
|
12
|
+
* - HMR is instant; no server-component reload
|
|
13
|
+
* - Lower barrier for designer prototyping
|
|
14
|
+
*
|
|
15
|
+
* The DS itself (`@exxatdesignux/ui`) and the local components/, hooks/,
|
|
16
|
+
* lib/, contexts/ folders are framework-agnostic React — they work
|
|
17
|
+
* identically here as they do under Next in the legacy `template/`.
|
|
18
|
+
*
|
|
19
|
+
* Engineers porting designer prototypes to a Next-target production app
|
|
20
|
+
* follow the checklist in `consumer-extras/templates/handoff.md` —
|
|
21
|
+
* mostly mechanical swaps for `Link`, `useNavigate`, `useLocation`.
|
|
22
|
+
*/
|
|
23
|
+
export default defineConfig({
|
|
24
|
+
plugins: [
|
|
25
|
+
react(),
|
|
26
|
+
tailwindcss(),
|
|
27
|
+
],
|
|
28
|
+
resolve: {
|
|
29
|
+
alias: {
|
|
30
|
+
"@": path.resolve(__dirname, "."),
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
css: {
|
|
34
|
+
/**
|
|
35
|
+
* Tailwind v4 + `@tailwindcss/vite` does not require postcss. We
|
|
36
|
+
* explicitly opt out of postcss config discovery so Vite does not
|
|
37
|
+
* walk up the workspace tree and pick up the parent
|
|
38
|
+
* `packages/ui/postcss.config.mjs`, which in this monorepo pins a
|
|
39
|
+
* native lightningcss binary that may be missing per-platform.
|
|
40
|
+
*/
|
|
41
|
+
postcss: { plugins: [] },
|
|
42
|
+
transformer: "postcss",
|
|
43
|
+
},
|
|
44
|
+
server: {
|
|
45
|
+
port: 3000,
|
|
46
|
+
strictPort: false,
|
|
47
|
+
},
|
|
48
|
+
build: {
|
|
49
|
+
outDir: "dist",
|
|
50
|
+
sourcemap: true,
|
|
51
|
+
},
|
|
52
|
+
})
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Data view dashboard — centralized charts, storage, keyboard parity with gallery, edit layout, coach marks
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Exxat DS — Data view dashboard (list hubs)
|
|
7
|
-
|
|
8
|
-
**Authoritative detail:** **`apps/web/AGENTS.md` §4.3** and **`exxat-dashboard-view-charts`** (this rule).
|
|
9
|
-
|
|
10
|
-
## Two dashboard surfaces (do not fork chart engines)
|
|
11
|
-
|
|
12
|
-
| Surface | Entry | Shared building blocks |
|
|
13
|
-
|--------|--------|-------------------------|
|
|
14
|
-
| **Full-page dashboard** | `app/(app)/dashboard/page.tsx` | `DashboardTabs`, `ChartsOverview` / gallery demos in `charts-overview.tsx` |
|
|
15
|
-
| **Data tab** on Placements / Team / Compliance | `PlacementsTable`, `TeamTable`, `ComplianceTable` → `*DashboardChartsSection` | `ChartFigure`, `ChartCard`, `useChartVariant()`, `data-view-dashboard-charts*.tsx` |
|
|
16
|
-
|
|
17
|
-
**MUST NOT** duplicate “another” chart system for Data view — extend **`charts-overview`** patterns and **`lib/chart-keyboard-selection`**.
|
|
18
|
-
|
|
19
|
-
## MUST — accessibility & data
|
|
20
|
-
|
|
21
|
-
1. **`ChartFigure`** + **`ChartDataTable`** (`sr-only`) for every chart on the Data dashboard — same as **`charts-overview.tsx`**.
|
|
22
|
-
2. **`ChartCard`** wraps chart content; **`KeyMetrics`** **`variant="card"`** for the **`key-metrics`** tile; KPI count **1–4** persisted in layout.
|
|
23
|
-
|
|
24
|
-
## MUST — keyboard selection (parity with `/dashboard` gallery)
|
|
25
|
-
|
|
26
|
-
- Import **`CHART_KBD_ACTIVE_BAR`** and **`CHART_KBD_ACTIVE_PIE_SHAPE`** from **`@/lib/chart-keyboard-selection`**.
|
|
27
|
-
- **Bar** series: **`activeBar={CHART_KBD_ACTIVE_BAR}`** + **`activeIndex={activeIndex ?? undefined}`** (and **`Cell`** only for per-bar **fill**, not opacity-only selection).
|
|
28
|
-
- **Pie / donut:** **`activeShape={CHART_KBD_ACTIVE_PIE_SHAPE}`** + **`activeIndex`** + slice **`stroke`** / **`strokeWidth`** consistent with gallery donuts.
|
|
29
|
-
- **MUST NOT** use **`fillOpacity` dimming alone** on **`Cell`** as the sole “selected” state for keyboard exploration.
|
|
30
|
-
|
|
31
|
-
## MUST — customisation UX
|
|
32
|
-
|
|
33
|
-
- **Edit layout** control: **`aria-label="Edit dashboard layout"`** (toolbar pen-ruler). Coach marks may target **`[aria-label='Edit dashboard layout']`**.
|
|
34
|
-
- On-canvas: drag reorder, remove, width (half / full), chart type, add/remove cards, reset. **No** separate Sheet for layout.
|
|
35
|
-
- While **`layoutEditMode`**: hide **`DataTableToolbar`** (search / filters / Properties row); **Done** / **Cancel** on canvas.
|
|
36
|
-
|
|
37
|
-
## MUST — persistence (centralized)
|
|
38
|
-
|
|
39
|
-
- **One bundle:** **`lib/data-view-dashboard-storage.ts`** — key **`exxat-ds:data-view-dashboards:v1`**, scopes **`placements` | `team` | `compliance`**.
|
|
40
|
-
- Placements helpers: **`loadDashboardLayout`** / **`saveDashboardLayout`** in **`data-view-dashboard-charts.tsx`** (wrap storage API).
|
|
41
|
-
- **MUST NOT** introduce parallel **`localStorage`** keys for the same **`DashboardLayout`** shape without updating the storage module.
|
|
42
|
-
|
|
43
|
-
## SHOULD — coach marks
|
|
44
|
-
|
|
45
|
-
- Register **customize dashboard** flows in **`lib/coach-mark-registry.ts`**; shared copy in **`lib/dashboard-customize-coach-mark.ts`**.
|
|
46
|
-
- Use **`useCoachMark`** **`enabled`** / **`dependsOnDismissedFlowId`** when a tour only applies on **dashboard** view or after another flow (**`COACH_MARK_FLOW_COMPLETED_EVENT`**).
|
|
47
|
-
|
|
48
|
-
## Reference files
|
|
49
|
-
|
|
50
|
-
- `components/data-view-dashboard-charts.tsx` (Placements)
|
|
51
|
-
- `components/data-view-dashboard-charts-team.tsx`, `data-view-dashboard-charts-compliance.tsx`
|
|
52
|
-
- `components/placements-table.tsx` — dashboard tab body wires `PlacementsDashboardChartsSection` + layout-edit toolbar inline (no separate `DashboardShell` component)
|
|
53
|
-
- `lib/chart-keyboard-selection.ts`, `lib/data-view-dashboard-storage.ts`, `lib/dashboard-customize-coach-mark.ts`
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: shadcn
|
|
3
|
-
description: Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".
|
|
4
|
-
user-invocable: false
|
|
5
|
-
allowed-tools: Bash(npx shadcn@latest *), Bash(pnpm dlx shadcn@latest *), Bash(bunx --bun shadcn@latest *)
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# shadcn/ui
|
|
9
|
-
|
|
10
|
-
A framework for building ui, components and design systems. Components are added as source code to the user's project via the CLI.
|
|
11
|
-
|
|
12
|
-
> **IMPORTANT:** Run all CLI commands using the project's package runner: `npx shadcn@latest`, `pnpm dlx shadcn@latest`, or `bunx --bun shadcn@latest` — based on the project's `packageManager`. Examples below use `npx shadcn@latest` but substitute the correct runner for the project.
|
|
13
|
-
|
|
14
|
-
## Current Project Context
|
|
15
|
-
|
|
16
|
-
```json
|
|
17
|
-
!`npx shadcn@latest info --json`
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
The JSON above contains the project config and installed components. Use `npx shadcn@latest docs <component>` to get documentation and example URLs for any component.
|
|
21
|
-
|
|
22
|
-
## Principles
|
|
23
|
-
|
|
24
|
-
1. **Use existing components first.** Use `npx shadcn@latest search` to check registries before writing custom UI. Check community registries too.
|
|
25
|
-
2. **Compose, don't reinvent.** Settings page = Tabs + Card + form controls. Dashboard = Sidebar + Card + Chart + Table.
|
|
26
|
-
3. **Use built-in variants before custom styles.** `variant="outline"`, `size="sm"`, etc.
|
|
27
|
-
4. **Use semantic colors.** `bg-primary`, `text-muted-foreground` — never raw values like `bg-blue-500`.
|
|
28
|
-
|
|
29
|
-
## Critical Rules
|
|
30
|
-
|
|
31
|
-
These rules are **always enforced**. Each links to a file with Incorrect/Correct code pairs.
|
|
32
|
-
|
|
33
|
-
### Styling & Tailwind → [styling.md](./rules/styling.md)
|
|
34
|
-
|
|
35
|
-
- **`className` for layout, not styling.** Never override component colors or typography.
|
|
36
|
-
- **No `space-x-*` or `space-y-*`.** Use `flex` with `gap-*`. For vertical stacks, `flex flex-col gap-*`.
|
|
37
|
-
- **Use `size-*` when width and height are equal.** `size-10` not `w-10 h-10`.
|
|
38
|
-
- **Use `truncate` shorthand.** Not `overflow-hidden text-ellipsis whitespace-nowrap`.
|
|
39
|
-
- **No manual `dark:` color overrides.** Use semantic tokens (`bg-background`, `text-muted-foreground`).
|
|
40
|
-
- **Use `cn()` for conditional classes.** Don't write manual template literal ternaries.
|
|
41
|
-
- **No manual `z-index` on overlay components.** Dialog, Sheet, Popover, etc. handle their own stacking.
|
|
42
|
-
|
|
43
|
-
### Forms & Inputs → [forms.md](./rules/forms.md)
|
|
44
|
-
|
|
45
|
-
- **Forms use `FieldGroup` + `Field`.** Never use raw `div` with `space-y-*` or `grid gap-*` for form layout.
|
|
46
|
-
- **`InputGroup` uses `InputGroupInput`/`InputGroupTextarea`.** Never raw `Input`/`Textarea` inside `InputGroup`.
|
|
47
|
-
- **Buttons inside inputs use `InputGroup` + `InputGroupAddon`.**
|
|
48
|
-
- **Option sets (2–7 choices) use `ToggleGroup`.** Don't loop `Button` with manual active state.
|
|
49
|
-
- **`FieldSet` + `FieldLegend` for grouping related checkboxes/radios.** Don't use a `div` with a heading.
|
|
50
|
-
- **Field validation uses `data-invalid` + `aria-invalid`.** `data-invalid` on `Field`, `aria-invalid` on the control. For disabled: `data-disabled` on `Field`, `disabled` on the control.
|
|
51
|
-
|
|
52
|
-
### Component Structure → [composition.md](./rules/composition.md)
|
|
53
|
-
|
|
54
|
-
- **Items always inside their Group.** `SelectItem` → `SelectGroup`. `DropdownMenuItem` → `DropdownMenuGroup`. `CommandItem` → `CommandGroup`.
|
|
55
|
-
- **Use `asChild` (radix) or `render` (base) for custom triggers.** Check `base` field from `npx shadcn@latest info`. → [base-vs-radix.md](./rules/base-vs-radix.md)
|
|
56
|
-
- **Dialog, Sheet, and Drawer always need a Title.** `DialogTitle`, `SheetTitle`, `DrawerTitle` required for accessibility. Use `className="sr-only"` if visually hidden.
|
|
57
|
-
- **Use full Card composition.** `CardHeader`/`CardTitle`/`CardDescription`/`CardContent`/`CardFooter`. Don't dump everything in `CardContent`.
|
|
58
|
-
- **Button has no `isPending`/`isLoading`.** Compose with `Spinner` + `data-icon` + `disabled`.
|
|
59
|
-
- **`TabsTrigger` must be inside `TabsList`.** Never render triggers directly in `Tabs`.
|
|
60
|
-
- **`Avatar` always needs `AvatarFallback`.** For when the image fails to load.
|
|
61
|
-
|
|
62
|
-
### Use Components, Not Custom Markup → [composition.md](./rules/composition.md)
|
|
63
|
-
|
|
64
|
-
- **Use existing components before custom markup.** Check if a component exists before writing a styled `div`.
|
|
65
|
-
- **Callouts use `Alert`.** Don't build custom styled divs.
|
|
66
|
-
- **Empty states use `Empty`.** Don't build custom empty state markup.
|
|
67
|
-
- **Toast via `sonner`.** Use `toast()` from `sonner`.
|
|
68
|
-
- **Use `Separator`** instead of `<hr>` or `<div className="border-t">`.
|
|
69
|
-
- **Use `Skeleton`** for loading placeholders. No custom `animate-pulse` divs.
|
|
70
|
-
- **Use `Badge`** instead of custom styled spans.
|
|
71
|
-
|
|
72
|
-
### Icons → [icons.md](./rules/icons.md)
|
|
73
|
-
|
|
74
|
-
- **Icons in `Button` use `data-icon`.** `data-icon="inline-start"` or `data-icon="inline-end"` on the icon.
|
|
75
|
-
- **No sizing classes on icons inside components.** Components handle icon sizing via CSS. No `size-4` or `w-4 h-4`.
|
|
76
|
-
- **Pass icons as objects, not string keys.** `icon={CheckIcon}`, not a string lookup.
|
|
77
|
-
|
|
78
|
-
### CLI
|
|
79
|
-
|
|
80
|
-
- **Never decode or fetch preset codes manually.** Pass them directly to `npx shadcn@latest init --preset <code>`.
|
|
81
|
-
|
|
82
|
-
## Key Patterns
|
|
83
|
-
|
|
84
|
-
These are the most common patterns that differentiate correct shadcn/ui code. For edge cases, see the linked rule files above.
|
|
85
|
-
|
|
86
|
-
```tsx
|
|
87
|
-
// Form layout: FieldGroup + Field, not div + Label.
|
|
88
|
-
<FieldGroup>
|
|
89
|
-
<Field>
|
|
90
|
-
<FieldLabel htmlFor="email">Email</FieldLabel>
|
|
91
|
-
<Input id="email" />
|
|
92
|
-
</Field>
|
|
93
|
-
</FieldGroup>
|
|
94
|
-
|
|
95
|
-
// Validation: data-invalid on Field, aria-invalid on the control.
|
|
96
|
-
<Field data-invalid>
|
|
97
|
-
<FieldLabel>Email</FieldLabel>
|
|
98
|
-
<Input aria-invalid />
|
|
99
|
-
<FieldDescription>Invalid email.</FieldDescription>
|
|
100
|
-
</Field>
|
|
101
|
-
|
|
102
|
-
// Icons in buttons: data-icon, no sizing classes.
|
|
103
|
-
<Button>
|
|
104
|
-
<SearchIcon data-icon="inline-start" />
|
|
105
|
-
Search
|
|
106
|
-
</Button>
|
|
107
|
-
|
|
108
|
-
// Spacing: gap-*, not space-y-*.
|
|
109
|
-
<div className="flex flex-col gap-4"> // correct
|
|
110
|
-
<div className="space-y-4"> // wrong
|
|
111
|
-
|
|
112
|
-
// Equal dimensions: size-*, not w-* h-*.
|
|
113
|
-
<Avatar className="size-10"> // correct
|
|
114
|
-
<Avatar className="w-10 h-10"> // wrong
|
|
115
|
-
|
|
116
|
-
// Status colors: Badge variants or semantic tokens, not raw colors.
|
|
117
|
-
<Badge variant="secondary">+20.1%</Badge> // correct
|
|
118
|
-
<span className="text-emerald-600">+20.1%</span> // wrong
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## Component Selection
|
|
122
|
-
|
|
123
|
-
| Need | Use |
|
|
124
|
-
| -------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
125
|
-
| Button/action | `Button` with appropriate variant |
|
|
126
|
-
| Form inputs | `Input`, `Select`, `Combobox`, `Switch`, `Checkbox`, `RadioGroup`, `Textarea`, `InputOTP`, `Slider` |
|
|
127
|
-
| Toggle between 2–5 options | `ToggleGroup` + `ToggleGroupItem` |
|
|
128
|
-
| Data display | `Table`, `Card`, `Badge`, `Avatar` |
|
|
129
|
-
| Navigation | `Sidebar`, `NavigationMenu`, `Breadcrumb`, `Tabs`, `Pagination` |
|
|
130
|
-
| Overlays | `Dialog` (modal), `Sheet` (side panel), `Drawer` (bottom sheet), `AlertDialog` (confirmation) |
|
|
131
|
-
| Feedback | `sonner` (toast), `Alert`, `Progress`, `Skeleton`, `Spinner` |
|
|
132
|
-
| Command palette | `Command` inside `Dialog` |
|
|
133
|
-
| Charts | `Chart` (wraps Recharts) |
|
|
134
|
-
| Layout | `Card`, `Separator`, `Resizable`, `ScrollArea`, `Accordion`, `Collapsible` |
|
|
135
|
-
| Empty states | `Empty` |
|
|
136
|
-
| Menus | `DropdownMenu`, `ContextMenu`, `Menubar` |
|
|
137
|
-
| Tooltips/info | `Tooltip`, `HoverCard`, `Popover` |
|
|
138
|
-
|
|
139
|
-
## Key Fields
|
|
140
|
-
|
|
141
|
-
The injected project context contains these key fields:
|
|
142
|
-
|
|
143
|
-
- **`aliases`** → use the actual alias prefix for imports (e.g. `@/`, `~/`), never hardcode.
|
|
144
|
-
- **`isRSC`** → when `true`, components using `useState`, `useEffect`, event handlers, or browser APIs need `"use client"` at the top of the file. Always reference this field when advising on the directive.
|
|
145
|
-
- **`tailwindVersion`** → `"v4"` uses `@theme inline` blocks; `"v3"` uses `tailwind.config.js`.
|
|
146
|
-
- **`tailwindCssFile`** → the global CSS file where custom CSS variables are defined. Always edit this file, never create a new one.
|
|
147
|
-
- **`style`** → component visual treatment (e.g. `nova`, `vega`).
|
|
148
|
-
- **`base`** → primitive library (`radix` or `base`). Affects component APIs and available props.
|
|
149
|
-
- **`iconLibrary`** → determines icon imports. Use `lucide-react` for `lucide`, `@tabler/icons-react` for `tabler`, etc. Never assume `lucide-react`.
|
|
150
|
-
- **`resolvedPaths`** → exact file-system destinations for components, utils, hooks, etc.
|
|
151
|
-
- **`framework`** → routing and file conventions (e.g. Next.js App Router vs Vite SPA).
|
|
152
|
-
- **`packageManager`** → use this for any non-shadcn dependency installs (e.g. `pnpm add date-fns` vs `npm install date-fns`).
|
|
153
|
-
|
|
154
|
-
See [cli.md — `info` command](./cli.md) for the full field reference.
|
|
155
|
-
|
|
156
|
-
## Component Docs, Examples, and Usage
|
|
157
|
-
|
|
158
|
-
Run `npx shadcn@latest docs <component>` to get the URLs for a component's documentation, examples, and API reference. Fetch these URLs to get the actual content.
|
|
159
|
-
|
|
160
|
-
```bash
|
|
161
|
-
npx shadcn@latest docs button dialog select
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
**When creating, fixing, debugging, or using a component, always run `npx shadcn@latest docs` and fetch the URLs first.** This ensures you're working with the correct API and usage patterns rather than guessing.
|
|
165
|
-
|
|
166
|
-
## Workflow
|
|
167
|
-
|
|
168
|
-
1. **Get project context** — already injected above. Run `npx shadcn@latest info` again if you need to refresh.
|
|
169
|
-
2. **Check installed components first** — before running `add`, always check the `components` list from project context or list the `resolvedPaths.ui` directory. Don't import components that haven't been added, and don't re-add ones already installed.
|
|
170
|
-
3. **Find components** — `npx shadcn@latest search`.
|
|
171
|
-
4. **Get docs and examples** — run `npx shadcn@latest docs <component>` to get URLs, then fetch them. Use `npx shadcn@latest view` to browse registry items you haven't installed. To preview changes to installed components, use `npx shadcn@latest add --diff`.
|
|
172
|
-
5. **Install or update** — `npx shadcn@latest add`. When updating existing components, use `--dry-run` and `--diff` to preview changes first (see [Updating Components](#updating-components) below).
|
|
173
|
-
6. **Fix imports in third-party components** — After adding components from community registries (e.g. `@bundui`, `@magicui`), check the added non-UI files for hardcoded import paths like `@/components/ui/...`. These won't match the project's actual aliases. Use `npx shadcn@latest info` to get the correct `ui` alias (e.g. `@workspace/ui/components`) and rewrite the imports accordingly. The CLI rewrites imports for its own UI files, but third-party registry components may use default paths that don't match the project.
|
|
174
|
-
7. **Review added components** — After adding a component or block from any registry, **always read the added files and verify they are correct**. Check for missing sub-components (e.g. `SelectItem` without `SelectGroup`), missing imports, incorrect composition, or violations of the [Critical Rules](#critical-rules). Also replace any icon imports with the project's `iconLibrary` from the project context (e.g. if the registry item uses `lucide-react` but the project uses `hugeicons`, swap the imports and icon names accordingly). Fix all issues before moving on.
|
|
175
|
-
8. **Registry must be explicit** — When the user asks to add a block or component, **do not guess the registry**. If no registry is specified (e.g. user says "add a login block" without specifying `@shadcn`, `@tailark`, etc.), ask which registry to use. Never default to a registry on behalf of the user.
|
|
176
|
-
9. **Switching presets** — Ask the user first: **reinstall**, **merge**, or **skip**?
|
|
177
|
-
- **Reinstall**: `npx shadcn@latest init --preset <code> --force --reinstall`. Overwrites all components.
|
|
178
|
-
- **Merge**: `npx shadcn@latest init --preset <code> --force --no-reinstall`, then run `npx shadcn@latest info` to list installed components, then for each installed component use `--dry-run` and `--diff` to [smart merge](#updating-components) it individually.
|
|
179
|
-
- **Skip**: `npx shadcn@latest init --preset <code> --force --no-reinstall`. Only updates config and CSS, leaves components as-is.
|
|
180
|
-
- **Important**: Always run preset commands inside the user's project directory. The CLI automatically preserves the current base (`base` vs `radix`) from `components.json`. If you must use a scratch/temp directory (e.g. for `--dry-run` comparisons), pass `--base <current-base>` explicitly — preset codes do not encode the base.
|
|
181
|
-
|
|
182
|
-
## Updating Components
|
|
183
|
-
|
|
184
|
-
When the user asks to update a component from upstream while keeping their local changes, use `--dry-run` and `--diff` to intelligently merge. **NEVER fetch raw files from GitHub manually — always use the CLI.**
|
|
185
|
-
|
|
186
|
-
1. Run `npx shadcn@latest add <component> --dry-run` to see all files that would be affected.
|
|
187
|
-
2. For each file, run `npx shadcn@latest add <component> --diff <file>` to see what changed upstream vs local.
|
|
188
|
-
3. Decide per file based on the diff:
|
|
189
|
-
- No local changes → safe to overwrite.
|
|
190
|
-
- Has local changes → read the local file, analyze the diff, and apply upstream updates while preserving local modifications.
|
|
191
|
-
- User says "just update everything" → use `--overwrite`, but confirm first.
|
|
192
|
-
4. **Never use `--overwrite` without the user's explicit approval.**
|
|
193
|
-
|
|
194
|
-
## Quick Reference
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
# Create a new project.
|
|
198
|
-
npx shadcn@latest init --name my-app --preset base-nova
|
|
199
|
-
npx shadcn@latest init --name my-app --preset a2r6bw --template vite
|
|
200
|
-
|
|
201
|
-
# Create a monorepo project.
|
|
202
|
-
npx shadcn@latest init --name my-app --preset base-nova --monorepo
|
|
203
|
-
npx shadcn@latest init --name my-app --preset base-nova --template next --monorepo
|
|
204
|
-
|
|
205
|
-
# Initialize existing project.
|
|
206
|
-
npx shadcn@latest init --preset base-nova
|
|
207
|
-
npx shadcn@latest init --defaults # shortcut: --template=next --preset=base-nova
|
|
208
|
-
|
|
209
|
-
# Add components.
|
|
210
|
-
npx shadcn@latest add button card dialog
|
|
211
|
-
npx shadcn@latest add @magicui/shimmer-button
|
|
212
|
-
npx shadcn@latest add --all
|
|
213
|
-
|
|
214
|
-
# Preview changes before adding/updating.
|
|
215
|
-
npx shadcn@latest add button --dry-run
|
|
216
|
-
npx shadcn@latest add button --diff button.tsx
|
|
217
|
-
npx shadcn@latest add @acme/form --view button.tsx
|
|
218
|
-
|
|
219
|
-
# Search registries.
|
|
220
|
-
npx shadcn@latest search @shadcn -q "sidebar"
|
|
221
|
-
npx shadcn@latest search @tailark -q "stats"
|
|
222
|
-
|
|
223
|
-
# Get component docs and example URLs.
|
|
224
|
-
npx shadcn@latest docs button dialog select
|
|
225
|
-
|
|
226
|
-
# View registry item details (for items not yet installed).
|
|
227
|
-
npx shadcn@latest view @shadcn/button
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
**Named presets:** `base-nova`, `radix-nova`
|
|
231
|
-
**Templates:** `next`, `vite`, `start`, `react-router`, `astro` (all support `--monorepo`) and `laravel` (not supported for monorepo)
|
|
232
|
-
**Preset codes:** Base62 strings starting with `a` (e.g. `a2r6bw`), from [ui.shadcn.com](https://ui.shadcn.com).
|
|
233
|
-
|
|
234
|
-
## Detailed References
|
|
235
|
-
|
|
236
|
-
- [rules/forms.md](./rules/forms.md) — FieldGroup, Field, InputGroup, ToggleGroup, FieldSet, validation states
|
|
237
|
-
- [rules/composition.md](./rules/composition.md) — Groups, overlays, Card, Tabs, Avatar, Alert, Empty, Toast, Separator, Skeleton, Badge, Button loading
|
|
238
|
-
- [rules/icons.md](./rules/icons.md) — data-icon, icon sizing, passing icons as objects
|
|
239
|
-
- [rules/styling.md](./rules/styling.md) — Semantic colors, variants, className, spacing, size, truncate, dark mode, cn(), z-index
|
|
240
|
-
- [rules/base-vs-radix.md](./rules/base-vs-radix.md) — asChild vs render, Select, ToggleGroup, Slider, Accordion
|
|
241
|
-
- [cli.md](./cli.md) — Commands, flags, presets, templates
|
|
242
|
-
- [customization.md](./customization.md) — Theming, CSS variables, extending components
|
|
Binary file
|
|
Binary file
|