@infonomic/payload-alternative-lexical-editor 1.0.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/LICENSE +21 -0
- package/dist/adapter.d.ts +11 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +124 -0
- package/dist/adapter.js.map +1 -0
- package/dist/cell/rsc-entry.d.ts +20 -0
- package/dist/cell/rsc-entry.d.ts.map +1 -0
- package/dist/cell/rsc-entry.js +68 -0
- package/dist/cell/rsc-entry.js.map +1 -0
- package/dist/field/apply-value-plugin.d.ts +9 -0
- package/dist/field/apply-value-plugin.d.ts.map +1 -0
- package/dist/field/apply-value-plugin.js +66 -0
- package/dist/field/apply-value-plugin.js.map +1 -0
- package/dist/field/build-initial-state.d.ts +29 -0
- package/dist/field/build-initial-state.d.ts.map +1 -0
- package/dist/field/build-initial-state.js +14 -0
- package/dist/field/build-initial-state.js.map +1 -0
- package/dist/field/config/default.d.ts +6 -0
- package/dist/field/config/default.d.ts.map +1 -0
- package/dist/field/config/default.js +52 -0
- package/dist/field/config/default.js.map +1 -0
- package/dist/field/config/editor-config-context.d.ts +14 -0
- package/dist/field/config/editor-config-context.d.ts.map +1 -0
- package/dist/field/config/editor-config-context.js +38 -0
- package/dist/field/config/editor-config-context.js.map +1 -0
- package/dist/field/config/types.d.ts +22 -0
- package/dist/field/config/types.d.ts.map +1 -0
- package/dist/field/config/types.js +2 -0
- package/dist/field/config/types.js.map +1 -0
- package/dist/field/constants.d.ts +2 -0
- package/dist/field/constants.d.ts.map +1 -0
- package/dist/field/constants.js +2 -0
- package/dist/field/constants.js.map +1 -0
- package/dist/field/context/shared-autocomplete-context.d.ts +18 -0
- package/dist/field/context/shared-autocomplete-context.d.ts.map +1 -0
- package/dist/field/context/shared-autocomplete-context.js +40 -0
- package/dist/field/context/shared-autocomplete-context.js.map +1 -0
- package/dist/field/context/shared-history-context.d.ts +19 -0
- package/dist/field/context/shared-history-context.d.ts.map +1 -0
- package/dist/field/context/shared-history-context.js +13 -0
- package/dist/field/context/shared-history-context.js.map +1 -0
- package/dist/field/context/shared-on-change-context.d.ts +13 -0
- package/dist/field/context/shared-on-change-context.d.ts.map +1 -0
- package/dist/field/context/shared-on-change-context.js +18 -0
- package/dist/field/context/shared-on-change-context.js.map +1 -0
- package/dist/field/debug.d.ts +3 -0
- package/dist/field/debug.d.ts.map +1 -0
- package/dist/field/debug.js +17 -0
- package/dist/field/debug.js.map +1 -0
- package/dist/field/editor-context.d.ts +15 -0
- package/dist/field/editor-context.d.ts.map +1 -0
- package/dist/field/editor-context.js +37 -0
- package/dist/field/editor-context.js.map +1 -0
- package/dist/field/editor.css +1477 -0
- package/dist/field/editor.d.ts +4 -0
- package/dist/field/editor.d.ts.map +1 -0
- package/dist/field/editor.js +86 -0
- package/dist/field/editor.js.map +1 -0
- package/dist/field/field-component.css +44 -0
- package/dist/field/field-component.d.ts +16 -0
- package/dist/field/field-component.d.ts.map +1 -0
- package/dist/field/field-component.js +136 -0
- package/dist/field/field-component.js.map +1 -0
- package/dist/field/hooks/useMediaQuery.d.ts +3 -0
- package/dist/field/hooks/useMediaQuery.d.ts.map +1 -0
- package/dist/field/hooks/useMediaQuery.js +20 -0
- package/dist/field/hooks/useMediaQuery.js.map +1 -0
- package/dist/field/hooks/useModal.d.ts +13 -0
- package/dist/field/hooks/useModal.d.ts.map +1 -0
- package/dist/field/hooks/useModal.js +28 -0
- package/dist/field/hooks/useModal.js.map +1 -0
- package/dist/field/hooks/useReport.d.ts +9 -0
- package/dist/field/hooks/useReport.d.ts.map +1 -0
- package/dist/field/hooks/useReport.js +51 -0
- package/dist/field/hooks/useReport.js.map +1 -0
- package/dist/field/images/cat-typing.gif +0 -0
- package/dist/field/images/emoji/1F600.png +0 -0
- package/dist/field/images/emoji/1F641.png +0 -0
- package/dist/field/images/emoji/1F642.png +0 -0
- package/dist/field/images/emoji/2764.png +0 -0
- package/dist/field/images/icons/3-columns.svg +3 -0
- package/dist/field/images/icons/admonition.svg +1 -0
- package/dist/field/images/icons/arrow-clockwise.svg +1 -0
- package/dist/field/images/icons/arrow-counterclockwise.svg +1 -0
- package/dist/field/images/icons/bg-color.svg +1 -0
- package/dist/field/images/icons/camera.svg +1 -0
- package/dist/field/images/icons/card-checklist.svg +1 -0
- package/dist/field/images/icons/caret-right-fill.svg +1 -0
- package/dist/field/images/icons/chat-left-text.svg +1 -0
- package/dist/field/images/icons/chat-right-dots.svg +1 -0
- package/dist/field/images/icons/chat-right-text.svg +1 -0
- package/dist/field/images/icons/chat-right.svg +1 -0
- package/dist/field/images/icons/chat-square-quote.svg +1 -0
- package/dist/field/images/icons/chevron-down.svg +1 -0
- package/dist/field/images/icons/clipboard.svg +1 -0
- package/dist/field/images/icons/close.svg +1 -0
- package/dist/field/images/icons/code.svg +1 -0
- package/dist/field/images/icons/comments.svg +1 -0
- package/dist/field/images/icons/copy.svg +1 -0
- package/dist/field/images/icons/diagram-2.svg +1 -0
- package/dist/field/images/icons/download.svg +1 -0
- package/dist/field/images/icons/draggable-block-menu.svg +1 -0
- package/dist/field/images/icons/dropdown-more.svg +1 -0
- package/dist/field/images/icons/figma.svg +1 -0
- package/dist/field/images/icons/file-earmark-text.svg +4 -0
- package/dist/field/images/icons/file-image.svg +1 -0
- package/dist/field/images/icons/filetype-gif.svg +1 -0
- package/dist/field/images/icons/font-color.svg +1 -0
- package/dist/field/images/icons/font-family.svg +1 -0
- package/dist/field/images/icons/gear.svg +1 -0
- package/dist/field/images/icons/horizontal-rule.svg +1 -0
- package/dist/field/images/icons/indent.svg +1 -0
- package/dist/field/images/icons/journal-code.svg +1 -0
- package/dist/field/images/icons/journal-text.svg +1 -0
- package/dist/field/images/icons/justify.svg +1 -0
- package/dist/field/images/icons/link.svg +1 -0
- package/dist/field/images/icons/list-ol.svg +1 -0
- package/dist/field/images/icons/list-ul.svg +1 -0
- package/dist/field/images/icons/lock-fill.svg +1 -0
- package/dist/field/images/icons/lock.svg +1 -0
- package/dist/field/images/icons/markdown.svg +1 -0
- package/dist/field/images/icons/mic.svg +1 -0
- package/dist/field/images/icons/outdent.svg +1 -0
- package/dist/field/images/icons/paint-bucket.svg +1 -0
- package/dist/field/images/icons/palette.svg +1 -0
- package/dist/field/images/icons/pencil-fill.svg +1 -0
- package/dist/field/images/icons/plug-fill.svg +1 -0
- package/dist/field/images/icons/plug.svg +1 -0
- package/dist/field/images/icons/plus-slash-minus.svg +1 -0
- package/dist/field/images/icons/plus.svg +1 -0
- package/dist/field/images/icons/prettier-error.svg +1 -0
- package/dist/field/images/icons/prettier.svg +1 -0
- package/dist/field/images/icons/send.svg +1 -0
- package/dist/field/images/icons/square-check.svg +1 -0
- package/dist/field/images/icons/sticky.svg +1 -0
- package/dist/field/images/icons/success-alt.svg +1 -0
- package/dist/field/images/icons/success.svg +1 -0
- package/dist/field/images/icons/table.svg +1 -0
- package/dist/field/images/icons/text-center.svg +1 -0
- package/dist/field/images/icons/text-left.svg +1 -0
- package/dist/field/images/icons/text-paragraph.svg +1 -0
- package/dist/field/images/icons/text-right.svg +1 -0
- package/dist/field/images/icons/trash.svg +1 -0
- package/dist/field/images/icons/trash3.svg +1 -0
- package/dist/field/images/icons/tweet.svg +1 -0
- package/dist/field/images/icons/type-bold.svg +1 -0
- package/dist/field/images/icons/type-h1.svg +1 -0
- package/dist/field/images/icons/type-h2.svg +1 -0
- package/dist/field/images/icons/type-h3.svg +1 -0
- package/dist/field/images/icons/type-h4.svg +1 -0
- package/dist/field/images/icons/type-h5.svg +1 -0
- package/dist/field/images/icons/type-h6.svg +1 -0
- package/dist/field/images/icons/type-italic.svg +1 -0
- package/dist/field/images/icons/type-strikethrough.svg +1 -0
- package/dist/field/images/icons/type-subscript.svg +1 -0
- package/dist/field/images/icons/type-superscript.svg +1 -0
- package/dist/field/images/icons/type-underline.svg +1 -0
- package/dist/field/images/icons/upload.svg +1 -0
- package/dist/field/images/icons/user.svg +1 -0
- package/dist/field/images/icons/vimeo.svg +1 -0
- package/dist/field/images/icons/youtube.svg +1 -0
- package/dist/field/images/landscape.jpg +0 -0
- package/dist/field/images/logo.svg +1 -0
- package/dist/field/images/yellow-flower-small.jpg +0 -0
- package/dist/field/images/yellow-flower.jpg +0 -0
- package/dist/field/index.d.ts +12 -0
- package/dist/field/index.d.ts.map +1 -0
- package/dist/field/index.js +9 -0
- package/dist/field/index.js.map +1 -0
- package/dist/field/lexical-after-read-populate-links.d.ts +47 -0
- package/dist/field/lexical-after-read-populate-links.d.ts.map +1 -0
- package/dist/field/lexical-after-read-populate-links.js +118 -0
- package/dist/field/lexical-after-read-populate-links.js.map +1 -0
- package/dist/field/lexical-after-read-populate-media.d.ts +34 -0
- package/dist/field/lexical-after-read-populate-media.d.ts.map +1 -0
- package/dist/field/lexical-after-read-populate-media.js +40 -0
- package/dist/field/lexical-after-read-populate-media.js.map +1 -0
- package/dist/field/lexical-before-change-populate-links.d.ts +52 -0
- package/dist/field/lexical-before-change-populate-links.d.ts.map +1 -0
- package/dist/field/lexical-before-change-populate-links.js +116 -0
- package/dist/field/lexical-before-change-populate-links.js.map +1 -0
- package/dist/field/nodes/admonition-node/admonition-node-component.css +115 -0
- package/dist/field/nodes/admonition-node/admonition-node-component.d.ts +11 -0
- package/dist/field/nodes/admonition-node/admonition-node-component.d.ts.map +1 -0
- package/dist/field/nodes/admonition-node/admonition-node-component.js +157 -0
- package/dist/field/nodes/admonition-node/admonition-node-component.js.map +1 -0
- package/dist/field/nodes/admonition-node/admonition-node.d.ts +28 -0
- package/dist/field/nodes/admonition-node/admonition-node.d.ts.map +1 -0
- package/dist/field/nodes/admonition-node/admonition-node.js +134 -0
- package/dist/field/nodes/admonition-node/admonition-node.js.map +1 -0
- package/dist/field/nodes/admonition-node/icons/danger-icon.css +11 -0
- package/dist/field/nodes/admonition-node/icons/danger-icon.d.ts +8 -0
- package/dist/field/nodes/admonition-node/icons/danger-icon.d.ts.map +1 -0
- package/dist/field/nodes/admonition-node/icons/danger-icon.js +7 -0
- package/dist/field/nodes/admonition-node/icons/danger-icon.js.map +1 -0
- package/dist/field/nodes/admonition-node/icons/index.d.ts +5 -0
- package/dist/field/nodes/admonition-node/icons/index.d.ts.map +1 -0
- package/dist/field/nodes/admonition-node/icons/index.js +5 -0
- package/dist/field/nodes/admonition-node/icons/index.js.map +1 -0
- package/dist/field/nodes/admonition-node/icons/note-icon.css +11 -0
- package/dist/field/nodes/admonition-node/icons/note-icon.d.ts +8 -0
- package/dist/field/nodes/admonition-node/icons/note-icon.d.ts.map +1 -0
- package/dist/field/nodes/admonition-node/icons/note-icon.js +7 -0
- package/dist/field/nodes/admonition-node/icons/note-icon.js.map +1 -0
- package/dist/field/nodes/admonition-node/icons/tip-icon.css +11 -0
- package/dist/field/nodes/admonition-node/icons/tip-icon.d.ts +8 -0
- package/dist/field/nodes/admonition-node/icons/tip-icon.d.ts.map +1 -0
- package/dist/field/nodes/admonition-node/icons/tip-icon.js +7 -0
- package/dist/field/nodes/admonition-node/icons/tip-icon.js.map +1 -0
- package/dist/field/nodes/admonition-node/icons/warning-icon.css +11 -0
- package/dist/field/nodes/admonition-node/icons/warning-icon.d.ts +8 -0
- package/dist/field/nodes/admonition-node/icons/warning-icon.d.ts.map +1 -0
- package/dist/field/nodes/admonition-node/icons/warning-icon.js +7 -0
- package/dist/field/nodes/admonition-node/icons/warning-icon.js.map +1 -0
- package/dist/field/nodes/admonition-node/index.d.ts +4 -0
- package/dist/field/nodes/admonition-node/index.d.ts.map +1 -0
- package/dist/field/nodes/admonition-node/index.js +4 -0
- package/dist/field/nodes/admonition-node/index.js.map +1 -0
- package/dist/field/nodes/admonition-node/types.d.ts +14 -0
- package/dist/field/nodes/admonition-node/types.d.ts.map +1 -0
- package/dist/field/nodes/admonition-node/types.js +2 -0
- package/dist/field/nodes/admonition-node/types.js.map +1 -0
- package/dist/field/nodes/index.d.ts +10 -0
- package/dist/field/nodes/index.d.ts.map +1 -0
- package/dist/field/nodes/index.js +44 -0
- package/dist/field/nodes/index.js.map +1 -0
- package/dist/field/nodes/inline-image-node/index.d.ts +4 -0
- package/dist/field/nodes/inline-image-node/index.d.ts.map +1 -0
- package/dist/field/nodes/inline-image-node/index.js +4 -0
- package/dist/field/nodes/inline-image-node/index.js.map +1 -0
- package/dist/field/nodes/inline-image-node/inline-image-node-component.css +205 -0
- package/dist/field/nodes/inline-image-node/inline-image-node-component.d.ts +18 -0
- package/dist/field/nodes/inline-image-node/inline-image-node-component.d.ts.map +1 -0
- package/dist/field/nodes/inline-image-node/inline-image-node-component.js +239 -0
- package/dist/field/nodes/inline-image-node/inline-image-node-component.js.map +1 -0
- package/dist/field/nodes/inline-image-node/inline-image-node.d.ts +39 -0
- package/dist/field/nodes/inline-image-node/inline-image-node.d.ts.map +1 -0
- package/dist/field/nodes/inline-image-node/inline-image-node.js +204 -0
- package/dist/field/nodes/inline-image-node/inline-image-node.js.map +1 -0
- package/dist/field/nodes/inline-image-node/types.d.ts +33 -0
- package/dist/field/nodes/inline-image-node/types.d.ts.map +1 -0
- package/dist/field/nodes/inline-image-node/types.js +2 -0
- package/dist/field/nodes/inline-image-node/types.js.map +1 -0
- package/dist/field/nodes/layout-container-node/layout-container-node.d.ts +29 -0
- package/dist/field/nodes/layout-container-node/layout-container-node.d.ts.map +1 -0
- package/dist/field/nodes/layout-container-node/layout-container-node.js +66 -0
- package/dist/field/nodes/layout-container-node/layout-container-node.js.map +1 -0
- package/dist/field/nodes/layout-container-node/layout-item-node.d.ts +23 -0
- package/dist/field/nodes/layout-container-node/layout-item-node.d.ts.map +1 -0
- package/dist/field/nodes/layout-container-node/layout-item-node.js +50 -0
- package/dist/field/nodes/layout-container-node/layout-item-node.js.map +1 -0
- package/dist/field/nodes/link-nodes/auto-link-node.d.ts +17 -0
- package/dist/field/nodes/link-nodes/auto-link-node.d.ts.map +1 -0
- package/dist/field/nodes/link-nodes/auto-link-node.js +46 -0
- package/dist/field/nodes/link-nodes/auto-link-node.js.map +1 -0
- package/dist/field/nodes/link-nodes/index.d.ts +4 -0
- package/dist/field/nodes/link-nodes/index.d.ts.map +1 -0
- package/dist/field/nodes/link-nodes/index.js +4 -0
- package/dist/field/nodes/link-nodes/index.js.map +1 -0
- package/dist/field/nodes/link-nodes/link-node.d.ts +42 -0
- package/dist/field/nodes/link-nodes/link-node.d.ts.map +1 -0
- package/dist/field/nodes/link-nodes/link-node.js +340 -0
- package/dist/field/nodes/link-nodes/link-node.js.map +1 -0
- package/dist/field/nodes/link-nodes/types.d.ts +16 -0
- package/dist/field/nodes/link-nodes/types.d.ts.map +1 -0
- package/dist/field/nodes/link-nodes/types.js +2 -0
- package/dist/field/nodes/link-nodes/types.js.map +1 -0
- package/dist/field/nodes/vimeo-node/index.d.ts +30 -0
- package/dist/field/nodes/vimeo-node/index.d.ts.map +1 -0
- package/dist/field/nodes/vimeo-node/index.js +92 -0
- package/dist/field/nodes/vimeo-node/index.js.map +1 -0
- package/dist/field/nodes/youtube-node/index.d.ts +30 -0
- package/dist/field/nodes/youtube-node/index.d.ts.map +1 -0
- package/dist/field/nodes/youtube-node/index.js +92 -0
- package/dist/field/nodes/youtube-node/index.js.map +1 -0
- package/dist/field/plugins/admonition-plugin/admonition-drawer.css +8 -0
- package/dist/field/plugins/admonition-plugin/admonition-drawer.d.ts +5 -0
- package/dist/field/plugins/admonition-plugin/admonition-drawer.d.ts.map +1 -0
- package/dist/field/plugins/admonition-plugin/admonition-drawer.js +44 -0
- package/dist/field/plugins/admonition-plugin/admonition-drawer.js.map +1 -0
- package/dist/field/plugins/admonition-plugin/fields.d.ts +14 -0
- package/dist/field/plugins/admonition-plugin/fields.d.ts.map +1 -0
- package/dist/field/plugins/admonition-plugin/fields.js +72 -0
- package/dist/field/plugins/admonition-plugin/fields.js.map +1 -0
- package/dist/field/plugins/admonition-plugin/index.d.ts +8 -0
- package/dist/field/plugins/admonition-plugin/index.d.ts.map +1 -0
- package/dist/field/plugins/admonition-plugin/index.js +65 -0
- package/dist/field/plugins/admonition-plugin/index.js.map +1 -0
- package/dist/field/plugins/admonition-plugin/types.d.ts +15 -0
- package/dist/field/plugins/admonition-plugin/types.d.ts.map +1 -0
- package/dist/field/plugins/admonition-plugin/types.js +2 -0
- package/dist/field/plugins/admonition-plugin/types.js.map +1 -0
- package/dist/field/plugins/auto-embed-plugin/index.d.ts +26 -0
- package/dist/field/plugins/auto-embed-plugin/index.d.ts.map +1 -0
- package/dist/field/plugins/auto-embed-plugin/index.js +191 -0
- package/dist/field/plugins/auto-embed-plugin/index.js.map +1 -0
- package/dist/field/plugins/code-highlight-plugin/index.d.ts +10 -0
- package/dist/field/plugins/code-highlight-plugin/index.d.ts.map +1 -0
- package/dist/field/plugins/code-highlight-plugin/index.js +11 -0
- package/dist/field/plugins/code-highlight-plugin/index.js.map +1 -0
- package/dist/field/plugins/drag-drop-paste-plugin/index.d.ts +9 -0
- package/dist/field/plugins/drag-drop-paste-plugin/index.d.ts.map +1 -0
- package/dist/field/plugins/drag-drop-paste-plugin/index.js +37 -0
- package/dist/field/plugins/drag-drop-paste-plugin/index.js.map +1 -0
- package/dist/field/plugins/floating-text-format-toolbar-plugin/index.css +150 -0
- package/dist/field/plugins/floating-text-format-toolbar-plugin/index.d.ts +13 -0
- package/dist/field/plugins/floating-text-format-toolbar-plugin/index.d.ts.map +1 -0
- package/dist/field/plugins/floating-text-format-toolbar-plugin/index.js +236 -0
- package/dist/field/plugins/floating-text-format-toolbar-plugin/index.js.map +1 -0
- package/dist/field/plugins/inline-image-plugin/fields.d.ts +12 -0
- package/dist/field/plugins/inline-image-plugin/fields.d.ts.map +1 -0
- package/dist/field/plugins/inline-image-plugin/fields.js +160 -0
- package/dist/field/plugins/inline-image-plugin/fields.js.map +1 -0
- package/dist/field/plugins/inline-image-plugin/index.d.ts +26 -0
- package/dist/field/plugins/inline-image-plugin/index.d.ts.map +1 -0
- package/dist/field/plugins/inline-image-plugin/index.js +222 -0
- package/dist/field/plugins/inline-image-plugin/index.js.map +1 -0
- package/dist/field/plugins/inline-image-plugin/inline-image-drawer.css +29 -0
- package/dist/field/plugins/inline-image-plugin/inline-image-drawer.d.ts +5 -0
- package/dist/field/plugins/inline-image-plugin/inline-image-drawer.d.ts.map +1 -0
- package/dist/field/plugins/inline-image-plugin/inline-image-drawer.js +51 -0
- package/dist/field/plugins/inline-image-plugin/inline-image-drawer.js.map +1 -0
- package/dist/field/plugins/inline-image-plugin/types.d.ts +16 -0
- package/dist/field/plugins/inline-image-plugin/types.d.ts.map +1 -0
- package/dist/field/plugins/inline-image-plugin/types.js +2 -0
- package/dist/field/plugins/inline-image-plugin/types.js.map +1 -0
- package/dist/field/plugins/inline-image-plugin/utils.d.ts +9 -0
- package/dist/field/plugins/inline-image-plugin/utils.d.ts.map +1 -0
- package/dist/field/plugins/inline-image-plugin/utils.js +27 -0
- package/dist/field/plugins/inline-image-plugin/utils.js.map +1 -0
- package/dist/field/plugins/layout-plugin/insert-layout-dialog.d.ts +14 -0
- package/dist/field/plugins/layout-plugin/insert-layout-dialog.d.ts.map +1 -0
- package/dist/field/plugins/layout-plugin/insert-layout-dialog.js +26 -0
- package/dist/field/plugins/layout-plugin/insert-layout-dialog.js.map +1 -0
- package/dist/field/plugins/layout-plugin/layout-plugin.d.ts +8 -0
- package/dist/field/plugins/layout-plugin/layout-plugin.d.ts.map +1 -0
- package/dist/field/plugins/layout-plugin/layout-plugin.js +87 -0
- package/dist/field/plugins/layout-plugin/layout-plugin.js.map +1 -0
- package/dist/field/plugins/link-plugin/auto-link/auto-link-plugin.d.ts +22 -0
- package/dist/field/plugins/link-plugin/auto-link/auto-link-plugin.d.ts.map +1 -0
- package/dist/field/plugins/link-plugin/auto-link/auto-link-plugin.js +218 -0
- package/dist/field/plugins/link-plugin/auto-link/auto-link-plugin.js.map +1 -0
- package/dist/field/plugins/link-plugin/auto-link/index.d.ts +10 -0
- package/dist/field/plugins/link-plugin/auto-link/index.d.ts.map +1 -0
- package/dist/field/plugins/link-plugin/auto-link/index.js +17 -0
- package/dist/field/plugins/link-plugin/auto-link/index.js.map +1 -0
- package/dist/field/plugins/link-plugin/link/fields.d.ts +11 -0
- package/dist/field/plugins/link-plugin/link/fields.d.ts.map +1 -0
- package/dist/field/plugins/link-plugin/link/fields.js +120 -0
- package/dist/field/plugins/link-plugin/link/fields.js.map +1 -0
- package/dist/field/plugins/link-plugin/link/floating-link-editor.css +128 -0
- package/dist/field/plugins/link-plugin/link/floating-link-editor.d.ts +13 -0
- package/dist/field/plugins/link-plugin/link/floating-link-editor.d.ts.map +1 -0
- package/dist/field/plugins/link-plugin/link/floating-link-editor.js +239 -0
- package/dist/field/plugins/link-plugin/link/floating-link-editor.js.map +1 -0
- package/dist/field/plugins/link-plugin/link/index.d.ts +2 -0
- package/dist/field/plugins/link-plugin/link/index.d.ts.map +1 -0
- package/dist/field/plugins/link-plugin/link/index.js +65 -0
- package/dist/field/plugins/link-plugin/link/index.js.map +1 -0
- package/dist/field/plugins/link-plugin/link/link-drawer.css +21 -0
- package/dist/field/plugins/link-plugin/link/link-drawer.d.ts +5 -0
- package/dist/field/plugins/link-plugin/link/link-drawer.d.ts.map +1 -0
- package/dist/field/plugins/link-plugin/link/link-drawer.js +72 -0
- package/dist/field/plugins/link-plugin/link/link-drawer.js.map +1 -0
- package/dist/field/plugins/link-plugin/link/types.d.ts +20 -0
- package/dist/field/plugins/link-plugin/link/types.d.ts.map +1 -0
- package/dist/field/plugins/link-plugin/link/types.js +2 -0
- package/dist/field/plugins/link-plugin/link/types.js.map +1 -0
- package/dist/field/plugins/table-action-menu-plugin/index.d.ts +6 -0
- package/dist/field/plugins/table-action-menu-plugin/index.d.ts.map +1 -0
- package/dist/field/plugins/table-action-menu-plugin/index.js +476 -0
- package/dist/field/plugins/table-action-menu-plugin/index.js.map +1 -0
- package/dist/field/plugins/table-plugin/index.d.ts +4 -0
- package/dist/field/plugins/table-plugin/index.d.ts.map +1 -0
- package/dist/field/plugins/table-plugin/index.js +30 -0
- package/dist/field/plugins/table-plugin/index.js.map +1 -0
- package/dist/field/plugins/table-plugin/table-drawer.d.ts +12 -0
- package/dist/field/plugins/table-plugin/table-drawer.d.ts.map +1 -0
- package/dist/field/plugins/table-plugin/table-drawer.js +42 -0
- package/dist/field/plugins/table-plugin/table-drawer.js.map +1 -0
- package/dist/field/plugins/toolbar-plugin/index.d.ts +10 -0
- package/dist/field/plugins/toolbar-plugin/index.d.ts.map +1 -0
- package/dist/field/plugins/toolbar-plugin/index.js +394 -0
- package/dist/field/plugins/toolbar-plugin/index.js.map +1 -0
- package/dist/field/plugins/treeview-plugin/index.d.ts +10 -0
- package/dist/field/plugins/treeview-plugin/index.d.ts.map +1 -0
- package/dist/field/plugins/treeview-plugin/index.js +9 -0
- package/dist/field/plugins/treeview-plugin/index.js.map +1 -0
- package/dist/field/plugins/vimeo-plugin/index.d.ts +4 -0
- package/dist/field/plugins/vimeo-plugin/index.d.ts.map +1 -0
- package/dist/field/plugins/vimeo-plugin/index.js +29 -0
- package/dist/field/plugins/vimeo-plugin/index.js.map +1 -0
- package/dist/field/plugins/youtube-plugin/index.d.ts +4 -0
- package/dist/field/plugins/youtube-plugin/index.d.ts.map +1 -0
- package/dist/field/plugins/youtube-plugin/index.js +29 -0
- package/dist/field/plugins/youtube-plugin/index.js.map +1 -0
- package/dist/field/rsc-entry.d.ts +9 -0
- package/dist/field/rsc-entry.d.ts.map +1 -0
- package/dist/field/rsc-entry.js +57 -0
- package/dist/field/rsc-entry.js.map +1 -0
- package/dist/field/shared/canUseDOM.d.ts +9 -0
- package/dist/field/shared/canUseDOM.d.ts.map +1 -0
- package/dist/field/shared/canUseDOM.js +9 -0
- package/dist/field/shared/canUseDOM.js.map +1 -0
- package/dist/field/shared/environment.d.ts +23 -0
- package/dist/field/shared/environment.d.ts.map +1 -0
- package/dist/field/shared/environment.js +22 -0
- package/dist/field/shared/environment.js.map +1 -0
- package/dist/field/shared/invariant.d.ts +9 -0
- package/dist/field/shared/invariant.d.ts.map +1 -0
- package/dist/field/shared/invariant.js +18 -0
- package/dist/field/shared/invariant.js.map +1 -0
- package/dist/field/shared/simpleDiffWithCursor.d.ts +13 -0
- package/dist/field/shared/simpleDiffWithCursor.d.ts.map +1 -0
- package/dist/field/shared/simpleDiffWithCursor.js +34 -0
- package/dist/field/shared/simpleDiffWithCursor.js.map +1 -0
- package/dist/field/shared/useLayoutEffect.d.ts +11 -0
- package/dist/field/shared/useLayoutEffect.d.ts.map +1 -0
- package/dist/field/shared/useLayoutEffect.js +12 -0
- package/dist/field/shared/useLayoutEffect.js.map +1 -0
- package/dist/field/shared/warnOnlyOnce.d.ts +9 -0
- package/dist/field/shared/warnOnlyOnce.d.ts.map +1 -0
- package/dist/field/shared/warnOnlyOnce.js +21 -0
- package/dist/field/shared/warnOnlyOnce.js.map +1 -0
- package/dist/field/themes/lexical-editor-theme.css +558 -0
- package/dist/field/themes/lexical-editor-theme.d.ts +10 -0
- package/dist/field/themes/lexical-editor-theme.d.ts.map +1 -0
- package/dist/field/themes/lexical-editor-theme.js +105 -0
- package/dist/field/themes/lexical-editor-theme.js.map +1 -0
- package/dist/field/types.d.ts +10 -0
- package/dist/field/types.d.ts.map +1 -0
- package/dist/field/types.js +2 -0
- package/dist/field/types.js.map +1 -0
- package/dist/field/ui/button.css +45 -0
- package/dist/field/ui/button.d.ts +19 -0
- package/dist/field/ui/button.d.ts.map +1 -0
- package/dist/field/ui/button.js +8 -0
- package/dist/field/ui/button.js.map +1 -0
- package/dist/field/ui/checkbox.css +52 -0
- package/dist/field/ui/color-picker.css +88 -0
- package/dist/field/ui/color-picker.d.ts +21 -0
- package/dist/field/ui/color-picker.d.ts.map +1 -0
- package/dist/field/ui/color-picker.js +250 -0
- package/dist/field/ui/color-picker.js.map +1 -0
- package/dist/field/ui/content-editable-inline.d.ts +13 -0
- package/dist/field/ui/content-editable-inline.d.ts.map +1 -0
- package/dist/field/ui/content-editable-inline.js +14 -0
- package/dist/field/ui/content-editable-inline.js.map +1 -0
- package/dist/field/ui/content-editable.css +28 -0
- package/dist/field/ui/content-editable.d.ts +13 -0
- package/dist/field/ui/content-editable.d.ts.map +1 -0
- package/dist/field/ui/content-editable.js +15 -0
- package/dist/field/ui/content-editable.js.map +1 -0
- package/dist/field/ui/dialog.css +17 -0
- package/dist/field/ui/dialog.d.ts +17 -0
- package/dist/field/ui/dialog.d.ts.map +1 -0
- package/dist/field/ui/dialog.js +10 -0
- package/dist/field/ui/dialog.js.map +1 -0
- package/dist/field/ui/dropdown.d.ts +25 -0
- package/dist/field/ui/dropdown.d.ts.map +1 -0
- package/dist/field/ui/dropdown.js +118 -0
- package/dist/field/ui/dropdown.js.map +1 -0
- package/dist/field/ui/file-input.d.ts +18 -0
- package/dist/field/ui/file-input.d.ts.map +1 -0
- package/dist/field/ui/file-input.js +17 -0
- package/dist/field/ui/file-input.js.map +1 -0
- package/dist/field/ui/input.css +32 -0
- package/dist/field/ui/modal.css +84 -0
- package/dist/field/ui/modal.d.ts +17 -0
- package/dist/field/ui/modal.d.ts.map +1 -0
- package/dist/field/ui/modal.js +48 -0
- package/dist/field/ui/modal.js.map +1 -0
- package/dist/field/ui/placeholder-inline.d.ts +14 -0
- package/dist/field/ui/placeholder-inline.d.ts.map +1 -0
- package/dist/field/ui/placeholder-inline.js +12 -0
- package/dist/field/ui/placeholder-inline.js.map +1 -0
- package/dist/field/ui/placeholder.css +33 -0
- package/dist/field/ui/placeholder.d.ts +14 -0
- package/dist/field/ui/placeholder.d.ts.map +1 -0
- package/dist/field/ui/placeholder.js +14 -0
- package/dist/field/ui/placeholder.js.map +1 -0
- package/dist/field/ui/select.css +34 -0
- package/dist/field/ui/select.d.ts +16 -0
- package/dist/field/ui/select.d.ts.map +1 -0
- package/dist/field/ui/select.js +17 -0
- package/dist/field/ui/select.js.map +1 -0
- package/dist/field/ui/switch.d.ts +15 -0
- package/dist/field/ui/switch.d.ts.map +1 -0
- package/dist/field/ui/switch.js +8 -0
- package/dist/field/ui/switch.js.map +1 -0
- package/dist/field/ui/text-input.d.ts +20 -0
- package/dist/field/ui/text-input.d.ts.map +1 -0
- package/dist/field/ui/text-input.js +18 -0
- package/dist/field/ui/text-input.js.map +1 -0
- package/dist/field/utils/cloneDeep.d.ts +2 -0
- package/dist/field/utils/cloneDeep.d.ts.map +1 -0
- package/dist/field/utils/cloneDeep.js +50 -0
- package/dist/field/utils/cloneDeep.js.map +1 -0
- package/dist/field/utils/deepEqual.d.ts +2 -0
- package/dist/field/utils/deepEqual.d.ts.map +1 -0
- package/dist/field/utils/deepEqual.js +48 -0
- package/dist/field/utils/deepEqual.js.map +1 -0
- package/dist/field/utils/emoji-list.d.ts +28 -0
- package/dist/field/utils/emoji-list.d.ts.map +1 -0
- package/dist/field/utils/emoji-list.js +16613 -0
- package/dist/field/utils/emoji-list.js.map +1 -0
- package/dist/field/utils/getDOMRangeRect.d.ts +9 -0
- package/dist/field/utils/getDOMRangeRect.d.ts.map +1 -0
- package/dist/field/utils/getDOMRangeRect.js +23 -0
- package/dist/field/utils/getDOMRangeRect.js.map +1 -0
- package/dist/field/utils/getSelectedNode.d.ts +3 -0
- package/dist/field/utils/getSelectedNode.d.ts.map +1 -0
- package/dist/field/utils/getSelectedNode.js +25 -0
- package/dist/field/utils/getSelectedNode.js.map +1 -0
- package/dist/field/utils/guard.d.ts +9 -0
- package/dist/field/utils/guard.d.ts.map +1 -0
- package/dist/field/utils/guard.js +11 -0
- package/dist/field/utils/guard.js.map +1 -0
- package/dist/field/utils/hashSerializedState.d.ts +3 -0
- package/dist/field/utils/hashSerializedState.d.ts.map +1 -0
- package/dist/field/utils/hashSerializedState.js +32 -0
- package/dist/field/utils/hashSerializedState.js.map +1 -0
- package/dist/field/utils/isMobileWidth.d.ts +9 -0
- package/dist/field/utils/isMobileWidth.d.ts.map +1 -0
- package/dist/field/utils/isMobileWidth.js +9 -0
- package/dist/field/utils/isMobileWidth.js.map +1 -0
- package/dist/field/utils/joinClasses.d.ts +9 -0
- package/dist/field/utils/joinClasses.d.ts.map +1 -0
- package/dist/field/utils/joinClasses.js +11 -0
- package/dist/field/utils/joinClasses.js.map +1 -0
- package/dist/field/utils/load-related.d.ts +4 -0
- package/dist/field/utils/load-related.d.ts.map +1 -0
- package/dist/field/utils/load-related.js +45 -0
- package/dist/field/utils/load-related.js.map +1 -0
- package/dist/field/utils/point.d.ts +22 -0
- package/dist/field/utils/point.d.ts.map +1 -0
- package/dist/field/utils/point.js +43 -0
- package/dist/field/utils/point.js.map +1 -0
- package/dist/field/utils/rect.d.ts +46 -0
- package/dist/field/utils/rect.d.ts.map +1 -0
- package/dist/field/utils/rect.js +101 -0
- package/dist/field/utils/rect.js.map +1 -0
- package/dist/field/utils/setFloatingElemPosition.d.ts +2 -0
- package/dist/field/utils/setFloatingElemPosition.d.ts.map +1 -0
- package/dist/field/utils/setFloatingElemPosition.js +34 -0
- package/dist/field/utils/setFloatingElemPosition.js.map +1 -0
- package/dist/field/utils/setFloatingElemPositionForLinkEditor.d.ts +2 -0
- package/dist/field/utils/setFloatingElemPositionForLinkEditor.d.ts.map +1 -0
- package/dist/field/utils/setFloatingElemPositionForLinkEditor.js +33 -0
- package/dist/field/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
- package/dist/field/utils/swipe.d.ts +12 -0
- package/dist/field/utils/swipe.d.ts.map +1 -0
- package/dist/field/utils/swipe.js +100 -0
- package/dist/field/utils/swipe.js.map +1 -0
- package/dist/field/utils/url.d.ts +11 -0
- package/dist/field/utils/url.d.ts.map +1 -0
- package/dist/field/utils/url.js +45 -0
- package/dist/field/utils/url.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +33 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validate/hasText.d.ts +3 -0
- package/dist/validate/hasText.d.ts.map +1 -0
- package/dist/validate/hasText.js +29 -0
- package/dist/validate/hasText.js.map +1 -0
- package/dist/validate/validate-client.d.ts +4 -0
- package/dist/validate/validate-client.d.ts.map +1 -0
- package/dist/validate/validate-client.js +17 -0
- package/dist/validate/validate-client.js.map +1 -0
- package/dist/validate/validate-server.d.ts +4 -0
- package/dist/validate/validate-server.d.ts.map +1 -0
- package/dist/validate/validate-server.js +10 -0
- package/dist/validate/validate-server.js.map +1 -0
- package/package.json +108 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.Button__root {
|
|
11
|
+
padding-top: 10px;
|
|
12
|
+
padding-bottom: 10px;
|
|
13
|
+
padding-left: 15px;
|
|
14
|
+
padding-right: 15px;
|
|
15
|
+
border: 0px;
|
|
16
|
+
background-color: #eee;
|
|
17
|
+
border-radius: 5px;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.Button__root:hover {
|
|
23
|
+
background-color: #ddd;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.Button__small {
|
|
27
|
+
padding-top: 5px;
|
|
28
|
+
padding-bottom: 5px;
|
|
29
|
+
padding-left: 10px;
|
|
30
|
+
padding-right: 10px;
|
|
31
|
+
font-size: 13px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.Button__disabled:hover {
|
|
35
|
+
background-color: #eee;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
[data-theme="dark"] .Button__root {
|
|
39
|
+
color: #ccc;
|
|
40
|
+
background-color: #222222;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[data-theme="dark"] .Button__root:hover {
|
|
44
|
+
background-color: #282828;
|
|
45
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import type * as React from 'react';
|
|
9
|
+
import './button.css';
|
|
10
|
+
export default function Button({ 'data-test-id': dataTestId, children, className, onClick, disabled, small, title, }: {
|
|
11
|
+
'data-test-id'?: string;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
onClick: () => void;
|
|
16
|
+
small?: boolean;
|
|
17
|
+
title?: string;
|
|
18
|
+
}): React.JSX.Element;
|
|
19
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/field/ui/button.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,OAAO,cAAc,CAAA;AAIrB,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,cAAc,EAAE,UAAU,EAC1B,QAAQ,EACR,SAAS,EACT,OAAO,EACP,QAAQ,EACR,KAAK,EACL,KAAK,GACN,EAAE;IACD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmBpB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import './button.css';
|
|
4
|
+
import joinClasses from '../utils/joinClasses';
|
|
5
|
+
export default function Button({ 'data-test-id': dataTestId, children, className, onClick, disabled, small, title, }) {
|
|
6
|
+
return (_jsx("button", { type: "button", disabled: disabled, className: joinClasses('Button__root', disabled != null && 'Button__disabled', small != null && 'Button__small', className), onClick: onClick, title: title, "aria-label": title, ...(dataTestId != null && { 'data-test-id': dataTestId }), children: children }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/field/ui/button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAWZ,OAAO,cAAc,CAAA;AAErB,OAAO,WAAW,MAAM,sBAAsB,CAAA;AAE9C,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,cAAc,EAAE,UAAU,EAC1B,QAAQ,EACR,SAAS,EACT,OAAO,EACP,QAAQ,EACR,KAAK,EACL,KAAK,GASN;IACC,OAAO,CACL,iBACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,WAAW,CACpB,cAAc,EACd,QAAQ,IAAI,IAAI,IAAI,kBAAkB,EACtC,KAAK,IAAI,IAAI,IAAI,eAAe,EAChC,SAAS,CACV,EACD,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,gBACA,KAAK,KACb,CAAC,UAAU,IAAI,IAAI,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,YAEzD,QAAQ,GACF,CACV,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
[type="checkbox"]:checked,
|
|
2
|
+
[type="checkbox"]:not(:checked) {
|
|
3
|
+
position: absolute;
|
|
4
|
+
left: -9999px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
[type="checkbox"]:checked + label,
|
|
8
|
+
[type="checkbox"]:not(:checked) + label {
|
|
9
|
+
position: relative;
|
|
10
|
+
padding-right: 55px;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
line-height: 20px;
|
|
13
|
+
display: inline-block;
|
|
14
|
+
color: #666;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[type="checkbox"]:checked + label:before,
|
|
18
|
+
[type="checkbox"]:not(:checked) + label:before {
|
|
19
|
+
content: "";
|
|
20
|
+
position: absolute;
|
|
21
|
+
right: 0;
|
|
22
|
+
top: 0;
|
|
23
|
+
width: 18px;
|
|
24
|
+
height: 18px;
|
|
25
|
+
border: 1px solid #666;
|
|
26
|
+
background: #fff;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[type="checkbox"]:checked + label:after,
|
|
30
|
+
[type="checkbox"]:not(:checked) + label:after {
|
|
31
|
+
content: "";
|
|
32
|
+
width: 8px;
|
|
33
|
+
height: 8px;
|
|
34
|
+
background: #222222;
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 6px;
|
|
37
|
+
right: 6px;
|
|
38
|
+
-webkit-transition: all 0.2s ease;
|
|
39
|
+
transition: all 0.2s ease;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[type="checkbox"]:not(:checked) + label:after {
|
|
43
|
+
opacity: 0;
|
|
44
|
+
-webkit-transform: scale(0);
|
|
45
|
+
transform: scale(0);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[type="checkbox"]:checked + label:after {
|
|
49
|
+
opacity: 1;
|
|
50
|
+
-webkit-transform: scale(1);
|
|
51
|
+
transform: scale(1);
|
|
52
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.color-picker-wrapper {
|
|
10
|
+
padding: 20px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.color-picker-basic-color {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-wrap: wrap;
|
|
16
|
+
gap: 10px;
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.color-picker-basic-color button {
|
|
22
|
+
border: 1px solid #ccc;
|
|
23
|
+
border-radius: 4px;
|
|
24
|
+
height: 16px;
|
|
25
|
+
width: 16px;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
list-style-type: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.color-picker-basic-color button.active {
|
|
31
|
+
box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, 0.3);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.color-picker-saturation {
|
|
35
|
+
width: 100%;
|
|
36
|
+
position: relative;
|
|
37
|
+
margin-top: 15px;
|
|
38
|
+
height: 150px;
|
|
39
|
+
background-image:
|
|
40
|
+
linear-gradient(transparent, black), linear-gradient(to right, white, transparent);
|
|
41
|
+
user-select: none;
|
|
42
|
+
}
|
|
43
|
+
.color-picker-saturation_cursor {
|
|
44
|
+
position: absolute;
|
|
45
|
+
width: 20px;
|
|
46
|
+
height: 20px;
|
|
47
|
+
border: 2px solid #ffffff;
|
|
48
|
+
border-radius: 50%;
|
|
49
|
+
box-shadow: 0 0 15px #00000026;
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
transform: translate(-10px, -10px);
|
|
52
|
+
}
|
|
53
|
+
.color-picker-hue {
|
|
54
|
+
width: 100%;
|
|
55
|
+
position: relative;
|
|
56
|
+
margin-top: 15px;
|
|
57
|
+
height: 12px;
|
|
58
|
+
background-image: linear-gradient(
|
|
59
|
+
to right,
|
|
60
|
+
rgb(255, 0, 0),
|
|
61
|
+
rgb(255, 255, 0),
|
|
62
|
+
rgb(0, 255, 0),
|
|
63
|
+
rgb(0, 255, 255),
|
|
64
|
+
rgb(0, 0, 255),
|
|
65
|
+
rgb(255, 0, 255),
|
|
66
|
+
rgb(255, 0, 0)
|
|
67
|
+
);
|
|
68
|
+
user-select: none;
|
|
69
|
+
border-radius: 12px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.color-picker-hue_cursor {
|
|
73
|
+
position: absolute;
|
|
74
|
+
width: 20px;
|
|
75
|
+
height: 20px;
|
|
76
|
+
border: 2px solid #ffffff;
|
|
77
|
+
border-radius: 50%;
|
|
78
|
+
box-shadow: #0003 0 0 0 0.5px;
|
|
79
|
+
box-sizing: border-box;
|
|
80
|
+
transform: translate(-10px, -4px);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.color-picker-color {
|
|
84
|
+
border: 1px solid #ccc;
|
|
85
|
+
margin-top: 15px;
|
|
86
|
+
width: 100%;
|
|
87
|
+
height: 20px;
|
|
88
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import './color-picker.css';
|
|
9
|
+
import type * as React from 'react';
|
|
10
|
+
interface ColorPickerProps {
|
|
11
|
+
color: string;
|
|
12
|
+
onChange?: (color: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export default function ColorPicker({ color, onChange, }: Readonly<ColorPickerProps>): React.JSX.Element;
|
|
15
|
+
export interface Position {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function toHex(value: string): string;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=color-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-picker.d.ts","sourceRoot":"","sources":["../../../src/field/ui/color-picker.tsx"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,OAAO,oBAAoB,CAAA;AAE3B,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAKnC,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACnC;AAuBD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,KAAK,EACL,QAAQ,GACT,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA0GhD;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAoID,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAuB3C"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
import './color-picker.css';
|
|
11
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
12
|
+
import TextInput from './text-input';
|
|
13
|
+
const basicColors = [
|
|
14
|
+
'#d0021b',
|
|
15
|
+
'#f5a623',
|
|
16
|
+
'#f8e71c',
|
|
17
|
+
'#8b572a',
|
|
18
|
+
'#7ed321',
|
|
19
|
+
'#417505',
|
|
20
|
+
'#bd10e0',
|
|
21
|
+
'#9013fe',
|
|
22
|
+
'#4a90e2',
|
|
23
|
+
'#50e3c2',
|
|
24
|
+
'#b8e986',
|
|
25
|
+
'#000000',
|
|
26
|
+
'#4a4a4a',
|
|
27
|
+
'#9b9b9b',
|
|
28
|
+
'#ffffff',
|
|
29
|
+
];
|
|
30
|
+
const WIDTH = 214;
|
|
31
|
+
const HEIGHT = 150;
|
|
32
|
+
export default function ColorPicker({ color, onChange, }) {
|
|
33
|
+
const [selfColor, setSelfColor] = useState(transformColor('hex', color));
|
|
34
|
+
const [inputColor, setInputColor] = useState(color);
|
|
35
|
+
const innerDivRef = useRef(null);
|
|
36
|
+
const saturationPosition = useMemo(() => ({
|
|
37
|
+
x: (selfColor.hsv.s / 100) * WIDTH,
|
|
38
|
+
y: ((100 - selfColor.hsv.v) / 100) * HEIGHT,
|
|
39
|
+
}), [selfColor.hsv.s, selfColor.hsv.v]);
|
|
40
|
+
const huePosition = useMemo(() => ({
|
|
41
|
+
x: (selfColor.hsv.h / 360) * WIDTH,
|
|
42
|
+
}), [selfColor.hsv]);
|
|
43
|
+
const onSetHex = (hex) => {
|
|
44
|
+
setInputColor(hex);
|
|
45
|
+
if (/^#[0-9A-Fa-f]{6}$/i.test(hex)) {
|
|
46
|
+
const newColor = transformColor('hex', hex);
|
|
47
|
+
setSelfColor(newColor);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const onMoveSaturation = ({ x, y }) => {
|
|
51
|
+
const newHsv = {
|
|
52
|
+
...selfColor.hsv,
|
|
53
|
+
s: (x / WIDTH) * 100,
|
|
54
|
+
v: 100 - (y / HEIGHT) * 100,
|
|
55
|
+
};
|
|
56
|
+
const newColor = transformColor('hsv', newHsv);
|
|
57
|
+
setSelfColor(newColor);
|
|
58
|
+
setInputColor(newColor.hex);
|
|
59
|
+
};
|
|
60
|
+
const onMoveHue = ({ x }) => {
|
|
61
|
+
const newHsv = { ...selfColor.hsv, h: (x / WIDTH) * 360 };
|
|
62
|
+
const newColor = transformColor('hsv', newHsv);
|
|
63
|
+
setSelfColor(newColor);
|
|
64
|
+
setInputColor(newColor.hex);
|
|
65
|
+
};
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
// Check if the dropdown is actually active
|
|
68
|
+
if (innerDivRef.current !== null && onChange != null) {
|
|
69
|
+
onChange(selfColor.hex);
|
|
70
|
+
setInputColor(selfColor.hex);
|
|
71
|
+
}
|
|
72
|
+
}, [selfColor, onChange]);
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
if (color === undefined)
|
|
75
|
+
return;
|
|
76
|
+
const newColor = transformColor('hex', color);
|
|
77
|
+
setSelfColor(newColor);
|
|
78
|
+
setInputColor(newColor.hex);
|
|
79
|
+
}, [color]);
|
|
80
|
+
return (_jsxs("div", { className: "color-picker-wrapper", style: { width: WIDTH }, ref: innerDivRef, children: [_jsx(TextInput, { label: "Hex", onChange: onSetHex, value: inputColor }), _jsx("div", { className: "color-picker-basic-color", children: basicColors.map((basicColor) => (_jsx("button", { type: "button", className: basicColor === selfColor.hex ? ' active' : '', style: { backgroundColor: basicColor }, onClick: () => {
|
|
81
|
+
setInputColor(basicColor);
|
|
82
|
+
setSelfColor(transformColor('hex', basicColor));
|
|
83
|
+
} }, basicColor))) }), _jsx(MoveWrapper, { className: "color-picker-saturation", style: { backgroundColor: `hsl(${selfColor.hsv.h}, 100%, 50%)` }, onChange: onMoveSaturation, ariaLabel: "Saturation and value", children: _jsx("div", { className: "color-picker-saturation_cursor", style: {
|
|
84
|
+
backgroundColor: selfColor.hex,
|
|
85
|
+
left: saturationPosition.x,
|
|
86
|
+
top: saturationPosition.y,
|
|
87
|
+
} }) }), _jsx(MoveWrapper, { className: "color-picker-hue", onChange: onMoveHue, ariaLabel: "Hue", children: _jsx("div", { className: "color-picker-hue_cursor", style: {
|
|
88
|
+
backgroundColor: `hsl(${selfColor.hsv.h}, 100%, 50%)`,
|
|
89
|
+
left: huePosition.x,
|
|
90
|
+
} }) }), _jsx("div", { className: "color-picker-color", style: { backgroundColor: selfColor.hex } })] }));
|
|
91
|
+
}
|
|
92
|
+
function MoveWrapper({ className, style, onChange, children, ariaLabel, }) {
|
|
93
|
+
const divRef = useRef(null);
|
|
94
|
+
const lastPositionRef = useRef({ x: WIDTH / 2, y: HEIGHT / 2 });
|
|
95
|
+
const applyPosition = (position) => {
|
|
96
|
+
lastPositionRef.current = position;
|
|
97
|
+
onChange(position);
|
|
98
|
+
};
|
|
99
|
+
const move = (e) => {
|
|
100
|
+
if (divRef.current != null) {
|
|
101
|
+
const { current: div } = divRef;
|
|
102
|
+
const { width, height, left, top } = div.getBoundingClientRect();
|
|
103
|
+
const x = clamp(e.clientX - left, width, 0);
|
|
104
|
+
const y = clamp(e.clientY - top, height, 0);
|
|
105
|
+
applyPosition({ x, y });
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
const onMouseDown = (e) => {
|
|
109
|
+
if (e.button !== 0)
|
|
110
|
+
return;
|
|
111
|
+
move(e);
|
|
112
|
+
const onMouseMove = (_e) => {
|
|
113
|
+
move(_e);
|
|
114
|
+
};
|
|
115
|
+
const onMouseUp = (_e) => {
|
|
116
|
+
document.removeEventListener('mousemove', onMouseMove, false);
|
|
117
|
+
document.removeEventListener('mouseup', onMouseUp, false);
|
|
118
|
+
move(_e);
|
|
119
|
+
};
|
|
120
|
+
document.addEventListener('mousemove', onMouseMove, false);
|
|
121
|
+
document.addEventListener('mouseup', onMouseUp, false);
|
|
122
|
+
};
|
|
123
|
+
const onKeyDown = (e) => {
|
|
124
|
+
if (divRef.current == null)
|
|
125
|
+
return;
|
|
126
|
+
const { width, height } = divRef.current.getBoundingClientRect();
|
|
127
|
+
const stepX = Math.max(1, width / 50);
|
|
128
|
+
const stepY = Math.max(1, height / 50);
|
|
129
|
+
const current = lastPositionRef.current;
|
|
130
|
+
let next = null;
|
|
131
|
+
switch (e.key) {
|
|
132
|
+
case 'ArrowLeft':
|
|
133
|
+
next = { x: clamp(current.x - stepX, width, 0), y: current.y };
|
|
134
|
+
break;
|
|
135
|
+
case 'ArrowRight':
|
|
136
|
+
next = { x: clamp(current.x + stepX, width, 0), y: current.y };
|
|
137
|
+
break;
|
|
138
|
+
case 'ArrowUp':
|
|
139
|
+
next = { x: current.x, y: clamp(current.y - stepY, height, 0) };
|
|
140
|
+
break;
|
|
141
|
+
case 'ArrowDown':
|
|
142
|
+
next = { x: current.x, y: clamp(current.y + stepY, height, 0) };
|
|
143
|
+
break;
|
|
144
|
+
case 'Home':
|
|
145
|
+
next = { x: 0, y: 0 };
|
|
146
|
+
break;
|
|
147
|
+
case 'End':
|
|
148
|
+
next = { x: width, y: height };
|
|
149
|
+
break;
|
|
150
|
+
default:
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
if (next != null) {
|
|
154
|
+
e.preventDefault();
|
|
155
|
+
applyPosition(next);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
return (_jsx("div", { ref: divRef, className: className, style: style, onMouseDown: onMouseDown, role: "button", tabIndex: 0, "aria-label": ariaLabel, onKeyDown: onKeyDown, children: children }));
|
|
159
|
+
}
|
|
160
|
+
function clamp(value, max, min) {
|
|
161
|
+
return value > max ? max : value < min ? min : value;
|
|
162
|
+
}
|
|
163
|
+
export function toHex(value) {
|
|
164
|
+
if (!value.startsWith('#')) {
|
|
165
|
+
const ctx = document.createElement('canvas').getContext('2d');
|
|
166
|
+
if (ctx == null) {
|
|
167
|
+
throw new Error('2d context not supported or canvas already initialized');
|
|
168
|
+
}
|
|
169
|
+
ctx.fillStyle = value;
|
|
170
|
+
return ctx.fillStyle;
|
|
171
|
+
}
|
|
172
|
+
else if (value.length === 4 || value.length === 5) {
|
|
173
|
+
value = value
|
|
174
|
+
.split('')
|
|
175
|
+
.map((v, i) => (!Number.isNaN(i) ? v + v : '#'))
|
|
176
|
+
.join('');
|
|
177
|
+
return value;
|
|
178
|
+
}
|
|
179
|
+
else if (value.length === 7 || value.length === 9) {
|
|
180
|
+
return value;
|
|
181
|
+
}
|
|
182
|
+
return '#000000';
|
|
183
|
+
}
|
|
184
|
+
function hex2rgb(hex) {
|
|
185
|
+
const rbgArr = (hex
|
|
186
|
+
.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (_m, r, g, b) => `#${r}${r}${g}${g}${b}${b}`)
|
|
187
|
+
.substring(1)
|
|
188
|
+
.match(/.{2}/g) ?? []).map((x) => parseInt(x, 16));
|
|
189
|
+
return {
|
|
190
|
+
b: rbgArr[2],
|
|
191
|
+
g: rbgArr[1],
|
|
192
|
+
r: rbgArr[0],
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function rgb2hsv({ r, g, b }) {
|
|
196
|
+
r /= 255;
|
|
197
|
+
g /= 255;
|
|
198
|
+
b /= 255;
|
|
199
|
+
const max = Math.max(r, g, b);
|
|
200
|
+
const d = max - Math.min(r, g, b);
|
|
201
|
+
const h = !Number.isNaN(d)
|
|
202
|
+
? (max === r ? (g - b) / d + (g < b ? 6 : 0) : max === g ? 2 + (b - r) / d : 4 + (r - g) / d) *
|
|
203
|
+
60
|
|
204
|
+
: 0;
|
|
205
|
+
const s = !Number.isNaN(max) ? (d / max) * 100 : 0;
|
|
206
|
+
const v = max * 100;
|
|
207
|
+
return { h, s, v };
|
|
208
|
+
}
|
|
209
|
+
function hsv2rgb({ h, s, v }) {
|
|
210
|
+
s /= 100;
|
|
211
|
+
v /= 100;
|
|
212
|
+
const i = ~~(h / 60);
|
|
213
|
+
const f = h / 60 - i;
|
|
214
|
+
const p = v * (1 - s);
|
|
215
|
+
const q = v * (1 - s * f);
|
|
216
|
+
const t = v * (1 - s * (1 - f));
|
|
217
|
+
const index = i % 6;
|
|
218
|
+
const r = Math.round([v, q, p, p, t, v][index] * 255);
|
|
219
|
+
const g = Math.round([t, v, v, q, p, p][index] * 255);
|
|
220
|
+
const b = Math.round([p, p, t, v, v, q][index] * 255);
|
|
221
|
+
return { b, g, r };
|
|
222
|
+
}
|
|
223
|
+
function rgb2hex({ b, g, r }) {
|
|
224
|
+
return `#${[r, g, b].map((x) => x.toString(16).padStart(2, '0')).join('')}`;
|
|
225
|
+
}
|
|
226
|
+
function transformColor(format, color) {
|
|
227
|
+
let hex = toHex('#121212');
|
|
228
|
+
let rgb = hex2rgb(hex);
|
|
229
|
+
let hsv = rgb2hsv(rgb);
|
|
230
|
+
if (format === 'hex') {
|
|
231
|
+
const value = color;
|
|
232
|
+
hex = toHex(value);
|
|
233
|
+
rgb = hex2rgb(hex);
|
|
234
|
+
hsv = rgb2hsv(rgb);
|
|
235
|
+
}
|
|
236
|
+
else if (format === 'rgb') {
|
|
237
|
+
const value = color;
|
|
238
|
+
rgb = value;
|
|
239
|
+
hex = rgb2hex(rgb);
|
|
240
|
+
hsv = rgb2hsv(rgb);
|
|
241
|
+
}
|
|
242
|
+
else if (format === 'hsv') {
|
|
243
|
+
const value = color;
|
|
244
|
+
hsv = value;
|
|
245
|
+
rgb = hsv2rgb(hsv);
|
|
246
|
+
hex = rgb2hex(rgb);
|
|
247
|
+
}
|
|
248
|
+
return { hex, hsv, rgb };
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=color-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-picker.js","sourceRoot":"","sources":["../../../src/field/ui/color-picker.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AACZ;;;;;;GAMG;AAEH,OAAO,oBAAoB,CAAA;AAG3B,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE5D,OAAO,SAAS,MAAM,cAAc,CAAA;AAOpC,MAAM,WAAW,GAAG;IAClB,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;CACV,CAAA;AAED,MAAM,KAAK,GAAG,GAAG,CAAA;AACjB,MAAM,MAAM,GAAG,GAAG,CAAA;AAElB,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,KAAK,EACL,QAAQ,GACmB;IAC3B,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC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M,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QAC5B,MAAM,KAAK,GAAG,KAAqB,CAAA;QAEnC,GAAG,GAAG,KAAK,CAAA;QACX,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;QAClB,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;IACpB,CAAC;IAED,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAA;AAC1B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import type * as React from 'react';
|
|
9
|
+
import './content-editable.css';
|
|
10
|
+
export default function LexicalContentEditableInline({ className, }: {
|
|
11
|
+
className?: string;
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
//# sourceMappingURL=content-editable-inline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-editable-inline.d.ts","sourceRoot":"","sources":["../../../src/field/ui/content-editable-inline.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAKnC,OAAO,wBAAwB,CAAA;AAO/B,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACnD,SAAS,GACV,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAGpB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ContentEditable } from '@lexical/react/LexicalContentEditable';
|
|
3
|
+
import cx from 'classnames';
|
|
4
|
+
import './content-editable.css';
|
|
5
|
+
// TODO: implement an inline version of content editable for
|
|
6
|
+
// image captions that will not allow inserted paragraphs.
|
|
7
|
+
// NOTE: we disable all config checks and draggable blocks
|
|
8
|
+
// as in content-editable.tsx - because this version will
|
|
9
|
+
// appear inside caption areas for images.
|
|
10
|
+
export default function LexicalContentEditableInline({ className, }) {
|
|
11
|
+
const classes = cx(className);
|
|
12
|
+
return _jsx(ContentEditable, { className: classes });
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=content-editable-inline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-editable-inline.js","sourceRoot":"","sources":["../../../src/field/ui/content-editable-inline.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AACvE,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,wBAAwB,CAAA;AAE/B,4DAA4D;AAC5D,0DAA0D;AAC1D,0DAA0D;AAC1D,yDAAyD;AACzD,0CAA0C;AAC1C,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACnD,SAAS,GAGV;IACC,MAAM,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;IAC7B,OAAO,KAAC,eAAe,IAAC,SAAS,EAAE,OAAO,GAAI,CAAA;AAChD,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
.ContentEditable__root {
|
|
10
|
+
border: 0;
|
|
11
|
+
font-size: 1.4rem;
|
|
12
|
+
display: block;
|
|
13
|
+
position: relative;
|
|
14
|
+
tab-size: 1;
|
|
15
|
+
outline: 0;
|
|
16
|
+
padding: 8px 2px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ContentEditable__with_draggable_blocks {
|
|
20
|
+
padding: 8px 2px 40px 22px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@media (max-width: 1025px) {
|
|
24
|
+
.ContentEditable__root {
|
|
25
|
+
padding-left: 2px;
|
|
26
|
+
padding-right: 2px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import type * as React from 'react';
|
|
9
|
+
import './content-editable.css';
|
|
10
|
+
export declare function ContentEditable({ className }: {
|
|
11
|
+
className?: string;
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
//# sourceMappingURL=content-editable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-editable.d.ts","sourceRoot":"","sources":["../../../src/field/ui/content-editable.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAOnC,OAAO,wBAAwB,CAAA;AAE/B,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAQxF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { ContentEditable as LexicalContentEditable } from '@lexical/react/LexicalContentEditable';
|
|
4
|
+
import cx from 'classnames';
|
|
5
|
+
import { useEditorConfig } from '../config/editor-config-context';
|
|
6
|
+
import './content-editable.css';
|
|
7
|
+
export function ContentEditable({ className }) {
|
|
8
|
+
const { config } = useEditorConfig();
|
|
9
|
+
// const classes = cx('ContentEditable__root', className, {
|
|
10
|
+
// ContentEditable__with_draggable_blocks: config.options.draggableBlocks
|
|
11
|
+
// })
|
|
12
|
+
const classes = cx('ContentEditable__root', className);
|
|
13
|
+
return _jsx(LexicalContentEditable, { className: classes });
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=content-editable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-editable.js","sourceRoot":"","sources":["../../../src/field/ui/content-editable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAWZ,OAAO,EAAE,eAAe,IAAI,sBAAsB,EAAE,MAAM,uCAAuC,CAAA;AACjG,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAEjE,OAAO,wBAAwB,CAAA;AAE/B,MAAM,UAAU,eAAe,CAAC,EAAE,SAAS,EAA0B;IACnE,MAAM,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CAAA;IACpC,2DAA2D;IAC3D,2EAA2E;IAC3E,KAAK;IACL,MAAM,OAAO,GAAG,EAAE,CAAC,uBAAuB,EAAE,SAAS,CAAC,CAAA;IAEtD,OAAO,KAAC,sBAAsB,IAAC,SAAS,EAAE,OAAO,GAAI,CAAA;AACvD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.DialogActions {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
justify-content: right;
|
|
5
|
+
margin-top: 20px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.DialogButtonsList {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
justify-content: right;
|
|
12
|
+
margin-top: 20px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.DialogButtonsList button {
|
|
16
|
+
margin-bottom: 20px;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import type * as React from 'react';
|
|
9
|
+
import './dialog.css';
|
|
10
|
+
type Props = Readonly<{
|
|
11
|
+
'data-test-id'?: string;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}>;
|
|
14
|
+
export declare function DialogButtonsList({ children }: Props): React.JSX.Element;
|
|
15
|
+
export declare function DialogActions({ 'data-test-id': dataTestId, children }: Props): React.JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/field/ui/dialog.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,OAAO,cAAc,CAAA;AAErB,KAAK,KAAK,GAAG,QAAQ,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAC,CAAA;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAExE;AAED,wBAAgB,aAAa,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAMhG"}
|