@yungu-fed/rich-text-editor 0.1.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.
Files changed (127) hide show
  1. package/README.md +74 -0
  2. package/dist/index.cjs +9 -0
  3. package/dist/index.css +1 -0
  4. package/dist/index.d.ts +4 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +9986 -0
  7. package/dist/mathlive.min-DhvSIziw.js +39472 -0
  8. package/dist/mathlive.min-e1W1EjoF.cjs +3237 -0
  9. package/dist/rich-text-editor/i18n.d.ts +63 -0
  10. package/dist/rich-text-editor/i18n.d.ts.map +1 -0
  11. package/dist/rich-text-editor/index.d.ts +38 -0
  12. package/dist/rich-text-editor/index.d.ts.map +1 -0
  13. package/dist/rich-text-editor/primitives/Editor.d.ts +3 -0
  14. package/dist/rich-text-editor/primitives/Editor.d.ts.map +1 -0
  15. package/dist/rich-text-editor/primitives/FormulaObject.d.ts +3 -0
  16. package/dist/rich-text-editor/primitives/FormulaObject.d.ts.map +1 -0
  17. package/dist/rich-text-editor/primitives/ImageObject.d.ts +3 -0
  18. package/dist/rich-text-editor/primitives/ImageObject.d.ts.map +1 -0
  19. package/dist/rich-text-editor/primitives/InsertNodeButton.d.ts +3 -0
  20. package/dist/rich-text-editor/primitives/InsertNodeButton.d.ts.map +1 -0
  21. package/dist/rich-text-editor/primitives/ObjectElement.d.ts +12 -0
  22. package/dist/rich-text-editor/primitives/ObjectElement.d.ts.map +1 -0
  23. package/dist/rich-text-editor/primitives/RichTextEditorRootProvider.d.ts +18 -0
  24. package/dist/rich-text-editor/primitives/RichTextEditorRootProvider.d.ts.map +1 -0
  25. package/dist/rich-text-editor/primitives/Root.d.ts +3 -0
  26. package/dist/rich-text-editor/primitives/Root.d.ts.map +1 -0
  27. package/dist/rich-text-editor/primitives/SelectAction.d.ts +7 -0
  28. package/dist/rich-text-editor/primitives/SelectAction.d.ts.map +1 -0
  29. package/dist/rich-text-editor/primitives/TableCellElement.d.ts +9 -0
  30. package/dist/rich-text-editor/primitives/TableCellElement.d.ts.map +1 -0
  31. package/dist/rich-text-editor/primitives/TableElement.d.ts +7 -0
  32. package/dist/rich-text-editor/primitives/TableElement.d.ts.map +1 -0
  33. package/dist/rich-text-editor/primitives/Toolbar.d.ts +11 -0
  34. package/dist/rich-text-editor/primitives/Toolbar.d.ts.map +1 -0
  35. package/dist/rich-text-editor/primitives/ToolbarAction.d.ts +7 -0
  36. package/dist/rich-text-editor/primitives/ToolbarAction.d.ts.map +1 -0
  37. package/dist/rich-text-editor/primitives/ToolbarIcon.d.ts +7 -0
  38. package/dist/rich-text-editor/primitives/ToolbarIcon.d.ts.map +1 -0
  39. package/dist/rich-text-editor/primitives/ToolbarSection.d.ts +3 -0
  40. package/dist/rich-text-editor/primitives/ToolbarSection.d.ts.map +1 -0
  41. package/dist/rich-text-editor/primitives/ToolbarSeparator.d.ts +3 -0
  42. package/dist/rich-text-editor/primitives/ToolbarSeparator.d.ts.map +1 -0
  43. package/dist/rich-text-editor/primitives/codecs.d.ts +7 -0
  44. package/dist/rich-text-editor/primitives/codecs.d.ts.map +1 -0
  45. package/dist/rich-text-editor/primitives/commands.d.ts +2 -0
  46. package/dist/rich-text-editor/primitives/commands.d.ts.map +1 -0
  47. package/dist/rich-text-editor/primitives/context.d.ts +47 -0
  48. package/dist/rich-text-editor/primitives/context.d.ts.map +1 -0
  49. package/dist/rich-text-editor/primitives/createSelectAction.d.ts +4 -0
  50. package/dist/rich-text-editor/primitives/createSelectAction.d.ts.map +1 -0
  51. package/dist/rich-text-editor/primitives/createToolbarButton.d.ts +4 -0
  52. package/dist/rich-text-editor/primitives/createToolbarButton.d.ts.map +1 -0
  53. package/dist/rich-text-editor/primitives/featureDefinitions.d.ts +3 -0
  54. package/dist/rich-text-editor/primitives/featureDefinitions.d.ts.map +1 -0
  55. package/dist/rich-text-editor/primitives/featureRegistry.d.ts +155 -0
  56. package/dist/rich-text-editor/primitives/featureRegistry.d.ts.map +1 -0
  57. package/dist/rich-text-editor/primitives/focusBoundary.d.ts +13 -0
  58. package/dist/rich-text-editor/primitives/focusBoundary.d.ts.map +1 -0
  59. package/dist/rich-text-editor/primitives/index.d.ts +138 -0
  60. package/dist/rich-text-editor/primitives/index.d.ts.map +1 -0
  61. package/dist/rich-text-editor/primitives/nodeFactories.d.ts +13 -0
  62. package/dist/rich-text-editor/primitives/nodeFactories.d.ts.map +1 -0
  63. package/dist/rich-text-editor/primitives/nodeInsertCommand.d.ts +13 -0
  64. package/dist/rich-text-editor/primitives/nodeInsertCommand.d.ts.map +1 -0
  65. package/dist/rich-text-editor/primitives/slateRenderers.d.ts +5 -0
  66. package/dist/rich-text-editor/primitives/slateRenderers.d.ts.map +1 -0
  67. package/dist/rich-text-editor/primitives/slateRuntime.d.ts +36 -0
  68. package/dist/rich-text-editor/primitives/slateRuntime.d.ts.map +1 -0
  69. package/dist/rich-text-editor/primitives/slateTypes.d.ts +33 -0
  70. package/dist/rich-text-editor/primitives/slateTypes.d.ts.map +1 -0
  71. package/dist/rich-text-editor/primitives/tableCommands.d.ts +20 -0
  72. package/dist/rich-text-editor/primitives/tableCommands.d.ts.map +1 -0
  73. package/dist/rich-text-editor/primitives/tableModel.d.ts +16 -0
  74. package/dist/rich-text-editor/primitives/tableModel.d.ts.map +1 -0
  75. package/dist/rich-text-editor/primitives/toolbarActions.d.ts +24 -0
  76. package/dist/rich-text-editor/primitives/toolbarActions.d.ts.map +1 -0
  77. package/dist/rich-text-editor/primitives/toolbarState.d.ts +12 -0
  78. package/dist/rich-text-editor/primitives/toolbarState.d.ts.map +1 -0
  79. package/dist/rich-text-editor/primitives/types.d.ts +168 -0
  80. package/dist/rich-text-editor/primitives/types.d.ts.map +1 -0
  81. package/dist/rich-text-editor/styled/DefaultToolbarSection.d.ts +8 -0
  82. package/dist/rich-text-editor/styled/DefaultToolbarSection.d.ts.map +1 -0
  83. package/dist/rich-text-editor/styled/DefaultToolbarSeparator.d.ts +2 -0
  84. package/dist/rich-text-editor/styled/DefaultToolbarSeparator.d.ts.map +1 -0
  85. package/dist/rich-text-editor/styled/Editor.d.ts +4 -0
  86. package/dist/rich-text-editor/styled/Editor.d.ts.map +1 -0
  87. package/dist/rich-text-editor/styled/FormulaButton.d.ts +3 -0
  88. package/dist/rich-text-editor/styled/FormulaButton.d.ts.map +1 -0
  89. package/dist/rich-text-editor/styled/FormulaDialog.d.ts +2 -0
  90. package/dist/rich-text-editor/styled/FormulaDialog.d.ts.map +1 -0
  91. package/dist/rich-text-editor/styled/FormulaDialogContent.d.ts +2 -0
  92. package/dist/rich-text-editor/styled/FormulaDialogContent.d.ts.map +1 -0
  93. package/dist/rich-text-editor/styled/ImageButton.d.ts +3 -0
  94. package/dist/rich-text-editor/styled/ImageButton.d.ts.map +1 -0
  95. package/dist/rich-text-editor/styled/MathFieldInput.d.ts +10 -0
  96. package/dist/rich-text-editor/styled/MathFieldInput.d.ts.map +1 -0
  97. package/dist/rich-text-editor/styled/Root.d.ts +10 -0
  98. package/dist/rich-text-editor/styled/Root.d.ts.map +1 -0
  99. package/dist/rich-text-editor/styled/StyledToolbarIconButton.d.ts +11 -0
  100. package/dist/rich-text-editor/styled/StyledToolbarIconButton.d.ts.map +1 -0
  101. package/dist/rich-text-editor/styled/Toolbar.d.ts +3 -0
  102. package/dist/rich-text-editor/styled/Toolbar.d.ts.map +1 -0
  103. package/dist/rich-text-editor/styled/ToolbarSection.d.ts +3 -0
  104. package/dist/rich-text-editor/styled/ToolbarSection.d.ts.map +1 -0
  105. package/dist/rich-text-editor/styled/ToolbarSeparator.d.ts +3 -0
  106. package/dist/rich-text-editor/styled/ToolbarSeparator.d.ts.map +1 -0
  107. package/dist/rich-text-editor/styled/createStyledInsertNodeButton.d.ts +6 -0
  108. package/dist/rich-text-editor/styled/createStyledInsertNodeButton.d.ts.map +1 -0
  109. package/dist/rich-text-editor/styled/createStyledSelectButton.d.ts +6 -0
  110. package/dist/rich-text-editor/styled/createStyledSelectButton.d.ts.map +1 -0
  111. package/dist/rich-text-editor/styled/createStyledToolbarButton.d.ts +6 -0
  112. package/dist/rich-text-editor/styled/createStyledToolbarButton.d.ts.map +1 -0
  113. package/dist/rich-text-editor/styled/defaultToolbar.d.ts +2 -0
  114. package/dist/rich-text-editor/styled/defaultToolbar.d.ts.map +1 -0
  115. package/dist/rich-text-editor/styled/index.d.ts +71 -0
  116. package/dist/rich-text-editor/styled/index.d.ts.map +1 -0
  117. package/dist/rich-text-editor/styled/mathliveLoader.d.ts +6 -0
  118. package/dist/rich-text-editor/styled/mathliveLoader.d.ts.map +1 -0
  119. package/dist/rich-text-editor/styled/mediaCommands.d.ts +5 -0
  120. package/dist/rich-text-editor/styled/mediaCommands.d.ts.map +1 -0
  121. package/dist/rich-text-editor/styled/mediaContext.d.ts +22 -0
  122. package/dist/rich-text-editor/styled/mediaContext.d.ts.map +1 -0
  123. package/dist/rich-text-editor/styled/mediaTypes.d.ts +14 -0
  124. package/dist/rich-text-editor/styled/mediaTypes.d.ts.map +1 -0
  125. package/dist/rich-text-editor/styled/toolbarDescriptors.d.ts +14 -0
  126. package/dist/rich-text-editor/styled/toolbarDescriptors.d.ts.map +1 -0
  127. package/package.json +95 -0
