@atlaskit/editor-common 120.0.2 → 120.1.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 120.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`5f66a8c3706e3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5f66a8c3706e3) -
8
+ Add the registry-backed Block Controls Quick Insert surface behind
9
+ `platform_editor_block_control_migration`, including typed surface context, cached registry
10
+ lookup, stable left/right surface identities, and experiment-gated Quick Insert registration.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 120.0.2
4
17
 
5
18
  ### Patch Changes
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/block-controls/block-control-ui-context",
3
+ "main": "../../dist/cjs/block-controls/block-control-ui-context.js",
4
+ "module": "../../dist/esm/block-controls/block-control-ui-context.js",
5
+ "module:es2019": "../../dist/es2019/block-controls/block-control-ui-context.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/block-controls/block-control-ui-context.d.ts"
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/block-controls/surface-keys",
3
+ "main": "../../dist/cjs/block-controls/surface-keys.js",
4
+ "module": "../../dist/esm/block-controls/surface-keys.js",
5
+ "module:es2019": "../../dist/es2019/block-controls/surface-keys.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/block-controls/surface-keys.d.ts"
10
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BLOCK_CONTROL_UI_CONTEXT = void 0;
7
+ var _types = require("@atlaskit/editor-ui-control-model/types");
8
+ /** Context supplied to controls rendered on a block-controls surface. */
9
+
10
+ var BLOCK_CONTROL_UI_CONTEXT = exports.BLOCK_CONTROL_UI_CONTEXT = (0, _types.createContextToken)('block-control-ui');
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BLOCK_CONTROLS_RIGHT_SURFACE = exports.BLOCK_CONTROLS_LEFT_SURFACE = exports.BLOCK_CONTROLS_LEFT_SECTION = exports.BLOCK_CONTROLS_LEFT_GROUP = void 0;
7
+ /**
8
+ * Stable identifiers for registry-backed block-control surfaces and their layout containers.
9
+ * They live in editor-common so contributors do not depend on the Block Controls plugin.
10
+ */
11
+ var BLOCK_CONTROLS_LEFT_SURFACE = exports.BLOCK_CONTROLS_LEFT_SURFACE = {
12
+ key: 'block-controls-left',
13
+ type: 'toolbar'
14
+ };
15
+ var BLOCK_CONTROLS_RIGHT_SURFACE = exports.BLOCK_CONTROLS_RIGHT_SURFACE = {
16
+ key: 'block-controls-right',
17
+ type: 'toolbar'
18
+ };
19
+ var BLOCK_CONTROLS_LEFT_SECTION = exports.BLOCK_CONTROLS_LEFT_SECTION = {
20
+ key: 'block-controls-left-section',
21
+ type: 'section'
22
+ };
23
+ var BLOCK_CONTROLS_LEFT_GROUP = exports.BLOCK_CONTROLS_LEFT_GROUP = {
24
+ key: 'block-controls-left-group',
25
+ type: 'group'
26
+ };
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
28
28
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
29
29
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
30
30
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
31
- var packageVersion = "120.0.1";
31
+ var packageVersion = "120.0.2";
32
32
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
33
33
  // Remove URL as it has UGC
34
34
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "120.0.1";
27
+ var packageVersion = "120.0.2";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -0,0 +1,5 @@
1
+ import { createContextToken } from '@atlaskit/editor-ui-control-model/types';
2
+
3
+ /** Context supplied to controls rendered on a block-controls surface. */
4
+
5
+ export const BLOCK_CONTROL_UI_CONTEXT = createContextToken('block-control-ui');
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Stable identifiers for registry-backed block-control surfaces and their layout containers.
3
+ * They live in editor-common so contributors do not depend on the Block Controls plugin.
4
+ */
5
+ export const BLOCK_CONTROLS_LEFT_SURFACE = {
6
+ key: 'block-controls-left',
7
+ type: 'toolbar'
8
+ };
9
+ export const BLOCK_CONTROLS_RIGHT_SURFACE = {
10
+ key: 'block-controls-right',
11
+ type: 'toolbar'
12
+ };
13
+ export const BLOCK_CONTROLS_LEFT_SECTION = {
14
+ key: 'block-controls-left-section',
15
+ type: 'section'
16
+ };
17
+ export const BLOCK_CONTROLS_LEFT_GROUP = {
18
+ key: 'block-controls-left-group',
19
+ type: 'group'
20
+ };
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
14
14
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
15
15
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
16
16
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
17
- const packageVersion = "120.0.1";
17
+ const packageVersion = "120.0.2";
18
18
  const sanitiseSentryEvents = (data, _hint) => {
19
19
  // Remove URL as it has UGC
20
20
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags/fg';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "120.0.1";
17
+ const packageVersion = "120.0.2";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -0,0 +1,5 @@
1
+ import { createContextToken } from '@atlaskit/editor-ui-control-model/types';
2
+
3
+ /** Context supplied to controls rendered on a block-controls surface. */
4
+
5
+ export var BLOCK_CONTROL_UI_CONTEXT = createContextToken('block-control-ui');
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Stable identifiers for registry-backed block-control surfaces and their layout containers.
3
+ * They live in editor-common so contributors do not depend on the Block Controls plugin.
4
+ */
5
+ export var BLOCK_CONTROLS_LEFT_SURFACE = {
6
+ key: 'block-controls-left',
7
+ type: 'toolbar'
8
+ };
9
+ export var BLOCK_CONTROLS_RIGHT_SURFACE = {
10
+ key: 'block-controls-right',
11
+ type: 'toolbar'
12
+ };
13
+ export var BLOCK_CONTROLS_LEFT_SECTION = {
14
+ key: 'block-controls-left-section',
15
+ type: 'section'
16
+ };
17
+ export var BLOCK_CONTROLS_LEFT_GROUP = {
18
+ key: 'block-controls-left-group',
19
+ type: 'group'
20
+ };
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
20
20
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
21
21
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
22
22
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
23
- var packageVersion = "120.0.1";
23
+ var packageVersion = "120.0.2";
24
24
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
25
25
  // Remove URL as it has UGC
26
26
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags/fg';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "120.0.1";
24
+ var packageVersion = "120.0.2";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -0,0 +1,32 @@
1
+ import type { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
2
+ import { type ContextToken } from '@atlaskit/editor-ui-control-model/types';
3
+ export type BlockControlUIContextAncestor = {
4
+ depth: number;
5
+ pos: number;
6
+ type: {
7
+ name: string;
8
+ };
9
+ };
10
+ export type BlockControlUIContextNode = {
11
+ ancestors: readonly BlockControlUIContextAncestor[];
12
+ depth: number;
13
+ node: ProseMirrorNode;
14
+ parentType?: string;
15
+ pos: number;
16
+ type: {
17
+ name: string;
18
+ };
19
+ };
20
+ export type BlockControlUIContextActiveNode = BlockControlUIContextNode & {
21
+ rootPos?: number;
22
+ rootType?: {
23
+ name: string;
24
+ };
25
+ };
26
+ /** Context supplied to controls rendered on a block-controls surface. */
27
+ export type BlockControlUIContext = {
28
+ activeNode?: BlockControlUIContextActiveNode;
29
+ rootNode: BlockControlUIContextNode;
30
+ targetNode: BlockControlUIContextNode;
31
+ };
32
+ export declare const BLOCK_CONTROL_UI_CONTEXT: ContextToken<BlockControlUIContext>;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Stable identifiers for registry-backed block-control surfaces and their layout containers.
3
+ * They live in editor-common so contributors do not depend on the Block Controls plugin.
4
+ */
5
+ export declare const BLOCK_CONTROLS_LEFT_SURFACE: {
6
+ readonly key: 'block-controls-left';
7
+ readonly type: 'toolbar';
8
+ };
9
+ export declare const BLOCK_CONTROLS_RIGHT_SURFACE: {
10
+ readonly key: 'block-controls-right';
11
+ readonly type: 'toolbar';
12
+ };
13
+ export declare const BLOCK_CONTROLS_LEFT_SECTION: {
14
+ readonly key: 'block-controls-left-section';
15
+ readonly type: 'section';
16
+ };
17
+ export declare const BLOCK_CONTROLS_LEFT_GROUP: {
18
+ readonly key: 'block-controls-left-group';
19
+ readonly type: 'group';
20
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "120.0.2",
3
+ "version": "120.1.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"