@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,41 @@
|
|
|
1
|
+
import { j as l } from "../../../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js";
|
|
2
|
+
import { createPluginFactory as m, createParagraphPlugin as c } from "@udecode/plate";
|
|
3
|
+
import { Plugin as u, merge as i, alignmentClassnames as g, getColumnBreakClasses as P, MarkupElement as x } from "@frontify/fondue";
|
|
4
|
+
import { TextStyles as a, BlockStyles as y } from "../styles.es.js";
|
|
5
|
+
class w extends u {
|
|
6
|
+
constructor({ styles: e = y.p, ...r } = {}) {
|
|
7
|
+
super(a.p, {
|
|
8
|
+
markupElement: new k(),
|
|
9
|
+
label: "Body Text",
|
|
10
|
+
...r
|
|
11
|
+
}), this.styles = {}, this.styles = e;
|
|
12
|
+
}
|
|
13
|
+
plugins() {
|
|
14
|
+
return [E(this.styles)];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const h = "tw-m-0 tw-px-0 tw-py-0", s = ({ element: t, attributes: e, children: r, styles: o }) => {
|
|
18
|
+
const n = t.align, p = i([n && g[n], h, P(t)]);
|
|
19
|
+
return /* @__PURE__ */ l.jsx("p", { ...e, className: p, style: o, children: r });
|
|
20
|
+
};
|
|
21
|
+
class k extends x {
|
|
22
|
+
constructor(e = a.p, r = s) {
|
|
23
|
+
super(e, r);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const E = (t) => m({
|
|
27
|
+
...c(),
|
|
28
|
+
key: a.p,
|
|
29
|
+
isElement: !0,
|
|
30
|
+
component: s
|
|
31
|
+
})({
|
|
32
|
+
component: (e) => /* @__PURE__ */ l.jsx(s, { ...e, styles: t })
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
h as PARAGRAPH_CLASSES,
|
|
36
|
+
k as ParagraphMarkupElement,
|
|
37
|
+
s as ParagraphMarkupElementNode,
|
|
38
|
+
w as ParagraphPlugin,
|
|
39
|
+
E as createParagraphPlugin
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=paragraphPlugin.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paragraphPlugin.es.js","sources":["../../../../../src/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { createParagraphPlugin as createPlateParagraphPlugin, createPluginFactory } from '@udecode/plate';\nimport { CSSProperties } from 'react';\nimport {\n MarkupElement,\n Plugin,\n PluginProps,\n TextStyleRenderElementProps,\n alignmentClassnames,\n getColumnBreakClasses,\n merge,\n} from '@frontify/fondue';\nimport { BlockStyles, TextStyles } from '../styles';\n\nexport class ParagraphPlugin extends Plugin {\n public styles: CSSProperties = {};\n constructor({ styles = BlockStyles.p, ...props }: PluginProps = {}) {\n super(TextStyles.p, {\n markupElement: new ParagraphMarkupElement(),\n label: 'Body Text',\n ...props,\n });\n this.styles = styles;\n }\n\n plugins() {\n return [createParagraphPlugin(this.styles)];\n }\n}\n\nexport const PARAGRAPH_CLASSES = 'tw-m-0 tw-px-0 tw-py-0';\n\nexport const ParagraphMarkupElementNode = ({ element, attributes, children, styles }: TextStyleRenderElementProps) => {\n const align = element.align as string;\n const className = merge([align && alignmentClassnames[align], PARAGRAPH_CLASSES, getColumnBreakClasses(element)]);\n return (\n <p {...attributes} className={className} style={styles}>\n {children}\n </p>\n );\n};\n\nexport class ParagraphMarkupElement extends MarkupElement {\n constructor(id = TextStyles.p, node = ParagraphMarkupElementNode) {\n super(id, node);\n }\n}\n\nexport const createParagraphPlugin = (styles: CSSProperties) =>\n createPluginFactory({\n ...createPlateParagraphPlugin(),\n key: TextStyles.p,\n isElement: true,\n component: ParagraphMarkupElementNode,\n })({\n component: (props: TextStyleRenderElementProps) => <ParagraphMarkupElementNode {...props} styles={styles} />,\n });\n"],"names":["ParagraphPlugin","Plugin","styles","BlockStyles","props","TextStyles","ParagraphMarkupElement","createParagraphPlugin","PARAGRAPH_CLASSES","ParagraphMarkupElementNode","element","attributes","children","align","className","merge","alignmentClassnames","getColumnBreakClasses","MarkupElement","id","node","createPluginFactory","createPlateParagraphPlugin"],"mappings":";;;;AAeO,MAAMA,UAAwBC,EAAO;AAAA,EAExC,YAAY,EAAE,QAAAC,IAASC,EAAY,GAAG,GAAGC,EAAuB,IAAA,IAAI;AAChE,UAAMC,EAAW,GAAG;AAAA,MAChB,eAAe,IAAIC,EAAuB;AAAA,MAC1C,OAAO;AAAA,MACP,GAAGF;AAAA,IAAA,CACN,GANL,KAAO,SAAwB,IAO3B,KAAK,SAASF;AAAA,EAClB;AAAA,EAEA,UAAU;AACN,WAAO,CAACK,EAAsB,KAAK,MAAM,CAAC;AAAA,EAC9C;AACJ;AAEO,MAAMC,IAAoB,0BAEpBC,IAA6B,CAAC,EAAE,SAAAC,GAAS,YAAAC,GAAY,UAAAC,GAAU,QAAAV,QAA0C;AAClH,QAAMW,IAAQH,EAAQ,OAChBI,IAAYC,EAAM,CAACF,KAASG,EAAoBH,CAAK,GAAGL,GAAmBS,EAAsBP,CAAO,CAAC,CAAC;AAChH,+BACK,KAAG,EAAA,GAAGC,GAAY,WAAAG,GAAsB,OAAOZ,GAC3C,UAAAU,EACL,CAAA;AAER;AAEO,MAAMN,UAA+BY,EAAc;AAAA,EACtD,YAAYC,IAAKd,EAAW,GAAGe,IAAOX,GAA4B;AAC9D,UAAMU,GAAIC,CAAI;AAAA,EAClB;AACJ;AAEa,MAAAb,IAAwB,CAACL,MAClCmB,EAAoB;AAAA,EAChB,GAAGC,EAA2B;AAAA,EAC9B,KAAKjB,EAAW;AAAA,EAChB,WAAW;AAAA,EACX,WAAWI;AACf,CAAC,EAAE;AAAA,EACC,WAAW,CAACL,4BAAwCK,GAA4B,EAAA,GAAGL,GAAO,QAAAF,GAAgB;AAC9G,CAAC;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { j as o } from "../../../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js";
|
|
2
|
+
import { createPluginFactory as a } from "@udecode/plate";
|
|
3
|
+
import { Plugin as m, MarkupElement as i, merge as c, alignmentClassnames as p, getColumnBreakClasses as g } from "@frontify/fondue";
|
|
4
|
+
import { TextStyles as r, BlockStyles as x } from "../styles.es.js";
|
|
5
|
+
const k = "textstyle-quote-plugin";
|
|
6
|
+
class f extends m {
|
|
7
|
+
constructor({ styles: e = x.quote, ...s } = {}) {
|
|
8
|
+
super(r.quote, {
|
|
9
|
+
label: "Quote",
|
|
10
|
+
markupElement: new y(),
|
|
11
|
+
...s
|
|
12
|
+
}), this.styles = {}, this.styles = e;
|
|
13
|
+
}
|
|
14
|
+
plugins() {
|
|
15
|
+
return [d(this.styles)];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
class y extends i {
|
|
19
|
+
constructor(e = k, s = l) {
|
|
20
|
+
super(e, s);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const l = ({ element: t, attributes: e, children: s, styles: u }) => {
|
|
24
|
+
const n = t.align;
|
|
25
|
+
return /* @__PURE__ */ o.jsx(
|
|
26
|
+
"blockquote",
|
|
27
|
+
{
|
|
28
|
+
...e,
|
|
29
|
+
className: c([n && p[n], g(t), "a-quote"]),
|
|
30
|
+
children: /* @__PURE__ */ o.jsx("span", { style: u, children: s })
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}, d = (t) => a({
|
|
34
|
+
key: r.quote,
|
|
35
|
+
isElement: !0,
|
|
36
|
+
component: l,
|
|
37
|
+
deserializeHtml: {
|
|
38
|
+
rules: [{ validNodeName: ["blockquote", "BLOCKQUOTE"] }]
|
|
39
|
+
}
|
|
40
|
+
})({
|
|
41
|
+
component: (e) => /* @__PURE__ */ o.jsx(l, { ...e, styles: t })
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
l as QuoteMarkupElementNode,
|
|
45
|
+
f as QuotePlugin,
|
|
46
|
+
d as createQuotePlugin
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=quotePlugin.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quotePlugin.es.js","sources":["../../../../../src/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { createPluginFactory } from '@udecode/plate';\nimport { CSSProperties } from 'react';\nimport {\n MarkupElement,\n Plugin,\n PluginProps,\n TextStyleRenderElementProps,\n alignmentClassnames,\n getColumnBreakClasses,\n merge,\n} from '@frontify/fondue';\nimport { BlockStyles, TextStyles } from '../styles';\n\nconst ID = 'textstyle-quote-plugin';\n\nexport class QuotePlugin extends Plugin {\n public styles: CSSProperties = {};\n constructor({ styles = BlockStyles.quote, ...props }: PluginProps = {}) {\n super(TextStyles.quote, {\n label: 'Quote',\n markupElement: new QuoteMarkupElement(),\n ...props,\n });\n this.styles = styles;\n }\n\n plugins() {\n return [createQuotePlugin(this.styles)];\n }\n}\n\nclass QuoteMarkupElement extends MarkupElement {\n constructor(id = ID, node = QuoteMarkupElementNode) {\n super(id, node);\n }\n}\n\nexport const QuoteMarkupElementNode = ({ element, attributes, children, styles }: TextStyleRenderElementProps) => {\n const align = element.align as string;\n return (\n <blockquote\n {...attributes}\n className={merge([align && alignmentClassnames[align], getColumnBreakClasses(element), 'a-quote'])}\n >\n <span style={styles}>{children}</span>\n </blockquote>\n );\n};\n\nexport const createQuotePlugin = (styles: CSSProperties) =>\n createPluginFactory({\n key: TextStyles.quote,\n isElement: true,\n component: QuoteMarkupElementNode,\n deserializeHtml: {\n rules: [{ validNodeName: ['blockquote', 'BLOCKQUOTE'] }],\n },\n })({\n component: (props: TextStyleRenderElementProps) => <QuoteMarkupElementNode {...props} styles={styles} />,\n });\n"],"names":["ID","QuotePlugin","Plugin","styles","BlockStyles","props","TextStyles","QuoteMarkupElement","createQuotePlugin","MarkupElement","id","node","QuoteMarkupElementNode","element","attributes","children","align","jsx","merge","alignmentClassnames","getColumnBreakClasses","createPluginFactory"],"mappings":";;;;AAeA,MAAMA,IAAK;AAEJ,MAAMC,UAAoBC,EAAO;AAAA,EAEpC,YAAY,EAAE,QAAAC,IAASC,EAAY,OAAO,GAAGC,EAAuB,IAAA,IAAI;AACpE,UAAMC,EAAW,OAAO;AAAA,MACpB,OAAO;AAAA,MACP,eAAe,IAAIC,EAAmB;AAAA,MACtC,GAAGF;AAAA,IAAA,CACN,GANL,KAAO,SAAwB,IAO3B,KAAK,SAASF;AAAA,EAClB;AAAA,EAEA,UAAU;AACN,WAAO,CAACK,EAAkB,KAAK,MAAM,CAAC;AAAA,EAC1C;AACJ;AAEA,MAAMD,UAA2BE,EAAc;AAAA,EAC3C,YAAYC,IAAKV,GAAIW,IAAOC,GAAwB;AAChD,UAAMF,GAAIC,CAAI;AAAA,EAClB;AACJ;AAEO,MAAMC,IAAyB,CAAC,EAAE,SAAAC,GAAS,YAAAC,GAAY,UAAAC,GAAU,QAAAZ,QAA0C;AAC9G,QAAMa,IAAQH,EAAQ;AAElB,SAAAI,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAGH;AAAA,MACJ,WAAWI,EAAM,CAACF,KAASG,EAAoBH,CAAK,GAAGI,EAAsBP,CAAO,GAAG,SAAS,CAAC;AAAA,MAEjG,UAACI,gBAAAA,EAAA,IAAA,QAAA,EAAK,OAAOd,GAAS,UAAAY,GAAS;AAAA,IAAA;AAAA,EAAA;AAG3C,GAEaP,IAAoB,CAACL,MAC9BkB,EAAoB;AAAA,EAChB,KAAKf,EAAW;AAAA,EAChB,WAAW;AAAA,EACX,WAAWM;AAAA,EACX,iBAAiB;AAAA,IACb,OAAO,CAAC,EAAE,eAAe,CAAC,cAAc,YAAY,GAAG;AAAA,EAC3D;AACJ,CAAC,EAAE;AAAA,EACC,WAAW,CAACP,4BAAwCO,GAAwB,EAAA,GAAGP,GAAO,QAAAF,GAAgB;AAC1G,CAAC;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { j as t } from "../../../../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js";
|
|
2
|
+
import { useState as c, useEffect as d } from "react";
|
|
3
|
+
import { PageLinks as l } from "./PageLinks.es.js";
|
|
4
|
+
import { merge as i, IconColorFan16 as b } from "@frontify/fondue";
|
|
5
|
+
const v = ({
|
|
6
|
+
document: e,
|
|
7
|
+
appBridge: a,
|
|
8
|
+
selectedUrl: w,
|
|
9
|
+
onSelectUrl: o,
|
|
10
|
+
itemsToExpandInitially: r
|
|
11
|
+
}) => {
|
|
12
|
+
const [s, n] = c(e.id === r.documentId), x = e.permanentLink === w;
|
|
13
|
+
return d(() => {
|
|
14
|
+
e.id === r.documentId && n(!0);
|
|
15
|
+
}, [r, e.id]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
16
|
+
/* @__PURE__ */ t.jsxs(
|
|
17
|
+
"button",
|
|
18
|
+
{
|
|
19
|
+
"data-test-id": "internal-link-selector-document-link",
|
|
20
|
+
className: i([
|
|
21
|
+
"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",
|
|
22
|
+
x ? "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"
|
|
23
|
+
]),
|
|
24
|
+
onClick: () => o(e.permanentLink),
|
|
25
|
+
onFocus: () => o(e.permanentLink),
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ t.jsx(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
role: "button",
|
|
31
|
+
tabIndex: 0,
|
|
32
|
+
"data-test-id": "tree-item-toggle",
|
|
33
|
+
className: "tw-flex tw-items-center tw-justify-center tw-p-1.5 tw-cursor-pointer",
|
|
34
|
+
onClick: () => n(!s),
|
|
35
|
+
onFocus: () => n(!s),
|
|
36
|
+
children: /* @__PURE__ */ t.jsx(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: i([
|
|
40
|
+
"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",
|
|
41
|
+
s ? "tw-rotate-90" : ""
|
|
42
|
+
])
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ t.jsx(b, {}),
|
|
48
|
+
/* @__PURE__ */ t.jsx("span", { className: "tw-text-s", children: e.title }),
|
|
49
|
+
/* @__PURE__ */ t.jsx("span", { className: "tw-flex-auto tw-font-sans tw-text-xs tw-text-right", children: "Document" })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
s && /* @__PURE__ */ t.jsx(
|
|
54
|
+
l,
|
|
55
|
+
{
|
|
56
|
+
appBridge: a,
|
|
57
|
+
documentId: e.id,
|
|
58
|
+
selectedUrl: w,
|
|
59
|
+
onSelectUrl: o,
|
|
60
|
+
itemsToExpandInitially: r
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
] });
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
v as DocumentLink
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=DocumentLink.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentLink.es.js","sources":["../../../../../../src/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLink.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AppBridgeBlock } from '@frontify/app-bridge';\nimport { useEffect, useState } from 'react';\nimport { PageLinks } from './PageLinks';\nimport { IconColorFan16, merge } from '@frontify/fondue';\nimport { InitiallyExpandedItems } from '../../LinkPlugin/FloatingLink/InsertLinkModal/types';\n\ntype DocumentLinkProps = {\n document: {\n id: number;\n title: string;\n permanentLink: string;\n };\n appBridge: AppBridgeBlock;\n selectedUrl: string;\n onSelectUrl: (url: string) => void;\n itemsToExpandInitially: InitiallyExpandedItems;\n};\n\nexport const DocumentLink = ({\n document,\n appBridge,\n selectedUrl,\n onSelectUrl,\n itemsToExpandInitially,\n}: DocumentLinkProps) => {\n const [isExpanded, setIsExpanded] = useState(document.id === itemsToExpandInitially.documentId);\n const isActive = document.permanentLink === selectedUrl;\n\n useEffect(() => {\n if (document.id === itemsToExpandInitially.documentId) {\n setIsExpanded(true);\n }\n }, [itemsToExpandInitially, document.id]);\n\n return (\n <>\n <button\n data-test-id=\"internal-link-selector-document-link\"\n className={merge([\n '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',\n isActive\n ? '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'\n : 'hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover',\n ])}\n onClick={() => onSelectUrl(document.permanentLink)}\n onFocus={() => onSelectUrl(document.permanentLink)}\n >\n <div\n role=\"button\"\n tabIndex={0}\n data-test-id=\"tree-item-toggle\"\n className=\"tw-flex tw-items-center tw-justify-center tw-p-1.5 tw-cursor-pointer\"\n onClick={() => setIsExpanded(!isExpanded)}\n onFocus={() => setIsExpanded(!isExpanded)}\n >\n <div\n className={merge([\n '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',\n isExpanded ? 'tw-rotate-90' : '',\n ])}\n ></div>\n </div>\n <IconColorFan16 />\n <span className=\"tw-text-s\">{document.title}</span>\n <span className=\"tw-flex-auto tw-font-sans tw-text-xs tw-text-right\">Document</span>\n </button>\n {isExpanded && (\n <PageLinks\n appBridge={appBridge}\n documentId={document.id}\n selectedUrl={selectedUrl}\n onSelectUrl={onSelectUrl}\n itemsToExpandInitially={itemsToExpandInitially}\n />\n )}\n </>\n );\n};\n"],"names":["DocumentLink","document","appBridge","selectedUrl","onSelectUrl","itemsToExpandInitially","isExpanded","setIsExpanded","useState","isActive","useEffect","jsxs","Fragment","merge","jsx","IconColorFan16","PageLinks"],"mappings":";;;;AAoBO,MAAMA,IAAe,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,wBAAAC;AACJ,MAAyB;AACf,QAAA,CAACC,GAAYC,CAAa,IAAIC,EAASP,EAAS,OAAOI,EAAuB,UAAU,GACxFI,IAAWR,EAAS,kBAAkBE;AAE5C,SAAAO,EAAU,MAAM;AACR,IAAAT,EAAS,OAAOI,EAAuB,cACvCE,EAAc,EAAI;AAAA,EAEvB,GAAA,CAACF,GAAwBJ,EAAS,EAAE,CAAC,GAIhCU,gBAAAA,EAAA,KAAAC,YAAA,EAAA,UAAA;AAAA,IAAAD,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,gBAAa;AAAA,QACb,WAAWE,EAAM;AAAA,UACb;AAAA,UACAJ,IACM,oKACA;AAAA,QAAA,CACT;AAAA,QACD,SAAS,MAAML,EAAYH,EAAS,aAAa;AAAA,QACjD,SAAS,MAAMG,EAAYH,EAAS,aAAa;AAAA,QAEjD,UAAA;AAAA,UAAAa,gBAAAA,EAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,MAAK;AAAA,cACL,UAAU;AAAA,cACV,gBAAa;AAAA,cACb,WAAU;AAAA,cACV,SAAS,MAAMP,EAAc,CAACD,CAAU;AAAA,cACxC,SAAS,MAAMC,EAAc,CAACD,CAAU;AAAA,cAExC,UAAAQ,gBAAAA,EAAA;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACG,WAAWD,EAAM;AAAA,oBACb;AAAA,oBACAP,IAAa,iBAAiB;AAAA,kBAAA,CACjC;AAAA,gBAAA;AAAA,cACJ;AAAA,YAAA;AAAA,UACL;AAAA,gCACCS,GAAe,EAAA;AAAA,UACfD,gBAAAA,EAAA,IAAA,QAAA,EAAK,WAAU,aAAa,YAAS,OAAM;AAAA,UAC3CA,gBAAAA,EAAA,IAAA,QAAA,EAAK,WAAU,sDAAqD,UAAQ,YAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACjF;AAAA,IACCR,KACGQ,gBAAAA,EAAA;AAAA,MAACE;AAAA,MAAA;AAAA,QACG,WAAAd;AAAA,QACA,YAAYD,EAAS;AAAA,QACrB,aAAAE;AAAA,QACA,aAAAC;AAAA,QACA,wBAAAC;AAAA,MAAA;AAAA,IACJ;AAAA,EAER,EAAA,CAAA;AAER;"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { j as c } from "../../../../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js";
|
|
2
|
+
import { LoadingCircle as L } from "@frontify/fondue";
|
|
3
|
+
import { useState as r, useEffect as d } from "react";
|
|
4
|
+
import { DocumentLink as v } from "./DocumentLink.es.js";
|
|
5
|
+
const U = ({ appBridge: e, selectedUrl: n, onSelectUrl: m }) => {
|
|
6
|
+
const [u, l] = r(!0), [f, I] = r([]), [g, p] = r({
|
|
7
|
+
documentId: void 0,
|
|
8
|
+
pageId: void 0
|
|
9
|
+
}), o = [...f.values()];
|
|
10
|
+
d(() => {
|
|
11
|
+
n && o.length > 0 && x().then((t) => {
|
|
12
|
+
p(t);
|
|
13
|
+
});
|
|
14
|
+
}, [o.length]), d(() => {
|
|
15
|
+
e.getAllDocuments().then((t) => {
|
|
16
|
+
I(t);
|
|
17
|
+
}).finally(() => {
|
|
18
|
+
l(!1);
|
|
19
|
+
});
|
|
20
|
+
}, []);
|
|
21
|
+
const x = async () => {
|
|
22
|
+
const t = {
|
|
23
|
+
documentId: void 0,
|
|
24
|
+
pageId: void 0
|
|
25
|
+
};
|
|
26
|
+
if (o.find((s) => s.permanentLink === n))
|
|
27
|
+
return t;
|
|
28
|
+
for (const s of o) {
|
|
29
|
+
const y = await e.getDocumentPagesByDocumentId(s.id);
|
|
30
|
+
e.getAllDocuments();
|
|
31
|
+
const a = [...y.values()];
|
|
32
|
+
if (!!a.find((i) => i.permanentLink === n))
|
|
33
|
+
return t.documentId = s.id, t;
|
|
34
|
+
for (const i of a)
|
|
35
|
+
if (!![...(await e.getDocumentSectionsByDocumentPageId(i.id)).values()].find((D) => D.permanentLink === n))
|
|
36
|
+
return t.documentId = s.id, t.pageId = i.id, t;
|
|
37
|
+
}
|
|
38
|
+
return t;
|
|
39
|
+
};
|
|
40
|
+
return u ? /* @__PURE__ */ c.jsx("div", { className: "tw-flex tw-justify-center tw-p-4", children: /* @__PURE__ */ c.jsx(L, {}) }) : /* @__PURE__ */ c.jsx(c.Fragment, { children: o.map((t) => /* @__PURE__ */ c.jsx(
|
|
41
|
+
v,
|
|
42
|
+
{
|
|
43
|
+
document: t,
|
|
44
|
+
appBridge: e,
|
|
45
|
+
selectedUrl: n,
|
|
46
|
+
onSelectUrl: m,
|
|
47
|
+
itemsToExpandInitially: g
|
|
48
|
+
},
|
|
49
|
+
t.id
|
|
50
|
+
)) });
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
U as DocumentLinks
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=DocumentLinks.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentLinks.es.js","sources":["../../../../../../src/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLinks.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AppBridgeBlock, Document } from '@frontify/app-bridge';\nimport { LoadingCircle } from '@frontify/fondue';\nimport { ReactElement, useEffect, useState } from 'react';\nimport { InitiallyExpandedItems } from '../../LinkPlugin/FloatingLink/InsertLinkModal/types';\nimport { DocumentLink } from './DocumentLink';\n\ntype DocumentLinksProps = {\n appBridge: AppBridgeBlock;\n selectedUrl: string;\n onSelectUrl: (url: string) => void;\n};\n\nexport const DocumentLinks = ({ appBridge, selectedUrl, onSelectUrl }: DocumentLinksProps): ReactElement => {\n const [isLoading, setIsLoading] = useState(true);\n const [documents, setDocuments] = useState<Document[]>([]);\n const [itemsToExpandInitially, setItemsToExpandInitially] = useState<InitiallyExpandedItems>({\n documentId: undefined,\n pageId: undefined,\n });\n\n const documentArray = [...documents.values()];\n\n useEffect(() => {\n if (selectedUrl && documentArray.length > 0) {\n findLocationOfSelectedUrl().then((items) => {\n setItemsToExpandInitially(items);\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [documentArray.length]);\n\n useEffect(() => {\n appBridge\n .getAllDocuments()\n .then((_documents) => {\n setDocuments(_documents);\n })\n .finally(() => {\n setIsLoading(false);\n });\n }, []);\n\n const findLocationOfSelectedUrl = async () => {\n const itemsToExpand: InitiallyExpandedItems = {\n documentId: undefined,\n pageId: undefined,\n };\n const selectedUrlIsDocument = documentArray.find((document) => document.permanentLink === selectedUrl);\n if (selectedUrlIsDocument) {\n return itemsToExpand;\n }\n for (const document of documentArray) {\n const pages = await appBridge.getDocumentPagesByDocumentId(document.id);\n appBridge.getAllDocuments();\n const pagesArray = [...pages.values()];\n const selectedUrlIsPage = !!pagesArray.find((page) => page.permanentLink === selectedUrl);\n if (selectedUrlIsPage) {\n itemsToExpand.documentId = document.id;\n return itemsToExpand;\n }\n for (const page of pagesArray) {\n const sections = await appBridge.getDocumentSectionsByDocumentPageId(page.id);\n const sectionsArray = [...sections.values()];\n const selectedUrlIsSection = !!sectionsArray.find((section) => section.permanentLink === selectedUrl);\n if (selectedUrlIsSection) {\n itemsToExpand.documentId = document.id;\n itemsToExpand.pageId = page.id;\n return itemsToExpand;\n }\n }\n }\n return itemsToExpand;\n };\n\n return isLoading ? (\n <div className=\"tw-flex tw-justify-center tw-p-4\">\n <LoadingCircle />\n </div>\n ) : (\n <>\n {documentArray.map((document) => {\n return (\n <DocumentLink\n key={document.id}\n document={document}\n appBridge={appBridge}\n selectedUrl={selectedUrl}\n onSelectUrl={onSelectUrl}\n itemsToExpandInitially={itemsToExpandInitially}\n />\n );\n })}\n </>\n );\n};\n"],"names":["DocumentLinks","appBridge","selectedUrl","onSelectUrl","isLoading","setIsLoading","useState","documents","setDocuments","itemsToExpandInitially","setItemsToExpandInitially","documentArray","useEffect","findLocationOfSelectedUrl","items","_documents","itemsToExpand","document","pages","pagesArray","page","section","jsx","LoadingCircle","Fragment","DocumentLink"],"mappings":";;;;AAcO,MAAMA,IAAgB,CAAC,EAAE,WAAAC,GAAW,aAAAC,GAAa,aAAAC,QAAoD;AACxG,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAI,GACzC,CAACC,GAAWC,CAAY,IAAIF,EAAqB,CAAE,CAAA,GACnD,CAACG,GAAwBC,CAAyB,IAAIJ,EAAiC;AAAA,IACzF,YAAY;AAAA,IACZ,QAAQ;AAAA,EAAA,CACX,GAEKK,IAAgB,CAAC,GAAGJ,EAAU,OAAQ,CAAA;AAE5C,EAAAK,EAAU,MAAM;AACR,IAAAV,KAAeS,EAAc,SAAS,KACZE,EAAA,EAAE,KAAK,CAACC,MAAU;AACxC,MAAAJ,EAA0BI,CAAK;AAAA,IAAA,CAClC;AAAA,EACL,GAED,CAACH,EAAc,MAAM,CAAC,GAEzBC,EAAU,MAAM;AACZ,IAAAX,EACK,gBAAgB,EAChB,KAAK,CAACc,MAAe;AAClB,MAAAP,EAAaO,CAAU;AAAA,IAAA,CAC1B,EACA,QAAQ,MAAM;AACX,MAAAV,EAAa,EAAK;AAAA,IAAA,CACrB;AAAA,EACT,GAAG,CAAE,CAAA;AAEL,QAAMQ,IAA4B,YAAY;AAC1C,UAAMG,IAAwC;AAAA,MAC1C,YAAY;AAAA,MACZ,QAAQ;AAAA,IAAA;AAGZ,QAD8BL,EAAc,KAAK,CAACM,MAAaA,EAAS,kBAAkBf,CAAW;AAE1F,aAAAc;AAEX,eAAWC,KAAYN,GAAe;AAClC,YAAMO,IAAQ,MAAMjB,EAAU,6BAA6BgB,EAAS,EAAE;AACtE,MAAAhB,EAAU,gBAAgB;AAC1B,YAAMkB,IAAa,CAAC,GAAGD,EAAM,OAAQ,CAAA;AAErC,UAD0B,CAAC,CAACC,EAAW,KAAK,CAACC,MAASA,EAAK,kBAAkBlB,CAAW;AAEpF,eAAAc,EAAc,aAAaC,EAAS,IAC7BD;AAEX,iBAAWI,KAAQD;AAIf,YAD6B,CAAC,CADR,CAAC,IADN,MAAMlB,EAAU,oCAAoCmB,EAAK,EAAE,GACzC,OAAQ,CAAA,EACE,KAAK,CAACC,MAAYA,EAAQ,kBAAkBnB,CAAW;AAEhG,iBAAAc,EAAc,aAAaC,EAAS,IACpCD,EAAc,SAASI,EAAK,IACrBJ;AAAA,IAGnB;AACO,WAAAA;AAAA,EAAA;AAGX,SAAOZ,IACHkB,gBAAAA,EAAA,IAAC,OAAI,EAAA,WAAU,oCACX,UAAAA,gBAAAA,EAAAA,IAACC,GAAc,CAAA,CAAA,GACnB,IAEAD,gBAAAA,EAAA,IAAAE,YAAA,EACK,UAAcb,EAAA,IAAI,CAACM,MAEZK,gBAAAA,EAAA;AAAA,IAACG;AAAA,IAAA;AAAA,MAEG,UAAAR;AAAA,MACA,WAAAhB;AAAA,MACA,aAAAC;AAAA,MACA,aAAAC;AAAA,MACA,wBAAAM;AAAA,IAAA;AAAA,IALKQ,EAAS;AAAA,EAAA,CAQzB,EACL,CAAA;AAER;"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { j as e } from "../../../../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js";
|
|
2
|
+
import { Button as x, IconLink as h, ButtonSize as j, ButtonType as y, ButtonStyle as l, ButtonEmphasis as r, Modal as o } from "@frontify/fondue";
|
|
3
|
+
import { useOverlayTriggerState as D } from "@react-stately/overlays";
|
|
4
|
+
import { useState as S, useEffect as B } from "react";
|
|
5
|
+
import { DocumentLinks as L } from "./DocumentLinks.es.js";
|
|
6
|
+
const g = ({ appBridge: p, url: s, onUrlChange: d }) => {
|
|
7
|
+
const { open: m, isOpen: u, close: i } = D({}), [n, c] = S(s), f = (t) => {
|
|
8
|
+
c(t);
|
|
9
|
+
}, k = (t) => {
|
|
10
|
+
t.key === "Enter" && a();
|
|
11
|
+
};
|
|
12
|
+
B(() => {
|
|
13
|
+
s && !n && c(s);
|
|
14
|
+
}, [s, n]);
|
|
15
|
+
const a = () => {
|
|
16
|
+
d(n), i();
|
|
17
|
+
};
|
|
18
|
+
return /* @__PURE__ */ e.jsxs("div", { "data-test-id": "internal-link-selector", onKeyDown: k, children: [
|
|
19
|
+
/* @__PURE__ */ e.jsx(
|
|
20
|
+
x,
|
|
21
|
+
{
|
|
22
|
+
icon: /* @__PURE__ */ e.jsx(h, {}),
|
|
23
|
+
size: j.Medium,
|
|
24
|
+
type: y.Button,
|
|
25
|
+
style: l.Default,
|
|
26
|
+
emphasis: r.Default,
|
|
27
|
+
onClick: () => m(),
|
|
28
|
+
children: "Internal link"
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ e.jsxs(o, { zIndex: 1001, onClose: () => i(), isOpen: u, isDismissable: !0, children: [
|
|
32
|
+
/* @__PURE__ */ e.jsx(o.Header, { title: "Select internal link" }),
|
|
33
|
+
/* @__PURE__ */ e.jsx(o.Body, { children: /* @__PURE__ */ e.jsx(L, { appBridge: p, selectedUrl: n, onSelectUrl: f }) }),
|
|
34
|
+
/* @__PURE__ */ e.jsx(
|
|
35
|
+
o.Footer,
|
|
36
|
+
{
|
|
37
|
+
buttons: [
|
|
38
|
+
{
|
|
39
|
+
children: "Cancel",
|
|
40
|
+
onClick: () => i(),
|
|
41
|
+
style: l.Default,
|
|
42
|
+
emphasis: r.Default
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
children: "Choose",
|
|
46
|
+
onClick: (t) => {
|
|
47
|
+
t == null || t.preventDefault(), a();
|
|
48
|
+
},
|
|
49
|
+
style: l.Default,
|
|
50
|
+
emphasis: r.Strong,
|
|
51
|
+
disabled: !n
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
] })
|
|
57
|
+
] });
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
g as LinkSelector
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=LinkSelector.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkSelector.es.js","sources":["../../../../../../src/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AppBridgeBlock } from '@frontify/app-bridge';\nimport { Button, ButtonEmphasis, ButtonSize, ButtonStyle, ButtonType, IconLink, Modal } from '@frontify/fondue';\nimport { useOverlayTriggerState } from '@react-stately/overlays';\nimport { KeyboardEvent, ReactElement, useEffect, useState } from 'react';\nimport { DocumentLinks } from './DocumentLinks';\n\ntype LinkSelectorProps = {\n appBridge: AppBridgeBlock;\n url: string;\n onUrlChange: (value: string) => void;\n};\n\nexport const LinkSelector = ({ appBridge, url, onUrlChange }: LinkSelectorProps): ReactElement => {\n const { open: openLinkTree, isOpen: isLinkTreeOpen, close: closeLinkTree } = useOverlayTriggerState({});\n const [selectedUrl, setSelectedUrl] = useState<string>(url);\n\n const onSelectUrl = (url: string) => {\n setSelectedUrl(url);\n };\n\n const onPressEnter = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n saveLink();\n }\n };\n\n useEffect(() => {\n if (url && !selectedUrl) {\n setSelectedUrl(url);\n }\n }, [url, selectedUrl]);\n\n const saveLink = () => {\n onUrlChange(selectedUrl);\n closeLinkTree();\n };\n\n return (\n <div data-test-id=\"internal-link-selector\" onKeyDown={onPressEnter}>\n <Button\n icon={<IconLink />}\n size={ButtonSize.Medium}\n type={ButtonType.Button}\n style={ButtonStyle.Default}\n emphasis={ButtonEmphasis.Default}\n onClick={() => openLinkTree()}\n >\n Internal link\n </Button>\n <Modal zIndex={1001} onClose={() => closeLinkTree()} isOpen={isLinkTreeOpen} isDismissable>\n <Modal.Header title=\"Select internal link\" />\n <Modal.Body>\n <DocumentLinks appBridge={appBridge} selectedUrl={selectedUrl} onSelectUrl={onSelectUrl} />\n </Modal.Body>\n <Modal.Footer\n buttons={[\n {\n children: 'Cancel',\n onClick: () => closeLinkTree(),\n style: ButtonStyle.Default,\n emphasis: ButtonEmphasis.Default,\n },\n {\n children: 'Choose',\n onClick: (event) => {\n event?.preventDefault();\n saveLink();\n },\n style: ButtonStyle.Default,\n emphasis: ButtonEmphasis.Strong,\n disabled: !selectedUrl,\n },\n ]}\n />\n </Modal>\n </div>\n );\n};\n"],"names":["LinkSelector","appBridge","url","onUrlChange","openLinkTree","isLinkTreeOpen","closeLinkTree","useOverlayTriggerState","selectedUrl","setSelectedUrl","useState","onSelectUrl","onPressEnter","event","saveLink","useEffect","jsxs","jsx","Button","IconLink","ButtonSize","ButtonType","ButtonStyle","ButtonEmphasis","Modal","DocumentLinks"],"mappings":";;;;;AAcO,MAAMA,IAAe,CAAC,EAAE,WAAAC,GAAW,KAAAC,GAAK,aAAAC,QAAmD;AACxF,QAAA,EAAE,MAAMC,GAAc,QAAQC,GAAgB,OAAOC,EAAc,IAAIC,EAAuB,CAAA,CAAE,GAChG,CAACC,GAAaC,CAAc,IAAIC,EAAiBR,CAAG,GAEpDS,IAAc,CAACT,MAAgB;AACjC,IAAAO,EAAeP,CAAG;AAAA,EAAA,GAGhBU,IAAe,CAACC,MAA2C;AACzD,IAAAA,EAAM,QAAQ,WACLC;EACb;AAGJ,EAAAC,EAAU,MAAM;AACR,IAAAb,KAAO,CAACM,KACRC,EAAeP,CAAG;AAAA,EACtB,GACD,CAACA,GAAKM,CAAW,CAAC;AAErB,QAAMM,IAAW,MAAM;AACnB,IAAAX,EAAYK,CAAW,GACTF;EAAA;AAGlB,SACKU,gBAAAA,EAAAA,KAAA,OAAA,EAAI,gBAAa,0BAAyB,WAAWJ,GAClD,UAAA;AAAA,IAAAK,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACG,4BAAOC,GAAS,EAAA;AAAA,QAChB,MAAMC,EAAW;AAAA,QACjB,MAAMC,EAAW;AAAA,QACjB,OAAOC,EAAY;AAAA,QACnB,UAAUC,EAAe;AAAA,QACzB,SAAS,MAAMnB,EAAa;AAAA,QAC/B,UAAA;AAAA,MAAA;AAAA,IAED;AAAA,IACAY,gBAAAA,EAAAA,KAACQ,GAAM,EAAA,QAAQ,MAAM,SAAS,MAAMlB,EAAiB,GAAA,QAAQD,GAAgB,eAAa,IACtF,UAAA;AAAA,MAAAY,gBAAAA,EAAAA,IAACO,EAAM,QAAN,EAAa,OAAM,uBAAuB,CAAA;AAAA,MAC3CP,gBAAAA,EAAAA,IAACO,EAAM,MAAN,EACG,gCAACC,GAAc,EAAA,WAAAxB,GAAsB,aAAAO,GAA0B,aAAAG,EAAA,CAA0B,EAC7F,CAAA;AAAA,MACAM,gBAAAA,EAAA;AAAA,QAACO,EAAM;AAAA,QAAN;AAAA,UACG,SAAS;AAAA,YACL;AAAA,cACI,UAAU;AAAA,cACV,SAAS,MAAMlB,EAAc;AAAA,cAC7B,OAAOgB,EAAY;AAAA,cACnB,UAAUC,EAAe;AAAA,YAC7B;AAAA,YACA;AAAA,cACI,UAAU;AAAA,cACV,SAAS,CAACV,MAAU;AAChB,gBAAAA,KAAA,QAAAA,EAAO,kBACEC;cACb;AAAA,cACA,OAAOQ,EAAY;AAAA,cACnB,UAAUC,EAAe;AAAA,cACzB,UAAU,CAACf;AAAA,YACf;AAAA,UACJ;AAAA,QAAA;AAAA,MACJ;AAAA,IAAA,GACJ;AAAA,EACJ,EAAA,CAAA;AAER;"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { j as e } from "../../../../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js";
|
|
2
|
+
import { useDocumentSection as h } from "@frontify/app-bridge";
|
|
3
|
+
import { merge as d } from "@frontify/fondue";
|
|
4
|
+
import { useState as u, useEffect as b } from "react";
|
|
5
|
+
import { SectionLink as v } from "./SectionLink.es.js";
|
|
6
|
+
const N = ({ page: t, selectedUrl: c, onSelectUrl: s, itemsToExpandInitially: n, appBridge: x }) => {
|
|
7
|
+
const [r, o] = u(t.id === n.documentId), l = t.permanentLink === c, { documentSections: m } = h(x, t.id), i = [...m.values()], w = i.length > 0;
|
|
8
|
+
return b(() => {
|
|
9
|
+
t.id === n.pageId && o(!0);
|
|
10
|
+
}, [n, t.id]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
11
|
+
/* @__PURE__ */ e.jsx(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
tabIndex: 0,
|
|
15
|
+
"data-test-id": "internal-link-selector-page-link",
|
|
16
|
+
className: d([
|
|
17
|
+
"tw-py-2 tw-px-2.5 tw-leading-5 tw-cursor-pointer",
|
|
18
|
+
w ? "tw-pl-7" : "tw-pl-12",
|
|
19
|
+
l ? "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"
|
|
20
|
+
]),
|
|
21
|
+
onClick: () => s(t.permanentLink),
|
|
22
|
+
onFocus: () => s(t.permanentLink),
|
|
23
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: "tw-flex tw-flex-1 tw-space-x-1 tw-items-center tw-h-6", children: [
|
|
24
|
+
w && /* @__PURE__ */ e.jsx(
|
|
25
|
+
"button",
|
|
26
|
+
{
|
|
27
|
+
"data-test-id": "tree-item-toggle",
|
|
28
|
+
className: "tw-flex tw-items-center tw-justify-center tw-p-1.5 tw-cursor-pointer",
|
|
29
|
+
onClick: () => o(!r),
|
|
30
|
+
onFocus: () => o(!r),
|
|
31
|
+
children: /* @__PURE__ */ e.jsx(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
className: d([
|
|
35
|
+
"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",
|
|
36
|
+
r ? "tw-rotate-90" : ""
|
|
37
|
+
])
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ e.jsx("span", { className: "tw-text-s", children: t.title }),
|
|
43
|
+
/* @__PURE__ */ e.jsx("span", { className: "tw-flex-auto tw-font-sans tw-text-xs tw-text-right", children: "Page" })
|
|
44
|
+
] }, t.id)
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
r && i.length > 0 && i.map((a) => /* @__PURE__ */ e.jsx(
|
|
48
|
+
v,
|
|
49
|
+
{
|
|
50
|
+
section: a,
|
|
51
|
+
selectedUrl: c,
|
|
52
|
+
onSelectUrl: s
|
|
53
|
+
},
|
|
54
|
+
a.id
|
|
55
|
+
))
|
|
56
|
+
] });
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
N as PageLink
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=PageLink.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLink.es.js","sources":["../../../../../../src/components/RichTextEditor/plugins/shared/LinkSelector/PageLink.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AppBridgeBlock, useDocumentSection } from '@frontify/app-bridge';\nimport { merge } from '@frontify/fondue';\nimport { useEffect, useState } from 'react';\nimport { InitiallyExpandedItems } from '../../LinkPlugin/FloatingLink/InsertLinkModal/types';\nimport { SectionLink } from './SectionLink';\n\ntype DocumentLinkProps = {\n page: {\n id: number;\n title: string;\n permanentLink: string;\n };\n selectedUrl: string;\n onSelectUrl: (url: string) => void;\n appBridge: AppBridgeBlock;\n itemsToExpandInitially: InitiallyExpandedItems;\n};\n\nexport const PageLink = ({ page, selectedUrl, onSelectUrl, itemsToExpandInitially, appBridge }: DocumentLinkProps) => {\n const [isExpanded, setIsExpanded] = useState(page.id === itemsToExpandInitially.documentId);\n const isActive = page.permanentLink === selectedUrl;\n const { documentSections } = useDocumentSection(appBridge, page.id);\n const sectionsArray = [...documentSections.values()];\n const hasSections = sectionsArray.length > 0;\n\n useEffect(() => {\n if (page.id === itemsToExpandInitially.pageId) {\n setIsExpanded(true);\n }\n }, [itemsToExpandInitially, page.id]);\n\n return (\n <>\n <div\n tabIndex={0}\n data-test-id=\"internal-link-selector-page-link\"\n className={merge([\n 'tw-py-2 tw-px-2.5 tw-leading-5 tw-cursor-pointer',\n hasSections ? 'tw-pl-7' : 'tw-pl-12',\n isActive\n ? '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'\n : 'hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover',\n ])}\n onClick={() => onSelectUrl(page.permanentLink)}\n onFocus={() => onSelectUrl(page.permanentLink)}\n >\n <div key={page.id} className=\"tw-flex tw-flex-1 tw-space-x-1 tw-items-center tw-h-6\">\n {hasSections && (\n <button\n data-test-id=\"tree-item-toggle\"\n className=\"tw-flex tw-items-center tw-justify-center tw-p-1.5 tw-cursor-pointer\"\n onClick={() => setIsExpanded(!isExpanded)}\n onFocus={() => setIsExpanded(!isExpanded)}\n >\n <div\n className={merge([\n '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',\n isExpanded ? 'tw-rotate-90' : '',\n ])}\n ></div>\n </button>\n )}\n <span className=\"tw-text-s\">{page.title}</span>\n <span className=\"tw-flex-auto tw-font-sans tw-text-xs tw-text-right\">Page</span>\n </div>\n </div>\n {isExpanded &&\n sectionsArray.length > 0 &&\n sectionsArray.map((section) => {\n return (\n <SectionLink\n key={section.id}\n section={section}\n selectedUrl={selectedUrl}\n onSelectUrl={onSelectUrl}\n />\n );\n })}\n </>\n );\n};\n"],"names":["PageLink","page","selectedUrl","onSelectUrl","itemsToExpandInitially","appBridge","isExpanded","setIsExpanded","useState","isActive","documentSections","useDocumentSection","sectionsArray","hasSections","useEffect","jsxs","Fragment","jsx","merge","section","SectionLink"],"mappings":";;;;;AAoBa,MAAAA,IAAW,CAAC,EAAE,MAAAC,GAAM,aAAAC,GAAa,aAAAC,GAAa,wBAAAC,GAAwB,WAAAC,QAAmC;AAC5G,QAAA,CAACC,GAAYC,CAAa,IAAIC,EAASP,EAAK,OAAOG,EAAuB,UAAU,GACpFK,IAAWR,EAAK,kBAAkBC,GAClC,EAAE,kBAAAQ,EAAiB,IAAIC,EAAmBN,GAAWJ,EAAK,EAAE,GAC5DW,IAAgB,CAAC,GAAGF,EAAiB,OAAQ,CAAA,GAC7CG,IAAcD,EAAc,SAAS;AAE3C,SAAAE,EAAU,MAAM;AACR,IAAAb,EAAK,OAAOG,EAAuB,UACnCG,EAAc,EAAI;AAAA,EAEvB,GAAA,CAACH,GAAwBH,EAAK,EAAE,CAAC,GAI5Bc,gBAAAA,EAAA,KAAAC,YAAA,EAAA,UAAA;AAAA,IAAAC,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,UAAU;AAAA,QACV,gBAAa;AAAA,QACb,WAAWC,EAAM;AAAA,UACb;AAAA,UACAL,IAAc,YAAY;AAAA,UAC1BJ,IACM,oKACA;AAAA,QAAA,CACT;AAAA,QACD,SAAS,MAAMN,EAAYF,EAAK,aAAa;AAAA,QAC7C,SAAS,MAAME,EAAYF,EAAK,aAAa;AAAA,QAE7C,UAAAc,gBAAAA,EAAA,KAAC,OAAkB,EAAA,WAAU,yDACxB,UAAA;AAAA,UACGF,KAAAI,gBAAAA,EAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,gBAAa;AAAA,cACb,WAAU;AAAA,cACV,SAAS,MAAMV,EAAc,CAACD,CAAU;AAAA,cACxC,SAAS,MAAMC,EAAc,CAACD,CAAU;AAAA,cAExC,UAAAW,gBAAAA,EAAA;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACG,WAAWC,EAAM;AAAA,oBACb;AAAA,oBACAZ,IAAa,iBAAiB;AAAA,kBAAA,CACjC;AAAA,gBAAA;AAAA,cACJ;AAAA,YAAA;AAAA,UACL;AAAA,UAEHW,gBAAAA,EAAA,IAAA,QAAA,EAAK,WAAU,aAAa,YAAK,OAAM;AAAA,UACvCA,gBAAAA,EAAA,IAAA,QAAA,EAAK,WAAU,sDAAqD,UAAI,QAAA;AAAA,QAAA,EAAA,GAjBnEhB,EAAK,EAkBf;AAAA,MAAA;AAAA,IACJ;AAAA,IACCK,KACGM,EAAc,SAAS,KACvBA,EAAc,IAAI,CAACO,MAEXF,gBAAAA,EAAA;AAAA,MAACG;AAAA,MAAA;AAAA,QAEG,SAAAD;AAAA,QACA,aAAAjB;AAAA,QACA,aAAAC;AAAA,MAAA;AAAA,MAHKgB,EAAQ;AAAA,IAAA,CAMxB;AAAA,EACT,EAAA,CAAA;AAER;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { j as t } from "../../../../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js";
|
|
2
|
+
import { LoadingCircle as u } from "@frontify/fondue";
|
|
3
|
+
import { useState as o, useEffect as f } from "react";
|
|
4
|
+
import { PageLink as p } from "./PageLink.es.js";
|
|
5
|
+
const L = ({
|
|
6
|
+
appBridge: s,
|
|
7
|
+
documentId: r,
|
|
8
|
+
selectedUrl: i,
|
|
9
|
+
onSelectUrl: c,
|
|
10
|
+
itemsToExpandInitially: m
|
|
11
|
+
}) => {
|
|
12
|
+
const [l, g] = o([]), [n, x] = o(!0), a = [...l.values()], d = !n && a.length > 0;
|
|
13
|
+
return f(() => {
|
|
14
|
+
s.getDocumentPagesByDocumentId(r).then((e) => {
|
|
15
|
+
g(e);
|
|
16
|
+
}).finally(() => {
|
|
17
|
+
x(!1);
|
|
18
|
+
});
|
|
19
|
+
}, []), n ? /* @__PURE__ */ t.jsx("div", { className: "tw-flex tw-justify-center tw-p-4", children: /* @__PURE__ */ t.jsx(u, {}) }) : d ? /* @__PURE__ */ t.jsx(t.Fragment, { children: a.map((e) => /* @__PURE__ */ t.jsx(
|
|
20
|
+
p,
|
|
21
|
+
{
|
|
22
|
+
page: e,
|
|
23
|
+
appBridge: s,
|
|
24
|
+
selectedUrl: i,
|
|
25
|
+
onSelectUrl: c,
|
|
26
|
+
itemsToExpandInitially: m
|
|
27
|
+
},
|
|
28
|
+
e.id
|
|
29
|
+
)) }) : /* @__PURE__ */ t.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." });
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
L as PageLinks
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=PageLinks.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLinks.es.js","sources":["../../../../../../src/components/RichTextEditor/plugins/shared/LinkSelector/PageLinks.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AppBridgeBlock, DocumentPage } from '@frontify/app-bridge';\nimport { LoadingCircle } from '@frontify/fondue';\nimport { ReactElement, useEffect, useState } from 'react';\nimport { InitiallyExpandedItems } from '../../LinkPlugin/FloatingLink/InsertLinkModal/types';\nimport { PageLink } from './PageLink';\n\ntype PageLinksProps = {\n appBridge: AppBridgeBlock;\n documentId: number;\n selectedUrl: string;\n onSelectUrl: (url: string) => void;\n itemsToExpandInitially: InitiallyExpandedItems;\n};\n\nexport const PageLinks = ({\n appBridge,\n documentId,\n selectedUrl,\n onSelectUrl,\n itemsToExpandInitially,\n}: PageLinksProps): ReactElement => {\n const [pages, setPages] = useState<DocumentPage[]>([]);\n const [isLoading, setIsLoading] = useState(true);\n const pagesArray = [...pages.values()];\n const hasPages = !isLoading && pagesArray.length > 0;\n\n useEffect(() => {\n appBridge\n .getDocumentPagesByDocumentId(documentId)\n .then((_pages) => {\n setPages(_pages);\n })\n .finally(() => {\n setIsLoading(false);\n });\n }, []);\n\n if (isLoading) {\n return (\n <div className=\"tw-flex tw-justify-center tw-p-4\">\n <LoadingCircle />\n </div>\n );\n }\n\n return hasPages ? (\n <>\n {pagesArray.map((page) => {\n return (\n <PageLink\n key={page.id}\n page={page}\n appBridge={appBridge}\n selectedUrl={selectedUrl}\n onSelectUrl={onSelectUrl}\n itemsToExpandInitially={itemsToExpandInitially}\n />\n );\n })}\n </>\n ) : (\n <div className=\"tw-py-2 tw-px-2.5 tw-pl-7 tw-leading-5 tw-text-s tw-text-text-weak\">\n This document does not contain any pages.\n </div>\n );\n};\n"],"names":["PageLinks","appBridge","documentId","selectedUrl","onSelectUrl","itemsToExpandInitially","pages","setPages","useState","isLoading","setIsLoading","pagesArray","hasPages","useEffect","_pages","jsx","LoadingCircle","Fragment","page","PageLink"],"mappings":";;;;AAgBO,MAAMA,IAAY,CAAC;AAAA,EACtB,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,wBAAAC;AACJ,MAAoC;AAChC,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAyB,CAAE,CAAA,GAC/C,CAACC,GAAWC,CAAY,IAAIF,EAAS,EAAI,GACzCG,IAAa,CAAC,GAAGL,EAAM,OAAQ,CAAA,GAC/BM,IAAW,CAACH,KAAaE,EAAW,SAAS;AAanD,SAXAE,EAAU,MAAM;AACZ,IAAAZ,EACK,6BAA6BC,CAAU,EACvC,KAAK,CAACY,MAAW;AACd,MAAAP,EAASO,CAAM;AAAA,IAAA,CAClB,EACA,QAAQ,MAAM;AACX,MAAAJ,EAAa,EAAK;AAAA,IAAA,CACrB;AAAA,EACT,GAAG,CAAE,CAAA,GAEDD,0BAEK,OAAI,EAAA,WAAU,oCACX,UAAAM,gBAAAA,EAAAA,IAACC,KAAc,EACnB,CAAA,IAIDJ,IACHG,gBAAAA,EAAA,IAAAE,YAAA,EACK,UAAWN,EAAA,IAAI,CAACO,MAETH,gBAAAA,EAAA;AAAA,IAACI;AAAA,IAAA;AAAA,MAEG,MAAAD;AAAA,MACA,WAAAjB;AAAA,MACA,aAAAE;AAAA,MACA,aAAAC;AAAA,MACA,wBAAAC;AAAA,IAAA;AAAA,IALKa,EAAK;AAAA,EAAA,CAQrB,EACL,CAAA,0BAEC,OAAI,EAAA,WAAU,sEAAqE,UAEpF,4CAAA,CAAA;AAER;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { j as t } from "../../../../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js";
|
|
2
|
+
import { merge as o, IconDocumentText16 as i } from "@frontify/fondue";
|
|
3
|
+
const a = ({ section: e, selectedUrl: r, onSelectUrl: n }) => {
|
|
4
|
+
const s = e.permanentLink === r;
|
|
5
|
+
return /* @__PURE__ */ t.jsx(
|
|
6
|
+
"button",
|
|
7
|
+
{
|
|
8
|
+
"data-test-id": "internal-link-selector-section-link",
|
|
9
|
+
className: o([
|
|
10
|
+
"tw-py-2 tw-px-2.5 tw-pl-14 tw-leading-5 tw-cursor-pointer tw-w-full",
|
|
11
|
+
s ? "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"
|
|
12
|
+
]),
|
|
13
|
+
onClick: () => n(e.permanentLink),
|
|
14
|
+
onFocus: () => n(e.permanentLink),
|
|
15
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: "tw-flex tw-flex-1 tw-space-x-2 tw-items-center tw-h-6", children: [
|
|
16
|
+
/* @__PURE__ */ t.jsx(i, {}),
|
|
17
|
+
/* @__PURE__ */ t.jsx("span", { className: "tw-text-s", children: e.title }),
|
|
18
|
+
/* @__PURE__ */ t.jsx("span", { className: "tw-flex-auto tw-font-sans tw-text-xs tw-text-right", children: "Section" })
|
|
19
|
+
] })
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
a as SectionLink
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=SectionLink.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionLink.es.js","sources":["../../../../../../src/components/RichTextEditor/plugins/shared/LinkSelector/SectionLink.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconDocumentText16, merge } from '@frontify/fondue';\n\ntype SectionLinkProps = {\n section: {\n id: number;\n title: string;\n permanentLink: string;\n };\n selectedUrl: string;\n onSelectUrl: (url: string) => void;\n};\n\nexport const SectionLink = ({ section, selectedUrl, onSelectUrl }: SectionLinkProps) => {\n const isActive = section.permanentLink === selectedUrl;\n\n return (\n <button\n data-test-id=\"internal-link-selector-section-link\"\n className={merge([\n 'tw-py-2 tw-px-2.5 tw-pl-14 tw-leading-5 tw-cursor-pointer tw-w-full',\n isActive\n ? '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'\n : 'hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover',\n ])}\n onClick={() => onSelectUrl(section.permanentLink)}\n onFocus={() => onSelectUrl(section.permanentLink)}\n >\n <div className=\"tw-flex tw-flex-1 tw-space-x-2 tw-items-center tw-h-6\">\n <IconDocumentText16 />\n <span className=\"tw-text-s\">{section.title}</span>\n <span className=\"tw-flex-auto tw-font-sans tw-text-xs tw-text-right\">Section</span>\n </div>\n </button>\n );\n};\n"],"names":["SectionLink","section","selectedUrl","onSelectUrl","isActive","jsx","merge","jsxs","IconDocumentText16"],"mappings":";;AAcO,MAAMA,IAAc,CAAC,EAAE,SAAAC,GAAS,aAAAC,GAAa,aAAAC,QAAoC;AAC9E,QAAAC,IAAWH,EAAQ,kBAAkBC;AAGvC,SAAAG,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,gBAAa;AAAA,MACb,WAAWC,EAAM;AAAA,QACb;AAAA,QACAF,IACM,oKACA;AAAA,MAAA,CACT;AAAA,MACD,SAAS,MAAMD,EAAYF,EAAQ,aAAa;AAAA,MAChD,SAAS,MAAME,EAAYF,EAAQ,aAAa;AAAA,MAEhD,UAAAM,gBAAAA,EAAA,KAAC,OAAI,EAAA,WAAU,yDACX,UAAA;AAAA,QAAAF,gBAAAA,EAAA,IAACG,GAAmB,EAAA;AAAA,QACnBH,gBAAAA,EAAA,IAAA,QAAA,EAAK,WAAU,aAAa,YAAQ,OAAM;AAAA,QAC1CA,gBAAAA,EAAA,IAAA,QAAA,EAAK,WAAU,sDAAqD,UAAO,WAAA;AAAA,MAAA,GAChF;AAAA,IAAA;AAAA,EAAA;AAGZ;"}
|