@atlaskit/editor-plugin-show-diff 19.0.2 → 19.0.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.
Files changed (94) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/pm-plugins/calculateDiff/calculateDiffDecorations.js +57 -93
  3. package/dist/cjs/pm-plugins/decorations/colorSchemes/factory.js +1 -1
  4. package/dist/cjs/pm-plugins/decorations/colorSchemes/standard.js +1 -26
  5. package/dist/cjs/pm-plugins/decorations/createBlockChangedDecoration.js +12 -24
  6. package/dist/cjs/pm-plugins/decorations/createBlockChangedDecoration.styles.legacy.js +25 -57
  7. package/dist/cjs/pm-plugins/decorations/createChangedRowDecorationWidgets.js +22 -60
  8. package/dist/cjs/pm-plugins/decorations/createInlineChangedDecoration.js +8 -16
  9. package/dist/cjs/pm-plugins/decorations/createInlineChangedDecoration.styles.legacy.js +7 -22
  10. package/dist/cjs/pm-plugins/decorations/createNodeChangedDecorationWidget.js +34 -52
  11. package/dist/cjs/pm-plugins/decorations/decorationKeys.js +6 -14
  12. package/dist/cjs/pm-plugins/decorations/utils/createDeletedLineBreakWidget.js +3 -8
  13. package/dist/cjs/pm-plugins/decorations/utils/wrapBlockNodeView.js +132 -205
  14. package/dist/cjs/pm-plugins/decorations/utils/wrapBlockNodeViewStyles.js +13 -20
  15. package/dist/cjs/pm-plugins/decorations/utils/wrapBlockNodeViewStyles.legacy.js +6 -10
  16. package/dist/cjs/pm-plugins/getDefaultDiffType.js +10 -0
  17. package/dist/cjs/pm-plugins/getScrollableDecorations.js +5 -15
  18. package/dist/cjs/pm-plugins/main.js +45 -53
  19. package/dist/cjs/pm-plugins/resolveDiffContributors.js +18 -4
  20. package/dist/cjs/showDiffPlugin.js +14 -24
  21. package/dist/cjs/showDiffPluginType.js +1 -1
  22. package/dist/cjs/ui/ContributorTag/contributorAvatarRenderer.js +19 -9
  23. package/dist/cjs/ui/ContributorTag/contributorTagController.js +28 -3
  24. package/dist/cjs/ui/ContributorTag/contributorTagIcons.js +2 -2
  25. package/dist/es2019/pm-plugins/calculateDiff/calculateDiffDecorations.js +67 -105
  26. package/dist/es2019/pm-plugins/decorations/colorSchemes/factory.js +1 -1
  27. package/dist/es2019/pm-plugins/decorations/colorSchemes/standard.js +0 -26
  28. package/dist/es2019/pm-plugins/decorations/createBlockChangedDecoration.js +11 -23
  29. package/dist/es2019/pm-plugins/decorations/createBlockChangedDecoration.styles.legacy.js +25 -57
  30. package/dist/es2019/pm-plugins/decorations/createChangedRowDecorationWidgets.js +22 -60
  31. package/dist/es2019/pm-plugins/decorations/createInlineChangedDecoration.js +8 -18
  32. package/dist/es2019/pm-plugins/decorations/createInlineChangedDecoration.styles.legacy.js +8 -23
  33. package/dist/es2019/pm-plugins/decorations/createNodeChangedDecorationWidget.js +34 -54
  34. package/dist/es2019/pm-plugins/decorations/decorationKeys.js +6 -16
  35. package/dist/es2019/pm-plugins/decorations/utils/createDeletedLineBreakWidget.js +2 -7
  36. package/dist/es2019/pm-plugins/decorations/utils/wrapBlockNodeView.js +53 -125
  37. package/dist/es2019/pm-plugins/decorations/utils/wrapBlockNodeViewStyles.js +11 -12
  38. package/dist/es2019/pm-plugins/decorations/utils/wrapBlockNodeViewStyles.legacy.js +6 -7
  39. package/dist/es2019/pm-plugins/getDefaultDiffType.js +2 -0
  40. package/dist/es2019/pm-plugins/getScrollableDecorations.js +6 -19
  41. package/dist/es2019/pm-plugins/main.js +49 -65
  42. package/dist/es2019/pm-plugins/resolveDiffContributors.js +18 -3
  43. package/dist/es2019/showDiffPlugin.js +12 -24
  44. package/dist/es2019/showDiffPluginType.js +1 -1
  45. package/dist/es2019/ui/ContributorTag/contributorAvatarRenderer.js +19 -9
  46. package/dist/es2019/ui/ContributorTag/contributorTagController.js +30 -2
  47. package/dist/es2019/ui/ContributorTag/contributorTagIcons.js +2 -2
  48. package/dist/esm/pm-plugins/calculateDiff/calculateDiffDecorations.js +56 -92
  49. package/dist/esm/pm-plugins/decorations/colorSchemes/factory.js +1 -1
  50. package/dist/esm/pm-plugins/decorations/colorSchemes/standard.js +0 -26
  51. package/dist/esm/pm-plugins/decorations/createBlockChangedDecoration.js +12 -24
  52. package/dist/esm/pm-plugins/decorations/createBlockChangedDecoration.styles.legacy.js +25 -57
  53. package/dist/esm/pm-plugins/decorations/createChangedRowDecorationWidgets.js +22 -60
  54. package/dist/esm/pm-plugins/decorations/createInlineChangedDecoration.js +8 -16
  55. package/dist/esm/pm-plugins/decorations/createInlineChangedDecoration.styles.legacy.js +8 -23
  56. package/dist/esm/pm-plugins/decorations/createNodeChangedDecorationWidget.js +34 -52
  57. package/dist/esm/pm-plugins/decorations/decorationKeys.js +6 -14
  58. package/dist/esm/pm-plugins/decorations/utils/createDeletedLineBreakWidget.js +3 -8
  59. package/dist/esm/pm-plugins/decorations/utils/wrapBlockNodeView.js +132 -205
  60. package/dist/esm/pm-plugins/decorations/utils/wrapBlockNodeViewStyles.js +13 -20
  61. package/dist/esm/pm-plugins/decorations/utils/wrapBlockNodeViewStyles.legacy.js +6 -10
  62. package/dist/esm/pm-plugins/getDefaultDiffType.js +4 -0
  63. package/dist/esm/pm-plugins/getScrollableDecorations.js +6 -16
  64. package/dist/esm/pm-plugins/main.js +44 -52
  65. package/dist/esm/pm-plugins/resolveDiffContributors.js +18 -4
  66. package/dist/esm/showDiffPlugin.js +14 -24
  67. package/dist/esm/showDiffPluginType.js +1 -1
  68. package/dist/esm/ui/ContributorTag/contributorAvatarRenderer.js +19 -9
  69. package/dist/esm/ui/ContributorTag/contributorTagController.js +28 -3
  70. package/dist/esm/ui/ContributorTag/contributorTagIcons.js +2 -2
  71. package/dist/types/pm-plugins/decorations/colorSchemes/factory.d.ts +1 -1
  72. package/dist/types/pm-plugins/decorations/colorSchemes/standard.d.ts +0 -3
  73. package/dist/types/pm-plugins/decorations/colorSchemes/types.d.ts +1 -1
  74. package/dist/types/pm-plugins/decorations/createBlockChangedDecoration.d.ts +1 -3
  75. package/dist/types/pm-plugins/decorations/createBlockChangedDecoration.styles.legacy.d.ts +2 -3
  76. package/dist/types/pm-plugins/decorations/createChangedRowDecorationWidgets.d.ts +1 -3
  77. package/dist/types/pm-plugins/decorations/createInlineChangedDecoration.d.ts +2 -3
  78. package/dist/types/pm-plugins/decorations/createInlineChangedDecoration.styles.legacy.d.ts +2 -3
  79. package/dist/types/pm-plugins/decorations/createNodeChangedDecorationWidget.d.ts +2 -3
  80. package/dist/types/pm-plugins/decorations/decorationKeys.d.ts +5 -8
  81. package/dist/types/pm-plugins/decorations/utils/createDeletedLineBreakWidget.d.ts +3 -5
  82. package/dist/types/pm-plugins/decorations/utils/wrapBlockNodeView.d.ts +4 -6
  83. package/dist/types/pm-plugins/decorations/utils/wrapBlockNodeViewStyles.d.ts +3 -4
  84. package/dist/types/pm-plugins/decorations/utils/wrapBlockNodeViewStyles.legacy.d.ts +4 -4
  85. package/dist/types/pm-plugins/getDefaultDiffType.d.ts +2 -0
  86. package/dist/types/pm-plugins/getScrollableDecorations.d.ts +1 -2
  87. package/dist/types/pm-plugins/main.d.ts +0 -1
  88. package/dist/types/showDiffPluginType.d.ts +1 -3
  89. package/docs/smart-diff-design.md +13 -29
  90. package/package.json +5 -5
  91. package/dist/cjs/pm-plugins/isExtendedEnabled.js +0 -23
  92. package/dist/es2019/pm-plugins/isExtendedEnabled.js +0 -13
  93. package/dist/esm/pm-plugins/isExtendedEnabled.js +0 -17
  94. package/dist/types/pm-plugins/isExtendedEnabled.d.ts +0 -12
