@sparrowengg/twigs-editor-react 0.0.1
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 +38 -0
- package/dist/cjs/_virtual/_commonjsHelpers.js +8 -0
- package/dist/cjs/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/cjs/_virtual/assertString.js +6 -0
- package/dist/cjs/_virtual/assertString.js.map +1 -0
- package/dist/cjs/_virtual/isFQDN.js +6 -0
- package/dist/cjs/_virtual/isFQDN.js.map +1 -0
- package/dist/cjs/_virtual/isIP.js +6 -0
- package/dist/cjs/_virtual/isIP.js.map +1 -0
- package/dist/cjs/_virtual/isURL.js +12 -0
- package/dist/cjs/_virtual/isURL.js.map +1 -0
- package/dist/cjs/_virtual/isURL2.js +6 -0
- package/dist/cjs/_virtual/isURL2.js.map +1 -0
- package/dist/cjs/_virtual/merge.js +6 -0
- package/dist/cjs/_virtual/merge.js.map +1 -0
- package/dist/cjs/components/base-dropdown/index.js +175 -0
- package/dist/cjs/components/base-dropdown/index.js.map +1 -0
- package/dist/cjs/components/dialog-link-editor/index.js +291 -0
- package/dist/cjs/components/dialog-link-editor/index.js.map +1 -0
- package/dist/cjs/components/dialog-link-editor/link-editor-dialog.js +199 -0
- package/dist/cjs/components/dialog-link-editor/link-editor-dialog.js.map +1 -0
- package/dist/cjs/components/dialog-link-editor/link-tooltip.js +122 -0
- package/dist/cjs/components/dialog-link-editor/link-tooltip.js.map +1 -0
- package/dist/cjs/components/floating-toolbar/floating-toolbar.js +302 -0
- package/dist/cjs/components/floating-toolbar/floating-toolbar.js.map +1 -0
- package/dist/cjs/components/rich-editor/index.js +142 -0
- package/dist/cjs/components/rich-editor/index.js.map +1 -0
- package/dist/cjs/components/toolbar/toolbar.js +76 -0
- package/dist/cjs/components/toolbar/toolbar.js.map +1 -0
- package/dist/cjs/components/toolbar/tools/bold.js +52 -0
- package/dist/cjs/components/toolbar/tools/bold.js.map +1 -0
- package/dist/cjs/components/toolbar/tools/code-block.js +79 -0
- package/dist/cjs/components/toolbar/tools/code-block.js.map +1 -0
- package/dist/cjs/components/toolbar/tools/code.js +54 -0
- package/dist/cjs/components/toolbar/tools/code.js.map +1 -0
- package/dist/cjs/components/toolbar/tools/commons.js +16 -0
- package/dist/cjs/components/toolbar/tools/commons.js.map +1 -0
- package/dist/cjs/components/toolbar/tools/format.js +136 -0
- package/dist/cjs/components/toolbar/tools/format.js.map +1 -0
- package/dist/cjs/components/toolbar/tools/italic.js +57 -0
- package/dist/cjs/components/toolbar/tools/italic.js.map +1 -0
- package/dist/cjs/components/toolbar/tools/link.js +71 -0
- package/dist/cjs/components/toolbar/tools/link.js.map +1 -0
- package/dist/cjs/components/toolbar/tools/ordered-list.js +62 -0
- package/dist/cjs/components/toolbar/tools/ordered-list.js.map +1 -0
- package/dist/cjs/components/toolbar/tools/text-align.js +82 -0
- package/dist/cjs/components/toolbar/tools/text-align.js.map +1 -0
- package/dist/cjs/components/toolbar/tools/underline.js +57 -0
- package/dist/cjs/components/toolbar/tools/underline.js.map +1 -0
- package/dist/cjs/components/toolbar/tools/unordered-list.js +62 -0
- package/dist/cjs/components/toolbar/tools/unordered-list.js.map +1 -0
- package/dist/cjs/components/toolbar-context/context.js +148 -0
- package/dist/cjs/components/toolbar-context/context.js.map +1 -0
- package/dist/cjs/components/toolbar-context/store.js +75 -0
- package/dist/cjs/components/toolbar-context/store.js.map +1 -0
- package/dist/cjs/components/toolbar-context/utils.js +6 -0
- package/dist/cjs/components/toolbar-context/utils.js.map +1 -0
- package/dist/cjs/editor.js +154 -0
- package/dist/cjs/editor.js.map +1 -0
- package/dist/cjs/index.js +86 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/nodes/emoji.js +86 -0
- package/dist/cjs/nodes/emoji.js.map +1 -0
- package/dist/cjs/nodes/hashtag.js +109 -0
- package/dist/cjs/nodes/hashtag.js.map +1 -0
- package/dist/cjs/nodes/image.js +215 -0
- package/dist/cjs/nodes/image.js.map +1 -0
- package/dist/cjs/nodes/kudos.js +110 -0
- package/dist/cjs/nodes/kudos.js.map +1 -0
- package/dist/cjs/nodes/mention.js +109 -0
- package/dist/cjs/nodes/mention.js.map +1 -0
- package/dist/cjs/nodes/variables.js +109 -0
- package/dist/cjs/nodes/variables.js.map +1 -0
- package/dist/cjs/plugins/data-management-plugin/index.js +40 -0
- package/dist/cjs/plugins/data-management-plugin/index.js.map +1 -0
- package/dist/cjs/plugins/emoji/emoji-list.js +16609 -0
- package/dist/cjs/plugins/emoji/emoji-list.js.map +1 -0
- package/dist/cjs/plugins/emoji/index.js +126 -0
- package/dist/cjs/plugins/emoji/index.js.map +1 -0
- package/dist/cjs/plugins/hashtag/index.js +100 -0
- package/dist/cjs/plugins/hashtag/index.js.map +1 -0
- package/dist/cjs/plugins/images/index.js +164 -0
- package/dist/cjs/plugins/images/index.js.map +1 -0
- package/dist/cjs/plugins/images/utils.js +10 -0
- package/dist/cjs/plugins/images/utils.js.map +1 -0
- package/dist/cjs/plugins/link/auto-link.js +21 -0
- package/dist/cjs/plugins/link/auto-link.js.map +1 -0
- package/dist/cjs/plugins/link/convert-selection-on-paste.js +34 -0
- package/dist/cjs/plugins/link/convert-selection-on-paste.js.map +1 -0
- package/dist/cjs/plugins/link/link.js +68 -0
- package/dist/cjs/plugins/link/link.js.map +1 -0
- package/dist/cjs/plugins/mentions/index.js +108 -0
- package/dist/cjs/plugins/mentions/index.js.map +1 -0
- package/dist/cjs/plugins/tab-focus/index.js +54 -0
- package/dist/cjs/plugins/tab-focus/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/_virtual/_commonjsHelpers.js +8 -0
- package/dist/cjs/react-components/dist/es/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/cjs/react-components/dist/es/_virtual/index.js +6 -0
- package/dist/cjs/react-components/dist/es/_virtual/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/_virtual/index2.js +6 -0
- package/dist/cjs/react-components/dist/es/_virtual/index2.js.map +1 -0
- package/dist/cjs/react-components/dist/es/_virtual/react-is.development.js +6 -0
- package/dist/cjs/react-components/dist/es/_virtual/react-is.development.js.map +1 -0
- package/dist/cjs/react-components/dist/es/_virtual/react-is.production.min.js +6 -0
- package/dist/cjs/react-components/dist/es/_virtual/react-is.production.min.js.map +1 -0
- package/dist/cjs/react-components/dist/es/box/box.js +47 -0
- package/dist/cjs/react-components/dist/es/box/box.js.map +1 -0
- package/dist/cjs/react-components/dist/es/button/button.js +774 -0
- package/dist/cjs/react-components/dist/es/button/button.js.map +1 -0
- package/dist/cjs/react-components/dist/es/button/icon-button.js +77 -0
- package/dist/cjs/react-components/dist/es/button/icon-button.js.map +1 -0
- package/dist/cjs/react-components/dist/es/button/side-element.js +199 -0
- package/dist/cjs/react-components/dist/es/button/side-element.js.map +1 -0
- package/dist/cjs/react-components/dist/es/button/utils.js +105 -0
- package/dist/cjs/react-components/dist/es/button/utils.js.map +1 -0
- package/dist/cjs/react-components/dist/es/dialog/dialog.js +197 -0
- package/dist/cjs/react-components/dist/es/dialog/dialog.js.map +1 -0
- package/dist/cjs/react-components/dist/es/dropdown/dropdown.js +195 -0
- package/dist/cjs/react-components/dist/es/dropdown/dropdown.js.map +1 -0
- package/dist/cjs/react-components/dist/es/flex/flex.js +98 -0
- package/dist/cjs/react-components/dist/es/flex/flex.js.map +1 -0
- package/dist/cjs/react-components/dist/es/form-helper-text/form-helper-text.js +76 -0
- package/dist/cjs/react-components/dist/es/form-helper-text/form-helper-text.js.map +1 -0
- package/dist/cjs/react-components/dist/es/form-label/form-label.js +176 -0
- package/dist/cjs/react-components/dist/es/form-label/form-label.js.map +1 -0
- package/dist/cjs/react-components/dist/es/input/form-input.js +159 -0
- package/dist/cjs/react-components/dist/es/input/form-input.js.map +1 -0
- package/dist/cjs/react-components/dist/es/input/input.js +377 -0
- package/dist/cjs/react-components/dist/es/input/input.js.map +1 -0
- package/dist/cjs/react-components/dist/es/link/link.js +58 -0
- package/dist/cjs/react-components/dist/es/link/link.js.map +1 -0
- package/dist/cjs/react-components/dist/es/loader/circle.js +204 -0
- package/dist/cjs/react-components/dist/es/loader/circle.js.map +1 -0
- package/dist/cjs/react-components/dist/es/loader/line.js +130 -0
- package/dist/cjs/react-components/dist/es/loader/line.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/extends.js +21 -0
- package/dist/cjs/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +14 -0
- package/dist/cjs/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +19 -0
- package/dist/cjs/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +14 -0
- package/dist/cjs/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@floating-ui/core/dist/floating-ui.core.js +788 -0
- package/dist/cjs/react-components/dist/es/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +612 -0
- package/dist/cjs/react-components/dist/es/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +299 -0
- package/dist/cjs/react-components/dist/es/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +146 -0
- package/dist/cjs/react-components/dist/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.js +148 -0
- package/dist/cjs/react-components/dist/es/node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/primitive/dist/index.js +14 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-arrow/dist/index.js +48 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-collection/dist/index.js +71 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-compose-refs/dist/index.js +41 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-context/dist/index.js +102 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-dialog/dist/index.js +354 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-direction/dist/index.js +33 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +234 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +303 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-focus-guards/dist/index.js +48 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-focus-scope/dist/index.js +229 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-id/dist/index.js +37 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-label/dist/index.js +47 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-label/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-menu/dist/index.js +847 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-popper/dist/index.js +309 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-portal/dist/index.js +39 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-presence/dist/index.js +142 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-primitive/dist/index.js +65 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-roving-focus/dist/index.js +246 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-slot/dist/index.js +104 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-tooltip/dist/index.js +509 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-tooltip/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +34 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +68 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +40 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +29 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-use-size/dist/index.js +62 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-visually-hidden/dist/index.js +58 -0
- package/dist/cjs/react-components/dist/es/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/@stitches/react/dist/index.js +9 -0
- package/dist/cjs/react-components/dist/es/node_modules/@stitches/react/dist/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/aria-hidden/dist/es2015/index.js +134 -0
- package/dist/cjs/react-components/dist/es/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/dom-helpers/esm/addClass.js +19 -0
- package/dist/cjs/react-components/dist/es/node_modules/dom-helpers/esm/addClass.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/dom-helpers/esm/hasClass.js +17 -0
- package/dist/cjs/react-components/dist/es/node_modules/dom-helpers/esm/hasClass.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/dom-helpers/esm/removeClass.js +27 -0
- package/dist/cjs/react-components/dist/es/node_modules/dom-helpers/esm/removeClass.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/get-nonce/dist/es2015/index.js +11 -0
- package/dist/cjs/react-components/dist/es/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/object-assign/index.js +102 -0
- package/dist/cjs/react-components/dist/es/node_modules/object-assign/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/checkPropTypes.js +118 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/checkPropTypes.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/factoryWithThrowingShims.js +77 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/factoryWithTypeCheckers.js +628 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/index.js +35 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/lib/ReactPropTypesSecret.js +24 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/lib/has.js +14 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/lib/has.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +193 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +29 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/node_modules/react-is/index.js +22 -0
- package/dist/cjs/react-components/dist/es/node_modules/prop-types/node_modules/react-is/index.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/Combination.js +34 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +184 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/UI.js +60 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +24 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +110 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/medium.js +8 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/sidecar.js +12 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/component.js +80 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +16 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +35 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-style-singleton/dist/es2015/component.js +22 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-style-singleton/dist/es2015/hook.js +47 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-style-singleton/dist/es2015/singleton.js +54 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-transition-group/esm/CSSTransition.js +419 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-transition-group/esm/CSSTransition.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-transition-group/esm/Transition.js +637 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-transition-group/esm/Transition.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-transition-group/esm/TransitionGroupContext.js +10 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-transition-group/esm/TransitionGroupContext.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-transition-group/esm/config.js +10 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-transition-group/esm/config.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-transition-group/esm/utils/PropTypes.js +25 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-transition-group/esm/utils/PropTypes.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-transition-group/esm/utils/reflow.js +8 -0
- package/dist/cjs/react-components/dist/es/node_modules/react-transition-group/esm/utils/reflow.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/tslib/tslib.es6.js +55 -0
- package/dist/cjs/react-components/dist/es/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/use-callback-ref/dist/es2015/assignRef.js +27 -0
- package/dist/cjs/react-components/dist/es/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +25 -0
- package/dist/cjs/react-components/dist/es/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/use-callback-ref/dist/es2015/useRef.js +45 -0
- package/dist/cjs/react-components/dist/es/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/use-sidecar/dist/es2015/exports.js +43 -0
- package/dist/cjs/react-components/dist/es/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/cjs/react-components/dist/es/node_modules/use-sidecar/dist/es2015/medium.js +80 -0
- package/dist/cjs/react-components/dist/es/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/dist/cjs/react-components/dist/es/packages/react-components/node_modules/clsx/dist/clsx.js +9 -0
- package/dist/cjs/react-components/dist/es/packages/react-components/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/cjs/react-components/dist/es/packages/react-icons/dist/es/icons/info.js +97 -0
- package/dist/cjs/react-components/dist/es/packages/react-icons/dist/es/icons/info.js.map +1 -0
- package/dist/cjs/react-components/dist/es/stitches.config.js +392 -0
- package/dist/cjs/react-components/dist/es/stitches.config.js.map +1 -0
- package/dist/cjs/react-components/dist/es/text/text.js +117 -0
- package/dist/cjs/react-components/dist/es/text/text.js.map +1 -0
- package/dist/cjs/react-components/dist/es/tooltip/tooltip.js +156 -0
- package/dist/cjs/react-components/dist/es/tooltip/tooltip.js.map +1 -0
- package/dist/cjs/react-components/dist/es/utils/prefix-class-name.js +10 -0
- package/dist/cjs/react-components/dist/es/utils/prefix-class-name.js.map +1 -0
- package/dist/cjs/react-editor/node_modules/clsx/dist/clsx.js +9 -0
- package/dist/cjs/react-editor/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/cjs/react-editor/node_modules/validator/es/lib/isFQDN.js +75 -0
- package/dist/cjs/react-editor/node_modules/validator/es/lib/isFQDN.js.map +1 -0
- package/dist/cjs/react-editor/node_modules/validator/es/lib/isIP.js +58 -0
- package/dist/cjs/react-editor/node_modules/validator/es/lib/isIP.js.map +1 -0
- package/dist/cjs/react-editor/node_modules/validator/es/lib/isURL.js +163 -0
- package/dist/cjs/react-editor/node_modules/validator/es/lib/isURL.js.map +1 -0
- package/dist/cjs/react-editor/node_modules/validator/es/lib/util/assertString.js +16 -0
- package/dist/cjs/react-editor/node_modules/validator/es/lib/util/assertString.js.map +1 -0
- package/dist/cjs/react-editor/node_modules/validator/es/lib/util/merge.js +17 -0
- package/dist/cjs/react-editor/node_modules/validator/es/lib/util/merge.js.map +1 -0
- package/dist/cjs/react-editor/node_modules/validator/lib/isFQDN.js +93 -0
- package/dist/cjs/react-editor/node_modules/validator/lib/isFQDN.js.map +1 -0
- package/dist/cjs/react-editor/node_modules/validator/lib/isIP.js +75 -0
- package/dist/cjs/react-editor/node_modules/validator/lib/isIP.js.map +1 -0
- package/dist/cjs/react-editor/node_modules/validator/lib/isURL.js +182 -0
- package/dist/cjs/react-editor/node_modules/validator/lib/isURL.js.map +1 -0
- package/dist/cjs/react-editor/node_modules/validator/lib/util/assertString.js +32 -0
- package/dist/cjs/react-editor/node_modules/validator/lib/util/assertString.js.map +1 -0
- package/dist/cjs/react-editor/node_modules/validator/lib/util/merge.js +33 -0
- package/dist/cjs/react-editor/node_modules/validator/lib/util/merge.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/bold.js +86 -0
- package/dist/cjs/react-icons/dist/es/icons/bold.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/close.js +86 -0
- package/dist/cjs/react-icons/dist/es/icons/close.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/code-block.js +78 -0
- package/dist/cjs/react-icons/dist/es/icons/code-block.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/code.js +96 -0
- package/dist/cjs/react-icons/dist/es/icons/code.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/delete.js +116 -0
- package/dist/cjs/react-icons/dist/es/icons/delete.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/italics.js +96 -0
- package/dist/cjs/react-icons/dist/es/icons/italics.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/link.js +86 -0
- package/dist/cjs/react-icons/dist/es/icons/link.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/ordered-list.js +86 -0
- package/dist/cjs/react-icons/dist/es/icons/ordered-list.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/pencil.js +86 -0
- package/dist/cjs/react-icons/dist/es/icons/pencil.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/text-align-center.js +74 -0
- package/dist/cjs/react-icons/dist/es/icons/text-align-center.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/text-align-justify.js +74 -0
- package/dist/cjs/react-icons/dist/es/icons/text-align-justify.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/text-align-left.js +74 -0
- package/dist/cjs/react-icons/dist/es/icons/text-align-left.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/text-align-right.js +74 -0
- package/dist/cjs/react-icons/dist/es/icons/text-align-right.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/text-format.js +78 -0
- package/dist/cjs/react-icons/dist/es/icons/text-format.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/underline.js +77 -0
- package/dist/cjs/react-icons/dist/es/icons/underline.js.map +1 -0
- package/dist/cjs/react-icons/dist/es/icons/unordered-list.js +126 -0
- package/dist/cjs/react-icons/dist/es/icons/unordered-list.js.map +1 -0
- package/dist/cjs/utils/commands.js +8 -0
- package/dist/cjs/utils/commands.js.map +1 -0
- package/dist/cjs/utils/get-dom-range-rect.js +19 -0
- package/dist/cjs/utils/get-dom-range-rect.js.map +1 -0
- package/dist/cjs/utils/get-selected-node.js +21 -0
- package/dist/cjs/utils/get-selected-node.js.map +1 -0
- package/dist/cjs/utils/prefix-class-name.js +10 -0
- package/dist/cjs/utils/prefix-class-name.js.map +1 -0
- package/dist/cjs/utils/set-floating-elem-position-for-link-editor.js +30 -0
- package/dist/cjs/utils/set-floating-elem-position-for-link-editor.js.map +1 -0
- package/dist/cjs/utils/set-floating-elem-position.js +33 -0
- package/dist/cjs/utils/set-floating-elem-position.js.map +1 -0
- package/dist/cjs/utils/use-node-focus.js +35 -0
- package/dist/cjs/utils/use-node-focus.js.map +1 -0
- package/dist/es/_virtual/_commonjsHelpers.js +6 -0
- package/dist/es/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/es/_virtual/assertString.js +4 -0
- package/dist/es/_virtual/assertString.js.map +1 -0
- package/dist/es/_virtual/isFQDN.js +4 -0
- package/dist/es/_virtual/isFQDN.js.map +1 -0
- package/dist/es/_virtual/isIP.js +4 -0
- package/dist/es/_virtual/isIP.js.map +1 -0
- package/dist/es/_virtual/isURL.js +8 -0
- package/dist/es/_virtual/isURL.js.map +1 -0
- package/dist/es/_virtual/isURL2.js +4 -0
- package/dist/es/_virtual/isURL2.js.map +1 -0
- package/dist/es/_virtual/merge.js +4 -0
- package/dist/es/_virtual/merge.js.map +1 -0
- package/dist/es/components/base-dropdown/index.js +173 -0
- package/dist/es/components/base-dropdown/index.js.map +1 -0
- package/dist/es/components/dialog-link-editor/index.js +289 -0
- package/dist/es/components/dialog-link-editor/index.js.map +1 -0
- package/dist/es/components/dialog-link-editor/link-editor-dialog.js +197 -0
- package/dist/es/components/dialog-link-editor/link-editor-dialog.js.map +1 -0
- package/dist/es/components/dialog-link-editor/link-tooltip.js +120 -0
- package/dist/es/components/dialog-link-editor/link-tooltip.js.map +1 -0
- package/dist/es/components/floating-toolbar/floating-toolbar.js +300 -0
- package/dist/es/components/floating-toolbar/floating-toolbar.js.map +1 -0
- package/dist/es/components/rich-editor/index.js +140 -0
- package/dist/es/components/rich-editor/index.js.map +1 -0
- package/dist/es/components/toolbar/toolbar.js +74 -0
- package/dist/es/components/toolbar/toolbar.js.map +1 -0
- package/dist/es/components/toolbar/tools/bold.js +50 -0
- package/dist/es/components/toolbar/tools/bold.js.map +1 -0
- package/dist/es/components/toolbar/tools/code-block.js +77 -0
- package/dist/es/components/toolbar/tools/code-block.js.map +1 -0
- package/dist/es/components/toolbar/tools/code.js +52 -0
- package/dist/es/components/toolbar/tools/code.js.map +1 -0
- package/dist/es/components/toolbar/tools/commons.js +14 -0
- package/dist/es/components/toolbar/tools/commons.js.map +1 -0
- package/dist/es/components/toolbar/tools/format.js +134 -0
- package/dist/es/components/toolbar/tools/format.js.map +1 -0
- package/dist/es/components/toolbar/tools/italic.js +55 -0
- package/dist/es/components/toolbar/tools/italic.js.map +1 -0
- package/dist/es/components/toolbar/tools/link.js +69 -0
- package/dist/es/components/toolbar/tools/link.js.map +1 -0
- package/dist/es/components/toolbar/tools/ordered-list.js +60 -0
- package/dist/es/components/toolbar/tools/ordered-list.js.map +1 -0
- package/dist/es/components/toolbar/tools/text-align.js +80 -0
- package/dist/es/components/toolbar/tools/text-align.js.map +1 -0
- package/dist/es/components/toolbar/tools/underline.js +55 -0
- package/dist/es/components/toolbar/tools/underline.js.map +1 -0
- package/dist/es/components/toolbar/tools/unordered-list.js +60 -0
- package/dist/es/components/toolbar/tools/unordered-list.js.map +1 -0
- package/dist/es/components/toolbar-context/context.js +145 -0
- package/dist/es/components/toolbar-context/context.js.map +1 -0
- package/dist/es/components/toolbar-context/store.js +72 -0
- package/dist/es/components/toolbar-context/store.js.map +1 -0
- package/dist/es/components/toolbar-context/utils.js +4 -0
- package/dist/es/components/toolbar-context/utils.js.map +1 -0
- package/dist/es/editor.js +152 -0
- package/dist/es/editor.js.map +1 -0
- package/dist/es/index.js +34 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/nodes/emoji.js +82 -0
- package/dist/es/nodes/emoji.js.map +1 -0
- package/dist/es/nodes/hashtag.js +105 -0
- package/dist/es/nodes/hashtag.js.map +1 -0
- package/dist/es/nodes/image.js +211 -0
- package/dist/es/nodes/image.js.map +1 -0
- package/dist/es/nodes/kudos.js +106 -0
- package/dist/es/nodes/kudos.js.map +1 -0
- package/dist/es/nodes/mention.js +105 -0
- package/dist/es/nodes/mention.js.map +1 -0
- package/dist/es/nodes/variables.js +105 -0
- package/dist/es/nodes/variables.js.map +1 -0
- package/dist/es/plugins/data-management-plugin/index.js +38 -0
- package/dist/es/plugins/data-management-plugin/index.js.map +1 -0
- package/dist/es/plugins/emoji/emoji-list.js +16605 -0
- package/dist/es/plugins/emoji/emoji-list.js.map +1 -0
- package/dist/es/plugins/emoji/index.js +124 -0
- package/dist/es/plugins/emoji/index.js.map +1 -0
- package/dist/es/plugins/hashtag/index.js +98 -0
- package/dist/es/plugins/hashtag/index.js.map +1 -0
- package/dist/es/plugins/images/index.js +162 -0
- package/dist/es/plugins/images/index.js.map +1 -0
- package/dist/es/plugins/images/utils.js +7 -0
- package/dist/es/plugins/images/utils.js.map +1 -0
- package/dist/es/plugins/link/auto-link.js +19 -0
- package/dist/es/plugins/link/auto-link.js.map +1 -0
- package/dist/es/plugins/link/convert-selection-on-paste.js +32 -0
- package/dist/es/plugins/link/convert-selection-on-paste.js.map +1 -0
- package/dist/es/plugins/link/link.js +66 -0
- package/dist/es/plugins/link/link.js.map +1 -0
- package/dist/es/plugins/mentions/index.js +106 -0
- package/dist/es/plugins/mentions/index.js.map +1 -0
- package/dist/es/plugins/tab-focus/index.js +52 -0
- package/dist/es/plugins/tab-focus/index.js.map +1 -0
- package/dist/es/react-components/dist/es/_virtual/_commonjsHelpers.js +6 -0
- package/dist/es/react-components/dist/es/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/es/react-components/dist/es/_virtual/index.js +4 -0
- package/dist/es/react-components/dist/es/_virtual/index.js.map +1 -0
- package/dist/es/react-components/dist/es/_virtual/index2.js +4 -0
- package/dist/es/react-components/dist/es/_virtual/index2.js.map +1 -0
- package/dist/es/react-components/dist/es/_virtual/react-is.development.js +4 -0
- package/dist/es/react-components/dist/es/_virtual/react-is.development.js.map +1 -0
- package/dist/es/react-components/dist/es/_virtual/react-is.production.min.js +4 -0
- package/dist/es/react-components/dist/es/_virtual/react-is.production.min.js.map +1 -0
- package/dist/es/react-components/dist/es/box/box.js +45 -0
- package/dist/es/react-components/dist/es/box/box.js.map +1 -0
- package/dist/es/react-components/dist/es/button/button.js +772 -0
- package/dist/es/react-components/dist/es/button/button.js.map +1 -0
- package/dist/es/react-components/dist/es/button/icon-button.js +75 -0
- package/dist/es/react-components/dist/es/button/icon-button.js.map +1 -0
- package/dist/es/react-components/dist/es/button/side-element.js +197 -0
- package/dist/es/react-components/dist/es/button/side-element.js.map +1 -0
- package/dist/es/react-components/dist/es/button/utils.js +100 -0
- package/dist/es/react-components/dist/es/button/utils.js.map +1 -0
- package/dist/es/react-components/dist/es/dialog/dialog.js +193 -0
- package/dist/es/react-components/dist/es/dialog/dialog.js.map +1 -0
- package/dist/es/react-components/dist/es/dropdown/dropdown.js +190 -0
- package/dist/es/react-components/dist/es/dropdown/dropdown.js.map +1 -0
- package/dist/es/react-components/dist/es/flex/flex.js +96 -0
- package/dist/es/react-components/dist/es/flex/flex.js.map +1 -0
- package/dist/es/react-components/dist/es/form-helper-text/form-helper-text.js +74 -0
- package/dist/es/react-components/dist/es/form-helper-text/form-helper-text.js.map +1 -0
- package/dist/es/react-components/dist/es/form-label/form-label.js +174 -0
- package/dist/es/react-components/dist/es/form-label/form-label.js.map +1 -0
- package/dist/es/react-components/dist/es/input/form-input.js +157 -0
- package/dist/es/react-components/dist/es/input/form-input.js.map +1 -0
- package/dist/es/react-components/dist/es/input/input.js +374 -0
- package/dist/es/react-components/dist/es/input/input.js.map +1 -0
- package/dist/es/react-components/dist/es/link/link.js +56 -0
- package/dist/es/react-components/dist/es/link/link.js.map +1 -0
- package/dist/es/react-components/dist/es/loader/circle.js +202 -0
- package/dist/es/react-components/dist/es/loader/circle.js.map +1 -0
- package/dist/es/react-components/dist/es/loader/line.js +128 -0
- package/dist/es/react-components/dist/es/loader/line.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/extends.js +17 -0
- package/dist/es/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +10 -0
- package/dist/es/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +15 -0
- package/dist/es/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +10 -0
- package/dist/es/react-components/dist/es/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@floating-ui/core/dist/floating-ui.core.js +777 -0
- package/dist/es/react-components/dist/es/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +600 -0
- package/dist/es/react-components/dist/es/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +269 -0
- package/dist/es/react-components/dist/es/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +123 -0
- package/dist/es/react-components/dist/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.js +129 -0
- package/dist/es/react-components/dist/es/node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/primitive/dist/index.js +12 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-arrow/dist/index.js +26 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-collection/dist/index.js +69 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-compose-refs/dist/index.js +19 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-context/dist/index.js +80 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-dialog/dist/index.js +318 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-direction/dist/index.js +12 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +212 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +254 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-focus-guards/dist/index.js +27 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-focus-scope/dist/index.js +208 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-id/dist/index.js +16 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-label/dist/index.js +25 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-label/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-menu/dist/index.js +796 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-popper/dist/index.js +280 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-portal/dist/index.js +18 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-presence/dist/index.js +120 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-primitive/dist/index.js +42 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-roving-focus/dist/index.js +221 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-slot/dist/index.js +82 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-tooltip/dist/index.js +476 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-tooltip/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +47 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +19 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +8 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-use-size/dist/index.js +41 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-visually-hidden/dist/index.js +36 -0
- package/dist/es/react-components/dist/es/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/@stitches/react/dist/index.js +6 -0
- package/dist/es/react-components/dist/es/node_modules/@stitches/react/dist/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/aria-hidden/dist/es2015/index.js +132 -0
- package/dist/es/react-components/dist/es/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/dom-helpers/esm/addClass.js +15 -0
- package/dist/es/react-components/dist/es/node_modules/dom-helpers/esm/addClass.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/dom-helpers/esm/hasClass.js +13 -0
- package/dist/es/react-components/dist/es/node_modules/dom-helpers/esm/hasClass.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/dom-helpers/esm/removeClass.js +23 -0
- package/dist/es/react-components/dist/es/node_modules/dom-helpers/esm/removeClass.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/get-nonce/dist/es2015/index.js +9 -0
- package/dist/es/react-components/dist/es/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/object-assign/index.js +100 -0
- package/dist/es/react-components/dist/es/node_modules/object-assign/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/checkPropTypes.js +116 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/checkPropTypes.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/factoryWithThrowingShims.js +75 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/factoryWithTypeCheckers.js +626 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/index.js +31 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/lib/ReactPropTypesSecret.js +22 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/lib/has.js +12 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/lib/has.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +191 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +27 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/node_modules/react-is/index.js +20 -0
- package/dist/es/react-components/dist/es/node_modules/prop-types/node_modules/react-is/index.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +161 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +22 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +107 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/component.js +57 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +11 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +32 -0
- package/dist/es/react-components/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-style-singleton/dist/es2015/component.js +20 -0
- package/dist/es/react-components/dist/es/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-style-singleton/dist/es2015/hook.js +26 -0
- package/dist/es/react-components/dist/es/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-style-singleton/dist/es2015/singleton.js +52 -0
- package/dist/es/react-components/dist/es/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-transition-group/esm/CSSTransition.js +415 -0
- package/dist/es/react-components/dist/es/node_modules/react-transition-group/esm/CSSTransition.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-transition-group/esm/Transition.js +628 -0
- package/dist/es/react-components/dist/es/node_modules/react-transition-group/esm/Transition.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-transition-group/esm/TransitionGroupContext.js +6 -0
- package/dist/es/react-components/dist/es/node_modules/react-transition-group/esm/TransitionGroupContext.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-transition-group/esm/config.js +6 -0
- package/dist/es/react-components/dist/es/node_modules/react-transition-group/esm/config.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-transition-group/esm/utils/PropTypes.js +22 -0
- package/dist/es/react-components/dist/es/node_modules/react-transition-group/esm/utils/PropTypes.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/react-transition-group/esm/utils/reflow.js +6 -0
- package/dist/es/react-components/dist/es/node_modules/react-transition-group/esm/utils/reflow.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/tslib/tslib.es6.js +52 -0
- package/dist/es/react-components/dist/es/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/use-callback-ref/dist/es2015/assignRef.js +25 -0
- package/dist/es/react-components/dist/es/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +23 -0
- package/dist/es/react-components/dist/es/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/use-callback-ref/dist/es2015/useRef.js +43 -0
- package/dist/es/react-components/dist/es/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/use-sidecar/dist/es2015/exports.js +22 -0
- package/dist/es/react-components/dist/es/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/es/react-components/dist/es/node_modules/use-sidecar/dist/es2015/medium.js +78 -0
- package/dist/es/react-components/dist/es/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/dist/es/react-components/dist/es/packages/react-components/node_modules/clsx/dist/clsx.js +4 -0
- package/dist/es/react-components/dist/es/packages/react-components/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/es/react-components/dist/es/packages/react-icons/dist/es/icons/info.js +95 -0
- package/dist/es/react-components/dist/es/packages/react-icons/dist/es/icons/info.js.map +1 -0
- package/dist/es/react-components/dist/es/stitches.config.js +379 -0
- package/dist/es/react-components/dist/es/stitches.config.js.map +1 -0
- package/dist/es/react-components/dist/es/text/text.js +115 -0
- package/dist/es/react-components/dist/es/text/text.js.map +1 -0
- package/dist/es/react-components/dist/es/tooltip/tooltip.js +153 -0
- package/dist/es/react-components/dist/es/tooltip/tooltip.js.map +1 -0
- package/dist/es/react-components/dist/es/utils/prefix-class-name.js +8 -0
- package/dist/es/react-components/dist/es/utils/prefix-class-name.js.map +1 -0
- package/dist/es/react-editor/node_modules/clsx/dist/clsx.js +4 -0
- package/dist/es/react-editor/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/es/react-editor/node_modules/validator/es/lib/isFQDN.js +71 -0
- package/dist/es/react-editor/node_modules/validator/es/lib/isFQDN.js.map +1 -0
- package/dist/es/react-editor/node_modules/validator/es/lib/isIP.js +54 -0
- package/dist/es/react-editor/node_modules/validator/es/lib/isIP.js.map +1 -0
- package/dist/es/react-editor/node_modules/validator/es/lib/isURL.js +159 -0
- package/dist/es/react-editor/node_modules/validator/es/lib/isURL.js.map +1 -0
- package/dist/es/react-editor/node_modules/validator/es/lib/util/assertString.js +12 -0
- package/dist/es/react-editor/node_modules/validator/es/lib/util/assertString.js.map +1 -0
- package/dist/es/react-editor/node_modules/validator/es/lib/util/merge.js +13 -0
- package/dist/es/react-editor/node_modules/validator/es/lib/util/merge.js.map +1 -0
- package/dist/es/react-editor/node_modules/validator/lib/isFQDN.js +91 -0
- package/dist/es/react-editor/node_modules/validator/lib/isFQDN.js.map +1 -0
- package/dist/es/react-editor/node_modules/validator/lib/isIP.js +73 -0
- package/dist/es/react-editor/node_modules/validator/lib/isIP.js.map +1 -0
- package/dist/es/react-editor/node_modules/validator/lib/isURL.js +180 -0
- package/dist/es/react-editor/node_modules/validator/lib/isURL.js.map +1 -0
- package/dist/es/react-editor/node_modules/validator/lib/util/assertString.js +30 -0
- package/dist/es/react-editor/node_modules/validator/lib/util/assertString.js.map +1 -0
- package/dist/es/react-editor/node_modules/validator/lib/util/merge.js +31 -0
- package/dist/es/react-editor/node_modules/validator/lib/util/merge.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/bold.js +84 -0
- package/dist/es/react-icons/dist/es/icons/bold.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/close.js +84 -0
- package/dist/es/react-icons/dist/es/icons/close.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/code-block.js +76 -0
- package/dist/es/react-icons/dist/es/icons/code-block.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/code.js +94 -0
- package/dist/es/react-icons/dist/es/icons/code.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/delete.js +114 -0
- package/dist/es/react-icons/dist/es/icons/delete.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/italics.js +94 -0
- package/dist/es/react-icons/dist/es/icons/italics.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/link.js +84 -0
- package/dist/es/react-icons/dist/es/icons/link.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/ordered-list.js +84 -0
- package/dist/es/react-icons/dist/es/icons/ordered-list.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/pencil.js +84 -0
- package/dist/es/react-icons/dist/es/icons/pencil.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/text-align-center.js +72 -0
- package/dist/es/react-icons/dist/es/icons/text-align-center.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/text-align-justify.js +72 -0
- package/dist/es/react-icons/dist/es/icons/text-align-justify.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/text-align-left.js +72 -0
- package/dist/es/react-icons/dist/es/icons/text-align-left.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/text-align-right.js +72 -0
- package/dist/es/react-icons/dist/es/icons/text-align-right.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/text-format.js +76 -0
- package/dist/es/react-icons/dist/es/icons/text-format.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/underline.js +75 -0
- package/dist/es/react-icons/dist/es/icons/underline.js.map +1 -0
- package/dist/es/react-icons/dist/es/icons/unordered-list.js +124 -0
- package/dist/es/react-icons/dist/es/icons/unordered-list.js.map +1 -0
- package/dist/es/utils/commands.js +6 -0
- package/dist/es/utils/commands.js.map +1 -0
- package/dist/es/utils/get-dom-range-rect.js +17 -0
- package/dist/es/utils/get-dom-range-rect.js.map +1 -0
- package/dist/es/utils/get-selected-node.js +19 -0
- package/dist/es/utils/get-selected-node.js.map +1 -0
- package/dist/es/utils/prefix-class-name.js +8 -0
- package/dist/es/utils/prefix-class-name.js.map +1 -0
- package/dist/es/utils/set-floating-elem-position-for-link-editor.js +28 -0
- package/dist/es/utils/set-floating-elem-position-for-link-editor.js.map +1 -0
- package/dist/es/utils/set-floating-elem-position.js +31 -0
- package/dist/es/utils/set-floating-elem-position.js.map +1 -0
- package/dist/es/utils/use-node-focus.js +33 -0
- package/dist/es/utils/use-node-focus.js.map +1 -0
- package/dist/index.d.ts +445 -0
- package/package.json +151 -0
@@ -0,0 +1,197 @@
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
2
|
+
import { useState } from 'react';
|
3
|
+
import { Dialog, DialogContent, DialogTitle } from '../../react-components/dist/es/dialog/dialog.js';
|
4
|
+
import { Text } from '../../react-components/dist/es/text/text.js';
|
5
|
+
import { IconButton } from '../../react-components/dist/es/button/icon-button.js';
|
6
|
+
import { CloseIcon } from '../../react-icons/dist/es/icons/close.js';
|
7
|
+
import { Box } from '../../react-components/dist/es/box/box.js';
|
8
|
+
import { FormInput } from '../../react-components/dist/es/input/form-input.js';
|
9
|
+
import { Flex } from '../../react-components/dist/es/flex/flex.js';
|
10
|
+
import { DeleteIcon } from '../../react-icons/dist/es/icons/delete.js';
|
11
|
+
import { Button } from '../../react-components/dist/es/button/button.js';
|
12
|
+
|
13
|
+
const LinkEditorDialog = ({
|
14
|
+
open,
|
15
|
+
title,
|
16
|
+
errors,
|
17
|
+
linkUrl,
|
18
|
+
linkText,
|
19
|
+
urlLabel,
|
20
|
+
isUpdate,
|
21
|
+
textLabel,
|
22
|
+
saveLabel = "Save",
|
23
|
+
cancelLabel = "Cancel",
|
24
|
+
updateLabel = "Update",
|
25
|
+
errorLabels,
|
26
|
+
closeModal,
|
27
|
+
removeLink,
|
28
|
+
setIsLinkEditMode,
|
29
|
+
handleLinkSubmission
|
30
|
+
}) => {
|
31
|
+
var _a, _b;
|
32
|
+
const [editedLinkText, setEditedLinkText] = useState(linkText);
|
33
|
+
const [editedLinkUrl, setEditedLinkUrl] = useState(linkUrl);
|
34
|
+
const monitorInputInteraction = (event) => {
|
35
|
+
if (event.key === "Enter") {
|
36
|
+
event.preventDefault();
|
37
|
+
handleLinkSubmission({
|
38
|
+
text: editedLinkText,
|
39
|
+
url: editedLinkUrl
|
40
|
+
});
|
41
|
+
} else if (event.key === "Escape") {
|
42
|
+
event.preventDefault();
|
43
|
+
setIsLinkEditMode(false);
|
44
|
+
}
|
45
|
+
};
|
46
|
+
return /* @__PURE__ */ jsx(
|
47
|
+
Dialog,
|
48
|
+
{
|
49
|
+
open,
|
50
|
+
size: "sm",
|
51
|
+
onOpenChange: (op) => {
|
52
|
+
if (!op) {
|
53
|
+
closeModal();
|
54
|
+
}
|
55
|
+
},
|
56
|
+
children: /* @__PURE__ */ jsxs(
|
57
|
+
DialogContent,
|
58
|
+
{
|
59
|
+
css: {
|
60
|
+
padding: "0",
|
61
|
+
borderRadius: "2xl"
|
62
|
+
},
|
63
|
+
children: [
|
64
|
+
/* @__PURE__ */ jsxs(
|
65
|
+
DialogTitle,
|
66
|
+
{
|
67
|
+
css: {
|
68
|
+
padding: "$8 $12",
|
69
|
+
borderBottom: "1px solid $neutral200",
|
70
|
+
display: "flex",
|
71
|
+
justifyContent: "space-between",
|
72
|
+
alignItems: "center"
|
73
|
+
},
|
74
|
+
children: [
|
75
|
+
/* @__PURE__ */ jsx(Text, { weight: "bold", size: "lg", children: title }),
|
76
|
+
/* @__PURE__ */ jsx(
|
77
|
+
IconButton,
|
78
|
+
{
|
79
|
+
onClick: closeModal,
|
80
|
+
css: {
|
81
|
+
color: "$neutral800"
|
82
|
+
},
|
83
|
+
icon: /* @__PURE__ */ jsx(CloseIcon, {}),
|
84
|
+
color: "bright",
|
85
|
+
size: "lg"
|
86
|
+
}
|
87
|
+
)
|
88
|
+
]
|
89
|
+
}
|
90
|
+
),
|
91
|
+
/* @__PURE__ */ jsxs(
|
92
|
+
Box,
|
93
|
+
{
|
94
|
+
css: {
|
95
|
+
padding: "$8 $12"
|
96
|
+
},
|
97
|
+
children: [
|
98
|
+
/* @__PURE__ */ jsx(
|
99
|
+
FormInput,
|
100
|
+
{
|
101
|
+
label: textLabel,
|
102
|
+
size: "lg",
|
103
|
+
onChange: (event) => {
|
104
|
+
setEditedLinkText(event.target.value);
|
105
|
+
},
|
106
|
+
onKeyDown: (event) => {
|
107
|
+
monitorInputInteraction(event);
|
108
|
+
},
|
109
|
+
value: editedLinkText,
|
110
|
+
css: {
|
111
|
+
boxSizing: "border-box"
|
112
|
+
},
|
113
|
+
error: errors.text ? (_a = errorLabels == null ? void 0 : errorLabels.text) != null ? _a : "Please enter a valid text" : void 0
|
114
|
+
}
|
115
|
+
),
|
116
|
+
/* @__PURE__ */ jsx(
|
117
|
+
Box,
|
118
|
+
{
|
119
|
+
css: {
|
120
|
+
marginTop: "$10"
|
121
|
+
},
|
122
|
+
children: /* @__PURE__ */ jsx(
|
123
|
+
FormInput,
|
124
|
+
{
|
125
|
+
label: urlLabel,
|
126
|
+
size: "lg",
|
127
|
+
onChange: (event) => {
|
128
|
+
setEditedLinkUrl(event.target.value);
|
129
|
+
},
|
130
|
+
onKeyDown: (event) => {
|
131
|
+
monitorInputInteraction(event);
|
132
|
+
},
|
133
|
+
value: editedLinkUrl,
|
134
|
+
css: {
|
135
|
+
boxSizing: "border-box"
|
136
|
+
},
|
137
|
+
error: errors.url ? (_b = errorLabels == null ? void 0 : errorLabels.url) != null ? _b : "Please enter a valid URL" : void 0
|
138
|
+
}
|
139
|
+
)
|
140
|
+
}
|
141
|
+
)
|
142
|
+
]
|
143
|
+
}
|
144
|
+
),
|
145
|
+
/* @__PURE__ */ jsxs(
|
146
|
+
Flex,
|
147
|
+
{
|
148
|
+
justifyContent: "space-between",
|
149
|
+
css: {
|
150
|
+
padding: "$8 $12"
|
151
|
+
},
|
152
|
+
children: [
|
153
|
+
/* @__PURE__ */ jsx(
|
154
|
+
IconButton,
|
155
|
+
{
|
156
|
+
icon: /* @__PURE__ */ jsx(DeleteIcon, {}),
|
157
|
+
color: "bright",
|
158
|
+
size: "lg",
|
159
|
+
onClick: removeLink
|
160
|
+
}
|
161
|
+
),
|
162
|
+
/* @__PURE__ */ jsxs(
|
163
|
+
Flex,
|
164
|
+
{
|
165
|
+
css: {
|
166
|
+
gap: "$6"
|
167
|
+
},
|
168
|
+
children: [
|
169
|
+
/* @__PURE__ */ jsx(Button, { color: "default", size: "lg", onClick: closeModal, children: cancelLabel }),
|
170
|
+
/* @__PURE__ */ jsx(
|
171
|
+
Button,
|
172
|
+
{
|
173
|
+
color: "primary",
|
174
|
+
size: "lg",
|
175
|
+
disabled: editedLinkText === linkText && editedLinkUrl === linkUrl,
|
176
|
+
onClick: () => handleLinkSubmission({
|
177
|
+
text: editedLinkText,
|
178
|
+
url: editedLinkUrl
|
179
|
+
}),
|
180
|
+
children: isUpdate ? updateLabel : saveLabel
|
181
|
+
}
|
182
|
+
)
|
183
|
+
]
|
184
|
+
}
|
185
|
+
)
|
186
|
+
]
|
187
|
+
}
|
188
|
+
)
|
189
|
+
]
|
190
|
+
}
|
191
|
+
)
|
192
|
+
}
|
193
|
+
);
|
194
|
+
};
|
195
|
+
|
196
|
+
export { LinkEditorDialog };
|
197
|
+
//# sourceMappingURL=link-editor-dialog.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"link-editor-dialog.js","sources":["../../../../src/components/dialog-link-editor/link-editor-dialog.tsx"],"sourcesContent":["import {\n Box,\n Button,\n Dialog,\n DialogContent,\n DialogTitle,\n Flex,\n FormInput,\n IconButton,\n Text\n} from '@sparrowengg/twigs-react';\nimport { CloseIcon, DeleteIcon } from '@sparrowengg/twigs-react-icons';\nimport React, { useState } from 'react';\n\nexport const LinkEditorDialog = ({\n open,\n title,\n errors,\n linkUrl,\n linkText,\n urlLabel,\n isUpdate,\n textLabel,\n saveLabel = 'Save',\n cancelLabel = 'Cancel',\n updateLabel = 'Update',\n errorLabels,\n closeModal,\n removeLink,\n setIsLinkEditMode,\n handleLinkSubmission\n}: {\n open: boolean;\n title: string;\n linkUrl: string;\n linkText: string;\n urlLabel: string;\n isUpdate?: boolean;\n textLabel: string;\n saveLabel?: string;\n cancelLabel?: string;\n updateLabel?: string;\n errorLabels?: {\n text?: string;\n url?: string;\n };\n closeModal: () => void;\n removeLink: () => void;\n handleLinkSubmission: ({ text, url }: { text: string; url: string }) => void;\n setIsLinkEditMode: (isEditMode: boolean) => void;\n errors: {\n text: boolean;\n url: boolean;\n };\n}) => {\n const [editedLinkText, setEditedLinkText] = useState(linkText);\n const [editedLinkUrl, setEditedLinkUrl] = useState(linkUrl);\n\n const monitorInputInteraction = (\n event: React.KeyboardEvent<HTMLInputElement>\n ) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n handleLinkSubmission({\n text: editedLinkText,\n url: editedLinkUrl\n });\n } else if (event.key === 'Escape') {\n event.preventDefault();\n setIsLinkEditMode(false);\n }\n };\n\n return (\n <Dialog\n open={open}\n size=\"sm\"\n onOpenChange={(op) => {\n if (!op) {\n closeModal();\n }\n }}\n >\n <DialogContent\n css={{\n padding: '0',\n borderRadius: '2xl'\n }}\n >\n <DialogTitle\n css={{\n padding: '$8 $12',\n borderBottom: '1px solid $neutral200',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center'\n }}\n >\n <Text weight=\"bold\" size=\"lg\">\n {title}\n </Text>\n <IconButton\n onClick={closeModal}\n css={{\n color: '$neutral800'\n }}\n icon={<CloseIcon />}\n color=\"bright\"\n size=\"lg\"\n />\n </DialogTitle>\n <Box\n css={{\n padding: '$8 $12'\n }}\n >\n <FormInput\n label={textLabel}\n size=\"lg\"\n onChange={(event) => {\n setEditedLinkText(event.target.value);\n }}\n onKeyDown={(event) => {\n monitorInputInteraction(event);\n }}\n value={editedLinkText}\n css={{\n boxSizing: 'border-box'\n }}\n error={\n errors.text\n ? errorLabels?.text ?? 'Please enter a valid text'\n : undefined\n }\n />\n <Box\n css={{\n marginTop: '$10'\n }}\n >\n <FormInput\n label={urlLabel}\n size=\"lg\"\n onChange={(event) => {\n setEditedLinkUrl(event.target.value);\n }}\n onKeyDown={(event) => {\n monitorInputInteraction(event);\n }}\n value={editedLinkUrl}\n css={{\n boxSizing: 'border-box'\n }}\n error={\n errors.url\n ? errorLabels?.url ?? 'Please enter a valid URL'\n : undefined\n }\n />\n </Box>\n </Box>\n <Flex\n justifyContent=\"space-between\"\n css={{\n padding: '$8 $12'\n }}\n >\n <IconButton\n icon={<DeleteIcon />}\n color=\"bright\"\n size=\"lg\"\n onClick={removeLink}\n />\n <Flex\n css={{\n gap: '$6'\n }}\n >\n <Button color=\"default\" size=\"lg\" onClick={closeModal}>\n {cancelLabel}\n </Button>\n <Button\n color=\"primary\"\n size=\"lg\"\n disabled={\n editedLinkText === linkText && editedLinkUrl === linkUrl\n }\n onClick={() => handleLinkSubmission({\n text: editedLinkText,\n url: editedLinkUrl\n })}\n >\n {isUpdate ? updateLabel : saveLabel}\n </Button>\n </Flex>\n </Flex>\n </DialogContent>\n </Dialog>\n );\n};\n"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,120 @@
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
2
|
+
import { prefixClassName } from '../../utils/prefix-class-name.js';
|
3
|
+
import { createPortal } from 'react-dom';
|
4
|
+
import { Box } from '../../react-components/dist/es/box/box.js';
|
5
|
+
import { LinkIcon } from '../../react-icons/dist/es/icons/link.js';
|
6
|
+
import { Link } from '../../react-components/dist/es/link/link.js';
|
7
|
+
import { IconButton } from '../../react-components/dist/es/button/icon-button.js';
|
8
|
+
import { PencilIcon } from '../../react-icons/dist/es/icons/pencil.js';
|
9
|
+
import { DeleteIcon } from '../../react-icons/dist/es/icons/delete.js';
|
10
|
+
|
11
|
+
const LinkTooltip = ({
|
12
|
+
linkUrl,
|
13
|
+
anchorElem,
|
14
|
+
containerRef,
|
15
|
+
handleEdit,
|
16
|
+
handleDelete,
|
17
|
+
https
|
18
|
+
}) => {
|
19
|
+
return createPortal(
|
20
|
+
/* @__PURE__ */ jsxs(
|
21
|
+
Box,
|
22
|
+
{
|
23
|
+
ref: containerRef,
|
24
|
+
className: prefixClassName("link-tooltip"),
|
25
|
+
css: {
|
26
|
+
position: "absolute",
|
27
|
+
left: 0,
|
28
|
+
top: 0,
|
29
|
+
opacity: 0,
|
30
|
+
backgroundColor: "$black900",
|
31
|
+
maxWidth: 280,
|
32
|
+
borderRadius: "$lg",
|
33
|
+
display: "flex",
|
34
|
+
padding: "$2 $4",
|
35
|
+
alignItems: "center",
|
36
|
+
gap: "$3"
|
37
|
+
},
|
38
|
+
children: [
|
39
|
+
/* @__PURE__ */ jsx(
|
40
|
+
Box,
|
41
|
+
{
|
42
|
+
className: prefixClassName("link-tooltip__icon"),
|
43
|
+
css: {
|
44
|
+
flexShrink: 0,
|
45
|
+
svg: {
|
46
|
+
display: "block"
|
47
|
+
}
|
48
|
+
},
|
49
|
+
children: /* @__PURE__ */ jsx(LinkIcon, { color: "#fff", size: 16 })
|
50
|
+
}
|
51
|
+
),
|
52
|
+
/* @__PURE__ */ jsx(
|
53
|
+
Link,
|
54
|
+
{
|
55
|
+
className: prefixClassName("link-tooltip__link"),
|
56
|
+
css: {
|
57
|
+
color: "$white900",
|
58
|
+
textDecoration: "underline",
|
59
|
+
fontSize: "$sm",
|
60
|
+
textOverflow: "ellipsis",
|
61
|
+
overflow: "hidden"
|
62
|
+
},
|
63
|
+
target: "_blank",
|
64
|
+
referrerPolicy: "no-referrer",
|
65
|
+
href: https && !linkUrl.startsWith("https://") ? `https://${linkUrl}` : linkUrl,
|
66
|
+
children: linkUrl
|
67
|
+
}
|
68
|
+
),
|
69
|
+
/* @__PURE__ */ jsxs(
|
70
|
+
Box,
|
71
|
+
{
|
72
|
+
className: prefixClassName("link-tooltip__actions"),
|
73
|
+
css: {
|
74
|
+
display: "flex",
|
75
|
+
borderLeft: "1px solid $white600",
|
76
|
+
margin: "$2",
|
77
|
+
paddingLeft: "$4",
|
78
|
+
flexShrink: 0
|
79
|
+
},
|
80
|
+
children: [
|
81
|
+
/* @__PURE__ */ jsx(
|
82
|
+
IconButton,
|
83
|
+
{
|
84
|
+
icon: /* @__PURE__ */ jsx(PencilIcon, { strokeWidth: 2 }),
|
85
|
+
size: "xs",
|
86
|
+
color: "light",
|
87
|
+
css: {
|
88
|
+
backgroundColor: "transparent"
|
89
|
+
},
|
90
|
+
onClick: () => {
|
91
|
+
handleEdit();
|
92
|
+
}
|
93
|
+
}
|
94
|
+
),
|
95
|
+
/* @__PURE__ */ jsx(
|
96
|
+
IconButton,
|
97
|
+
{
|
98
|
+
icon: /* @__PURE__ */ jsx(DeleteIcon, { strokeWidth: 2 }),
|
99
|
+
size: "xs",
|
100
|
+
color: "light",
|
101
|
+
css: {
|
102
|
+
backgroundColor: "transparent"
|
103
|
+
},
|
104
|
+
onClick: () => {
|
105
|
+
handleDelete();
|
106
|
+
}
|
107
|
+
}
|
108
|
+
)
|
109
|
+
]
|
110
|
+
}
|
111
|
+
)
|
112
|
+
]
|
113
|
+
}
|
114
|
+
),
|
115
|
+
anchorElem
|
116
|
+
);
|
117
|
+
};
|
118
|
+
|
119
|
+
export { LinkTooltip };
|
120
|
+
//# sourceMappingURL=link-tooltip.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"link-tooltip.js","sources":["../../../../src/components/dialog-link-editor/link-tooltip.tsx"],"sourcesContent":["import { Box, IconButton, Link } from '@sparrowengg/twigs-react';\nimport {\n DeleteIcon,\n LinkIcon,\n PencilIcon\n} from '@sparrowengg/twigs-react-icons';\nimport { prefixClassName } from '@src/utils/prefix-class-name';\nimport React from 'react';\nimport { createPortal } from 'react-dom';\n\nexport const LinkTooltip = ({\n linkUrl,\n anchorElem,\n containerRef,\n handleEdit,\n handleDelete,\n https\n}: {\n anchorElem: HTMLElement;\n containerRef: React.RefObject<HTMLDivElement>;\n linkUrl: string;\n handleEdit: () => void;\n handleDelete: () => void;\n https: boolean;\n}) => {\n return createPortal(\n <Box\n ref={containerRef}\n className={prefixClassName('link-tooltip')}\n css={{\n position: 'absolute',\n left: 0,\n top: 0,\n opacity: 0,\n backgroundColor: '$black900',\n maxWidth: 280,\n borderRadius: '$lg',\n display: 'flex',\n padding: '$2 $4',\n alignItems: 'center',\n gap: '$3'\n }}\n >\n <Box\n className={prefixClassName('link-tooltip__icon')}\n css={{\n flexShrink: 0,\n\n svg: {\n display: 'block'\n }\n }}\n >\n <LinkIcon color=\"#fff\" size={16} />\n </Box>\n <Link\n className={prefixClassName('link-tooltip__link')}\n css={{\n color: '$white900',\n textDecoration: 'underline',\n fontSize: '$sm',\n textOverflow: 'ellipsis',\n overflow: 'hidden'\n }}\n target=\"_blank\"\n referrerPolicy=\"no-referrer\"\n href={\n https && !linkUrl.startsWith('https://')\n ? `https://${linkUrl}`\n : linkUrl\n }\n >\n {linkUrl}\n </Link>\n <Box\n className={prefixClassName('link-tooltip__actions')}\n css={{\n display: 'flex',\n borderLeft: '1px solid $white600',\n margin: '$2',\n paddingLeft: '$4',\n flexShrink: 0\n }}\n >\n <IconButton\n icon={<PencilIcon strokeWidth={2} />}\n size=\"xs\"\n color=\"light\"\n css={{\n backgroundColor: 'transparent'\n }}\n onClick={() => {\n handleEdit();\n }}\n />\n <IconButton\n icon={<DeleteIcon strokeWidth={2} />}\n size=\"xs\"\n color=\"light\"\n css={{\n backgroundColor: 'transparent'\n }}\n onClick={() => {\n handleDelete();\n }}\n />\n </Box>\n </Box>,\n anchorElem\n );\n};\n"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,300 @@
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
2
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
3
|
+
import { mergeRegister } from '@lexical/utils';
|
4
|
+
import { $getSelection, $isRangeSelection, $isTextNode, $isParagraphNode, SELECTION_CHANGE_COMMAND, COMMAND_PRIORITY_LOW } from 'lexical';
|
5
|
+
import { useState, useCallback, useEffect, useRef, Fragment as Fragment$1 } from 'react';
|
6
|
+
import { createPortal } from 'react-dom';
|
7
|
+
import { getDOMRangeRect } from '../../utils/get-dom-range-rect.js';
|
8
|
+
import { getSelectedNode } from '../../utils/get-selected-node.js';
|
9
|
+
import { setFloatingElemPosition } from '../../utils/set-floating-elem-position.js';
|
10
|
+
import { prefixClassName } from '../../utils/prefix-class-name.js';
|
11
|
+
import { BoldTool } from '../toolbar/tools/bold.js';
|
12
|
+
import '../toolbar-context/store.js';
|
13
|
+
import '@lexical/code';
|
14
|
+
import '@lexical/selection';
|
15
|
+
import { ItalicTool } from '../toolbar/tools/italic.js';
|
16
|
+
import { LinkTool } from '../toolbar/tools/link.js';
|
17
|
+
import '@lexical/list';
|
18
|
+
import { UnderlineTool } from '../toolbar/tools/underline.js';
|
19
|
+
import '@lexical/rich-text';
|
20
|
+
import { Box } from '../../react-components/dist/es/box/box.js';
|
21
|
+
import { Flex } from '../../react-components/dist/es/flex/flex.js';
|
22
|
+
|
23
|
+
var __defProp = Object.defineProperty;
|
24
|
+
var __defProps = Object.defineProperties;
|
25
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
26
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
27
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
28
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
29
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
30
|
+
var __spreadValues = (a, b) => {
|
31
|
+
for (var prop in b || (b = {}))
|
32
|
+
if (__hasOwnProp.call(b, prop))
|
33
|
+
__defNormalProp(a, prop, b[prop]);
|
34
|
+
if (__getOwnPropSymbols)
|
35
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
36
|
+
if (__propIsEnum.call(b, prop))
|
37
|
+
__defNormalProp(a, prop, b[prop]);
|
38
|
+
}
|
39
|
+
return a;
|
40
|
+
};
|
41
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
42
|
+
const defaultTools = [
|
43
|
+
"bold",
|
44
|
+
"italic",
|
45
|
+
"underline",
|
46
|
+
"link"
|
47
|
+
];
|
48
|
+
const toolMapping = {
|
49
|
+
bold: BoldTool,
|
50
|
+
italic: ItalicTool,
|
51
|
+
underline: UnderlineTool,
|
52
|
+
link: LinkTool
|
53
|
+
};
|
54
|
+
const FloatingToolbarContainer = ({
|
55
|
+
editor,
|
56
|
+
anchorElem,
|
57
|
+
children,
|
58
|
+
tools = defaultTools,
|
59
|
+
containerProps
|
60
|
+
}) => {
|
61
|
+
const popupCharStylesEditorRef = useRef(null);
|
62
|
+
function mouseMoveListener(e) {
|
63
|
+
if ((popupCharStylesEditorRef == null ? void 0 : popupCharStylesEditorRef.current) && (e.buttons === 1 || e.buttons === 3)) {
|
64
|
+
if (popupCharStylesEditorRef.current.style.pointerEvents !== "none") {
|
65
|
+
const x = e.clientX;
|
66
|
+
const y = e.clientY;
|
67
|
+
const elementUnderMouse = document.elementFromPoint(x, y);
|
68
|
+
if (!popupCharStylesEditorRef.current.contains(elementUnderMouse)) {
|
69
|
+
popupCharStylesEditorRef.current.style.pointerEvents = "none";
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
function mouseUpListener() {
|
75
|
+
if (popupCharStylesEditorRef == null ? void 0 : popupCharStylesEditorRef.current) {
|
76
|
+
if (popupCharStylesEditorRef.current.style.pointerEvents !== "auto") {
|
77
|
+
popupCharStylesEditorRef.current.style.pointerEvents = "auto";
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
useEffect(() => {
|
82
|
+
if (popupCharStylesEditorRef == null ? void 0 : popupCharStylesEditorRef.current) {
|
83
|
+
document.addEventListener("mousemove", mouseMoveListener);
|
84
|
+
document.addEventListener("mouseup", mouseUpListener);
|
85
|
+
return () => {
|
86
|
+
document.removeEventListener("mousemove", mouseMoveListener);
|
87
|
+
document.removeEventListener("mouseup", mouseUpListener);
|
88
|
+
};
|
89
|
+
}
|
90
|
+
}, [popupCharStylesEditorRef]);
|
91
|
+
const updateFloatingToolbar = useCallback(() => {
|
92
|
+
const selection = $getSelection();
|
93
|
+
const popupCharStylesEditorElem = popupCharStylesEditorRef.current;
|
94
|
+
const nativeSelection = window.getSelection();
|
95
|
+
if (popupCharStylesEditorElem === null) {
|
96
|
+
return;
|
97
|
+
}
|
98
|
+
const rootElement = editor.getRootElement();
|
99
|
+
if (selection !== null && nativeSelection !== null && !nativeSelection.isCollapsed && rootElement !== null && rootElement.contains(nativeSelection.anchorNode)) {
|
100
|
+
const rangeRect = getDOMRangeRect(nativeSelection, rootElement);
|
101
|
+
setFloatingElemPosition(rangeRect, popupCharStylesEditorElem, anchorElem);
|
102
|
+
}
|
103
|
+
}, [editor, anchorElem]);
|
104
|
+
useEffect(() => {
|
105
|
+
const scrollerElem = anchorElem.parentElement;
|
106
|
+
const update = () => {
|
107
|
+
editor.getEditorState().read(() => {
|
108
|
+
updateFloatingToolbar();
|
109
|
+
});
|
110
|
+
};
|
111
|
+
window.addEventListener("resize", update);
|
112
|
+
if (scrollerElem) {
|
113
|
+
scrollerElem.addEventListener("scroll", update);
|
114
|
+
}
|
115
|
+
return () => {
|
116
|
+
window.removeEventListener("resize", update);
|
117
|
+
if (scrollerElem) {
|
118
|
+
scrollerElem.removeEventListener("scroll", update);
|
119
|
+
}
|
120
|
+
};
|
121
|
+
}, [editor, updateFloatingToolbar, anchorElem]);
|
122
|
+
useEffect(() => {
|
123
|
+
editor.getEditorState().read(() => {
|
124
|
+
updateFloatingToolbar();
|
125
|
+
});
|
126
|
+
return mergeRegister(
|
127
|
+
editor.registerUpdateListener(({ editorState }) => {
|
128
|
+
editorState.read(() => {
|
129
|
+
updateFloatingToolbar();
|
130
|
+
});
|
131
|
+
}),
|
132
|
+
editor.registerCommand(
|
133
|
+
SELECTION_CHANGE_COMMAND,
|
134
|
+
() => {
|
135
|
+
updateFloatingToolbar();
|
136
|
+
return false;
|
137
|
+
},
|
138
|
+
COMMAND_PRIORITY_LOW
|
139
|
+
)
|
140
|
+
);
|
141
|
+
}, [editor, updateFloatingToolbar]);
|
142
|
+
return /* @__PURE__ */ jsx(
|
143
|
+
Box,
|
144
|
+
__spreadProps(__spreadValues({
|
145
|
+
ref: popupCharStylesEditorRef,
|
146
|
+
className: prefixClassName("floating-toolbar")
|
147
|
+
}, containerProps), {
|
148
|
+
css: __spreadValues({
|
149
|
+
position: "absolute",
|
150
|
+
left: 0,
|
151
|
+
top: 0,
|
152
|
+
backgroundColor: "$black900",
|
153
|
+
borderRadius: "$md",
|
154
|
+
display: "flex",
|
155
|
+
"&::after": {
|
156
|
+
content: "",
|
157
|
+
position: "absolute",
|
158
|
+
top: "-8px",
|
159
|
+
left: "8px",
|
160
|
+
width: "0",
|
161
|
+
height: "0",
|
162
|
+
borderLeft: "8px solid transparent",
|
163
|
+
borderRight: "8px solid transparent",
|
164
|
+
borderBottom: "8px solid $black900"
|
165
|
+
},
|
166
|
+
"&.position--top::after": {
|
167
|
+
top: "auto",
|
168
|
+
bottom: "-8px",
|
169
|
+
borderBottom: "none",
|
170
|
+
borderTop: "8px solid $black900"
|
171
|
+
}
|
172
|
+
}, containerProps == null ? void 0 : containerProps.css),
|
173
|
+
children: children ? /* @__PURE__ */ jsx(Fragment, { children }) : /* @__PURE__ */ jsx(
|
174
|
+
Flex,
|
175
|
+
{
|
176
|
+
alignItems: "center",
|
177
|
+
css: {
|
178
|
+
padding: "$2",
|
179
|
+
gap: "$1",
|
180
|
+
".twigs-editor-tool-button": {
|
181
|
+
backgroundColor: "transparent",
|
182
|
+
color: "$neutral100",
|
183
|
+
"&:hover": {
|
184
|
+
backgroundColorOpacity: ["$white100", 0.2],
|
185
|
+
color: "$neutral100"
|
186
|
+
},
|
187
|
+
"&--active": {
|
188
|
+
backgroundColorOpacity: ["$white100", 0.3]
|
189
|
+
}
|
190
|
+
}
|
191
|
+
},
|
192
|
+
children: tools.map((_item, i) => {
|
193
|
+
if (typeof _item === "object" && _item.renderComponent) {
|
194
|
+
const item2 = _item;
|
195
|
+
return (
|
196
|
+
// eslint-disable-next-line react/no-array-index-key
|
197
|
+
/* @__PURE__ */ jsx(Fragment$1, { children: item2.renderComponent({ editor }) }, i)
|
198
|
+
);
|
199
|
+
}
|
200
|
+
const item = _item;
|
201
|
+
const Tool = toolMapping[item];
|
202
|
+
if (!Tool) return null;
|
203
|
+
return (
|
204
|
+
// eslint-disable-next-line react/no-array-index-key
|
205
|
+
/* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Tool, {}) }, i)
|
206
|
+
);
|
207
|
+
})
|
208
|
+
}
|
209
|
+
)
|
210
|
+
})
|
211
|
+
);
|
212
|
+
};
|
213
|
+
function useFloatingTextFormatToolbar({
|
214
|
+
editor,
|
215
|
+
anchorElem,
|
216
|
+
children,
|
217
|
+
tools,
|
218
|
+
containerProps
|
219
|
+
}) {
|
220
|
+
const [isText, setIsText] = useState(false);
|
221
|
+
const updatePopup = useCallback(() => {
|
222
|
+
editor.getEditorState().read(() => {
|
223
|
+
if (editor.isComposing()) {
|
224
|
+
return;
|
225
|
+
}
|
226
|
+
const selection = $getSelection();
|
227
|
+
const nativeSelection = window.getSelection();
|
228
|
+
const rootElement = editor.getRootElement();
|
229
|
+
if (nativeSelection !== null && (!$isRangeSelection(selection) || rootElement === null || !rootElement.contains(nativeSelection.anchorNode))) {
|
230
|
+
setIsText(false);
|
231
|
+
return;
|
232
|
+
}
|
233
|
+
if (!$isRangeSelection(selection)) {
|
234
|
+
return;
|
235
|
+
}
|
236
|
+
const node = getSelectedNode(selection);
|
237
|
+
if (selection.getTextContent() !== "") {
|
238
|
+
setIsText($isTextNode(node) || $isParagraphNode(node));
|
239
|
+
} else {
|
240
|
+
setIsText(false);
|
241
|
+
}
|
242
|
+
const rawTextContent = selection.getTextContent().replace(/\n/g, "");
|
243
|
+
if (!selection.isCollapsed() && rawTextContent === "") {
|
244
|
+
setIsText(false);
|
245
|
+
}
|
246
|
+
});
|
247
|
+
}, [editor]);
|
248
|
+
useEffect(() => {
|
249
|
+
document.addEventListener("selectionchange", updatePopup);
|
250
|
+
return () => {
|
251
|
+
document.removeEventListener("selectionchange", updatePopup);
|
252
|
+
};
|
253
|
+
}, [updatePopup]);
|
254
|
+
useEffect(() => {
|
255
|
+
return mergeRegister(
|
256
|
+
editor.registerUpdateListener(() => {
|
257
|
+
updatePopup();
|
258
|
+
}),
|
259
|
+
editor.registerRootListener(() => {
|
260
|
+
if (editor.getRootElement() === null) {
|
261
|
+
setIsText(false);
|
262
|
+
}
|
263
|
+
})
|
264
|
+
);
|
265
|
+
}, [editor, updatePopup]);
|
266
|
+
if (!isText || !anchorElem) {
|
267
|
+
return null;
|
268
|
+
}
|
269
|
+
return createPortal(
|
270
|
+
/* @__PURE__ */ jsx(
|
271
|
+
FloatingToolbarContainer,
|
272
|
+
{
|
273
|
+
editor,
|
274
|
+
anchorElem,
|
275
|
+
tools,
|
276
|
+
containerProps,
|
277
|
+
children
|
278
|
+
}
|
279
|
+
),
|
280
|
+
anchorElem
|
281
|
+
);
|
282
|
+
}
|
283
|
+
const EditorFloatingToolbar = ({
|
284
|
+
anchorElem = document.body,
|
285
|
+
tools,
|
286
|
+
children,
|
287
|
+
containerProps
|
288
|
+
}) => {
|
289
|
+
const [editor] = useLexicalComposerContext();
|
290
|
+
return useFloatingTextFormatToolbar({
|
291
|
+
editor,
|
292
|
+
anchorElem,
|
293
|
+
tools,
|
294
|
+
children,
|
295
|
+
containerProps
|
296
|
+
});
|
297
|
+
};
|
298
|
+
|
299
|
+
export { EditorFloatingToolbar };
|
300
|
+
//# sourceMappingURL=floating-toolbar.js.map
|