@multiplatform.one/rich-text 6.0.4 → 6.3.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 +60 -0
- package/dist/cjs/RichEditor.cjs +84 -9
- package/dist/cjs/RichEditor.native.js +422 -35
- package/dist/cjs/RichEditor.native.js.map +1 -1
- package/dist/cjs/RichTextEditor/index.cjs +18 -2
- package/dist/cjs/RichTextEditor/index.native.js +18 -2
- package/dist/cjs/RichTextEditor/index.native.js.map +1 -1
- package/dist/cjs/constants.cjs +52 -29
- package/dist/cjs/constants.native.js +59 -29
- package/dist/cjs/constants.native.js.map +1 -1
- package/dist/cjs/editor/BlockDragHandle.cjs +22 -7
- package/dist/cjs/editor/BlockDragHandle.native.js +41 -7
- package/dist/cjs/editor/BlockDragHandle.native.js.map +1 -1
- package/dist/cjs/editor/SlashCommands.cjs +249 -293
- package/dist/cjs/editor/SlashCommands.native.js +306 -340
- package/dist/cjs/editor/SlashCommands.native.js.map +1 -1
- package/dist/cjs/editor/TentapEditor.native.js +44 -12
- package/dist/cjs/editor/TentapEditor.native.js.map +1 -1
- package/dist/cjs/editor/TiptapEditor.cjs +140 -33
- package/dist/cjs/editor/TiptapEditor.native.js +153 -33
- package/dist/cjs/editor/TiptapEditor.native.js.map +1 -1
- package/dist/cjs/editor/blockAnchor.cjs +43 -0
- package/dist/cjs/editor/blockAnchor.native.js +68 -0
- package/dist/cjs/editor/blockAnchor.native.js.map +1 -0
- package/dist/cjs/editor/codeBlockPreview.cjs +230 -0
- package/dist/cjs/editor/codeBlockPreview.native.js +265 -0
- package/dist/cjs/editor/codeBlockPreview.native.js.map +1 -0
- package/dist/cjs/editor/editorStyles.cjs +203 -34
- package/dist/cjs/editor/editorStyles.native.js +203 -34
- package/dist/cjs/editor/editorStyles.native.js.map +1 -1
- package/dist/cjs/editor/emoji.cjs +128 -0
- package/dist/cjs/editor/emoji.native.js +184 -0
- package/dist/cjs/editor/emoji.native.js.map +1 -0
- package/dist/cjs/editor/lazyKatex.cjs +78 -0
- package/dist/cjs/editor/lazyKatex.native.js +117 -0
- package/dist/cjs/editor/lazyKatex.native.js.map +1 -0
- package/dist/cjs/editor/markdown.cjs +216 -0
- package/dist/cjs/editor/markdown.native.js +278 -0
- package/dist/cjs/editor/markdown.native.js.map +1 -0
- package/dist/cjs/editor/mathematics.cjs +168 -0
- package/dist/cjs/editor/mathematics.native.js +202 -0
- package/dist/cjs/editor/mathematics.native.js.map +1 -0
- package/dist/cjs/editor/media.cjs +138 -0
- package/dist/cjs/editor/media.native.js +172 -0
- package/dist/cjs/editor/media.native.js.map +1 -0
- package/dist/cjs/editor/mentions.cjs +73 -0
- package/dist/cjs/editor/mentions.native.js +84 -0
- package/dist/cjs/editor/mentions.native.js.map +1 -0
- package/dist/cjs/editor/pasteCleanup.cjs +83 -0
- package/dist/cjs/editor/pasteCleanup.native.js +175 -0
- package/dist/cjs/editor/pasteCleanup.native.js.map +1 -0
- package/dist/cjs/editor/suggestionPopup.cjs +297 -0
- package/dist/cjs/editor/suggestionPopup.native.js +327 -0
- package/dist/cjs/editor/suggestionPopup.native.js.map +1 -0
- package/dist/cjs/preview.cjs +263 -0
- package/dist/cjs/preview.native.js +294 -0
- package/dist/cjs/preview.native.js.map +1 -0
- package/dist/cjs/shared/t.cjs +53 -0
- package/dist/cjs/shared/t.native.js +56 -0
- package/dist/cjs/shared/t.native.js.map +1 -0
- package/dist/cjs/shared/url.cjs +35 -0
- package/dist/cjs/shared/url.native.js +38 -0
- package/dist/cjs/shared/url.native.js.map +1 -0
- package/dist/cjs/styled.cjs +13 -6
- package/dist/cjs/styled.native.js +13 -6
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/toolbar/BubbleToolbar.cjs +10 -8
- package/dist/cjs/toolbar/BubbleToolbar.native.js +10 -8
- package/dist/cjs/toolbar/BubbleToolbar.native.js.map +1 -1
- package/dist/cjs/toolbar/CodeBlockBubble.cjs +59 -23
- package/dist/cjs/toolbar/CodeBlockBubble.native.js +71 -25
- package/dist/cjs/toolbar/CodeBlockBubble.native.js.map +1 -1
- package/dist/cjs/toolbar/ColorPicker.cjs +19 -54
- package/dist/cjs/toolbar/ColorPicker.native.js +81 -179
- package/dist/cjs/toolbar/ColorPicker.native.js.map +1 -1
- package/dist/cjs/toolbar/FixedToolbar.cjs +33 -10
- package/dist/cjs/toolbar/FixedToolbar.native.js +46 -54
- package/dist/cjs/toolbar/FixedToolbar.native.js.map +1 -1
- package/dist/cjs/toolbar/HeadingPicker.cjs +32 -39
- package/dist/cjs/toolbar/HeadingPicker.native.js +61 -51
- package/dist/cjs/toolbar/HeadingPicker.native.js.map +1 -1
- package/dist/cjs/toolbar/ImageBubble.cjs +20 -43
- package/dist/cjs/toolbar/ImageBubble.native.js +20 -43
- package/dist/cjs/toolbar/ImageBubble.native.js.map +1 -1
- package/dist/cjs/toolbar/ImageDialog.cjs +5 -4
- package/dist/cjs/toolbar/ImageDialog.native.js +76 -65
- package/dist/cjs/toolbar/ImageDialog.native.js.map +1 -1
- package/dist/cjs/toolbar/LinkBubble.cjs +23 -70
- package/dist/cjs/toolbar/LinkBubble.native.js +23 -70
- package/dist/cjs/toolbar/LinkBubble.native.js.map +1 -1
- package/dist/cjs/toolbar/LinkDialog.cjs +19 -18
- package/dist/cjs/toolbar/LinkDialog.native.js +86 -83
- package/dist/cjs/toolbar/LinkDialog.native.js.map +1 -1
- package/dist/cjs/toolbar/ListPicker.cjs +32 -43
- package/dist/cjs/toolbar/ListPicker.native.js +43 -44
- package/dist/cjs/toolbar/ListPicker.native.js.map +1 -1
- package/dist/cjs/toolbar/MathBubble.cjs +159 -0
- package/dist/cjs/toolbar/MathBubble.native.js +169 -0
- package/dist/cjs/toolbar/MathBubble.native.js.map +1 -0
- package/dist/cjs/toolbar/MoreDropdown.cjs +51 -98
- package/dist/cjs/toolbar/MoreDropdown.native.js +73 -98
- package/dist/cjs/toolbar/MoreDropdown.native.js.map +1 -1
- package/dist/cjs/toolbar/StatusBar.cjs +19 -10
- package/dist/cjs/toolbar/StatusBar.native.js +19 -10
- package/dist/cjs/toolbar/StatusBar.native.js.map +1 -1
- package/dist/cjs/toolbar/TableBubble.cjs +77 -95
- package/dist/cjs/toolbar/TableBubble.native.js +73 -71
- package/dist/cjs/toolbar/TableBubble.native.js.map +1 -1
- package/dist/cjs/toolbar/ToolbarButton.cjs +86 -21
- package/dist/cjs/toolbar/ToolbarButton.native.js +14 -4
- package/dist/cjs/toolbar/ToolbarButton.native.js.map +1 -1
- package/dist/cjs/toolbar/icons.cjs +111 -468
- package/dist/cjs/toolbar/shortcuts.cjs +73 -24
- package/dist/cjs/toolbar/shortcuts.native.js +73 -24
- package/dist/cjs/toolbar/shortcuts.native.js.map +1 -1
- package/dist/cjs/toolbar/useHorizontalScroll.cjs +25 -5
- package/dist/cjs/toolbar/useHorizontalScroll.native.js +25 -5
- package/dist/cjs/toolbar/useHorizontalScroll.native.js.map +1 -1
- package/dist/cjs/toolbar/useRovingFocus.cjs +80 -0
- package/dist/cjs/toolbar/useRovingFocus.native.js +113 -0
- package/dist/cjs/toolbar/useRovingFocus.native.js.map +1 -0
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/esm/RichEditor.mjs +85 -10
- package/dist/esm/RichEditor.mjs.map +1 -1
- package/dist/esm/RichEditor.native.js +425 -38
- package/dist/esm/RichEditor.native.js.map +1 -1
- package/dist/esm/RichTextEditor/index.mjs +18 -2
- package/dist/esm/RichTextEditor/index.mjs.map +1 -1
- package/dist/esm/RichTextEditor/index.native.js +18 -2
- package/dist/esm/RichTextEditor/index.native.js.map +1 -1
- package/dist/esm/constants.mjs +47 -29
- package/dist/esm/constants.mjs.map +1 -1
- package/dist/esm/constants.native.js +54 -29
- package/dist/esm/constants.native.js.map +1 -1
- package/dist/esm/editor/BlockDragHandle.mjs +22 -7
- package/dist/esm/editor/BlockDragHandle.mjs.map +1 -1
- package/dist/esm/editor/BlockDragHandle.native.js +41 -7
- package/dist/esm/editor/BlockDragHandle.native.js.map +1 -1
- package/dist/esm/editor/SlashCommands.mjs +250 -294
- package/dist/esm/editor/SlashCommands.mjs.map +1 -1
- package/dist/esm/editor/SlashCommands.native.js +307 -341
- package/dist/esm/editor/SlashCommands.native.js.map +1 -1
- package/dist/esm/editor/TentapEditor.native.js +45 -13
- package/dist/esm/editor/TentapEditor.native.js.map +1 -1
- package/dist/esm/editor/TiptapEditor.mjs +142 -35
- package/dist/esm/editor/TiptapEditor.mjs.map +1 -1
- package/dist/esm/editor/TiptapEditor.native.js +155 -35
- package/dist/esm/editor/TiptapEditor.native.js.map +1 -1
- package/dist/esm/editor/blockAnchor.mjs +18 -0
- package/dist/esm/editor/blockAnchor.mjs.map +1 -0
- package/dist/esm/editor/blockAnchor.native.js +40 -0
- package/dist/esm/editor/blockAnchor.native.js.map +1 -0
- package/dist/esm/editor/codeBlockPreview.mjs +190 -0
- package/dist/esm/editor/codeBlockPreview.mjs.map +1 -0
- package/dist/esm/editor/codeBlockPreview.native.js +222 -0
- package/dist/esm/editor/codeBlockPreview.native.js.map +1 -0
- package/dist/esm/editor/editorStyles.mjs +203 -34
- package/dist/esm/editor/editorStyles.mjs.map +1 -1
- package/dist/esm/editor/editorStyles.native.js +203 -34
- package/dist/esm/editor/editorStyles.native.js.map +1 -1
- package/dist/esm/editor/emoji.mjs +88 -0
- package/dist/esm/editor/emoji.mjs.map +1 -0
- package/dist/esm/editor/emoji.native.js +141 -0
- package/dist/esm/editor/emoji.native.js.map +1 -0
- package/dist/esm/editor/lazyKatex.mjs +40 -0
- package/dist/esm/editor/lazyKatex.mjs.map +1 -0
- package/dist/esm/editor/lazyKatex.native.js +76 -0
- package/dist/esm/editor/lazyKatex.native.js.map +1 -0
- package/dist/esm/editor/markdown.mjs +179 -0
- package/dist/esm/editor/markdown.mjs.map +1 -0
- package/dist/esm/editor/markdown.native.js +238 -0
- package/dist/esm/editor/markdown.native.js.map +1 -0
- package/dist/esm/editor/mathematics.mjs +142 -0
- package/dist/esm/editor/mathematics.mjs.map +1 -0
- package/dist/esm/editor/mathematics.native.js +173 -0
- package/dist/esm/editor/mathematics.native.js.map +1 -0
- package/dist/esm/editor/media.mjs +113 -0
- package/dist/esm/editor/media.mjs.map +1 -0
- package/dist/esm/editor/media.native.js +144 -0
- package/dist/esm/editor/media.native.js.map +1 -0
- package/dist/esm/editor/mentions.mjs +37 -0
- package/dist/esm/editor/mentions.mjs.map +1 -0
- package/dist/esm/editor/mentions.native.js +45 -0
- package/dist/esm/editor/mentions.native.js.map +1 -0
- package/dist/esm/editor/pasteCleanup.mjs +57 -0
- package/dist/esm/editor/pasteCleanup.mjs.map +1 -0
- package/dist/esm/editor/pasteCleanup.native.js +146 -0
- package/dist/esm/editor/pasteCleanup.native.js.map +1 -0
- package/dist/esm/editor/suggestionPopup.mjs +268 -0
- package/dist/esm/editor/suggestionPopup.mjs.map +1 -0
- package/dist/esm/editor/suggestionPopup.native.js +295 -0
- package/dist/esm/editor/suggestionPopup.native.js.map +1 -0
- package/dist/esm/preview.mjs +236 -0
- package/dist/esm/preview.mjs.map +1 -0
- package/dist/esm/preview.native.js +264 -0
- package/dist/esm/preview.native.js.map +1 -0
- package/dist/esm/shared/t.mjs +17 -0
- package/dist/esm/shared/t.mjs.map +1 -0
- package/dist/esm/shared/t.native.js +17 -0
- package/dist/esm/shared/t.native.js.map +1 -0
- package/dist/esm/shared/url.mjs +10 -0
- package/dist/esm/shared/url.mjs.map +1 -0
- package/dist/esm/shared/url.native.js +10 -0
- package/dist/esm/shared/url.native.js.map +1 -0
- package/dist/esm/styled.mjs +13 -6
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +13 -6
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/toolbar/BubbleToolbar.mjs +11 -9
- package/dist/esm/toolbar/BubbleToolbar.mjs.map +1 -1
- package/dist/esm/toolbar/BubbleToolbar.native.js +11 -9
- package/dist/esm/toolbar/BubbleToolbar.native.js.map +1 -1
- package/dist/esm/toolbar/CodeBlockBubble.mjs +60 -24
- package/dist/esm/toolbar/CodeBlockBubble.mjs.map +1 -1
- package/dist/esm/toolbar/CodeBlockBubble.native.js +72 -26
- package/dist/esm/toolbar/CodeBlockBubble.native.js.map +1 -1
- package/dist/esm/toolbar/ColorPicker.mjs +21 -56
- package/dist/esm/toolbar/ColorPicker.mjs.map +1 -1
- package/dist/esm/toolbar/ColorPicker.native.js +82 -180
- package/dist/esm/toolbar/ColorPicker.native.js.map +1 -1
- package/dist/esm/toolbar/FixedToolbar.mjs +34 -11
- package/dist/esm/toolbar/FixedToolbar.mjs.map +1 -1
- package/dist/esm/toolbar/FixedToolbar.native.js +47 -55
- package/dist/esm/toolbar/FixedToolbar.native.js.map +1 -1
- package/dist/esm/toolbar/HeadingPicker.mjs +34 -41
- package/dist/esm/toolbar/HeadingPicker.mjs.map +1 -1
- package/dist/esm/toolbar/HeadingPicker.native.js +63 -53
- package/dist/esm/toolbar/HeadingPicker.native.js.map +1 -1
- package/dist/esm/toolbar/ImageBubble.mjs +20 -43
- package/dist/esm/toolbar/ImageBubble.mjs.map +1 -1
- package/dist/esm/toolbar/ImageBubble.native.js +20 -43
- package/dist/esm/toolbar/ImageBubble.native.js.map +1 -1
- package/dist/esm/toolbar/ImageDialog.mjs +5 -4
- package/dist/esm/toolbar/ImageDialog.mjs.map +1 -1
- package/dist/esm/toolbar/ImageDialog.native.js +75 -64
- package/dist/esm/toolbar/ImageDialog.native.js.map +1 -1
- package/dist/esm/toolbar/LinkBubble.mjs +23 -70
- package/dist/esm/toolbar/LinkBubble.mjs.map +1 -1
- package/dist/esm/toolbar/LinkBubble.native.js +23 -70
- package/dist/esm/toolbar/LinkBubble.native.js.map +1 -1
- package/dist/esm/toolbar/LinkDialog.mjs +17 -16
- package/dist/esm/toolbar/LinkDialog.mjs.map +1 -1
- package/dist/esm/toolbar/LinkDialog.native.js +84 -80
- package/dist/esm/toolbar/LinkDialog.native.js.map +1 -1
- package/dist/esm/toolbar/ListPicker.mjs +33 -44
- package/dist/esm/toolbar/ListPicker.mjs.map +1 -1
- package/dist/esm/toolbar/ListPicker.native.js +44 -45
- package/dist/esm/toolbar/ListPicker.native.js.map +1 -1
- package/dist/esm/toolbar/MathBubble.mjs +134 -0
- package/dist/esm/toolbar/MathBubble.mjs.map +1 -0
- package/dist/esm/toolbar/MathBubble.native.js +141 -0
- package/dist/esm/toolbar/MathBubble.native.js.map +1 -0
- package/dist/esm/toolbar/MoreDropdown.mjs +50 -97
- package/dist/esm/toolbar/MoreDropdown.mjs.map +1 -1
- package/dist/esm/toolbar/MoreDropdown.native.js +72 -97
- package/dist/esm/toolbar/MoreDropdown.native.js.map +1 -1
- package/dist/esm/toolbar/StatusBar.mjs +19 -10
- package/dist/esm/toolbar/StatusBar.mjs.map +1 -1
- package/dist/esm/toolbar/StatusBar.native.js +19 -10
- package/dist/esm/toolbar/StatusBar.native.js.map +1 -1
- package/dist/esm/toolbar/TableBubble.mjs +77 -95
- package/dist/esm/toolbar/TableBubble.mjs.map +1 -1
- package/dist/esm/toolbar/TableBubble.native.js +73 -71
- package/dist/esm/toolbar/TableBubble.native.js.map +1 -1
- package/dist/esm/toolbar/ToolbarButton.mjs +87 -22
- package/dist/esm/toolbar/ToolbarButton.mjs.map +1 -1
- package/dist/esm/toolbar/ToolbarButton.native.js +14 -4
- package/dist/esm/toolbar/ToolbarButton.native.js.map +1 -1
- package/dist/esm/toolbar/icons.mjs +109 -469
- package/dist/esm/toolbar/icons.mjs.map +1 -1
- package/dist/esm/toolbar/shortcuts.mjs +73 -24
- package/dist/esm/toolbar/shortcuts.mjs.map +1 -1
- package/dist/esm/toolbar/shortcuts.native.js +73 -24
- package/dist/esm/toolbar/shortcuts.native.js.map +1 -1
- package/dist/esm/toolbar/useHorizontalScroll.mjs +25 -6
- package/dist/esm/toolbar/useHorizontalScroll.mjs.map +1 -1
- package/dist/esm/toolbar/useHorizontalScroll.native.js +25 -6
- package/dist/esm/toolbar/useHorizontalScroll.native.js.map +1 -1
- package/dist/esm/toolbar/useRovingFocus.mjs +55 -0
- package/dist/esm/toolbar/useRovingFocus.mjs.map +1 -0
- package/dist/esm/toolbar/useRovingFocus.native.js +85 -0
- package/dist/esm/toolbar/useRovingFocus.native.js.map +1 -0
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js.map +1 -1
- package/dist/jsx/RichEditor.mjs +85 -10
- package/dist/jsx/RichEditor.mjs.map +1 -1
- package/dist/jsx/RichEditor.native.js +422 -35
- package/dist/jsx/RichEditor.native.js.map +1 -1
- package/dist/jsx/RichTextEditor/index.mjs +18 -2
- package/dist/jsx/RichTextEditor/index.mjs.map +1 -1
- package/dist/jsx/RichTextEditor/index.native.js +18 -2
- package/dist/jsx/RichTextEditor/index.native.js.map +1 -1
- package/dist/jsx/constants.mjs +47 -29
- package/dist/jsx/constants.mjs.map +1 -1
- package/dist/jsx/constants.native.js +59 -29
- package/dist/jsx/constants.native.js.map +1 -1
- package/dist/jsx/editor/BlockDragHandle.mjs +22 -7
- package/dist/jsx/editor/BlockDragHandle.mjs.map +1 -1
- package/dist/jsx/editor/BlockDragHandle.native.js +41 -7
- package/dist/jsx/editor/BlockDragHandle.native.js.map +1 -1
- package/dist/jsx/editor/SlashCommands.mjs +250 -294
- package/dist/jsx/editor/SlashCommands.mjs.map +1 -1
- package/dist/jsx/editor/SlashCommands.native.js +306 -340
- package/dist/jsx/editor/SlashCommands.native.js.map +1 -1
- package/dist/jsx/editor/TentapEditor.native.js +44 -12
- package/dist/jsx/editor/TentapEditor.native.js.map +1 -1
- package/dist/jsx/editor/TiptapEditor.mjs +142 -35
- package/dist/jsx/editor/TiptapEditor.mjs.map +1 -1
- package/dist/jsx/editor/TiptapEditor.native.js +153 -33
- package/dist/jsx/editor/TiptapEditor.native.js.map +1 -1
- package/dist/jsx/editor/blockAnchor.mjs +18 -0
- package/dist/jsx/editor/blockAnchor.mjs.map +1 -0
- package/dist/jsx/editor/blockAnchor.native.js +68 -0
- package/dist/jsx/editor/blockAnchor.native.js.map +1 -0
- package/dist/jsx/editor/codeBlockPreview.mjs +190 -0
- package/dist/jsx/editor/codeBlockPreview.mjs.map +1 -0
- package/dist/jsx/editor/codeBlockPreview.native.js +265 -0
- package/dist/jsx/editor/codeBlockPreview.native.js.map +1 -0
- package/dist/jsx/editor/editorStyles.mjs +203 -34
- package/dist/jsx/editor/editorStyles.mjs.map +1 -1
- package/dist/jsx/editor/editorStyles.native.js +203 -34
- package/dist/jsx/editor/editorStyles.native.js.map +1 -1
- package/dist/jsx/editor/emoji.mjs +88 -0
- package/dist/jsx/editor/emoji.mjs.map +1 -0
- package/dist/jsx/editor/emoji.native.js +184 -0
- package/dist/jsx/editor/emoji.native.js.map +1 -0
- package/dist/jsx/editor/lazyKatex.mjs +40 -0
- package/dist/jsx/editor/lazyKatex.mjs.map +1 -0
- package/dist/jsx/editor/lazyKatex.native.js +117 -0
- package/dist/jsx/editor/lazyKatex.native.js.map +1 -0
- package/dist/jsx/editor/markdown.mjs +179 -0
- package/dist/jsx/editor/markdown.mjs.map +1 -0
- package/dist/jsx/editor/markdown.native.js +278 -0
- package/dist/jsx/editor/markdown.native.js.map +1 -0
- package/dist/jsx/editor/mathematics.mjs +142 -0
- package/dist/jsx/editor/mathematics.mjs.map +1 -0
- package/dist/jsx/editor/mathematics.native.js +202 -0
- package/dist/jsx/editor/mathematics.native.js.map +1 -0
- package/dist/jsx/editor/media.mjs +113 -0
- package/dist/jsx/editor/media.mjs.map +1 -0
- package/dist/jsx/editor/media.native.js +172 -0
- package/dist/jsx/editor/media.native.js.map +1 -0
- package/dist/jsx/editor/mentions.mjs +37 -0
- package/dist/jsx/editor/mentions.mjs.map +1 -0
- package/dist/jsx/editor/mentions.native.js +84 -0
- package/dist/jsx/editor/mentions.native.js.map +1 -0
- package/dist/jsx/editor/pasteCleanup.mjs +57 -0
- package/dist/jsx/editor/pasteCleanup.mjs.map +1 -0
- package/dist/jsx/editor/pasteCleanup.native.js +175 -0
- package/dist/jsx/editor/pasteCleanup.native.js.map +1 -0
- package/dist/jsx/editor/suggestionPopup.mjs +268 -0
- package/dist/jsx/editor/suggestionPopup.mjs.map +1 -0
- package/dist/jsx/editor/suggestionPopup.native.js +327 -0
- package/dist/jsx/editor/suggestionPopup.native.js.map +1 -0
- package/dist/jsx/preview.mjs +236 -0
- package/dist/jsx/preview.mjs.map +1 -0
- package/dist/jsx/preview.native.js +294 -0
- package/dist/jsx/preview.native.js.map +1 -0
- package/dist/jsx/shared/t.mjs +17 -0
- package/dist/jsx/shared/t.mjs.map +1 -0
- package/dist/jsx/shared/t.native.js +56 -0
- package/dist/jsx/shared/t.native.js.map +1 -0
- package/dist/jsx/shared/url.mjs +10 -0
- package/dist/jsx/shared/url.mjs.map +1 -0
- package/dist/jsx/shared/url.native.js +38 -0
- package/dist/jsx/shared/url.native.js.map +1 -0
- package/dist/jsx/styled.mjs +13 -6
- package/dist/jsx/styled.mjs.map +1 -1
- package/dist/jsx/styled.native.js +13 -6
- package/dist/jsx/styled.native.js.map +1 -1
- package/dist/jsx/toolbar/BubbleToolbar.mjs +11 -9
- package/dist/jsx/toolbar/BubbleToolbar.mjs.map +1 -1
- package/dist/jsx/toolbar/BubbleToolbar.native.js +10 -8
- package/dist/jsx/toolbar/BubbleToolbar.native.js.map +1 -1
- package/dist/jsx/toolbar/CodeBlockBubble.mjs +60 -24
- package/dist/jsx/toolbar/CodeBlockBubble.mjs.map +1 -1
- package/dist/jsx/toolbar/CodeBlockBubble.native.js +71 -25
- package/dist/jsx/toolbar/CodeBlockBubble.native.js.map +1 -1
- package/dist/jsx/toolbar/ColorPicker.mjs +21 -56
- package/dist/jsx/toolbar/ColorPicker.mjs.map +1 -1
- package/dist/jsx/toolbar/ColorPicker.native.js +81 -179
- package/dist/jsx/toolbar/ColorPicker.native.js.map +1 -1
- package/dist/jsx/toolbar/FixedToolbar.mjs +34 -11
- package/dist/jsx/toolbar/FixedToolbar.mjs.map +1 -1
- package/dist/jsx/toolbar/FixedToolbar.native.js +46 -54
- package/dist/jsx/toolbar/FixedToolbar.native.js.map +1 -1
- package/dist/jsx/toolbar/HeadingPicker.mjs +34 -41
- package/dist/jsx/toolbar/HeadingPicker.mjs.map +1 -1
- package/dist/jsx/toolbar/HeadingPicker.native.js +61 -51
- package/dist/jsx/toolbar/HeadingPicker.native.js.map +1 -1
- package/dist/jsx/toolbar/ImageBubble.mjs +20 -43
- package/dist/jsx/toolbar/ImageBubble.mjs.map +1 -1
- package/dist/jsx/toolbar/ImageBubble.native.js +20 -43
- package/dist/jsx/toolbar/ImageBubble.native.js.map +1 -1
- package/dist/jsx/toolbar/ImageDialog.mjs +5 -4
- package/dist/jsx/toolbar/ImageDialog.mjs.map +1 -1
- package/dist/jsx/toolbar/ImageDialog.native.js +76 -65
- package/dist/jsx/toolbar/ImageDialog.native.js.map +1 -1
- package/dist/jsx/toolbar/LinkBubble.mjs +23 -70
- package/dist/jsx/toolbar/LinkBubble.mjs.map +1 -1
- package/dist/jsx/toolbar/LinkBubble.native.js +23 -70
- package/dist/jsx/toolbar/LinkBubble.native.js.map +1 -1
- package/dist/jsx/toolbar/LinkDialog.mjs +17 -16
- package/dist/jsx/toolbar/LinkDialog.mjs.map +1 -1
- package/dist/jsx/toolbar/LinkDialog.native.js +86 -83
- package/dist/jsx/toolbar/LinkDialog.native.js.map +1 -1
- package/dist/jsx/toolbar/ListPicker.mjs +33 -44
- package/dist/jsx/toolbar/ListPicker.mjs.map +1 -1
- package/dist/jsx/toolbar/ListPicker.native.js +43 -44
- package/dist/jsx/toolbar/ListPicker.native.js.map +1 -1
- package/dist/jsx/toolbar/MathBubble.mjs +134 -0
- package/dist/jsx/toolbar/MathBubble.mjs.map +1 -0
- package/dist/jsx/toolbar/MathBubble.native.js +169 -0
- package/dist/jsx/toolbar/MathBubble.native.js.map +1 -0
- package/dist/jsx/toolbar/MoreDropdown.mjs +50 -97
- package/dist/jsx/toolbar/MoreDropdown.mjs.map +1 -1
- package/dist/jsx/toolbar/MoreDropdown.native.js +73 -98
- package/dist/jsx/toolbar/MoreDropdown.native.js.map +1 -1
- package/dist/jsx/toolbar/StatusBar.mjs +19 -10
- package/dist/jsx/toolbar/StatusBar.mjs.map +1 -1
- package/dist/jsx/toolbar/StatusBar.native.js +19 -10
- package/dist/jsx/toolbar/StatusBar.native.js.map +1 -1
- package/dist/jsx/toolbar/TableBubble.mjs +77 -95
- package/dist/jsx/toolbar/TableBubble.mjs.map +1 -1
- package/dist/jsx/toolbar/TableBubble.native.js +73 -71
- package/dist/jsx/toolbar/TableBubble.native.js.map +1 -1
- package/dist/jsx/toolbar/ToolbarButton.mjs +87 -22
- package/dist/jsx/toolbar/ToolbarButton.mjs.map +1 -1
- package/dist/jsx/toolbar/ToolbarButton.native.js +14 -4
- package/dist/jsx/toolbar/ToolbarButton.native.js.map +1 -1
- package/dist/jsx/toolbar/icons.mjs +109 -469
- package/dist/jsx/toolbar/icons.mjs.map +1 -1
- package/dist/jsx/toolbar/shortcuts.mjs +73 -24
- package/dist/jsx/toolbar/shortcuts.mjs.map +1 -1
- package/dist/jsx/toolbar/shortcuts.native.js +73 -24
- package/dist/jsx/toolbar/shortcuts.native.js.map +1 -1
- package/dist/jsx/toolbar/useHorizontalScroll.mjs +25 -6
- package/dist/jsx/toolbar/useHorizontalScroll.mjs.map +1 -1
- package/dist/jsx/toolbar/useHorizontalScroll.native.js +25 -5
- package/dist/jsx/toolbar/useHorizontalScroll.native.js.map +1 -1
- package/dist/jsx/toolbar/useRovingFocus.mjs +55 -0
- package/dist/jsx/toolbar/useRovingFocus.mjs.map +1 -0
- package/dist/jsx/toolbar/useRovingFocus.native.js +113 -0
- package/dist/jsx/toolbar/useRovingFocus.native.js.map +1 -0
- package/dist/jsx/types.mjs.map +1 -1
- package/dist/jsx/types.native.js.map +1 -1
- package/package.json +28 -13
- package/src/RichEditor.native.tsx +451 -49
- package/src/RichEditor.stories.tsx +158 -0
- package/src/RichEditor.tsx +121 -7
- package/src/RichTextEditor/index.tsx +41 -3
- package/src/RichTextEditor/richTextEditor.spec.tsx +11 -4
- package/src/constants.ts +86 -24
- package/src/editor/BlockDragHandle.ts +30 -5
- package/src/editor/SlashCommands.tsx +228 -293
- package/src/editor/TentapEditor.native.tsx +68 -17
- package/src/editor/TiptapEditor.tsx +187 -22
- package/src/editor/blockAnchor.spec.ts +70 -0
- package/src/editor/blockAnchor.ts +42 -0
- package/src/editor/codeBlockPreview.spec.ts +144 -0
- package/src/editor/codeBlockPreview.ts +266 -0
- package/src/editor/css.d.ts +2 -0
- package/src/editor/details.spec.ts +48 -0
- package/src/editor/editorStyles.spec.ts +25 -0
- package/src/editor/editorStyles.ts +218 -34
- package/src/editor/emoji.spec.ts +88 -0
- package/src/editor/emoji.ts +147 -0
- package/src/editor/emojilib.d.ts +16 -0
- package/src/editor/lazyKatex.spec.ts +38 -0
- package/src/editor/lazyKatex.ts +68 -0
- package/src/editor/markdown.spec.ts +196 -0
- package/src/editor/markdown.ts +249 -0
- package/src/editor/mathematics.spec.ts +97 -0
- package/src/editor/mathematics.ts +179 -0
- package/src/editor/media.spec.ts +121 -0
- package/src/editor/media.ts +133 -0
- package/src/editor/mentions.spec.ts +41 -0
- package/src/editor/mentions.ts +55 -0
- package/src/editor/pasteCleanup.spec.ts +84 -0
- package/src/editor/pasteCleanup.ts +124 -0
- package/src/editor/suggestionPopup.spec.tsx +105 -0
- package/src/editor/suggestionPopup.tsx +414 -0
- package/src/editor/tiptapEditor.spec.tsx +15 -8
- package/src/exports.spec.ts +4 -2
- package/src/index.ts +7 -1
- package/src/integration.spec.tsx +38 -9
- package/src/preview.spec.ts +130 -0
- package/src/preview.ts +287 -0
- package/src/richEditor.spec.tsx +10 -3
- package/src/shared/t.ts +25 -0
- package/src/shared/url.ts +16 -0
- package/src/styled.ts +13 -6
- package/src/toolbar/BubbleToolbar.tsx +11 -8
- package/src/toolbar/CodeBlockBubble.tsx +66 -28
- package/src/toolbar/ColorPicker.native.tsx +126 -0
- package/src/toolbar/ColorPicker.tsx +23 -67
- package/src/toolbar/FixedToolbar.native.tsx +51 -51
- package/src/toolbar/FixedToolbar.tsx +54 -10
- package/src/toolbar/HeadingPicker.tsx +46 -38
- package/src/toolbar/ImageBubble.tsx +26 -44
- package/src/toolbar/ImageDialog.native.tsx +97 -0
- package/src/toolbar/ImageDialog.tsx +5 -4
- package/src/toolbar/LinkBubble.tsx +27 -64
- package/src/toolbar/LinkDialog.native.tsx +117 -0
- package/src/toolbar/LinkDialog.tsx +28 -24
- package/src/toolbar/ListPicker.tsx +47 -43
- package/src/toolbar/MathBubble.tsx +140 -0
- package/src/toolbar/MoreDropdown.tsx +53 -60
- package/src/toolbar/StatusBar.tsx +13 -8
- package/src/toolbar/TableBubble.tsx +82 -94
- package/src/toolbar/ToolbarButton.native.tsx +14 -4
- package/src/toolbar/ToolbarButton.tsx +98 -19
- package/src/toolbar/bubbleToolbar.spec.tsx +2 -1
- package/src/toolbar/fixedToolbar.spec.tsx +4 -2
- package/src/toolbar/icons.tsx +113 -323
- package/src/toolbar/shortcuts.ts +77 -24
- package/src/toolbar/toolbarPrimitives.spec.tsx +29 -1
- package/src/toolbar/toolbarSubComponents.spec.tsx +4 -2
- package/src/toolbar/useHorizontalScroll.spec.ts +67 -0
- package/src/toolbar/useHorizontalScroll.tsx +39 -12
- package/src/toolbar/useRovingFocus.spec.tsx +100 -0
- package/src/toolbar/useRovingFocus.ts +82 -0
- package/src/types.spec.ts +40 -1
- package/src/types.ts +28 -0
- package/types/RichEditor.d.ts +51 -0
- package/types/RichEditor.d.ts.map +1 -0
- package/types/RichEditor.native.d.ts +59 -0
- package/types/RichEditor.native.d.ts.map +1 -0
- package/types/RichTextEditor/index.d.ts +71 -0
- package/types/RichTextEditor/index.d.ts.map +1 -0
- package/types/constants.d.ts +49 -0
- package/types/constants.d.ts.map +1 -0
- package/types/context.d.ts +10 -0
- package/types/context.d.ts.map +1 -0
- package/types/editor/BlockDragHandle.d.ts +8 -0
- package/types/editor/BlockDragHandle.d.ts.map +1 -0
- package/types/editor/MarkdownPaste.d.ts +8 -0
- package/types/editor/MarkdownPaste.d.ts.map +1 -0
- package/types/editor/SlashCommands.d.ts +24 -0
- package/types/editor/SlashCommands.d.ts.map +1 -0
- package/types/editor/TentapEditor.native.d.ts +21 -0
- package/types/editor/TentapEditor.native.d.ts.map +1 -0
- package/types/editor/TiptapEditor.d.ts +24 -0
- package/types/editor/TiptapEditor.d.ts.map +1 -0
- package/types/editor/blockAnchor.d.ts +25 -0
- package/types/editor/blockAnchor.d.ts.map +1 -0
- package/types/editor/codeBlockPreview.d.ts +51 -0
- package/types/editor/codeBlockPreview.d.ts.map +1 -0
- package/types/editor/editorStyles.d.ts +25 -0
- package/types/editor/editorStyles.d.ts.map +1 -0
- package/types/editor/emoji.d.ts +45 -0
- package/types/editor/emoji.d.ts.map +1 -0
- package/types/editor/index.d.ts +11 -0
- package/types/editor/index.d.ts.map +1 -0
- package/types/editor/lazyKatex.d.ts +33 -0
- package/types/editor/lazyKatex.d.ts.map +1 -0
- package/types/editor/markdown.d.ts +24 -0
- package/types/editor/markdown.d.ts.map +1 -0
- package/types/editor/mathematics.d.ts +44 -0
- package/types/editor/mathematics.d.ts.map +1 -0
- package/types/editor/media.d.ts +32 -0
- package/types/editor/media.d.ts.map +1 -0
- package/types/editor/mentions.d.ts +15 -0
- package/types/editor/mentions.d.ts.map +1 -0
- package/types/editor/pasteCleanup.d.ts +24 -0
- package/types/editor/pasteCleanup.d.ts.map +1 -0
- package/types/editor/suggestionPopup.d.ts +113 -0
- package/types/editor/suggestionPopup.d.ts.map +1 -0
- package/types/editor/types.d.ts +80 -0
- package/types/editor/types.d.ts.map +1 -0
- package/types/editor/useEditorState.d.ts +19 -0
- package/types/editor/useEditorState.d.ts.map +1 -0
- package/types/index.d.ts +11 -0
- package/types/index.d.ts.map +1 -0
- package/types/preview.d.ts +44 -0
- package/types/preview.d.ts.map +1 -0
- package/types/shared/t.d.ts +10 -0
- package/types/shared/t.d.ts.map +1 -0
- package/types/shared/url.d.ts +9 -0
- package/types/shared/url.d.ts.map +1 -0
- package/types/styled.d.ts +40 -0
- package/types/styled.d.ts.map +1 -0
- package/types/toolbar/BubbleToolbar.d.ts +23 -0
- package/types/toolbar/BubbleToolbar.d.ts.map +1 -0
- package/types/toolbar/CodeBlockBubble.d.ts +10 -0
- package/types/toolbar/CodeBlockBubble.d.ts.map +1 -0
- package/types/toolbar/ColorPicker.d.ts +15 -0
- package/types/toolbar/ColorPicker.d.ts.map +1 -0
- package/types/toolbar/ColorPicker.native.d.ts +20 -0
- package/types/toolbar/ColorPicker.native.d.ts.map +1 -0
- package/types/toolbar/FixedToolbar.d.ts +32 -0
- package/types/toolbar/FixedToolbar.d.ts.map +1 -0
- package/types/toolbar/FixedToolbar.native.d.ts +30 -0
- package/types/toolbar/FixedToolbar.native.d.ts.map +1 -0
- package/types/toolbar/HeadingPicker.d.ts +14 -0
- package/types/toolbar/HeadingPicker.d.ts.map +1 -0
- package/types/toolbar/ImageBubble.d.ts +10 -0
- package/types/toolbar/ImageBubble.d.ts.map +1 -0
- package/types/toolbar/ImageDialog.d.ts +12 -0
- package/types/toolbar/ImageDialog.d.ts.map +1 -0
- package/types/toolbar/ImageDialog.native.d.ts +15 -0
- package/types/toolbar/ImageDialog.native.d.ts.map +1 -0
- package/types/toolbar/LinkBubble.d.ts +10 -0
- package/types/toolbar/LinkBubble.d.ts.map +1 -0
- package/types/toolbar/LinkDialog.d.ts +20 -0
- package/types/toolbar/LinkDialog.d.ts.map +1 -0
- package/types/toolbar/LinkDialog.native.d.ts +18 -0
- package/types/toolbar/LinkDialog.native.d.ts.map +1 -0
- package/types/toolbar/ListPicker.d.ts +14 -0
- package/types/toolbar/ListPicker.d.ts.map +1 -0
- package/types/toolbar/MathBubble.d.ts +11 -0
- package/types/toolbar/MathBubble.d.ts.map +1 -0
- package/types/toolbar/MoreDropdown.d.ts +13 -0
- package/types/toolbar/MoreDropdown.d.ts.map +1 -0
- package/types/toolbar/ResizeHandle.d.ts +11 -0
- package/types/toolbar/ResizeHandle.d.ts.map +1 -0
- package/types/toolbar/StatusBar.d.ts +11 -0
- package/types/toolbar/StatusBar.d.ts.map +1 -0
- package/types/toolbar/TableBubble.d.ts +10 -0
- package/types/toolbar/TableBubble.d.ts.map +1 -0
- package/types/toolbar/ToolbarButton.d.ts +35 -0
- package/types/toolbar/ToolbarButton.d.ts.map +1 -0
- package/types/toolbar/ToolbarButton.native.d.ts +30 -0
- package/types/toolbar/ToolbarButton.native.d.ts.map +1 -0
- package/types/toolbar/ToolbarGroup.d.ts +14 -0
- package/types/toolbar/ToolbarGroup.d.ts.map +1 -0
- package/types/toolbar/icons.d.ts +52 -0
- package/types/toolbar/icons.d.ts.map +1 -0
- package/types/toolbar/icons.native.d.ts +41 -0
- package/types/toolbar/icons.native.d.ts.map +1 -0
- package/types/toolbar/shortcuts.d.ts +34 -0
- package/types/toolbar/shortcuts.d.ts.map +1 -0
- package/types/toolbar/useHorizontalScroll.d.ts +43 -0
- package/types/toolbar/useHorizontalScroll.d.ts.map +1 -0
- package/types/toolbar/useRovingFocus.d.ts +10 -0
- package/types/toolbar/useRovingFocus.d.ts.map +1 -0
- package/types/types.d.ts +125 -0
- package/types/types.d.ts.map +1 -0
- package/dist/cjs/RichEditor.stories.cjs +0 -327
- package/dist/cjs/RichEditor.stories.native.js +0 -342
- package/dist/cjs/RichEditor.stories.native.js.map +0 -1
- package/dist/esm/RichEditor.stories.mjs +0 -291
- package/dist/esm/RichEditor.stories.mjs.map +0 -1
- package/dist/esm/RichEditor.stories.native.js +0 -303
- package/dist/esm/RichEditor.stories.native.js.map +0 -1
- package/dist/jsx/RichEditor.stories.mjs +0 -291
- package/dist/jsx/RichEditor.stories.mjs.map +0 -1
- package/dist/jsx/RichEditor.stories.native.js +0 -342
- package/dist/jsx/RichEditor.stories.native.js.map +0 -1
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: () => from[key],
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
23
|
-
var RichEditor_stories_exports = {};
|
|
24
|
-
__export(RichEditor_stories_exports, {
|
|
25
|
-
BubbleToolbarOnly: () => BubbleToolbarOnly,
|
|
26
|
-
FormIntegrated: () => FormIntegrated,
|
|
27
|
-
Interactive: () => Interactive,
|
|
28
|
-
Main: () => Main,
|
|
29
|
-
MinimalToolbar: () => MinimalToolbar,
|
|
30
|
-
ReadOnly: () => ReadOnly,
|
|
31
|
-
Skeleton: () => Skeleton,
|
|
32
|
-
WithError: () => WithError,
|
|
33
|
-
WithInitialContent: () => WithInitialContent,
|
|
34
|
-
WithMaxHeight: () => WithMaxHeight,
|
|
35
|
-
WithoutToolbar: () => WithoutToolbar,
|
|
36
|
-
default: () => RichEditor_stories_default
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(RichEditor_stories_exports);
|
|
39
|
-
var import_react_form = require("@tanstack/react-form");
|
|
40
|
-
var import_react = require("react");
|
|
41
|
-
var import_tamagui = require("tamagui");
|
|
42
|
-
var import_RichTextEditor = require("./RichTextEditor/index.cjs");
|
|
43
|
-
var import_RichEditor = require("./RichEditor.cjs");
|
|
44
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
|
-
const meta = {
|
|
46
|
-
title: "Forms/RichTextEditor",
|
|
47
|
-
component: import_RichTextEditor.RichTextEditor,
|
|
48
|
-
parameters: {
|
|
49
|
-
layout: "padded"
|
|
50
|
-
},
|
|
51
|
-
argTypes: {
|
|
52
|
-
label: {
|
|
53
|
-
control: "text"
|
|
54
|
-
},
|
|
55
|
-
placeholder: {
|
|
56
|
-
control: "text"
|
|
57
|
-
},
|
|
58
|
-
helperText: {
|
|
59
|
-
control: "text"
|
|
60
|
-
},
|
|
61
|
-
error: {
|
|
62
|
-
control: "text"
|
|
63
|
-
},
|
|
64
|
-
required: {
|
|
65
|
-
control: "boolean"
|
|
66
|
-
},
|
|
67
|
-
disabled: {
|
|
68
|
-
control: "boolean"
|
|
69
|
-
},
|
|
70
|
-
readOnly: {
|
|
71
|
-
control: "boolean"
|
|
72
|
-
},
|
|
73
|
-
showToolbar: {
|
|
74
|
-
control: "boolean"
|
|
75
|
-
},
|
|
76
|
-
showBubbleToolbar: {
|
|
77
|
-
control: "boolean"
|
|
78
|
-
},
|
|
79
|
-
compact: {
|
|
80
|
-
control: "boolean"
|
|
81
|
-
},
|
|
82
|
-
skeleton: {
|
|
83
|
-
control: "boolean"
|
|
84
|
-
},
|
|
85
|
-
size: {
|
|
86
|
-
control: "select",
|
|
87
|
-
options: ["$2", "$3", "$4"]
|
|
88
|
-
},
|
|
89
|
-
minHeight: {
|
|
90
|
-
control: "number"
|
|
91
|
-
},
|
|
92
|
-
maxHeight: {
|
|
93
|
-
control: "number"
|
|
94
|
-
},
|
|
95
|
-
sections: {
|
|
96
|
-
control: false
|
|
97
|
-
},
|
|
98
|
-
form: {
|
|
99
|
-
control: false
|
|
100
|
-
},
|
|
101
|
-
validators: {
|
|
102
|
-
control: false
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
decorators: [Story => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
106
|
-
padding: "$4",
|
|
107
|
-
maxWidth: 800,
|
|
108
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(Story, {})
|
|
109
|
-
})]
|
|
110
|
-
};
|
|
111
|
-
var RichEditor_stories_default = meta;
|
|
112
|
-
const Main = {
|
|
113
|
-
args: {
|
|
114
|
-
label: "Content",
|
|
115
|
-
placeholder: "Start typing your content...",
|
|
116
|
-
helperText: "Rich text editor with full formatting support",
|
|
117
|
-
minHeight: 200,
|
|
118
|
-
showToolbar: true,
|
|
119
|
-
showBubbleToolbar: false,
|
|
120
|
-
compact: false,
|
|
121
|
-
skeleton: false
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
const WithInitialContent = {
|
|
125
|
-
args: {
|
|
126
|
-
label: "Article Body",
|
|
127
|
-
defaultValue: `
|
|
128
|
-
<h1>Welcome to the Rich Editor</h1>
|
|
129
|
-
<p>This is a <strong>rich text editor</strong> built with <em>Tiptap</em>.</p>
|
|
130
|
-
<h2>Features</h2>
|
|
131
|
-
<ul>
|
|
132
|
-
<li>Bold, italic, underline, strikethrough</li>
|
|
133
|
-
<li>Headings (H1-H6)</li>
|
|
134
|
-
<li>Bullet and numbered lists</li>
|
|
135
|
-
<li>Blockquotes and code blocks</li>
|
|
136
|
-
<li>Links and images</li>
|
|
137
|
-
<li>Text color and highlighting</li>
|
|
138
|
-
</ul>
|
|
139
|
-
<blockquote>
|
|
140
|
-
<p>This is a blockquote with some important information.</p>
|
|
141
|
-
</blockquote>
|
|
142
|
-
<p>Here is some <code>inline code</code> for you.</p>
|
|
143
|
-
`,
|
|
144
|
-
minHeight: 300
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
const WithoutToolbar = {
|
|
148
|
-
args: {
|
|
149
|
-
label: "No Toolbar",
|
|
150
|
-
showToolbar: false,
|
|
151
|
-
defaultValue: "<p>Editor without toolbar - keyboard shortcuts still work</p>",
|
|
152
|
-
minHeight: 150
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
const BubbleToolbarOnly = {
|
|
156
|
-
args: {
|
|
157
|
-
label: "Bubble Toolbar Only",
|
|
158
|
-
showToolbar: false,
|
|
159
|
-
showBubbleToolbar: true,
|
|
160
|
-
defaultValue: "<p>Select some text to see the bubble toolbar appear with inline formatting options.</p>",
|
|
161
|
-
minHeight: 150,
|
|
162
|
-
helperText: "Select text to see the bubble toolbar"
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
const MinimalToolbar = {
|
|
166
|
-
args: {
|
|
167
|
-
label: "Minimal Toolbar",
|
|
168
|
-
sections: ["formatting", "list"],
|
|
169
|
-
defaultValue: "<p>Minimal toolbar with only formatting and list options</p>",
|
|
170
|
-
minHeight: 150,
|
|
171
|
-
helperText: "Only text formatting and list controls are shown"
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
const ReadOnly = {
|
|
175
|
-
args: {
|
|
176
|
-
label: "Read-only Content",
|
|
177
|
-
readOnly: true,
|
|
178
|
-
defaultValue: `
|
|
179
|
-
<h2>Read-only Content</h2>
|
|
180
|
-
<p>This content cannot be edited. The toolbar is hidden.</p>
|
|
181
|
-
<ul>
|
|
182
|
-
<li>View-only mode for displaying formatted content</li>
|
|
183
|
-
<li>No toolbar or editing capabilities</li>
|
|
184
|
-
</ul>
|
|
185
|
-
`,
|
|
186
|
-
minHeight: 150
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
const WithError = {
|
|
190
|
-
args: {
|
|
191
|
-
label: "Content",
|
|
192
|
-
error: "This field is required",
|
|
193
|
-
placeholder: "This field has an error...",
|
|
194
|
-
required: true,
|
|
195
|
-
minHeight: 150
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
const WithMaxHeight = {
|
|
199
|
-
args: {
|
|
200
|
-
label: "Scrollable Content",
|
|
201
|
-
defaultValue: `
|
|
202
|
-
<h1>Scrollable Content</h1>
|
|
203
|
-
<p>This editor has a maximum height and will scroll when content exceeds it.</p>
|
|
204
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
205
|
-
<p>Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
|
206
|
-
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco.</p>
|
|
207
|
-
<p>Duis aute irure dolor in reprehenderit in voluptate velit.</p>
|
|
208
|
-
<p>Excepteur sint occaecat cupidatat non proident.</p>
|
|
209
|
-
<p>Sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
210
|
-
<p>More content to demonstrate scrolling...</p>
|
|
211
|
-
<p>And even more content...</p>
|
|
212
|
-
<p>Keep scrolling...</p>
|
|
213
|
-
`,
|
|
214
|
-
minHeight: 150,
|
|
215
|
-
maxHeight: 250
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
const Interactive = {
|
|
219
|
-
render: () => {
|
|
220
|
-
const editorRef = (0, import_react.useRef)(null);
|
|
221
|
-
const [html, setHtml] = (0, import_react.useState)("");
|
|
222
|
-
const [charCount, setCharCount] = (0, import_react.useState)(0);
|
|
223
|
-
const handleChange = newHtml => {
|
|
224
|
-
setHtml(newHtml);
|
|
225
|
-
const text = newHtml.replace(/<[^>]*>/g, "");
|
|
226
|
-
setCharCount(text.length);
|
|
227
|
-
};
|
|
228
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
229
|
-
gap: "$4",
|
|
230
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_RichEditor.RichEditor, {
|
|
231
|
-
ref: editorRef,
|
|
232
|
-
placeholder: "Type here to see live updates...",
|
|
233
|
-
onChange: handleChange,
|
|
234
|
-
minHeight: 200,
|
|
235
|
-
showBubbleToolbar: true
|
|
236
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {
|
|
237
|
-
gap: "$4",
|
|
238
|
-
alignItems: "center",
|
|
239
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.Text, {
|
|
240
|
-
color: "$color10",
|
|
241
|
-
fontSize: "$2",
|
|
242
|
-
children: ["Characters: ", charCount]
|
|
243
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Button, {
|
|
244
|
-
size: "$3",
|
|
245
|
-
onPress: () => {
|
|
246
|
-
const content = editorRef.current?.getHTML();
|
|
247
|
-
console.log("HTML Content:", content);
|
|
248
|
-
},
|
|
249
|
-
children: "Log HTML"
|
|
250
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Button, {
|
|
251
|
-
size: "$3",
|
|
252
|
-
onPress: () => {
|
|
253
|
-
editorRef.current?.setHTML("<p>Content set programmatically!</p>");
|
|
254
|
-
},
|
|
255
|
-
children: "Set Content"
|
|
256
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Button, {
|
|
257
|
-
size: "$3",
|
|
258
|
-
onPress: () => editorRef.current?.focus(),
|
|
259
|
-
children: "Focus"
|
|
260
|
-
})]
|
|
261
|
-
}), html && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
262
|
-
backgroundColor: "$color3",
|
|
263
|
-
padding: "$3",
|
|
264
|
-
borderRadius: "$3",
|
|
265
|
-
maxHeight: 200,
|
|
266
|
-
overflow: "scroll",
|
|
267
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
268
|
-
size: "$1",
|
|
269
|
-
fontFamily: "$mono",
|
|
270
|
-
whiteSpace: "pre-wrap",
|
|
271
|
-
children: html
|
|
272
|
-
})
|
|
273
|
-
})]
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
const FormIntegrated = {
|
|
278
|
-
render: () => {
|
|
279
|
-
const FormExample = () => {
|
|
280
|
-
const form = (0, import_react_form.useForm)({
|
|
281
|
-
defaultValues: {
|
|
282
|
-
title: "",
|
|
283
|
-
content: ""
|
|
284
|
-
},
|
|
285
|
-
onSubmit: async ({
|
|
286
|
-
value
|
|
287
|
-
}) => {
|
|
288
|
-
console.log("Form submitted:", value);
|
|
289
|
-
alert(JSON.stringify(value, null, 2));
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
293
|
-
gap: "$4",
|
|
294
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_RichTextEditor.RichTextEditor, {
|
|
295
|
-
form,
|
|
296
|
-
name: "content",
|
|
297
|
-
label: "Article Content",
|
|
298
|
-
helperText: "Write your article content here",
|
|
299
|
-
required: true,
|
|
300
|
-
placeholder: "Start writing...",
|
|
301
|
-
minHeight: 250,
|
|
302
|
-
showBubbleToolbar: true
|
|
303
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {
|
|
304
|
-
gap: "$2",
|
|
305
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Button, {
|
|
306
|
-
size: "$3",
|
|
307
|
-
onPress: () => form.handleSubmit(),
|
|
308
|
-
children: "Submit"
|
|
309
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Button, {
|
|
310
|
-
size: "$3",
|
|
311
|
-
theme: "gray",
|
|
312
|
-
onPress: () => form.reset(),
|
|
313
|
-
children: "Reset"
|
|
314
|
-
})]
|
|
315
|
-
})]
|
|
316
|
-
});
|
|
317
|
-
};
|
|
318
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(FormExample, {});
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
const Skeleton = {
|
|
322
|
-
args: {
|
|
323
|
-
skeleton: true,
|
|
324
|
-
label: "Loading Content",
|
|
325
|
-
minHeight: 200
|
|
326
|
-
}
|
|
327
|
-
};
|
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
25
|
-
var RichEditor_stories_exports = {};
|
|
26
|
-
__export(RichEditor_stories_exports, {
|
|
27
|
-
BubbleToolbarOnly: () => BubbleToolbarOnly,
|
|
28
|
-
FormIntegrated: () => FormIntegrated,
|
|
29
|
-
Interactive: () => Interactive,
|
|
30
|
-
Main: () => Main,
|
|
31
|
-
MinimalToolbar: () => MinimalToolbar,
|
|
32
|
-
ReadOnly: () => ReadOnly,
|
|
33
|
-
Skeleton: () => Skeleton,
|
|
34
|
-
WithError: () => WithError,
|
|
35
|
-
WithInitialContent: () => WithInitialContent,
|
|
36
|
-
WithMaxHeight: () => WithMaxHeight,
|
|
37
|
-
WithoutToolbar: () => WithoutToolbar,
|
|
38
|
-
default: () => RichEditor_stories_default
|
|
39
|
-
});
|
|
40
|
-
module.exports = __toCommonJS(RichEditor_stories_exports);
|
|
41
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
-
var import_react_form = require("@tanstack/react-form");
|
|
43
|
-
var import_react = require("react");
|
|
44
|
-
var import_tamagui = require("tamagui");
|
|
45
|
-
var import_RichTextEditor = require("./RichTextEditor/index.native.js");
|
|
46
|
-
var import_RichEditor = require("./RichEditor.native.js");
|
|
47
|
-
var meta = {
|
|
48
|
-
title: "Forms/RichTextEditor",
|
|
49
|
-
component: import_RichTextEditor.RichTextEditor,
|
|
50
|
-
parameters: {
|
|
51
|
-
layout: "padded"
|
|
52
|
-
},
|
|
53
|
-
argTypes: {
|
|
54
|
-
label: {
|
|
55
|
-
control: "text"
|
|
56
|
-
},
|
|
57
|
-
placeholder: {
|
|
58
|
-
control: "text"
|
|
59
|
-
},
|
|
60
|
-
helperText: {
|
|
61
|
-
control: "text"
|
|
62
|
-
},
|
|
63
|
-
error: {
|
|
64
|
-
control: "text"
|
|
65
|
-
},
|
|
66
|
-
required: {
|
|
67
|
-
control: "boolean"
|
|
68
|
-
},
|
|
69
|
-
disabled: {
|
|
70
|
-
control: "boolean"
|
|
71
|
-
},
|
|
72
|
-
readOnly: {
|
|
73
|
-
control: "boolean"
|
|
74
|
-
},
|
|
75
|
-
showToolbar: {
|
|
76
|
-
control: "boolean"
|
|
77
|
-
},
|
|
78
|
-
showBubbleToolbar: {
|
|
79
|
-
control: "boolean"
|
|
80
|
-
},
|
|
81
|
-
compact: {
|
|
82
|
-
control: "boolean"
|
|
83
|
-
},
|
|
84
|
-
skeleton: {
|
|
85
|
-
control: "boolean"
|
|
86
|
-
},
|
|
87
|
-
size: {
|
|
88
|
-
control: "select",
|
|
89
|
-
options: ["$2", "$3", "$4"]
|
|
90
|
-
},
|
|
91
|
-
minHeight: {
|
|
92
|
-
control: "number"
|
|
93
|
-
},
|
|
94
|
-
maxHeight: {
|
|
95
|
-
control: "number"
|
|
96
|
-
},
|
|
97
|
-
sections: {
|
|
98
|
-
control: false
|
|
99
|
-
},
|
|
100
|
-
form: {
|
|
101
|
-
control: false
|
|
102
|
-
},
|
|
103
|
-
validators: {
|
|
104
|
-
control: false
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
decorators: [function (Story) {
|
|
108
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
109
|
-
padding: "$4",
|
|
110
|
-
maxWidth: 800,
|
|
111
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(Story, {})
|
|
112
|
-
});
|
|
113
|
-
}]
|
|
114
|
-
};
|
|
115
|
-
var RichEditor_stories_default = meta;
|
|
116
|
-
var Main = {
|
|
117
|
-
args: {
|
|
118
|
-
label: "Content",
|
|
119
|
-
placeholder: "Start typing your content...",
|
|
120
|
-
helperText: "Rich text editor with full formatting support",
|
|
121
|
-
minHeight: 200,
|
|
122
|
-
showToolbar: true,
|
|
123
|
-
showBubbleToolbar: false,
|
|
124
|
-
compact: false,
|
|
125
|
-
skeleton: false
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
var WithInitialContent = {
|
|
129
|
-
args: {
|
|
130
|
-
label: "Article Body",
|
|
131
|
-
defaultValue: `
|
|
132
|
-
<h1>Welcome to the Rich Editor</h1>
|
|
133
|
-
<p>This is a <strong>rich text editor</strong> built with <em>Tiptap</em>.</p>
|
|
134
|
-
<h2>Features</h2>
|
|
135
|
-
<ul>
|
|
136
|
-
<li>Bold, italic, underline, strikethrough</li>
|
|
137
|
-
<li>Headings (H1-H6)</li>
|
|
138
|
-
<li>Bullet and numbered lists</li>
|
|
139
|
-
<li>Blockquotes and code blocks</li>
|
|
140
|
-
<li>Links and images</li>
|
|
141
|
-
<li>Text color and highlighting</li>
|
|
142
|
-
</ul>
|
|
143
|
-
<blockquote>
|
|
144
|
-
<p>This is a blockquote with some important information.</p>
|
|
145
|
-
</blockquote>
|
|
146
|
-
<p>Here is some <code>inline code</code> for you.</p>
|
|
147
|
-
`,
|
|
148
|
-
minHeight: 300
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
var WithoutToolbar = {
|
|
152
|
-
args: {
|
|
153
|
-
label: "No Toolbar",
|
|
154
|
-
showToolbar: false,
|
|
155
|
-
defaultValue: "<p>Editor without toolbar - keyboard shortcuts still work</p>",
|
|
156
|
-
minHeight: 150
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
var BubbleToolbarOnly = {
|
|
160
|
-
args: {
|
|
161
|
-
label: "Bubble Toolbar Only",
|
|
162
|
-
showToolbar: false,
|
|
163
|
-
showBubbleToolbar: true,
|
|
164
|
-
defaultValue: "<p>Select some text to see the bubble toolbar appear with inline formatting options.</p>",
|
|
165
|
-
minHeight: 150,
|
|
166
|
-
helperText: "Select text to see the bubble toolbar"
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
var MinimalToolbar = {
|
|
170
|
-
args: {
|
|
171
|
-
label: "Minimal Toolbar",
|
|
172
|
-
sections: ["formatting", "list"],
|
|
173
|
-
defaultValue: "<p>Minimal toolbar with only formatting and list options</p>",
|
|
174
|
-
minHeight: 150,
|
|
175
|
-
helperText: "Only text formatting and list controls are shown"
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
var ReadOnly = {
|
|
179
|
-
args: {
|
|
180
|
-
label: "Read-only Content",
|
|
181
|
-
readOnly: true,
|
|
182
|
-
defaultValue: `
|
|
183
|
-
<h2>Read-only Content</h2>
|
|
184
|
-
<p>This content cannot be edited. The toolbar is hidden.</p>
|
|
185
|
-
<ul>
|
|
186
|
-
<li>View-only mode for displaying formatted content</li>
|
|
187
|
-
<li>No toolbar or editing capabilities</li>
|
|
188
|
-
</ul>
|
|
189
|
-
`,
|
|
190
|
-
minHeight: 150
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
var WithError = {
|
|
194
|
-
args: {
|
|
195
|
-
label: "Content",
|
|
196
|
-
error: "This field is required",
|
|
197
|
-
placeholder: "This field has an error...",
|
|
198
|
-
required: true,
|
|
199
|
-
minHeight: 150
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
var WithMaxHeight = {
|
|
203
|
-
args: {
|
|
204
|
-
label: "Scrollable Content",
|
|
205
|
-
defaultValue: `
|
|
206
|
-
<h1>Scrollable Content</h1>
|
|
207
|
-
<p>This editor has a maximum height and will scroll when content exceeds it.</p>
|
|
208
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
209
|
-
<p>Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
|
210
|
-
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco.</p>
|
|
211
|
-
<p>Duis aute irure dolor in reprehenderit in voluptate velit.</p>
|
|
212
|
-
<p>Excepteur sint occaecat cupidatat non proident.</p>
|
|
213
|
-
<p>Sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
214
|
-
<p>More content to demonstrate scrolling...</p>
|
|
215
|
-
<p>And even more content...</p>
|
|
216
|
-
<p>Keep scrolling...</p>
|
|
217
|
-
`,
|
|
218
|
-
minHeight: 150,
|
|
219
|
-
maxHeight: 250
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
var Interactive = {
|
|
223
|
-
render: function render() {
|
|
224
|
-
var editorRef = (0, import_react.useRef)(null);
|
|
225
|
-
var [html, setHtml] = (0, import_react.useState)("");
|
|
226
|
-
var [charCount, setCharCount] = (0, import_react.useState)(0);
|
|
227
|
-
var handleChange = function handleChange2(newHtml) {
|
|
228
|
-
setHtml(newHtml);
|
|
229
|
-
var text = newHtml.replace(/<[^>]*>/g, "");
|
|
230
|
-
setCharCount(text.length);
|
|
231
|
-
};
|
|
232
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
233
|
-
gap: "$4",
|
|
234
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_RichEditor.RichEditor, {
|
|
235
|
-
ref: editorRef,
|
|
236
|
-
placeholder: "Type here to see live updates...",
|
|
237
|
-
onChange: handleChange,
|
|
238
|
-
minHeight: 200,
|
|
239
|
-
showBubbleToolbar: true
|
|
240
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {
|
|
241
|
-
gap: "$4",
|
|
242
|
-
alignItems: "center",
|
|
243
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.Text, {
|
|
244
|
-
color: "$color10",
|
|
245
|
-
fontSize: "$2",
|
|
246
|
-
children: ["Characters: ", charCount]
|
|
247
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Button, {
|
|
248
|
-
size: "$3",
|
|
249
|
-
onPress: function onPress() {
|
|
250
|
-
var _editorRef_current;
|
|
251
|
-
var content = (_editorRef_current = editorRef.current) === null || _editorRef_current === void 0 ? void 0 : _editorRef_current.getHTML();
|
|
252
|
-
console.log("HTML Content:", content);
|
|
253
|
-
},
|
|
254
|
-
children: "Log HTML"
|
|
255
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Button, {
|
|
256
|
-
size: "$3",
|
|
257
|
-
onPress: function onPress() {
|
|
258
|
-
var _editorRef_current;
|
|
259
|
-
(_editorRef_current = editorRef.current) === null || _editorRef_current === void 0 ? void 0 : _editorRef_current.setHTML("<p>Content set programmatically!</p>");
|
|
260
|
-
},
|
|
261
|
-
children: "Set Content"
|
|
262
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Button, {
|
|
263
|
-
size: "$3",
|
|
264
|
-
onPress: function onPress() {
|
|
265
|
-
var _editorRef_current;
|
|
266
|
-
return (_editorRef_current = editorRef.current) === null || _editorRef_current === void 0 ? void 0 : _editorRef_current.focus();
|
|
267
|
-
},
|
|
268
|
-
children: "Focus"
|
|
269
|
-
})]
|
|
270
|
-
}), html && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
271
|
-
backgroundColor: "$color3",
|
|
272
|
-
padding: "$3",
|
|
273
|
-
borderRadius: "$3",
|
|
274
|
-
maxHeight: 200,
|
|
275
|
-
overflow: "scroll",
|
|
276
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
277
|
-
size: "$1",
|
|
278
|
-
fontFamily: "$mono",
|
|
279
|
-
whiteSpace: "pre-wrap",
|
|
280
|
-
children: html
|
|
281
|
-
})
|
|
282
|
-
})]
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
var FormIntegrated = {
|
|
287
|
-
render: function render2() {
|
|
288
|
-
var FormExample = function FormExample2() {
|
|
289
|
-
var form = (0, import_react_form.useForm)({
|
|
290
|
-
defaultValues: {
|
|
291
|
-
title: "",
|
|
292
|
-
content: ""
|
|
293
|
-
},
|
|
294
|
-
onSubmit: async function onSubmit(param) {
|
|
295
|
-
var {
|
|
296
|
-
value
|
|
297
|
-
} = param;
|
|
298
|
-
console.log("Form submitted:", value);
|
|
299
|
-
alert(JSON.stringify(value, null, 2));
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
303
|
-
gap: "$4",
|
|
304
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_RichTextEditor.RichTextEditor, {
|
|
305
|
-
form,
|
|
306
|
-
name: "content",
|
|
307
|
-
label: "Article Content",
|
|
308
|
-
helperText: "Write your article content here",
|
|
309
|
-
required: true,
|
|
310
|
-
placeholder: "Start writing...",
|
|
311
|
-
minHeight: 250,
|
|
312
|
-
showBubbleToolbar: true
|
|
313
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {
|
|
314
|
-
gap: "$2",
|
|
315
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Button, {
|
|
316
|
-
size: "$3",
|
|
317
|
-
onPress: function onPress() {
|
|
318
|
-
return form.handleSubmit();
|
|
319
|
-
},
|
|
320
|
-
children: "Submit"
|
|
321
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Button, {
|
|
322
|
-
size: "$3",
|
|
323
|
-
theme: "gray",
|
|
324
|
-
onPress: function onPress() {
|
|
325
|
-
return form.reset();
|
|
326
|
-
},
|
|
327
|
-
children: "Reset"
|
|
328
|
-
})]
|
|
329
|
-
})]
|
|
330
|
-
});
|
|
331
|
-
};
|
|
332
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(FormExample, {});
|
|
333
|
-
}
|
|
334
|
-
};
|
|
335
|
-
var Skeleton = {
|
|
336
|
-
args: {
|
|
337
|
-
skeleton: true,
|
|
338
|
-
label: "Loading Content",
|
|
339
|
-
minHeight: 200
|
|
340
|
-
}
|
|
341
|
-
};
|
|
342
|
-
//# sourceMappingURL=RichEditor.stories.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","RichEditor_stories_exports","__export","BubbleToolbarOnly","FormIntegrated","Interactive","Main","MinimalToolbar","ReadOnly","Skeleton","WithError","WithInitialContent","WithMaxHeight","WithoutToolbar","default","RichEditor_stories_default","module","exports","import_jsx_runtime","require","import_react_form","import_react","import_tamagui","import_RichTextEditor","import_RichEditor","meta","title","component","RichTextEditor","parameters","layout","argTypes","label","control","placeholder","helperText","error","required","disabled","readOnly","showToolbar","showBubbleToolbar","compact","skeleton","size","options","minHeight","maxHeight","sections","form","validators","decorators","Story","jsx","View","padding","maxWidth","children","args","defaultValue","render","editorRef","useRef","html","setHtml","useState","charCount","setCharCount","handleChange","handleChange2","newHtml","text","replace","length","jsxs","YStack","gap","RichEditor","ref","onChange","XStack","alignItems","Text","color","fontSize","Button","onPress","_editorRef_current","content","current","getHTML","console","log","setHTML","focus"],"sources":["../../src/RichEditor.stories.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA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