@atlaskit/editor-plugin-layout 8.0.0 → 8.0.2
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 +12 -0
- package/dist/cjs/pm-plugins/actions.js +1 -1
- package/dist/cjs/pm-plugins/utils/index.js +2 -0
- package/dist/cjs/ui/global-styles.js +1 -1
- package/dist/cjs/ui/icons/LayoutColumnsIcon.js +1 -1
- package/dist/es2019/pm-plugins/actions.js +2 -2
- package/dist/es2019/pm-plugins/utils/index.js +1 -0
- package/dist/es2019/ui/global-styles.js +1 -1
- package/dist/es2019/ui/icons/LayoutColumnsIcon.js +1 -1
- package/dist/esm/pm-plugins/actions.js +2 -2
- package/dist/esm/pm-plugins/utils/index.js +1 -0
- package/dist/esm/ui/global-styles.js +1 -1
- package/dist/esm/ui/icons/LayoutColumnsIcon.js +1 -1
- package/dist/types/pm-plugins/actions.d.ts +2 -1
- package/dist/types/pm-plugins/resizing.d.ts +1 -1
- package/dist/types/pm-plugins/utils/index.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/actions.d.ts +2 -1
- package/dist/types-ts4.5/pm-plugins/resizing.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/index.d.ts +2 -2
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -180,7 +180,7 @@ var insertLayoutColumnsWithAnalytics = exports.insertLayoutColumnsWithAnalytics
|
|
|
180
180
|
actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
|
|
181
181
|
actionSubjectId: _analytics.ACTION_SUBJECT_ID.LAYOUT,
|
|
182
182
|
attributes: {
|
|
183
|
-
inputMethod: inputMethod,
|
|
183
|
+
inputMethod: (0, _platformFeatureFlags.fg)('platform_editor_element_browser_analytic') ? inputMethod : _analytics.INPUT_METHOD.QUICK_INSERT,
|
|
184
184
|
columnCount: (0, _platformFeatureFlags.fg)('platform_editor_column_count_analytics') ? 2 : undefined
|
|
185
185
|
},
|
|
186
186
|
eventType: _analytics.EVENT_TYPE.TRACK
|
|
@@ -8,6 +8,8 @@ var _selection = require("@atlaskit/editor-common/selection");
|
|
|
8
8
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
9
9
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
10
10
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
12
|
+
|
|
11
13
|
var getMaybeLayoutSection = exports.getMaybeLayoutSection = function getMaybeLayoutSection(state) {
|
|
12
14
|
var _state$schema$nodes = state.schema.nodes,
|
|
13
15
|
layoutSection = _state$schema$nodes.layoutSection,
|
|
@@ -16,7 +16,7 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
|
16
16
|
* @jsx jsx
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
20
20
|
|
|
21
21
|
var PLACEHOLDER_SELECTOR = '.ProseMirror-focused .layoutSectionView-content-wrap.selected [data-layout-column] > [data-layout-content] > p:only-child:has(.ProseMirror-trailingBreak:only-child)';
|
|
22
22
|
var getPlaceholderStyle = function getPlaceholderStyle(message) {
|
|
@@ -13,7 +13,7 @@ var _layoutFourColumns = _interopRequireDefault(require("@atlaskit/icon-lab/core
|
|
|
13
13
|
* @jsx jsx
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
17
17
|
|
|
18
18
|
var wrapperStyle = (0, _react.css)({
|
|
19
19
|
padding: '0 4px'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, LAYOUT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, LAYOUT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
3
3
|
import { flatmap, getStepRange, isEmptyDocument, mapChildren } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -161,7 +161,7 @@ export const insertLayoutColumnsWithAnalytics = editorAnalyticsAPI => inputMetho
|
|
|
161
161
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
162
162
|
actionSubjectId: ACTION_SUBJECT_ID.LAYOUT,
|
|
163
163
|
attributes: {
|
|
164
|
-
inputMethod,
|
|
164
|
+
inputMethod: fg('platform_editor_element_browser_analytic') ? inputMethod : INPUT_METHOD.QUICK_INSERT,
|
|
165
165
|
columnCount: fg('platform_editor_column_count_analytics') ? 2 : undefined
|
|
166
166
|
},
|
|
167
167
|
eventType: EVENT_TYPE.TRACK
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
2
3
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
4
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
6
|
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
8
8
|
import { css, Global, jsx } from '@emotion/react';
|
|
9
9
|
import { useIntl } from 'react-intl-next';
|
|
10
10
|
import { layoutMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import LayoutFiveColumnsIcon from '@atlaskit/icon-lab/core/layout-five-columns';
|
|
9
9
|
import LayoutFourColumnsIcon from '@atlaskit/icon-lab/core/layout-four-columns';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, LAYOUT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, LAYOUT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
6
6
|
import { flatmap, getStepRange, isEmptyDocument, mapChildren } from '@atlaskit/editor-common/utils';
|
|
7
7
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -171,7 +171,7 @@ export var insertLayoutColumnsWithAnalytics = function insertLayoutColumnsWithAn
|
|
|
171
171
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
172
172
|
actionSubjectId: ACTION_SUBJECT_ID.LAYOUT,
|
|
173
173
|
attributes: {
|
|
174
|
-
inputMethod: inputMethod,
|
|
174
|
+
inputMethod: fg('platform_editor_element_browser_analytic') ? inputMethod : INPUT_METHOD.QUICK_INSERT,
|
|
175
175
|
columnCount: fg('platform_editor_column_count_analytics') ? 2 : undefined
|
|
176
176
|
},
|
|
177
177
|
eventType: EVENT_TYPE.TRACK
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
2
3
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
4
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -5,7 +5,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
5
5
|
*/
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
7
|
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
9
9
|
import { css, Global, jsx } from '@emotion/react';
|
|
10
10
|
import { useIntl } from 'react-intl-next';
|
|
11
11
|
import { layoutMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import LayoutFiveColumnsIcon from '@atlaskit/icon-lab/core/layout-five-columns';
|
|
9
9
|
import LayoutFourColumnsIcon from '@atlaskit/icon-lab/core/layout-four-columns';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
3
|
import type { Command, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
|
|
3
4
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
4
5
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -5,6 +5,6 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { type LayoutPlugin } from '../layoutPluginType';
|
|
7
7
|
import type { LayoutPluginOptions } from '../types';
|
|
8
|
-
export declare const pluginKey: PluginKey
|
|
8
|
+
export declare const pluginKey: PluginKey;
|
|
9
9
|
declare const _default: (options: LayoutPluginOptions, pluginInjectionApi: ExtractInjectionAPI<LayoutPlugin>, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher) => SafePlugin<undefined>;
|
|
10
10
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
1
|
+
import { type EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
3
3
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
export declare const getMaybeLayoutSection: (state: EditorState) => ContentNodeWithPos | undefined;
|
|
@@ -9,4 +9,4 @@ export declare const getMaybeLayoutSection: (state: EditorState) => ContentNodeW
|
|
|
9
9
|
* @param childIndex the index of the child node in the layout section
|
|
10
10
|
* @returns Transaction or undefined
|
|
11
11
|
*/
|
|
12
|
-
export declare const selectIntoLayout: (view: EditorView, posOfLayout: number, childIndex?: number) =>
|
|
12
|
+
export declare const selectIntoLayout: (view: EditorView, posOfLayout: number, childIndex?: number) => Transaction | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
3
|
import type { Command, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
|
|
3
4
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
4
5
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -5,6 +5,6 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { type LayoutPlugin } from '../layoutPluginType';
|
|
7
7
|
import type { LayoutPluginOptions } from '../types';
|
|
8
|
-
export declare const pluginKey: PluginKey
|
|
8
|
+
export declare const pluginKey: PluginKey;
|
|
9
9
|
declare const _default: (options: LayoutPluginOptions, pluginInjectionApi: ExtractInjectionAPI<LayoutPlugin>, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher) => SafePlugin<undefined>;
|
|
10
10
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
1
|
+
import { type EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
3
3
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
export declare const getMaybeLayoutSection: (state: EditorState) => ContentNodeWithPos | undefined;
|
|
@@ -9,4 +9,4 @@ export declare const getMaybeLayoutSection: (state: EditorState) => ContentNodeW
|
|
|
9
9
|
* @param childIndex the index of the child node in the layout section
|
|
10
10
|
* @returns Transaction or undefined
|
|
11
11
|
*/
|
|
12
|
-
export declare const selectIntoLayout: (view: EditorView, posOfLayout: number, childIndex?: number) =>
|
|
12
|
+
export declare const selectIntoLayout: (view: EditorView, posOfLayout: number, childIndex?: number) => Transaction | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-layout",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"description": "Layout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
"@atlaskit/icon": "^32.0.0",
|
|
47
47
|
"@atlaskit/icon-lab": "^5.17.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^37.0.0",
|
|
50
50
|
"@atlaskit/tokens": "^11.1.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@emotion/react": "^11.7.1"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@atlaskit/editor-common": "^112.
|
|
55
|
+
"@atlaskit/editor-common": "^112.2.0",
|
|
56
56
|
"react": "^18.2.0",
|
|
57
57
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
58
58
|
},
|
|
@@ -98,6 +98,9 @@
|
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
"platform-feature-flags": {
|
|
101
|
+
"platform_editor_element_browser_analytic": {
|
|
102
|
+
"type": "boolean"
|
|
103
|
+
},
|
|
101
104
|
"platform_editor_column_count_analytics": {
|
|
102
105
|
"type": "boolean"
|
|
103
106
|
},
|