@objectifthunes/whiteboard 0.1.1 → 0.2.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/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, MutableRefObject, Component } from 'react';
3
+ import { ReactNode, MutableRefObject, Component, HTMLAttributes, ButtonHTMLAttributes, ElementType, InputHTMLAttributes, LabelHTMLAttributes, ComponentType, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
4
4
  import * as zustand from 'zustand';
5
5
 
6
6
  interface Props$5 {
@@ -182,4 +182,327 @@ declare function snapToWhiteboardGrid(value: number): number;
182
182
 
183
183
  declare function cn(...args: (string | false | null | undefined)[]): string;
184
184
 
185
- export { ConfirmDialog, FloatingPanel, Minimap, PanelErrorBoundary, type PanelRect, WHITEBOARD_GRID, WhiteboardShell, type WhiteboardStore, ZoomBar, belowPanel, cn, computeWhiteboardFit, computeWhiteboardRectFocus, snapToWhiteboardGrid, usePanelRect, useWhiteboardLayout, useWhiteboardStore };
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 };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, MutableRefObject, Component } from 'react';
3
+ import { ReactNode, MutableRefObject, Component, HTMLAttributes, ButtonHTMLAttributes, ElementType, InputHTMLAttributes, LabelHTMLAttributes, ComponentType, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
4
4
  import * as zustand from 'zustand';
5
5
 
6
6
  interface Props$5 {
@@ -182,4 +182,327 @@ declare function snapToWhiteboardGrid(value: number): number;
182
182
 
183
183
  declare function cn(...args: (string | false | null | undefined)[]): string;
184
184
 
185
- export { ConfirmDialog, FloatingPanel, Minimap, PanelErrorBoundary, type PanelRect, WHITEBOARD_GRID, WhiteboardShell, type WhiteboardStore, ZoomBar, belowPanel, cn, computeWhiteboardFit, computeWhiteboardRectFocus, snapToWhiteboardGrid, usePanelRect, useWhiteboardLayout, useWhiteboardStore };
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 };