@mcurcio/patchbay 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +83 -2
- package/dist/base.css +22 -0
- package/dist/composites.js +0 -0
- package/dist/graph.js +0 -0
- package/dist/hooks.js +71 -0
- package/dist/hooks.js.map +1 -0
- package/dist/primitives.css +1 -0
- package/dist/primitives.js +643 -0
- package/dist/primitives.js.map +1 -0
- package/dist/shell.js +0 -0
- package/dist/tokens.css +212 -0
- package/dist/types/composites/index.d.ts +1 -0
- package/dist/types/graph/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/use-persistent-state/index.d.ts +2 -0
- package/dist/types/hooks/use-persistent-state/usePersistentState.d.ts +27 -0
- package/dist/types/hooks/use-theme/index.d.ts +2 -0
- package/dist/types/hooks/use-theme/useTheme.d.ts +31 -0
- package/dist/types/primitives/badge/Badge.d.ts +16 -0
- package/dist/types/primitives/badge/index.d.ts +2 -0
- package/dist/types/primitives/button/Button.d.ts +13 -0
- package/dist/types/primitives/button/index.d.ts +2 -0
- package/dist/types/primitives/checkbox/Checkbox.d.ts +9 -0
- package/dist/types/primitives/checkbox/index.d.ts +2 -0
- package/dist/types/primitives/dialog/CloseGlyph.d.ts +1 -0
- package/dist/types/primitives/dialog/Dialog.d.ts +18 -0
- package/dist/types/primitives/dialog/index.d.ts +2 -0
- package/dist/types/primitives/field/Field.d.ts +22 -0
- package/dist/types/primitives/field/index.d.ts +2 -0
- package/dist/types/primitives/icon-button/IconButton.d.ts +10 -0
- package/dist/types/primitives/icon-button/index.d.ts +2 -0
- package/dist/types/primitives/index.d.ts +19 -0
- package/dist/types/primitives/key-value/KeyValue.d.ts +24 -0
- package/dist/types/primitives/key-value/index.d.ts +2 -0
- package/dist/types/primitives/panel/Panel.d.ts +13 -0
- package/dist/types/primitives/panel/index.d.ts +2 -0
- package/dist/types/primitives/panel/scroll-focus.d.ts +5 -0
- package/dist/types/primitives/pill/Pill.d.ts +20 -0
- package/dist/types/primitives/pill/index.d.ts +2 -0
- package/dist/types/primitives/section-title/SectionTitle.d.ts +14 -0
- package/dist/types/primitives/section-title/index.d.ts +2 -0
- package/dist/types/primitives/select/Select.d.ts +8 -0
- package/dist/types/primitives/select/index.d.ts +2 -0
- package/dist/types/primitives/sheet/Sheet.d.ts +23 -0
- package/dist/types/primitives/sheet/index.d.ts +2 -0
- package/dist/types/primitives/spinner/Spinner.d.ts +7 -0
- package/dist/types/primitives/spinner/index.d.ts +2 -0
- package/dist/types/primitives/splitter/Splitter.d.ts +25 -0
- package/dist/types/primitives/splitter/index.d.ts +2 -0
- package/dist/types/primitives/splitter/splitter-math.d.ts +19 -0
- package/dist/types/primitives/text-input/TextInput.d.ts +8 -0
- package/dist/types/primitives/text-input/index.d.ts +2 -0
- package/dist/types/primitives/theme-switch/ThemeSwitch.d.ts +28 -0
- package/dist/types/primitives/theme-switch/index.d.ts +2 -0
- package/dist/types/primitives/tool-group/ToolGroup.d.ts +5 -0
- package/dist/types/primitives/tool-group/index.d.ts +2 -0
- package/dist/types/primitives/toolbar/Toolbar.d.ts +11 -0
- package/dist/types/primitives/toolbar/index.d.ts +2 -0
- package/dist/types/primitives/toolbar/roving.d.ts +14 -0
- package/dist/types/primitives/warn-mark/WarnMark.d.ts +11 -0
- package/dist/types/primitives/warn-mark/index.d.ts +2 -0
- package/dist/types/shell/index.d.ts +1 -0
- package/package.json +121 -4
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import "./KeyValue.css";
|
|
3
|
+
/** The tones a value draws in; any other string leaves it plain. */
|
|
4
|
+
export type KeyValueTone = "ok" | "warn" | "err" | "quiet" | "off" | (string & {});
|
|
5
|
+
export type KeyValueRow = {
|
|
6
|
+
/** The fact's name. */
|
|
7
|
+
key: string;
|
|
8
|
+
/** Its value. */
|
|
9
|
+
value: ReactNode;
|
|
10
|
+
/** Colours the value: a fact that is wrong or worth a look. */
|
|
11
|
+
tone?: KeyValueTone;
|
|
12
|
+
/** Shown on hover over the key: what the fact means. */
|
|
13
|
+
title?: string;
|
|
14
|
+
};
|
|
15
|
+
export type KeyValueProps = {
|
|
16
|
+
/** The facts, in order. */
|
|
17
|
+
rows: readonly KeyValueRow[];
|
|
18
|
+
/** Names the list for screen readers when no heading does. */
|
|
19
|
+
label?: string;
|
|
20
|
+
/** A class added to the list. */
|
|
21
|
+
className?: string;
|
|
22
|
+
};
|
|
23
|
+
/** Draws facts as keys and their values, side by side. */
|
|
24
|
+
export declare function KeyValue({ rows, label, className }: KeyValueProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
import "./Panel.css";
|
|
3
|
+
export type PanelProps = Omit<ComponentPropsWithRef<"section">, "title"> & {
|
|
4
|
+
/** The panel's heading; it also names the region. Without one, name it with aria-label. */
|
|
5
|
+
title?: ReactNode;
|
|
6
|
+
/** Slot at the header's far end: buttons, a count, a close button. */
|
|
7
|
+
actions?: ReactNode;
|
|
8
|
+
/** The title's heading level, h1 to h6; h2 by default. */
|
|
9
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
/** Draws a titled region with its actions and a body that scrolls. */
|
|
13
|
+
export declare function Panel({ title, actions, level, className, children, ...rest }: PanelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
/** Whether `box`'s content is taller or wider than the box. */
|
|
3
|
+
export declare function overflows(box: HTMLElement): boolean;
|
|
4
|
+
/** Makes `ref`'s box focusable exactly while it overflows, watching its size and its content. */
|
|
5
|
+
export declare function useScrollFocus(ref: RefObject<HTMLElement | null>): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import "./Pill.css";
|
|
3
|
+
/** The tones a pill draws; any other string is drawn neutrally. */
|
|
4
|
+
export type PillTone = "ok" | "warn" | "err" | "quiet" | "off" | (string & {});
|
|
5
|
+
export type PillProps = {
|
|
6
|
+
/** The state's tone: the dot's and the word's colour. */
|
|
7
|
+
tone: PillTone;
|
|
8
|
+
/** The state in words, always shown beside the dot. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Pulses the dot (never the word) while the state is on its way, such as "starting"; stops under reduced motion. */
|
|
11
|
+
pulse?: boolean;
|
|
12
|
+
/** Shown on hover: what the state means or why it is so. */
|
|
13
|
+
title?: string;
|
|
14
|
+
/** After the word, in code type: a failure's code, say. */
|
|
15
|
+
detail?: ReactNode;
|
|
16
|
+
/** A class added to the pill. */
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
/** Draws a state as a dot and its word, in the state's tone. */
|
|
20
|
+
export declare function Pill({ tone, label, pulse, title, detail, className }: PillProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import "./SectionTitle.css";
|
|
3
|
+
export type SectionTitleProps = {
|
|
4
|
+
/** The title. */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Slot at the title's far end: buttons, a count, a badge. */
|
|
7
|
+
actions?: ReactNode;
|
|
8
|
+
/** The heading's level, h2 to h6. */
|
|
9
|
+
level?: 2 | 3 | 4 | 5 | 6;
|
|
10
|
+
/** A class added to the title's row. */
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
/** Draws a section's heading, with its actions at the far end. */
|
|
14
|
+
export declare function SectionTitle({ children, actions, level, className }: SectionTitleProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import "./Select.css";
|
|
3
|
+
/** ui (the default) or code, the monospace face for values written as code; others draw as ui. */
|
|
4
|
+
export type SelectFont = "ui" | "code" | (string & {});
|
|
5
|
+
export type SelectProps = ComponentPropsWithRef<"select"> & {
|
|
6
|
+
font?: SelectFont;
|
|
7
|
+
};
|
|
8
|
+
export declare function Select({ font, className, children, ...rest }: SelectProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import "./Sheet.css";
|
|
3
|
+
export type SheetSide = "right" | "bottom";
|
|
4
|
+
export type SheetProps = {
|
|
5
|
+
/** Whether the sheet is shown; the app holds it. */
|
|
6
|
+
open: boolean;
|
|
7
|
+
/** Asked for on Escape inside the sheet and on its close button. */
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
/** The edge it is drawn from: the right edge (the default) or the bottom. */
|
|
10
|
+
side?: SheetSide;
|
|
11
|
+
/** The sheet's title, which also names it for screen readers; without one, name it with `label`. */
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
/** The sheet's name for screen readers when it has no title. */
|
|
14
|
+
label?: string;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/** A right sheet's width in px, held to 280–560 px and to 48 px short of its container. */
|
|
17
|
+
width?: number;
|
|
18
|
+
/** The close button's name: "Close". */
|
|
19
|
+
closeLabel?: string;
|
|
20
|
+
/** A class added to the sheet. */
|
|
21
|
+
className?: string;
|
|
22
|
+
};
|
|
23
|
+
export declare function Sheet({ open, ...rest }: SheetProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import "./Spinner.css";
|
|
3
|
+
export type SpinnerProps = Omit<ComponentPropsWithRef<"span">, "children"> & {
|
|
4
|
+
/** What is being waited for, read by screen readers; without it the spinner is hidden from them. */
|
|
5
|
+
label?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function Spinner({ label, className, ...rest }: SpinnerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
import "./Splitter.css";
|
|
3
|
+
/** vertical: a vertical bar that resizes a width; horizontal: a horizontal bar that resizes a height. */
|
|
4
|
+
export type SplitterOrientation = "vertical" | "horizontal";
|
|
5
|
+
/** The edge of the resized pane the splitter sits on: start is its left or top, end its right or bottom. */
|
|
6
|
+
export type SplitterEdge = "start" | "end";
|
|
7
|
+
export type SplitterProps = Omit<ComponentPropsWithRef<"div">, "onChange" | "children" | "role" | "aria-orientation" | "aria-valuenow" | "aria-valuemin" | "aria-valuemax"> & {
|
|
8
|
+
orientation: SplitterOrientation;
|
|
9
|
+
/** The pane's size in px. */
|
|
10
|
+
value: number;
|
|
11
|
+
/** The smallest size in px. */
|
|
12
|
+
min: number;
|
|
13
|
+
/** The largest size in px. */
|
|
14
|
+
max: number;
|
|
15
|
+
/** A new size, in whole px within min and max. */
|
|
16
|
+
onChange: (px: number) => void;
|
|
17
|
+
/** The separator's accessible name, such as "Resize the inspector". */
|
|
18
|
+
label: string;
|
|
19
|
+
/** Which edge of the pane it sits on; start (left or top) by default, where moving left or up grows the pane. */
|
|
20
|
+
edge?: SplitterEdge;
|
|
21
|
+
/** How far one arrow key moves it, in px; 16 by default. */
|
|
22
|
+
step?: number;
|
|
23
|
+
};
|
|
24
|
+
/** Draws a pane's resize handle, dragged by pointer or moved by keys. */
|
|
25
|
+
export declare function Splitter({ orientation, value, min, max, onChange, label, edge, step, className, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, onKeyDown, ...rest }: SplitterProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** The smallest and largest size, in px. */
|
|
2
|
+
export interface Bounds {
|
|
3
|
+
min: number;
|
|
4
|
+
max: number;
|
|
5
|
+
}
|
|
6
|
+
/** `value` within `bounds`, in whole px. A max below the min is read as the min. */
|
|
7
|
+
export declare function clamp(value: number, bounds: Bounds): number;
|
|
8
|
+
/**
|
|
9
|
+
* A drag: the size at the drag's start plus the pointer's travel times `sign`, clamped. The sign is -1 for a splitter on
|
|
10
|
+
* the start edge (left or top) of what it resizes, where moving left or up grows it, and 1 on the end edge.
|
|
11
|
+
*/
|
|
12
|
+
export declare function dragged(start: number, travel: number, sign: 1 | -1, bounds: Bounds): number;
|
|
13
|
+
/** Which arrow grows what the splitter resizes, from its orientation and the edge it sits on. */
|
|
14
|
+
export declare function growKey(orientation: "vertical" | "horizontal", edge: "start" | "end"): string;
|
|
15
|
+
/**
|
|
16
|
+
* A key on a focused splitter: `grow` adds `step` and its opposite arrow takes it away, clamped; Home goes to the min
|
|
17
|
+
* and End to the max; any other key gives undefined (the key is not the splitter's).
|
|
18
|
+
*/
|
|
19
|
+
export declare function keyed(value: number, key: string, grow: string, step: number, bounds: Bounds): number | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import "./TextInput.css";
|
|
3
|
+
/** ui (the default) or code, the monospace face for values written as code; others draw as ui. */
|
|
4
|
+
export type TextInputFont = "ui" | "code" | (string & {});
|
|
5
|
+
export type TextInputProps = ComponentPropsWithRef<"input"> & {
|
|
6
|
+
font?: TextInputFont;
|
|
7
|
+
};
|
|
8
|
+
export declare function TextInput({ font, type, className, ...rest }: TextInputProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import type { ThemeChoice } from "../../hooks/use-theme/useTheme";
|
|
3
|
+
import "./ThemeSwitch.css";
|
|
4
|
+
export type { ThemeChoice };
|
|
5
|
+
/** The switch's words, each replaceable. */
|
|
6
|
+
export interface ThemeSwitchLabels {
|
|
7
|
+
/** What the switch is: "Theme". */
|
|
8
|
+
theme: string;
|
|
9
|
+
system: string;
|
|
10
|
+
light: string;
|
|
11
|
+
dark: string;
|
|
12
|
+
/** Said of system in the tooltip: "follows the system's setting". */
|
|
13
|
+
systemHint: string;
|
|
14
|
+
/** Before the next choice in the tooltip: "click for". */
|
|
15
|
+
clickFor: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const defaultThemeSwitchLabels: ThemeSwitchLabels;
|
|
18
|
+
export type ThemeSwitchProps = Omit<ComponentPropsWithRef<"button">, "children" | "onClick" | "type" | "title"> & {
|
|
19
|
+
/** The theme now. */
|
|
20
|
+
choice: ThemeChoice;
|
|
21
|
+
/** Called with the next choice in the cycle when the switch is pressed. */
|
|
22
|
+
onChoose: (next: ThemeChoice) => void;
|
|
23
|
+
/** Words to replace; the rest keep their defaults. */
|
|
24
|
+
labels?: Partial<ThemeSwitchLabels>;
|
|
25
|
+
};
|
|
26
|
+
/** The switch's tooltip: what the theme is and what a press does. */
|
|
27
|
+
export declare function themeSwitchTitle(choice: ThemeChoice, labels?: ThemeSwitchLabels): string;
|
|
28
|
+
export declare function ThemeSwitch({ choice, onChoose, labels, className, ...rest }: ThemeSwitchProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ToolbarProps } from "../toolbar";
|
|
2
|
+
import "./ToolGroup.css";
|
|
3
|
+
export type ToolGroupProps = ToolbarProps;
|
|
4
|
+
/** Draws a framed group of square tool buttons, one tab stop with roving focus. */
|
|
5
|
+
export declare function ToolGroup({ className, ...rest }: ToolGroupProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
import "./Toolbar.css";
|
|
3
|
+
export type ToolbarOrientation = "horizontal" | "vertical";
|
|
4
|
+
export type ToolbarProps = Omit<ComponentPropsWithRef<"div">, "role" | "aria-orientation"> & {
|
|
5
|
+
/** The toolbar's accessible name, such as "Canvas". */
|
|
6
|
+
label: string;
|
|
7
|
+
/** horizontal (the default) moves with the left and right arrows; vertical with up and down. */
|
|
8
|
+
orientation?: ToolbarOrientation;
|
|
9
|
+
};
|
|
10
|
+
/** Draws a group of controls as one tab stop, with the arrow keys moving between them. */
|
|
11
|
+
export declare function Toolbar({ label, orientation, className, ref, onKeyDown, onFocus, children, ...rest }: ToolbarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** What counts as an item: an enabled control, or anything that says it is a button, checkbox or radio. */
|
|
2
|
+
export declare const itemSelector: string;
|
|
3
|
+
/** The toolbar's items, in document order, leaving out those of a toolbar nested inside it. */
|
|
4
|
+
export declare function items(toolbar: HTMLElement): HTMLElement[];
|
|
5
|
+
/** Gives `current` the one tab stop (0) and every other item -1; with no current, the first item takes it. */
|
|
6
|
+
export declare function setTabStop(all: readonly HTMLElement[], current: HTMLElement | null): HTMLElement | null;
|
|
7
|
+
/**
|
|
8
|
+
* The item a key moves the focus to from `index`, or undefined when the key is not the toolbar's. Horizontal toolbars
|
|
9
|
+
* take the left and right arrows (swapped right to left), vertical ones up and down; both take Home and End. The ends
|
|
10
|
+
* wrap around.
|
|
11
|
+
*/
|
|
12
|
+
export declare function moved(index: number, count: number, key: string, orientation: "horizontal" | "vertical", rtl: boolean): number | undefined;
|
|
13
|
+
/** Whether a key pressed in `element` belongs to the text it edits (arrows, Home and End move its caret). */
|
|
14
|
+
export declare function editsText(element: Element): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./WarnMark.css";
|
|
2
|
+
export type WarnMarkProps = {
|
|
3
|
+
/** What the mark means, read by screen readers in its place. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Shown on hover over the mark. */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** A class added to the mark. */
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
/** Draws a warning "!" for the eye and its words for screen readers. */
|
|
11
|
+
export declare function WarnMark({ label, title, className }: WarnMarkProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,123 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcurcio/patchbay",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A React component library for graph-based editors and live dashboards: design tokens and themes, primitives, and React Flow graph components",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"components",
|
|
8
|
+
"design-tokens",
|
|
9
|
+
"theming",
|
|
10
|
+
"react-flow",
|
|
11
|
+
"graph-editor",
|
|
12
|
+
"node-editor",
|
|
13
|
+
"accessibility"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"author": "Matt Curcio",
|
|
17
|
+
"homepage": "https://github.com/mcurcio/patchbay#readme",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/mcurcio/patchbay/issues"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/mcurcio/patchbay.git"
|
|
24
|
+
},
|
|
25
|
+
"type": "module",
|
|
26
|
+
"private": false,
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public",
|
|
29
|
+
"provenance": true
|
|
30
|
+
},
|
|
31
|
+
"packageManager": "pnpm@12.15.0",
|
|
32
|
+
"files": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"sideEffects": [
|
|
36
|
+
"**/*.css"
|
|
37
|
+
],
|
|
38
|
+
"exports": {
|
|
39
|
+
"./tokens.css": "./dist/tokens.css",
|
|
40
|
+
"./base.css": "./dist/base.css",
|
|
41
|
+
"./primitives": {
|
|
42
|
+
"types": "./dist/types/primitives/index.d.ts",
|
|
43
|
+
"default": "./dist/primitives.js"
|
|
44
|
+
},
|
|
45
|
+
"./composites": {
|
|
46
|
+
"types": "./dist/types/composites/index.d.ts",
|
|
47
|
+
"default": "./dist/composites.js"
|
|
48
|
+
},
|
|
49
|
+
"./shell": {
|
|
50
|
+
"types": "./dist/types/shell/index.d.ts",
|
|
51
|
+
"default": "./dist/shell.js"
|
|
52
|
+
},
|
|
53
|
+
"./graph": {
|
|
54
|
+
"types": "./dist/types/graph/index.d.ts",
|
|
55
|
+
"default": "./dist/graph.js"
|
|
56
|
+
},
|
|
57
|
+
"./hooks": {
|
|
58
|
+
"types": "./dist/types/hooks/index.d.ts",
|
|
59
|
+
"default": "./dist/hooks.js"
|
|
60
|
+
},
|
|
61
|
+
"./package.json": "./package.json"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "vite build && tsc -p tsconfig.build.json",
|
|
65
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
66
|
+
"test": "vitest run --project unit",
|
|
67
|
+
"test:watch": "vitest --project unit",
|
|
68
|
+
"lint": "eslint .",
|
|
69
|
+
"format": "prettier --write .",
|
|
70
|
+
"format:check": "prettier --check .",
|
|
71
|
+
"storybook": "storybook dev --port 6006",
|
|
72
|
+
"build-storybook": "storybook build",
|
|
73
|
+
"test-storybook": "vitest run --project storybook",
|
|
74
|
+
"check": "pnpm typecheck && pnpm lint && pnpm format:check && pnpm test && pnpm build"
|
|
75
|
+
},
|
|
76
|
+
"peerDependencies": {
|
|
77
|
+
"@xyflow/react": "^12.0.0",
|
|
78
|
+
"knobly": "^1.0.0",
|
|
79
|
+
"react": "^19.0.0",
|
|
80
|
+
"react-dom": "^19.0.0"
|
|
81
|
+
},
|
|
82
|
+
"peerDependenciesMeta": {
|
|
83
|
+
"@xyflow/react": {
|
|
84
|
+
"optional": true
|
|
85
|
+
},
|
|
86
|
+
"knobly": {
|
|
87
|
+
"optional": true
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"devDependencies": {
|
|
91
|
+
"@eslint/js": "^10.0.1",
|
|
92
|
+
"@storybook/addon-a11y": "^10.6.8",
|
|
93
|
+
"@storybook/addon-docs": "^10.6.8",
|
|
94
|
+
"@storybook/addon-vitest": "^10.6.8",
|
|
95
|
+
"@storybook/react-vite": "^10.6.8",
|
|
96
|
+
"@testing-library/dom": "^10.4.2",
|
|
97
|
+
"@testing-library/jest-dom": "^8.0.0",
|
|
98
|
+
"@testing-library/react": "^16.3.3",
|
|
99
|
+
"@testing-library/user-event": "^14.6.13",
|
|
100
|
+
"@types/node": "^24.19.2",
|
|
101
|
+
"@types/react": "^19.3.0",
|
|
102
|
+
"@types/react-dom": "^19.3.0",
|
|
103
|
+
"@vitejs/plugin-react": "^6.3.0",
|
|
104
|
+
"@vitest/browser": "^5.1.1",
|
|
105
|
+
"@vitest/browser-playwright": "^5.1.1",
|
|
106
|
+
"@xyflow/react": "^12.12.1",
|
|
107
|
+
"eslint": "^10.15.0",
|
|
108
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
109
|
+
"eslint-plugin-storybook": "^10.6.8",
|
|
110
|
+
"globals": "^17.14.0",
|
|
111
|
+
"jsdom": "^31.0.1",
|
|
112
|
+
"knobly": "https://github.com/mcurcio/knobly/releases/download/v1.0.0/knobly-1.0.0.tgz",
|
|
113
|
+
"playwright": "1.63.0",
|
|
114
|
+
"prettier": "^3.10.1",
|
|
115
|
+
"react": "^19.3.1",
|
|
116
|
+
"react-dom": "^19.3.1",
|
|
117
|
+
"storybook": "^10.6.8",
|
|
118
|
+
"typescript": "~6.0.3",
|
|
119
|
+
"typescript-eslint": "^8.74.0",
|
|
120
|
+
"vite": "^8.3.8",
|
|
121
|
+
"vitest": "^5.1.1"
|
|
122
|
+
}
|
|
123
|
+
}
|