@atlaskit/editor-plugin-show-diff 24.1.3 → 24.1.6

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/cjs/pm-plugins/NodeViewSerializer.js +6 -14
  3. package/dist/cjs/pm-plugins/decorations/colorSchemes/factory.js +61 -61
  4. package/dist/cjs/pm-plugins/decorations/colorSchemes/standard.js +30 -30
  5. package/dist/cjs/pm-plugins/decorations/colorSchemes/traditional.js +38 -38
  6. package/dist/cjs/pm-plugins/decorations/createBlockChangedDecoration.js +9 -4
  7. package/dist/cjs/pm-plugins/decorations/createBlockChangedDecoration.styles.legacy.js +2 -2
  8. package/dist/cjs/pm-plugins/decorations/createInlineChangedDecoration.js +3 -3
  9. package/dist/cjs/pm-plugins/decorations/revealStyles.js +5 -5
  10. package/dist/cjs/pm-plugins/decorations/utils/wrapBlockNodeView.js +10 -10
  11. package/dist/cjs/pm-plugins/decorations/utils/wrapBlockNodeViewStyles.legacy.js +4 -4
  12. package/dist/cjs/pm-plugins/scrollToDiff.js +2 -2
  13. package/dist/cjs/ui/ContributorTag/buildContributorTagDom.js +6 -6
  14. package/dist/cjs/ui/ContributorTag/contributorAvatarRenderer.js +7 -7
  15. package/dist/cjs/ui/IndicatorBar/IndicatorBarContentComponent.js +2 -2
  16. package/dist/es2019/pm-plugins/NodeViewSerializer.js +7 -15
  17. package/dist/es2019/pm-plugins/decorations/colorSchemes/factory.js +1 -1
  18. package/dist/es2019/pm-plugins/decorations/colorSchemes/standard.js +1 -1
  19. package/dist/es2019/pm-plugins/decorations/colorSchemes/traditional.js +1 -1
  20. package/dist/es2019/pm-plugins/decorations/createBlockChangedDecoration.js +7 -2
  21. package/dist/es2019/pm-plugins/decorations/createBlockChangedDecoration.styles.legacy.js +1 -1
  22. package/dist/es2019/pm-plugins/decorations/createInlineChangedDecoration.js +1 -1
  23. package/dist/es2019/pm-plugins/decorations/revealStyles.js +1 -1
  24. package/dist/es2019/pm-plugins/decorations/utils/wrapBlockNodeView.js +2 -2
  25. package/dist/es2019/pm-plugins/decorations/utils/wrapBlockNodeViewStyles.legacy.js +1 -1
  26. package/dist/es2019/pm-plugins/scrollToDiff.js +1 -1
  27. package/dist/es2019/ui/ContributorTag/buildContributorTagDom.js +1 -1
  28. package/dist/es2019/ui/ContributorTag/contributorAvatarRenderer.js +1 -1
  29. package/dist/es2019/ui/IndicatorBar/IndicatorBarContentComponent.js +1 -1
  30. package/dist/esm/pm-plugins/NodeViewSerializer.js +6 -14
  31. package/dist/esm/pm-plugins/decorations/colorSchemes/factory.js +1 -1
  32. package/dist/esm/pm-plugins/decorations/colorSchemes/standard.js +1 -1
  33. package/dist/esm/pm-plugins/decorations/colorSchemes/traditional.js +1 -1
  34. package/dist/esm/pm-plugins/decorations/createBlockChangedDecoration.js +7 -2
  35. package/dist/esm/pm-plugins/decorations/createBlockChangedDecoration.styles.legacy.js +1 -1
  36. package/dist/esm/pm-plugins/decorations/createInlineChangedDecoration.js +1 -1
  37. package/dist/esm/pm-plugins/decorations/revealStyles.js +1 -1
  38. package/dist/esm/pm-plugins/decorations/utils/wrapBlockNodeView.js +2 -2
  39. package/dist/esm/pm-plugins/decorations/utils/wrapBlockNodeViewStyles.legacy.js +1 -1
  40. package/dist/esm/pm-plugins/scrollToDiff.js +1 -1
  41. package/dist/esm/ui/ContributorTag/buildContributorTagDom.js +1 -1
  42. package/dist/esm/ui/ContributorTag/contributorAvatarRenderer.js +1 -1
  43. package/dist/esm/ui/IndicatorBar/IndicatorBarContentComponent.js +1 -1
  44. package/dist/types/pm-plugins/NodeViewSerializer.d.ts +1 -1
  45. package/dist/types/pm-plugins/calculateDiff/calculateDiffDecorations.d.ts +1 -1
  46. package/dist/types/pm-plugins/decorations/createContributorTagWidget.d.ts +1 -1
  47. package/dist/types/pm-plugins/main.d.ts +1 -1
  48. package/dist/types/pm-plugins/scrollToDiff.d.ts +1 -1
  49. package/dist/types/showDiffPluginType.d.ts +5 -4
  50. package/dist/types/ui/ContributorTag/contributorTagController.d.ts +1 -1
  51. package/dist/types/ui/IndicatorBar/IndicatorBarContentComponent.d.ts +1 -1
  52. package/docs/0-intro.tsx +1 -1
  53. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @atlaskit/editor-plugin-show-diff
2
2
 
