@brett_lamy/ui 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/adaptive-pane.d.ts +2 -2
- package/dist/components/adaptive-pane.stories.d.ts +1 -1
- package/dist/components/animated-height.d.ts +2 -2
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/avatar.stories.d.ts +1 -1
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.stories.d.ts +1 -1
- package/dist/components/button.d.ts +3 -3
- package/dist/components/button.stories.d.ts +1 -1
- package/dist/components/card.d.ts +3 -3
- package/dist/components/card.stories.d.ts +1 -1
- package/dist/components/celebrate.d.ts +1 -1
- package/dist/components/chat/channel-list.d.ts +1 -1
- package/dist/components/chat/channel-list.stories.d.ts +1 -2
- package/dist/components/chat/chat-avatar.d.ts +2 -2
- package/dist/components/chat/chat-avatar.stories.d.ts +1 -2
- package/dist/components/chat/chat-column.d.ts +1 -1
- package/dist/components/chat/chat-column.stories.d.ts +1 -2
- package/dist/components/chat/chat-composer.d.ts +1 -1
- package/dist/components/chat/chat-composer.stories.d.ts +1 -2
- package/dist/components/chat/chat.fixtures.d.ts +2 -2
- package/dist/components/chat/floating-chat.d.ts +2 -2
- package/dist/components/chat/floating-chat.stories.d.ts +2 -3
- package/dist/components/chat/floating-sheet.d.ts +1 -1
- package/dist/components/chat/floating-sheet.stories.d.ts +2 -3
- package/dist/components/chat/member-list.d.ts +3 -3
- package/dist/components/chat/message-list.d.ts +3 -3
- package/dist/components/chat/message.d.ts +4 -4
- package/dist/components/chat/message.stories.d.ts +1 -2
- package/dist/components/chat/progress-stepper.d.ts +2 -2
- package/dist/components/chat/rich-text.d.ts +1 -1
- package/dist/components/chat/rich-text.stories.d.ts +1 -2
- package/dist/components/chat/server-header.d.ts +1 -1
- package/dist/components/chat/thread-preview.d.ts +2 -2
- package/dist/components/chat/thread-preview.stories.d.ts +1 -2
- package/dist/components/chat/user-panel.d.ts +1 -1
- package/dist/components/chat/workspace-rail.d.ts +1 -1
- package/dist/components/chat/workspace-rail.stories.d.ts +1 -2
- package/dist/components/checkbox.d.ts +3 -3
- package/dist/components/checkbox.stories.d.ts +1 -1
- package/dist/components/combobox.d.ts +3 -3
- package/dist/components/combobox.stories.d.ts +1 -1
- package/dist/components/credenza.d.ts +1 -1
- package/dist/components/credenza.d.ts.map +1 -1
- package/dist/components/credenza.stories.d.ts +1 -1
- package/dist/components/dialog.d.ts +5 -5
- package/dist/components/dialog.stories.d.ts +1 -1
- package/dist/components/disclosure.d.ts +4 -4
- package/dist/components/disclosure.stories.d.ts +1 -1
- package/dist/components/dropdown-menu.d.ts +5 -5
- package/dist/components/dropdown-menu.stories.d.ts +1 -1
- package/dist/components/edge-drawer.d.ts +1 -1
- package/dist/components/edge-drawer.stories.d.ts +1 -1
- package/dist/components/edit-bar.d.ts +1 -1
- package/dist/components/edit-bar.stories.d.ts +1 -1
- package/dist/components/form.d.ts +2 -2
- package/dist/components/form.stories.d.ts +1 -1
- package/dist/components/haptic-indicator.d.ts +1 -1
- package/dist/components/haptic-indicator.stories.d.ts +1 -1
- package/dist/components/icon-swap.d.ts +1 -1
- package/dist/components/index-bar.d.ts +6 -3
- package/dist/components/index-bar.d.ts.map +1 -1
- package/dist/components/index-bar.stories.d.ts +1 -1
- package/dist/components/input.d.ts +3 -3
- package/dist/components/input.stories.d.ts +1 -1
- package/dist/components/kbd.d.ts +1 -1
- package/dist/components/kbd.stories.d.ts +1 -1
- package/dist/components/label.d.ts +3 -3
- package/dist/components/label.stories.d.ts +1 -1
- package/dist/components/list-box.d.ts +5 -5
- package/dist/components/list-box.stories.d.ts +1 -1
- package/dist/components/list-row.stories.d.ts +10 -1
- package/dist/components/list-row.stories.d.ts.map +1 -1
- package/dist/components/list.d.ts +34 -3
- package/dist/components/list.d.ts.map +1 -1
- package/dist/components/list.stories.d.ts +6 -2
- package/dist/components/list.stories.d.ts.map +1 -1
- package/dist/components/markdown-editor.d.ts +39 -5
- package/dist/components/markdown-editor.d.ts.map +1 -1
- package/dist/components/markdown-editor.stories.d.ts +4 -1
- package/dist/components/markdown-editor.stories.d.ts.map +1 -1
- package/dist/components/measure-h.d.ts +1 -1
- package/dist/components/morph.d.ts +61 -0
- package/dist/components/morph.d.ts.map +1 -0
- package/dist/components/morph.stories.d.ts +14 -0
- package/dist/components/morph.stories.d.ts.map +1 -0
- package/dist/components/motion.stories.d.ts +1 -1
- package/dist/components/navigation-stack.d.ts +9 -3
- package/dist/components/navigation-stack.d.ts.map +1 -1
- package/dist/components/navigation-stack.stories.d.ts +12 -1
- package/dist/components/navigation-stack.stories.d.ts.map +1 -1
- package/dist/components/now-playing-bars.d.ts +21 -0
- package/dist/components/now-playing-bars.d.ts.map +1 -0
- package/dist/components/now-playing-bars.stories.d.ts +12 -0
- package/dist/components/now-playing-bars.stories.d.ts.map +1 -0
- package/dist/components/number-morph.d.ts +1 -1
- package/dist/components/pencilkit/pencil-canvas.d.ts +1 -1
- package/dist/components/pencilkit/pencil-canvas.stories.d.ts +1 -1
- package/dist/components/pencilkit/pencil-toolbar.d.ts +7 -4
- package/dist/components/pencilkit/pencil-toolbar.d.ts.map +1 -1
- package/dist/components/pencilkit/pencil-toolbar.stories.d.ts +1 -1
- package/dist/components/pencilkit/pencilkit-annotator.d.ts +2 -2
- package/dist/components/pencilkit/pk-icon.d.ts +1 -1
- package/dist/components/pencilkit/stroke-path.d.ts +1 -1
- package/dist/components/pencilkit/use-pencil-history.d.ts +2 -2
- package/dist/components/pill-button.d.ts +1 -1
- package/dist/components/pill-button.stories.d.ts +1 -1
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.stories.d.ts +1 -1
- package/dist/components/progress-ring.d.ts +66 -0
- package/dist/components/progress-ring.d.ts.map +1 -0
- package/dist/components/progress-ring.stories.d.ts +15 -0
- package/dist/components/progress-ring.stories.d.ts.map +1 -0
- package/dist/components/progress.d.ts +5 -5
- package/dist/components/progress.stories.d.ts +1 -1
- package/dist/components/qr-svg.d.ts +31 -4
- package/dist/components/qr-svg.d.ts.map +1 -1
- package/dist/components/qr-svg.stories.d.ts +9 -2
- package/dist/components/qr-svg.stories.d.ts.map +1 -1
- package/dist/components/radio-group.d.ts +4 -4
- package/dist/components/radio-group.stories.d.ts +1 -1
- package/dist/components/scroll-area.d.ts +3 -3
- package/dist/components/scroll-area.stories.d.ts +1 -1
- package/dist/components/search-field.d.ts +13 -5
- package/dist/components/search-field.d.ts.map +1 -1
- package/dist/components/search-field.stories.d.ts +3 -1
- package/dist/components/search-field.stories.d.ts.map +1 -1
- package/dist/components/segmented.d.ts +1 -1
- package/dist/components/segmented.stories.d.ts +1 -1
- package/dist/components/select.d.ts +5 -5
- package/dist/components/select.stories.d.ts +1 -1
- package/dist/components/separator.d.ts +3 -3
- package/dist/components/separator.stories.d.ts +1 -1
- package/dist/components/sheet.d.ts +4 -4
- package/dist/components/sheet.stories.d.ts +1 -1
- package/dist/components/side-drawer.d.ts +1 -1
- package/dist/components/side-drawer.stories.d.ts +1 -1
- package/dist/components/sidebar.d.ts +1 -1
- package/dist/components/sidebar.stories.d.ts +1 -1
- package/dist/components/skeleton.d.ts +23 -5
- package/dist/components/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton.stories.d.ts +3 -1
- package/dist/components/skeleton.stories.d.ts.map +1 -1
- package/dist/components/slider.d.ts +16 -3
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.stories.d.ts +4 -1
- package/dist/components/slider.stories.d.ts.map +1 -1
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/spinner.stories.d.ts +1 -1
- package/dist/components/split-view.d.ts +81 -10
- package/dist/components/split-view.d.ts.map +1 -1
- package/dist/components/split-view.stories.d.ts +28 -1
- package/dist/components/split-view.stories.d.ts.map +1 -1
- package/dist/components/switch.d.ts +3 -1
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.stories.d.ts +1 -1
- package/dist/components/syntax-highlighting.d.ts +14 -11
- package/dist/components/syntax-highlighting.d.ts.map +1 -1
- package/dist/components/syntax-highlighting.stories.d.ts +1 -1
- package/dist/components/tab-bar.d.ts +1 -1
- package/dist/components/tab-bar.stories.d.ts +1 -1
- package/dist/components/tab-view.d.ts +8 -8
- package/dist/components/tab-view.d.ts.map +1 -1
- package/dist/components/tab-view.stories.d.ts +9 -2
- package/dist/components/tab-view.stories.d.ts.map +1 -1
- package/dist/components/tabs.d.ts +5 -5
- package/dist/components/tabs.stories.d.ts +1 -1
- package/dist/components/text-field.d.ts +1 -1
- package/dist/components/text-field.stories.d.ts +1 -1
- package/dist/components/text-morph.d.ts +1 -1
- package/dist/components/textarea.d.ts +3 -3
- package/dist/components/toast.d.ts +104 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.stories.d.ts +13 -0
- package/dist/components/toast.stories.d.ts.map +1 -0
- package/dist/components/toggle-group.d.ts +3 -3
- package/dist/components/toggle-group.stories.d.ts +1 -1
- package/dist/components/toggle.d.ts +3 -3
- package/dist/components/toggle.stories.d.ts +1 -1
- package/dist/components/tooltip.d.ts +2 -2
- package/dist/components/tooltip.stories.d.ts +1 -1
- package/dist/components/workbench/chat.d.ts +1 -1
- package/dist/components/workbench/chat.stories.d.ts +1 -2
- package/dist/components/workbench/composer-files.d.ts +36 -0
- package/dist/components/workbench/composer-files.d.ts.map +1 -0
- package/dist/components/workbench/composer.d.ts +111 -28
- package/dist/components/workbench/composer.d.ts.map +1 -1
- package/dist/components/workbench/composer.stories.d.ts +8 -2
- package/dist/components/workbench/composer.stories.d.ts.map +1 -1
- package/dist/components/workbench/fixtures.d.ts +2 -2
- package/dist/components/workbench/markdown.d.ts +2 -3
- package/dist/components/workbench/message-scroller.stories.d.ts +1 -2
- package/dist/components/workbench/model-picker.d.ts +3 -3
- package/dist/components/workbench/snap-sheet.stories.d.ts +1 -2
- package/dist/components/workbench/surfaces.d.ts +1 -1
- package/dist/components/workbench/surfaces.stories.d.ts +1 -2
- package/dist/components/workbench/terminal.d.ts +1 -1
- package/dist/components/workbench/terminal.stories.d.ts +1 -2
- package/dist/components/workbench/thread-sidebar.d.ts +1 -1
- package/dist/components/workbench/thread-sidebar.stories.d.ts +1 -2
- package/dist/components/workbench/wb-popover.d.ts +1 -1
- package/dist/components/workbench/workbench-composer.d.ts +1 -1
- package/dist/demos/delivery/delivery-tracking-demo.d.ts +4 -3
- package/dist/demos/delivery/delivery-tracking-demo.d.ts.map +1 -1
- package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts +2 -3
- package/dist/demos/haptics-playground.d.ts +4 -1
- package/dist/demos/haptics-playground.d.ts.map +1 -1
- package/dist/demos/haptics-playground.stories.d.ts +1 -1
- package/dist/demos/map-chat/map-agent.d.ts +2 -2
- package/dist/demos/map-chat/map-chat-demo.d.ts +3 -3
- package/dist/demos/map-chat/map-chat-demo.d.ts.map +1 -1
- package/dist/demos/map-chat/map-chat-demo.stories.d.ts +2 -3
- package/dist/demos/map-chat/places.d.ts +2 -2
- package/dist/demos/map-chat/tile-map.d.ts +3 -3
- package/dist/demos/pencilkit/demo-strokes.d.ts +1 -1
- package/dist/demos/pencilkit/pencilkit-demo.d.ts +2 -2
- package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts +1 -1
- package/dist/demos/sidebar-demo.d.ts +2 -2
- package/dist/demos/split-view-demos.d.ts +15 -2
- package/dist/demos/split-view-demos.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +26 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9348 -5277
- package/dist/lib/chat/chat-icon.d.ts +1 -1
- package/dist/lib/chat/chat-shell-context.d.ts +1 -1
- package/dist/lib/chat/chat-tokens.d.ts +2 -2
- package/dist/lib/chat/chat-users.d.ts +1 -1
- package/dist/lib/chat/persistent-host.d.ts +4 -4
- package/dist/lib/container.d.ts +8 -1
- package/dist/lib/container.d.ts.map +1 -1
- package/dist/lib/haptics.d.ts +7 -5
- package/dist/lib/haptics.d.ts.map +1 -1
- package/dist/lib/icon.d.ts +1298 -7
- package/dist/lib/icon.d.ts.map +1 -1
- package/dist/lib/icon.stories.d.ts +8 -1
- package/dist/lib/icon.stories.d.ts.map +1 -1
- package/dist/lib/pencilkit/constants.d.ts +1 -1
- package/dist/lib/qr.d.ts +28 -0
- package/dist/lib/qr.d.ts.map +1 -0
- package/dist/lib/sheet-drag.d.ts +1 -1
- package/dist/lib/syntax.d.ts +27 -10
- package/dist/lib/syntax.d.ts.map +1 -1
- package/dist/lib/theme.d.ts +4 -4
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/workbench/icons.d.ts +1 -1
- package/dist/lib/workbench/motion.d.ts +2 -2
- package/dist/lib/workbench/press.d.ts +1 -1
- package/dist/lib/workbench/press.d.ts.map +1 -1
- package/dist/lib/workbench/theme.d.ts +1 -1
- package/dist/stories/frame.d.ts +1 -1
- package/dist/stories/primitive-frame.d.ts +1 -1
- package/dist/templates/artifact-chat-container.d.ts +2 -2
- package/dist/templates/artifact-chat-container.stories.d.ts +2 -3
- package/dist/templates/chat-shell.d.ts +5 -5
- package/dist/templates/chat-shell.stories.d.ts +1 -2
- package/dist/templates/workbench-shell.d.ts +2 -2
- package/dist/templates/workbench-shell.stories.d.ts +1 -2
- package/package.json +3 -4
- package/dist/tsconfig.lib.tsbuildinfo +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,EAEiB,KAAK,WAAW,IAAI,eAAe,EAEzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAEtD,MAAM,uBAAuB,CAAC;AAQ/B,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IAClF,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,mD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AS,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,EACvF,EAAE,WAAW,CAAC,CAAC,CAAC,2CA6ChB;AAED;sDACsD;AACtD,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CA0B9E;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAcpE"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import { Slider } from './slider';
|
|
3
3
|
declare const meta: Meta<typeof Slider>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Slider>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const Labeled: Story;
|
|
8
|
+
/** `tone` for media controls over artwork or dark glass (`onDark`) and light imagery (`onLight`); `size="sm"` is the
|
|
9
|
+
scrubber thumb that grows while dragging. Custom `trackColor` / `fillColor` / `thumbColor` fine-tune any tone. */
|
|
10
|
+
export declare const Tones: Story;
|
|
8
11
|
export declare const Dark: Story;
|
|
9
12
|
//# sourceMappingURL=slider.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.stories.d.ts","sourceRoot":"","sources":["../../src/components/slider.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAK7B,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAQlB,CAAC"}
|
|
1
|
+
{"version":3,"file":"slider.stories.d.ts","sourceRoot":"","sources":["../../src/components/slider.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAK7B,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF;qHACqH;AACrH,eAAO,MAAM,KAAK,EAAE,KAanB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAQlB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
export type SplitViewColumn = 'sidebar' | 'supplementary' | 'detail';
|
|
3
3
|
export type SplitViewWidthClass = 'compact' | 'medium' | 'regular';
|
|
4
4
|
/** How a shown sidebar shares space with the other columns. `auto`: tile at regular, overlay at medium. */
|
|
@@ -11,7 +11,7 @@ export interface SplitViewState {
|
|
|
11
11
|
collapsed: boolean;
|
|
12
12
|
/** Measured width of the SplitView, px. */
|
|
13
13
|
width: number;
|
|
14
|
-
/** Columns that are
|
|
14
|
+
/** Columns that are shown, in order (a hidden supplementary is left out). */
|
|
15
15
|
columns: SplitViewColumn[];
|
|
16
16
|
sidebarVisible: boolean;
|
|
17
17
|
setSidebarVisible: (visible: boolean) => void;
|
|
@@ -30,6 +30,9 @@ export interface SplitViewState {
|
|
|
30
30
|
canGoBack: boolean;
|
|
31
31
|
widths: Partial<Record<SplitViewColumn, number>>;
|
|
32
32
|
setColumnWidth: (column: SplitViewColumn, width: number) => void;
|
|
33
|
+
/** False while the supplementary column is hidden and the detail has taken its space. */
|
|
34
|
+
supplementaryVisible: boolean;
|
|
35
|
+
setSupplementaryVisible: (visible: boolean) => void;
|
|
33
36
|
}
|
|
34
37
|
/** Split view state: width class, sidebar visibility, selection and navigation. */
|
|
35
38
|
export declare function useSplitView(): SplitViewState;
|
|
@@ -46,9 +49,20 @@ export interface SplitViewProps {
|
|
|
46
49
|
sidebarBehavior?: SplitViewSidebarBehavior;
|
|
47
50
|
/** Controlled sidebar visibility. */
|
|
48
51
|
sidebarVisible?: boolean;
|
|
49
|
-
/**
|
|
52
|
+
/** Sidebar visibility at regular width — shorthand for `sidebarVisibility={{ regular }}`. Default true. */
|
|
50
53
|
defaultSidebarVisible?: boolean;
|
|
54
|
+
/** The visibility the sidebar starts at, and resets to whenever the width class changes, per class.
|
|
55
|
+
* Default `{ regular: defaultSidebarVisible, medium: false }`. */
|
|
56
|
+
sidebarVisibility?: Partial<Record<Exclude<SplitViewWidthClass, 'compact'>, boolean>>;
|
|
57
|
+
/** Every visibility change: the toggle, the scrim, Esc, picking in a floating sidebar — and the reset to
|
|
58
|
+
* `sidebarVisibility` when the width class changes, so a controlling parent can simply mirror it. */
|
|
51
59
|
onSidebarVisibleChange?: (visible: boolean) => void;
|
|
60
|
+
/** Controlled supplementary visibility. `false` slides the supplementary away and the detail takes its space
|
|
61
|
+
* (Notes' gallery); when collapsed, the stack skips it. */
|
|
62
|
+
supplementaryVisible?: boolean;
|
|
63
|
+
/** Default true. */
|
|
64
|
+
defaultSupplementaryVisible?: boolean;
|
|
65
|
+
onSupplementaryVisibleChange?: (visible: boolean) => void;
|
|
52
66
|
selection?: SplitViewSelection;
|
|
53
67
|
defaultSelection?: SplitViewSelection;
|
|
54
68
|
onSelectionChange?: (selection: SplitViewSelection) => void;
|
|
@@ -62,7 +76,7 @@ export interface SplitViewProps {
|
|
|
62
76
|
className?: string;
|
|
63
77
|
style?: CSSProperties;
|
|
64
78
|
}
|
|
65
|
-
export declare function SplitView({ widthClass: wcProp, breakpoints, sidebarBehavior, sidebarVisible: sideProp, defaultSidebarVisible, onSidebarVisibleChange, selection: selProp, defaultSelection, onSelectionChange, defaultCompactColumn, onCompactColumnChange, onWidthClassChange, children, className, style, ...aria }: SplitViewProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
export declare function SplitView({ widthClass: wcProp, breakpoints, sidebarBehavior, sidebarVisible: sideProp, defaultSidebarVisible, sidebarVisibility, onSidebarVisibleChange, supplementaryVisible: suppProp, defaultSupplementaryVisible, onSupplementaryVisibleChange, selection: selProp, defaultSelection, onSelectionChange, defaultCompactColumn, onCompactColumnChange, onWidthClassChange, children, className, style, ...aria }: SplitViewProps): import("react/jsx-runtime").JSX.Element;
|
|
66
80
|
export interface SplitViewColumnProps {
|
|
67
81
|
/** Preferred width, px (sidebar default 280, supplementary 340; the detail fills what's left). */
|
|
68
82
|
width?: number;
|
|
@@ -70,6 +84,8 @@ export interface SplitViewColumnProps {
|
|
|
70
84
|
maxWidth?: number;
|
|
71
85
|
/** Draggable divider on the trailing edge (tiled only). Default true for sidebar and supplementary. */
|
|
72
86
|
resizable?: boolean;
|
|
87
|
+
/** Host a push/pop stack: the children become its root page (see `SplitViewStack`, `useSplitViewStack`). */
|
|
88
|
+
stack?: boolean;
|
|
73
89
|
/** Accessible name of the column region. */
|
|
74
90
|
'aria-label'?: string;
|
|
75
91
|
children?: ReactNode;
|
|
@@ -84,17 +100,21 @@ export declare function SplitViewSupplementary(props: SplitViewColumnProps): imp
|
|
|
84
100
|
export declare function SplitViewDetail(props: SplitViewColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
85
101
|
export interface SplitViewHeaderProps {
|
|
86
102
|
title?: ReactNode;
|
|
103
|
+
/** iOS large title: drawn big at the top of the pane's SplitViewContent and scrolling with it; once it has
|
|
104
|
+
* gone under the bar the inline title (and the bar's hairline) spring in. */
|
|
105
|
+
largeTitle?: boolean;
|
|
87
106
|
/** Leading items (e.g. <SplitViewToggle/>). Replaced by the back button when collapsed and not the root. */
|
|
88
107
|
leading?: ReactNode;
|
|
89
108
|
trailing?: ReactNode;
|
|
90
|
-
/** Back button label; defaults to the previous column's title
|
|
109
|
+
/** Back button label; defaults to the previous column's (or stack page's) title, truncated to the room
|
|
110
|
+
* the title leaves. */
|
|
91
111
|
backLabel?: string;
|
|
92
112
|
className?: string;
|
|
93
113
|
style?: CSSProperties;
|
|
94
114
|
}
|
|
95
|
-
/** Column bar: back button when collapsed, title, leading / trailing items. */
|
|
96
|
-
export declare function SplitViewHeader({ title, leading, trailing, backLabel, className, style }: SplitViewHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
97
|
-
/** Scrolling body of a column. */
|
|
115
|
+
/** Column bar: back button when collapsed (or on a pushed stack page), title, leading / trailing items. */
|
|
116
|
+
export declare function SplitViewHeader({ title, largeTitle, leading, trailing, backLabel, className, style }: SplitViewHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
117
|
+
/** Scrolling body of a column. Draws the header's large title, if it has one, at the top of the scroll. */
|
|
98
118
|
export declare function SplitViewContent({ children, className, style }: {
|
|
99
119
|
children?: ReactNode;
|
|
100
120
|
className?: string;
|
|
@@ -106,8 +126,14 @@ export interface SplitViewToggleProps {
|
|
|
106
126
|
}
|
|
107
127
|
/** Sidebar button. Shown whenever there's a sidebar to show or hide; hidden when collapsed (back takes over). */
|
|
108
128
|
export declare function SplitViewToggle({ className, ...aria }: SplitViewToggleProps): import("react/jsx-runtime").JSX.Element | null;
|
|
129
|
+
/** Selected colours for a SplitViewItem: a background (foreground white), or both. */
|
|
130
|
+
export type SplitViewItemTint = string | {
|
|
131
|
+
background: string;
|
|
132
|
+
foreground?: string;
|
|
133
|
+
};
|
|
109
134
|
export interface SplitViewItemProps {
|
|
110
|
-
/** Selection
|
|
135
|
+
/** Selection value within this column. Several items may share one (the same mailbox under Favorites and
|
|
136
|
+
* under its account): every item whose id is selected draws selected. */
|
|
111
137
|
id: string;
|
|
112
138
|
title?: ReactNode;
|
|
113
139
|
subtitle?: ReactNode;
|
|
@@ -118,11 +144,56 @@ export interface SplitViewItemProps {
|
|
|
118
144
|
children?: ReactNode;
|
|
119
145
|
/** `pill` (sidebar default): inset rounded row. `row`: full-bleed list row with a separator. */
|
|
120
146
|
variant?: 'pill' | 'row';
|
|
147
|
+
/** This item's own selection colour instead of the app tint (Reminders' coloured lists). Also colours the
|
|
148
|
+
* icon while unselected. Exposed to custom content as `--split-item-tint` / `--split-item-on-tint`. */
|
|
149
|
+
tint?: SplitViewItemTint;
|
|
121
150
|
onPress?: () => void;
|
|
122
151
|
className?: string;
|
|
123
152
|
}
|
|
124
153
|
/** A selectable row bound to the column's selection: pressing it selects `id` and shows the next column. */
|
|
125
|
-
export declare function SplitViewItem({ id, title, subtitle, icon, badge, children, variant, onPress, className }: SplitViewItemProps): import("react/jsx-runtime").JSX.Element;
|
|
154
|
+
export declare function SplitViewItem({ id, title, subtitle, icon, badge, children, variant, tint, onPress, className }: SplitViewItemProps): import("react/jsx-runtime").JSX.Element;
|
|
155
|
+
export interface SplitViewSectionProps {
|
|
156
|
+
/** Section label ("Favorites", "iCloud"). */
|
|
157
|
+
title?: ReactNode;
|
|
158
|
+
/** The label becomes a disclosure button that folds the section with a spring. */
|
|
159
|
+
collapsible?: boolean;
|
|
160
|
+
expanded?: boolean;
|
|
161
|
+
/** Default true. */
|
|
162
|
+
defaultExpanded?: boolean;
|
|
163
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
164
|
+
children?: ReactNode;
|
|
165
|
+
className?: string;
|
|
166
|
+
}
|
|
167
|
+
/** A titled group of SplitViewItems in a column. An item id may appear in more than one section; each copy
|
|
168
|
+
* highlights when it's selected. */
|
|
169
|
+
export declare function SplitViewSection({ title, collapsible, expanded, defaultExpanded, onExpandedChange, children, className }: SplitViewSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
170
|
+
export interface SplitViewStackApi {
|
|
171
|
+
/** Push a page on top. Pages are kept as elements, so read live data from hooks/context inside them. */
|
|
172
|
+
push: (page: ReactNode, options?: {
|
|
173
|
+
key?: string;
|
|
174
|
+
}) => void;
|
|
175
|
+
/** Pop the top page (no-op at the root). */
|
|
176
|
+
pop: () => void;
|
|
177
|
+
popToRoot: () => void;
|
|
178
|
+
/** Pages including the root: 1 at the root. */
|
|
179
|
+
depth: number;
|
|
180
|
+
canPop: boolean;
|
|
181
|
+
}
|
|
182
|
+
/** The nearest SplitViewStack's push / pop. */
|
|
183
|
+
export declare function useSplitViewStack(): SplitViewStackApi;
|
|
184
|
+
export interface SplitViewStackProps {
|
|
185
|
+
/** The root page. */
|
|
186
|
+
children?: ReactNode;
|
|
187
|
+
/** Changing this drops every pushed page at once (e.g. the sidebar selection the stack belongs to). */
|
|
188
|
+
resetKey?: unknown;
|
|
189
|
+
onDepthChange?: (depth: number) => void;
|
|
190
|
+
className?: string;
|
|
191
|
+
style?: CSSProperties;
|
|
192
|
+
}
|
|
193
|
+
/** A push/pop stack inside a column. Each page may have its own SplitViewHeader (whose back button pops,
|
|
194
|
+
* labelled with the page below's title) and SplitViewContent. The leading-edge swipe and Esc pop the
|
|
195
|
+
* innermost level first; the column stack only moves once this stack is at its root. */
|
|
196
|
+
export declare function SplitViewStack({ children, resetKey, onDepthChange, className, style }: SplitViewStackProps): import("react/jsx-runtime").JSX.Element;
|
|
126
197
|
export interface SplitViewEmptyProps {
|
|
127
198
|
icon?: ReactNode;
|
|
128
199
|
title?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-view.d.ts","sourceRoot":"","sources":["../../src/components/split-view.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"split-view.d.ts","sourceRoot":"","sources":["../../src/components/split-view.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAEL,KAAK,aAAa,EAAoF,KAAK,SAAS,EACrH,MAAM,OAAO,CAAC;AAYf,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,eA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AM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC5D,4CAA4C;IAC5C,GAAG,EAAE,MAAM,IAAI,CAAC;IAChB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;CACjB;AASD,+CAA+C;AAC/C,wBAAgB,iBAAiB,IAAI,iBAAiB,CAIrD;AAED,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAKD;;yFAEyF;AACzF,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAwG1G;AAmDD,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,sDAAsD;AACtD,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,mBAAmB,2CAU1F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import { SplitView } from './split-view';
|
|
3
3
|
declare const meta: Meta<typeof SplitView>;
|
|
4
4
|
export default meta;
|
|
@@ -21,4 +21,31 @@ export declare const DisplaceSidebar: Story;
|
|
|
21
21
|
/** Drag the handle (or focus it and use the arrow keys): the split morphs between regular, medium and
|
|
22
22
|
* compact without losing the selection or the scroll position. */
|
|
23
23
|
export declare const ResizableFrame: Story;
|
|
24
|
+
/** Medium width with `sidebarVisibility={{ medium: true }}` and a tiled sidebar: the sidebar starts shown
|
|
25
|
+
* at medium too. Resize across the breakpoints — each class resets to its own visibility, and the parent
|
|
26
|
+
* (which controls `sidebarVisible`) hears every reset through `onSidebarVisibleChange`. */
|
|
27
|
+
export declare const MediumSidebarVisible: Story;
|
|
28
|
+
/** Per-item `tint`: every list selects in its own colour (the icon disc reads `--split-item-tint`). Groceries
|
|
29
|
+
* is in Pinned and My Lists — selection is by value, so both copies highlight. Both columns use large titles. */
|
|
30
|
+
export declare const TintedItems: Story;
|
|
31
|
+
export declare const TintedItemsDark: Story;
|
|
32
|
+
/** Large title after scrolling: the big title has gone under the bar, so the inline title and the hairline
|
|
33
|
+
* have sprung in. Scroll back up and it unfolds again. */
|
|
34
|
+
export declare const LargeTitleScrolled: Story;
|
|
35
|
+
/** Large titles in the compact stack: the lists screen is the root, the list pushes with its own large title. */
|
|
36
|
+
export declare const LargeTitleCompact: Story;
|
|
37
|
+
/** A push/pop stack inside the detail column (`SplitViewStack` + `useSplitViewStack`): album → credits.
|
|
38
|
+
* The sidebar selection is the stack's `resetKey`, so picking a section drops back to its root. */
|
|
39
|
+
export declare const NestedStack: Story;
|
|
40
|
+
/** Compact with a nested stack: the album page is on top. Its back button carries the page below's title,
|
|
41
|
+
* "Recently Added Albums", truncated to the room the centered title leaves. The edge swipe (and Esc) pops
|
|
42
|
+
* the album page first; only at the stack's root does it pop the column. */
|
|
43
|
+
export declare const NestedStackCompact: Story;
|
|
44
|
+
/** Gallery: `supplementaryVisible={false}` — the list column has slid away and the detail fills its space.
|
|
45
|
+
* The list button springs it back. */
|
|
46
|
+
export declare const Gallery: Story;
|
|
47
|
+
export declare const GalleryDark: Story;
|
|
48
|
+
/** A NavigationStack nested in the compact detail column: the edge swipe (and Esc) pop the NavigationStack's
|
|
49
|
+
* screen only — the column stays — and once it's at its root the next swipe pops the column. */
|
|
50
|
+
export declare const NestedNavigationStack: Story;
|
|
24
51
|
//# sourceMappingURL=split-view.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-view.stories.d.ts","sourceRoot":"","sources":["../../src/components/split-view.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,
|
|
1
|
+
{"version":3,"file":"split-view.stories.d.ts","sourceRoot":"","sources":["../../src/components/split-view.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,SAAS,EACV,MAAM,cAAc,CAAC;AAStB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAGhC,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AAExC,oGAAoG;AACpG,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,gCAAgC;AAChC,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,iGAAiG;AACjG,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC;AAEF,0GAA0G;AAC1G,eAAO,MAAM,cAAc,EAAE,KAK5B,CAAC;AAEF,yFAAyF;AACzF,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC;AAEF;mEACmE;AACnE,eAAO,MAAM,cAAc,EAAE,KAU5B,CAAC;AAEF;;4FAE4F;AAC5F,eAAO,MAAM,oBAAoB,EAAE,KAclC,CAAC;AAEF;kHACkH;AAClH,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAE7B,CAAC;AAEF;2DAC2D;AAC3D,eAAO,MAAM,kBAAkB,EAAE,KAEhC,CAAC;AAEF,iHAAiH;AACjH,eAAO,MAAM,iBAAiB,EAAE,KAE/B,CAAC;AAEF;oGACoG;AACpG,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF;;6EAE6E;AAC7E,eAAO,MAAM,kBAAkB,EAAE,KAEhC,CAAC;AAEF;uCACuC;AACvC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF;iGACiG;AACjG,eAAO,MAAM,qBAAqB,EAAE,KAgCnC,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
export interface SwitchProps {
|
|
3
3
|
checked: boolean;
|
|
4
4
|
onChange: (v: boolean) => void;
|
|
5
5
|
'aria-label'?: string;
|
|
6
|
+
/** Label the switch by another element (ListRow points it at the row title). */
|
|
7
|
+
'aria-labelledby'?: string;
|
|
6
8
|
className?: string;
|
|
7
9
|
style?: CSSProperties;
|
|
8
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK3C,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;yFACyF;AACzF,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK3C,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;yFACyF;AACzF,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,2CAqBnF"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { ComponentProps, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps as AriaButtonProps } from 'react-aria-components';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { SyntaxEngine, SyntaxHighlighter, SyntaxToken } from '../lib/syntax';
|
|
5
5
|
export interface UseSyntaxTokensOptions {
|
|
6
6
|
/** A plain-text language (`text`, `plaintext`, `none`) skips lexing. Other values are informational: gpu-lexer
|
|
7
7
|
recognizes the language itself. */
|
|
8
8
|
language?: string;
|
|
9
9
|
/** `false` renders plain lines and never lexes. */
|
|
10
10
|
enabled?: boolean;
|
|
11
|
-
/** `
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/** `auto` (default): gpu-lexer on a hardware WebGPU adapter; where the only adapter is a software one
|
|
12
|
+
(SwiftShader in headless CI, llvmpipe), there is none, or the one-time adapter probe takes over 2.5 s, the
|
|
13
|
+
small fallback at once. `gpu`: gpu-lexer on any adapter, software included (slow on software; the fallback
|
|
14
|
+
only where WebGPU is missing). `fallback`: always the fallback (tests, or pages that must not touch the GPU). */
|
|
15
|
+
engine?: SyntaxEngine;
|
|
14
16
|
}
|
|
15
17
|
export interface SyntaxTokensState {
|
|
16
18
|
/** One token array per line (a single trailing newline is dropped). Plain until the lexer answers. */
|
|
@@ -30,14 +32,14 @@ export declare function SyntaxTokens({ tokens }: {
|
|
|
30
32
|
export type SyntaxLineRange = number | readonly [number, number] | string;
|
|
31
33
|
export declare const syntaxHighlightingVariants: (props?: ({
|
|
32
34
|
variant?: "default" | "inline" | "ghost" | null | undefined;
|
|
33
|
-
} & import(
|
|
35
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
34
36
|
type Variant = NonNullable<VariantProps<typeof syntaxHighlightingVariants>['variant']>;
|
|
35
37
|
interface SyntaxHighlightingContextValue {
|
|
36
38
|
code: string;
|
|
37
39
|
language?: string;
|
|
38
40
|
variant: Variant;
|
|
39
41
|
title?: ReactNode;
|
|
40
|
-
engine?:
|
|
42
|
+
engine?: SyntaxEngine;
|
|
41
43
|
}
|
|
42
44
|
/** The enclosing SyntaxHighlighting's `code`, `language`, `variant` and `title`. */
|
|
43
45
|
export declare const useSyntaxHighlighting: () => SyntaxHighlightingContextValue | null;
|
|
@@ -63,8 +65,9 @@ export interface SyntaxHighlightingContentProps extends Omit<ComponentProps<'pre
|
|
|
63
65
|
lineProps?: (line: number) => HTMLAttributes<HTMLSpanElement> | undefined;
|
|
64
66
|
/** `false` renders plain text and never lexes. */
|
|
65
67
|
highlight?: boolean;
|
|
66
|
-
/** `
|
|
67
|
-
|
|
68
|
+
/** `auto` (default: GPU on a hardware adapter, else the fallback at once), `gpu` (gpu-lexer even on a software
|
|
69
|
+
adapter) or `fallback` — see `useSyntaxTokens`. */
|
|
70
|
+
engine?: SyntaxEngine;
|
|
68
71
|
}
|
|
69
72
|
export declare function SyntaxHighlightingContent({ code: codeProp, language: languageProp, lineNumbers, startLine, highlightLines, addedLines, removedLines, wrap, maxHeight, lineProps, highlight, engine, className, style, tabIndex, ...props }: SyntaxHighlightingContentProps): import("react/jsx-runtime").JSX.Element;
|
|
70
73
|
export declare function SyntaxHighlightingHeader({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syntax-highlighting.d.ts","sourceRoot":"","sources":["../../src/components/syntax-highlighting.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEe,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAC7E,MAAM,OAAO,CAAC;AACf,OAAO,EAAwB,KAAK,WAAW,IAAI,eAAe,EAAsB,MAAM,uBAAuB,CAAC;AACtH,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAEL,KAAK,iBAAiB,EAAqB,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"syntax-highlighting.d.ts","sourceRoot":"","sources":["../../src/components/syntax-highlighting.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEe,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAC7E,MAAM,OAAO,CAAC;AACf,OAAO,EAAwB,KAAK,WAAW,IAAI,eAAe,EAAsB,MAAM,uBAAuB,CAAC;AACtH,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAEL,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAqB,KAAK,WAAW,EAC/E,MAAM,eAAe,CAAC;AAUvB,MAAM,WAAW,sBAAsB;IACrC;0CACsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;wHAGoH;IACpH,MAAM,CAAC,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abProps as AriaTabProps, TabRenderProps, TabListProps as AriaTabListProps, TabPanelProps as AriaTabPanelProps, TabPanelsProps as AriaTabPanelsProps, TabsProps as AriaTabsProps } from 'react-aria-components';
|
|
3
3
|
export type TabViewPlacement = 'top' | 'bottom' | 'start' | 'end';
|
|
4
4
|
export type TabViewOrientation = 'horizontal' | 'vertical';
|
|
5
5
|
export type TabViewBarVariant = 'bar' | 'rail' | 'plain';
|
|
@@ -14,7 +14,7 @@ export declare const useTabView: () => TabViewCtxValue;
|
|
|
14
14
|
export declare const useTabViewTab: () => TabRenderProps | null;
|
|
15
15
|
export declare const tabViewVariants: (props?: ({
|
|
16
16
|
placement?: "bottom" | "end" | "start" | "top" | null | undefined;
|
|
17
|
-
} & import(
|
|
17
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
18
18
|
export interface TabViewProps extends Omit<AriaTabsProps, 'orientation'> {
|
|
19
19
|
/** Where the bar sits. `top`/`bottom` → horizontal, `start`/`end` → vertical. */
|
|
20
20
|
placement?: TabViewPlacement;
|
|
@@ -24,7 +24,7 @@ export interface TabViewProps extends Omit<AriaTabsProps, 'orientation'> {
|
|
|
24
24
|
export declare function TabView({ placement, orientation, className, onSelectionChange, children, ...props }: TabViewProps): import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
export declare const tabViewBarVariants: (props?: ({
|
|
26
26
|
variant?: "bar" | "rail" | "plain" | null | undefined;
|
|
27
|
-
} & import(
|
|
27
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
28
28
|
export interface TabViewBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
29
29
|
/** Defaults to `bar` when horizontal, `rail` when vertical. */
|
|
30
30
|
variant?: TabViewBarVariant;
|
|
@@ -34,11 +34,11 @@ export interface TabViewBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
34
34
|
export declare function TabViewBar({ variant, hideOnScroll, className, style, children, ...props }: TabViewBarProps): import("react/jsx-runtime").JSX.Element;
|
|
35
35
|
export declare const tabViewListVariants: (props?: ({
|
|
36
36
|
variant?: "bar" | "rail" | "plain" | null | undefined;
|
|
37
|
-
} & import(
|
|
37
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
38
38
|
export declare function TabViewList<T extends object>({ className, ...props }: AriaTabListProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
export declare const tabViewTabVariants: (props?: ({
|
|
40
40
|
variant?: "bar" | "rail" | "plain" | null | undefined;
|
|
41
|
-
} & import(
|
|
41
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
42
42
|
export interface TabViewTabProps extends AriaTabProps {
|
|
43
43
|
/** Default content: an icon name (see `Icon`)… */
|
|
44
44
|
icon?: string;
|
|
@@ -52,7 +52,7 @@ export declare function TabViewTab({ className, icon, title, children, ...props
|
|
|
52
52
|
export declare const tabViewIndicatorVariants: (props?: ({
|
|
53
53
|
variant?: "bar" | "pill" | null | undefined;
|
|
54
54
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
55
|
-
} & import(
|
|
55
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
56
56
|
export interface TabViewIndicatorProps {
|
|
57
57
|
variant?: 'bar' | 'pill';
|
|
58
58
|
/** `pill` only: show the small unread nub while not hovered/selected. */
|
|
@@ -69,7 +69,7 @@ interface SeparatorProps {
|
|
|
69
69
|
export declare function TabViewSeparator(props: SeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
70
70
|
export declare const tabViewActionVariants: (props?: ({
|
|
71
71
|
variant?: "bar" | "rail" | "plain" | null | undefined;
|
|
72
|
-
} & import(
|
|
72
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
73
73
|
export interface TabViewActionProps extends AriaButtonProps {
|
|
74
74
|
icon?: string;
|
|
75
75
|
title?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-view.d.ts","sourceRoot":"","sources":["../../src/components/tab-view.tsx"],"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';
|
|
2
|
+
import { TabViewPlacement } from './tab-view';
|
|
3
3
|
interface Args {
|
|
4
4
|
placement?: TabViewPlacement;
|
|
5
5
|
dark?: boolean;
|
|
@@ -18,4 +18,11 @@ export declare const DiscordRail: Story;
|
|
|
18
18
|
/** `placement="top"` with a plain bar and fully custom tabs: the render prop hands each tab its state
|
|
19
19
|
(isSelected, isHovered, isFocusVisible…), and `TabViewIndicator` slides the underline between them. */
|
|
20
20
|
export declare const CustomTabs: Story;
|
|
21
|
+
/** Order-independent: the panels are written before the bar. TabView moves a direct-child bar ahead of the
|
|
22
|
+
panels (so react-aria has minted its tab ids, and `placement` still puts the bar at the bottom) — this
|
|
23
|
+
renders exactly like `Bottom`, with no "There is no tab id" error. */
|
|
24
|
+
export declare const PanelsFirst: Story;
|
|
25
|
+
/** Panels first with the bar nested in a wrapper: TabViewPanels waits one layout pass (before paint) for the
|
|
26
|
+
tablist, so this works too. Here the wrapper is laid out by hand (the panels fill, the bar pins to the top). */
|
|
27
|
+
export declare const PanelsFirstNested: Story;
|
|
21
28
|
//# sourceMappingURL=tab-view.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-view.stories.d.ts","sourceRoot":"","sources":["../../src/components/tab-view.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAEwC,KAAK,gBAAgB,EACnE,MAAM,YAAY,CAAC;AAMpB,UAAU,IAAI;IAAG,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE;AAC/D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAAkC,CAAC;AACxD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;AA2B5B,yGAAyG;AACzG,eAAO,MAAM,MAAM,EAAE,KAepB,CAAC;AAEF;oFACoF;AACpF,eAAO,MAAM,YAAY,EAAE,KAmC1B,CAAC;AA0DF;+GAC+G;AAC/G,eAAO,MAAM,WAAW,EAAE,KAGzB,CAAC;AAUF;0GAC0G;AAC1G,eAAO,MAAM,UAAU,EAAE,KAuCxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"tab-view.stories.d.ts","sourceRoot":"","sources":["../../src/components/tab-view.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAEwC,KAAK,gBAAgB,EACnE,MAAM,YAAY,CAAC;AAMpB,UAAU,IAAI;IAAG,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE;AAC/D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAAkC,CAAC;AACxD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;AA2B5B,yGAAyG;AACzG,eAAO,MAAM,MAAM,EAAE,KAepB,CAAC;AAEF;oFACoF;AACpF,eAAO,MAAM,YAAY,EAAE,KAmC1B,CAAC;AA0DF;+GAC+G;AAC/G,eAAO,MAAM,WAAW,EAAE,KAGzB,CAAC;AAUF;0GAC0G;AAC1G,eAAO,MAAM,UAAU,EAAE,KAuCxB,CAAC;AAEF;;yEAEyE;AACzE,eAAO,MAAM,WAAW,EAAE,KAezB,CAAC;AAEF;mHACmH;AACnH,eAAO,MAAM,iBAAiB,EAAE,KAuB/B,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { TabProps as AriaTabProps, TabListProps as AriaTabListProps, TabPanelProps as AriaTabPanelProps, TabsProps as AriaTabsProps } from 'react-aria-components';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
export declare const tabsListVariants: (props?: ({
|
|
5
5
|
variant?: "underline" | "segmented" | null | undefined;
|
|
6
|
-
} & import(
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export declare const tabVariants: (props?: ({
|
|
8
8
|
variant?: "underline" | "segmented" | null | undefined;
|
|
9
|
-
} & import(
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
10
|
/** Inside a react-aria Tabs: provides the direction of the latest selection change (by collection order). */
|
|
11
11
|
export declare function TabDirection({ children }: {
|
|
12
12
|
children?: ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FieldErrorProps as AriaFieldErrorProps, TextProps, TextFieldProps as AriaTextFieldProps } from 'react-aria-components';
|
|
2
2
|
export interface TextFieldProps extends AriaTextFieldProps {
|
|
3
3
|
}
|
|
4
4
|
export declare function TextField({ className, ...props }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { TextAreaProps as AriaTextAreaProps } from 'react-aria-components';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
export declare const textareaVariants: (props?: ({
|
|
4
4
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
5
|
-
} & import(
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
export interface TextareaProps extends AriaTextAreaProps, VariantProps<typeof textareaVariants> {
|
|
7
7
|
}
|
|
8
8
|
export declare function Textarea({ className, size, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
|