@atlaskit/editor-common 74.0.1 → 74.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/cjs/event-dispatcher/index.js +6 -3
- package/dist/cjs/insert/index.js +274 -0
- package/dist/cjs/monitoring/error.js +106 -0
- package/dist/cjs/monitoring/index.js +12 -0
- package/dist/cjs/node-width/index.js +5 -0
- package/dist/cjs/paste/index.js +12 -0
- package/dist/cjs/paste/md-plugins/ignore-list-heading-md-plugin.js +47 -0
- package/dist/cjs/paste/md-plugins/linkify-md-plugin.js +135 -0
- package/dist/cjs/paste/md-plugins/newline-md-plugin.js +67 -0
- package/dist/cjs/paste/md-plugins/paragraph-md-plugin.js +73 -0
- package/dist/cjs/paste/md.js +31 -0
- package/dist/cjs/preset/plugin-injection-api.js +4 -2
- package/dist/cjs/resizer.js +13 -0
- package/dist/cjs/styles/index.js +8 -1
- package/dist/cjs/styles/shared/blockquote.js +1 -2
- package/dist/cjs/styles/shared/code-block.js +5 -5
- package/dist/cjs/styles/shared/extension.js +4 -0
- package/dist/cjs/styles/shared/layout.js +4 -0
- package/dist/cjs/styles/shared/panel.js +4 -1
- package/dist/cjs/styles/shared/resizer.js +31 -0
- package/dist/cjs/styles/shared/smart-card.js +5 -0
- package/dist/cjs/styles/shared/table.js +2 -3
- package/dist/cjs/types/performance-tracking.js +5 -0
- package/dist/cjs/ui/DropList/index.js +6 -4
- package/dist/cjs/ui/ErrorBoundary/index.js +7 -0
- package/dist/cjs/ui/Expand/index.js +11 -8
- package/dist/cjs/ui/FloatingToolbar/Button.js +93 -0
- package/dist/cjs/ui/FloatingToolbar/styles.js +79 -0
- package/dist/cjs/ui/MediaSingle/grid.js +52 -1
- package/dist/cjs/ui/MediaSingle/index.js +2 -4
- package/dist/cjs/ui/Messages/index.js +2 -3
- package/dist/cjs/ui/Resizer/index.js +97 -0
- package/dist/cjs/ui/Resizer/types.js +5 -0
- package/dist/cjs/ui/Resizer/utils.js +8 -0
- package/dist/cjs/ui/index.js +14 -1
- package/dist/cjs/ui-color/ColorPalette/styles.js +1 -2
- package/dist/cjs/utils/editor-core-utils.js +9 -1
- package/dist/cjs/utils/hyperlink.js +200 -0
- package/dist/cjs/utils/index.js +96 -8
- package/dist/cjs/utils/list.js +19 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/event-dispatcher/index.js +4 -2
- package/dist/es2019/insert/index.js +264 -0
- package/dist/es2019/monitoring/error.js +68 -0
- package/dist/es2019/monitoring/index.js +1 -0
- package/dist/es2019/node-width/index.js +4 -0
- package/dist/es2019/paste/index.js +1 -0
- package/dist/es2019/paste/md-plugins/ignore-list-heading-md-plugin.js +43 -0
- package/dist/es2019/paste/md-plugins/linkify-md-plugin.js +128 -0
- package/dist/es2019/paste/md-plugins/newline-md-plugin.js +58 -0
- package/dist/es2019/paste/md-plugins/paragraph-md-plugin.js +64 -0
- package/dist/es2019/paste/md.js +22 -0
- package/dist/es2019/preset/plugin-injection-api.js +4 -2
- package/dist/es2019/resizer.js +1 -0
- package/dist/es2019/styles/index.js +2 -1
- package/dist/es2019/styles/shared/blockquote.js +2 -3
- package/dist/es2019/styles/shared/code-block.js +8 -7
- package/dist/es2019/styles/shared/extension.js +4 -0
- package/dist/es2019/styles/shared/layout.js +4 -0
- package/dist/es2019/styles/shared/panel.js +7 -4
- package/dist/es2019/styles/shared/resizer.js +72 -0
- package/dist/es2019/styles/shared/smart-card.js +4 -0
- package/dist/es2019/styles/shared/table.js +2 -3
- package/dist/es2019/types/performance-tracking.js +1 -0
- package/dist/es2019/ui/DropList/index.js +7 -3
- package/dist/es2019/ui/ErrorBoundary/index.js +7 -0
- package/dist/es2019/ui/Expand/index.js +14 -9
- package/dist/es2019/ui/FloatingToolbar/Button.js +85 -0
- package/dist/es2019/ui/FloatingToolbar/styles.js +64 -0
- package/dist/es2019/ui/MediaSingle/grid.js +50 -0
- package/dist/es2019/ui/MediaSingle/index.js +1 -2
- package/dist/es2019/ui/Messages/index.js +2 -3
- package/dist/es2019/ui/Resizer/index.js +92 -0
- package/dist/es2019/ui/Resizer/types.js +1 -0
- package/dist/es2019/ui/Resizer/utils.js +1 -0
- package/dist/es2019/ui/index.js +4 -3
- package/dist/es2019/ui-color/ColorPalette/styles.js +1 -2
- package/dist/es2019/utils/editor-core-utils.js +7 -0
- package/dist/es2019/utils/hyperlink.js +165 -0
- package/dist/es2019/utils/index.js +6 -3
- package/dist/es2019/utils/list.js +13 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/event-dispatcher/index.js +4 -2
- package/dist/esm/insert/index.js +262 -0
- package/dist/esm/monitoring/error.js +91 -0
- package/dist/esm/monitoring/index.js +1 -0
- package/dist/esm/node-width/index.js +4 -0
- package/dist/esm/paste/index.js +1 -0
- package/dist/esm/paste/md-plugins/ignore-list-heading-md-plugin.js +41 -0
- package/dist/esm/paste/md-plugins/linkify-md-plugin.js +128 -0
- package/dist/esm/paste/md-plugins/newline-md-plugin.js +60 -0
- package/dist/esm/paste/md-plugins/paragraph-md-plugin.js +66 -0
- package/dist/esm/paste/md.js +22 -0
- package/dist/esm/preset/plugin-injection-api.js +4 -2
- package/dist/esm/resizer.js +1 -0
- package/dist/esm/styles/index.js +2 -1
- package/dist/esm/styles/shared/blockquote.js +1 -2
- package/dist/esm/styles/shared/code-block.js +6 -6
- package/dist/esm/styles/shared/extension.js +4 -0
- package/dist/esm/styles/shared/layout.js +4 -0
- package/dist/esm/styles/shared/panel.js +4 -1
- package/dist/esm/styles/shared/resizer.js +18 -0
- package/dist/esm/styles/shared/smart-card.js +4 -0
- package/dist/esm/styles/shared/table.js +2 -3
- package/dist/esm/types/performance-tracking.js +1 -0
- package/dist/esm/ui/DropList/index.js +6 -3
- package/dist/esm/ui/ErrorBoundary/index.js +7 -0
- package/dist/esm/ui/Expand/index.js +11 -8
- package/dist/esm/ui/FloatingToolbar/Button.js +85 -0
- package/dist/esm/ui/FloatingToolbar/styles.js +68 -0
- package/dist/esm/ui/MediaSingle/grid.js +48 -0
- package/dist/esm/ui/MediaSingle/index.js +1 -2
- package/dist/esm/ui/Messages/index.js +2 -3
- package/dist/esm/ui/Resizer/index.js +90 -0
- package/dist/esm/ui/Resizer/types.js +1 -0
- package/dist/esm/ui/Resizer/utils.js +1 -0
- package/dist/esm/ui/index.js +4 -3
- package/dist/esm/ui-color/ColorPalette/styles.js +1 -2
- package/dist/esm/utils/editor-core-utils.js +7 -0
- package/dist/esm/utils/hyperlink.js +184 -0
- package/dist/esm/utils/index.js +6 -3
- package/dist/esm/utils/list.js +13 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/api.d.ts +1 -1
- package/dist/types/event-dispatcher/index.d.ts +3 -1
- package/dist/types/insert/index.d.ts +25 -0
- package/dist/types/monitoring/error.d.ts +4 -0
- package/dist/types/monitoring/index.d.ts +1 -0
- package/dist/types/paste/index.d.ts +1 -0
- package/dist/types/paste/md-plugins/ignore-list-heading-md-plugin.d.ts +2 -0
- package/dist/types/paste/md-plugins/linkify-md-plugin.d.ts +2 -0
- package/dist/types/paste/md-plugins/newline-md-plugin.d.ts +2 -0
- package/dist/types/paste/md-plugins/paragraph-md-plugin.d.ts +2 -0
- package/dist/types/paste/md.d.ts +2 -0
- package/dist/types/resizer.d.ts +1 -0
- package/dist/types/styles/index.d.ts +1 -0
- package/dist/types/styles/shared/resizer.d.ts +6 -0
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/types/next-editor-plugin.d.ts +1 -1
- package/dist/types/types/performance-tracking.d.ts +343 -0
- package/dist/types/ui/DropList/index.d.ts +1 -1
- package/dist/types/ui/FloatingToolbar/Button.d.ts +30 -0
- package/dist/types/ui/FloatingToolbar/styles.d.ts +20 -0
- package/dist/types/ui/MediaSingle/grid.d.ts +14 -0
- package/dist/types/ui/MediaSingle/index.d.ts +0 -1
- package/dist/types/ui/Resizer/index.d.ts +22 -0
- package/dist/types/ui/Resizer/types.d.ts +18 -0
- package/dist/types/ui/Resizer/utils.d.ts +1 -0
- package/dist/types/ui/index.d.ts +3 -2
- package/dist/types/utils/editor-core-utils.d.ts +4 -0
- package/dist/types/utils/hyperlink.d.ts +27 -0
- package/dist/types/utils/index.d.ts +4 -3
- package/dist/types/utils/list.d.ts +4 -0
- package/dist/types-ts4.5/__tests_external__/cases/fundamentals/collection.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/fundamentals/test-cases/editor-is-present.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/fundamentals/test-cases/editor-typing.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/index.d.ts +4 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/delete.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/edit.d.ts +4 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/index.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/insert.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/delete.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/edit.d.ts +4 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/index.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/insert.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/delete.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/edit.d.ts +4 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/index.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/insert.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/unlink.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/types.d.ts +4 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/url/index.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/url/insert.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/types.d.ts +7 -0
- package/dist/types-ts4.5/__tests_external__/index.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/page-objects/Editor.d.ts +9 -0
- package/dist/types-ts4.5/__tests_external__/page-objects/EditorSmartLink.d.ts +40 -0
- package/dist/types-ts4.5/__tests_external__/page-objects/Renderer.d.ts +6 -0
- package/dist/types-ts4.5/analytics/analytics-queue.d.ts +10 -0
- package/dist/types-ts4.5/analytics/api.d.ts +5 -0
- package/dist/types-ts4.5/analytics/fire-analytics-event.d.ts +2 -0
- package/dist/types-ts4.5/analytics/index.d.ts +5 -0
- package/dist/types-ts4.5/analytics/types/avatar.d.ts +5 -0
- package/dist/types-ts4.5/analytics/types/block.d.ts +3 -0
- package/dist/types-ts4.5/analytics/types/config-panel-events.d.ts +17 -0
- package/dist/types-ts4.5/analytics/types/cut-copy-events.d.ts +12 -0
- package/dist/types-ts4.5/analytics/types/date-events.d.ts +17 -0
- package/dist/types-ts4.5/analytics/types/dispatch-analytics-event.d.ts +2 -0
- package/dist/types-ts4.5/analytics/types/element-browser-events.d.ts +11 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +357 -0
- package/dist/types-ts4.5/analytics/types/events.d.ts +130 -0
- package/dist/types-ts4.5/analytics/types/experimental-events.d.ts +16 -0
- package/dist/types-ts4.5/analytics/types/extension-events.d.ts +37 -0
- package/dist/types-ts4.5/analytics/types/find-replace-events.d.ts +23 -0
- package/dist/types-ts4.5/analytics/types/format-events.d.ts +49 -0
- package/dist/types-ts4.5/analytics/types/general-events.d.ts +187 -0
- package/dist/types-ts4.5/analytics/types/index.d.ts +36 -0
- package/dist/types-ts4.5/analytics/types/inline-comment-events.d.ts +17 -0
- package/dist/types-ts4.5/analytics/types/insert-events.d.ts +128 -0
- package/dist/types-ts4.5/analytics/types/link-tool-bar-events.d.ts +76 -0
- package/dist/types-ts4.5/analytics/types/list-events.d.ts +66 -0
- package/dist/types-ts4.5/analytics/types/media-events.d.ts +18 -0
- package/dist/types-ts4.5/analytics/types/node-events.d.ts +56 -0
- package/dist/types-ts4.5/analytics/types/paste-events.d.ts +39 -0
- package/dist/types-ts4.5/analytics/types/performance-report.d.ts +24 -0
- package/dist/types-ts4.5/analytics/types/referentiality-events.d.ts +52 -0
- package/dist/types-ts4.5/analytics/types/selection-events.d.ts +18 -0
- package/dist/types-ts4.5/analytics/types/smart-links.d.ts +14 -0
- package/dist/types-ts4.5/analytics/types/substitute-events.d.ts +26 -0
- package/dist/types-ts4.5/analytics/types/table-events.d.ts +102 -0
- package/dist/types-ts4.5/analytics/types/toolbar-button.d.ts +22 -0
- package/dist/types-ts4.5/analytics/types/type-ahead.d.ts +27 -0
- package/dist/types-ts4.5/analytics/types/utils.d.ts +46 -0
- package/dist/types-ts4.5/analytics/utils.d.ts +3 -0
- package/dist/types-ts4.5/card/cardOptions.d.ts +12 -0
- package/dist/types-ts4.5/card/index.d.ts +2 -0
- package/dist/types-ts4.5/card/utils.d.ts +18 -0
- package/dist/types-ts4.5/collab/types.d.ts +101 -0
- package/dist/types-ts4.5/collab.d.ts +1 -0
- package/dist/types-ts4.5/core-utils/index.d.ts +1 -0
- package/dist/types-ts4.5/core-utils/inside.d.ts +2 -0
- package/dist/types-ts4.5/emoji.d.ts +3 -0
- package/dist/types-ts4.5/event-dispatcher/index.d.ts +21 -0
- package/dist/types-ts4.5/extensions/combine-extension-providers.d.ts +7 -0
- package/dist/types-ts4.5/extensions/default-extension-provider.d.ts +17 -0
- package/dist/types-ts4.5/extensions/extension-fields-helpers.d.ts +10 -0
- package/dist/types-ts4.5/extensions/extension-handlers.d.ts +13 -0
- package/dist/types-ts4.5/extensions/index.d.ts +8 -0
- package/dist/types-ts4.5/extensions/manifest-helpers.d.ts +9 -0
- package/dist/types-ts4.5/extensions/module-helpers.d.ts +11 -0
- package/dist/types-ts4.5/extensions/types/extension-handler.d.ts +40 -0
- package/dist/types-ts4.5/extensions/types/extension-manifest-common.d.ts +8 -0
- package/dist/types-ts4.5/extensions/types/extension-manifest-toolbar-item.d.ts +45 -0
- package/dist/types-ts4.5/extensions/types/extension-manifest.d.ts +101 -0
- package/dist/types-ts4.5/extensions/types/extension-parameters.d.ts +5 -0
- package/dist/types-ts4.5/extensions/types/extension-provider.d.ts +8 -0
- package/dist/types-ts4.5/extensions/types/field-definitions.d.ts +171 -0
- package/dist/types-ts4.5/extensions/types/index.d.ts +8 -0
- package/dist/types-ts4.5/extensions/types/utils.d.ts +18 -0
- package/dist/types-ts4.5/extensions.d.ts +2 -0
- package/dist/types-ts4.5/hooks/index.d.ts +3 -0
- package/dist/types-ts4.5/hooks/useConstructor.d.ts +9 -0
- package/dist/types-ts4.5/hooks/usePreviousState.d.ts +11 -0
- package/dist/types-ts4.5/hooks/useSharedPluginState.d.ts +39 -0
- package/dist/types-ts4.5/i18n/cs.d.ts +133 -0
- package/dist/types-ts4.5/i18n/da.d.ts +133 -0
- package/dist/types-ts4.5/i18n/de.d.ts +133 -0
- package/dist/types-ts4.5/i18n/en.d.ts +133 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +133 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +115 -0
- package/dist/types-ts4.5/i18n/es.d.ts +133 -0
- package/dist/types-ts4.5/i18n/et.d.ts +8 -0
- package/dist/types-ts4.5/i18n/fi.d.ts +133 -0
- package/dist/types-ts4.5/i18n/fr.d.ts +133 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +133 -0
- package/dist/types-ts4.5/i18n/index.d.ts +32 -0
- package/dist/types-ts4.5/i18n/it.d.ts +133 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +133 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +133 -0
- package/dist/types-ts4.5/i18n/languages.d.ts +35 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +133 -0
- package/dist/types-ts4.5/i18n/nl.d.ts +133 -0
- package/dist/types-ts4.5/i18n/pl.d.ts +133 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +133 -0
- package/dist/types-ts4.5/i18n/pt_PT.d.ts +8 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +133 -0
- package/dist/types-ts4.5/i18n/sk.d.ts +8 -0
- package/dist/types-ts4.5/i18n/sv.d.ts +133 -0
- package/dist/types-ts4.5/i18n/th.d.ts +133 -0
- package/dist/types-ts4.5/i18n/tr.d.ts +133 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +133 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +133 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +133 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +133 -0
- package/dist/types-ts4.5/icons/index.d.ts +10 -0
- package/dist/types-ts4.5/icons/shared/BorderIcon.d.ts +3 -0
- package/dist/types-ts4.5/icons/shared/PanelErrorIcon.d.ts +3 -0
- package/dist/types-ts4.5/icons/shared/PanelInfoIcon.d.ts +3 -0
- package/dist/types-ts4.5/icons/shared/PanelNoteIcon.d.ts +3 -0
- package/dist/types-ts4.5/icons/shared/PanelSuccessIcon.d.ts +3 -0
- package/dist/types-ts4.5/icons/shared/PanelWarningIcon.d.ts +3 -0
- package/dist/types-ts4.5/icons/shared/table.d.ts +2 -0
- package/dist/types-ts4.5/in-product.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/insert/index.d.ts +25 -0
- package/dist/types-ts4.5/keymaps/consts.d.ts +12 -0
- package/dist/types-ts4.5/keymaps/index.d.ts +91 -0
- package/dist/types-ts4.5/mention.d.ts +2 -0
- package/dist/types-ts4.5/messages/codeBidiWarning.d.ts +11 -0
- package/dist/types-ts4.5/messages/codeBlockButton.d.ts +22 -0
- package/dist/types-ts4.5/messages/index.d.ts +128 -0
- package/dist/types-ts4.5/messages/insert-block.d.ts +172 -0
- package/dist/types-ts4.5/messages/link.d.ts +7 -0
- package/dist/types-ts4.5/messages/unsupportedContent.d.ts +17 -0
- package/dist/types-ts4.5/monitoring/error.d.ts +4 -0
- package/dist/types-ts4.5/monitoring/index.d.ts +1 -0
- package/dist/types-ts4.5/node-width/index.d.ts +7 -0
- package/dist/types-ts4.5/normalize-feature-flags.d.ts +27 -0
- package/dist/types-ts4.5/panel.d.ts +1 -0
- package/dist/types-ts4.5/paste/index.d.ts +1 -0
- package/dist/types-ts4.5/paste/md-plugins/ignore-list-heading-md-plugin.d.ts +2 -0
- package/dist/types-ts4.5/paste/md-plugins/linkify-md-plugin.d.ts +2 -0
- package/dist/types-ts4.5/paste/md-plugins/newline-md-plugin.d.ts +2 -0
- package/dist/types-ts4.5/paste/md-plugins/paragraph-md-plugin.d.ts +2 -0
- package/dist/types-ts4.5/paste/md.d.ts +2 -0
- package/dist/types-ts4.5/preset/builder.d.ts +36 -0
- package/dist/types-ts4.5/preset/index.d.ts +2 -0
- package/dist/types-ts4.5/preset/plugin-injection-api.d.ts +50 -0
- package/dist/types-ts4.5/provider-factory/autoformatting-provider.d.ts +9 -0
- package/dist/types-ts4.5/provider-factory/card-provider.d.ts +7 -0
- package/dist/types-ts4.5/provider-factory/context-identifier-provider.d.ts +6 -0
- package/dist/types-ts4.5/provider-factory/context.d.ts +6 -0
- package/dist/types-ts4.5/provider-factory/image-upload-provider.d.ts +6 -0
- package/dist/types-ts4.5/provider-factory/macro-provider.d.ts +25 -0
- package/dist/types-ts4.5/provider-factory/media-provider.d.ts +15 -0
- package/dist/types-ts4.5/provider-factory/profile-card-provider.d.ts +6 -0
- package/dist/types-ts4.5/provider-factory/provider-factory.d.ts +17 -0
- package/dist/types-ts4.5/provider-factory/quick-insert-provider.d.ts +24 -0
- package/dist/types-ts4.5/provider-factory/search-provider.d.ts +12 -0
- package/dist/types-ts4.5/provider-factory/types.d.ts +37 -0
- package/dist/types-ts4.5/provider-factory/with-providers.d.ts +18 -0
- package/dist/types-ts4.5/provider-factory.d.ts +13 -0
- package/dist/types-ts4.5/provider-helpers/combine-providers.d.ts +9 -0
- package/dist/types-ts4.5/provider-helpers/index.d.ts +1 -0
- package/dist/types-ts4.5/provider-helpers/promise-helpers.d.ts +32 -0
- package/dist/types-ts4.5/react-node-view/index.d.ts +52 -0
- package/dist/types-ts4.5/react-node-view/types.d.ts +12 -0
- package/dist/types-ts4.5/resizer.d.ts +1 -0
- package/dist/types-ts4.5/safe-plugin/index.d.ts +6 -0
- package/dist/types-ts4.5/selection/gap-cursor/selection.d.ts +40 -0
- package/dist/types-ts4.5/selection/gap-cursor/utils/index.d.ts +2 -0
- package/dist/types-ts4.5/selection/gap-cursor/utils/is-ignored.d.ts +2 -0
- package/dist/types-ts4.5/selection/gap-cursor/utils/is-valid-target-node.d.ts +2 -0
- package/dist/types-ts4.5/selection/index.d.ts +5 -0
- package/dist/types-ts4.5/selection/types.d.ts +26 -0
- package/dist/types-ts4.5/selection/utils.d.ts +4 -0
- package/dist/types-ts4.5/styles/index.d.ts +25 -0
- package/dist/types-ts4.5/styles/shared/annotation.d.ts +12 -0
- package/dist/types-ts4.5/styles/shared/block-marks.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/blockquote.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/code-block.d.ts +12 -0
- package/dist/types-ts4.5/styles/shared/code-mark.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/column-layout.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/date.d.ts +5 -0
- package/dist/types-ts4.5/styles/shared/dropdown-menu.d.ts +4 -0
- package/dist/types-ts4.5/styles/shared/emoji.d.ts +7 -0
- package/dist/types-ts4.5/styles/shared/extension.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/headings.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/indentation.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/layout.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/link.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/lists.d.ts +4 -0
- package/dist/types-ts4.5/styles/shared/media-single.d.ts +3 -0
- package/dist/types-ts4.5/styles/shared/mention.d.ts +3 -0
- package/dist/types-ts4.5/styles/shared/panel.d.ts +85 -0
- package/dist/types-ts4.5/styles/shared/paragraph.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/resizer.d.ts +6 -0
- package/dist/types-ts4.5/styles/shared/rule.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/shadow.d.ts +15 -0
- package/dist/types-ts4.5/styles/shared/smart-card.d.ts +7 -0
- package/dist/types-ts4.5/styles/shared/status.d.ts +4 -0
- package/dist/types-ts4.5/styles/shared/table.d.ts +31 -0
- package/dist/types-ts4.5/styles/shared/tableCell.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/task-decision.d.ts +4 -0
- package/dist/types-ts4.5/styles/shared/text-color.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/whitespace.d.ts +2 -0
- package/dist/types-ts4.5/transforms/expand.d.ts +5 -0
- package/dist/types-ts4.5/transforms/extension.d.ts +6 -0
- package/dist/types-ts4.5/transforms/index.d.ts +3 -0
- package/dist/types-ts4.5/transforms/layout.d.ts +15 -0
- package/dist/types-ts4.5/type-ahead/index.d.ts +12 -0
- package/dist/types-ts4.5/types/annotation/emitter.d.ts +33 -0
- package/dist/types-ts4.5/types/annotation/index.d.ts +84 -0
- package/dist/types-ts4.5/types/collab.d.ts +8 -0
- package/dist/types-ts4.5/types/command.d.ts +5 -0
- package/dist/types-ts4.5/types/context-panel.d.ts +3 -0
- package/dist/types-ts4.5/types/copy-button.d.ts +24 -0
- package/dist/types-ts4.5/types/editor-actions.d.ts +21 -0
- package/dist/types-ts4.5/types/editor-appearance.d.ts +1 -0
- package/dist/types-ts4.5/types/editor-container-width.d.ts +20 -0
- package/dist/types-ts4.5/types/editor-plugin.d.ts +83 -0
- package/dist/types-ts4.5/types/editor-react-context.d.ts +6 -0
- package/dist/types-ts4.5/types/empty-state-handler.d.ts +7 -0
- package/dist/types-ts4.5/types/feature-flags.d.ts +432 -0
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +256 -0
- package/dist/types-ts4.5/types/index.d.ts +36 -0
- package/dist/types-ts4.5/types/next-editor-plugin.d.ts +113 -0
- package/dist/types-ts4.5/types/performance-tracking.d.ts +343 -0
- package/dist/types-ts4.5/types/plugin-factory.d.ts +27 -0
- package/dist/types-ts4.5/types/prosemirror-config.d.ts +14 -0
- package/dist/types-ts4.5/types/quick-insert.d.ts +26 -0
- package/dist/types-ts4.5/types/supported-browsers.d.ts +15 -0
- package/dist/types-ts4.5/types/toolbar.d.ts +30 -0
- package/dist/types-ts4.5/types/type-ahead.d.ts +72 -0
- package/dist/types-ts4.5/types/ui-components.d.ts +22 -0
- package/dist/types-ts4.5/ufo/experience-store.d.ts +33 -0
- package/dist/types-ts4.5/ufo/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/BaseTheme/index.d.ts +15 -0
- package/dist/types-ts4.5/ui/Caption/index.d.ts +19 -0
- package/dist/types-ts4.5/ui/Caption/messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/DropList/index.d.ts +20 -0
- package/dist/types-ts4.5/ui/Emoji/index.d.ts +22 -0
- package/dist/types-ts4.5/ui/ErrorBoundary/index.d.ts +24 -0
- package/dist/types-ts4.5/ui/EventHandlers/index.d.ts +36 -0
- package/dist/types-ts4.5/ui/Expand/index.d.ts +43 -0
- package/dist/types-ts4.5/ui/FloatingToolbar/Button.d.ts +30 -0
- package/dist/types-ts4.5/ui/FloatingToolbar/styles.d.ts +20 -0
- package/dist/types-ts4.5/ui/IntlErrorBoundary/index.d.ts +15 -0
- package/dist/types-ts4.5/ui/IntlProviderIfMissingWrapper/index.d.ts +6 -0
- package/dist/types-ts4.5/ui/Layer/index.d.ts +47 -0
- package/dist/types-ts4.5/ui/Layer/internal/helpers.d.ts +5 -0
- package/dist/types-ts4.5/ui/MediaSingle/grid.d.ts +24 -0
- package/dist/types-ts4.5/ui/MediaSingle/index.d.ts +23 -0
- package/dist/types-ts4.5/ui/MediaSingle/link.d.ts +1 -0
- package/dist/types-ts4.5/ui/MediaSingle/styled.d.ts +43 -0
- package/dist/types-ts4.5/ui/Mention/index.d.ts +21 -0
- package/dist/types-ts4.5/ui/Mention/mention-with-profilecard.d.ts +15 -0
- package/dist/types-ts4.5/ui/Mention/mention-with-providers.d.ts +22 -0
- package/dist/types-ts4.5/ui/Mention/types.d.ts +2 -0
- package/dist/types-ts4.5/ui/Messages/index.d.ts +11 -0
- package/dist/types-ts4.5/ui/OverflowShadow/index.d.ts +103 -0
- package/dist/types-ts4.5/ui/OverflowShadow/shadowObserver.d.ts +27 -0
- package/dist/types-ts4.5/ui/Popup/index.d.ts +83 -0
- package/dist/types-ts4.5/ui/Popup/utils.d.ts +42 -0
- package/dist/types-ts4.5/ui/PortalProvider/PortalProviderThemesProvider.d.ts +6 -0
- package/dist/types-ts4.5/ui/PortalProvider/index.d.ts +51 -0
- package/dist/types-ts4.5/ui/Resizer/index.d.ts +22 -0
- package/dist/types-ts4.5/ui/Resizer/types.d.ts +18 -0
- package/dist/types-ts4.5/ui/Resizer/utils.d.ts +1 -0
- package/dist/types-ts4.5/ui/UnsupportedBlock/index.d.ts +14 -0
- package/dist/types-ts4.5/ui/UnsupportedInline/index.d.ts +14 -0
- package/dist/types-ts4.5/ui/WidthProvider/index.d.ts +29 -0
- package/dist/types-ts4.5/ui/WithCreateAnalyticsEvent/index.d.ts +6 -0
- package/dist/types-ts4.5/ui/clear-next-sibling-margin-top.d.ts +2 -0
- package/dist/types-ts4.5/ui/index.d.ts +28 -0
- package/dist/types-ts4.5/ui/unsupported-content-helper.d.ts +3 -0
- package/dist/types-ts4.5/ui/with-outer-listeners.d.ts +8 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Color/index.d.ts +20 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Color/styles.d.ts +4 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/borderColorPalette.d.ts +3 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.d.ts +3 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/common.d.ts +2 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/getColorMessage.d.ts +2 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/index.d.ts +3 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/paletteMessages.d.ts +123 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.d.ts +1444 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/panelBackgroundPalette.d.ts +4 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/statusColorPalette.d.ts +4 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/textColorPalette.d.ts +2 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/type.d.ts +12 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/index.d.ts +50 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/styles.d.ts +1 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/utils.d.ts +11 -0
- package/dist/types-ts4.5/ui-color/index.d.ts +12 -0
- package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.d.ts +7 -0
- package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.d.ts +7 -0
- package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/index.d.ts +3 -0
- package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/types.d.ts +36 -0
- package/dist/types-ts4.5/ui-menu/Dropdown/index.d.ts +40 -0
- package/dist/types-ts4.5/ui-menu/DropdownMenu/index.d.ts +22 -0
- package/dist/types-ts4.5/ui-menu/DropdownMenu/types.d.ts +52 -0
- package/dist/types-ts4.5/ui-menu/ToolbarButton/index.d.ts +57 -0
- package/dist/types-ts4.5/ui-menu/ToolbarButton/styles.d.ts +4 -0
- package/dist/types-ts4.5/ui-menu/index.d.ts +8 -0
- package/dist/types-ts4.5/ui-react/ReactEditorViewContext.d.ts +8 -0
- package/dist/types-ts4.5/ui-react/index.d.ts +2 -0
- package/dist/types-ts4.5/ui-react/with-react-editor-view-outer-listeners.d.ts +11 -0
- package/dist/types-ts4.5/utils/analytics.d.ts +29 -0
- package/dist/types-ts4.5/utils/annotation/index.d.ts +8 -0
- package/dist/types-ts4.5/utils/breakout.d.ts +43 -0
- package/dist/types-ts4.5/utils/browser-extensions.d.ts +43 -0
- package/dist/types-ts4.5/utils/browser.d.ts +4 -0
- package/dist/types-ts4.5/utils/collab.d.ts +2 -0
- package/dist/types-ts4.5/utils/compare-props.d.ts +32 -0
- package/dist/types-ts4.5/utils/compareNodes.d.ts +47 -0
- package/dist/types-ts4.5/utils/compose.d.ts +30 -0
- package/dist/types-ts4.5/utils/date.d.ts +18 -0
- package/dist/types-ts4.5/utils/dom.d.ts +40 -0
- package/dist/types-ts4.5/utils/editor-core-utils.d.ts +28 -0
- package/dist/types-ts4.5/utils/error-reporter.d.ts +13 -0
- package/dist/types-ts4.5/utils/extension-handler.d.ts +2 -0
- package/dist/types-ts4.5/utils/get-performance-options.d.ts +18 -0
- package/dist/types-ts4.5/utils/getModeFromTheme.d.ts +1 -0
- package/dist/types-ts4.5/utils/hyperlink.d.ts +27 -0
- package/dist/types-ts4.5/utils/imageLoader.d.ts +14 -0
- package/dist/types-ts4.5/utils/index.d.ts +51 -0
- package/dist/types-ts4.5/utils/is-text-input.d.ts +2 -0
- package/dist/types-ts4.5/utils/list.d.ts +14 -0
- package/dist/types-ts4.5/utils/macro.d.ts +10 -0
- package/dist/types-ts4.5/utils/nodes.d.ts +49 -0
- package/dist/types-ts4.5/utils/outdated-browsers.d.ts +1 -0
- package/dist/types-ts4.5/utils/performance/hooks/use-component-render-tracking/index.d.ts +19 -0
- package/dist/types-ts4.5/utils/performance/is-performance-api-available.d.ts +3 -0
- package/dist/types-ts4.5/utils/performance/measure-render.d.ts +53 -0
- package/dist/types-ts4.5/utils/performance/measure-tti.d.ts +14 -0
- package/dist/types-ts4.5/utils/performance/measure.d.ts +3 -0
- package/dist/types-ts4.5/utils/performance/navigation.d.ts +1 -0
- package/dist/types-ts4.5/utils/plugin-state-factory.d.ts +16 -0
- package/dist/types-ts4.5/utils/profiler/render-count.d.ts +50 -0
- package/dist/types-ts4.5/utils/referentiality.d.ts +18 -0
- package/dist/types-ts4.5/utils/should-force-tracking.d.ts +1 -0
- package/dist/types-ts4.5/utils/slice.d.ts +11 -0
- package/dist/types-ts4.5/utils/table.d.ts +4 -0
- package/dist/types-ts4.5/utils/track-unsupported-content.d.ts +20 -0
- package/dist/types-ts4.5/utils/traversor.d.ts +9 -0
- package/dist/types-ts4.5/utils/types.d.ts +2 -0
- package/dist/types-ts4.5/utils/unsupportedContent/get-unsupported-content-level-data.d.ts +57 -0
- package/dist/types-ts4.5/utils/validate-using-spec.d.ts +19 -0
- package/dist/types-ts4.5/utils/validator.d.ts +42 -0
- package/dist/types-ts4.5/utils/whitespace.d.ts +2 -0
- package/dist/types-ts4.5/validator.d.ts +2 -0
- package/dist/types-ts4.5/with-plugin-state/index.d.ts +88 -0
- package/dist/types-ts4.5/with-plugin-state/types.d.ts +10 -0
- package/insert/package.json +15 -0
- package/monitoring/package.json +15 -0
- package/package.json +30 -12
- package/paste/package.json +15 -0
- package/report.api.md +1 -1
- package/resizer/package.json +15 -0
- package/dist/cjs/utils/sendLogs.js +0 -17
- package/dist/es2019/utils/sendLogs.js +0 -8
- package/dist/esm/utils/sendLogs.js +0 -10
- package/dist/types/utils/sendLogs.d.ts +0 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
12
|
+
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
13
|
+
var _styles = require("./styles");
|
|
14
|
+
var _excluded = ["buttonStyles"];
|
|
15
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
+
var _default = function _default(_ref) {
|
|
18
|
+
var title = _ref.title,
|
|
19
|
+
icon = _ref.icon,
|
|
20
|
+
iconAfter = _ref.iconAfter,
|
|
21
|
+
onClick = _ref.onClick,
|
|
22
|
+
onKeyDown = _ref.onKeyDown,
|
|
23
|
+
onMouseEnter = _ref.onMouseEnter,
|
|
24
|
+
onMouseLeave = _ref.onMouseLeave,
|
|
25
|
+
onFocus = _ref.onFocus,
|
|
26
|
+
onBlur = _ref.onBlur,
|
|
27
|
+
selected = _ref.selected,
|
|
28
|
+
disabled = _ref.disabled,
|
|
29
|
+
href = _ref.href,
|
|
30
|
+
target = _ref.target,
|
|
31
|
+
_ref$appearance = _ref.appearance,
|
|
32
|
+
appearance = _ref$appearance === void 0 ? 'subtle' : _ref$appearance,
|
|
33
|
+
children = _ref.children,
|
|
34
|
+
className = _ref.className,
|
|
35
|
+
tooltipContent = _ref.tooltipContent,
|
|
36
|
+
testId = _ref.testId,
|
|
37
|
+
_ref$hideTooltipOnCli = _ref.hideTooltipOnClick,
|
|
38
|
+
hideTooltipOnClick = _ref$hideTooltipOnCli === void 0 ? true : _ref$hideTooltipOnCli,
|
|
39
|
+
ariaHasPopup = _ref.ariaHasPopup,
|
|
40
|
+
tabIndex = _ref.tabIndex,
|
|
41
|
+
areaControls = _ref.areaControls,
|
|
42
|
+
ariaLabel = _ref.ariaLabel;
|
|
43
|
+
// Check if there's only an icon and add additional styles
|
|
44
|
+
var iconOnly = (icon || iconAfter) && !children;
|
|
45
|
+
var customSpacing = iconOnly ? _styles.iconOnlySpacing : {};
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
47
|
+
content: tooltipContent || title,
|
|
48
|
+
hideTooltipOnClick: hideTooltipOnClick,
|
|
49
|
+
position: "top"
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
+
onMouseEnter: onMouseEnter,
|
|
52
|
+
onMouseLeave: onMouseLeave
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement(_customThemeButton.default, {
|
|
54
|
+
className: className,
|
|
55
|
+
theme: function theme(adgTheme, themeProps) {
|
|
56
|
+
var _adgTheme = adgTheme(themeProps),
|
|
57
|
+
buttonStyles = _adgTheme.buttonStyles,
|
|
58
|
+
rest = (0, _objectWithoutProperties2.default)(_adgTheme, _excluded);
|
|
59
|
+
return _objectSpread({
|
|
60
|
+
buttonStyles: _objectSpread(_objectSpread(_objectSpread({}, buttonStyles), customSpacing), appearance === 'danger' && (0, _styles.getButtonStyles)({
|
|
61
|
+
appearance: appearance,
|
|
62
|
+
state: themeProps.state,
|
|
63
|
+
mode: themeProps.mode
|
|
64
|
+
}))
|
|
65
|
+
}, rest);
|
|
66
|
+
},
|
|
67
|
+
"aria-label": ariaLabel || title,
|
|
68
|
+
"aria-pressed": !ariaHasPopup ? selected : undefined,
|
|
69
|
+
"aria-expanded": ariaHasPopup ? selected : undefined,
|
|
70
|
+
"aria-controls": ariaHasPopup ? areaControls : undefined,
|
|
71
|
+
spacing: 'compact',
|
|
72
|
+
href: href,
|
|
73
|
+
target: target,
|
|
74
|
+
appearance: appearance,
|
|
75
|
+
"aria-haspopup": ariaHasPopup,
|
|
76
|
+
iconBefore: icon || undefined,
|
|
77
|
+
iconAfter: iconAfter,
|
|
78
|
+
onClick: onClick,
|
|
79
|
+
onKeyDown: onKeyDown,
|
|
80
|
+
isSelected: selected,
|
|
81
|
+
isDisabled: disabled,
|
|
82
|
+
testId: testId,
|
|
83
|
+
onFocus: onFocus,
|
|
84
|
+
onBlur: onBlur
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
// tabIndex set as 0 by default in the design system ButtonBase component
|
|
87
|
+
// this is not expected for all buttons, we have to use tabIndex={null} for some cases
|
|
88
|
+
// should be fixed here https://a11y-internal.atlassian.net/browse/DST-287
|
|
89
|
+
,
|
|
90
|
+
tabIndex: tabIndex
|
|
91
|
+
}, children)));
|
|
92
|
+
};
|
|
93
|
+
exports.default = _default;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.iconOnlySpacing = exports.getButtonStyles = void 0;
|
|
8
|
+
var _adfSchema = require("@atlaskit/adf-schema");
|
|
9
|
+
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
10
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
+
var iconOnlySpacing = {
|
|
13
|
+
'&&': {
|
|
14
|
+
padding: '0px',
|
|
15
|
+
/**
|
|
16
|
+
Increased specificity here because css for .hyperlink-open-link defined in
|
|
17
|
+
packages/editor/editor-core/src/ui/ContentStyles/index.tsx file
|
|
18
|
+
overrides padding left-right 2px with 4px.
|
|
19
|
+
*/
|
|
20
|
+
'&&[href]': {
|
|
21
|
+
padding: '0 2px'
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
'& > span': {
|
|
25
|
+
margin: '0px'
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.iconOnlySpacing = iconOnlySpacing;
|
|
29
|
+
var getStyles = function getStyles(property, _ref) {
|
|
30
|
+
var _ref$appearance = _ref.appearance,
|
|
31
|
+
appearance = _ref$appearance === void 0 ? 'default' : _ref$appearance,
|
|
32
|
+
_ref$state = _ref.state,
|
|
33
|
+
state = _ref$state === void 0 ? 'default' : _ref$state,
|
|
34
|
+
_ref$mode = _ref.mode,
|
|
35
|
+
mode = _ref$mode === void 0 ? 'light' : _ref$mode;
|
|
36
|
+
if (!property[appearance] || !property[appearance][state]) {
|
|
37
|
+
return 'initial';
|
|
38
|
+
}
|
|
39
|
+
return property[appearance][state][mode];
|
|
40
|
+
};
|
|
41
|
+
var background = {
|
|
42
|
+
danger: {
|
|
43
|
+
default: {
|
|
44
|
+
light: 'inherit',
|
|
45
|
+
dark: 'inherit'
|
|
46
|
+
},
|
|
47
|
+
hover: {
|
|
48
|
+
light: "var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"),
|
|
49
|
+
dark: "var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")")
|
|
50
|
+
},
|
|
51
|
+
active: {
|
|
52
|
+
light: "var(--ds-background-neutral-pressed, ".concat("".concat((0, _adfSchema.hexToRgba)(colors.B75, 0.6)), ")"),
|
|
53
|
+
dark: "var(--ds-background-neutral-pressed, ".concat("".concat((0, _adfSchema.hexToRgba)(colors.B75, 0.6)), ")")
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var color = {
|
|
58
|
+
danger: {
|
|
59
|
+
default: {
|
|
60
|
+
light: "var(--ds-icon, ".concat(colors.N400, ")"),
|
|
61
|
+
dark: "var(--ds-icon, ".concat(colors.DN400, ")")
|
|
62
|
+
},
|
|
63
|
+
hover: {
|
|
64
|
+
light: "var(--ds-icon-danger, ".concat(colors.R400, ")"),
|
|
65
|
+
dark: "var(--ds-icon-danger, ".concat(colors.R400, ")")
|
|
66
|
+
},
|
|
67
|
+
active: {
|
|
68
|
+
light: "var(--ds-icon-danger, ".concat(colors.R400, ")"),
|
|
69
|
+
dark: "var(--ds-icon-danger, ".concat(colors.R400, ")")
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var getButtonStyles = function getButtonStyles(props) {
|
|
74
|
+
return {
|
|
75
|
+
background: getStyles(background, props),
|
|
76
|
+
color: getStyles(color, props)
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
exports.getButtonStyles = getButtonStyles;
|
|
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.calcColumnsFromPx = calcColumnsFromPx;
|
|
7
|
+
exports.calcMediaPxWidth = void 0;
|
|
7
8
|
exports.calcPctFromPx = calcPctFromPx;
|
|
8
9
|
exports.calcPxFromColumns = calcPxFromColumns;
|
|
9
10
|
exports.calcPxFromPct = calcPxFromPct;
|
|
10
|
-
exports.snapToGrid = exports.layoutSupportsWidth = void 0;
|
|
11
|
+
exports.wrappedLayouts = exports.snapToGrid = exports.layoutSupportsWidth = void 0;
|
|
12
|
+
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
13
|
var handleMargin = 12;
|
|
12
14
|
var gutterSize = handleMargin * 2;
|
|
13
15
|
var validWidthModes = ['center', 'wrap-left', 'wrap-right', 'align-start', 'align-end'];
|
|
@@ -31,6 +33,55 @@ function calcPctFromPx(width, lineLength) {
|
|
|
31
33
|
var maxWidth = lineLength + gutterSize;
|
|
32
34
|
return (width + gutterSize) / maxWidth;
|
|
33
35
|
}
|
|
36
|
+
var wrappedLayouts = ['wrap-left', 'wrap-right', 'align-end', 'align-start'];
|
|
37
|
+
exports.wrappedLayouts = wrappedLayouts;
|
|
38
|
+
var calcPctWidth = function calcPctWidth(containerWidth, pctWidth, origWidth, origHeight) {
|
|
39
|
+
return pctWidth && origWidth && origHeight && Math.ceil(calcPxFromPct(pctWidth / 100, containerWidth.lineLength || containerWidth.width));
|
|
40
|
+
};
|
|
41
|
+
var calcMediaPxWidth = function calcMediaPxWidth(opts) {
|
|
42
|
+
var origWidth = opts.origWidth,
|
|
43
|
+
origHeight = opts.origHeight,
|
|
44
|
+
layout = opts.layout,
|
|
45
|
+
pctWidth = opts.pctWidth,
|
|
46
|
+
containerWidth = opts.containerWidth,
|
|
47
|
+
resizedPctWidth = opts.resizedPctWidth;
|
|
48
|
+
var width = containerWidth.width,
|
|
49
|
+
lineLength = containerWidth.lineLength;
|
|
50
|
+
var calculatedPctWidth = calcPctWidth(containerWidth, pctWidth, origWidth, origHeight);
|
|
51
|
+
var calculatedResizedPctWidth = calcPctWidth(containerWidth, resizedPctWidth, origWidth, origHeight);
|
|
52
|
+
if (layout === 'wide') {
|
|
53
|
+
if (lineLength) {
|
|
54
|
+
var wideWidth = Math.ceil(lineLength * _editorSharedStyles.breakoutWideScaleRatio);
|
|
55
|
+
return wideWidth > width ? lineLength : wideWidth;
|
|
56
|
+
}
|
|
57
|
+
} else if (layout === 'full-width') {
|
|
58
|
+
return width - _editorSharedStyles.akEditorBreakoutPadding;
|
|
59
|
+
} else if (calculatedPctWidth) {
|
|
60
|
+
if (wrappedLayouts.indexOf(layout) > -1) {
|
|
61
|
+
if (calculatedResizedPctWidth) {
|
|
62
|
+
if (resizedPctWidth < 50) {
|
|
63
|
+
return calculatedResizedPctWidth;
|
|
64
|
+
}
|
|
65
|
+
return calculatedPctWidth;
|
|
66
|
+
}
|
|
67
|
+
return Math.min(calculatedPctWidth, origWidth);
|
|
68
|
+
}
|
|
69
|
+
if (calculatedResizedPctWidth) {
|
|
70
|
+
return calculatedResizedPctWidth;
|
|
71
|
+
}
|
|
72
|
+
return calculatedPctWidth;
|
|
73
|
+
} else if (layout === 'center') {
|
|
74
|
+
if (calculatedResizedPctWidth) {
|
|
75
|
+
return calculatedResizedPctWidth;
|
|
76
|
+
}
|
|
77
|
+
return Math.min(origWidth, lineLength || width);
|
|
78
|
+
} else if (layout && wrappedLayouts.indexOf(layout) !== -1) {
|
|
79
|
+
var halfLineLength = Math.ceil((lineLength || width) / 2);
|
|
80
|
+
return origWidth <= halfLineLength ? origWidth : halfLineLength;
|
|
81
|
+
}
|
|
82
|
+
return origWidth;
|
|
83
|
+
};
|
|
84
|
+
exports.calcMediaPxWidth = calcMediaPxWidth;
|
|
34
85
|
var snapToGrid = function snapToGrid(gridWidth, width, height, lineLength, gridSize) {
|
|
35
86
|
var pxWidth = calcPxFromPct(gridWidth / 100, lineLength);
|
|
36
87
|
var columnSpan = Math.round(calcColumnsFromPx(pxWidth, lineLength, gridSize));
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.DEFAULT_IMAGE_WIDTH = exports.DEFAULT_IMAGE_HEIGHT = void 0;
|
|
8
8
|
exports.default = MediaSingle;
|
|
9
|
-
exports.
|
|
9
|
+
exports.shouldAddDefaultWrappedWidth = void 0;
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
@@ -20,10 +20,8 @@ var DEFAULT_IMAGE_WIDTH = 250;
|
|
|
20
20
|
exports.DEFAULT_IMAGE_WIDTH = DEFAULT_IMAGE_WIDTH;
|
|
21
21
|
var DEFAULT_IMAGE_HEIGHT = 200;
|
|
22
22
|
exports.DEFAULT_IMAGE_HEIGHT = DEFAULT_IMAGE_HEIGHT;
|
|
23
|
-
var wrappedLayouts = ['wrap-left', 'wrap-right', 'align-end', 'align-start'];
|
|
24
|
-
exports.wrappedLayouts = wrappedLayouts;
|
|
25
23
|
var shouldAddDefaultWrappedWidth = function shouldAddDefaultWrappedWidth(layout, width, lineLength) {
|
|
26
|
-
return wrappedLayouts.indexOf(layout) > -1 && lineLength && width && width > 0.5 * lineLength;
|
|
24
|
+
return _grid.wrappedLayouts.indexOf(layout) > -1 && lineLength && width && width > 0.5 * lineLength;
|
|
27
25
|
};
|
|
28
26
|
exports.shouldAddDefaultWrappedWidth = shouldAddDefaultWrappedWidth;
|
|
29
27
|
function MediaSingle(_ref) {
|
|
@@ -10,16 +10,15 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _success = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/success"));
|
|
11
11
|
var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
|
|
12
12
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
14
13
|
var _typography = require("@atlaskit/theme/typography");
|
|
15
14
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
16
15
|
/** @jsx jsx */
|
|
17
16
|
var errorColor = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), "var(--ds-text-danger, ".concat(_colors.R400, ")"));
|
|
18
17
|
var validColor = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), "var(--ds-text-success, ".concat(_colors.G400, ")"));
|
|
19
18
|
var messageStyle = function messageStyle(props) {
|
|
20
|
-
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", " font-weight: normal;\n color: ", ";\n margin-top: ", "
|
|
19
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", " font-weight: normal;\n color: ", ";\n margin-top: ", ";\n display: flex;\n justify-content: baseline;\n"])), (0, _typography.h200)(props), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), "var(--ds-space-050, 4px)");
|
|
21
20
|
};
|
|
22
|
-
var iconWrapperStyle = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-right:
|
|
21
|
+
var iconWrapperStyle = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-right: ", ";\n"])), "var(--ds-space-050, 4px)");
|
|
23
22
|
var HelperMessage = function HelperMessage(_ref) {
|
|
24
23
|
var children = _ref.children;
|
|
25
24
|
return (0, _react.jsx)("div", {
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = ResizerNext;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _reResizable = require("re-resizable");
|
|
11
|
+
var _resizer = require("../../styles/shared/resizer");
|
|
12
|
+
var _utils = require("./utils");
|
|
13
|
+
function ResizerNext(props) {
|
|
14
|
+
var resizable = _react.default.useRef(null);
|
|
15
|
+
var handleResize = props.handleResize,
|
|
16
|
+
handleResizeStart = props.handleResizeStart,
|
|
17
|
+
handleResizeStop = props.handleResizeStop;
|
|
18
|
+
var onResizeStart = _react.default.useCallback(function (event) {
|
|
19
|
+
// prevent creating a drag event on Firefox
|
|
20
|
+
event.preventDefault();
|
|
21
|
+
handleResizeStart();
|
|
22
|
+
}, [handleResizeStart]);
|
|
23
|
+
var onResize = _react.default.useCallback(function (_event, _direction, _elementRef, delta) {
|
|
24
|
+
var resizableCurrent = resizable.current;
|
|
25
|
+
if (!resizableCurrent || !resizableCurrent.state.original) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
var originalState = {
|
|
29
|
+
x: resizableCurrent.state.original.x,
|
|
30
|
+
y: resizableCurrent.state.original.y,
|
|
31
|
+
width: resizableCurrent.state.original.width,
|
|
32
|
+
height: resizableCurrent.state.original.height
|
|
33
|
+
};
|
|
34
|
+
handleResize(originalState, delta);
|
|
35
|
+
}, [handleResize]);
|
|
36
|
+
var onResizeStop = _react.default.useCallback(function (_event, _direction, _elementRef, delta) {
|
|
37
|
+
var resizableCurrent = resizable.current;
|
|
38
|
+
if (!resizableCurrent || !resizableCurrent.state.original) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
var originalState = {
|
|
42
|
+
x: resizableCurrent.state.original.x,
|
|
43
|
+
y: resizableCurrent.state.original.y,
|
|
44
|
+
width: resizableCurrent.state.original.width,
|
|
45
|
+
height: resizableCurrent.state.original.height
|
|
46
|
+
};
|
|
47
|
+
handleResizeStop(originalState, delta);
|
|
48
|
+
}, [handleResizeStop]);
|
|
49
|
+
var handles = {};
|
|
50
|
+
if (props.handleClassName) {
|
|
51
|
+
_utils.handleSides.forEach(function (side) {
|
|
52
|
+
handles[side] = "".concat(props.handleClassName, "-").concat(side);
|
|
53
|
+
});
|
|
54
|
+
} else {
|
|
55
|
+
handles = {
|
|
56
|
+
left: _resizer.resizerHandleLeftClassName,
|
|
57
|
+
right: _resizer.resizerHandleRightClassName
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
var innerPadding = props.innerPadding || _resizer.resizerHandlePadding;
|
|
61
|
+
var handleStyles = {
|
|
62
|
+
left: {
|
|
63
|
+
width: '24px',
|
|
64
|
+
left: "-".concat(innerPadding, "px"),
|
|
65
|
+
zIndex: _resizer.resizerHandleZIndex,
|
|
66
|
+
pointerEvents: 'auto'
|
|
67
|
+
},
|
|
68
|
+
right: {
|
|
69
|
+
width: '24px',
|
|
70
|
+
right: "-".concat(innerPadding, "px"),
|
|
71
|
+
zIndex: _resizer.resizerHandleZIndex,
|
|
72
|
+
pointerEvents: 'auto'
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
var className = (0, _classnames.default)(props.className, _resizer.resizerItemClassName);
|
|
76
|
+
return /*#__PURE__*/_react.default.createElement(_reResizable.Resizable, {
|
|
77
|
+
ref: resizable,
|
|
78
|
+
size: {
|
|
79
|
+
width: props.width,
|
|
80
|
+
// just content itself (no paddings)
|
|
81
|
+
height: 'auto'
|
|
82
|
+
},
|
|
83
|
+
maxWidth: props.maxWidth,
|
|
84
|
+
minWidth: props.minWidth,
|
|
85
|
+
className: className,
|
|
86
|
+
enable: props.enable,
|
|
87
|
+
handleClasses: handles,
|
|
88
|
+
handleStyles: handleStyles,
|
|
89
|
+
handleWrapperStyle: props.handleWrapperStyle // is used to override the style of resize handles wrapper, needed for media when it is selected and caption appears makes sure the handlers won't jump.
|
|
90
|
+
,
|
|
91
|
+
handleComponent: props.handleComponent // in media was added as a workaround to fix Up arrow key bug when media has caption and the cursor is place below the image. Our epic has a separate ticket to address this problem.
|
|
92
|
+
,
|
|
93
|
+
onResizeStart: onResizeStart,
|
|
94
|
+
onResize: onResize,
|
|
95
|
+
onResizeStop: onResizeStop
|
|
96
|
+
}, props.children);
|
|
97
|
+
}
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -47,6 +47,12 @@ Object.defineProperty(exports, "ExpandLayoutWrapperWithRef", {
|
|
|
47
47
|
return _Expand.ExpandLayoutWrapperWithRef;
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
+
Object.defineProperty(exports, "FloatingToolbarButton", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function get() {
|
|
53
|
+
return _Button.default;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
50
56
|
Object.defineProperty(exports, "HelperMessage", {
|
|
51
57
|
enumerable: true,
|
|
52
58
|
get: function get() {
|
|
@@ -143,6 +149,12 @@ Object.defineProperty(exports, "calcColumnsFromPx", {
|
|
|
143
149
|
return _grid.calcColumnsFromPx;
|
|
144
150
|
}
|
|
145
151
|
});
|
|
152
|
+
Object.defineProperty(exports, "calcMediaPxWidth", {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: function get() {
|
|
155
|
+
return _grid.calcMediaPxWidth;
|
|
156
|
+
}
|
|
157
|
+
});
|
|
146
158
|
Object.defineProperty(exports, "calcPctFromPx", {
|
|
147
159
|
enumerable: true,
|
|
148
160
|
get: function get() {
|
|
@@ -260,7 +272,7 @@ Object.defineProperty(exports, "withOuterListeners", {
|
|
|
260
272
|
Object.defineProperty(exports, "wrappedLayouts", {
|
|
261
273
|
enumerable: true,
|
|
262
274
|
get: function get() {
|
|
263
|
-
return
|
|
275
|
+
return _grid.wrappedLayouts;
|
|
264
276
|
}
|
|
265
277
|
});
|
|
266
278
|
var _Caption = _interopRequireDefault(require("./Caption"));
|
|
@@ -282,5 +294,6 @@ var _Messages = require("./Messages");
|
|
|
282
294
|
var _clearNextSiblingMarginTop = require("./clear-next-sibling-margin-top");
|
|
283
295
|
var _IntlErrorBoundary = require("./IntlErrorBoundary");
|
|
284
296
|
var _IntlProviderIfMissingWrapper = _interopRequireDefault(require("./IntlProviderIfMissingWrapper"));
|
|
297
|
+
var _Button = _interopRequireDefault(require("./FloatingToolbar/Button"));
|
|
285
298
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
286
299
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.colorPaletteWrapper = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
11
10
|
var _templateObject;
|
|
12
|
-
var colorPaletteWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n padding: 0 ", "
|
|
11
|
+
var colorPaletteWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n padding: 0 ", ";\n /* Firefox bug fix: https://product-fabric.atlassian.net/browse/ED-1789 */\n display: flex;\n"])), "var(--ds-space-100, 8px)");
|
|
13
12
|
exports.colorPaletteWrapper = colorPaletteWrapper;
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.isElementInTableCell = exports.extractSliceFromStep = void 0;
|
|
7
|
+
exports.isEmptyParagraph = isEmptyParagraph;
|
|
8
|
+
exports.isValidPosition = exports.isTextSelection = exports.isLastItemMediaGroup = void 0;
|
|
7
9
|
exports.nonNullable = nonNullable;
|
|
8
10
|
exports.setNodeSelection = void 0;
|
|
9
11
|
exports.setTextSelection = setTextSelection;
|
|
@@ -12,6 +14,12 @@ exports.stepHasSlice = void 0;
|
|
|
12
14
|
var _prosemirrorState = require("prosemirror-state");
|
|
13
15
|
var _prosemirrorTransform = require("prosemirror-transform");
|
|
14
16
|
var _dom = require("./dom");
|
|
17
|
+
/**
|
|
18
|
+
* Checks if node is an empty paragraph.
|
|
19
|
+
*/
|
|
20
|
+
function isEmptyParagraph(node) {
|
|
21
|
+
return !!node && node.type.name === 'paragraph' && !node.childCount;
|
|
22
|
+
}
|
|
15
23
|
var stepHasSlice = function stepHasSlice(step) {
|
|
16
24
|
return step && step.hasOwnProperty('slice');
|
|
17
25
|
};
|