@frontify/guideline-blocks-settings 0.28.0 → 0.28.2
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/CHANGELOG.md +17 -0
- package/dist/_virtual/jsx-runtime.es.js +5 -0
- package/dist/_virtual/jsx-runtime.es.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.development.es.js +5 -0
- package/dist/_virtual/react-jsx-runtime.development.es.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.production.min.es.js +5 -0
- package/dist/_virtual/react-jsx-runtime.production.min.es.js.map +1 -0
- package/dist/components/Attachments/AttachmentItem.es.js +180 -0
- package/dist/components/Attachments/AttachmentItem.es.js.map +1 -0
- package/dist/components/Attachments/Attachments.es.js +145 -0
- package/dist/components/Attachments/Attachments.es.js.map +1 -0
- package/dist/components/BlockInjectButton/BlockInjectButton.es.js +150 -0
- package/dist/components/BlockInjectButton/BlockInjectButton.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js +73 -0
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar.es.js +113 -0
- package/dist/components/BlockItemWrapper/Toolbar.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/constants.es.js +6 -0
- package/dist/components/BlockItemWrapper/constants.es.js.map +1 -0
- package/dist/components/DownloadButton/DownloadButton.es.js +39 -0
- package/dist/components/DownloadButton/DownloadButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/RichTextEditor.es.js +42 -0
- package/dist/components/RichTextEditor/RichTextEditor.es.js.map +1 -0
- package/dist/components/RichTextEditor/SerializedText.es.js +13 -0
- package/dist/components/RichTextEditor/SerializedText.es.js.map +1 -0
- package/dist/components/RichTextEditor/constants.es.js +5 -0
- package/dist/components/RichTextEditor/constants.es.js.map +1 -0
- package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js +34 -0
- package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js +54 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.es.js +12 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js +17 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js +30 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js +16 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js +37 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButton.es.js +25 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonEditButton.es.js +20 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonEditButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.es.js +26 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js +69 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js +105 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/UnlinkButton.es.js +20 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/UnlinkButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.es.js +32 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js +58 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.es.js +19 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.es.js +26 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js +43 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.es.js +18 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js +62 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js +13 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js +25 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js +35 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js +86 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js +24 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js +19 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js +13 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js +11 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js +10 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js +75 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js +18 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js +17 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js +14 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js +53 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js +19 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js +37 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js +53 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/FloatingLink.es.js +29 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/FloatingLink.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js +8 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js +80 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js +40 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js +93 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js +25 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js +27 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js +12 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/id.es.js +5 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/id.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js +39 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js +18 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/relativeUrlRegex.es.js +5 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/relativeUrlRegex.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/url.es.js +17 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/url.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js +45 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js +45 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js +45 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js +46 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js +39 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js +39 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js +39 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js +40 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js +46 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js +46 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js +41 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js +48 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLink.es.js +68 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLink.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLinks.es.js +55 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLinks.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.es.js +62 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLink.es.js +61 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLink.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLinks.es.js +34 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLinks.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/SectionLink.es.js +26 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/SectionLink.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/styles.es.js +168 -0
- package/dist/components/RichTextEditor/plugins/styles.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/nodes/button.es.js +16 -0
- package/dist/components/RichTextEditor/serializer/nodes/button.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/nodes/checkItemNode.es.js +19 -0
- package/dist/components/RichTextEditor/serializer/nodes/checkItemNode.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/nodes/default.es.js +17 -0
- package/dist/components/RichTextEditor/serializer/nodes/default.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/nodes/link.es.js +15 -0
- package/dist/components/RichTextEditor/serializer/nodes/link.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/nodes/mentionHtmlNode.es.js +12 -0
- package/dist/components/RichTextEditor/serializer/nodes/mentionHtmlNode.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/serializeNodesToHtmlRecursive.es.js +61 -0
- package/dist/components/RichTextEditor/serializer/serializeNodesToHtmlRecursive.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/serializeToHtml.es.js +25 -0
- package/dist/components/RichTextEditor/serializer/serializeToHtml.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/utlis/reactCssPropsToCss.es.js +8 -0
- package/dist/components/RichTextEditor/serializer/utlis/reactCssPropsToCss.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/utlis/serializeLeafToHtml.es.js +13 -0
- package/dist/components/RichTextEditor/serializer/utlis/serializeLeafToHtml.es.js.map +1 -0
- package/dist/helpers/addHttps.es.js +14 -0
- package/dist/helpers/addHttps.es.js.map +1 -0
- package/dist/helpers/convertToRichTextValue.es.js +6 -0
- package/dist/helpers/convertToRichTextValue.es.js.map +1 -0
- package/dist/helpers/customCoordinatesGetterFactory.es.js +32 -0
- package/dist/helpers/customCoordinatesGetterFactory.es.js.map +1 -0
- package/dist/helpers/hasRichTextValue.es.js +15 -0
- package/dist/helpers/hasRichTextValue.es.js.map +1 -0
- package/dist/helpers/isDownloadable.es.js +6 -0
- package/dist/helpers/isDownloadable.es.js.map +1 -0
- package/dist/helpers/mapColorPalettes.es.js +16 -0
- package/dist/helpers/mapColorPalettes.es.js.map +1 -0
- package/dist/hooks/useAttachments.es.js +31 -0
- package/dist/hooks/useAttachments.es.js.map +1 -0
- package/dist/hooks/useDndSensors.es.js +20 -0
- package/dist/hooks/useDndSensors.es.js.map +1 -0
- package/dist/index.cjs.js +46 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +964 -0
- package/dist/index.es.js +178 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +46 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/settings/background.es.js +22 -0
- package/dist/settings/background.es.js.map +1 -0
- package/dist/settings/border.es.js +61 -0
- package/dist/settings/border.es.js.map +1 -0
- package/dist/settings/borderRadius.es.js +56 -0
- package/dist/settings/borderRadius.es.js.map +1 -0
- package/dist/settings/borderRadiusExtended.es.js +64 -0
- package/dist/settings/borderRadiusExtended.es.js.map +1 -0
- package/dist/settings/defaultValues.es.js +19 -0
- package/dist/settings/defaultValues.es.js.map +1 -0
- package/dist/settings/gutter.es.js +56 -0
- package/dist/settings/gutter.es.js.map +1 -0
- package/dist/settings/margin.es.js +53 -0
- package/dist/settings/margin.es.js.map +1 -0
- package/dist/settings/marginExtended.es.js +65 -0
- package/dist/settings/marginExtended.es.js.map +1 -0
- package/dist/settings/padding.es.js +53 -0
- package/dist/settings/padding.es.js.map +1 -0
- package/dist/settings/paddingExtended.es.js +65 -0
- package/dist/settings/paddingExtended.es.js.map +1 -0
- package/dist/settings/securityDownloadable.es.js +19 -0
- package/dist/settings/securityDownloadable.es.js.map +1 -0
- package/dist/settings/securityGlobalControl.es.js +33 -0
- package/dist/settings/securityGlobalControl.es.js.map +1 -0
- package/dist/settings/types.es.js +48 -0
- package/dist/settings/types.es.js.map +1 -0
- package/dist/styles.css +1 -0
- package/dist/styles.css.es.js +5 -0
- package/dist/styles.css.es.js.map +1 -0
- package/dist/utilities/color/getReadableColor.es.js +14 -0
- package/dist/utilities/color/getReadableColor.es.js.map +1 -0
- package/dist/utilities/color/isDark.es.js +10 -0
- package/dist/utilities/color/isDark.es.js.map +1 -0
- package/dist/utilities/color/setAlpha.es.js +6 -0
- package/dist/utilities/color/setAlpha.es.js.map +1 -0
- package/dist/utilities/color/toColorObject.es.js +9 -0
- package/dist/utilities/color/toColorObject.es.js.map +1 -0
- package/dist/utilities/color/toHex8String.es.js +7 -0
- package/dist/utilities/color/toHex8String.es.js.map +1 -0
- package/dist/utilities/color/toHexString.es.js +7 -0
- package/dist/utilities/color/toHexString.es.js.map +1 -0
- package/dist/utilities/color/toRgbaString.es.js +7 -0
- package/dist/utilities/color/toRgbaString.es.js.map +1 -0
- package/dist/utilities/color/toShortRgba.es.js +11 -0
- package/dist/utilities/color/toShortRgba.es.js.map +1 -0
- package/dist/utilities/moveItemInArray.es.js +12 -0
- package/dist/utilities/moveItemInArray.es.js.map +1 -0
- package/dist/utilities/react/getBackgroundColorStyles.es.js +8 -0
- package/dist/utilities/react/getBackgroundColorStyles.es.js.map +1 -0
- package/dist/utilities/react/getBorderStyles.es.js +12 -0
- package/dist/utilities/react/getBorderStyles.es.js.map +1 -0
- package/dist/utilities/react/getRadiusStyles.es.js +8 -0
- package/dist/utilities/react/getRadiusStyles.es.js.map +1 -0
- package/dist/utilities/react/joinClassNames.es.js +5 -0
- package/dist/utilities/react/joinClassNames.es.js.map +1 -0
- package/package.json +25 -24
- package/src/components/Attachments/AttachmentItem.tsx +2 -2
- package/src/components/Attachments/Attachments.spec.ct.tsx +4 -4
- package/src/components/Attachments/Attachments.tsx +2 -2
- package/src/components/BlockInjectButton/BlockInjectButton.spec.ct.tsx +2 -2
- package/src/components/BlockItemWrapper/BlockItemWrapper.spec.ct.tsx +8 -8
- package/src/components/BlockItemWrapper/Toolbar.tsx +1 -1
- package/src/components/RichTextEditor/RichTextEditor.spec.ct.tsx +8 -8
- package/src/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.tsx +2 -2
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.tsx +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.tsx +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.ts +2 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.ts +2 -2
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.ts +5 -5
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.ts +2 -2
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.ts +1 -1
- package/src/components/RichTextEditor/plugins/ButtonPlugin/withButton.ts +1 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.ts +1 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.ts +1 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.ts +1 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/LinkButton.tsx +1 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/utils/relativeUrlRegex.spec.ts +24 -27
- package/src/components/RichTextEditor/serializer/nodes/checkItemNode.ts +1 -1
- package/src/components/RichTextEditor/serializer/nodes/default.ts +2 -2
- package/src/components/RichTextEditor/serializer/nodes/link.ts +1 -1
- package/src/components/RichTextEditor/serializer/serializeNodesToHtmlRecursive.ts +4 -4
- package/src/components/RichTextEditor/serializer/serializeToHtml.ts +2 -2
- package/src/hooks/useAttachments.ts +1 -1
- package/src/hooks/useDndSensors.ts +1 -1
- package/src/index.ts +3 -3
- package/src/settings/background.spec.ts +1 -1
- package/src/settings/border.spec.ts +1 -1
- package/src/settings/borderRadiusExtended.spec.ts +4 -4
- package/src/settings/marginExtended.spec.ts +4 -4
- package/src/settings/paddingExtended.spec.ts +4 -4
- package/src/styles.css +3 -0
- package/src/utilities/react/getBorderStyles.ts +1 -1
- package/vite.config.ts +22 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const n = (a) => a.map(p), p = (a) => ({
|
|
2
|
+
id: a.id,
|
|
3
|
+
title: a.name,
|
|
4
|
+
colors: a.colors.map((e) => ({
|
|
5
|
+
alpha: e.alpha ? e.alpha / 255 : 1,
|
|
6
|
+
red: e.red ?? 0,
|
|
7
|
+
green: e.green ?? 0,
|
|
8
|
+
blue: e.blue ?? 0,
|
|
9
|
+
name: e.name ?? ""
|
|
10
|
+
}))
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
p as mapAppBridgeColorPaletteToFonduePalette,
|
|
14
|
+
n as mapAppBridgeColorPalettesToFonduePalettes
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=mapColorPalettes.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapColorPalettes.es.js","sources":["../../src/helpers/mapColorPalettes.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { ColorPalette } from '@frontify/app-bridge';\nimport { Palette } from '@frontify/fondue';\n\nexport const mapAppBridgeColorPalettesToFonduePalettes = (colorPalettes: ColorPalette[]): Palette[] => {\n return colorPalettes.map(mapAppBridgeColorPaletteToFonduePalette);\n};\n\nexport const mapAppBridgeColorPaletteToFonduePalette = (colorPalette: ColorPalette): Palette => {\n return {\n id: colorPalette.id,\n title: colorPalette.name,\n colors: colorPalette.colors.map((color) => ({\n alpha: color.alpha ? color.alpha / 255 : 1,\n red: color.red ?? 0,\n green: color.green ?? 0,\n blue: color.blue ?? 0,\n name: color.name ?? '',\n })),\n };\n};\n"],"names":["mapAppBridgeColorPalettesToFonduePalettes","colorPalettes","mapAppBridgeColorPaletteToFonduePalette","colorPalette","color"],"mappings":"AAKa,MAAAA,IAA4C,CAACC,MAC/CA,EAAc,IAAIC,CAAuC,GAGvDA,IAA0C,CAACC,OAC7C;AAAA,EACH,IAAIA,EAAa;AAAA,EACjB,OAAOA,EAAa;AAAA,EACpB,QAAQA,EAAa,OAAO,IAAI,CAACC,OAAW;AAAA,IACxC,OAAOA,EAAM,QAAQA,EAAM,QAAQ,MAAM;AAAA,IACzC,KAAKA,EAAM,OAAO;AAAA,IAClB,OAAOA,EAAM,SAAS;AAAA,IACtB,MAAMA,EAAM,QAAQ;AAAA,IACpB,MAAMA,EAAM,QAAQ;AAAA,EAAA,EACtB;AAAA;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useBlockAssets as m } from "@frontify/app-bridge";
|
|
2
|
+
const l = (i, s) => {
|
|
3
|
+
const { blockAssets: a, updateAssetIdsFromKey: o } = m(i), c = (a == null ? void 0 : a[s]) || [];
|
|
4
|
+
return {
|
|
5
|
+
onAddAttachments: async (e) => {
|
|
6
|
+
const n = c.map((t) => t.id);
|
|
7
|
+
for (const t of e)
|
|
8
|
+
n.push(t.id);
|
|
9
|
+
await o(s, n);
|
|
10
|
+
},
|
|
11
|
+
onAttachmentDelete: async (e) => {
|
|
12
|
+
const n = c.filter((t) => t.id !== e.id).map((t) => t.id);
|
|
13
|
+
await o(s, n);
|
|
14
|
+
},
|
|
15
|
+
onAttachmentReplace: async (e, n) => {
|
|
16
|
+
const t = c.map(
|
|
17
|
+
(d) => d.id === e.id ? n.id : d.id
|
|
18
|
+
);
|
|
19
|
+
await o(s, t);
|
|
20
|
+
},
|
|
21
|
+
onAttachmentsSorted: async (e) => {
|
|
22
|
+
const n = e.map((t) => t.id);
|
|
23
|
+
await o(s, n);
|
|
24
|
+
},
|
|
25
|
+
attachments: c
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
l as useAttachments
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=useAttachments.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAttachments.es.js","sources":["../../src/hooks/useAttachments.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AppBridgeBlock, Asset, useBlockAssets } from '@frontify/app-bridge';\n\nexport const useAttachments = (appBridge: AppBridgeBlock, assetId: string) => {\n const { blockAssets, updateAssetIdsFromKey } = useBlockAssets(appBridge);\n const attachments = blockAssets?.[assetId] || [];\n\n const onAddAttachments = async (newAssets: Asset[]) => {\n const newAssetIds = attachments.map((attachment) => attachment.id);\n for (const asset of newAssets) {\n newAssetIds.push(asset.id);\n }\n await updateAssetIdsFromKey(assetId, newAssetIds);\n };\n\n const onAttachmentDelete = async (assetToDelete: Asset) => {\n const newAssetIds = attachments\n .filter((attachment) => attachment.id !== assetToDelete.id)\n .map((attachment) => attachment.id);\n\n await updateAssetIdsFromKey(assetId, newAssetIds);\n };\n\n const onAttachmentReplace = async (attachmentToReplace: Asset, newAsset: Asset) => {\n const newAssetIds = attachments.map((attachment) =>\n attachment.id === attachmentToReplace.id ? newAsset.id : attachment.id,\n );\n\n await updateAssetIdsFromKey(assetId, newAssetIds);\n };\n\n const onAttachmentsSorted = async (assets: Asset[]) => {\n const newAssetIds = assets.map((asset) => asset.id);\n\n await updateAssetIdsFromKey(assetId, newAssetIds);\n };\n\n return {\n onAddAttachments,\n onAttachmentDelete,\n onAttachmentReplace,\n onAttachmentsSorted,\n attachments,\n };\n};\n"],"names":["useAttachments","appBridge","assetId","blockAssets","updateAssetIdsFromKey","useBlockAssets","attachments","newAssets","newAssetIds","attachment","asset","assetToDelete","attachmentToReplace","newAsset","assets"],"mappings":";AAIa,MAAAA,IAAiB,CAACC,GAA2BC,MAAoB;AAC1E,QAAM,EAAE,aAAAC,GAAa,uBAAAC,EAAsB,IAAIC,EAAeJ,CAAS,GACjEK,KAAcH,KAAA,gBAAAA,EAAcD,OAAY,CAAA;AAgCvC,SAAA;AAAA,IACH,kBA/BqB,OAAOK,MAAuB;AACnD,YAAMC,IAAcF,EAAY,IAAI,CAACG,MAAeA,EAAW,EAAE;AACjE,iBAAWC,KAASH;AACJ,QAAAC,EAAA,KAAKE,EAAM,EAAE;AAEvB,YAAAN,EAAsBF,GAASM,CAAW;AAAA,IAAA;AAAA,IA2BhD,oBAxBuB,OAAOG,MAAyB;AACvD,YAAMH,IAAcF,EACf,OAAO,CAACG,MAAeA,EAAW,OAAOE,EAAc,EAAE,EACzD,IAAI,CAACF,MAAeA,EAAW,EAAE;AAEhC,YAAAL,EAAsBF,GAASM,CAAW;AAAA,IAAA;AAAA,IAoBhD,qBAjBwB,OAAOI,GAA4BC,MAAoB;AAC/E,YAAML,IAAcF,EAAY;AAAA,QAAI,CAACG,MACjCA,EAAW,OAAOG,EAAoB,KAAKC,EAAS,KAAKJ,EAAW;AAAA,MAAA;AAGlE,YAAAL,EAAsBF,GAASM,CAAW;AAAA,IAAA;AAAA,IAahD,qBAVwB,OAAOM,MAAoB;AACnD,YAAMN,IAAcM,EAAO,IAAI,CAACJ,MAAUA,EAAM,EAAE;AAE5C,YAAAN,EAAsBF,GAASM,CAAW;AAAA,IAAA;AAAA,IAQhD,aAAAF;AAAA,EAAA;AAER;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useSensors as t, useSensor as e, PointerSensor as n, KeyboardSensor as c } from "@dnd-kit/core";
|
|
2
|
+
import { customCoordinatesGetterFactory as a } from "../helpers/customCoordinatesGetterFactory.es.js";
|
|
3
|
+
const d = {
|
|
4
|
+
start: ["Space", "Enter"],
|
|
5
|
+
cancel: [],
|
|
6
|
+
end: ["Space", "Enter", "Escape"]
|
|
7
|
+
}, p = (o = 0, r = 0) => {
|
|
8
|
+
const s = a(o, r);
|
|
9
|
+
return t(
|
|
10
|
+
e(n),
|
|
11
|
+
e(c, {
|
|
12
|
+
coordinateGetter: s,
|
|
13
|
+
keyboardCodes: d
|
|
14
|
+
})
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
p as useDndSensors
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=useDndSensors.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDndSensors.es.js","sources":["../../src/hooks/useDndSensors.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';\nimport { customCoordinatesGetterFactory } from '../helpers/customCoordinatesGetterFactory';\n\nconst keyboardCodes = {\n start: ['Space', 'Enter'],\n cancel: [],\n end: ['Space', 'Enter', 'Escape'],\n};\n\nexport const useDndSensors = (columnGap = 0, rowGap = 0) => {\n const customCoordinatesGetter = customCoordinatesGetterFactory(columnGap, rowGap);\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: customCoordinatesGetter,\n keyboardCodes,\n }),\n );\n\n return sensors;\n};\n"],"names":["keyboardCodes","useDndSensors","columnGap","rowGap","customCoordinatesGetter","customCoordinatesGetterFactory","useSensors","useSensor","PointerSensor","KeyboardSensor"],"mappings":";;AAKA,MAAMA,IAAgB;AAAA,EAClB,OAAO,CAAC,SAAS,OAAO;AAAA,EACxB,QAAQ,CAAC;AAAA,EACT,KAAK,CAAC,SAAS,SAAS,QAAQ;AACpC,GAEaC,IAAgB,CAACC,IAAY,GAAGC,IAAS,MAAM;AAClD,QAAAC,IAA0BC,EAA+BH,GAAWC,CAAM;AASzE,SARSG;AAAA,IACZC,EAAUC,CAAa;AAAA,IACvBD,EAAUE,GAAgB;AAAA,MACtB,kBAAkBL;AAAA,MAClB,eAAAJ;AAAA,IAAA,CACH;AAAA,EAAA;AAIT;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("@frontify/sidebar-settings"),w=require("react"),o=require("@frontify/fondue"),fe=require("@frontify/app-bridge"),_=require("@dnd-kit/core"),De=require("@dnd-kit/sortable"),qt=require("@react-aria/focus"),ur=require("@dnd-kit/modifiers"),l=require("@udecode/plate"),rt=require("escape-html"),Gt=require("slate-react"),cr=require("@react-stately/overlays"),dr=require("slate"),gr=require("react-dom"),ne=require("@ctrl/tinycolor");var at={exports:{}},Ie={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Ht;function mr(){if(Ht)return Ie;Ht=1;var e=w,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function d(g,c,p){var h,f={},x=null,T=null;p!==void 0&&(x=""+p),c.key!==void 0&&(x=""+c.key),c.ref!==void 0&&(T=c.ref);for(h in c)r.call(c,h)&&!u.hasOwnProperty(h)&&(f[h]=c[h]);if(g&&g.defaultProps)for(h in c=g.defaultProps,c)f[h]===void 0&&(f[h]=c[h]);return{$$typeof:t,type:g,key:x,ref:T,props:f,_owner:a.current}}return Ie.Fragment=n,Ie.jsx=d,Ie.jsxs=d,Ie}var Re={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Vt;function fr(){return Vt||(Vt=1,process.env.NODE_ENV!=="production"&&function(){var e=w,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),g=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),B=Symbol.iterator,D="@@iterator";function U(i){if(i===null||typeof i!="object")return null;var m=B&&i[B]||i[D];return typeof m=="function"?m:null}var I=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(i){{for(var m=arguments.length,y=new Array(m>1?m-1:0),S=1;S<m;S++)y[S-1]=arguments[S];K("error",i,y)}}function K(i,m,y){{var S=I.ReactDebugCurrentFrame,P=S.getStackAddendum();P!==""&&(m+="%s",y=y.concat([P]));var N=y.map(function(C){return String(C)});N.unshift("Warning: "+m),Function.prototype.apply.call(console[i],console,N)}}var se=!1,q=!1,j=!1,$=!1,W=!1,Z;Z=Symbol.for("react.module.reference");function le(i){return!!(typeof i=="string"||typeof i=="function"||i===r||i===u||W||i===a||i===p||i===h||$||i===T||se||q||j||typeof i=="object"&&i!==null&&(i.$$typeof===x||i.$$typeof===f||i.$$typeof===d||i.$$typeof===g||i.$$typeof===c||i.$$typeof===Z||i.getModuleId!==void 0))}function ie(i,m,y){var S=i.displayName;if(S)return S;var P=m.displayName||m.name||"";return P!==""?y+"("+P+")":y}function Ce(i){return i.displayName||"Context"}function Y(i){if(i==null)return null;if(typeof i.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case r:return"Fragment";case n:return"Portal";case u:return"Profiler";case a:return"StrictMode";case p:return"Suspense";case h:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case g:var m=i;return Ce(m)+".Consumer";case d:var y=i;return Ce(y._context)+".Provider";case c:return ie(i,i.render,"ForwardRef");case f:var S=i.displayName||null;return S!==null?S:Y(i.type)||"Memo";case x:{var P=i,N=P._payload,C=P._init;try{return Y(C(N))}catch{return null}}}return null}var ee=Object.assign,E=0,H,J,Ne,Be,Te,pe,Tt;function Pt(){}Pt.__reactDisabledLog=!0;function Mn(){{if(E===0){H=console.log,J=console.info,Ne=console.warn,Be=console.error,Te=console.group,pe=console.groupCollapsed,Tt=console.groupEnd;var i={configurable:!0,enumerable:!0,value:Pt,writable:!0};Object.defineProperties(console,{info:i,log:i,warn:i,error:i,group:i,groupCollapsed:i,groupEnd:i})}E++}}function Dn(){{if(E--,E===0){var i={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ee({},i,{value:H}),info:ee({},i,{value:J}),warn:ee({},i,{value:Ne}),error:ee({},i,{value:Be}),group:ee({},i,{value:Te}),groupCollapsed:ee({},i,{value:pe}),groupEnd:ee({},i,{value:Tt})})}E<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ke=I.ReactCurrentDispatcher,Ye;function Ae(i,m,y){{if(Ye===void 0)try{throw Error()}catch(P){var S=P.stack.trim().match(/\n( *(at )?)/);Ye=S&&S[1]||""}return`
|
|
18
|
+
`+Ye+i}}var Xe=!1,_e;{var $n=typeof WeakMap=="function"?WeakMap:Map;_e=new $n}function It(i,m){if(!i||Xe)return"";{var y=_e.get(i);if(y!==void 0)return y}var S;Xe=!0;var P=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var N;N=Ke.current,Ke.current=null,Mn();try{if(m){var C=function(){throw Error()};if(Object.defineProperty(C.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(C,[])}catch(te){S=te}Reflect.construct(i,[],C)}else{try{C.call()}catch(te){S=te}i.call(C.prototype)}}else{try{throw Error()}catch(te){S=te}i()}}catch(te){if(te&&S&&typeof te.stack=="string"){for(var k=te.stack.split(`
|
|
19
|
+
`),V=S.stack.split(`
|
|
20
|
+
`),A=k.length-1,O=V.length-1;A>=1&&O>=0&&k[A]!==V[O];)O--;for(;A>=1&&O>=0;A--,O--)if(k[A]!==V[O]){if(A!==1||O!==1)do if(A--,O--,O<0||k[A]!==V[O]){var G=`
|
|
21
|
+
`+k[A].replace(" at new "," at ");return i.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",i.displayName)),typeof i=="function"&&_e.set(i,G),G}while(A>=1&&O>=0);break}}}finally{Xe=!1,Ke.current=N,Dn(),Error.prepareStackTrace=P}var be=i?i.displayName||i.name:"",Ut=be?Ae(be):"";return typeof i=="function"&&_e.set(i,Ut),Ut}function Un(i,m,y){return It(i,!1)}function Hn(i){var m=i.prototype;return!!(m&&m.isReactComponent)}function Oe(i,m,y){if(i==null)return"";if(typeof i=="function")return It(i,Hn(i));if(typeof i=="string")return Ae(i);switch(i){case p:return Ae("Suspense");case h:return Ae("SuspenseList")}if(typeof i=="object")switch(i.$$typeof){case c:return Un(i.render);case f:return Oe(i.type,m,y);case x:{var S=i,P=S._payload,N=S._init;try{return Oe(N(P),m,y)}catch{}}}return""}var Fe=Object.prototype.hasOwnProperty,Rt={},jt=I.ReactDebugCurrentFrame;function Me(i){if(i){var m=i._owner,y=Oe(i.type,i._source,m?m.type:null);jt.setExtraStackFrame(y)}else jt.setExtraStackFrame(null)}function Vn(i,m,y,S,P){{var N=Function.call.bind(Fe);for(var C in i)if(N(i,C)){var k=void 0;try{if(typeof i[C]!="function"){var V=Error((S||"React class")+": "+y+" type `"+C+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[C]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw V.name="Invariant Violation",V}k=i[C](m,C,S,y,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(A){k=A}k&&!(k instanceof Error)&&(Me(P),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",S||"React class",y,C,typeof k),Me(null)),k instanceof Error&&!(k.message in Rt)&&(Rt[k.message]=!0,Me(P),R("Failed %s type: %s",y,k.message),Me(null))}}}var zn=Array.isArray;function Je(i){return zn(i)}function Wn(i){{var m=typeof Symbol=="function"&&Symbol.toStringTag,y=m&&i[Symbol.toStringTag]||i.constructor.name||"Object";return y}}function qn(i){try{return Lt(i),!1}catch{return!0}}function Lt(i){return""+i}function Nt(i){if(qn(i))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Wn(i)),Lt(i)}var Pe=I.ReactCurrentOwner,Gn={key:!0,ref:!0,__self:!0,__source:!0},Bt,At,Qe;Qe={};function Kn(i){if(Fe.call(i,"ref")){var m=Object.getOwnPropertyDescriptor(i,"ref").get;if(m&&m.isReactWarning)return!1}return i.ref!==void 0}function Yn(i){if(Fe.call(i,"key")){var m=Object.getOwnPropertyDescriptor(i,"key").get;if(m&&m.isReactWarning)return!1}return i.key!==void 0}function Xn(i,m){if(typeof i.ref=="string"&&Pe.current&&m&&Pe.current.stateNode!==m){var y=Y(Pe.current.type);Qe[y]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Y(Pe.current.type),i.ref),Qe[y]=!0)}}function Jn(i,m){{var y=function(){Bt||(Bt=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};y.isReactWarning=!0,Object.defineProperty(i,"key",{get:y,configurable:!0})}}function Qn(i,m){{var y=function(){At||(At=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};y.isReactWarning=!0,Object.defineProperty(i,"ref",{get:y,configurable:!0})}}var Zn=function(i,m,y,S,P,N,C){var k={$$typeof:t,type:i,key:m,ref:y,props:C,_owner:N};return k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(k,"_self",{configurable:!1,enumerable:!1,writable:!1,value:S}),Object.defineProperty(k,"_source",{configurable:!1,enumerable:!1,writable:!1,value:P}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k};function er(i,m,y,S,P){{var N,C={},k=null,V=null;y!==void 0&&(Nt(y),k=""+y),Yn(m)&&(Nt(m.key),k=""+m.key),Kn(m)&&(V=m.ref,Xn(m,P));for(N in m)Fe.call(m,N)&&!Gn.hasOwnProperty(N)&&(C[N]=m[N]);if(i&&i.defaultProps){var A=i.defaultProps;for(N in A)C[N]===void 0&&(C[N]=A[N])}if(k||V){var O=typeof i=="function"?i.displayName||i.name||"Unknown":i;k&&Jn(C,O),V&&Qn(C,O)}return Zn(i,k,V,P,S,Pe.current,C)}}var Ze=I.ReactCurrentOwner,_t=I.ReactDebugCurrentFrame;function ye(i){if(i){var m=i._owner,y=Oe(i.type,i._source,m?m.type:null);_t.setExtraStackFrame(y)}else _t.setExtraStackFrame(null)}var et;et=!1;function tt(i){return typeof i=="object"&&i!==null&&i.$$typeof===t}function Ot(){{if(Ze.current){var i=Y(Ze.current.type);if(i)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+i+"`."}return""}}function tr(i){{if(i!==void 0){var m=i.fileName.replace(/^.*[\\\/]/,""),y=i.lineNumber;return`
|
|
24
|
+
|
|
25
|
+
Check your code at `+m+":"+y+"."}return""}}var Ft={};function nr(i){{var m=Ot();if(!m){var y=typeof i=="string"?i:i.displayName||i.name;y&&(m=`
|
|
26
|
+
|
|
27
|
+
Check the top-level render call using <`+y+">.")}return m}}function Mt(i,m){{if(!i._store||i._store.validated||i.key!=null)return;i._store.validated=!0;var y=nr(m);if(Ft[y])return;Ft[y]=!0;var S="";i&&i._owner&&i._owner!==Ze.current&&(S=" It was passed a child from "+Y(i._owner.type)+"."),ye(i),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',y,S),ye(null)}}function Dt(i,m){{if(typeof i!="object")return;if(Je(i))for(var y=0;y<i.length;y++){var S=i[y];tt(S)&&Mt(S,m)}else if(tt(i))i._store&&(i._store.validated=!0);else if(i){var P=U(i);if(typeof P=="function"&&P!==i.entries)for(var N=P.call(i),C;!(C=N.next()).done;)tt(C.value)&&Mt(C.value,m)}}}function rr(i){{var m=i.type;if(m==null||typeof m=="string")return;var y;if(typeof m=="function")y=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===c||m.$$typeof===f))y=m.propTypes;else return;if(y){var S=Y(m);Vn(y,i.props,"prop",S,i)}else if(m.PropTypes!==void 0&&!et){et=!0;var P=Y(m);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",P||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ar(i){{for(var m=Object.keys(i.props),y=0;y<m.length;y++){var S=m[y];if(S!=="children"&&S!=="key"){ye(i),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",S),ye(null);break}}i.ref!==null&&(ye(i),R("Invalid attribute `ref` supplied to `React.Fragment`."),ye(null))}}function $t(i,m,y,S,P,N){{var C=le(i);if(!C){var k="";(i===void 0||typeof i=="object"&&i!==null&&Object.keys(i).length===0)&&(k+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var V=tr(P);V?k+=V:k+=Ot();var A;i===null?A="null":Je(i)?A="array":i!==void 0&&i.$$typeof===t?(A="<"+(Y(i.type)||"Unknown")+" />",k=" Did you accidentally export a JSX literal instead of a component?"):A=typeof i,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",A,k)}var O=er(i,m,y,P,N);if(O==null)return O;if(C){var G=m.children;if(G!==void 0)if(S)if(Je(G)){for(var be=0;be<G.length;be++)Dt(G[be],i);Object.freeze&&Object.freeze(G)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Dt(G,i)}return i===r?ar(O):rr(O),O}}function sr(i,m,y){return $t(i,m,y,!0)}function ir(i,m,y){return $t(i,m,y,!1)}var or=ir,lr=sr;Re.Fragment=r,Re.jsx=or,Re.jsxs=lr}()),Re}process.env.NODE_ENV==="production"?at.exports=mr():at.exports=fr();var s=at.exports;const re=e=>e.filter(Boolean).join(" "),hr=({onDrop:e,label:t,icon:n,secondaryLabel:r,isLoading:a,fillParentContainer:u,onAssetChooseClick:d,onUploadClick:g,withMenu:c=!0,onClick:p,validFileType:h,verticalLayout:f})=>{const[x,T]=w.useState(!1),[B,D]=w.useState(),U=w.useRef(null),[I,R]=w.useState(void 0),K=j=>{if(j.preventDefault(),T(!1),!se(j.dataTransfer.files)){R("Invalid"),setTimeout(()=>{R(void 0)},1e3);return}e==null||e(j.dataTransfer.files)},se=j=>{if(!h)return!0;for(let $=0;$<j.length;$++){const W=j[$].name.split(".").pop()??"";if(!fe.FileExtensionSets[h].includes(W))return!1}return!0},q=j=>{if(!U.current||a)return;const{left:$,top:W}=U.current.getBoundingClientRect(),Z=j.clientX-$,le=j.clientY-W;D([Z,le])};return s.jsxs("button",{ref:U,"data-test-id":"block-inject-button",className:re(["tw-font-body tw-relative tw-text-sm tw-leading-4 tw-border tw-flex tw-items-center tw-justify-center tw-cursor-pointer tw-gap-3 tw-w-full first:tw-rounded-tl last:tw-rounded-br",f?"[&:not(:first-child)]:tw-border-t-0 first:tw-rounded-tr last:tw-rounded-bl":"[&:not(:first-child)]:tw-border-l-0 first:tw-rounded-bl last:tw-rounded-tr",u?"tw-h-full":"tw-h-[72px]",x&&!a?"tw-border-dashed":"tw-border-solid",B&&"tw-bg-blank-state-pressed-inverse",x&&"tw-bg-blank-state-weak-inverse",I?"!tw-border-red-50 !tw-cursor-not-allowed":" tw-border-blank-state-line",a||B||x||I?"":"tw-text-text-weak hover:tw-text-blank-state-hover hover:tw-bg-blank-state-hover-inverse hover:tw-border-blank-state-line-hover active:tw-text-blank-state-pressed active:tw-bg-blank-state-pressed-inverse active:tw-border-blank-state-line-hover",(x||B)&&!I?"[&>*]:tw-pointer-events-none tw-border-blank-state-line-hover":"tw-bg-blank-state-shaded-inverse tw-text-blank-state-shaded"]),onDragEnter:e?j=>{var $;if(T(!0),h==="Images")for(const W of Array.from(j.dataTransfer.items))($=W==null?void 0:W.type)!=null&&$.startsWith("image/")?R(void 0):R("Invalid")}:void 0,onDragLeave:e?()=>{T(!1),R(void 0)}:void 0,onDrop:e?K:void 0,onClick:j=>{c&&q(j),p==null||p()},children:[a?s.jsx(o.LoadingCircle,{}):I?s.jsxs("div",{className:" tw-flex tw-items-center tw-justify-center tw-text-red-60 tw-font-medium",children:[s.jsx(o.IconExclamationMarkTriangle,{}),I]}):s.jsxs(s.Fragment,{children:[n&&s.jsx("div",{children:n}),(t||r)&&s.jsxs("div",{className:"tw-flex tw-flex-col tw-items-start",children:[t&&s.jsx("div",{className:"tw-font-medium",children:t}),r&&s.jsx("div",{className:"tw-font-normal",children:r})]})]}),B&&s.jsx("div",{className:"tw-absolute tw-left-0 tw-top-full tw-z-20",style:{left:B[0],top:B[1]},children:s.jsx(o.Flyout,{onOpenChange:j=>!j&&D(void 0),isOpen:!0,fitContent:!0,hug:!1,legacyFooter:!1,trigger:s.jsx("div",{}),children:s.jsx(o.ActionMenu,{menuBlocks:[{id:"menu",menuItems:[...g?[{id:"upload",size:o.MenuItemContentSize.XSmall,title:"Upload asset",onClick:()=>{g(),D(void 0)},initialValue:!0,decorator:s.jsx("div",{className:"tw-mr-2",children:s.jsx(o.IconArrowCircleUp20,{})})}]:[],...d?[{id:"asset",size:o.MenuItemContentSize.XSmall,title:"Browse asset",onClick:()=>{d(),D(void 0)},initialValue:!0,decorator:s.jsx("div",{className:"tw-mr-2",children:s.jsx(o.IconImageStack20,{})})}]:[]]}]})})})]})},he=e=>{const t=r=>typeof r=="object"&&["red","green","blue"].every(u=>r.hasOwnProperty(u)),n=r=>{const a=typeof r.alpha=="number"?r.alpha:1;return{r:r.red,g:r.green,b:r.blue,a}};return t(e)?n(e):e},pr=e=>typeof e=="object"&&["red","green","blue"].every(n=>e==null?void 0:e.hasOwnProperty(n)),yr=(e,t)=>{const n=pr(e)?he(e):e,r=ne(n);return t?r.getBrightness()<t:r.isDark()||r.getAlpha()>.25&&r.getAlpha()<1},br=e=>ne(he(e)).toHex8String(),wr=e=>ne(he(e)).toHexString(),dt=e=>ne(he(e)).toRgbString(),xr=(e,t)=>ne(t).setAlpha(e).toRgbString(),vr=e=>{const{r:t,g:n,b:r,a}=ne(e);return{red:t,green:n,blue:r,alpha:a}},zt=e=>typeof e=="object"&&["red","green","blue"].every(n=>e==null?void 0:e.hasOwnProperty(n)),Sr=(e,t)=>{const n=zt(e)?he(e):e,r=zt(t)?he(t):t;let a=ne(n);const u=ne(r);for(;ne.readability(a,u)<4.5;)a=a.darken(1);return a.toRgbString()},Er=(e,t,n)=>{const r=[...e],a=n<0?r.length+n:n;if(a>=0&&a<r.length){const u=r.splice(t,1)[0];r.splice(a,0,u)}return r},kr=e=>({backgroundColor:dt(e)});var Q=(e=>(e.Solid="Solid",e.Dashed="Dashed",e.Dotted="Dotted",e))(Q||{});const Kt={Solid:"solid",Dotted:"dotted",Dashed:"dashed"};var oe=(e=>(e.None="None",e.Small="Small",e.Medium="Medium",e.Large="Large",e))(oe||{});const ge={None:"0px",Small:"2px",Medium:"4px",Large:"12px"};var ue=(e=>(e.None="None",e.Small="Small",e.Medium="Medium",e.Large="Large",e))(ue||{});const we={None:"0px",Small:"24px",Medium:"36px",Large:"60px"};var ce=(e=>(e.None="None",e.Small="Small",e.Medium="Medium",e.Large="Large",e))(ce||{});const xe={None:"0px",Small:"24px",Medium:"36px",Large:"60px"};var me=(e=>(e.Global="Global",e.Custom="Custom",e))(me||{}),de=(e=>(e.Auto="Auto",e.S="S",e.M="M",e.L="L",e))(de||{});const Yt={Auto:"4px",S:"10px",M:"30px",L:"50px"},Cr={red:241,green:241,blue:241,alpha:1},Xt={red:234,green:235,blue:235,alpha:1},Tr="1px",je="24px",Le="24px",Pr=(e=Q.Solid,t="1px",n=Xt)=>({borderStyle:Kt[e],borderWidth:t,borderColor:dt(n)}),Ir=(e,t=!1,n)=>({borderRadius:t?n:ge[e]}),Jt="Drag or press ↵ to move",Qt="Move with ↑↓←→ and confirm with ↵",Rr=({items:e,flyoutItems:t,isFlyoutOpen:n,setIsFlyoutOpen:r,isDragging:a,isFlyoutDisabled:u})=>s.jsx("div",{"data-test-id":"block-item-wrapper-toolbar",className:"tw-flex tw-justify-end",children:s.jsxs("div",{className:"tw-bg-white tw-text-box-selected-inverse tw-pointer-events-auto tw-flex tw-flex-shrink-0 tw-gap-[2px] tw-px-[1px] tw-spacing tw-items-center tw-h-7 tw-self-start tw-border tw-border-box-selected-inverse tw-rounded",children:[e.map((d,g)=>"draggableProps"in d?s.jsx(o.Tooltip,{withArrow:!0,hoverDelay:0,enterDelay:300,open:a,position:o.TooltipPosition.Top,content:s.jsx("div",{children:a?Qt:d.tooltip??Jt}),triggerElement:s.jsx("button",{ref:d.setActivatorNodeRef,"data-test-id":"block-item-wrapper-toolbar-btn",...d.draggableProps,className:re(["tw-bg-base tw-inline-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-rounded-sm",a?"tw-cursor-grabbing tw-bg-box-selected-pressed":"tw-cursor-grab hover:tw-bg-box-selected-hover"]),children:d.icon})},g):s.jsx(o.Tooltip,{withArrow:!0,enterDelay:300,hoverDelay:0,disabled:a,position:o.TooltipPosition.Top,content:s.jsx("div",{children:d.tooltip??""}),triggerElement:s.jsx("button",{"data-test-id":"block-item-wrapper-toolbar-btn",onClick:d.onClick,className:"tw-bg-base hover:tw-bg-box-selected-hover active:tw-bg-box-selected-pressed tw-cursor-pointer tw-inline-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-rounded-sm",children:d.icon})},g)),t.length>0&&s.jsx("div",{className:"tw-flex tw-flex-shrink-0 tw-flex-1 tw-h-6",children:s.jsx(o.Flyout,{isOpen:n&&!a,isTriggerDisabled:u,legacyFooter:!1,fitContent:!0,hug:!1,onOpenChange:r,trigger:s.jsx(o.Tooltip,{withArrow:!0,hoverDelay:0,enterDelay:300,disabled:a,position:o.TooltipPosition.Top,content:s.jsx("div",{children:"Options"}),triggerElement:s.jsx("div",{"data-test-id":"block-item-wrapper-toolbar-flyout",className:"tw-bg-base hover:tw-bg-box-selected-hover active:tw-bg-box-selected-pressed tw-cursor-pointer tw-inline-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-rounded-sm",children:s.jsx(o.IconDotsHorizontal16,{})})}),children:s.jsx(o.ActionMenu,{menuBlocks:t.map((d,g)=>({id:g.toString(),menuItems:d.map((c,p)=>({id:g.toString()+p.toString(),size:o.MenuItemContentSize.XSmall,title:c.title,style:c.style,onClick:()=>{r(!1),c.onClick()},initialValue:!0,decorator:s.jsx("div",{className:"tw-mr-2",children:c.icon})}))}))})})})]})}),jr=({children:e,toolbarFlyoutItems:t,toolbarItems:n,shouldHideWrapper:r,shouldHideComponent:a=!1,isDragging:u,shouldFillContainer:d,outlineOffset:g=2,shouldBeShown:c=!1})=>{const[p,h]=w.useState(c),[f,x]=w.useState(!1),T=w.useRef(null);if(w.useEffect(()=>{p||x(!0)},[p]),r)return e;const B=n==null?void 0:n.filter(D=>D!==void 0);return s.jsxs("div",{ref:T,onFocus:()=>x(!1),onPointerEnter:()=>x(!1),"data-test-id":"block-item-wrapper",style:{outlineOffset:g},className:re(["tw-relative tw-group tw-outline-1 tw-outline-box-selected-inverse",d&&"tw-flex-1 tw-h-full tw-w-full","hover:tw-outline focus-within:tw-outline",(p||c)&&"tw-outline",a&&"tw-opacity-0"]),children:[s.jsx("div",{style:{right:-1-g,bottom:`calc(100% - ${2+g}px)`},className:re(["tw-pointer-events-none tw-absolute tw-bottom-[calc(100%-4px)] tw-right-[-3px] tw-w-full tw-opacity-0 tw-z-10","group-hover:tw-opacity-100 group-focus:tw-opacity-100 focus-within:tw-opacity-100",(p||c)&&"tw-opacity-100"]),children:s.jsx(Rr,{isFlyoutOpen:p,isFlyoutDisabled:f,setIsFlyoutOpen:h,flyoutItems:t,items:B,isDragging:u})}),e]})},Lr=e=>e==="IMAGE"?s.jsx(o.IconImage24,{}):e==="VIDEO"?s.jsx(o.IconPlayFrame24,{}):e==="AUDIO"?s.jsx(o.IconMusicNote24,{}):s.jsx(o.IconDocument24,{}),gt=w.forwardRef(({item:e,isEditing:t,draggableProps:n,transformStyle:r,isDragging:a,isOverlay:u,isLoading:d,onDelete:g,onReplaceWithBrowse:c,onReplaceWithUpload:p},h)=>{const[f,x]=w.useState(),[T,{selectedFiles:B}]=fe.useFileInput({multiple:!0,accept:"image/*"}),[D,{results:U,doneAll:I}]=fe.useAssetUpload(),{focusProps:R,isFocusVisible:K}=qt.useFocusRing();w.useEffect(()=>{B&&D(B[0])},[B]),w.useEffect(()=>{I&&p(U[0])},[I,U]);const se=(j,$)=>{fetch(j).then(W=>{W.blob().then(Z=>{const le=URL.createObjectURL(Z),ie=document.createElement("a");ie.href=le,ie.download=$,ie.click()})})},q=d||B&&!I;return s.jsxs("button",{"aria-label":"Download attachment","data-test-id":"attachments-item",onClick:()=>se(e.genericUrl,e.fileName),ref:h,style:{...r,opacity:a&&!u?.3:1,fontFamily:"var(-f-theme-settings-body-font-family)"},className:re(["tw-cursor-pointer tw-text-left tw-w-full tw-relative tw-flex tw-gap-3 tw-px-5 tw-py-3 tw-items-center tw-group hover:tw-bg-box-neutral-hover",a?"tw-bg-box-neutral-hover":""]),children:[s.jsx("div",{className:"tw-text-text-weak group-hover:tw-text-box-neutral-inverse-hover",children:q?s.jsx(o.LoadingCircle,{size:o.LoadingCircleSize.Small}):Lr(e.objectType)}),s.jsxs("div",{className:"tw-text-s tw-flex-1 tw-min-w-0",children:[s.jsx("div",{className:"tw-whitespace-nowrap tw-overflow-hidden tw-text-ellipsis tw-font-bold tw-text-text-weak group-hover:tw-text-box-neutral-inverse-hover",children:e.title}),s.jsx("div",{className:"tw-text-text-weak",children:`${e.fileSizeHumanReadable} - ${e.extension}`})]}),t&&s.jsxs("div",{"data-test-id":"attachments-actionbar",className:re(["tw-flex tw-gap-0.5 group-focus:tw-opacity-100 focus-visible:tw-opacity-100 focus-within:tw-opacity-100 group-hover:tw-opacity-100",u||(f==null?void 0:f.id)===e.id?"tw-opacity-100":"tw-opacity-0"]),children:[s.jsx("button",{...R,...n,"aria-label":"Drag attachment",className:re([" tw-border-button-border tw-bg-button-background active:tw-bg-button-background-pressed tw-group tw-border tw-box-box tw-relative tw-flex tw-items-center tw-justify-center tw-outline-none tw-font-medium tw-rounded tw-h-9 tw-w-9 ",a||u?"tw-cursor-grabbing tw-bg-button-background-pressed hover:tw-bg-button-background-pressed":"tw-cursor-grab hover:tw-bg-button-background-hover",K&&o.FOCUS_STYLE,K&&"tw-z-[2]"]),children:s.jsx(o.IconGrabHandle20,{})}),s.jsx("div",{"data-test-id":"attachments-actionbar-flyout",children:s.jsx(o.Flyout,{placement:o.FlyoutPlacement.Right,isOpen:(f==null?void 0:f.id)===e.id,fitContent:!0,legacyFooter:!1,onOpenChange:j=>x(j?e:void 0),trigger:(j,$)=>s.jsx(o.Button,{ref:$,icon:s.jsx(o.IconPen20,{}),emphasis:o.ButtonEmphasis.Default,onClick:()=>x(e)}),children:s.jsx(o.ActionMenu,{menuBlocks:[{id:"menu",menuItems:[{id:"upload",size:o.MenuItemContentSize.XSmall,title:"Replace with upload",onClick:()=>{T(),x(void 0)},initialValue:!0,decorator:s.jsx("div",{className:"tw-mr-2",children:s.jsx(o.IconArrowCircleUp20,{})})},{id:"asset",size:o.MenuItemContentSize.XSmall,title:"Replace with asset",onClick:()=>{c(),x(void 0)},initialValue:!0,decorator:s.jsx("div",{className:"tw-mr-2",children:s.jsx(o.IconImageStack20,{})})}]},{id:"menu-delete",menuItems:[{id:"delete",size:o.MenuItemContentSize.XSmall,title:"Delete",style:o.MenuItemStyle.Danger,onClick:()=>{g(),x(void 0)},initialValue:!0,decorator:s.jsx("div",{className:"tw-mr-2",children:s.jsx(o.IconTrashBin20,{})})}]}]})})})]})]})});gt.displayName="AttachmentItem";const Nr=e=>{const{attributes:t,listeners:n,setNodeRef:r,transform:a,transition:u,isDragging:d}=De.useSortable({id:e.item.id}),g={transform:a?`translate(${a.x}px, ${a.y}px)`:"",transition:u,zIndex:d?2:1},c={...t,...n};return s.jsx(gt,{ref:r,isDragging:d,transformStyle:g,draggableProps:c,...e})},Br=({items:e=[],onDelete:t,onReplaceWithBrowse:n,onReplaceWithUpload:r,onBrowse:a,onUpload:u,onSorted:d,appBridge:g})=>{const[c,p]=w.useState(e),[h,f]=w.useState(!1),x=_.useSensors(_.useSensor(_.PointerSensor),_.useSensor(_.KeyboardSensor)),[T,B]=w.useState(void 0),[D,U]=w.useState(!1),[I,R]=w.useState([]),[K,se]=w.useState(null),q=fe.useEditorState(g),j=c==null?void 0:c.find(E=>E.id===T),[$,{results:W,doneAll:Z}]=fe.useAssetUpload({onUploadProgress:()=>!D&&U(!0)});w.useEffect(()=>{p(e)},[e]),w.useEffect(()=>{K&&(U(!0),$(K))},[K]),w.useEffect(()=>{(async()=>{Z&&(await u(W),U(!1))})()},[Z,W]);const le=()=>{f(!1),g.openAssetChooser(E=>{a(E),g.closeAssetChooser(),f(!0)},{multiSelection:!0,selectedValueIds:c.map(E=>E.id)})},ie=E=>{f(!1),g.openAssetChooser(async H=>{f(!0),g.closeAssetChooser(),R([...I,E.id]),await n(E,H[0]),R(I.filter(J=>J!==E.id))},{multiSelection:!1,selectedValueIds:c.map(H=>H.id)})},Ce=async(E,H)=>{R([...I,E.id]),await r(E,H),R(I.filter(J=>J!==E.id))},Y=E=>{const{active:H}=E;B(H.id)},ee=E=>{const{active:H,over:J}=E;if(J&&H.id!==J.id&&c){const Ne=c.findIndex(pe=>pe.id===H.id),Be=c.findIndex(pe=>pe.id===J.id),Te=De.arrayMove(c,Ne,Be);p(Te),d(Te)}B(void 0)};return q||((c==null?void 0:c.length)??0)>0?s.jsx(o.Tooltip,{withArrow:!0,position:o.TooltipPosition.Top,content:"Attachments",disabled:h,enterDelay:500,triggerElement:s.jsx("div",{"data-test-id":"attachments-flyout-button",children:s.jsx(o.Flyout,{placement:o.FlyoutPlacement.BottomRight,onOpenChange:E=>f(j?!0:E),isOpen:h,hug:!1,fitContent:!0,legacyFooter:!1,trigger:s.jsxs("div",{className:"tw-flex tw-text-[13px] tw-font-body tw-items-center tw-gap-1 tw-rounded-full tw-bg-box-neutral-strong-inverse hover:tw-bg-box-neutral-strong-inverse-hover active:tw-bg-box-neutral-strong-inverse-pressed tw-text-box-neutral-strong tw-outline tw-outline-1 tw-outline-offset-[1px] tw-p-[6px] tw-outline-line",children:[s.jsx(o.IconPaperclip16,{}),s.jsx("div",{children:e.length>0?e.length:"Add"}),s.jsx(o.IconCaretDown12,{})]}),children:s.jsxs("div",{className:"tw-w-[300px]",children:[c.length>0&&s.jsxs(_.DndContext,{sensors:x,collisionDetection:_.closestCenter,onDragStart:Y,onDragEnd:ee,modifiers:[ur.restrictToWindowEdges],children:[s.jsx(De.SortableContext,{items:c,strategy:De.rectSortingStrategy,children:s.jsx("div",{className:"tw-border-b tw-border-b-line",children:c.map(E=>s.jsx(Nr,{isEditing:q,isLoading:I.includes(E.id),item:E,onDelete:()=>t(E),onReplaceWithBrowse:()=>ie(E),onReplaceWithUpload:H=>Ce(E,H)},E.id))})}),s.jsx(_.DragOverlay,{children:j&&s.jsx(gt,{isOverlay:!0,isEditing:q,item:j,isDragging:!0,onDelete:()=>t(j),onReplaceWithBrowse:()=>ie(j),onReplaceWithUpload:E=>Ce(j,E)},T)})]}),q&&s.jsxs("div",{className:"tw-px-5 tw-py-3",children:[s.jsx("div",{className:"tw-font-body tw-font-medium tw-text-text tw-text-s tw-my-4",children:"Add attachments"}),s.jsx(o.AssetInput,{isLoading:D,size:o.AssetInputSize.Small,onUploadClick:E=>se(E),onLibraryClick:le})]})]})})})}):null},Ar=({onDownload:e})=>{const{isFocused:t,focusProps:n}=qt.useFocusRing();return s.jsx(o.Tooltip,{withArrow:!0,position:o.TooltipPosition.Top,content:"Download",enterDelay:500,triggerElement:s.jsx("button",{tabIndex:0,"aria-label":"Download",...n,className:re(["tw-outline-none tw-rounded",t&&o.FOCUS_STYLE]),onClick:e,onPointerDown:r=>r.preventDefault(),children:s.jsx("span",{"data-test-id":"download-button",className:"tw-flex tw-text-xs tw-font-body tw-items-center tw-gap-1 tw-rounded-full tw-bg-box-neutral-strong-inverse hover:tw-bg-box-neutral-strong-inverse-hover active:tw-bg-box-neutral-strong-inverse-pressed tw-text-box-neutral-strong tw-outline tw-outline-1 tw-outline-offset-1 tw-p-1.5 tw-outline-line",children:s.jsx(o.IconArrowCircleDown16,{})})})})},_r=({floatingOptions:e,...t})=>{const n=l.useEditorRef(),r=Gt.useFocused(),a=l.useFloatingLinkSelectors().mode(),u=l.useFloatingLinkSelectors().isOpen(n.id),{triggerFloatingLinkHotkeys:d}=l.getPluginOptions(n,l.ELEMENT_LINK);l.useHotkeys(d,h=>{l.triggerFloatingLinkInsert(n,{focused:r})&&h.preventDefault()},{enableOnContentEditable:!0},[r]);const{update:g,style:c,floating:p}=l.useVirtualFloatingLink({editorId:n.id,open:u&&a==="insert",getBoundingClientRect:l.getSelectionBoundingClientRect,whileElementsMounted:()=>{},...e});return w.useEffect(()=>{u?(g(),l.floatingLinkActions.updated(!0)):l.floatingLinkActions.updated(!1)},[u,g]),l.useFloatingLinkEscape(),{style:{...c,zIndex:1e3},...t,ref:l.useComposedRef(t.ref,p)}},Or=l.createComponentAs(e=>{var n;const t=_r({...e,floatingOptions:{strategy:"absolute"}});return((n=t.style)==null?void 0:n.display)==="none"?null:l.createElementAs("div",t)}),Fr=l.createComponentAs(e=>{var n;const t=Ra({...e,floatingOptions:{strategy:"absolute"}});return((n=t.style)==null?void 0:n.display)==="none"?null:l.createElementAs("div",t)});l.FloatingLink.EditRoot=Fr;l.FloatingLink.InsertRoot=Or;const $e=l.FloatingLink,Se="link-plugin",Zt=e=>{if(!e)return!1;const t=n=>n.some(r=>r.text?r.text!=="":r.children?t(r.children):!1);try{const n=JSON.parse(e);return t(n)}catch{return!1}},Mr=(e="p",t="",n)=>Zt(t)?t:JSON.stringify([{type:e,children:[{text:t,textStyle:e}],align:n}]),Dr=[_.KeyboardCode.Down,_.KeyboardCode.Right,_.KeyboardCode.Up,_.KeyboardCode.Left],en=(e,t)=>(n,{currentCoordinates:r,context:{activeNode:a}})=>{if(n.preventDefault(),Dr.includes(n.code)){const u=(a==null?void 0:a.offsetWidth)??0,d=(a==null?void 0:a.offsetHeight)??0;switch(n.code){case _.KeyboardCode.Right:return{...r,x:r.x+u+e};case _.KeyboardCode.Left:return{...r,x:r.x-u-e};case _.KeyboardCode.Down:return{...r,y:r.y+d+t};case _.KeyboardCode.Up:return{...r,y:r.y-d-t}}}},$r=(e,t,n)=>e===me.Custom?t:n,Ur=e=>e.map(tn),tn=e=>({id:e.id,title:e.name,colors:e.colors.map(t=>({alpha:t.alpha?t.alpha/255:1,red:t.red??0,green:t.green??0,blue:t.blue??0,name:t.name??""}))}),mt=(e,t)=>{const n=l.getAboveNode(e,{match:{type:l.ELEMENT_LINK}});return Array.isArray(n)?t(n[0]):""},Hr=e=>mt(e,t=>{var n,r;return((r=(n=t.chosenLink)==null?void 0:n.searchResult)==null?void 0:r.link)||""}),Vr=e=>mt(e,t=>t.url||""),zr=e=>{var t,n;return e.url||((n=(t=e.chosenLink)==null?void 0:t.searchResult)==null?void 0:n.link)||""},Wr=e=>mt(e,zr),nn=/^\/(document|r)\/\S+$/i,We=e=>{if(nn.test(e))return e;try{return new URL(e),e}catch{return`https://${e}`}},ft=e=>{if(nn.test(e))return!0;try{const t=new URL(e);return["http:","https:","mailto:","tel:"].includes(t.protocol)&&t.pathname!==""}catch{return!1}},Ue=e=>ft(We(e))||e==="",qr=(e,t)=>{const n=l.getAboveNode(e,{match:{type:L}});return Array.isArray(n)?t(n[0]):""},rn=e=>qr(e,t=>t.url??""),an=(e,{url:t,text:n="",buttonStyle:r="primary",target:a,children:u})=>({type:l.getPluginType(e,L),url:t,target:a,buttonStyle:r,children:u??[{text:n}]}),ht=l.createStore("floatingButton")({openEditorId:null,mouseDown:!1,updated:!1,url:"",text:"",buttonStyle:"primary",newTab:!1,mode:"",isEditing:!1}).extendActions(e=>({reset:()=>{e.url(""),e.text(""),e.buttonStyle("primary"),e.newTab(!1),e.mode(""),e.isEditing(!1)}})).extendActions(e=>({show:(t,n)=>{e.mode(t),e.isEditing(!1),e.openEditorId(n)},hide:()=>{e.reset(),e.openEditorId(null)}})).extendSelectors(e=>({isOpen:t=>e.openEditorId===t})),F=ht.set,z=ht.get,Ee=()=>ht.use,qe=e=>{const t=l.findNode(e,{match:{type:l.getPluginType(e,L)}});if(!t)return;const[n,r]=t;let a=l.getEditorString(e,r);F.url(n.url),F.newTab(n.target===void 0),a===n.url&&(a=""),F.text(a),F.isEditing(!0)},Gr=({floatingOptions:e,...t})=>{const n=l.useEditorRef(),r=l.usePlateSelectors(n.id).keyEditor(),a=Ee().mode(),u=Ee().isOpen(n.id),{triggerFloatingButtonHotkeys:d}=l.getPluginOptions(n,L),g=w.useCallback(()=>{const x=l.getAboveNode(n,{match:{type:l.getPluginType(n,L)}});if(x){const[,T]=x;return l.getRangeBoundingClientRect(n,{anchor:l.getStartPoint(n,T),focus:l.getEndPoint(n,T)})}return l.getDefaultBoundingClientRect()},[n]),c=u&&a==="edit",{update:p,style:h,floating:f}=cn({open:c,getBoundingClientRect:g,...e});return w.useEffect(()=>{const x=rn(n);if(x&&F.url(x),n.selection&&l.someNode(n,{match:{type:l.getPluginType(n,L)}})){F.show("edit",n.id),p();return}z.mode()==="edit"&&F.hide()},[n,r,p]),l.useHotkeys(d,x=>{x.preventDefault(),z.mode()==="edit"&&qe(n)},{enableOnContentEditable:!0},[]),sa(),un(),{style:{...h,zIndex:1e3},...t,ref:l.useComposedRef(t.ref,f)}},pt=(e,{focused:t}={})=>{z.mode()||!t||l.isRangeAcrossBlocks(e,{at:e.selection})||l.someNode(e,{match:{type:l.getPluginType(e,L)}})||(F.text(l.getEditorString(e,e.selection)),F.show("insert",e.id))},Kr=({floatingOptions:e,...t})=>{const n=l.useEditorRef(),r=Gt.useFocused(),a=Ee().mode(),u=Ee().isOpen(n.id),{triggerFloatingButtonHotkeys:d}=l.getPluginOptions(n,L);l.useHotkeys(d,h=>{h.preventDefault(),pt(n,{focused:r})},{enableOnContentEditable:!0},[r]);const{update:g,style:c,floating:p}=cn({open:u&&a==="insert",getBoundingClientRect:l.getSelectionBoundingClientRect,whileElementsMounted:void 0,...e});return w.useEffect(()=>{u&&g(),F.updated(u)},[u,g]),un(),{style:{...c,zIndex:1e3},...t,ref:l.useComposedRef(t.ref,p)}},Yr=e=>{const t=l.useEditorRef();return{onClick:w.useCallback(()=>{qe(t)},[t]),...e}},Xr=l.createComponentAs(e=>{const t=Yr(e);return l.createElementAs("button",t)}),sn=(e,t,n)=>{l.insertNodes(e,[an(e,t)],n)},yt=e=>{if(!e.selection)return;const{isUrl:t,forceSubmit:n}=l.getPluginOptions(e,L),r=z.url();if(!((t==null?void 0:t(r))||n))return;const u=z.text(),d=z.buttonStyle(),g=z.newTab()?void 0:"_self";return F.hide(),on(e,{url:r,text:u,buttonStyle:d,target:g,isUrl:c=>n||!t?!0:t(c)}),setTimeout(()=>{l.focusEditor(e,e.selection??void 0)},0),!0},ke=(e,t)=>l.withoutNormalizing(e,()=>{var n,r,a,u,d,g;if(t!=null&&t.split){if(l.getAboveNode(e,{at:(n=e.selection)==null?void 0:n.anchor,match:{type:l.getPluginType(e,L)}}))return l.splitNodes(e,{at:(r=e.selection)==null?void 0:r.anchor,match:h=>l.isElement(h)&&h.type===l.getPluginType(e,L)}),ke(e,{at:(a=e.selection)==null?void 0:a.anchor}),!0;if(l.getAboveNode(e,{at:(u=e.selection)==null?void 0:u.focus,match:{type:l.getPluginType(e,L)}}))return l.splitNodes(e,{at:(d=e.selection)==null?void 0:d.focus,match:h=>l.isElement(h)&&h.type===l.getPluginType(e,L)}),ke(e,{at:(g=e.selection)==null?void 0:g.focus}),!0}l.unwrapNodes(e,{match:{type:l.getPluginType(e,L)},...t})}),on=(e,{url:t,text:n,buttonStyle:r,target:a,insertTextInButton:u,insertNodesOptions:d,isUrl:g=l.getPluginOptions(e,L).isUrl})=>{var I;const c=e.selection;if(!c)return;const p=l.getAboveNode(e,{at:c,match:{type:l.getPluginType(e,L)}});if(u&&p)return e.insertText(t),!0;if(!(g!=null&&g(t)))return;if(l.isDefined(n)&&n.length===0&&(n=t),p)return Zr(t,e,p,a,r,n),!0;const h=l.findNode(e,{at:c,match:{type:l.getPluginType(e,L)}}),[f,x]=h??[],T=Jr(e,x,n);if(l.isExpanded(c))return Qr(p,e,t,r,a,n),!0;T&&l.removeNodes(e,{at:x});const B=l.getNodeProps(f??{}),D=(I=e.selection)==null?void 0:I.focus.path;if(!D)return;const U=l.getNodeLeaf(e,D);return n!=null&&n.length||(n=t),sn(e,{...B,url:t,target:a,children:[{...U,text:n}]},d),!0};function Jr(e,t,n){return t&&(n==null?void 0:n.length)&&n!==l.getEditorString(e,t)}function Qr(e,t,n,r,a,u){e?ke(t,{at:e[1]}):ke(t,{split:!0}),ln(t,{url:n,buttonStyle:r,target:a}),bt(t,{url:n,target:a,text:u})}function Zr(e,t,n,r,a,u){var d,g,c;(e!==((d=n[0])==null?void 0:d.url)||r!==((g=n[0])==null?void 0:g.target)||a!==((c=n[0])==null?void 0:c.buttonStyle))&&l.setNodes(t,{url:e,target:r,buttonStyle:a},{at:n[1]}),bt(t,{url:e,text:u,target:r})}const bt=(e,{text:t})=>{const n=l.getAboveNode(e,{match:{type:l.getPluginType(e,L)}});if(n){const[r,a]=n;if(t!=null&&t.length&&t!==l.getEditorString(e,a)){const u=r.children[0];l.replaceNodeChildren(e,{at:a,nodes:{...u,text:t},insertOptions:{select:!0}})}}},ln=(e,{url:t,buttonStyle:n,target:r,...a})=>{l.wrapNodes(e,{type:l.getPluginType(e,L),url:t,buttonStyle:n,target:r,children:[]},{split:!0,...a})},ea=e=>{const t=l.useEditorRef();return{onClick:w.useCallback(()=>{ke(t),l.focusEditor(t,t.selection??void 0)},[t]),...e}},ta=l.createComponentAs(e=>{const t=ea(e);return l.createElementAs(l.Button,t)}),na=l.createComponentAs(e=>{var n;const t=Gr(e);return((n=t.style)==null?void 0:n.display)==="none"?null:l.createElementAs("div",t)}),ra=l.createComponentAs(e=>{var n;const t=Kr(e);return((n=t.style)==null?void 0:n.display)==="none"?null:l.createElementAs("div",t)}),He={EditRoot:na,InsertRoot:ra,EditButton:Xr,UnlinkButton:ta},aa=e=>{const t=Ee().updated(),n=w.useRef(null);w.useEffect(()=>{n.current&&t&&setTimeout(()=>{var a;(a=n.current)==null||a.focus()},0)},[t]);const r=w.useCallback(a=>{F.url(a.target.value)},[]);return l.mergeProps({onChange:r,defaultValue:z.url()},{...e,ref:l.useComposedRef(e.ref,n)})},sa=()=>{const e=l.useEditorRef();l.useHotkeys("*",t=>{t.key==="Enter"&&yt(e)&&t.preventDefault()},{enableOnFormTags:["INPUT"]},[])},un=()=>{const e=l.useEditorRef();l.useHotkeys("escape",()=>{if(z.mode()==="edit"){if(z.isEditing()){F.show("edit",e.id),l.focusEditor(e,e.selection??void 0);return}F.hide()}},{enableOnFormTags:["INPUT"],enableOnContentEditable:!0},[])},ia=12,oa=-22,la=96,cn=e=>l.useVirtualFloating({placement:"bottom-start",middleware:[l.offset({mainAxis:ia,alignmentAxis:oa}),l.flip({padding:la})],...e}),dn=(e,{focused:t}={})=>{if(z.mode()==="edit"){qe(e);return}pt(e,{focused:t})},Ge={buttonPrimary:{fontFamily:"var(--f-theme-settings-button-primary-font-family)",fontSize:"var(--f-theme-settings-button-primary-font-size)",fontWeight:"var(--f-theme-settings-button-primary-font-weight)",lineHeight:"var(--f-theme-settings-button-primary-line-height)",paddingTop:"var(--f-theme-settings-button-primary-padding-top)",paddingRight:"var(--f-theme-settings-button-primary-padding-right)",paddingBottom:"var(--f-theme-settings-button-primary-padding-bottom)",paddingLeft:"var(--f-theme-settings-button-primary-padding-left)",fontStyle:"var(--f-theme-settings-button-primary-font-style)",textTransform:"var(--f-theme-settings-button-primary-text-transform)",backgroundColor:"var(--f-theme-settings-button-primary-background-color)",borderColor:"var(--f-theme-settings-button-primary-border-color)",borderRadius:"var(--f-theme-settings-button-primary-border-radius)",borderWidth:"var(--f-theme-settings-button-primary-border-width)",color:"var(--f-theme-settings-button-primary-color)",display:"inline-block",hover:{backgroundColor:"var(--f-theme-settings-button-primary-background-color-hover)",borderColor:"var(--f-theme-settings-button-primary-border-color-hover)",color:"var(--f-theme-settings-button-primary-color-hover)"}},buttonSecondary:{fontFamily:"var(--f-theme-settings-button-secondary-font-family)",fontSize:"var(--f-theme-settings-button-secondary-font-size)",fontWeight:"var(--f-theme-settings-button-secondary-font-weight)",lineHeight:"var(--f-theme-settings-button-secondary-line-height)",paddingTop:"var(--f-theme-settings-button-secondary-padding-top)",paddingRight:"var(--f-theme-settings-button-secondary-padding-right)",paddingBottom:"var(--f-theme-settings-button-secondary-padding-bottom)",paddingLeft:"var(--f-theme-settings-button-secondary-padding-left)",fontStyle:"var(--f-theme-settings-button-secondary-font-style)",textTransform:"var(--f-theme-settings-button-secondary-text-transform)",backgroundColor:"var(--f-theme-settings-button-secondary-background-color)",borderColor:"var(--f-theme-settings-button-secondary-border-color)",borderRadius:"var(--f-theme-settings-button-secondary-border-radius)",borderWidth:"var(--f-theme-settings-button-secondary-border-width)",color:"var(--f-theme-settings-button-secondary-color)",display:"inline-block",hover:{backgroundColor:"var(--f-theme-settings-button-secondary-background-color-hover)",borderColor:"var(--f-theme-settings-button-secondary-border-color-hover)",color:"var(--f-theme-settings-button-secondary-color-hover)"}},buttonTertiary:{fontFamily:"var(--f-theme-settings-button-tertiary-font-family)",fontSize:"var(--f-theme-settings-button-tertiary-font-size)",fontWeight:"var(--f-theme-settings-button-tertiary-font-weight)",lineHeight:"var(--f-theme-settings-button-tertiary-line-height)",paddingTop:"var(--f-theme-settings-button-tertiary-padding-top)",paddingRight:"var(--f-theme-settings-button-tertiary-padding-right)",paddingBottom:"var(--f-theme-settings-button-tertiary-padding-bottom)",paddingLeft:"var(--f-theme-settings-button-tertiary-padding-left)",fontStyle:"var(--f-theme-settings-button-tertiary-font-style)",textTransform:"var(--f-theme-settings-button-tertiary-text-transform)",backgroundColor:"var(--f-theme-settings-button-tertiary-background-color)",borderColor:"var(--f-theme-settings-button-tertiary-border-color)",borderRadius:"var(--f-theme-settings-button-tertiary-border-radius)",borderWidth:"var(--f-theme-settings-button-tertiary-border-width)",color:"var(--f-theme-settings-button-tertiary-color)",display:"inline-block",hover:{backgroundColor:"var(--f-theme-settings-button-tertiary-background-color-hover)",borderColor:"var(--f-theme-settings-button-tertiary-border-color-hover)",color:"var(--f-theme-settings-button-tertiary-color-hover)"}}},ua=e=>({...l.useElementProps({...e,elementToAttributes:n=>({url:n.href,buttonStyle:n.buttonStyle||"primary",target:n.target||"_blank"})}),onMouseOver:n=>{n.stopPropagation()}}),ca=e=>{const{href:t,target:n,buttonStyle:r}=ua(e),{attributes:a,children:u}=e;return s.jsx(da,{attributes:a,href:t,target:n,styles:Ge[`button${r.charAt(0).toUpperCase()+r.slice(1)}`],children:u})},da=({attributes:e,styles:t={hover:{}},children:n,href:r="#",target:a})=>{const[u,d]=w.useState(!1);return s.jsx("a",{...e,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),href:r,target:a,style:u?{...t,...t.hover}:t,children:n})};class ga extends o.MarkupElement{constructor(t=L,n=ca){super(t,n)}}const ma=({type:e,...t})=>{const n=l.useEditorRef(),r=!!l.isRangeInSameBlock(n,{at:n.selection}),a=!!(n!=null&&n.selection)&&l.someNode(n,{match:{type:e}});return s.jsx(l.ToolbarButton,{tooltip:o.getTooltip(r?`Button
|
|
28
|
+
${o.getHotkeyByPlatform("Ctrl+Shift+K")}`:"Buttons can only be set for a single text block."),classNames:o.getButtonClassNames(r),active:a,onMouseDown:async u=>{n&&(u.preventDefault(),u.stopPropagation(),l.focusEditor(n,n.selection??n.prevSelection??void 0),setTimeout(()=>{dn(n,{focused:!0})},0))},...t})},fa=({editor:e,id:t})=>s.jsx("div",{"data-plugin-id":t,children:s.jsx(ma,{type:l.getPluginType(e,L),icon:s.jsx("span",{className:"tw-p-2 tw-h-8 tw-justify-center tw-items-center tw-flex",children:s.jsx(o.IconButton16,{})}),styles:o.buttonStyles})}),ha=()=>{const e=aa({});return s.jsx("div",{"data-test-id":"floating-button-edit",className:"tw-bg-white tw-rounded tw-shadow tw-p-4 tw-min-w-[400px]",children:s.jsxs("span",{"data-test-id":"preview-button-flyout",className:"tw-flex tw-justify-between",children:[s.jsx("span",{className:"tw-pointer-events-none",style:M.p,children:e.defaultValue}),s.jsxs("span",{className:"tw-flex tw-gap-2",children:[s.jsx("span",{role:"button",tabIndex:0,"data-test-id":"edit-button-button",className:"tw-transition tw-cursor-pointer tw-rounded hover:tw-bg-black-10 tw-p-1",children:s.jsx(He.EditButton,{children:s.jsx(o.IconPen16,{})})}),s.jsx("span",{role:"button",tabIndex:0,"data-test-id":"remove-button-button",className:"tw-transition tw-cursor-pointer tw-rounded hover:tw-bg-black-10 tw-p-1",children:s.jsx(He.UnlinkButton,{children:s.jsx(o.IconTrashBin16,{})})})]})]})})},pa=({section:e,selectedUrl:t,onSelectUrl:n})=>{const r=e.permanentLink===t;return s.jsx("button",{"data-test-id":"internal-link-selector-section-link",className:o.merge(["tw-py-2 tw-px-2.5 tw-pl-14 tw-leading-5 tw-cursor-pointer tw-w-full",r?"tw-bg-box-selected-strong tw-text-box-selected-strong-inverse hover:tw-bg-box-selected-strong-hover:hover hover:tw-text-box-selected-strong-inverse-hover:hover":"hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover"]),onClick:()=>n(e.permanentLink),onFocus:()=>n(e.permanentLink),children:s.jsxs("div",{className:"tw-flex tw-flex-1 tw-space-x-2 tw-items-center tw-h-6",children:[s.jsx(o.IconDocumentText16,{}),s.jsx("span",{className:"tw-text-s",children:e.title}),s.jsx("span",{className:"tw-flex-auto tw-font-sans tw-text-xs tw-text-right",children:"Section"})]})})},ya=({page:e,selectedUrl:t,onSelectUrl:n,itemsToExpandInitially:r,appBridge:a})=>{const[u,d]=w.useState(e.id===r.documentId),g=e.permanentLink===t,{documentSections:c}=fe.useDocumentSection(a,e.id),p=[...c.values()],h=p.length>0;return w.useEffect(()=>{e.id===r.pageId&&d(!0)},[r,e.id]),s.jsxs(s.Fragment,{children:[s.jsx("div",{tabIndex:0,"data-test-id":"internal-link-selector-page-link",className:o.merge(["tw-py-2 tw-px-2.5 tw-leading-5 tw-cursor-pointer",h?"tw-pl-7":"tw-pl-12",g?"tw-bg-box-selected-strong tw-text-box-selected-strong-inverse hover:tw-bg-box-selected-strong-hover:hover hover:tw-text-box-selected-strong-inverse-hover:hover":"hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover"]),onClick:()=>n(e.permanentLink),onFocus:()=>n(e.permanentLink),children:s.jsxs("div",{className:"tw-flex tw-flex-1 tw-space-x-1 tw-items-center tw-h-6",children:[h&&s.jsx("button",{"data-test-id":"tree-item-toggle",className:"tw-flex tw-items-center tw-justify-center tw-p-1.5 tw-cursor-pointer",onClick:()=>d(!u),onFocus:()=>d(!u),children:s.jsx("div",{className:o.merge(["tw-transition-transform tw-w-0 tw-h-0 tw-font-normal tw-border-t-4 tw-border-t-transparent tw-border-b-4 tw-border-b-transparent tw-border-l-4 tw-border-l-x-strong",u?"tw-rotate-90":""])})}),s.jsx("span",{className:"tw-text-s",children:e.title}),s.jsx("span",{className:"tw-flex-auto tw-font-sans tw-text-xs tw-text-right",children:"Page"})]},e.id)}),u&&p.length>0&&p.map(f=>s.jsx(pa,{section:f,selectedUrl:t,onSelectUrl:n},f.id))]})},ba=({appBridge:e,documentId:t,selectedUrl:n,onSelectUrl:r,itemsToExpandInitially:a})=>{const[u,d]=w.useState([]),[g,c]=w.useState(!0),p=[...u.values()],h=!g&&p.length>0;return w.useEffect(()=>{e.getDocumentPagesByDocumentId(t).then(f=>{d(f)}).finally(()=>{c(!1)})},[]),g?s.jsx("div",{className:"tw-flex tw-justify-center tw-p-4",children:s.jsx(o.LoadingCircle,{})}):h?s.jsx(s.Fragment,{children:p.map(f=>s.jsx(ya,{page:f,appBridge:e,selectedUrl:n,onSelectUrl:r,itemsToExpandInitially:a},f.id))}):s.jsx("div",{className:"tw-py-2 tw-px-2.5 tw-pl-7 tw-leading-5 tw-text-s tw-text-text-weak",children:"This document does not contain any pages."})},wa=({document:e,appBridge:t,selectedUrl:n,onSelectUrl:r,itemsToExpandInitially:a})=>{const[u,d]=w.useState(e.id===a.documentId),g=e.permanentLink===n;return w.useEffect(()=>{e.id===a.documentId&&d(!0)},[a,e.id]),s.jsxs(s.Fragment,{children:[s.jsxs("button",{"data-test-id":"internal-link-selector-document-link",className:o.merge(["tw-flex tw-flex-1 tw-space-x-2 tw-items-center tw-py-2 tw-px-2.5 tw-leading-5 tw-cursor-pointer tw-w-full",g?"tw-bg-box-selected-strong tw-text-box-selected-strong-inverse hover:tw-bg-box-selected-strong-hover:hover hover:tw-text-box-selected-strong-inverse-hover:hover":"hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover"]),onClick:()=>r(e.permanentLink),onFocus:()=>r(e.permanentLink),children:[s.jsx("div",{role:"button",tabIndex:0,"data-test-id":"tree-item-toggle",className:"tw-flex tw-items-center tw-justify-center tw-p-1.5 tw-cursor-pointer",onClick:()=>d(!u),onFocus:()=>d(!u),children:s.jsx("div",{className:o.merge(["tw-transition-transform tw-w-0 tw-h-0 tw-font-normal tw-border-t-4 tw-border-t-transparent tw-border-b-4 tw-border-b-transparent tw-border-l-4 tw-border-l-x-strong",u?"tw-rotate-90":""])})}),s.jsx(o.IconColorFan16,{}),s.jsx("span",{className:"tw-text-s",children:e.title}),s.jsx("span",{className:"tw-flex-auto tw-font-sans tw-text-xs tw-text-right",children:"Document"})]}),u&&s.jsx(ba,{appBridge:t,documentId:e.id,selectedUrl:n,onSelectUrl:r,itemsToExpandInitially:a})]})},xa=({appBridge:e,selectedUrl:t,onSelectUrl:n})=>{const[r,a]=w.useState(!0),[u,d]=w.useState([]),[g,c]=w.useState({documentId:void 0,pageId:void 0}),p=[...u.values()];w.useEffect(()=>{t&&p.length>0&&h().then(f=>{c(f)})},[p.length]),w.useEffect(()=>{e.getAllDocuments().then(f=>{d(f)}).finally(()=>{a(!1)})},[]);const h=async()=>{const f={documentId:void 0,pageId:void 0};if(p.find(T=>T.permanentLink===t))return f;for(const T of p){const B=await e.getDocumentPagesByDocumentId(T.id);e.getAllDocuments();const D=[...B.values()];if(!!D.find(I=>I.permanentLink===t))return f.documentId=T.id,f;for(const I of D)if(!![...(await e.getDocumentSectionsByDocumentPageId(I.id)).values()].find(q=>q.permanentLink===t))return f.documentId=T.id,f.pageId=I.id,f}return f};return r?s.jsx("div",{className:"tw-flex tw-justify-center tw-p-4",children:s.jsx(o.LoadingCircle,{})}):s.jsx(s.Fragment,{children:p.map(f=>s.jsx(wa,{document:f,appBridge:e,selectedUrl:t,onSelectUrl:n,itemsToExpandInitially:g},f.id))})},va=({appBridge:e,url:t,onUrlChange:n})=>{const{open:r,isOpen:a,close:u}=cr.useOverlayTriggerState({}),[d,g]=w.useState(t),c=f=>{g(f)},p=f=>{f.key==="Enter"&&h()};w.useEffect(()=>{t&&!d&&g(t)},[t,d]);const h=()=>{n(d),u()};return s.jsxs("div",{"data-test-id":"internal-link-selector",onKeyDown:p,children:[s.jsx(o.Button,{icon:s.jsx(o.IconLink,{}),size:o.ButtonSize.Medium,type:o.ButtonType.Button,style:o.ButtonStyle.Default,emphasis:o.ButtonEmphasis.Default,onClick:()=>r(),children:"Internal link"}),s.jsxs(o.Modal,{zIndex:1001,onClose:()=>u(),isOpen:a,isDismissable:!0,children:[s.jsx(o.Modal.Header,{title:"Select internal link"}),s.jsx(o.Modal.Body,{children:s.jsx(xa,{appBridge:e,selectedUrl:d,onSelectUrl:c})}),s.jsx(o.Modal.Footer,{buttons:[{children:"Cancel",onClick:()=>u(),style:o.ButtonStyle.Default,emphasis:o.ButtonEmphasis.Default},{children:"Choose",onClick:f=>{f==null||f.preventDefault(),h()},style:o.ButtonStyle.Default,emphasis:o.ButtonEmphasis.Strong,disabled:!d}]})]})]})},gn=({state:e,onTextChange:t,onUrlChange:n,onToggleTab:r,onCancel:a,onSave:u,isValidUrlOrEmpty:d,hasValues:g,testId:c,appBridge:p,children:h})=>s.jsxs("div",{"data-test-id":c,className:"tw-bg-white tw-rounded tw-shadow tw-p-7 tw-min-w-[400px] tw-overflow-y-auto",children:[s.jsx(o.FormControl,{label:{children:"Text",htmlFor:"linkText",required:!0},children:s.jsx(o.TextInput,{id:"linkText",value:e.text,placeholder:"Link Text",onChange:t})}),h,s.jsxs("div",{className:"tw-pt-5",children:[s.jsx(o.FormControl,{label:{children:"URL",htmlFor:"url",required:!0},children:s.jsx(o.TextInput,{id:"url",value:e.url,placeholder:"https://example.com",focusOnMount:!0,onChange:n})}),!d(e==null?void 0:e.url)&&s.jsx("div",{className:"tw-text-red-65 tw-mt-3",children:"Please enter a valid URL."})]}),s.jsx("div",{className:"tw-mt-3",children:s.jsx(va,{url:e.url,appBridge:p,onUrlChange:n})}),s.jsx("div",{className:"tw-mt-3",children:s.jsx(o.Checkbox,{value:"new-tab",label:"Open in new tab",state:e.newTab,onChange:r})}),s.jsx("div",{className:"tw-mt-3",children:s.jsxs("div",{className:"tw-pt-5 tw-flex tw-gap-x-3 tw-justify-end tw-border-t tw-border-t-black-10",children:[s.jsx(o.Button,{onClick:a,size:o.ButtonSize.Medium,style:o.ButtonStyle.Default,emphasis:o.ButtonEmphasis.Default,children:"Cancel"}),s.jsx(o.Button,{onClick:u,size:o.ButtonSize.Medium,icon:s.jsx(o.IconCheckMark20,{}),disabled:!g||!d(e==null?void 0:e.url),children:"Save"})]})})]}),Sa=e=>{var n;const t=l.getAboveNode(e,{match:{type:L}});return Array.isArray(t)&&((n=t[0])==null?void 0:n.buttonStyle)||"primary"},Ea={url:"",text:"",buttonStyle:"primary",newTab:o.CheckboxState.Unchecked},ka=()=>{const[e,t]=w.useReducer((n,r)=>{const{type:a,payload:u}=r;switch(a){case"NEW_TAB":return{...n,newTab:o.CheckboxState.Checked};case"SAME_TAB":return{...n,newTab:o.CheckboxState.Unchecked};case"URL":case"TEXT":case"BUTTON_STYLE":case"INIT":return{...n,...u};default:return n}},Ea);return[e,t]},Ca=()=>{const e=l.useEditorRef(),[t,n]=ka();w.useEffect(()=>{const f=Sa(e);n({type:"INIT",payload:{text:z.text(),buttonStyle:f,newTab:z.newTab()?o.CheckboxState.Checked:o.CheckboxState.Unchecked,url:z.url()}})},[n,e]);const r=f=>{n({type:"TEXT",payload:{text:f}})},a=f=>{n({type:"BUTTON_STYLE",payload:{buttonStyle:f}})},u=f=>{n({type:"URL",payload:{url:f}})},d=f=>{n(f?{type:"NEW_TAB"}:{type:"SAME_TAB"})},g=()=>{F.hide()},c=f=>{if(!Ue(t.url)||!p)return;const x=We(t.url);F.text(t.text),F.url(x),F.buttonStyle(t.buttonStyle),F.newTab(t.newTab===o.CheckboxState.Checked),yt(e)&&(f==null||f.preventDefault())},p=t.url!==""&&t.text!=="",{appBridge:h}=l.getPluginOptions(e,L);return l.useHotkeys("enter",c,{enableOnFormTags:["INPUT"]},[]),{state:t,onTextChange:r,onButtonStyleChange:a,onUrlChange:u,onToggleTab:d,onCancel:g,onSave:c,hasValues:p,isValidUrlOrEmpty:Ue,appBridge:h}},Ta=()=>{const e=Ca(),{state:t,onButtonStyleChange:n}=e;return s.jsx(gn,{...e,testId:"floating-button-insert",children:s.jsx("div",{className:"tw-pt-5",children:s.jsxs(o.FormControl,{label:{children:"Button Style",htmlFor:"buttonStyle",required:!0},children:[s.jsx(nt,{id:"primary",styles:M.buttonPrimary,isActive:t.buttonStyle==="primary",onClick:()=>n("primary"),children:t.text||"Primary Button"}),s.jsx(nt,{id:"secondary",styles:M.buttonSecondary,isActive:t.buttonStyle==="secondary",onClick:()=>n("secondary"),children:t.text||"Secondary Button"}),s.jsx(nt,{id:"tertiary",styles:M.buttonTertiary,isActive:t.buttonStyle==="tertiary",onClick:()=>n("tertiary"),children:t.text||"Tertiary Button"})]})})})},nt=({id:e,styles:t,isActive:n,onClick:r,children:a})=>{const[u,d]=w.useState(!1),g=()=>t&&t.hover&&u?{...t,...t.hover}:t;return s.jsx("button",{"data-test-id":`floating-button-insert-${e}`,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:r,style:g(),className:n?"tw-outline tw-outline-1 tw-outline-violet-60 tw-outline-offset-2 tw-w-fit":"tw-w-fit",children:a})},Pa=()=>{const e=Ee().isEditing(),t=s.jsx(Ta,{}),n=e?t:s.jsx(ha,{});return s.jsxs(s.Fragment,{children:[s.jsx(He.InsertRoot,{children:t}),s.jsx(He.EditRoot,{children:n})]})},mn=(e,{type:t})=>{const{apply:n,normalizeNode:r}=e;return e.apply=a=>{if(a.type!=="set_selection"){n(a);return}const u=a.newProperties;if(!(u!=null&&u.focus)||!u.anchor||!l.isCollapsed(u)){n(a);return}const d=l.getAboveNode(e,{at:u,match:{type:l.getPluginType(e,L)}});if(d){const[,g]=d;let c;l.isStartPoint(e,u.focus,g)&&(c=l.getPreviousNodeEndPoint(e,g)),l.isEndPoint(e,u.focus,g)&&(c=l.getNextNodeStartPoint(e,g)),c&&(a.newProperties={anchor:c,focus:c})}n(a)},e.normalizeNode=([a,u])=>{if(a.type===l.getPluginType(e,L)){const d=e.selection;if(d&&l.isCollapsed(d)&&l.isEndPoint(e,d.focus,u)){const g=l.getNextNodeStartPoint(e,u);if(g)l.select(e,g);else{const c=dr.Path.next(u);l.insertNodes(e,{text:""},{at:c}),l.select(e,c)}}}r([a,u])},l.withRemoveEmptyNodes(e,l.mockPlugin({options:{types:t}}))},L="button",wt="button-plugin",fn=e=>l.createPluginFactory({key:L,isElement:!0,isInline:!0,props:({element:t})=>({nodeProps:{href:t==null?void 0:t.url,target:t==null?void 0:t.target}}),withOverrides:mn,renderAfterEditable:Pa,options:{isUrl:ft,rangeBeforeOptions:{matchString:" ",skipInvalid:!0,afterMatch:!0},triggerFloatingButtonHotkeys:"command+shift+k, ctrl+shift+k",appBridge:e},then:(t,{type:n})=>({deserializeHtml:{rules:[{validNodeName:"A",validClassName:"btn"}],getNode:r=>({type:n,url:r.getAttribute("href"),target:r.getAttribute("target")||"_blank"})}})})();class hn extends o.Plugin{constructor({styles:t=Ge,...n}){super(wt,{button:fa,markupElement:new ga,...n}),this.styles={},this.styles=t,this.appBridge=n==null?void 0:n.appBridge}plugins(){return[fn(this.appBridge)]}}var v=(e=>(e.heading1="heading1",e.heading2="heading2",e.heading3="heading3",e.heading4="heading4",e.custom1="custom1",e.custom2="custom2",e.custom3="custom3",e.quote="quote",e.imageCaption="imageCaption",e.imageTitle="imageTitle",e.p="p",e))(v||{});const M={heading1:{display:"inline-block",fontSize:"var(--f-theme-settings-heading1-font-size)",lineHeight:"var(--f-theme-settings-heading1-line-height)",marginTop:"var(--f-theme-settings-heading1-margin-top)",marginBottom:"var(--f-theme-settings-heading1-margin-bottom)",textDecoration:"var(--f-theme-settings-heading1-text-decoration)",fontStyle:"var(--f-theme-settings-heading1-font-style)",textTransform:"var(--f-theme-settings-heading1-text-transform)",letterSpacing:"var(--f-theme-settings-heading1-letter-spacing)",fontWeight:"var(--f-theme-settings-heading1-font-weight)",fontFamily:"var(--f-theme-settings-heading1-font-family)",color:"var(--f-theme-settings-heading1-color)"},heading2:{fontSize:"var(--f-theme-settings-heading2-font-size)",lineHeight:"var(--f-theme-settings-heading2-line-height)",marginTop:"var(--f-theme-settings-heading2-margin-top)",marginBottom:"var(--f-theme-settings-heading2-margin-bottom)",textDecoration:"var(--f-theme-settings-heading2-text-decoration)",fontStyle:"var(--f-theme-settings-heading2-font-style)",textTransform:"var(--f-theme-settings-heading2-text-transform)",letterSpacing:"var(--f-theme-settings-heading2-letter-spacing)",fontWeight:"var(--f-theme-settings-heading2-font-weight)",fontFamily:"var(--f-theme-settings-heading2-font-family)",color:"var(--f-theme-settings-heading2-color)"},heading3:{fontSize:"var(--f-theme-settings-heading3-font-size)",lineHeight:"var(--f-theme-settings-heading3-line-height)",marginTop:"var(--f-theme-settings-heading3-margin-top)",marginBottom:"var(--f-theme-settings-heading3-margin-bottom)",textDecoration:"var(--f-theme-settings-heading3-text-decoration)",fontStyle:"var(--f-theme-settings-heading3-font-style)",textTransform:"var(--f-theme-settings-heading3-text-transform)",letterSpacing:"var(--f-theme-settings-heading3-letter-spacing)",fontWeight:"var(--f-theme-settings-heading3-font-weight)",fontFamily:"var(--f-theme-settings-heading3-font-family)",color:"var(--f-theme-settings-heading3-color)"},heading4:{fontSize:"var(--f-theme-settings-heading4-font-size)",lineHeight:"var(--f-theme-settings-heading4-line-height)",marginTop:"var(--f-theme-settings-heading4-margin-top)",marginBottom:"var(--f-theme-settings-heading4-margin-bottom)",textDecoration:"var(--f-theme-settings-heading4-text-decoration)",fontStyle:"var(--f-theme-settings-heading4-font-style)",textTransform:"var(--f-theme-settings-heading4-text-transform)",letterSpacing:"var(--f-theme-settings-heading4-letter-spacing)",fontWeight:"var(--f-theme-settings-heading4-font-weight)",fontFamily:"var(--f-theme-settings-heading4-font-family)",color:"var(--f-theme-settings-heading4-color)"},custom1:{fontSize:"var(--f-theme-settings-custom1-font-size)",lineHeight:"var(--f-theme-settings-custom1-line-height)",marginTop:"var(--f-theme-settings-custom1-margin-top)",marginBottom:"var(--f-theme-settings-custom1-margin-bottom)",textDecoration:"var(--f-theme-settings-custom1-text-decoration)",fontStyle:"var(--f-theme-settings-custom1-font-style)",textTransform:"var(--f-theme-settings-custom1-text-transform)",letterSpacing:"var(--f-theme-settings-custom1-letter-spacing)",fontWeight:"var(--f-theme-settings-custom1-font-weight)",fontFamily:"var(--f-theme-settings-custom1-font-family)",color:"var(--f-theme-settings-custom1-color)"},custom2:{fontSize:"var(--f-theme-settings-custom2-font-size)",lineHeight:"var(--f-theme-settings-custom2-line-height)",marginTop:"var(--f-theme-settings-custom2-margin-top)",marginBottom:"var(--f-theme-settings-custom2-margin-bottom)",textDecoration:"var(--f-theme-settings-custom2-text-decoration)",fontStyle:"var(--f-theme-settings-custom2-font-style)",textTransform:"var(--f-theme-settings-custom2-text-transform)",letterSpacing:"var(--f-theme-settings-custom2-letter-spacing)",fontWeight:"var(--f-theme-settings-custom2-font-weight)",fontFamily:"var(--f-theme-settings-custom2-font-family)",color:"var(--f-theme-settings-custom2-color)"},custom3:{fontSize:"var(--f-theme-settings-custom3-font-size)",lineHeight:"var(--f-theme-settings-custom3-line-height)",marginTop:"var(--f-theme-settings-custom3-margin-top)",marginBottom:"var(--f-theme-settings-custom3-margin-bottom)",textDecoration:"var(--f-theme-settings-custom3-text-decoration)",fontStyle:"var(--f-theme-settings-custom3-font-style)",textTransform:"var(--f-theme-settings-custom3-text-transform)",letterSpacing:"var(--f-theme-settings-custom3-letter-spacing)",fontWeight:"var(--f-theme-settings-custom3-font-weight)",fontFamily:"var(--f-theme-settings-custom3-font-family)",color:"var(--f-theme-settings-custom3-color)"},p:{fontSize:"var(--f-theme-settings-body-font-size)",lineHeight:"var(--f-theme-settings-body-line-height)",marginTop:"var(--f-theme-settings-body-margin-top)",marginBottom:"var(--f-theme-settings-body-margin-bottom)",textDecoration:"var(--f-theme-settings-body-text-decoration)",fontStyle:"var(--f-theme-settings-body-font-style)",textTransform:"var(--f-theme-settings-body-text-transform)",letterSpacing:"var(--f-theme-settings-body-letter-spacing)",fontWeight:"var(--f-theme-settings-body-font-weight)",fontFamily:"var(--f-theme-settings-body-font-family)",color:"var(--f-theme-settings-body-color)"},quote:{fontSize:"var(--f-theme-settings-quote-font-size)",lineHeight:"var(--f-theme-settings-quote-line-height)",marginTop:"var(--f-theme-settings-quote-margin-top)",marginBottom:"var(--f-theme-settings-quote-margin-bottom)",textDecoration:"var(--f-theme-settings-quote-text-decoration)",fontStyle:"var(--f-theme-settings-quote-font-style)",textTransform:"var(--f-theme-settings-quote-text-transform)",letterSpacing:"var(--f-theme-settings-quote-letter-spacing)",fontWeight:"var(--f-theme-settings-quote-font-weight)",fontFamily:"var(--f-theme-settings-quote-font-family)",color:"var(--f-theme-settings-quote-color)"},imageCaption:{fontSize:"var(--f-theme-settings-image-caption-font-size)",lineHeight:"var(--f-theme-settings-image-caption-line-height)",marginTop:"var(--f-theme-settings-image-caption-margin-top)",marginBottom:"var(--f-theme-settings-image-caption-margin-bottom)",textDecoration:"var(--f-theme-settings-image-caption-text-decoration)",fontStyle:"var(--f-theme-settings-image-caption-font-style)",textTransform:"var(--f-theme-settings-image-caption-text-transform)",letterSpacing:"var(--f-theme-settings-image-caption-letter-spacing)",fontWeight:"var(--f-theme-settings-image-caption-font-weight)",fontFamily:"var(--f-theme-settings-image-caption-font-family)",color:"var(--f-theme-settings-image-caption-color)"},imageTitle:{fontSize:"var(--f-theme-settings-image-title-font-size)",lineHeight:"var(--f-theme-settings-image-title-line-height)",marginTop:"var(--f-theme-settings-image-title-margin-top)",marginBottom:"var(--f-theme-settings-image-title-margin-bottom)",textDecoration:"var(--f-theme-settings-image-title-text-decoration)",fontStyle:"var(--f-theme-settings-image-title-font-style)",textTransform:"var(--f-theme-settings-image-title-text-transform)",letterSpacing:"var(--f-theme-settings-image-title-letter-spacing)",fontWeight:"var(--f-theme-settings-image-title-font-weight)",fontFamily:"var(--f-theme-settings-image-title-font-family)",color:"var(--f-theme-settings-image-title-color)"},[Se]:{fontSize:"var(--f-theme-settings-link-font-size)",lineHeight:"var(--f-theme-settings-link-line-height)",marginTop:"var(--f-theme-settings-link-margin-top)",marginBottom:"var(--f-theme-settings-link-margin-bottom)",textDecoration:"var(--f-theme-settings-link-text-decoration)",fontStyle:"var(--f-theme-settings-link-font-style)",textTransform:"var(--f-theme-settings-link-text-transform)",letterSpacing:"var(--f-theme-settings-link-letter-spacing)",fontWeight:"var(--f-theme-settings-link-font-weight)",fontFamily:"var(--f-theme-settings-link-font-family)",color:"var(--f-theme-settings-link-color)"},...Ge},Ia=()=>{const e=l.useFloatingLinkUrlInput({});return s.jsx("div",{"data-test-id":"floating-link-edit",className:"tw-bg-white tw-rounded tw-shadow tw-p-4 tw-min-w-[400px]",children:s.jsxs("span",{"data-test-id":"preview-link-flyout",className:"tw-flex tw-justify-between",children:[s.jsx("span",{className:"tw-pointer-events-none",style:M.p,children:e.defaultValue}),s.jsxs("span",{className:"tw-flex tw-gap-2",children:[s.jsx("span",{role:"button",tabIndex:0,"data-test-id":"edit-link-button",className:"tw-transition tw-cursor-pointer tw-rounded hover:tw-bg-black-10 tw-p-1",children:s.jsx($e.EditButton,{children:s.jsx(o.IconPen16,{})})}),s.jsx("span",{role:"button",tabIndex:0,"data-test-id":"remove-link-button",className:"tw-transition tw-cursor-pointer tw-rounded hover:tw-bg-black-10 tw-p-1",children:s.jsx($e.UnlinkButton,{children:s.jsx(o.IconTrashBin16,{})})})]})]})})},Ra=({floatingOptions:e,...t})=>{const n=l.useEditorRef(),r=l.usePlateSelectors().keyEditor(),a=l.useFloatingLinkSelectors().mode(),u=l.useFloatingLinkSelectors().isOpen(n.id),{triggerFloatingLinkHotkeys:d="command+k, ctrl+k"}=l.getPluginOptions(n,l.ELEMENT_LINK),g=w.useCallback(()=>{const x=l.getAboveNode(n,{match:{type:l.getPluginType(n,l.ELEMENT_LINK)}});if(x){const[,T]=x;return l.getRangeBoundingClientRect(n,{anchor:l.getStartPoint(n,T),focus:l.getEndPoint(n,T)})}return l.getDefaultBoundingClientRect()},[n]),c=u&&a==="edit",{update:p,style:h,floating:f}=l.useVirtualFloatingLink({editorId:n.id,open:c,getBoundingClientRect:g,...e});return w.useEffect(()=>{const x=Wr(n);if(x&&l.floatingLinkActions.url(x),n.selection&&l.someNode(n,{match:{type:l.getPluginType(n,l.ELEMENT_LINK)}})){l.floatingLinkActions.show("edit",n.id),p();return}l.floatingLinkSelectors.mode()==="edit"&&l.floatingLinkActions.hide()},[n,r,p]),l.useHotkeys(d,x=>{x.preventDefault(),l.floatingLinkSelectors.mode()==="edit"&&l.triggerFloatingLinkEdit(n)},{enableOnContentEditable:!0},[]),l.useFloatingLinkEnter(),l.useFloatingLinkEscape(),{style:{...h,zIndex:1e3},...t,ref:l.useComposedRef(t.ref,f)}},ja={url:"",text:"",newTab:o.CheckboxState.Unchecked},La=()=>{const[e,t]=w.useReducer((n,r)=>{const{type:a,payload:u}=r;switch(a){case"NEW_TAB":return{...n,newTab:o.CheckboxState.Checked};case"SAME_TAB":return{...n,newTab:o.CheckboxState.Unchecked};case"URL":case"TEXT":case"INIT":return{...n,...u};default:return n}},ja);return[e,t]},Na=()=>{const e=l.useEditorRef(),[t,n]=La();w.useEffect(()=>{const h=Hr(e),f=Vr(e);n({type:"INIT",payload:{text:l.floatingLinkSelectors.text(),newTab:l.floatingLinkSelectors.newTab()?o.CheckboxState.Checked:o.CheckboxState.Unchecked,url:h&&f===""?h:l.floatingLinkSelectors.url()}})},[n,e]);const r=h=>{n({type:"TEXT",payload:{text:h}})},a=h=>{n({type:"URL",payload:{url:h}})},u=h=>{n(h?{type:"NEW_TAB"}:{type:"SAME_TAB"})},d=()=>{l.floatingLinkActions.hide()},g=h=>{if(!Ue(t.url)||!c)return;const f=We(t.url);l.floatingLinkActions.text(t.text),l.floatingLinkActions.url(f),l.floatingLinkActions.newTab(t.newTab===o.CheckboxState.Checked),l.submitFloatingLink(e)&&(h==null||h.preventDefault())},c=t.url!==""&&t.text!=="",{appBridge:p}=l.getPluginOptions(e,l.ELEMENT_LINK);return l.useHotkeys("enter",g,{enableOnFormTags:["INPUT"]},[]),{state:t,onTextChange:r,onUrlChange:a,onToggleTab:u,onCancel:d,onSave:g,hasValues:c,isValidUrlOrEmpty:Ue,appBridge:p}},Ba=()=>s.jsx(gn,{...Na(),testId:"floating-link-insert"}),Aa=({readOnly:e})=>{const t=l.useFloatingLinkSelectors().isEditing();if(e)return null;const n=s.jsx(Ba,{}),r=t?n:s.jsx(Ia,{});return s.jsxs(s.Fragment,{children:[s.jsx($e.InsertRoot,{children:n}),s.jsx($e.EditRoot,{children:r})]})},_a=({id:e,editorId:t})=>{const n=l.usePlateEditorState(l.useEventPlateId(t)),r=!!l.isRangeInSameBlock(n,{at:n.selection});return s.jsx("div",{"data-plugin-id":e,children:s.jsx(l.LinkToolbarButton,{tooltip:o.getTooltip(r?`Link
|
|
29
|
+
${o.getHotkeyByPlatform("Ctrl+K")}`:"Links can only be set for a single text block."),icon:s.jsx("span",{className:"tw-p-2 tw-h-8 tw-justify-center tw-items-center tw-flex",children:s.jsx(o.IconLink,{size:o.IconSize.Size16})}),classNames:o.getButtonClassNames(r),styles:{root:{width:"24px",height:"24px"}},actionHandler:"onMouseDown"})})},Oa=e=>({...l.useElementProps({...e,elementToAttributes:n=>{var r,a;return{href:n.url||((a=(r=n.chosenLink)==null?void 0:r.searchResult)==null?void 0:a.link)||"",target:n.target||"_blank"}}}),onMouseOver:n=>{n.stopPropagation()}}),Fa=e=>{const t=Oa(e),{attributes:n,children:r}=e;return s.jsx("a",{...n,href:t.href,target:t.target,style:M[Se],children:r})};class Ma extends o.MarkupElement{constructor(t=l.ELEMENT_LINK,n=Fa){super(t,n)}}const pn=e=>l.createPluginFactory({...l.createLinkPlugin(),renderAfterEditable:Aa,options:{isUrl:ft,rangeBeforeOptions:{matchString:" ",skipInvalid:!0,afterMatch:!0},triggerFloatingLinkHotkeys:"command+k, ctrl+k",appBridge:e}})();class yn extends o.Plugin{constructor(t,n=M[Se]){super(Se,{button:_a,markupElement:new Ma,...t}),this.styles={},this.styles=n,this.appBridge=t==null?void 0:t.appBridge}plugins(){return[pn(this.appBridge)]}}const Da="textstyle-custom1-plugin";class bn extends o.Plugin{constructor({styles:t=M.custom1,...n}={}){super(v.custom1,{label:"Custom 1",markupElement:new $a,...n}),this.styles={},this.styles=t}plugins(){return[Ua(this.styles)]}}class $a extends o.MarkupElement{constructor(t=Da,n=wn){super(t,n)}}const wn=({element:e,attributes:t,children:n,styles:r})=>{const a=e.align;return s.jsx("p",{...t,className:o.merge([a&&o.alignmentClassnames[a],o.getColumnBreakClasses(e),"a-custom1"]),children:s.jsx("span",{style:r,children:n})})},Ua=e=>l.createPluginFactory({key:v.custom1,isElement:!0,deserializeHtml:{rules:[{validClassName:v.custom1}]}})({component:t=>s.jsx(wn,{...t,styles:e})}),Ha="textstyle-custom2-plugin";class xn extends o.Plugin{constructor({styles:t=M.custom2,...n}={}){super(v.custom2,{label:"Custom 2",markupElement:new Va,...n}),this.styles={},this.styles=t}plugins(){return[za(this.styles)]}}class Va extends o.MarkupElement{constructor(t=Ha,n=vn){super(t,n)}}const vn=({element:e,attributes:t,children:n,styles:r})=>{const a=e.align;return s.jsx("p",{...t,className:o.merge([a&&o.alignmentClassnames[a],o.getColumnBreakClasses(e),"a-custom2"]),children:s.jsx("span",{style:r,children:n})})},za=e=>l.createPluginFactory({key:v.custom2,isElement:!0,deserializeHtml:{rules:[{validClassName:v.custom2}]}})({component:t=>s.jsx(vn,{...t,styles:e})}),Wa="textstyle-custom3-plugin";class Sn extends o.Plugin{constructor({styles:t=M.custom3,...n}={}){super(o.TextStyles.custom3,{label:"Custom 3",markupElement:new qa,...n}),this.styles={},this.styles=t}plugins(){return[Ga(this.styles)]}}class qa extends o.MarkupElement{constructor(t=Wa,n=En){super(t,n)}}const En=({element:e,attributes:t,children:n,styles:r})=>{const a=e.align;return s.jsx("p",{...t,className:o.merge([a&&o.alignmentClassnames[a],o.getColumnBreakClasses(e),"a-custom3"]),children:s.jsx("span",{style:r,children:n})})},Ga=e=>l.createPluginFactory({key:o.TextStyles.custom3,isElement:!0,deserializeHtml:{rules:[{validClassName:o.TextStyles.custom3}]}})({component:t=>s.jsx(En,{...t,styles:e})}),Ka="textstyle-heading1-plugin";class kn extends o.Plugin{constructor({styles:t=M.heading1,...n}={}){super(v.heading1,{label:"Heading 1",markupElement:new Ya,...n}),this.styles={},this.styles=t}plugins(){return[Xa(this.styles)]}}class Ya extends o.MarkupElement{constructor(t=Ka,n=st){super(t,n)}}const st=({element:e,attributes:t,children:n,styles:r})=>{const a=e.align;return s.jsx("h1",{...t,className:o.merge([a&&o.alignmentClassnames[a],o.getColumnBreakClasses(e),"a-h1"]),children:s.jsx("span",{style:r,children:n})})},Xa=e=>l.createPluginFactory({key:v.heading1,isElement:!0,component:st,deserializeHtml:{rules:[{validNodeName:["h1","H1"]}]}})({component:t=>s.jsx(st,{...t,styles:e})}),Ja="textstyle-heading2-plugin";class Cn extends o.Plugin{constructor({styles:t=M.heading2,...n}={}){super(v.heading2,{label:"Heading 2",markupElement:new Qa,...n}),this.styles={},this.styles=t}plugins(){return[Za(this.styles)]}}class Qa extends o.MarkupElement{constructor(t=Ja,n=it){super(t,n)}}const it=({element:e,attributes:t,children:n,styles:r})=>{const a=e.align;return s.jsx("h2",{...t,className:o.merge([a&&o.alignmentClassnames[a],o.getColumnBreakClasses(e)]),children:s.jsx("span",{style:r,children:n})})},Za=e=>l.createPluginFactory({key:v.heading2,isElement:!0,component:it,deserializeHtml:{rules:[{validNodeName:["h2","H2"]}]}})({component:t=>s.jsx(it,{...t,styles:e})}),es="textstyle-heading3-plugin";class Tn extends o.Plugin{constructor({styles:t=M.heading3,...n}={}){super(v.heading3,{label:"Heading 3",markupElement:new ts,...n}),this.styles={},this.styles=t}plugins(){return[ns(this.styles)]}}class ts extends o.MarkupElement{constructor(t=es,n=ot){super(t,n)}}const ot=({element:e,attributes:t,children:n,styles:r})=>{const a=e.align;return s.jsx("h3",{...t,className:o.merge([a&&o.alignmentClassnames[a],o.getColumnBreakClasses(e)]),children:s.jsx("span",{style:r,children:n})})},ns=e=>l.createPluginFactory({key:v.heading3,isElement:!0,component:ot,deserializeHtml:{rules:[{validNodeName:["h3","H3"]}]}})({component:t=>s.jsx(ot,{...t,styles:e})}),rs="textstyle-heading4-plugin";class Pn extends o.Plugin{constructor({styles:t=M.heading4,...n}={}){super(v.heading4,{label:"Heading 4",markupElement:new as,...n}),this.styles={},this.styles=t}plugins(){return[ss(this.styles)]}}class as extends o.MarkupElement{constructor(t=rs,n=lt){super(t,n)}}const lt=({element:e,attributes:t,children:n,styles:r})=>{const a=e.align;return s.jsx("h4",{...t,className:o.merge([a&&o.alignmentClassnames[a],o.getColumnBreakClasses(e)]),children:s.jsx("span",{style:r,children:n})})},ss=e=>l.createPluginFactory({key:v.heading4,isElement:!0,component:lt,deserializeHtml:{rules:[{validNodeName:["h4","H4"]}]}})({component:t=>s.jsx(lt,{...t,styles:e})}),is="textstyle-imageCaption-plugin";class In extends o.Plugin{constructor({styles:t=M.imageCaption,...n}={}){super(v.imageCaption,{label:"Image Caption",markupElement:new os,...n}),this.styles={},this.styles=t}plugins(){return[ls(this.styles)]}}class os extends o.MarkupElement{constructor(t=is,n=ut){super(t,n)}}const ut=({element:e,attributes:t,children:n,styles:r})=>{const a=e.align;return s.jsx("p",{...t,className:o.merge([a&&o.alignmentClassnames[a],o.getColumnBreakClasses(e),"a-image-caption"]),children:s.jsx("span",{style:r,children:n})})},ls=e=>l.createPluginFactory({key:v.imageCaption,isElement:!0,component:ut,deserializeHtml:{rules:[{validClassName:v.imageCaption}]}})({component:t=>s.jsx(ut,{...t,styles:e})}),us="textstyle-imageTitle-plugin";class Rn extends o.Plugin{constructor({styles:t=M.imageTitle,...n}={}){super(v.imageTitle,{label:"Image Title",markupElement:new cs,...n}),this.styles={},this.styles=t}plugins(){return[ds(this.styles)]}}class cs extends o.MarkupElement{constructor(t=us,n=ct){super(t,n)}}const ct=({element:e,attributes:t,children:n,styles:r})=>{const a=e.align;return s.jsx("p",{...t,className:o.merge([a&&o.alignmentClassnames[a],o.getColumnBreakClasses(e),"a-image-title"]),children:s.jsx("span",{style:r,children:n})})},ds=e=>l.createPluginFactory({key:v.imageTitle,isElement:!0,component:ct,deserializeHtml:{rules:[{validClassName:v.imageTitle}]}})({component:t=>s.jsx(ct,{...t,styles:e})});class jn extends o.Plugin{constructor({styles:t=M.p,...n}={}){super(v.p,{markupElement:new Nn,label:"Body Text",...n}),this.styles={},this.styles=t}plugins(){return[Bn(this.styles)]}}const Ln="tw-m-0 tw-px-0 tw-py-0",Ve=({element:e,attributes:t,children:n,styles:r})=>{const a=e.align,u=o.merge([a&&o.alignmentClassnames[a],Ln,o.getColumnBreakClasses(e)]);return s.jsx("p",{...t,className:u,style:r,children:n})};class Nn extends o.MarkupElement{constructor(t=v.p,n=Ve){super(t,n)}}const Bn=e=>l.createPluginFactory({...l.createParagraphPlugin(),key:v.p,isElement:!0,component:Ve})({component:t=>s.jsx(Ve,{...t,styles:e})}),gs="textstyle-quote-plugin";class An extends o.Plugin{constructor({styles:t=M.quote,...n}={}){super(v.quote,{label:"Quote",markupElement:new ms,...n}),this.styles={},this.styles=t}plugins(){return[_n(this.styles)]}}class ms extends o.MarkupElement{constructor(t=gs,n=ze){super(t,n)}}const ze=({element:e,attributes:t,children:n,styles:r})=>{const a=e.align;return s.jsx("blockquote",{...t,className:o.merge([a&&o.alignmentClassnames[a],o.getColumnBreakClasses(e),"a-quote"]),children:s.jsx("span",{style:r,children:n})})},_n=e=>l.createPluginFactory({key:v.quote,isElement:!0,component:ze,deserializeHtml:{rules:[{validNodeName:["blockquote","BLOCKQUOTE"]}]}})({component:t=>s.jsx(ze,{...t,styles:e})}),xt=[new kn,new Cn,new Tn,new Pn,new bn,new xn,new Sn,new An,new jn],ve=[v.heading1,v.heading2,v.heading3,v.heading4,v.custom1,v.custom2,v.custom3,v.quote,v.p],fs=[...xt,new In,new Rn],hs=[...ve,v.imageCaption,v.imageTitle],ps=e=>{let t=rt(e.text);t=t.replaceAll(`
|
|
30
|
+
`,"<br />");const{bold:n,italic:r,underline:a,strikethrough:u,code:d,subscript:g,superscript:c}=e;return n&&(t=`<span class="${o.BOLD_CLASSES}">${t}</span>`),r&&(t=`<span class="${o.ITALIC_CLASSES}">${t}</span>`),a&&(t=`<span class="${o.UNDERLINE_CLASSES}">${t}</span>`),u&&(t=`<span class="${o.STRIKETHROUGH_CLASSES}">${t}</span>`),d&&(t=`<span class="${o.CODE_CLASSES}">${t}</span>`),g?t=`<sub>${t}</sub>`:c&&(t=`<sup>${t}</sup>`),t},ae=e=>e?Object.keys(e).reduce((t,n)=>{const r=e[n];return r?`${t}${ys(n)}: ${r}; `:t},"").trim().replaceAll('"',"'"):"",ys=e=>e.replaceAll(/([A-Z])/g,"-$1").toLowerCase(),bs=(e,t,n,r)=>{const a=r[wt],u=e.buttonStyle??"primary",d=`button${u.charAt(0).toUpperCase()}${u.slice(1)}`,g=a[d],c=ae(g);return`<a href="${e.url}"
|
|
31
|
+
target="${e.target??"_blank"}"
|
|
32
|
+
style="${c}"
|
|
33
|
+
class="${n}"
|
|
34
|
+
onmouseenter="this.setAttribute('style', '${c} ${ae(g==null?void 0:g.hover)}');"
|
|
35
|
+
onmouseleave="this.setAttribute('style', '${ae(g)}');"
|
|
36
|
+
>${t}</a>`},ws=(e,t,n,r)=>{var a;if(e.chosenLink){const{chosenLink:u}=e;return`<a class="${n}" style="${ae(r[Se])}" target=${u!=null&&u.openInNewTab?"_blank":"_self"} href="${rt((a=u==null?void 0:u.searchResult)==null?void 0:a.link)}">${t}</a>`}return`<a class="${n}" style="${ae(r[Se])}" target="${(e==null?void 0:e.target)??"_blank"}" href="${rt(e.url)}">${t}</a>`},xs=(e,t,n,r)=>{const a=ae(n);return e.type===v.heading1?`<h1 class="${o.merge([r,"a-h1"])}">${X(t,a)}</h1>`:e.type===v.heading2?`<h2 class="${r}">${X(t,a)}</h2>`:e.type===v.heading3?`<h3 class="${r}">${X(t,a)}</h3>`:e.type===v.heading4?`<h4 class="${r}">${X(t,a)}</h4>`:e.type===v.custom1?`<p class="${o.merge([r,"a-custom1"])}">${X(t,a)}</p>`:e.type===v.custom2?`<p class="${o.merge([r,"a-custom2"])}">${X(t,a)}</p>`:e.type===v.custom3?`<p class="${o.merge([r,"a-custom3"])}">${X(t,a)}</p>`:e.type===v.quote?`<p class="${o.merge([r,"a-quote"])}">${X(t,a)}</p>`:e.type===v.imageTitle?`<p class="${o.merge([r,"a-image-title"])}">${X(t,a)}</p>`:e.type===v.imageCaption?`<p class="${o.merge([r,"a-image-caption"])}">${X(t,a)}</p>`:`<p class="${r}">${X(t,a)}</p>`},X=(e,t)=>`<span style="${t}">${e}</span>`,vs=(e,t,n,r)=>`<div disabled class="tw-flex tw-flex-row tw-pb-2 first-of-type:tw-ml-0 ${n}" style="margin-left:${(e.indent??0)*24}px;">
|
|
37
|
+
<div class="tw-flex tw-items-center tw-justify-center tw-select-none tw-mr-1.5">
|
|
38
|
+
<input
|
|
39
|
+
class="tw-w-4 tw-h-4 tw-m-0"
|
|
40
|
+
type="checkbox"
|
|
41
|
+
${e.checked?"checked":""}
|
|
42
|
+
onclick="return false;" />
|
|
43
|
+
</div>
|
|
44
|
+
<span class="${o.merge(["tw-flex-1 tw-focus:outline-none",e.checked?"!tw-line-through":""])}" style="${ae(r[e.children[0].textStyle])}">${t}</span>
|
|
45
|
+
</div>`,Ss=(e,{mentionable:t}={})=>{if(!t)return"";const n=document.createElement("div");return gr.render(o.MentionMarkupElementNode(t)({element:e}),n),n.innerHTML},vt=(e,t)=>e.reduce((n,r)=>(r.type===t&&n++,r.children?n+vt(r.children,t):n),0),On=(e,t,{mappedMentionable:n,nestingCount:r={}})=>{if(l.isText(e))return ps(e);const a=r[e.type]||vt([e],e.type);let u="";for(const g of e.children)u+=On(g,t,{nestingCount:{...r,[g.type]:a},mappedMentionable:n});const d=Es[e.type];return typeof d<"u"?d({classNames:Wt(e.breakAfterColumn,e.align),children:u,rootNestingCount:a,node:e,mappedMentionable:n,styles:t}):xs(e,u,t[e.type],Wt(e.breakAfterColumn,e.align))},Es={[l.ELEMENT_UL]:e=>`<ul class="${o.UL_CLASSES} ${e.classNames}">${e.children}</ul>`,[l.ELEMENT_OL]:({classNames:e,children:t,node:n,rootNestingCount:r})=>{const a=Math.max(r-vt([n],l.ELEMENT_OL),0);return`<ol class="${o.getOrderedListClasses(a)} ${e}" style="${ae(o.OL_STYLES)}">${t}</ol>`},[l.ELEMENT_LI]:({classNames:e,children:t,node:n,styles:r})=>`<li class="${e} ${o.LI_CLASSNAMES}" style="${ae(o.getLiStyles(n,r))}">${t}</li>`,[l.ELEMENT_LIC]:({classNames:e,children:t,node:n})=>`<p class="${e} ${o.getLicElementClassNames(n)}"><span>${t}</span></p>`,[l.ELEMENT_LINK]:({node:e,children:t,classNames:n,styles:r})=>ws(e,t,n,r),[L]:({node:e,children:t,classNames:n,styles:r})=>bs(e,t,n,r),[o.ELEMENT_CHECK_ITEM]:({node:e,children:t,classNames:n,styles:r})=>vs(e,t,n,r),[l.ELEMENT_MENTION]:({node:e,mappedMentionable:t})=>Ss(e,{mentionable:t})},Wt=(e,t)=>{const n="tw-break-words",r=e==="active"?"tw-break-after-column tw-break-inside-avoid-column":"",a=t?o.alignmentClassnames[t]:"";return o.merge([a,n,r])},ks=async(e,t=1,n="normal",r=new o.PluginComposer)=>{const a=o.parseRawValue({raw:e,plugins:r}),u=r.getStyles;return Promise.resolve(Cs(a,{columns:t,columnGap:n,styles:u}))},Cs=(e,{mentionable:t,columns:n=1,columnGap:r="normal",styles:a=M}={})=>{const u=t?o.mapMentionable(t):new Map;let d="";for(let g=0,c=e.length;g<c;g++){const p=e[g];Ts(p)?d+="<br />":d+=On(p,a,{mappedMentionable:u})}return n>1?`<div style="columns:${n}; column-gap:${r};">${d}</div>`:d},Ts=e=>{var t;return Array.isArray(e==null?void 0:e.children)?(t=e==null?void 0:e.children)==null?void 0:t.every(n=>n.text===""):!1},Ps=({value:e="",gap:t,columns:n,show:r=!0,plugins:a})=>{const[u,d]=w.useState(null);return w.useEffect(()=>{(async()=>d(await ks(e,n,t,a)))()},[e,n,t,a]),!r||u==="<br />"?null:u!==null?s.jsx("div",{className:"tw-w-full","data-test-id":"rte-content-html",dangerouslySetInnerHTML:{__html:u}}):s.jsx("div",{className:"tw-rounded-sm tw-bg-base-alt tw-animate-pulse tw-h-full tw-min-h-[10px] tw-w-full"})},Is=({id:e="rte",isEditing:t,value:n,columns:r,gap:a,placeholder:u,plugins:d,onTextChange:g,showSerializedText:c})=>{const[p,h]=w.useState(!1),f=x=>{g&&x!==n&&g(x),h(!1)};return w.useEffect(()=>{const x=T=>(T.preventDefault(),T.returnValue="Unprocessed changes");return p&&window.addEventListener("beforeunload",x),()=>window.removeEventListener("beforeunload",x)},[p]),t?s.jsx(o.RichTextEditor,{id:e,value:n,border:!1,placeholder:u,plugins:d,onValueChanged:()=>h(!0),onTextChange:f,hideExternalFloatingModals:x=>{z.isOpen(x)&&F.reset()}}):s.jsx(Ps,{value:n,columns:r,gap:a,show:c,plugins:d})},Rs=e=>new o.PluginComposer().setPlugin(new o.SoftBreakPlugin,new o.TextStylePlugin({textStyles:xt})).setPlugin([new o.BoldPlugin,new o.ItalicPlugin,new o.UnderlinePlugin,new o.StrikethroughPlugin,new yn({appBridge:e}),new hn({appBridge:e}),new o.CodePlugin],[new o.AlignLeftPlugin({validTypes:ve}),new o.AlignCenterPlugin({validTypes:ve}),new o.AlignRightPlugin({validTypes:ve}),new o.AlignJustifyPlugin({validTypes:ve}),new o.UnorderedListPlugin,new o.CheckboxListPlugin,new o.OrderedListPlugin,new o.ResetFormattingPlugin]),js="--f-theme-settings-",Ls=(e,t)=>{const{blockAssets:n,updateAssetIdsFromKey:r}=fe.useBlockAssets(e),a=(n==null?void 0:n[t])||[];return{onAddAttachments:async p=>{const h=a.map(f=>f.id);for(const f of p)h.push(f.id);await r(t,h)},onAttachmentDelete:async p=>{const h=a.filter(f=>f.id!==p.id).map(f=>f.id);await r(t,h)},onAttachmentReplace:async(p,h)=>{const f=a.map(x=>x.id===p.id?h.id:x.id);await r(t,f)},onAttachmentsSorted:async p=>{const h=p.map(f=>f.id);await r(t,h)},attachments:a}},Ns={start:["Space","Enter"],cancel:[],end:["Space","Enter","Escape"]},Bs=(e=0,t=0)=>{const n=en(e,t);return _.useSensors(_.useSensor(_.PointerSensor),_.useSensor(_.KeyboardSensor,{coordinateGetter:n,keyboardCodes:Ns}))},As=e=>{const t=e!=null&&e.id?`hasBackground${e.id}`:"hasBackground",n=e!=null&&e.id?`backgroundColor${e.id}`:"backgroundColor",r=e!=null&&e.preventDefaultColor?void 0:(e==null?void 0:e.defaultColor)||Cr,a=e!=null&&e.switchLabel?e.switchLabel:void 0;return{id:t,label:"Background",type:"switch",switchLabel:a,defaultValue:!!(e!=null&&e.defaultValue),on:[{id:n,defaultValue:r,type:"colorInput"}]}},_s=e=>{const t=e!=null&&e.id?`hasBorder_${e.id}`:"hasBorder",n=e!=null&&e.id?`borderSelection_${e.id}`:"borderSelection",r=e!=null&&e.id?`borderStyle_${e.id}`:"borderStyle",a=e!=null&&e.id?`borderWidth_${e.id}`:"borderWidth",u=e!=null&&e.id?`borderColor_${e.id}`:"borderColor",d=(e==null?void 0:e.defaultColor)||Xt,g=e!=null&&e.switchLabel?e.switchLabel:void 0;return{id:t,label:"Border",type:"switch",switchLabel:g,defaultValue:!!(e!=null&&e.defaultValue),on:[{id:n,type:"multiInput",onChange:c=>b.appendUnit(c,a),layout:b.MultiInputLayout.Columns,lastItemFullWidth:!0,blocks:[{id:r,type:"dropdown",defaultValue:Q.Solid,choices:[{value:Q.Solid,label:Q.Solid},{value:Q.Dotted,label:Q.Dotted},{value:Q.Dashed,label:Q.Dashed}]},{id:a,type:"input",defaultValue:Tr,rules:[b.numericalOrPixelRule,b.maximumNumericalOrPixelOrAutoRule(500)],placeholder:"e.g. 3px"},{id:u,type:"colorInput",defaultValue:d}]}],off:[]}},St=(e,t=oe.None)=>({id:e,type:"segmentedControls",defaultValue:t,choices:[{value:oe.None,label:"None"},{value:oe.Small,label:"S"},{value:oe.Medium,label:"M"},{value:oe.Large,label:"L"}]}),Os=e=>{const t=e!=null&&e.id?`hasRadius_${e.id}`:"hasRadius",n=e!=null&&e.id?`radiusValue_${e.id}`:"radiusValue",r=e!=null&&e.id?`radiusChoice_${e.id}`:"radiusChoice",a=(e==null?void 0:e.defaultRadius)||oe.None;return{id:t,label:"Corner radius",type:"switch",switchLabel:"Custom",defaultValue:!1,info:"Determining how rounded the corners are.",show:u=>{var d;return e!=null&&e.dependentSettingId?!!((d=u.getBlock(e.dependentSettingId))!=null&&d.value):!0},onChange:u=>b.presetCustomValue(u,r,n,(e==null?void 0:e.radiusStyleMap)||ge),on:[{id:n,type:"input",placeholder:"e.g. 10px",rules:[b.numericalOrPixelRule],onChange:u=>b.appendUnit(u,n)}],off:[St(r,a)]}},Fs=e=>{const t=e!=null&&e.id?`hasExtendedCustomRadius_${e.id}`:"hasExtendedCustomRadius",n=e!=null&&e.id?`extendedRadiusValue_${e.id}`:"extendedRadiusValue",r=e!=null&&e.id?`extendedRadiusChoice_${e.id}`:"extendedRadiusChoice",a=e!=null&&e.id?`extendedRadiusTopLeft_${e.id}`:"extendedRadiusTopLeft",u=e!=null&&e.id?`extendedRadiusTopRight_${e.id}`:"extendedRadiusTopRight",d=e!=null&&e.id?`extendedRadiusBottomLeft_${e.id}`:"extendedRadiusBottomLeft",g=e!=null&&e.id?`extendedRadiusBottomRight_${e.id}`:"extendedRadiusBottomRight";return{id:t,label:"Corner radius",type:"switch",switchLabel:"Custom",defaultValue:!1,info:"Determining how rounded the corners are.",show:c=>{var p;return e!=null&&e.dependentSettingId?!!((p=c.getBlock(e.dependentSettingId))!=null&&p.value):!0},onChange:c=>{b.presetCustomValue(c,r,a,ge),b.presetCustomValue(c,r,u,ge),b.presetCustomValue(c,r,d,ge),b.presetCustomValue(c,r,g,ge)},on:[{id:n,type:"multiInput",layout:b.MultiInputLayout.Columns,blocks:[{id:a,type:"input",label:"Top Left",rules:[b.numericalOrPixelRule],onChange:c=>b.appendUnit(c,a)},{id:u,type:"input",label:"Top Right",rules:[b.numericalOrPixelRule],onChange:c=>b.appendUnit(c,u)},{id:d,type:"input",label:"Bottom Left",rules:[b.numericalOrPixelRule],onChange:c=>b.appendUnit(c,d)},{id:g,type:"input",label:"Bottom Right",rules:[b.numericalOrPixelRule],onChange:c=>b.appendUnit(c,g)}]}],off:[St(r,e==null?void 0:e.defaultValue)]}},Ms=e=>{const t=e!=null&&e.id?e.id:"hasCustomSpacing",n=e!=null&&e.dependentSettingId?e.dependentSettingId:"columns",r=e!=null&&e.spacingChoiceId?e.spacingChoiceId:"spacingChoice",a=e!=null&&e.spacingCustomId?e.spacingCustomId:"spacingCustom",u=e!=null&&e.defaultValueChoices?e.defaultValueChoices:de.M;return{id:t,type:"switch",defaultValue:!1,switchLabel:"Custom",label:"Gutter",info:"An official nerds term for ‘gap’",onChange:d=>b.presetCustomValue(d,r,a,Yt),show:d=>{var g;return((g=d.getBlock(n))==null?void 0:g.value)!=="1"},on:[{id:a,type:"input",rules:[b.numericalOrPixelRule],onChange:d=>b.appendUnit(d,a)}],off:[{id:r,type:"slider",defaultValue:u,choices:[{value:de.Auto,label:"Auto"},{value:de.S,label:"S"},{value:de.M,label:"M"},{value:de.L,label:"L"}]}]}},Et=e=>({id:e,type:"segmentedControls",defaultValue:ce.None,choices:[{value:ce.None,label:"None"},{value:ce.Small,label:"S"},{value:ce.Medium,label:"M"},{value:ce.Large,label:"L"}]}),Ds=e=>{const t=e!=null&&e.id?`hasCustomMarginValue_${e==null?void 0:e.id}`:"hasCustomMarginValue",n=e!=null&&e.id?`marginValue_${e==null?void 0:e.id}`:"marginValue",r=e!=null&&e.id?`marginChoice_${e==null?void 0:e.id}`:"marginChoice";return{id:t,label:"Margin",type:"switch",switchLabel:"Custom",defaultValue:!1,info:"The spacing around UI elements to create more space",onChange:a=>b.presetCustomValue(a,r,n,(e==null?void 0:e.marginStyleMap)||xe),on:[{id:n,type:"input",placeholder:Le,rules:[b.numericalOrPixelRule,b.maximumNumericalOrPixelOrAutoRule(500)],onChange:a=>b.appendUnit(a,n)}],off:[Et(r)]}},$s=e=>{const t=e!=null&&e.id?`hasExtendedCustomMargin_${e==null?void 0:e.id}`:"hasExtendedCustomMargin",n=e!=null&&e.id?`extendedMarginValues_${e==null?void 0:e.id}`:"extendedMarginValues",r=e!=null&&e.id?`extendedMarginChoice_${e==null?void 0:e.id}`:"extendedMarginChoice",a=e!=null&&e.id?`extendedMarginTop_${e==null?void 0:e.id}`:"extendedMarginTop",u=e!=null&&e.id?`extendedMarginLeft_${e==null?void 0:e.id}`:"extendedMarginLeft",d=e!=null&&e.id?`extendedMarginRight_${e==null?void 0:e.id}`:"extendedMarginRight",g=e!=null&&e.id?`extendedMarginBottom_${e==null?void 0:e.id}`:"extendedMarginBottom";return{id:t,label:"Margin",type:"switch",switchLabel:"Custom",defaultValue:!1,info:"The spacing around UI elements to create more negative space",onChange:c=>{b.presetCustomValue(c,r,a,xe),b.presetCustomValue(c,r,u,xe),b.presetCustomValue(c,r,d,xe),b.presetCustomValue(c,r,g,xe)},on:[{id:n,type:"multiInput",layout:b.MultiInputLayout.Spider,blocks:[{id:a,type:"input",label:"Top",placeholder:Le,onChange:c=>b.appendUnit(c,a),rules:[b.numericalOrPixelRule,b.maximumNumericalOrPixelOrAutoRule(500)]},{id:u,type:"input",label:"Left",placeholder:Le,onChange:c=>b.appendUnit(c,u),rules:[b.numericalOrPixelRule,b.maximumNumericalOrPixelOrAutoRule(500)]},{id:d,type:"input",label:"Right",placeholder:Le,onChange:c=>b.appendUnit(c,d),rules:[b.numericalOrPixelRule,b.maximumNumericalOrPixelOrAutoRule(500)]},{id:g,type:"input",label:"Bottom",placeholder:Le,onChange:c=>b.appendUnit(c,g),rules:[b.numericalOrPixelRule,b.maximumNumericalOrPixelOrAutoRule(500)]}]}],off:[Et(r)]}},kt=e=>({id:e,type:"segmentedControls",defaultValue:ue.Small,choices:[{value:ue.None,label:"None"},{value:ue.Small,label:"S"},{value:ue.Medium,label:"M"},{value:ue.Large,label:"L"}]}),Us=e=>{const t=e!=null&&e.id?`hasCustomPaddingValue_${e==null?void 0:e.id}`:"hasCustomPaddingValue",n=e!=null&&e.id?`paddingValue_${e==null?void 0:e.id}`:"paddingValue",r=e!=null&&e.id?`paddingChoice_${e==null?void 0:e.id}`:"paddingChoice";return{id:t,label:"Padding",type:"switch",switchLabel:"Custom",defaultValue:!1,info:"The spacing around UI elements to create more negative space",onChange:a=>b.presetCustomValue(a,r,n,(e==null?void 0:e.paddingStyleMap)||we),on:[{id:n,type:"input",placeholder:je,rules:[b.numericalOrPixelRule,b.maximumNumericalOrPixelOrAutoRule(500)],onChange:a=>b.appendUnit(a,n)}],off:[kt(r)]}},Hs=e=>{const t=e!=null&&e.id?`hasExtendedCustomPadding_${e==null?void 0:e.id}`:"hasExtendedCustomPadding",n=e!=null&&e.id?`extendedPaddingValues_${e==null?void 0:e.id}`:"extendedPaddingValues",r=e!=null&&e.id?`extendedPaddingChoice_${e==null?void 0:e.id}`:"extendedPaddingChoice",a=e!=null&&e.id?`extendedPaddingTop_${e==null?void 0:e.id}`:"extendedPaddingTop",u=e!=null&&e.id?`extendedPaddingLeft_${e==null?void 0:e.id}`:"extendedPaddingLeft",d=e!=null&&e.id?`extendedPaddingRight_${e==null?void 0:e.id}`:"extendedPaddingRight",g=e!=null&&e.id?`extendedPaddingBottom_${e==null?void 0:e.id}`:"extendedPaddingBottom";return{id:t,label:"Padding",type:"switch",switchLabel:"Custom",defaultValue:!1,info:"The spacing around UI elements to create more negative space",onChange:c=>{b.presetCustomValue(c,r,a,we),b.presetCustomValue(c,r,u,we),b.presetCustomValue(c,r,d,we),b.presetCustomValue(c,r,g,we)},on:[{id:n,type:"multiInput",layout:b.MultiInputLayout.Spider,blocks:[{id:a,type:"input",label:"Top",placeholder:je,onChange:c=>b.appendUnit(c,a),rules:[b.numericalOrPixelRule,b.maximumNumericalOrPixelOrAutoRule(500)]},{id:u,type:"input",label:"Left",placeholder:je,onChange:c=>b.appendUnit(c,u),rules:[b.numericalOrPixelRule,b.maximumNumericalOrPixelOrAutoRule(500)]},{id:d,type:"input",label:"Right",placeholder:je,onChange:c=>b.appendUnit(c,d),rules:[b.numericalOrPixelRule,b.maximumNumericalOrPixelOrAutoRule(500)]},{id:g,type:"input",label:"Bottom",placeholder:je,onChange:c=>b.appendUnit(c,g),rules:[b.numericalOrPixelRule,b.maximumNumericalOrPixelOrAutoRule(500)]}]}],off:[kt(r)]}},Vs=e=>{const t=Ct(e==null?void 0:e.globalControlId);return{id:e!=null&&e.id?e.id:"downloadable",type:"switch",defaultValue:!1,label:"Downloadable",show:n=>{var r;return((r=n.getBlock(t))==null?void 0:r.value)===me.Custom}}},Ct=e=>e||"security",zs=e=>[{id:Ct(e),type:"segmentedControls",defaultValue:me.Global,choices:[{value:me.Global,label:"Global Settings"},{value:me.Custom,label:"Custom"}]},{id:"globalSettingsInfo",type:"notification",footer:b.createFooter({label:"Change global settings [here].",replace:{here:{event:"general-settings.open"}}})}];var Fn=(e=>(e.Main="main",e.Basics="basics",e.Layout="layout",e.Style="style",e.Security="security",e.Targets="targets",e))(Fn||{});const Ws=e=>e,qs=e=>e;exports.AllTextStylePlugins=fs;exports.AllTextStyles=hs;exports.Attachments=Br;exports.BUTTON_PLUGIN=wt;exports.BlockButtonStyles=Ge;exports.BlockInjectButton=hr;exports.BlockItemWrapper=jr;exports.BlockStyles=M;exports.BorderStyle=Q;exports.ButtonPlugin=hn;exports.Custom1Plugin=bn;exports.Custom2Plugin=xn;exports.Custom3Plugin=Sn;exports.DEFAULT_DRAGGING_TOOLTIP=Qt;exports.DEFAULT_DRAG_TOOLTIP=Jt;exports.DownloadButton=Ar;exports.ELEMENT_BUTTON=L;exports.GutterSpacing=de;exports.Heading1Plugin=kn;exports.Heading2Plugin=Cn;exports.Heading3Plugin=Tn;exports.Heading4Plugin=Pn;exports.ImageCaptionPlugin=In;exports.ImageTitlePlugin=Rn;exports.LinkPlugin=yn;exports.Margin=ce;exports.PARAGRAPH_CLASSES=Ln;exports.Padding=ue;exports.ParagraphMarkupElement=Nn;exports.ParagraphMarkupElementNode=Ve;exports.ParagraphPlugin=jn;exports.QuoteMarkupElementNode=ze;exports.QuotePlugin=An;exports.Radius=oe;exports.RichTextEditor=Is;exports.Sections=Fn;exports.Security=me;exports.THEME_PREFIX=js;exports.TextStylePluginsWithoutImage=xt;exports.TextStyles=v;exports.TextStylesWithoutImage=ve;exports.addHttps=We;exports.borderStyleMap=Kt;exports.convertToRteValue=Mr;exports.createButtonNode=an;exports.createButtonPlugin=fn;exports.createLinkPlugin=pn;exports.createParagraphPlugin=Bn;exports.createQuotePlugin=_n;exports.customCoordinatesGetterFactory=en;exports.defineBlock=Ws;exports.defineSettings=qs;exports.getBackgroundColorStyles=kr;exports.getBackgroundSettings=As;exports.getBorderRadiusSettings=Os;exports.getBorderRadiusSlider=St;exports.getBorderSettings=_s;exports.getBorderStyles=Pr;exports.getDefaultPluginsWithLinkChooser=Rs;exports.getExtendedBorderRadiusSettings=Fs;exports.getGutterSettings=Ms;exports.getMarginExtendedSettings=$s;exports.getMarginSettings=Ds;exports.getMarginSlider=Et;exports.getPaddingExtendedSettings=Hs;exports.getPaddingSettings=Us;exports.getPaddingSlider=kt;exports.getRadiusStyles=Ir;exports.getReadableColor=Sr;exports.getSecurityDownloadableSetting=Vs;exports.getSecurityGlobalControlId=Ct;exports.getSecurityGlobalControlSetting=zs;exports.getUrlFromEditor=rn;exports.gutterSpacingStyleMap=Yt;exports.hasRichTextValue=Zt;exports.insertButton=sn;exports.isDark=yr;exports.isDownloadable=$r;exports.joinClassNames=re;exports.mapAppBridgeColorPaletteToFonduePalette=tn;exports.mapAppBridgeColorPalettesToFonduePalettes=Ur;exports.marginStyleMap=xe;exports.moveItemInArray=Er;exports.paddingStyleMap=we;exports.radiusStyleMap=ge;exports.setAlpha=xr;exports.submitFloatingButton=yt;exports.toColorObject=vr;exports.toHex8String=br;exports.toHexString=wr;exports.toRgbaString=dt;exports.toShortRgba=he;exports.triggerFloatingButton=dn;exports.triggerFloatingButtonEdit=qe;exports.triggerFloatingButtonInsert=pt;exports.unwrapButton=ke;exports.upsertButton=on;exports.upsertButtonText=bt;exports.useAttachments=Ls;exports.useDndSensors=Bs;exports.withButton=mn;exports.wrapButton=ln;Object.keys(b).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>b[e]})});
|
|
46
|
+
//# sourceMappingURL=index.cjs.js.map
|