@atlaskit/editor-plugin-show-diff 15.1.3 → 15.1.4
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 +15 -0
- package/dist/cjs/pm-plugins/calculateDiff/calculateDiffDecorations.js +6 -1
- package/dist/cjs/showDiffPlugin.js +6 -1
- package/dist/es2019/pm-plugins/calculateDiff/calculateDiffDecorations.js +6 -1
- package/dist/es2019/showDiffPlugin.js +6 -1
- package/dist/esm/pm-plugins/calculateDiff/calculateDiffDecorations.js +6 -1
- package/dist/esm/showDiffPlugin.js +6 -1
- package/package.json +4 -4
- package/afm-cc/tsconfig.json +0 -63
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-show-diff
|
|
2
2
|
|
|
3
|
+
## 15.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1cd03bc12ef72`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1cd03bc12ef72) -
|
|
8
|
+
Gate the Milestone 1 streaming UX controls behind the
|
|
9
|
+
`platform_editor_ai_streaming_ux_experience_m1` master experiment. The New AIFC editor experience,
|
|
10
|
+
quick actions block streaming, streaming grey-out suppression, Review moment auto-open, diff-based
|
|
11
|
+
segmenting, quick actions agent attribution, the reveal animation and hide-pure-deletions in the
|
|
12
|
+
diff viewer now each require both the master experiment and their existing individual gate, so no
|
|
13
|
+
M1 slice can ship outside the M1 cohort while each slice stays independently reversible. Non-AI
|
|
14
|
+
callers of the diff viewer are not enrolled in the experiment and default to their existing
|
|
15
|
+
behaviour.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 15.1.3
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -14,6 +14,7 @@ var _prosemirrorChangeset = require("prosemirror-changeset");
|
|
|
14
14
|
var _document = require("@atlaskit/editor-common/utils/document");
|
|
15
15
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
16
16
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
17
|
+
var _unsafeExpValNoExposure = require("@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure");
|
|
17
18
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
18
19
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
19
20
|
var _areDocsEqualByBlockStructureAndText = require("../areDocsEqualByBlockStructureAndText");
|
|
@@ -267,13 +268,17 @@ var isDeletedContentPlacedBelow = exports.isDeletedContentPlacedBelow = function
|
|
|
267
268
|
* `inline` emits delete-only changes, so it did.
|
|
268
269
|
*
|
|
269
270
|
* With the gate off this returns exactly what both callers computed before it existed.
|
|
271
|
+
*
|
|
272
|
+
* Umbrella experiment: within the AI streaming UX M1 population this behaviour is only enabled
|
|
273
|
+
* for the treatment cohort. Non-AI callers (track-changes, etc.) are not enrolled and default
|
|
274
|
+
* to `true`, preserving the pre-umbrella baseline.
|
|
270
275
|
*/
|
|
271
276
|
var shouldHideDeletedSide = function shouldHideDeletedSide(_ref7) {
|
|
272
277
|
var change = _ref7.change,
|
|
273
278
|
diffType = _ref7.diffType,
|
|
274
279
|
hideDeletedDiffs = _ref7.hideDeletedDiffs,
|
|
275
280
|
isInverted = _ref7.isInverted;
|
|
276
|
-
return (0, _isExtendedEnabled.isExtendedEnabled)(diffType) && !isInverted && !!hideDeletedDiffs && (change.inserted.length > 0 || (0, _fg.fg)('platform_editor_diff_hide_pure_deletions'));
|
|
281
|
+
return (0, _isExtendedEnabled.isExtendedEnabled)(diffType) && !isInverted && !!hideDeletedDiffs && (change.inserted.length > 0 || (0, _fg.fg)('platform_editor_diff_hide_pure_deletions') && (0, _unsafeExpValNoExposure.UNSAFE_expValNoExposure)('platform_editor_ai_streaming_ux_experience_m1', 'isEnabled', false) === true);
|
|
277
282
|
};
|
|
278
283
|
var calculateDiffDecorationsInner = function calculateDiffDecorationsInner(_ref8) {
|
|
279
284
|
var state = _ref8.state,
|
|
@@ -8,6 +8,7 @@ exports.showDiffPlugin = void 0;
|
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _unsafeExpValNoExposure = require("@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure");
|
|
11
12
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
12
13
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
14
|
var _attributions = require("./pm-plugins/decorations/colorSchemes/attributions");
|
|
@@ -52,11 +53,15 @@ var prefersReducedMotion = function prefersReducedMotion() {
|
|
|
52
53
|
* Resolve reveal preconditions once here so decorations and animation share one answer. If
|
|
53
54
|
* decorations think a reveal is happening but animation doesn't, highlight paints hidden forever.
|
|
54
55
|
* All preconditions resolved here (not just gate) ensures "unable to animate" means "do not reveal".
|
|
56
|
+
*
|
|
57
|
+
* Umbrella experiment: within the AI streaming UX M1 population this behaviour is only enabled
|
|
58
|
+
* for the treatment cohort. Non-AI callers (track-changes, etc.) are not enrolled and default
|
|
59
|
+
* to `true`, preserving the pre-umbrella baseline.
|
|
55
60
|
*/
|
|
56
61
|
var resolveReveal = function resolveReveal(reveal, editorView) {
|
|
57
62
|
return (
|
|
58
63
|
// Gate first, so it is the primary switch and is always observable once a reveal is requested.
|
|
59
|
-
reveal && (0, _fg.fg)('platform_editor_diff_reveal_animation') && editorView && typeof window !== 'undefined' && !prefersReducedMotion() ? reveal : undefined
|
|
64
|
+
reveal && (0, _fg.fg)('platform_editor_diff_reveal_animation') && (0, _unsafeExpValNoExposure.UNSAFE_expValNoExposure)('platform_editor_ai_streaming_ux_experience_m1', 'isEnabled', false) === true && editorView && typeof window !== 'undefined' && !prefersReducedMotion() ? reveal : undefined
|
|
60
65
|
);
|
|
61
66
|
};
|
|
62
67
|
var showDiffPlugin = exports.showDiffPlugin = function showDiffPlugin(_ref3) {
|
|
@@ -4,6 +4,7 @@ import { ChangeSet, simplifyChanges } from 'prosemirror-changeset';
|
|
|
4
4
|
import { areNodesEqualIgnoreAttrs } from '@atlaskit/editor-common/utils/document';
|
|
5
5
|
import { Mapping } from '@atlaskit/editor-prosemirror/transform';
|
|
6
6
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
+
import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
|
|
7
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
10
|
import { areDocsEqualByBlockStructureAndText } from '../areDocsEqualByBlockStructureAndText';
|
|
@@ -244,13 +245,17 @@ export const isDeletedContentPlacedBelow = ({
|
|
|
244
245
|
* `inline` emits delete-only changes, so it did.
|
|
245
246
|
*
|
|
246
247
|
* With the gate off this returns exactly what both callers computed before it existed.
|
|
248
|
+
*
|
|
249
|
+
* Umbrella experiment: within the AI streaming UX M1 population this behaviour is only enabled
|
|
250
|
+
* for the treatment cohort. Non-AI callers (track-changes, etc.) are not enrolled and default
|
|
251
|
+
* to `true`, preserving the pre-umbrella baseline.
|
|
247
252
|
*/
|
|
248
253
|
const shouldHideDeletedSide = ({
|
|
249
254
|
change,
|
|
250
255
|
diffType,
|
|
251
256
|
hideDeletedDiffs,
|
|
252
257
|
isInverted
|
|
253
|
-
}) => isExtendedEnabled(diffType) && !isInverted && !!hideDeletedDiffs && (change.inserted.length > 0 || fg('platform_editor_diff_hide_pure_deletions'));
|
|
258
|
+
}) => isExtendedEnabled(diffType) && !isInverted && !!hideDeletedDiffs && (change.inserted.length > 0 || fg('platform_editor_diff_hide_pure_deletions') && UNSAFE_expValNoExposure('platform_editor_ai_streaming_ux_experience_m1', 'isEnabled', false) === true);
|
|
254
259
|
const calculateDiffDecorationsInner = ({
|
|
255
260
|
state,
|
|
256
261
|
pluginState,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
|
|
2
3
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
import { areAttributionColorGatesEnabled, resolveContributors } from './pm-plugins/decorations/colorSchemes/attributions';
|
|
@@ -40,10 +41,14 @@ const prefersReducedMotion = () => typeof window !== 'undefined' && typeof windo
|
|
|
40
41
|
* Resolve reveal preconditions once here so decorations and animation share one answer. If
|
|
41
42
|
* decorations think a reveal is happening but animation doesn't, highlight paints hidden forever.
|
|
42
43
|
* All preconditions resolved here (not just gate) ensures "unable to animate" means "do not reveal".
|
|
44
|
+
*
|
|
45
|
+
* Umbrella experiment: within the AI streaming UX M1 population this behaviour is only enabled
|
|
46
|
+
* for the treatment cohort. Non-AI callers (track-changes, etc.) are not enrolled and default
|
|
47
|
+
* to `true`, preserving the pre-umbrella baseline.
|
|
43
48
|
*/
|
|
44
49
|
const resolveReveal = (reveal, editorView) =>
|
|
45
50
|
// Gate first, so it is the primary switch and is always observable once a reveal is requested.
|
|
46
|
-
reveal && fg('platform_editor_diff_reveal_animation') && editorView && typeof window !== 'undefined' && !prefersReducedMotion() ? reveal : undefined;
|
|
51
|
+
reveal && fg('platform_editor_diff_reveal_animation') && UNSAFE_expValNoExposure('platform_editor_ai_streaming_ux_experience_m1', 'isEnabled', false) === true && editorView && typeof window !== 'undefined' && !prefersReducedMotion() ? reveal : undefined;
|
|
47
52
|
export const showDiffPlugin = ({
|
|
48
53
|
api,
|
|
49
54
|
config
|
|
@@ -12,6 +12,7 @@ import { ChangeSet, simplifyChanges } from 'prosemirror-changeset';
|
|
|
12
12
|
import { areNodesEqualIgnoreAttrs } from '@atlaskit/editor-common/utils/document';
|
|
13
13
|
import { Mapping } from '@atlaskit/editor-prosemirror/transform';
|
|
14
14
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
15
|
+
import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
|
|
15
16
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
17
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
18
|
import { areDocsEqualByBlockStructureAndText } from '../areDocsEqualByBlockStructureAndText';
|
|
@@ -260,13 +261,17 @@ export var isDeletedContentPlacedBelow = function isDeletedContentPlacedBelow(_r
|
|
|
260
261
|
* `inline` emits delete-only changes, so it did.
|
|
261
262
|
*
|
|
262
263
|
* With the gate off this returns exactly what both callers computed before it existed.
|
|
264
|
+
*
|
|
265
|
+
* Umbrella experiment: within the AI streaming UX M1 population this behaviour is only enabled
|
|
266
|
+
* for the treatment cohort. Non-AI callers (track-changes, etc.) are not enrolled and default
|
|
267
|
+
* to `true`, preserving the pre-umbrella baseline.
|
|
263
268
|
*/
|
|
264
269
|
var shouldHideDeletedSide = function shouldHideDeletedSide(_ref7) {
|
|
265
270
|
var change = _ref7.change,
|
|
266
271
|
diffType = _ref7.diffType,
|
|
267
272
|
hideDeletedDiffs = _ref7.hideDeletedDiffs,
|
|
268
273
|
isInverted = _ref7.isInverted;
|
|
269
|
-
return isExtendedEnabled(diffType) && !isInverted && !!hideDeletedDiffs && (change.inserted.length > 0 || fg('platform_editor_diff_hide_pure_deletions'));
|
|
274
|
+
return isExtendedEnabled(diffType) && !isInverted && !!hideDeletedDiffs && (change.inserted.length > 0 || fg('platform_editor_diff_hide_pure_deletions') && UNSAFE_expValNoExposure('platform_editor_ai_streaming_ux_experience_m1', 'isEnabled', false) === true);
|
|
270
275
|
};
|
|
271
276
|
var calculateDiffDecorationsInner = function calculateDiffDecorationsInner(_ref8) {
|
|
272
277
|
var state = _ref8.state,
|
|
@@ -4,6 +4,7 @@ var _excluded = ["stepsWithAttribution", "contributorProfiles"];
|
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
6
|
import React from 'react';
|
|
7
|
+
import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
|
|
7
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
10
|
import { areAttributionColorGatesEnabled, resolveContributors } from './pm-plugins/decorations/colorSchemes/attributions';
|
|
@@ -45,11 +46,15 @@ var prefersReducedMotion = function prefersReducedMotion() {
|
|
|
45
46
|
* Resolve reveal preconditions once here so decorations and animation share one answer. If
|
|
46
47
|
* decorations think a reveal is happening but animation doesn't, highlight paints hidden forever.
|
|
47
48
|
* All preconditions resolved here (not just gate) ensures "unable to animate" means "do not reveal".
|
|
49
|
+
*
|
|
50
|
+
* Umbrella experiment: within the AI streaming UX M1 population this behaviour is only enabled
|
|
51
|
+
* for the treatment cohort. Non-AI callers (track-changes, etc.) are not enrolled and default
|
|
52
|
+
* to `true`, preserving the pre-umbrella baseline.
|
|
48
53
|
*/
|
|
49
54
|
var resolveReveal = function resolveReveal(reveal, editorView) {
|
|
50
55
|
return (
|
|
51
56
|
// Gate first, so it is the primary switch and is always observable once a reveal is requested.
|
|
52
|
-
reveal && fg('platform_editor_diff_reveal_animation') && editorView && typeof window !== 'undefined' && !prefersReducedMotion() ? reveal : undefined
|
|
57
|
+
reveal && fg('platform_editor_diff_reveal_animation') && UNSAFE_expValNoExposure('platform_editor_ai_streaming_ux_experience_m1', 'isEnabled', false) === true && editorView && typeof window !== 'undefined' && !prefersReducedMotion() ? reveal : undefined
|
|
53
58
|
);
|
|
54
59
|
};
|
|
55
60
|
export var showDiffPlugin = function showDiffPlugin(_ref3) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-show-diff",
|
|
3
|
-
"version": "15.1.
|
|
3
|
+
"version": "15.1.4",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"@atlaskit/editor-plugin-user-intent": "^15.0.0",
|
|
28
28
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
29
29
|
"@atlaskit/editor-shared-styles": "^4.1.0",
|
|
30
|
-
"@atlaskit/editor-tables": "^3.
|
|
30
|
+
"@atlaskit/editor-tables": "^3.2.0",
|
|
31
31
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
32
32
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
33
33
|
"@atlaskit/primitives": "^22.5.0",
|
|
34
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
34
|
+
"@atlaskit/tmp-editor-statsig": "^184.0.0",
|
|
35
35
|
"@atlaskit/tokens": "^16.11.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"@compiled/react": "^1.0.2",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlassian/confluence-presets": "workspace:^",
|
|
57
57
|
"@atlassian/content-reconciliation": "^0.1.3506",
|
|
58
58
|
"@atlassian/editor-ai-injected-editors": "^31.0.0",
|
|
59
|
-
"@atlassian/editor-plugin-ai": "^71.
|
|
59
|
+
"@atlassian/editor-plugin-ai": "^71.2.0",
|
|
60
60
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
61
61
|
"react": "^19.2.0",
|
|
62
62
|
"react-dom": "^19.2.0",
|
package/afm-cc/tsconfig.json
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../../tsconfig.local-consumption.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../../../../confluence/tsDist/@atlaskit__editor-plugin-show-diff",
|
|
5
|
-
"rootDir": "../",
|
|
6
|
-
"composite": true,
|
|
7
|
-
"noCheck": true
|
|
8
|
-
},
|
|
9
|
-
"include": [
|
|
10
|
-
"../src/**/*.ts",
|
|
11
|
-
"../src/**/*.tsx"
|
|
12
|
-
],
|
|
13
|
-
"exclude": [
|
|
14
|
-
"../src/**/__tests__/*",
|
|
15
|
-
"../src/**/*.test.*",
|
|
16
|
-
"../src/**/test.*",
|
|
17
|
-
"../src/**/examples.*"
|
|
18
|
-
],
|
|
19
|
-
"references": [
|
|
20
|
-
{
|
|
21
|
-
"path": "../../adf-schema/afm-cc/tsconfig.json"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"path": "../../../design-system/avatar/afm-cc/tsconfig.json"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"path": "../../custom-steps/afm-cc/tsconfig.json"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"path": "../../editor-plugin-analytics/afm-cc/tsconfig.json"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"path": "../../editor-plugin-user-intent/afm-cc/tsconfig.json"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"path": "../../editor-prosemirror/afm-cc/tsconfig.json"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"path": "../../editor-shared-styles/afm-cc/tsconfig.json"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"path": "../../editor-tables/afm-cc/tsconfig.json"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"path": "../../../platform/feature-experiments/afm-cc/tsconfig.json"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"path": "../../../platform/feature-flags/afm-cc/tsconfig.json"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"path": "../../../design-system/primitives/afm-cc/tsconfig.json"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"path": "../../tmp-editor-statsig/afm-cc/tsconfig.json"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"path": "../../../design-system/tokens/afm-cc/tsconfig.json"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"path": "../../editor-common/afm-cc/tsconfig.json"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|