@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
|
@@ -6,11 +6,8 @@ import React from 'react';
|
|
|
6
6
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
|
|
7
7
|
import { createDispatch } from '../event-dispatcher';
|
|
8
8
|
import { ErrorBoundary } from '../ui/ErrorBoundary';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
// startMeasureReactNodeViewRendered,
|
|
12
|
-
// stopMeasureReactNodeViewRendered,
|
|
13
|
-
//} from './get-performance-options';
|
|
9
|
+
import { getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from '../utils';
|
|
10
|
+
import { analyticsEventKey } from '../utils/analytics';
|
|
14
11
|
|
|
15
12
|
var ReactNodeView = /*#__PURE__*/function () {
|
|
16
13
|
function ReactNodeView(_node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent) {
|
|
@@ -82,26 +79,26 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
82
79
|
// difference between them and it kills the nodeView
|
|
83
80
|
|
|
84
81
|
|
|
85
|
-
this.domRef.classList.add("".concat(this.node.type.name, "View-content-wrap"));
|
|
86
|
-
//const {
|
|
87
|
-
// samplingRate,
|
|
88
|
-
// slowThreshold,
|
|
89
|
-
// trackingEnabled,
|
|
90
|
-
//} = getPerformanceOptions(this.view);
|
|
91
|
-
//trackingEnabled &&
|
|
92
|
-
// startMeasureReactNodeViewRendered({ nodeTypeName: this.node.type.name });
|
|
82
|
+
this.domRef.classList.add("".concat(this.node.type.name, "View-content-wrap"));
|
|
93
83
|
|
|
84
|
+
var _getPerformanceOption = getPerformanceOptions(this.view),
|
|
85
|
+
samplingRate = _getPerformanceOption.samplingRate,
|
|
86
|
+
slowThreshold = _getPerformanceOption.slowThreshold,
|
|
87
|
+
trackingEnabled = _getPerformanceOption.trackingEnabled;
|
|
88
|
+
|
|
89
|
+
trackingEnabled && startMeasureReactNodeViewRendered({
|
|
90
|
+
nodeTypeName: this.node.type.name
|
|
91
|
+
});
|
|
94
92
|
this.renderReactComponent(function () {
|
|
95
93
|
return _this2.render(_this2.reactComponentProps, _this2.handleRef);
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
94
|
+
});
|
|
95
|
+
trackingEnabled && stopMeasureReactNodeViewRendered({
|
|
96
|
+
nodeTypeName: this.node.type.name,
|
|
97
|
+
dispatchAnalyticsEvent: this.dispatchAnalyticsEvent,
|
|
98
|
+
editorState: this.view.state,
|
|
99
|
+
samplingRate: samplingRate,
|
|
100
|
+
slowThreshold: slowThreshold
|
|
101
|
+
});
|
|
105
102
|
return this;
|
|
106
103
|
}
|
|
107
104
|
}, {
|
package/dist/esm/styles/index.js
CHANGED
|
@@ -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';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
|
|
3
|
-
var _templateObject;
|
|
3
|
+
var _templateObject, _templateObject2;
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
|
-
import { akEditorCodeFontFamily, akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
import { akEditorCodeFontFamily, akEditorLineHeight, akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
7
7
|
import { DN20, DN400, DN50, DN800, N20, N30, N400, N800 } from '@atlaskit/theme/colors';
|
|
8
8
|
import { themed } from '@atlaskit/theme/components';
|
|
9
9
|
import { borderRadius, fontSize, gridSize } from '@atlaskit/theme/constants';
|
|
@@ -38,4 +38,5 @@ export var codeBlockSharedStyles = function codeBlockSharedStyles(props) {
|
|
|
38
38
|
light: token('color.text', N800),
|
|
39
39
|
dark: token('color.text', DN800)
|
|
40
40
|
})(props), borderRadius(), gridSize(), relativeFontSizeToBase16(fontSize()));
|
|
41
|
-
};
|
|
41
|
+
};
|
|
42
|
+
export var codeBlockInListSafariFix = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ::before {\n content: ' ';\n line-height: ", ";\n }\n\n > p:first-child,\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: -", "em !important;\n }\n"])), akEditorLineHeight, akEditorLineHeight);
|
|
@@ -5,4 +5,5 @@ var _templateObject;
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { bulletListSelector, orderedListSelector } from '@atlaskit/adf-schema';
|
|
7
7
|
import browser from '../../utils/browser';
|
|
8
|
-
export var
|
|
8
|
+
export var listPaddingLeftMarkerSpace = 24;
|
|
9
|
+
export var listsSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* =============== INDENTATION SPACING ========= */\n\n ul,\n ol {\n box-sizing: border-box;\n padding-left: ", "px;\n\n /*\n Firefox does not handle empty block element inside li tag.\n If there is not block element inside li tag,\n then firefox sets inherited height to li\n However, if there is any block element and if it's empty\n (or has empty inline element) then\n firefox sets li tag height to zero.\n More details at\n https://product-fabric.atlassian.net/wiki/spaces/~455502413/pages/3149365890/ED-14110+Investigation\n */\n li p:empty,\n li p > span:empty {\n ", "\n }\n }\n\n ", ", ", " {\n /*\n Ensures list item content adheres to the list's margin instead\n of filling the entire block row. This is important to allow\n clicking interactive elements which are floated next to a list.\n\n For some history and context on this block, see PRs related to tickets.:\n @see ED-6551 - original issue.\n @see ED-7015 - follow up issue.\n @see ED-7447 - flow-root change.\n\n We use 'display: table' (old clear fix / new block formatting context hack)\n for older browsers and 'flow-root' for modern browsers.\n\n @see https://css-tricks.com/display-flow-root/\n */\n // For older browsers the do not support flow-root.\n /* stylelint-disable declaration-block-no-duplicate-properties */\n display: table;\n display: flow-root;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n }\n\n /* =============== INDENTATION AESTHETICS ========= */\n\n /**\n We support nested lists up to six levels deep.\n **/\n\n /* LEGACY LISTS */\n\n ul,\n ul ul ul ul {\n list-style-type: disc;\n }\n\n ul ul,\n ul ul ul ul ul {\n list-style-type: circle;\n }\n\n ul ul ul,\n ul ul ul ul ul ul {\n list-style-type: square;\n }\n\n ol,\n ol ol ol ol {\n list-style-type: decimal;\n }\n ol ol,\n ol ol ol ol ol {\n list-style-type: lower-alpha;\n }\n ol ol ol,\n ol ol ol ol ol ol {\n list-style-type: lower-roman;\n }\n\n /* PREDICTABLE LISTS */\n\n ol[data-indent-level='1'],\n ol[data-indent-level='4'] {\n list-style-type: decimal;\n }\n\n ol[data-indent-level='2'],\n ol[data-indent-level='5'] {\n list-style-type: lower-alpha;\n }\n\n ol[data-indent-level='3'],\n ol[data-indent-level='6'] {\n list-style-type: lower-roman;\n }\n\n ul[data-indent-level='1'],\n ul[data-indent-level='4'] {\n list-style-type: disc;\n }\n\n ul[data-indent-level='2'],\n ul[data-indent-level='5'] {\n list-style-type: circle;\n }\n\n ul[data-indent-level='3'],\n ul[data-indent-level='6'] {\n list-style-type: square;\n }\n"])), listPaddingLeftMarkerSpace, browser.gecko ? 'display: inline-block;' : '', orderedListSelector, bulletListSelector);
|
|
@@ -38,7 +38,7 @@ export var TableSharedCssClassName = {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
var tableSharedStyle = function tableSharedStyle(props) {
|
|
41
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-of-type > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n .", " > table {\n margin: ", "px 0 0 0;\n }\n\n .", " > table,\n .", " > table {\n margin: ", "px ", "px 0 0;\n }\n\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color: ", ";\n }\n th,\n td {\n min-width: ", "px;\n font-weight: normal;\n vertical-align: top;\n border: 1px solid\n ", ";\n border-right-width: 0;\n border-bottom-width: 0;\n padding: ", "px;\n /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n ", "\n\n ", ";\n\n > :first-child:not(style),\n > style:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor
|
|
41
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-of-type > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n .", " > table {\n margin: ", "px 0 0 0;\n }\n\n .", " > table,\n .", " > table {\n margin: ", "px ", "px 0 0;\n }\n\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color: ", ";\n }\n th,\n td {\n min-width: ", "px;\n font-weight: normal;\n vertical-align: top;\n border: 1px solid\n ", ";\n border-right-width: 0;\n border-bottom-width: 0;\n padding: ", "px;\n /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n ", "\n\n ", ";\n\n > :first-child:not(style),\n > style:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n th p:not(:first-of-type),\n td p:not(:first-of-type) {\n margin-top: 12px;\n }\n }\n th {\n background-color: ", ";\n text-align: left;\n\n /* only apply this styling to codeblocks in default background headercells */\n /* TODO this needs to be overhauled as it relies on unsafe selectors */\n &:not([style]) {\n .code-block {\n background-image: ", ";\n background-attachment: local, scroll, scroll;\n background-position: 100% 0, 100% 0, 0 0;\n background-color: ", ";\n\n .line-number-gutter {\n background-color: ", ";\n }\n\n /* this is only relevant to the element taken care of by renderer */\n > [data-ds--code--code-block] {\n background-image: ", "!important;\n\n background-color: ", "!important;\n\n // selector lives inside @atlaskit/code\n --ds--code--line-number-bg-color: ", ";\n }\n }\n }\n }\n }\n }\n"])), TableSharedCssClassName.TABLE_CONTAINER, tableMarginBottom, TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableMarginTop, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableMarginTop, tableMarginSides, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, themed({
|
|
42
42
|
light: token('color.border', akEditorTableBorder),
|
|
43
43
|
dark: token('color.border', akEditorTableBorderDark)
|
|
44
44
|
})(props), token('color.background.neutral.subtle', 'white'), tableCellMinWidth, themed({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -23,7 +23,7 @@ import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
|
23
23
|
import { token } from '@atlaskit/tokens';
|
|
24
24
|
import Layer from '../Layer';
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "70.1
|
|
26
|
+
var packageVersion = "70.2.1";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = "0, ".concat(gridSize(), "px");
|
|
29
29
|
|
|
@@ -88,7 +88,7 @@ var containerStyles = function containerStyles(styleProps) {
|
|
|
88
88
|
var marginHorizontal = styleProps['data-node-type'] === 'expand' ? "-".concat(akLayoutGutterOffset, "px") : 0;
|
|
89
89
|
var margin = "".concat(marginTop, " ").concat(marginHorizontal, " ").concat(marginBottom);
|
|
90
90
|
return function (themeProps) {
|
|
91
|
-
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n border-radius: ", "px;\n min-height: 25px;\n background: ", ";\n margin: ", ";\n\n transition: background 0.3s ", ",\n border-color 0.3s ", ";\n padding: ", "px;\n\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4152\n
|
|
91
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n border-radius: ", "px;\n min-height: 25px;\n background: ", ";\n margin: ", ";\n\n transition: background 0.3s ", ",\n border-color 0.3s ", ";\n padding: ", "px;\n\n &:hover {\n // TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.\n // This is because the default state already uses the same token and, as such, the hover style won't change anything.\n // https://product-fabric.atlassian.net/browse/DSP-4152\n border: 1px solid\n ", ";\n background: ", ";\n }\n\n td > :not(style):first-child,\n td > style:first-child + * {\n margin-top: 0;\n }\n "])), focused ? EXPAND_FOCUSED_BORDER_COLOR : expanded ? EXPAND_EXPANDED_BORDER_COLOR(themeProps) : EXPAND_COLLAPSED_BORDER_COLOR, BORDER_RADIUS, !expanded ? EXPAND_COLLAPSED_BACKGROUND : EXPAND_SELECTED_BACKGROUND(themeProps), margin, akEditorSwoopCubicBezier, akEditorSwoopCubicBezier, gridSize(), themed({
|
|
92
92
|
light: token('color.border', colors.N50A),
|
|
93
93
|
dark: token('color.border', colors.DN50)
|
|
94
94
|
})(themeProps), EXPAND_SELECTED_BACKGROUND(themeProps));
|
|
@@ -97,7 +97,7 @@ var containerStyles = function containerStyles(styleProps) {
|
|
|
97
97
|
|
|
98
98
|
var contentStyles = function contentStyles(styleProps) {
|
|
99
99
|
return function (themeProps) {
|
|
100
|
-
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
|
|
100
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-top: ", "px;\n padding-right: ", "px;\n padding-left: ", "px;\n display: flow-root;\n\n // The follow rules inside @supports block are added as a part of ED-8893\n // The fix is targeting mobile bridge on iOS 12 or below,\n // We should consider remove this fix when we no longer support iOS 12\n @supports not (display: flow-root) {\n width: 100%;\n box-sizing: border-box;\n }\n\n ", "\n "])), styleProps.expanded ? gridSize() : 0, gridSize(), gridSize() * 4 - gridSize() / 2, !styleProps.expanded ? "\n .expand-content-wrapper, .nestedExpand-content-wrapper {\n /* We visually hide the content here to preserve the content during copy+paste */\n width: 100%;\n display: block;\n height: 0;\n overflow: hidden;\n clip: rect(1px, 1px, 1px, 1px);\n white-space: nowrap;\n user-select: none;\n }\n " : '');
|
|
101
101
|
};
|
|
102
102
|
};
|
|
103
103
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { IntlContext, IntlProvider } from 'react-intl-next';
|
|
3
|
+
|
|
4
|
+
var useCheckIntlContext = function useCheckIntlContext() {
|
|
5
|
+
return useContext(IntlContext) === null;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default function IntlProviderIfMissingWrapper(_ref) {
|
|
9
|
+
var children = _ref.children;
|
|
10
|
+
var missingIntlContext = useCheckIntlContext();
|
|
11
|
+
|
|
12
|
+
if (missingIntlContext) {
|
|
13
|
+
return /*#__PURE__*/React.createElement(IntlProvider, {
|
|
14
|
+
locale: "en"
|
|
15
|
+
}, children);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return children;
|
|
19
|
+
}
|
|
@@ -235,10 +235,10 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
235
235
|
|
|
236
236
|
return /*#__PURE__*/React.createElement("div", {
|
|
237
237
|
ref: this.handleRef,
|
|
238
|
-
style: _objectSpread({
|
|
238
|
+
style: _objectSpread(_objectSpread({
|
|
239
239
|
position: 'absolute',
|
|
240
240
|
zIndex: this.props.zIndex || akEditorFloatingPanelZIndex
|
|
241
|
-
}, position),
|
|
241
|
+
}, position), this.props.style),
|
|
242
242
|
"aria-label": this.props.ariaLabel || 'Popup' // Indicates component is an editor pop. Required for focus handling in Message.tsx
|
|
243
243
|
,
|
|
244
244
|
"data-editor-popup": true
|
|
@@ -7,17 +7,21 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
|
|
10
|
+
var _class;
|
|
11
|
+
|
|
10
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
13
|
|
|
12
14
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
15
|
|
|
14
16
|
import React from 'react';
|
|
17
|
+
import PropTypes from 'prop-types';
|
|
15
18
|
import { createPortal, unmountComponentAtNode, unstable_renderSubtreeIntoContainer } from 'react-dom';
|
|
16
19
|
import { injectIntl, RawIntlProvider, useIntl } from 'react-intl-next';
|
|
17
20
|
import { default as AnalyticsReactContext } from '@atlaskit/analytics-next-stable-react-context';
|
|
18
21
|
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
19
22
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics';
|
|
20
23
|
import { EventDispatcher } from '../../event-dispatcher';
|
|
24
|
+
import IntlProviderIfMissingWrapper from '../IntlProviderIfMissingWrapper';
|
|
21
25
|
import { PortalProviderThemeProviders } from './PortalProviderThemesProvider';
|
|
22
26
|
export var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
|
|
23
27
|
_inherits(PortalProviderAPI, _EventDispatcher);
|
|
@@ -47,8 +51,6 @@ export var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
47
51
|
_createClass(PortalProviderAPI, [{
|
|
48
52
|
key: "render",
|
|
49
53
|
value: function render(children, container) {
|
|
50
|
-
var _this2 = this;
|
|
51
|
-
|
|
52
54
|
var hasAnalyticsContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
53
55
|
var hasIntlContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
54
56
|
this.portals.set(container, {
|
|
@@ -56,14 +58,10 @@ export var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
56
58
|
hasAnalyticsContext: hasAnalyticsContext,
|
|
57
59
|
hasIntlContext: hasIntlContext
|
|
58
60
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}, children());
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
var wrappedChildren = this.useAnalyticsContext ? /*#__PURE__*/React.createElement(AnalyticsContextWrapper, null, childrenWithThemeProviders()) : childrenWithThemeProviders();
|
|
61
|
+
var childrenWithThemeProviders = /*#__PURE__*/React.createElement(PortalProviderThemeProviders, {
|
|
62
|
+
mode: this.themeMode
|
|
63
|
+
}, children());
|
|
64
|
+
var wrappedChildren = this.useAnalyticsContext ? /*#__PURE__*/React.createElement(AnalyticsContextWrapper, null, childrenWithThemeProviders) : childrenWithThemeProviders;
|
|
67
65
|
|
|
68
66
|
if (hasIntlContext) {
|
|
69
67
|
wrappedChildren = /*#__PURE__*/React.createElement(RawIntlProvider, {
|
|
@@ -79,36 +77,33 @@ export var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
79
77
|
}, {
|
|
80
78
|
key: "forceUpdate",
|
|
81
79
|
value: function forceUpdate(_ref) {
|
|
82
|
-
var
|
|
80
|
+
var _this2 = this;
|
|
83
81
|
|
|
84
82
|
var intl = _ref.intl,
|
|
85
83
|
themeMode = _ref.themeMode;
|
|
86
84
|
this.intl = intl;
|
|
87
85
|
this.themeMode = themeMode;
|
|
88
86
|
this.portals.forEach(function (portal, container) {
|
|
89
|
-
if (!portal.hasAnalyticsContext && !
|
|
87
|
+
if (!portal.hasAnalyticsContext && !_this2.useAnalyticsContext && !portal.hasIntlContext) {
|
|
90
88
|
return;
|
|
91
89
|
}
|
|
92
90
|
|
|
93
91
|
var wrappedChildren = portal.children();
|
|
92
|
+
var childrenWithThemeProviders = /*#__PURE__*/React.createElement(PortalProviderThemeProviders, {
|
|
93
|
+
mode: themeMode
|
|
94
|
+
}, wrappedChildren);
|
|
94
95
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
mode: themeMode
|
|
98
|
-
}, wrappedChildren);
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
if (portal.hasAnalyticsContext && _this3.useAnalyticsContext) {
|
|
102
|
-
wrappedChildren = /*#__PURE__*/React.createElement(AnalyticsContextWrapper, null, childrenWithThemeProviders());
|
|
96
|
+
if (portal.hasAnalyticsContext && _this2.useAnalyticsContext) {
|
|
97
|
+
wrappedChildren = /*#__PURE__*/React.createElement(AnalyticsContextWrapper, null, childrenWithThemeProviders);
|
|
103
98
|
}
|
|
104
99
|
|
|
105
100
|
if (portal.hasIntlContext) {
|
|
106
101
|
wrappedChildren = /*#__PURE__*/React.createElement(RawIntlProvider, {
|
|
107
|
-
value:
|
|
108
|
-
}, childrenWithThemeProviders
|
|
102
|
+
value: _this2.intl
|
|
103
|
+
}, childrenWithThemeProviders);
|
|
109
104
|
}
|
|
110
105
|
|
|
111
|
-
unstable_renderSubtreeIntoContainer(
|
|
106
|
+
unstable_renderSubtreeIntoContainer(_this2.context, wrappedChildren, container);
|
|
112
107
|
});
|
|
113
108
|
}
|
|
114
109
|
}, {
|
|
@@ -155,13 +150,13 @@ var BasePortalProvider = /*#__PURE__*/function (_React$Component) {
|
|
|
155
150
|
var _super2 = _createSuper(BasePortalProvider);
|
|
156
151
|
|
|
157
152
|
function BasePortalProvider(props) {
|
|
158
|
-
var
|
|
153
|
+
var _this3;
|
|
159
154
|
|
|
160
155
|
_classCallCheck(this, BasePortalProvider);
|
|
161
156
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
return
|
|
157
|
+
_this3 = _super2.call(this, props);
|
|
158
|
+
_this3.portalProviderAPI = new PortalProviderAPI(props.intl, props.onAnalyticsEvent, props.useAnalyticsContext, props.themeMode);
|
|
159
|
+
return _this3;
|
|
165
160
|
}
|
|
166
161
|
|
|
167
162
|
_createClass(BasePortalProvider, [{
|
|
@@ -185,51 +180,66 @@ var BasePortalProvider = /*#__PURE__*/function (_React$Component) {
|
|
|
185
180
|
_defineProperty(BasePortalProvider, "displayName", 'PortalProvider');
|
|
186
181
|
|
|
187
182
|
export var PortalProvider = injectIntl(BasePortalProvider);
|
|
188
|
-
export var PortalProviderWithThemeProviders = function PortalProviderWithThemeProviders(
|
|
183
|
+
export var PortalProviderWithThemeProviders = function PortalProviderWithThemeProviders(_ref2) {
|
|
184
|
+
var onAnalyticsEvent = _ref2.onAnalyticsEvent,
|
|
185
|
+
useAnalyticsContext = _ref2.useAnalyticsContext,
|
|
186
|
+
render = _ref2.render;
|
|
187
|
+
return /*#__PURE__*/React.createElement(IntlProviderIfMissingWrapper, null, /*#__PURE__*/React.createElement(PortalProviderWithThemeAndIntlProviders, {
|
|
188
|
+
onAnalyticsEvent: onAnalyticsEvent,
|
|
189
|
+
useAnalyticsContext: useAnalyticsContext,
|
|
190
|
+
render: render
|
|
191
|
+
}));
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
var PortalProviderWithThemeAndIntlProviders = function PortalProviderWithThemeAndIntlProviders(_ref3) {
|
|
195
|
+
var onAnalyticsEvent = _ref3.onAnalyticsEvent,
|
|
196
|
+
useAnalyticsContext = _ref3.useAnalyticsContext,
|
|
197
|
+
render = _ref3.render;
|
|
189
198
|
var intl = useIntl();
|
|
190
199
|
var globalTheme = useGlobalTheme();
|
|
191
200
|
return /*#__PURE__*/React.createElement(BasePortalProvider, {
|
|
192
201
|
intl: intl,
|
|
193
202
|
themeMode: globalTheme.mode,
|
|
194
|
-
onAnalyticsEvent:
|
|
195
|
-
useAnalyticsContext:
|
|
196
|
-
render:
|
|
203
|
+
onAnalyticsEvent: onAnalyticsEvent,
|
|
204
|
+
useAnalyticsContext: useAnalyticsContext,
|
|
205
|
+
render: render
|
|
197
206
|
});
|
|
198
207
|
};
|
|
208
|
+
|
|
199
209
|
export var PortalRenderer = /*#__PURE__*/function (_React$Component2) {
|
|
200
210
|
_inherits(PortalRenderer, _React$Component2);
|
|
201
211
|
|
|
202
212
|
var _super3 = _createSuper(PortalRenderer);
|
|
203
213
|
|
|
204
214
|
function PortalRenderer(props) {
|
|
205
|
-
var
|
|
215
|
+
var _this4;
|
|
206
216
|
|
|
207
217
|
_classCallCheck(this, PortalRenderer);
|
|
208
218
|
|
|
209
|
-
|
|
219
|
+
_this4 = _super3.call(this, props);
|
|
210
220
|
|
|
211
|
-
_defineProperty(_assertThisInitialized(
|
|
212
|
-
return
|
|
221
|
+
_defineProperty(_assertThisInitialized(_this4), "handleUpdate", function (portals) {
|
|
222
|
+
return _this4.setState({
|
|
213
223
|
portals: portals
|
|
214
224
|
});
|
|
215
225
|
});
|
|
216
226
|
|
|
217
|
-
props.portalProviderAPI.setContext(_assertThisInitialized(
|
|
218
|
-
props.portalProviderAPI.on('update',
|
|
219
|
-
|
|
227
|
+
props.portalProviderAPI.setContext(_assertThisInitialized(_this4));
|
|
228
|
+
props.portalProviderAPI.on('update', _this4.handleUpdate);
|
|
229
|
+
_this4.state = {
|
|
220
230
|
portals: new Map()
|
|
221
231
|
};
|
|
222
|
-
return
|
|
232
|
+
return _this4;
|
|
223
233
|
}
|
|
224
234
|
|
|
225
235
|
_createClass(PortalRenderer, [{
|
|
226
236
|
key: "render",
|
|
227
237
|
value: function render() {
|
|
228
238
|
var portals = this.state.portals;
|
|
229
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, Array.from(portals.entries()).map(function (
|
|
230
|
-
var
|
|
231
|
-
container =
|
|
232
|
-
children =
|
|
239
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, Array.from(portals.entries()).map(function (_ref4) {
|
|
240
|
+
var _ref5 = _slicedToArray(_ref4, 2),
|
|
241
|
+
container = _ref5[0],
|
|
242
|
+
children = _ref5[1];
|
|
233
243
|
|
|
234
244
|
return /*#__PURE__*/createPortal(children, container);
|
|
235
245
|
}));
|
|
@@ -246,8 +256,7 @@ var dummyAnalyticsContext = {
|
|
|
246
256
|
getAtlaskitAnalyticsContext: function getAtlaskitAnalyticsContext() {},
|
|
247
257
|
getAtlaskitAnalyticsEventHandlers: function getAtlaskitAnalyticsEventHandlers() {}
|
|
248
258
|
};
|
|
249
|
-
|
|
250
|
-
var AnalyticsContextWrapper = /*#__PURE__*/function (_React$Component3) {
|
|
259
|
+
var AnalyticsContextWrapper = (_class = /*#__PURE__*/function (_React$Component3) {
|
|
251
260
|
_inherits(AnalyticsContextWrapper, _React$Component3);
|
|
252
261
|
|
|
253
262
|
var _super4 = _createSuper(AnalyticsContextWrapper);
|
|
@@ -261,10 +270,10 @@ var AnalyticsContextWrapper = /*#__PURE__*/function (_React$Component3) {
|
|
|
261
270
|
_createClass(AnalyticsContextWrapper, [{
|
|
262
271
|
key: "render",
|
|
263
272
|
value: function render() {
|
|
264
|
-
var
|
|
273
|
+
var _ref6 = this.context.contextAdapter.analytics || {
|
|
265
274
|
value: dummyAnalyticsContext
|
|
266
275
|
},
|
|
267
|
-
value =
|
|
276
|
+
value = _ref6.value;
|
|
268
277
|
|
|
269
278
|
return /*#__PURE__*/React.createElement(AnalyticsReactContext.Provider, {
|
|
270
279
|
value: value
|
|
@@ -273,4 +282,6 @@ var AnalyticsContextWrapper = /*#__PURE__*/function (_React$Component3) {
|
|
|
273
282
|
}]);
|
|
274
283
|
|
|
275
284
|
return AnalyticsContextWrapper;
|
|
276
|
-
}(React.Component)
|
|
285
|
+
}(React.Component), _defineProperty(_class, "contextTypes", {
|
|
286
|
+
contextAdapter: PropTypes.object
|
|
287
|
+
}), _class);
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -15,4 +15,5 @@ export { WithCreateAnalyticsEvent } from './WithCreateAnalyticsEvent';
|
|
|
15
15
|
export { messages as expandMessages, sharedExpandStyles, ExpandIconWrapper, expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef } from './Expand';
|
|
16
16
|
export { ErrorMessage, HelperMessage, ValidMessage } from './Messages';
|
|
17
17
|
export { clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle } from './clear-next-sibling-margin-top';
|
|
18
|
-
export { IntlErrorBoundary, REACT_INTL_ERROR_MESSAGE } from './IntlErrorBoundary';
|
|
18
|
+
export { IntlErrorBoundary, REACT_INTL_ERROR_MESSAGE } from './IntlErrorBoundary';
|
|
19
|
+
export { default as IntlProviderIfMissingWrapper } from './IntlProviderIfMissingWrapper';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { akEditorBreakoutPadding, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
|
|
2
2
|
import { mapBreakpointToLayoutMaxWidth } from '../ui/BaseTheme';
|
|
3
3
|
import { getBreakpoint } from '../ui/WidthProvider';
|
|
4
|
+
import { parsePx } from './dom';
|
|
4
5
|
/**
|
|
5
6
|
* Variables required to construct a context for breakout ssr inline script.
|
|
6
7
|
*
|
|
@@ -15,6 +16,11 @@ var breakoutConsts = {
|
|
|
15
16
|
wideLayoutWidth: akEditorWideLayoutWidth,
|
|
16
17
|
mapBreakpointToLayoutMaxWidth: mapBreakpointToLayoutMaxWidth,
|
|
17
18
|
getBreakpoint: getBreakpoint,
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Consumers are opinionated that this will always return a string ending in
|
|
22
|
+
* `px` when called with `full-width` or `wide` as the layout parameter.
|
|
23
|
+
*/
|
|
18
24
|
calcBreakoutWidth: function calcBreakoutWidth(layout, containerWidth) {
|
|
19
25
|
var effectiveFullWidth = containerWidth - breakoutConsts.padding;
|
|
20
26
|
|
|
@@ -62,4 +68,43 @@ export var absoluteBreakoutWidth = function absoluteBreakoutWidth(layout, contai
|
|
|
62
68
|
};
|
|
63
69
|
export { breakoutConsts };
|
|
64
70
|
export var calcWideWidth = breakoutConsts.calcWideWidth;
|
|
65
|
-
export var calcBreakoutWidth = breakoutConsts.calcBreakoutWidth;
|
|
71
|
+
export var calcBreakoutWidth = breakoutConsts.calcBreakoutWidth;
|
|
72
|
+
export function calculateBreakoutStyles(_ref) {
|
|
73
|
+
var mode = _ref.mode,
|
|
74
|
+
widthStateLineLength = _ref.widthStateLineLength,
|
|
75
|
+
widthStateWidth = _ref.widthStateWidth;
|
|
76
|
+
var breakoutWidth = calcBreakoutWidth(mode, widthStateWidth);
|
|
77
|
+
var breakoutWidthPx = parsePx(breakoutWidth);
|
|
78
|
+
|
|
79
|
+
if (!widthStateLineLength) {
|
|
80
|
+
// lineLength is not normally undefined when this is run for,
|
|
81
|
+
// consumers but can be in SSR, initial render or test (jsdom)
|
|
82
|
+
// environments.
|
|
83
|
+
//
|
|
84
|
+
// this approach doesn't work well with position: fixed, so
|
|
85
|
+
// it breaks things like sticky headers.
|
|
86
|
+
//
|
|
87
|
+
// It can also cause bluriness for some child content (such as iframes)
|
|
88
|
+
return {
|
|
89
|
+
type: 'line-length-unknown',
|
|
90
|
+
width: breakoutWidth,
|
|
91
|
+
transform: 'translateX(-50%)',
|
|
92
|
+
marginLeft: '50%'
|
|
93
|
+
};
|
|
94
|
+
} // NOTE
|
|
95
|
+
// At time of writing -- when toggling between full-width and
|
|
96
|
+
// full-page appearance modes. There is a slight delay before
|
|
97
|
+
// the widthState is updated.
|
|
98
|
+
// During this period -- the marginLeftPx will be incorrect.
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
var marginLeftPx = -(breakoutWidthPx - widthStateLineLength) / 2;
|
|
102
|
+
return {
|
|
103
|
+
type: 'line-length-known',
|
|
104
|
+
width: breakoutWidth,
|
|
105
|
+
marginLeft: "".concat(marginLeftPx, "px")
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
export function calcBreakoutWidthPx(mode, widthStateWidth) {
|
|
109
|
+
return parsePx(calcBreakoutWidth(mode, widthStateWidth));
|
|
110
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export var getParticipantsCount = function getParticipantsCount(editorState) {
|
|
2
|
+
var _collabEditPlugin$$pa, _collabEditPlugin$$pa2;
|
|
3
|
+
|
|
4
|
+
// TODO: ED-15663
|
|
5
|
+
// Please, do not copy or use this kind of code below
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
if (!editorState || !editorState['collabEditPlugin$']) {
|
|
8
|
+
return 1;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
var participantsCount = (_collabEditPlugin$$pa = (_collabEditPlugin$$pa2 = editorState['collabEditPlugin$'].participants) === null || _collabEditPlugin$$pa2 === void 0 ? void 0 : _collabEditPlugin$$pa2.size()) !== null && _collabEditPlugin$$pa !== void 0 ? _collabEditPlugin$$pa : 1;
|
|
12
|
+
return participantsCount;
|
|
13
|
+
};
|
package/dist/esm/utils/dom.js
CHANGED
|
@@ -90,6 +90,22 @@ export function closest(node, s) {
|
|
|
90
90
|
export function closestElement(node, s) {
|
|
91
91
|
return closest(node, s);
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Util for converting a css pixel size value to a number (of pixels).
|
|
95
|
+
*
|
|
96
|
+
* ie.
|
|
97
|
+
* ```ts
|
|
98
|
+
* const pixels = parsePx('10px')
|
|
99
|
+
* // ^$ const pixels: number
|
|
100
|
+
* ```
|
|
101
|
+
* * ```ts
|
|
102
|
+
* const pixels = parsePx('10')
|
|
103
|
+
* // ^$ const pixels: number | undefined
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
// At time of writting prettier would strip the extend here.
|
|
107
|
+
// prettier-ignore
|
|
108
|
+
|
|
93
109
|
export function parsePx(pxStr) {
|
|
94
110
|
if (!pxStr.endsWith('px')) {
|
|
95
111
|
return undefined;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
2
|
+
import { getParticipantsCount } from './collab';
|
|
3
|
+
import { startMeasure, stopMeasure } from './performance/measure'; // This was existing logic when converting from ReactNodeView
|
|
4
|
+
// our current sampling for this event is not bound by node.type
|
|
5
|
+
|
|
6
|
+
var nodeViewRenderedEventsCounter = 0;
|
|
7
|
+
var DEFAULT_SAMPLING_RATE = 100;
|
|
8
|
+
var DEFAULT_SLOW_THRESHOLD = 7;
|
|
9
|
+
export function getPerformanceOptions(view) {
|
|
10
|
+
var _nodeViewTracking$sam, _nodeViewTracking$slo;
|
|
11
|
+
|
|
12
|
+
// TODO: ED-15663
|
|
13
|
+
// Please, do not copy or use this kind of code below
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
var fakePluginKey = {
|
|
16
|
+
key: 'analyticsPlugin$',
|
|
17
|
+
getState: function getState(state) {
|
|
18
|
+
return state['analyticsPlugin$'];
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var pluginState = fakePluginKey.getState(view.state);
|
|
22
|
+
var nodeViewTracking = pluginState && pluginState.performanceTracking ? pluginState.performanceTracking.nodeViewTracking || {} : {};
|
|
23
|
+
var samplingRate = (_nodeViewTracking$sam = nodeViewTracking.samplingRate) !== null && _nodeViewTracking$sam !== void 0 ? _nodeViewTracking$sam : DEFAULT_SAMPLING_RATE;
|
|
24
|
+
var slowThreshold = (_nodeViewTracking$slo = nodeViewTracking.slowThreshold) !== null && _nodeViewTracking$slo !== void 0 ? _nodeViewTracking$slo : DEFAULT_SLOW_THRESHOLD;
|
|
25
|
+
return {
|
|
26
|
+
trackingEnabled: !!nodeViewTracking.enabled,
|
|
27
|
+
samplingRate: samplingRate,
|
|
28
|
+
slowThreshold: slowThreshold
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export function startMeasureReactNodeViewRendered(_ref) {
|
|
32
|
+
var nodeTypeName = _ref.nodeTypeName;
|
|
33
|
+
startMeasure("\uD83E\uDD89".concat(nodeTypeName, "::ReactNodeView"));
|
|
34
|
+
}
|
|
35
|
+
export function stopMeasureReactNodeViewRendered(_ref2) {
|
|
36
|
+
var nodeTypeName = _ref2.nodeTypeName,
|
|
37
|
+
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
38
|
+
editorState = _ref2.editorState,
|
|
39
|
+
samplingRate = _ref2.samplingRate,
|
|
40
|
+
slowThreshold = _ref2.slowThreshold;
|
|
41
|
+
stopMeasure("\uD83E\uDD89".concat(nodeTypeName, "::ReactNodeView"), function (duration) {
|
|
42
|
+
if (++nodeViewRenderedEventsCounter % samplingRate === 0 && duration > slowThreshold) {
|
|
43
|
+
dispatchAnalyticsEvent({
|
|
44
|
+
action: ACTION.REACT_NODEVIEW_RENDERED,
|
|
45
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
46
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
47
|
+
attributes: {
|
|
48
|
+
node: nodeTypeName,
|
|
49
|
+
duration: duration,
|
|
50
|
+
participants: getParticipantsCount(editorState)
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { default as ErrorReporter } from './error-reporter';
|
|
|
5
5
|
export { isPastDate, timestampToIsoFormat, timestampToString, timestampToTaskContext, timestampToUTCDate, todayTimestampInUTC } from './date';
|
|
6
6
|
export { isElementInTableCell, isTextSelection, isLastItemMediaGroup, setNodeSelection, setTextSelection, nonNullable, stepAddsOneOf, stepHasSlice, extractSliceFromStep, isValidPosition } from './editor-core-utils';
|
|
7
7
|
export { withImageLoader } from './imageLoader';
|
|
8
|
-
export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts } from './breakout';
|
|
8
|
+
export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx } from './breakout';
|
|
9
9
|
export { findChangedNodesFromTransaction, validNode, validateNodes, isType, isParagraph, isText, isLinkMark, SelectedState, isNodeSelectedOrInRange, isSupportedInParent } from './nodes';
|
|
10
10
|
export { pluginFactory } from './plugin-state-factory';
|
|
11
11
|
export { getFragmentBackingArray, mapFragment, mapSlice, flatmap, mapChildren } from './slice';
|
|
@@ -26,8 +26,12 @@ export { isTextInput } from './is-text-input';
|
|
|
26
26
|
export { ZERO_WIDTH_SPACE, ZERO_WIDTH_JOINER } from './whitespace';
|
|
27
27
|
export { shouldForceTracking } from './should-force-tracking';
|
|
28
28
|
export { getModeFromTheme } from './getModeFromTheme';
|
|
29
|
+
export { getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from './get-performance-options';
|
|
29
30
|
export { sniffUserBrowserExtensions } from './browser-extensions';
|
|
30
31
|
export { RenderCountProfiler } from './profiler/render-count';
|
|
31
32
|
export { validateADFEntity, validationErrorHandler } from './validate-using-spec';
|
|
32
33
|
export { getShallowPropsDifference, getPropsDifference } from './compare-props';
|
|
33
|
-
export { useComponentRenderTracking } from './performance/hooks/use-component-render-tracking';
|
|
34
|
+
export { useComponentRenderTracking } from './performance/hooks/use-component-render-tracking';
|
|
35
|
+
export { isOutdatedBrowser } from './outdated-browsers';
|
|
36
|
+
export { isReferencedSource } from './referentiality';
|
|
37
|
+
export { sendLogs } from './sendLogs';
|