@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,3 +1,4 @@
|
|
|
1
1
|
import { Direction } from '@atlaskit/editor-tables/types';
|
|
2
|
-
import { Command } from '
|
|
3
|
-
|
|
2
|
+
import { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
export declare const goToNextCell: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (direction: Direction) => Command;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CellColumnPositioning } from '../types';
|
|
2
|
-
export declare const hoverMergedCells: () => import("
|
|
3
|
-
export declare const hoverColumns: (hoveredColumns: number[], isInDanger?: boolean | undefined) => import("
|
|
4
|
-
export declare const hoverRows: (hoveredRows: number[], isInDanger?: boolean | undefined) => import("
|
|
5
|
-
export declare const hoverTable: (isInDanger?: boolean | undefined, isSelected?: boolean | undefined) => import("
|
|
6
|
-
export declare const clearHoverSelection: () => import("
|
|
7
|
-
export declare const showResizeHandleLine: (cellColumnPositioning: CellColumnPositioning) => import("
|
|
8
|
-
export declare const hideResizeHandleLine: () => import("
|
|
2
|
+
export declare const hoverMergedCells: () => import("@atlaskit/editor-common/types").Command;
|
|
3
|
+
export declare const hoverColumns: (hoveredColumns: number[], isInDanger?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
4
|
+
export declare const hoverRows: (hoveredRows: number[], isInDanger?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
5
|
+
export declare const hoverTable: (isInDanger?: boolean | undefined, isSelected?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
6
|
+
export declare const clearHoverSelection: () => import("@atlaskit/editor-common/types").Command;
|
|
7
|
+
export declare const showResizeHandleLine: (cellColumnPositioning: CellColumnPositioning) => import("@atlaskit/editor-common/types").Command;
|
|
8
|
+
export declare const hideResizeHandleLine: () => import("@atlaskit/editor-common/types").Command;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Transaction } from 'prosemirror-state';
|
|
2
2
|
import { Command } from '../../../types';
|
|
3
3
|
import { EditorView } from 'prosemirror-view';
|
|
4
|
-
|
|
5
|
-
export declare
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
4
|
+
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
5
|
+
export declare function addColumnAt(getEditorContainerWidth: GetEditorContainerWidth): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction<any>;
|
|
6
|
+
export declare const addColumnBefore: (getEditorContainerWidth: GetEditorContainerWidth) => Command;
|
|
7
|
+
export declare const addColumnAfter: (getEditorContainerWidth: GetEditorContainerWidth) => Command;
|
|
8
|
+
export declare const insertColumn: (getEditorContainerWidth: GetEditorContainerWidth) => (column: number) => Command;
|
|
8
9
|
export declare const insertRow: (row: number, moveCursorToTheNewRow: boolean) => Command;
|
|
9
10
|
export declare const createTable: () => Command;
|
|
@@ -3,8 +3,8 @@ import { Transaction } from 'prosemirror-state';
|
|
|
3
3
|
import { ContentNodeWithPos } from 'prosemirror-utils';
|
|
4
4
|
import { EditorView } from 'prosemirror-view';
|
|
5
5
|
import { Command } from '../../../types';
|
|
6
|
-
export declare const setEditorFocus: (editorHasFocus: boolean) => Command;
|
|
7
|
-
export declare const setTableRef: (ref?: HTMLTableElement | undefined) => Command;
|
|
6
|
+
export declare const setEditorFocus: (editorHasFocus: boolean) => import("@atlaskit/editor-common/types").Command;
|
|
7
|
+
export declare const setTableRef: (ref?: HTMLTableElement | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
8
8
|
export declare const setCellAttr: (name: string, value: any) => Command;
|
|
9
9
|
export declare const triggerUnlessTableHeader: (command: Command) => Command;
|
|
10
10
|
export declare const transformSliceRemoveCellBackgroundColor: (slice: Slice, schema: Schema) => Slice;
|
|
@@ -15,12 +15,12 @@ export declare const deleteTableIfSelected: Command;
|
|
|
15
15
|
export declare const convertFirstRowToHeader: (schema: Schema) => (tr: Transaction) => Transaction;
|
|
16
16
|
export declare const moveCursorBackward: Command;
|
|
17
17
|
export declare const setMultipleCellAttrs: (attrs: Object, targetCellPosition?: number | undefined) => Command;
|
|
18
|
-
export declare const selectColumn: (column: number, expand?: boolean | undefined) => Command;
|
|
19
|
-
export declare const selectRow: (row: number, expand?: boolean | undefined) => Command;
|
|
20
|
-
export declare const showInsertColumnButton: (columnIndex: number) => Command;
|
|
21
|
-
export declare const showInsertRowButton: (rowIndex: number) => Command;
|
|
22
|
-
export declare const hideInsertColumnOrRowButton: () => Command;
|
|
23
|
-
export declare const addResizeHandleDecorations: (columnIndex: number) => Command;
|
|
18
|
+
export declare const selectColumn: (column: number, expand?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
19
|
+
export declare const selectRow: (row: number, expand?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
20
|
+
export declare const showInsertColumnButton: (columnIndex: number) => import("@atlaskit/editor-common/types").Command;
|
|
21
|
+
export declare const showInsertRowButton: (rowIndex: number) => import("@atlaskit/editor-common/types").Command;
|
|
22
|
+
export declare const hideInsertColumnOrRowButton: () => import("@atlaskit/editor-common/types").Command;
|
|
23
|
+
export declare const addResizeHandleDecorations: (columnIndex: number) => import("@atlaskit/editor-common/types").Command;
|
|
24
24
|
export declare const autoSizeTable: (view: EditorView, node: PMNode, table: HTMLTableElement, basePos: number, opts: {
|
|
25
25
|
containerWidth: number;
|
|
26
26
|
}) => boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Command } from '
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
|
+
import { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
2
3
|
export declare enum TableSelectionDirection {
|
|
3
4
|
TopToBottom = "TopToBottom",
|
|
4
5
|
BottomToTop = "BottomToTop"
|
|
5
6
|
}
|
|
6
|
-
export declare const arrowLeftFromTable: Command;
|
|
7
|
-
export declare const arrowRightFromTable: Command;
|
|
7
|
+
export declare const arrowLeftFromTable: (editorSelectionAPI: EditorSelectionAPI | undefined | null) => () => Command;
|
|
8
|
+
export declare const arrowRightFromTable: (editorSelectionAPI: EditorSelectionAPI | undefined | null) => () => Command;
|
|
@@ -9,4 +9,4 @@ export declare const toggleHeaderRow: Command;
|
|
|
9
9
|
export declare const toggleHeaderColumn: Command;
|
|
10
10
|
export declare const toggleNumberColumn: Command;
|
|
11
11
|
export declare const toggleTableLayout: Command;
|
|
12
|
-
export declare const toggleContextualMenu: () => Command;
|
|
12
|
+
export declare const toggleContextualMenu: () => import("@atlaskit/editor-common/types").Command;
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
2
2
|
import { Command } from '../../types';
|
|
3
|
-
import { INPUT_METHOD } from '
|
|
3
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
5
|
import { InsertRowMethods, InsertRowOptions, RowInsertPosition } from './types';
|
|
5
6
|
import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
|
|
6
7
|
import { ResizeStateWithAnalytics } from './pm-plugins/table-resizing/utils';
|
|
7
|
-
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
8
|
+
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
9
|
+
export declare const emptyMultipleCellsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FLOATING_TB, targetCellPosition?: number | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
10
|
+
export declare const mergeCellsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | null | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
11
|
+
export declare const splitCellWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
|
|
12
|
+
export declare const setColorWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (cellColor: string, targetCellPosition?: number | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
13
|
+
export declare const addRowAroundSelection: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (side: RowInsertPosition) => Command;
|
|
14
|
+
export declare const insertRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: InsertRowMethods, options: InsertRowOptions) => import("@atlaskit/editor-common/types").Command;
|
|
15
|
+
export declare const insertColumnWithAnalytics: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB, position: number) => import("@atlaskit/editor-common/types").Command;
|
|
16
|
+
export declare const deleteRowsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB, rect: Rect, isHeaderRowRequired: boolean) => import("@atlaskit/editor-common/types").Command;
|
|
17
|
+
export declare const deleteColumnsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB, rect: Rect) => import("@atlaskit/editor-common/types").Command;
|
|
18
|
+
export declare const deleteTableWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
|
|
19
|
+
export declare const deleteTableIfSelectedWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.FLOATING_TB | INPUT_METHOD.KEYBOARD) => import("@atlaskit/editor-common/types").Command;
|
|
20
|
+
export declare const toggleHeaderRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
|
|
21
|
+
export declare const toggleHeaderColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
|
|
22
|
+
export declare const toggleNumberColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
|
|
23
|
+
export declare const toggleTableLayoutWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
|
|
24
|
+
export declare const sortColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU, columnIndex: number, sortOrder: SortOrder) => import("@atlaskit/editor-common/types").Command;
|
|
25
|
+
export declare const distributeColumnsWidthsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU, { resizeState, table, attributes }: ResizeStateWithAnalytics) => import("@atlaskit/editor-common/types").Command;
|
|
26
|
+
export declare const wrapTableInExpandWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
4
|
import { ElementContentRects } from './types';
|
|
5
|
+
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
6
|
export declare const handleBlur: (view: EditorView, event: Event) => boolean;
|
|
5
7
|
export declare const handleFocus: (view: EditorView, event: Event) => boolean;
|
|
6
8
|
export declare const handleClick: (view: EditorView, event: Event) => boolean;
|
|
@@ -8,7 +10,7 @@ export declare const handleMouseOver: (view: EditorView, mouseEvent: Event) => b
|
|
|
8
10
|
export declare const handleMouseDown: (_: EditorView, event: Event) => boolean;
|
|
9
11
|
export declare const handleMouseOut: (view: EditorView, mouseEvent: Event) => boolean;
|
|
10
12
|
export declare const handleMouseLeave: (view: EditorView, event: Event) => boolean;
|
|
11
|
-
export declare const handleMouseMove: (view: EditorView, event: Event, tableCellOptimization?: boolean | undefined, elementContentRects?: ElementContentRects | undefined) => boolean;
|
|
13
|
+
export declare const handleMouseMove: (getEditorFeatureFlags: GetEditorFeatureFlags) => (view: EditorView, event: Event, tableCellOptimization?: boolean | undefined, elementContentRects?: ElementContentRects | undefined) => boolean;
|
|
12
14
|
export declare function handleTripleClick(view: EditorView, pos: number): boolean;
|
|
13
|
-
export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState) => Transaction;
|
|
15
|
+
export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => Transaction;
|
|
14
16
|
export declare const whenTableInFocus: (eventHandler: (view: EditorView, mouseEvent: Event, tableCellOptimization?: boolean | undefined, elementContentRects?: ElementContentRects | undefined) => boolean, elementContentRects?: ElementContentRects | undefined) => (view: EditorView, mouseEvent: Event) => boolean;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { EditorPlugin } from '../../types';
|
|
2
2
|
import { PluginConfig } from './types';
|
|
3
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
5
|
+
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
6
|
interface TablePluginOptions {
|
|
4
7
|
tableOptions: PluginConfig;
|
|
5
8
|
breakoutEnabled?: boolean;
|
|
6
9
|
allowContextualMenu?: boolean;
|
|
7
10
|
fullWidthEnabled?: boolean;
|
|
8
11
|
wasFullWidthEnabled?: boolean;
|
|
12
|
+
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
13
|
+
editorSelectionAPI?: EditorSelectionAPI;
|
|
14
|
+
getEditorContainerWidth?: GetEditorContainerWidth;
|
|
15
|
+
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
9
16
|
}
|
|
10
17
|
declare const tablesPlugin: (options?: TablePluginOptions | undefined) => EditorPlugin;
|
|
11
18
|
export default tablesPlugin;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Node as PmNode } from 'prosemirror-model';
|
|
3
3
|
import { EditorView } from 'prosemirror-view';
|
|
4
|
-
import {
|
|
4
|
+
import type { EditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
5
5
|
import { RowStickyState, StickyPluginState } from '../pm-plugins/sticky-headers';
|
|
6
6
|
import { ColumnResizingPluginState, ShadowEvent } from '../types';
|
|
7
7
|
import type { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
|
|
8
8
|
import { TableOptions } from './types';
|
|
9
9
|
import { EventDispatcher } from '../../../event-dispatcher';
|
|
10
10
|
import { ForwardRef } from '../../../nodeviews/types';
|
|
11
|
+
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
11
12
|
export interface ComponentProps {
|
|
12
13
|
view: EditorView;
|
|
13
14
|
getNode: () => PmNode;
|
|
@@ -16,7 +17,7 @@ export interface ComponentProps {
|
|
|
16
17
|
getPos: () => number;
|
|
17
18
|
options?: TableOptions;
|
|
18
19
|
contentDOM: ForwardRef;
|
|
19
|
-
containerWidth:
|
|
20
|
+
containerWidth: EditorContainerWidth;
|
|
20
21
|
allowControls: boolean;
|
|
21
22
|
isHeaderRowEnabled: boolean;
|
|
22
23
|
isHeaderColumnEnabled: boolean;
|
|
@@ -24,6 +25,7 @@ export interface ComponentProps {
|
|
|
24
25
|
tableActive: boolean;
|
|
25
26
|
ordering: TableColumnOrdering;
|
|
26
27
|
tableResizingPluginState?: ColumnResizingPluginState;
|
|
28
|
+
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
27
29
|
}
|
|
28
30
|
interface TableState {
|
|
29
31
|
scroll: number;
|
|
@@ -6,6 +6,7 @@ import { ForwardRef, getPosHandler, getPosHandlerNode } from '../../../nodeviews
|
|
|
6
6
|
import ReactNodeView from '../../../nodeviews/ReactNodeView';
|
|
7
7
|
import { PortalProviderAPI } from '../../../ui/PortalProvider';
|
|
8
8
|
import { Props, TableOptions } from './types';
|
|
9
|
+
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
9
10
|
export default class TableView extends ReactNodeView<Props> {
|
|
10
11
|
private table;
|
|
11
12
|
private resizeObserver?;
|
|
@@ -25,4 +26,4 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
25
26
|
ignoreMutation(): boolean;
|
|
26
27
|
destroy(): void;
|
|
27
28
|
}
|
|
28
|
-
export declare const createTableView: (node: PmNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, options: TableOptions) => NodeView;
|
|
29
|
+
export declare const createTableView: (node: PmNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, options: TableOptions, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags) => NodeView;
|
|
@@ -2,6 +2,7 @@ import { Node } from 'prosemirror-model';
|
|
|
2
2
|
import { EditorView, NodeView } from 'prosemirror-view';
|
|
3
3
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import { getPosHandler } from '../../../../src/nodeviews';
|
|
5
|
+
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
6
|
export default class TableCellNodeView implements NodeView {
|
|
6
7
|
node: Node;
|
|
7
8
|
dom: HTMLElement;
|
|
@@ -11,7 +12,7 @@ export default class TableCellNodeView implements NodeView {
|
|
|
11
12
|
providerFactory?: ProviderFactory;
|
|
12
13
|
observer?: ResizeObserver;
|
|
13
14
|
mouseMoveOptimization?: boolean;
|
|
14
|
-
constructor(node: Node, view: EditorView, getPos: any, observer?: ResizeObserver);
|
|
15
|
+
constructor(node: Node, view: EditorView, getPos: any, getEditorFeatureFlags: GetEditorFeatureFlags, observer?: ResizeObserver);
|
|
15
16
|
private updateNodeView;
|
|
16
17
|
update(node: Node): boolean;
|
|
17
18
|
destroy(): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Node as PmNode } from 'prosemirror-model';
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
|
+
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
4
|
import { EventDispatcher } from '../../../event-dispatcher';
|
|
4
5
|
import { PortalProviderAPI } from '../../../ui/PortalProvider';
|
|
5
6
|
export declare type TableOptions = {
|
|
@@ -17,4 +18,6 @@ export interface Props {
|
|
|
17
18
|
getPos: () => number;
|
|
18
19
|
options?: TableOptions;
|
|
19
20
|
tableRenderOptimization?: boolean;
|
|
21
|
+
getEditorContainerWidth: GetEditorContainerWidth;
|
|
22
|
+
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
20
23
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EditorState } from 'prosemirror-state';
|
|
2
|
+
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
3
|
export declare const updateShadowListForStickyStyles: (heightStyle: string, shadows: HTMLCollection) => void;
|
|
3
4
|
/**
|
|
4
5
|
* Update overflow shadows for a given wrapper & table.
|
|
5
6
|
* if `overflowShadowOptimization` is enabled, this will exit early.
|
|
6
7
|
*/
|
|
7
|
-
export declare const updateOverflowShadows: (editorState: EditorState, wrapper?: HTMLElement | null | undefined, table?: HTMLElement | null | undefined, rightShadows?: NodeListOf<HTMLElement> | null | undefined, leftShadows?: NodeListOf<HTMLElement> | null | undefined) => false | undefined;
|
|
8
|
+
export declare const updateOverflowShadows: (getEditorFeatureFlags: GetEditorFeatureFlags) => (editorState: EditorState, wrapper?: HTMLElement | null | undefined, table?: HTMLElement | null | undefined, rightShadows?: NodeListOf<HTMLElement> | null | undefined, leftShadows?: NodeListOf<HTMLElement> | null | undefined) => false | undefined;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
4
|
+
export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null): SafePlugin;
|
|
3
5
|
export default keymapPlugin;
|
|
@@ -2,5 +2,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
2
2
|
import { Dispatch, EventDispatcher } from '../../../event-dispatcher';
|
|
3
3
|
import { PortalProviderAPI } from '../../../ui/PortalProvider';
|
|
4
4
|
import { PluginConfig } from '../types';
|
|
5
|
-
import { DispatchAnalyticsEvent } from '
|
|
6
|
-
|
|
5
|
+
import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
8
|
+
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, breakoutEnabled?: boolean | undefined, fullWidthModeEnabled?: boolean | undefined, previousFullWidthModeEnabled?: boolean | undefined, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => SafePlugin<import("../types").TablePluginState, import("prosemirror-model").Schema<any, any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const createPluginState: (dispatch: import("
|
|
1
|
+
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: import("../types").TablePluginState | ((state: import("prosemirror-state").EditorState<any>) => import("../types").TablePluginState)) => import("prosemirror-state").SafeStateField<import("../types").TablePluginState, import("prosemirror-model").Schema<any, any>>, createCommand: <A = import("../types").TablePluginAction>(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").TablePluginState;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RowStickyState } from './types';
|
|
2
|
-
export declare const updateStickyState: (rowState: RowStickyState) => import("
|
|
3
|
-
export declare const removeStickyState: (pos: number) => import("
|
|
2
|
+
export declare const updateStickyState: (rowState: RowStickyState) => import("@atlaskit/editor-common/types").Command;
|
|
3
|
+
export declare const removeStickyState: (pos: number) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -4,6 +4,7 @@ import { EditorView, NodeView } from 'prosemirror-view';
|
|
|
4
4
|
import { EventDispatcher } from '../../../../../event-dispatcher';
|
|
5
5
|
import { TablePluginState } from '../../../types';
|
|
6
6
|
import { TableDOMElements } from './dom';
|
|
7
|
+
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
7
8
|
export declare const supportedHeaderRow: (node: PmNode) => boolean;
|
|
8
9
|
export declare class TableRowNodeView implements NodeView {
|
|
9
10
|
view: EditorView;
|
|
@@ -26,7 +27,7 @@ export declare class TableRowNodeView implements NodeView {
|
|
|
26
27
|
private sentinels;
|
|
27
28
|
private stickyRowHeight?;
|
|
28
29
|
get tree(): TableDOMElements | null | undefined;
|
|
29
|
-
constructor(node: PmNode, view: EditorView, getPos: any, eventDispatcher: EventDispatcher);
|
|
30
|
+
constructor(node: PmNode, view: EditorView, getPos: any, eventDispatcher: EventDispatcher, getEditorFeatureFlags: GetEditorFeatureFlags);
|
|
30
31
|
listening: boolean;
|
|
31
32
|
headerRowMouseScrollEnd: import("lodash").DebouncedFunc<() => void>;
|
|
32
33
|
headerRowMouseScroll: import("lodash").DebouncedFunc<() => void>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { StickyPluginAction, StickyPluginState } from './types';
|
|
2
|
-
declare const createPluginState: (dispatch: import("
|
|
2
|
+
declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: StickyPluginState | ((state: import("prosemirror-state").EditorState<any>) => StickyPluginState)) => import("prosemirror-state").SafeStateField<StickyPluginState, import("prosemirror-model").Schema<any, any>>, createCommand: <A = StickyPluginAction>(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;
|
|
3
3
|
export { createPluginState, createCommand };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
+
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
3
|
import { Dispatch, EventDispatcher } from '../../../../event-dispatcher';
|
|
3
|
-
export declare const createPlugin: (dispatch: Dispatch, eventDispatcher: EventDispatcher, initialState
|
|
4
|
+
export declare const createPlugin: (dispatch: Dispatch, eventDispatcher: EventDispatcher, initialState: (() => never[]) | undefined, getEditorFeatureFlags: GetEditorFeatureFlags) => SafePlugin<import("./types").StickyPluginState, import("prosemirror-model").Schema<any, any>>;
|
|
@@ -11,14 +11,14 @@ export declare const evenColumns: ({ resizeState, table, start, event, }: {
|
|
|
11
11
|
event: MouseEvent;
|
|
12
12
|
}) => Command;
|
|
13
13
|
export declare const distributeColumnsWidths: (newResizeState: ResizeState, table: ContentNodeWithPos) => Command;
|
|
14
|
-
export declare const setResizeHandlePos: (resizeHandlePos: number | null) => Command;
|
|
15
|
-
export declare const stopResizing: (tr?: Transaction<any> | undefined) => Command;
|
|
14
|
+
export declare const setResizeHandlePos: (resizeHandlePos: number | null) => import("@atlaskit/editor-common/types").Command;
|
|
15
|
+
export declare const stopResizing: (tr?: Transaction<any> | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
16
16
|
export declare const setDragging: (dragging: {
|
|
17
17
|
startX: number;
|
|
18
18
|
startWidth: number;
|
|
19
|
-
} | null, tr?: Transaction<any> | undefined) => Command;
|
|
19
|
+
} | null, tr?: Transaction<any> | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
20
20
|
export declare const setLastClick: (lastClick: {
|
|
21
21
|
x: number;
|
|
22
22
|
y: number;
|
|
23
23
|
time: number;
|
|
24
|
-
} | null, transform?: ((tr: Transaction) => Transaction) | undefined) => Command;
|
|
24
|
+
} | null, transform?: ((tr: Transaction) => Transaction) | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { EditorView } from 'prosemirror-view';
|
|
2
|
-
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
|
+
export declare const handleMouseDown: (view: EditorView, event: MouseEvent, localResizeHandlePos: number, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ColumnResizingPluginState } from '../../types';
|
|
2
|
-
export declare const createCommand: <A = import("../../types").ColumnResizingPluginAction>(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("
|
|
3
|
-
export declare const createPluginState: (dispatch: import("
|
|
2
|
+
export declare const createCommand: <A = import("../../types").ColumnResizingPluginAction>(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;
|
|
3
|
+
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: ColumnResizingPluginState | ((state: import("prosemirror-state").EditorState<any>) => ColumnResizingPluginState)) => import("prosemirror-state").SafeStateField<ColumnResizingPluginState, import("prosemirror-model").Schema<any, any>>;
|
|
4
4
|
export declare const getPluginState: (state: import("prosemirror-state").EditorState<any>) => ColumnResizingPluginState;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { Dispatch } from '../../../../event-dispatcher';
|
|
3
3
|
import { ColumnResizingPluginState } from '../../types';
|
|
4
|
-
|
|
4
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
|
+
export declare function createPlugin(dispatch: Dispatch<ColumnResizingPluginState>, { lastColumnResizable }: ColumnResizingPluginState, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, editorAnalyticsAPI?: EditorAnalyticsAPI): SafePlugin<ColumnResizingPluginState, import("prosemirror-model").Schema<any, any>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EditorState } from 'prosemirror-state';
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
|
-
|
|
3
|
+
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
|
+
export declare const updateControls: (getEditorFeatureFlags: GetEditorFeatureFlags) => (state: EditorState) => void;
|
|
4
5
|
export declare const isClickNear: (event: MouseEvent, click: {
|
|
5
6
|
x: number;
|
|
6
7
|
y: number;
|
|
@@ -4,6 +4,7 @@ import { CellAttributes, TableLayout } from '@atlaskit/adf-schema';
|
|
|
4
4
|
import { TableOptions } from '../../../nodeviews/types';
|
|
5
5
|
import { Node as PMNode } from 'prosemirror-model';
|
|
6
6
|
import { EditorState } from 'prosemirror-state';
|
|
7
|
+
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
7
8
|
export declare const tableLayoutToSize: Record<string, number>;
|
|
8
9
|
export declare function getLayoutSize(tableLayout: TableLayout, containerWidth: number | undefined, options: TableOptions): number;
|
|
9
10
|
export declare function getDefaultLayoutMaxWidth(containerWidth?: number): number;
|
|
@@ -15,6 +16,7 @@ interface getTableMaxWidthProps {
|
|
|
15
16
|
tableStart: number;
|
|
16
17
|
state: EditorState;
|
|
17
18
|
layout: TableLayout;
|
|
19
|
+
getEditorContainerWidth: GetEditorContainerWidth;
|
|
18
20
|
}
|
|
19
|
-
export declare const getTableMaxWidth: ({ table, tableStart, state, layout, }: getTableMaxWidthProps) => any;
|
|
21
|
+
export declare const getTableMaxWidth: ({ table, tableStart, state, layout, getEditorContainerWidth, }: getTableMaxWidthProps) => any;
|
|
20
22
|
export {};
|
|
@@ -3,6 +3,7 @@ import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
|
3
3
|
import { TableLayout } from '@atlaskit/adf-schema';
|
|
4
4
|
import { ResizeState, ResizeStateWithAnalytics } from './types';
|
|
5
5
|
import { EditorState } from 'prosemirror-state';
|
|
6
|
+
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
6
7
|
export declare const getResizeState: ({ minWidth, maxSize, table, tableRef, start, domAtPos, }: {
|
|
7
8
|
minWidth: number;
|
|
8
9
|
maxSize: number;
|
|
@@ -25,4 +26,4 @@ export declare const normaliseTableLayout: (input: string | undefined | null) =>
|
|
|
25
26
|
export declare const getNewResizeStateFromSelectedColumns: (rect: Rect, state: EditorState, domAtPos: (pos: number) => {
|
|
26
27
|
node: Node;
|
|
27
28
|
offset: number;
|
|
28
|
-
}) => ResizeStateWithAnalytics | undefined;
|
|
29
|
+
}, getEditorContainerWidth: GetEditorContainerWidth) => ResizeStateWithAnalytics | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
|
|
2
|
+
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
3
|
+
export declare function tableSelectionKeymapPlugin(editorSelectionAPI: EditorSelectionAPI | undefined | null): SafePlugin;
|
|
3
4
|
export default tableSelectionKeymapPlugin;
|
|
@@ -3,6 +3,8 @@ import { FloatingToolbarDropdown, FloatingToolbarHandler, FloatingToolbarItem }
|
|
|
3
3
|
import { ToolbarMenuConfig, ToolbarMenuState, ToolbarMenuContext, PluginConfig } from './types';
|
|
4
4
|
import { EditorState } from 'prosemirror-state';
|
|
5
5
|
import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
6
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
6
8
|
export declare const messages: {
|
|
7
9
|
tableOptions: {
|
|
8
10
|
id: string;
|
|
@@ -30,6 +32,6 @@ export declare const messages: {
|
|
|
30
32
|
description: string;
|
|
31
33
|
};
|
|
32
34
|
};
|
|
33
|
-
export declare const getToolbarMenuConfig: (config: ToolbarMenuConfig, state: ToolbarMenuState, { formatMessage }: ToolbarMenuContext) => FloatingToolbarItem<Command>;
|
|
34
|
-
export declare const getToolbarCellOptionsConfig: (editorState: EditorState, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext) => FloatingToolbarDropdown<Command>;
|
|
35
|
-
export declare const getToolbarConfig: (config: PluginConfig) => FloatingToolbarHandler;
|
|
35
|
+
export declare const getToolbarMenuConfig: (config: ToolbarMenuConfig, state: ToolbarMenuState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => FloatingToolbarItem<Command>;
|
|
36
|
+
export declare const getToolbarCellOptionsConfig: (editorState: EditorState, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | null | undefined) => FloatingToolbarDropdown<Command>;
|
|
37
|
+
export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (config: PluginConfig) => FloatingToolbarHandler;
|
|
@@ -3,6 +3,7 @@ import { Transaction } from 'prosemirror-state';
|
|
|
3
3
|
import { ResizeState } from '../pm-plugins/table-resizing/utils';
|
|
4
4
|
import { ContentNodeWithPos } from 'prosemirror-utils';
|
|
5
5
|
import { EditorView } from 'prosemirror-view';
|
|
6
|
+
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
6
7
|
export declare const updateColumnWidths: (resizeState: ResizeState, table: PMNode, start: number) => (tr: Transaction) => Transaction;
|
|
7
8
|
/**
|
|
8
9
|
* This function is called when user inserts/deletes a column in a table to;
|
|
@@ -14,4 +15,4 @@ export declare const updateColumnWidths: (resizeState: ResizeState, table: PMNod
|
|
|
14
15
|
* @param view
|
|
15
16
|
* @returns Updated transaction with rescaled columns for a given table
|
|
16
17
|
*/
|
|
17
|
-
export declare const rescaleColumns: (table: ContentNodeWithPos, view: EditorView | undefined) => (tr: Transaction) => Transaction;
|
|
18
|
+
export declare const rescaleColumns: (getEditorContainerWidth: GetEditorContainerWidth) => (table: ContentNodeWithPos, view: EditorView | undefined) => (tr: Transaction) => Transaction;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Transaction, EditorState } from 'prosemirror-state';
|
|
2
2
|
import { Slice } from 'prosemirror-model';
|
|
3
|
-
import { INPUT_METHOD } from '
|
|
4
|
-
|
|
3
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
export declare const replaceSelectedTable: (state: EditorState, content: string | Slice, inputMethod: INPUT_METHOD.KEYBOARD | INPUT_METHOD.CLIPBOARD, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => Transaction;
|
|
@@ -5,7 +5,7 @@ import { DecorationSet } from 'prosemirror-view';
|
|
|
5
5
|
import { IntlShape } from 'react-intl-next';
|
|
6
6
|
import { TableLayout } from '@atlaskit/adf-schema';
|
|
7
7
|
import { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
|
|
8
|
-
import { INPUT_METHOD } from '
|
|
8
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
export declare const RESIZE_HANDLE_AREA_DECORATION_GAP = 30;
|
|
10
10
|
export declare type RowInsertPosition = 'TOP' | 'BOTTOM';
|
|
11
11
|
export declare type PermittedLayoutsDescriptor = TableLayout[] | 'all';
|
|
@@ -292,6 +292,8 @@ export declare const TableCssClassName: {
|
|
|
292
292
|
TABLE_CELL_NODEVIEW_CONTENT_DOM: string;
|
|
293
293
|
TABLE_CELL_WRAPPER: string;
|
|
294
294
|
TABLE_HEADER_CELL_WRAPPER: string;
|
|
295
|
+
TABLE_ROW_CONTROLS_WRAPPER: string;
|
|
296
|
+
TABLE_COLUMN_CONTROLS_DECORATIONS: string;
|
|
295
297
|
};
|
|
296
298
|
export interface ToolbarMenuConfig {
|
|
297
299
|
allowHeaderRow?: boolean;
|
|
@@ -5,7 +5,7 @@ import { EditorView } from 'prosemirror-view';
|
|
|
5
5
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
6
6
|
import { TableLayout } from '@atlaskit/adf-schema';
|
|
7
7
|
import { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
8
|
-
import { DispatchAnalyticsEvent } from '
|
|
8
|
+
import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import { Node as PMNode } from 'prosemirror-model';
|
|
10
10
|
export interface Props {
|
|
11
11
|
editorView: EditorView;
|
|
@@ -4,6 +4,8 @@ import { jsx } from '@emotion/react';
|
|
|
4
4
|
import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
5
5
|
import { EditorView } from 'prosemirror-view';
|
|
6
6
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
7
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
7
9
|
export declare const messages: {
|
|
8
10
|
cellBackground: {
|
|
9
11
|
id: string;
|
|
@@ -57,6 +59,8 @@ export interface Props {
|
|
|
57
59
|
allowBackgroundColor?: boolean;
|
|
58
60
|
boundariesElement?: HTMLElement;
|
|
59
61
|
offset?: Array<number>;
|
|
62
|
+
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
63
|
+
getEditorContainerWidth: GetEditorContainerWidth;
|
|
60
64
|
}
|
|
61
65
|
export interface State {
|
|
62
66
|
isSubmenuOpen: boolean;
|
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { EditorView } from 'prosemirror-view';
|
|
4
4
|
import { PluginConfig } from '../../types';
|
|
5
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
5
7
|
export interface Props {
|
|
6
8
|
editorView: EditorView;
|
|
7
9
|
isOpen: boolean;
|
|
10
|
+
getEditorContainerWidth: GetEditorContainerWidth;
|
|
8
11
|
targetCellPosition?: number;
|
|
9
12
|
mountPoint?: HTMLElement;
|
|
10
13
|
boundariesElement?: HTMLElement;
|
|
11
14
|
scrollableElement?: HTMLElement;
|
|
12
15
|
pluginConfig?: PluginConfig;
|
|
16
|
+
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
13
17
|
}
|
|
14
18
|
declare const FloatingContextualMenu: {
|
|
15
|
-
({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, pluginConfig, }: Props): jsx.JSX.Element | null;
|
|
19
|
+
({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, pluginConfig, editorAnalyticsAPI, getEditorContainerWidth, }: Props): jsx.JSX.Element | null;
|
|
16
20
|
displayName: string;
|
|
17
21
|
};
|
|
18
22
|
export default FloatingContextualMenu;
|
|
@@ -3,6 +3,7 @@ import { Selection } from 'prosemirror-state';
|
|
|
3
3
|
import { EditorView } from 'prosemirror-view';
|
|
4
4
|
import { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
5
5
|
import { CellSelectionType } from './types';
|
|
6
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
7
|
export interface Props {
|
|
7
8
|
editorView: EditorView;
|
|
8
9
|
selection: Selection;
|
|
@@ -12,6 +13,7 @@ export interface Props {
|
|
|
12
13
|
scrollableElement?: HTMLElement;
|
|
13
14
|
stickyHeaders?: RowStickyState;
|
|
14
15
|
isNumberColumnEnabled?: boolean;
|
|
16
|
+
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
15
17
|
}
|
|
16
18
|
export interface State {
|
|
17
19
|
selectionType?: CellSelectionType;
|