@objectifthunes/whiteboard 0.2.0 → 0.2.2
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 +614 -508
- package/dist/index.js +853 -1234
- package/dist/whiteboard.css +7 -0
- package/package.json +12 -20
- package/LICENSE +0 -21
- package/dist/index.cjs +0 -1648
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -508
- package/dist/index.js.map +0 -1
package/dist/index.d.cts
DELETED
|
@@ -1,508 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as react from 'react';
|
|
3
|
-
import { ReactNode, MutableRefObject, Component, HTMLAttributes, ButtonHTMLAttributes, ElementType, InputHTMLAttributes, LabelHTMLAttributes, ComponentType, SelectHTMLAttributes, TextareaHTMLAttributes } 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
|
-
type AlertTone = 'error' | 'muted' | 'info' | 'success';
|
|
186
|
-
interface AlertProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
187
|
-
tone?: AlertTone;
|
|
188
|
-
}
|
|
189
|
-
declare function Alert({ tone, className, ...props }: AlertProps): react_jsx_runtime.JSX.Element;
|
|
190
|
-
|
|
191
|
-
type ButtonVariant = 'primary' | 'secondary' | 'danger';
|
|
192
|
-
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
193
|
-
variant?: ButtonVariant;
|
|
194
|
-
fullWidth?: boolean;
|
|
195
|
-
iconOnly?: boolean;
|
|
196
|
-
loading?: boolean;
|
|
197
|
-
loadingText?: string;
|
|
198
|
-
}
|
|
199
|
-
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
200
|
-
|
|
201
|
-
interface ButtonRowProps extends HTMLAttributes<HTMLElement> {
|
|
202
|
-
as?: ElementType;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* A flexible row of buttons with equal sizing. Replaces ALL action-row patterns:
|
|
206
|
-
* `element-actions`, `asset-actions`, `character-actions`, `character-secondary-row`,
|
|
207
|
-
* `editor-header__actions`, `style-picker-actions`, `confirm-actions`, `form-actions`,
|
|
208
|
-
* `lang-batch-actions`, `widget-actions-row`.
|
|
209
|
-
*
|
|
210
|
-
* This replaces the old ActionGroup component which mapped variant strings to CSS classes.
|
|
211
|
-
*/
|
|
212
|
-
declare function ButtonRow({ as, className, ...props }: ButtonRowProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
213
|
-
|
|
214
|
-
type ChipProps = HTMLAttributes<HTMLSpanElement>;
|
|
215
|
-
declare function Chip({ className, ...props }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
216
|
-
|
|
217
|
-
interface ChoiceCardProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
218
|
-
active?: boolean;
|
|
219
|
-
}
|
|
220
|
-
declare function ChoiceCard({ active, className, ...props }: ChoiceCardProps): react_jsx_runtime.JSX.Element;
|
|
221
|
-
|
|
222
|
-
interface ChoiceOption<T extends string> {
|
|
223
|
-
value: T;
|
|
224
|
-
label: ReactNode;
|
|
225
|
-
description?: ReactNode;
|
|
226
|
-
disabled?: boolean;
|
|
227
|
-
}
|
|
228
|
-
interface ChoiceGroupProps<T extends string> {
|
|
229
|
-
options: ChoiceOption<T>[];
|
|
230
|
-
value: T | null | undefined;
|
|
231
|
-
onChange: (value: T) => void;
|
|
232
|
-
className?: string;
|
|
233
|
-
}
|
|
234
|
-
declare function ChoiceGroup<T extends string>({ options, value, onChange, className, }: ChoiceGroupProps<T>): react_jsx_runtime.JSX.Element;
|
|
235
|
-
interface ChoiceGroupSkeletonProps {
|
|
236
|
-
count?: number;
|
|
237
|
-
className?: string;
|
|
238
|
-
withDescription?: boolean;
|
|
239
|
-
}
|
|
240
|
-
declare function ChoiceGroupSkeleton({ count, className, withDescription }: ChoiceGroupSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
241
|
-
|
|
242
|
-
interface CoordGridProps extends HTMLAttributes<HTMLDivElement> {
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* A 2-column grid for coordinate inputs.
|
|
246
|
-
* Replaces `<div className="coord-grid">`.
|
|
247
|
-
*/
|
|
248
|
-
declare function CoordGrid({ className, ...props }: CoordGridProps): react_jsx_runtime.JSX.Element;
|
|
249
|
-
interface CoordInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
250
|
-
axis: string;
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* A labeled coordinate input (x, y, z, scale).
|
|
254
|
-
* Replaces `<label className="coord-input">x <input ...></label>`.
|
|
255
|
-
*/
|
|
256
|
-
declare function CoordInput({ axis, className, ...props }: CoordInputProps): react_jsx_runtime.JSX.Element;
|
|
257
|
-
|
|
258
|
-
interface EmptyStateProps {
|
|
259
|
-
title: ReactNode;
|
|
260
|
-
description?: ReactNode;
|
|
261
|
-
action?: ReactNode;
|
|
262
|
-
}
|
|
263
|
-
declare function EmptyState({ title, description, action }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
264
|
-
|
|
265
|
-
type FieldLayout = 'stack' | 'control';
|
|
266
|
-
interface FieldProps extends HTMLAttributes<HTMLElement> {
|
|
267
|
-
as?: ElementType;
|
|
268
|
-
label?: ReactNode;
|
|
269
|
-
htmlFor?: string;
|
|
270
|
-
hint?: ReactNode;
|
|
271
|
-
error?: ReactNode;
|
|
272
|
-
layout?: FieldLayout;
|
|
273
|
-
}
|
|
274
|
-
declare function Field({ as, label, htmlFor, hint, error, layout, className, children, ...props }: FieldProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
275
|
-
|
|
276
|
-
interface GeneratingOverlayProps {
|
|
277
|
-
isGenerating: boolean;
|
|
278
|
-
children: ReactNode;
|
|
279
|
-
message?: string;
|
|
280
|
-
}
|
|
281
|
-
declare function GeneratingOverlay({ isGenerating, children, message }: GeneratingOverlayProps): react_jsx_runtime.JSX.Element;
|
|
282
|
-
|
|
283
|
-
interface IconTextProps extends HTMLAttributes<HTMLElement> {
|
|
284
|
-
as?: ElementType;
|
|
285
|
-
icon: ReactNode;
|
|
286
|
-
}
|
|
287
|
-
declare function IconText({ as, icon, className, children, ...props }: IconTextProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
288
|
-
|
|
289
|
-
type ImageThumbSize = 'sm' | 'md' | 'fluid';
|
|
290
|
-
type ImageThumbFit = 'contain' | 'cover';
|
|
291
|
-
interface ImageThumbProps extends HTMLAttributes<HTMLDivElement> {
|
|
292
|
-
src?: string | null;
|
|
293
|
-
alt: string;
|
|
294
|
-
placeholder?: ReactNode;
|
|
295
|
-
size?: ImageThumbSize;
|
|
296
|
-
fit?: ImageThumbFit;
|
|
297
|
-
onImageError?: () => void;
|
|
298
|
-
}
|
|
299
|
-
declare function ImageThumb({ src, alt, placeholder, size, fit, onImageError, className, ...props }: ImageThumbProps): react_jsx_runtime.JSX.Element;
|
|
300
|
-
|
|
301
|
-
interface InlineProps extends HTMLAttributes<HTMLElement> {
|
|
302
|
-
as?: ElementType;
|
|
303
|
-
justify?: 'start' | 'between';
|
|
304
|
-
}
|
|
305
|
-
declare function Inline({ as, justify, className, ...props }: InlineProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
306
|
-
|
|
307
|
-
type InputProps = InputHTMLAttributes<HTMLInputElement>;
|
|
308
|
-
declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
|
|
309
|
-
|
|
310
|
-
interface ItemCardProps extends HTMLAttributes<HTMLElement> {
|
|
311
|
-
as?: ElementType;
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* A bordered card container used for list items (elements, facts, secrets, users, characters, assets).
|
|
315
|
-
* Replaces raw `<div className="element-card">`, `<div className="fact-card">`,
|
|
316
|
-
* `<div className="secret-card">`, `<li className="user-card">`, `<div className="character-card">`,
|
|
317
|
-
* `<li className="asset-card">`, etc.
|
|
318
|
-
*/
|
|
319
|
-
declare function ItemCard({ as, className, ...props }: ItemCardProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
320
|
-
|
|
321
|
-
interface ItemListProps extends HTMLAttributes<HTMLElement> {
|
|
322
|
-
as?: ElementType;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* A vertical list with consistent gap, used for lists of ItemCards.
|
|
326
|
-
* Replaces raw `<div className="element-list">`, `<div className="fact-list">`,
|
|
327
|
-
* `<div className="secret-list">`, `<List className="user-list">`,
|
|
328
|
-
* `<List className="characters-list">`, etc.
|
|
329
|
-
*/
|
|
330
|
-
declare function ItemList({ as, className, ...props }: ItemListProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
331
|
-
|
|
332
|
-
type LabelProps = LabelHTMLAttributes<HTMLLabelElement>;
|
|
333
|
-
declare function Label({ className, ...props }: LabelProps): react_jsx_runtime.JSX.Element;
|
|
334
|
-
|
|
335
|
-
interface ListProps extends HTMLAttributes<HTMLElement> {
|
|
336
|
-
as?: ElementType;
|
|
337
|
-
reset?: boolean;
|
|
338
|
-
}
|
|
339
|
-
declare function List({ as, reset, className, ...props }: ListProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
340
|
-
|
|
341
|
-
interface LoadingStateProps {
|
|
342
|
-
label?: string;
|
|
343
|
-
className?: string;
|
|
344
|
-
}
|
|
345
|
-
declare function LoadingState({ label, className }: LoadingStateProps): react_jsx_runtime.JSX.Element;
|
|
346
|
-
|
|
347
|
-
declare function PageShell({ children }: {
|
|
348
|
-
children: ReactNode;
|
|
349
|
-
}): react_jsx_runtime.JSX.Element;
|
|
350
|
-
declare function PageCard({ children }: {
|
|
351
|
-
children: ReactNode;
|
|
352
|
-
}): react_jsx_runtime.JSX.Element;
|
|
353
|
-
|
|
354
|
-
interface PanelCloseButtonProps {
|
|
355
|
-
onClick: () => void;
|
|
356
|
-
label?: string;
|
|
357
|
-
}
|
|
358
|
-
declare function PanelCloseButton({ onClick, label }: PanelCloseButtonProps): react_jsx_runtime.JSX.Element;
|
|
359
|
-
|
|
360
|
-
interface PanelSectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
361
|
-
heading?: ReactNode;
|
|
362
|
-
description?: ReactNode;
|
|
363
|
-
actions?: ReactNode;
|
|
364
|
-
}
|
|
365
|
-
declare function PanelSection({ heading, description, actions, className, children, ...props }: PanelSectionProps): react_jsx_runtime.JSX.Element;
|
|
366
|
-
|
|
367
|
-
interface PanelTitleProps {
|
|
368
|
-
icon: ComponentType<{
|
|
369
|
-
size?: number;
|
|
370
|
-
className?: string;
|
|
371
|
-
}>;
|
|
372
|
-
label: string;
|
|
373
|
-
}
|
|
374
|
-
declare function PanelTitle({ icon: Icon, label }: PanelTitleProps): react_jsx_runtime.JSX.Element;
|
|
375
|
-
|
|
376
|
-
interface PickerCardProps extends HTMLAttributes<HTMLElement> {
|
|
377
|
-
as?: ElementType;
|
|
378
|
-
}
|
|
379
|
-
/**
|
|
380
|
-
* A clickable card used inside picker grids (asset pickers, variant pickers).
|
|
381
|
-
* Replaces `<button className="picker-card">`, `<Stack className="picker-card picker-card--skeleton">`.
|
|
382
|
-
*/
|
|
383
|
-
declare function PickerCard({ as, className, ...props }: PickerCardProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
384
|
-
|
|
385
|
-
type PickerGridVariant = 'elements' | 'characters' | 'library';
|
|
386
|
-
interface PickerGridProps extends HTMLAttributes<HTMLUListElement> {
|
|
387
|
-
variant: PickerGridVariant;
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
* A responsive grid for picker cards.
|
|
391
|
-
* Replaces `<List className="picker-grid picker-grid--elements">`, etc.
|
|
392
|
-
*/
|
|
393
|
-
declare function PickerGrid({ variant, className, ...props }: PickerGridProps): react_jsx_runtime.JSX.Element;
|
|
394
|
-
|
|
395
|
-
type PillTone = 'default' | 'success' | 'warning' | 'danger';
|
|
396
|
-
interface PillProps extends HTMLAttributes<HTMLSpanElement> {
|
|
397
|
-
tone?: PillTone;
|
|
398
|
-
}
|
|
399
|
-
declare function Pill({ tone, className, ...props }: PillProps): react_jsx_runtime.JSX.Element;
|
|
400
|
-
|
|
401
|
-
type SelectProps = SelectHTMLAttributes<HTMLSelectElement>;
|
|
402
|
-
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLSelectElement>>;
|
|
403
|
-
|
|
404
|
-
type SkeletonRadius = 'sm' | 'md' | 'pill';
|
|
405
|
-
interface SkeletonProps extends HTMLAttributes<HTMLElement> {
|
|
406
|
-
as?: ElementType;
|
|
407
|
-
radius?: SkeletonRadius;
|
|
408
|
-
}
|
|
409
|
-
declare function Skeleton({ as, radius, className, ...props }: SkeletonProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
410
|
-
declare function InputSkeleton(props: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
411
|
-
declare function ButtonSkeleton(props: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
412
|
-
declare function IconButtonSkeleton(props: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
413
|
-
declare function SelectSkeleton(props: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
414
|
-
declare function TextareaSkeleton(props: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
415
|
-
declare function ThumbSkeleton(props: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
416
|
-
declare function ChipSkeleton(props: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
417
|
-
declare function TitleSkeleton(props: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
418
|
-
interface LineSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
419
|
-
short?: boolean;
|
|
420
|
-
}
|
|
421
|
-
declare function LineSkeleton({ short, className, ...props }: LineSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
422
|
-
declare function AvatarSkeleton(props: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
423
|
-
declare function CanvasSkeleton(props: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
424
|
-
|
|
425
|
-
type SplitLayoutVariant = 'element' | 'character' | 'user';
|
|
426
|
-
interface SplitLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
427
|
-
variant: SplitLayoutVariant;
|
|
428
|
-
}
|
|
429
|
-
/**
|
|
430
|
-
* A two-column grid layout (image + content side-by-side).
|
|
431
|
-
* Replaces `<div className="element-main">`, `<div className="character-main">`,
|
|
432
|
-
* `<article className="user-row">`.
|
|
433
|
-
*/
|
|
434
|
-
declare function SplitLayout({ variant, className, ...props }: SplitLayoutProps): react_jsx_runtime.JSX.Element;
|
|
435
|
-
|
|
436
|
-
type StackSize = 'sm' | 'md';
|
|
437
|
-
interface StackProps extends HTMLAttributes<HTMLElement> {
|
|
438
|
-
as?: ElementType;
|
|
439
|
-
size?: StackSize;
|
|
440
|
-
}
|
|
441
|
-
declare function Stack({ as, size, className, ...props }: StackProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
442
|
-
|
|
443
|
-
interface TagRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
444
|
-
}
|
|
445
|
-
/**
|
|
446
|
-
* A horizontal wrapping row for chips/tags/pills/small items.
|
|
447
|
-
* Replaces `<div className="element-tags-row">`, `<div className="chip-row">`,
|
|
448
|
-
* `<div className="asset-meta">`, etc.
|
|
449
|
-
*/
|
|
450
|
-
declare function TagRow({ className, ...props }: TagRowProps): react_jsx_runtime.JSX.Element;
|
|
451
|
-
|
|
452
|
-
type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
453
|
-
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
454
|
-
|
|
455
|
-
interface ThemeToggleProps {
|
|
456
|
-
className?: string;
|
|
457
|
-
theme?: 'light' | 'dark';
|
|
458
|
-
onToggle?: () => void;
|
|
459
|
-
lightIcon?: ReactNode;
|
|
460
|
-
darkIcon?: ReactNode;
|
|
461
|
-
}
|
|
462
|
-
declare function ThemeToggle({ className, theme, onToggle, lightIcon, darkIcon }: ThemeToggleProps): react_jsx_runtime.JSX.Element;
|
|
463
|
-
|
|
464
|
-
interface TitleRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* A horizontal row with space-between alignment, used for title + action pairs.
|
|
468
|
-
* Replaces `<div className="element-card__title-row">`,
|
|
469
|
-
* `<div className="character-info__title-row">`,
|
|
470
|
-
* `<header className="widget-section__header">`, etc.
|
|
471
|
-
*/
|
|
472
|
-
declare function TitleRow({ className, ...props }: TitleRowProps): react_jsx_runtime.JSX.Element;
|
|
473
|
-
|
|
474
|
-
interface TypographyProps extends HTMLAttributes<HTMLElement> {
|
|
475
|
-
as?: ElementType;
|
|
476
|
-
}
|
|
477
|
-
interface AssetTitleProps extends TypographyProps {
|
|
478
|
-
clamp?: boolean;
|
|
479
|
-
}
|
|
480
|
-
type MutedTextSize = 'xs' | 'sm' | 'md';
|
|
481
|
-
declare function AssetTitle({ as, clamp, className, ...props }: AssetTitleProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
482
|
-
declare function StoryTitle({ as, className, ...props }: TypographyProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
483
|
-
declare function MutedText({ as, size, className, ...props }: TypographyProps & {
|
|
484
|
-
size?: MutedTextSize;
|
|
485
|
-
}): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
486
|
-
declare function PageTitle({ as, className, ...props }: TypographyProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
487
|
-
declare function SectionTitle({ as, className, ...props }: TypographyProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
488
|
-
declare function SectionDescription({ as, className, ...props }: TypographyProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
489
|
-
|
|
490
|
-
interface PanelFormSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
491
|
-
inputs?: number;
|
|
492
|
-
showButton?: boolean;
|
|
493
|
-
}
|
|
494
|
-
declare function PanelFormSkeleton({ inputs, showButton, className, ...props }: PanelFormSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
495
|
-
declare function StoryCardSkeleton(): react_jsx_runtime.JSX.Element;
|
|
496
|
-
declare function UserCardSkeleton(): react_jsx_runtime.JSX.Element;
|
|
497
|
-
interface UserListSkeletonProps {
|
|
498
|
-
count?: number;
|
|
499
|
-
}
|
|
500
|
-
declare function UserListSkeleton({ count }: UserListSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
501
|
-
declare function AssetCardSkeleton(): react_jsx_runtime.JSX.Element;
|
|
502
|
-
interface PickerGridSkeletonProps {
|
|
503
|
-
count?: number;
|
|
504
|
-
gridClass: string;
|
|
505
|
-
}
|
|
506
|
-
declare function PickerGridSkeleton({ count, gridClass }: PickerGridSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
507
|
-
|
|
508
|
-
export { Alert, AssetCardSkeleton, AssetTitle, AvatarSkeleton, Button, ButtonRow, ButtonSkeleton, CanvasSkeleton, Chip, ChipSkeleton, ChoiceCard, ChoiceGroup, ChoiceGroupSkeleton, type ChoiceOption, ConfirmDialog, CoordGrid, CoordInput, EmptyState, Field, FloatingPanel, GeneratingOverlay, IconButtonSkeleton, IconText, ImageThumb, Inline, Input, InputSkeleton, ItemCard, ItemList, Label, LineSkeleton, List, LoadingState, Minimap, MutedText, PageCard, PageShell, PageTitle, PanelCloseButton, PanelErrorBoundary, PanelFormSkeleton, type PanelRect, PanelSection, PanelTitle, PickerCard, PickerGrid, PickerGridSkeleton, Pill, SectionDescription, SectionTitle, Select, SelectSkeleton, Skeleton, SplitLayout, Stack, StoryCardSkeleton, StoryTitle, TagRow, Textarea, TextareaSkeleton, ThemeToggle, ThumbSkeleton, TitleRow, TitleSkeleton, UserCardSkeleton, UserListSkeleton, WHITEBOARD_GRID, WhiteboardShell, type WhiteboardStore, ZoomBar, belowPanel, cn, computeWhiteboardFit, computeWhiteboardRectFocus, snapToWhiteboardGrid, usePanelRect, useWhiteboardLayout, useWhiteboardStore };
|