@@ -25,8 +25,8 @@ var AI_AGENT_ICON_SVG = "<svg width=\"12\" height=\"12\" fill=\"none\" viewBox=\
25
25
  /** `RovoHexIcon` from `@atlaskit/logo/rovo-hex/icon`, at the 16px `xxsmall` renders. */
26
26
  var ROVO_HEX_ICON_SVG = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" role=\"presentation\" style=\"display:block\"><path fill=\"#1868db\" fill-rule=\"evenodd\" d=\"m13.227 16.789-7.154 4.169-3.403-1.96a2.72 2.72 0 0 1-1.362-2.355V7.366c0-.973.518-1.87 1.361-2.354l6.044-3.487-.038.114a3.6 3.6 0 0 0-.172 1.088v9.278c0 1.274.68 2.45 1.786 3.085z\" clip-rule=\"evenodd\"/><path fill=\"#6a9a23\" fill-rule=\"evenodd\" d=\"m11.296 15.671-7.193 4.153 6.607 3.812a2.73 2.73 0 0 0 2.676.026l.048-.033a2.73 2.73 0 0 0 1.232-1.525 2.7 2.7 0 0 0 .127-.822v-3.594z\" clip-rule=\"evenodd\"/><path fill=\"#af59e1\" fill-rule=\"evenodd\" d=\"m21.477 5.003-4.404-2.539-5.904 4.89 2.69 1.556a3.56 3.56 0 0 1 1.785 3.086v9.277a3.6 3.6 0 0 1-.21 1.202l6.044-3.486a2.71 2.71 0 0 0 1.362-2.355V7.357c0-.97-.521-1.87-1.363-2.354\" clip-rule=\"evenodd\"/><path fill=\"#fca700\" fill-rule=\"evenodd\" d=\"M12.74 8.266 9.353 6.312V2.718c0-.283.044-.56.127-.821A2.73 2.73 0 0 1 10.71.372V.37a.4.4 0 0 0 .048-.033 2.73 2.73 0 0 1 2.676.026l6.499 3.75z\" clip-rule=\"evenodd\"/></svg>";
27
27
 
