@atlaskit/editor-core 172.1.2 → 172.2.0
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 +24 -0
- package/dist/cjs/analytics-api/api.js +38 -0
- package/dist/cjs/analytics-api/attach-payload-into-transaction.js +36 -0
- package/dist/cjs/analytics-api/editor-state-context.js +96 -0
- package/dist/cjs/analytics-api/map-attributes.js +30 -0
- package/dist/cjs/create-editor/ReactEditorView.js +47 -6
- package/dist/cjs/create-editor/ReactEditorViewContext.js +2 -6
- package/dist/cjs/create-editor/create-plugins-list.js +12 -3
- package/dist/cjs/event-dispatcher/index.js +12 -81
- package/dist/cjs/insert-api/api.js +48 -0
- package/dist/cjs/insert-api/insert-content-handlers.js +101 -0
- package/dist/cjs/insert-api/insert-node-helpers.js +157 -0
- package/dist/cjs/{plugins/analytics/types/avatar.js → insert-api/types.js} +0 -0
- package/dist/cjs/keymaps/index.js +437 -288
- package/dist/cjs/messages.js +8 -125
- package/dist/cjs/plugins/analytics/index.js +26 -26
- package/dist/cjs/plugins/analytics/types/enums.js +49 -344
- package/dist/cjs/plugins/analytics/types/extension-events.js +19 -26
- package/dist/cjs/plugins/analytics/types/general-events.js +25 -34
- package/dist/cjs/plugins/analytics/types/index.js +10 -56
- package/dist/cjs/plugins/analytics/types/inline-comment-events.js +7 -8
- package/dist/cjs/plugins/analytics/types/node-events.js +13 -20
- package/dist/cjs/plugins/analytics/types/smart-links.js +8 -14
- package/dist/cjs/plugins/analytics/types/toolbar-button.js +7 -20
- package/dist/cjs/plugins/analytics/utils.js +37 -127
- package/dist/cjs/plugins/expand/utils.js +18 -45
- package/dist/cjs/plugins/extension/actions.js +10 -30
- package/dist/cjs/plugins/extension/ui/Extension/styles.js +18 -8
- package/dist/cjs/plugins/insert-block/index.js +1 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +31 -22
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/messages.js +6 -170
- package/dist/cjs/plugins/layout/styles.js +14 -6
- package/dist/cjs/plugins/layout/utils.js +25 -66
- package/dist/cjs/plugins/paste/handlers.js +19 -15
- package/dist/cjs/plugins/paste/util/index.js +30 -1
- package/dist/cjs/plugins/selection/gap-cursor/selection.js +23 -188
- package/dist/cjs/plugins/selection/gap-cursor/utils/is-ignored.js +7 -8
- package/dist/cjs/plugins/selection/gap-cursor/utils/is-valid-target-node.js +7 -8
- package/dist/cjs/plugins/selection/gap-cursor/utils.js +6 -6
- package/dist/cjs/plugins/selection/gap-cursor-selection.js +1 -1
- package/dist/cjs/plugins/selection/types.js +9 -11
- package/dist/cjs/plugins/selection/utils.js +2 -2
- package/dist/cjs/plugins/table/commands/go-to-next-cell.js +40 -38
- package/dist/cjs/plugins/table/commands/insert.js +57 -49
- package/dist/cjs/plugins/table/commands/selection.js +302 -218
- package/dist/cjs/plugins/table/commands-with-analytics.js +241 -219
- package/dist/cjs/plugins/table/event-handlers.js +60 -60
- package/dist/cjs/plugins/table/index.js +64 -20
- package/dist/cjs/plugins/table/nodeviews/TableComponent.js +20 -22
- package/dist/cjs/plugins/table/nodeviews/table.js +19 -11
- package/dist/cjs/plugins/table/nodeviews/tableCell.js +11 -13
- package/dist/cjs/plugins/table/nodeviews/update-overflow-shadows.js +25 -25
- package/dist/cjs/plugins/table/pm-plugins/keymap.js +15 -13
- package/dist/cjs/plugins/table/pm-plugins/main.js +8 -8
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +4 -8
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin.js +2 -1
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +7 -10
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/dom.js +30 -28
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -7
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +3 -2
- package/dist/cjs/plugins/table/pm-plugins/table-selection-keymap.js +3 -3
- package/dist/cjs/plugins/table/toolbar.js +74 -72
- package/dist/cjs/plugins/table/transforms/column-width.js +41 -38
- package/dist/cjs/plugins/table/transforms/replace-table.js +4 -4
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +2 -4
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +25 -21
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +6 -2
- package/dist/cjs/plugins/table/ui/FloatingDeleteButton/index.js +7 -4
- package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +12 -11
- package/dist/cjs/plugins/table/ui/LayoutButton/index.js +2 -2
- package/dist/cjs/plugins/table/ui/TableFloatingControls/index.js +4 -6
- package/dist/cjs/plugins/table/ui/common-styles.js +3 -3
- package/dist/cjs/plugins/table/utils/analytics.js +26 -1
- package/dist/cjs/plugins/table/utils/index.js +0 -6
- package/dist/cjs/selection-api/api.js +34 -0
- package/dist/cjs/types/browser.js +1 -2
- package/dist/cjs/ui/ColorPalette/Color/index.js +2 -106
- package/dist/cjs/ui/ColorPalette/Palettes/cellBackgroundColorPalette.js +2 -21
- package/dist/cjs/ui/ColorPalette/Palettes/common.js +7 -25
- package/dist/cjs/ui/ColorPalette/Palettes/paletteMessages.js +2 -114
- package/dist/cjs/ui/ColorPalette/Palettes/panelBackgroundPalette.js +12 -152
- package/dist/cjs/ui/ColorPalette/Palettes/statusColorPalette.js +13 -61
- package/dist/cjs/ui/ColorPalette/Palettes/textColorPalette.js +12 -34
- package/dist/cjs/ui/ColorPalette/index.js +2 -76
- package/dist/cjs/ui/Dropdown/index.js +3 -119
- package/dist/cjs/ui/DropdownMenu/index.js +3 -286
- package/dist/cjs/ui/Toolbar/types.js +19 -33
- package/dist/cjs/ui/ToolbarButton/index.js +8 -120
- package/dist/cjs/ui/WithPluginState/index.js +1 -3
- package/dist/cjs/ui/styles.js +35 -27
- package/dist/cjs/ui/with-outer-listeners.js +4 -152
- package/dist/cjs/utils/dom.js +46 -123
- package/dist/cjs/utils/index.js +40 -42
- package/dist/cjs/utils/node-width.js +7 -79
- package/dist/cjs/utils/nodes.js +57 -124
- package/dist/cjs/utils/plugin-state-factory.js +7 -107
- package/dist/cjs/utils/selection.js +11 -62
- package/dist/cjs/utils/slice.js +28 -68
- package/dist/cjs/utils/step.js +18 -46
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics-api/api.js +30 -0
- package/dist/es2019/analytics-api/attach-payload-into-transaction.js +25 -0
- package/dist/es2019/analytics-api/editor-state-context.js +85 -0
- package/dist/es2019/analytics-api/map-attributes.js +14 -0
- package/dist/es2019/create-editor/ReactEditorView.js +33 -4
- package/dist/es2019/create-editor/ReactEditorViewContext.js +1 -2
- package/dist/es2019/create-editor/create-plugins-list.js +13 -4
- package/dist/es2019/event-dispatcher/index.js +1 -60
- package/dist/es2019/insert-api/api.js +43 -0
- package/dist/es2019/insert-api/insert-content-handlers.js +85 -0
- package/dist/es2019/insert-api/insert-node-helpers.js +149 -0
- package/dist/es2019/{plugins/analytics/types/avatar.js → insert-api/types.js} +0 -0
- package/dist/es2019/keymaps/index.js +1 -186
- package/dist/es2019/messages.js +2 -123
- package/dist/es2019/plugins/analytics/index.js +1 -1
- package/dist/es2019/plugins/analytics/types/enums.js +1 -336
- package/dist/es2019/plugins/analytics/types/extension-events.js +1 -22
- package/dist/es2019/plugins/analytics/types/general-events.js +1 -30
- package/dist/es2019/plugins/analytics/types/index.js +1 -6
- package/dist/es2019/plugins/analytics/types/inline-comment-events.js +1 -7
- package/dist/es2019/plugins/analytics/types/node-events.js +1 -18
- package/dist/es2019/plugins/analytics/types/smart-links.js +1 -12
- package/dist/es2019/plugins/analytics/types/toolbar-button.js +1 -19
- package/dist/es2019/plugins/analytics/utils.js +12 -113
- package/dist/es2019/plugins/expand/utils.js +1 -36
- package/dist/es2019/plugins/extension/actions.js +1 -26
- package/dist/es2019/plugins/extension/ui/Extension/styles.js +2 -3
- package/dist/es2019/plugins/insert-block/index.js +1 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -12
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/messages.js +1 -168
- package/dist/es2019/plugins/layout/styles.js +2 -3
- package/dist/es2019/plugins/layout/utils.js +1 -54
- package/dist/es2019/plugins/paste/handlers.js +8 -4
- package/dist/es2019/plugins/paste/util/index.js +23 -0
- package/dist/es2019/plugins/selection/gap-cursor/selection.js +1 -136
- package/dist/es2019/plugins/selection/gap-cursor/utils/is-ignored.js +1 -5
- package/dist/es2019/plugins/selection/gap-cursor/utils/is-valid-target-node.js +1 -4
- package/dist/es2019/plugins/selection/gap-cursor/utils.js +4 -4
- package/dist/es2019/plugins/selection/gap-cursor-selection.js +1 -1
- package/dist/es2019/plugins/selection/types.js +2 -9
- package/dist/es2019/plugins/selection/utils.js +1 -1
- package/dist/es2019/plugins/table/commands/go-to-next-cell.js +4 -4
- package/dist/es2019/plugins/table/commands/insert.js +26 -24
- package/dist/es2019/plugins/table/commands/selection.js +109 -51
- package/dist/es2019/plugins/table/commands-with-analytics.js +39 -38
- package/dist/es2019/plugins/table/event-handlers.js +6 -7
- package/dist/es2019/plugins/table/index.js +56 -16
- package/dist/es2019/plugins/table/nodeviews/TableComponent.js +11 -12
- package/dist/es2019/plugins/table/nodeviews/table.js +18 -8
- package/dist/es2019/plugins/table/nodeviews/tableCell.js +2 -3
- package/dist/es2019/plugins/table/nodeviews/update-overflow-shadows.js +3 -4
- package/dist/es2019/plugins/table/pm-plugins/keymap.js +13 -12
- package/dist/es2019/plugins/table/pm-plugins/main.js +8 -8
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +4 -6
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/plugin.js +2 -2
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +7 -8
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin.js +2 -2
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/dom.js +2 -2
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +3 -2
- package/dist/es2019/plugins/table/pm-plugins/table-selection-keymap.js +3 -3
- package/dist/es2019/plugins/table/toolbar.js +24 -24
- package/dist/es2019/plugins/table/transforms/column-width.js +3 -2
- package/dist/es2019/plugins/table/transforms/replace-table.js +4 -4
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +2 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +19 -16
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +6 -2
- package/dist/es2019/plugins/table/ui/FloatingDeleteButton/index.js +8 -4
- package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +9 -6
- package/dist/es2019/plugins/table/ui/LayoutButton/index.js +2 -2
- package/dist/es2019/plugins/table/ui/TableFloatingControls/index.js +2 -3
- package/dist/es2019/plugins/table/ui/common-styles.js +1 -1
- package/dist/es2019/plugins/table/utils/analytics.js +16 -1
- package/dist/es2019/plugins/table/utils/index.js +1 -1
- package/dist/es2019/selection-api/api.js +22 -0
- package/dist/es2019/types/browser.js +0 -1
- package/dist/es2019/ui/ColorPalette/Color/index.js +1 -66
- package/dist/es2019/ui/ColorPalette/Palettes/cellBackgroundColorPalette.js +1 -14
- package/dist/es2019/ui/ColorPalette/Palettes/common.js +1 -20
- package/dist/es2019/ui/ColorPalette/Palettes/paletteMessages.js +2 -113
- package/dist/es2019/ui/ColorPalette/Palettes/panelBackgroundPalette.js +1 -137
- package/dist/es2019/ui/ColorPalette/Palettes/statusColorPalette.js +1 -51
- package/dist/es2019/ui/ColorPalette/Palettes/textColorPalette.js +1 -25
- package/dist/es2019/ui/ColorPalette/index.js +2 -62
- package/dist/es2019/ui/Dropdown/index.js +2 -84
- package/dist/es2019/ui/DropdownMenu/index.js +2 -244
- package/dist/es2019/ui/Toolbar/types.js +1 -30
- package/dist/es2019/ui/ToolbarButton/index.js +2 -94
- package/dist/es2019/ui/WithPluginState/index.js +1 -1
- package/dist/es2019/ui/styles.js +9 -47
- package/dist/es2019/ui/with-outer-listeners.js +2 -104
- package/dist/es2019/utils/dom.js +1 -113
- package/dist/es2019/utils/index.js +2 -21
- package/dist/es2019/utils/node-width.js +1 -75
- package/dist/es2019/utils/nodes.js +1 -88
- package/dist/es2019/utils/plugin-state-factory.js +1 -107
- package/dist/es2019/utils/selection.js +2 -52
- package/dist/es2019/utils/slice.js +1 -56
- package/dist/es2019/utils/step.js +1 -35
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics-api/api.js +27 -0
- package/dist/esm/analytics-api/attach-payload-into-transaction.js +22 -0
- package/dist/esm/analytics-api/editor-state-context.js +81 -0
- package/dist/esm/analytics-api/map-attributes.js +20 -0
- package/dist/esm/create-editor/ReactEditorView.js +44 -6
- package/dist/esm/create-editor/ReactEditorViewContext.js +1 -2
- package/dist/esm/create-editor/create-plugins-list.js +15 -4
- package/dist/esm/event-dispatcher/index.js +1 -74
- package/dist/esm/insert-api/api.js +37 -0
- package/dist/esm/insert-api/insert-content-handlers.js +88 -0
- package/dist/esm/insert-api/insert-node-helpers.js +138 -0
- package/dist/{es2019/plugins/analytics/types/config-panel-events.js → esm/insert-api/types.js} +0 -0
- package/dist/esm/keymaps/index.js +1 -184
- package/dist/esm/messages.js +2 -123
- package/dist/esm/plugins/analytics/index.js +1 -1
- package/dist/esm/plugins/analytics/types/enums.js +1 -336
- package/dist/esm/plugins/analytics/types/extension-events.js +1 -22
- package/dist/esm/plugins/analytics/types/general-events.js +1 -30
- package/dist/esm/plugins/analytics/types/index.js +1 -6
- package/dist/esm/plugins/analytics/types/inline-comment-events.js +1 -7
- package/dist/esm/plugins/analytics/types/node-events.js +1 -18
- package/dist/esm/plugins/analytics/types/smart-links.js +1 -12
- package/dist/esm/plugins/analytics/types/toolbar-button.js +1 -19
- package/dist/esm/plugins/analytics/utils.js +12 -113
- package/dist/esm/plugins/expand/utils.js +1 -34
- package/dist/esm/plugins/extension/actions.js +1 -24
- package/dist/esm/plugins/extension/ui/Extension/styles.js +2 -3
- package/dist/esm/plugins/insert-block/index.js +1 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -12
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/messages.js +1 -168
- package/dist/esm/plugins/layout/styles.js +2 -3
- package/dist/esm/plugins/layout/utils.js +1 -58
- package/dist/esm/plugins/paste/handlers.js +8 -4
- package/dist/esm/plugins/paste/util/index.js +23 -0
- package/dist/esm/plugins/selection/gap-cursor/selection.js +1 -176
- package/dist/esm/plugins/selection/gap-cursor/utils/is-ignored.js +1 -5
- package/dist/esm/plugins/selection/gap-cursor/utils/is-valid-target-node.js +1 -4
- package/dist/esm/plugins/selection/gap-cursor/utils.js +4 -4
- package/dist/esm/plugins/selection/gap-cursor-selection.js +1 -1
- package/dist/esm/plugins/selection/types.js +2 -9
- package/dist/esm/plugins/selection/utils.js +1 -1
- package/dist/esm/plugins/table/commands/go-to-next-cell.js +34 -32
- package/dist/esm/plugins/table/commands/insert.js +57 -49
- package/dist/esm/plugins/table/commands/selection.js +303 -215
- package/dist/esm/plugins/table/commands-with-analytics.js +241 -220
- package/dist/esm/plugins/table/event-handlers.js +60 -59
- package/dist/esm/plugins/table/index.js +62 -18
- package/dist/esm/plugins/table/nodeviews/TableComponent.js +20 -21
- package/dist/esm/plugins/table/nodeviews/table.js +19 -9
- package/dist/esm/plugins/table/nodeviews/tableCell.js +11 -12
- package/dist/esm/plugins/table/nodeviews/update-overflow-shadows.js +25 -24
- package/dist/esm/plugins/table/pm-plugins/keymap.js +14 -13
- package/dist/esm/plugins/table/pm-plugins/main.js +8 -8
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +4 -6
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/plugin.js +2 -1
- package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +7 -8
- package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin.js +2 -2
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/dom.js +30 -28
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -4
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +3 -2
- package/dist/esm/plugins/table/pm-plugins/table-selection-keymap.js +3 -3
- package/dist/esm/plugins/table/toolbar.js +75 -73
- package/dist/esm/plugins/table/transforms/column-width.js +41 -38
- package/dist/esm/plugins/table/transforms/replace-table.js +4 -4
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +2 -2
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +25 -21
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +6 -2
- package/dist/esm/plugins/table/ui/FloatingDeleteButton/index.js +6 -4
- package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +9 -6
- package/dist/esm/plugins/table/ui/LayoutButton/index.js +2 -2
- package/dist/esm/plugins/table/ui/TableFloatingControls/index.js +4 -5
- package/dist/esm/plugins/table/ui/common-styles.js +1 -1
- package/dist/esm/plugins/table/utils/analytics.js +22 -1
- package/dist/esm/plugins/table/utils/index.js +1 -1
- package/dist/esm/selection-api/api.js +23 -0
- package/dist/esm/types/browser.js +0 -1
- package/dist/esm/ui/ColorPalette/Color/index.js +1 -93
- package/dist/esm/ui/ColorPalette/Palettes/cellBackgroundColorPalette.js +1 -14
- package/dist/esm/ui/ColorPalette/Palettes/common.js +1 -19
- package/dist/esm/ui/ColorPalette/Palettes/paletteMessages.js +2 -113
- package/dist/esm/ui/ColorPalette/Palettes/panelBackgroundPalette.js +1 -147
- package/dist/esm/ui/ColorPalette/Palettes/statusColorPalette.js +1 -51
- package/dist/esm/ui/ColorPalette/Palettes/textColorPalette.js +1 -25
- package/dist/esm/ui/ColorPalette/index.js +2 -64
- package/dist/esm/ui/Dropdown/index.js +2 -106
- package/dist/esm/ui/DropdownMenu/index.js +2 -265
- package/dist/esm/ui/Toolbar/types.js +1 -30
- package/dist/esm/ui/ToolbarButton/index.js +2 -102
- package/dist/esm/ui/WithPluginState/index.js +1 -1
- package/dist/esm/ui/styles.js +17 -20
- package/dist/esm/ui/with-outer-listeners.js +2 -139
- package/dist/esm/utils/dom.js +1 -113
- package/dist/esm/utils/index.js +5 -23
- package/dist/esm/utils/node-width.js +1 -73
- package/dist/esm/utils/nodes.js +1 -100
- package/dist/esm/utils/plugin-state-factory.js +1 -106
- package/dist/esm/utils/selection.js +2 -50
- package/dist/esm/utils/slice.js +1 -59
- package/dist/esm/utils/step.js +1 -37
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +2 -16
- package/dist/types/analytics-api/api.d.ts +9 -0
- package/dist/types/analytics-api/attach-payload-into-transaction.d.ts +10 -0
- package/dist/types/analytics-api/editor-state-context.d.ts +9 -0
- package/dist/types/analytics-api/map-attributes.d.ts +2 -0
- package/dist/types/create-editor/ReactEditorView.d.ts +1 -0
- package/dist/types/create-editor/ReactEditorViewContext.d.ts +1 -7
- package/dist/types/create-editor/create-plugins-list.d.ts +5 -1
- package/dist/types/event-dispatcher/index.d.ts +2 -19
- package/dist/types/insert-api/api.d.ts +9 -0
- package/dist/types/insert-api/insert-content-handlers.d.ts +9 -0
- package/dist/types/insert-api/insert-node-helpers.d.ts +30 -0
- package/dist/types/insert-api/types.d.ts +16 -0
- package/dist/types/keymaps/index.d.ts +2 -89
- package/dist/types/labs/next/presets/cxhtml.d.ts +1 -1
- package/dist/types/labs/next/presets/mobile.d.ts +1 -1
- package/dist/types/messages.d.ts +2 -124
- package/dist/types/plugins/analytics/index.d.ts +2 -2
- package/dist/types/plugins/analytics/types/dispatch-analytics-event.d.ts +1 -2
- package/dist/types/plugins/analytics/types/enums.d.ts +1 -313
- package/dist/types/plugins/analytics/types/events.d.ts +1 -111
- package/dist/types/plugins/analytics/types/experimental-events.d.ts +1 -17
- package/dist/types/plugins/analytics/types/extension-events.d.ts +2 -43
- package/dist/types/plugins/analytics/types/general-events.d.ts +2 -179
- package/dist/types/plugins/analytics/types/index.d.ts +4 -14
- package/dist/types/plugins/analytics/types/inline-comment-events.d.ts +2 -17
- package/dist/types/plugins/analytics/types/link-tool-bar-events.d.ts +1 -76
- package/dist/types/plugins/analytics/types/media-events.d.ts +1 -16
- package/dist/types/plugins/analytics/types/node-events.d.ts +2 -56
- package/dist/types/plugins/analytics/types/selection-events.d.ts +1 -18
- package/dist/types/plugins/analytics/types/smart-links.d.ts +2 -13
- package/dist/types/plugins/analytics/types/toolbar-button.d.ts +2 -22
- package/dist/types/plugins/analytics/types/type-ahead.d.ts +1 -27
- package/dist/types/plugins/analytics/utils.d.ts +3 -8
- package/dist/types/plugins/annotation/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/card/pm-plugins/util/state.d.ts +1 -1
- package/dist/types/plugins/code-bidi-warning/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/context-panel/types.d.ts +1 -3
- package/dist/types/plugins/expand/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/expand/utils.d.ts +1 -5
- package/dist/types/plugins/extension/actions.d.ts +2 -6
- package/dist/types/plugins/extension/commands.d.ts +7 -7
- package/dist/types/plugins/extension/plugin-factory.d.ts +2 -2
- package/dist/types/plugins/extension/ui/Extension/styles.d.ts +2 -2
- package/dist/types/plugins/find-replace/commands.d.ts +7 -7
- package/dist/types/plugins/find-replace/plugin.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/types.d.ts +1 -153
- package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +2 -1
- package/dist/types/plugins/floating-toolbar/ui/Select.d.ts +2 -12
- package/dist/types/plugins/floating-toolbar/ui/types.d.ts +1 -20
- package/dist/types/plugins/insert-block/index.d.ts +2 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/messages.d.ts +1 -167
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +3 -1
- package/dist/types/plugins/layout/styles.d.ts +2 -2
- package/dist/types/plugins/layout/utils.d.ts +1 -15
- package/dist/types/plugins/media/commands/linking.d.ts +3 -3
- package/dist/types/plugins/media/nodeviews/mediaNodeView/index.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/alt-text/commands.d.ts +2 -2
- package/dist/types/plugins/media/pm-plugins/alt-text/index.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/linking/index.d.ts +1 -1
- package/dist/types/plugins/mobile-dimensions/commands.d.ts +4 -4
- package/dist/types/plugins/mobile-dimensions/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/paste/util/index.d.ts +2 -1
- package/dist/types/plugins/selection/commands.d.ts +1 -1
- package/dist/types/plugins/selection/gap-cursor/selection.d.ts +1 -40
- package/dist/types/plugins/selection/gap-cursor/utils/is-ignored.d.ts +1 -2
- package/dist/types/plugins/selection/gap-cursor/utils/is-valid-target-node.d.ts +1 -2
- package/dist/types/plugins/selection/gap-cursor-selection.d.ts +1 -1
- package/dist/types/plugins/selection/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/selection/types.d.ts +4 -19
- package/dist/types/plugins/table/commands/go-to-next-cell.d.ts +3 -2
- package/dist/types/plugins/table/commands/hover.d.ts +7 -7
- package/dist/types/plugins/table/commands/insert.d.ts +5 -4
- package/dist/types/plugins/table/commands/misc.d.ts +8 -8
- package/dist/types/plugins/table/commands/selection.d.ts +4 -3
- package/dist/types/plugins/table/commands/toggle.d.ts +1 -1
- package/dist/types/plugins/table/commands-with-analytics.d.ts +21 -19
- package/dist/types/plugins/table/event-handlers.d.ts +4 -2
- package/dist/types/plugins/table/index.d.ts +7 -0
- package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +4 -2
- package/dist/types/plugins/table/nodeviews/table.d.ts +2 -1
- package/dist/types/plugins/table/nodeviews/tableCell.d.ts +2 -1
- package/dist/types/plugins/table/nodeviews/types.d.ts +3 -0
- package/dist/types/plugins/table/nodeviews/update-overflow-shadows.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/keymap.d.ts +3 -1
- package/dist/types/plugins/table/pm-plugins/main.d.ts +4 -2
- package/dist/types/plugins/table/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/sticky-headers/commands.d.ts +2 -2
- package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin-state.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/commands.d.ts +4 -4
- package/dist/types/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +3 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/plugin-factory.d.ts +2 -2
- package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +3 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +3 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/table-selection-keymap.d.ts +2 -1
- package/dist/types/plugins/table/toolbar.d.ts +5 -3
- package/dist/types/plugins/table/transforms/column-width.d.ts +2 -1
- package/dist/types/plugins/table/transforms/replace-table.d.ts +3 -2
- package/dist/types/plugins/table/types.d.ts +3 -1
- package/dist/types/plugins/table/ui/FloatingContextualButton/index.d.ts +1 -1
- package/dist/types/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +4 -0
- package/dist/types/plugins/table/ui/FloatingContextualMenu/index.d.ts +5 -1
- package/dist/types/plugins/table/ui/FloatingDeleteButton/index.d.ts +2 -0
- package/dist/types/plugins/table/ui/FloatingInsertButton/index.d.ts +5 -1
- package/dist/types/plugins/table/ui/LayoutButton/index.d.ts +2 -0
- package/dist/types/plugins/table/ui/TableFloatingControls/index.d.ts +2 -0
- package/dist/types/plugins/table/utils/analytics.d.ts +3 -0
- package/dist/types/plugins/table/utils/index.d.ts +1 -1
- package/dist/types/plugins/type-ahead/types.d.ts +2 -50
- package/dist/types/plugins/width/index.d.ts +3 -6
- package/dist/types/selection-api/api.d.ts +11 -0
- package/dist/types/types/browser.d.ts +1 -10
- package/dist/types/types/editor-appearance.d.ts +1 -1
- package/dist/types/types/editor-plugin.d.ts +1 -59
- package/dist/types/types/editor-react-context.d.ts +1 -6
- package/dist/types/types/empty-state-handler.d.ts +1 -7
- package/dist/types/types/feature-flags.d.ts +1 -343
- package/dist/types/types/pm-config.d.ts +1 -14
- package/dist/types/types/pm-plugin.d.ts +1 -27
- package/dist/types/types/ui-components.d.ts +1 -22
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +118 -118
- package/dist/types/ui/ColorPalette/Color/index.d.ts +1 -19
- package/dist/types/ui/ColorPalette/Palettes/cellBackgroundColorPalette.d.ts +1 -2
- package/dist/types/ui/ColorPalette/Palettes/common.d.ts +1 -1
- package/dist/types/ui/ColorPalette/Palettes/paletteMessages.d.ts +2 -113
- package/dist/types/ui/ColorPalette/Palettes/panelBackgroundPalette.d.ts +1 -3
- package/dist/types/ui/ColorPalette/Palettes/statusColorPalette.d.ts +1 -3
- package/dist/types/ui/ColorPalette/Palettes/textColorPalette.d.ts +1 -3
- package/dist/types/ui/ColorPalette/Palettes/type.d.ts +1 -8
- package/dist/types/ui/ColorPalette/index.d.ts +2 -23
- package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/Dropdown/index.d.ts +2 -33
- package/dist/types/ui/DropdownMenu/index.d.ts +2 -18
- package/dist/types/ui/DropdownMenu/types.d.ts +1 -43
- package/dist/types/ui/Toolbar/types.d.ts +2 -30
- package/dist/types/ui/ToolbarButton/index.d.ts +3 -52
- package/dist/types/ui/styles.d.ts +3 -3
- package/dist/types/ui/with-outer-listeners.d.ts +2 -10
- package/dist/types/utils/document-logger.d.ts +2 -7
- package/dist/types/utils/dom.d.ts +2 -26
- package/dist/types/utils/index.d.ts +3 -6
- package/dist/types/utils/node-width.d.ts +1 -7
- package/dist/types/utils/nodes.d.ts +1 -35
- package/dist/types/utils/performance/plugin-performance-report.d.ts +2 -25
- package/dist/types/utils/plugin-state-factory.d.ts +2 -16
- package/dist/types/utils/selection.d.ts +3 -6
- package/dist/types/utils/slice.d.ts +2 -11
- package/dist/types/utils/step.d.ts +1 -15
- package/package.json +5 -6
- package/dist/cjs/plugins/analytics/types/config-panel-events.js +0 -5
- package/dist/cjs/plugins/analytics/types/cut-copy-events.js +0 -5
- package/dist/cjs/plugins/analytics/types/date-events.js +0 -5
- package/dist/cjs/plugins/analytics/types/element-browser-events.js +0 -5
- package/dist/cjs/plugins/analytics/types/find-replace-events.js +0 -5
- package/dist/cjs/plugins/analytics/types/format-events.js +0 -24
- package/dist/cjs/plugins/analytics/types/insert-events.js +0 -51
- package/dist/cjs/plugins/analytics/types/list-events.js +0 -25
- package/dist/cjs/plugins/analytics/types/paste-events.js +0 -55
- package/dist/cjs/plugins/analytics/types/substitute-events.js +0 -24
- package/dist/cjs/plugins/analytics/types/table-events.js +0 -43
- package/dist/cjs/plugins/analytics/types/utils.js +0 -27
- package/dist/cjs/ui/ColorPalette/Color/styles.js +0 -21
- package/dist/cjs/ui/ColorPalette/Palettes/getColorMessage.js +0 -17
- package/dist/cjs/ui/ColorPalette/styles.js +0 -19
- package/dist/cjs/ui/DropList/index.js +0 -215
- package/dist/cjs/ui/Layer/index.js +0 -245
- package/dist/cjs/ui/Layer/internal/helpers.js +0 -70
- package/dist/cjs/ui/ToolbarButton/styles.js +0 -26
- package/dist/es2019/plugins/analytics/types/cut-copy-events.js +0 -1
- package/dist/es2019/plugins/analytics/types/date-events.js +0 -1
- package/dist/es2019/plugins/analytics/types/element-browser-events.js +0 -1
- package/dist/es2019/plugins/analytics/types/find-replace-events.js +0 -1
- package/dist/es2019/plugins/analytics/types/format-events.js +0 -16
- package/dist/es2019/plugins/analytics/types/insert-events.js +0 -41
- package/dist/es2019/plugins/analytics/types/list-events.js +0 -17
- package/dist/es2019/plugins/analytics/types/paste-events.js +0 -46
- package/dist/es2019/plugins/analytics/types/substitute-events.js +0 -16
- package/dist/es2019/plugins/analytics/types/table-events.js +0 -34
- package/dist/es2019/plugins/analytics/types/utils.js +0 -19
- package/dist/es2019/ui/ColorPalette/Color/styles.js +0 -24
- package/dist/es2019/ui/ColorPalette/Palettes/getColorMessage.js +0 -14
- package/dist/es2019/ui/ColorPalette/styles.js +0 -7
- package/dist/es2019/ui/DropList/index.js +0 -186
- package/dist/es2019/ui/Layer/index.js +0 -195
- package/dist/es2019/ui/Layer/internal/helpers.js +0 -62
- package/dist/es2019/ui/ToolbarButton/styles.js +0 -12
- package/dist/esm/plugins/analytics/types/avatar.js +0 -1
- package/dist/esm/plugins/analytics/types/config-panel-events.js +0 -1
- package/dist/esm/plugins/analytics/types/cut-copy-events.js +0 -1
- package/dist/esm/plugins/analytics/types/date-events.js +0 -1
- package/dist/esm/plugins/analytics/types/element-browser-events.js +0 -1
- package/dist/esm/plugins/analytics/types/find-replace-events.js +0 -1
- package/dist/esm/plugins/analytics/types/format-events.js +0 -16
- package/dist/esm/plugins/analytics/types/insert-events.js +0 -41
- package/dist/esm/plugins/analytics/types/list-events.js +0 -17
- package/dist/esm/plugins/analytics/types/paste-events.js +0 -46
- package/dist/esm/plugins/analytics/types/substitute-events.js +0 -16
- package/dist/esm/plugins/analytics/types/table-events.js +0 -34
- package/dist/esm/plugins/analytics/types/utils.js +0 -19
- package/dist/esm/ui/ColorPalette/Color/styles.js +0 -8
- package/dist/esm/ui/ColorPalette/Palettes/getColorMessage.js +0 -10
- package/dist/esm/ui/ColorPalette/styles.js +0 -7
- package/dist/esm/ui/DropList/index.js +0 -203
- package/dist/esm/ui/Layer/index.js +0 -228
- package/dist/esm/ui/Layer/internal/helpers.js +0 -62
- package/dist/esm/ui/ToolbarButton/styles.js +0 -12
- package/dist/types/plugins/analytics/types/avatar.d.ts +0 -5
- package/dist/types/plugins/analytics/types/config-panel-events.d.ts +0 -17
- package/dist/types/plugins/analytics/types/cut-copy-events.d.ts +0 -12
- package/dist/types/plugins/analytics/types/date-events.d.ts +0 -17
- package/dist/types/plugins/analytics/types/element-browser-events.d.ts +0 -11
- package/dist/types/plugins/analytics/types/find-replace-events.d.ts +0 -23
- package/dist/types/plugins/analytics/types/format-events.d.ts +0 -49
- package/dist/types/plugins/analytics/types/insert-events.d.ts +0 -128
- package/dist/types/plugins/analytics/types/list-events.d.ts +0 -52
- package/dist/types/plugins/analytics/types/paste-events.d.ts +0 -39
- package/dist/types/plugins/analytics/types/substitute-events.d.ts +0 -26
- package/dist/types/plugins/analytics/types/table-events.d.ts +0 -94
- package/dist/types/plugins/analytics/types/utils.d.ts +0 -45
- package/dist/types/ui/ColorPalette/Color/styles.d.ts +0 -2
- package/dist/types/ui/ColorPalette/Palettes/getColorMessage.d.ts +0 -2
- package/dist/types/ui/ColorPalette/styles.d.ts +0 -1
- package/dist/types/ui/DropList/index.d.ts +0 -22
- package/dist/types/ui/Layer/index.d.ts +0 -47
- package/dist/types/ui/Layer/internal/helpers.d.ts +0 -5
- package/dist/types/ui/ToolbarButton/styles.d.ts +0 -4
|
@@ -1,153 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { EditorState } from 'prosemirror-state';
|
|
3
|
-
import { EditorView } from 'prosemirror-view';
|
|
4
|
-
import { NodeType, Node } from 'prosemirror-model';
|
|
5
|
-
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
-
import { Position } from '@atlaskit/editor-common/src/ui/Popup/utils';
|
|
7
|
-
import { Command } from '../../types/command';
|
|
8
|
-
import { ButtonAppearance } from './ui/Button';
|
|
9
|
-
import { SelectOption } from './ui/Select';
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { DropdownOptions, RenderOptionsPropsT } from './ui/types';
|
|
12
|
-
import { DispatchAnalyticsEvent } from '../analytics/types/dispatch-analytics-event';
|
|
13
|
-
import { PaletteColor } from '../../ui/ColorPalette/Palettes/type';
|
|
14
|
-
import { EmojiId } from '@atlaskit/emoji/types';
|
|
15
|
-
export declare type Icon = React.ComponentType<{
|
|
16
|
-
label: string;
|
|
17
|
-
}>;
|
|
18
|
-
export declare type RenderOptionsProps = RenderOptionsPropsT<Command>;
|
|
19
|
-
export declare type AlignType = 'left' | 'center' | 'right';
|
|
20
|
-
export interface ConfirmDialogOptions {
|
|
21
|
-
title?: string;
|
|
22
|
-
message: string;
|
|
23
|
-
okButtonLabel?: string;
|
|
24
|
-
cancelButtonLabel?: string;
|
|
25
|
-
}
|
|
26
|
-
export declare type FloatingToolbarButton<T> = {
|
|
27
|
-
id?: string;
|
|
28
|
-
type: 'button';
|
|
29
|
-
title: string;
|
|
30
|
-
onClick: T;
|
|
31
|
-
showTitle?: boolean;
|
|
32
|
-
onMouseEnter?: T;
|
|
33
|
-
onMouseLeave?: T;
|
|
34
|
-
onFocus?: T;
|
|
35
|
-
onBlur?: T;
|
|
36
|
-
icon?: Icon;
|
|
37
|
-
selected?: boolean;
|
|
38
|
-
disabled?: boolean;
|
|
39
|
-
hidden?: boolean;
|
|
40
|
-
appearance?: ButtonAppearance;
|
|
41
|
-
href?: string;
|
|
42
|
-
target?: string;
|
|
43
|
-
className?: string;
|
|
44
|
-
tooltipContent?: React.ReactNode;
|
|
45
|
-
testId?: string;
|
|
46
|
-
hideTooltipOnClick?: boolean;
|
|
47
|
-
confirmDialog?: ConfirmDialogOptions;
|
|
48
|
-
metadata?: {
|
|
49
|
-
[key: string]: string;
|
|
50
|
-
};
|
|
51
|
-
ariaHasPopup?: boolean | 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | undefined;
|
|
52
|
-
tabIndex?: number | null | undefined;
|
|
53
|
-
};
|
|
54
|
-
export declare type FloatingToolbarInput<T> = {
|
|
55
|
-
id: string;
|
|
56
|
-
type: 'input';
|
|
57
|
-
title?: string;
|
|
58
|
-
description?: string;
|
|
59
|
-
onSubmit: (...args: any[]) => T;
|
|
60
|
-
onBlur: (...args: any[]) => T;
|
|
61
|
-
defaultValue?: string;
|
|
62
|
-
placeholder?: string;
|
|
63
|
-
hidden?: boolean;
|
|
64
|
-
};
|
|
65
|
-
export declare type FloatingToolbarCustom<T> = {
|
|
66
|
-
type: 'custom';
|
|
67
|
-
fallback: Array<FloatingToolbarFallbackItem<T>>;
|
|
68
|
-
render: (view?: EditorView, idx?: number, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => React.ComponentClass | React.SFC | React.ReactElement<any> | null;
|
|
69
|
-
hidden?: boolean;
|
|
70
|
-
};
|
|
71
|
-
declare type FloatingToolbarSelectBase<T, V = SelectOption> = {
|
|
72
|
-
id: string;
|
|
73
|
-
type: 'select';
|
|
74
|
-
selectType: 'list' | 'emoji' | 'date' | 'color';
|
|
75
|
-
title?: string;
|
|
76
|
-
options: V[];
|
|
77
|
-
hidden?: boolean;
|
|
78
|
-
hideExpandIcon?: boolean;
|
|
79
|
-
defaultValue?: V | null;
|
|
80
|
-
placeholder?: string;
|
|
81
|
-
onChange: (selected: V) => T;
|
|
82
|
-
filterOption?: ((option: V, rawInput: string) => boolean) | null;
|
|
83
|
-
};
|
|
84
|
-
export declare type FloatingToolbarListPicker<T> = FloatingToolbarSelectBase<T> & {
|
|
85
|
-
selectType: 'list';
|
|
86
|
-
};
|
|
87
|
-
export declare type FloatingToolbarColorPicker<T> = FloatingToolbarSelectBase<T, PaletteColor> & {
|
|
88
|
-
selectType: 'color';
|
|
89
|
-
};
|
|
90
|
-
export declare type FloatingToolbarEmojiPicker<T> = FloatingToolbarSelectBase<T, EmojiId> & {
|
|
91
|
-
selectType: 'emoji';
|
|
92
|
-
selected?: boolean;
|
|
93
|
-
options: never[];
|
|
94
|
-
};
|
|
95
|
-
export declare type FloatingToolbarDatePicker<T> = FloatingToolbarSelectBase<T, number> & {
|
|
96
|
-
selectType: 'date';
|
|
97
|
-
options: never[];
|
|
98
|
-
};
|
|
99
|
-
export declare type FloatingToolbarSelect<T> = FloatingToolbarEmojiPicker<T> | FloatingToolbarColorPicker<T> | FloatingToolbarListPicker<T> | FloatingToolbarDatePicker<T>;
|
|
100
|
-
export declare type FloatingToolbarSeparator = {
|
|
101
|
-
type: 'separator';
|
|
102
|
-
hidden?: boolean;
|
|
103
|
-
};
|
|
104
|
-
export declare type FloatingToolbarDropdown<T> = {
|
|
105
|
-
id?: string;
|
|
106
|
-
type: 'dropdown';
|
|
107
|
-
title: string;
|
|
108
|
-
icon?: Icon;
|
|
109
|
-
options: DropdownOptions<T>;
|
|
110
|
-
hidden?: boolean;
|
|
111
|
-
hideExpandIcon?: boolean;
|
|
112
|
-
disabled?: boolean;
|
|
113
|
-
tooltip?: string;
|
|
114
|
-
};
|
|
115
|
-
declare type FloatingToolbarExtensionsPlaceholder = {
|
|
116
|
-
type: 'extensions-placeholder';
|
|
117
|
-
hidden?: boolean;
|
|
118
|
-
separator?: 'start' | 'end' | 'both';
|
|
119
|
-
};
|
|
120
|
-
/**
|
|
121
|
-
* This additional type is introduced in order to prevent infinite loop due to
|
|
122
|
-
* `extract-react-types-loader`. The issue occurs when custom type `fallback` field
|
|
123
|
-
* is an array of FloatingToolbarItem. Since FloatingToolbarItem is a FloatingToolbarCustom
|
|
124
|
-
* type, it stucks in an infinite loop. Custom - Item -> Custom .... go on.
|
|
125
|
-
*
|
|
126
|
-
* This type is restricted with the items that can be used for fallback.
|
|
127
|
-
* Make sure that this type is not a FloatingToolbarCustom type.
|
|
128
|
-
*/
|
|
129
|
-
export declare type FloatingToolbarFallbackItem<T> = FloatingToolbarButton<T> | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarSeparator;
|
|
130
|
-
export declare type FloatingToolbarItem<T> = FloatingToolbarButton<T> | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarCustom<T> | FloatingToolbarSeparator | FloatingToolbarExtensionsPlaceholder;
|
|
131
|
-
export interface FloatingToolbarConfig {
|
|
132
|
-
title: string;
|
|
133
|
-
/**
|
|
134
|
-
* Override the DOM reference used to apply as the target for the
|
|
135
|
-
* floating toolbar, if the config matches.
|
|
136
|
-
*
|
|
137
|
-
* By default, it will find the DOM reference of the node from the
|
|
138
|
-
* head of the current selection.
|
|
139
|
-
*/
|
|
140
|
-
getDomRef?: (view: EditorView) => HTMLElement | undefined;
|
|
141
|
-
visible?: boolean;
|
|
142
|
-
nodeType: NodeType | NodeType[];
|
|
143
|
-
items: Array<FloatingToolbarItem<Command>> | ((node: Node) => Array<FloatingToolbarItem<Command>>);
|
|
144
|
-
align?: AlignType;
|
|
145
|
-
className?: string;
|
|
146
|
-
height?: number;
|
|
147
|
-
width?: number;
|
|
148
|
-
offset?: [number, number];
|
|
149
|
-
forcePlacement?: boolean;
|
|
150
|
-
onPositionCalculated?: (editorView: EditorView, nextPos: Position) => Position;
|
|
151
|
-
}
|
|
152
|
-
export declare type FloatingToolbarHandler = (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory) => FloatingToolbarConfig | undefined;
|
|
153
|
-
export {};
|
|
1
|
+
export type { Icon, RenderOptionsProps, AlignType, ConfirmDialogOptions, FloatingToolbarButton, FloatingToolbarInput, FloatingToolbarCustom, FloatingToolbarListPicker, FloatingToolbarColorPicker, FloatingToolbarEmojiPicker, FloatingToolbarDatePicker, FloatingToolbarSelect, FloatingToolbarSeparator, FloatingToolbarDropdown, FloatingToolbarFallbackItem, FloatingToolbarItem, FloatingToolbarConfig, FloatingToolbarHandler, } from '@atlaskit/editor-common/types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import type { ButtonAppearance } from '@atlaskit/editor-common/types';
|
|
3
|
+
export type { ButtonAppearance };
|
|
3
4
|
export interface Props {
|
|
4
5
|
title?: string;
|
|
5
6
|
icon?: React.ReactElement<any>;
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ValueType } from '@atlaskit/select';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
dispatchCommand: (command: T) => void;
|
|
6
|
-
}
|
|
7
|
-
export interface SelectOption<T = unknown> {
|
|
8
|
-
value: string;
|
|
9
|
-
label: string;
|
|
10
|
-
selected?: boolean;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
hidden?: boolean;
|
|
13
|
-
data?: T;
|
|
14
|
-
}
|
|
3
|
+
import type { RenderOptionsPropsT, SelectOption } from '@atlaskit/editor-common/types';
|
|
4
|
+
export type { RenderOptionsPropsT, SelectOption };
|
|
15
5
|
export interface Props {
|
|
16
6
|
hideExpandIcon?: boolean;
|
|
17
7
|
options: SelectOption[];
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export interface RenderOptionsPropsT<T> {
|
|
3
|
-
hide: () => void;
|
|
4
|
-
dispatchCommand: (command: T) => void;
|
|
5
|
-
}
|
|
6
|
-
export interface DropdownOptionT<T> {
|
|
7
|
-
id?: string;
|
|
8
|
-
title: string;
|
|
9
|
-
onClick: T;
|
|
10
|
-
selected?: boolean;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
hidden?: boolean;
|
|
13
|
-
testId?: string;
|
|
14
|
-
tooltip?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare type DropdownOptions<T> = Array<DropdownOptionT<T>> | {
|
|
17
|
-
render: (props: RenderOptionsPropsT<T>) => React.ReactElement<any> | null;
|
|
18
|
-
height: number;
|
|
19
|
-
width: number;
|
|
20
|
-
};
|
|
1
|
+
export type { RenderOptionsPropsT, DropdownOptionT, DropdownOptions, } from '@atlaskit/editor-common/types';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EditorPlugin } from '../../types';
|
|
2
|
+
import type { InsertNodeAPI } from '../../insert-api/types';
|
|
2
3
|
export interface InsertBlockOptions {
|
|
3
4
|
allowTables?: boolean;
|
|
4
5
|
allowExpand?: boolean;
|
|
@@ -7,6 +8,7 @@ export interface InsertBlockOptions {
|
|
|
7
8
|
nativeStatusSupported?: boolean;
|
|
8
9
|
replacePlusMenuWithElementBrowser?: boolean;
|
|
9
10
|
showElementBrowserLink?: boolean;
|
|
11
|
+
insertNodeAPI?: InsertNodeAPI;
|
|
10
12
|
}
|
|
11
13
|
declare const insertBlockPlugin: (options?: InsertBlockOptions) => EditorPlugin;
|
|
12
14
|
export default insertBlockPlugin;
|
|
@@ -1,167 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
action: {
|
|
3
|
-
id: string;
|
|
4
|
-
defaultMessage: string;
|
|
5
|
-
description: string;
|
|
6
|
-
};
|
|
7
|
-
actionDescription: {
|
|
8
|
-
id: string;
|
|
9
|
-
defaultMessage: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
link: {
|
|
13
|
-
id: string;
|
|
14
|
-
defaultMessage: string;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
linkDescription: {
|
|
18
|
-
id: string;
|
|
19
|
-
defaultMessage: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
filesAndImages: {
|
|
23
|
-
id: string;
|
|
24
|
-
defaultMessage: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
|
27
|
-
filesAndImagesDescription: {
|
|
28
|
-
id: string;
|
|
29
|
-
defaultMessage: string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
32
|
-
image: {
|
|
33
|
-
id: string;
|
|
34
|
-
defaultMessage: string;
|
|
35
|
-
description: string;
|
|
36
|
-
};
|
|
37
|
-
mention: {
|
|
38
|
-
id: string;
|
|
39
|
-
defaultMessage: string;
|
|
40
|
-
description: string;
|
|
41
|
-
};
|
|
42
|
-
mentionDescription: {
|
|
43
|
-
id: string;
|
|
44
|
-
defaultMessage: string;
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
|
-
emoji: {
|
|
48
|
-
id: string;
|
|
49
|
-
defaultMessage: string;
|
|
50
|
-
description: string;
|
|
51
|
-
};
|
|
52
|
-
emojiDescription: {
|
|
53
|
-
id: string;
|
|
54
|
-
defaultMessage: string;
|
|
55
|
-
description: string;
|
|
56
|
-
};
|
|
57
|
-
table: {
|
|
58
|
-
id: string;
|
|
59
|
-
defaultMessage: string;
|
|
60
|
-
description: string;
|
|
61
|
-
};
|
|
62
|
-
tableDescription: {
|
|
63
|
-
id: string;
|
|
64
|
-
defaultMessage: string;
|
|
65
|
-
description: string;
|
|
66
|
-
};
|
|
67
|
-
expand: {
|
|
68
|
-
id: string;
|
|
69
|
-
defaultMessage: string;
|
|
70
|
-
description: string;
|
|
71
|
-
};
|
|
72
|
-
expandDescription: {
|
|
73
|
-
id: string;
|
|
74
|
-
defaultMessage: string;
|
|
75
|
-
description: string;
|
|
76
|
-
};
|
|
77
|
-
decision: {
|
|
78
|
-
id: string;
|
|
79
|
-
defaultMessage: string;
|
|
80
|
-
description: string;
|
|
81
|
-
};
|
|
82
|
-
decisionDescription: {
|
|
83
|
-
id: string;
|
|
84
|
-
defaultMessage: string;
|
|
85
|
-
description: string;
|
|
86
|
-
};
|
|
87
|
-
feedbackDialog: {
|
|
88
|
-
id: string;
|
|
89
|
-
defaultMessage: string;
|
|
90
|
-
description: string;
|
|
91
|
-
};
|
|
92
|
-
feedbackDialogDescription: {
|
|
93
|
-
id: string;
|
|
94
|
-
defaultMessage: string;
|
|
95
|
-
description: string;
|
|
96
|
-
};
|
|
97
|
-
horizontalRule: {
|
|
98
|
-
id: string;
|
|
99
|
-
defaultMessage: string;
|
|
100
|
-
description: string;
|
|
101
|
-
};
|
|
102
|
-
horizontalRuleDescription: {
|
|
103
|
-
id: string;
|
|
104
|
-
defaultMessage: string;
|
|
105
|
-
description: string;
|
|
106
|
-
};
|
|
107
|
-
date: {
|
|
108
|
-
id: string;
|
|
109
|
-
defaultMessage: string;
|
|
110
|
-
description: string;
|
|
111
|
-
};
|
|
112
|
-
dateDescription: {
|
|
113
|
-
id: string;
|
|
114
|
-
defaultMessage: string;
|
|
115
|
-
description: string;
|
|
116
|
-
};
|
|
117
|
-
placeholderText: {
|
|
118
|
-
id: string;
|
|
119
|
-
defaultMessage: string;
|
|
120
|
-
description: string;
|
|
121
|
-
};
|
|
122
|
-
placeholderTextDescription: {
|
|
123
|
-
id: string;
|
|
124
|
-
defaultMessage: string;
|
|
125
|
-
description: string;
|
|
126
|
-
};
|
|
127
|
-
columns: {
|
|
128
|
-
id: string;
|
|
129
|
-
defaultMessage: string;
|
|
130
|
-
description: string;
|
|
131
|
-
};
|
|
132
|
-
columnsDescription: {
|
|
133
|
-
id: string;
|
|
134
|
-
defaultMessage: string;
|
|
135
|
-
description: string;
|
|
136
|
-
};
|
|
137
|
-
status: {
|
|
138
|
-
id: string;
|
|
139
|
-
defaultMessage: string;
|
|
140
|
-
description: string;
|
|
141
|
-
};
|
|
142
|
-
statusDescription: {
|
|
143
|
-
id: string;
|
|
144
|
-
defaultMessage: string;
|
|
145
|
-
description: string;
|
|
146
|
-
};
|
|
147
|
-
viewMore: {
|
|
148
|
-
id: string;
|
|
149
|
-
defaultMessage: string;
|
|
150
|
-
description: string;
|
|
151
|
-
};
|
|
152
|
-
insertMenu: {
|
|
153
|
-
id: string;
|
|
154
|
-
defaultMessage: string;
|
|
155
|
-
description: string;
|
|
156
|
-
};
|
|
157
|
-
help: {
|
|
158
|
-
id: string;
|
|
159
|
-
defaultMessage: string;
|
|
160
|
-
description: string;
|
|
161
|
-
};
|
|
162
|
-
helpDescription: {
|
|
163
|
-
id: string;
|
|
164
|
-
defaultMessage: string;
|
|
165
|
-
description: string;
|
|
166
|
-
};
|
|
167
|
-
};
|
|
1
|
+
export { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { INPUT_METHOD } from '../../../analytics/types';
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
|
-
import EditorActions from '
|
|
3
|
+
import { EditorActionsOptions as EditorActions } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { Command } from '../../../../types/command';
|
|
5
5
|
import { EmojiProvider } from '@atlaskit/emoji';
|
|
6
6
|
import { BlockType } from '../../../block-type/types';
|
|
@@ -9,6 +9,7 @@ import { MenuItem } from '../../../../ui/DropdownMenu/types';
|
|
|
9
9
|
import { Node as PMNode } from 'prosemirror-model';
|
|
10
10
|
import { DispatchAnalyticsEvent } from '../../../analytics';
|
|
11
11
|
import { BlockMenuItem } from './create-items';
|
|
12
|
+
import type { InsertNodeAPI } from '../../../../insert-api/types';
|
|
12
13
|
export interface Props {
|
|
13
14
|
buttons: number;
|
|
14
15
|
isReducedSpacing: boolean;
|
|
@@ -48,6 +49,7 @@ export interface Props {
|
|
|
48
49
|
onInsertBlockType?: (name: string) => Command;
|
|
49
50
|
onInsertMacroFromMacroBrowser?: (macroProvider: MacroProvider, node?: PMNode, isEditing?: boolean) => (view: EditorView) => void;
|
|
50
51
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
52
|
+
insertNodeAPI?: InsertNodeAPI | undefined | null;
|
|
51
53
|
}
|
|
52
54
|
export interface State {
|
|
53
55
|
isPlusMenuOpen: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import { LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING } from '@atlaskit/editor-common/styles';
|
|
2
|
+
export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
3
3
|
export declare const layoutStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function unwrapContentFromLayout(maybeLayoutSection: Node): Node | Node[];
|
|
3
|
-
export declare function removeLayoutFromFirstChild(node: Node, i: number): Node<any> | Node<any>[];
|
|
4
|
-
export declare function removeLayoutFromLastChild(node: Node, i: number, fragment: Fragment): Node<any> | Node<any>[];
|
|
5
|
-
/**
|
|
6
|
-
* When we have a slice that cuts across a layoutSection/layoutColumn
|
|
7
|
-
* we can end up with unexpected behaviour on paste/drop where a user
|
|
8
|
-
* is able to add columns to a layoutSection. By 'lifting' any content
|
|
9
|
-
* inside an 'open' layoutSection/layoutColumn to the top level, we
|
|
10
|
-
* can ensure prevent this.
|
|
11
|
-
*
|
|
12
|
-
* We only care about slices with non-zero openStart / openEnd's here
|
|
13
|
-
* as we're totally fine for people to copy/paste a full layoutSection
|
|
14
|
-
*/
|
|
15
|
-
export declare function transformSliceToRemoveOpenLayoutNodes(slice: Slice, schema: Schema): Slice<any>;
|
|
1
|
+
export { unwrapContentFromLayout, removeLayoutFromFirstChild, removeLayoutFromLastChild, transformSliceToRemoveOpenLayoutNodes, } from '@atlaskit/editor-common/transforms';
|
|
@@ -3,8 +3,8 @@ import { CommandDispatch } from '../../../types/command';
|
|
|
3
3
|
import { EditorState } from 'prosemirror-state';
|
|
4
4
|
import { INPUT_METHOD } from '../../analytics';
|
|
5
5
|
import { Command } from '../../../types';
|
|
6
|
-
export declare const showLinkingToolbar: Command;
|
|
6
|
+
export declare const showLinkingToolbar: import("@atlaskit/editor-common/types").Command;
|
|
7
7
|
export declare const showLinkingToolbarWithMediaTypeCheck: Command;
|
|
8
8
|
export declare const hideLinkingToolbar: (state: EditorState, dispatch?: CommandDispatch | undefined, view?: EditorView<any> | undefined) => void;
|
|
9
|
-
export declare const unlink: Command;
|
|
10
|
-
export declare const setUrlToMedia: (url: string, inputMethod: INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.MANUAL) => Command;
|
|
9
|
+
export declare const unlink: import("@atlaskit/editor-common/types").Command;
|
|
10
|
+
export declare const setUrlToMedia: (url: string, inputMethod: INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.MANUAL) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -17,7 +17,7 @@ declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
|
|
|
17
17
|
getAttrs(): MediaADFAttrs;
|
|
18
18
|
isMediaBlobUrl(): boolean;
|
|
19
19
|
renderMediaNodeWithState: (mediaProvider?: Promise<MediaProvider> | undefined, contextIdentifierProvider?: Promise<ContextIdentifierProvider> | undefined) => ({ width: editorWidth }: {
|
|
20
|
-
width?:
|
|
20
|
+
width?: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
|
|
21
21
|
}) => JSX.Element;
|
|
22
22
|
renderMediaNodeWithProviders: ({ mediaProvider, contextIdentifierProvider, }: Providers) => JSX.Element;
|
|
23
23
|
render(): JSX.Element;
|
|
@@ -47,7 +47,7 @@ declare class MediaSingleNodeView extends ReactNodeView<MediaSingleNodeViewProps
|
|
|
47
47
|
dom: HTMLDivElement;
|
|
48
48
|
};
|
|
49
49
|
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
50
|
-
checkAndUpdateSelectionType: () => import("
|
|
50
|
+
checkAndUpdateSelectionType: () => import("@atlaskit/editor-common/utils").SelectedState | null;
|
|
51
51
|
isNodeSelected: () => boolean;
|
|
52
52
|
getNodeMediaId(node: PMNode): string | undefined;
|
|
53
53
|
update(node: PMNode, decorations: Decoration[], _innerDecorations?: Decoration[], isValidUpdate?: (currentNode: PMNode, newNode: PMNode) => boolean): boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const closeMediaAltTextMenu: import("
|
|
1
|
+
export declare const closeMediaAltTextMenu: import("@atlaskit/editor-common/types").Command;
|
|
2
2
|
export declare const openMediaAltTextMenu: import("../../../..").Command;
|
|
3
|
-
export declare const updateAltText: (newAltText: string) => import("
|
|
3
|
+
export declare const updateAltText: (newAltText: string) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -2,6 +2,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
2
2
|
import { PluginKey } from 'prosemirror-state';
|
|
3
3
|
import { PMPluginFactoryParams } from '../../../../types';
|
|
4
4
|
export declare const pluginKey: PluginKey<any, any>;
|
|
5
|
-
declare const createCommand: <A = import("./actions").MediaAltTextAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState<any>>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction<any>, state: import("prosemirror-state").EditorState<any>) => import("prosemirror-state").Transaction<any>) | undefined) => import("
|
|
5
|
+
declare const createCommand: <A = import("./actions").MediaAltTextAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState<any>>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction<any>, state: import("prosemirror-state").EditorState<any>) => import("prosemirror-state").Transaction<any>) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState<any>) => import("./types").MediaAltTextState;
|
|
6
6
|
export declare const createPlugin: ({ dispatch, providerFactory, }: PMPluginFactoryParams) => SafePlugin<import("./types").MediaAltTextState, import("prosemirror-model").Schema<any, any>>;
|
|
7
7
|
export { createCommand, getPluginState };
|
|
@@ -4,7 +4,7 @@ import { Dispatch } from '../../../../event-dispatcher';
|
|
|
4
4
|
import { MediaLinkingActions } from './actions';
|
|
5
5
|
import { MediaLinkingState } from './types';
|
|
6
6
|
export declare const mediaLinkingPluginKey: PluginKey<MediaLinkingState, any>;
|
|
7
|
-
export declare const createMediaLinkingCommand: <A = MediaLinkingActions>(action: A | ((state: Readonly<import("prosemirror-state").EditorState<any>>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction<any>, state: import("prosemirror-state").EditorState<any>) => import("prosemirror-state").Transaction<any>) | undefined) => import("
|
|
7
|
+
export declare const createMediaLinkingCommand: <A = MediaLinkingActions>(action: A | ((state: Readonly<import("prosemirror-state").EditorState<any>>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction<any>, state: import("prosemirror-state").EditorState<any>) => import("prosemirror-state").Transaction<any>) | undefined) => import("@atlaskit/editor-common/types").Command, getMediaLinkingState: (state: import("prosemirror-state").EditorState<any>) => MediaLinkingState;
|
|
8
8
|
export type { MediaLinkingState } from './types';
|
|
9
9
|
declare const _default: (dispatch: Dispatch) => SafePlugin<MediaLinkingState, import("prosemirror-model").Schema<any, any>>;
|
|
10
10
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const setKeyboardHeight: (keyboardHeight: number) => import("
|
|
2
|
-
export declare const setWindowHeight: (windowHeight: number) => import("
|
|
3
|
-
export declare const setMobilePaddingTop: (paddingTop: number) => import("
|
|
4
|
-
export declare const setIsExpanded: (isExpanded: boolean) => import("
|
|
1
|
+
export declare const setKeyboardHeight: (keyboardHeight: number) => import("@atlaskit/editor-common/types").Command;
|
|
2
|
+
export declare const setWindowHeight: (windowHeight: number) => import("@atlaskit/editor-common/types").Command;
|
|
3
|
+
export declare const setMobilePaddingTop: (paddingTop: number) => import("@atlaskit/editor-common/types").Command;
|
|
4
|
+
export declare const setIsExpanded: (isExpanded: boolean) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -2,4 +2,4 @@ import { PluginKey } from 'prosemirror-state';
|
|
|
2
2
|
import { MobileDimensionsPluginState } from './types';
|
|
3
3
|
import { MobileDimensionsAction } from './actions';
|
|
4
4
|
export declare const mobileDimensionsPluginKey: PluginKey<any, any>;
|
|
5
|
-
export declare const createPluginState: (dispatch: import("
|
|
5
|
+
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: MobileDimensionsPluginState | ((state: import("prosemirror-state").EditorState<any>) => MobileDimensionsPluginState)) => import("prosemirror-state").SafeStateField<MobileDimensionsPluginState, import("prosemirror-model").Schema<any, any>>, getPluginState: (state: import("prosemirror-state").EditorState<any>) => MobileDimensionsPluginState, createCommand: <A = MobileDimensionsAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState<any>>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction<any>, state: import("prosemirror-state").EditorState<any>) => import("prosemirror-state").Transaction<any>) | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Slice, Mark, Node as PMNode, NodeType, Schema } from 'prosemirror-model';
|
|
2
|
-
import { Selection } from 'prosemirror-state';
|
|
2
|
+
import { EditorState, Selection, Transaction } from 'prosemirror-state';
|
|
3
3
|
import { PasteSource } from '../../analytics';
|
|
4
4
|
export declare function isPastedFromWord(html?: string): boolean;
|
|
5
5
|
export declare function isPastedFromExcel(html?: string): boolean;
|
|
@@ -21,3 +21,4 @@ export declare function isPanelNode(node: PMNode | null | undefined): boolean;
|
|
|
21
21
|
export declare function isSelectionInsidePanel(selection: Selection): PMNode | null;
|
|
22
22
|
export declare const htmlHasInvalidLinkTags: (html?: string | undefined) => boolean;
|
|
23
23
|
export declare const removeDuplicateInvalidLinks: (html: string) => string;
|
|
24
|
+
export declare const addReplaceSelectedTableAnalytics: (state: EditorState, tr: Transaction) => Transaction;
|
|
@@ -2,7 +2,7 @@ import { Selection } from 'prosemirror-state';
|
|
|
2
2
|
import { Node as PmNode } from 'prosemirror-model';
|
|
3
3
|
import { Command } from '../../types';
|
|
4
4
|
import { RelativeSelectionPos } from './types';
|
|
5
|
-
export declare const setSelectionRelativeToNode: (selectionRelativeToNode?: RelativeSelectionPos | undefined, selection?: Selection<any> | null | undefined) => Command;
|
|
5
|
+
export declare const setSelectionRelativeToNode: (selectionRelativeToNode?: RelativeSelectionPos | undefined, selection?: Selection<any> | null | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
6
6
|
export declare const arrowRight: Command;
|
|
7
7
|
export declare const arrowLeft: Command;
|
|
8
8
|
export declare const setSelectionInsideAtNodeEnd: (selectionRelativeToNode: RelativeSelectionPos, node: PmNode, from: number, to: number) => Command;
|
|
@@ -1,40 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Mapping } from 'prosemirror-transform';
|
|
3
|
-
import { Slice, ResolvedPos, Node as PMNode } from 'prosemirror-model';
|
|
4
|
-
export declare enum Side {
|
|
5
|
-
LEFT = "left",
|
|
6
|
-
RIGHT = "right"
|
|
7
|
-
}
|
|
8
|
-
export declare const JSON_ID = "gapcursor";
|
|
9
|
-
export declare class GapCursorSelection extends Selection {
|
|
10
|
-
readonly side: Side;
|
|
11
|
-
readonly visible: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Construct a GapCursorSelection
|
|
14
|
-
* @param {ResolvedPos} $pos resolved position
|
|
15
|
-
* @param {Side} side side where the gap cursor is drawn
|
|
16
|
-
*/
|
|
17
|
-
constructor($pos: ResolvedPos, side?: Side);
|
|
18
|
-
static valid($pos: ResolvedPos): boolean;
|
|
19
|
-
static findFrom($pos: ResolvedPos, dir: number, mustMove?: boolean): GapCursorSelection | null;
|
|
20
|
-
static fromJSON(doc: PMNode, json: {
|
|
21
|
-
pos: number;
|
|
22
|
-
type: string;
|
|
23
|
-
side: Side;
|
|
24
|
-
}): GapCursorSelection;
|
|
25
|
-
map(doc: PMNode, mapping: Mapping): Selection;
|
|
26
|
-
eq(other: Selection): boolean;
|
|
27
|
-
content(): Slice<any>;
|
|
28
|
-
getBookmark(): GapBookmark;
|
|
29
|
-
toJSON(): {
|
|
30
|
-
pos: number;
|
|
31
|
-
type: string;
|
|
32
|
-
side: Side;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export declare class GapBookmark {
|
|
36
|
-
private readonly pos;
|
|
37
|
-
constructor(pos: number);
|
|
38
|
-
map(mapping: any): GapBookmark;
|
|
39
|
-
resolve(doc: PMNode): GapCursorSelection | Selection;
|
|
40
|
-
}
|
|
1
|
+
export { GapCursorSelection, JSON_ID, Side, GapBookmark, } from '@atlaskit/editor-common/selection';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const isIgnored: (node?: PMNode<any> | null | undefined) => boolean;
|
|
1
|
+
export { isIgnored } from '@atlaskit/editor-common/selection';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const isValidTargetNode: (node?: PMNode<any> | null | undefined) => boolean;
|
|
1
|
+
export { isValidTargetNode } from '@atlaskit/editor-common/selection';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { GapCursorSelection, Side } from '
|
|
1
|
+
export { GapCursorSelection, Side } from '@atlaskit/editor-common/selection';
|
|
2
2
|
export { setCursorForTopLevelBlocks, setSelectionTopLevelBlocks, hasGapCursorPlugin, } from './gap-cursor/actions';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SelectionPluginState } from './types';
|
|
2
|
-
export declare const createCommand: <A = import("./actions").SelectionAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState<any>>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction<any>, state: import("prosemirror-state").EditorState<any>) => import("prosemirror-state").Transaction<any>) | undefined) => import("
|
|
2
|
+
export declare const createCommand: <A = import("./actions").SelectionAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState<any>>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction<any>, state: import("prosemirror-state").EditorState<any>) => import("prosemirror-state").Transaction<any>) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState<any>) => SelectionPluginState, createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: SelectionPluginState | ((state: import("prosemirror-state").EditorState<any>) => SelectionPluginState)) => import("prosemirror-state").SafeStateField<SelectionPluginState, import("prosemirror-model").Schema<any, any>>;
|
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
import { PluginKey
|
|
2
|
-
import {
|
|
1
|
+
import { PluginKey } from 'prosemirror-state';
|
|
2
|
+
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection';
|
|
3
|
+
export type { SelectionPluginState } from '@atlaskit/editor-common/selection';
|
|
3
4
|
export declare const selectionPluginKey: PluginKey<any, any>;
|
|
4
|
-
export
|
|
5
|
-
Before = "Before",
|
|
6
|
-
Start = "Start",
|
|
7
|
-
Inside = "Inside",
|
|
8
|
-
End = "End"
|
|
9
|
-
}
|
|
5
|
+
export { RelativeSelectionPos };
|
|
10
6
|
export declare enum SelectionDirection {
|
|
11
7
|
Before = -1,
|
|
12
8
|
After = 1
|
|
13
9
|
}
|
|
14
|
-
export interface SelectionPluginState {
|
|
15
|
-
/** Selected node class decorations */
|
|
16
|
-
decorationSet: DecorationSet;
|
|
17
|
-
/** Selection the decorations were built for */
|
|
18
|
-
selection: Selection;
|
|
19
|
-
/**
|
|
20
|
-
* Relative position of selection to either its parent node or, if a NodeSelection, its own node
|
|
21
|
-
* Used to manage where the selection should go when using arrow keys
|
|
22
|
-
*/
|
|
23
|
-
selectionRelativeToNode?: RelativeSelectionPos;
|
|
24
|
-
}
|
|
25
10
|
export interface LongPressSelectionPluginOptions {
|
|
26
11
|
useLongPressSelection?: boolean;
|
|
27
12
|
}
|