@nimblebrain/synapse 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/dist/{chunk-VYR6V47N.js → chunk-3YSXPBEQ.js} +3 -3
- package/dist/{chunk-VYR6V47N.js.map → chunk-3YSXPBEQ.js.map} +1 -1
- package/dist/{chunk-FDMRJZKT.cjs → chunk-FB7GPBEM.cjs} +10 -10
- package/dist/{chunk-FDMRJZKT.cjs.map → chunk-FB7GPBEM.cjs.map} +1 -1
- package/dist/{chunk-UPDBDXQB.js → chunk-HKRTDGXN.js} +5 -2
- package/dist/chunk-HKRTDGXN.js.map +1 -0
- package/dist/{chunk-TXJMGQYF.cjs → chunk-LPWEQCZV.cjs} +5 -2
- package/dist/chunk-LPWEQCZV.cjs.map +1 -0
- package/dist/{chunk-EHLQWCYV.cjs → chunk-VDQZQDU3.cjs} +6 -6
- package/dist/{chunk-EHLQWCYV.cjs.map → chunk-VDQZQDU3.cjs.map} +1 -1
- package/dist/{chunk-SRQNQ26I.js → chunk-ZLASWV4N.js} +3 -3
- package/dist/{chunk-SRQNQ26I.js.map → chunk-ZLASWV4N.js.map} +1 -1
- package/dist/connect.iife.global.js +1 -1
- package/dist/host/index.cjs +14 -14
- package/dist/host/index.js +2 -2
- package/dist/index.cjs +14 -14
- package/dist/index.js +3 -3
- package/dist/react/index.cjs +7 -7
- package/dist/react/index.js +2 -2
- package/dist/synapse-runtime.iife.global.js +1 -1
- package/dist/synapse-ui.iife.global.js +2 -2
- package/dist/ui/index.cjs +361 -122
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +30 -3
- package/dist/ui/index.d.ts +30 -3
- package/dist/ui/index.js +362 -124
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-TXJMGQYF.cjs.map +0 -1
- package/dist/chunk-UPDBDXQB.js.map +0 -1
package/dist/ui/index.d.cts
CHANGED
|
@@ -30,7 +30,12 @@ interface BreadcrumbProps extends Omit<HTMLAttributes<HTMLElement>, "children">
|
|
|
30
30
|
}
|
|
31
31
|
declare function Breadcrumb({ crumbs, separator, style, ...rest }: BreadcrumbProps): react_jsx_runtime.JSX.Element;
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
/**
|
|
34
|
+
* `danger` is for the verb that destroys something — Delete, Remove, Forget. It is
|
|
35
|
+
* filled like `primary`, so it is never the quiet option beside one, and red so the
|
|
36
|
+
* difference reads before the label does.
|
|
37
|
+
*/
|
|
38
|
+
type Variant = "primary" | "secondary" | "ghost" | "danger";
|
|
34
39
|
type Size = "sm" | "md";
|
|
35
40
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
36
41
|
variant?: Variant;
|
|
@@ -55,6 +60,27 @@ interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
55
60
|
}
|
|
56
61
|
declare function Card({ padding, interactive, style, className, children, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
|
|
57
62
|
|
|
63
|
+
interface ConfirmDialogProps {
|
|
64
|
+
open: boolean;
|
|
65
|
+
/** Every dismissal path — Escape, the scrim, Cancel — calls this with `false`. */
|
|
66
|
+
onOpenChange: (open: boolean) => void;
|
|
67
|
+
/** Names the dialog (`aria-labelledby`). */
|
|
68
|
+
title: ReactNode;
|
|
69
|
+
/** One line under the title. Becomes the dialog's accessible description. */
|
|
70
|
+
description?: ReactNode;
|
|
71
|
+
/** What the action will do, and any control that shapes it. */
|
|
72
|
+
children?: ReactNode;
|
|
73
|
+
confirmLabel?: string;
|
|
74
|
+
cancelLabel?: string;
|
|
75
|
+
/** Confirm's label while `onConfirm` is in flight. Defaults to `confirmLabel`. */
|
|
76
|
+
pendingLabel?: string;
|
|
77
|
+
/** Render Confirm as a `danger` button, and open with focus on Cancel. */
|
|
78
|
+
destructive?: boolean;
|
|
79
|
+
/** Resolve to close. Throw to stay open with the error's message shown. */
|
|
80
|
+
onConfirm: () => void | Promise<void>;
|
|
81
|
+
}
|
|
82
|
+
declare function ConfirmDialog({ open, onOpenChange, title, description, children, confirmLabel, cancelLabel, pendingLabel, destructive, onConfirm, }: ConfirmDialogProps): react_jsx_runtime.JSX.Element | null;
|
|
83
|
+
|
|
58
84
|
type Side$1 = "left" | "right" | "bottom";
|
|
59
85
|
interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, "onClick"> {
|
|
60
86
|
open: boolean;
|
|
@@ -296,7 +322,7 @@ declare const ListDetailLayout: typeof ListDetailLayoutRoot & {
|
|
|
296
322
|
Back: typeof Back;
|
|
297
323
|
};
|
|
298
324
|
|
|
299
|
-
interface PageLayoutProps extends Omit<HTMLAttributes<
|
|
325
|
+
interface PageLayoutProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
300
326
|
/** The trail. Omit at the top level, which has nothing above it to name. */
|
|
301
327
|
crumbs?: Crumb[];
|
|
302
328
|
title: ReactNode;
|
|
@@ -446,6 +472,7 @@ declare const tokens: {
|
|
|
446
472
|
readonly borderStrong: "var(--color-border-secondary, #d1d5db)";
|
|
447
473
|
readonly ring: "var(--color-ring-primary, #2563eb)";
|
|
448
474
|
readonly danger: "var(--nb-color-danger, #dc2626)";
|
|
475
|
+
readonly dangerFg: "var(--nb-color-danger-foreground, #ffffff)";
|
|
449
476
|
readonly success: "var(--nb-color-success, #059669)";
|
|
450
477
|
readonly warning: "var(--nb-color-warning, #f59e0b)";
|
|
451
478
|
readonly processing: "var(--nb-color-processing, #7c3aed)";
|
|
@@ -534,4 +561,4 @@ interface HeadingProps extends Omit<HTMLAttributes<HTMLHeadingElement>, "color">
|
|
|
534
561
|
/** Display heading using the heading font slot. Defaults to md, semibold. */
|
|
535
562
|
declare function Heading({ size, weight, tone, as: As, style, children, ...rest }: HeadingProps): react_jsx_runtime.JSX.Element;
|
|
536
563
|
|
|
537
|
-
export { AppFrame, Avatar, Badge, type BadgeTone, Breadcrumb, Button, Card, type Column, type Crumb, Divider, Drawer, EmptyState, Heading, type HeadingSize, Inline, ListDetailLayout, ListRow, PageHeader, PageLayout, Pagination, Prose, SearchField, SegmentedControl, SidebarLayout, Spacer, Spinner, Stack, type Status, StatusDot, Table, Tabs, Text, TextLink, type TextSize, type Tokens, headingStyle, textStyle, tokens, useBreakpoint, useListDetail, useSidebar };
|
|
564
|
+
export { AppFrame, Avatar, Badge, type BadgeTone, Breadcrumb, Button, Card, type Column, ConfirmDialog, type Crumb, Divider, Drawer, EmptyState, Heading, type HeadingSize, Inline, ListDetailLayout, ListRow, PageHeader, PageLayout, Pagination, Prose, SearchField, SegmentedControl, SidebarLayout, Spacer, Spinner, Stack, type Status, StatusDot, Table, Tabs, Text, TextLink, type TextSize, type Tokens, headingStyle, textStyle, tokens, useBreakpoint, useListDetail, useSidebar };
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -30,7 +30,12 @@ interface BreadcrumbProps extends Omit<HTMLAttributes<HTMLElement>, "children">
|
|
|
30
30
|
}
|
|
31
31
|
declare function Breadcrumb({ crumbs, separator, style, ...rest }: BreadcrumbProps): react_jsx_runtime.JSX.Element;
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
/**
|
|
34
|
+
* `danger` is for the verb that destroys something — Delete, Remove, Forget. It is
|
|
35
|
+
* filled like `primary`, so it is never the quiet option beside one, and red so the
|
|
36
|
+
* difference reads before the label does.
|
|
37
|
+
*/
|
|
38
|
+
type Variant = "primary" | "secondary" | "ghost" | "danger";
|
|
34
39
|
type Size = "sm" | "md";
|
|
35
40
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
36
41
|
variant?: Variant;
|
|
@@ -55,6 +60,27 @@ interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
55
60
|
}
|
|
56
61
|
declare function Card({ padding, interactive, style, className, children, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
|
|
57
62
|
|
|
63
|
+
interface ConfirmDialogProps {
|
|
64
|
+
open: boolean;
|
|
65
|
+
/** Every dismissal path — Escape, the scrim, Cancel — calls this with `false`. */
|
|
66
|
+
onOpenChange: (open: boolean) => void;
|
|
67
|
+
/** Names the dialog (`aria-labelledby`). */
|
|
68
|
+
title: ReactNode;
|
|
69
|
+
/** One line under the title. Becomes the dialog's accessible description. */
|
|
70
|
+
description?: ReactNode;
|
|
71
|
+
/** What the action will do, and any control that shapes it. */
|
|
72
|
+
children?: ReactNode;
|
|
73
|
+
confirmLabel?: string;
|
|
74
|
+
cancelLabel?: string;
|
|
75
|
+
/** Confirm's label while `onConfirm` is in flight. Defaults to `confirmLabel`. */
|
|
76
|
+
pendingLabel?: string;
|
|
77
|
+
/** Render Confirm as a `danger` button, and open with focus on Cancel. */
|
|
78
|
+
destructive?: boolean;
|
|
79
|
+
/** Resolve to close. Throw to stay open with the error's message shown. */
|
|
80
|
+
onConfirm: () => void | Promise<void>;
|
|
81
|
+
}
|
|
82
|
+
declare function ConfirmDialog({ open, onOpenChange, title, description, children, confirmLabel, cancelLabel, pendingLabel, destructive, onConfirm, }: ConfirmDialogProps): react_jsx_runtime.JSX.Element | null;
|
|
83
|
+
|
|
58
84
|
type Side$1 = "left" | "right" | "bottom";
|
|
59
85
|
interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, "onClick"> {
|
|
60
86
|
open: boolean;
|
|
@@ -296,7 +322,7 @@ declare const ListDetailLayout: typeof ListDetailLayoutRoot & {
|
|
|
296
322
|
Back: typeof Back;
|
|
297
323
|
};
|
|
298
324
|
|
|
299
|
-
interface PageLayoutProps extends Omit<HTMLAttributes<
|
|
325
|
+
interface PageLayoutProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
300
326
|
/** The trail. Omit at the top level, which has nothing above it to name. */
|
|
301
327
|
crumbs?: Crumb[];
|
|
302
328
|
title: ReactNode;
|
|
@@ -446,6 +472,7 @@ declare const tokens: {
|
|
|
446
472
|
readonly borderStrong: "var(--color-border-secondary, #d1d5db)";
|
|
447
473
|
readonly ring: "var(--color-ring-primary, #2563eb)";
|
|
448
474
|
readonly danger: "var(--nb-color-danger, #dc2626)";
|
|
475
|
+
readonly dangerFg: "var(--nb-color-danger-foreground, #ffffff)";
|
|
449
476
|
readonly success: "var(--nb-color-success, #059669)";
|
|
450
477
|
readonly warning: "var(--nb-color-warning, #f59e0b)";
|
|
451
478
|
readonly processing: "var(--nb-color-processing, #7c3aed)";
|
|
@@ -534,4 +561,4 @@ interface HeadingProps extends Omit<HTMLAttributes<HTMLHeadingElement>, "color">
|
|
|
534
561
|
/** Display heading using the heading font slot. Defaults to md, semibold. */
|
|
535
562
|
declare function Heading({ size, weight, tone, as: As, style, children, ...rest }: HeadingProps): react_jsx_runtime.JSX.Element;
|
|
536
563
|
|
|
537
|
-
export { AppFrame, Avatar, Badge, type BadgeTone, Breadcrumb, Button, Card, type Column, type Crumb, Divider, Drawer, EmptyState, Heading, type HeadingSize, Inline, ListDetailLayout, ListRow, PageHeader, PageLayout, Pagination, Prose, SearchField, SegmentedControl, SidebarLayout, Spacer, Spinner, Stack, type Status, StatusDot, Table, Tabs, Text, TextLink, type TextSize, type Tokens, headingStyle, textStyle, tokens, useBreakpoint, useListDetail, useSidebar };
|
|
564
|
+
export { AppFrame, Avatar, Badge, type BadgeTone, Breadcrumb, Button, Card, type Column, ConfirmDialog, type Crumb, Divider, Drawer, EmptyState, Heading, type HeadingSize, Inline, ListDetailLayout, ListRow, PageHeader, PageLayout, Pagination, Prose, SearchField, SegmentedControl, SidebarLayout, Spacer, Spinner, Stack, type Status, StatusDot, Table, Tabs, Text, TextLink, type TextSize, type Tokens, headingStyle, textStyle, tokens, useBreakpoint, useListDetail, useSidebar };
|