28
- /** ClaudeLogo from ai-mate/studio-browse-kit, inset to fit the agent hexagon. */
29
- var CLAUDE_ICON_SVG = "<svg width=\"12\" height=\"12\" viewBox=\"8 8 32 32\" role=\"presentation\" style=\"display:block\"><path fill=\"#FFFFFF\" d=\"M14.2785 29.274L20.5732 25.7445L20.6785 25.4369L20.5732 25.2669H20.2653L19.2122 25.2021L15.6152 25.105L12.4962 24.9755L9.47443 24.8136L8.71291 24.6517L8 23.7126L8.07291 23.2431L8.71291 22.8141L9.62835 22.895L11.6537 23.0326L14.6916 23.2431L16.8952 23.3726L20.16 23.7126H20.6785L20.7514 23.5022L20.5732 23.3726L20.4354 23.2431L17.2922 21.1141L13.8896 18.8636L12.1073 17.5684L11.1433 16.9127L10.6572 16.2975L10.4466 14.9537L11.3215 13.9904L12.4962 14.0713L12.7959 14.1523L13.9868 15.067L16.5306 17.0342L19.8522 19.4789L20.3382 19.8836L20.5327 19.746L20.557 19.6489L20.3382 19.2846L18.5316 16.0223L16.6035 12.7033L15.7448 11.3271L15.518 10.5014C15.437 10.1614 15.3803 9.87807 15.3803 9.52998L16.3767 8.17809L16.9276 8L18.2562 8.17809L18.8152 8.6638L19.6415 10.55L20.9782 13.5209L23.0522 17.5603L23.6597 18.7584L23.9838 19.8674L24.1053 20.2074H24.3159V20.0132L24.4861 17.7384L24.802 14.9456L25.1099 11.3514L25.2152 10.3395L25.7175 9.12522L26.7139 8.46952L27.4916 8.84189L28.1316 9.75664L28.0425 10.3476L27.6618 12.8166L26.9165 16.6861L26.4304 19.2765H26.7139L27.038 18.9527L28.3504 17.2122L30.5539 14.4599L31.5261 13.3671L32.6603 12.1609L33.3894 11.5861H34.7666L35.7792 13.0918L35.3256 14.6461L33.9079 16.4432L32.7332 17.9651L31.0481 20.2317L29.9949 22.045L30.0922 22.1907L30.3433 22.1665L34.1509 21.3569L36.2086 20.9846L38.6633 20.5636L39.7732 21.0817L39.8947 21.6079L39.4572 22.6845L36.8324 23.3322L33.7539 23.9474L29.1686 25.0321L29.1119 25.0726L29.1767 25.1536L31.2425 25.3478L32.1256 25.3964H34.2886L38.3149 25.6959L39.3681 26.3921L40 27.2421L39.8947 27.8897L38.2744 28.7154L36.0871 28.1973L30.9833 26.9831L29.2334 26.5459H28.9904V26.6916L30.4486 28.1164L33.122 30.5287L36.4678 33.6372L36.638 34.4063L36.2086 35.0134L35.7549 34.9486L32.8142 32.7387L31.68 31.743L29.1119 29.5816H28.9418V29.8082L29.5332 30.6744L32.6603 35.3696L32.8223 36.8105L32.5954 37.28L31.7853 37.5634L30.8942 37.4015L29.0633 34.8353L27.1757 31.9454L25.6527 29.3549L25.4663 29.4602L24.5671 39.1338L24.1458 39.6276L23.1737 40L22.3635 39.3848L21.9342 38.3891L22.3635 36.422L22.882 33.8558L23.3033 31.8158L23.6841 29.2821L23.9109 28.4402L23.8947 28.3835L23.7084 28.4078L21.7965 31.0306L18.8881 34.9567L16.5873 37.4177L16.0365 37.6362L15.0805 37.1424L15.1696 36.2601L15.7043 35.4748L18.8881 31.4273L20.8081 28.9178L22.0476 27.4688L22.0395 27.2583H21.9666L13.5089 32.7468L12.002 32.9411L11.3539 32.3339L11.4349 31.3382L11.7428 31.0144L14.2866 29.2659L14.2785 29.274Z\"/></svg>";
28
+ /** Claude hexagon lockup from the brand asset: the hexagon and knot glyph both baked in. */
29
+ var CLAUDE_ICON_SVG = "<svg width=\"16\" height=\"18\" viewBox=\"0 0 16 18\" fill=\"none\" role=\"presentation\" style=\"display:block\"><path fill=\"#D97757\" d=\"M14.5007 3.28903L9.50384 0.402344C8.5736 -0.13506 7.42701 -0.134016 6.49774 0.405082L1.49458 3.30759C0.569434 3.8443 0 4.83297 0 5.90253V11.1804C0 12.2519 0.571497 13.2421 1.49931 13.7781L6.49931 16.6666C7.42787 17.203 8.57213 17.203 9.50069 16.6666L14.5007 13.7781C15.4285 13.2421 16 12.2519 16 11.1804V5.88671C16 4.8152 15.4285 3.82504 14.5007 3.28903Z\"/><path fill=\"#FAF9F6\" d=\"M5.19791 10.055L7.0123 9.03681L7.04267 8.94806L7.0123 8.89907H6.92357L6.62 8.88034L5.58321 8.85232L4.68418 8.815L3.81317 8.76826L3.59367 8.72158L3.38818 8.4507L3.4092 8.31526L3.59367 8.1915L3.85754 8.21485L4.44133 8.25455L5.317 8.31526L5.95216 8.35262L6.89321 8.4507H7.04267L7.06368 8.38999L7.0123 8.35262L6.97261 8.31526L6.06658 7.70112L5.08582 7.05196L4.5721 6.67834L4.29422 6.48919L4.15411 6.31172L4.09339 5.92409L4.34559 5.64621L4.68418 5.66956L4.77058 5.69291L5.11384 5.95678L5.84708 6.52422L6.80448 7.22943L6.94459 7.34618L7.00063 7.30649L7.00763 7.27846L6.94459 7.17338L6.42385 6.23233L5.86809 5.27492L5.62057 4.87795L5.55519 4.63977C5.53183 4.54169 5.51549 4.45996 5.51549 4.35956L5.80271 3.96959L5.9615 3.91821L6.34446 3.96959L6.50558 4.10969L6.74377 4.65378L7.12907 5.51077L7.72686 6.676L7.90199 7.0216L7.99539 7.34152L8.0304 7.43959H8.09113V7.38354L8.14018 6.72737L8.23124 5.92175L8.31999 4.88496L8.35032 4.59307L8.49511 4.24279L8.78232 4.05365L9.00649 4.16107L9.19098 4.42494L9.16533 4.5954L9.05555 5.30762L8.84073 6.42381L8.70062 7.17105H8.78232L8.87574 7.07764L9.25401 6.57559L9.88922 5.78165L10.1694 5.4664L10.4963 5.11847L10.7065 4.95267H11.1035L11.3953 5.38701L11.2646 5.83535L10.8559 6.35375L10.5173 6.79276L10.0316 7.4466L9.72807 7.96966L9.7561 8.0117L9.82849 8.00469L10.926 7.77118L11.5191 7.66376L12.2266 7.54233L12.5466 7.69178L12.5816 7.84356L12.4555 8.15414L11.6989 8.34095L10.8116 8.51842L9.48985 8.83136L9.4735 8.84303L9.49223 8.86637L10.0877 8.92241L10.3422 8.93639H10.9657L12.1262 9.02283L12.4298 9.2236L12.612 9.46881L12.5816 9.6556L12.1146 9.89382L11.4841 9.74434L10.013 9.3941L9.50858 9.26797H9.43849V9.31004L9.85882 9.721L10.6294 10.4169L11.5938 11.3136L11.6429 11.5354L11.5191 11.7106L11.3884 11.6918L10.5407 11.0544L10.2137 10.7672L9.4735 10.1436H9.42451V10.209L9.59495 10.4589L10.4963 11.8133L10.543 12.2289L10.4776 12.3644L10.2441 12.4461L9.98726 12.3994L9.45952 11.6592L8.91544 10.8255L8.47645 10.0783L8.42271 10.1086L8.16352 12.8991L8.04207 13.0416L7.76188 13.149L7.52837 12.9715L7.40461 12.6843L7.52837 12.1168L7.67781 11.3766L7.79925 10.7881L7.90899 10.0573L7.97438 9.81443L7.96971 9.79808L7.916 9.80507L7.36491 10.5617L6.5266 11.6942L5.86342 12.4041L5.70463 12.4671L5.42909 12.3247L5.45477 12.0702L5.60889 11.8436L6.5266 10.6761L7.08002 9.95217L7.4373 9.53421L7.43497 9.47349H7.41395L4.97607 11.0567L4.54174 11.1127L4.35493 10.9376L4.37828 10.6504L4.46702 10.557L5.20024 10.0526L5.19791 10.055Z\"/></svg>";
30
30
 
31
31
  /** ChatGPT hexagon lockup from the brand asset: the hexagon and knot glyph both baked in. */
32
32
  var CHATGPT_ICON_SVG = "<svg width=\"16\" height=\"18\" viewBox=\"0 0 16 18\" fill=\"none\" role=\"presentation\" style=\"display:block\"><path fill=\"#14120B\" d=\"M14.5007 3.289L9.50384 0.402314C8.5736 -0.13509 7.42701 -0.134047 6.49774 0.405051L1.49458 3.30756C0.569434 3.84427 0 4.83294 0 5.9025V11.1804C0 12.2519 0.571497 13.2421 1.49931 13.7781L6.49931 16.6666C7.42787 17.203 8.57213 17.203 9.50069 16.6666L14.5007 13.7781C15.4285 13.2421 16 12.2519 16 11.1804V5.88668C16 4.81517 15.4285 3.82501 14.5007 3.289Z\"/><path fill=\"white\" d=\"M12.255 7.39338C12.4813 6.54514 12.2618 5.60258 11.5963 4.93713C10.9309 4.2717 9.9884 4.05217 9.1401 4.27852C8.51863 3.65837 7.59268 3.37721 6.68362 3.62082C5.77456 3.86436 5.11322 4.57087 4.88512 5.41867C4.03733 5.64676 3.33082 6.30819 3.08727 7.21717C2.84372 8.12623 3.12482 9.05218 3.74503 9.67365C3.51868 10.5219 3.73823 11.4645 4.40366 12.1299C5.06909 12.7953 6.01159 13.0149 6.85992 12.7885C7.48137 13.4087 8.4074 13.6898 9.31638 13.4463C10.2254 13.2027 10.8868 12.4962 11.1149 11.6485C11.9627 11.4203 12.6692 10.7589 12.9127 9.84993C13.1563 8.94089 12.8752 8.01491 12.255 7.39347V7.39338ZM11.1878 5.34578C11.6387 5.79673 11.8247 6.41226 11.7457 6.99902L9.62799 5.77632C9.53872 5.72478 9.42871 5.72478 9.3395 5.77632L6.85992 7.20789V6.26917C6.85992 6.20333 6.89519 6.1417 6.95226 6.10877L8.84042 5.01867C9.58854 4.60079 10.5519 4.7099 11.1878 5.34578H11.1878ZM8.00001 7.21703L9.14016 7.87529V9.19183L8.00001 9.85009L6.85984 9.19183V7.87529L8.00001 7.21703ZM5.37616 6.04832C5.38831 5.19153 5.96453 4.41177 6.83319 4.17899C7.44917 4.01397 8.07524 4.16069 8.54389 4.52241L6.42609 5.74505C6.33682 5.79656 6.28184 5.89186 6.28184 5.99489V8.85803L5.4689 8.38867C5.41189 8.35573 5.37616 8.29433 5.37616 8.22846V6.04826V6.04832ZM3.64542 7.36674C3.81044 6.75079 4.25056 6.28191 4.79817 6.05694V8.50232C4.79817 8.60534 4.85315 8.70061 4.94241 8.75216L7.42202 10.1837L6.60904 10.6531C6.55203 10.686 6.48098 10.6862 6.42397 10.6533L4.53581 9.56321C3.79984 9.12427 3.41272 8.23534 3.64542 7.36674ZM4.81224 11.7213C4.36129 11.2704 4.17534 10.6549 4.25429 10.0681L6.37201 11.2908C6.4613 11.3423 6.57129 11.3423 6.6605 11.2908L9.1401 9.85923V10.7979C9.1401 10.8638 9.10483 10.9254 9.04774 10.9584L7.15958 12.0485C6.41145 12.4663 5.44809 12.3572 4.81215 11.7213H4.81224ZM10.6238 11.0188C10.6117 11.8756 10.0355 12.6554 9.1668 12.8881C8.55083 13.0532 7.92476 12.9064 7.45613 12.5447L9.57391 11.322C9.6632 11.2705 9.71816 11.1753 9.71816 11.0722V8.20906L10.5311 8.67845C10.5881 8.71139 10.6238 8.77279 10.6238 8.83866V11.0189V11.0188ZM12.3546 9.70035C12.1896 10.3163 11.7494 10.7852 11.2018 11.0101V8.5648C11.2018 8.46178 11.1469 8.36648 11.0576 8.31496L8.57798 6.88339L9.39095 6.41401C9.44796 6.38107 9.51902 6.38085 9.57603 6.41378L11.4642 7.50388C12.2002 7.94285 12.5873 8.83178 12.3546 9.70035Z\"/></svg>";
