@objectifthunes/whiteboard 0.1.1 → 0.2.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 CHANGED
@@ -1,185 +1,618 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as react from 'react';
3
- import { ReactNode, MutableRefObject, Component } from 'react';
4
- import * as zustand from 'zustand';
5
-
6
- interface Props$5 {
7
- children: ReactNode;
8
- showMinimap?: boolean;
9
- minimapLoading?: boolean;
10
- /** Extra action buttons rendered inside the ZoomBar (e.g. a theme toggle) */
11
- extraActions?: ReactNode;
12
- }
13
- declare function WhiteboardShell({ children, showMinimap, minimapLoading, extraActions }: Props$5): react_jsx_runtime.JSX.Element;
14
-
15
- type PanelRect = {
16
- x: number;
17
- y: number;
18
- width: number;
19
- height: number;
20
- focusPadding?: number;
21
- focusMaxScale?: number;
22
- };
23
- declare function computeWhiteboardFit(panels: Map<string, PanelRect>, viewportSize: {
24
- width: number;
25
- height: number;
26
- }, padding?: number): {
27
- scale: number;
28
- offset: {
29
- x: number;
30
- y: number;
31
- };
32
- } | null;
33
- declare function computeWhiteboardRectFocus(rect: PanelRect, viewportSize: {
34
- width: number;
35
- height: number;
36
- }, padding?: number, maxScale?: number): {
37
- scale: number;
38
- offset: {
39
- x: number;
40
- y: number;
41
- };
42
- };
43
- interface WhiteboardStore {
44
- offset: {
45
- x: number;
46
- y: number;
47
- };
48
- scale: number;
49
- viewportSize: {
50
- width: number;
51
- height: number;
52
- };
53
- snapToGrid: boolean;
54
- snapGridSize: number;
55
- panels: Map<string, PanelRect>;
56
- resetFns: Map<string, () => void>;
57
- /** Incremented each time the panel registry changes; subscribe to trigger re-renders. */
58
- registryVersion: number;
59
- setOffset: (v: {
60
- x: number;
61
- y: number;
62
- } | ((prev: {
63
- x: number;
64
- y: number;
65
- }) => {
66
- x: number;
67
- y: number;
68
- })) => void;
69
- setScale: (v: number | ((prev: number) => number)) => void;
70
- setViewportSize: (v: {
71
- width: number;
72
- height: number;
73
- }) => void;
74
- setSnapToGrid: (v: boolean | ((prev: boolean) => boolean)) => void;
75
- register: (id: string, rect: PanelRect) => void;
76
- unregister: (id: string) => void;
77
- registerReset: (id: string, fn: () => void) => void;
78
- unregisterReset: (id: string) => void;
79
- fitToContent: () => void;
80
- focusPanel: (rect: PanelRect, options?: {
81
- padding?: number;
82
- maxScale?: number;
83
- }) => void;
84
- resetWidgets: () => void;
85
- /** Call on WhiteboardShell mount to discard any stale state from the previous session. */
86
- resetSession: () => void;
87
- }
88
- declare const useWhiteboardStore: zustand.UseBoundStore<zustand.StoreApi<WhiteboardStore>>;
89
-
90
- interface Props$4 {
91
- title: ReactNode;
92
- defaultPosition: {
93
- x: number;
94
- y: number;
95
- };
96
- width?: number;
97
- className?: string;
98
- /** Ref that stays in sync with the panel's current position and rendered size */
99
- trackRect?: MutableRefObject<PanelRect>;
100
- /** Show a focus button that zooms the whiteboard to this panel */
101
- focusable?: boolean;
102
- /** Optional camera framing controls used by the focus button */
103
- focusPadding?: number;
104
- focusMaxScale?: number;
105
- /** Extra action buttons rendered in the header bar next to the focus button */
106
- headerActions?: ReactNode;
107
- children: ReactNode;
108
- }
109
- declare const FloatingPanel: react.NamedExoticComponent<Props$4>;
110
- /** Helper: create a stable rect ref for use with trackRect */
111
- declare function usePanelRect(initial: {
112
- x: number;
113
- y: number;
114
- }): MutableRefObject<PanelRect>;
115
- /** Get a position just below a tracked panel */
116
- declare function belowPanel(rect: PanelRect, gap?: number): {
117
- x: number;
118
- y: number;
119
- };
120
-
121
- interface Props$3 {
122
- /** Extra action buttons rendered at the bottom of the zoom bar */
123
- extraActions?: ReactNode;
124
- }
125
- declare function ZoomBar({ extraActions }: Props$3): react_jsx_runtime.JSX.Element;
126
-
127
- interface Props$2 {
128
- loading?: boolean;
129
- }
130
- declare function Minimap({ loading }: Props$2): react_jsx_runtime.JSX.Element;
131
-
132
- interface Props$1 {
133
- open: boolean;
134
- title: string;
135
- message: string;
136
- onConfirm: () => void;
137
- onCancel: () => void;
138
- confirmLabel?: string;
139
- loading?: boolean;
140
- error?: string | null;
141
- }
142
- declare function ConfirmDialog({ open, title, message, onConfirm, onCancel, confirmLabel, loading, error, }: Props$1): react.ReactPortal | null;
143
-
144
- interface Props {
145
- children: ReactNode;
146
- fallbackMessage?: string;
147
- }
148
- interface State {
149
- error: Error | null;
150
- }
151
- declare class PanelErrorBoundary extends Component<Props, State> {
152
- state: State;
153
- static getDerivedStateFromError(error: Error): State;
154
- render(): string | number | boolean | react_jsx_runtime.JSX.Element | Iterable<ReactNode> | null | undefined;
155
- }
156
-
157
- type WidthMap = Record<string, number>;
158
- interface UseWhiteboardLayoutOptions<T extends WidthMap> {
159
- widths: T;
160
- startX?: number;
161
- y?: number;
162
- gap?: number;
163
- }
164
- type PositionMap<T extends WidthMap> = {
165
- [K in keyof T]: {
166
- x: number;
167
- y: number;
168
- };
169
- };
170
- declare function useWhiteboardLayout<T extends WidthMap>({ widths, startX, y, gap, }: UseWhiteboardLayoutOptions<T>): {
171
- layout: {
172
- startX: number;
173
- y: number;
174
- gap: number;
175
- };
176
- panelWidth: T;
177
- positions: PositionMap<T>;
178
- };
179
-
180
- declare const WHITEBOARD_GRID = 20;
181
- declare function snapToWhiteboardGrid(value: number): number;
182
-
183
- declare function cn(...args: (string | false | null | undefined)[]): string;
184
-
185
- export { ConfirmDialog, FloatingPanel, Minimap, PanelErrorBoundary, type PanelRect, WHITEBOARD_GRID, WhiteboardShell, type WhiteboardStore, ZoomBar, belowPanel, cn, computeWhiteboardFit, computeWhiteboardRectFocus, snapToWhiteboardGrid, usePanelRect, useWhiteboardLayout, useWhiteboardStore };
1
+ import { ButtonHTMLAttributes } from 'react';
2
+ import { Component } from 'react';
3
+ import { ComponentType } from 'react';
4
+ import { ElementType } from 'react';
5
+ import { ForwardRefExoticComponent } from 'react';
6
+ import { HTMLAttributes } from 'react';
7
+ import { InputHTMLAttributes } from 'react';
8
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
9
+ import { JSXElementConstructor } from 'react';
10
+ import { LabelHTMLAttributes } from 'react';
11
+ import { MutableRefObject } from 'react';
12
+ import { NamedExoticComponent } from 'react';
13
+ import { ReactElement } from 'react';
14
+ import { ReactNode } from 'react';
15
+ import { ReactPortal } from 'react';
16
+ import { RefAttributes } from 'react';
17
+ import { SelectHTMLAttributes } from 'react';
18
+ import { StoreApi } from 'zustand';
19
+ import { TextareaHTMLAttributes } from 'react';
20
+ import { UseBoundStore } from 'zustand';
21
+
22
+ export declare function Alert({ tone, className, ...props }: AlertProps): JSX_2.Element;
23
+
24
+ declare interface AlertProps extends HTMLAttributes<HTMLParagraphElement> {
25
+ tone?: AlertTone;
26
+ }
27
+
28
+ declare type AlertTone = 'error' | 'muted' | 'info' | 'success';
29
+
30
+ export declare function AssetCardSkeleton(): JSX_2.Element;
31
+
32
+ export declare function AssetTitle({ as, clamp, className, ...props }: AssetTitleProps): ReactElement<any, string | JSXElementConstructor<any>>;
33
+
34
+ declare interface AssetTitleProps extends TypographyProps {
35
+ clamp?: boolean;
36
+ }
37
+
38
+ export declare function AvatarSkeleton(props: HTMLAttributes<HTMLDivElement>): JSX_2.Element;
39
+
40
+ /** Get a position just below a tracked panel */
41
+ export declare function belowPanel(rect: PanelRect, gap?: number): {
42
+ x: number;
43
+ y: number;
44
+ };
45
+
46
+ export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
47
+
48
+ declare interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
49
+ variant?: ButtonVariant;
50
+ fullWidth?: boolean;
51
+ iconOnly?: boolean;
52
+ loading?: boolean;
53
+ loadingText?: string;
54
+ }
55
+
56
+ /**
57
+ * A flexible row of buttons with equal sizing. Replaces ALL action-row patterns:
58
+ * `element-actions`, `asset-actions`, `character-actions`, `character-secondary-row`,
59
+ * `editor-header__actions`, `style-picker-actions`, `confirm-actions`, `form-actions`,
60
+ * `lang-batch-actions`, `widget-actions-row`.
61
+ *
62
+ * This replaces the old ActionGroup component which mapped variant strings to CSS classes.
63
+ */
64
+ export declare function ButtonRow({ as, className, ...props }: ButtonRowProps): ReactElement<any, string | JSXElementConstructor<any>>;
65
+
66
+ declare interface ButtonRowProps extends HTMLAttributes<HTMLElement> {
67
+ as?: ElementType;
68
+ }
69
+
70
+ export declare function ButtonSkeleton(props: HTMLAttributes<HTMLDivElement>): JSX_2.Element;
71
+
72
+ declare type ButtonVariant = 'primary' | 'secondary' | 'danger';
73
+
74
+ export declare function CanvasSkeleton(props: HTMLAttributes<HTMLDivElement>): JSX_2.Element;
75
+
76
+ export declare function Chip({ className, ...props }: ChipProps): JSX_2.Element;
77
+
78
+ declare type ChipProps = HTMLAttributes<HTMLSpanElement>;
79
+
80
+ export declare function ChipSkeleton(props: HTMLAttributes<HTMLDivElement>): JSX_2.Element;
81
+
82
+ export declare function ChoiceCard({ active, className, ...props }: ChoiceCardProps): JSX_2.Element;
83
+
84
+ declare interface ChoiceCardProps extends ButtonHTMLAttributes<HTMLButtonElement> {
85
+ active?: boolean;
86
+ }
87
+
88
+ export declare function ChoiceGroup<T extends string>({ options, value, onChange, className, }: ChoiceGroupProps<T>): JSX_2.Element;
89
+
90
+ declare interface ChoiceGroupProps<T extends string> {
91
+ options: ChoiceOption<T>[];
92
+ value: T | null | undefined;
93
+ onChange: (value: T) => void;
94
+ className?: string;
95
+ }
96
+
97
+ export declare function ChoiceGroupSkeleton({ count, className, withDescription }: ChoiceGroupSkeletonProps): JSX_2.Element;
98
+
99
+ declare interface ChoiceGroupSkeletonProps {
100
+ count?: number;
101
+ className?: string;
102
+ withDescription?: boolean;
103
+ }
104
+
105
+ export declare interface ChoiceOption<T extends string> {
106
+ value: T;
107
+ label: ReactNode;
108
+ description?: ReactNode;
109
+ disabled?: boolean;
110
+ }
111
+
112
+ export declare function cn(...args: (string | false | null | undefined)[]): string;
113
+
114
+ export declare function computeWhiteboardFit(panels: Map<string, PanelRect>, viewportSize: {
115
+ width: number;
116
+ height: number;
117
+ }, padding?: number): {
118
+ scale: number;
119
+ offset: {
120
+ x: number;
121
+ y: number;
122
+ };
123
+ } | null;
124
+
125
+ export declare function computeWhiteboardRectFocus(rect: PanelRect, viewportSize: {
126
+ width: number;
127
+ height: number;
128
+ }, padding?: number, maxScale?: number): {
129
+ scale: number;
130
+ offset: {
131
+ x: number;
132
+ y: number;
133
+ };
134
+ };
135
+
136
+ export declare function ConfirmDialog({ open, title, message, onConfirm, onCancel, confirmLabel, loading, error, }: Props_5): ReactPortal | null;
137
+
138
+ /**
139
+ * A 2-column grid for coordinate inputs.
140
+ * Replaces `<div className="coord-grid">`.
141
+ */
142
+ export declare function CoordGrid({ className, ...props }: CoordGridProps): JSX_2.Element;
143
+
144
+ declare interface CoordGridProps extends HTMLAttributes<HTMLDivElement> {
145
+ }
146
+
147
+ /**
148
+ * A labeled coordinate input (x, y, z, scale).
149
+ * Replaces `<label className="coord-input">x <input ...></label>`.
150
+ */
151
+ export declare function CoordInput({ axis, className, ...props }: CoordInputProps): JSX_2.Element;
152
+
153
+ declare interface CoordInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
154
+ axis: string;
155
+ }
156
+
157
+ export declare function EmptyState({ title, description, action }: EmptyStateProps): JSX_2.Element;
158
+
159
+ declare interface EmptyStateProps {
160
+ title: ReactNode;
161
+ description?: ReactNode;
162
+ action?: ReactNode;
163
+ }
164
+
165
+ export declare function Field({ as, label, htmlFor, hint, error, layout, className, children, ...props }: FieldProps): ReactElement<any, string | JSXElementConstructor<any>>;
166
+
167
+ declare type FieldLayout = 'stack' | 'control';
168
+
169
+ declare interface FieldProps extends HTMLAttributes<HTMLElement> {
170
+ as?: ElementType;
171
+ label?: ReactNode;
172
+ htmlFor?: string;
173
+ hint?: ReactNode;
174
+ error?: ReactNode;
175
+ layout?: FieldLayout;
176
+ }
177
+
178
+ export declare const FloatingPanel: NamedExoticComponent<Props_2>;
179
+
180
+ export declare function GeneratingOverlay({ isGenerating, children, message }: GeneratingOverlayProps): JSX_2.Element;
181
+
182
+ declare interface GeneratingOverlayProps {
183
+ isGenerating: boolean;
184
+ children: ReactNode;
185
+ message?: string;
186
+ }
187
+
188
+ export declare function IconButtonSkeleton(props: HTMLAttributes<HTMLDivElement>): JSX_2.Element;
189
+
190
+ export declare function IconText({ as, icon, className, children, ...props }: IconTextProps): ReactElement<any, string | JSXElementConstructor<any>>;
191
+
192
+ declare interface IconTextProps extends HTMLAttributes<HTMLElement> {
193
+ as?: ElementType;
194
+ icon: ReactNode;
195
+ }
196
+
197
+ export declare function ImageThumb({ src, alt, placeholder, size, fit, onImageError, className, ...props }: ImageThumbProps): JSX_2.Element;
198
+
199
+ declare type ImageThumbFit = 'contain' | 'cover';
200
+
201
+ declare interface ImageThumbProps extends HTMLAttributes<HTMLDivElement> {
202
+ src?: string | null;
203
+ alt: string;
204
+ placeholder?: ReactNode;
205
+ size?: ImageThumbSize;
206
+ fit?: ImageThumbFit;
207
+ onImageError?: () => void;
208
+ }
209
+
210
+ declare type ImageThumbSize = 'sm' | 'md' | 'fluid';
211
+
212
+ export declare function Inline({ as, justify, className, ...props }: InlineProps): ReactElement<any, string | JSXElementConstructor<any>>;
213
+
214
+ declare interface InlineProps extends HTMLAttributes<HTMLElement> {
215
+ as?: ElementType;
216
+ justify?: 'start' | 'between';
217
+ }
218
+
219
+ export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement>>;
220
+
221
+ declare type InputProps = InputHTMLAttributes<HTMLInputElement>;
222
+
223
+ export declare function InputSkeleton(props: HTMLAttributes<HTMLDivElement>): JSX_2.Element;
224
+
225
+ /**
226
+ * A bordered card container used for list items (elements, facts, secrets, users, characters, assets).
227
+ * Replaces raw `<div className="element-card">`, `<div className="fact-card">`,
228
+ * `<div className="secret-card">`, `<li className="user-card">`, `<div className="character-card">`,
229
+ * `<li className="asset-card">`, etc.
230
+ */
231
+ export declare function ItemCard({ as, className, ...props }: ItemCardProps): ReactElement<any, string | JSXElementConstructor<any>>;
232
+
233
+ declare interface ItemCardProps extends HTMLAttributes<HTMLElement> {
234
+ as?: ElementType;
235
+ }
236
+
237
+ /**
238
+ * A vertical list with consistent gap, used for lists of ItemCards.
239
+ * Replaces raw `<div className="element-list">`, `<div className="fact-list">`,
240
+ * `<div className="secret-list">`, `<List className="user-list">`,
241
+ * `<List className="characters-list">`, etc.
242
+ */
243
+ export declare function ItemList({ as, className, ...props }: ItemListProps): ReactElement<any, string | JSXElementConstructor<any>>;
244
+
245
+ declare interface ItemListProps extends HTMLAttributes<HTMLElement> {
246
+ as?: ElementType;
247
+ }
248
+
249
+ export declare function Label({ className, ...props }: LabelProps): JSX_2.Element;
250
+
251
+ declare type LabelProps = LabelHTMLAttributes<HTMLLabelElement>;
252
+
253
+ export declare function LineSkeleton({ short, className, ...props }: LineSkeletonProps): JSX_2.Element;
254
+
255
+ declare interface LineSkeletonProps extends HTMLAttributes<HTMLDivElement> {
256
+ short?: boolean;
257
+ }
258
+
259
+ export declare function List({ as, reset, className, ...props }: ListProps): ReactElement<any, string | JSXElementConstructor<any>>;
260
+
261
+ declare interface ListProps extends HTMLAttributes<HTMLElement> {
262
+ as?: ElementType;
263
+ reset?: boolean;
264
+ }
265
+
266
+ export declare function LoadingState({ label, className }: LoadingStateProps): JSX_2.Element;
267
+
268
+ declare interface LoadingStateProps {
269
+ label?: string;
270
+ className?: string;
271
+ }
272
+
273
+ export declare function Minimap({ loading }: Props_4): JSX_2.Element;
274
+
275
+ export declare function MutedText({ as, size, className, ...props }: TypographyProps & {
276
+ size?: MutedTextSize;
277
+ }): ReactElement<any, string | JSXElementConstructor<any>>;
278
+
279
+ declare type MutedTextSize = 'xs' | 'sm' | 'md';
280
+
281
+ export declare function PageCard({ children }: {
282
+ children: ReactNode;
283
+ }): JSX_2.Element;
284
+
285
+ export declare function PageShell({ children }: {
286
+ children: ReactNode;
287
+ }): JSX_2.Element;
288
+
289
+ export declare function PageTitle({ as, className, ...props }: TypographyProps): ReactElement<any, string | JSXElementConstructor<any>>;
290
+
291
+ export declare function PanelCloseButton({ onClick, label }: PanelCloseButtonProps): JSX_2.Element;
292
+
293
+ declare interface PanelCloseButtonProps {
294
+ onClick: () => void;
295
+ label?: string;
296
+ }
297
+
298
+ export declare class PanelErrorBoundary extends Component<Props_6, State> {
299
+ state: State;
300
+ static getDerivedStateFromError(error: Error): State;
301
+ render(): string | number | boolean | JSX_2.Element | Iterable<ReactNode> | null | undefined;
302
+ }
303
+
304
+ export declare function PanelFormSkeleton({ inputs, showButton, className, ...props }: PanelFormSkeletonProps): JSX_2.Element;
305
+
306
+ declare interface PanelFormSkeletonProps extends HTMLAttributes<HTMLDivElement> {
307
+ inputs?: number;
308
+ showButton?: boolean;
309
+ }
310
+
311
+ export declare type PanelRect = {
312
+ x: number;
313
+ y: number;
314
+ width: number;
315
+ height: number;
316
+ focusPadding?: number;
317
+ focusMaxScale?: number;
318
+ };
319
+
320
+ export declare function PanelSection({ heading, description, actions, className, children, ...props }: PanelSectionProps): JSX_2.Element;
321
+
322
+ declare interface PanelSectionProps extends HTMLAttributes<HTMLDivElement> {
323
+ heading?: ReactNode;
324
+ description?: ReactNode;
325
+ actions?: ReactNode;
326
+ }
327
+
328
+ export declare function PanelTitle({ icon: Icon, label }: PanelTitleProps): JSX_2.Element;
329
+
330
+ declare interface PanelTitleProps {
331
+ icon: ComponentType<{
332
+ size?: number;
333
+ className?: string;
334
+ }>;
335
+ label: string;
336
+ }
337
+
338
+ /**
339
+ * A clickable card used inside picker grids (asset pickers, variant pickers).
340
+ * Replaces `<button className="picker-card">`, `<Stack className="picker-card picker-card--skeleton">`.
341
+ */
342
+ export declare function PickerCard({ as, className, ...props }: PickerCardProps): ReactElement<any, string | JSXElementConstructor<any>>;
343
+
344
+ declare interface PickerCardProps extends HTMLAttributes<HTMLElement> {
345
+ as?: ElementType;
346
+ }
347
+
348
+ /**
349
+ * A responsive grid for picker cards.
350
+ * Replaces `<List className="picker-grid picker-grid--elements">`, etc.
351
+ */
352
+ export declare function PickerGrid({ variant, className, ...props }: PickerGridProps): JSX_2.Element;
353
+
354
+ declare interface PickerGridProps extends HTMLAttributes<HTMLUListElement> {
355
+ variant: PickerGridVariant;
356
+ }
357
+
358
+ export declare function PickerGridSkeleton({ count, gridClass }: PickerGridSkeletonProps): JSX_2.Element;
359
+
360
+ declare interface PickerGridSkeletonProps {
361
+ count?: number;
362
+ gridClass: string;
363
+ }
364
+
365
+ declare type PickerGridVariant = 'elements' | 'characters' | 'library';
366
+
367
+ export declare function Pill({ tone, className, ...props }: PillProps): JSX_2.Element;
368
+
369
+ declare interface PillProps extends HTMLAttributes<HTMLSpanElement> {
370
+ tone?: PillTone;
371
+ }
372
+
373
+ declare type PillTone = 'default' | 'success' | 'warning' | 'danger';
374
+
375
+ declare type PositionMap<T extends WidthMap> = {
376
+ [K in keyof T]: {
377
+ x: number;
378
+ y: number;
379
+ };
380
+ };
381
+
382
+ declare interface Props {
383
+ children: ReactNode;
384
+ showMinimap?: boolean;
385
+ minimapLoading?: boolean;
386
+ /** Extra action buttons rendered inside the ZoomBar (e.g. a theme toggle) */
387
+ extraActions?: ReactNode;
388
+ }
389
+
390
+ declare interface Props_2 {
391
+ title: ReactNode;
392
+ defaultPosition: {
393
+ x: number;
394
+ y: number;
395
+ };
396
+ width?: number;
397
+ className?: string;
398
+ /** Ref that stays in sync with the panel's current position and rendered size */
399
+ trackRect?: MutableRefObject<PanelRect>;
400
+ /** Show a focus button that zooms the whiteboard to this panel */
401
+ focusable?: boolean;
402
+ /** Optional camera framing controls used by the focus button */
403
+ focusPadding?: number;
404
+ focusMaxScale?: number;
405
+ /** Extra action buttons rendered in the header bar next to the focus button */
406
+ headerActions?: ReactNode;
407
+ children: ReactNode;
408
+ }
409
+
410
+ declare interface Props_3 {
411
+ /** Extra action buttons rendered at the bottom of the zoom bar */
412
+ extraActions?: ReactNode;
413
+ }
414
+
415
+ declare interface Props_4 {
416
+ loading?: boolean;
417
+ }
418
+
419
+ declare interface Props_5 {
420
+ open: boolean;
421
+ title: string;
422
+ message: string;
423
+ onConfirm: () => void;
424
+ onCancel: () => void;
425
+ confirmLabel?: string;
426
+ loading?: boolean;
427
+ error?: string | null;
428
+ }
429
+
430
+ declare interface Props_6 {
431
+ children: ReactNode;
432
+ fallbackMessage?: string;
433
+ }
434
+
435
+ export declare function SectionDescription({ as, className, ...props }: TypographyProps): ReactElement<any, string | JSXElementConstructor<any>>;
436
+
437
+ export declare function SectionTitle({ as, className, ...props }: TypographyProps): ReactElement<any, string | JSXElementConstructor<any>>;
438
+
439
+ export declare const Select: ForwardRefExoticComponent<SelectProps & RefAttributes<HTMLSelectElement>>;
440
+
441
+ declare type SelectProps = SelectHTMLAttributes<HTMLSelectElement>;
442
+
443
+ export declare function SelectSkeleton(props: HTMLAttributes<HTMLDivElement>): JSX_2.Element;
444
+
445
+ export declare function Skeleton({ as, radius, className, ...props }: SkeletonProps): ReactElement<any, string | JSXElementConstructor<any>>;
446
+
447
+ declare interface SkeletonProps extends HTMLAttributes<HTMLElement> {
448
+ as?: ElementType;
449
+ radius?: SkeletonRadius;
450
+ }
451
+
452
+ declare type SkeletonRadius = 'sm' | 'md' | 'pill';
453
+
454
+ export declare function snapToWhiteboardGrid(value: number): number;
455
+
456
+ /**
457
+ * A two-column grid layout (image + content side-by-side).
458
+ * Replaces `<div className="element-main">`, `<div className="character-main">`,
459
+ * `<article className="user-row">`.
460
+ */
461
+ export declare function SplitLayout({ variant, className, ...props }: SplitLayoutProps): JSX_2.Element;
462
+
463
+ declare interface SplitLayoutProps extends HTMLAttributes<HTMLDivElement> {
464
+ variant: SplitLayoutVariant;
465
+ }
466
+
467
+ declare type SplitLayoutVariant = 'element' | 'character' | 'user';
468
+
469
+ export declare function Stack({ as, size, className, ...props }: StackProps): ReactElement<any, string | JSXElementConstructor<any>>;
470
+
471
+ declare interface StackProps extends HTMLAttributes<HTMLElement> {
472
+ as?: ElementType;
473
+ size?: StackSize;
474
+ }
475
+
476
+ declare type StackSize = 'sm' | 'md';
477
+
478
+ declare interface State {
479
+ error: Error | null;
480
+ }
481
+
482
+ export declare function StoryCardSkeleton(): JSX_2.Element;
483
+
484
+ export declare function StoryTitle({ as, className, ...props }: TypographyProps): ReactElement<any, string | JSXElementConstructor<any>>;
485
+
486
+ /**
487
+ * A horizontal wrapping row for chips/tags/pills/small items.
488
+ * Replaces `<div className="element-tags-row">`, `<div className="chip-row">`,
489
+ * `<div className="asset-meta">`, etc.
490
+ */
491
+ export declare function TagRow({ className, ...props }: TagRowProps): JSX_2.Element;
492
+
493
+ declare interface TagRowProps extends HTMLAttributes<HTMLDivElement> {
494
+ }
495
+
496
+ export declare const Textarea: ForwardRefExoticComponent<TextareaProps & RefAttributes<HTMLTextAreaElement>>;
497
+
498
+ declare type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;
499
+
500
+ export declare function TextareaSkeleton(props: HTMLAttributes<HTMLDivElement>): JSX_2.Element;
501
+
502
+ export declare function ThemeToggle({ className, theme, onToggle, lightIcon, darkIcon }: ThemeToggleProps): JSX_2.Element;
503
+
504
+ declare interface ThemeToggleProps {
505
+ className?: string;
506
+ theme?: 'light' | 'dark';
507
+ onToggle?: () => void;
508
+ lightIcon?: ReactNode;
509
+ darkIcon?: ReactNode;
510
+ }
511
+
512
+ export declare function ThumbSkeleton(props: HTMLAttributes<HTMLDivElement>): JSX_2.Element;
513
+
514
+ /**
515
+ * A horizontal row with space-between alignment, used for title + action pairs.
516
+ * Replaces `<div className="element-card__title-row">`,
517
+ * `<div className="character-info__title-row">`,
518
+ * `<header className="widget-section__header">`, etc.
519
+ */
520
+ export declare function TitleRow({ className, ...props }: TitleRowProps): JSX_2.Element;
521
+
522
+ declare interface TitleRowProps extends HTMLAttributes<HTMLDivElement> {
523
+ }
524
+
525
+ export declare function TitleSkeleton(props: HTMLAttributes<HTMLDivElement>): JSX_2.Element;
526
+
527
+ declare interface TypographyProps extends HTMLAttributes<HTMLElement> {
528
+ as?: ElementType;
529
+ }
530
+
531
+ /** Helper: create a stable rect ref for use with trackRect */
532
+ export declare function usePanelRect(initial: {
533
+ x: number;
534
+ y: number;
535
+ }): MutableRefObject<PanelRect>;
536
+
537
+ export declare function UserCardSkeleton(): JSX_2.Element;
538
+
539
+ export declare function UserListSkeleton({ count }: UserListSkeletonProps): JSX_2.Element;
540
+
541
+ declare interface UserListSkeletonProps {
542
+ count?: number;
543
+ }
544
+
545
+ export declare function useWhiteboardLayout<T extends WidthMap>({ widths, startX, y, gap, }: UseWhiteboardLayoutOptions<T>): {
546
+ layout: {
547
+ startX: number;
548
+ y: number;
549
+ gap: number;
550
+ };
551
+ panelWidth: T;
552
+ positions: PositionMap<T>;
553
+ };
554
+
555
+ declare interface UseWhiteboardLayoutOptions<T extends WidthMap> {
556
+ widths: T;
557
+ startX?: number;
558
+ y?: number;
559
+ gap?: number;
560
+ }
561
+
562
+ export declare const useWhiteboardStore: UseBoundStore<StoreApi<WhiteboardStore>>;
563
+
564
+ export declare const WHITEBOARD_GRID = 20;
565
+
566
+ export declare function WhiteboardShell({ children, showMinimap, minimapLoading, extraActions }: Props): JSX_2.Element;
567
+
568
+ export declare interface WhiteboardStore {
569
+ offset: {
570
+ x: number;
571
+ y: number;
572
+ };
573
+ scale: number;
574
+ viewportSize: {
575
+ width: number;
576
+ height: number;
577
+ };
578
+ snapToGrid: boolean;
579
+ snapGridSize: number;
580
+ panels: Map<string, PanelRect>;
581
+ resetFns: Map<string, () => void>;
582
+ /** Incremented each time the panel registry changes; subscribe to trigger re-renders. */
583
+ registryVersion: number;
584
+ setOffset: (v: {
585
+ x: number;
586
+ y: number;
587
+ } | ((prev: {
588
+ x: number;
589
+ y: number;
590
+ }) => {
591
+ x: number;
592
+ y: number;
593
+ })) => void;
594
+ setScale: (v: number | ((prev: number) => number)) => void;
595
+ setViewportSize: (v: {
596
+ width: number;
597
+ height: number;
598
+ }) => void;
599
+ setSnapToGrid: (v: boolean | ((prev: boolean) => boolean)) => void;
600
+ register: (id: string, rect: PanelRect) => void;
601
+ unregister: (id: string) => void;
602
+ registerReset: (id: string, fn: () => void) => void;
603
+ unregisterReset: (id: string) => void;
604
+ fitToContent: () => void;
605
+ focusPanel: (rect: PanelRect, options?: {
606
+ padding?: number;
607
+ maxScale?: number;
608
+ }) => void;
609
+ resetWidgets: () => void;
610
+ /** Call on WhiteboardShell mount to discard any stale state from the previous session. */
611
+ resetSession: () => void;
612
+ }
613
+
614
+ declare type WidthMap = Record<string, number>;
615
+
616
+ export declare function ZoomBar({ extraActions }: Props_3): JSX_2.Element;
617
+
618
+ export { }