@atlaskit/editor-common 118.3.1 → 118.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/codemods/117.0.0-upgrade-react-peer-dependencies.ts +0 -6
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/nesting/isPanelC1SchemaEnabled.js +10 -5
- package/dist/cjs/nesting/isPanelNestingContainerExperimentEnabled.js +20 -0
- package/dist/cjs/nesting/isPanelNestingContainerSupported.js +36 -0
- package/dist/cjs/nesting/utilities.js +10 -3
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/processRawValue.js +12 -9
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/nesting/isPanelC1SchemaEnabled.js +10 -5
- package/dist/es2019/nesting/isPanelNestingContainerExperimentEnabled.js +13 -0
- package/dist/es2019/nesting/isPanelNestingContainerSupported.js +33 -0
- package/dist/es2019/nesting/utilities.js +3 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/processRawValue.js +12 -9
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/nesting/isPanelC1SchemaEnabled.js +10 -5
- package/dist/esm/nesting/isPanelNestingContainerExperimentEnabled.js +15 -0
- package/dist/esm/nesting/isPanelNestingContainerSupported.js +31 -0
- package/dist/esm/nesting/utilities.js +3 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/processRawValue.js +12 -9
- package/dist/types/analytics/types/sync-block-events.d.ts +5 -5
- package/dist/types/nesting/isPanelNestingContainerExperimentEnabled.d.ts +11 -0
- package/dist/types/nesting/isPanelNestingContainerSupported.d.ts +2 -0
- package/dist/types/nesting/utilities.d.ts +2 -1
- package/package.json +9 -13
- package/dist/cjs/nesting/isPanelNestingExpandSupported.js +0 -28
- package/dist/es2019/nesting/isPanelNestingExpandSupported.js +0 -24
- package/dist/esm/nesting/isPanelNestingExpandSupported.js +0 -23
- package/dist/types/nesting/isPanelNestingExpandSupported.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 118.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1f0dab65b6efd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1f0dab65b6efd) -
|
|
8
|
+
Remove unreachable cut-handling branch and duplicated synced block node view setup left over from
|
|
9
|
+
feature gate cleanup
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 118.4.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [`bafd7711a515b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bafd7711a515b) -
|
|
17
|
+
Upgrade linkify-it to 5.0.2 and markdown-it to 14.1.1 to resolve a quadratic-complexity
|
|
18
|
+
denial-of-service vulnerability in link parsing.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [`b8700e10d6391`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b8700e10d6391) -
|
|
23
|
+
Remove invalid experiment keys from Editor package feature gate manifests.
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 118.3.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -9,24 +9,18 @@ const VALID_ORIGINAL_RANGES = [NEW_PEER_DEP_RANGE, NEW_DEV_DEP_RANGE, 'root:*',
|
|
|
9
9
|
const EXCLUDED_PACKAGE_JSON_PATHS = [
|
|
10
10
|
'packages/editor/renderer/package.json',
|
|
11
11
|
'packages/editor/editor-plugin-block-controls-tests/package.json',
|
|
12
|
-
'packages/editor/editor-plugin-block-menu-tests/package.json',
|
|
13
12
|
'packages/editor/editor-plugin-media-tests/package.json',
|
|
14
13
|
'packages/editor/editor-plugin-ai/package.json',
|
|
15
14
|
'packages/editor/editor-common-tests/package.json',
|
|
16
|
-
'packages/editor/editor-plugin-find-replace-tests/package.json',
|
|
17
15
|
'packages/editor/editor-core/package.json',
|
|
18
16
|
'packages/editor/editor-plugin-ai-tests/package.json',
|
|
19
17
|
'packages/editor/editor-plugin-extension-tests/package.json',
|
|
20
18
|
'packages/editor/editor-plugin-synced-block-tests/package.json',
|
|
21
19
|
'packages/editor/generative-ai-modal/package.json',
|
|
22
|
-
'packages/editor/editor-plugin-floating-toolbar-tests/package.json',
|
|
23
20
|
'packages/editor/editor-plugin-show-diff-tests/package.json',
|
|
24
21
|
'packages/editor/editor-plugin-table-tests/package.json',
|
|
25
|
-
'packages/editor/editor-plugin-annotation-tests/package.json',
|
|
26
22
|
'packages/editor/editor-plugin-quick-insert-tests/package.json',
|
|
27
|
-
'packages/editor/editor-plugin-highlight-tests/package.json',
|
|
28
23
|
'packages/editor/editor-referentiality/package.json',
|
|
29
|
-
'packages/editor/editor-plugin-paste-tests/package.json',
|
|
30
24
|
'packages/editor/editor-synced-block-renderer-tests/package.json',
|
|
31
25
|
];
|
|
32
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 = "118.
|
|
31
|
+
var packageVersion = "118.4.0";
|
|
32
32
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
33
33
|
// Remove URL as it has UGC
|
|
34
34
|
// Ignored via go/ees007
|
|
@@ -5,14 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.isPanelC1SchemaEnabled = void 0;
|
|
7
7
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
8
|
+
var _isPanelNestingContainerExperimentEnabled = require("./isPanelNestingContainerExperimentEnabled");
|
|
8
9
|
/*
|
|
9
10
|
* Returns true when any panel container-variant nesting experiment is enabled, i.e. when the
|
|
10
11
|
* `panel_c1` node should exist in the schema and be handled by the panel plugin/renderer.
|
|
11
12
|
*
|
|
12
|
-
* `panel_c1` is a single shared node
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* `panel_c1` is a single shared node whose content depends on which scenario is enabled:
|
|
14
|
+
* - the in-production table scenario is gated by `platform_editor_nest_table_in_panel`
|
|
15
|
+
* (registered in the legacy editor experiments config), and
|
|
16
|
+
* - the consolidated expand / nested panel / blockquote / bodiedExtension scenario ships behind
|
|
17
|
+
* `platform_editor_nest_container_in_panel` (a platform feature experiment).
|
|
18
|
+
* Registration, node views, click handlers and insertion logic are common to the node, so they
|
|
19
|
+
* should be active when EITHER experiment is on. The concrete content model (table-only vs the
|
|
20
|
+
* full container set) is selected per experiment where the node spec is built.
|
|
16
21
|
*
|
|
17
22
|
* ```typescript
|
|
18
23
|
* if (isPanelC1SchemaEnabled()) {
|
|
@@ -21,5 +26,5 @@ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
|
21
26
|
* ```
|
|
22
27
|
*/
|
|
23
28
|
var isPanelC1SchemaEnabled = exports.isPanelC1SchemaEnabled = function isPanelC1SchemaEnabled() {
|
|
24
|
-
return (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) || (0,
|
|
29
|
+
return (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) || (0, _isPanelNestingContainerExperimentEnabled.isPanelNestingContainerExperimentEnabled)();
|
|
25
30
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isPanelNestingContainerExperimentEnabled = void 0;
|
|
7
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
8
|
+
/**
|
|
9
|
+
* Single source of truth for the consolidated container-in-panel experiment gate.
|
|
10
|
+
*
|
|
11
|
+
* `platform_editor_nest_container_in_panel` unlocks nesting expand, a nested panel, blockquote
|
|
12
|
+
* and bodiedExtension inside `panel_c1`. It is a platform feature experiment (managed in
|
|
13
|
+
* Statsig), not a legacy editor experiment, so it is read via `@atlaskit/platform-feature-experiments`.
|
|
14
|
+
*
|
|
15
|
+
* The in-production table-in-panel scenario is a separate, independently-rolled-out flag
|
|
16
|
+
* (`platform_editor_nest_table_in_panel`) and is intentionally not covered here.
|
|
17
|
+
*/
|
|
18
|
+
var isPanelNestingContainerExperimentEnabled = exports.isPanelNestingContainerExperimentEnabled = function isPanelNestingContainerExperimentEnabled() {
|
|
19
|
+
return (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_nest_container_in_panel');
|
|
20
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isPanelNestingContainerSupported = void 0;
|
|
7
|
+
var _isPanelNestingContainerExperimentEnabled = require("./isPanelNestingContainerExperimentEnabled");
|
|
8
|
+
// The container children unlocked on panel_c1 by the consolidated
|
|
9
|
+
// `platform_editor_nest_container_in_panel` experiment. `table` is intentionally excluded:
|
|
10
|
+
// it ships independently under `platform_editor_nest_table_in_panel` and is checked by
|
|
11
|
+
// `isPanelNestingTableSupported`.
|
|
12
|
+
var PANEL_C1_CONTAINER_CHILD_TYPES = ['expand', 'panel', 'blockquote', 'bodiedExtension'];
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* Returns true if the schema supports nesting a container node (expand, nested panel,
|
|
16
|
+
* blockquote or bodiedExtension) inside a panel (panel_c1 variant), AND the consolidated
|
|
17
|
+
* `platform_editor_nest_container_in_panel` experiment is enabled.
|
|
18
|
+
*
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const supportsContainerInPanel = isPanelNestingContainerSupported(state.schema);
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
var isPanelNestingContainerSupported = exports.isPanelNestingContainerSupported = function isPanelNestingContainerSupported(schema) {
|
|
24
|
+
var panel_c1 = schema.nodes.panel_c1;
|
|
25
|
+
if (!panel_c1) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Confirm the PM schema actually allows at least one container child inside panel_c1.
|
|
30
|
+
var panelC1CanContainAnyContainer = PANEL_C1_CONTAINER_CHILD_TYPES.some(function (type) {
|
|
31
|
+
var _panel_c1$contentMatc;
|
|
32
|
+
var childType = schema.nodes[type];
|
|
33
|
+
return !!childType && ((_panel_c1$contentMatc = panel_c1.contentMatch.matchType(childType)) === null || _panel_c1$contentMatc === void 0 ? void 0 : _panel_c1$contentMatc.validEnd) === true;
|
|
34
|
+
});
|
|
35
|
+
return panelC1CanContainAnyContainer && (0, _isPanelNestingContainerExperimentEnabled.isPanelNestingContainerExperimentEnabled)();
|
|
36
|
+
};
|
|
@@ -27,10 +27,16 @@ Object.defineProperty(exports, "isPanelC1SchemaEnabled", {
|
|
|
27
27
|
return _isPanelC1SchemaEnabled.isPanelC1SchemaEnabled;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
Object.defineProperty(exports, "
|
|
30
|
+
Object.defineProperty(exports, "isPanelNestingContainerExperimentEnabled", {
|
|
31
31
|
enumerable: true,
|
|
32
32
|
get: function get() {
|
|
33
|
-
return
|
|
33
|
+
return _isPanelNestingContainerExperimentEnabled.isPanelNestingContainerExperimentEnabled;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "isPanelNestingContainerSupported", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _isPanelNestingContainerSupported.isPanelNestingContainerSupported;
|
|
34
40
|
}
|
|
35
41
|
});
|
|
36
42
|
Object.defineProperty(exports, "isPanelNestingTableSupported", {
|
|
@@ -50,5 +56,6 @@ var _getPositionAfterTopParentNodeOfType = require("./getPositionAfterTopParentN
|
|
|
50
56
|
var _isSelectionTableNestedInTable = require("./isSelectionTableNestedInTable");
|
|
51
57
|
var _isNestedTablesSupported = require("./isNestedTablesSupported");
|
|
52
58
|
var _isPanelNestingTableSupported = require("./isPanelNestingTableSupported");
|
|
53
|
-
var
|
|
59
|
+
var _isPanelNestingContainerSupported = require("./isPanelNestingContainerSupported");
|
|
60
|
+
var _isPanelNestingContainerExperimentEnabled = require("./isPanelNestingContainerExperimentEnabled");
|
|
54
61
|
var _isPanelC1SchemaEnabled = require("./isPanelC1SchemaEnabled");
|
|
@@ -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 = "118.
|
|
27
|
+
var packageVersion = "118.4.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -17,17 +17,20 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
17
17
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
18
|
var _analytics = require("../analytics");
|
|
19
19
|
var _isNestedTablesSupported = require("../nesting/isNestedTablesSupported");
|
|
20
|
-
var
|
|
20
|
+
var _isPanelC1SchemaEnabled = require("../nesting/isPanelC1SchemaEnabled");
|
|
21
|
+
var _isPanelNestingContainerExperimentEnabled = require("../nesting/isPanelNestingContainerExperimentEnabled");
|
|
22
|
+
var _isPanelNestingContainerSupported = require("../nesting/isPanelNestingContainerSupported");
|
|
21
23
|
var _isPanelNestingTableSupported = require("../nesting/isPanelNestingTableSupported");
|
|
22
24
|
var _privacyFilter = require("./filter/privacy-filter");
|
|
23
25
|
var _trackUnsupportedContent = require("./track-unsupported-content");
|
|
24
26
|
var _validateUsingSpec = require("./validate-using-spec");
|
|
25
27
|
var _processRawFragmentValue = require("./processRawFragmentValue");
|
|
26
|
-
// Gate the generalised (table + expand
|
|
27
|
-
//
|
|
28
|
-
//
|
|
28
|
+
// Gate the generalised (table + expand + panel + blockquote + bodiedExtension) panel_c1
|
|
29
|
+
// fallback behind the consolidated container-in-panel experiment. The in-production
|
|
30
|
+
// table-in-panel path keeps using the deprecated table-only transform until
|
|
31
|
+
// platform_editor_nest_container_in_panel is rolled out.
|
|
29
32
|
var runPanelC1FallbackTransform = function runPanelC1FallbackTransform(schema, adf) {
|
|
30
|
-
return (0,
|
|
33
|
+
return (0, _isPanelNestingContainerExperimentEnabled.isPanelNestingContainerExperimentEnabled)() ? (0, _transforms.panelC1FallbackTransformV2)(schema, adf) : (0, _transforms.panelC1FallbackTransform)(schema, adf);
|
|
31
34
|
};
|
|
32
35
|
var transformNestedTablesWithAnalytics = function transformNestedTablesWithAnalytics(node, dispatchAnalyticsEvent) {
|
|
33
36
|
try {
|
|
@@ -334,11 +337,11 @@ function processRawValue(schema, value, providerFactory, sanitizePrivateContent,
|
|
|
334
337
|
// This matches the renderer's behavior in render-document.ts
|
|
335
338
|
var allowNestedTables = (0, _isNestedTablesSupported.isNestedTablesSupported)(schema);
|
|
336
339
|
var allowTableInPanel = (0, _isPanelNestingTableSupported.isPanelNestingTableSupported)(schema);
|
|
337
|
-
var
|
|
338
|
-
var validateADFEntityOptions = allowNestedTables || allowTableInPanel ||
|
|
340
|
+
var allowContainerInPanel = (0, _isPanelNestingContainerSupported.isPanelNestingContainerSupported)(schema);
|
|
341
|
+
var validateADFEntityOptions = allowNestedTables || allowTableInPanel || allowContainerInPanel ? {
|
|
339
342
|
allowNestedTables: allowNestedTables || undefined,
|
|
340
343
|
allowTableInPanel: allowTableInPanel || undefined,
|
|
341
|
-
|
|
344
|
+
allowContainerInPanel: allowContainerInPanel || undefined
|
|
342
345
|
} : undefined;
|
|
343
346
|
var entity = (0, _validateUsingSpec.validateADFEntity)(schema, transformedAdf || node, dispatchAnalyticsEvent, validateADFEntityOptions);
|
|
344
347
|
|
|
@@ -349,7 +352,7 @@ function processRawValue(schema, value, providerFactory, sanitizePrivateContent,
|
|
|
349
352
|
|
|
350
353
|
// The container-node promotion (panel -> panel_c1) is schema-driven and shared across
|
|
351
354
|
// nesting scenarios, so it runs when any panel container-variant experiment is on.
|
|
352
|
-
if ((0,
|
|
355
|
+
if ((0, _isPanelC1SchemaEnabled.isPanelC1SchemaEnabled)()) {
|
|
353
356
|
var _transformContainerNo3 = transformContainerNodesWithAnalytics(entity, schema, dispatchAnalyticsEvent);
|
|
354
357
|
transformedAdf = _transformContainerNo3.transformedAdf;
|
|
355
358
|
entity = transformedAdf;
|
|
@@ -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 = "118.
|
|
17
|
+
const packageVersion = "118.4.0";
|
|
18
18
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
19
19
|
// Remove URL as it has UGC
|
|
20
20
|
// Ignored via go/ees007
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
|
+
import { isPanelNestingContainerExperimentEnabled } from './isPanelNestingContainerExperimentEnabled';
|
|
2
3
|
|
|
3
4
|
/*
|
|
4
5
|
* Returns true when any panel container-variant nesting experiment is enabled, i.e. when the
|
|
5
6
|
* `panel_c1` node should exist in the schema and be handled by the panel plugin/renderer.
|
|
6
7
|
*
|
|
7
|
-
* `panel_c1` is a single shared node
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* `panel_c1` is a single shared node whose content depends on which scenario is enabled:
|
|
9
|
+
* - the in-production table scenario is gated by `platform_editor_nest_table_in_panel`
|
|
10
|
+
* (registered in the legacy editor experiments config), and
|
|
11
|
+
* - the consolidated expand / nested panel / blockquote / bodiedExtension scenario ships behind
|
|
12
|
+
* `platform_editor_nest_container_in_panel` (a platform feature experiment).
|
|
13
|
+
* Registration, node views, click handlers and insertion logic are common to the node, so they
|
|
14
|
+
* should be active when EITHER experiment is on. The concrete content model (table-only vs the
|
|
15
|
+
* full container set) is selected per experiment where the node spec is built.
|
|
11
16
|
*
|
|
12
17
|
* ```typescript
|
|
13
18
|
* if (isPanelC1SchemaEnabled()) {
|
|
@@ -15,4 +20,4 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
15
20
|
* }
|
|
16
21
|
* ```
|
|
17
22
|
*/
|
|
18
|
-
export const isPanelC1SchemaEnabled = () => expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ||
|
|
23
|
+
export const isPanelC1SchemaEnabled = () => expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) || isPanelNestingContainerExperimentEnabled();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Single source of truth for the consolidated container-in-panel experiment gate.
|
|
5
|
+
*
|
|
6
|
+
* `platform_editor_nest_container_in_panel` unlocks nesting expand, a nested panel, blockquote
|
|
7
|
+
* and bodiedExtension inside `panel_c1`. It is a platform feature experiment (managed in
|
|
8
|
+
* Statsig), not a legacy editor experiment, so it is read via `@atlaskit/platform-feature-experiments`.
|
|
9
|
+
*
|
|
10
|
+
* The in-production table-in-panel scenario is a separate, independently-rolled-out flag
|
|
11
|
+
* (`platform_editor_nest_table_in_panel`) and is intentionally not covered here.
|
|
12
|
+
*/
|
|
13
|
+
export const isPanelNestingContainerExperimentEnabled = () => isExperimentEnabled('platform_editor_nest_container_in_panel');
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { isPanelNestingContainerExperimentEnabled } from './isPanelNestingContainerExperimentEnabled';
|
|
2
|
+
|
|
3
|
+
// The container children unlocked on panel_c1 by the consolidated
|
|
4
|
+
// `platform_editor_nest_container_in_panel` experiment. `table` is intentionally excluded:
|
|
5
|
+
// it ships independently under `platform_editor_nest_table_in_panel` and is checked by
|
|
6
|
+
// `isPanelNestingTableSupported`.
|
|
7
|
+
const PANEL_C1_CONTAINER_CHILD_TYPES = ['expand', 'panel', 'blockquote', 'bodiedExtension'];
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Returns true if the schema supports nesting a container node (expand, nested panel,
|
|
11
|
+
* blockquote or bodiedExtension) inside a panel (panel_c1 variant), AND the consolidated
|
|
12
|
+
* `platform_editor_nest_container_in_panel` experiment is enabled.
|
|
13
|
+
*
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const supportsContainerInPanel = isPanelNestingContainerSupported(state.schema);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export const isPanelNestingContainerSupported = schema => {
|
|
19
|
+
const {
|
|
20
|
+
panel_c1
|
|
21
|
+
} = schema.nodes;
|
|
22
|
+
if (!panel_c1) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Confirm the PM schema actually allows at least one container child inside panel_c1.
|
|
27
|
+
const panelC1CanContainAnyContainer = PANEL_C1_CONTAINER_CHILD_TYPES.some(type => {
|
|
28
|
+
var _panel_c1$contentMatc;
|
|
29
|
+
const childType = schema.nodes[type];
|
|
30
|
+
return !!childType && ((_panel_c1$contentMatc = panel_c1.contentMatch.matchType(childType)) === null || _panel_c1$contentMatc === void 0 ? void 0 : _panel_c1$contentMatc.validEnd) === true;
|
|
31
|
+
});
|
|
32
|
+
return panelC1CanContainAnyContainer && isPanelNestingContainerExperimentEnabled();
|
|
33
|
+
};
|
|
@@ -9,6 +9,8 @@ export { isNestedTablesSupported } from './isNestedTablesSupported';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
10
10
|
export { isPanelNestingTableSupported } from './isPanelNestingTableSupported';
|
|
11
11
|
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
12
|
-
export {
|
|
12
|
+
export { isPanelNestingContainerSupported } from './isPanelNestingContainerSupported';
|
|
13
|
+
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
14
|
+
export { isPanelNestingContainerExperimentEnabled } from './isPanelNestingContainerExperimentEnabled';
|
|
13
15
|
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
14
16
|
export { isPanelC1SchemaEnabled } from './isPanelC1SchemaEnabled';
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "118.
|
|
17
|
+
const packageVersion = "118.4.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -4,16 +4,19 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
4
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
5
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
6
6
|
import { isNestedTablesSupported } from '../nesting/isNestedTablesSupported';
|
|
7
|
-
import {
|
|
7
|
+
import { isPanelC1SchemaEnabled } from '../nesting/isPanelC1SchemaEnabled';
|
|
8
|
+
import { isPanelNestingContainerExperimentEnabled } from '../nesting/isPanelNestingContainerExperimentEnabled';
|
|
9
|
+
import { isPanelNestingContainerSupported } from '../nesting/isPanelNestingContainerSupported';
|
|
8
10
|
import { isPanelNestingTableSupported } from '../nesting/isPanelNestingTableSupported';
|
|
9
11
|
import { sanitizeNodeForPrivacy } from './filter/privacy-filter';
|
|
10
12
|
import { findAndTrackUnsupportedContentNodes } from './track-unsupported-content';
|
|
11
13
|
import { validateADFEntity } from './validate-using-spec';
|
|
12
14
|
|
|
13
|
-
// Gate the generalised (table + expand
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
|
|
15
|
+
// Gate the generalised (table + expand + panel + blockquote + bodiedExtension) panel_c1
|
|
16
|
+
// fallback behind the consolidated container-in-panel experiment. The in-production
|
|
17
|
+
// table-in-panel path keeps using the deprecated table-only transform until
|
|
18
|
+
// platform_editor_nest_container_in_panel is rolled out.
|
|
19
|
+
const runPanelC1FallbackTransform = (schema, adf) => isPanelNestingContainerExperimentEnabled() ? panelC1FallbackTransformV2(schema, adf) : panelC1FallbackTransform(schema, adf);
|
|
17
20
|
const transformNestedTablesWithAnalytics = (node, dispatchAnalyticsEvent) => {
|
|
18
21
|
try {
|
|
19
22
|
const {
|
|
@@ -328,11 +331,11 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
|
|
|
328
331
|
// This matches the renderer's behavior in render-document.ts
|
|
329
332
|
const allowNestedTables = isNestedTablesSupported(schema);
|
|
330
333
|
const allowTableInPanel = isPanelNestingTableSupported(schema);
|
|
331
|
-
const
|
|
332
|
-
const validateADFEntityOptions = allowNestedTables || allowTableInPanel ||
|
|
334
|
+
const allowContainerInPanel = isPanelNestingContainerSupported(schema);
|
|
335
|
+
const validateADFEntityOptions = allowNestedTables || allowTableInPanel || allowContainerInPanel ? {
|
|
333
336
|
allowNestedTables: allowNestedTables || undefined,
|
|
334
337
|
allowTableInPanel: allowTableInPanel || undefined,
|
|
335
|
-
|
|
338
|
+
allowContainerInPanel: allowContainerInPanel || undefined
|
|
336
339
|
} : undefined;
|
|
337
340
|
let entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent, validateADFEntityOptions);
|
|
338
341
|
|
|
@@ -344,7 +347,7 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
|
|
|
344
347
|
|
|
345
348
|
// The container-node promotion (panel -> panel_c1) is schema-driven and shared across
|
|
346
349
|
// nesting scenarios, so it runs when any panel container-variant experiment is on.
|
|
347
|
-
if (
|
|
350
|
+
if (isPanelC1SchemaEnabled()) {
|
|
348
351
|
({
|
|
349
352
|
transformedAdf
|
|
350
353
|
} = transformContainerNodesWithAnalytics(entity, schema, dispatchAnalyticsEvent));
|
|
@@ -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 = "118.
|
|
23
|
+
var packageVersion = "118.4.0";
|
|
24
24
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
25
25
|
// Remove URL as it has UGC
|
|
26
26
|
// Ignored via go/ees007
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
|
+
import { isPanelNestingContainerExperimentEnabled } from './isPanelNestingContainerExperimentEnabled';
|
|
2
3
|
|
|
3
4
|
/*
|
|
4
5
|
* Returns true when any panel container-variant nesting experiment is enabled, i.e. when the
|
|
5
6
|
* `panel_c1` node should exist in the schema and be handled by the panel plugin/renderer.
|
|
6
7
|
*
|
|
7
|
-
* `panel_c1` is a single shared node
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* `panel_c1` is a single shared node whose content depends on which scenario is enabled:
|
|
9
|
+
* - the in-production table scenario is gated by `platform_editor_nest_table_in_panel`
|
|
10
|
+
* (registered in the legacy editor experiments config), and
|
|
11
|
+
* - the consolidated expand / nested panel / blockquote / bodiedExtension scenario ships behind
|
|
12
|
+
* `platform_editor_nest_container_in_panel` (a platform feature experiment).
|
|
13
|
+
* Registration, node views, click handlers and insertion logic are common to the node, so they
|
|
14
|
+
* should be active when EITHER experiment is on. The concrete content model (table-only vs the
|
|
15
|
+
* full container set) is selected per experiment where the node spec is built.
|
|
11
16
|
*
|
|
12
17
|
* ```typescript
|
|
13
18
|
* if (isPanelC1SchemaEnabled()) {
|
|
@@ -16,5 +21,5 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
16
21
|
* ```
|
|
17
22
|
*/
|
|
18
23
|
export var isPanelC1SchemaEnabled = function isPanelC1SchemaEnabled() {
|
|
19
|
-
return expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ||
|
|
24
|
+
return expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) || isPanelNestingContainerExperimentEnabled();
|
|
20
25
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Single source of truth for the consolidated container-in-panel experiment gate.
|
|
5
|
+
*
|
|
6
|
+
* `platform_editor_nest_container_in_panel` unlocks nesting expand, a nested panel, blockquote
|
|
7
|
+
* and bodiedExtension inside `panel_c1`. It is a platform feature experiment (managed in
|
|
8
|
+
* Statsig), not a legacy editor experiment, so it is read via `@atlaskit/platform-feature-experiments`.
|
|
9
|
+
*
|
|
10
|
+
* The in-production table-in-panel scenario is a separate, independently-rolled-out flag
|
|
11
|
+
* (`platform_editor_nest_table_in_panel`) and is intentionally not covered here.
|
|
12
|
+
*/
|
|
13
|
+
export var isPanelNestingContainerExperimentEnabled = function isPanelNestingContainerExperimentEnabled() {
|
|
14
|
+
return isExperimentEnabled('platform_editor_nest_container_in_panel');
|
|
15
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { isPanelNestingContainerExperimentEnabled } from './isPanelNestingContainerExperimentEnabled';
|
|
2
|
+
|
|
3
|
+
// The container children unlocked on panel_c1 by the consolidated
|
|
4
|
+
// `platform_editor_nest_container_in_panel` experiment. `table` is intentionally excluded:
|
|
5
|
+
// it ships independently under `platform_editor_nest_table_in_panel` and is checked by
|
|
6
|
+
// `isPanelNestingTableSupported`.
|
|
7
|
+
var PANEL_C1_CONTAINER_CHILD_TYPES = ['expand', 'panel', 'blockquote', 'bodiedExtension'];
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Returns true if the schema supports nesting a container node (expand, nested panel,
|
|
11
|
+
* blockquote or bodiedExtension) inside a panel (panel_c1 variant), AND the consolidated
|
|
12
|
+
* `platform_editor_nest_container_in_panel` experiment is enabled.
|
|
13
|
+
*
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const supportsContainerInPanel = isPanelNestingContainerSupported(state.schema);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export var isPanelNestingContainerSupported = function isPanelNestingContainerSupported(schema) {
|
|
19
|
+
var panel_c1 = schema.nodes.panel_c1;
|
|
20
|
+
if (!panel_c1) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Confirm the PM schema actually allows at least one container child inside panel_c1.
|
|
25
|
+
var panelC1CanContainAnyContainer = PANEL_C1_CONTAINER_CHILD_TYPES.some(function (type) {
|
|
26
|
+
var _panel_c1$contentMatc;
|
|
27
|
+
var childType = schema.nodes[type];
|
|
28
|
+
return !!childType && ((_panel_c1$contentMatc = panel_c1.contentMatch.matchType(childType)) === null || _panel_c1$contentMatc === void 0 ? void 0 : _panel_c1$contentMatc.validEnd) === true;
|
|
29
|
+
});
|
|
30
|
+
return panelC1CanContainAnyContainer && isPanelNestingContainerExperimentEnabled();
|
|
31
|
+
};
|
|
@@ -9,6 +9,8 @@ export { isNestedTablesSupported } from './isNestedTablesSupported';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
10
10
|
export { isPanelNestingTableSupported } from './isPanelNestingTableSupported';
|
|
11
11
|
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
12
|
-
export {
|
|
12
|
+
export { isPanelNestingContainerSupported } from './isPanelNestingContainerSupported';
|
|
13
|
+
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
14
|
+
export { isPanelNestingContainerExperimentEnabled } from './isPanelNestingContainerExperimentEnabled';
|
|
13
15
|
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
14
16
|
export { isPanelC1SchemaEnabled } from './isPanelC1SchemaEnabled';
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "118.
|
|
24
|
+
var packageVersion = "118.4.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -4,17 +4,20 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
4
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
5
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
6
6
|
import { isNestedTablesSupported } from '../nesting/isNestedTablesSupported';
|
|
7
|
-
import {
|
|
7
|
+
import { isPanelC1SchemaEnabled } from '../nesting/isPanelC1SchemaEnabled';
|
|
8
|
+
import { isPanelNestingContainerExperimentEnabled } from '../nesting/isPanelNestingContainerExperimentEnabled';
|
|
9
|
+
import { isPanelNestingContainerSupported } from '../nesting/isPanelNestingContainerSupported';
|
|
8
10
|
import { isPanelNestingTableSupported } from '../nesting/isPanelNestingTableSupported';
|
|
9
11
|
import { sanitizeNodeForPrivacy } from './filter/privacy-filter';
|
|
10
12
|
import { findAndTrackUnsupportedContentNodes } from './track-unsupported-content';
|
|
11
13
|
import { validateADFEntity } from './validate-using-spec';
|
|
12
14
|
|
|
13
|
-
// Gate the generalised (table + expand
|
|
14
|
-
//
|
|
15
|
-
//
|
|
15
|
+
// Gate the generalised (table + expand + panel + blockquote + bodiedExtension) panel_c1
|
|
16
|
+
// fallback behind the consolidated container-in-panel experiment. The in-production
|
|
17
|
+
// table-in-panel path keeps using the deprecated table-only transform until
|
|
18
|
+
// platform_editor_nest_container_in_panel is rolled out.
|
|
16
19
|
var runPanelC1FallbackTransform = function runPanelC1FallbackTransform(schema, adf) {
|
|
17
|
-
return
|
|
20
|
+
return isPanelNestingContainerExperimentEnabled() ? panelC1FallbackTransformV2(schema, adf) : panelC1FallbackTransform(schema, adf);
|
|
18
21
|
};
|
|
19
22
|
var transformNestedTablesWithAnalytics = function transformNestedTablesWithAnalytics(node, dispatchAnalyticsEvent) {
|
|
20
23
|
try {
|
|
@@ -321,11 +324,11 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
|
|
|
321
324
|
// This matches the renderer's behavior in render-document.ts
|
|
322
325
|
var allowNestedTables = isNestedTablesSupported(schema);
|
|
323
326
|
var allowTableInPanel = isPanelNestingTableSupported(schema);
|
|
324
|
-
var
|
|
325
|
-
var validateADFEntityOptions = allowNestedTables || allowTableInPanel ||
|
|
327
|
+
var allowContainerInPanel = isPanelNestingContainerSupported(schema);
|
|
328
|
+
var validateADFEntityOptions = allowNestedTables || allowTableInPanel || allowContainerInPanel ? {
|
|
326
329
|
allowNestedTables: allowNestedTables || undefined,
|
|
327
330
|
allowTableInPanel: allowTableInPanel || undefined,
|
|
328
|
-
|
|
331
|
+
allowContainerInPanel: allowContainerInPanel || undefined
|
|
329
332
|
} : undefined;
|
|
330
333
|
var entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent, validateADFEntityOptions);
|
|
331
334
|
|
|
@@ -336,7 +339,7 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
|
|
|
336
339
|
|
|
337
340
|
// The container-node promotion (panel -> panel_c1) is schema-driven and shared across
|
|
338
341
|
// nesting scenarios, so it runs when any panel container-variant experiment is on.
|
|
339
|
-
if (
|
|
342
|
+
if (isPanelC1SchemaEnabled()) {
|
|
340
343
|
var _transformContainerNo3 = transformContainerNodesWithAnalytics(entity, schema, dispatchAnalyticsEvent);
|
|
341
344
|
transformedAdf = _transformContainerNo3.transformedAdf;
|
|
342
345
|
entity = transformedAdf;
|
|
@@ -23,8 +23,8 @@ type SyncedBlockErrorAttributes = {
|
|
|
23
23
|
*/
|
|
24
24
|
sourceProduct?: string;
|
|
25
25
|
/**
|
|
26
|
-
* Categorical failure cause for dashboard grouping.
|
|
27
|
-
*
|
|
26
|
+
* Categorical failure cause for dashboard grouping. Populated when error
|
|
27
|
+
* attribution data is available (EDITOR-7796 / EDITOR-7862).
|
|
28
28
|
*/
|
|
29
29
|
reason?: SyncedBlockErrorReasonAttribute;
|
|
30
30
|
/** Backend HTTP status code when the failure came from a `BlockError`. */
|
|
@@ -33,7 +33,7 @@ type SyncedBlockErrorAttributes = {
|
|
|
33
33
|
* Whether the failure reason is a benign/working-as-designed outcome (e.g. the source
|
|
34
34
|
* was intentionally deleted/unpublished, or permission denied) rather than a genuine
|
|
35
35
|
* system failure. Lets the dashboard compute a true error rate without free-text regex.
|
|
36
|
-
* Only emitted on fetch/subscribe error events
|
|
36
|
+
* Only emitted on fetch/subscribe error events (EDITOR-7862).
|
|
37
37
|
*/
|
|
38
38
|
benign?: boolean;
|
|
39
39
|
};
|
|
@@ -75,8 +75,8 @@ type SyncedBlockEditSourceAttributes = SyncedBlockSuccessAttributes & {
|
|
|
75
75
|
sameDocument?: boolean;
|
|
76
76
|
};
|
|
77
77
|
/**
|
|
78
|
-
* Source `syncedBlockCreate` success attrs. Both optional so
|
|
79
|
-
*
|
|
78
|
+
* Source `syncedBlockCreate` success attrs. Both optional so legacy payloads
|
|
79
|
+
* are unchanged. `inputMethod`: creating surface (enum, PII-safe).
|
|
80
80
|
* `createdEmpty`: true when created from an empty selection, false when content
|
|
81
81
|
* was converted into the block.
|
|
82
82
|
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the consolidated container-in-panel experiment gate.
|
|
3
|
+
*
|
|
4
|
+
* `platform_editor_nest_container_in_panel` unlocks nesting expand, a nested panel, blockquote
|
|
5
|
+
* and bodiedExtension inside `panel_c1`. It is a platform feature experiment (managed in
|
|
6
|
+
* Statsig), not a legacy editor experiment, so it is read via `@atlaskit/platform-feature-experiments`.
|
|
7
|
+
*
|
|
8
|
+
* The in-production table-in-panel scenario is a separate, independently-rolled-out flag
|
|
9
|
+
* (`platform_editor_nest_table_in_panel`) and is intentionally not covered here.
|
|
10
|
+
*/
|
|
11
|
+
export declare const isPanelNestingContainerExperimentEnabled: () => boolean;
|
|
@@ -3,5 +3,6 @@ export { getPositionAfterTopParentNodeOfType } from './getPositionAfterTopParent
|
|
|
3
3
|
export { isSelectionTableNestedInTable } from './isSelectionTableNestedInTable';
|
|
4
4
|
export { isNestedTablesSupported } from './isNestedTablesSupported';
|
|
5
5
|
export { isPanelNestingTableSupported } from './isPanelNestingTableSupported';
|
|
6
|
-
export {
|
|
6
|
+
export { isPanelNestingContainerSupported } from './isPanelNestingContainerSupported';
|
|
7
|
+
export { isPanelNestingContainerExperimentEnabled } from './isPanelNestingContainerExperimentEnabled';
|
|
7
8
|
export { isPanelC1SchemaEnabled } from './isPanelC1SchemaEnabled';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "118.
|
|
3
|
+
"version": "118.4.1",
|
|
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/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/activity-provider": "^3.0.0",
|
|
32
|
-
"@atlaskit/adf-schema": "^56.
|
|
32
|
+
"@atlaskit/adf-schema": "^56.7.0",
|
|
33
33
|
"@atlaskit/adf-utils": "^20.5.0",
|
|
34
34
|
"@atlaskit/afm-i18n-platform-editor-editor-common": "2.200.0",
|
|
35
35
|
"@atlaskit/analytics-listeners": "^11.1.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@atlaskit/editor-tables": "^3.0.0",
|
|
50
50
|
"@atlaskit/editor-toolbar": "^2.4.0",
|
|
51
51
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
52
|
-
"@atlaskit/emoji": "^71.
|
|
52
|
+
"@atlaskit/emoji": "^71.16.0",
|
|
53
53
|
"@atlaskit/feature-gate-js-client": "^6.0.0",
|
|
54
54
|
"@atlaskit/icon": "^37.3.0",
|
|
55
55
|
"@atlaskit/link": "^5.0.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@atlaskit/platform-feature-flags-react": "^1.1.0",
|
|
73
73
|
"@atlaskit/popper": "^9.1.0",
|
|
74
74
|
"@atlaskit/primitives": "^22.2.0",
|
|
75
|
-
"@atlaskit/profilecard": "^26.
|
|
75
|
+
"@atlaskit/profilecard": "^26.17.0",
|
|
76
76
|
"@atlaskit/prosemirror-history": "^1.1.0",
|
|
77
77
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
78
78
|
"@atlaskit/react-ufo": "^7.3.0",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"@atlaskit/task-decision": "^21.8.0",
|
|
84
84
|
"@atlaskit/teams-app-config": "^2.2.0",
|
|
85
85
|
"@atlaskit/textfield": "^10.0.0",
|
|
86
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
87
|
-
"@atlaskit/tokens": "^16.
|
|
86
|
+
"@atlaskit/tmp-editor-statsig": "^146.0.0",
|
|
87
|
+
"@atlaskit/tokens": "^16.6.0",
|
|
88
88
|
"@atlaskit/tooltip": "^24.0.0",
|
|
89
89
|
"@atlaskit/width-detector": "^7.0.0",
|
|
90
90
|
"@babel/runtime": "^7.0.0",
|
|
@@ -101,9 +101,9 @@
|
|
|
101
101
|
"date-fns": "^2.17.0",
|
|
102
102
|
"focus-trap": "^2.4.5",
|
|
103
103
|
"fuse.js": "^6.6.2",
|
|
104
|
-
"linkify-it": "^
|
|
104
|
+
"linkify-it": "^5.0.2",
|
|
105
105
|
"lodash": "^4.17.21",
|
|
106
|
-
"markdown-it": "^
|
|
106
|
+
"markdown-it": "^14.1.1",
|
|
107
107
|
"memoize-one": "^6.0.0",
|
|
108
108
|
"popper.js": "^1.14.1",
|
|
109
109
|
"prop-types": "^15.5.10",
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"@testing-library/react": "^16.3.0",
|
|
134
134
|
"@testing-library/user-event": "^14.4.3",
|
|
135
135
|
"@types/jscodeshift": "^0.11.0",
|
|
136
|
-
"@types/linkify-it": "^
|
|
136
|
+
"@types/linkify-it": "^5.0.0",
|
|
137
137
|
"@types/markdown-it": "^14.1.2",
|
|
138
138
|
"@types/raf-schd": "^4.0.1",
|
|
139
139
|
"@types/react-virtualized": "^9.18.12",
|
|
@@ -168,10 +168,6 @@
|
|
|
168
168
|
"type": "boolean",
|
|
169
169
|
"referenceOnly": true
|
|
170
170
|
},
|
|
171
|
-
"rovo_chat_mention_agents": {
|
|
172
|
-
"type": "experiment",
|
|
173
|
-
"referenceOnly": true
|
|
174
|
-
},
|
|
175
171
|
"platform_editor_lovability_text_bg_color_patch_2": {
|
|
176
172
|
"type": "boolean"
|
|
177
173
|
},
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isPanelNestingExpandSupported = void 0;
|
|
7
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
8
|
-
/*
|
|
9
|
-
* Returns true if the schema supports nesting an expand inside a panel (panel_c1 variant),
|
|
10
|
-
* AND the `platform_editor_nest_expand_in_panel` experiment is enabled.
|
|
11
|
-
*
|
|
12
|
-
* ```typescript
|
|
13
|
-
* const supportsExpandInPanel = isPanelNestingExpandSupported(state.schema);
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
var isPanelNestingExpandSupported = exports.isPanelNestingExpandSupported = function isPanelNestingExpandSupported(schema) {
|
|
17
|
-
var _panel_c1$contentMatc;
|
|
18
|
-
var _schema$nodes = schema.nodes,
|
|
19
|
-
expand = _schema$nodes.expand,
|
|
20
|
-
panel_c1 = _schema$nodes.panel_c1;
|
|
21
|
-
if (!expand || !panel_c1) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Confirm the PM schema actually allows expand inside panel_c1
|
|
26
|
-
var panelC1CanContainExpand = ((_panel_c1$contentMatc = panel_c1.contentMatch.matchType(expand)) === null || _panel_c1$contentMatc === void 0 ? void 0 : _panel_c1$contentMatc.validEnd) === true;
|
|
27
|
-
return panelC1CanContainExpand && (0, _expValEquals.expValEquals)('platform_editor_nest_expand_in_panel', 'isEnabled', true);
|
|
28
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Returns true if the schema supports nesting an expand inside a panel (panel_c1 variant),
|
|
5
|
-
* AND the `platform_editor_nest_expand_in_panel` experiment is enabled.
|
|
6
|
-
*
|
|
7
|
-
* ```typescript
|
|
8
|
-
* const supportsExpandInPanel = isPanelNestingExpandSupported(state.schema);
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
11
|
-
export const isPanelNestingExpandSupported = schema => {
|
|
12
|
-
var _panel_c1$contentMatc;
|
|
13
|
-
const {
|
|
14
|
-
expand,
|
|
15
|
-
panel_c1
|
|
16
|
-
} = schema.nodes;
|
|
17
|
-
if (!expand || !panel_c1) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Confirm the PM schema actually allows expand inside panel_c1
|
|
22
|
-
const panelC1CanContainExpand = ((_panel_c1$contentMatc = panel_c1.contentMatch.matchType(expand)) === null || _panel_c1$contentMatc === void 0 ? void 0 : _panel_c1$contentMatc.validEnd) === true;
|
|
23
|
-
return panelC1CanContainExpand && expValEquals('platform_editor_nest_expand_in_panel', 'isEnabled', true);
|
|
24
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Returns true if the schema supports nesting an expand inside a panel (panel_c1 variant),
|
|
5
|
-
* AND the `platform_editor_nest_expand_in_panel` experiment is enabled.
|
|
6
|
-
*
|
|
7
|
-
* ```typescript
|
|
8
|
-
* const supportsExpandInPanel = isPanelNestingExpandSupported(state.schema);
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
11
|
-
export var isPanelNestingExpandSupported = function isPanelNestingExpandSupported(schema) {
|
|
12
|
-
var _panel_c1$contentMatc;
|
|
13
|
-
var _schema$nodes = schema.nodes,
|
|
14
|
-
expand = _schema$nodes.expand,
|
|
15
|
-
panel_c1 = _schema$nodes.panel_c1;
|
|
16
|
-
if (!expand || !panel_c1) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Confirm the PM schema actually allows expand inside panel_c1
|
|
21
|
-
var panelC1CanContainExpand = ((_panel_c1$contentMatc = panel_c1.contentMatch.matchType(expand)) === null || _panel_c1$contentMatc === void 0 ? void 0 : _panel_c1$contentMatc.validEnd) === true;
|
|
22
|
-
return panelC1CanContainExpand && expValEquals('platform_editor_nest_expand_in_panel', 'isEnabled', true);
|
|
23
|
-
};
|