@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":"index-bar.d.ts","sourceRoot":"","sources":["../../src/components/index-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index-bar.d.ts","sourceRoot":"","sources":["../../src/components/index-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,aAAa,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAiBzH,eAAO,MAAM,EAAE,UAAyC,CAAC;AAEzD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1C,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,WAA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AAQ,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,KAAyB,EACxF,OAAmB,EAAE,IAAc,EAAE,KAAK,EAAE,YAAmB,EAAE,SAAS,EAAE,KAAK,GAClF,EAAE,aAAa,CAAC,CAAC,CAAC,2CAoKlB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { InputProps as AriaInputProps } from 'react-aria-components';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
export declare const inputVariants: (props?: ({
|
|
4
4
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
5
|
-
} & import(
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
export interface InputProps extends Omit<AriaInputProps, 'size'>, VariantProps<typeof inputVariants> {
|
|
7
7
|
}
|
|
8
8
|
export declare function Input({ className, size, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/components/kbd.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
2
|
import { Keyboard } from 'react-aria-components';
|
|
3
3
|
export declare function Kbd({ className, ...props }: ComponentProps<typeof Keyboard>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare function KbdGroup({ className, ...props }: ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { LabelProps as AriaLabelProps } from 'react-aria-components';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
export declare const labelVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "field" | null | undefined;
|
|
5
|
-
} & import(
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
export interface LabelProps extends AriaLabelProps, VariantProps<typeof labelVariants> {
|
|
7
7
|
}
|
|
8
8
|
export declare function Label({ className, variant, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Header,
|
|
3
|
-
import {
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { Header, ListBoxProps as AriaListBoxProps, ListBoxItemProps as AriaListBoxItemProps, ListBoxSectionProps as AriaListBoxSectionProps } from 'react-aria-components';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
export declare const listBoxVariants: (props?: ({
|
|
5
5
|
variant?: "inset" | "popup" | null | undefined;
|
|
6
|
-
} & import(
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export declare const listBoxItemVariants: (props?: ({
|
|
8
8
|
variant?: "inset" | "popup" | null | undefined;
|
|
9
|
-
} & import(
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
10
|
type ListBoxVariant = NonNullable<VariantProps<typeof listBoxVariants>['variant']>;
|
|
11
11
|
export interface ListBoxProps<T> extends AriaListBoxProps<T>, VariantProps<typeof listBoxVariants> {
|
|
12
12
|
/** Tick on selection change (default true). Select / ComboBox tick themselves and turn this off. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import { ListRow } from './list';
|
|
3
3
|
declare const meta: Meta<typeof ListRow>;
|
|
4
4
|
export default meta;
|
|
@@ -9,4 +9,13 @@ export declare const Chevron: Story;
|
|
|
9
9
|
export declare const Check: Story;
|
|
10
10
|
export declare const SwipeToDelete: Story;
|
|
11
11
|
export declare const EditMode: Story;
|
|
12
|
+
/** `leadingActions` / `trailingActions`: index 0 is the outermost button, the one a full swipe triggers. */
|
|
13
|
+
export declare const SwipeActions: Story;
|
|
14
|
+
/** The trailing actions revealed from the keyboard (focus the row, press →). */
|
|
15
|
+
export declare const SwipeActionsRevealed: Story;
|
|
16
|
+
export declare const SwipeActionsRevealedDark: Story;
|
|
17
|
+
/** A Switch, Slider or Button in `accessory` (or `trailing`) never lands inside a <button>: without `onPress`
|
|
18
|
+
* the row renders a plain container, and with it the press target sits beneath the content. */
|
|
19
|
+
export declare const WithControls: Story;
|
|
20
|
+
export declare const WithControlsDark: Story;
|
|
12
21
|
//# sourceMappingURL=list-row.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-row.stories.d.ts","sourceRoot":"","sources":["../../src/components/list-row.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"list-row.stories.d.ts","sourceRoot":"","sources":["../../src/components/list-row.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAOjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAQ9B,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAEtC,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAWhC,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAYnB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAkB3B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAkBtB,CAAC;AA0CF,4GAA4G;AAC5G,eAAO,MAAM,YAAY,EAAE,KAAsC,CAAC;AAElE,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,EAAE,KAOlC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAA+D,CAAC;AAyBvG;gGACgG;AAChG,eAAO,MAAM,YAAY,EAAE,KAAyC,CAAC;AACrE,eAAO,MAAM,gBAAgB,EAAE,KAAqE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
export interface ListProps {
|
|
3
3
|
children?: ReactNode;
|
|
4
4
|
inset?: boolean;
|
|
@@ -15,22 +15,53 @@ export interface ListSectionProps {
|
|
|
15
15
|
sticky?: boolean;
|
|
16
16
|
innerRef?: (el: HTMLDivElement | null) => void;
|
|
17
17
|
stickyTop?: number;
|
|
18
|
+
/** Rows spring in on insert, collapse out on remove, and slide to their new place on reorder. Children must
|
|
19
|
+
* be keyed. Implied by `onReorder`. */
|
|
20
|
+
animate?: boolean;
|
|
21
|
+
/** Drag-to-reorder: every row shows a grip (drag it, or focus it and press ↑/↓). Called once per drop with
|
|
22
|
+
* the row's old and new index; reorder your data to match. Pass it only while reordering is allowed
|
|
23
|
+
* (say, in edit mode). */
|
|
24
|
+
onReorder?: (from: number, to: number) => void;
|
|
18
25
|
className?: string;
|
|
19
26
|
style?: CSSProperties;
|
|
20
27
|
}
|
|
21
|
-
export declare function ListSection({ title, footer, children, sticky, innerRef, stickyTop, className, style }: ListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function ListSection({ title, footer, children, sticky, innerRef, stickyTop, animate: anim, onReorder, className, style, }: ListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
/** A swipe action. In `leadingActions` / `trailingActions`, index 0 is the outermost button (nearest the screen
|
|
30
|
+
* edge) — the one a full swipe triggers. */
|
|
31
|
+
export interface ListRowAction {
|
|
32
|
+
label: string;
|
|
33
|
+
/** An icon name from the kit's set (`trash`, `mail`, `starF`, …) or any node; drawn above the label. */
|
|
34
|
+
icon?: string | ReactNode;
|
|
35
|
+
/** Background color (any CSS color). Default: red when destructive, else the tint. */
|
|
36
|
+
tint?: string;
|
|
37
|
+
/** Destructive actions slide the row away and collapse it before `onAction` runs (swipe to delete). */
|
|
38
|
+
destructive?: boolean;
|
|
39
|
+
onAction: () => void;
|
|
40
|
+
}
|
|
22
41
|
export interface ListRowProps {
|
|
23
42
|
title?: ReactNode;
|
|
24
43
|
subtitle?: ReactNode;
|
|
25
44
|
leading?: ReactNode;
|
|
45
|
+
/** Display content before the accessory (a value, a badge). Controls placed here work too. */
|
|
26
46
|
trailing?: ReactNode;
|
|
27
|
-
|
|
47
|
+
/** `chevron` / `check`, or a control (Switch, Slider, Button). A control makes the row a plain container. */
|
|
48
|
+
accessory?: 'chevron' | 'check' | ReactNode;
|
|
28
49
|
checked?: boolean;
|
|
29
50
|
selected?: boolean;
|
|
30
51
|
/** When defined (true/false), the row is in edit mode and reserves/animates the checkmark gutter. */
|
|
31
52
|
edit?: boolean;
|
|
53
|
+
/** Makes the row a button. Without it the row is a plain container. */
|
|
32
54
|
onPress?: () => void;
|
|
55
|
+
/** Shorthand for a destructive trailing "Delete" action (kept outermost). */
|
|
33
56
|
onDelete?: () => void;
|
|
57
|
+
/** Revealed by swiping right. */
|
|
58
|
+
leadingActions?: ListRowAction[];
|
|
59
|
+
/** Revealed by swiping left. */
|
|
60
|
+
trailingActions?: ListRowAction[];
|
|
61
|
+
/** A long swipe triggers the outermost action. Default `true` (both sides). */
|
|
62
|
+
fullSwipe?: boolean | 'leading' | 'trailing';
|
|
63
|
+
/** Without `onPress`, pressing the row toggles the switch/checkbox inside it. Default true. */
|
|
64
|
+
labelToggles?: boolean;
|
|
34
65
|
divider?: boolean;
|
|
35
66
|
center?: boolean;
|
|
36
67
|
destructive?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/components/list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":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ACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAoBD,wBAAgB,OAAO,CAAC,CAAC,EAAE,YAAY,2CAqStC;AAED,2GAA2G;AAC3G,eAAO,MAAM,IAAI;;;CAAkE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import { List } from './list';
|
|
3
3
|
declare const meta: Meta<typeof List>;
|
|
4
4
|
export default meta;
|
|
@@ -13,11 +13,15 @@ export declare const InsetGrouped: Story;
|
|
|
13
13
|
/** List `header` prop: the list measures its own header and keeps it sticky under whatever chrome is above,
|
|
14
14
|
* offsetting section headers below it. */
|
|
15
15
|
export declare const StickySearchHeader: Story;
|
|
16
|
-
/** Drag a row left: past 55% width commits (medium tick)
|
|
16
|
+
/** Drag a row left: past 55% width commits (medium tick); a slower release past half the action width parks Delete open. */
|
|
17
17
|
export declare const SwipeToDelete: Story;
|
|
18
18
|
/** Edit mode: rows animate open a check gutter; the EditBar drives bulk favorite / delete. */
|
|
19
19
|
export declare const EditModeWithEditBar: Story;
|
|
20
20
|
/** Empty state: no sections, centered "No results" message (search for anything to reproduce live). */
|
|
21
21
|
export declare const EmptyState: Story;
|
|
22
22
|
export declare const WithFooter: Story;
|
|
23
|
+
/** `List.Section animate`: keyed rows spring in, collapse out and slide on reorder. `onReorder` adds a grip to
|
|
24
|
+
* every row — drag it (a selection tick per slot) or focus it and press ↑/↓. */
|
|
25
|
+
export declare const AnimatedReorder: Story;
|
|
26
|
+
export declare const AnimatedReorderDark: Story;
|
|
23
27
|
//# sourceMappingURL=list.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.stories.d.ts","sourceRoot":"","sources":["../../src/components/list.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,C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UAAU,EAAE,KAkBxB,CAAC;AAqCF;iFACiF;AACjF,eAAO,MAAM,eAAe,EAAE,KAAgE,CAAC;AAC/F,eAAO,MAAM,mBAAmB,EAAE,KAAqE,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { GitbookEditorProps } from '@brett_lamy/docstream-editor/editor';
|
|
2
|
+
import { EditorAttachment } from '@brett_lamy/docstream-editor';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
1
4
|
import * as React from 'react';
|
|
2
|
-
import { type GitbookEditorProps } from '@brett_lamy/docstream-editor/editor';
|
|
3
|
-
import type { EditorAttachment } from '@brett_lamy/docstream-editor';
|
|
4
|
-
import '@brett_lamy/docstream-editor/styles.css';
|
|
5
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
6
5
|
/** The TipTap editor instance behind a MarkdownEditor. */
|
|
7
6
|
export type MarkdownEditorInstance = NonNullable<Parameters<NonNullable<GitbookEditorProps['onEditorReady']>>[0]>;
|
|
8
7
|
export type MarkdownEditorAttachment = EditorAttachment;
|
|
@@ -13,7 +12,7 @@ export declare function insertMarkdown(editor: MarkdownEditorInstance, markdown:
|
|
|
13
12
|
export declare const markdownEditorVariants: (props?: ({
|
|
14
13
|
variant?: "card" | "default" | "ghost" | null | undefined;
|
|
15
14
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
16
|
-
} & import(
|
|
15
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
17
16
|
/** What a MarkdownEditor ref exposes: the editor's commands plus Markdown-level helpers. */
|
|
18
17
|
export interface MarkdownEditorHandle {
|
|
19
18
|
/** The TipTap editor (null until mounted). */
|
|
@@ -33,6 +32,37 @@ export interface MarkdownEditorHandle {
|
|
|
33
32
|
clear: () => void;
|
|
34
33
|
isEmpty: () => boolean;
|
|
35
34
|
}
|
|
35
|
+
/** Classes for the parts of the document, so a host restyles the editor with ordinary utilities (the editor's
|
|
36
|
+
stylesheet is layered under them; no `!important`). Applied to the live DOM and kept on it as you type. */
|
|
37
|
+
export interface MarkdownEditorClassNames {
|
|
38
|
+
/** The editor surface (the flex column holding the toolbar and the writing area). */
|
|
39
|
+
editor?: string;
|
|
40
|
+
/** The writing area (the contenteditable). Same as `contentClassName`. */
|
|
41
|
+
content?: string;
|
|
42
|
+
/** The first block, whatever it is — a Notes-style title line. */
|
|
43
|
+
title?: string;
|
|
44
|
+
/** Headings (h1–h6) after the first block. */
|
|
45
|
+
heading?: string;
|
|
46
|
+
paragraph?: string;
|
|
47
|
+
/** Bulleted and numbered lists (not checklists). */
|
|
48
|
+
list?: string;
|
|
49
|
+
/** A checklist (`- [ ]` task list). */
|
|
50
|
+
checklist?: string;
|
|
51
|
+
/** One checklist row. Checked rows also carry `data-checked="true"`. */
|
|
52
|
+
checklistItem?: string;
|
|
53
|
+
/** A checklist row's checkbox (`<input type="checkbox">`). */
|
|
54
|
+
checkbox?: string;
|
|
55
|
+
table?: string;
|
|
56
|
+
/** Header cells (`th`). */
|
|
57
|
+
tableHeader?: string;
|
|
58
|
+
/** Body cells (`td`). */
|
|
59
|
+
tableCell?: string;
|
|
60
|
+
blockquote?: string;
|
|
61
|
+
codeBlock?: string;
|
|
62
|
+
link?: string;
|
|
63
|
+
/** The formatting toolbar (`toolbar`). */
|
|
64
|
+
toolbar?: string;
|
|
65
|
+
}
|
|
36
66
|
export interface MarkdownEditorProps extends VariantProps<typeof markdownEditorVariants> {
|
|
37
67
|
/** Markdown (controlled). */
|
|
38
68
|
value?: string;
|
|
@@ -87,6 +117,10 @@ export interface MarkdownEditorProps extends VariantProps<typeof markdownEditorV
|
|
|
87
117
|
'aria-labelledby'?: string;
|
|
88
118
|
'aria-describedby'?: string;
|
|
89
119
|
className?: string;
|
|
120
|
+
/** Classes for the writing area (the contenteditable) — shorthand for `classNames.content`. */
|
|
121
|
+
contentClassName?: string;
|
|
122
|
+
/** Classes for parts of the document: title line, headings, checklists and their checkboxes, tables, … */
|
|
123
|
+
classNames?: MarkdownEditorClassNames;
|
|
90
124
|
style?: React.CSSProperties;
|
|
91
125
|
}
|
|
92
126
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-editor.d.ts","sourceRoot":"","sources":["../../src/components/markdown-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,OAAO,
|
|
1
|
+
{"version":3,"file":"markdown-editor.d.ts","sourceRoot":"","sources":["../../src/components/markdown-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAYlE,0DAA0D;AAC1D,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClH,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAgBxD,yGAAyG;AACzG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,qGAAqG;AACrG,wBAAgB,cAAc,CAAC,MAAM,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAKxF;AAED,eAAO,MAAM,sBAAsB;;;8EAyBlC,CAAC;AAEF,4FAA4F;AAC5F,MAAM,WAAW,oBAAoB;IACnC,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC/C,qFAAqF;IACrF,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C;IAC7C,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAClE,kEAAkE;IAClE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC;IAC9C,yEAAyE;IACzE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,KAAK,IAAI,CAAC;IAChE,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+FAA+F;IAC/F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0GAA0G;IAC1G,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAiCD;;;GAGG;AACH,eAAO,MAAM,cAAc,kGAyOzB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import { MarkdownEditor } from './markdown-editor';
|
|
3
3
|
declare const meta: Meta<typeof MarkdownEditor>;
|
|
4
4
|
export default meta;
|
|
@@ -11,4 +11,7 @@ export declare const ReadOnly: Story;
|
|
|
11
11
|
export declare const WithToolbar: Story;
|
|
12
12
|
export declare const InCard: Story;
|
|
13
13
|
export declare const Controlled: Story;
|
|
14
|
+
/** `classNames` restyles the document's parts with plain utilities — here a Notes-like title line, round checklist
|
|
15
|
+
circles and hairline tables. The editor's stylesheet is layered under utilities, so no `!important`. */
|
|
16
|
+
export declare const StyledParts: Story;
|
|
14
17
|
//# sourceMappingURL=markdown-editor.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-editor.stories.d.ts","sourceRoot":"","sources":["../../src/components/markdown-editor.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAiC,MAAM,mBAAmB,CAAC;AAGlF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAUrC,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAmB7C,eAAO,MAAM,OAAO,EAAE,KAA2C,CAAC;AAiBlE,eAAO,MAAM,KAAK,EAAE,KAAgC,CAAC;AACrD,eAAO,MAAM,IAAI,EAAE,KAA4D,CAAC;AAwBhF,eAAO,MAAM,UAAU,EAAE,KAA4C,CAAC;AAEtE,eAAO,MAAM,QAAQ,EAAE,KAA0F,CAAC;AAElH,eAAO,MAAM,WAAW,EAAE,KAA4F,CAAC;AAEvH,eAAO,MAAM,MAAM,EAAE,KAEpB,CAAC;AAeF,eAAO,MAAM,UAAU,EAAE,KAA4C,CAAC"}
|
|
1
|
+
{"version":3,"file":"markdown-editor.stories.d.ts","sourceRoot":"","sources":["../../src/components/markdown-editor.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAiC,MAAM,mBAAmB,CAAC;AAGlF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAUrC,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAmB7C,eAAO,MAAM,OAAO,EAAE,KAA2C,CAAC;AAiBlE,eAAO,MAAM,KAAK,EAAE,KAAgC,CAAC;AACrD,eAAO,MAAM,IAAI,EAAE,KAA4D,CAAC;AAwBhF,eAAO,MAAM,UAAU,EAAE,KAA4C,CAAC;AAEtE,eAAO,MAAM,QAAQ,EAAE,KAA0F,CAAC;AAElH,eAAO,MAAM,WAAW,EAAE,KAA4F,CAAC;AAEvH,eAAO,MAAM,MAAM,EAAE,KAEpB,CAAC;AAeF,eAAO,MAAM,UAAU,EAAE,KAA4C,CAAC;AAatE;2GAC2G;AAC3G,eAAO,MAAM,WAAW,EAAE,KAezB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { Transition } from 'framer-motion';
|
|
3
|
+
import { SpringName } from '../lib/motion';
|
|
4
|
+
export interface MorphGroupProps {
|
|
5
|
+
/** Scope for the ids inside (defaults to a unique id per group). */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Spring preset for every morph in the group (default `smooth`). */
|
|
8
|
+
spring?: SpringName;
|
|
9
|
+
/** A custom framer-motion transition (overrides `spring`). */
|
|
10
|
+
transition?: Transition;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function MorphGroup({ id, spring, transition, children }: MorphGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
type MorphTag = 'div' | 'section' | 'article' | 'aside' | 'span' | 'li' | 'button' | 'a' | 'img' | 'figure' | 'header' | 'nav';
|
|
15
|
+
export interface MorphProps {
|
|
16
|
+
/** The shared identity: the same id in both layouts. */
|
|
17
|
+
id: string;
|
|
18
|
+
/** Corner radius for this layout (px). Animated with the frame and kept undistorted while it scales. */
|
|
19
|
+
radius?: number;
|
|
20
|
+
/** Element to render (default `div`). */
|
|
21
|
+
as?: MorphTag;
|
|
22
|
+
/** Follow a downward drag and dismiss past `dismissDistance` or on a flick. */
|
|
23
|
+
dragToDismiss?: boolean;
|
|
24
|
+
/** Called when a drag-to-dismiss completes (or pass `onDismiss` alone and wire your own close button). */
|
|
25
|
+
onDismiss?: () => void;
|
|
26
|
+
/** Distance in px past which a released drag dismisses (default 120). */
|
|
27
|
+
dismissDistance?: number;
|
|
28
|
+
/** How the frame animates: `true` (position and size, the default) or `position` (only moves; for text that
|
|
29
|
+
would stretch). */
|
|
30
|
+
layout?: true | 'position' | 'size';
|
|
31
|
+
/** Fade in on mount and out on unmount (inside `MorphPresence`), for an element that has no partner in the
|
|
32
|
+
other layout. Leave off (the default) for shared elements — they morph rather than fade. */
|
|
33
|
+
fade?: boolean;
|
|
34
|
+
className?: string;
|
|
35
|
+
style?: CSSProperties;
|
|
36
|
+
children?: ReactNode;
|
|
37
|
+
onClick?: (e: MouseEvent) => void;
|
|
38
|
+
/** Extra DOM attributes (aria-*, data-*, role, href, src, alt, type …). */
|
|
39
|
+
[attr: `aria-${string}` | `data-${string}`]: unknown;
|
|
40
|
+
role?: string;
|
|
41
|
+
href?: string;
|
|
42
|
+
src?: string;
|
|
43
|
+
alt?: string;
|
|
44
|
+
type?: 'button' | 'submit' | 'reset';
|
|
45
|
+
tabIndex?: number;
|
|
46
|
+
title?: string;
|
|
47
|
+
}
|
|
48
|
+
/** An element that morphs between its layouts. Use inside a `<MorphGroup>`. */
|
|
49
|
+
export declare const Morph: import('react').ForwardRefExoticComponent<MorphProps & import('react').RefAttributes<HTMLElement>>;
|
|
50
|
+
export interface MorphPresenceProps {
|
|
51
|
+
children?: ReactNode;
|
|
52
|
+
/** `popLayout` (default) lets the leaving layout get out of the way of the arriving one. */
|
|
53
|
+
mode?: 'sync' | 'wait' | 'popLayout';
|
|
54
|
+
}
|
|
55
|
+
/** Wrap conditionally rendered Morph content so parts without a partner (the full player's controls) can fade out
|
|
56
|
+
as the morph runs, instead of vanishing. Optional: a plain swap already morphs the shared elements. */
|
|
57
|
+
export declare function MorphPresence({ children, mode }: MorphPresenceProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
/** The group's transition (for your own motion elements that should move with the morph). */
|
|
59
|
+
export declare function useMorphTransition(): Transition;
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=morph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph.d.ts","sourceRoot":"","sources":["../../src/components/morph.tsx"],"names":[],"mappings":"AAAA,OAAO,EACmD,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAC5G,MAAM,OAAO,CAAC;AACf,OAAO,EAC+E,KAAK,UAAU,EACpG,MAAM,eAAe,CAAC;AACvB,OAAO,EAAW,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAwBzD,MAAM,WAAW,eAAe;IAC9B,oEAAoE;IACpE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAID,wBAAgB,UAAU,CAAC,EAAE,EAAE,EAAE,MAAiB,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAc1F;AAED,KAAK,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,QAAQ,GAAG,GAAG,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE/H,MAAM,WAAW,UAAU;IACzB,wDAAwD;IACxD,EAAE,EAAE,MAAM,CAAC;IACX,wGAAwG;IACxG,MAAM,CAAC,EAA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,kBAAkB,IAAI,UAAU,CAI/C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { MorphGroup } from './morph';
|
|
3
|
+
declare const meta: Meta<typeof MorphGroup>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof MorphGroup>;
|
|
6
|
+
/** Tap the mini player: the bar grows into the full player and the artwork flies to its slot. Drag the full player
|
|
7
|
+
down (or tap the grabber) and it folds back. */
|
|
8
|
+
export declare const MiniToFull: Story;
|
|
9
|
+
/** The expanded state (for review). */
|
|
10
|
+
export declare const Expanded: Story;
|
|
11
|
+
export declare const Dark: Story;
|
|
12
|
+
/** A grid of cards; each opens into a sheet and closes back into its cell. */
|
|
13
|
+
export declare const CardToSheet: Story;
|
|
14
|
+
//# sourceMappingURL=morph.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph.stories.d.ts","sourceRoot":"","sources":["../../src/components/morph.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAS,UAAU,EAAiB,MAAM,SAAS,CAAC;AAM3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAGjC,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAuDzC;mDACmD;AACnD,eAAO,MAAM,UAAU,EAAE,KAAoC,CAAC;AAE9D,uCAAuC;AACvC,eAAO,MAAM,QAAQ,EAAE,KAA4C,CAAC;AAEpE,eAAO,MAAM,IAAI,EAAE,KAAyC,CAAC;AA2B7D,8EAA8E;AAC9E,eAAO,MAAM,WAAW,EAAE,KAAmC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
/** Screen descriptor consumed by NavigationStack. */
|
|
3
3
|
export interface Screen {
|
|
4
4
|
key: string;
|
|
@@ -20,10 +20,16 @@ interface NavHandle {
|
|
|
20
20
|
pop: () => void;
|
|
21
21
|
canPop: boolean;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
/** Elements a screen hands the stack: its root and dimmer (edge swipe), and its titles (header morph). */
|
|
24
|
+
interface ScreenParts {
|
|
24
25
|
el?: HTMLDivElement | null;
|
|
25
26
|
dim?: HTMLDivElement | null;
|
|
26
|
-
|
|
27
|
+
large?: HTMLElement | null;
|
|
28
|
+
inline?: HTMLElement | null;
|
|
29
|
+
back?: HTMLElement | null;
|
|
30
|
+
scroller?: HTMLElement | null;
|
|
31
|
+
}
|
|
32
|
+
type Reg = (key: string, part: ScreenParts) => void;
|
|
27
33
|
export interface ScreenWrapProps {
|
|
28
34
|
sc: Screen;
|
|
29
35
|
depth: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-stack.d.ts","sourceRoot":"","sources":["../../src/components/navigation-stack.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAAE,KAAK,SAAS,EACnC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"navigation-stack.d.ts","sourceRoot":"","sources":["../../src/components/navigation-stack.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAAE,KAAK,SAAS,EACnC,MAAM,OAAO,CAAC;AAUf,qDAAqD;AACrD,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAA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AAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,eAAe,2CA0L9G;AA4FD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,oBAAoB,2CAmJ1G"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import { NavigationStack } from './navigation-stack';
|
|
3
3
|
declare const meta: Meta<typeof NavigationStack>;
|
|
4
4
|
export default meta;
|
|
@@ -17,4 +17,15 @@ export declare const ChromeHideDisabled: Story;
|
|
|
17
17
|
/** Dynamic Island + chrome hide: the bar collapses to the safe-area strip and no further —
|
|
18
18
|
* the opaque under-island strip never goes away. */
|
|
19
19
|
export declare const ChromeHideWithSafeTop: Story;
|
|
20
|
+
/** Push Settings → General → About: the large title flies into the next screen's back button, and an inline
|
|
21
|
+
* title does the same one level down; popping (button, Esc or edge swipe) flies the label back into place.
|
|
22
|
+
* The edge swipe scrubs the morph with the finger. */
|
|
23
|
+
export declare const HeaderTitleMorph: Story;
|
|
24
|
+
/** The back label is the previous screen's title when it fits beside the centered title… */
|
|
25
|
+
export declare const BackLabelFits: Story;
|
|
26
|
+
/** …ellipsized when it doesn't (measured, not a character count)… */
|
|
27
|
+
export declare const BackLabelTruncated: Story;
|
|
28
|
+
/** …"Back" when only a sliver is left, and just the chevron when "Back" doesn't fit either. */
|
|
29
|
+
export declare const BackLabelFallback: Story;
|
|
30
|
+
export declare const BackLabelTruncatedDark: Story;
|
|
20
31
|
//# sourceMappingURL=navigation-stack.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-stack.stories.d.ts","sourceRoot":"","sources":["../../src/components/navigation-stack.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,eAAe,EAAe,MAAM,oBAAoB,CAAC;AAIlE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAItC,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AA6C9C,eAAO,MAAM,OAAO,EAAE,KAAkC,CAAC;AACzD,eAAO,MAAM,iBAAiB,EAAE,KAA8C,CAAC;AAC/E,eAAO,MAAM,WAAW,EAAE,KAA0C,CAAC;AAarE;2EAC2E;AAC3E,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC;AAEF;yFACyF;AACzF,eAAO,MAAM,kBAAkB,EAAE,KAgBhC,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC;AAEF;qDACqD;AACrD,eAAO,MAAM,qBAAqB,EAAE,KAOnC,CAAC"}
|
|
1
|
+
{"version":3,"file":"navigation-stack.stories.d.ts","sourceRoot":"","sources":["../../src/components/navigation-stack.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,eAAe,EAAe,MAAM,oBAAoB,CAAC;AAIlE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAItC,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AA6C9C,eAAO,MAAM,OAAO,EAAE,KAAkC,CAAC;AACzD,eAAO,MAAM,iBAAiB,EAAE,KAA8C,CAAC;AAC/E,eAAO,MAAM,WAAW,EAAE,KAA0C,CAAC;AAarE;2EAC2E;AAC3E,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC;AAEF;yFACyF;AACzF,eAAO,MAAM,kBAAkB,EAAE,KAgBhC,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC;AAEF;qDACqD;AACrD,eAAO,MAAM,qBAAqB,EAAE,KAOnC,CAAC;AAeF;;uDAEuD;AACvD,eAAO,MAAM,gBAAgB,EAAE,KAe9B,CAAC;AAWF,4FAA4F;AAC5F,eAAO,MAAM,aAAa,EAAE,KAAkE,CAAC;AAC/F,qEAAqE;AACrE,eAAO,MAAM,kBAAkB,EAAE,KAA2F,CAAC;AAC7H,+FAA+F;AAC/F,eAAO,MAAM,iBAAiB,EAAE,KAE/B,CAAC;AACF,eAAO,MAAM,sBAAsB,EAAE,KAGpC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface NowPlayingBarsProps {
|
|
3
|
+
/** Bouncing (true) or still (false). */
|
|
4
|
+
playing?: boolean;
|
|
5
|
+
/** Number of bars (default 4). */
|
|
6
|
+
bars?: number;
|
|
7
|
+
/** Height in px (default 14). Bar width and gap scale with it unless set. */
|
|
8
|
+
size?: number;
|
|
9
|
+
/** Bar width in px. */
|
|
10
|
+
barWidth?: number;
|
|
11
|
+
/** Gap between bars in px. */
|
|
12
|
+
gap?: number;
|
|
13
|
+
/** Seconds for one bounce of the first bar (default 0.7); the others run a little slower. */
|
|
14
|
+
speed?: number;
|
|
15
|
+
/** Accessible label; omit to hide it from assistive tech (the row usually says "Now playing" itself). */
|
|
16
|
+
'aria-label'?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
export declare function NowPlayingBars({ playing, bars, size, barWidth, gap, speed, className, style, 'aria-label': label, }: NowPlayingBarsProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=now-playing-bars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"now-playing-bars.d.ts","sourceRoot":"","sources":["../../src/components/now-playing-bars.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAS3C,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6FAA6F;IAC7F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yGAAyG;IACzG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAKD,wBAAgB,cAAc,CAAC,EAC7B,OAAc,EAAE,IAAQ,EAAE,IAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAW,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,GACvG,EAAE,mBAAmB,2CA2BrB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { NowPlayingBars } from './now-playing-bars';
|
|
3
|
+
declare const meta: Meta<typeof NowPlayingBars>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof NowPlayingBars>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
/** Tap a row to play it; tap again to pause (the bars settle). */
|
|
8
|
+
export declare const InATrackList: Story;
|
|
9
|
+
export declare const Variants: Story;
|
|
10
|
+
export declare const Dark: Story;
|
|
11
|
+
export declare const Interactive: Story;
|
|
12
|
+
//# sourceMappingURL=now-playing-bars.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"now-playing-bars.stories.d.ts","sourceRoot":"","sources":["../../src/components/now-playing-bars.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAKrC,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAE7C,eAAO,MAAM,OAAO,EAAE,KAAmF,CAAC;AAsB1G,kEAAkE;AAClE,eAAO,MAAM,YAAY,EAAE,KAAuC,CAAC;AAmBnE,eAAO,MAAM,QAAQ,EAAE,KAAkC,CAAC;AAC1D,eAAO,MAAM,IAAI,EAAE,KAA0F,CAAC;AAW9G,eAAO,MAAM,WAAW,EAAE,KAAoC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { PencilStroke, PencilTool } from '../../lib/pencilkit/constants';
|
|
1
2
|
import * as React from 'react';
|
|
2
|
-
import { type PencilStroke, type PencilTool } from '../../lib/pencilkit/constants';
|
|
3
3
|
export type PencilStrokesChangeSource = 'draw' | 'erase';
|
|
4
4
|
export interface PencilCanvasProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
5
5
|
/** Active tool. Default 'pen'. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { PencilTool, PKIconName } from '../../lib/pencilkit/constants';
|
|
2
|
+
import { ButtonProps } from '../../lib/workbench/press';
|
|
1
3
|
import * as React from 'react';
|
|
2
|
-
import { type PencilTool, type PKIconName } from '../../lib/pencilkit/constants';
|
|
3
|
-
import { type ButtonProps } from '../../lib/workbench/press';
|
|
4
4
|
/** The 38×34 icon button: tinted while `active` (or selected, inside a picker), dimmed while disabled. */
|
|
5
5
|
export declare const pencilToolButtonVariants: (props?: ({
|
|
6
6
|
active?: boolean | null | undefined;
|
|
7
|
-
} & import(
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
export interface PencilToolButtonProps extends Omit<ButtonProps, 'children'> {
|
|
9
9
|
name: PKIconName;
|
|
10
10
|
active?: boolean;
|
|
@@ -15,7 +15,10 @@ export interface PencilToolButtonProps extends Omit<ButtonProps, 'children'> {
|
|
|
15
15
|
/** The 38×34 icon button used across the PencilKit toolbar (react-aria Button; use `onPress`). */
|
|
16
16
|
export declare function PencilToolButton({ name, active, label, disabled, isDisabled, className, ...rest }: PencilToolButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export type PencilToolbarProps = React.HTMLAttributes<HTMLDivElement>;
|
|
18
|
-
/** Floating toolbar card, absolutely positioned bottom-center of the canvas.
|
|
18
|
+
/** Floating toolbar card, absolutely positioned bottom-center of the canvas. Its groups sit on one row; when
|
|
19
|
+
* they don't fit (a phone), the pickers scroll sideways — edges fade where more tools are hidden — while
|
|
20
|
+
* PencilActions (undo / redo / clear) stays pinned at the trailing end, instead of everything wrapping into a
|
|
21
|
+
* ragged second line. Where everything fits it is the plain, centered card. */
|
|
19
22
|
export declare function PencilToolbar({ className, style, children, ...rest }: PencilToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
20
23
|
/** Vertical hairline divider between toolbar groups. */
|
|
21
24
|
export declare function PencilToolbarDivider({ className, style, ...rest }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|