3
+ ## 24.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`143a5760293cf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/143a5760293cf) -
8
+ EDITOR-9591 Preserve the agent-coloured emoji diff outline after emoji data loads
9
+ - [`2a0c61ea46c19`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2a0c61ea46c19) -
10
+ Apply scroll margins to existing block diff decorations without contributor anchors and use
11
+ styling-only decorations for otherwise unstyled nodes, preserving diff navigation and
12
+ contributor-tag grouping. Enabled behind platform_editor_ai_show_diff_patch_2 and
13
+ platform_editor_ai_show_diff_patch_1.
14
+ - Updated dependencies
15
+
16
+ ## 24.1.5
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
22
+ ## 24.1.4
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies
27
+
3
28
  ## 24.1.3
4
29
 
5
30
  ### Patch Changes
@@ -47,14 +47,6 @@ function isEditorViewWithNodeViews(view) {
47
47
  /** Expand-family nodes whose expanded state lives in a node-keyed WeakMap. */
48
48
  var EXPAND_TYPES = new Set(['expand', 'nestedExpand']);
49
49
 
50
- /** Merges an inline style string onto an element's existing `style` attribute. */
51
- var appendInlineStyle = function appendInlineStyle(element, style) {
52
- var _element$getAttribute;
53
- var currentStyle = (_element$getAttribute = element.getAttribute('style')) !== null && _element$getAttribute !== void 0 ? _element$getAttribute : '';
54
- var separator = currentStyle && style && !currentStyle.trimEnd().endsWith(';') ? '; ' : '';
55
- element.setAttribute('style', "".concat(currentStyle).concat(separator).concat(style));
56
- };
57
-
58
50
  /** Tables are the only node views that read and write positions, so only they need a preview. */
59
51
  var containsTable = function containsTable(node) {
60
52
  var table = node.type.schema.nodes.table;
@@ -121,15 +113,15 @@ var NodeViewSerializer = exports.NodeViewSerializer = /*#__PURE__*/function () {
121
113
  // Give inserted atomic children the same box-shadow
122
114
  // highlight an in-place attribute change already gets (`getAtomicInlineChangedAttrs`).
123
115
  if (isInserted && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_show_diff_deleted_nodeview_content') && (0, _getAttrChangeRanges.isInlineAttrChangeNodeName)(child.type.name) && childNode instanceof HTMLElement) {
124
- var _childNode$getAttribu;
125
116
  var _getAtomicInlineChang = (0, _createInlineChangedDecoration.getAtomicInlineChangedAttrs)(child.type.name, colorScheme),
126
117
  className = _getAtomicInlineChang.className,
127
118
  styleSuffix = _getAtomicInlineChang.styleSuffix;
128
- var existingClassName = (_childNode$getAttribu = childNode.getAttribute('class')) !== null && _childNode$getAttribu !== void 0 ? _childNode$getAttribu : '';
129
- childNode.setAttribute('class', existingClassName ? "".concat(existingClassName, " ").concat(className) : className);
130
- if (styleSuffix) {
131
- appendInlineStyle(childNode, styleSuffix);
132
- }
119
+ // create wrapper to add the diff styles to to avoid conflicting with any nodeView styles
120
+ var wrapper = document.createElement('span');
121
+ wrapper.className = className;
122
+ wrapper.setAttribute('style', styleSuffix);
123
+ wrapper.append(childNode);
124
+ childNode = wrapper;
133
125
  }
134
126
  contentDOM === null || contentDOM === void 0 || contentDOM.append(childNode);
135
127
  }
@@ -76,7 +76,7 @@ exports.getDeletedInlineRevealColors = getDeletedInlineRevealColors;
76
76
  exports.getInsertedInlineRevealColors = getInsertedInlineRevealColors;
77
77
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
78
78
  var _agentBrandColorSchemes = require("@atlaskit/agent-color/agent-brand-color-schemes");
79
- var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
79
+ var _cssHelper = require("@atlaskit/editor-common/css-helper");
80
80
  var _fg = require("@atlaskit/platform-feature-flags/fg");
81
81
  var _getStandardDeletedTextDecorationStyle = require("./getStandardDeletedTextDecorationStyle");
82
82
  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; }
@@ -272,7 +272,7 @@ function insertedInlineBorderColor(colors) {
272
272
  /** Inline inserted content — default state. */
273
273
  function buildInsertStyle(colors) {
274
274
  var brand = getBrand(colors.insertColor);
275
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({
275
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({
276
276
  background: bgSubtlest(colors.insertColor)
277
277
  }, brand ? {
278
278
  color: brand.text
@@ -286,7 +286,7 @@ function buildInsertStyle(colors) {
286
286
 
287
287
  /** Inline insert style for content within a block node (no background, underline only). */
288
288
  function buildInsertStyleInBlock(colors) {
289
- return (0, _lazyNodeView.convertToInlineCss)({
289
+ return (0, _cssHelper.convertToInlineCss)({
290
290
  textDecoration: 'underline',
291
291
  textDecorationStyle: colors.insertUnderlineStyle,
292
292
  textDecorationThickness: "var(--ds-space-025, 2px)",
@@ -297,7 +297,7 @@ function buildInsertStyleInBlock(colors) {
297
297
  /** Extended insert style — background + border-bottom underline. */
298
298
  function buildInsertStyleExtended(colors) {
299
299
  var brand = getBrand(colors.insertColor);
300
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({
300
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({
301
301
  background: bgSubtlest(colors.insertColor)
302
302
  }, brand ? {
303
303
  color: brand.text
@@ -309,7 +309,7 @@ function buildInsertStyleExtended(colors) {
309
309
 
310
310
  /** Extended insert style for content within a block node (border-bottom only, no background). */
311
311
  function buildInsertStyleInBlockExtended(colors) {
312
- return (0, _lazyNodeView.convertToInlineCss)({
312
+ return (0, _cssHelper.convertToInlineCss)({
313
313
  borderBottom: "2px solid ".concat(insertedInlineBorderColor(colors)),
314
314
  padding: "1px 0 2px"
315
315
  });
@@ -318,7 +318,7 @@ function buildInsertStyleInBlockExtended(colors) {
318
318
  /** Active state of the extended insert style. */
319
319
  function buildInsertStyleExtendedActive(colors) {
320
320
  var brand = getBrand(colors.insertColor);
321
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({
321
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({
322
322
  background: bgSubtlerPressed(colors.insertActiveColor)
323
323
  }, brand ? {
324
324
  color: brand.text
@@ -331,7 +331,7 @@ function buildInsertStyleExtendedActive(colors) {
331
331
  /** Extended insert style without underline — background + padding only. */
332
332
  function buildInsertStyleExtendedNoUnderline(colors) {
333
333
  var brand = getBrand(colors.insertColor);
334
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({
334
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({
335
335
  background: bgSubtlest(colors.insertColor)
336
336
  }, brand ? {
337
337
  color: brand.text
@@ -343,7 +343,7 @@ function buildInsertStyleExtendedNoUnderline(colors) {
343
343
  /** Active state of the no-underline extended insert style. */
344
344
  function buildInsertStyleExtendedNoUnderlineActive(colors) {
345
345
  var brand = getBrand(colors.insertColor);
346
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({
346
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({
347
347
  background: bgSubtlerPressed(colors.insertActiveColor)
348
348
  }, brand ? {
349
349
  color: brand.text
@@ -354,7 +354,7 @@ function buildInsertStyleExtendedNoUnderlineActive(colors) {
354
354
 
355
355
  /** No-underline extended insert style for block content (padding only). */
356
356
  function buildInsertStyleInBlockExtendedNoUnderline(_colors) {
357
- return (0, _lazyNodeView.convertToInlineCss)({
357
+ return (0, _cssHelper.convertToInlineCss)({
358
358
  padding: "1px 0 2px"
359
359
  });
360
360
  }
@@ -362,7 +362,7 @@ function buildInsertStyleInBlockExtendedNoUnderline(_colors) {
362
362
  /** Inline inserted content — active/focused state. */
363
363
  function buildInsertStyleActive(colors) {
364
364
  var brand = getBrand(colors.insertColor);
365
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({
365
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({
366
366
  background: bgSubtlerPressed(colors.insertActiveColor)
367
367
  }, brand ? {
368
368
  color: brand.text
@@ -397,7 +397,7 @@ function deletedInlineStyleActiveBase(colors) {
397
397
 
398
398
  /** Strikethrough for removed inline / widget content (non-marker decorations). */
399
399
  function buildDeletedInlineStyle(colors, isActive) {
400
- return isActive ? (0, _lazyNodeView.convertToInlineCss)(deletedInlineStyleActiveBase(colors)) : (0, _lazyNodeView.convertToInlineCss)(deletedInlineStyleBase(colors));
400
+ return isActive ? (0, _cssHelper.convertToInlineCss)(deletedInlineStyleActiveBase(colors)) : (0, _cssHelper.convertToInlineCss)(deletedInlineStyleBase(colors));
401
401
  }
402
402
 
403
403
  /**
@@ -414,7 +414,7 @@ function buildDeletedStrikeLineBorder(colors, isActive) {
414
414
 
415
415
  /** Geometry shared by every strikethrough line, so only the border ever differs. */
416
416
  var deletedStrikeLine = function deletedStrikeLine(border) {
417
- return (0, _lazyNodeView.convertToInlineCss)({
417
+ return (0, _cssHelper.convertToInlineCss)({
418
418
  position: 'absolute',
419
419
  top: '50%',
420
420
  width: '100%',
@@ -427,7 +427,7 @@ var deletedStrikeLine = function deletedStrikeLine(border) {
427
427
 
428
428
  /** Strikethrough line (unbounded span) for deleted content — default state. */
429
429
  function buildDeletedContentStyleUnbounded(colors) {
430
- return (0, _lazyNodeView.convertToInlineCss)({
430
+ return (0, _cssHelper.convertToInlineCss)({
431
431
  position: 'absolute',
432
432
  top: '50%',
433
433
  width: '100%',
@@ -440,7 +440,7 @@ function buildDeletedContentStyleUnbounded(colors) {
440
440
 
441
441
  /** Strikethrough line (unbounded span) for deleted content — active state. */
442
442
  function buildDeletedContentStyleUnboundedActive(colors) {
443
- return (0, _lazyNodeView.convertToInlineCss)({
443
+ return (0, _cssHelper.convertToInlineCss)({
444
444
  position: 'absolute',
445
445
  top: '50%',
446
446
  width: '100%',
@@ -456,7 +456,7 @@ function buildDeletedContentStyleUnboundedActive(colors) {
456
456
  /** Unbounded strikethrough overlay for deleted inline content (absolute positioned line). */
457
457
  function buildDeletedInlineStyleUnbounded(colors) {
458
458
  var _colors$deleteTextCol3;
459
- return (0, _lazyNodeView.convertToInlineCss)({
459
+ return (0, _cssHelper.convertToInlineCss)({
460
460
  position: 'absolute',
461
461
  top: '50%',
462
462
  width: '100%',
@@ -469,7 +469,7 @@ function buildDeletedInlineStyleUnbounded(colors) {
469
469
 
470
470
  /** Deleted lozenge-style quote node with box-shadow ring. */
471
471
  function buildDeletedStyleQuoteNodeWithLozenge(colors) {
472
- return (0, _lazyNodeView.convertToInlineCss)({
472
+ return (0, _cssHelper.convertToInlineCss)({
473
473
  marginTop: "var(--ds-space-150, 12px)",
474
474
  paddingTop: "var(--ds-space-025, 2px)",
475
475
  paddingBottom: "var(--ds-space-025, 2px)",
@@ -481,7 +481,7 @@ function buildDeletedStyleQuoteNodeWithLozenge(colors) {
481
481
 
482
482
  /** Active state of the deleted lozenge-style quote node — stronger ring. */
483
483
  function buildDeletedStyleQuoteNodeWithLozengeActive(colors) {
484
- return (0, _lazyNodeView.convertToInlineCss)({
484
+ return (0, _cssHelper.convertToInlineCss)({
485
485
  marginTop: "var(--ds-space-150, 12px)",
486
486
  paddingTop: "var(--ds-space-025, 2px)",
487
487
  paddingBottom: "var(--ds-space-025, 2px)",
@@ -492,11 +492,11 @@ function buildDeletedStyleQuoteNodeWithLozengeActive(colors) {
492
492
  }
493
493
  function buildDeletedStyleQuoteNode(colors) {
494
494
  if (colors.deletedQuoteNodeShape === 'borderLeft') {
495
- return (0, _lazyNodeView.convertToInlineCss)({
495
+ return (0, _cssHelper.convertToInlineCss)({
496
496
  borderLeft: "2px solid ".concat(borderAccent(colors.deleteColor))
497
497
  });
498
498
  }
499
- return (0, _lazyNodeView.convertToInlineCss)({
499
+ return (0, _cssHelper.convertToInlineCss)({
500
500
  marginTop: "var(--ds-space-150, 12px)",
501
501
  paddingTop: "var(--ds-space-025, 2px)",
502
502
  paddingBottom: "var(--ds-space-025, 2px)",
@@ -508,7 +508,7 @@ function buildDeletedStyleQuoteNode(colors) {
508
508
 
509
509
  /** Quote node outline for deleted content — active state. */
510
510
  function buildDeletedStyleQuoteNodeActive(colors) {
511
- return (0, _lazyNodeView.convertToInlineCss)({
511
+ return (0, _cssHelper.convertToInlineCss)({
512
512
  marginTop: "var(--ds-space-150, 12px)",
513
513
  paddingTop: "var(--ds-space-025, 2px)",
514
514
  paddingBottom: "var(--ds-space-025, 2px)",
@@ -522,7 +522,7 @@ function buildDeletedStyleQuoteNodeActive(colors) {
522
522
 
523
523
  /** Generic block node outline for deleted content — default state (small radius). */
524
524
  function buildDeletedBlockOutline(colors) {
525
- return (0, _lazyNodeView.convertToInlineCss)({
525
+ return (0, _cssHelper.convertToInlineCss)({
526
526
  boxShadow: "0 0 0 1px ".concat(borderAccent(colors.deleteColor)),
527
527
  borderRadius: "var(--ds-radius-small, 4px)"
528
528
  });
@@ -530,7 +530,7 @@ function buildDeletedBlockOutline(colors) {
530
530
 
531
531
  /** Generic block node outline for deleted content — active state (small radius). */
532
532
  function buildDeletedBlockOutlineActive(colors) {
533
- return (0, _lazyNodeView.convertToInlineCss)({
533
+ return (0, _cssHelper.convertToInlineCss)({
534
534
  boxShadow: "0 0 0 4px ".concat(deletedBlockOutlineActiveRing(colors)),
535
535
  borderRadius: "var(--ds-radius-small, 4px)"
536
536
  });
@@ -538,7 +538,7 @@ function buildDeletedBlockOutlineActive(colors) {
538
538
 
539
539
  /** Generic block node outline for deleted content — default state (rounded/xsmall+1px radius). */
540
540
  function buildDeletedBlockOutlineRounded(colors) {
541
- return (0, _lazyNodeView.convertToInlineCss)({
541
+ return (0, _cssHelper.convertToInlineCss)({
542
542
  boxShadow: "0 0 0 1px ".concat(borderAccent(colors.deleteColor)),
543
543
  borderRadius: "calc(".concat("var(--ds-radius-xsmall, 2px)", " + 1px)")
544
544
  });
@@ -546,7 +546,7 @@ function buildDeletedBlockOutlineRounded(colors) {
546
546
 
547
547
  /** Generic block node outline for deleted content — active state (rounded/xsmall+1px radius). */
548
548
  function buildDeletedBlockOutlineRoundedActive(colors) {
549
- return (0, _lazyNodeView.convertToInlineCss)({
549
+ return (0, _cssHelper.convertToInlineCss)({
550
550
  boxShadow: "0 0 0 4px ".concat(deletedBlockOutlineActiveRing(colors)),
551
551
  borderRadius: "calc(".concat("var(--ds-radius-xsmall, 2px)", " + 1px)")
552
552
  });
@@ -554,7 +554,7 @@ function buildDeletedBlockOutlineRoundedActive(colors) {
554
554
 
555
555
  /** Scroll-navigation "new" emphasis: 4px ring — default state (small radius). */
556
556
  function buildDeletedBlockOutlineNew(colors) {
557
- return (0, _lazyNodeView.convertToInlineCss)({
557
+ return (0, _cssHelper.convertToInlineCss)({
558
558
  boxShadow: "0 0 0 4px ".concat(bgSubtlest(colors.deleteColor)),
559
559
  borderRadius: "var(--ds-radius-small, 4px)"
560
560
  });
@@ -562,7 +562,7 @@ function buildDeletedBlockOutlineNew(colors) {
562
562
 
563
563
  /** Scroll-navigation "new" emphasis: 4px ring — default state (rounded radius). */
564
564
  function buildDeletedBlockOutlineRoundedNew(colors) {
565
- return (0, _lazyNodeView.convertToInlineCss)({
565
+ return (0, _cssHelper.convertToInlineCss)({
566
566
  boxShadow: "0 0 0 4px ".concat(bgSubtlest(colors.deleteColor)),
567
567
  borderRadius: "calc(".concat("var(--ds-radius-xsmall, 2px)", " + 1px)")
568
568
  });
@@ -574,12 +574,12 @@ function buildDeletedBlockOutlineRoundedNew(colors) {
574
574
  function buildDeletedRowStyle(colors) {
575
575
  var _colors$deleteTextCol4;
576
576
  // Each branch emits exactly the CSS the pre-factory shim did for its scheme.
577
- return colors.deletedRowTreatment === 'textTint' ? (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({
577
+ return colors.deletedRowTreatment === 'textTint' ? (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({
578
578
  color: textAccent((_colors$deleteTextCol4 = colors.deleteTextColor) !== null && _colors$deleteTextCol4 !== void 0 ? _colors$deleteTextCol4 : colors.deleteColor)
579
579
  }, (0, _getStandardDeletedTextDecorationStyle.getStandardDeletedTextDecorationStyle)()), {}, {
580
580
  opacity: 0.6,
581
581
  display: 'table-row'
582
- })) : (0, _lazyNodeView.convertToInlineCss)({
582
+ })) : (0, _cssHelper.convertToInlineCss)({
583
583
  textDecorationColor: borderAccent(colors.deleteColor),
584
584
  textDecoration: 'line-through',
585
585
  opacity: 0.6,
@@ -591,35 +591,35 @@ function buildDeletedRowStyle(colors) {
591
591
 
592
592
  /** Quote node (blockquote) left-border style for inserted content — default state. */
593
593
  function buildInsertStyleQuoteNode(colors) {
594
- return (0, _lazyNodeView.convertToInlineCss)({
594
+ return (0, _cssHelper.convertToInlineCss)({
595
595
  borderLeft: "2px solid ".concat(borderAccent(colors.insertColor))
596
596
  });
597
597
  }
598
598
 
599
599
  /** Quote node left-border style for inserted content — "new" scroll-nav state. */
600
600
  function buildInsertStyleQuoteNodeNew(colors) {
601
- return (0, _lazyNodeView.convertToInlineCss)({
601
+ return (0, _cssHelper.convertToInlineCss)({
602
602
  borderLeft: "4px solid ".concat(bgSubtlest(colors.insertColor))
603
603
  });
604
604
  }
605
605
 
606
606
  /** Quote node left-border style for inserted content — active state. */
607
607
  function buildInsertStyleQuoteNodeActive(colors) {
608
- return (0, _lazyNodeView.convertToInlineCss)({
608
+ return (0, _cssHelper.convertToInlineCss)({
609
609
  borderLeft: "4px solid ".concat(bgSubtlerPressed(colors.insertActiveColor))
610
610
  });
611
611
  }
612
612
 
613
613
  /** Horizontal rule style for inserted content — default state. */
614
614
  function buildInsertStyleRuleNode(colors) {
615
- return (0, _lazyNodeView.convertToInlineCss)({
615
+ return (0, _cssHelper.convertToInlineCss)({
616
616
  backgroundColor: borderAccent(colors.insertColor)
617
617
  });
618
618
  }
619
619
 
620
620
  /** Horizontal rule style for inserted content — "new" scroll-nav state. */
621
621
  function buildInsertStyleRuleNodeNew(colors) {
622
- return (0, _lazyNodeView.convertToInlineCss)({
622
+ return (0, _cssHelper.convertToInlineCss)({
623
623
  backgroundColor: bgSubtlest(colors.insertColor),
624
624
  border: 'none',
625
625
  height: '4px',
@@ -629,7 +629,7 @@ function buildInsertStyleRuleNodeNew(colors) {
629
629
 
630
630
  /** Horizontal rule style for inserted content — active state. */
631
631
  function buildInsertStyleRuleNodeActive(colors) {
632
- return (0, _lazyNodeView.convertToInlineCss)({
632
+ return (0, _cssHelper.convertToInlineCss)({
633
633
  backgroundColor: bgSubtlerPressed(colors.insertActiveColor),
634
634
  border: 'none',
635
635
  height: '4px',
@@ -639,7 +639,7 @@ function buildInsertStyleRuleNodeActive(colors) {
639
639
 
640
640
  /** Generic node outline for inserted content — default state (small radius). */
641
641
  function buildInsertStyleNode(colors) {
642
- return (0, _lazyNodeView.convertToInlineCss)({
642
+ return (0, _cssHelper.convertToInlineCss)({
643
643
  boxShadow: "0 0 0 1px ".concat(borderAccent(colors.insertColor)),
644
644
  borderRadius: "var(--ds-radius-small, 4px)"
645
645
  });
@@ -647,7 +647,7 @@ function buildInsertStyleNode(colors) {
647
647
 
648
648
  /** Generic node outline for inserted content — "new" scroll-nav state (small radius). */
649
649
  function buildInsertStyleNodeNew(colors) {
650
- return (0, _lazyNodeView.convertToInlineCss)({
650
+ return (0, _cssHelper.convertToInlineCss)({
651
651
  boxShadow: "0 0 0 4px ".concat(bgSubtlest(colors.insertColor)),
652
652
  borderRadius: "var(--ds-radius-small, 4px)"
653
653
  });
@@ -655,7 +655,7 @@ function buildInsertStyleNodeNew(colors) {
655
655
 
656
656
  /** Generic node outline for inserted content — active state (small radius). */
657
657
  function buildInsertStyleNodeActive(colors) {
658
- return (0, _lazyNodeView.convertToInlineCss)({
658
+ return (0, _cssHelper.convertToInlineCss)({
659
659
  boxShadow: "0 0 0 4px ".concat(bgSubtlerPressed(colors.insertActiveColor)),
660
660
  borderRadius: "var(--ds-radius-small, 4px)"
661
661
  });
@@ -663,7 +663,7 @@ function buildInsertStyleNodeActive(colors) {
663
663
 
664
664
  /** Card block node outline for inserted content — default state (medium radius). */
665
665
  function buildInsertStyleCardBlockNode(colors) {
666
- return (0, _lazyNodeView.convertToInlineCss)({
666
+ return (0, _cssHelper.convertToInlineCss)({
667
667
  boxShadow: "0 0 0 1px ".concat(borderAccent(colors.insertColor)),
668
668
  borderRadius: "var(--ds-radius-medium, 6px)"
669
669
  });
@@ -671,7 +671,7 @@ function buildInsertStyleCardBlockNode(colors) {
671
671
 
672
672
  /** Card block node outline for inserted content — "new" scroll-nav state (medium radius). */
673
673
  function buildInsertStyleCardBlockNodeNew(colors) {
674
- return (0, _lazyNodeView.convertToInlineCss)({
674
+ return (0, _cssHelper.convertToInlineCss)({
675
675
  boxShadow: "0 0 0 4px ".concat(bgSubtlest(colors.insertColor)),
676
676
  borderRadius: "var(--ds-radius-medium, 6px)"
677
677
  });
@@ -679,7 +679,7 @@ function buildInsertStyleCardBlockNodeNew(colors) {
679
679
 
680
680
  /** Card block node outline for inserted content — active state (medium radius). */
681
681
  function buildInsertStyleCardBlockNodeActive(colors) {
682
- return (0, _lazyNodeView.convertToInlineCss)({
682
+ return (0, _cssHelper.convertToInlineCss)({
683
683
  boxShadow: "0 0 0 4px ".concat(bgSubtlerPressed(colors.insertActiveColor)),
684
684
  borderRadius: "var(--ds-radius-medium, 6px)"
685
685
  });
@@ -693,7 +693,7 @@ function buildInsertStyleCardBlockNodeActive(colors) {
693
693
 
694
694
  /** CSS variables for an inserted node decoration marker — default state. */
695
695
  function buildDecorationMarkerVariable(colors) {
696
- return (0, _lazyNodeView.convertToInlineCss)({
696
+ return (0, _cssHelper.convertToInlineCss)({
697
697
  '--diff-decoration-marker-color': borderAccent(colors.insertColor),
698
698
  '--diff-decoration-marker-ring-width': '1px'
699
699
  });
@@ -701,7 +701,7 @@ function buildDecorationMarkerVariable(colors) {
701
701
 
702
702
  /** CSS variables for an inserted node decoration marker — "new" scroll-nav state. */
703
703
  function buildDecorationMarkerVariableNew(colors) {
704
- return (0, _lazyNodeView.convertToInlineCss)({
704
+ return (0, _cssHelper.convertToInlineCss)({
705
705
  '--diff-decoration-marker-color': bgSubtlest(colors.insertColor),
706
706
  '--diff-decoration-marker-ring-width': '4px'
707
707
  });
@@ -709,7 +709,7 @@ function buildDecorationMarkerVariableNew(colors) {
709
709
 
710
710
  /** CSS variables for an inserted node decoration marker — active state. */
711
711
  function buildDecorationMarkerVariableActive(colors) {
712
- return (0, _lazyNodeView.convertToInlineCss)({
712
+ return (0, _cssHelper.convertToInlineCss)({
713
713
  '--diff-decoration-marker-color': bgSubtlerPressed(colors.insertActiveColor),
714
714
  '--diff-decoration-marker-ring-width': '4px'
715
715
  });
@@ -717,7 +717,7 @@ function buildDecorationMarkerVariableActive(colors) {
717
717
 
718
718
  /** Deleted node decoration marker (extension / embedCard / listItem) — default state. */
719
719
  function buildDeletedDecorationMarkerVariable(colors) {
720
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({}, deletedInlineStyleBase(colors)), {}, {
720
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({}, deletedInlineStyleBase(colors)), {}, {
721
721
  '--diff-decoration-marker-color': borderAccent(colors.deleteColor),
722
722
  '--diff-decoration-marker-ring-width': '1px'
723
723
  }));
@@ -725,7 +725,7 @@ function buildDeletedDecorationMarkerVariable(colors) {
725
725
 
726
726
  /** Opacity only, no position or strikethrough. Used by 'static' schemes. */
727
727
  function buildDeletedDecorationMarkerVariableSimple(colors) {
728
- return (0, _lazyNodeView.convertToInlineCss)({
728
+ return (0, _cssHelper.convertToInlineCss)({
729
729
  opacity: 0.8,
730
730
  '--diff-decoration-marker-color': borderAccent(colors.deleteColor),
731
731
  '--diff-decoration-marker-ring-width': '1px'
@@ -743,7 +743,7 @@ function buildDeletedInlineContentStyleExtended(colors) {
743
743
  // Resting 'onEmphasis' paints nothing; the highlight arrives when the hover variables are set. The
744
744
  // active state takes the literal branch below, so hover cannot disturb it.
745
745
  if (colors.deletedInlineHighlight === 'onEmphasis' && !isActive) {
746
- return (0, _lazyNodeView.convertToInlineCss)({
746
+ return (0, _cssHelper.convertToInlineCss)({
747
747
  backgroundColor: "var(".concat(DELETED_HIGHLIGHT_BG_VAR, ", transparent)"),
748
748
  // Reserved while transparent, so the highlight arriving does not shift the text.
749
749
  borderBottom: "2px solid var(".concat(DELETED_HIGHLIGHT_BORDER_VAR, ", transparent)"),
@@ -756,7 +756,7 @@ function buildDeletedInlineContentStyleExtended(colors) {
756
756
  var isUnderlineEmphasis = isActive && usesUnderlineEmphasis(colors);
757
757
  var backgroundColor = isActive && !isUnderlineEmphasis && colors.deletedInlineBorderTone === 'background' ? bgSubtlerPressed(colors.deleteActiveColor) : deletedBackground(colors.deleteColor);
758
758
  var borderColor = isUnderlineEmphasis ? borderAccent(colors.deleteActiveColor) : colors.deletedInlineBorderTone === 'background' ? backgroundColor : borderAccent(colors.deleteColor);
759
- return (0, _lazyNodeView.convertToInlineCss)({
759
+ return (0, _cssHelper.convertToInlineCss)({
760
760
  backgroundColor: backgroundColor,
761
761
  borderBottom: "2px solid ".concat(borderColor),
762
762
  padding: "1px 0 2px"
@@ -782,7 +782,7 @@ function buildDeletedInlineStyleStandard(colors, state) {
782
782
  var _colors$deleteTextCol6;
783
783
  if (state === 'active') {
784
784
  var _colors$deleteTextCol5;
785
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({
785
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({
786
786
  color: colors.deleteTextColor ? textAccent(colors.deleteTextColor) : "var(--ds-text, #292A2E)"
787
787
  }, (0, _getStandardDeletedTextDecorationStyle.getStandardDeletedTextDecorationStyle)()), {}, {
788
788
  textDecorationColor: textAccent((_colors$deleteTextCol5 = colors.deleteTextColor) !== null && _colors$deleteTextCol5 !== void 0 ? _colors$deleteTextCol5 : colors.deleteColor),
@@ -790,7 +790,7 @@ function buildDeletedInlineStyleStandard(colors, state) {
790
790
  opacity: deletedGlyphOpacity(colors, state)
791
791
  }));
792
792
  }
793
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({
793
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({
794
794
  color: textAccent((_colors$deleteTextCol6 = colors.deleteTextColor) !== null && _colors$deleteTextCol6 !== void 0 ? _colors$deleteTextCol6 : colors.deleteColor)
795
795
  }, (0, _getStandardDeletedTextDecorationStyle.getStandardDeletedTextDecorationStyle)()), {}, {
796
796
  position: 'relative',
@@ -800,7 +800,7 @@ function buildDeletedInlineStyleStandard(colors, state) {
800
800
 
801
801
  /** Deleted node decoration marker — "new" state. */
802
802
  function buildDeletedDecorationMarkerVariableNew(colors) {
803
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({}, deletedInlineStyleBase(colors)), {}, {
803
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({}, deletedInlineStyleBase(colors)), {}, {
804
804
  '--diff-decoration-marker-color': bgSubtlest(colors.deleteColor),
805
805
  '--diff-decoration-marker-ring-width': '4px'
806
806
  }));
@@ -808,7 +808,7 @@ function buildDeletedDecorationMarkerVariableNew(colors) {
808
808
 
809
809
  /** Deleted node decoration marker — active state. */
810
810
  function buildDeletedDecorationMarkerVariableActive(colors) {
811
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({}, deletedInlineStyleActiveBase(colors)), {}, {
811
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({}, deletedInlineStyleActiveBase(colors)), {}, {
812
812
  '--diff-decoration-marker-color': bgSubtlerPressed(colors.deleteActiveColor),
813
813
  '--diff-decoration-marker-ring-width': '4px'
814
814
  }));
@@ -818,7 +818,7 @@ function buildDeletedDecorationMarkerVariableActive(colors) {
818
818
 
819
819
  /** Cell overlay for added table cells — default state (zIndex 1). */
820
820
  function buildAddedCellOverlayStyle(colors) {
821
- return (0, _lazyNodeView.convertToInlineCss)({
821
+ return (0, _cssHelper.convertToInlineCss)({
822
822
  position: 'absolute',
823
823
  top: 0,
824
824
  left: 0,
@@ -833,7 +833,7 @@ function buildAddedCellOverlayStyle(colors) {
833
833
 
834
834
  /** Cell overlay for added table cells — rounded variant (zIndex 2, inherits border/radius). */
835
835
  function buildAddedCellOverlayRoundedStyle(colors) {
836
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({
836
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({
837
837
  position: 'absolute',
838
838
  top: 0,
839
839
  left: 0,
@@ -852,7 +852,7 @@ function buildAddedCellOverlayRoundedStyle(colors) {
852
852
 
853
853
  /** Cell overlay for added table cells — "new" scroll-nav state. */
854
854
  function buildAddedCellOverlayStyleNew(colors) {
855
- return (0, _lazyNodeView.convertToInlineCss)({
855
+ return (0, _cssHelper.convertToInlineCss)({
856
856
  position: 'absolute',
857
857
  top: 0,
858
858
  left: 0,
@@ -867,7 +867,7 @@ function buildAddedCellOverlayStyleNew(colors) {
867
867
 
868
868
  /** Cell overlay for deleted table cells — default state (zIndex 1). Uses deletedCellColor. */
869
869
  function buildDeletedCellOverlayStyle(colors) {
870
- return (0, _lazyNodeView.convertToInlineCss)({
870
+ return (0, _cssHelper.convertToInlineCss)({
871
871
  position: 'absolute',
872
872
  top: 0,
873
873
  left: 0,
@@ -882,7 +882,7 @@ function buildDeletedCellOverlayStyle(colors) {
882
882
 
883
883
  /** Cell overlay for deleted table cells — rounded variant (zIndex 2, inherits border/radius). */
884
884
  function buildDeletedCellOverlayRoundedStyle(colors) {
885
- return (0, _lazyNodeView.convertToInlineCss)({
885
+ return (0, _cssHelper.convertToInlineCss)({
886
886
  position: 'absolute',
887
887
  top: 0,
888
888
  left: 0,
@@ -1032,7 +1032,7 @@ function deletedLozengeTextColor(colors) {
1032
1032
 
1033
1033
  /** The "REMOVED" lozenge on a deleted block node — resting state, tinted with deletedLozengeColor. */
1034
1034
  function buildDeletedLozengeStyle(colors) {
1035
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({}, deletedLozengeBase), {}, {
1035
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({}, deletedLozengeBase), {}, {
1036
1036
  color: deletedLozengeTextColor(colors),
1037
1037
  backgroundColor: bgSubtler(colors.deletedLozengeColor)
1038
1038
  }));
@@ -1040,7 +1040,7 @@ function buildDeletedLozengeStyle(colors) {
1040
1040
 
1041
1041
  /** The "REMOVED" lozenge — active state, tinted with the scheme's deleteActiveColor. */
1042
1042
  function buildDeletedLozengeActiveStyle(colors) {
1043
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({}, deletedLozengeBase), {}, {
1043
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread(_objectSpread({}, deletedLozengeBase), {}, {
1044
1044
  color: deletedLozengeTextColor(colors),
1045
1045
  backgroundColor: bgSubtlerPressed(colors.deleteActiveColor)
1046
1046
  }));
@@ -1166,14 +1166,14 @@ function buildDeletedWrappedBlockOutline(colors, _ref) {
1166
1166
  * inline it beats the stylesheet's fallback, making the plugin the only source of the colour.
1167
1167
  */
1168
1168
  function buildAtomicInlineChangedCSSVariables(colors) {
1169
- return (0, _lazyNodeView.convertToInlineCss)({
1169
+ return (0, _cssHelper.convertToInlineCss)({
1170
1170
  '--show-diff-atomic-inline-changed-border-color': borderAccent(colors.insertColor)
1171
1171
  });
1172
1172
  }
1173
1173
 
1174
1174
  /** Hands editor-core the same strike line the widget path uses, via a custom property. */
1175
1175
  function buildDeletedInlineNodeCSSVariables(colors, isActive) {
1176
- return (0, _lazyNodeView.convertToInlineCss)((0, _defineProperty2.default)({}, DELETED_INLINE_NODE_STRIKE_VAR, buildDeletedStrikeLineBorder(colors, isActive)));
1176
+ return (0, _cssHelper.convertToInlineCss)((0, _defineProperty2.default)({}, DELETED_INLINE_NODE_STRIKE_VAR, buildDeletedStrikeLineBorder(colors, isActive)));
1177
1177
  }
1178
1178
 
1179
1179
  /**
@@ -1199,7 +1199,7 @@ function buildDeletedInlineNodeCSSVariables(colors, isActive) {
1199
1199
  * its values from the per-scheme selectors in editor-core instead.
1200
1200
  */
1201
1201
  function buildDeletedNodeCSSVariables(colors) {
1202
- return (0, _lazyNodeView.convertToInlineCss)(_objectSpread({
1202
+ return (0, _cssHelper.convertToInlineCss)(_objectSpread({
1203
1203
  '--diff-delete-color': borderAccent(colors.deleteColor),
1204
1204
  '--diff-delete-color-new': bgSubtlest(colors.deleteColor),
1205
1205
  '--diff-delete-color-active': bgSubtlerPressed(colors.deleteActiveColor),