@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.
- package/README.md +74 -0
- package/dist/index.cjs +9 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9986 -0
- package/dist/mathlive.min-DhvSIziw.js +39472 -0
- package/dist/mathlive.min-e1W1EjoF.cjs +3237 -0
- package/dist/rich-text-editor/i18n.d.ts +63 -0
- package/dist/rich-text-editor/i18n.d.ts.map +1 -0
- package/dist/rich-text-editor/index.d.ts +38 -0
- package/dist/rich-text-editor/index.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/Editor.d.ts +3 -0
- package/dist/rich-text-editor/primitives/Editor.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/FormulaObject.d.ts +3 -0
- package/dist/rich-text-editor/primitives/FormulaObject.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/ImageObject.d.ts +3 -0
- package/dist/rich-text-editor/primitives/ImageObject.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/InsertNodeButton.d.ts +3 -0
- package/dist/rich-text-editor/primitives/InsertNodeButton.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/ObjectElement.d.ts +12 -0
- package/dist/rich-text-editor/primitives/ObjectElement.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/RichTextEditorRootProvider.d.ts +18 -0
- package/dist/rich-text-editor/primitives/RichTextEditorRootProvider.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/Root.d.ts +3 -0
- package/dist/rich-text-editor/primitives/Root.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/SelectAction.d.ts +7 -0
- package/dist/rich-text-editor/primitives/SelectAction.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/TableCellElement.d.ts +9 -0
- package/dist/rich-text-editor/primitives/TableCellElement.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/TableElement.d.ts +7 -0
- package/dist/rich-text-editor/primitives/TableElement.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/Toolbar.d.ts +11 -0
- package/dist/rich-text-editor/primitives/Toolbar.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/ToolbarAction.d.ts +7 -0
- package/dist/rich-text-editor/primitives/ToolbarAction.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/ToolbarIcon.d.ts +7 -0
- package/dist/rich-text-editor/primitives/ToolbarIcon.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/ToolbarSection.d.ts +3 -0
- package/dist/rich-text-editor/primitives/ToolbarSection.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/ToolbarSeparator.d.ts +3 -0
- package/dist/rich-text-editor/primitives/ToolbarSeparator.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/codecs.d.ts +7 -0
- package/dist/rich-text-editor/primitives/codecs.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/commands.d.ts +2 -0
- package/dist/rich-text-editor/primitives/commands.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/context.d.ts +47 -0
- package/dist/rich-text-editor/primitives/context.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/createSelectAction.d.ts +4 -0
- package/dist/rich-text-editor/primitives/createSelectAction.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/createToolbarButton.d.ts +4 -0
- package/dist/rich-text-editor/primitives/createToolbarButton.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/featureDefinitions.d.ts +3 -0
- package/dist/rich-text-editor/primitives/featureDefinitions.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/featureRegistry.d.ts +155 -0
- package/dist/rich-text-editor/primitives/featureRegistry.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/focusBoundary.d.ts +13 -0
- package/dist/rich-text-editor/primitives/focusBoundary.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/index.d.ts +138 -0
- package/dist/rich-text-editor/primitives/index.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/nodeFactories.d.ts +13 -0
- package/dist/rich-text-editor/primitives/nodeFactories.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/nodeInsertCommand.d.ts +13 -0
- package/dist/rich-text-editor/primitives/nodeInsertCommand.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/slateRenderers.d.ts +5 -0
- package/dist/rich-text-editor/primitives/slateRenderers.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/slateRuntime.d.ts +36 -0
- package/dist/rich-text-editor/primitives/slateRuntime.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/slateTypes.d.ts +33 -0
- package/dist/rich-text-editor/primitives/slateTypes.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/tableCommands.d.ts +20 -0
- package/dist/rich-text-editor/primitives/tableCommands.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/tableModel.d.ts +16 -0
- package/dist/rich-text-editor/primitives/tableModel.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/toolbarActions.d.ts +24 -0
- package/dist/rich-text-editor/primitives/toolbarActions.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/toolbarState.d.ts +12 -0
- package/dist/rich-text-editor/primitives/toolbarState.d.ts.map +1 -0
- package/dist/rich-text-editor/primitives/types.d.ts +168 -0
- package/dist/rich-text-editor/primitives/types.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/DefaultToolbarSection.d.ts +8 -0
- package/dist/rich-text-editor/styled/DefaultToolbarSection.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/DefaultToolbarSeparator.d.ts +2 -0
- package/dist/rich-text-editor/styled/DefaultToolbarSeparator.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/Editor.d.ts +4 -0
- package/dist/rich-text-editor/styled/Editor.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/FormulaButton.d.ts +3 -0
- package/dist/rich-text-editor/styled/FormulaButton.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/FormulaDialog.d.ts +2 -0
- package/dist/rich-text-editor/styled/FormulaDialog.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/FormulaDialogContent.d.ts +2 -0
- package/dist/rich-text-editor/styled/FormulaDialogContent.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/ImageButton.d.ts +3 -0
- package/dist/rich-text-editor/styled/ImageButton.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/MathFieldInput.d.ts +10 -0
- package/dist/rich-text-editor/styled/MathFieldInput.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/Root.d.ts +10 -0
- package/dist/rich-text-editor/styled/Root.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/StyledToolbarIconButton.d.ts +11 -0
- package/dist/rich-text-editor/styled/StyledToolbarIconButton.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/Toolbar.d.ts +3 -0
- package/dist/rich-text-editor/styled/Toolbar.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/ToolbarSection.d.ts +3 -0
- package/dist/rich-text-editor/styled/ToolbarSection.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/ToolbarSeparator.d.ts +3 -0
- package/dist/rich-text-editor/styled/ToolbarSeparator.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/createStyledInsertNodeButton.d.ts +6 -0
- package/dist/rich-text-editor/styled/createStyledInsertNodeButton.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/createStyledSelectButton.d.ts +6 -0
- package/dist/rich-text-editor/styled/createStyledSelectButton.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/createStyledToolbarButton.d.ts +6 -0
- package/dist/rich-text-editor/styled/createStyledToolbarButton.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/defaultToolbar.d.ts +2 -0
- package/dist/rich-text-editor/styled/defaultToolbar.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/index.d.ts +71 -0
- package/dist/rich-text-editor/styled/index.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/mathliveLoader.d.ts +6 -0
- package/dist/rich-text-editor/styled/mathliveLoader.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/mediaCommands.d.ts +5 -0
- package/dist/rich-text-editor/styled/mediaCommands.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/mediaContext.d.ts +22 -0
- package/dist/rich-text-editor/styled/mediaContext.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/mediaTypes.d.ts +14 -0
- package/dist/rich-text-editor/styled/mediaTypes.d.ts.map +1 -0
- package/dist/rich-text-editor/styled/toolbarDescriptors.d.ts +14 -0
- package/dist/rich-text-editor/styled/toolbarDescriptors.d.ts.map +1 -0
- package/package.json +95 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { Editor } from './Editor';
|
|
2
|
+
import { InsertNodeButton } from './InsertNodeButton';
|
|
3
|
+
import { Root } from './Root';
|
|
4
|
+
import { Toolbar, ToolbarCase, ToolbarDefault, ToolbarSwitch } from './Toolbar';
|
|
5
|
+
import { type RichTextEditorToolbarAction } from './toolbarActions';
|
|
6
|
+
import { ToolbarSection } from './ToolbarSection';
|
|
7
|
+
import { ToolbarSeparator } from './ToolbarSeparator';
|
|
8
|
+
export { deserializeRichTextEditorHtml, deserializeRichTextEditorJson, serializeRichTextEditorHtml, serializeRichTextEditorJson, } from './codecs';
|
|
9
|
+
export declare const PrimitiveToolbar: typeof Toolbar & {
|
|
10
|
+
AlignCenterButton: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
11
|
+
AlignLeftButton: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
12
|
+
AlignRightButton: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
13
|
+
BoldToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
14
|
+
BulletedListToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
15
|
+
CodeToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
16
|
+
ColorSelect: (props: import("./types").RichTextEditorSelectActionProps) => JSX.Element;
|
|
17
|
+
Case: typeof ToolbarCase;
|
|
18
|
+
Default: typeof ToolbarDefault;
|
|
19
|
+
DividerButton: (props: Omit<Parameters<typeof InsertNodeButton>[0], "nodeType">) => import("react").FunctionComponentElement<{
|
|
20
|
+
'aria-label': string;
|
|
21
|
+
payload: import("./toolbarActions").RichTextEditorCommandPayload;
|
|
22
|
+
children?: import("react").ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
asChild?: boolean;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
action: RichTextEditorToolbarAction;
|
|
27
|
+
}>;
|
|
28
|
+
FontSizeSelect: (props: import("./types").RichTextEditorSelectActionProps) => JSX.Element;
|
|
29
|
+
FormulaButton: (props: Omit<Parameters<typeof InsertNodeButton>[0], "nodeType">) => import("react").FunctionComponentElement<{
|
|
30
|
+
'aria-label': string;
|
|
31
|
+
payload: import("./toolbarActions").RichTextEditorCommandPayload;
|
|
32
|
+
children?: import("react").ReactNode;
|
|
33
|
+
className?: string;
|
|
34
|
+
asChild?: boolean;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
action: RichTextEditorToolbarAction;
|
|
37
|
+
}>;
|
|
38
|
+
Heading1Button: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
39
|
+
Heading2Button: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
40
|
+
Heading3Button: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
41
|
+
ImageButton: (props: Omit<Parameters<typeof InsertNodeButton>[0], "nodeType">) => import("react").FunctionComponentElement<{
|
|
42
|
+
'aria-label': string;
|
|
43
|
+
payload: import("./toolbarActions").RichTextEditorCommandPayload;
|
|
44
|
+
children?: import("react").ReactNode;
|
|
45
|
+
className?: string;
|
|
46
|
+
asChild?: boolean;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
action: RichTextEditorToolbarAction;
|
|
49
|
+
}>;
|
|
50
|
+
InsertNodeButton: typeof InsertNodeButton;
|
|
51
|
+
ItalicToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
52
|
+
NumberedListToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
53
|
+
RedoButton: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
54
|
+
Section: typeof ToolbarSection;
|
|
55
|
+
Separator: typeof ToolbarSeparator;
|
|
56
|
+
StrikeToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
57
|
+
Switch: typeof ToolbarSwitch;
|
|
58
|
+
TableButton: (props: Omit<Parameters<typeof InsertNodeButton>[0], "nodeType">) => import("react").FunctionComponentElement<{
|
|
59
|
+
'aria-label': string;
|
|
60
|
+
payload: import("./toolbarActions").RichTextEditorCommandPayload;
|
|
61
|
+
children?: import("react").ReactNode;
|
|
62
|
+
className?: string;
|
|
63
|
+
asChild?: boolean;
|
|
64
|
+
disabled?: boolean;
|
|
65
|
+
action: RichTextEditorToolbarAction;
|
|
66
|
+
}>;
|
|
67
|
+
UnderlineToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
68
|
+
UndoButton: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
69
|
+
};
|
|
70
|
+
export declare const Primitives: {
|
|
71
|
+
Editor: typeof Editor;
|
|
72
|
+
Root: typeof Root;
|
|
73
|
+
Toolbar: typeof Toolbar & {
|
|
74
|
+
AlignCenterButton: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
75
|
+
AlignLeftButton: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
76
|
+
AlignRightButton: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
77
|
+
BoldToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
78
|
+
BulletedListToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
79
|
+
CodeToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
80
|
+
ColorSelect: (props: import("./types").RichTextEditorSelectActionProps) => JSX.Element;
|
|
81
|
+
Case: typeof ToolbarCase;
|
|
82
|
+
Default: typeof ToolbarDefault;
|
|
83
|
+
DividerButton: (props: Omit<Parameters<typeof InsertNodeButton>[0], "nodeType">) => import("react").FunctionComponentElement<{
|
|
84
|
+
'aria-label': string;
|
|
85
|
+
payload: import("./toolbarActions").RichTextEditorCommandPayload;
|
|
86
|
+
children?: import("react").ReactNode;
|
|
87
|
+
className?: string;
|
|
88
|
+
asChild?: boolean;
|
|
89
|
+
disabled?: boolean;
|
|
90
|
+
action: RichTextEditorToolbarAction;
|
|
91
|
+
}>;
|
|
92
|
+
FontSizeSelect: (props: import("./types").RichTextEditorSelectActionProps) => JSX.Element;
|
|
93
|
+
FormulaButton: (props: Omit<Parameters<typeof InsertNodeButton>[0], "nodeType">) => import("react").FunctionComponentElement<{
|
|
94
|
+
'aria-label': string;
|
|
95
|
+
payload: import("./toolbarActions").RichTextEditorCommandPayload;
|
|
96
|
+
children?: import("react").ReactNode;
|
|
97
|
+
className?: string;
|
|
98
|
+
asChild?: boolean;
|
|
99
|
+
disabled?: boolean;
|
|
100
|
+
action: RichTextEditorToolbarAction;
|
|
101
|
+
}>;
|
|
102
|
+
Heading1Button: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
103
|
+
Heading2Button: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
104
|
+
Heading3Button: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
105
|
+
ImageButton: (props: Omit<Parameters<typeof InsertNodeButton>[0], "nodeType">) => import("react").FunctionComponentElement<{
|
|
106
|
+
'aria-label': string;
|
|
107
|
+
payload: import("./toolbarActions").RichTextEditorCommandPayload;
|
|
108
|
+
children?: import("react").ReactNode;
|
|
109
|
+
className?: string;
|
|
110
|
+
asChild?: boolean;
|
|
111
|
+
disabled?: boolean;
|
|
112
|
+
action: RichTextEditorToolbarAction;
|
|
113
|
+
}>;
|
|
114
|
+
InsertNodeButton: typeof InsertNodeButton;
|
|
115
|
+
ItalicToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
116
|
+
NumberedListToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
117
|
+
RedoButton: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
118
|
+
Section: typeof ToolbarSection;
|
|
119
|
+
Separator: typeof ToolbarSeparator;
|
|
120
|
+
StrikeToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
121
|
+
Switch: typeof ToolbarSwitch;
|
|
122
|
+
TableButton: (props: Omit<Parameters<typeof InsertNodeButton>[0], "nodeType">) => import("react").FunctionComponentElement<{
|
|
123
|
+
'aria-label': string;
|
|
124
|
+
payload: import("./toolbarActions").RichTextEditorCommandPayload;
|
|
125
|
+
children?: import("react").ReactNode;
|
|
126
|
+
className?: string;
|
|
127
|
+
asChild?: boolean;
|
|
128
|
+
disabled?: boolean;
|
|
129
|
+
action: RichTextEditorToolbarAction;
|
|
130
|
+
}>;
|
|
131
|
+
UnderlineToggle: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
132
|
+
UndoButton: (props: import("./types").RichTextEditorToolbarActionProps) => JSX.Element;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
export type { RichTextEditorElement, RichTextEditorValue } from './slateTypes';
|
|
136
|
+
export type { RichTextEditorCommand, RichTextEditorCommandPayload, RichTextEditorSelectOption, RichTextEditorToolbarAction, RichTextEditorToolbarActionKind, } from './toolbarActions';
|
|
137
|
+
export type { RichTextEditorCommandHandler, RichTextEditorCommandHandlerContext, RichTextEditorApi, RichTextEditorCodecOptions, RichTextEditorEditorProps, RichTextEditorEditorFocusChangeContext, RichTextEditorHtmlDeserializer, RichTextEditorHtmlSerializer, RichTextEditorInsertNodeButtonProps, RichTextEditorJsonDeserializer, RichTextEditorJsonSerializer, RichTextEditorElementPatch, RichTextEditorNodeCodecs, RichTextEditorNodeCommands, RichTextEditorNodeDefinition, RichTextEditorNodeRender, RichTextEditorNodeSchema, RichTextEditorObjectDefinition, RichTextEditorObjectInteraction, RichTextEditorObjectRenderContext, RichTextEditorPlugin, RichTextEditorRootProps, RichTextEditorSelectActionProps, RichTextEditorToolbarActionProps, RichTextEditorToolbarCaseProps, RichTextEditorToolbarDefaultProps, RichTextEditorToolbarProps, RichTextEditorToolbarSectionProps, RichTextEditorToolbarSeparatorProps, RichTextEditorToolbarSwitchProps, } from './types';
|
|
138
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EACL,OAAO,EACP,WAAW,EACX,cAAc,EACd,aAAa,EACd,MAAM,WAAW,CAAA;AAElB,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,UAAU,CAAA;AAIjB,eAAO,MAAM,gBAAgB;;;;;;;;;;2BA6ClB,IAAI,CACT,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,EACtC,UAAU,CACX;;;;;;;;;;2BAHM,IAAI,CACT,UAAU,CAAC,OAAO,gBA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,EACpB,uBAAuB,EACvB,+BAA+B,EAC/B,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,EACjC,0BAA0B,EAC1B,iCAAiC,EACjC,mCAAmC,EACnC,gCAAgC,GACjC,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Descendant } from 'slate';
|
|
2
|
+
import type { RichTextEditorSlateElement } from './slateTypes';
|
|
3
|
+
export type RichTextEditorUnknownRecord = {
|
|
4
|
+
readonly [key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
export declare function createElement(type: string, children?: Descendant[], extra?: RichTextEditorUnknownRecord): RichTextEditorSlateElement;
|
|
7
|
+
export declare function createParagraphElement(): RichTextEditorSlateElement;
|
|
8
|
+
export declare function isRecord(value: unknown): value is RichTextEditorUnknownRecord;
|
|
9
|
+
export declare function readString(value: unknown): string;
|
|
10
|
+
export declare function readNumber(value: unknown): number | undefined;
|
|
11
|
+
export declare function escapeHtmlText(value: string): string;
|
|
12
|
+
export declare function escapeHtmlAttribute(value: string): string;
|
|
13
|
+
//# sourceMappingURL=nodeFactories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeFactories.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/nodeFactories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA;AAE9D,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAChC,CAAA;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,UAAU,EAAmB,EACvC,KAAK,GAAE,2BAAgC,GACtC,0BAA0B,CAM5B;AAED,wBAAgB,sBAAsB,+BAErC;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,2BAA2B,CAE7E;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,UAExC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,sBAIxC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,UAK3C;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,UAEhD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RichTextEditorFeatureRegistry } from './featureRegistry';
|
|
2
|
+
import type { RichTextEditorSlate } from './slateTypes';
|
|
3
|
+
import type { RichTextEditorCommand, RichTextEditorCommandPayload } from './toolbarActions';
|
|
4
|
+
type NodeInsertCommandPayload = {
|
|
5
|
+
readonly input?: unknown;
|
|
6
|
+
readonly nodeType: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function createNodeInsertCommand(nodeType: string, input?: RichTextEditorCommandPayload): RichTextEditorCommand;
|
|
9
|
+
export declare function createNodeInsertCommandPayload(nodeType: string, input: RichTextEditorCommandPayload | undefined): RichTextEditorCommandPayload;
|
|
10
|
+
export declare function parseNodeInsertCommandPayload(payload: unknown): NodeInsertCommandPayload | null;
|
|
11
|
+
export declare function runNodeInsertCommand(editor: RichTextEditorSlate, registry: RichTextEditorFeatureRegistry, payload: unknown): boolean;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=nodeInsertCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeInsertCommand.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/nodeInsertCommand.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,6BAA6B,EAE9B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EACV,qBAAqB,EACrB,4BAA4B,EAC7B,MAAM,kBAAkB,CAAA;AAMzB,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,4BAA4B,GACnC,qBAAqB,CAKvB;AAED,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,4BAA4B,GAAG,SAAS,GAC9C,4BAA4B,CAE9B;AAED,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,OAAO,GACf,wBAAwB,GAAG,IAAI,CASjC;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,EAAE,6BAA6B,EACvC,OAAO,EAAE,OAAO,WAcjB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RenderElementProps, RenderLeafProps } from 'slate-react';
|
|
2
|
+
import type { RichTextEditorFeatureRegistry } from './featureRegistry';
|
|
3
|
+
export declare function createRenderElement(registry: RichTextEditorFeatureRegistry): ({ attributes, children, element, }: RenderElementProps) => JSX.Element;
|
|
4
|
+
export declare function createRenderLeaf(registry: RichTextEditorFeatureRegistry): ({ attributes, children, leaf }: RenderLeafProps) => JSX.Element;
|
|
5
|
+
//# sourceMappingURL=slateRenderers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slateRenderers.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/slateRenderers.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAEtE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAA;AAKtE,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,6BAA6B,IAC3C,oCAI3B,kBAAkB,iBA6BtB;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,6BAA6B,IAC3C,gCAAgC,eAAe,iBAS3E"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
|
+
import type { RichTextEditorFeatureRegistry } from './featureRegistry';
|
|
3
|
+
import type { RichTextEditorSlate, RichTextEditorValue } from './slateTypes';
|
|
4
|
+
import type { RichTextEditorCommand } from './toolbarActions';
|
|
5
|
+
import type { RichTextEditorApi, RichTextEditorPlugin } from './types';
|
|
6
|
+
import { type RichTextEditorToolbarState } from './toolbarState';
|
|
7
|
+
export type RichTextEditorRuntimeRegistration = {
|
|
8
|
+
readonly editor: RichTextEditorSlate;
|
|
9
|
+
readonly getToolbarState: () => RichTextEditorToolbarState;
|
|
10
|
+
readonly getValue: () => RichTextEditorValue;
|
|
11
|
+
readonly runCommand: (command: RichTextEditorCommand) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare function useRichTextEditorSlate(plugins: readonly RichTextEditorPlugin[]): {
|
|
14
|
+
editor: RichTextEditorSlate;
|
|
15
|
+
registry: RichTextEditorFeatureRegistry;
|
|
16
|
+
};
|
|
17
|
+
export declare function SlateContent({ apiRef, ariaLabel, children, className, editor, initialValue, isFocused, onBlurEditor, onChange, onCommandTargetActivate, onFocusEditor, onPasteImageFiles, onPasteImageSources, placeholder, registry, value, }: {
|
|
18
|
+
readonly apiRef?: Ref<RichTextEditorApi>;
|
|
19
|
+
readonly ariaLabel?: string;
|
|
20
|
+
readonly children?: ReactNode;
|
|
21
|
+
readonly className?: string;
|
|
22
|
+
readonly editor: RichTextEditorSlate;
|
|
23
|
+
readonly initialValue: RichTextEditorValue;
|
|
24
|
+
readonly isFocused: () => boolean;
|
|
25
|
+
readonly onBlurEditor: () => void;
|
|
26
|
+
readonly onChange: (value: RichTextEditorValue) => void;
|
|
27
|
+
readonly onCommandTargetActivate: () => void;
|
|
28
|
+
readonly onFocusEditor: () => void;
|
|
29
|
+
readonly onPasteImageFiles?: (files: readonly File[]) => void;
|
|
30
|
+
readonly onPasteImageSources?: (sources: readonly string[]) => void;
|
|
31
|
+
readonly placeholder?: string;
|
|
32
|
+
readonly registry: RichTextEditorFeatureRegistry;
|
|
33
|
+
readonly value?: RichTextEditorValue;
|
|
34
|
+
}): JSX.Element;
|
|
35
|
+
export declare function createRuntimeRegistration(editor: RichTextEditorSlate, registry: RichTextEditorFeatureRegistry): RichTextEditorRuntimeRegistration;
|
|
36
|
+
//# sourceMappingURL=slateRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slateRuntime.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/slateRuntime.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,SAAS,EACd,KAAK,GAAG,EACT,MAAM,OAAO,CAAA;AAad,OAAO,KAAK,EACV,6BAA6B,EAE9B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EACV,mBAAmB,EAEnB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAUtE,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,gBAAgB,CAAA;AAEvB,MAAM,MAAM,iCAAiC,GAAG;IAC9C,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAA;IACpC,QAAQ,CAAC,eAAe,EAAE,MAAM,0BAA0B,CAAA;IAC1D,QAAQ,CAAC,QAAQ,EAAE,MAAM,mBAAmB,CAAA;IAC5C,QAAQ,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,qBAAqB,KAAK,IAAI,CAAA;CAC9D,CAAA;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,SAAS,oBAAoB,EAAE;;;EAW9E;AAsUD,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,SAAS,EACT,QAAQ,EACR,SAAS,EACT,MAAM,EACN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descendant, Editor, Element as SlateElement } from 'slate';
|
|
2
|
+
import type { HistoryEditor } from 'slate-history';
|
|
3
|
+
import type { ReactEditor } from 'slate-react';
|
|
4
|
+
export type RichTextEditorText = {
|
|
5
|
+
readonly bold?: boolean;
|
|
6
|
+
readonly code?: boolean;
|
|
7
|
+
readonly color?: string;
|
|
8
|
+
readonly fontSize?: string;
|
|
9
|
+
readonly italic?: boolean;
|
|
10
|
+
readonly strike?: boolean;
|
|
11
|
+
readonly text: string;
|
|
12
|
+
readonly underline?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type RichTextEditorNode = RichTextEditorElement | RichTextEditorText;
|
|
15
|
+
export type RichTextEditorElement = {
|
|
16
|
+
readonly [key: string]: unknown;
|
|
17
|
+
readonly children: readonly RichTextEditorNode[];
|
|
18
|
+
readonly type: string;
|
|
19
|
+
};
|
|
20
|
+
export type RichTextEditorSlateElement = SlateElement & {
|
|
21
|
+
readonly [key: string]: unknown;
|
|
22
|
+
readonly type: string;
|
|
23
|
+
};
|
|
24
|
+
export type RichTextEditorSlate = Editor & HistoryEditor & ReactEditor;
|
|
25
|
+
export type RichTextEditorValue = readonly RichTextEditorNode[];
|
|
26
|
+
export declare function toSlateDescendants(value: RichTextEditorValue): Descendant[];
|
|
27
|
+
export declare function toRichTextEditorValue(value: readonly Descendant[]): RichTextEditorValue;
|
|
28
|
+
export declare function toSlateElement(element: RichTextEditorElement): RichTextEditorSlateElement;
|
|
29
|
+
export declare function toSlateElements(elements: readonly RichTextEditorElement[]): RichTextEditorSlateElement[];
|
|
30
|
+
export declare function toSlateElementPatch(element: Partial<RichTextEditorElement>): Partial<RichTextEditorSlateElement>;
|
|
31
|
+
export declare function toRichTextEditorElement(element: RichTextEditorSlateElement): RichTextEditorElement;
|
|
32
|
+
export declare function isRichTextElement(node: unknown): node is RichTextEditorSlateElement;
|
|
33
|
+
//# sourceMappingURL=slateTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sl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AAS,kBAAkB,EAAE,CAAA;AAE/D,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,mBAAmB,GACzB,UAAU,EAAE,CAEd;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,UAAU,EAAE,GAC3B,mBAAmB,CAErB;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,qBAAqB,GAC7B,0BAA0B,CAE5B;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,qBAAqB,EAAE,GACzC,0BAA0B,EAAE,CAE9B;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,CAAC,qBAAqB,CAAC,GACtC,OAAO,CAAC,0BAA0B,CAAC,CAErC;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,0BAA0B,GAClC,qBAAqB,CAEvB;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,OAAO,GACZ,IAAI,IAAI,0BAA0B,CAOpC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Node, Path, type Location, type NodeEntry } from 'slate';
|
|
2
|
+
import type { RichTextEditorSlate, RichTextEditorSlateElement } from './slateTypes';
|
|
3
|
+
export declare function getTableCellEntryAt(editor: RichTextEditorSlate, at: Location | null | undefined): NodeEntry<RichTextEditorSlateElement> | null;
|
|
4
|
+
export declare function getSelectedTableCell(editor: RichTextEditorSlate): NodeEntry<RichTextEditorSlateElement> | null;
|
|
5
|
+
export declare function isSelectionAcrossTableCells(editor: RichTextEditorSlate): boolean;
|
|
6
|
+
export declare function collapseSelectionToTableCellStart(editor: RichTextEditorSlate): boolean;
|
|
7
|
+
export declare function isSelectionAtTableCellStart(editor: RichTextEditorSlate): boolean;
|
|
8
|
+
export declare function isSelectionAtTableCellEnd(editor: RichTextEditorSlate): boolean;
|
|
9
|
+
export declare function ensureTableSurroundingParagraphs(editor: RichTextEditorSlate, node: Node, path: Path): boolean;
|
|
10
|
+
export declare function deleteTableBeforeSelection(editor: RichTextEditorSlate): boolean;
|
|
11
|
+
export declare function deleteTableAfterSelection(editor: RichTextEditorSlate): boolean;
|
|
12
|
+
export declare function insertTable(editor: RichTextEditorSlate, options?: {
|
|
13
|
+
readonly columns?: number;
|
|
14
|
+
readonly rows?: number;
|
|
15
|
+
}): boolean;
|
|
16
|
+
export declare function insertRow(editor: RichTextEditorSlate, direction?: 'after' | 'before'): boolean;
|
|
17
|
+
export declare function deleteRow(editor: RichTextEditorSlate): boolean;
|
|
18
|
+
export declare function insertColumn(editor: RichTextEditorSlate, direction?: 'after' | 'before'): boolean;
|
|
19
|
+
export declare function deleteColumn(editor: RichTextEditorSlate): boolean;
|
|
20
|
+
//# sourceMappingURL=tableCommands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableCommands.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/tableCommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,IAAI,EACJ,IAAI,EAGJ,KAAK,QAAQ,EACb,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAEd,OAAO,KAAK,EACV,mBAAmB,EACnB,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AAqBrB,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,mBAAmB,EAC3B,EAAE,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAC9B,SAAS,CAAC,0BAA0B,CAAC,GAAG,IAAI,CAe9C;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,mBAAmB,gDAM/D;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,mBAAmB,WAmBtE;AAED,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,mBAAmB,WAqB5E;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,mBAAmB,WAYtE;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,WAYpE;AAED,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,mBAAmB,EAC3B,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,WAqBX;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,mBAAmB,WAgCrE;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,WAqCpE;AAED,wBAAgB,WAAW,CACzB,MAAM,EAAE,mBAAmB,EAC3B,OAAO,GAAE;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,WAiBpE;AAED,wBAAgB,SAAS,CACvB,MAAM,EAAE,mBAAmB,EAC3B,SAAS,GAAE,OAAO,GAAG,QAAkB,WAgBxC;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,mBAAmB,WAcpD;AAED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,mBAAmB,EAC3B,SAAS,GAAE,OAAO,GAAG,QAAkB,WAsBxC;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,mBAAmB,WAuBvD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Descendant } from 'slate';
|
|
2
|
+
import type { RichTextEditorSlateElement } from './slateTypes';
|
|
3
|
+
export declare const TABLE_TYPE = "table";
|
|
4
|
+
export declare const TABLE_ROW_TYPE = "table-row";
|
|
5
|
+
export declare const TABLE_CELL_TYPE = "table-cell";
|
|
6
|
+
export type TableOperation = 'delete-column' | 'delete-row' | 'insert-column-after' | 'insert-column-before' | 'insert-row-after' | 'insert-row-before';
|
|
7
|
+
export declare function createParagraphNode(text?: string): RichTextEditorSlateElement;
|
|
8
|
+
export declare function createTableCellNode(children?: readonly Descendant[]): RichTextEditorSlateElement;
|
|
9
|
+
export declare function createTableRowNode(columns?: number): RichTextEditorSlateElement;
|
|
10
|
+
export declare function createTableNode(rows?: number, columns?: number): RichTextEditorSlateElement;
|
|
11
|
+
export declare function createTableFallbackParagraphs(tableElement: HTMLElement): RichTextEditorSlateElement[] | null;
|
|
12
|
+
export declare function deserializeTableHtmlElement(element: HTMLElement, deserializeChildren: (element: HTMLElement) => Descendant[]): RichTextEditorSlateElement[] | null;
|
|
13
|
+
export declare function deserializeTableJsonElement(input: unknown): RichTextEditorSlateElement | null;
|
|
14
|
+
export declare function normalizeTableJsonNode(table: RichTextEditorSlateElement): RichTextEditorSlateElement;
|
|
15
|
+
export declare function normalizeTableCellJsonNode(cell: RichTextEditorSlateElement): RichTextEditorSlateElement;
|
|
16
|
+
//# sourceMappingURL=tableModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableModel.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/tableModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,UAAU,EAAE,MAAM,OAAO,CAAA;AAEtE,OAAO,KAAK,EACV,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AAIrB,eAAO,MAAM,UAAU,UAAU,CAAA;AACjC,eAAO,MAAM,cAAc,cAAc,CAAA;AACzC,eAAO,MAAM,eAAe,eAAe,CAAA;AAE3C,MAAM,MAAM,cAAc,GACtB,eAAe,GACf,YAAY,GACZ,qBAAqB,GACrB,sBAAsB,GACtB,kBAAkB,GAClB,mBAAmB,CAAA;AAEvB,wBAAgB,mBAAmB,CAAC,IAAI,SAAK,GAAG,0BAA0B,CAKzE;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,GAAE,SAAS,UAAU,EAA4B,GACxD,0BAA0B,CAK5B;AAED,wBAAgB,kBAAkB,CAAC,OAAO,SAAI,GAAG,0BAA0B,CAQ1E;AAED,wBAAgB,eAAe,CAAC,IAAI,SAAI,EAAE,OAAO,SAAI,GAAG,0BAA0B,CAQjF;AAED,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,WAAW,uCAkBtE;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,WAAW,EACpB,mBAAmB,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,UAAU,EAAE,uCA+B5D;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,qCAMzD;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,0BAA0B,GAChC,0BAA0B,CAa5B;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,0BAA0B,GAC/B,0BAA0B,CAE5B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { LucideIcon } from 'lucide-react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type RichTextEditorCommandPayload = boolean | null | number | readonly unknown[] | string | {
|
|
4
|
+
readonly [key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
export type RichTextEditorCommand = {
|
|
7
|
+
readonly command: string;
|
|
8
|
+
readonly payload?: RichTextEditorCommandPayload;
|
|
9
|
+
};
|
|
10
|
+
export type RichTextEditorToolbarActionKind = 'button' | 'select' | 'toggle';
|
|
11
|
+
export type RichTextEditorToolbarAction = RichTextEditorCommand & {
|
|
12
|
+
readonly defaultLabel: string;
|
|
13
|
+
readonly icon: LucideIcon;
|
|
14
|
+
readonly kind: RichTextEditorToolbarActionKind;
|
|
15
|
+
readonly optionLabel?: string;
|
|
16
|
+
readonly stateful?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type RichTextEditorSelectOption = {
|
|
19
|
+
readonly label: ReactNode;
|
|
20
|
+
readonly value: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const COLOR_SELECT_OPTIONS: readonly RichTextEditorSelectOption[];
|
|
23
|
+
export declare const FONT_SIZE_SELECT_OPTIONS: readonly RichTextEditorSelectOption[];
|
|
24
|
+
//# sourceMappingURL=toolbarActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbarActions.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/toolbarActions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,MAAM,4BAA4B,GACpC,OAAO,GACP,IAAI,GACJ,MAAM,GACN,SAAS,OAAO,EAAE,GAClB,MAAM,GACN;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAA;AAEvC,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,4BAA4B,CAAA;CAChD,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE5E,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,GAAG;IAChE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,+BAA+B,CAAA;IAC9C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,SAAS,0BAA0B,EAMrE,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,SAAS,0BAA0B,EAKzE,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RichTextEditorCommandPayload, RichTextEditorToolbarAction } from './toolbarActions';
|
|
2
|
+
export type RichTextEditorToolbarState = {
|
|
3
|
+
readonly activeKeys: ReadonlySet<string>;
|
|
4
|
+
};
|
|
5
|
+
export declare const EMPTY_TOOLBAR_STATE: RichTextEditorToolbarState;
|
|
6
|
+
export declare function createToolbarState(activeEntries: readonly {
|
|
7
|
+
readonly command: string;
|
|
8
|
+
readonly payload?: RichTextEditorCommandPayload;
|
|
9
|
+
}[]): RichTextEditorToolbarState;
|
|
10
|
+
export declare function isToolbarActionActive(state: RichTextEditorToolbarState, action: RichTextEditorToolbarAction, payload: RichTextEditorCommandPayload | undefined): boolean;
|
|
11
|
+
export declare function isToolbarActionStateful(action: RichTextEditorToolbarAction): boolean;
|
|
12
|
+
//# sourceMappingURL=toolbarState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbarState.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/toolbarState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,2BAA2B,EAC5B,MAAM,kBAAkB,CAAA;AAEzB,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CACzC,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,0BAEjC,CAAA;AAED,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,SAAS;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,4BAA4B,CAAA;CAChD,EAAE,GACF,0BAA0B,CAI5B;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,0BAA0B,EACjC,MAAM,EAAE,2BAA2B,EACnC,OAAO,EAAE,4BAA4B,GAAG,SAAS,WAQlD;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,2BAA2B,WAE1E"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { RichTextEditorElement, RichTextEditorValue } from './slateTypes';
|
|
3
|
+
import type { RichTextEditorCommand, RichTextEditorCommandPayload } from './toolbarActions';
|
|
4
|
+
export type RichTextEditorNodeSchema = {
|
|
5
|
+
readonly inline?: boolean;
|
|
6
|
+
readonly markableVoid?: boolean;
|
|
7
|
+
readonly void?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type RichTextEditorNodeCommandContext = {
|
|
10
|
+
readonly payload?: RichTextEditorCommandPayload;
|
|
11
|
+
};
|
|
12
|
+
export type RichTextEditorNodeCommands = {
|
|
13
|
+
readonly insert?: (context: RichTextEditorNodeCommandContext) => Partial<RichTextEditorElement> | readonly RichTextEditorElement[] | null;
|
|
14
|
+
};
|
|
15
|
+
export type RichTextEditorElementPatch = {
|
|
16
|
+
readonly [key: string]: unknown;
|
|
17
|
+
};
|
|
18
|
+
export type RichTextEditorNodeRenderContext = {
|
|
19
|
+
readonly children: ReactNode;
|
|
20
|
+
readonly element: RichTextEditorElement;
|
|
21
|
+
};
|
|
22
|
+
export type RichTextEditorNodeRender = (context: RichTextEditorNodeRenderContext) => ReactElement;
|
|
23
|
+
export type RichTextEditorObjectInteraction = {
|
|
24
|
+
readonly action: string;
|
|
25
|
+
readonly element: RichTextEditorElement;
|
|
26
|
+
readonly payload?: RichTextEditorCommandPayload;
|
|
27
|
+
readonly updateElement: (patch: RichTextEditorElementPatch) => void;
|
|
28
|
+
};
|
|
29
|
+
export type RichTextEditorObjectRenderContext = {
|
|
30
|
+
readonly dispatchInteraction: (action: string, payload?: RichTextEditorCommandPayload) => void;
|
|
31
|
+
readonly element: RichTextEditorElement;
|
|
32
|
+
readonly focused: boolean;
|
|
33
|
+
readonly selected: boolean;
|
|
34
|
+
readonly updateElement: (patch: RichTextEditorElementPatch) => void;
|
|
35
|
+
};
|
|
36
|
+
export type RichTextEditorObjectDefinition = {
|
|
37
|
+
readonly inline?: boolean;
|
|
38
|
+
readonly markable?: boolean;
|
|
39
|
+
readonly render: (context: RichTextEditorObjectRenderContext) => ReactElement;
|
|
40
|
+
};
|
|
41
|
+
export type RichTextEditorHtmlDeserializeContext = {
|
|
42
|
+
readonly deserializeChildren: (element: HTMLElement) => RichTextEditorValue;
|
|
43
|
+
readonly element: HTMLElement;
|
|
44
|
+
};
|
|
45
|
+
export type RichTextEditorHtmlDeserializer = (context: RichTextEditorHtmlDeserializeContext) => RichTextEditorElement | RichTextEditorElement[] | null;
|
|
46
|
+
export type RichTextEditorHtmlSerializeContext = {
|
|
47
|
+
readonly node: RichTextEditorElement;
|
|
48
|
+
readonly serializeChildren: (node: RichTextEditorElement) => string;
|
|
49
|
+
};
|
|
50
|
+
export type RichTextEditorHtmlSerializer = (context: RichTextEditorHtmlSerializeContext) => string | null;
|
|
51
|
+
export type RichTextEditorJsonDeserializeContext = {
|
|
52
|
+
readonly input: unknown;
|
|
53
|
+
};
|
|
54
|
+
export type RichTextEditorJsonDeserializer = (context: RichTextEditorJsonDeserializeContext) => RichTextEditorElement | RichTextEditorElement[] | null;
|
|
55
|
+
export type RichTextEditorJsonSerializeContext = {
|
|
56
|
+
readonly node: RichTextEditorElement;
|
|
57
|
+
};
|
|
58
|
+
export type RichTextEditorJsonSerializer = (context: RichTextEditorJsonSerializeContext) => unknown;
|
|
59
|
+
export type RichTextEditorNodeCodecs = {
|
|
60
|
+
readonly html?: {
|
|
61
|
+
readonly deserialize?: RichTextEditorHtmlDeserializer;
|
|
62
|
+
readonly serialize?: RichTextEditorHtmlSerializer;
|
|
63
|
+
};
|
|
64
|
+
readonly hyperscript?: {
|
|
65
|
+
readonly tagName?: string;
|
|
66
|
+
};
|
|
67
|
+
readonly json?: {
|
|
68
|
+
readonly deserialize?: RichTextEditorJsonDeserializer;
|
|
69
|
+
readonly serialize?: RichTextEditorJsonSerializer;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
export type RichTextEditorNodeDefinition = {
|
|
73
|
+
readonly codecs?: RichTextEditorNodeCodecs;
|
|
74
|
+
readonly commands?: RichTextEditorNodeCommands;
|
|
75
|
+
readonly object?: RichTextEditorObjectDefinition;
|
|
76
|
+
readonly render?: RichTextEditorNodeRender;
|
|
77
|
+
readonly schema?: RichTextEditorNodeSchema;
|
|
78
|
+
readonly type: string;
|
|
79
|
+
};
|
|
80
|
+
export type RichTextEditorPlugin = {
|
|
81
|
+
readonly nodes?: readonly RichTextEditorNodeDefinition[];
|
|
82
|
+
};
|
|
83
|
+
export type RichTextEditorApi = {
|
|
84
|
+
readonly blur: () => void;
|
|
85
|
+
readonly focus: () => void;
|
|
86
|
+
readonly getValue: () => RichTextEditorValue;
|
|
87
|
+
readonly isFocused: () => boolean;
|
|
88
|
+
readonly insertNode: (nodeType: string, payload?: RichTextEditorCommandPayload) => void;
|
|
89
|
+
readonly runCommand: (command: RichTextEditorCommand) => void;
|
|
90
|
+
};
|
|
91
|
+
export type RichTextEditorCodecOptions = {
|
|
92
|
+
readonly plugins?: readonly RichTextEditorPlugin[];
|
|
93
|
+
};
|
|
94
|
+
export type RichTextEditorCommandHandlerContext = {
|
|
95
|
+
readonly activeEditorId: string | null;
|
|
96
|
+
readonly rootId?: string;
|
|
97
|
+
};
|
|
98
|
+
export type RichTextEditorCommandHandler = (command: RichTextEditorCommand, context: RichTextEditorCommandHandlerContext) => void;
|
|
99
|
+
export type RichTextEditorEditorFocusChangeContext = {
|
|
100
|
+
readonly editorId: string | null;
|
|
101
|
+
readonly rootId?: string;
|
|
102
|
+
};
|
|
103
|
+
export type RichTextEditorRootProps = {
|
|
104
|
+
readonly children: ReactNode;
|
|
105
|
+
readonly className?: string;
|
|
106
|
+
readonly defaultActiveEditorId?: string;
|
|
107
|
+
readonly id?: string;
|
|
108
|
+
readonly onCommand?: RichTextEditorCommandHandler;
|
|
109
|
+
readonly onEditorFocusChange?: (context: RichTextEditorEditorFocusChangeContext) => void;
|
|
110
|
+
readonly plugins?: readonly RichTextEditorPlugin[];
|
|
111
|
+
};
|
|
112
|
+
export type RichTextEditorEditorProps = {
|
|
113
|
+
readonly 'aria-label'?: string;
|
|
114
|
+
readonly apiRef?: Ref<RichTextEditorApi>;
|
|
115
|
+
readonly className?: string;
|
|
116
|
+
readonly editorId?: string;
|
|
117
|
+
readonly initialValue?: RichTextEditorValue;
|
|
118
|
+
readonly onObjectInteraction?: (interaction: RichTextEditorObjectInteraction) => void;
|
|
119
|
+
readonly onChange?: (value: RichTextEditorValue) => void;
|
|
120
|
+
readonly onPasteImageFiles?: (files: readonly File[]) => void;
|
|
121
|
+
readonly onPasteImageSources?: (sources: readonly string[]) => void;
|
|
122
|
+
readonly placeholder?: string;
|
|
123
|
+
readonly toolbar?: string;
|
|
124
|
+
readonly value?: RichTextEditorValue;
|
|
125
|
+
};
|
|
126
|
+
export type RichTextEditorToolbarProps = {
|
|
127
|
+
readonly 'aria-label'?: string;
|
|
128
|
+
readonly children?: ReactNode;
|
|
129
|
+
readonly className?: string;
|
|
130
|
+
readonly visibleWhen?: 'always' | 'editor-focus';
|
|
131
|
+
};
|
|
132
|
+
export type RichTextEditorToolbarSwitchProps = {
|
|
133
|
+
readonly children: ReactNode;
|
|
134
|
+
};
|
|
135
|
+
export type RichTextEditorToolbarCaseProps = {
|
|
136
|
+
readonly children: ReactNode;
|
|
137
|
+
readonly value: string;
|
|
138
|
+
};
|
|
139
|
+
export type RichTextEditorToolbarDefaultProps = {
|
|
140
|
+
readonly children: ReactNode;
|
|
141
|
+
};
|
|
142
|
+
export type RichTextEditorToolbarSectionProps = {
|
|
143
|
+
readonly 'aria-label'?: string;
|
|
144
|
+
readonly children: ReactNode;
|
|
145
|
+
readonly className?: string;
|
|
146
|
+
};
|
|
147
|
+
export type RichTextEditorToolbarSeparatorProps = {
|
|
148
|
+
readonly className?: string;
|
|
149
|
+
};
|
|
150
|
+
export type RichTextEditorToolbarActionProps = {
|
|
151
|
+
readonly 'aria-label'?: string;
|
|
152
|
+
readonly asChild?: boolean;
|
|
153
|
+
readonly children?: ReactNode;
|
|
154
|
+
readonly className?: string;
|
|
155
|
+
readonly disabled?: boolean;
|
|
156
|
+
readonly payload?: RichTextEditorCommandPayload;
|
|
157
|
+
};
|
|
158
|
+
export type RichTextEditorInsertNodeButtonProps = RichTextEditorToolbarActionProps & {
|
|
159
|
+
readonly nodeType: string;
|
|
160
|
+
};
|
|
161
|
+
export type RichTextEditorSelectActionProps = RichTextEditorToolbarActionProps & {
|
|
162
|
+
readonly defaultValue?: string;
|
|
163
|
+
readonly options?: readonly {
|
|
164
|
+
readonly label: ReactNode;
|
|
165
|
+
readonly value: string;
|
|
166
|
+
}[];
|
|
167
|
+
};
|
|
168
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/primitives/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEzD,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EACV,qBAAqB,EACrB,4BAA4B,EAC7B,MAAM,kBAAkB,CAAA;AAEzB,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC7C,QAAQ,CAAC,OAAO,CAAC,EAAE,4BAA4B,CAAA;CAChD,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAChB,OAAO,EAAE,gCAAgC,KAEvC,OAAO,CAAC,qBAAqB,CAAC,GAC9B,SAAS,qBAAqB,EAAE,GAChC,IAAI,CAAA;CACT,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,qBAAqB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;CAChD,CAAA;AAED,MAAM,MAAM,mCAAmC,GAC7C,gCAAgC,GAAG;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B,CAAA;AAEH,MAAM,MAAM,+BAA+B,GACzC,gCAAgC,GAAG;IACjC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS;QAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;QACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KACvB,EAAE,CAAA;CACJ,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type DefaultToolbarSectionProps = {
|
|
3
|
+
readonly 'aria-label': string;
|
|
4
|
+
readonly children: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare function DefaultToolbarSection({ children, ...props }: DefaultToolbarSectionProps): JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=DefaultToolbarSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultToolbarSection.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/styled/DefaultToolbarSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,KAAK,0BAA0B,GAAG;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B,CAAA;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,0BAA0B,eAS5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultToolbarSeparator.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/styled/DefaultToolbarSeparator.tsx"],"names":[],"mappings":"AAGA,wBAAgB,uBAAuB,gBAEtC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RichTextEditorEditorProps as RichTextEditorRuntimeEditorProps } from '../primitives';
|
|
2
|
+
export type RichTextEditorEditorProps = RichTextEditorRuntimeEditorProps;
|
|
3
|
+
export declare function Editor({ className, onPasteImageFiles, onPasteImageSources, onObjectInteraction, placeholder, ...props }: RichTextEditorEditorProps): JSX.Element;
|
|
4
|
+
//# sourceMappingURL=Editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/styled/Editor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,yBAAyB,IAAI,gCAAgC,EAE9D,MAAM,eAAe,CAAA;AAQtB,MAAM,MAAM,yBAAyB,GAAG,gCAAgC,CAAA;AAExE,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,GAAG,KAAK,EACT,EAAE,yBAAyB,eA6D3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormulaButton.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/styled/FormulaButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAA;AAMrE,wBAAgB,aAAa,CAAC,KAAK,EAAE,gCAAgC,eA0BpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormulaDialog.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/styled/FormulaDialog.tsx"],"names":[],"mappings":"AAGA,wBAAgB,aAAa,uBAQ5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormulaDialogContent.d.ts","sourceRoot":"","sources":["../../../src/rich-text-editor/styled/FormulaDialogContent.tsx"],"names":[],"mappings":"AAcA,wBAAgB,oBAAoB,gBAuFnC"}
|