@xdev-asia/ui 0.0.0-stage → 4.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +66 -0
- package/LICENSE +202 -0
- package/README.md +149 -2
- package/assets/brand/mobile/android-background-1024.png +0 -0
- package/assets/brand/mobile/android-background.svg +13 -0
- package/assets/brand/mobile/android-foreground-1024.png +0 -0
- package/assets/brand/mobile/android-foreground.svg +13 -0
- package/assets/brand/mobile/android-monochrome-1024.png +0 -0
- package/assets/brand/mobile/android-monochrome.svg +3 -0
- package/assets/brand/mobile/ios-icon-1024.png +0 -0
- package/assets/brand/mobile/ios-icon-dark-1024.png +0 -0
- package/assets/brand/mobile/ios-icon-dark.svg +22 -0
- package/assets/brand/mobile/ios-icon.svg +22 -0
- package/assets/brand/systems/xdev-ui-icon.svg +23 -0
- package/assets/brand/systems/xdev-ui-lockup-dark.svg +24 -0
- package/assets/brand/systems/xdev-ui-lockup-light.svg +24 -0
- package/assets/brand/systems/xdev-ui-mark-lit.svg +13 -0
- package/assets/brand/systems/xdev-ui-mark.svg +3 -0
- package/assets/brand/xdev-icon-512.png +0 -0
- package/assets/brand/xdev-icon-blue.svg +23 -0
- package/assets/brand/xdev-icon.svg +23 -0
- package/assets/brand/xdev-lockup-dark.svg +24 -0
- package/assets/brand/xdev-lockup-light.svg +24 -0
- package/assets/brand/xdev-mark-lit.svg +13 -0
- package/assets/brand/xdev-mark-tile.svg +3 -0
- package/assets/brand/xdev-mark.svg +3 -0
- package/bin/xdev-ui-skills.mjs +142 -0
- package/dist/Workspace.stories.d.ts +15 -0
- package/dist/ai-manifest.json +3727 -0
- package/dist/chunks/FileDrop-C-ygn8kF.js +891 -0
- package/dist/chunks/FileDrop-C-ygn8kF.js.map +1 -0
- package/dist/chunks/Popover-Ds4RBtZv.js +121 -0
- package/dist/chunks/Popover-Ds4RBtZv.js.map +1 -0
- package/dist/chunks/crop-CahE3q01.js +55 -0
- package/dist/chunks/crop-CahE3q01.js.map +1 -0
- package/dist/chunks/modal-BYFY08ti.js +54 -0
- package/dist/chunks/modal-BYFY08ti.js.map +1 -0
- package/dist/components/ActionTile/ActionTile.d.ts +14 -0
- package/dist/components/ActionTile/ActionTile.stories.d.ts +18 -0
- package/dist/components/ActivityBar/ActivityBar.d.ts +36 -0
- package/dist/components/ActivityBar/ActivityBar.stories.d.ts +27 -0
- package/dist/components/AgentChip/AgentChip.d.ts +10 -0
- package/dist/components/AgentChip/AgentChip.stories.d.ts +21 -0
- package/dist/components/AgentRow/AgentRow.d.ts +24 -0
- package/dist/components/AgentRow/AgentRow.stories.d.ts +19 -0
- package/dist/components/AppShell/AppShell.d.ts +58 -0
- package/dist/components/AppShell/AppShell.stories.d.ts +17 -0
- package/dist/components/ApprovalBar/ApprovalBar.d.ts +23 -0
- package/dist/components/ApprovalBar/ApprovalBar.stories.d.ts +18 -0
- package/dist/components/AttentionInbox/AttentionInbox.d.ts +43 -0
- package/dist/components/AttentionInbox/AttentionInbox.stories.d.ts +16 -0
- package/dist/components/AudioPreview/AudioPreview.d.ts +33 -0
- package/dist/components/AudioPreview/AudioPreview.stories.d.ts +23 -0
- package/dist/components/AudioPreview/audio-preview-store.d.ts +14 -0
- package/dist/components/AuthShell/AuthShell.d.ts +24 -0
- package/dist/components/AuthShell/AuthShell.stories.d.ts +20 -0
- package/dist/components/Avatar/Avatar.d.ts +13 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +21 -0
- package/dist/components/Badge/Badge.d.ts +14 -0
- package/dist/components/Badge/Badge.stories.d.ts +26 -0
- package/dist/components/Banner/Banner.d.ts +11 -0
- package/dist/components/Banner/Banner.stories.d.ts +23 -0
- package/dist/components/BarChart/BarChart.d.ts +20 -0
- package/dist/components/BarChart/BarChart.stories.d.ts +24 -0
- package/dist/components/Board/Board.d.ts +9 -0
- package/dist/components/Board/Board.stories.d.ts +18 -0
- package/dist/components/BoardCard/BoardCard.d.ts +32 -0
- package/dist/components/BoardColumn/BoardColumn.d.ts +24 -0
- package/dist/components/BottomNav/BottomNav.d.ts +40 -0
- package/dist/components/BottomNav/BottomNav.stories.d.ts +40 -0
- package/dist/components/BrandMark/BrandMark.d.ts +20 -0
- package/dist/components/BrandMark/BrandMark.stories.d.ts +28 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +22 -0
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts +27 -0
- package/dist/components/BulkBar/BulkBar.d.ts +21 -0
- package/dist/components/BulkBar/BulkBar.stories.d.ts +16 -0
- package/dist/components/Button/Button.d.ts +42 -0
- package/dist/components/Button/Button.stories.d.ts +41 -0
- package/dist/components/Card/Card.d.ts +22 -0
- package/dist/components/Card/Card.stories.d.ts +307 -0
- package/dist/components/Checkbox/Checkbox.d.ts +10 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +18 -0
- package/dist/components/Coachmark/Coachmark.d.ts +31 -0
- package/dist/components/Coachmark/Coachmark.stories.d.ts +27 -0
- package/dist/components/Coachmark/placeCoachmark.d.ts +31 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +19 -0
- package/dist/components/CodeBlock/CodeBlock.stories.d.ts +22 -0
- package/dist/components/CodeInput/CodeInput.d.ts +25 -0
- package/dist/components/CodeInput/CodeInput.stories.d.ts +32 -0
- package/dist/components/CodeInput/normalizeCode.d.ts +10 -0
- package/dist/components/ColorField/ColorField.d.ts +29 -0
- package/dist/components/Combobox/Combobox.d.ts +105 -0
- package/dist/components/Combobox/Combobox.stories.d.ts +42 -0
- package/dist/components/CommandPalette/CommandPalette.d.ts +94 -0
- package/dist/components/CommandPalette/CommandPalette.stories.d.ts +39 -0
- package/dist/components/Comment/Comment.d.ts +25 -0
- package/dist/components/Comment/Comment.stories.d.ts +24 -0
- package/dist/components/CommitGraph/CommitGraph.d.ts +15 -0
- package/dist/components/CommitGraph/CommitGraph.stories.d.ts +15 -0
- package/dist/components/CommitGraph/graphLanes.d.ts +56 -0
- package/dist/components/Composer/Composer.d.ts +31 -0
- package/dist/components/Composer/Composer.stories.d.ts +17 -0
- package/dist/components/Container/Container.d.ts +11 -0
- package/dist/components/Container/Container.stories.d.ts +14 -0
- package/dist/components/DataTable/DataTable.d.ts +79 -0
- package/dist/components/DataTable/DataTable.stories.d.ts +26 -0
- package/dist/components/DataTable/table-helpers.d.ts +16 -0
- package/dist/components/DataTable/table-reorder.d.ts +40 -0
- package/dist/components/DatePicker/Calendar.d.ts +51 -0
- package/dist/components/DatePicker/DatePicker.d.ts +51 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts +42 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +59 -0
- package/dist/components/DateRangePicker/DateRangePicker.stories.d.ts +42 -0
- package/dist/components/DescriptionList/DescriptionList.d.ts +14 -0
- package/dist/components/DescriptionList/DescriptionList.stories.d.ts +21 -0
- package/dist/components/Dialog/Dialog.d.ts +43 -0
- package/dist/components/Dialog/Dialog.stories.d.ts +22 -0
- package/dist/components/DiffStat/DiffStat.d.ts +12 -0
- package/dist/components/DiffStat/DiffStat.stories.d.ts +15 -0
- package/dist/components/Disclosure/Disclosure.d.ts +18 -0
- package/dist/components/Disclosure/Disclosure.stories.d.ts +27 -0
- package/dist/components/DonutChart/DonutChart.d.ts +30 -0
- package/dist/components/DonutChart/DonutChart.stories.d.ts +26 -0
- package/dist/components/Drawer/Drawer.d.ts +27 -0
- package/dist/components/Drawer/Drawer.stories.d.ts +18 -0
- package/dist/components/Emblem/Emblem.d.ts +19 -0
- package/dist/components/Emblem/Emblem.stories.d.ts +19 -0
- package/dist/components/EmptyState/EmptyState.d.ts +43 -0
- package/dist/components/EmptyState/EmptyState.stories.d.ts +17 -0
- package/dist/components/EndpointPanel/EndpointPanel.d.ts +29 -0
- package/dist/components/FacetFilter/FacetFilter.d.ts +39 -0
- package/dist/components/FacetFilter/FacetFilter.stories.d.ts +23 -0
- package/dist/components/FacetFilter/facet-helpers.d.ts +5 -0
- package/dist/components/Field/Field.d.ts +27 -0
- package/dist/components/Field/Field.stories.d.ts +25 -0
- package/dist/components/FieldMessage/FieldMessage.d.ts +10 -0
- package/dist/components/FieldMessage/FieldMessage.stories.d.ts +14 -0
- package/dist/components/FileDrop/FileDrop.d.ts +72 -0
- package/dist/components/FileDrop/FileDrop.stories.d.ts +18 -0
- package/dist/components/FileIcon/FileIcon.d.ts +25 -0
- package/dist/components/FileIcon/FileIcon.stories.d.ts +14 -0
- package/dist/components/FilterChip/FilterChip.d.ts +9 -0
- package/dist/components/FilterChip/FilterChip.stories.d.ts +19 -0
- package/dist/components/FlowMap/FlowMap.d.ts +74 -0
- package/dist/components/FlowMap/FlowMap.stories.d.ts +24 -0
- package/dist/components/FontField/FontField.d.ts +15 -0
- package/dist/components/FontField/FontField.stories.d.ts +17 -0
- package/dist/components/FormDialog/FormDialog.d.ts +40 -0
- package/dist/components/FormDialog/FormDialog.stories.d.ts +22 -0
- package/dist/components/FormSection/FormSection.d.ts +19 -0
- package/dist/components/FormSection/FormSection.stories.d.ts +16 -0
- package/dist/components/Grid/Grid.d.ts +23 -0
- package/dist/components/Grid/Grid.stories.d.ts +19 -0
- package/dist/components/Grid/breakpoints.d.ts +25 -0
- package/dist/components/Heatmap/Heatmap.d.ts +22 -0
- package/dist/components/Heatmap/Heatmap.stories.d.ts +24 -0
- package/dist/components/Icon/Icon.d.ts +14 -0
- package/dist/components/Icon/Icon.stories.d.ts +20 -0
- package/dist/components/IconButton/IconButton.d.ts +16 -0
- package/dist/components/IconButton/IconButton.stories.d.ts +27 -0
- package/dist/components/Identity/Identity.d.ts +14 -0
- package/dist/components/Identity/Identity.stories.d.ts +14 -0
- package/dist/components/Kbd/Kbd.d.ts +5 -0
- package/dist/components/Kbd/Kbd.stories.d.ts +13 -0
- package/dist/components/Label/Label.d.ts +15 -0
- package/dist/components/Label/Label.stories.d.ts +16 -0
- package/dist/components/LaunchCard/LaunchCard.d.ts +36 -0
- package/dist/components/LaunchCard/LaunchCard.stories.d.ts +32 -0
- package/dist/components/List/List.d.ts +11 -0
- package/dist/components/List/List.stories.d.ts +13 -0
- package/dist/components/ListRow/ListRow.d.ts +20 -0
- package/dist/components/ListRow/ListRow.stories.d.ts +27 -0
- package/dist/components/Menu/Menu.d.ts +53 -0
- package/dist/components/Menu/Menu.stories.d.ts +85 -0
- package/dist/components/Menu/MenuButton.d.ts +23 -0
- package/dist/components/Menu/MenuButton.stories.d.ts +46 -0
- package/dist/components/Menu/menu-keys.d.ts +26 -0
- package/dist/components/Meter/Meter.d.ts +18 -0
- package/dist/components/Meter/Meter.stories.d.ts +34 -0
- package/dist/components/ModelChip/ModelChip.d.ts +26 -0
- package/dist/components/ModelChip/ModelChip.stories.d.ts +18 -0
- package/dist/components/NavList/NavList.d.ts +56 -0
- package/dist/components/NavList/NavList.stories.d.ts +25 -0
- package/dist/components/PageHeader/PageHeader.d.ts +14 -0
- package/dist/components/PageHeader/PageHeader.stories.d.ts +14 -0
- package/dist/components/Pagination/Pagination.d.ts +28 -0
- package/dist/components/Pagination/Pagination.stories.d.ts +16 -0
- package/dist/components/PairingCode/PairingCode.d.ts +17 -0
- package/dist/components/PairingCode/PairingCode.stories.d.ts +24 -0
- package/dist/components/PaletteTrigger/PaletteTrigger.d.ts +16 -0
- package/dist/components/PanZoom/PanZoom.d.ts +24 -0
- package/dist/components/PanZoom/PanZoom.stories.d.ts +11 -0
- package/dist/components/Popover/Popover.d.ts +24 -0
- package/dist/components/Popover/Popover.stories.d.ts +25 -0
- package/dist/components/Prose/Prose.d.ts +8 -0
- package/dist/components/Prose/Prose.stories.d.ts +12 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +27 -0
- package/dist/components/RadioGroup/RadioGroup.stories.d.ts +22 -0
- package/dist/components/ReactionBar/ReactionBar.d.ts +21 -0
- package/dist/components/ReactionBar/ReactionBar.stories.d.ts +26 -0
- package/dist/components/ResourceCard/ResourceCard.d.ts +30 -0
- package/dist/components/ResourceCard/ResourceCard.stories.d.ts +19 -0
- package/dist/components/ReviewComment/ReviewComment.d.ts +41 -0
- package/dist/components/ReviewComment/ReviewComment.stories.d.ts +19 -0
- package/dist/components/RouteDiagram/RouteDiagram.d.ts +27 -0
- package/dist/components/RunTimeline/RunTimeline.d.ts +28 -0
- package/dist/components/RunTimeline/RunTimeline.stories.d.ts +31 -0
- package/dist/components/SaveBar/SaveBar.d.ts +56 -0
- package/dist/components/SaveBar/SaveBar.stories.d.ts +16 -0
- package/dist/components/SearchInput/SearchInput.d.ts +22 -0
- package/dist/components/SearchInput/SearchInput.stories.d.ts +18 -0
- package/dist/components/SearchPicker/SearchPicker.d.ts +49 -0
- package/dist/components/SearchPicker/SearchPicker.stories.d.ts +33 -0
- package/dist/components/Segmented/Segmented.d.ts +18 -0
- package/dist/components/Segmented/Segmented.stories.d.ts +18 -0
- package/dist/components/Select/Select.d.ts +26 -0
- package/dist/components/Select/Select.stories.d.ts +22 -0
- package/dist/components/ServiceStatus/ServiceStatus.d.ts +13 -0
- package/dist/components/SessionBar/SessionBar.d.ts +33 -0
- package/dist/components/SessionBar/SessionBar.stories.d.ts +27 -0
- package/dist/components/SettingRow/SettingRow.d.ts +17 -0
- package/dist/components/SettingRow/SettingRow.stories.d.ts +26 -0
- package/dist/components/SettingsShell/SettingsShell.d.ts +52 -0
- package/dist/components/SettingsShell/SettingsShell.stories.d.ts +9 -0
- package/dist/components/ShellTitle/ShellTitle.d.ts +25 -0
- package/dist/components/SiteShell/SiteShell.d.ts +24 -0
- package/dist/components/SiteShell/SiteShell.stories.d.ts +18 -0
- package/dist/components/Skeleton/Skeleton.d.ts +20 -0
- package/dist/components/Skeleton/Skeleton.stories.d.ts +15 -0
- package/dist/components/SortableList/SortableList.d.ts +30 -0
- package/dist/components/SortableList/SortableList.stories.d.ts +16 -0
- package/dist/components/Spinner/Spinner.d.ts +15 -0
- package/dist/components/Spinner/Spinner.stories.d.ts +14 -0
- package/dist/components/SplitHandle/SplitHandle.d.ts +25 -0
- package/dist/components/SplitHandle/SplitHandle.stories.d.ts +18 -0
- package/dist/components/Stack/Stack.d.ts +18 -0
- package/dist/components/Stack/Stack.stories.d.ts +12 -0
- package/dist/components/StatTile/StatTile.d.ts +30 -0
- package/dist/components/StatTile/StatTile.stories.d.ts +32 -0
- package/dist/components/StatusBar/StatusBar.d.ts +8 -0
- package/dist/components/StatusBar/StatusBar.stories.d.ts +15 -0
- package/dist/components/StatusDot/StatusDot.d.ts +18 -0
- package/dist/components/StatusDot/StatusDot.stories.d.ts +24 -0
- package/dist/components/StepDots/StepDots.d.ts +15 -0
- package/dist/components/StepDots/StepDots.stories.d.ts +15 -0
- package/dist/components/SwatchGroup/SwatchGroup.d.ts +20 -0
- package/dist/components/SwatchGroup/SwatchGroup.stories.d.ts +33 -0
- package/dist/components/Switch/Switch.d.ts +10 -0
- package/dist/components/Switch/Switch.stories.d.ts +17 -0
- package/dist/components/TabStrip/TabStrip.d.ts +44 -0
- package/dist/components/TabStrip/TabStrip.stories.d.ts +66 -0
- package/dist/components/Tabs/Tabs.d.ts +28 -0
- package/dist/components/Tabs/Tabs.stories.d.ts +34 -0
- package/dist/components/Tag/Tag.d.ts +12 -0
- package/dist/components/Tag/Tag.stories.d.ts +21 -0
- package/dist/components/Textarea/Textarea.d.ts +15 -0
- package/dist/components/Textarea/Textarea.stories.d.ts +19 -0
- package/dist/components/ThemeEditor/ThemeEditor.d.ts +56 -0
- package/dist/components/ThemePreview/ThemePreview.d.ts +15 -0
- package/dist/components/ThemeSwitch/ThemeSwitch.d.ts +30 -0
- package/dist/components/ThemeSwitch/ThemeSwitch.stories.d.ts +15 -0
- package/dist/components/TimeField/TimeField.d.ts +32 -0
- package/dist/components/TimeField/TimeField.stories.d.ts +36 -0
- package/dist/components/TimeField/time-text.d.ts +26 -0
- package/dist/components/TimeSeriesChart/TimeSeriesChart.d.ts +30 -0
- package/dist/components/TimeSeriesChart/TimeSeriesChart.stories.d.ts +29 -0
- package/dist/components/Toast/Toast.d.ts +18 -0
- package/dist/components/Toast/Toast.stories.d.ts +15 -0
- package/dist/components/Toast/Toaster.d.ts +18 -0
- package/dist/components/Toast/Toaster.stories.d.ts +16 -0
- package/dist/components/Toast/toast-region.d.ts +17 -0
- package/dist/components/Toast/toast-store.d.ts +46 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +16 -0
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +20 -0
- package/dist/components/Toolbar/Toolbar.d.ts +21 -0
- package/dist/components/Toolbar/Toolbar.stories.d.ts +25 -0
- package/dist/components/Tooltip/Tooltip.d.ts +13 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +23 -0
- package/dist/components/TreeView/TreeView.d.ts +42 -0
- package/dist/components/TreeView/TreeView.stories.d.ts +26 -0
- package/dist/components/TreeView/pathRows.d.ts +16 -0
- package/dist/components/TreeView/treeKeys.d.ts +16 -0
- package/dist/components/UsageMeterRow/UsageMeterRow.d.ts +28 -0
- package/dist/components/UsageMeterRow/UsageMeterRow.stories.d.ts +26 -0
- package/dist/components/WorktreeRow/WorktreeRow.d.ts +32 -0
- package/dist/components/WorktreeRow/WorktreeRow.stories.d.ts +32 -0
- package/dist/components/ZoomBar/ZoomBar.d.ts +22 -0
- package/dist/components/ZoomBar/ZoomBar.stories.d.ts +17 -0
- package/dist/editor/RichTextEditor/EditorToolbar.d.ts +35 -0
- package/dist/editor/RichTextEditor/ImageBar.d.ts +17 -0
- package/dist/editor/RichTextEditor/LinkForm.d.ts +16 -0
- package/dist/editor/RichTextEditor/RichTextEditor.d.ts +45 -0
- package/dist/editor/RichTextEditor/RichTextEditor.stories.d.ts +43 -0
- package/dist/editor/RichTextEditor/extensions.d.ts +23 -0
- package/dist/editor/RichTextEditor/icons.d.ts +23 -0
- package/dist/editor/RichTextEditor/insertImage.d.ts +28 -0
- package/dist/editor/RichTextEditor/labels.d.ts +32 -0
- package/dist/editor/index.d.ts +4 -0
- package/dist/editor.js +629 -0
- package/dist/editor.js.map +1 -0
- package/dist/fonts.css +2 -0
- package/dist/icons.d.ts +891 -0
- package/dist/image/ImageCropper/ImageCropper.d.ts +39 -0
- package/dist/image/ImageCropper/ImageCropper.stories.d.ts +18 -0
- package/dist/image/ImageField/ImageField.d.ts +86 -0
- package/dist/image/ImageField/ImageField.stories.d.ts +29 -0
- package/dist/image/crop.d.ts +39 -0
- package/dist/image/index.d.ts +3 -0
- package/dist/image.js +377 -0
- package/dist/image.js.map +1 -0
- package/dist/index.d.ts +138 -0
- package/dist/index.js +8253 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/cx.d.ts +2 -0
- package/dist/internal/date.d.ts +96 -0
- package/dist/internal/duration.d.ts +4 -0
- package/dist/internal/focus.d.ts +34 -0
- package/dist/internal/keys.d.ts +21 -0
- package/dist/internal/modal.d.ts +8 -0
- package/dist/internal/portal.d.ts +9 -0
- package/dist/internal/position.d.ts +37 -0
- package/dist/internal/reveal.d.ts +6 -0
- package/dist/internal/roving.d.ts +25 -0
- package/dist/internal/scroll-fade.d.ts +16 -0
- package/dist/internal/session-labels.d.ts +3 -0
- package/dist/internal/text.d.ts +2 -0
- package/dist/llms-full.txt +9786 -0
- package/dist/llms.txt +162 -0
- package/dist/mcp.js +24706 -0
- package/dist/panZoom.d.ts +40 -0
- package/dist/styles.css +2 -0
- package/dist/styles.layered.css +4 -0
- package/dist/tailwind.css +38 -0
- package/dist/test-utils.d.ts +5 -0
- package/dist/theme/font.d.ts +20 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/theme.d.ts +62 -0
- package/dist/tokens.css +304 -0
- package/dist/tokens.json +267 -0
- package/dist/types.d.ts +6 -0
- package/package.json +177 -4
- package/skills/xdev-ui-admin/SKILL.md +106 -0
- package/skills/xdev-ui-admin/references/audit-log.md +18 -0
- package/skills/xdev-ui-admin/references/console-chrome.md +119 -0
- package/skills/xdev-ui-admin/references/dashboard.md +24 -0
- package/skills/xdev-ui-admin/references/detail-and-forms.md +22 -0
- package/skills/xdev-ui-admin/references/dialogs.md +33 -0
- package/skills/xdev-ui-admin/references/forms.md +60 -0
- package/skills/xdev-ui-admin/references/from-other-kits.md +75 -0
- package/skills/xdev-ui-admin/references/layout.md +58 -0
- package/skills/xdev-ui-admin/references/navigation.md +10 -0
- package/skills/xdev-ui-admin/references/permissions.md +26 -0
- package/skills/xdev-ui-admin/references/resource-list.md +64 -0
- package/skills/xdev-ui-admin/references/responsive.md +68 -0
- package/skills/xdev-ui-admin/references/rich-content.md +37 -0
- package/skills/xdev-ui-admin/references/settings.md +20 -0
- package/skills/xdev-ui-admin/references/sign-in.md +47 -0
- package/skills/xdev-ui-admin/references/states-feedback.md +26 -0
- package/skills/xdev-ui-admin/references/tree-list.md +50 -0
- package/skills/xdev-ui-admin/references/users-roles.md +32 -0
- package/skills/xdev-ui-admin/references/ux-principles.md +43 -0
- package/skills/xdev-ui-admin/references/visual-identity.md +62 -0
- package/skills/xdev-ui-admin/templates/admin/_gitignore +3 -0
- package/skills/xdev-ui-admin/templates/admin/_mcp.json +5 -0
- package/skills/xdev-ui-admin/templates/admin/_npmrc +2 -0
- package/skills/xdev-ui-admin/templates/admin/index.html +14 -0
- package/skills/xdev-ui-admin/templates/admin/package.json +24 -0
- package/skills/xdev-ui-admin/templates/admin/src/App.tsx +66 -0
- package/skills/xdev-ui-admin/templates/admin/src/app.css +26 -0
- package/skills/xdev-ui-admin/templates/admin/src/auth/permissions.ts +7 -0
- package/skills/xdev-ui-admin/templates/admin/src/auth/session.ts +42 -0
- package/skills/xdev-ui-admin/templates/admin/src/data/context.ts +11 -0
- package/skills/xdev-ui-admin/templates/admin/src/data/store.ts +84 -0
- package/skills/xdev-ui-admin/templates/admin/src/data/useLoad.ts +25 -0
- package/skills/xdev-ui-admin/templates/admin/src/i18n/en.ts +98 -0
- package/skills/xdev-ui-admin/templates/admin/src/i18n/index.tsx +63 -0
- package/skills/xdev-ui-admin/templates/admin/src/i18n/vi.ts +98 -0
- package/skills/xdev-ui-admin/templates/admin/src/i18n/xdev-ui-labels.ts +47 -0
- package/skills/xdev-ui-admin/templates/admin/src/main.tsx +12 -0
- package/skills/xdev-ui-admin/templates/admin/src/notify.tsx +36 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/Dashboard.tsx +55 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/ItemDetail.tsx +83 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/ItemsList.tsx +140 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/NotFound.tsx +17 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/Settings.tsx +37 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/SignIn.tsx +105 -0
- package/skills/xdev-ui-admin/templates/admin/src/router.ts +49 -0
- package/skills/xdev-ui-admin/templates/admin/src/shell/AccountMenu.tsx +36 -0
- package/skills/xdev-ui-admin/templates/admin/src/shell/Shell.tsx +53 -0
- package/skills/xdev-ui-admin/templates/admin/src/theme.ts +34 -0
- package/skills/xdev-ui-admin/templates/admin/tsconfig.json +16 -0
- package/skills/xdev-ui-admin/templates/admin/vite.config.ts +4 -0
- package/skills/xdev-ui-build-app/SKILL.md +85 -0
- package/skills/xdev-ui-build-app/references/app-shell.md +20 -0
- package/skills/xdev-ui-build-app/references/i18n.md +9 -0
- package/skills/xdev-ui-build-app/references/responsive-a11y.md +10 -0
- package/skills/xdev-ui-build-app/references/routing.md +14 -0
- package/skills/xdev-ui-build-app/references/setup.md +25 -0
- package/skills/xdev-ui-build-app/references/states.md +25 -0
- package/skills/xdev-ui-build-app/references/theme.md +11 -0
- package/skills/xdev-ui-build-app/templates/app/_gitignore +3 -0
- package/skills/xdev-ui-build-app/templates/app/_mcp.json +5 -0
- package/skills/xdev-ui-build-app/templates/app/_npmrc +2 -0
- package/skills/xdev-ui-build-app/templates/app/index.html +14 -0
- package/skills/xdev-ui-build-app/templates/app/package.json +24 -0
- package/skills/xdev-ui-build-app/templates/app/src/App.tsx +77 -0
- package/skills/xdev-ui-build-app/templates/app/src/app.css +3 -0
- package/skills/xdev-ui-build-app/templates/app/src/i18n/en.ts +35 -0
- package/skills/xdev-ui-build-app/templates/app/src/i18n/index.tsx +63 -0
- package/skills/xdev-ui-build-app/templates/app/src/i18n/vi.ts +35 -0
- package/skills/xdev-ui-build-app/templates/app/src/i18n/xdev-ui-labels.ts +19 -0
- package/skills/xdev-ui-build-app/templates/app/src/main.tsx +12 -0
- package/skills/xdev-ui-build-app/templates/app/src/notify.tsx +36 -0
- package/skills/xdev-ui-build-app/templates/app/src/pages/Home.tsx +22 -0
- package/skills/xdev-ui-build-app/templates/app/src/pages/NotFound.tsx +17 -0
- package/skills/xdev-ui-build-app/templates/app/src/pages/Settings.tsx +35 -0
- package/skills/xdev-ui-build-app/templates/app/src/router.ts +26 -0
- package/skills/xdev-ui-build-app/templates/app/src/theme.ts +34 -0
- package/skills/xdev-ui-build-app/templates/app/tsconfig.json +16 -0
- package/skills/xdev-ui-build-app/templates/app/vite.config.ts +4 -0
- package/skills/xdev-ui-design/SKILL.md +111 -0
- package/skills/xdev-ui-design/references/brand.md +58 -0
- package/skills/xdev-ui-design/references/checklist.md +55 -0
- package/skills/xdev-ui-design/references/owner-notes.md +54 -0
- package/skills/xdev-ui-design/references/porting.md +56 -0
- package/skills/xdev-ui-design/references/rules.md +135 -0
- package/skills/xdev-ui-design/references/screens.md +61 -0
- package/skills/xdev-ui-design/references/tokens.md +97 -0
- package/skills/xdev-ui-improve/SKILL.md +96 -0
- package/skills/xdev-ui-improve/references/plan-template.md +59 -0
- package/skills/xdev-ui-motion/SKILL.md +87 -0
- package/skills/xdev-ui-motion/references/recipes.md +117 -0
- package/skills/xdev-ui-review/SKILL.md +141 -0
- package/skills/xdev-ui-review/references/checklist.md +92 -0
- package/skills/xdev-ui-review/references/grep-recipes.md +37 -0
- package/skills/xdev-ui-review/references/pages/dashboard.md +21 -0
- package/skills/xdev-ui-review/references/pages/dialogs-forms.md +23 -0
- package/skills/xdev-ui-review/references/pages/list.md +22 -0
- package/skills/xdev-ui-review/references/pages/provider-grid.md +19 -0
- package/skills/xdev-ui-review/references/pages/settings.md +18 -0
- package/skills/xdev-ui-review/references/pages/sign-in.md +21 -0
- package/skills/xdev-ui-review/references/web-interface.md +73 -0
- package/skills/xdev-ui-review/scripts/audit.mjs +775 -0
- package/skills/xdev-ui-ux-standards/SKILL.md +88 -0
- package/skills/xdev-ui-ux-standards/references/heuristics-checklist.md +129 -0
- package/skills/xdev-ui-ux-standards/references/patterns.md +120 -0
- package/skills/xdev-ui-ux-standards/references/platforms.md +104 -0
- package/skills/xdev-ui-ux-standards/references/standards-map.md +144 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/** Toast queue: a tiny module-level store read with useSyncExternalStore. The reducer and helpers are pure. */
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export type ToastTone = "ok" | "warn" | "danger" | "info";
|
|
4
|
+
export interface ToastOptions {
|
|
5
|
+
/** Default "info". "danger" is announced with role="alert". */
|
|
6
|
+
tone?: ToastTone;
|
|
7
|
+
/** A second, quieter line. */
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
/** At most one action, usually Undo. Clicking it also dismisses the toast. */
|
|
10
|
+
action?: {
|
|
11
|
+
label: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
};
|
|
14
|
+
/** Milliseconds on screen. Default 5000, 8000 for danger; Infinity or 0 keeps it until dismissed. */
|
|
15
|
+
duration?: number;
|
|
16
|
+
/** Reuse an id to update a toast in place ("Uploading..." then "Uploaded"). */
|
|
17
|
+
id?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ToastItem extends Omit<ToastOptions, "id" | "tone"> {
|
|
20
|
+
id: string;
|
|
21
|
+
message: ReactNode;
|
|
22
|
+
tone: ToastTone;
|
|
23
|
+
}
|
|
24
|
+
export type ToastAction = {
|
|
25
|
+
type: "add";
|
|
26
|
+
toast: ToastItem;
|
|
27
|
+
} | {
|
|
28
|
+
type: "dismiss";
|
|
29
|
+
id?: string;
|
|
30
|
+
};
|
|
31
|
+
export declare function toastReducer(state: readonly ToastItem[], action: ToastAction): ToastItem[];
|
|
32
|
+
/** The toasts on screen: the oldest `max`. The rest wait until one is dismissed. */
|
|
33
|
+
export declare function visibleToasts(state: readonly ToastItem[], max: number): ToastItem[];
|
|
34
|
+
/** How long a toast stays, in ms, or null when it stays until dismissed. */
|
|
35
|
+
export declare function toastDuration(t: Pick<ToastItem, "tone" | "duration">): number | null;
|
|
36
|
+
/** The store behind `toast()`, for `useSyncExternalStore`. */
|
|
37
|
+
export declare const toastStore: {
|
|
38
|
+
subscribe(listener: () => void): () => void;
|
|
39
|
+
getSnapshot: () => ToastItem[];
|
|
40
|
+
getServerSnapshot: () => ToastItem[];
|
|
41
|
+
};
|
|
42
|
+
/** Queues a toast and returns its id. Render the queue once with `<Toaster />`. */
|
|
43
|
+
export declare const toast: ((message: ReactNode, { id, tone, ...rest }?: ToastOptions) => string) & {
|
|
44
|
+
/** Removes one toast, or every toast without an id. */
|
|
45
|
+
dismiss(id?: string): void;
|
|
46
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, JSX, ReactNode } from "react";
|
|
2
|
+
export type ToggleButtonTone = "default" | "warning";
|
|
3
|
+
export interface ToggleButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "aria-pressed" | "onChange"> {
|
|
4
|
+
/** On or off; rendered as aria-pressed. */
|
|
5
|
+
pressed: boolean;
|
|
6
|
+
/** Called with the next value on click, Space or Enter (native button). Not called when `onClick` calls `preventDefault()`. */
|
|
7
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
8
|
+
/** "warning" marks an option that needs care (it grants more than it looks like): warn-coloured border, on and off. Pair it with text that says why. Default "default". */
|
|
9
|
+
tone?: ToggleButtonTone;
|
|
10
|
+
/** "sm" (24px, default) or "md" (32px). */
|
|
11
|
+
size?: "sm" | "md";
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/** Pure: the value `onPressedChange` receives for a click on a toggle that is `pressed`. */
|
|
15
|
+
export declare function nextPressed(pressed: boolean): boolean;
|
|
16
|
+
export declare function ToggleButton({ pressed, onPressedChange, tone, size, children, className, onClick, ...rest }: ToggleButtonProps): JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { ToggleButton } from "./ToggleButton";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ToggleButton;
|
|
6
|
+
args: {
|
|
7
|
+
pressed: false;
|
|
8
|
+
children: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const Pressed: Story;
|
|
15
|
+
export declare const Warning: Story;
|
|
16
|
+
export declare const WarningPressed: Story;
|
|
17
|
+
export declare const Disabled: Story;
|
|
18
|
+
export declare const Medium: Story;
|
|
19
|
+
/** A row of permission toggles; one needs care. */
|
|
20
|
+
export declare const Row: Story;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
export interface ToolbarLabels {
|
|
3
|
+
/** aria-label of the actions group when there is no string title or `label`. */
|
|
4
|
+
actions: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ToolbarProps {
|
|
7
|
+
/** Pane name ("Changes") or, for "bulk", the selection summary ("3 selected"). */
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
/** Number shown after the title. */
|
|
10
|
+
count?: number;
|
|
11
|
+
/** IconButtons or Buttons, grouped as role=toolbar. One Tab stop: arrow keys, Home and End move focus between them. */
|
|
12
|
+
actions?: ReactNode;
|
|
13
|
+
/** "head" is the small uppercase pane head; "bulk" is the tinted bar shown while rows are selected. Default "head". */
|
|
14
|
+
variant?: "head" | "bulk";
|
|
15
|
+
/** aria-label of the actions group. Defaults to a string `title`, then `labels.actions`. */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** Override the English defaults (e.g. for vi). */
|
|
18
|
+
labels?: Partial<ToolbarLabels>;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function Toolbar({ title, count, actions, variant, label, labels, className }: ToolbarProps): JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Toolbar } from "./Toolbar";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Toolbar;
|
|
6
|
+
args: {
|
|
7
|
+
title: string;
|
|
8
|
+
count: number;
|
|
9
|
+
actions: import("react").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-vite").ReactRenderer, {
|
|
12
|
+
title?: import("react").ReactNode;
|
|
13
|
+
count?: number;
|
|
14
|
+
actions?: import("react").ReactNode;
|
|
15
|
+
variant?: "head" | "bulk";
|
|
16
|
+
label?: string;
|
|
17
|
+
labels?: Partial<import("./Toolbar").ToolbarLabels>;
|
|
18
|
+
className?: string;
|
|
19
|
+
}>) => import("react").JSX.Element)[];
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export declare const PaneHead: Story;
|
|
24
|
+
export declare const Bulk: Story;
|
|
25
|
+
export declare const TitleOnly: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type JSX, type ReactElement, type ReactNode } from "react";
|
|
2
|
+
export interface TooltipProps {
|
|
3
|
+
/** Short text that describes the child. Plain text only; no links or buttons. */
|
|
4
|
+
content: ReactNode;
|
|
5
|
+
/** One focusable element (a button or link). It gets aria-describedby pointing at the tip. */
|
|
6
|
+
children: ReactElement<{
|
|
7
|
+
"aria-describedby"?: string;
|
|
8
|
+
}>;
|
|
9
|
+
/** Side of the child the tip appears on. Default "top". */
|
|
10
|
+
placement?: "top" | "bottom";
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function Tooltip({ content, children, placement, className }: TooltipProps): JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Tooltip } from "./Tooltip";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Tooltip;
|
|
6
|
+
args: {
|
|
7
|
+
content: string;
|
|
8
|
+
children: import("react").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-vite").ReactRenderer, {
|
|
11
|
+
content: import("react").ReactNode;
|
|
12
|
+
children: import("react").ReactElement<{
|
|
13
|
+
"aria-describedby"?: string;
|
|
14
|
+
}>;
|
|
15
|
+
placement?: "top" | "bottom";
|
|
16
|
+
className?: string;
|
|
17
|
+
}>) => import("react").JSX.Element)[];
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
export declare const OnIconButton: Story;
|
|
22
|
+
export declare const Bottom: Story;
|
|
23
|
+
export declare const WithShortcut: Story;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
export type TreeMark = "added" | "modified" | "deleted" | "renamed";
|
|
3
|
+
export interface TreeRow {
|
|
4
|
+
/** Stable id, usually the path. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** 0 for top-level entries. */
|
|
7
|
+
depth: number;
|
|
8
|
+
name: string;
|
|
9
|
+
kind: "file" | "dir";
|
|
10
|
+
/** Dirs only: whether the children are shown. Pass only visible rows. */
|
|
11
|
+
open?: boolean;
|
|
12
|
+
/** Shows a dot for a dir that holds changed files. */
|
|
13
|
+
changed?: boolean;
|
|
14
|
+
/** Dirs only: how many files are under it. Shown after the name. */
|
|
15
|
+
count?: number;
|
|
16
|
+
/** Git status letter at the end of the row. */
|
|
17
|
+
mark?: TreeMark;
|
|
18
|
+
}
|
|
19
|
+
export interface TreeViewLabels {
|
|
20
|
+
/** aria-label of the tree. */
|
|
21
|
+
tree: string;
|
|
22
|
+
/** Read out for the changed dot. */
|
|
23
|
+
changed: string;
|
|
24
|
+
/** Titles of the status letters. */
|
|
25
|
+
marks: Record<TreeMark, string>;
|
|
26
|
+
}
|
|
27
|
+
export interface TreeViewProps {
|
|
28
|
+
/** Visible rows in display order; children follow their dir. */
|
|
29
|
+
rows: TreeRow[];
|
|
30
|
+
/** Id of the selected row (e.g. the file open in the editor). */
|
|
31
|
+
selected?: string;
|
|
32
|
+
/** A dir was clicked or toggled with the keyboard. */
|
|
33
|
+
onToggle?: (id: string) => void;
|
|
34
|
+
/** A file was clicked or opened with Enter. */
|
|
35
|
+
onOpen?: (id: string) => void;
|
|
36
|
+
/** Override the English defaults (e.g. for vi). Partial `marks` merge too. */
|
|
37
|
+
labels?: Partial<Omit<TreeViewLabels, "marks">> & {
|
|
38
|
+
marks?: Partial<Record<TreeMark, string>>;
|
|
39
|
+
};
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function TreeView({ rows, selected, onToggle, onOpen, labels, className }: TreeViewProps): JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { TreeView, type TreeRow } from "./TreeView";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof TreeView;
|
|
6
|
+
args: {
|
|
7
|
+
rows: TreeRow[];
|
|
8
|
+
selected: string;
|
|
9
|
+
};
|
|
10
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-vite").ReactRenderer, {
|
|
11
|
+
rows: TreeRow[];
|
|
12
|
+
selected?: string;
|
|
13
|
+
onToggle?: (id: string) => void;
|
|
14
|
+
onOpen?: (id: string) => void;
|
|
15
|
+
labels?: Partial<Omit<import("./TreeView").TreeViewLabels, "marks">> & {
|
|
16
|
+
marks?: Partial<Record<import("./TreeView").TreeMark, string>>;
|
|
17
|
+
};
|
|
18
|
+
className?: string;
|
|
19
|
+
}>) => import("react").JSX.Element)[];
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export declare const Static: Story;
|
|
24
|
+
export declare const Interactive: Story;
|
|
25
|
+
/** Folder chains merged into one row, with the file count of each folder. */
|
|
26
|
+
export declare const Compact: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TreeMark, TreeRow } from "./TreeView";
|
|
2
|
+
export interface PathRowsOptions {
|
|
3
|
+
/** Merge a folder that holds only one folder into it (`a/b/c`), and give each folder a file `count`. */
|
|
4
|
+
compact?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Visible `TreeView` rows for a flat list of file paths. Folders come first, each level sorted by name.
|
|
8
|
+
* A folder id is its path with a trailing `/`; a file id is its path. `closed` holds the folder ids
|
|
9
|
+
* whose children are hidden. A folder that holds a marked file gets `changed`. With `compact`, a chain of
|
|
10
|
+
* folders that each hold only the next one is one row named `a/b/c` whose id is the deepest folder, and
|
|
11
|
+
* every folder row has `count`, the files below it.
|
|
12
|
+
*/
|
|
13
|
+
export declare function pathRows(files: {
|
|
14
|
+
path: string;
|
|
15
|
+
mark?: TreeMark;
|
|
16
|
+
}[], closed: ReadonlySet<string>, options?: PathRowsOptions): TreeRow[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Pure keyboard logic for TreeView over a flat list of visible rows. Not exported from the package. */
|
|
2
|
+
export interface TreeKeyRow {
|
|
3
|
+
id: string;
|
|
4
|
+
depth: number;
|
|
5
|
+
kind: "file" | "dir";
|
|
6
|
+
open?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** What a key press asks for: move focus to a row index, toggle a dir, or open a file. */
|
|
9
|
+
export type TreeKeyResult = {
|
|
10
|
+
focus: number;
|
|
11
|
+
} | {
|
|
12
|
+
toggle: string;
|
|
13
|
+
} | {
|
|
14
|
+
open: string;
|
|
15
|
+
} | null;
|
|
16
|
+
export declare function treeKey(key: string, index: number, rows: readonly TreeKeyRow[]): TreeKeyResult;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
/** State of the account: usable, out of quota, failing, or not signed in. */
|
|
3
|
+
export type UsageState = "ok" | "limited" | "error" | "signedOut";
|
|
4
|
+
export interface UsageWindow {
|
|
5
|
+
/** Name of the window, e.g. "5 h" or "Week". */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Percent of the quota used, 0 to 100. */
|
|
8
|
+
used: number;
|
|
9
|
+
/** When the window resets, already formatted, e.g. "Resets in 2 h". */
|
|
10
|
+
resetText: string;
|
|
11
|
+
}
|
|
12
|
+
export interface UsageMeterRowLabels {
|
|
13
|
+
/** Visible words of the account state. */
|
|
14
|
+
state: Record<UsageState, string>;
|
|
15
|
+
}
|
|
16
|
+
export interface UsageMeterRowProps {
|
|
17
|
+
/** Account name, e.g. an email or "claude-3". */
|
|
18
|
+
account: string;
|
|
19
|
+
windows: UsageWindow[];
|
|
20
|
+
state: UsageState;
|
|
21
|
+
/** Meters turn to the warn tone at or above this percent. Default 80. */
|
|
22
|
+
warnAt?: number;
|
|
23
|
+
/** Buttons at the end of the row (Sign in, Switch). No primary here. */
|
|
24
|
+
actions?: ReactNode;
|
|
25
|
+
labels?: Partial<UsageMeterRowLabels>;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function UsageMeterRow({ account, windows, state, warnAt, actions, labels, className }: UsageMeterRowProps): JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { UsageMeterRow } from "./UsageMeterRow";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof UsageMeterRow;
|
|
6
|
+
args: {
|
|
7
|
+
account: string;
|
|
8
|
+
state: "ok";
|
|
9
|
+
windows: {
|
|
10
|
+
label: string;
|
|
11
|
+
used: number;
|
|
12
|
+
resetText: string;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
argTypes: {
|
|
16
|
+
state: {
|
|
17
|
+
control: "select";
|
|
18
|
+
options: string[];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
24
|
+
export declare const Default: Story;
|
|
25
|
+
export declare const LimitReached: Story;
|
|
26
|
+
export declare const SignedOut: Story;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { SessionState } from "../../types";
|
|
3
|
+
import { type AgentChipProps } from "../AgentChip/AgentChip";
|
|
4
|
+
import { type DiffStatLabels } from "../DiffStat/DiffStat";
|
|
5
|
+
export interface WorktreeRowLabels {
|
|
6
|
+
/** Screen reader text of the status dot, per state. */
|
|
7
|
+
status: Record<SessionState, string>;
|
|
8
|
+
/** Accessible summary of the diff stat. */
|
|
9
|
+
diffStat: DiffStatLabels["diffStat"];
|
|
10
|
+
}
|
|
11
|
+
export interface WorktreeRowProps {
|
|
12
|
+
/** Main line: the branch of the worktree. */
|
|
13
|
+
branch: string;
|
|
14
|
+
/** Second line: the repository or folder name. */
|
|
15
|
+
repo?: string;
|
|
16
|
+
/** Agents running in this worktree, one chip each. */
|
|
17
|
+
agents: AgentChipProps[];
|
|
18
|
+
/** The one status of the worktree: a dot plus screen reader text. */
|
|
19
|
+
status: SessionState;
|
|
20
|
+
/** Lines added and removed in the worktree. Hidden when omitted. */
|
|
21
|
+
diff?: {
|
|
22
|
+
add: number;
|
|
23
|
+
del: number;
|
|
24
|
+
};
|
|
25
|
+
selected?: boolean;
|
|
26
|
+
onSelect: () => void;
|
|
27
|
+
/** Root element. Use "li" inside a ul. Default "div". */
|
|
28
|
+
as?: "div" | "li";
|
|
29
|
+
labels?: Partial<WorktreeRowLabels>;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function WorktreeRow({ branch, repo, agents, status, diff, selected, onSelect, as, labels, className }: WorktreeRowProps): JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { WorktreeRow } from "./WorktreeRow";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof WorktreeRow;
|
|
6
|
+
args: {
|
|
7
|
+
branch: string;
|
|
8
|
+
repo: string;
|
|
9
|
+
status: "working";
|
|
10
|
+
agents: {
|
|
11
|
+
profile: "claude";
|
|
12
|
+
title: string;
|
|
13
|
+
}[];
|
|
14
|
+
diff: {
|
|
15
|
+
add: number;
|
|
16
|
+
del: number;
|
|
17
|
+
};
|
|
18
|
+
onSelect: () => void;
|
|
19
|
+
};
|
|
20
|
+
argTypes: {
|
|
21
|
+
status: {
|
|
22
|
+
control: "select";
|
|
23
|
+
options: string[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default meta;
|
|
28
|
+
type Story = StoryObj<typeof meta>;
|
|
29
|
+
export declare const Default: Story;
|
|
30
|
+
export declare const Selected: Story;
|
|
31
|
+
export declare const NeedsYou: Story;
|
|
32
|
+
export declare const NoDiff: Story;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
export interface ZoomBarLabels {
|
|
3
|
+
zoomOut: string;
|
|
4
|
+
zoomIn: string;
|
|
5
|
+
fit: string;
|
|
6
|
+
actual: string;
|
|
7
|
+
/** aria-label of the group. */
|
|
8
|
+
group: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ZoomBarProps {
|
|
11
|
+
/** The shown percentage, or null before the content has a size. */
|
|
12
|
+
zoom: number | null;
|
|
13
|
+
onZoomOut: () => void;
|
|
14
|
+
onFit: () => void;
|
|
15
|
+
onZoomIn: () => void;
|
|
16
|
+
/** The percentage button: back to 100%. */
|
|
17
|
+
onActual: () => void;
|
|
18
|
+
/** Override the English defaults (e.g. for vi). */
|
|
19
|
+
labels?: Partial<ZoomBarLabels>;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function ZoomBar({ zoom, onZoomOut, onFit, onZoomIn, onActual, labels, className }: ZoomBarProps): JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { ZoomBar } from "./ZoomBar";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ZoomBar;
|
|
6
|
+
args: {
|
|
7
|
+
zoom: number;
|
|
8
|
+
onZoomOut(): void;
|
|
9
|
+
onFit(): void;
|
|
10
|
+
onZoomIn(): void;
|
|
11
|
+
onActual(): void;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
export declare const Default: Story;
|
|
17
|
+
export declare const BeforeLoad: Story;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/core";
|
|
2
|
+
import { type JSX, type KeyboardEvent } from "react";
|
|
3
|
+
import type { RichTextEditorLabels } from "./labels";
|
|
4
|
+
export type ToolKey = "heading2" | "heading3" | "bold" | "italic" | "bulletList" | "orderedList" | "quote" | "link" | "image" | "undo" | "redo";
|
|
5
|
+
export type ToolbarState = Record<"heading2" | "heading3" | "bold" | "italic" | "bulletList" | "orderedList" | "quote" | "link", boolean> & {
|
|
6
|
+
canUndo: boolean;
|
|
7
|
+
canRedo: boolean;
|
|
8
|
+
};
|
|
9
|
+
/** Reads the toggle and history state the toolbar shows. Pure over the two editor methods it calls. */
|
|
10
|
+
export declare function toolbarState(e: Pick<Editor, "isActive" | "can">): ToolbarState;
|
|
11
|
+
export interface ToolItem {
|
|
12
|
+
key: ToolKey;
|
|
13
|
+
/** Toggles carry aria-pressed; actions (image, undo, redo) do not. */
|
|
14
|
+
pressed?: boolean;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
/** A divider goes before this item. */
|
|
17
|
+
group: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** The buttons, in order. The image button exists only when uploads are possible. */
|
|
20
|
+
export declare function toolItems(s: ToolbarState, opts: {
|
|
21
|
+
image: boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}): ToolItem[];
|
|
24
|
+
/** Moves focus between tool buttons. Keys from anything else inside the toolbar (the link form) pass through. */
|
|
25
|
+
export declare function onToolbarKeyDown(e: KeyboardEvent<HTMLElement>, setActive: (i: number) => void): void;
|
|
26
|
+
export interface EditorToolbarProps {
|
|
27
|
+
editor: Editor;
|
|
28
|
+
labels: RichTextEditorLabels;
|
|
29
|
+
linkOpen: boolean;
|
|
30
|
+
onLinkOpenChange: (open: boolean) => void;
|
|
31
|
+
/** Absent: no image button. */
|
|
32
|
+
onPickImages?: (files: File[]) => void;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare function EditorToolbar({ editor, labels, linkOpen, onLinkOpenChange, onPickImages, disabled }: EditorToolbarProps): JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/core";
|
|
2
|
+
import { type Selection } from "@tiptap/pm/state";
|
|
3
|
+
import { type JSX } from "react";
|
|
4
|
+
import type { RichTextEditorLabels } from "./labels";
|
|
5
|
+
export interface SelectedImage {
|
|
6
|
+
pos: number;
|
|
7
|
+
alt: string;
|
|
8
|
+
busy: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** The image a node selection holds, or null. */
|
|
11
|
+
export declare function selectedImage(selection: Selection): SelectedImage | null;
|
|
12
|
+
/** Bar shown while an image is selected: alt text and remove. */
|
|
13
|
+
export declare function ImageBar({ editor, labels, disabled }: {
|
|
14
|
+
editor: Editor;
|
|
15
|
+
labels: RichTextEditorLabels;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}): JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/core";
|
|
2
|
+
import { type JSX } from "react";
|
|
3
|
+
import type { RichTextEditorLabels } from "./labels";
|
|
4
|
+
/** What applying `url` does: refuse it, insert it as linked text (empty selection, no link), or link the selection. */
|
|
5
|
+
export declare function linkAction(url: string, ctx: {
|
|
6
|
+
empty: boolean;
|
|
7
|
+
inLink: boolean;
|
|
8
|
+
}): "invalid" | "insert" | "set";
|
|
9
|
+
export interface LinkFormProps {
|
|
10
|
+
editor: Editor;
|
|
11
|
+
labels: RichTextEditorLabels;
|
|
12
|
+
/** Called after apply or remove; the editor takes focus back. */
|
|
13
|
+
onDone: () => void;
|
|
14
|
+
}
|
|
15
|
+
/** Link address form for the toolbar popover. Mounted only while the popover is open. */
|
|
16
|
+
export declare function LinkForm({ editor, labels, onDone }: LinkFormProps): JSX.Element;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
import { type RichTextEditorLabels } from "./labels";
|
|
3
|
+
export type RichTextFormat = "markdown" | "html";
|
|
4
|
+
export interface RichTextEditorProps {
|
|
5
|
+
/** Visible label above the editor. Without it, pass `aria-label`. */
|
|
6
|
+
label?: string;
|
|
7
|
+
"aria-label"?: string;
|
|
8
|
+
/** Keep `label` for screen readers only (e.g. a tab above already names the editor). */
|
|
9
|
+
hideLabel?: boolean;
|
|
10
|
+
/** Controlled content in `format`. */
|
|
11
|
+
value: string;
|
|
12
|
+
/** Gets the content in `format`. Held back while an image uploads, then sent once. */
|
|
13
|
+
onChange: (value: string) => void;
|
|
14
|
+
/** Default "markdown". */
|
|
15
|
+
format?: RichTextFormat;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
invalid?: boolean;
|
|
19
|
+
"aria-describedby"?: string;
|
|
20
|
+
/** Minimum height of the writing area: a number is px, a string any CSS length. Default 240px. */
|
|
21
|
+
minHeight?: number | string;
|
|
22
|
+
/** Uploads one image and resolves to the URL to store. Absent: no image button, pasted and dropped files are ignored. */
|
|
23
|
+
onUploadImage?: (file: File) => Promise<string>;
|
|
24
|
+
/** True while at least one image uploads; lock the form's save button with it. */
|
|
25
|
+
onUploadingChange?: (busy: boolean) => void;
|
|
26
|
+
/** Upload or validation failures. Absent: the editor shows `labels.uploadFailed` / `labels.imageInvalid` itself. */
|
|
27
|
+
onUploadError?: (error: unknown, file: File) => void;
|
|
28
|
+
/** Images wider than this are re-encoded to WebP at this width before upload; 0 uploads the original. Default 1600. */
|
|
29
|
+
imageMaxWidth?: number;
|
|
30
|
+
/** Largest accepted image file. Default 10 MB. */
|
|
31
|
+
imageMaxBytes?: number;
|
|
32
|
+
/** Maps a stored image `src` to the URL the browser loads (e.g. a proxy path). Display only. */
|
|
33
|
+
resolveImageSrc?: (src: string) => string;
|
|
34
|
+
/** Override the English defaults (e.g. for vi). */
|
|
35
|
+
labels?: Partial<RichTextEditorLabels>;
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
/** CSS length of `minHeight`. */
|
|
39
|
+
export declare function minHeightValue(minHeight: number | string | undefined): string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Article editor on Tiptap 3: headings 2-3, bold, italic, links, lists, quotes and images.
|
|
42
|
+
* Controlled; reads and writes Markdown (default) or HTML. SSR-safe: renders an empty frame on the
|
|
43
|
+
* server and creates the editor after hydration.
|
|
44
|
+
*/
|
|
45
|
+
export declare function RichTextEditor({ label, "aria-label": ariaLabel, hideLabel, value, onChange, format, placeholder, disabled, invalid, "aria-describedby": describedBy, minHeight, onUploadImage, onUploadingChange, onUploadError, imageMaxWidth, imageMaxBytes, resolveImageSrc, labels, className, }: RichTextEditorProps): JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { type JSX } from "react";
|
|
3
|
+
import { type RichTextEditorProps } from "./RichTextEditor";
|
|
4
|
+
declare function Controlled(props: Omit<RichTextEditorProps, "value" | "onChange"> & {
|
|
5
|
+
initial?: string;
|
|
6
|
+
}): JSX.Element;
|
|
7
|
+
declare const meta: {
|
|
8
|
+
title: string;
|
|
9
|
+
component: typeof Controlled;
|
|
10
|
+
args: {
|
|
11
|
+
label: string;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
};
|
|
14
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-vite").ReactRenderer, {
|
|
15
|
+
label?: string;
|
|
16
|
+
"aria-label"?: string;
|
|
17
|
+
hideLabel?: boolean;
|
|
18
|
+
format?: import("./RichTextEditor").RichTextFormat;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
invalid?: boolean;
|
|
22
|
+
"aria-describedby"?: string;
|
|
23
|
+
minHeight?: number | string;
|
|
24
|
+
onUploadImage?: (file: File) => Promise<string>;
|
|
25
|
+
onUploadingChange?: (busy: boolean) => void;
|
|
26
|
+
onUploadError?: (error: unknown, file: File) => void;
|
|
27
|
+
imageMaxWidth?: number;
|
|
28
|
+
imageMaxBytes?: number;
|
|
29
|
+
resolveImageSrc?: (src: string) => string;
|
|
30
|
+
labels?: Partial<import("./labels").RichTextEditorLabels>;
|
|
31
|
+
className?: string;
|
|
32
|
+
initial?: string;
|
|
33
|
+
}>) => JSX.Element)[];
|
|
34
|
+
};
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
export declare const Markdown: Story;
|
|
38
|
+
export declare const Empty: Story;
|
|
39
|
+
export declare const WithImages: Story;
|
|
40
|
+
export declare const Html: Story;
|
|
41
|
+
export declare const Invalid: Story;
|
|
42
|
+
export declare const Disabled: Story;
|
|
43
|
+
export declare const Vietnamese: Story;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type AnyExtension } from "@tiptap/core";
|
|
2
|
+
/** True for an absolute http(s) URL without spaces. Anything else (javascript:, data:, relative) is refused. */
|
|
3
|
+
export declare const isSafeUrl: (url: string) => boolean;
|
|
4
|
+
/** Heading levels 1 and 4-6 become 2 and 3: the page title is not part of the body. */
|
|
5
|
+
export declare const clampHeadingLevel: (depth: number | undefined) => 2 | 3;
|
|
6
|
+
export interface EditorImageOptions {
|
|
7
|
+
/** Maps a stored `src` to the URL the browser loads (e.g. through a proxy). Never written back. */
|
|
8
|
+
resolveSrc: (src: string) => string;
|
|
9
|
+
/** Screen reader text of the spinner shown while an image uploads. */
|
|
10
|
+
uploadingLabel: () => string;
|
|
11
|
+
}
|
|
12
|
+
export interface EditorExtensionOptions {
|
|
13
|
+
/** Placeholder text, read each time the editor is empty. */
|
|
14
|
+
placeholder?: () => string;
|
|
15
|
+
resolveSrc?: (src: string) => string;
|
|
16
|
+
uploadingLabel?: () => string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The formats an article may use, and nothing more: headings 2-3, bold, italic, links, bullet and
|
|
20
|
+
* numbered lists, quotes and images. The same list backs the toolbar, so what cannot be made in the
|
|
21
|
+
* editor cannot arrive through pasted or stored content either.
|
|
22
|
+
*/
|
|
23
|
+
export declare function editorExtensions({ placeholder, resolveSrc, uploadingLabel }?: EditorExtensionOptions): AnyExtension[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Formatting glyphs drawn here, not added to the core icon set: only the editor needs them.
|
|
4
|
+
* Same grid and stroke as `Icon` (24 viewBox, stroke 1.75, round caps, no fills).
|
|
5
|
+
*/
|
|
6
|
+
declare const PATHS: {
|
|
7
|
+
readonly heading2: "M4 6v12M12 6v12M4 12h8M16 10.5a2.5 2.5 0 0 1 5 0c0 1.5-1.2 2.4-2.5 3.6L16 18h5";
|
|
8
|
+
readonly heading3: "M4 6v12M12 6v12M4 12h8M16 8h5l-3 4a3 3 0 1 1-2.6 4.5";
|
|
9
|
+
readonly bold: "M7 5h6a3.5 3.5 0 0 1 0 7H7zM7 12h7a3.5 3.5 0 0 1 0 7H7z";
|
|
10
|
+
readonly italic: "M10 5h8M6 19h8M14 5l-4 14";
|
|
11
|
+
readonly bulletList: "M9 6h11M9 12h11M9 18h11M4 6h.01M4 12h.01M4 18h.01";
|
|
12
|
+
readonly orderedList: "M10 6h10M10 12h10M10 18h10M4 4.5l1.5-.5V9M3.5 14.5a1.5 1.5 0 0 1 3 .3c0 .9-3 2.2-3 3.7h3";
|
|
13
|
+
readonly quote: "M5 17c2 0 3.5-1.5 3.5-3.5V8H4v5.5h4.5M15.5 17c2 0 3.5-1.5 3.5-3.5V8h-4.5v5.5H19";
|
|
14
|
+
readonly link: "M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1";
|
|
15
|
+
readonly image: "M5 4h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zM21 16l-5-5-9 9M9 8a2 2 0 1 0 0 4 2 2 0 0 0 0-4";
|
|
16
|
+
readonly undo: "M9 14 4 9l5-5M4 9h10.5a5.5 5.5 0 0 1 0 11H11";
|
|
17
|
+
readonly redo: "m15 14 5-5-5-5M20 9H9.5a5.5 5.5 0 0 0 0 11H13";
|
|
18
|
+
};
|
|
19
|
+
export type ToolIcon = keyof typeof PATHS;
|
|
20
|
+
export declare function ToolGlyph({ name }: {
|
|
21
|
+
name: ToolIcon;
|
|
22
|
+
}): JSX.Element;
|
|
23
|
+
export {};
|