cortena-ui 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +39 -8
- package/dist/index.js +45 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/button-link.tsx +49 -0
- package/src/components/markdown.tsx +12 -2
- package/src/hooks/use-cortena-theme.ts +12 -4
- package/src/index.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -895,7 +895,7 @@ declare function AvatarFallback({ className, ...props }: Avatar$1.Fallback.Props
|
|
|
895
895
|
* for cortenaweb call sites.
|
|
896
896
|
*/
|
|
897
897
|
declare const badgeVariants: (props?: ({
|
|
898
|
-
variant?: "
|
|
898
|
+
variant?: "default" | "success" | "warning" | "warn" | "danger" | "destructive" | "info" | "neutral" | "secondary" | "outline" | null | undefined;
|
|
899
899
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
900
900
|
interface BadgeProps extends React$1.ComponentProps<"span">, VariantProps<typeof badgeVariants> {}
|
|
901
901
|
declare function Badge({ className, variant, ...props }: BadgeProps): React$1.JSX.Element;
|
|
@@ -912,12 +912,34 @@ declare function Badge({ className, variant, ...props }: BadgeProps): React$1.JS
|
|
|
912
912
|
* rendered element, which is Base UI's equivalent.
|
|
913
913
|
*/
|
|
914
914
|
declare const buttonVariants: (props?: ({
|
|
915
|
-
variant?: "
|
|
915
|
+
variant?: "destructive" | "secondary" | "outline" | "primary" | "ghost" | "soft" | "link" | null | undefined;
|
|
916
916
|
size?: "sm" | "md" | "lg" | "icon" | "icon-sm" | null | undefined;
|
|
917
917
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
918
918
|
interface ButtonProps extends React$1.ComponentProps<typeof Button$1>, VariantProps<typeof buttonVariants> {}
|
|
919
919
|
declare function Button({ className, variant, size, ...props }: ButtonProps): React$1.JSX.Element;
|
|
920
920
|
//#endregion
|
|
921
|
+
//#region src/components/button-link.d.ts
|
|
922
|
+
/**
|
|
923
|
+
* An anchor that looks like a Button and keeps link semantics.
|
|
924
|
+
*
|
|
925
|
+
* `Button render={<a />}` makes Base UI treat the anchor as a button (role,
|
|
926
|
+
* tabindex, its `nativeButton` warning), which demotes real navigation for
|
|
927
|
+
* assistive technology and breaks `getByRole("link")`. Navigation should stay
|
|
928
|
+
* an anchor. This is the migration target for every Radix-era
|
|
929
|
+
* `<Button asChild><Link /></Button>`.
|
|
930
|
+
*
|
|
931
|
+
* Framework routers: pass `render` with the router's link so the styling and
|
|
932
|
+
* `href` land on it, e.g. `render={<NextLink href="/x" />}`; otherwise it
|
|
933
|
+
* renders a plain `<a>`.
|
|
934
|
+
*/
|
|
935
|
+
interface ButtonLinkProps extends Omit<React$1.ComponentProps<"a">, "children">, Pick<ButtonProps, "variant" | "size"> {
|
|
936
|
+
children?: React$1.ReactNode;
|
|
937
|
+
/** Replace the rendered `<a>` with a router link; props are merged onto it. */
|
|
938
|
+
render?: React$1.ReactElement<Record<string, unknown>>;
|
|
939
|
+
disabled?: boolean;
|
|
940
|
+
}
|
|
941
|
+
declare function ButtonLink({ className, variant, size, render, disabled, children, ...props }: ButtonLinkProps): React$1.JSX.Element;
|
|
942
|
+
//#endregion
|
|
921
943
|
//#region src/components/calendar.d.ts
|
|
922
944
|
/**
|
|
923
945
|
* Calendar.
|
|
@@ -976,8 +998,8 @@ declare function Checkbox({ className, indeterminate, ...props }: CheckboxProps)
|
|
|
976
998
|
* sentence case and the body font.
|
|
977
999
|
*/
|
|
978
1000
|
declare const chipVariants: (props?: ({
|
|
979
|
-
variant?: "
|
|
980
|
-
size?: "
|
|
1001
|
+
variant?: "default" | "outline" | "accent" | null | undefined;
|
|
1002
|
+
size?: "default" | "sm" | null | undefined;
|
|
981
1003
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
982
1004
|
interface ChipProps extends React$1.ComponentProps<"span">, VariantProps<typeof chipVariants> {}
|
|
983
1005
|
declare function Chip({ className, variant, size, ...props }: ChipProps): React$1.JSX.Element;
|
|
@@ -1353,7 +1375,7 @@ declare function ErrorBanner({ message, onDismiss, onRetry, className, ...props
|
|
|
1353
1375
|
* list) it renders whenever the list has a message.
|
|
1354
1376
|
*/
|
|
1355
1377
|
declare const fieldVariants: (props?: ({
|
|
1356
|
-
orientation?: "
|
|
1378
|
+
orientation?: "vertical" | "horizontal" | null | undefined;
|
|
1357
1379
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
1358
1380
|
interface FieldProps extends React$1.ComponentProps<typeof Field$1.Root>, VariantProps<typeof fieldVariants> {}
|
|
1359
1381
|
declare function Field({ className, orientation, invalid, ...props }: FieldProps): React$1.JSX.Element;
|
|
@@ -1488,12 +1510,21 @@ interface MarkdownProps extends Omit<React$1.ComponentProps<"div">, "children">
|
|
|
1488
1510
|
remarkPlugins?: NonNullable<Options["remarkPlugins"]>;
|
|
1489
1511
|
/** Extra rehype plugins, appended after sanitize. */
|
|
1490
1512
|
rehypePlugins?: NonNullable<Options["rehypePlugins"]>;
|
|
1513
|
+
/**
|
|
1514
|
+
* Rehype plugins that must run BEFORE sanitize. The one legitimate use is
|
|
1515
|
+
* `rehype-raw` in a host that embeds trusted custom tags in markdown (the
|
|
1516
|
+
* webchat's `<cortena-*>` blocks): raw HTML has to become nodes before the
|
|
1517
|
+
* sanitizer sees it, and the sanitize schema then decides what survives.
|
|
1518
|
+
* Anything placed here widens what reaches the sanitizer, so keep the
|
|
1519
|
+
* schema strict when you use it.
|
|
1520
|
+
*/
|
|
1521
|
+
rehypePluginsBeforeSanitize?: NonNullable<Options["rehypePlugins"]>;
|
|
1491
1522
|
/** Replace the sanitize schema; defaults to `markdownSanitizeSchema`. */
|
|
1492
1523
|
sanitizeSchema?: Options$1;
|
|
1493
1524
|
/** Rewrite URLs; defaults to react-markdown's, which drops non-http(s)/mailto/tel schemes. */
|
|
1494
1525
|
urlTransform?: Options["urlTransform"];
|
|
1495
1526
|
}
|
|
1496
|
-
declare function Markdown({ children, compact, codeRenderer, components, remarkPlugins, rehypePlugins, sanitizeSchema, urlTransform, className, ...props }: MarkdownProps): React$1.JSX.Element;
|
|
1527
|
+
declare function Markdown({ children, compact, codeRenderer, components, remarkPlugins, rehypePlugins, rehypePluginsBeforeSanitize, sanitizeSchema, urlTransform, className, ...props }: MarkdownProps): React$1.JSX.Element;
|
|
1497
1528
|
//#endregion
|
|
1498
1529
|
//#region src/components/page-header.d.ts
|
|
1499
1530
|
interface PageHeaderProps extends Omit<React$1.ComponentProps<"header">, "title"> {
|
|
@@ -1871,7 +1902,7 @@ declare function Textarea({ className, autoGrow, onChange, ref, ...props }: Text
|
|
|
1871
1902
|
* `toastManager` to `Toaster` when you need to fire toasts outside React.
|
|
1872
1903
|
*/
|
|
1873
1904
|
declare const toastVariants: (props?: ({
|
|
1874
|
-
variant?: "
|
|
1905
|
+
variant?: "default" | "success" | "warning" | "destructive" | null | undefined;
|
|
1875
1906
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
1876
1907
|
/** The Base UI toast manager: `{ toasts, add, close, update, promise }`. */
|
|
1877
1908
|
declare const useToast: typeof Toast$1.useToastManager;
|
|
@@ -2028,5 +2059,5 @@ export declare function themeFromBackground(background: unknown): ResolvedCorten
|
|
|
2028
2059
|
export declare function themeFromMessage(data: unknown): CortenaTheme | null;
|
|
2029
2060
|
export declare function useCortenaTheme(options?: UseCortenaThemeOptions): UseCortenaThemeResult;
|
|
2030
2061
|
//#endregion
|
|
2031
|
-
export { type Accept, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertIcon, type AlertProps, AlertTitle, Area, AreaChart, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Bar, BarChart, Button, type ButtonProps, Calendar, CalendarDayButton, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, CartesianGrid, Cell, Chart, type ChartConfig, ChartContainer, type ChartContainerProps, type ChartDataFor, type ChartDay, ChartEmpty, type ChartEngine, ChartError, ChartLegend, ChartLegendContent, type ChartLegendContentProps, ChartLoading, type ChartPoint, type ChartProps, type ChartRenderer, type ChartRow, type ChartScale, type ChartScales, type ChartSeries, type ChartSlice, ChartTooltip, ChartTooltipContent, type ChartTooltipContentProps, type ChartTree, type ChartType, Checkbox, type CheckboxProps, Chip, type ChipProps, type ClientSource, type CodeRendererProps, Combobox, ComboboxChip, type ComboboxChipProps, ComboboxChips, type ComboboxChipsProps, ComboboxClear, ComboboxCollection, ComboboxContent, type ComboboxContentProps, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, type ComboboxInputProps, ComboboxItem, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, CommandInput, CommandItem, type CommandItemProps, CommandList, CommandLoading, CommandSeparator, CommandShortcut, ComposedChart, type CortenaTheme, type CortenaThemeMessage, type DataSource, DataTable, type DataTableCell, type DataTableColumn, type DataTableColumnDef, DataTableColumnHeader, type DataTableColumnHeaderProps, type DataTableColumnMeta, type DataTableEditable, type DataTableEditingCell, DataTableExportMenu, type DataTableExportMenuProps, DataTableFacetedFilter, type DataTableFacetedFilterOption, type DataTableFacetedFilterProps, type DataTableFeatures, type DataTableInstance, DataTablePagination, type DataTablePaginationMode, type DataTablePaginationProps, type DataTableProps, type DataTableRow, type DataTableState, type DataTableTable, DataTableToolbar, type DataTableToolbarProps, DataTableView, DataTableViewOptions, type DataTableViewOptionsProps, type DataTableViewProps, DateField, type DateFieldProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, Dropzone, type DropzoneProps, type DropzoneState, EmptyState, type EmptyStateProps, ErrorBanner, type ErrorBannerProps, type ExportCell, type ExportSheet, Field, FieldContent, FieldControl, type FieldControlProps, FieldDescription, type FieldDescriptionProps, FieldError, type FieldErrorItem, type FieldErrorProps, FieldGroup, FieldLabel, type FieldLabelProps, type FieldProps, Fieldset, FieldsetLegend, type FieldsetLegendProps, type FieldsetProps, FileList, type FileListProps, type FileRejection, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, Funnel, FunnelChart, Input, type InputProps, Kbd, Label, LabelList, type LabelProps, Line, LineChart, LoadingSkeleton, type LoadingSkeletonPreset, type LoadingSkeletonProps, Markdown, type Components as MarkdownComponents, type MarkdownProps, type NivoTheme, PageHeader, type PageHeaderProps, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Popover, PopoverClose, PopoverContent, type PopoverContentProps, PopoverDescription, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, type ProgressProps, ProgressTrack, ProgressValue, Radar, RadarChart, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, RechartsLegend, RechartsTooltip, ReferenceLine, type ResolvedCortenaTheme, ResponsiveContainer, Scatter, ScatterChart, ScrollArea, type ScrollAreaProps, ScrollBar, SectionCard, type SectionCardProps, Segmented, type SegmentedOption, type SegmentedProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, type SeparatorProps, type ServerSource, Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortableHandle, type SortableHandleProps, SortableList, type SortableListProps, type SortableRenderState, Spinner, type SpinnerProps, StatusDot, type StatusDotProps, type StatusDotTone, type SubmitHandler, Switch, type SwitchProps, type TableQuery, type TableResult, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast, type ToastProps, Toaster, type ToasterProps, Toolbar, ToolbarEnd, type ToolbarProps, ToolbarSeparator, ToolbarStart, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, type UseCortenaThemeOptions, type UseCortenaThemeResult, type UseDataTableOptions, type UseFormFieldReturn, type UseFormReturn, XAxis, YAxis, alertVariants, arrayMove, badgeVariants, buttonVariants, chipVariants, fieldVariants, formatDateDefault, formatDateISO, formatDateLong, formatDateShort, formatFileSize, formatRelative, inputClassName, labelVariants, markdownSanitizeSchema, parseDateDefault, parseDateISO, sheetVariants, textareaClassName, toastVariants, useComboboxFilter, useForm, useFormField, useToast, zodResolver };
|
|
2062
|
+
export { type Accept, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertIcon, type AlertProps, AlertTitle, Area, AreaChart, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Bar, BarChart, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, Calendar, CalendarDayButton, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, CartesianGrid, Cell, Chart, type ChartConfig, ChartContainer, type ChartContainerProps, type ChartDataFor, type ChartDay, ChartEmpty, type ChartEngine, ChartError, ChartLegend, ChartLegendContent, type ChartLegendContentProps, ChartLoading, type ChartPoint, type ChartProps, type ChartRenderer, type ChartRow, type ChartScale, type ChartScales, type ChartSeries, type ChartSlice, ChartTooltip, ChartTooltipContent, type ChartTooltipContentProps, type ChartTree, type ChartType, Checkbox, type CheckboxProps, Chip, type ChipProps, type ClientSource, type CodeRendererProps, Combobox, ComboboxChip, type ComboboxChipProps, ComboboxChips, type ComboboxChipsProps, ComboboxClear, ComboboxCollection, ComboboxContent, type ComboboxContentProps, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, type ComboboxInputProps, ComboboxItem, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, CommandInput, CommandItem, type CommandItemProps, CommandList, CommandLoading, CommandSeparator, CommandShortcut, ComposedChart, type CortenaTheme, type CortenaThemeMessage, type DataSource, DataTable, type DataTableCell, type DataTableColumn, type DataTableColumnDef, DataTableColumnHeader, type DataTableColumnHeaderProps, type DataTableColumnMeta, type DataTableEditable, type DataTableEditingCell, DataTableExportMenu, type DataTableExportMenuProps, DataTableFacetedFilter, type DataTableFacetedFilterOption, type DataTableFacetedFilterProps, type DataTableFeatures, type DataTableInstance, DataTablePagination, type DataTablePaginationMode, type DataTablePaginationProps, type DataTableProps, type DataTableRow, type DataTableState, type DataTableTable, DataTableToolbar, type DataTableToolbarProps, DataTableView, DataTableViewOptions, type DataTableViewOptionsProps, type DataTableViewProps, DateField, type DateFieldProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, Dropzone, type DropzoneProps, type DropzoneState, EmptyState, type EmptyStateProps, ErrorBanner, type ErrorBannerProps, type ExportCell, type ExportSheet, Field, FieldContent, FieldControl, type FieldControlProps, FieldDescription, type FieldDescriptionProps, FieldError, type FieldErrorItem, type FieldErrorProps, FieldGroup, FieldLabel, type FieldLabelProps, type FieldProps, Fieldset, FieldsetLegend, type FieldsetLegendProps, type FieldsetProps, FileList, type FileListProps, type FileRejection, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, Funnel, FunnelChart, Input, type InputProps, Kbd, Label, LabelList, type LabelProps, Line, LineChart, LoadingSkeleton, type LoadingSkeletonPreset, type LoadingSkeletonProps, Markdown, type Components as MarkdownComponents, type MarkdownProps, type NivoTheme, PageHeader, type PageHeaderProps, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Popover, PopoverClose, PopoverContent, type PopoverContentProps, PopoverDescription, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, type ProgressProps, ProgressTrack, ProgressValue, Radar, RadarChart, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, RechartsLegend, RechartsTooltip, ReferenceLine, type ResolvedCortenaTheme, ResponsiveContainer, Scatter, ScatterChart, ScrollArea, type ScrollAreaProps, ScrollBar, SectionCard, type SectionCardProps, Segmented, type SegmentedOption, type SegmentedProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, type SeparatorProps, type ServerSource, Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortableHandle, type SortableHandleProps, SortableList, type SortableListProps, type SortableRenderState, Spinner, type SpinnerProps, StatusDot, type StatusDotProps, type StatusDotTone, type SubmitHandler, Switch, type SwitchProps, type TableQuery, type TableResult, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast, type ToastProps, Toaster, type ToasterProps, Toolbar, ToolbarEnd, type ToolbarProps, ToolbarSeparator, ToolbarStart, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, type UseCortenaThemeOptions, type UseCortenaThemeResult, type UseDataTableOptions, type UseFormFieldReturn, type UseFormReturn, XAxis, YAxis, alertVariants, arrayMove, badgeVariants, buttonVariants, chipVariants, fieldVariants, formatDateDefault, formatDateISO, formatDateLong, formatDateShort, formatFileSize, formatRelative, inputClassName, labelVariants, markdownSanitizeSchema, parseDateDefault, parseDateISO, sheetVariants, textareaClassName, toastVariants, useComboboxFilter, useForm, useFormField, useToast, zodResolver };
|
|
2032
2063
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -3355,6 +3355,33 @@ function Badge({ className, variant, ...props }) {
|
|
|
3355
3355
|
});
|
|
3356
3356
|
}
|
|
3357
3357
|
//#endregion
|
|
3358
|
+
//#region src/components/button-link.tsx
|
|
3359
|
+
function ButtonLink({ className, variant, size, render, disabled, children, ...props }) {
|
|
3360
|
+
const classes = cn(buttonVariants({
|
|
3361
|
+
variant,
|
|
3362
|
+
size
|
|
3363
|
+
}), disabled && "pointer-events-none opacity-50", className);
|
|
3364
|
+
const merged = {
|
|
3365
|
+
...props,
|
|
3366
|
+
"data-slot": "button-link",
|
|
3367
|
+
className: classes,
|
|
3368
|
+
"aria-disabled": disabled || void 0,
|
|
3369
|
+
tabIndex: disabled ? -1 : props.tabIndex
|
|
3370
|
+
};
|
|
3371
|
+
if (render) {
|
|
3372
|
+
const Element = render.type;
|
|
3373
|
+
return /* @__PURE__ */ jsx(Element, {
|
|
3374
|
+
...render.props,
|
|
3375
|
+
...merged,
|
|
3376
|
+
children: children ?? render.props.children
|
|
3377
|
+
});
|
|
3378
|
+
}
|
|
3379
|
+
return /* @__PURE__ */ jsx("a", {
|
|
3380
|
+
...merged,
|
|
3381
|
+
children
|
|
3382
|
+
});
|
|
3383
|
+
}
|
|
3384
|
+
//#endregion
|
|
3358
3385
|
//#region src/components/calendar.tsx
|
|
3359
3386
|
function CalendarRoot({ className, rootRef, ...props }) {
|
|
3360
3387
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -5073,13 +5100,21 @@ function buildComponents(codeRenderer) {
|
|
|
5073
5100
|
})
|
|
5074
5101
|
};
|
|
5075
5102
|
}
|
|
5076
|
-
function Markdown({ children, compact = false, codeRenderer, components, remarkPlugins, rehypePlugins, sanitizeSchema = markdownSanitizeSchema, urlTransform, className, ...props }) {
|
|
5103
|
+
function Markdown({ children, compact = false, codeRenderer, components, remarkPlugins, rehypePlugins, rehypePluginsBeforeSanitize, sanitizeSchema = markdownSanitizeSchema, urlTransform, className, ...props }) {
|
|
5077
5104
|
const map = React.useMemo(() => ({
|
|
5078
5105
|
...buildComponents(codeRenderer),
|
|
5079
5106
|
...components
|
|
5080
5107
|
}), [codeRenderer, components]);
|
|
5081
5108
|
const remark = React.useMemo(() => [remarkGfm, ...remarkPlugins ?? []], [remarkPlugins]);
|
|
5082
|
-
const rehype = React.useMemo(() => [
|
|
5109
|
+
const rehype = React.useMemo(() => [
|
|
5110
|
+
...rehypePluginsBeforeSanitize ?? [],
|
|
5111
|
+
[rehypeSanitize, sanitizeSchema],
|
|
5112
|
+
...rehypePlugins ?? []
|
|
5113
|
+
], [
|
|
5114
|
+
rehypePluginsBeforeSanitize,
|
|
5115
|
+
rehypePlugins,
|
|
5116
|
+
sanitizeSchema
|
|
5117
|
+
]);
|
|
5083
5118
|
return /* @__PURE__ */ jsx("div", {
|
|
5084
5119
|
"data-slot": "markdown",
|
|
5085
5120
|
"data-compact": compact || void 0,
|
|
@@ -5969,17 +6004,20 @@ function subscribeTheme(onChange) {
|
|
|
5969
6004
|
window.removeEventListener("storage", onChange);
|
|
5970
6005
|
};
|
|
5971
6006
|
}
|
|
6007
|
+
function schemeQuery() {
|
|
6008
|
+
return typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia(DARK_QUERY) : null;
|
|
6009
|
+
}
|
|
5972
6010
|
function subscribeScheme(onChange) {
|
|
5973
|
-
const query =
|
|
5974
|
-
query
|
|
6011
|
+
const query = schemeQuery();
|
|
6012
|
+
query?.addEventListener("change", onChange);
|
|
5975
6013
|
const unsubscribeTheme = subscribeTheme(onChange);
|
|
5976
6014
|
return () => {
|
|
5977
|
-
query
|
|
6015
|
+
query?.removeEventListener("change", onChange);
|
|
5978
6016
|
unsubscribeTheme();
|
|
5979
6017
|
};
|
|
5980
6018
|
}
|
|
5981
6019
|
function systemScheme() {
|
|
5982
|
-
return
|
|
6020
|
+
return schemeQuery()?.matches ? "dark" : "light";
|
|
5983
6021
|
}
|
|
5984
6022
|
function useCortenaTheme(options = {}) {
|
|
5985
6023
|
const { storageKey = DEFAULT_THEME_STORAGE_KEY, allowedOrigins, listen = true } = options;
|
|
@@ -6016,6 +6054,6 @@ function useCortenaTheme(options = {}) {
|
|
|
6016
6054
|
};
|
|
6017
6055
|
}
|
|
6018
6056
|
//#endregion
|
|
6019
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertIcon, AlertTitle, Area, AreaChart, Avatar, AvatarFallback, AvatarImage, Badge, Bar, BarChart, Button, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CartesianGrid, Cell, Chart, ChartContainer, ChartEmpty, ChartError, ChartLegend, ChartLegendContent, ChartLoading, ChartTooltip, ChartTooltipContent, Checkbox, Chip, Combobox, ComboboxChip, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, ComposedChart, DEFAULT_THEME_STORAGE_KEY, DataTable, DataTableColumnHeader, DataTableExportMenu, DataTableFacetedFilter, DataTablePagination, DataTableToolbar, DataTableView, DataTableViewOptions, DateField, DatePicker, DateRangePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, EmptyState, ErrorBanner, Field, FieldContent, FieldControl, FieldDescription, FieldError, FieldGroup, FieldLabel, Fieldset, FieldsetLegend, FileList, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Funnel, FunnelChart, Input, Kbd, Label, LabelList, Line, LineChart, LoadingSkeleton, Markdown, NIVO_TYPES, PageHeader, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RECHARTS_TYPES, Radar, RadarChart, RadioGroup, RadioGroupItem, RechartsLegend, RechartsTooltip, ReferenceLine, ResponsiveContainer, Scatter, ScatterChart, ScrollArea, ScrollBar, SectionCard, Segmented, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortableHandle, SortableList, Spinner, StatusDot, Switch, THEME_MESSAGE_TYPE, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Textarea, Toast, Toaster, Toolbar, ToolbarEnd, ToolbarSeparator, ToolbarStart, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VIZ_SERIES_COUNT, XAxis, YAxis, alertVariants, applyStoredTheme, applyTheme, arrayMove, badgeVariants, buttonVariants, chartEngine, chartScales, chipVariants, cn, createColumnHelper, dataTableFeatures, downloadCsv, downloadExcel, fieldVariants, formatDateDefault, formatDateISO, formatDateLong, formatDateShort, formatFileSize, formatRelative, getThemeInitScript, inputClassName, labelVariants, markdownSanitizeSchema, nivoTheme, parseDateDefault, parseDateISO, readStoredTheme, resolveColor, resolveVizSeries, seriesColor, sheetVariants, textareaClassName, themeFromBackground, themeFromMessage, themeInitScript, toCsv, toHex, toSheet, toastVariants, useChart, useComboboxFilter, useCortenaTheme, useDataTable, useForm, useFormField, useNivoTheme, useToast, vizSeriesVars, vizVar, zodResolver };
|
|
6057
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertIcon, AlertTitle, Area, AreaChart, Avatar, AvatarFallback, AvatarImage, Badge, Bar, BarChart, Button, ButtonLink, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CartesianGrid, Cell, Chart, ChartContainer, ChartEmpty, ChartError, ChartLegend, ChartLegendContent, ChartLoading, ChartTooltip, ChartTooltipContent, Checkbox, Chip, Combobox, ComboboxChip, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, ComposedChart, DEFAULT_THEME_STORAGE_KEY, DataTable, DataTableColumnHeader, DataTableExportMenu, DataTableFacetedFilter, DataTablePagination, DataTableToolbar, DataTableView, DataTableViewOptions, DateField, DatePicker, DateRangePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, EmptyState, ErrorBanner, Field, FieldContent, FieldControl, FieldDescription, FieldError, FieldGroup, FieldLabel, Fieldset, FieldsetLegend, FileList, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Funnel, FunnelChart, Input, Kbd, Label, LabelList, Line, LineChart, LoadingSkeleton, Markdown, NIVO_TYPES, PageHeader, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RECHARTS_TYPES, Radar, RadarChart, RadioGroup, RadioGroupItem, RechartsLegend, RechartsTooltip, ReferenceLine, ResponsiveContainer, Scatter, ScatterChart, ScrollArea, ScrollBar, SectionCard, Segmented, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortableHandle, SortableList, Spinner, StatusDot, Switch, THEME_MESSAGE_TYPE, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Textarea, Toast, Toaster, Toolbar, ToolbarEnd, ToolbarSeparator, ToolbarStart, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VIZ_SERIES_COUNT, XAxis, YAxis, alertVariants, applyStoredTheme, applyTheme, arrayMove, badgeVariants, buttonVariants, chartEngine, chartScales, chipVariants, cn, createColumnHelper, dataTableFeatures, downloadCsv, downloadExcel, fieldVariants, formatDateDefault, formatDateISO, formatDateLong, formatDateShort, formatFileSize, formatRelative, getThemeInitScript, inputClassName, labelVariants, markdownSanitizeSchema, nivoTheme, parseDateDefault, parseDateISO, readStoredTheme, resolveColor, resolveVizSeries, seriesColor, sheetVariants, textareaClassName, themeFromBackground, themeFromMessage, themeInitScript, toCsv, toHex, toSheet, toastVariants, useChart, useComboboxFilter, useCortenaTheme, useDataTable, useForm, useFormField, useNivoTheme, useToast, vizSeriesVars, vizVar, zodResolver };
|
|
6020
6058
|
|
|
6021
6059
|
//# sourceMappingURL=index.js.map
|