@tempots/beatui 0.83.3 → 0.83.4

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.
@@ -19344,7 +19344,9 @@ const i0 = (n) => {
19344
19344
  ), y.dragon && w.push(ed(x)), y.table && w.push(Qu(x)), (await Promise.all(w)).forEach((v) => {
19345
19345
  v && b.push(v);
19346
19346
  }), b.push(Yu(x)), e != null) {
19347
- const v = _e.get(e);
19347
+ const v = _e.get(
19348
+ e
19349
+ );
19348
19350
  if (v != null && (v !== "" || C === "json" && typeof v == "object")) {
19349
19351
  if (C === "markdown" && typeof v == "string")
19350
19352
  await Er(x, v);
@@ -20279,7 +20281,9 @@ const V0 = (n) => {
20279
20281
  }
20280
20282
  )
20281
20283
  ), e != null) {
20282
- const M = _e.get(e);
20284
+ const M = _e.get(
20285
+ e
20286
+ );
20283
20287
  if (M != null && (M !== "" || O === "json" && typeof M == "object")) {
20284
20288
  if (O === "markdown" && typeof M == "string")
20285
20289
  await Er(k, M);
@@ -21141,7 +21145,9 @@ const Z0 = (n) => {
21141
21145
  }
21142
21146
  )
21143
21147
  ), e != null) {
21144
- const M = _e.get(e);
21148
+ const M = _e.get(
21149
+ e
21150
+ );
21145
21151
  if (M != null && (M !== "" || O === "json" && typeof M == "object")) {
21146
21152
  if (O === "markdown" && typeof M == "string")
21147
21153
  await Er(k, M);
@@ -21295,7 +21301,9 @@ const Z0 = (n) => {
21295
21301
  s(E);
21296
21302
  } : void 0,
21297
21303
  onChange: i ? (E, v) => {
21298
- i(E);
21304
+ i(
21305
+ E
21306
+ );
21299
21307
  } : void 0,
21300
21308
  onBlur: o ? (E) => {
21301
21309
  o();
@@ -6,7 +6,7 @@
6
6
  * pre-configured presets (Bare, Docked, Contextual), full plugin coverage,
7
7
  * multi-format I/O, form integration, and theme/i18n support.
8
8
  */
9
- export type { ContentFormatType, StringContent, JsonContent, EditorContent, LexicalPluginDefinition, PluginConfig, HistoryPluginOptions, TablePluginOptions, AutoLinkPluginOptions, AutoLinkMatcher, CodePluginOptions, HashtagPluginOptions, OverflowPluginOptions, SlashCommandPluginOptions, SlashCommandDefinition, ToolbarGroupId, ToolbarConfig, MarkMetadata, MarkPluginCallbacks, CollaborationConfig, CollaborationUser, LexicalEditorBaseOptions, BareEditorOptions, DockedEditorOptions, ContextualEditorOptions, LexicalStringInputOptions, LexicalJsonInputOptions, LexicalInputOptions, HeadlessEditorOptions, CharacterCountInfo, SelectionInfo, EditorPresetType, EditorHeightMode, } from './types';
9
+ export type { ContentFormatType, JsonContent, LexicalPluginDefinition, PluginConfig, HistoryPluginOptions, TablePluginOptions, AutoLinkPluginOptions, AutoLinkMatcher, CodePluginOptions, HashtagPluginOptions, OverflowPluginOptions, SlashCommandPluginOptions, SlashCommandDefinition, ToolbarGroupId, ToolbarConfig, MarkMetadata, MarkPluginCallbacks, CollaborationConfig, CollaborationUser, LexicalEditorBaseOptions, BareEditorOptions, DockedEditorOptions, ContextualEditorOptions, LexicalStringInputOptions, LexicalJsonInputOptions, LexicalInputOptions, HeadlessEditorOptions, CharacterCountInfo, SelectionInfo, EditorPresetType, EditorHeightMode, } from './types';
10
10
  export { getNodesForPlugins, createDefaultPluginConfig } from './nodes';
11
11
  export { HorizontalRuleNode, $createHorizontalRuleNode, $isHorizontalRuleNode, } from './horizontal-rule-node';
12
12
  export type { SerializedHorizontalRuleNode } from './horizontal-rule-node';
@@ -6,18 +6,10 @@ import type { InputOptions } from '../components/form/input/input-options';
6
6
  * Content format types supported by the editor
7
7
  */
8
8
  export type ContentFormatType = 'markdown' | 'json' | 'html';
9
- /**
10
- * String-based content (markdown or html)
11
- */
12
- export type StringContent = string;
13
9
  /**
14
10
  * JSON-based content (Lexical's serialized state)
15
11
  */
16
12
  export type JsonContent = Record<string, unknown>;
17
- /**
18
- * Union of all supported content types
19
- */
20
- export type EditorContent = StringContent | JsonContent;
21
13
  /**
22
14
  * Plugin definition for Lexical editor
23
15
  */
@@ -454,22 +446,11 @@ export interface CollaborationUser {
454
446
  * - 'auto': Grows with content; no built-in scrollbar. Default for BareEditor and ContextualEditor.
455
447
  */
456
448
  export type EditorHeightMode = 'fixed' | 'auto';
457
- /**
458
- * Base options for all Lexical editor variants
459
- */
460
- export interface LexicalEditorBaseOptions {
449
+ interface UntypedLexicalEditorOptions {
461
450
  /**
462
451
  * Editor namespace (for multiple editors on the same page)
463
452
  */
464
453
  namespace?: string;
465
- /**
466
- * Initial content value
467
- */
468
- value?: Value<EditorContent>;
469
- /**
470
- * Content format type
471
- */
472
- format?: Value<ContentFormatType>;
473
454
  /**
474
455
  * Plugin configuration
475
456
  */
@@ -492,18 +473,6 @@ export interface LexicalEditorBaseOptions {
492
473
  * @param editor - The editor instance
493
474
  */
494
475
  onError?: (error: Error, editor: LexicalEditor) => void;
495
- /**
496
- * Input event handler (fires on every change)
497
- * @param content - The current content
498
- * @param editor - The editor instance
499
- */
500
- onInput?: (content: EditorContent, editor: LexicalEditor) => void;
501
- /**
502
- * Change event handler (fires after debounced changes)
503
- * @param content - The current content
504
- * @param editor - The editor instance
505
- */
506
- onChange?: (content: EditorContent, editor: LexicalEditor) => void;
507
476
  /**
508
477
  * Blur event handler
509
478
  * @param editor - The editor instance
@@ -525,6 +494,19 @@ export interface LexicalEditorBaseOptions {
525
494
  */
526
495
  heightMode?: EditorHeightMode;
527
496
  }
497
+ interface StringLexicalEditorOptions extends UntypedLexicalEditorOptions {
498
+ value?: Value<string>;
499
+ format?: 'markdown' | 'json';
500
+ onChange?: (content: string, editor: LexicalEditor) => void;
501
+ onInput?: (content: string, editor: LexicalEditor) => void;
502
+ }
503
+ interface JsonLexicalEditorOptions extends UntypedLexicalEditorOptions {
504
+ value?: Value<JsonContent>;
505
+ format?: 'json';
506
+ onChange?: (content: JsonContent, editor: LexicalEditor) => void;
507
+ onInput?: (content: JsonContent, editor: LexicalEditor) => void;
508
+ }
509
+ export type LexicalEditorBaseOptions = StringLexicalEditorOptions | JsonLexicalEditorOptions;
528
510
  /**
529
511
  * Options for bare editor (minimal features)
530
512
  */
@@ -532,16 +514,16 @@ export type BareEditorOptions = LexicalEditorBaseOptions;
532
514
  /**
533
515
  * Options for docked editor (with fixed toolbar)
534
516
  */
535
- export interface DockedEditorOptions extends LexicalEditorBaseOptions {
517
+ export type DockedEditorOptions = LexicalEditorBaseOptions & {
536
518
  /**
537
519
  * Toolbar configuration
538
520
  */
539
521
  toolbar?: ToolbarConfig;
540
- }
522
+ };
541
523
  /**
542
524
  * Options for contextual editor (with floating toolbar and block handle)
543
525
  */
544
- export interface ContextualEditorOptions extends LexicalEditorBaseOptions {
526
+ export type ContextualEditorOptions = LexicalEditorBaseOptions & {
545
527
  /**
546
528
  * @deprecated Slash commands are no longer used. Use the block handle instead.
547
529
  */
@@ -550,7 +532,7 @@ export interface ContextualEditorOptions extends LexicalEditorBaseOptions {
550
532
  * Floating toolbar groups to show
551
533
  */
552
534
  floatingToolbarGroups?: ToolbarGroupId[];
553
- }
535
+ };
554
536
  /**
555
537
  * Options for Lexical string input (markdown or HTML)
556
538
  */
@@ -632,3 +614,4 @@ export interface SelectionInfo {
632
614
  * Editor preset type for createDefaultPluginConfig
633
615
  */
634
616
  export type EditorPresetType = 'bare' | 'docked' | 'contextual';
617
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tempots/beatui",
3
- "version": "0.83.3",
3
+ "version": "0.83.4",
4
4
  "type": "module",
5
5
  "main": "dist/index.umd.js",
6
6
  "module": "dist/index.es.js",