@atlaskit/renderer 128.1.0 → 128.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 128.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 128.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`ae5fac6f9f299`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ae5fac6f9f299) -
14
+ Added support for Smart Link draggable changeboarding in Confluence ADF renderer. This change adds
15
+ an optional smartLinkDraggableChangeboardConfig prop and passes shouldShow/onClose into Smart
16
+ Links, with no breaking API changes.
17
+
18
+ ### Patch Changes
19
+
20
+ - [`7428d9bf3aa13`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7428d9bf3aa13) -
21
+ Clean up platform_synced_block_patch_5 feature gate
22
+ - [`af385c410f9b1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/af385c410f9b1) -
23
+ [ux] EDITOR-5909 Hide markers for wrapper task list items
24
+ - Updated dependencies
25
+
3
26
  ## 128.1.0
4
27
 
5
28
  ### Minor Changes
@@ -503,7 +503,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
503
503
  return ((_n$type2 = n.type) === null || _n$type2 === void 0 ? void 0 : _n$type2.name) === 'mediaSingle';
504
504
  });
505
505
  // Only check path for bodiedSyncBlock; syncBlock uses RendererContext
506
- var nestedUnder = (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_5') ? (0, _rendererNode.getNestedUnderNodes)(path, ['bodiedSyncBlock']) : undefined;
506
+ var nestedUnder = (0, _experiments.editorExperiment)('platform_synced_block', true) ? (0, _rendererNode.getNestedUnderNodes)(path, ['bodiedSyncBlock']) : undefined;
507
507
  var isAnnotationMark = function isAnnotationMark(mark) {
508
508
  return mark.type === annotation;
509
509
  };
@@ -24,7 +24,6 @@ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
24
24
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
25
25
  var _analyticsContext = _interopRequireDefault(require("../analytics/analyticsContext"));
26
26
  var _analytics = require("@atlaskit/editor-common/analytics");
27
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
28
27
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
29
28
  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; }
30
29
  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) { (0, _defineProperty2.default)(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; }
@@ -122,9 +121,9 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
122
121
  attributes: _objectSpread(_objectSpread({
123
122
  reason: reason,
124
123
  external: false
125
- }, nestedUnder && (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_5') ? {
124
+ }, nestedUnder && (0, _experiments.editorExperiment)('platform_synced_block', true) ? {
126
125
  nestedUnder: nestedUnder
127
- } : {}), rendererContext !== null && rendererContext !== void 0 && rendererContext.nestedRendererType && (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_5') ? {
126
+ } : {}), rendererContext !== null && rendererContext !== void 0 && rendererContext.nestedRendererType && (0, _experiments.editorExperiment)('platform_synced_block', true) ? {
128
127
  nestedRendererType: rendererContext.nestedRendererType
129
128
  } : {})
130
129
  });
@@ -710,20 +710,22 @@ var listsSharedStylesForGekko = (0, _react.css)({
710
710
  * Applied when platform_editor_flexible_list_indentation experiment is enabled.
711
711
  */
712
712
  var listItemHiddenMarkerStyles = (0, _react.css)({
713
- // Hide markers for bullet list wrapper items (li containing only ul)
714
- 'li:has(> ul:only-child)': {
715
- listStyleType: 'none'
716
- },
717
- // Hide markers for ordered list wrapper items (li containing only ol)
718
- 'li:has(> ol:only-child)': {
719
- listStyleType: 'none'
713
+ // Hide markers and remove spacing for wrapper list items (items containing only nested lists)
714
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
715
+ 'li:has(> ul:only-child), li:has(> ol:only-child), li:has(> div[data-node-type="actionList"]:only-child)': {
716
+ listStyleType: 'none',
717
+ marginTop: 0,
718
+ marginBottom: 0
720
719
  },
721
- // Hide markers for task list wrapper items (li containing only action list div)
722
- 'li:has(> div[data-node-type="actionList"]:only-child)': {
723
- listStyleType: 'none'
720
+ // Remove margin from nested lists inside wrapper list items to avoid double spacing
721
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
722
+ 'li:has(> ul:only-child) > ul, li:has(> ol:only-child) > ol, li:has(> div[data-node-type="actionList"]:only-child) > div[data-node-type="actionList"]': {
723
+ marginTop: 0
724
724
  },
725
- // Hide checkbox for wrapper task list items
726
- 'li:has(> div[data-node-type="actionList"]:only-child) input[type="checkbox"]': {
725
+ // Collapse wrapper task items (empty task items followed by a sibling nested task list)
726
+ // Only hides empty task items that are actual wrappers, not regular empty task items
727
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
728
+ 'div[data-task-local-id]:has([data-component="content"]:empty):has(+ div[data-node-type="actionList"])': {
727
729
  display: 'none'
728
730
  }
729
731
  });
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
71
71
  var TABLE_INFO_TIMEOUT = 10000;
72
72
  var RENDER_EVENT_SAMPLE_RATE = 0.2;
73
73
  var packageName = "@atlaskit/renderer";
74
- var packageVersion = "128.0.8";
74
+ var packageVersion = "128.2.0";
75
75
  var setAsQueryContainerStyles = (0, _react2.css)({
76
76
  containerName: 'ak-renderer-wrapper',
77
77
  containerType: 'inline-size'
@@ -462,7 +462,7 @@ export default class ReactSerializer {
462
462
  return ((_n$type2 = n.type) === null || _n$type2 === void 0 ? void 0 : _n$type2.name) === 'mediaSingle';
463
463
  });
464
464
  // Only check path for bodiedSyncBlock; syncBlock uses RendererContext
465
- const nestedUnder = editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_5') ? getNestedUnderNodes(path, ['bodiedSyncBlock']) : undefined;
465
+ const nestedUnder = editorExperiment('platform_synced_block', true) ? getNestedUnderNodes(path, ['bodiedSyncBlock']) : undefined;
466
466
  const isAnnotationMark = mark => mark.type === annotation;
467
467
  const isLinkMark = mark => mark.type === link;
468
468
  const isBorderMark = mark => isChildOfMediaSingle && mark.type === border;
@@ -9,7 +9,6 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
9
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
10
  import AnalyticsContext from '../analytics/analyticsContext';
11
11
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
12
- import { fg } from '@atlaskit/platform-feature-flags';
13
12
  export const mediaIdentifierMap = new Map();
14
13
  export const getListOfIdentifiersFromDoc = doc => {
15
14
  if (!doc) {
@@ -78,10 +77,10 @@ export class MediaCardView extends Component {
78
77
  attributes: {
79
78
  reason,
80
79
  external: false,
81
- ...(nestedUnder && editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_5') ? {
80
+ ...(nestedUnder && editorExperiment('platform_synced_block', true) ? {
82
81
  nestedUnder
83
82
  } : {}),
84
- ...(rendererContext !== null && rendererContext !== void 0 && rendererContext.nestedRendererType && editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_5') ? {
83
+ ...(rendererContext !== null && rendererContext !== void 0 && rendererContext.nestedRendererType && editorExperiment('platform_synced_block', true) ? {
85
84
  nestedRendererType: rendererContext.nestedRendererType
86
85
  } : {})
87
86
  }
@@ -833,20 +833,22 @@ const listsSharedStylesForGekko = css({
833
833
  * Applied when platform_editor_flexible_list_indentation experiment is enabled.
834
834
  */
835
835
  const listItemHiddenMarkerStyles = css({
836
- // Hide markers for bullet list wrapper items (li containing only ul)
837
- 'li:has(> ul:only-child)': {
838
- listStyleType: 'none'
839
- },
840
- // Hide markers for ordered list wrapper items (li containing only ol)
841
- 'li:has(> ol:only-child)': {
842
- listStyleType: 'none'
836
+ // Hide markers and remove spacing for wrapper list items (items containing only nested lists)
837
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
838
+ 'li:has(> ul:only-child), li:has(> ol:only-child), li:has(> div[data-node-type="actionList"]:only-child)': {
839
+ listStyleType: 'none',
840
+ marginTop: 0,
841
+ marginBottom: 0
843
842
  },
844
- // Hide markers for task list wrapper items (li containing only action list div)
845
- 'li:has(> div[data-node-type="actionList"]:only-child)': {
846
- listStyleType: 'none'
843
+ // Remove margin from nested lists inside wrapper list items to avoid double spacing
844
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
845
+ 'li:has(> ul:only-child) > ul, li:has(> ol:only-child) > ol, li:has(> div[data-node-type="actionList"]:only-child) > div[data-node-type="actionList"]': {
846
+ marginTop: 0
847
847
  },
848
- // Hide checkbox for wrapper task list items
849
- 'li:has(> div[data-node-type="actionList"]:only-child) input[type="checkbox"]': {
848
+ // Collapse wrapper task items (empty task items followed by a sibling nested task list)
849
+ // Only hides empty task items that are actual wrappers, not regular empty task items
850
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
851
+ 'div[data-task-local-id]:has([data-component="content"]:empty):has(+ div[data-node-type="actionList"])': {
850
852
  display: 'none'
851
853
  }
852
854
  });
@@ -57,7 +57,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
57
57
  const TABLE_INFO_TIMEOUT = 10000;
58
58
  const RENDER_EVENT_SAMPLE_RATE = 0.2;
59
59
  const packageName = "@atlaskit/renderer";
60
- const packageVersion = "128.0.8";
60
+ const packageVersion = "128.2.0";
61
61
  const setAsQueryContainerStyles = css({
62
62
  containerName: 'ak-renderer-wrapper',
63
63
  containerType: 'inline-size'
@@ -496,7 +496,7 @@ var ReactSerializer = /*#__PURE__*/function () {
496
496
  return ((_n$type2 = n.type) === null || _n$type2 === void 0 ? void 0 : _n$type2.name) === 'mediaSingle';
497
497
  });
498
498
  // Only check path for bodiedSyncBlock; syncBlock uses RendererContext
499
- var nestedUnder = editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_5') ? getNestedUnderNodes(path, ['bodiedSyncBlock']) : undefined;
499
+ var nestedUnder = editorExperiment('platform_synced_block', true) ? getNestedUnderNodes(path, ['bodiedSyncBlock']) : undefined;
500
500
  var isAnnotationMark = function isAnnotationMark(mark) {
501
501
  return mark.type === annotation;
502
502
  };
@@ -20,7 +20,6 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
20
20
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
21
21
  import AnalyticsContext from '../analytics/analyticsContext';
22
22
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
23
- import { fg } from '@atlaskit/platform-feature-flags';
24
23
  export var mediaIdentifierMap = new Map();
25
24
  export var getListOfIdentifiersFromDoc = function getListOfIdentifiersFromDoc(doc) {
26
25
  if (!doc) {
@@ -113,9 +112,9 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
113
112
  attributes: _objectSpread(_objectSpread({
114
113
  reason: reason,
115
114
  external: false
116
- }, nestedUnder && editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_5') ? {
115
+ }, nestedUnder && editorExperiment('platform_synced_block', true) ? {
117
116
  nestedUnder: nestedUnder
118
- } : {}), rendererContext !== null && rendererContext !== void 0 && rendererContext.nestedRendererType && editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_5') ? {
117
+ } : {}), rendererContext !== null && rendererContext !== void 0 && rendererContext.nestedRendererType && editorExperiment('platform_synced_block', true) ? {
119
118
  nestedRendererType: rendererContext.nestedRendererType
120
119
  } : {})
121
120
  });
@@ -703,20 +703,22 @@ var listsSharedStylesForGekko = css({
703
703
  * Applied when platform_editor_flexible_list_indentation experiment is enabled.
704
704
  */
705
705
  var listItemHiddenMarkerStyles = css({
706
- // Hide markers for bullet list wrapper items (li containing only ul)
707
- 'li:has(> ul:only-child)': {
708
- listStyleType: 'none'
709
- },
710
- // Hide markers for ordered list wrapper items (li containing only ol)
711
- 'li:has(> ol:only-child)': {
712
- listStyleType: 'none'
706
+ // Hide markers and remove spacing for wrapper list items (items containing only nested lists)
707
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
708
+ 'li:has(> ul:only-child), li:has(> ol:only-child), li:has(> div[data-node-type="actionList"]:only-child)': {
709
+ listStyleType: 'none',
710
+ marginTop: 0,
711
+ marginBottom: 0
713
712
  },
714
- // Hide markers for task list wrapper items (li containing only action list div)
715
- 'li:has(> div[data-node-type="actionList"]:only-child)': {
716
- listStyleType: 'none'
713
+ // Remove margin from nested lists inside wrapper list items to avoid double spacing
714
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
715
+ 'li:has(> ul:only-child) > ul, li:has(> ol:only-child) > ol, li:has(> div[data-node-type="actionList"]:only-child) > div[data-node-type="actionList"]': {
716
+ marginTop: 0
717
717
  },
718
- // Hide checkbox for wrapper task list items
719
- 'li:has(> div[data-node-type="actionList"]:only-child) input[type="checkbox"]': {
718
+ // Collapse wrapper task items (empty task items followed by a sibling nested task list)
719
+ // Only hides empty task items that are actual wrappers, not regular empty task items
720
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
721
+ 'div[data-task-local-id]:has([data-component="content"]:empty):has(+ div[data-node-type="actionList"])': {
720
722
  display: 'none'
721
723
  }
722
724
  });
@@ -62,7 +62,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
62
62
  var TABLE_INFO_TIMEOUT = 10000;
63
63
  var RENDER_EVENT_SAMPLE_RATE = 0.2;
64
64
  var packageName = "@atlaskit/renderer";
65
- var packageVersion = "128.0.8";
65
+ var packageVersion = "128.2.0";
66
66
  var setAsQueryContainerStyles = css({
67
67
  containerName: 'ak-renderer-wrapper',
68
68
  containerType: 'inline-size'
@@ -32,6 +32,13 @@ export interface SmartLinksOptions {
32
32
  * Component: inline
33
33
  */
34
34
  hideHoverPreview?: boolean;
35
+ /**
36
+ * Changeboard configuration for Smart Link Draggable feature
37
+ */
38
+ smartLinkDraggableChangeboardConfig?: {
39
+ onClose: () => void;
40
+ shouldShow: boolean;
41
+ };
35
42
  /**
36
43
  * A flag to enable inline Smart Link to render without lazy loading.
37
44
  * Default is false.
@@ -32,6 +32,13 @@ export interface SmartLinksOptions {
32
32
  * Component: inline
33
33
  */
34
34
  hideHoverPreview?: boolean;
35
+ /**
36
+ * Changeboard configuration for Smart Link Draggable feature
37
+ */
38
+ smartLinkDraggableChangeboardConfig?: {
39
+ onClose: () => void;
40
+ shouldShow: boolean;
41
+ };
35
42
  /**
36
43
  * A flag to enable inline Smart Link to render without lazy loading.
37
44
  * Default is false.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "128.1.0",
3
+ "version": "128.2.1",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -59,9 +59,9 @@
59
59
  "@atlaskit/status": "^3.1.0",
60
60
  "@atlaskit/task-decision": "^19.3.0",
61
61
  "@atlaskit/theme": "^22.0.0",
62
- "@atlaskit/tmp-editor-statsig": "^40.3.0",
62
+ "@atlaskit/tmp-editor-statsig": "^41.0.0",
63
63
  "@atlaskit/tokens": "^11.1.0",
64
- "@atlaskit/tooltip": "^20.14.0",
64
+ "@atlaskit/tooltip": "^21.0.0",
65
65
  "@atlaskit/visually-hidden": "^3.0.0",
66
66
  "@babel/runtime": "^7.0.0",
67
67
  "@emotion/react": "^11.7.1",
@@ -73,7 +73,7 @@
73
73
  "uuid": "^3.1.0"
74
74
  },
75
75
  "peerDependencies": {
76
- "@atlaskit/editor-common": "^112.5.0",
76
+ "@atlaskit/editor-common": "^112.6.0",
77
77
  "@atlaskit/link-provider": "^4.2.0",
78
78
  "@atlaskit/media-core": "^37.0.0",
79
79
  "react": "^18.2.0",
@@ -240,9 +240,6 @@
240
240
  "platform_editor_renderer_selection_context": {
241
241
  "type": "boolean",
242
242
  "referenceOnly": "true"
243
- },
244
- "platform_synced_block_patch_5": {
245
- "type": "boolean"
246
243
  }
247
244
  }
248
245
  }