@@ -130,7 +130,7 @@ export declare function buildDeletedCellOverlayStyle(colors: DiffColorScheme): s
130
130
  /** Cell overlay for deleted table cells — rounded variant (zIndex 2, inherits border/radius). */
131
131
  export declare function buildDeletedCellOverlayRoundedStyle(colors: DiffColorScheme): string;
132
132
  /**
133
- * Inserted inline content under the extended diff experience. `insertedInlineTreatment` picks
133
+ * Inserted inline content. `insertedInlineTreatment` picks
134
134
  * `text-decoration` vs a `border-bottom` rule; only the latter honours `hideAddedDiffsUnderline`.
135
135
  */
136
136
  export declare function buildInsertedInlineStyle(colors: DiffColorScheme, isActive: boolean, hideAddedDiffsUnderline: boolean): string;
@@ -1,6 +1,3 @@
1
- export declare const editingStyle: string;
2
- export declare const editingContentStyleInBlock: string;
3
- export declare const editingStyleActive: string;
4
1
  export declare const editingStyleExtended: string;
5
2
  export declare const editingContentStyleInBlockExtended: string;
6
3
  export declare const editingStyleActiveExtended: string;
@@ -72,7 +72,7 @@ export type DiffColorScheme = {
72
72
  insertedCellOpacity: number;
73
73
  /** Bottom border tone for inserted text highlights. Defaults to accent. */
74
74
  insertedInlineBorderTone?: 'accent' | 'backgroundHovered';
75
- /** Inserted content under the extended experience: underline, or a border-bottom rule with padding. */
75
+ /** Inserted content: underline, or a border-bottom rule with padding. */
76
76
  insertedInlineTreatment: 'underline' | 'borderBottom';
77
77
  /** Inserted block ring: 4px stateful ring, or one static 1px accent ring. */
78
78
  insertedNodeEmphasis: 'stateful' | 'static';
@@ -1,6 +1,5 @@
1
1
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
2
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
3
- import type { DiffType } from '../../showDiffPluginType';
4
3
  import type { ColorScheme } from './colorSchemes/types';
5
4
  import { type ContributorTagMountContext } from './createContributorTagWidget';
6
5
  /**
@@ -11,7 +10,7 @@ import { type ContributorTagMountContext } from './createContributorTagWidget';
11
10
  * @param isActive Whether this node is part of the currently active/focused change
12
11
  * @returns Prosemirror node decoration or undefined
13
12
  */
14
- export declare const createBlockChangedDecoration: ({ attributionKey, change, colorScheme, isInserted, isActive, leftAnchorId, shouldHideDeleted, showContributorTags, showIndicators, doc, diffType, tagMountContext, }: {
13
+ export declare const createBlockChangedDecoration: ({ attributionKey, change, colorScheme, isInserted, isActive, leftAnchorId, shouldHideDeleted, showContributorTags, showIndicators, doc, tagMountContext, }: {
15
14
  attributionKey?: string;
16
15
  change: {
17
16
  from: number;
@@ -19,7 +18,6 @@ export declare const createBlockChangedDecoration: ({ attributionKey, change, co
19
18
  to: number;
20
19
  };
21
20
  colorScheme?: ColorScheme;
22
- diffType?: DiffType;
23
21
  doc?: PMNode;
24
22
  isActive?: boolean;
25
23
  isInserted?: boolean;
@@ -1,13 +1,12 @@
1
- import type { ColorScheme, DiffType } from '../../showDiffPluginType';
1
+ import type { ColorScheme } from '../../showDiffPluginType';
2
2
  /** Verbatim copy of the pre-refactor cell-overlay style selection. */
3
3
  export declare const resolveCellOverlayStyleLegacy: ({ colorScheme, isRoundedTable, useAddedStyle, }: {
4
4
  colorScheme?: ColorScheme;
5
5
  isRoundedTable: boolean;
6
6
  useAddedStyle: boolean;
7
7
  }) => string;
8
- export declare const getBlockNodeStyleLegacy: ({ nodeName, colorScheme, isInserted, isActive, diffType, }: {
8
+ export declare const getBlockNodeStyleLegacy: ({ nodeName, colorScheme, isInserted, isActive, }: {
9
9
  colorScheme?: ColorScheme;
10
- diffType?: DiffType;
11
10
  isActive?: boolean;
12
11
  isInserted?: boolean;
13
12
  nodeName: string;
@@ -2,7 +2,6 @@ import type { Change } from 'prosemirror-changeset';
2
2
  import type { IntlShape } from 'react-intl';
3
3
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
5
- import type { DiffType } from '../../showDiffPluginType';
6
5
  import type { NodeViewSerializer } from '../NodeViewSerializer';
7
6
  import type { ColorScheme } from './colorSchemes/types';
8
7
  import { type ContributorTagMountContext } from './createContributorTagWidget';
@@ -10,11 +9,10 @@ type SimpleChange = Pick<Change, 'fromA' | 'toA' | 'fromB' | 'deleted'>;
10
9
  /**
11
10
  * Main function to handle deleted rows - computes diff and creates decorations
12
11
  */
13
- export declare const createChangedRowDecorationWidgets: ({ attributionKey, changes, originalDoc, newDoc, nodeViewSerializer, colorScheme, isActive, isInserted, leftAnchorId, diffType, intl, showIndicators, showContributorTags, tagMountContext, }: {
12
+ export declare const createChangedRowDecorationWidgets: ({ attributionKey, changes, originalDoc, newDoc, nodeViewSerializer, colorScheme, isActive, isInserted, leftAnchorId, intl, showIndicators, showContributorTags, tagMountContext, }: {
14
13
  attributionKey?: string;
15
14
  changes: SimpleChange[];
16
15
  colorScheme?: ColorScheme;
17
- diffType?: DiffType;
18
16
  intl?: IntlShape;
19
17
  isActive?: boolean;
20
18
  isInserted?: boolean;
@@ -1,6 +1,6 @@
1
1
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
2
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
3
- import type { DiffType, RevealOptions } from '../../showDiffPluginType';
3
+ import type { RevealOptions } from '../../showDiffPluginType';
4
4
  import type { ColorScheme } from './colorSchemes/types';
5
5
  import { type ContributorTagMountContext } from './createContributorTagWidget';
6
6
  import type { InlineAttrChangeNodeName } from './utils/getAttrChangeRanges';
@@ -14,14 +14,13 @@ export declare const getAtomicInlineChangedAttrs: (inlineNodeName: InlineAttrCha
14
14
  * @param change Changeset "change" containing information about the change content + range
15
15
  * @returns Prosemirror inline decoration
16
16
  */
17
- export declare const createInlineChangedDecoration: ({ attributionKey, change, colorScheme, isActive, isInserted, leftAnchorId, isAtomicInlineNode, shouldHideDeleted, showContributorTags, showIndicators, doc, diffType, hideAddedDiffsUnderline, inlineNodeName, hasDeletedWidget, isDeletedWidgetBelow, reveal, tagMountContext, }: {
17
+ export declare const createInlineChangedDecoration: ({ attributionKey, change, colorScheme, isActive, isInserted, leftAnchorId, isAtomicInlineNode, shouldHideDeleted, showContributorTags, showIndicators, doc, hideAddedDiffsUnderline, inlineNodeName, hasDeletedWidget, isDeletedWidgetBelow, reveal, tagMountContext, }: {
18
18
  attributionKey?: string;
19
19
  change: {
20
20
  fromB: number;
21
21
  toB: number;
22
22
  };
23
23
  colorScheme?: ColorScheme;
24
- diffType?: DiffType;
25
24
  doc?: PMNode;
26
25
  hasDeletedWidget?: boolean;
27
26
  hideAddedDiffsUnderline?: boolean;
@@ -7,14 +7,13 @@
7
7
  * only so the ADF-safety gate can select the equivalent longhand; with that gate off, their CSS
8
8
  * remains unchanged. Delete the whole file at experiment cleanup (EDITOR-8281).
9
9
  */
10
- import type { ColorScheme, DiffType } from '../../showDiffPluginType';
10
+ import type { ColorScheme } from '../../showDiffPluginType';
11
11
  import type { InlineAttrChangeNodeName } from './utils/getAttrChangeRanges';
12
12
  /**
13
13
  * Pre-refactor inline `style` computation for `createInlineChangedDecoration`.
14
14
  */
15
- export declare const resolveInlineChangedStyleLegacy: ({ colorScheme, diffType, hideAddedDiffsUnderline, isActive, isInserted, }: {
15
+ export declare const resolveInlineChangedStyleLegacy: ({ colorScheme, hideAddedDiffsUnderline, isActive, isInserted, }: {
16
16
  colorScheme: ColorScheme | undefined;
17
- diffType: DiffType | undefined;
18
17
  hideAddedDiffsUnderline: boolean;
19
18
  isActive: boolean;
20
19
  isInserted: boolean;
@@ -2,7 +2,7 @@ import type { Change } from 'prosemirror-changeset';
2
2
  import type { IntlShape } from 'react-intl';
3
3
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
5
- import type { DiffType, RevealOptions } from '../../showDiffPluginType';
5
+ import type { RevealOptions } from '../../showDiffPluginType';
6
6
  import type { NodeViewSerializer } from '../NodeViewSerializer';
7
7
  import type { ColorScheme } from './colorSchemes/types';
8
8
  import { type ContributorTagMountContext } from './createContributorTagWidget';
@@ -10,7 +10,7 @@ import { type ContributorTagMountContext } from './createContributorTagWidget';
10
10
  * This function is used to create a decoration widget to show content
11
11
  * that is not in the current document.
12
12
  */
13
- export declare const createNodeChangedDecorationWidget: ({ attributionKey, change, doc, nodeViewSerializer, colorScheme, newDoc, intl, activeIndexPos, isInserted, leftAnchorId, showContributorTags, showIndicators, placeBelow, diffType, hideAddedDiffsUnderline, reveal, tagMountContext, deletedColumns, }: {
13
+ export declare const createNodeChangedDecorationWidget: ({ attributionKey, change, doc, nodeViewSerializer, colorScheme, newDoc, intl, activeIndexPos, isInserted, leftAnchorId, showContributorTags, showIndicators, placeBelow, hideAddedDiffsUnderline, reveal, tagMountContext, deletedColumns, }: {
14
14
  activeIndexPos?: {
15
15
  from: number;
16
16
  to: number;
@@ -19,7 +19,6 @@ export declare const createNodeChangedDecorationWidget: ({ attributionKey, chang
19
19
  change: Pick<Change, 'fromA' | 'toA' | 'fromB' | 'deleted' | 'toB'>;
20
20
  colorScheme?: ColorScheme;
21
21
  deletedColumns?: readonly number[];
22
- diffType?: DiffType;
23
22
  doc: PMNode;
24
23
  hideAddedDiffsUnderline?: boolean;
25
24
  intl: IntlShape;
@@ -1,5 +1,5 @@
1
1
  import type { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
2
- import type { DiffDescriptor, DiffType } from '../../showDiffPluginType';
2
+ import type { DiffDescriptor } from '../../showDiffPluginType';
3
3
  import type { ColorScheme } from './colorSchemes/types';
4
4
  /**
5
5
  * Decoration families produced by the show-diff plugin.
@@ -90,22 +90,19 @@ export declare const buildAnchorDecorationKey: ({ diffId, anchorType, }: {
90
90
  diffId: string;
91
91
  }) => string;
92
92
  /**
93
- * Builds a diff decoration key. The extended experience includes the `diffId`
94
- * in the key so independently rendered decorations for the same type remain
95
- * distinguishable.
93
+ * Builds a diff decoration key. The key includes the `diffId` so independently
94
+ * rendered decorations for the same type remain distinguishable.
96
95
  */
97
- export declare const buildDiffDecorationKey: ({ decorationKeyPrefix, isActive, diffId, diffType, }: {
96
+ export declare const buildDiffDecorationKey: ({ decorationKeyPrefix, isActive, diffId, }: {
98
97
  decorationKeyPrefix: (typeof DiffDecorationKey)[DiffDescriptor['type']];
99
98
  diffId?: string;
100
- diffType?: DiffType;
101
99
  isActive?: boolean;
102
100
  }) => string;
103
- export declare const buildDiffDecorationSpec: ({ attributionKey, colorScheme, decorationType, diffId, isActive, isInserted, leftAnchorId, nodeName, side, diffType, }: {
101
+ export declare const buildDiffDecorationSpec: ({ attributionKey, colorScheme, decorationType, diffId, isActive, isInserted, leftAnchorId, nodeName, side, }: {
104
102
  attributionKey?: string;
105
103
  colorScheme?: ColorScheme;
106
104
  decorationType: DiffDescriptor['type'];
107
105
  diffId: string;
108
- diffType?: DiffType;
109
106
  isActive?: boolean;
110
107
  isInserted?: boolean;
111
108
  leftAnchorId?: string;
@@ -1,5 +1,5 @@
1
1
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
2
- import type { DiffType, RevealOptions } from '../../../showDiffPluginType';
2
+ import type { RevealOptions } from '../../../showDiffPluginType';
3
3
  import type { ColorScheme } from '../colorSchemes/types';
4
4
  /**
5
5
  * U+2936 ARROW POINTING DOWNWARDS THEN CURVING LEFTWARDS — the return-key glyph.
@@ -21,11 +21,10 @@ export declare const RETURN_GLYPH = "\u2936";
21
21
  * Hidden from assistive technology: the glyph is a picture of a key, and read out it is announced as
22
22
  * its Unicode name rather than as a removed line.
23
23
  */
24
- export declare const createDeletedLineBreakWidget: ({ colorScheme, count, diffType, isActive, reveal, }: {
24
+ export declare const createDeletedLineBreakWidget: ({ colorScheme, count, isActive, reveal, }: {
25
25
  colorScheme?: ColorScheme;
26
26
  /** One glyph per removed blank line, for a run of adjacent ones. */
27
27
  count?: number;
28
- diffType?: DiffType;
29
28
  isActive?: boolean;
30
29
  reveal?: RevealOptions;
31
30
  }) => HTMLElement;
@@ -38,11 +37,10 @@ export declare const createDeletedLineBreakWidget: ({ colorScheme, count, diffTy
38
37
  * the displayed document and the change lands on the *inserted* side, so the glyph is anchored
39
38
  * inside the surviving block, on the blank line itself.
40
39
  */
41
- export declare const createDeletedLineBreakDecoration: ({ attributionKey, colorScheme, count, diffType, isActive, pos, reveal, side, }: {
40
+ export declare const createDeletedLineBreakDecoration: ({ attributionKey, colorScheme, count, isActive, pos, reveal, side, }: {
42
41
  attributionKey?: string;
43
42
  colorScheme?: ColorScheme;
44
43
  count?: number;
45
- diffType?: DiffType;
46
44
  isActive?: boolean;
47
45
  pos: number;
48
46
  reveal?: RevealOptions;
@@ -1,6 +1,6 @@
1
1
  import type { IntlShape } from 'react-intl';
2
2
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
- import type { DiffType, RevealOptions } from '../../../showDiffPluginType';
3
+ import type { RevealOptions } from '../../../showDiffPluginType';
4
4
  import type { ColorScheme } from '../colorSchemes/types';
5
5
  /**
6
6
  * Creates a "Removed" lozenge to be displayed at the top right corner of deleted block nodes
@@ -11,9 +11,8 @@ export declare const createRemovedLozenge: (intl: IntlShape, isActive?: boolean,
11
11
  * For heading nodes, applies styles directly to preserve natural margins.
12
12
  * For other block nodes, uses wrapper approach with optional lozenge.
13
13
  */
14
- export declare const wrapBlockNodeView: ({ dom, nodeView, targetNode, colorScheme, intl, isActive, isInserted, diffType, hideAddedDiffsUnderline, highlightInlineLeafNodes, }: {
14
+ export declare const wrapBlockNodeView: ({ dom, nodeView, targetNode, colorScheme, intl, isActive, isInserted, hideAddedDiffsUnderline, highlightInlineLeafNodes, }: {
15
15
  colorScheme?: ColorScheme;
16
- diffType?: DiffType;
17
16
  dom: HTMLElement;
18
17
  hideAddedDiffsUnderline?: boolean;
19
18
  highlightInlineLeafNodes?: boolean;
@@ -28,9 +27,8 @@ export declare const wrapBlockNodeView: ({ dom, nodeView, targetNode, colorSchem
28
27
  * CSS backgrounds don't work when applied to a wrapper around a paragraph, so
29
28
  * the wrapper needs to be injected inside the node around the child content.
30
29
  */
31
- export declare const injectInnerWrapper: ({ node, colorScheme, isActive, isInserted, diffType, reveal, }: {
30
+ export declare const injectInnerWrapper: ({ node, colorScheme, isActive, isInserted, reveal, }: {
32
31
  colorScheme?: ColorScheme;
33
- diffType?: DiffType;
34
32
  isActive?: boolean;
35
33
  isInserted?: boolean;
36
34
  node: HTMLElement;
@@ -39,4 +37,4 @@ export declare const injectInnerWrapper: ({ node, colorScheme, isActive, isInser
39
37
  /**
40
38
  * Creates a styled span wrapper for inline content within a change decoration.
41
39
  */
42
- export declare const createContentWrapper: (colorScheme?: ColorScheme, isActive?: boolean, isInserted?: boolean, diffType?: DiffType, reveal?: RevealOptions) => HTMLElement;
40
+ export declare const createContentWrapper: (colorScheme?: ColorScheme, isActive?: boolean, isInserted?: boolean, reveal?: RevealOptions) => HTMLElement;
@@ -1,4 +1,3 @@
1
- import type { DiffType } from '../../../showDiffPluginType';
2
1
  import type { ColorScheme } from '../colorSchemes/types';
3
2
  /**
4
3
  * Node-name classification shared by the style resolvers below and by the routing in
@@ -7,15 +6,15 @@ import type { ColorScheme } from '../colorSchemes/types';
7
6
  export declare const isMultiContainerBlockNode: (nodeName: string) => boolean;
8
7
  export declare const isTextLikeBlockNode: (nodeName: string) => boolean;
9
8
  /** Inline content style for a changed (inserted or deleted) block node. */
10
- export declare const getChangedContentStyle: (colorScheme?: ColorScheme, isActive?: boolean, isInserted?: boolean, diffType?: DiffType, hideAddedDiffsUnderline?: boolean) => string;
9
+ export declare const getChangedContentStyle: (colorScheme?: ColorScheme, isActive?: boolean, isInserted?: boolean, hideAddedDiffsUnderline?: boolean) => string;
11
10
  /** Node-specific style for a changed block node, or `undefined` when the node type has none. */
12
- export declare const getChangedNodeStyle: (nodeName: string, colorScheme?: ColorScheme, isInserted?: boolean, isActive?: boolean, diffType?: DiffType, hideAddedDiffsUnderline?: boolean) => string | undefined;
11
+ export declare const getChangedNodeStyle: (nodeName: string, colorScheme?: ColorScheme, isInserted?: boolean, isActive?: boolean, hideAddedDiffsUnderline?: boolean) => string | undefined;
13
12
  /** The positioned line drawn across deleted content spanning an unbounded range. */
14
13
  export declare const getDeletedContentStyleUnbounded: (colorScheme?: ColorScheme, isActive?: boolean) => string;
15
14
  /** Inline style for inserted content. */
16
15
  export declare const getInsertedContentStyle: (colorScheme?: ColorScheme, isActive?: boolean, hideAddedDiffsUnderline?: boolean) => string;
17
16
  /** Inline style for deleted content. */
18
- export declare const getDeletedContentStyle: (colorScheme?: ColorScheme, isActive?: boolean, diffType?: DiffType, omitHighlight?: boolean) => string;
17
+ export declare const getDeletedContentStyle: (colorScheme?: ColorScheme, isActive?: boolean, omitHighlight?: boolean) => string;
19
18
  /**
20
19
  * Overlay style for one added or deleted table cell. Invariant across the cells of a table, so the
21
20
  * `querySelectorAll('td, th')` loop in `wrapBlockNodeView.ts` resolves it once.
@@ -1,14 +1,14 @@
1
- import type { ColorScheme, DiffType } from '../../../showDiffPluginType';
1
+ import type { ColorScheme } from '../../../showDiffPluginType';
2
2
  /** Pre-refactor inline content style for a changed (inserted or deleted) block node. */
3
- export declare const getChangedContentStyleLegacy: (colorScheme?: ColorScheme, isActive?: boolean, isInserted?: boolean, diffType?: DiffType, hideAddedDiffsUnderline?: boolean) => string;
3
+ export declare const getChangedContentStyleLegacy: (colorScheme?: ColorScheme, isActive?: boolean, isInserted?: boolean, hideAddedDiffsUnderline?: boolean) => string;
4
4
  /** Pre-refactor node-specific style for a changed block node. */
5
- export declare const getChangedNodeStyleLegacy: (nodeName: string, colorScheme?: ColorScheme, isInserted?: boolean, isActive?: boolean, diffType?: DiffType, hideAddedDiffsUnderline?: boolean) => string | undefined;
5
+ export declare const getChangedNodeStyleLegacy: (nodeName: string, colorScheme?: ColorScheme, isInserted?: boolean, isActive?: boolean, hideAddedDiffsUnderline?: boolean) => string | undefined;
6
6
  /** Pre-refactor unbounded strikethrough line for deleted content. */
7
7
  export declare const getDeletedContentStyleUnboundedLegacy: (colorScheme?: ColorScheme, isActive?: boolean) => string;
8
8
  /** Pre-refactor inline style for inserted content. */
9
9
  export declare const getInsertedContentStyleLegacy: (colorScheme?: ColorScheme, isActive?: boolean, hideAddedDiffsUnderline?: boolean) => string;
10
10
  /** Pre-refactor inline style for deleted content. */
11
- export declare const getDeletedContentStyleLegacy: (colorScheme?: ColorScheme, isActive?: boolean, diffType?: DiffType, omitHighlight?: boolean) => string;
11
+ export declare const getDeletedContentStyleLegacy: (colorScheme?: ColorScheme, isActive?: boolean, omitHighlight?: boolean) => string;
12
12
  /**
13
13
  * Pre-refactor table-cell overlay style, as chosen inside the `querySelectorAll('td, th')` loop of
14
14
  * `applyCellOverlayStyles`. The choice does not vary per cell, so hoisting it out of the loop is
@@ -0,0 +1,2 @@
1
+ import type { DiffType } from '../showDiffPluginType';
2
+ export declare const getDefaultDiffType: () => DiffType;
@@ -1,6 +1,5 @@
1
1
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
2
  import { Decoration, type DecorationSet } from '@atlaskit/editor-prosemirror/view';
3
- import type { DiffType } from '../showDiffPluginType';
4
3
  /**
5
4
  * Returns true when an inline decoration's [from, to) range can actually show in the document:
6
5
  * positions are valid, and the slice contains at least one inline node ProseMirror would paint
@@ -30,4 +29,4 @@ export declare function isInlineDiffDecorationRenderableInDoc(doc: PMNode, from:
30
29
  * @param doc - Current document; when set, diff-inline ranges are validated against this doc
31
30
  * @returns Array of scrollable decorations, sorted and deduplicated
32
31
  */
33
- export declare const getScrollableDecorations: (set: DecorationSet | undefined, doc?: PMNode, diffType?: DiffType) => Decoration[];
32
+ export declare const getScrollableDecorations: (set: DecorationSet | undefined, doc?: PMNode) => Decoration[];
@@ -33,7 +33,6 @@ export type ShowDiffPluginState = {
33
33
  deletedDiffPlacement?: DeletedDiffPlacement;
34
34
  /**
35
35
  * The diff descriptors of the diff decorations currently being displayed.
36
- * Only set when `platform_editor_diff_plugin_extended` is on.
37
36
  */
38
37
  diffDescriptors?: DiffDescriptor[];
39
38
  diffType?: DiffType;
@@ -39,7 +39,7 @@ export type StepWithAttribution<TStep> = {
39
39
  stepAttribution?: DiffStepAttribution;
40
40
  };
41
41
  /** Branded agent presentations supported by contributor tags. */
42
- export type DiffAgentBrand = 'rovo' | 'claude' | 'chatgpt';
42
+ export type DiffAgentBrand = 'rovo' | 'claude' | 'chatgpt' | 'figma' | 'lovable' | 'replit';
43
43
  export declare const DIFF_AGENT_BRANDS: ReadonlySet<DiffAgentBrand>;
44
44
  /** The brand id `@atlaskit/agent-color` registers each `AgentBrandColorScheme` under. */
45
45
  type AgentColorBrandId = AgentBrandColorScheme extends `agent-brand-${infer BrandId}` ? BrandId : never;
@@ -278,12 +278,10 @@ export type ShowDiffPlugin = NextEditorPlugin<'showDiff', {
278
278
  * The contributor tags to render for the diff currently being displayed. Resolved by the
279
279
  * plugin and consumed by its own contributor-tag UI — `ContributorTagModel` and
280
280
  * `TagContributor` are not exported from any entry point.
281
- * Only set when `platform_editor_diff_plugin_extended` is on.
282
281
  */
283
282
  contributorTags?: ContributorTagModel[];
284
283
  /**
285
284
  * The diff descriptors of the diff decorations currently being displayed.
286
- * Only set when `platform_editor_diff_plugin_extended` is on.
287
285
  */
288
286
  diffDescriptors?: DiffDescriptor[];
289
287
  /**
@@ -1,8 +1,7 @@
1
1
  # `smart` diffType — design
2
2
 
3
- > Status: implemented behind the `platform_editor_ai_smart_diff` feature gate (which itself
4
- > requires the extended diff pipeline; see §8). This document describes the **final**
5
- > block-first implementation, not the original spike.
3
+ > Status: implemented behind the `platform_editor_ai_smart_diff` feature gate (see §8). This
4
+ > document describes the **final** block-first implementation, not the original spike.
6
5
 
7
6
  ## 1. Problem
8
7
 
@@ -42,15 +41,13 @@ The classifier is a pure `Change[] → Change[]` transform. It runs inside `getC
42
41
  `calculateDiff/calculateDiffDecorations.ts`:
43
42
 
44
43
  ```ts
45
- if (isExtendedEnabled(diffType)) {
46
- if (diffType === 'smart' && fg('platform_editor_ai_smart_diff')) {
47
- const changes = simplifyChanges(changeset.changes, tr.doc);
48
- return classifySmartChanges({ changes, originalDoc, newDoc: tr.doc,
49
- locale: intl.locale, thresholds: smartThresholds });
50
- }
51
- if (diffType === 'step') return diffBySteps(originalDoc, steps);
52
- if (diffType === 'block') return groupChangesByBlock(changeset.changes, originalDoc, steppedDoc);
44
+ if (diffType === 'smart' && fg('platform_editor_ai_smart_diff')) {
45
+ const changes = simplifyChanges(changeset.changes, tr.doc);
46
+ return classifySmartChanges({ changes, originalDoc, newDoc: tr.doc,
47
+ locale: intl.locale, thresholds: smartThresholds });
53
48
  }
49
+ if (diffType === 'step') return diffBySteps(originalDoc, steps);
50
+ if (diffType === 'block') return groupChangesByBlock(changeset.changes, originalDoc, steppedDoc);
54
51
  // otherwise inline:
55
52
  return optimizeChanges(simplifyChanges(changeset.changes, tr.doc));
56
53
  ```
@@ -189,23 +186,10 @@ DEFAULT_SMART_THRESHOLDS = {
189
186
 
190
187
  ## 8. Feature gating
191
188
 
192
- `smart` requires **both** the extended diff pipeline behaviour **and** its own gate. The single
193
- source of truth is `pm-plugins/isExtendedEnabled.ts`:
194
-
195
- ```ts
196
- export const isExtendedEnabled = (diffType?: DiffType): boolean =>
197
- expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true) ||
198
- (diffType === 'smart' && fg('platform_editor_ai_smart_diff'));
199
- ```
200
-
201
- Because the whole extended decoration pipeline was previously gated only by
202
- `platform_editor_diff_plugin_extended`, `diffType` is **threaded through the entire decoration
203
- layer** (inline/block/node/row decorations, `wrapBlockNodeView` and its helpers,
204
- `decorationKeys`, `getScrollableDecorations`) so that every internal extended-gate check becomes
205
- `isExtendedEnabled(diffType)`. This makes `smart` render the full extended shape even when
206
- `platform_editor_diff_plugin_extended` is off — and only when `platform_editor_ai_smart_diff` is
207
- on. Other diff types are unaffected (they pass `diffType` that is not `'smart'`, so the check
208
- reduces to the extended gate alone).
189
+ `smart` is gated by `platform_editor_ai_smart_diff`. When the gate is off, `smart` falls through
190
+ to the default (`inline`) path in `getChanges`, and `getDefaultDiffType`
191
+ (`pm-plugins/getDefaultDiffType.ts`) resolves the default diff type to `inline` instead of
192
+ `smart`. The decoration layer is shared by every diff type and does not depend on `diffType`.
209
193
 
210
194
  ## 9. Rendering specifics
211
195
 
@@ -219,7 +203,7 @@ reduces to the extended gate alone).
219
203
 
220
204
  ```
221
205
  src/pm-plugins/
222
- isExtendedEnabled.ts ← shared gate helper (diffType-aware)
206
+ getDefaultDiffType.ts ← default diffType (gate-aware)
223
207
  calculateDiff/smart/
224
208
  classifySmartChanges.ts ← block-first orchestrator (§4, §5)
225
209
  thresholds.ts ← SmartDiffThresholds + defaults (§6)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-show-diff",
3
- "version": "19.0.2",
3
+ "version": "19.0.4",
4
4
  "description": "ShowDiff plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -27,7 +27,7 @@
27
27
  "dependencies": {
28
28
  "@atlaskit/adf-schema": "^57.6.0",
29
29
  "@atlaskit/agent-color": "^1.0.0",
30
- "@atlaskit/avatar": "^29.0.0",
30
+ "@atlaskit/avatar": "^29.1.0",
31
31
  "@atlaskit/custom-steps": "^1.1.0",
32
32
  "@atlaskit/editor-plugin-accessibility-utils": "^21.0.0",
33
33
  "@atlaskit/editor-plugin-analytics": "^21.0.0",
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/platform-feature-experiments": "^0.3.0",
40
40
  "@atlaskit/platform-feature-flags": "^2.2.0",
41
41
  "@atlaskit/primitives": "^22.5.0",
42
- "@atlaskit/tmp-editor-statsig": "^207.0.0",
42
+ "@atlaskit/tmp-editor-statsig": "^209.0.0",
43
43
  "@atlaskit/tokens": "^20.0.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@compiled/react": "^1.0.2",
@@ -64,14 +64,14 @@
64
64
  "@atlassian/confluence-presets": "workspace:^",
65
65
  "@atlassian/content-reconciliation": "^0.1.3506",
66
66
  "@atlassian/editor-ai-injected-editors": "^35.0.0",
67
- "@atlassian/editor-plugin-ai": "^75.1.0",
67
+ "@atlassian/editor-plugin-ai": "^75.2.0",
68
68
  "@atlassian/structured-docs-types": "workspace:^",
69
69
  "react": "^19.2.0",
70
70
  "react-dom": "^19.2.0",
71
71
  "react-intl": "^7.0.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "@atlaskit/editor-common": "^125.2.0",
74
+ "@atlaskit/editor-common": "^125.4.0",
75
75
  "react": "^18.2.0 || ^19.2.0",
76
76
  "react-dom": "^18.2.0 || ^19.2.0",
77
77
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isExtendedEnabled = exports.getDefaultDiffType = void 0;
7
- var _fg = require("@atlaskit/platform-feature-flags/fg");
8
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
9
- /**
10
- * The "extended" diff pipeline is normally gated by `platform_editor_diff_plugin_extended`.
11
- * The `smart` diff type REQUIRES the extended pipeline, so whenever `smart` is active (and its
12
- * own gate `platform_editor_ai_smart_diff` is on) the extended pipeline is force-enabled,
13
- * independent of the extended gate. For all other diff types the extended gate alone decides.
14
- *
15
- * Pass the active `diffType` so callers deep in the decoration layer render the extended shape
16
- * when `smart` is active even if `platform_editor_diff_plugin_extended` is off.
17
- */
18
- var isExtendedEnabled = exports.isExtendedEnabled = function isExtendedEnabled(diffType) {
19
- return (0, _expValEquals.expValEquals)('platform_editor_diff_plugin_extended', 'isEnabled', true) || diffType === 'smart' && (0, _fg.fg)('platform_editor_ai_smart_diff');
20
- };
21
- var getDefaultDiffType = exports.getDefaultDiffType = function getDefaultDiffType() {
22
- return (0, _fg.fg)('platform_editor_ai_smart_diff') ? 'smart' : 'inline';
23
- };
@@ -1,13 +0,0 @@
1
- import { fg } from '@atlaskit/platform-feature-flags/fg';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
- /**
4
- * The "extended" diff pipeline is normally gated by `platform_editor_diff_plugin_extended`.
5
- * The `smart` diff type REQUIRES the extended pipeline, so whenever `smart` is active (and its
6
- * own gate `platform_editor_ai_smart_diff` is on) the extended pipeline is force-enabled,
7
- * independent of the extended gate. For all other diff types the extended gate alone decides.
8
- *
9
- * Pass the active `diffType` so callers deep in the decoration layer render the extended shape
10
- * when `smart` is active even if `platform_editor_diff_plugin_extended` is off.
11
- */
12
- export const isExtendedEnabled = diffType => expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true) || diffType === 'smart' && fg('platform_editor_ai_smart_diff');
13
- export const getDefaultDiffType = () => fg('platform_editor_ai_smart_diff') ? 'smart' : 'inline';
@@ -1,17 +0,0 @@
1
- import { fg } from '@atlaskit/platform-feature-flags/fg';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
- /**
4
- * The "extended" diff pipeline is normally gated by `platform_editor_diff_plugin_extended`.
5
- * The `smart` diff type REQUIRES the extended pipeline, so whenever `smart` is active (and its
6
- * own gate `platform_editor_ai_smart_diff` is on) the extended pipeline is force-enabled,
7
- * independent of the extended gate. For all other diff types the extended gate alone decides.
8
- *
9
- * Pass the active `diffType` so callers deep in the decoration layer render the extended shape
10
- * when `smart` is active even if `platform_editor_diff_plugin_extended` is off.
11
- */
12
- export var isExtendedEnabled = function isExtendedEnabled(diffType) {
13
- return expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true) || diffType === 'smart' && fg('platform_editor_ai_smart_diff');
14
- };
15
- export var getDefaultDiffType = function getDefaultDiffType() {
16
- return fg('platform_editor_ai_smart_diff') ? 'smart' : 'inline';
17
- };
@@ -1,12 +0,0 @@
1
- import type { DiffType } from '../showDiffPluginType';
2
- /**
3
- * The "extended" diff pipeline is normally gated by `platform_editor_diff_plugin_extended`.
4
- * The `smart` diff type REQUIRES the extended pipeline, so whenever `smart` is active (and its
5
- * own gate `platform_editor_ai_smart_diff` is on) the extended pipeline is force-enabled,
6
- * independent of the extended gate. For all other diff types the extended gate alone decides.
7
- *
8
- * Pass the active `diffType` so callers deep in the decoration layer render the extended shape
9
- * when `smart` is active even if `platform_editor_diff_plugin_extended` is off.
10
- */
11
- export declare const isExtendedEnabled: (diffType?: DiffType) => boolean;
12
- export declare const getDefaultDiffType: () => DiffType;