@scalably/ui 0.5.4 → 0.5.5
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 +95 -1
- package/dist/index.d.ts +95 -1
- package/dist/index.esm.js +21 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +21 -4
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2381,6 +2381,14 @@ declare const WelcomeBackground: {
|
|
|
2381
2381
|
displayName: string;
|
|
2382
2382
|
};
|
|
2383
2383
|
|
|
2384
|
+
/**
|
|
2385
|
+
* Controls how the floating insert menu is triggered.
|
|
2386
|
+
* - "slash": A `/` slash command on an empty line opens an insert palette.
|
|
2387
|
+
* - "plus": A `+` button appears in the left gutter on empty/selected blocks.
|
|
2388
|
+
* - "both": Supports both keyboard-first (`/`) and mouse-first (`+`) flows.
|
|
2389
|
+
*/
|
|
2390
|
+
type FloatingMenuTrigger = "slash" | "plus" | "both";
|
|
2391
|
+
|
|
2384
2392
|
type ImageSourceMode = "both" | "url-only" | "upload-only";
|
|
2385
2393
|
interface RichTextEditorProps {
|
|
2386
2394
|
/** Controlled HTML value of the editor */
|
|
@@ -2470,6 +2478,92 @@ interface RichTextEditorProps {
|
|
|
2470
2478
|
* @default undefined (Tiptap auto-detects, but you should explicitly set `false` for SSR)
|
|
2471
2479
|
*/
|
|
2472
2480
|
immediatelyRender?: boolean;
|
|
2481
|
+
/**
|
|
2482
|
+
* When true, keeps the toolbar pinned to the top of the editor container
|
|
2483
|
+
* using CSS `position: sticky`.
|
|
2484
|
+
*
|
|
2485
|
+
* This is recommended for long documents so that structural tools (headings,
|
|
2486
|
+
* lists, tables, etc.) remain visible while scrolling.
|
|
2487
|
+
*
|
|
2488
|
+
* @default true
|
|
2489
|
+
*/
|
|
2490
|
+
stickyToolbar?: boolean;
|
|
2491
|
+
/**
|
|
2492
|
+
* Optional offset in pixels applied to the sticky toolbar `top` value.
|
|
2493
|
+
*
|
|
2494
|
+
* This is useful when the host application has its own fixed header or
|
|
2495
|
+
* navigation bar. For example:
|
|
2496
|
+
*
|
|
2497
|
+
* - `stickyOffset={64}` to sit below a 64px app header
|
|
2498
|
+
*
|
|
2499
|
+
* @default 0
|
|
2500
|
+
*/
|
|
2501
|
+
stickyOffset?: number;
|
|
2502
|
+
/**
|
|
2503
|
+
* When true, hides the toolbar completely while keeping the editor
|
|
2504
|
+
* content area and all other behaviors intact.
|
|
2505
|
+
*
|
|
2506
|
+
* This is useful for very minimal, writing-focused experiences or for
|
|
2507
|
+
* embedding the editor inside flows that provide their own external
|
|
2508
|
+
* formatting controls.
|
|
2509
|
+
*
|
|
2510
|
+
* @default false
|
|
2511
|
+
*/
|
|
2512
|
+
hideToolbar?: boolean;
|
|
2513
|
+
/**
|
|
2514
|
+
* Controls whether the editor renders with its default rounded
|
|
2515
|
+
* border and background.
|
|
2516
|
+
*
|
|
2517
|
+
* - When `true` (default), the editor is wrapped in a rounded,
|
|
2518
|
+
* bordered container that responds to focus and error states.
|
|
2519
|
+
* - When `false`, the outer border and background are removed so
|
|
2520
|
+
* the editor can blend into custom host layouts (e.g. card
|
|
2521
|
+
* bodies, panels) while keeping all internal behaviors intact.
|
|
2522
|
+
*
|
|
2523
|
+
* Naming convention: `withBorder` mirrors many design systems.
|
|
2524
|
+
* For backward compatibility, `bordered` is still supported as
|
|
2525
|
+
* an alias; `withBorder` takes precedence when both are provided.
|
|
2526
|
+
*/
|
|
2527
|
+
withBorder?: boolean;
|
|
2528
|
+
/**
|
|
2529
|
+
* Enables the inline Bubble Menu that appears above selected text.
|
|
2530
|
+
*
|
|
2531
|
+
* This menu is ideal for inline formatting operations such as bold, italic,
|
|
2532
|
+
* underline, and links. When disabled, the editor falls back to toolbar-only
|
|
2533
|
+
* controls.
|
|
2534
|
+
*
|
|
2535
|
+
* @default true
|
|
2536
|
+
*/
|
|
2537
|
+
enableBubbleMenu?: boolean;
|
|
2538
|
+
/**
|
|
2539
|
+
* Enables the Floating Menu that appears near the current block/empty line
|
|
2540
|
+
* to insert structural blocks (images, dividers, quotes, tables, etc.).
|
|
2541
|
+
*
|
|
2542
|
+
* @default true
|
|
2543
|
+
*/
|
|
2544
|
+
enableFloatingMenu?: boolean;
|
|
2545
|
+
/**
|
|
2546
|
+
* Optional fine-tuning offset (in pixels) applied to the gutter "+"
|
|
2547
|
+
* insert button alignment.
|
|
2548
|
+
*
|
|
2549
|
+
* In most cases you should not need this. The library automatically
|
|
2550
|
+
* derives a good vertical alignment from the paragraph's computed
|
|
2551
|
+
* line-height and font-size, but if your host app overrides
|
|
2552
|
+
* typography significantly (e.g. different base font-size or
|
|
2553
|
+
* custom line-height), you can use this to nudge the "+" icon up
|
|
2554
|
+
* or down to visually match your text baseline.
|
|
2555
|
+
*/
|
|
2556
|
+
plusMenuYOffset?: number;
|
|
2557
|
+
/**
|
|
2558
|
+
* Controls how the floating insert menu is triggered:
|
|
2559
|
+
*
|
|
2560
|
+
* - "slash": A `/` slash command on an empty line opens an insert palette.
|
|
2561
|
+
* - "plus": A `+` button appears in the left gutter on empty/selected blocks.
|
|
2562
|
+
* - "both": Supports both keyboard-first (`/`) and mouse-first (`+`) flows.
|
|
2563
|
+
*
|
|
2564
|
+
* @default "both"
|
|
2565
|
+
*/
|
|
2566
|
+
floatingMenuTriggers?: FloatingMenuTrigger;
|
|
2473
2567
|
}
|
|
2474
2568
|
/**
|
|
2475
2569
|
* RichTextEditor - Controlled rich text editor built on top of Tiptap.
|
|
@@ -2523,7 +2617,7 @@ interface RichTextEditorProps {
|
|
|
2523
2617
|
* @see RichTextViewer - Read-only viewer component for displaying rich text content
|
|
2524
2618
|
*/
|
|
2525
2619
|
declare const RichTextEditor: {
|
|
2526
|
-
({ value, onChange, label, error, helperText, placeholder, minHeight, simple, disabled, "data-testid": dataTestId, containerClassName, onImageUpload, imageSourceMode, maxCharacters, onMaxLengthExceed, immediatelyRender, }: RichTextEditorProps): react_jsx_runtime.JSX.Element;
|
|
2620
|
+
({ value, onChange, label, error, helperText, placeholder, minHeight, simple, disabled, "data-testid": dataTestId, containerClassName, onImageUpload, imageSourceMode, maxCharacters, onMaxLengthExceed, immediatelyRender, stickyToolbar, stickyOffset, hideToolbar, withBorder, enableBubbleMenu, enableFloatingMenu, floatingMenuTriggers, plusMenuYOffset, }: RichTextEditorProps): react_jsx_runtime.JSX.Element;
|
|
2527
2621
|
displayName: string;
|
|
2528
2622
|
};
|
|
2529
2623
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2381,6 +2381,14 @@ declare const WelcomeBackground: {
|
|
|
2381
2381
|
displayName: string;
|
|
2382
2382
|
};
|
|
2383
2383
|
|
|
2384
|
+
/**
|
|
2385
|
+
* Controls how the floating insert menu is triggered.
|
|
2386
|
+
* - "slash": A `/` slash command on an empty line opens an insert palette.
|
|
2387
|
+
* - "plus": A `+` button appears in the left gutter on empty/selected blocks.
|
|
2388
|
+
* - "both": Supports both keyboard-first (`/`) and mouse-first (`+`) flows.
|
|
2389
|
+
*/
|
|
2390
|
+
type FloatingMenuTrigger = "slash" | "plus" | "both";
|
|
2391
|
+
|
|
2384
2392
|
type ImageSourceMode = "both" | "url-only" | "upload-only";
|
|
2385
2393
|
interface RichTextEditorProps {
|
|
2386
2394
|
/** Controlled HTML value of the editor */
|
|
@@ -2470,6 +2478,92 @@ interface RichTextEditorProps {
|
|
|
2470
2478
|
* @default undefined (Tiptap auto-detects, but you should explicitly set `false` for SSR)
|
|
2471
2479
|
*/
|
|
2472
2480
|
immediatelyRender?: boolean;
|
|
2481
|
+
/**
|
|
2482
|
+
* When true, keeps the toolbar pinned to the top of the editor container
|
|
2483
|
+
* using CSS `position: sticky`.
|
|
2484
|
+
*
|
|
2485
|
+
* This is recommended for long documents so that structural tools (headings,
|
|
2486
|
+
* lists, tables, etc.) remain visible while scrolling.
|
|
2487
|
+
*
|
|
2488
|
+
* @default true
|
|
2489
|
+
*/
|
|
2490
|
+
stickyToolbar?: boolean;
|
|
2491
|
+
/**
|
|
2492
|
+
* Optional offset in pixels applied to the sticky toolbar `top` value.
|
|
2493
|
+
*
|
|
2494
|
+
* This is useful when the host application has its own fixed header or
|
|
2495
|
+
* navigation bar. For example:
|
|
2496
|
+
*
|
|
2497
|
+
* - `stickyOffset={64}` to sit below a 64px app header
|
|
2498
|
+
*
|
|
2499
|
+
* @default 0
|
|
2500
|
+
*/
|
|
2501
|
+
stickyOffset?: number;
|
|
2502
|
+
/**
|
|
2503
|
+
* When true, hides the toolbar completely while keeping the editor
|
|
2504
|
+
* content area and all other behaviors intact.
|
|
2505
|
+
*
|
|
2506
|
+
* This is useful for very minimal, writing-focused experiences or for
|
|
2507
|
+
* embedding the editor inside flows that provide their own external
|
|
2508
|
+
* formatting controls.
|
|
2509
|
+
*
|
|
2510
|
+
* @default false
|
|
2511
|
+
*/
|
|
2512
|
+
hideToolbar?: boolean;
|
|
2513
|
+
/**
|
|
2514
|
+
* Controls whether the editor renders with its default rounded
|
|
2515
|
+
* border and background.
|
|
2516
|
+
*
|
|
2517
|
+
* - When `true` (default), the editor is wrapped in a rounded,
|
|
2518
|
+
* bordered container that responds to focus and error states.
|
|
2519
|
+
* - When `false`, the outer border and background are removed so
|
|
2520
|
+
* the editor can blend into custom host layouts (e.g. card
|
|
2521
|
+
* bodies, panels) while keeping all internal behaviors intact.
|
|
2522
|
+
*
|
|
2523
|
+
* Naming convention: `withBorder` mirrors many design systems.
|
|
2524
|
+
* For backward compatibility, `bordered` is still supported as
|
|
2525
|
+
* an alias; `withBorder` takes precedence when both are provided.
|
|
2526
|
+
*/
|
|
2527
|
+
withBorder?: boolean;
|
|
2528
|
+
/**
|
|
2529
|
+
* Enables the inline Bubble Menu that appears above selected text.
|
|
2530
|
+
*
|
|
2531
|
+
* This menu is ideal for inline formatting operations such as bold, italic,
|
|
2532
|
+
* underline, and links. When disabled, the editor falls back to toolbar-only
|
|
2533
|
+
* controls.
|
|
2534
|
+
*
|
|
2535
|
+
* @default true
|
|
2536
|
+
*/
|
|
2537
|
+
enableBubbleMenu?: boolean;
|
|
2538
|
+
/**
|
|
2539
|
+
* Enables the Floating Menu that appears near the current block/empty line
|
|
2540
|
+
* to insert structural blocks (images, dividers, quotes, tables, etc.).
|
|
2541
|
+
*
|
|
2542
|
+
* @default true
|
|
2543
|
+
*/
|
|
2544
|
+
enableFloatingMenu?: boolean;
|
|
2545
|
+
/**
|
|
2546
|
+
* Optional fine-tuning offset (in pixels) applied to the gutter "+"
|
|
2547
|
+
* insert button alignment.
|
|
2548
|
+
*
|
|
2549
|
+
* In most cases you should not need this. The library automatically
|
|
2550
|
+
* derives a good vertical alignment from the paragraph's computed
|
|
2551
|
+
* line-height and font-size, but if your host app overrides
|
|
2552
|
+
* typography significantly (e.g. different base font-size or
|
|
2553
|
+
* custom line-height), you can use this to nudge the "+" icon up
|
|
2554
|
+
* or down to visually match your text baseline.
|
|
2555
|
+
*/
|
|
2556
|
+
plusMenuYOffset?: number;
|
|
2557
|
+
/**
|
|
2558
|
+
* Controls how the floating insert menu is triggered:
|
|
2559
|
+
*
|
|
2560
|
+
* - "slash": A `/` slash command on an empty line opens an insert palette.
|
|
2561
|
+
* - "plus": A `+` button appears in the left gutter on empty/selected blocks.
|
|
2562
|
+
* - "both": Supports both keyboard-first (`/`) and mouse-first (`+`) flows.
|
|
2563
|
+
*
|
|
2564
|
+
* @default "both"
|
|
2565
|
+
*/
|
|
2566
|
+
floatingMenuTriggers?: FloatingMenuTrigger;
|
|
2473
2567
|
}
|
|
2474
2568
|
/**
|
|
2475
2569
|
* RichTextEditor - Controlled rich text editor built on top of Tiptap.
|
|
@@ -2523,7 +2617,7 @@ interface RichTextEditorProps {
|
|
|
2523
2617
|
* @see RichTextViewer - Read-only viewer component for displaying rich text content
|
|
2524
2618
|
*/
|
|
2525
2619
|
declare const RichTextEditor: {
|
|
2526
|
-
({ value, onChange, label, error, helperText, placeholder, minHeight, simple, disabled, "data-testid": dataTestId, containerClassName, onImageUpload, imageSourceMode, maxCharacters, onMaxLengthExceed, immediatelyRender, }: RichTextEditorProps): react_jsx_runtime.JSX.Element;
|
|
2620
|
+
({ value, onChange, label, error, helperText, placeholder, minHeight, simple, disabled, "data-testid": dataTestId, containerClassName, onImageUpload, imageSourceMode, maxCharacters, onMaxLengthExceed, immediatelyRender, stickyToolbar, stickyOffset, hideToolbar, withBorder, enableBubbleMenu, enableFloatingMenu, floatingMenuTriggers, plusMenuYOffset, }: RichTextEditorProps): react_jsx_runtime.JSX.Element;
|
|
2527
2621
|
displayName: string;
|
|
2528
2622
|
};
|
|
2529
2623
|
|