@web-noise/core 0.0.12-fix → 0.0.12-fix3

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.
@@ -0,0 +1,348 @@
1
+ import { AudioNodeState, Patch } from "@web-noise/patch";
2
+ import { JSX } from "react/jsx-runtime";
3
+ import { ReactNode, ReactPortal, ComponentProps, ClassAttributes, HTMLAttributes, DetailedHTMLProps, RefAttributes, ForwardRefExoticComponent } from "react";
4
+ import { HandleProps, NodeProps, Edge, Node, Viewport, OnConnect, OnEdgesChange, OnNodesChange, NodeTypes, EdgeProps } from "reactflow";
5
+ import { Theme as _Theme1 } from "@emotion/react";
6
+ import { StyledComponent } from "@emotion/styled";
7
+ import { StateCreator, StoreApi, UseBoundStore } from "zustand";
8
+ import { Delta } from "jsondiffpatch";
9
+ export enum PortType {
10
+ Gate = "gate",
11
+ Number = "number",
12
+ Audio = "audio",
13
+ Any = "any"
14
+ }
15
+ export const useAudioNode: <T = WNAudioNode>(id: string) => AudioNodeState<T> | undefined;
16
+ export const useNode: (id: string) => {
17
+ updateNodeValues: (values: WNNodeData["values"]) => void;
18
+ updateNodeConfig: (config: WNNodeData["config"]) => void;
19
+ updateNodeLabel: (label: string) => void;
20
+ };
21
+ export const theme: {
22
+ colors: {
23
+ readonly elevation1: "#292d39";
24
+ readonly elevation2: "#181c20";
25
+ readonly elevation3: "#373c4b";
26
+ readonly accent1: "#0066dc";
27
+ readonly accent2: "#007bff";
28
+ readonly accent3: "#3c93ff";
29
+ readonly highlight1: "#535760";
30
+ readonly highlight2: "#8c92a4";
31
+ readonly highlight3: "#fefefe";
32
+ readonly vivid1: "#14df42";
33
+ readonly whitePrimary: "#ffffff";
34
+ readonly error: "#db5353";
35
+ };
36
+ zIndex: {
37
+ readonly modal: 9998;
38
+ readonly controlPanel: 9999;
39
+ readonly resumeContextLayout: 10003;
40
+ };
41
+ };
42
+ export type Theme = typeof theme;
43
+ export const useTheme: () => Theme;
44
+ interface EditableLabelProps {
45
+ onChange: (value: string) => void;
46
+ value?: string;
47
+ className?: string;
48
+ }
49
+ export const EditableLabel: ({ onChange, value, className, }: EditableLabelProps) => JSX.Element;
50
+ interface ModalProps {
51
+ onClose?: () => void;
52
+ children: ReactNode;
53
+ }
54
+ export const Modal: ({ children, onClose, ...props }: ModalProps) => ReactPortal;
55
+ export const PortsPanel: StyledComponent<{
56
+ theme?: _Theme1;
57
+ as?: React.ElementType;
58
+ } & ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & {
59
+ theme?: _Theme1;
60
+ } & {
61
+ theme: Theme;
62
+ }, {}, {}>;
63
+ export const InputPorts: StyledComponent<{
64
+ theme?: _Theme1;
65
+ as?: React.ElementType;
66
+ }, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
67
+ export const OutputPorts: StyledComponent<{
68
+ theme?: _Theme1;
69
+ as?: React.ElementType;
70
+ }, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
71
+ export const Port: StyledComponent<{
72
+ theme?: _Theme1;
73
+ as?: React.ElementType;
74
+ }, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
75
+ declare const StyledInputHandle: ForwardRefExoticComponent<Pick<Pick<HandleProps & Omit<HTMLAttributes<HTMLDivElement>, "id"> & RefAttributes<HTMLDivElement> & {
76
+ theme?: _Theme1;
77
+ } & {
78
+ portType?: AudioPort["type"];
79
+ theme: Theme;
80
+ }, "slot" | "style" | "title" | "onChange" | "className" | "color" | "hidden" | "onDoubleClick" | "onBlur" | "onKeyDown" | "content" | "translate" | "children" | "onClick" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | keyof HandleProps | keyof RefAttributes<HTMLDivElement> | "portType"> & {
81
+ theme?: _Theme1;
82
+ } & {
83
+ theme?: _Theme1;
84
+ }, "slot" | "style" | "title" | "onChange" | "className" | "color" | "hidden" | "onDoubleClick" | "onBlur" | "onKeyDown" | "content" | "translate" | "children" | "onClick" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | keyof HandleProps | keyof RefAttributes<HTMLDivElement> | "portType"> & {
85
+ theme?: _Theme1;
86
+ }>;
87
+ export const InputHandle: ({ ...props }: Partial<HandleProps & ComponentProps<typeof StyledInputHandle>>) => JSX.Element;
88
+ declare const StyledOutputHandle: ForwardRefExoticComponent<Pick<Pick<HandleProps & Omit<HTMLAttributes<HTMLDivElement>, "id"> & RefAttributes<HTMLDivElement> & {
89
+ theme?: _Theme1;
90
+ } & {
91
+ portType?: AudioPort["type"];
92
+ theme: Theme;
93
+ }, "slot" | "style" | "title" | "onChange" | "className" | "color" | "hidden" | "onDoubleClick" | "onBlur" | "onKeyDown" | "content" | "translate" | "children" | "onClick" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | keyof HandleProps | keyof RefAttributes<HTMLDivElement> | "portType"> & {
94
+ theme?: _Theme1;
95
+ } & {
96
+ theme?: _Theme1;
97
+ }, "slot" | "style" | "title" | "onChange" | "className" | "color" | "hidden" | "onDoubleClick" | "onBlur" | "onKeyDown" | "content" | "translate" | "children" | "onClick" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | keyof HandleProps | keyof RefAttributes<HTMLDivElement> | "portType"> & {
98
+ theme?: _Theme1;
99
+ }>;
100
+ export const OutputHandle: (props: Partial<HandleProps & ComponentProps<typeof StyledOutputHandle>>) => JSX.Element;
101
+ export type WNNodeProps<T = Record<string, unknown>> = NodeProps<T & WNNodeData>;
102
+ interface TitleBarProps {
103
+ className?: string;
104
+ [key: string]: unknown;
105
+ }
106
+ export const TitleBar: ({ className, ...props }: TitleBarProps) => JSX.Element;
107
+ interface WNNodeParameters extends NodeProps {
108
+ children?: any;
109
+ }
110
+ export const WNNode: (props: WNNodeParameters) => JSX.Element;
111
+ type AudioNodeChannel = [AudioNode, number];
112
+ interface AudioPort {
113
+ aliases?: string[];
114
+ type?: PortType | PortType[];
115
+ range?: [number, number];
116
+ defaultValue?: number;
117
+ mono?: boolean;
118
+ }
119
+ export interface InputPort extends AudioPort {
120
+ port: AudioNode | AudioNodeChannel | AudioParam;
121
+ }
122
+ export interface OutputPort extends AudioPort {
123
+ port: AudioNode | AudioNodeChannel;
124
+ }
125
+ export interface WNAudioNode extends Record<string, any> {
126
+ inputs?: Record<string, InputPort | never>;
127
+ outputs?: Record<string, OutputPort | never>;
128
+ destroy?: () => void;
129
+ setValues?: (values?: any) => void;
130
+ }
131
+ export type CreateWNAudioNode<T = WNAudioNode> = (audioContext: AudioContext, data?: WNNodeData) => T | Promise<T>;
132
+ type NodeDefaultConfig = {
133
+ size?: {
134
+ width: number;
135
+ height: number;
136
+ };
137
+ };
138
+ export interface WNNodeData<Values = Record<string, unknown>, Config = Record<string, unknown>> {
139
+ label: string;
140
+ values?: Values;
141
+ config?: Config & NodeDefaultConfig;
142
+ }
143
+ export type TWNNode = Node<WNNodeData>;
144
+ export type TWNEdge = Edge;
145
+ interface GraphState {
146
+ nodes: TWNNode[];
147
+ edges: TWNEdge[];
148
+ }
149
+ type ControlPanelNodes = Array<{
150
+ id: TWNNode["id"];
151
+ width?: number;
152
+ height?: number;
153
+ x?: number;
154
+ y?: number;
155
+ }>;
156
+ interface ControlPanelState {
157
+ show: boolean;
158
+ nodes: ControlPanelNodes;
159
+ size: {
160
+ width: number;
161
+ height: number;
162
+ };
163
+ }
164
+ export interface EditorStoreState extends GraphState {
165
+ controlPanel: ControlPanelState;
166
+ }
167
+ export interface EditorState extends EditorStoreState {
168
+ viewport: Viewport;
169
+ }
170
+ interface EditorFile {
171
+ id: string;
172
+ name?: string;
173
+ type: "patch" | never;
174
+ file: EditorState;
175
+ }
176
+ interface AudioFile {
177
+ id: string;
178
+ name?: string;
179
+ type: "audio";
180
+ file: string;
181
+ }
182
+ type ProjectFile = EditorFile | AudioFile;
183
+ export interface Project {
184
+ files: Array<ProjectFile>;
185
+ }
186
+ export interface ControlPanelNodeProps {
187
+ node: TWNNode;
188
+ audioNode?: WNAudioNode | null;
189
+ updateNodeValues?: (param: any) => void;
190
+ }
191
+ export type ControlPanelNode = any;
192
+ type ConfigNode = (props: WNNodeProps<WNNodeData>) => any;
193
+ export interface PluginComponent {
194
+ id?: string;
195
+ type: string;
196
+ node: any;
197
+ audioNode: CreateWNAudioNode | false;
198
+ controlPanelNode?: ControlPanelNode;
199
+ configNode?: ConfigNode;
200
+ defaultConfig?: any;
201
+ resizable?: boolean;
202
+ description?: string;
203
+ portsDescription?: {
204
+ inputs?: Record<string, string>;
205
+ outputs?: Record<string, string>;
206
+ };
207
+ name?: string;
208
+ info?: string;
209
+ tags?: string[];
210
+ }
211
+ export interface PluginConfig {
212
+ id?: string;
213
+ components: Array<PluginComponent>;
214
+ name?: string;
215
+ description?: string;
216
+ }
217
+ interface NodesState {
218
+ nodes: TWNNode[];
219
+ edges: TWNEdge[];
220
+ onNodesChange: OnNodesChange;
221
+ onEdgesChange: OnEdgesChange;
222
+ onConnect: OnConnect;
223
+ addNode: (node: TWNNode) => void;
224
+ setNodes: (nodes: TWNNode[]) => void;
225
+ setEdges: (edges: TWNEdge[]) => void;
226
+ setNodesAndEdges: (elements: GraphState) => void;
227
+ getNodesAndEdges: () => GraphState;
228
+ clearElements: () => void;
229
+ getNode: (id: string) => TWNNode | null;
230
+ updateNodeData: (id: string, data: Partial<WNNodeData>) => void;
231
+ nodeTypes: NodeTypes;
232
+ setNodeTypes: (nodeTypes: NodeTypes) => void;
233
+ }
234
+ interface HistoryState {
235
+ history: {
236
+ maxHistoryLength: number;
237
+ buffer: Array<Delta>;
238
+ pointer: number;
239
+ skipCollect: boolean;
240
+ push: (changes: Delta) => void;
241
+ back: () => void;
242
+ forward: () => void;
243
+ clear: () => void;
244
+ };
245
+ }
246
+ type StoreStateCreator = StateCreator<StoreState>;
247
+ declare const history: (config: StoreStateCreator) => StoreStateCreator;
248
+ interface AudioPatchState {
249
+ patch: Patch;
250
+ nodesState: Record<string, any>;
251
+ }
252
+ export const isPatch: (file: ProjectFile) => file is EditorFile;
253
+ export const isAudio: (file: ProjectFile) => file is AudioFile;
254
+ interface ProjectState {
255
+ project: Project;
256
+ setProject: (project: Project) => void;
257
+ getProject: () => Project;
258
+ pullEditorChanges: () => void;
259
+ syncEditorWithCurrentFile: () => void;
260
+ currentFileIndex: number;
261
+ setCurrentFileIndex: (index: number) => void;
262
+ updateFileContent: (fileIndex: number, file: ProjectFile) => void;
263
+ updateFileName: (fileIndex: number, fileName: string) => void;
264
+ addFile: (file: ProjectFile, name?: string) => void;
265
+ deleteFile: (fileIndex: number) => void;
266
+ }
267
+ interface EditorConfig {
268
+ showMinimap: boolean;
269
+ }
270
+ type NodesConfiguration = Record<string, PluginComponent>;
271
+ type StoreState = NodesState & HistoryState & ProjectState & AudioPatchState & {
272
+ setGraph: (elements: {
273
+ nodes: TWNNode[];
274
+ edges: TWNEdge[];
275
+ }) => Promise<void>;
276
+ clearGraph: () => void;
277
+ createNode: (node: TWNNode) => void;
278
+ createNodes: (node: TWNNode[]) => Promise<void>;
279
+ removeNode: (node: TWNNode) => void;
280
+ removeNodes: (nodes: TWNNode[]) => void;
281
+ removeEdges: (nodes: TWNEdge[]) => void;
282
+ onConnect: OnConnect;
283
+ createEdges: (edge: TWNEdge[]) => void;
284
+ onEdgesDelete: (edges: TWNEdge[]) => void;
285
+ onNodesDelete: (nodes: TWNNode[]) => Promise<void>;
286
+ plugins: Array<PluginConfig>;
287
+ setPlugins: (plugins: Array<PluginConfig>) => void;
288
+ nodesConfiguration: NodesConfiguration;
289
+ config: EditorConfig;
290
+ setConfig: (config: Partial<EditorConfig>) => void;
291
+ getEditorState: () => EditorState;
292
+ setEditorState: (state: EditorState) => Promise<void>;
293
+ isHelpShown: boolean;
294
+ toggleHelp: () => void;
295
+ copyBuffer: {
296
+ nodes: TWNNode[];
297
+ edges: TWNEdge[];
298
+ };
299
+ copy: (elements: {
300
+ nodes: TWNNode[];
301
+ edges: TWNEdge[];
302
+ }) => void;
303
+ copySelectedItems: () => void;
304
+ pasteBuffer: (x: number, y: number) => void;
305
+ getControlPanelNode: (node: TWNNode) => ControlPanelNode | null;
306
+ controlPanel: ControlPanelState;
307
+ setControlPanelNodes: (nodes: ControlPanelNodes) => void;
308
+ showControlPanel: () => void;
309
+ hideControlPanel: () => void;
310
+ setControlPanelSize: (width: {
311
+ width: number;
312
+ height: number;
313
+ }) => void;
314
+ addNodeToControlPanel: (node: TWNNode) => void;
315
+ removeNodeFromControlPanel: (node: TWNNode) => void;
316
+ removeNodesFromControlPanel: (nodes: TWNNode[]) => void;
317
+ viewport: Viewport;
318
+ setViewport: (viewport: Viewport) => void;
319
+ };
320
+ export const useStore: UseBoundStore<StoreApi<StoreState>>;
321
+ export const Wire: ({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, style, data, markerStart, markerEnd, source, target, sourceHandleId, targetHandleId, selected, }: EdgeProps) => JSX.Element;
322
+ export const EDITOR_DEFAULTS: {
323
+ nodes: never[];
324
+ edges: never[];
325
+ controlPanel: {
326
+ nodes: never[];
327
+ show: boolean;
328
+ size: {
329
+ width: number;
330
+ height: number;
331
+ };
332
+ };
333
+ viewport: {
334
+ x: number;
335
+ y: number;
336
+ zoom: number;
337
+ };
338
+ };
339
+ interface AppProps {
340
+ projectState?: Project;
341
+ plugins?: Array<PluginConfig>;
342
+ editorContextMenu?: Array<ReactNode>;
343
+ onChange?: ({ nodes, edges, controlPanel }: EditorState) => void;
344
+ theme?: Theme;
345
+ }
346
+ export const Editor: ({ ...props }: AppProps) => JSX.Element;
347
+
348
+ //# sourceMappingURL=types.d.ts.map