@aircall/ds 0.49.0 → 0.50.2
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/{data-table-B3ahtFLP.js → data-table-AX0Mgu6K.js} +5 -0
- package/dist/{data-table-BgeS8KWP.d.ts → data-table-B5VqWPmw.d.ts} +3 -4
- package/dist/data-table.d.ts +1 -1
- package/dist/data-table.js +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.d.ts +53 -16
- package/dist/index.js +113 -20
- package/package.json +2 -2
- package/skills/aircall-ds/migrate-audio-player/SKILL.md +14 -3
- package/skills/aircall-ds/migrate-icons/SKILL.md +45 -16
- package/skills/aircall-ds/migrate-tractor/SKILL.md +34 -31
- package/skills/aircall-ds/migrate-tractor/accordion/SKILL.md +25 -15
- package/skills/aircall-ds/migrate-tractor/alert/SKILL.md +107 -20
- package/skills/aircall-ds/migrate-tractor/avatar/SKILL.md +57 -26
- package/skills/aircall-ds/migrate-tractor/badge/SKILL.md +71 -25
- package/skills/aircall-ds/migrate-tractor/button/SKILL.md +68 -32
- package/skills/aircall-ds/migrate-tractor/card/SKILL.md +62 -42
- package/skills/aircall-ds/migrate-tractor/combobox/SKILL.md +233 -149
- package/skills/aircall-ds/migrate-tractor/data-table/SKILL.md +102 -108
- package/skills/aircall-ds/migrate-tractor/data-table/references/column-widths-and-pinning.md +50 -0
- package/skills/aircall-ds/migrate-tractor/data-table/references/infinite-scroll.md +51 -0
- package/skills/aircall-ds/migrate-tractor/data-table/references/row-actions.md +34 -0
- package/skills/aircall-ds/migrate-tractor/date-picker/SKILL.md +100 -47
- package/skills/aircall-ds/migrate-tractor/dialog/SKILL.md +115 -20
- package/skills/aircall-ds/migrate-tractor/dropdown-menu/SKILL.md +135 -57
- package/skills/aircall-ds/migrate-tractor/dropzone/SKILL.md +2 -0
- package/skills/aircall-ds/migrate-tractor/form-and-field/SKILL.md +111 -49
- package/skills/aircall-ds/migrate-tractor/gauge/SKILL.md +6 -4
- package/skills/aircall-ds/migrate-tractor/input/SKILL.md +165 -59
- package/skills/aircall-ds/migrate-tractor/item/SKILL.md +85 -63
- package/skills/aircall-ds/migrate-tractor/link/SKILL.md +85 -68
- package/skills/aircall-ds/migrate-tractor/popover/SKILL.md +115 -74
- package/skills/aircall-ds/migrate-tractor/select/SKILL.md +117 -64
- package/skills/aircall-ds/migrate-tractor/sheet-vs-drawer/SKILL.md +55 -32
- package/skills/aircall-ds/migrate-tractor/skeleton/SKILL.md +40 -11
- package/skills/aircall-ds/migrate-tractor/styling/SKILL.md +11 -7
- package/skills/aircall-ds/migrate-tractor/tabs/SKILL.md +62 -55
- package/skills/aircall-ds/migrate-tractor/toast/SKILL.md +58 -12
- package/skills/aircall-ds/migrate-tractor/tooltip/SKILL.md +65 -40
- package/skills/aircall-ds/migrate-tractor/tree/SKILL.md +23 -6
- package/skills/aircall-ds/setup/SKILL.md +53 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as OnChangeFn, i as DataTableLoadingState, n as ColumnPinningState, o as SortingState, r as DataTable, s as VisibilityState, t as ColumnDef } from "./data-table-
|
|
1
|
+
import { a as OnChangeFn, i as DataTableLoadingState, n as ColumnPinningState, o as SortingState, r as DataTable, s as VisibilityState, t as ColumnDef } from "./data-table-B5VqWPmw.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
4
4
|
import { ClassValue } from "clsx";
|
|
@@ -405,7 +405,7 @@ declare function AudioPlayerBar({ className, step, playheadHeight, ...props }: A
|
|
|
405
405
|
type AudioPlayerCurrentTimeProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
406
406
|
/**
|
|
407
407
|
* Dumb span that always renders the current playback position as a formatted
|
|
408
|
-
* time string (e.g. `1:23`). Reads from the nearest `
|
|
408
|
+
* time string (e.g. `1:23`). Reads from the nearest `Audio`.
|
|
409
409
|
*
|
|
410
410
|
* @example
|
|
411
411
|
* ```tsx
|
|
@@ -438,7 +438,7 @@ declare function AudioPlayerTime({ mode, className, ...props }: AudioPlayerTimeP
|
|
|
438
438
|
type AudioPlayerDurationProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
439
439
|
/**
|
|
440
440
|
* Dumb span that always renders the total audio duration as a formatted time
|
|
441
|
-
* string (e.g. `3:45`). Reads from the nearest `
|
|
441
|
+
* string (e.g. `3:45`). Reads from the nearest `Audio`.
|
|
442
442
|
*
|
|
443
443
|
* @example
|
|
444
444
|
* ```tsx
|
|
@@ -659,7 +659,7 @@ declare namespace AlertDialogCancel {
|
|
|
659
659
|
* the icon level with the first line when the title wraps.
|
|
660
660
|
*/
|
|
661
661
|
declare const alertVariants: (props?: ({
|
|
662
|
-
variant?: "default" | "
|
|
662
|
+
variant?: "default" | "info" | "success" | "warning" | "error" | null | undefined;
|
|
663
663
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
664
664
|
/**
|
|
665
665
|
* Callout that draws attention to an important, contextual message.
|
|
@@ -995,8 +995,8 @@ declare namespace CounterBadge {
|
|
|
995
995
|
/** `cva` recipe for the Badge/Chip container — drives the `size`, `color`, and `tone` classes. */
|
|
996
996
|
declare const badgeVariants: (props?: ({
|
|
997
997
|
size?: "default" | "lg" | null | undefined;
|
|
998
|
-
color?: "
|
|
999
|
-
tone?: "dark" | "
|
|
998
|
+
color?: "charcoal" | "red" | "green" | "blue" | "purple" | "yellow" | "pink" | null | undefined;
|
|
999
|
+
tone?: "dark" | "medium-dark" | "medium-light" | "light" | null | undefined;
|
|
1000
1000
|
overflowMode?: "none" | "truncate" | null | undefined;
|
|
1001
1001
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
1002
1002
|
type BadgeVariants = VariantProps<typeof badgeVariants>;
|
|
@@ -1010,7 +1010,7 @@ type BadgeTone = NonNullable<BadgeVariants['tone']>;
|
|
|
1010
1010
|
* removable token inside an input/combobox, use `Chip`.
|
|
1011
1011
|
*
|
|
1012
1012
|
* Pick a constrained DS `color` + `tone` (no freeform hex) — defaults to
|
|
1013
|
-
* `charcoal` / `
|
|
1013
|
+
* `charcoal` / `dark` — or pass any stored hex via `customColor`. Icons are
|
|
1014
1014
|
* composed as children (auto-sized per `size`).
|
|
1015
1015
|
*
|
|
1016
1016
|
* `overflowMode` controls how content wider than the badge is handled:
|
|
@@ -1074,7 +1074,7 @@ declare namespace BadgeGroupCount {
|
|
|
1074
1074
|
* edge gets the accent border.
|
|
1075
1075
|
*/
|
|
1076
1076
|
declare const bannerVariants: (props?: ({
|
|
1077
|
-
variant?: "default" | "
|
|
1077
|
+
variant?: "default" | "info" | "success" | "warning" | "error" | null | undefined;
|
|
1078
1078
|
borderDirection?: "bottom" | "top" | null | undefined;
|
|
1079
1079
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
1080
1080
|
/**
|
|
@@ -4132,7 +4132,9 @@ declare namespace FieldLabel {
|
|
|
4132
4132
|
* ```tsx
|
|
4133
4133
|
* <FieldLabelRow>
|
|
4134
4134
|
* <FieldLabel htmlFor="taxid">Tax ID Number</FieldLabel>
|
|
4135
|
-
* <FieldLabelAside
|
|
4135
|
+
* <FieldLabelAside>
|
|
4136
|
+
* <Anchor href="/help/tax-id">Where do I find this?</Anchor>
|
|
4137
|
+
* </FieldLabelAside>
|
|
4136
4138
|
* </FieldLabelRow>
|
|
4137
4139
|
* ```
|
|
4138
4140
|
*/
|
|
@@ -5676,10 +5678,10 @@ interface RichTextareaProps {
|
|
|
5676
5678
|
*/
|
|
5677
5679
|
tags?: TagOption[] | RichTextareaAsyncList<TagOption>;
|
|
5678
5680
|
/**
|
|
5679
|
-
* Enables marks (bold/italic/underline/strikethrough/code), lists, links,
|
|
5680
|
-
* Markdown interchange. Links recognize typed/pasted URLs (autolink) and expose a
|
|
5681
|
+
* Enables marks (bold/italic/underline/strikethrough/code), lists, quotes, links,
|
|
5682
|
+
* and Markdown interchange. Links recognize typed/pasted URLs (autolink) and expose a
|
|
5681
5683
|
* floating edit/remove card on click; Cmd/Ctrl+K opens the insert form. Compose a
|
|
5682
|
-
* {@link RichTextareaToolbar} to expose the mark/list/link controls. Autolink and
|
|
5684
|
+
* {@link RichTextareaToolbar} to expose the mark/list/quote/link controls. Autolink and
|
|
5683
5685
|
* the floating link card only exist when this is on.
|
|
5684
5686
|
* @default false
|
|
5685
5687
|
*/
|
|
@@ -5814,6 +5816,40 @@ interface InputGroupRichTextareaProps extends Omit<RichTextareaProps, 'bare'> {}
|
|
|
5814
5816
|
declare namespace InputGroupRichTextarea {
|
|
5815
5817
|
type Props = InputGroupRichTextareaProps;
|
|
5816
5818
|
}
|
|
5819
|
+
/** Props for {@link MarkdownView}. */
|
|
5820
|
+
interface MarkdownViewProps {
|
|
5821
|
+
/**
|
|
5822
|
+
* The Markdown to render, as a `formatting` RichTextarea writes it (the `markdown` of
|
|
5823
|
+
* `onValueChange`). Plain text with no Markdown syntax renders as is, line breaks kept. Raw
|
|
5824
|
+
* HTML shows as text.
|
|
5825
|
+
*/
|
|
5826
|
+
value: string;
|
|
5827
|
+
/** Extra classes for the rendered content. */
|
|
5828
|
+
className?: string;
|
|
5829
|
+
/**
|
|
5830
|
+
* Test id applied to the rendered content.
|
|
5831
|
+
* @default 'markdown-view'
|
|
5832
|
+
*/
|
|
5833
|
+
'data-test'?: string;
|
|
5834
|
+
}
|
|
5835
|
+
/**
|
|
5836
|
+
* Read-only render of the Markdown a `formatting` {@link RichTextarea} writes. It uses the
|
|
5837
|
+
* same plugins and elements, so quotes, lists, marks and links look as they do in the editor.
|
|
5838
|
+
* No border, padding or toolbar: it takes the surrounding text size and color. Links open in a
|
|
5839
|
+
* new tab, and a new `value` renders again.
|
|
5840
|
+
*
|
|
5841
|
+
* It renders what the editor can write: marks, lists, quotes and links. Other Markdown is not
|
|
5842
|
+
* styled: headings and tables show as plain text, and images do not show.
|
|
5843
|
+
*
|
|
5844
|
+
* @example
|
|
5845
|
+
* ```tsx
|
|
5846
|
+
* <MarkdownView value={script} />
|
|
5847
|
+
* ```
|
|
5848
|
+
*/
|
|
5849
|
+
declare const MarkdownView: React.ForwardRefExoticComponent<MarkdownViewProps & React.RefAttributes<HTMLDivElement>>;
|
|
5850
|
+
declare namespace MarkdownView {
|
|
5851
|
+
type Props = MarkdownViewProps;
|
|
5852
|
+
}
|
|
5817
5853
|
//#endregion
|
|
5818
5854
|
//#region src/components/rich-textarea-toolbar.d.ts
|
|
5819
5855
|
/** Props for {@link RichTextareaToolbar}. */
|
|
@@ -5821,7 +5857,7 @@ interface RichTextareaToolbarProps extends React.ComponentProps<'div'> {}
|
|
|
5821
5857
|
/**
|
|
5822
5858
|
* Formatting toolbar for a {@link RichTextareaRoot} with `formatting`. Renders DS
|
|
5823
5859
|
* `Toggle`s wired to the editor: bold / italic / underline / strikethrough / inline
|
|
5824
|
-
* code, bulleted / numbered lists, and a link button that opens the floating link
|
|
5860
|
+
* code, bulleted / numbered lists, quote, and a link button that opens the floating link
|
|
5825
5861
|
* card (the same card shown on click / Cmd+K). Must render inside a
|
|
5826
5862
|
* `RichTextareaRoot` (it reads the editor from the Plate provider) — typically in an
|
|
5827
5863
|
* `InputGroupAddon align="block-start"`.
|
|
@@ -6685,7 +6721,8 @@ declare namespace StepperContent {
|
|
|
6685
6721
|
//#region src/components/switch.d.ts
|
|
6686
6722
|
/**
|
|
6687
6723
|
* A toggle switch for an on/off setting, wrapping Base UI's `Switch.Root`.
|
|
6688
|
-
* Renders a `<
|
|
6724
|
+
* Renders a `<span role="switch">` containing a sliding thumb, plus a hidden
|
|
6725
|
+
* `<input type="checkbox">` beside it for form participation.
|
|
6689
6726
|
*
|
|
6690
6727
|
* @example
|
|
6691
6728
|
* ```tsx
|
|
@@ -7005,7 +7042,7 @@ declare function useDsLocale(): string;
|
|
|
7005
7042
|
//#endregion
|
|
7006
7043
|
//#region src/i18n/keys.d.ts
|
|
7007
7044
|
/** All translation keys owned by the `ds` namespace. Flat dotted keys (keySeparator: false). */
|
|
7008
|
-
type DsI18nKey = 'spinner.loading' | 'pagination.label' | 'pagination.previousPage' | 'pagination.nextPage' | 'dataTable.selectAllRows' | 'dataTable.selectRow' | 'dataCombobox.noResults' | 'combobox.showOptions' | 'tree.collapse' | 'tree.expand' | 'multiselect.remove' | 'multiselect.clearAll' | 'multiselect.addItem' | 'multiselect.search' | 'combobox.toggleOptions' | 'combobox.clear' | 'sidebar.toggle' | 'drawer.close' | 'emojiPicker.emoji' | 'emojiPicker.choose' | 'actionBar.selectionActions' | 'pagination.previous' | 'pagination.next' | 'actionBar.clearSelection' | 'actionBar.itemsSelected' | 'actionBar.itemsSelected_plural' | 'fieldLabel.required' | 'fieldLabel.optional' | 'fieldLabel.moreInfo' | 'datePicker.beforeMin' | 'datePicker.afterMax' | 'datePicker.unavailable' | 'datePicker.rangeOrder' | 'richTextarea.noResults' | 'richTextarea.slashNoCommands' | 'richTextarea.bold' | 'richTextarea.italic' | 'richTextarea.underline' | 'richTextarea.strikethrough' | 'richTextarea.inlineCode' | 'richTextarea.bulletedList' | 'richTextarea.numberedList' | 'richTextarea.link' | 'richTextarea.linkPlaceholder' | 'richTextarea.linkText' | 'richTextarea.linkEdit' | 'richTextarea.linkOpen' | 'richTextarea.linkRemove' | 'colorPicker.trigger' | 'colorPicker.choose' | 'colorPicker.presets' | 'colorPicker.mode' | 'colorPicker.modePresets' | 'colorPicker.modeCustom' | 'colorPicker.charcoal' | 'colorPicker.green' | 'colorPicker.blue' | 'colorPicker.purple' | 'colorPicker.pink' | 'colorPicker.red' | 'colorPicker.yellow' | 'colorPicker.toneDark' | 'colorPicker.toneMediumDark' | 'colorPicker.toneMediumLight' | 'colorPicker.toneLight' | 'colorPicker.saturation' | 'colorPicker.hue' | 'colorPicker.hex' | 'colorPicker.areaValue' | 'stepper.counter';
|
|
7045
|
+
type DsI18nKey = 'spinner.loading' | 'pagination.label' | 'pagination.previousPage' | 'pagination.nextPage' | 'dataTable.selectAllRows' | 'dataTable.selectRow' | 'dataCombobox.noResults' | 'combobox.showOptions' | 'tree.collapse' | 'tree.expand' | 'multiselect.remove' | 'multiselect.clearAll' | 'multiselect.addItem' | 'multiselect.search' | 'combobox.toggleOptions' | 'combobox.clear' | 'sidebar.toggle' | 'drawer.close' | 'emojiPicker.emoji' | 'emojiPicker.choose' | 'actionBar.selectionActions' | 'pagination.previous' | 'pagination.next' | 'actionBar.clearSelection' | 'actionBar.itemsSelected' | 'actionBar.itemsSelected_plural' | 'fieldLabel.required' | 'fieldLabel.optional' | 'fieldLabel.moreInfo' | 'datePicker.beforeMin' | 'datePicker.afterMax' | 'datePicker.unavailable' | 'datePicker.rangeOrder' | 'richTextarea.noResults' | 'richTextarea.slashNoCommands' | 'richTextarea.bold' | 'richTextarea.italic' | 'richTextarea.underline' | 'richTextarea.strikethrough' | 'richTextarea.inlineCode' | 'richTextarea.bulletedList' | 'richTextarea.numberedList' | 'richTextarea.quote' | 'richTextarea.link' | 'richTextarea.linkPlaceholder' | 'richTextarea.linkText' | 'richTextarea.linkEdit' | 'richTextarea.linkOpen' | 'richTextarea.linkRemove' | 'colorPicker.trigger' | 'colorPicker.choose' | 'colorPicker.presets' | 'colorPicker.mode' | 'colorPicker.modePresets' | 'colorPicker.modeCustom' | 'colorPicker.charcoal' | 'colorPicker.green' | 'colorPicker.blue' | 'colorPicker.purple' | 'colorPicker.pink' | 'colorPicker.red' | 'colorPicker.yellow' | 'colorPicker.toneDark' | 'colorPicker.toneMediumDark' | 'colorPicker.toneMediumLight' | 'colorPicker.toneLight' | 'colorPicker.saturation' | 'colorPicker.hue' | 'colorPicker.hex' | 'colorPicker.areaValue' | 'stepper.counter';
|
|
7009
7046
|
/** A complete set of translations for one language. Missing a key is a compile error. */
|
|
7010
7047
|
type DsLocale = Record<DsI18nKey, string>;
|
|
7011
7048
|
//#endregion
|
|
@@ -7067,4 +7104,4 @@ declare function useAudioGauge(options?: UseAudioGaugeOptions): UseAudioGaugeRes
|
|
|
7067
7104
|
//#region src/lib/utils.d.ts
|
|
7068
7105
|
declare function cn(...inputs: ClassValue[]): string;
|
|
7069
7106
|
//#endregion
|
|
7070
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, type ActionBarContextValue, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Anchor, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, type AttachmentState, AttachmentTitle, AttachmentTrigger, Audio, AudioPlayerBar, type AudioPlayerBarProps, AudioPlayerButton, type AudioPlayerButtonProps, AudioPlayerCurrentTime, type AudioPlayerCurrentTimeProps, AudioPlayerDuration, type AudioPlayerDurationProps, type AudioPlayerItem, AudioPlayerManager, type AudioPlayerManagerProps, AudioPlayerRow, type AudioPlayerRowProps, AudioPlayerSkip, type AudioPlayerSkipProps, AudioPlayerSpeed, type AudioPlayerSpeedProps, AudioPlayerTime, type AudioPlayerTimeProps, type AudioProps, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, COMBOBOX_AUTO_SEARCH_THRESHOLD, COMBOBOX_AUTO_VIRTUALIZE_THRESHOLD, Calendar, CalendarDayButton, CalendarDropdown, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, ColorPickerArea, ColorPickerContent, ColorPickerHexField, ColorPickerHue, type ColorPickerMode, ColorPickerModeToggle, ColorPickerPanel, type ColorPickerPreset, ColorPickerPresets, ColorPickerTrigger, type ColumnDef, type ColumnPinningState, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, type ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, type ComboboxLoadingState, type ComboboxSelectionChangeDetails, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataCombobox, type DataComboboxLoadingState, DataTable, type DataTableLoadingState, DataTree, DatePicker, type DatePickerPredefinedRange, type DateRange, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, type DropzoneErrorCode, DropzoneIcon, DropzoneTitle, DropzoneTrigger, type DsI18nKey, DsI18nProvider, type DsLocale, EmojiPicker, EmojiPickerCategories, type EmojiPickerCategory, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLabelAside, FieldLabelInfo, FieldLabelRow, FieldLegend, FieldSeparator, FieldSet, FieldTitle, type FileError, type FileRejection, Gauge, HoverCard, HoverCardContent, HoverCardTrigger, type I18nLanguageSource, InlineEditInput, InlineEditMultiCombobox, InlineEditMultiComboboxChip, InlineEditMultiComboboxChips, InlineEditMultiComboboxContent, InlineEditMultiComboboxItem, InlineEditMultiComboboxTrigger, InlineEditMultiComboboxValue, InlineEditSelect, InlineEditSelectContent, InlineEditSelectItem, InlineEditSelectTrigger, InlineEditSelectValue, InlineEditTextarea, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupRichTextarea, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, LEGACY_COLOR_PRESETS, Label, List, ListCol, ListRow, type MentionOption, type NotificationHandle, type NotificationOptions, type NotificationPriority, type NotificationQueueControls, NotificationQueueProvider, type NotificationRenderProps, NotificationSlot, NumericInput, NumericInputControl, NumericInputDecrement, NumericInputIncrement, type OnChangeFn, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, RichTextarea, type RichTextareaAsyncList, RichTextareaContent, RichTextareaRoot, RichTextareaToolbar, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, type SheetOverlay, type SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SlashCommandOption, Slider, type SortingState, Spinner, type StepDefinition, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, StepperTitles, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, type TagOption, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, UseAudioGaugeOptions, UseAudioGaugeResult, type VisibilityState, alertVariants, anchorVariants, bannerVariants, buttonGroupVariants, buttonVariants, cardVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, isInsideCalendarDropdown, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useAudioPlayer, useAudioPlayerTime, useComboboxAnchor, useDsLocale, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
|
|
7107
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, type ActionBarContextValue, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Anchor, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, type AttachmentState, AttachmentTitle, AttachmentTrigger, Audio, AudioPlayerBar, type AudioPlayerBarProps, AudioPlayerButton, type AudioPlayerButtonProps, AudioPlayerCurrentTime, type AudioPlayerCurrentTimeProps, AudioPlayerDuration, type AudioPlayerDurationProps, type AudioPlayerItem, AudioPlayerManager, type AudioPlayerManagerProps, AudioPlayerRow, type AudioPlayerRowProps, AudioPlayerSkip, type AudioPlayerSkipProps, AudioPlayerSpeed, type AudioPlayerSpeedProps, AudioPlayerTime, type AudioPlayerTimeProps, type AudioProps, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, COMBOBOX_AUTO_SEARCH_THRESHOLD, COMBOBOX_AUTO_VIRTUALIZE_THRESHOLD, Calendar, CalendarDayButton, CalendarDropdown, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, ColorPickerArea, ColorPickerContent, ColorPickerHexField, ColorPickerHue, type ColorPickerMode, ColorPickerModeToggle, ColorPickerPanel, type ColorPickerPreset, ColorPickerPresets, ColorPickerTrigger, type ColumnDef, type ColumnPinningState, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, type ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, type ComboboxLoadingState, type ComboboxSelectionChangeDetails, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataCombobox, type DataComboboxLoadingState, DataTable, type DataTableLoadingState, DataTree, DatePicker, type DatePickerPredefinedRange, type DateRange, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, type DropzoneErrorCode, DropzoneIcon, DropzoneTitle, DropzoneTrigger, type DsI18nKey, DsI18nProvider, type DsLocale, EmojiPicker, EmojiPickerCategories, type EmojiPickerCategory, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLabelAside, FieldLabelInfo, FieldLabelRow, FieldLegend, FieldSeparator, FieldSet, FieldTitle, type FileError, type FileRejection, Gauge, HoverCard, HoverCardContent, HoverCardTrigger, type I18nLanguageSource, InlineEditInput, InlineEditMultiCombobox, InlineEditMultiComboboxChip, InlineEditMultiComboboxChips, InlineEditMultiComboboxContent, InlineEditMultiComboboxItem, InlineEditMultiComboboxTrigger, InlineEditMultiComboboxValue, InlineEditSelect, InlineEditSelectContent, InlineEditSelectItem, InlineEditSelectTrigger, InlineEditSelectValue, InlineEditTextarea, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupRichTextarea, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, LEGACY_COLOR_PRESETS, Label, List, ListCol, ListRow, MarkdownView, type MentionOption, type NotificationHandle, type NotificationOptions, type NotificationPriority, type NotificationQueueControls, NotificationQueueProvider, type NotificationRenderProps, NotificationSlot, NumericInput, NumericInputControl, NumericInputDecrement, NumericInputIncrement, type OnChangeFn, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, RichTextarea, type RichTextareaAsyncList, RichTextareaContent, RichTextareaRoot, RichTextareaToolbar, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, type SheetOverlay, type SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SlashCommandOption, Slider, type SortingState, Spinner, type StepDefinition, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, StepperTitles, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, type TagOption, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, UseAudioGaugeOptions, UseAudioGaugeResult, type VisibilityState, alertVariants, anchorVariants, bannerVariants, buttonGroupVariants, buttonVariants, cardVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, isInsideCalendarDropdown, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useAudioPlayer, useAudioPlayerTime, useComboboxAnchor, useDsLocale, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Button, D as _objectWithoutProperties, E as _objectSpread2, O as cn, S as registerI18nNamespace, T as linkStyle, _ as ActionBarHeight, a as TableFooter, b as detectInitialLanguage, c as TableRow, d as Checkbox, f as Spinner, g as ActionBarContext, h as ActionBarButton, i as TableCell, l as useFetchMoreSentinel, m as ActionBar, n as Table, o as TableHead, p as spinnerVariants, r as TableBody, s as TableHeader, t as DataTable, u as Skeleton, v as useDsTranslation, w as buttonVariants, x as dsI18n, y as SUPPORTED_LANGUAGES } from "./data-table-
|
|
1
|
+
import { C as Button, D as _objectWithoutProperties, E as _objectSpread2, O as cn, S as registerI18nNamespace, T as linkStyle, _ as ActionBarHeight, a as TableFooter, b as detectInitialLanguage, c as TableRow, d as Checkbox, f as Spinner, g as ActionBarContext, h as ActionBarButton, i as TableCell, l as useFetchMoreSentinel, m as ActionBar, n as Table, o as TableHead, p as spinnerVariants, r as TableBody, s as TableHeader, t as DataTable, u as Skeleton, v as useDsTranslation, w as buttonVariants, x as dsI18n, y as SUPPORTED_LANGUAGES } from "./data-table-AX0Mgu6K.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { createContext, useContext, useSyncExternalStore } from "react";
|
|
4
4
|
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
5
|
-
import { ArrowDownToLine, ArrowLeft, ArrowRight, Backward10, Bold, CalendarDaysIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleAlert, CircleAlertIcon, CircleCheck, Code, ExternalLink, FLAGS, FastForward, FlagUs, Forward10, Info, Italic, Link, List as List$1, ListOrdered, Loader2Icon, Minus, MinusIcon, MoreHorizontalIcon, PanelLeftIcon, Pause, PencilIcon, Play, Plus, PlusIcon, Rewind, RotateCcw, Search, Smile, Strikethrough, Text, TriangleAlertIcon, Underline, Unlink, XIcon } from "@aircall/react-icons";
|
|
5
|
+
import { ArrowDownToLine, ArrowLeft, ArrowRight, Backward10, Bold, CalendarDaysIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleAlert, CircleAlertIcon, CircleCheck, Code, ExternalLink, FLAGS, FastForward, FlagUs, Forward10, Info, Italic, Link, List as List$1, ListOrdered, Loader2Icon, Minus, MinusIcon, MoreHorizontalIcon, PanelLeftIcon, Pause, PencilIcon, Play, Plus, PlusIcon, Quote, Rewind, RotateCcw, Search, Smile, Strikethrough, Text, TriangleAlertIcon, Underline, Unlink, XIcon } from "@aircall/react-icons";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
8
8
|
import { cva } from "class-variance-authority";
|
|
@@ -40,8 +40,8 @@ import { PreviewCard } from "@base-ui/react/preview-card";
|
|
|
40
40
|
import { NumberField } from "@base-ui/react/number-field";
|
|
41
41
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
42
42
|
import { Progress as Progress$1 } from "@base-ui/react/progress";
|
|
43
|
-
import { BoldRules, CodeRules, ItalicRules, StrikethroughRules } from "@platejs/basic-nodes";
|
|
44
|
-
import { BasicMarksPlugin, BoldPlugin, CodePlugin, ItalicPlugin, StrikethroughPlugin } from "@platejs/basic-nodes/react";
|
|
43
|
+
import { BlockquoteRules, BoldRules, CodeRules, ItalicRules, StrikethroughRules } from "@platejs/basic-nodes";
|
|
44
|
+
import { BasicMarksPlugin, BlockquotePlugin, BoldPlugin, CodePlugin, ItalicPlugin, StrikethroughPlugin } from "@platejs/basic-nodes/react";
|
|
45
45
|
import { filterWords, withTriggerCombobox } from "@platejs/combobox";
|
|
46
46
|
import { IndentPlugin } from "@platejs/indent/react";
|
|
47
47
|
import { LinkRules, getLinkAttributes, upsertLink, validateUrl } from "@platejs/link";
|
|
@@ -52,7 +52,7 @@ import { getMentionOnSelectItem } from "@platejs/mention";
|
|
|
52
52
|
import { MentionInputPlugin, MentionPlugin } from "@platejs/mention/react";
|
|
53
53
|
import { SlashInputPlugin, SlashPlugin } from "@platejs/slash-command/react";
|
|
54
54
|
import { KEYS, createSlatePlugin, createTSlatePlugin } from "platejs";
|
|
55
|
-
import { Plate, PlateContent, PlateElement, createPlatePlugin, toPlatePlugin, useComposedRef, useEditorId, useEditorReadOnly, useEditorRef, useEditorSelection, useEventEditorValue, useFocused, useMarkToolbarButton, useMarkToolbarButtonState, usePlateEditor, usePluginOption, useReadOnly, useSelected } from "platejs/react";
|
|
55
|
+
import { Plate, PlateContent, PlateElement, createPlatePlugin, toPlatePlugin, useComposedRef, useEditorId, useEditorReadOnly, useEditorRef, useEditorSelection, useEditorSelector, useEventEditorValue, useFocused, useMarkToolbarButton, useMarkToolbarButtonState, usePlateEditor, usePluginOption, useReadOnly, useSelected } from "platejs/react";
|
|
56
56
|
import remarkGfm from "remark-gfm";
|
|
57
57
|
import { Combobox as Combobox$2, ComboboxGroup as ComboboxGroup$1, ComboboxItem as ComboboxItem$1, ComboboxPopover, ComboboxProvider, Portal, useComboboxContext, useComboboxStore, useStoreState } from "@ariakit/react";
|
|
58
58
|
import { useComboboxInput, useHTMLInputCursorState } from "@platejs/combobox/react";
|
|
@@ -246,7 +246,7 @@ const AudioPlayerManagerContext = React.createContext(null);
|
|
|
246
246
|
*/
|
|
247
247
|
function useAudioPlayer() {
|
|
248
248
|
const ctx = React.useContext(AudioPlayerContext);
|
|
249
|
-
if (!ctx) throw new Error("AudioPlayer sub-components must be rendered inside <
|
|
249
|
+
if (!ctx) throw new Error("AudioPlayer sub-components must be rendered inside <Audio>.");
|
|
250
250
|
return ctx;
|
|
251
251
|
}
|
|
252
252
|
/**
|
|
@@ -262,7 +262,7 @@ function useAudioPlayer() {
|
|
|
262
262
|
*/
|
|
263
263
|
function useAudioPlayerTime() {
|
|
264
264
|
const time = React.useContext(AudioPlayerTimeContext);
|
|
265
|
-
if (time === null) throw new Error("useAudioPlayerTime must be called inside <
|
|
265
|
+
if (time === null) throw new Error("useAudioPlayerTime must be called inside <Audio>.");
|
|
266
266
|
return time;
|
|
267
267
|
}
|
|
268
268
|
function useAnimationFrameLoop(callback) {
|
|
@@ -610,7 +610,7 @@ function AudioPlayerBar(_ref7) {
|
|
|
610
610
|
}
|
|
611
611
|
/**
|
|
612
612
|
* Dumb span that always renders the current playback position as a formatted
|
|
613
|
-
* time string (e.g. `1:23`). Reads from the nearest `
|
|
613
|
+
* time string (e.g. `1:23`). Reads from the nearest `Audio`.
|
|
614
614
|
*
|
|
615
615
|
* @example
|
|
616
616
|
* ```tsx
|
|
@@ -660,7 +660,7 @@ function AudioPlayerTime(_ref9) {
|
|
|
660
660
|
}
|
|
661
661
|
/**
|
|
662
662
|
* Dumb span that always renders the total audio duration as a formatted time
|
|
663
|
-
* string (e.g. `3:45`). Reads from the nearest `
|
|
663
|
+
* string (e.g. `3:45`). Reads from the nearest `Audio`.
|
|
664
664
|
*
|
|
665
665
|
* @example
|
|
666
666
|
* ```tsx
|
|
@@ -1739,7 +1739,7 @@ const badgeVariants = cva("group/badge inline-flex w-fit shrink-0 items-center j
|
|
|
1739
1739
|
* removable token inside an input/combobox, use `Chip`.
|
|
1740
1740
|
*
|
|
1741
1741
|
* Pick a constrained DS `color` + `tone` (no freeform hex) — defaults to
|
|
1742
|
-
* `charcoal` / `
|
|
1742
|
+
* `charcoal` / `dark` — or pass any stored hex via `customColor`. Icons are
|
|
1743
1743
|
* composed as children (auto-sized per `size`).
|
|
1744
1744
|
*
|
|
1745
1745
|
* `overflowMode` controls how content wider than the badge is handled:
|
|
@@ -4498,7 +4498,7 @@ const ComboboxContent = React.forwardRef((componentProps, forwardRef) => {
|
|
|
4498
4498
|
anchor,
|
|
4499
4499
|
positionMethod: "fixed",
|
|
4500
4500
|
"data-slot": "combobox-positioner",
|
|
4501
|
-
className: "isolate z-popup",
|
|
4501
|
+
className: "isolate z-popup [--available-height:100dvh]",
|
|
4502
4502
|
children: /* @__PURE__ */ jsx(Combobox$1.Popup, _objectSpread2({
|
|
4503
4503
|
ref: forwardRef,
|
|
4504
4504
|
"data-slot": "combobox-content",
|
|
@@ -6102,7 +6102,9 @@ FieldLabel.displayName = "FieldLabel";
|
|
|
6102
6102
|
* ```tsx
|
|
6103
6103
|
* <FieldLabelRow>
|
|
6104
6104
|
* <FieldLabel htmlFor="taxid">Tax ID Number</FieldLabel>
|
|
6105
|
-
* <FieldLabelAside
|
|
6105
|
+
* <FieldLabelAside>
|
|
6106
|
+
* <Anchor href="/help/tax-id">Where do I find this?</Anchor>
|
|
6107
|
+
* </FieldLabelAside>
|
|
6106
6108
|
* </FieldLabelRow>
|
|
6107
6109
|
* ```
|
|
6108
6110
|
*/
|
|
@@ -11881,6 +11883,25 @@ function ListToggle({ listStyleType, label, children }) {
|
|
|
11881
11883
|
});
|
|
11882
11884
|
}
|
|
11883
11885
|
/**
|
|
11886
|
+
* Quote toggle: wraps the selected lines in a quote, or lifts them out of the one they are in.
|
|
11887
|
+
* Pressed while the caret is inside a quote. Plate ships no toolbar hook for blocks, so this
|
|
11888
|
+
* mirrors what the mark/list hooks return.
|
|
11889
|
+
*/
|
|
11890
|
+
function QuoteToggle({ label }) {
|
|
11891
|
+
const editor = useEditorRef();
|
|
11892
|
+
const pressed = useEditorSelector((current) => current.api.some({ match: { type: current.getType(BlockquotePlugin.key) } }), []);
|
|
11893
|
+
return /* @__PURE__ */ jsx(ToolbarToggle, {
|
|
11894
|
+
label,
|
|
11895
|
+
pressed,
|
|
11896
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
11897
|
+
onClick: () => {
|
|
11898
|
+
editor.getTransforms(BlockquotePlugin).blockquote.toggle();
|
|
11899
|
+
editor.tf.focus();
|
|
11900
|
+
},
|
|
11901
|
+
children: /* @__PURE__ */ jsx(Quote, {})
|
|
11902
|
+
});
|
|
11903
|
+
}
|
|
11904
|
+
/**
|
|
11884
11905
|
* Link control. Opens the same floating link card shown on click / Cmd+K (insert form
|
|
11885
11906
|
* when the caret is not on a link, edit card when it is) rather than a bespoke popover,
|
|
11886
11907
|
* so link editing is consistent everywhere. Wired via Plate's link toolbar hooks.
|
|
@@ -11943,6 +11964,7 @@ function RichTextareaToolbarControls() {
|
|
|
11943
11964
|
label: t("richTextarea.numberedList"),
|
|
11944
11965
|
children: /* @__PURE__ */ jsx(ListOrdered, {})
|
|
11945
11966
|
}),
|
|
11967
|
+
/* @__PURE__ */ jsx(QuoteToggle, { label: t("richTextarea.quote") }),
|
|
11946
11968
|
/* @__PURE__ */ jsx(Separator, {
|
|
11947
11969
|
orientation: "vertical",
|
|
11948
11970
|
className: "mx-1 h-5"
|
|
@@ -11954,7 +11976,7 @@ RichTextareaToolbarControls.displayName = "RichTextareaToolbarControls";
|
|
|
11954
11976
|
/**
|
|
11955
11977
|
* Formatting toolbar for a {@link RichTextareaRoot} with `formatting`. Renders DS
|
|
11956
11978
|
* `Toggle`s wired to the editor: bold / italic / underline / strikethrough / inline
|
|
11957
|
-
* code, bulleted / numbered lists, and a link button that opens the floating link
|
|
11979
|
+
* code, bulleted / numbered lists, quote, and a link button that opens the floating link
|
|
11958
11980
|
* card (the same card shown on click / Cmd+K). Must render inside a
|
|
11959
11981
|
* `RichTextareaRoot` (it reads the editor from the Plate provider) — typically in an
|
|
11960
11982
|
* `InputGroupAddon align="block-start"`.
|
|
@@ -12252,18 +12274,21 @@ function toInitialValue(value, mentions, tags) {
|
|
|
12252
12274
|
* Plain-text of one node, including mention/tag labels. `editor.api.string` only walks
|
|
12253
12275
|
* text children, but mention and tag nodes are void with empty text and keep their label
|
|
12254
12276
|
* on `value`, so it would drop the `@mention`/`#tag` text the user sees.
|
|
12277
|
+
* Block children, like the paragraphs a quote wraps, go on separate lines.
|
|
12255
12278
|
*/
|
|
12256
|
-
function nodeToPlainText(node) {
|
|
12279
|
+
function nodeToPlainText(editor, node) {
|
|
12257
12280
|
var _node$value, _node$value2, _node$children;
|
|
12258
12281
|
if (typeof node.text === "string") return node.text;
|
|
12259
12282
|
if (node.type === "mention") return `@${(_node$value = node.value) !== null && _node$value !== void 0 ? _node$value : ""}`;
|
|
12260
12283
|
if (node.type === "tag") return `#${(_node$value2 = node.value) !== null && _node$value2 !== void 0 ? _node$value2 : ""}`;
|
|
12261
|
-
|
|
12284
|
+
const children = (_node$children = node.children) !== null && _node$children !== void 0 ? _node$children : [];
|
|
12285
|
+
const separator = children.some((child) => editor.api.isBlock(child)) ? "\n" : "";
|
|
12286
|
+
return children.map((child) => nodeToPlainText(editor, child)).join(separator);
|
|
12262
12287
|
}
|
|
12263
12288
|
/** Serializes the editor to the `{ plainText, json, markdown? }` change/submit payload. */
|
|
12264
12289
|
function buildPayload(editor, formatting) {
|
|
12265
12290
|
const payload = {
|
|
12266
|
-
plainText: editor.children.map(nodeToPlainText).join("\n"),
|
|
12291
|
+
plainText: editor.children.map((node) => nodeToPlainText(editor, node)).join("\n"),
|
|
12267
12292
|
json: editor.children
|
|
12268
12293
|
};
|
|
12269
12294
|
if (formatting) {
|
|
@@ -12616,8 +12641,22 @@ function LinkElement(props) {
|
|
|
12616
12641
|
}));
|
|
12617
12642
|
}
|
|
12618
12643
|
/**
|
|
12644
|
+
* Renders a quote node as a `<blockquote>` with a left rule. A quote wraps the paragraphs it
|
|
12645
|
+
* holds, so Enter adds a line inside it, and Enter on an empty line leaves it. Backspace at the
|
|
12646
|
+
* start of a line leaves it too, except on an empty line after the first, which it deletes
|
|
12647
|
+
* (BlockquotePlugin's own break/delete rules). Margin, not padding, for Figma's 2px inset: the
|
|
12648
|
+
* rule spans the text only.
|
|
12649
|
+
*/
|
|
12650
|
+
function BlockquoteElement(props) {
|
|
12651
|
+
return /* @__PURE__ */ jsx(PlateElement, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
12652
|
+
as: "blockquote",
|
|
12653
|
+
className: "my-0.5 border-l-3 border-muted pl-2.5",
|
|
12654
|
+
children: props.children
|
|
12655
|
+
}));
|
|
12656
|
+
}
|
|
12657
|
+
/**
|
|
12619
12658
|
* Plugins registered when `formatting` is on: basic marks (bold/italic/underline/
|
|
12620
|
-
* strikethrough/code), lists (bulleted/numbered), link, and Markdown serialization.
|
|
12659
|
+
* strikethrough/code), lists (bulleted/numbered), quote, link, and Markdown serialization.
|
|
12621
12660
|
*
|
|
12622
12661
|
* `MarkdownPlugin` is configured with `remark-gfm` so strikethrough serializes as
|
|
12623
12662
|
* `~~...~~`, and underline is a `plainMark` because Markdown has no underline syntax
|
|
@@ -12640,10 +12679,19 @@ function normalizeLinkInput(url) {
|
|
|
12640
12679
|
if (SAFE_LINK_SCHEME.test(trimmed)) return trimmed;
|
|
12641
12680
|
return `http://${trimmed.replace(/^[a-z][a-z0-9+.-]*:\/*/i, "")}`;
|
|
12642
12681
|
}
|
|
12682
|
+
/**
|
|
12683
|
+
* The plugins `formatting` registers, in order.
|
|
12684
|
+
*
|
|
12685
|
+
* @internal Exported for `rich-textarea.test.ts` only - deliberately absent from `src/index.ts`.
|
|
12686
|
+
*/
|
|
12643
12687
|
const formattingPlugins = [
|
|
12644
12688
|
BasicMarksPlugin.configurePlugin(BoldPlugin, { inputRules: [BoldRules.markdown()] }).configurePlugin(ItalicPlugin, { inputRules: [ItalicRules.markdown(), ItalicRules.markdown({ variant: "_" })] }).configurePlugin(StrikethroughPlugin, { inputRules: [StrikethroughRules.markdown()] }).configurePlugin(CodePlugin, { inputRules: [CodeRules.markdown()] }),
|
|
12645
12689
|
IndentPlugin,
|
|
12646
12690
|
ListPlugin,
|
|
12691
|
+
BlockquotePlugin.configure({
|
|
12692
|
+
inputRules: [BlockquoteRules.markdown()],
|
|
12693
|
+
render: { node: BlockquoteElement }
|
|
12694
|
+
}),
|
|
12647
12695
|
LinkPlugin.configure({
|
|
12648
12696
|
options: {
|
|
12649
12697
|
forceSubmit: true,
|
|
@@ -12812,6 +12860,13 @@ function RichTextareaRoot(componentProps) {
|
|
|
12812
12860
|
}
|
|
12813
12861
|
RichTextareaRoot.displayName = "RichTextareaRoot";
|
|
12814
12862
|
/**
|
|
12863
|
+
* List and inline code styles, shared by the editable and {@link MarkdownView} so both
|
|
12864
|
+
* render the same. `!pl-6` overrides the inline `padding:0` Plate's list rendering sets, so
|
|
12865
|
+
* `ol`/`ul` markers are indented; `[&_code]` gives inline code a boxed style (DS ships no
|
|
12866
|
+
* list/code editor CSS).
|
|
12867
|
+
*/
|
|
12868
|
+
const formattedContentClassName = "[&_ol]:!pl-6 [&_ul]:!pl-6 [&_ol]:my-1 [&_ul]:my-1 [&_code]:rounded-sm [&_code]:border [&_code]:border-border [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em]";
|
|
12869
|
+
/**
|
|
12815
12870
|
* The editable surface of a composed RichTextarea. Must render inside a
|
|
12816
12871
|
* {@link RichTextareaRoot}. Use `bare` when placing it inside an `InputGroup`.
|
|
12817
12872
|
*/
|
|
@@ -12846,7 +12901,7 @@ const RichTextareaContent = React.forwardRef((componentProps, forwardRef) => {
|
|
|
12846
12901
|
ref: forwardRef,
|
|
12847
12902
|
"data-slot": bare ? "input-group-control" : void 0,
|
|
12848
12903
|
"aria-label": ariaLabel,
|
|
12849
|
-
className: "placeholder:text-muted-foreground flex-1 outline-none [&_[data-slate-placeholder]]:text-muted-foreground
|
|
12904
|
+
className: cn("placeholder:text-muted-foreground flex-1 outline-none [&_[data-slate-placeholder]]:text-muted-foreground", formattedContentClassName),
|
|
12850
12905
|
placeholder,
|
|
12851
12906
|
readOnly: disabled,
|
|
12852
12907
|
disabled,
|
|
@@ -12907,6 +12962,43 @@ const InputGroupRichTextarea = React.forwardRef((componentProps, forwardRef) =>
|
|
|
12907
12962
|
}, componentProps));
|
|
12908
12963
|
});
|
|
12909
12964
|
InputGroupRichTextarea.displayName = "InputGroupRichTextarea";
|
|
12965
|
+
/**
|
|
12966
|
+
* Read-only render of the Markdown a `formatting` {@link RichTextarea} writes. It uses the
|
|
12967
|
+
* same plugins and elements, so quotes, lists, marks and links look as they do in the editor.
|
|
12968
|
+
* No border, padding or toolbar: it takes the surrounding text size and color. Links open in a
|
|
12969
|
+
* new tab, and a new `value` renders again.
|
|
12970
|
+
*
|
|
12971
|
+
* It renders what the editor can write: marks, lists, quotes and links. Other Markdown is not
|
|
12972
|
+
* styled: headings and tables show as plain text, and images do not show.
|
|
12973
|
+
*
|
|
12974
|
+
* @example
|
|
12975
|
+
* ```tsx
|
|
12976
|
+
* <MarkdownView value={script} />
|
|
12977
|
+
* ```
|
|
12978
|
+
*/
|
|
12979
|
+
const MarkdownView = React.forwardRef((componentProps, forwardRef) => {
|
|
12980
|
+
const { value, className, "data-test": dataTest = "markdown-view" } = componentProps;
|
|
12981
|
+
const editor = usePlateEditor({
|
|
12982
|
+
plugins: formattingPlugins,
|
|
12983
|
+
value: (ed) => {
|
|
12984
|
+
var _markdown2;
|
|
12985
|
+
const nodes = (_markdown2 = ed.api.markdown) === null || _markdown2 === void 0 ? void 0 : _markdown2.deserialize(value);
|
|
12986
|
+
return (nodes === null || nodes === void 0 ? void 0 : nodes.length) ? nodes : toInitialValue(value, [], []);
|
|
12987
|
+
}
|
|
12988
|
+
}, [value]);
|
|
12989
|
+
return /* @__PURE__ */ jsx(Plate, {
|
|
12990
|
+
editor,
|
|
12991
|
+
readOnly: true,
|
|
12992
|
+
children: /* @__PURE__ */ jsx(PlateContent, {
|
|
12993
|
+
ref: forwardRef,
|
|
12994
|
+
readOnly: true,
|
|
12995
|
+
"data-slot": "markdown-view",
|
|
12996
|
+
"data-test": dataTest,
|
|
12997
|
+
className: cn("outline-none", formattedContentClassName, className)
|
|
12998
|
+
})
|
|
12999
|
+
});
|
|
13000
|
+
});
|
|
13001
|
+
MarkdownView.displayName = "MarkdownView";
|
|
12910
13002
|
//#endregion
|
|
12911
13003
|
//#region src/components/sheet.tsx
|
|
12912
13004
|
const _excluded$5 = ["className"];
|
|
@@ -13972,7 +14064,8 @@ StepperContent.displayName = "StepperContent";
|
|
|
13972
14064
|
const _excluded$1 = ["className"];
|
|
13973
14065
|
/**
|
|
13974
14066
|
* A toggle switch for an on/off setting, wrapping Base UI's `Switch.Root`.
|
|
13975
|
-
* Renders a `<
|
|
14067
|
+
* Renders a `<span role="switch">` containing a sliding thumb, plus a hidden
|
|
14068
|
+
* `<input type="checkbox">` beside it for form participation.
|
|
13976
14069
|
*
|
|
13977
14070
|
* @example
|
|
13978
14071
|
* ```tsx
|
|
@@ -14177,4 +14270,4 @@ function useAudioGauge(options = {}) {
|
|
|
14177
14270
|
};
|
|
14178
14271
|
}
|
|
14179
14272
|
//#endregion
|
|
14180
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Anchor, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Audio, AudioPlayerBar, AudioPlayerButton, AudioPlayerCurrentTime, AudioPlayerDuration, AudioPlayerManager, AudioPlayerRow, AudioPlayerSkip, AudioPlayerSpeed, AudioPlayerTime, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, COMBOBOX_AUTO_SEARCH_THRESHOLD, COMBOBOX_AUTO_VIRTUALIZE_THRESHOLD, Calendar, CalendarDayButton, CalendarDropdown, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, ColorPickerArea, ColorPickerContent, ColorPickerHexField, ColorPickerHue, ColorPickerModeToggle, ColorPickerPanel, ColorPickerPresets, ColorPickerTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataCombobox, DataTable, DataTree, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, DsI18nProvider, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLabelAside, FieldLabelInfo, FieldLabelRow, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Gauge, HoverCard, HoverCardContent, HoverCardTrigger, InlineEditInput, InlineEditMultiCombobox, InlineEditMultiComboboxChip, InlineEditMultiComboboxChips, InlineEditMultiComboboxContent, InlineEditMultiComboboxItem, InlineEditMultiComboboxTrigger, InlineEditMultiComboboxValue, InlineEditSelect, InlineEditSelectContent, InlineEditSelectItem, InlineEditSelectTrigger, InlineEditSelectValue, InlineEditTextarea, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupRichTextarea, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, LEGACY_COLOR_PRESETS, Label, List, ListCol, ListRow, NotificationQueueProvider, NotificationSlot, NumericInput, NumericInputControl, NumericInputDecrement, NumericInputIncrement, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, RichTextarea, RichTextareaContent, RichTextareaRoot, RichTextareaToolbar, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, StepperTitles, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, alertVariants, anchorVariants, bannerVariants, buttonGroupVariants, buttonVariants, cardVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, isInsideCalendarDropdown, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useAudioPlayer, useAudioPlayerTime, useComboboxAnchor, useDsLocale, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
|
|
14273
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Anchor, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Audio, AudioPlayerBar, AudioPlayerButton, AudioPlayerCurrentTime, AudioPlayerDuration, AudioPlayerManager, AudioPlayerRow, AudioPlayerSkip, AudioPlayerSpeed, AudioPlayerTime, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, COMBOBOX_AUTO_SEARCH_THRESHOLD, COMBOBOX_AUTO_VIRTUALIZE_THRESHOLD, Calendar, CalendarDayButton, CalendarDropdown, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, ColorPickerArea, ColorPickerContent, ColorPickerHexField, ColorPickerHue, ColorPickerModeToggle, ColorPickerPanel, ColorPickerPresets, ColorPickerTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataCombobox, DataTable, DataTree, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, DsI18nProvider, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLabelAside, FieldLabelInfo, FieldLabelRow, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Gauge, HoverCard, HoverCardContent, HoverCardTrigger, InlineEditInput, InlineEditMultiCombobox, InlineEditMultiComboboxChip, InlineEditMultiComboboxChips, InlineEditMultiComboboxContent, InlineEditMultiComboboxItem, InlineEditMultiComboboxTrigger, InlineEditMultiComboboxValue, InlineEditSelect, InlineEditSelectContent, InlineEditSelectItem, InlineEditSelectTrigger, InlineEditSelectValue, InlineEditTextarea, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupRichTextarea, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, LEGACY_COLOR_PRESETS, Label, List, ListCol, ListRow, MarkdownView, NotificationQueueProvider, NotificationSlot, NumericInput, NumericInputControl, NumericInputDecrement, NumericInputIncrement, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, RichTextarea, RichTextareaContent, RichTextareaRoot, RichTextareaToolbar, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, StepperTitles, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, alertVariants, anchorVariants, bannerVariants, buttonGroupVariants, buttonVariants, cardVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, isInsideCalendarDropdown, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useAudioPlayer, useAudioPlayerTime, useComboboxAnchor, useDsLocale, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aircall/ds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": [
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"sb:test": "vitest --project=storybook",
|
|
145
145
|
"sb:build:chromatic": "storybook build --test --stats-json",
|
|
146
146
|
"chromatic": "chromatic --storybook-build-dir=./storybook-static",
|
|
147
|
-
"typecheck": "tsc --noEmit
|
|
147
|
+
"typecheck": "tsc --noEmit",
|
|
148
148
|
"snapshot:budget": "node scripts/snapshot-budget.mjs"
|
|
149
149
|
},
|
|
150
150
|
"types": "./dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@ requires:
|
|
|
13
13
|
- aircall-ds/setup
|
|
14
14
|
sources:
|
|
15
15
|
- "aircall/hydra:packages/ds/src/components/audio-player.tsx"
|
|
16
|
-
- "aircall/hydra:
|
|
16
|
+
- "aircall/hydra:packages/ds/src/stories/AudioPlayer.stories.tsx"
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
# Migrating to @aircall/ds AudioPlayer
|
|
@@ -80,9 +80,11 @@ The manager hooks in transparently — no changes to the `<Audio>` children or
|
|
|
80
80
|
|
|
81
81
|
| Tractor / custom | DS replacement | Notes |
|
|
82
82
|
|---|---|---|
|
|
83
|
-
| `<QuickAudioPlayer src>` | `<Audio src><AudioPlayerRow>…</AudioPlayerRow></Audio>` | Drop-in; see §
|
|
83
|
+
| `<QuickAudioPlayer src>` | `<Audio src><AudioPlayerRow>…</AudioPlayerRow></Audio>` | Drop-in; see §1.1 for the layout note |
|
|
84
84
|
| `<Audio src>` | `<Audio src>` | Same name; drop `initialDuration` |
|
|
85
|
-
| `<
|
|
85
|
+
| `<Audio sinkId>` | _(removed)_ | No prop — call `audioRef.current.setSinkId(id)` from `useAudioPlayer()` (Chromium-only, as before) |
|
|
86
|
+
| `<Audio onError>` | `useAudioPlayer().error` | No `onError` prop — watch `error` in a child `useEffect` to handle expired URLs |
|
|
87
|
+
| `<PlayButton>` | `<AudioPlayerButton>` | No required props — state comes from the `<Audio>` context |
|
|
86
88
|
| `<PlayButton color="green">` | `<AudioPlayerButton>` (default) | Green filled 32 px button |
|
|
87
89
|
| `<PlayButton color="default" mode="icon">` | `<AudioPlayerButton variant="ghost">` | Secondary transparent 24 px button |
|
|
88
90
|
| `<AudioBar>` | `<AudioPlayerBar>` | Inside `<AudioPlayerRow>`, `flex-1` is automatic |
|
|
@@ -95,6 +97,13 @@ The manager hooks in transparently — no changes to the `<Audio>` children or
|
|
|
95
97
|
| `useAudioManager()` | _(removed)_ | Manager is fully transparent — no consumer hook |
|
|
96
98
|
| `<Flex>` / `<Grid>` layout wrappers | `<AudioPlayerRow>` or plain `<div>` with Tailwind | Drop styled-components layout primitives |
|
|
97
99
|
|
|
100
|
+
DS-only extras on `<Audio>`: `defaultPlaybackRate` (default `1`), `preload`
|
|
101
|
+
(`'none' | 'metadata' | 'auto'`, default `'metadata'`), `crossOrigin` (unset by default; set
|
|
102
|
+
`"anonymous"` for Web Audio access). `<AudioPlayerBar>` also takes `playheadHeight` — replaces the
|
|
103
|
+
circular thumb with a thin vertical playhead that extends downward, for a bar overlaying a
|
|
104
|
+
multi-row timeline. Omitting `src` on `<Audio>` gives a multi-item player driven imperatively with
|
|
105
|
+
`player.play({ src })` (the `MultiItemOnePlayer` Storybook story shows the full pattern).
|
|
106
|
+
|
|
98
107
|
---
|
|
99
108
|
|
|
100
109
|
## 4. Hook rename table
|
|
@@ -419,6 +428,8 @@ Each player is self-contained. `AudioPlayerManager` ensures only one plays at a
|
|
|
419
428
|
| Tractor prop | Action |
|
|
420
429
|
|---|---|
|
|
421
430
|
| `initialDuration` on `<Audio>` / `<QuickAudioPlayer>` | Drop — DS loads metadata via `preload="metadata"` |
|
|
431
|
+
| `sinkId` on `<Audio>` | Drop the prop — reach the element via `useAudioPlayer().audioRef` and call `setSinkId()` yourself |
|
|
432
|
+
| `onError` on `<Audio>` | Drop the prop — read `useAudioPlayer().error` (`MediaError \| null`) instead |
|
|
422
433
|
| `color` on `<PlayButton>` | Map: `color="green"` → default, `color="default" mode="icon"` → `variant="ghost"`, `color="yellow"` → no direct equivalent (use `className`) |
|
|
423
434
|
| `mode` on `<PlayButton>` | Drop — `<AudioPlayerButton>` is always icon-only |
|
|
424
435
|
| `className="flex-1"` on `<AudioBar>` inside `<AudioPlayerRow>` | Drop — automatic via `[data-slot]` selector |
|