@@ -0,0 +1,63 @@
1
+ import { type ReactNode } from 'react';
2
+ export type RichTextEditorLocale = 'en-US' | 'zh-CN';
3
+ export type RichTextEditorMessages = {
4
+ readonly contentPlaceholder: string;
5
+ readonly formulaButton: string;
6
+ readonly formulaDialogCancel: string;
7
+ readonly formulaDialogInsert: string;
8
+ readonly formulaDialogLabel: string;
9
+ readonly formulaEditorFailed: string;
10
+ readonly formulaEditorLoading: string;
11
+ readonly formulaLatexInput: string;
12
+ readonly formulaPreviewEmpty: string;
13
+ readonly imageButton: string;
14
+ readonly tableColumnAfter: string;
15
+ readonly tableColumnBefore: string;
16
+ readonly tableColumnDelete: string;
17
+ readonly tableRowAfter: string;
18
+ readonly tableRowBefore: string;
19
+ readonly tableRowDelete: string;
20
+ readonly toolbarAlignCenter: string;
21
+ readonly toolbarAlignLeft: string;
22
+ readonly toolbarAlignRight: string;
23
+ readonly toolbarBold: string;
24
+ readonly toolbarBulletedList: string;
25
+ readonly toolbarCode: string;
26
+ readonly toolbarDivider: string;
27
+ readonly toolbarFontSize: string;
28
+ readonly toolbarFormula: string;
29
+ readonly toolbarGroupHeading: string;
30
+ readonly toolbarGroupHistory: string;
31
+ readonly toolbarGroupInsert: string;
32
+ readonly toolbarGroupParagraph: string;
33
+ readonly toolbarGroupTable: string;
34
+ readonly toolbarGroupTextStyle: string;
35
+ readonly toolbarHeading1: string;
36
+ readonly toolbarHeading2: string;
37
+ readonly toolbarHeading3: string;
38
+ readonly toolbarImage: string;
39
+ readonly toolbarItalic: string;
40
+ readonly toolbarLabel: string;
41
+ readonly toolbarNumberedList: string;
42
+ readonly toolbarRedo: string;
43
+ readonly toolbarStrike: string;
44
+ readonly toolbarTable: string;
45
+ readonly toolbarTextColor: string;
46
+ readonly toolbarUnderline: string;
47
+ readonly toolbarUndo: string;
48
+ };
49
+ export type RichTextEditorMessagesOverride = Partial<RichTextEditorMessages>;
50
+ type RichTextEditorI18nRuntime = {
51
+ readonly locale: RichTextEditorLocale;
52
+ readonly messages: RichTextEditorMessages;
53
+ };
54
+ type RichTextEditorI18nProviderProps = {
55
+ readonly children: ReactNode;
56
+ readonly locale?: RichTextEditorLocale;
57
+ readonly messages?: RichTextEditorMessagesOverride;
58
+ };
59
+ export declare function RichTextEditorI18nProvider({ children, locale, messages, }: RichTextEditorI18nProviderProps): JSX.Element;
60
+ export declare function useRichTextEditorI18n(): RichTextEditorI18nRuntime;
61
+ export declare function readRichTextEditorMessage(messages: RichTextEditorMessages, key: keyof RichTextEditorMessages | undefined): string | undefined;
62
+ export {};
63
+ //# sourceMappingURL=i18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/rich-text-editor/i18n.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SA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,EAAE,8BAA8B,CAAA;CACnD,CAAA;AAuGD,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,MAAuB,EACvB,QAAQ,GACT,EAAE,+BAA+B,eAiBjC;AAED,wBAAgB,qBAAqB,8BAEpC;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,sBAAsB,EAChC,GAAG,EAAE,MAAM,sBAAsB,GAAG,SAAS,sBAS9C"}
@@ -0,0 +1,38 @@
1
+ export declare const RichTextEditor: {
2
+ Editor: typeof import("./styled/Editor").Editor;
3
+ Root: typeof import("./styled/Root").Root;
4
+ Toolbar: typeof import("./styled/Toolbar").Toolbar & {
5
+ AlignCenterButton: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
6
+ AlignLeftButton: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
7
+ AlignRightButton: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
8
+ BoldToggle: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
9
+ BulletedListToggle: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
10
+ CodeToggle: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
11
+ ColorSelect: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
12
+ Case: typeof import("./primitives/Toolbar").ToolbarCase;
13
+ Default: typeof import("./primitives/Toolbar").ToolbarDefault;
14
+ DividerButton: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
15
+ FontSizeSelect: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
16
+ FormulaButton: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
17
+ Heading1Button: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
18
+ Heading2Button: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
19
+ Heading3Button: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
20
+ ImageButton: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
21
+ InsertNodeButton: ({ className, ...props }: import("./primitives").RichTextEditorInsertNodeButtonProps) => JSX.Element;
22
+ ItalicToggle: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
23
+ NumberedListToggle: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
24
+ RedoButton: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
25
+ Section: typeof import("./styled/ToolbarSection").ToolbarSection;
26
+ Separator: typeof import("./styled/ToolbarSeparator").ToolbarSeparator;
27
+ StrikeToggle: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
28
+ Switch: typeof import("./primitives/Toolbar").ToolbarSwitch;
29
+ TableButton: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
30
+ UnderlineToggle: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
31
+ UndoButton: (props: import("./primitives").RichTextEditorSelectActionProps) => JSX.Element;
32
+ };
33
+ };
34
+ export type { RichTextEditorLocale, RichTextEditorMessages, RichTextEditorMessagesOverride, } from './i18n';
35
+ export { deserializeRichTextEditorHtml, deserializeRichTextEditorJson, serializeRichTextEditorHtml, serializeRichTextEditorJson, } from './primitives';
36
+ export type { RichTextEditorApi, RichTextEditorCodecOptions, RichTextEditorCommand, RichTextEditorCommandHandler, RichTextEditorCommandHandlerContext, RichTextEditorCommandPayload, RichTextEditorEditorFocusChangeContext, RichTextEditorElement, RichTextEditorElementPatch, RichTextEditorHtmlDeserializer, RichTextEditorHtmlSerializer, RichTextEditorInsertNodeButtonProps, RichTextEditorJsonDeserializer, RichTextEditorJsonSerializer, RichTextEditorNodeCodecs, RichTextEditorNodeCommands, RichTextEditorNodeDefinition, RichTextEditorNodeRender, RichTextEditorNodeSchema, RichTextEditorObjectDefinition, RichTextEditorObjectInteraction, RichTextEditorObjectRenderContext, RichTextEditorPlugin, RichTextEditorSelectActionProps, RichTextEditorSelectOption, RichTextEditorToolbarAction, RichTextEditorToolbarActionKind, RichTextEditorToolbarActionProps, RichTextEditorToolbarCaseProps, RichTextEditorToolbarDefaultProps, RichTextEditorToolbarProps, RichTextEditorToolbarSectionProps, RichTextEditorToolbarSeparatorProps, RichTextEditorToolbarSwitchProps, RichTextEditorValue, } from './primitives';
37
+ export type { RichTextEditorEditorProps, RichTextEditorFormulaApi, RichTextEditorFormulaRenderUrl, RichTextEditorImageUploadApi, RichTextEditorRootProps, } from './styled';
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rich-text-editor/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA2B,CAAA;AAEtD,YAAY,EACV,oBAAoB,EACpB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,QAAQ,CAAA;AACf,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,qBAAqB,EACrB,4BAA4B,EAC5B,mCAAmC,EACnC,4BAA4B,EAC5B,sCAAsC,EACtC,qBAAqB,EACrB,0BAA0B,EAC1B,8BAA8B,EAC9B,4BAA4B,EAC5B,mCAAmC,EACnC,8BAA8B,EAC9B,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,EACxB,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,iCAAiC,EACjC,oBAAoB,EACpB,+BAA+B,EAC/B,0BAA0B,EAC1B,2BAA2B,EAC3B,+BAA+B,EAC/B,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,EACjC,0BAA0B,EAC1B,iCAAiC,EACjC,mCAAmC,EACnC,gCAAgC,EAChC,mBAAmB,GACpB,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,UAAU,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { RichTextEditorEditorProps } from './types';
2
+ export declare function Editor({ 'aria-label': ariaLabel, apiRef, className, editorId, initialValue, onChange, onObjectInteraction, onPasteImageFiles, onPasteImageSources, placeholder, toolbar, value, }: RichTextEditorEditorProps): JSX.Element;
3
+ //# sourceMappingURL=Editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/Editor.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAaxD,wBAAgB,MAAM,CAAC,EACrB,YAAY,EAAE,SAAS,EACvB,MAAM,EACN,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,OAAO,EACP,KAAK,GACN,EAAE,yBAAyB,eAoG3B"}
@@ -0,0 +1,3 @@
1
+ import type { RichTextEditorObjectRenderContext } from './types';
2
+ export declare function FormulaObject({ dispatchInteraction, element, focused, selected, }: RichTextEditorObjectRenderContext): JSX.Element;
3
+ //# sourceMappingURL=FormulaObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormulaObject.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/FormulaObject.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAA;AAKhE,wBAAgB,aAAa,CAAC,EAC5B,mBAAmB,EACnB,OAAO,EACP,OAAO,EACP,QAAQ,GACT,EAAE,iCAAiC,eAyBnC"}
@@ -0,0 +1,3 @@
1
+ import type { RichTextEditorObjectRenderContext } from './types';
2
+ export declare function ImageObject({ element, focused, selected, updateElement, }: RichTextEditorObjectRenderContext): JSX.Element;
3
+ //# sourceMappingURL=ImageObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageObject.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/ImageObject.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAA;AAOhE,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,OAAO,EACP,QAAQ,EACR,aAAa,GACd,EAAE,iCAAiC,eAuFnC"}
@@ -0,0 +1,3 @@
1
+ import type { RichTextEditorInsertNodeButtonProps } from './types';
2
+ export declare function InsertNodeButton({ nodeType, payload, ...actionProps }: RichTextEditorInsertNodeButtonProps): JSX.Element;
3
+ //# sourceMappingURL=InsertNodeButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InsertNodeButton.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/InsertNodeButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,SAAS,CAAA;AAMlE,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,OAAO,EACP,GAAG,WAAW,EACf,EAAE,mCAAmC,eAarC"}
@@ -0,0 +1,12 @@
1
+ import type { RenderElementProps } from 'slate-react';
2
+ import type { RichTextEditorSlateElement } from './slateTypes';
3
+ import type { RichTextEditorObjectDefinition } from './types';
4
+ type ObjectElementProps = {
5
+ readonly attributes: RenderElementProps['attributes'];
6
+ readonly children: RenderElementProps['children'];
7
+ readonly element: RichTextEditorSlateElement;
8
+ readonly object: RichTextEditorObjectDefinition;
9
+ };
10
+ export declare function ObjectElement({ attributes, children, element, object, }: ObjectElementProps): JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=ObjectElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectElement.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/ObjectElement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAUrD,OAAO,KAAK,EAGV,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAEV,8BAA8B,EAC/B,MAAM,SAAS,CAAA;AAKhB,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAA;IACrD,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAA;IACjD,QAAQ,CAAC,OAAO,EAAE,0BAA0B,CAAA;IAC5C,QAAQ,CAAC,MAAM,EAAE,8BAA8B,CAAA;CAChD,CAAA;AAED,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,QAAQ,EACR,OAAO,EACP,MAAM,GACP,EAAE,kBAAkB,eAwEpB"}
@@ -0,0 +1,18 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { RichTextEditorFeatureRegistry } from './featureRegistry';
3
+ import type { RichTextEditorRuntimeRegistration } from './slateRuntime';
4
+ import type { RichTextEditorEditorProps } from './types';
5
+ type RichTextEditorRootProviderProps = {
6
+ readonly apiRef?: RichTextEditorEditorProps['apiRef'];
7
+ readonly children: ReactNode;
8
+ readonly editorId: string;
9
+ readonly initialValue?: RichTextEditorEditorProps['initialValue'];
10
+ readonly onChange?: RichTextEditorEditorProps['onChange'];
11
+ readonly onObjectInteraction?: RichTextEditorEditorProps['onObjectInteraction'];
12
+ readonly registration: RichTextEditorRuntimeRegistration;
13
+ readonly registry: RichTextEditorFeatureRegistry;
14
+ readonly value?: RichTextEditorEditorProps['value'];
15
+ };
16
+ export declare function RichTextEditorRootProvider({ apiRef, children, editorId, initialValue, onChange, onObjectInteraction, registration, registry, value, }: RichTextEditorRootProviderProps): JSX.Element;
17
+ export {};
18
+ //# sourceMappingURL=RichTextEditorRootProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RichTextEditorRootProvider.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/RichTextEditorRootProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE/C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gBAAgB,CAAA;AACvE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAIxD,KAAK,+BAA+B,GAAG;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,yBAAyB,CAAC,QAAQ,CAAC,CAAA;IACrD,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,YAAY,CAAC,EAAE,yBAAyB,CAAC,cAAc,CAAC,CAAA;IACjE,QAAQ,CAAC,QAAQ,CAAC,EAAE,yBAAyB,CAAC,UAAU,CAAC,CAAA;IACzD,QAAQ,CAAC,mBAAmB,CAAC,EAAE,yBAAyB,CAAC,qBAAqB,CAAC,CAAA;IAC/E,QAAQ,CAAC,YAAY,EAAE,iCAAiC,CAAA;IACxD,QAAQ,CAAC,QAAQ,EAAE,6BAA6B,CAAA;IAChD,QAAQ,CAAC,KAAK,CAAC,EAAE,yBAAyB,CAAC,OAAO,CAAC,CAAA;CACpD,CAAA;AAED,wBAAgB,0BAA0B,CAAC,EACzC,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,KAAK,GACN,EAAE,+BAA+B,eA6BjC"}
@@ -0,0 +1,3 @@
1
+ import type { RichTextEditorRootProps } from './types';
2
+ export declare function Root({ children, className, defaultActiveEditorId, id, onCommand, onEditorFocusChange, plugins, }: RichTextEditorRootProps): JSX.Element;
3
+ //# sourceMappingURL=Root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Root.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/Root.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAYtD,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,SAAS,EACT,qBAAqB,EACrB,EAAE,EACF,SAAS,EACT,mBAAmB,EACnB,OAAO,GACR,EAAE,uBAAuB,eAczB"}
@@ -0,0 +1,7 @@
1
+ import type { RichTextEditorToolbarAction } from './toolbarActions';
2
+ import type { RichTextEditorSelectActionProps } from './types';
3
+ export type SelectActionProps = RichTextEditorSelectActionProps & {
4
+ readonly action: RichTextEditorToolbarAction;
5
+ };
6
+ export declare function SelectAction({ action, 'aria-label': ariaLabel, asChild, children, className, defaultValue, disabled, options, payload, }: SelectActionProps): JSX.Element;
7
+ //# sourceMappingURL=SelectAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectAction.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/SelectAction.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAA;AAU9D,MAAM,MAAM,iBAAiB,GAAG,+BAA+B,GAAG;IAChE,QAAQ,CAAC,MAAM,EAAE,2BAA2B,CAAA;CAC7C,CAAA;AAQD,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,YAAY,EAAE,SAAS,EACvB,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,QAAgB,EAChB,OAAY,EACZ,OAAO,GACR,EAAE,iBAAiB,eAiFnB"}
@@ -0,0 +1,9 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type Element as SlateElement } from 'slate';
3
+ import { type RenderElementProps } from 'slate-react';
4
+ export declare function TableCellElement({ attributes, children, element, }: {
5
+ readonly attributes: RenderElementProps['attributes'];
6
+ readonly children: ReactNode;
7
+ readonly element: SlateElement;
8
+ }): JSX.Element;
9
+ //# sourceMappingURL=TableCellElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCellElement.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/TableCellElement.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACjG,OAAO,EAAsB,KAAK,OAAO,IAAI,YAAY,EAAE,MAAM,OAAO,CAAA;AACxE,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAA;AAkBpB,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EACV,QAAQ,EACR,OAAO,GACR,EAAE;IACD,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAA;IACrD,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAA;CAC/B,eA6IA"}
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { RenderElementProps } from 'slate-react';
3
+ export declare function TableElement({ attributes, children, }: {
4
+ readonly attributes: RenderElementProps['attributes'];
5
+ readonly children: ReactNode;
6
+ }): JSX.Element;
7
+ //# sourceMappingURL=TableElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableElement.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/TableElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAIrD,wBAAgB,YAAY,CAAC,EAC3B,UAAU,EACV,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAA;IACrD,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B,eAMA"}
@@ -0,0 +1,11 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { RichTextEditorToolbarCaseProps, RichTextEditorToolbarDefaultProps, RichTextEditorToolbarProps, RichTextEditorToolbarSwitchProps } from './types';
3
+ type ToolbarProps = RichTextEditorToolbarProps & {
4
+ readonly defaultContent?: ReactNode;
5
+ };
6
+ export declare function Toolbar({ 'aria-label': ariaLabel, children, className, defaultContent, visibleWhen, }: ToolbarProps): JSX.Element;
7
+ export declare function ToolbarSwitch({ children }: RichTextEditorToolbarSwitchProps): JSX.Element;
8
+ export declare function ToolbarCase({ children }: RichTextEditorToolbarCaseProps): JSX.Element;
9
+ export declare function ToolbarDefault({ children }: RichTextEditorToolbarDefaultProps): JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=Toolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/Toolbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAEd,OAAO,KAAK,EACV,8BAA8B,EAC9B,iCAAiC,EACjC,0BAA0B,EAC1B,gCAAgC,EACjC,MAAM,SAAS,CAAA;AAMhB,KAAK,YAAY,GAAG,0BAA0B,GAAG;IAC/C,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,CAAA;CACpC,CAAA;AAED,wBAAgB,OAAO,CAAC,EACtB,YAAY,EAAE,SAAS,EACvB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,WAAsB,GACvB,EAAE,YAAY,eAiCd;AASD,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,gCAAgC,eAE3E;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,8BAA8B,eAEvE;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,iCAAiC,eAE7E"}
@@ -0,0 +1,7 @@
1
+ import type { RichTextEditorToolbarAction } from './toolbarActions';
2
+ import type { RichTextEditorToolbarActionProps } from './types';
3
+ export type ToolbarActionProps = RichTextEditorToolbarActionProps & {
4
+ readonly action: RichTextEditorToolbarAction;
5
+ };
6
+ export declare function ToolbarAction({ action, 'aria-label': ariaLabel, asChild, children, className, disabled, payload, }: ToolbarActionProps): JSX.Element;
7
+ //# sourceMappingURL=ToolbarAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolbarAction.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/ToolbarAction.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAA;AAU/D,MAAM,MAAM,kBAAkB,GAAG,gCAAgC,GAAG;IAClE,QAAQ,CAAC,MAAM,EAAE,2BAA2B,CAAA;CAC7C,CAAA;AAED,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,YAAY,EAAE,SAAS,EACvB,OAAO,EACP,QAAQ,EACR,SAAS,EACT,QAAgB,EAChB,OAAO,GACR,EAAE,kBAAkB,eA2CpB"}
@@ -0,0 +1,7 @@
1
+ import type { LucideIcon } from 'lucide-react';
2
+ type ToolbarIconProps = {
3
+ readonly icon: LucideIcon;
4
+ };
5
+ export declare function ToolbarIcon({ icon: Icon }: ToolbarIconProps): JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=ToolbarIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolbarIcon.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/ToolbarIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAI9C,KAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAC1B,CAAA;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,gBAAgB,eAI3D"}
@@ -0,0 +1,3 @@
1
+ import type { RichTextEditorToolbarSectionProps } from './types';
2
+ export declare function ToolbarSection({ 'aria-label': ariaLabel, children, className, }: RichTextEditorToolbarSectionProps): JSX.Element;
3
+ //# sourceMappingURL=ToolbarSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolbarSection.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/ToolbarSection.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAA;AAIhE,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EAAE,SAAS,EACvB,QAAQ,EACR,SAAS,GACV,EAAE,iCAAiC,eAUnC"}
@@ -0,0 +1,3 @@
1
+ import type { RichTextEditorToolbarSeparatorProps } from './types';
2
+ export declare function ToolbarSeparator(props: RichTextEditorToolbarSeparatorProps): JSX.Element;
3
+ //# sourceMappingURL=ToolbarSeparator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolbarSeparator.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/ToolbarSeparator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,SAAS,CAAA;AAIlE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,mCAAmC,eAU1E"}
@@ -0,0 +1,7 @@
1
+ import type { RichTextEditorValue } from './slateTypes';
2
+ import type { RichTextEditorCodecOptions } from './types';
3
+ export declare function deserializeRichTextEditorHtml(html: string, options?: RichTextEditorCodecOptions): RichTextEditorValue;
4
+ export declare function serializeRichTextEditorHtml(value: RichTextEditorValue, options?: RichTextEditorCodecOptions): string;
5
+ export declare function deserializeRichTextEditorJson(input: unknown, options?: RichTextEditorCodecOptions): RichTextEditorValue;
6
+ export declare function serializeRichTextEditorJson(value: RichTextEditorValue, options?: RichTextEditorCodecOptions): unknown[];
7
+ //# sourceMappingURL=codecs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codecs.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/codecs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAazD,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,0BAA+B,GACvC,mBAAmB,CAMrB;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,mBAAmB,EAC1B,OAAO,GAAE,0BAA+B,UAQzC;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,0BAA+B,GACvC,mBAAmB,CAWrB;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,mBAAmB,EAC1B,OAAO,GAAE,0BAA+B,aAKzC"}
@@ -0,0 +1,2 @@
1
+ export declare const NODE_INSERT_COMMAND = "node.insert";
2
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/commands.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,gBAAgB,CAAA"}
@@ -0,0 +1,47 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { RichTextEditorFeatureRegistry } from './featureRegistry';
3
+ import type { RichTextEditorRuntimeRegistration } from './slateRuntime';
4
+ import type { RichTextEditorValue } from './slateTypes';
5
+ import type { RichTextEditorCommand } from './toolbarActions';
6
+ import type { RichTextEditorToolbarState } from './toolbarState';
7
+ import type { RichTextEditorApi, RichTextEditorCommandHandler, RichTextEditorEditorFocusChangeContext, RichTextEditorObjectInteraction, RichTextEditorPlugin } from './types';
8
+ type RichTextEditorRuntime = {
9
+ readonly activeEditorId: string | null;
10
+ readonly activeToolbar: string | undefined;
11
+ readonly activeToolbarState: RichTextEditorToolbarState;
12
+ readonly clearEditorFocus: () => void;
13
+ readonly dispatchCommand: (command: RichTextEditorCommand) => void;
14
+ readonly focusEditor: (editorId: string) => void;
15
+ readonly focusedEditorId: string | null;
16
+ readonly isEditorFocused: (editorId: string) => boolean;
17
+ readonly plugins: readonly RichTextEditorPlugin[];
18
+ readonly registerEditor: (editorId: string, registration: RichTextEditorRuntimeRegistration, toolbar: string | undefined) => () => void;
19
+ readonly registerToolbar: () => () => void;
20
+ readonly refreshToolbarState: (editorId: string) => void;
21
+ readonly rootId?: string;
22
+ readonly setCommandTargetEditor: (editorId: string) => void;
23
+ };
24
+ type RichTextEditorRootRuntime = {
25
+ readonly apiRef?: React.Ref<RichTextEditorApi>;
26
+ readonly editorId: string;
27
+ readonly initialValue?: RichTextEditorValue;
28
+ readonly onObjectInteraction?: (interaction: RichTextEditorObjectInteraction) => void;
29
+ readonly onChange?: (value: RichTextEditorValue) => void;
30
+ readonly registration: RichTextEditorRuntimeRegistration;
31
+ readonly registry: RichTextEditorFeatureRegistry;
32
+ readonly value?: RichTextEditorValue;
33
+ };
34
+ declare const RichTextEditorRootContext: import("react").Context<RichTextEditorRootRuntime | null>;
35
+ type RichTextEditorRuntimeProviderProps = {
36
+ readonly children: ReactNode;
37
+ readonly defaultActiveEditorId?: string;
38
+ readonly onCommand?: RichTextEditorCommandHandler;
39
+ readonly onEditorFocusChange?: (context: RichTextEditorEditorFocusChangeContext) => void;
40
+ readonly plugins?: readonly RichTextEditorPlugin[];
41
+ readonly rootId?: string;
42
+ };
43
+ export declare function RichTextEditorRuntimeProvider({ children, defaultActiveEditorId, onCommand, onEditorFocusChange, plugins, rootId, }: RichTextEditorRuntimeProviderProps): JSX.Element;
44
+ export declare function useRichTextEditorRuntime(): RichTextEditorRuntime;
45
+ export declare function useRichTextEditorRootRuntime(): RichTextEditorRootRuntime;
46
+ export { RichTextEditorRootContext };
47
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primit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C,EAC5C,QAAQ,EACR,qBAAqB,EACrB,SAAS,EACT,mBAAmB,EACnB,OAAY,EACZ,MAAM,GACP,EAAE,kCAAkC,eA0MpC;AAED,wBAAgB,wBAAwB,0BAUvC;AAED,wBAAgB,4BAA4B,8BAU3C;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { RichTextEditorToolbarAction } from './toolbarActions';
2
+ import type { RichTextEditorSelectActionProps } from './types';
3
+ export declare function createSelectAction(action: RichTextEditorToolbarAction): (props: RichTextEditorSelectActionProps) => JSX.Element;
4
+ //# sourceMappingURL=createSelectAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSelectAction.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/createSelectAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAA;AAI9D,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,2BAA2B,IAChC,OAAO,+BAA+B,iBAG3E"}
@@ -0,0 +1,4 @@
1
+ import type { RichTextEditorToolbarAction } from './toolbarActions';
2
+ import type { RichTextEditorToolbarActionProps } from './types';
3
+ export declare function createToolbarButton(action: RichTextEditorToolbarAction): (props: RichTextEditorToolbarActionProps) => JSX.Element;
4
+ //# sourceMappingURL=createToolbarButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createToolbarButton.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/createToolbarButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAA;AAI/D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,2BAA2B,IAChC,OAAO,gCAAgC,iBAG7E"}
@@ -0,0 +1,3 @@
1
+ import type { RichTextEditorFeatureDefinition } from './featureRegistry';
2
+ export declare const BUILT_IN_FEATURE_DEFINITIONS: readonly RichTextEditorFeatureDefinition[];
3
+ //# sourceMappingURL=featureDefinitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"featureDefinitions.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/featureDefinitions.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAEV,+BAA+B,EAIhC,MAAM,mBAAmB,CAAA;AAoD1B,eAAO,MAAM,4BAA4B,EAAE,SAAS,+BAA+B,EAikBhF,CAAA"}
@@ -0,0 +1,155 @@
1
+ import type { LucideIcon } from 'lucide-react';
2
+ import type { ReactElement } from 'react';
3
+ import type { Descendant, NodeEntry, TextUnit } from 'slate';
4
+ import type { RenderElementProps } from 'slate-react';
5
+ import type { RichTextEditorSlate, RichTextEditorSlateElement } from './slateTypes';
6
+ import type { RichTextEditorCommand, RichTextEditorCommandPayload } from './toolbarActions';
7
+ import type { RichTextEditorNodeSchema, RichTextEditorObjectDefinition, RichTextEditorPlugin } from './types';
8
+ export type RichTextEditorCommandContext = {
9
+ readonly command: RichTextEditorCommand;
10
+ readonly editor: RichTextEditorSlate;
11
+ readonly registry: RichTextEditorFeatureRegistry;
12
+ };
13
+ export type RichTextEditorCommandDefinition = {
14
+ readonly command: string;
15
+ readonly run: (context: RichTextEditorCommandContext) => boolean;
16
+ };
17
+ export type RichTextEditorToolbarStateEntry = {
18
+ readonly command: string;
19
+ readonly payload?: RichTextEditorCommandPayload;
20
+ };
21
+ export type RichTextEditorToolbarStateContext = {
22
+ readonly editor: RichTextEditorSlate;
23
+ };
24
+ export type RichTextEditorToolbarStateReader = (context: RichTextEditorToolbarStateContext) => readonly RichTextEditorToolbarStateEntry[];
25
+ export type RichTextEditorLeafRenderContext = {
26
+ readonly children: ReactElement;
27
+ readonly leaf: unknown;
28
+ };
29
+ export type RichTextEditorLeafRenderer = (context: RichTextEditorLeafRenderContext) => ReactElement;
30
+ export type RichTextEditorRuntimeNodeCommandContext = {
31
+ readonly editor: RichTextEditorSlate;
32
+ readonly payload?: RichTextEditorCommandPayload;
33
+ };
34
+ export type RichTextEditorRuntimeNodeCommands = {
35
+ readonly insert?: (context: RichTextEditorRuntimeNodeCommandContext) => RichTextEditorRuntimeNodeInsertResult | null;
36
+ };
37
+ export type RichTextEditorRuntimeNodeInsertResult = {
38
+ readonly element: Partial<RichTextEditorSlateElement>;
39
+ readonly kind: 'patch';
40
+ } | {
41
+ readonly elements: readonly RichTextEditorSlateElement[];
42
+ readonly kind: 'elements';
43
+ };
44
+ export type RichTextEditorRuntimeNodeActionContext = {
45
+ readonly editor: RichTextEditorSlate;
46
+ readonly element: RichTextEditorSlateElement;
47
+ readonly elementPath: NodeEntry<RichTextEditorSlateElement>[1];
48
+ };
49
+ export type RichTextEditorRuntimeNodeTextInputContext = RichTextEditorRuntimeNodeActionContext & {
50
+ readonly text: string;
51
+ };
52
+ export type RichTextEditorRuntimeNodeInsertDataContext = RichTextEditorRuntimeNodeActionContext & {
53
+ readonly data: DataTransfer;
54
+ };
55
+ export type RichTextEditorRuntimeNodeDeleteContext = RichTextEditorRuntimeNodeActionContext & {
56
+ readonly unit: TextUnit;
57
+ };
58
+ export type RichTextEditorRuntimeNodeDeleteSelectionContext = RichTextEditorRuntimeNodeActionContext & {
59
+ readonly key: 'Backspace' | 'Delete';
60
+ };
61
+ export type RichTextEditorRuntimeNodeMarkContext = RichTextEditorRuntimeNodeActionContext & {
62
+ readonly key: string;
63
+ readonly value?: unknown;
64
+ };
65
+ export type RichTextEditorRuntimeNodeBehavior = {
66
+ readonly onBeforeInputText?: (context: RichTextEditorRuntimeNodeTextInputContext) => boolean;
67
+ readonly onBreak?: (context: RichTextEditorRuntimeNodeActionContext) => boolean;
68
+ readonly onInsertData?: (context: RichTextEditorRuntimeNodeInsertDataContext) => boolean;
69
+ readonly onDeleteBackward?: (context: RichTextEditorRuntimeNodeDeleteContext) => boolean;
70
+ readonly onDeleteForward?: (context: RichTextEditorRuntimeNodeDeleteContext) => boolean;
71
+ readonly onDeleteFragment?: (context: RichTextEditorRuntimeNodeActionContext) => boolean;
72
+ readonly onDeleteSelection?: (context: RichTextEditorRuntimeNodeDeleteSelectionContext) => boolean;
73
+ readonly onMark?: (context: RichTextEditorRuntimeNodeMarkContext) => boolean;
74
+ };
75
+ export type RichTextEditorRuntimeNodeNormalize = (context: RichTextEditorRuntimeNodeActionContext) => boolean;
76
+ export type RichTextEditorRuntimeNodeRender = (context: RenderElementProps & {
77
+ readonly element: RichTextEditorSlateElement;
78
+ }) => ReactElement;
79
+ export type RichTextEditorRuntimeHtmlDeserializeContext = {
80
+ readonly deserializeChildren: (element: HTMLElement) => Descendant[];
81
+ readonly element: HTMLElement;
82
+ };
83
+ export type RichTextEditorRuntimeHtmlSerializeContext = {
84
+ readonly node: RichTextEditorSlateElement;
85
+ readonly serializeChildren: (node: RichTextEditorSlateElement) => string;
86
+ };
87
+ export type RichTextEditorRuntimeJsonDeserializeContext = {
88
+ readonly input: unknown;
89
+ };
90
+ export type RichTextEditorRuntimeJsonSerializeContext = {
91
+ readonly node: RichTextEditorSlateElement;
92
+ };
93
+ export type RichTextEditorRuntimeNodeCodecs = {
94
+ readonly html?: {
95
+ readonly deserialize?: (context: RichTextEditorRuntimeHtmlDeserializeContext) => RichTextEditorSlateElement | RichTextEditorSlateElement[] | null;
96
+ readonly serialize?: (context: RichTextEditorRuntimeHtmlSerializeContext) => string | null;
97
+ };
98
+ readonly hyperscript?: {
99
+ readonly tagName?: string;
100
+ };
101
+ readonly json?: {
102
+ readonly deserialize?: (context: RichTextEditorRuntimeJsonDeserializeContext) => RichTextEditorSlateElement | RichTextEditorSlateElement[] | null;
103
+ readonly serialize?: (context: RichTextEditorRuntimeJsonSerializeContext) => unknown;
104
+ };
105
+ };
106
+ export type RichTextEditorRuntimeNodeDefinition = {
107
+ readonly behavior?: RichTextEditorRuntimeNodeBehavior;
108
+ readonly codecs?: RichTextEditorRuntimeNodeCodecs;
109
+ readonly commands?: RichTextEditorRuntimeNodeCommands;
110
+ readonly normalize?: RichTextEditorRuntimeNodeNormalize;
111
+ readonly object?: RichTextEditorObjectDefinition;
112
+ readonly render?: RichTextEditorRuntimeNodeRender;
113
+ readonly schema?: RichTextEditorNodeSchema;
114
+ readonly type: string;
115
+ };
116
+ export type RichTextEditorToolbarActionDefinition = {
117
+ readonly action: RichTextEditorCommand & {
118
+ readonly defaultLabel: string;
119
+ readonly icon: LucideIcon;
120
+ readonly kind: 'button' | 'select' | 'toggle';
121
+ readonly optionLabel?: string;
122
+ readonly stateful?: boolean;
123
+ };
124
+ readonly key: string;
125
+ };
126
+ export type RichTextEditorToolbarGroupDefinition = {
127
+ readonly actionKeys: readonly string[];
128
+ readonly label: string;
129
+ };
130
+ export type RichTextEditorFeatureDefinition = {
131
+ readonly commands?: readonly RichTextEditorCommandDefinition[];
132
+ readonly createDefaultElement?: () => RichTextEditorSlateElement;
133
+ readonly key: string;
134
+ readonly renderLeaf?: RichTextEditorLeafRenderer;
135
+ readonly nodes?: readonly RichTextEditorRuntimeNodeDefinition[];
136
+ readonly readToolbarState?: RichTextEditorToolbarStateReader;
137
+ readonly toolbarActions?: readonly RichTextEditorToolbarActionDefinition[];
138
+ readonly toolbarGroups?: readonly RichTextEditorToolbarGroupDefinition[];
139
+ };
140
+ export type RichTextEditorFeatureRegistry = {
141
+ readonly commandDefinitions: readonly RichTextEditorCommandDefinition[];
142
+ readonly definitions: readonly RichTextEditorRuntimeNodeDefinition[];
143
+ readonly featureDefinitions: readonly RichTextEditorFeatureDefinition[];
144
+ readonly createDefaultElement: () => RichTextEditorSlateElement;
145
+ readonly get: (type: string) => RichTextEditorRuntimeNodeDefinition | undefined;
146
+ readonly getCommand: (command: string) => RichTextEditorCommandDefinition | undefined;
147
+ readonly getToolbarAction: (key: string) => RichTextEditorToolbarActionDefinition | undefined;
148
+ readonly toolbarActions: readonly RichTextEditorToolbarActionDefinition[];
149
+ readonly toolbarGroups: readonly RichTextEditorToolbarGroupDefinition[];
150
+ readonly leafRenderers: readonly RichTextEditorLeafRenderer[];
151
+ readonly toolbarStateReaders: readonly RichTextEditorToolbarStateReader[];
152
+ };
153
+ export declare function createRichTextEditorFeatureRegistry(plugins?: readonly RichTextEditorPlugin[]): RichTextEditorFeatureRegistry;
154
+ export declare function createRichTextEditorFeatureRegistryFromFeatures(featureDefinitions: readonly RichTextEditorFeatureDefinition[]): RichTextEditorFeatureRegistry;
155
+ //# sourceMappingURL=featureRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"featureRegistry.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/featureRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,OAAO,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAIrD,OAAO,KAAK,EAEV,mBAAmB,EACnB,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EACV,qBAAqB,EACrB,4BAA4B,EAC7B,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAGV,wBAAwB,EACxB,8BAA8B,EAC9B,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAWhB,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAA;IACvC,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAA;IACpC,QAAQ,CAAC,QAAQ,EAAE,6BAA6B,CAAA;CACjD,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,GAAG,EAAE,CAAC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EAAE,SAAS,oCAAoC,EAAE,CAAA;IACvE,QAAQ,CAAC,aAAa,EAAE,SAAS,0BAA0B,EAAE,CAAA;IAC7D,QAAQ,CAAC,mBAAmB,EAAE,SAAS,gCAAgC,EAAE,CAAA;CAC1E,CAAA;AAED,wBAAgB,mCAAmC,CACjD,OAAO,GAAE,SAAS,oBAAoB,EAAO,GAC5C,6BAA6B,CAM/B;AAED,wBAAgB,+CAA+C,CAC7D,kBAAkB,EAAE,SAAS,+BAA+B,EAAE,GAC7D,6BAA6B,CAqC/B"}
@@ -0,0 +1,13 @@
1
+ export declare const RICH_TEXT_EDITOR_ID_ATTRIBUTE = "data-rte-editor-id";
2
+ export declare const RICH_TEXT_EDITOR_TOOLBAR_ATTRIBUTE = "data-rte-toolbar";
3
+ export type RichTextEditorFocusTarget = {
4
+ readonly editorId: string;
5
+ readonly type: 'editor';
6
+ } | {
7
+ readonly type: 'outside';
8
+ } | {
9
+ readonly type: 'toolbar';
10
+ };
11
+ export declare function resolveRichTextEditorFocusTarget(root: HTMLElement, target: EventTarget | null): RichTextEditorFocusTarget;
12
+ export declare function isFocusStillInsideRoot(root: HTMLElement, relatedTarget: EventTarget | null): boolean;
13
+ //# sourceMappingURL=focusBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focusBoundary.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/focusBoundary.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,uBAAuB,CAAA;AACjE,eAAO,MAAM,kCAAkC,qBAAqB,CAAA;AAEpE,MAAM,MAAM,yBAAyB,GACjC;IACE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CACxB,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CACzB,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CACzB,CAAA;AAEL,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,WAAW,GAAG,IAAI,GACzB,yBAAyB,CAU3B;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,WAAW,EACjB,aAAa,EAAE,WAAW,GAAG,IAAI,WAGlC"}