@atlaskit/editor-common 70.1.3 → 70.2.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 +40 -0
- package/dist/cjs/react-node-view/index.js +19 -17
- package/dist/cjs/styles/index.js +12 -0
- package/dist/cjs/styles/shared/code-block.js +5 -3
- package/dist/cjs/styles/shared/lists.js +4 -2
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/types/copy-button.js +5 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Expand/index.js +2 -2
- package/dist/cjs/ui/IntlProviderIfMissingWrapper/index.js +33 -0
- package/dist/cjs/ui/Popup/index.js +2 -2
- package/dist/cjs/ui/PortalProvider/index.js +62 -47
- package/dist/cjs/ui/index.js +8 -0
- package/dist/cjs/utils/breakout.js +53 -2
- package/dist/cjs/utils/collab.js +22 -0
- package/dist/cjs/utils/dom.js +16 -0
- package/dist/cjs/utils/get-performance-options.js +70 -0
- package/dist/cjs/utils/index.js +57 -1
- package/dist/cjs/utils/outdated-browsers.js +41 -0
- package/dist/cjs/utils/referentiality.js +49 -0
- package/dist/cjs/utils/sendLogs.js +19 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/with-plugin-state/index.js +61 -54
- package/dist/es2019/react-node-view/index.js +19 -24
- package/dist/es2019/styles/index.js +2 -2
- package/dist/es2019/styles/shared/code-block.js +13 -1
- package/dist/es2019/styles/shared/lists.js +2 -1
- package/dist/es2019/styles/shared/table.js +4 -2
- package/dist/es2019/types/copy-button.js +1 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Expand/index.js +17 -15
- package/dist/es2019/ui/IntlProviderIfMissingWrapper/index.js +18 -0
- package/dist/es2019/ui/Popup/index.js +2 -1
- package/dist/es2019/ui/PortalProvider/index.js +33 -14
- package/dist/es2019/ui/index.js +2 -1
- package/dist/es2019/utils/breakout.js +47 -1
- package/dist/es2019/utils/collab.js +13 -0
- package/dist/es2019/utils/dom.js +16 -0
- package/dist/es2019/utils/get-performance-options.js +57 -0
- package/dist/es2019/utils/index.js +6 -2
- package/dist/es2019/utils/outdated-browsers.js +32 -0
- package/dist/es2019/utils/referentiality.js +34 -0
- package/dist/es2019/utils/sendLogs.js +8 -0
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/with-plugin-state/index.js +55 -52
- package/dist/esm/react-node-view/index.js +19 -22
- package/dist/esm/styles/index.js +2 -2
- package/dist/esm/styles/shared/code-block.js +4 -3
- package/dist/esm/styles/shared/lists.js +2 -1
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/types/copy-button.js +1 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Expand/index.js +2 -2
- package/dist/esm/ui/IntlProviderIfMissingWrapper/index.js +19 -0
- package/dist/esm/ui/Popup/index.js +2 -2
- package/dist/esm/ui/PortalProvider/index.js +59 -48
- package/dist/esm/ui/index.js +2 -1
- package/dist/esm/utils/breakout.js +46 -1
- package/dist/esm/utils/collab.js +13 -0
- package/dist/esm/utils/dom.js +16 -0
- package/dist/esm/utils/get-performance-options.js +55 -0
- package/dist/esm/utils/index.js +6 -2
- package/dist/esm/utils/outdated-browsers.js +32 -0
- package/dist/esm/utils/referentiality.js +40 -0
- package/dist/esm/utils/sendLogs.js +10 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/with-plugin-state/index.js +59 -54
- package/dist/types/analytics/types/events.d.ts +1 -0
- package/dist/types/extensions/types/extension-handler.d.ts +1 -0
- package/dist/types/styles/index.d.ts +2 -2
- package/dist/types/styles/shared/code-block.d.ts +1 -0
- package/dist/types/styles/shared/lists.d.ts +1 -0
- package/dist/types/types/copy-button.d.ts +20 -0
- package/dist/types/types/editor-actions.d.ts +1 -0
- package/dist/types/types/editor-container-width.d.ts +14 -0
- package/dist/types/types/feature-flags.d.ts +0 -6
- package/dist/types/types/floating-toolbar.d.ts +23 -2
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/ui/IntlProviderIfMissingWrapper/index.d.ts +6 -0
- package/dist/types/ui/Popup/index.d.ts +1 -0
- package/dist/types/ui/PortalProvider/index.d.ts +2 -1
- package/dist/types/ui/index.d.ts +1 -0
- package/dist/types/utils/breakout.d.ts +25 -0
- package/dist/types/utils/collab.d.ts +2 -0
- package/dist/types/utils/dom.d.ts +15 -1
- package/dist/types/utils/get-performance-options.d.ts +18 -0
- package/dist/types/utils/getModeFromTheme.d.ts +1 -1
- package/dist/types/utils/index.d.ts +5 -1
- package/dist/types/utils/outdated-browsers.d.ts +1 -0
- package/dist/types/utils/referentiality.d.ts +3 -0
- package/dist/types/utils/sendLogs.d.ts +1 -0
- package/dist/types/with-plugin-state/index.d.ts +4 -2
- package/package.json +12 -17
- package/report.api.md +7 -3
- package/dist/types-ts4.0/__tests_external__/cases/fundamentals/collection.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/fundamentals/test-cases/editor-is-present.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/fundamentals/test-cases/editor-typing.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/index.d.ts +0 -4
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/block/delete.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/block/edit.d.ts +0 -4
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/block/index.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/block/insert.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/embed/delete.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/embed/edit.d.ts +0 -4
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/embed/index.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/embed/insert.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/inline/delete.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/inline/edit.d.ts +0 -4
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/inline/index.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/inline/insert.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/inline/unlink.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/types.d.ts +0 -4
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/url/index.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/url/insert.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/cases/types.d.ts +0 -7
- package/dist/types-ts4.0/__tests_external__/index.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/page-objects/Editor.d.ts +0 -9
- package/dist/types-ts4.0/__tests_external__/page-objects/EditorSmartLink.d.ts +0 -40
- package/dist/types-ts4.0/__tests_external__/page-objects/Renderer.d.ts +0 -6
- package/dist/types-ts4.0/analytics/api.d.ts +0 -5
- package/dist/types-ts4.0/analytics/index.d.ts +0 -3
- package/dist/types-ts4.0/analytics/types/avatar.d.ts +0 -5
- package/dist/types-ts4.0/analytics/types/block.d.ts +0 -3
- package/dist/types-ts4.0/analytics/types/config-panel-events.d.ts +0 -17
- package/dist/types-ts4.0/analytics/types/cut-copy-events.d.ts +0 -12
- package/dist/types-ts4.0/analytics/types/date-events.d.ts +0 -17
- package/dist/types-ts4.0/analytics/types/dispatch-analytics-event.d.ts +0 -2
- package/dist/types-ts4.0/analytics/types/element-browser-events.d.ts +0 -11
- package/dist/types-ts4.0/analytics/types/enums.d.ts +0 -314
- package/dist/types-ts4.0/analytics/types/events.d.ts +0 -126
- package/dist/types-ts4.0/analytics/types/experimental-events.d.ts +0 -17
- package/dist/types-ts4.0/analytics/types/extension-events.d.ts +0 -37
- package/dist/types-ts4.0/analytics/types/find-replace-events.d.ts +0 -23
- package/dist/types-ts4.0/analytics/types/format-events.d.ts +0 -49
- package/dist/types-ts4.0/analytics/types/general-events.d.ts +0 -179
- package/dist/types-ts4.0/analytics/types/index.d.ts +0 -34
- package/dist/types-ts4.0/analytics/types/inline-comment-events.d.ts +0 -17
- package/dist/types-ts4.0/analytics/types/insert-events.d.ts +0 -128
- package/dist/types-ts4.0/analytics/types/link-tool-bar-events.d.ts +0 -76
- package/dist/types-ts4.0/analytics/types/list-events.d.ts +0 -52
- package/dist/types-ts4.0/analytics/types/media-events.d.ts +0 -16
- package/dist/types-ts4.0/analytics/types/node-events.d.ts +0 -56
- package/dist/types-ts4.0/analytics/types/paste-events.d.ts +0 -39
- package/dist/types-ts4.0/analytics/types/performance-report.d.ts +0 -24
- package/dist/types-ts4.0/analytics/types/referentiality-events.d.ts +0 -9
- package/dist/types-ts4.0/analytics/types/selection-events.d.ts +0 -18
- package/dist/types-ts4.0/analytics/types/smart-links.d.ts +0 -13
- package/dist/types-ts4.0/analytics/types/substitute-events.d.ts +0 -26
- package/dist/types-ts4.0/analytics/types/table-events.d.ts +0 -102
- package/dist/types-ts4.0/analytics/types/toolbar-button.d.ts +0 -22
- package/dist/types-ts4.0/analytics/types/type-ahead.d.ts +0 -27
- package/dist/types-ts4.0/analytics/types/utils.d.ts +0 -46
- package/dist/types-ts4.0/card/cardOptions.d.ts +0 -9
- package/dist/types-ts4.0/card/index.d.ts +0 -1
- package/dist/types-ts4.0/collab/types.d.ts +0 -82
- package/dist/types-ts4.0/collab.d.ts +0 -1
- package/dist/types-ts4.0/core-utils/index.d.ts +0 -1
- package/dist/types-ts4.0/core-utils/inside.d.ts +0 -2
- package/dist/types-ts4.0/emoji.d.ts +0 -3
- package/dist/types-ts4.0/event-dispatcher/index.d.ts +0 -19
- package/dist/types-ts4.0/extensions/combine-extension-providers.d.ts +0 -7
- package/dist/types-ts4.0/extensions/default-extension-provider.d.ts +0 -17
- package/dist/types-ts4.0/extensions/extension-fields-helpers.d.ts +0 -10
- package/dist/types-ts4.0/extensions/extension-handlers.d.ts +0 -13
- package/dist/types-ts4.0/extensions/index.d.ts +0 -8
- package/dist/types-ts4.0/extensions/manifest-helpers.d.ts +0 -8
- package/dist/types-ts4.0/extensions/module-helpers.d.ts +0 -11
- package/dist/types-ts4.0/extensions/types/extension-handler.d.ts +0 -39
- package/dist/types-ts4.0/extensions/types/extension-manifest-common.d.ts +0 -8
- package/dist/types-ts4.0/extensions/types/extension-manifest-toolbar-item.d.ts +0 -45
- package/dist/types-ts4.0/extensions/types/extension-manifest.d.ts +0 -101
- package/dist/types-ts4.0/extensions/types/extension-parameters.d.ts +0 -5
- package/dist/types-ts4.0/extensions/types/extension-provider.d.ts +0 -8
- package/dist/types-ts4.0/extensions/types/field-definitions.d.ts +0 -171
- package/dist/types-ts4.0/extensions/types/index.d.ts +0 -8
- package/dist/types-ts4.0/extensions/types/utils.d.ts +0 -18
- package/dist/types-ts4.0/extensions.d.ts +0 -2
- package/dist/types-ts4.0/i18n/cs.d.ts +0 -100
- package/dist/types-ts4.0/i18n/da.d.ts +0 -100
- package/dist/types-ts4.0/i18n/de.d.ts +0 -100
- package/dist/types-ts4.0/i18n/en.d.ts +0 -100
- package/dist/types-ts4.0/i18n/en_GB.d.ts +0 -100
- package/dist/types-ts4.0/i18n/en_ZZ.d.ts +0 -100
- package/dist/types-ts4.0/i18n/es.d.ts +0 -100
- package/dist/types-ts4.0/i18n/et.d.ts +0 -8
- package/dist/types-ts4.0/i18n/fi.d.ts +0 -100
- package/dist/types-ts4.0/i18n/fr.d.ts +0 -100
- package/dist/types-ts4.0/i18n/hu.d.ts +0 -100
- package/dist/types-ts4.0/i18n/index.d.ts +0 -31
- package/dist/types-ts4.0/i18n/it.d.ts +0 -100
- package/dist/types-ts4.0/i18n/ja.d.ts +0 -100
- package/dist/types-ts4.0/i18n/ko.d.ts +0 -100
- package/dist/types-ts4.0/i18n/nb.d.ts +0 -100
- package/dist/types-ts4.0/i18n/nl.d.ts +0 -100
- package/dist/types-ts4.0/i18n/pl.d.ts +0 -100
- package/dist/types-ts4.0/i18n/pt_BR.d.ts +0 -100
- package/dist/types-ts4.0/i18n/pt_PT.d.ts +0 -8
- package/dist/types-ts4.0/i18n/ru.d.ts +0 -100
- package/dist/types-ts4.0/i18n/sk.d.ts +0 -8
- package/dist/types-ts4.0/i18n/sv.d.ts +0 -100
- package/dist/types-ts4.0/i18n/th.d.ts +0 -100
- package/dist/types-ts4.0/i18n/tr.d.ts +0 -100
- package/dist/types-ts4.0/i18n/uk.d.ts +0 -100
- package/dist/types-ts4.0/i18n/vi.d.ts +0 -100
- package/dist/types-ts4.0/i18n/zh.d.ts +0 -100
- package/dist/types-ts4.0/i18n/zh_TW.d.ts +0 -100
- package/dist/types-ts4.0/icons/index.d.ts +0 -9
- package/dist/types-ts4.0/icons/shared/PanelErrorIcon.d.ts +0 -3
- package/dist/types-ts4.0/icons/shared/PanelInfoIcon.d.ts +0 -3
- package/dist/types-ts4.0/icons/shared/PanelNoteIcon.d.ts +0 -3
- package/dist/types-ts4.0/icons/shared/PanelSuccessIcon.d.ts +0 -3
- package/dist/types-ts4.0/icons/shared/PanelWarningIcon.d.ts +0 -3
- package/dist/types-ts4.0/icons/shared/table.d.ts +0 -2
- package/dist/types-ts4.0/in-product.d.ts +0 -1
- package/dist/types-ts4.0/index.d.ts +0 -1
- package/dist/types-ts4.0/keymaps/consts.d.ts +0 -12
- package/dist/types-ts4.0/keymaps/index.d.ts +0 -89
- package/dist/types-ts4.0/mention.d.ts +0 -2
- package/dist/types-ts4.0/messages/codeBidiWarning.d.ts +0 -11
- package/dist/types-ts4.0/messages/codeBlockCopyButton.d.ts +0 -12
- package/dist/types-ts4.0/messages/index.d.ts +0 -128
- package/dist/types-ts4.0/messages/insert-block.d.ts +0 -167
- package/dist/types-ts4.0/messages/link.d.ts +0 -7
- package/dist/types-ts4.0/messages/unsupportedContent.d.ts +0 -17
- package/dist/types-ts4.0/node-width/index.d.ts +0 -7
- package/dist/types-ts4.0/normalize-feature-flags.d.ts +0 -20
- package/dist/types-ts4.0/panel.d.ts +0 -1
- package/dist/types-ts4.0/provider-factory/autoformatting-provider.d.ts +0 -9
- package/dist/types-ts4.0/provider-factory/card-provider.d.ts +0 -7
- package/dist/types-ts4.0/provider-factory/context-identifier-provider.d.ts +0 -6
- package/dist/types-ts4.0/provider-factory/context.d.ts +0 -6
- package/dist/types-ts4.0/provider-factory/image-upload-provider.d.ts +0 -6
- package/dist/types-ts4.0/provider-factory/macro-provider.d.ts +0 -25
- package/dist/types-ts4.0/provider-factory/media-provider.d.ts +0 -15
- package/dist/types-ts4.0/provider-factory/profile-card-provider.d.ts +0 -6
- package/dist/types-ts4.0/provider-factory/provider-factory.d.ts +0 -17
- package/dist/types-ts4.0/provider-factory/quick-insert-provider.d.ts +0 -24
- package/dist/types-ts4.0/provider-factory/search-provider.d.ts +0 -12
- package/dist/types-ts4.0/provider-factory/types.d.ts +0 -37
- package/dist/types-ts4.0/provider-factory/with-providers.d.ts +0 -18
- package/dist/types-ts4.0/provider-factory.d.ts +0 -13
- package/dist/types-ts4.0/provider-helpers/combine-providers.d.ts +0 -9
- package/dist/types-ts4.0/provider-helpers/index.d.ts +0 -1
- package/dist/types-ts4.0/provider-helpers/promise-helpers.d.ts +0 -32
- package/dist/types-ts4.0/react-node-view/index.d.ts +0 -52
- package/dist/types-ts4.0/react-node-view/types.d.ts +0 -12
- package/dist/types-ts4.0/safe-plugin/index.d.ts +0 -6
- package/dist/types-ts4.0/selection/gap-cursor/selection.d.ts +0 -40
- package/dist/types-ts4.0/selection/gap-cursor/utils/index.d.ts +0 -2
- package/dist/types-ts4.0/selection/gap-cursor/utils/is-ignored.d.ts +0 -2
- package/dist/types-ts4.0/selection/gap-cursor/utils/is-valid-target-node.d.ts +0 -2
- package/dist/types-ts4.0/selection/index.d.ts +0 -5
- package/dist/types-ts4.0/selection/types.d.ts +0 -26
- package/dist/types-ts4.0/selection/utils.d.ts +0 -4
- package/dist/types-ts4.0/styles/index.d.ts +0 -23
- package/dist/types-ts4.0/styles/shared/annotation.d.ts +0 -12
- package/dist/types-ts4.0/styles/shared/block-marks.d.ts +0 -1
- package/dist/types-ts4.0/styles/shared/blockquote.d.ts +0 -1
- package/dist/types-ts4.0/styles/shared/code-block.d.ts +0 -10
- package/dist/types-ts4.0/styles/shared/code-mark.d.ts +0 -2
- package/dist/types-ts4.0/styles/shared/column-layout.d.ts +0 -2
- package/dist/types-ts4.0/styles/shared/date.d.ts +0 -5
- package/dist/types-ts4.0/styles/shared/emoji.d.ts +0 -7
- package/dist/types-ts4.0/styles/shared/extension.d.ts +0 -2
- package/dist/types-ts4.0/styles/shared/headings.d.ts +0 -2
- package/dist/types-ts4.0/styles/shared/indentation.d.ts +0 -1
- package/dist/types-ts4.0/styles/shared/layout.d.ts +0 -2
- package/dist/types-ts4.0/styles/shared/link.d.ts +0 -2
- package/dist/types-ts4.0/styles/shared/lists.d.ts +0 -1
- package/dist/types-ts4.0/styles/shared/media-single.d.ts +0 -3
- package/dist/types-ts4.0/styles/shared/mention.d.ts +0 -3
- package/dist/types-ts4.0/styles/shared/panel.d.ts +0 -84
- package/dist/types-ts4.0/styles/shared/paragraph.d.ts +0 -1
- package/dist/types-ts4.0/styles/shared/rule.d.ts +0 -2
- package/dist/types-ts4.0/styles/shared/shadow.d.ts +0 -15
- package/dist/types-ts4.0/styles/shared/smart-card.d.ts +0 -7
- package/dist/types-ts4.0/styles/shared/status.d.ts +0 -4
- package/dist/types-ts4.0/styles/shared/table.d.ts +0 -28
- package/dist/types-ts4.0/styles/shared/task-decision.d.ts +0 -4
- package/dist/types-ts4.0/styles/shared/text-color.d.ts +0 -1
- package/dist/types-ts4.0/styles/shared/whitespace.d.ts +0 -2
- package/dist/types-ts4.0/transforms/expand.d.ts +0 -5
- package/dist/types-ts4.0/transforms/extension.d.ts +0 -6
- package/dist/types-ts4.0/transforms/index.d.ts +0 -3
- package/dist/types-ts4.0/transforms/layout.d.ts +0 -15
- package/dist/types-ts4.0/type-ahead/index.d.ts +0 -12
- package/dist/types-ts4.0/types/annotation/emitter.d.ts +0 -33
- package/dist/types-ts4.0/types/annotation/index.d.ts +0 -84
- package/dist/types-ts4.0/types/collab.d.ts +0 -8
- package/dist/types-ts4.0/types/command.d.ts +0 -5
- package/dist/types-ts4.0/types/context-panel.d.ts +0 -3
- package/dist/types-ts4.0/types/editor-actions.d.ts +0 -19
- package/dist/types-ts4.0/types/editor-appearance.d.ts +0 -1
- package/dist/types-ts4.0/types/editor-container-width.d.ts +0 -6
- package/dist/types-ts4.0/types/editor-plugin.d.ts +0 -61
- package/dist/types-ts4.0/types/editor-react-context.d.ts +0 -6
- package/dist/types-ts4.0/types/empty-state-handler.d.ts +0 -7
- package/dist/types-ts4.0/types/feature-flags.d.ts +0 -350
- package/dist/types-ts4.0/types/floating-toolbar.d.ts +0 -189
- package/dist/types-ts4.0/types/index.d.ts +0 -33
- package/dist/types-ts4.0/types/plugin-factory.d.ts +0 -27
- package/dist/types-ts4.0/types/prosemirror-config.d.ts +0 -14
- package/dist/types-ts4.0/types/quick-insert.d.ts +0 -26
- package/dist/types-ts4.0/types/supported-browsers.d.ts +0 -15
- package/dist/types-ts4.0/types/toolbar.d.ts +0 -30
- package/dist/types-ts4.0/types/type-ahead.d.ts +0 -64
- package/dist/types-ts4.0/types/ui-components.d.ts +0 -22
- package/dist/types-ts4.0/ufo/experience-store.d.ts +0 -33
- package/dist/types-ts4.0/ufo/index.d.ts +0 -1
- package/dist/types-ts4.0/ui/BaseTheme/index.d.ts +0 -15
- package/dist/types-ts4.0/ui/Caption/index.d.ts +0 -19
- package/dist/types-ts4.0/ui/Caption/messages.d.ts +0 -7
- package/dist/types-ts4.0/ui/DropList/index.d.ts +0 -19
- package/dist/types-ts4.0/ui/Emoji/index.d.ts +0 -20
- package/dist/types-ts4.0/ui/ErrorBoundary/index.d.ts +0 -24
- package/dist/types-ts4.0/ui/EventHandlers/index.d.ts +0 -36
- package/dist/types-ts4.0/ui/Expand/index.d.ts +0 -43
- package/dist/types-ts4.0/ui/IntlErrorBoundary/index.d.ts +0 -15
- package/dist/types-ts4.0/ui/Layer/index.d.ts +0 -47
- package/dist/types-ts4.0/ui/Layer/internal/helpers.d.ts +0 -5
- package/dist/types-ts4.0/ui/MediaSingle/grid.d.ts +0 -10
- package/dist/types-ts4.0/ui/MediaSingle/index.d.ts +0 -24
- package/dist/types-ts4.0/ui/MediaSingle/link.d.ts +0 -1
- package/dist/types-ts4.0/ui/MediaSingle/styled.d.ts +0 -43
- package/dist/types-ts4.0/ui/Mention/index.d.ts +0 -21
- package/dist/types-ts4.0/ui/Mention/mention-with-profilecard.d.ts +0 -15
- package/dist/types-ts4.0/ui/Mention/mention-with-providers.d.ts +0 -22
- package/dist/types-ts4.0/ui/Mention/types.d.ts +0 -2
- package/dist/types-ts4.0/ui/Messages/index.d.ts +0 -11
- package/dist/types-ts4.0/ui/OverflowShadow/index.d.ts +0 -103
- package/dist/types-ts4.0/ui/OverflowShadow/shadowObserver.d.ts +0 -27
- package/dist/types-ts4.0/ui/Popup/index.d.ts +0 -63
- package/dist/types-ts4.0/ui/Popup/utils.d.ts +0 -42
- package/dist/types-ts4.0/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
- package/dist/types-ts4.0/ui/PortalProvider/index.d.ts +0 -50
- package/dist/types-ts4.0/ui/UnsupportedBlock/index.d.ts +0 -14
- package/dist/types-ts4.0/ui/UnsupportedInline/index.d.ts +0 -14
- package/dist/types-ts4.0/ui/WidthProvider/index.d.ts +0 -29
- package/dist/types-ts4.0/ui/WithCreateAnalyticsEvent/index.d.ts +0 -6
- package/dist/types-ts4.0/ui/clear-next-sibling-margin-top.d.ts +0 -2
- package/dist/types-ts4.0/ui/index.d.ts +0 -25
- package/dist/types-ts4.0/ui/unsupported-content-helper.d.ts +0 -3
- package/dist/types-ts4.0/ui/with-outer-listeners.d.ts +0 -8
- package/dist/types-ts4.0/ui-color/ColorPalette/Color/index.d.ts +0 -19
- package/dist/types-ts4.0/ui-color/ColorPalette/Color/styles.d.ts +0 -4
- package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.d.ts +0 -3
- package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/common.d.ts +0 -2
- package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/getColorMessage.d.ts +0 -2
- package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/index.d.ts +0 -2
- package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/paletteMessages.d.ts +0 -113
- package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/panelBackgroundPalette.d.ts +0 -4
- package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/statusColorPalette.d.ts +0 -4
- package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/textColorPalette.d.ts +0 -3
- package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/type.d.ts +0 -8
- package/dist/types-ts4.0/ui-color/ColorPalette/index.d.ts +0 -15
- package/dist/types-ts4.0/ui-color/ColorPalette/styles.d.ts +0 -1
- package/dist/types-ts4.0/ui-color/index.d.ts +0 -9
- package/dist/types-ts4.0/ui-menu/Dropdown/index.d.ts +0 -35
- package/dist/types-ts4.0/ui-menu/DropdownMenu/index.d.ts +0 -19
- package/dist/types-ts4.0/ui-menu/DropdownMenu/types.d.ts +0 -46
- package/dist/types-ts4.0/ui-menu/ToolbarButton/index.d.ts +0 -53
- package/dist/types-ts4.0/ui-menu/ToolbarButton/styles.d.ts +0 -4
- package/dist/types-ts4.0/ui-menu/index.d.ts +0 -5
- package/dist/types-ts4.0/ui-react/ReactEditorViewContext.d.ts +0 -8
- package/dist/types-ts4.0/ui-react/index.d.ts +0 -2
- package/dist/types-ts4.0/ui-react/with-react-editor-view-outer-listeners.d.ts +0 -9
- package/dist/types-ts4.0/utils/analytics.d.ts +0 -48
- package/dist/types-ts4.0/utils/annotation/index.d.ts +0 -8
- package/dist/types-ts4.0/utils/breakout.d.ts +0 -10
- package/dist/types-ts4.0/utils/browser-extensions.d.ts +0 -43
- package/dist/types-ts4.0/utils/browser.d.ts +0 -4
- package/dist/types-ts4.0/utils/compare-props.d.ts +0 -32
- package/dist/types-ts4.0/utils/compareNodes.d.ts +0 -31
- package/dist/types-ts4.0/utils/compose.d.ts +0 -30
- package/dist/types-ts4.0/utils/date.d.ts +0 -18
- package/dist/types-ts4.0/utils/dom.d.ts +0 -26
- package/dist/types-ts4.0/utils/editor-core-utils.d.ts +0 -24
- package/dist/types-ts4.0/utils/error-reporter.d.ts +0 -13
- package/dist/types-ts4.0/utils/extension-handler.d.ts +0 -2
- package/dist/types-ts4.0/utils/getModeFromTheme.d.ts +0 -1
- package/dist/types-ts4.0/utils/imageLoader.d.ts +0 -14
- package/dist/types-ts4.0/utils/index.d.ts +0 -45
- package/dist/types-ts4.0/utils/is-text-input.d.ts +0 -2
- package/dist/types-ts4.0/utils/macro.d.ts +0 -10
- package/dist/types-ts4.0/utils/nodes.d.ts +0 -35
- package/dist/types-ts4.0/utils/performance/hooks/use-component-render-tracking/index.d.ts +0 -19
- package/dist/types-ts4.0/utils/performance/is-performance-api-available.d.ts +0 -3
- package/dist/types-ts4.0/utils/performance/measure-render.d.ts +0 -41
- package/dist/types-ts4.0/utils/performance/measure-tti.d.ts +0 -14
- package/dist/types-ts4.0/utils/performance/measure.d.ts +0 -3
- package/dist/types-ts4.0/utils/performance/navigation.d.ts +0 -1
- package/dist/types-ts4.0/utils/plugin-state-factory.d.ts +0 -16
- package/dist/types-ts4.0/utils/profiler/render-count.d.ts +0 -50
- package/dist/types-ts4.0/utils/should-force-tracking.d.ts +0 -1
- package/dist/types-ts4.0/utils/slice.d.ts +0 -11
- package/dist/types-ts4.0/utils/table.d.ts +0 -4
- package/dist/types-ts4.0/utils/track-unsupported-content.d.ts +0 -8
- package/dist/types-ts4.0/utils/traversor.d.ts +0 -9
- package/dist/types-ts4.0/utils/types.d.ts +0 -2
- package/dist/types-ts4.0/utils/unsupportedContent/get-unsupported-content-level-data.d.ts +0 -57
- package/dist/types-ts4.0/utils/validate-using-spec.d.ts +0 -19
- package/dist/types-ts4.0/utils/validator.d.ts +0 -42
- package/dist/types-ts4.0/utils/whitespace.d.ts +0 -2
- package/dist/types-ts4.0/validator.d.ts +0 -2
- package/dist/types-ts4.0/with-plugin-state/index.d.ts +0 -86
- package/dist/types-ts4.0/with-plugin-state/types.d.ts +0 -10
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export var isOutdatedBrowser = function isOutdatedBrowser(userAgent) {
|
|
2
|
+
// Take browsers in both Desktop and Mobile (includes Chrome, Firefox, Edge and Safari) within last 2 years
|
|
3
|
+
var chrome = /Chrome\//.test(userAgent) && !/OPR\//.test(userAgent);
|
|
4
|
+
var chromeVersion = chrome ? parseInt((userAgent.match(/Chrome\/(\d+)/) || [])[1], 10) : 0;
|
|
5
|
+
|
|
6
|
+
if (chromeVersion >= 84) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
var gecko = /gecko\/\d/i.test(userAgent);
|
|
11
|
+
var geckoVersion = gecko ? parseInt((userAgent.match(/Firefox\/(\d+)/) || [])[1], 10) : 0;
|
|
12
|
+
|
|
13
|
+
if (geckoVersion >= 84) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var edge = /Edge\/(\d+)/.exec(userAgent);
|
|
18
|
+
var edgeVersion = edge ? +edge[1] : 0;
|
|
19
|
+
|
|
20
|
+
if (edgeVersion >= 84) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var safari = !chrome && !gecko && /Version\/([0-9\._]+).*Safari/.test(userAgent);
|
|
25
|
+
var safariVersion = safari ? parseInt((userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10) : 0;
|
|
26
|
+
|
|
27
|
+
if (safariVersion >= 12) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return true;
|
|
32
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export var isReferencedSource = function isReferencedSource(state, node) {
|
|
2
|
+
var _node$attrs, _node$marks, _node$marks$find, _node$marks$find$attr;
|
|
3
|
+
|
|
4
|
+
if (!node) {
|
|
5
|
+
return false;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
var found = false; // Handle nodes having 2 uuids. They could have a localId or a fragment. Regardless this needs
|
|
9
|
+
// to check if either id is used by a data consumer.
|
|
10
|
+
|
|
11
|
+
var localIds = new Set([(_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId, (_node$marks = node.marks) === null || _node$marks === void 0 ? void 0 : (_node$marks$find = _node$marks.find(function (mark) {
|
|
12
|
+
return mark.type === state.schema.marks.fragment;
|
|
13
|
+
})) === null || _node$marks$find === void 0 ? void 0 : (_node$marks$find$attr = _node$marks$find.attrs) === null || _node$marks$find$attr === void 0 ? void 0 : _node$marks$find$attr.localId].filter(Boolean)); // If there are no uuids on the node then it's not possible for it to be referenced anywhere.
|
|
14
|
+
|
|
15
|
+
if (!localIds.size) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
state.doc.descendants(function (node) {
|
|
20
|
+
var _dataConsumer$attrs$s, _dataConsumer$attrs$s2;
|
|
21
|
+
|
|
22
|
+
if (found) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var dataConsumer = node.marks.find(function (mark) {
|
|
27
|
+
return mark.type === state.schema.marks.dataConsumer;
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
if (!dataConsumer) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
found = (_dataConsumer$attrs$s = (_dataConsumer$attrs$s2 = dataConsumer.attrs.sources) === null || _dataConsumer$attrs$s2 === void 0 ? void 0 : _dataConsumer$attrs$s2.some(function (src) {
|
|
35
|
+
return localIds.has(src);
|
|
36
|
+
})) !== null && _dataConsumer$attrs$s !== void 0 ? _dataConsumer$attrs$s : false;
|
|
37
|
+
return !found;
|
|
38
|
+
});
|
|
39
|
+
return found;
|
|
40
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var sendLogs = function sendLogs(body) {
|
|
2
|
+
return fetch('https://analytics.atlassian.com/analytics/events', {
|
|
3
|
+
method: 'POST',
|
|
4
|
+
headers: {
|
|
5
|
+
Accept: 'application/json, */*',
|
|
6
|
+
'Content-Type': 'application/json'
|
|
7
|
+
},
|
|
8
|
+
body: JSON.stringify(body)
|
|
9
|
+
});
|
|
10
|
+
};
|
package/dist/esm/version.json
CHANGED
|
@@ -16,6 +16,10 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
16
16
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import PropTypes from 'prop-types';
|
|
19
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
20
|
+
import { createDispatch } from '../event-dispatcher';
|
|
21
|
+
import { analyticsEventKey, startMeasure, stopMeasure } from '../utils';
|
|
22
|
+
import { getParticipantsCount } from '../utils/collab';
|
|
19
23
|
var DEFAULT_SAMPLING_RATE = 100;
|
|
20
24
|
var DEFAULT_SLOW_THRESHOLD = 4;
|
|
21
25
|
|
|
@@ -59,6 +63,8 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
59
63
|
|
|
60
64
|
_defineProperty(_assertThisInitialized(_this), "isSubscribed", false);
|
|
61
65
|
|
|
66
|
+
_defineProperty(_assertThisInitialized(_this), "callsCount", 0);
|
|
67
|
+
|
|
62
68
|
_defineProperty(_assertThisInitialized(_this), "state", _this.getPluginsStates(_this.props.plugins, _this.getEditorView(_this.props, _this.context)));
|
|
63
69
|
|
|
64
70
|
_defineProperty(_assertThisInitialized(_this), "handlePluginStateChange", function (propName, pluginName, performanceOptions, skipEqualityCheck) {
|
|
@@ -90,40 +96,45 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
90
96
|
return fn();
|
|
91
97
|
};
|
|
92
98
|
_this.debounce = debounce(function () {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
// },
|
|
116
|
-
// });
|
|
117
|
-
// }
|
|
118
|
-
// });
|
|
119
|
-
//}
|
|
120
|
-
_this.setState(_this.notAppliedState);
|
|
99
|
+
var measure = "\uD83E\uDD89".concat(pluginName, "::WithPluginState");
|
|
100
|
+
performanceOptions.trackingEnabled && startMeasure(measure);
|
|
101
|
+
|
|
102
|
+
_this.setState(_this.notAppliedState, function () {
|
|
103
|
+
performanceOptions.trackingEnabled && stopMeasure(measure, function (duration) {
|
|
104
|
+
// Each WithPluginState component will fire analytics event no more than once every `samplingLimit` times
|
|
105
|
+
if (++_this.callsCount % performanceOptions.samplingRate === 0 && duration > performanceOptions.slowThreshold) {
|
|
106
|
+
var _editorView = _this.getEditorView();
|
|
107
|
+
|
|
108
|
+
_this.dispatchAnalyticsEvent({
|
|
109
|
+
action: ACTION.WITH_PLUGIN_STATE_CALLED,
|
|
110
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
111
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
112
|
+
attributes: {
|
|
113
|
+
plugin: pluginName,
|
|
114
|
+
duration: duration,
|
|
115
|
+
participants: getParticipantsCount(_editorView && _editorView.state)
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
121
|
|
|
122
122
|
_this.debounce = null;
|
|
123
123
|
_this.notAppliedState = {};
|
|
124
124
|
});
|
|
125
125
|
});
|
|
126
126
|
|
|
127
|
+
_defineProperty(_assertThisInitialized(_this), "dispatchAnalyticsEvent", function (payload) {
|
|
128
|
+
var eventDispatcher = _this.getEventDispatcher();
|
|
129
|
+
|
|
130
|
+
if (eventDispatcher) {
|
|
131
|
+
var dispatch = createDispatch(eventDispatcher);
|
|
132
|
+
dispatch(analyticsEventKey, {
|
|
133
|
+
payload: payload
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
|
|
127
138
|
_defineProperty(_assertThisInitialized(_this), "onContextUpdate", function () {
|
|
128
139
|
_this.subscribe(_this.props);
|
|
129
140
|
});
|
|
@@ -146,17 +157,7 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
146
157
|
}
|
|
147
158
|
}, {
|
|
148
159
|
key: "getPluginsStates",
|
|
149
|
-
value:
|
|
150
|
-
//private dispatchAnalyticsEvent = (payload: AnalyticsEventPayload) => {
|
|
151
|
-
// const eventDispatcher = this.getEventDispatcher();
|
|
152
|
-
// if (eventDispatcher) {
|
|
153
|
-
// const dispatch: AnalyticsDispatch = createDispatch(eventDispatcher);
|
|
154
|
-
// dispatch(analyticsEventKey, {
|
|
155
|
-
// payload,
|
|
156
|
-
// });
|
|
157
|
-
// }
|
|
158
|
-
//};
|
|
159
|
-
function getPluginsStates(plugins, editorView) {
|
|
160
|
+
value: function getPluginsStates(plugins, editorView) {
|
|
160
161
|
if (!editorView || !plugins) {
|
|
161
162
|
return {};
|
|
162
163
|
}
|
|
@@ -176,7 +177,9 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
176
177
|
}, {
|
|
177
178
|
key: "subscribe",
|
|
178
179
|
value: function subscribe(props) {
|
|
179
|
-
var
|
|
180
|
+
var _uiTracking$samplingR,
|
|
181
|
+
_uiTracking$slowThres,
|
|
182
|
+
_this2 = this;
|
|
180
183
|
|
|
181
184
|
var plugins = props.plugins;
|
|
182
185
|
var eventDispatcher = this.getEventDispatcher(props);
|
|
@@ -184,20 +187,22 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
184
187
|
|
|
185
188
|
if (!eventDispatcher || !editorView || this.isSubscribed) {
|
|
186
189
|
return;
|
|
187
|
-
} // TODO: ED-
|
|
188
|
-
//
|
|
189
|
-
//
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
var
|
|
199
|
-
var
|
|
200
|
-
var
|
|
190
|
+
} // TODO: ED-15663
|
|
191
|
+
// Please, do not copy or use this kind of code below
|
|
192
|
+
// @ts-ignore
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
var fakePluginKey = {
|
|
196
|
+
key: 'analyticsPlugin$',
|
|
197
|
+
getState: function getState(state) {
|
|
198
|
+
return state['analyticsPlugin$'];
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
var analyticsPlugin = fakePluginKey.getState(editorView.state);
|
|
202
|
+
var uiTracking = analyticsPlugin && analyticsPlugin.performanceTracking ? analyticsPlugin.performanceTracking.uiTracking || {} : {};
|
|
203
|
+
var trackingEnabled = uiTracking.enabled === true;
|
|
204
|
+
var samplingRate = (_uiTracking$samplingR = uiTracking.samplingRate) !== null && _uiTracking$samplingR !== void 0 ? _uiTracking$samplingR : DEFAULT_SAMPLING_RATE;
|
|
205
|
+
var slowThreshold = (_uiTracking$slowThres = uiTracking.slowThreshold) !== null && _uiTracking$slowThres !== void 0 ? _uiTracking$slowThres : DEFAULT_SLOW_THRESHOLD;
|
|
201
206
|
this.isSubscribed = true;
|
|
202
207
|
var pluginsStates = this.getPluginsStates(plugins, editorView);
|
|
203
208
|
this.setState(pluginsStates);
|
|
@@ -105,6 +105,7 @@ export declare type ErrorEventAttributes = {
|
|
|
105
105
|
errorId?: string;
|
|
106
106
|
docStructure?: string | SimplifiedNode;
|
|
107
107
|
browserExtensions?: UserBrowserExtensionResults;
|
|
108
|
+
outdatedBrowser?: boolean;
|
|
108
109
|
};
|
|
109
110
|
declare type ComponentCrashErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED, ACTION_SUBJECT.FLOATING_CONTEXTUAL_BUTTON | ACTION_SUBJECT.PLUGIN_SLOT | ACTION_SUBJECT.REACT_NODE_VIEW | ACTION_SUBJECT.TABLES_PLUGIN | ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN | ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID | FLOATING_CONTROLS_TITLE, ErrorEventAttributes, undefined>;
|
|
110
111
|
declare type ComponentCrashAdditionalInfoErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED_ADDITIONAL_INFORMATION, ACTION_SUBJECT.EDITOR, undefined, {
|
|
@@ -8,6 +8,7 @@ export interface ExtensionParams<T extends Parameters> {
|
|
|
8
8
|
parameters?: T;
|
|
9
9
|
content?: object | string;
|
|
10
10
|
localId?: string;
|
|
11
|
+
fragmentLocalId?: string;
|
|
11
12
|
}
|
|
12
13
|
export declare type ExtensionHandler<T extends Parameters = Parameters> = (ext: ExtensionParams<T>, doc: object) => JSX.Element | null;
|
|
13
14
|
export declare type OnSaveCallback<T extends Parameters = Parameters> = (params: T) => void;
|
|
@@ -9,7 +9,7 @@ export { ruleSharedStyles } from './shared/rule';
|
|
|
9
9
|
export { whitespaceSharedStyles } from './shared/whitespace';
|
|
10
10
|
export { paragraphSharedStyles } from './shared/paragraph';
|
|
11
11
|
export { linkSharedStyle } from './shared/link';
|
|
12
|
-
export { listsSharedStyles } from './shared/lists';
|
|
12
|
+
export { listsSharedStyles, listPaddingLeftMarkerSpace } from './shared/lists';
|
|
13
13
|
export { indentationSharedStyles } from './shared/indentation';
|
|
14
14
|
export { blockMarksSharedStyles } from './shared/block-marks';
|
|
15
15
|
export { codeMarkSharedStyles } from './shared/code-mark';
|
|
@@ -18,6 +18,6 @@ export { dateSharedStyle, DateSharedCssClassName } from './shared/date';
|
|
|
18
18
|
export { tasksAndDecisionsStyles, TaskDecisionSharedCssClassName, } from './shared/task-decision';
|
|
19
19
|
export { StatusSharedCssClassName } from './shared/status';
|
|
20
20
|
export { smartCardSharedStyles, SmartCardSharedCssClassName, } from './shared/smart-card';
|
|
21
|
-
export { CodeBlockSharedCssClassName, codeBlockSharedStyles, } from './shared/code-block';
|
|
21
|
+
export { CodeBlockSharedCssClassName, codeBlockSharedStyles, codeBlockInListSafariFix, } from './shared/code-block';
|
|
22
22
|
export { LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING } from './shared/layout';
|
|
23
23
|
export { EXTENSION_PADDING, BODIED_EXT_PADDING } from './shared/extension';
|
|
@@ -8,3 +8,4 @@ export declare const CodeBlockSharedCssClassName: {
|
|
|
8
8
|
DS_CODEBLOCK: string;
|
|
9
9
|
};
|
|
10
10
|
export declare const codeBlockSharedStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
11
|
+
export declare const codeBlockInListSafariFix: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MarkType, NodeType } from 'prosemirror-model';
|
|
2
|
+
import { EditorState } from 'prosemirror-state';
|
|
3
|
+
import { IntlShape } from 'react-intl-next';
|
|
4
|
+
import { Command } from './command';
|
|
5
|
+
export declare type MarkOptions = {
|
|
6
|
+
state: EditorState;
|
|
7
|
+
formatMessage: IntlShape['formatMessage'];
|
|
8
|
+
nodeType?: undefined;
|
|
9
|
+
markType: MarkType;
|
|
10
|
+
onMouseEnter?: undefined;
|
|
11
|
+
onMouseLeave?: undefined;
|
|
12
|
+
};
|
|
13
|
+
export declare type NodeOptions = {
|
|
14
|
+
state: EditorState;
|
|
15
|
+
formatMessage: IntlShape['formatMessage'];
|
|
16
|
+
nodeType: NodeType | Array<NodeType>;
|
|
17
|
+
markType?: undefined;
|
|
18
|
+
onMouseEnter?: Command;
|
|
19
|
+
onMouseLeave?: Command;
|
|
20
|
+
};
|
|
@@ -10,6 +10,7 @@ export interface EditorActionsOptions<T = any> {
|
|
|
10
10
|
clear(): boolean;
|
|
11
11
|
getValue(): Promise<T | JSONDocNode | undefined>;
|
|
12
12
|
getNodeByLocalId(id: string): Node | undefined;
|
|
13
|
+
getNodeByFragmentLocalId(id: string): Node | undefined;
|
|
13
14
|
getSelectedNode(): Node | undefined;
|
|
14
15
|
replaceDocument(rawValue: any): boolean;
|
|
15
16
|
replaceSelection(rawValue: Node | Object | string): boolean;
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
export declare type EditorContainerWidth = {
|
|
2
|
+
/**
|
|
3
|
+
* Starts as offsetWidth of document body, and then
|
|
4
|
+
* updates to the editors content areas offsetWidth
|
|
5
|
+
* via the use of a contentComponent (via the
|
|
6
|
+
* container element prop).
|
|
7
|
+
*/
|
|
2
8
|
width: number;
|
|
3
9
|
containerWidth?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Starts as undefined, and then updates to the
|
|
12
|
+
* clientWidth of the dom element the EditorView
|
|
13
|
+
* is attached to.
|
|
14
|
+
*
|
|
15
|
+
* Then the WidthEmitter updates this whenever the
|
|
16
|
+
* context panel or editor widths change.
|
|
17
|
+
*/
|
|
4
18
|
lineLength?: number;
|
|
5
19
|
};
|
|
6
20
|
export declare type GetEditorContainerWidth = () => EditorContainerWidth;
|
|
@@ -185,12 +185,6 @@ export declare type FeatureFlags = {
|
|
|
185
185
|
* @default false
|
|
186
186
|
*/
|
|
187
187
|
extendFloatingToolbar?: boolean;
|
|
188
|
-
/**
|
|
189
|
-
* Set editor to use the input rule with unpredictable undo results
|
|
190
|
-
* @see https://product-fabric.atlassian.net/browse/ED-12676
|
|
191
|
-
* @default true
|
|
192
|
-
*/
|
|
193
|
-
useUnpredictableInputRule?: boolean;
|
|
194
188
|
/**
|
|
195
189
|
* Show the avatar group as a plugin
|
|
196
190
|
* @see https://product-fabric.atlassian.net/browse/CERN-747
|
|
@@ -8,6 +8,7 @@ import type { DispatchAnalyticsEvent } from '../analytics/types/dispatch-analyti
|
|
|
8
8
|
import type { ProviderFactory } from '../provider-factory';
|
|
9
9
|
import type { PaletteColor } from '../ui-color/ColorPalette/Palettes/type';
|
|
10
10
|
import type { Command } from './command';
|
|
11
|
+
import type { MarkOptions, NodeOptions } from './copy-button';
|
|
11
12
|
export interface RenderOptionsPropsT<T> {
|
|
12
13
|
hide: () => void;
|
|
13
14
|
dispatchCommand: (command: T) => void;
|
|
@@ -54,6 +55,11 @@ export interface ConfirmDialogOptions {
|
|
|
54
55
|
okButtonLabel?: string;
|
|
55
56
|
cancelButtonLabel?: string;
|
|
56
57
|
}
|
|
58
|
+
export declare type FloatingToolbarCopyButton = {
|
|
59
|
+
type: 'copy-button';
|
|
60
|
+
items: Array<FloatingToolbarSeparator | MarkOptions | NodeOptions>;
|
|
61
|
+
hidden?: boolean;
|
|
62
|
+
};
|
|
57
63
|
export declare type FloatingToolbarButton<T> = {
|
|
58
64
|
id?: string;
|
|
59
65
|
type: 'button';
|
|
@@ -95,6 +101,17 @@ export declare type FloatingToolbarInput<T> = {
|
|
|
95
101
|
};
|
|
96
102
|
export declare type FloatingToolbarCustom<T> = {
|
|
97
103
|
type: 'custom';
|
|
104
|
+
/**
|
|
105
|
+
* By default -- the floating toolbar supports navigating between
|
|
106
|
+
* items using arrow keys (to meet aria guidelines).
|
|
107
|
+
* In some cases the floating toolbar is being used to present
|
|
108
|
+
* non toolbar content -- such as the link editing experience.
|
|
109
|
+
* In these cases you can opt out of arrow navigation using the
|
|
110
|
+
* this property.
|
|
111
|
+
*
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
disableArrowNavigation?: boolean;
|
|
98
115
|
fallback: Array<FloatingToolbarFallbackItem<T>>;
|
|
99
116
|
render: (view?: EditorView, idx?: number, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => React.ComponentClass | React.SFC | React.ReactElement<any> | null;
|
|
100
117
|
hidden?: boolean;
|
|
@@ -159,8 +176,8 @@ declare type FloatingToolbarExtensionsPlaceholder = {
|
|
|
159
176
|
* This type is restricted with the items that can be used for fallback.
|
|
160
177
|
* Make sure that this type is not a FloatingToolbarCustom type.
|
|
161
178
|
*/
|
|
162
|
-
export declare type FloatingToolbarFallbackItem<T> = FloatingToolbarButton<T> | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarSeparator;
|
|
163
|
-
export declare type FloatingToolbarItem<T> = FloatingToolbarButton<T> | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarCustom<T> | FloatingToolbarSeparator | FloatingToolbarExtensionsPlaceholder;
|
|
179
|
+
export declare type FloatingToolbarFallbackItem<T> = FloatingToolbarButton<T> | FloatingToolbarCopyButton | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarSeparator;
|
|
180
|
+
export declare type FloatingToolbarItem<T> = FloatingToolbarButton<T> | FloatingToolbarCopyButton | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarCustom<T> | FloatingToolbarSeparator | FloatingToolbarExtensionsPlaceholder;
|
|
164
181
|
export interface FloatingToolbarConfig {
|
|
165
182
|
title: string;
|
|
166
183
|
/**
|
|
@@ -172,6 +189,9 @@ export interface FloatingToolbarConfig {
|
|
|
172
189
|
*/
|
|
173
190
|
getDomRef?: (view: EditorView) => HTMLElement | undefined;
|
|
174
191
|
visible?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* nodeType or list of `nodeType`s this floating toolbar should be shown for.
|
|
194
|
+
**/
|
|
175
195
|
nodeType: NodeType | NodeType[];
|
|
176
196
|
items: Array<FloatingToolbarItem<Command>> | ((node: Node) => Array<FloatingToolbarItem<Command>>);
|
|
177
197
|
align?: AlignType;
|
|
@@ -181,6 +201,7 @@ export interface FloatingToolbarConfig {
|
|
|
181
201
|
offset?: [number, number];
|
|
182
202
|
forcePlacement?: boolean;
|
|
183
203
|
onPositionCalculated?: (editorView: EditorView, nextPos: Position) => Position;
|
|
204
|
+
scrollable?: boolean;
|
|
184
205
|
}
|
|
185
206
|
export declare type FloatingToolbarHandler = (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory) => FloatingToolbarConfig | undefined;
|
|
186
207
|
export {};
|
|
@@ -18,7 +18,8 @@ export type { FeatureFlags, FeatureFlagKey, GetEditorFeatureFlags, } from './fea
|
|
|
18
18
|
export type { Browsers, Range, DisableSpellcheckByBrowser, } from './supported-browsers';
|
|
19
19
|
export type { EditorContainerWidth, GetEditorContainerWidth, } from './editor-container-width';
|
|
20
20
|
export type { EmptyStateHandler, EmptyStateHandlerParams, } from './empty-state-handler';
|
|
21
|
-
export type { RenderOptionsPropsT, DropdownOptionT, DropdownOptions, SelectOption, ButtonAppearance, Icon, RenderOptionsProps, AlignType, ConfirmDialogOptions, FloatingToolbarButton, FloatingToolbarInput, FloatingToolbarCustom, FloatingToolbarListPicker, FloatingToolbarColorPicker, FloatingToolbarEmojiPicker, FloatingToolbarDatePicker, FloatingToolbarSelect, FloatingToolbarSeparator, FloatingToolbarDropdown, FloatingToolbarFallbackItem, FloatingToolbarItem, FloatingToolbarConfig, FloatingToolbarHandler, } from './floating-toolbar';
|
|
21
|
+
export type { RenderOptionsPropsT, DropdownOptionT, DropdownOptions, SelectOption, ButtonAppearance, Icon, RenderOptionsProps, AlignType, ConfirmDialogOptions, FloatingToolbarButton, FloatingToolbarCopyButton, FloatingToolbarInput, FloatingToolbarCustom, FloatingToolbarListPicker, FloatingToolbarColorPicker, FloatingToolbarEmojiPicker, FloatingToolbarDatePicker, FloatingToolbarSelect, FloatingToolbarSeparator, FloatingToolbarDropdown, FloatingToolbarFallbackItem, FloatingToolbarItem, FloatingToolbarConfig, FloatingToolbarHandler, } from './floating-toolbar';
|
|
22
|
+
export type { MarkOptions, NodeOptions } from './copy-button';
|
|
22
23
|
export type { ContextPanelHandler } from './context-panel';
|
|
23
24
|
export type { EditorAppearance } from './editor-appearance';
|
|
24
25
|
export type { ToolbarUiComponentFactoryParams, ToolbarUIComponentFactory, } from './toolbar';
|
|
@@ -37,7 +37,8 @@ export declare class PortalProviderAPI extends EventDispatcher {
|
|
|
37
37
|
export declare const PortalProvider: React.FC<import("react-intl-next").WithIntlProps<BasePortalProviderProps>> & {
|
|
38
38
|
WrappedComponent: React.ComponentType<BasePortalProviderProps>;
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
declare type PortalProviderWithThemeProvidersProps = Omit<BasePortalProviderProps, 'intl' | 'themeMode'>;
|
|
41
|
+
export declare const PortalProviderWithThemeProviders: ({ onAnalyticsEvent, useAnalyticsContext, render, }: PortalProviderWithThemeProvidersProps) => JSX.Element;
|
|
41
42
|
export declare class PortalRenderer extends React.Component<{
|
|
42
43
|
portalProviderAPI: PortalProviderAPI;
|
|
43
44
|
}, PortalRendererState> {
|
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -23,3 +23,4 @@ export type { StyleProps as ExpandStyleProps } from './Expand';
|
|
|
23
23
|
export { ErrorMessage, HelperMessage, ValidMessage } from './Messages';
|
|
24
24
|
export { clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle, } from './clear-next-sibling-margin-top';
|
|
25
25
|
export { IntlErrorBoundary, REACT_INTL_ERROR_MESSAGE, } from './IntlErrorBoundary';
|
|
26
|
+
export { default as IntlProviderIfMissingWrapper } from './IntlProviderIfMissingWrapper';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
|
|
1
2
|
/**
|
|
2
3
|
* Variables required to construct a context for breakout ssr inline script.
|
|
3
4
|
*
|
|
@@ -8,3 +9,27 @@ export declare const absoluteBreakoutWidth: (layout: 'full-width' | 'wide' | str
|
|
|
8
9
|
export { breakoutConsts };
|
|
9
10
|
export declare const calcWideWidth: any;
|
|
10
11
|
export declare const calcBreakoutWidth: any;
|
|
12
|
+
export declare function calculateBreakoutStyles({ mode, widthStateLineLength, widthStateWidth, }: {
|
|
13
|
+
mode: BreakoutMarkAttrs['mode'];
|
|
14
|
+
/**
|
|
15
|
+
* offsetWidth of the content the editor is attached to.
|
|
16
|
+
* Expected to be retrieved via `WidthState.lineLength`.
|
|
17
|
+
*/
|
|
18
|
+
widthStateWidth?: number;
|
|
19
|
+
/**
|
|
20
|
+
* clientWidth of the content area in the editor (ie. EditorPlugin contentComponents).
|
|
21
|
+
* Expected to be retrieved via `WidthState.width`.
|
|
22
|
+
*/
|
|
23
|
+
widthStateLineLength?: number;
|
|
24
|
+
}): {
|
|
25
|
+
type: "line-length-unknown";
|
|
26
|
+
width: any;
|
|
27
|
+
transform: string;
|
|
28
|
+
marginLeft: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: "line-length-known";
|
|
31
|
+
width: any;
|
|
32
|
+
marginLeft: string;
|
|
33
|
+
transform?: undefined;
|
|
34
|
+
};
|
|
35
|
+
export declare function calcBreakoutWidthPx(mode: BreakoutMarkAttrs['mode'], widthStateWidth?: number): number;
|
|
@@ -20,7 +20,21 @@ export declare function removeNestedEmptyEls(el: HTMLElement): void;
|
|
|
20
20
|
export declare const containsClassName: (node: HTMLElement | SVGElement | null, className: string) => boolean;
|
|
21
21
|
export declare function closest(node: HTMLElement | null | undefined, s: string): HTMLElement | null;
|
|
22
22
|
export declare function closestElement(node: HTMLElement | null | undefined, s: string): HTMLElement | null;
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Util for converting a css pixel size value to a number (of pixels).
|
|
25
|
+
*
|
|
26
|
+
* ie.
|
|
27
|
+
* ```ts
|
|
28
|
+
* const pixels = parsePx('10px')
|
|
29
|
+
* // ^$ const pixels: number
|
|
30
|
+
* ```
|
|
31
|
+
* * ```ts
|
|
32
|
+
* const pixels = parsePx('10')
|
|
33
|
+
* // ^$ const pixels: number | undefined
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare function parsePx<PXString extends `${number}px`>(pxStr: PXString): number;
|
|
37
|
+
export declare function parsePx<PXString extends string>(pxStr: PXString): number | undefined;
|
|
24
38
|
export declare type MapCallback<T, S> = (elem: S, idx: number, parent: Element) => T;
|
|
25
39
|
export declare function mapElem<T>(elem: Element, callback: MapCallback<T, Element>): Array<T>;
|
|
26
40
|
export declare function maphElem<T, U extends HTMLElement>(elem: U, callback: MapCallback<T, U>): Array<T>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EditorState } from 'prosemirror-state';
|
|
2
|
+
import type { EditorView } from 'prosemirror-view';
|
|
3
|
+
import { AnalyticsEventPayload } from '../analytics';
|
|
4
|
+
export declare function getPerformanceOptions(view: EditorView): {
|
|
5
|
+
trackingEnabled: boolean;
|
|
6
|
+
samplingRate: number;
|
|
7
|
+
slowThreshold: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function startMeasureReactNodeViewRendered({ nodeTypeName, }: {
|
|
10
|
+
nodeTypeName: string;
|
|
11
|
+
}): void;
|
|
12
|
+
export declare function stopMeasureReactNodeViewRendered({ nodeTypeName, dispatchAnalyticsEvent, editorState, samplingRate, slowThreshold, }: {
|
|
13
|
+
nodeTypeName: string;
|
|
14
|
+
dispatchAnalyticsEvent(payload: AnalyticsEventPayload): void;
|
|
15
|
+
editorState: EditorState;
|
|
16
|
+
samplingRate: number;
|
|
17
|
+
slowThreshold: number;
|
|
18
|
+
}): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getModeFromTheme(theme: string): "
|
|
1
|
+
export declare function getModeFromTheme(theme: string): "light" | "dark";
|
|
@@ -9,7 +9,7 @@ export type { Date } from './date';
|
|
|
9
9
|
export { isElementInTableCell, isTextSelection, isLastItemMediaGroup, setNodeSelection, setTextSelection, nonNullable, stepAddsOneOf, stepHasSlice, extractSliceFromStep, isValidPosition, } from './editor-core-utils';
|
|
10
10
|
export { withImageLoader } from './imageLoader';
|
|
11
11
|
export type { ImageLoaderProps, ImageLoaderState, ImageStatus, } from './imageLoader';
|
|
12
|
-
export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, } from './breakout';
|
|
12
|
+
export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx, } from './breakout';
|
|
13
13
|
export { findChangedNodesFromTransaction, validNode, validateNodes, isType, isParagraph, isText, isLinkMark, SelectedState, isNodeSelectedOrInRange, isSupportedInParent, } from './nodes';
|
|
14
14
|
export type { Reducer } from './plugin-state-factory';
|
|
15
15
|
export { pluginFactory } from './plugin-state-factory';
|
|
@@ -35,6 +35,7 @@ export { ZERO_WIDTH_SPACE, ZERO_WIDTH_JOINER } from './whitespace';
|
|
|
35
35
|
export type { Diff } from './types';
|
|
36
36
|
export { shouldForceTracking } from './should-force-tracking';
|
|
37
37
|
export { getModeFromTheme } from './getModeFromTheme';
|
|
38
|
+
export { getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered, } from './get-performance-options';
|
|
38
39
|
export type { UserBrowserExtensionResults } from './browser-extensions';
|
|
39
40
|
export { sniffUserBrowserExtensions } from './browser-extensions';
|
|
40
41
|
export { RenderCountProfiler } from './profiler/render-count';
|
|
@@ -43,3 +44,6 @@ export { getShallowPropsDifference, getPropsDifference } from './compare-props';
|
|
|
43
44
|
export type { ShallowPropsDifference, PropsDifference } from './compare-props';
|
|
44
45
|
export { useComponentRenderTracking } from './performance/hooks/use-component-render-tracking';
|
|
45
46
|
export type { UseComponentRenderTrackingArgs } from './performance/hooks/use-component-render-tracking';
|
|
47
|
+
export { isOutdatedBrowser } from './outdated-browsers';
|
|
48
|
+
export { isReferencedSource } from './referentiality';
|
|
49
|
+
export { sendLogs } from './sendLogs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isOutdatedBrowser: (userAgent: string) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sendLogs: (body: any) => Promise<Response>;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { PluginKey } from 'prosemirror-state';
|
|
4
4
|
import { EditorView } from 'prosemirror-view';
|
|
5
|
-
import
|
|
5
|
+
import { EventDispatcher } from '../event-dispatcher';
|
|
6
6
|
import type { NamedPluginKeys, NamedPluginStates } from './types';
|
|
7
7
|
export declare type PerformanceOptions = {
|
|
8
8
|
samplingRate: number;
|
|
@@ -13,7 +13,7 @@ export interface State {
|
|
|
13
13
|
[name: string]: any;
|
|
14
14
|
}
|
|
15
15
|
declare type ContextUpdateHandler = (editorView: EditorView, eventDispatcher: EventDispatcher) => void;
|
|
16
|
-
declare type EditorActionsPrivateAccess = {
|
|
16
|
+
export declare type EditorActionsPrivateAccess = {
|
|
17
17
|
_privateGetEditorView: () => EditorView;
|
|
18
18
|
_privateGetEventDispatcher: () => EventDispatcher;
|
|
19
19
|
_privateSubscribe: (cb: ContextUpdateHandler) => void;
|
|
@@ -59,6 +59,7 @@ declare class WithPluginState<P extends NamedPluginKeys> extends React.Component
|
|
|
59
59
|
private debounce;
|
|
60
60
|
private notAppliedState;
|
|
61
61
|
private isSubscribed;
|
|
62
|
+
private callsCount;
|
|
62
63
|
static contextTypes: {
|
|
63
64
|
editorActions: PropTypes.Requireable<object>;
|
|
64
65
|
editorSharedConfig: PropTypes.Requireable<object>;
|
|
@@ -72,6 +73,7 @@ declare class WithPluginState<P extends NamedPluginKeys> extends React.Component
|
|
|
72
73
|
* Debounces setState calls in order to reduce number of re-renders caused by several plugin state changes.
|
|
73
74
|
*/
|
|
74
75
|
private updateState;
|
|
76
|
+
private dispatchAnalyticsEvent;
|
|
75
77
|
private getPluginsStates;
|
|
76
78
|
private subscribe;
|
|
77
79
|
private unsubscribe;
|