@wordpress/editor 14.44.0 → 14.44.1-next.v.202604201441.0

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 (103) hide show
  1. package/build/components/collab-sidebar/add-comment.cjs +6 -22
  2. package/build/components/collab-sidebar/add-comment.cjs.map +3 -3
  3. package/build/components/collab-sidebar/board-store.cjs +103 -0
  4. package/build/components/collab-sidebar/board-store.cjs.map +7 -0
  5. package/build/components/collab-sidebar/comment-form.cjs +2 -10
  6. package/build/components/collab-sidebar/comment-form.cjs.map +2 -2
  7. package/build/components/collab-sidebar/comments.cjs +29 -149
  8. package/build/components/collab-sidebar/comments.cjs.map +3 -3
  9. package/build/components/collab-sidebar/floating-container.cjs +62 -0
  10. package/build/components/collab-sidebar/floating-container.cjs.map +7 -0
  11. package/build/components/collab-sidebar/hooks.cjs +49 -41
  12. package/build/components/collab-sidebar/hooks.cjs.map +2 -2
  13. package/build/components/collab-sidebar/index.cjs +2 -13
  14. package/build/components/collab-sidebar/index.cjs.map +2 -2
  15. package/build/components/collab-sidebar/utils.cjs +72 -4
  16. package/build/components/collab-sidebar/utils.cjs.map +2 -2
  17. package/build/components/collaborators-presence/avatar/component.cjs.map +1 -1
  18. package/build/components/collaborators-presence/index.cjs +3 -3
  19. package/build/components/collaborators-presence/index.cjs.map +2 -2
  20. package/build/components/collaborators-presence/list.cjs +3 -3
  21. package/build/components/collaborators-presence/list.cjs.map +2 -2
  22. package/build/components/media-categories/index.cjs +1 -1
  23. package/build/components/media-categories/index.cjs.map +1 -1
  24. package/build/components/more-menu/index.cjs +1 -1
  25. package/build/components/more-menu/index.cjs.map +1 -1
  26. package/build/components/post-publish-panel/maybe-upload-media.cjs +1 -1
  27. package/build/components/post-publish-panel/maybe-upload-media.cjs.map +1 -1
  28. package/build/components/style-book/constants.cjs +1 -1
  29. package/build/components/style-book/constants.cjs.map +1 -1
  30. package/build/components/style-book/index.cjs +1 -1
  31. package/build/components/style-book/index.cjs.map +1 -1
  32. package/build-module/components/collab-sidebar/add-comment.mjs +8 -27
  33. package/build-module/components/collab-sidebar/add-comment.mjs.map +2 -2
  34. package/build-module/components/collab-sidebar/board-store.mjs +78 -0
  35. package/build-module/components/collab-sidebar/board-store.mjs.map +7 -0
  36. package/build-module/components/collab-sidebar/comment-form.mjs +4 -12
  37. package/build-module/components/collab-sidebar/comment-form.mjs.map +2 -2
  38. package/build-module/components/collab-sidebar/comments.mjs +30 -151
  39. package/build-module/components/collab-sidebar/comments.mjs.map +2 -2
  40. package/build-module/components/collab-sidebar/floating-container.mjs +27 -0
  41. package/build-module/components/collab-sidebar/floating-container.mjs.map +7 -0
  42. package/build-module/components/collab-sidebar/hooks.mjs +51 -44
  43. package/build-module/components/collab-sidebar/hooks.mjs.map +2 -2
  44. package/build-module/components/collab-sidebar/index.mjs +2 -13
  45. package/build-module/components/collab-sidebar/index.mjs.map +2 -2
  46. package/build-module/components/collab-sidebar/utils.mjs +71 -3
  47. package/build-module/components/collab-sidebar/utils.mjs.map +2 -2
  48. package/build-module/components/collaborators-presence/avatar/component.mjs.map +1 -1
  49. package/build-module/components/collaborators-presence/index.mjs +3 -3
  50. package/build-module/components/collaborators-presence/index.mjs.map +2 -2
  51. package/build-module/components/collaborators-presence/list.mjs +3 -3
  52. package/build-module/components/collaborators-presence/list.mjs.map +2 -2
  53. package/build-module/components/media-categories/index.mjs +1 -1
  54. package/build-module/components/media-categories/index.mjs.map +1 -1
  55. package/build-module/components/more-menu/index.mjs +1 -1
  56. package/build-module/components/more-menu/index.mjs.map +1 -1
  57. package/build-module/components/post-publish-panel/maybe-upload-media.mjs +1 -1
  58. package/build-module/components/post-publish-panel/maybe-upload-media.mjs.map +1 -1
  59. package/build-module/components/style-book/constants.mjs +1 -1
  60. package/build-module/components/style-book/constants.mjs.map +1 -1
  61. package/build-module/components/style-book/index.mjs +1 -1
  62. package/build-module/components/style-book/index.mjs.map +1 -1
  63. package/build-style/style-rtl.css +12 -30
  64. package/build-style/style.css +12 -30
  65. package/build-types/components/collab-sidebar/add-comment.d.ts +2 -6
  66. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
  67. package/build-types/components/collab-sidebar/board-store.d.ts +8 -0
  68. package/build-types/components/collab-sidebar/board-store.d.ts.map +1 -0
  69. package/build-types/components/collab-sidebar/comment-form.d.ts +1 -3
  70. package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
  71. package/build-types/components/collab-sidebar/comments.d.ts +1 -3
  72. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  73. package/build-types/components/collab-sidebar/floating-container.d.ts +8 -0
  74. package/build-types/components/collab-sidebar/floating-container.d.ts.map +1 -0
  75. package/build-types/components/collab-sidebar/hooks.d.ts +13 -9
  76. package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
  77. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  78. package/build-types/components/collab-sidebar/utils.d.ts +27 -4
  79. package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
  80. package/build-types/components/style-book/constants.d.ts +1 -1
  81. package/build-types/components/style-book/constants.d.ts.map +1 -1
  82. package/package.json +45 -45
  83. package/src/components/collab-sidebar/add-comment.js +9 -31
  84. package/src/components/collab-sidebar/board-store.js +83 -0
  85. package/src/components/collab-sidebar/comment-form.js +5 -14
  86. package/src/components/collab-sidebar/comments.js +29 -202
  87. package/src/components/collab-sidebar/floating-container.js +29 -0
  88. package/src/components/collab-sidebar/hooks.js +60 -48
  89. package/src/components/collab-sidebar/index.js +3 -14
  90. package/src/components/collab-sidebar/test/utils.js +153 -0
  91. package/src/components/collab-sidebar/utils.js +112 -4
  92. package/src/components/collaborators-presence/avatar/component.tsx +1 -1
  93. package/src/components/collaborators-presence/styles/collaborators-list.scss +1 -1
  94. package/src/components/collaborators-presence/styles/collaborators-presence.scss +1 -1
  95. package/src/components/document-outline/style.scss +1 -1
  96. package/src/components/media-categories/index.js +1 -1
  97. package/src/components/more-menu/index.js +1 -1
  98. package/src/components/post-publish-panel/maybe-upload-media.js +1 -1
  99. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +2 -2
  100. package/src/components/post-revisions-preview/style.scss +1 -1
  101. package/src/components/style-book/constants.ts +1 -1
  102. package/src/components/style-book/index.js +1 -1
  103. package/src/components/template-actions-panel/style.scss +1 -1
@@ -38,12 +38,9 @@ function NotesSidebarContent( {
38
38
  styles,
39
39
  comments,
40
40
  commentSidebarRef,
41
- reflowComments,
42
- commentLastUpdated,
43
41
  isFloating = false,
44
42
  } ) {
45
- const { onCreate, onEdit, onDelete } =
46
- useBlockCommentsActions( reflowComments );
43
+ const { onCreate, onEdit, onDelete } = useBlockCommentsActions();
47
44
 
48
45
  return (
49
46
  <VStack
@@ -70,8 +67,6 @@ function NotesSidebarContent( {
70
67
  onAddReply={ onCreate }
71
68
  onCommentDelete={ onDelete }
72
69
  commentSidebarRef={ commentSidebarRef }
73
- reflowComments={ reflowComments }
74
- commentLastUpdated={ commentLastUpdated }
75
70
  isFloating={ isFloating }
76
71
  />
77
72
  </VStack>
@@ -119,12 +114,8 @@ function NotesSidebar( { postId } ) {
119
114
  []
120
115
  );
121
116
 
122
- const {
123
- resultComments,
124
- unresolvedSortedThreads,
125
- reflowComments,
126
- commentLastUpdated,
127
- } = useBlockComments( postId );
117
+ const { resultComments, unresolvedSortedThreads } =
118
+ useBlockComments( postId );
128
119
 
129
120
  // Only enable the floating sidebar for large viewports.
130
121
  const showFloatingSidebar = isLargeViewport;
@@ -239,8 +230,6 @@ function NotesSidebar( { postId } ) {
239
230
  <NotesSidebarContent
240
231
  comments={ unresolvedSortedThreads }
241
232
  commentSidebarRef={ commentSidebarRef }
242
- reflowComments={ reflowComments }
243
- commentLastUpdated={ commentLastUpdated }
244
233
  styles={ {
245
234
  backgroundColor,
246
235
  } }
@@ -0,0 +1,153 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import { calculateAllOffsets } from '../utils';
5
+
6
+ function makeRect( top ) {
7
+ return { top };
8
+ }
9
+
10
+ describe( 'calculateAllOffsets', () => {
11
+ it( 'returns empty offsets when no threads match blockRects', () => {
12
+ const { offsets, minHeight } = calculateAllOffsets( {
13
+ threads: [ { id: 1 } ],
14
+ selectedNoteId: undefined,
15
+ blockRects: {},
16
+ heights: {},
17
+ } );
18
+ expect( offsets ).toEqual( {} );
19
+ expect( minHeight ).toBe( 0 );
20
+ } );
21
+
22
+ it( 'assigns default offset when there is no selected thread', () => {
23
+ const threads = [ { id: 1 }, { id: 2 }, { id: 3 } ];
24
+ const blockRects = {
25
+ 1: makeRect( 100 ),
26
+ 2: makeRect( 300 ),
27
+ 3: makeRect( 500 ),
28
+ };
29
+ const heights = { 1: 50, 2: 50, 3: 50 };
30
+
31
+ const { offsets } = calculateAllOffsets( {
32
+ threads,
33
+ selectedNoteId: undefined,
34
+ blockRects,
35
+ heights,
36
+ } );
37
+
38
+ // With no selected thread, breakIndex falls back to 0 (first thread).
39
+ expect( offsets[ 1 ] ).toBe( -16 );
40
+ // Non-overlapping threads get the default offset.
41
+ expect( offsets[ 2 ] ).toBe( -16 );
42
+ expect( offsets[ 3 ] ).toBe( -16 );
43
+ } );
44
+
45
+ it( 'pushes neighbors below the selected thread downward when overlapping', () => {
46
+ const threads = [ { id: 1 }, { id: 2 }, { id: 3 } ];
47
+ // Thread 2 selected; thread 3 starts inside thread 2's space.
48
+ const blockRects = {
49
+ 1: makeRect( 100 ),
50
+ 2: makeRect( 200 ),
51
+ 3: makeRect( 220 ),
52
+ };
53
+ const heights = { 1: 50, 2: 80, 3: 50 };
54
+
55
+ const { offsets } = calculateAllOffsets( {
56
+ threads,
57
+ selectedNoteId: 2,
58
+ blockRects,
59
+ heights,
60
+ } );
61
+
62
+ expect( offsets[ 2 ] ).toBe( -16 );
63
+ // thread 3 overlaps thread 2: previous bottom = (200-16)+80 = 264.
64
+ // 220 < 264+16 = 280, so offset = 264 - 220 + 20 = 64.
65
+ expect( offsets[ 3 ] ).toBe( 64 );
66
+ } );
67
+
68
+ it( 'pushes neighbors above the selected thread upward when overlapping', () => {
69
+ const threads = [ { id: 1 }, { id: 2 } ];
70
+ // Thread 1 is tall and overlaps where thread 2 sits.
71
+ const blockRects = {
72
+ 1: makeRect( 150 ),
73
+ 2: makeRect( 180 ),
74
+ };
75
+ const heights = { 1: 60, 2: 50 };
76
+
77
+ const { offsets } = calculateAllOffsets( {
78
+ threads,
79
+ selectedNoteId: 2,
80
+ blockRects,
81
+ heights,
82
+ } );
83
+
84
+ expect( offsets[ 2 ] ).toBe( -16 );
85
+ // Thread 1 bottom = 150 + 60 = 210, next threadTop = 180 - 16 = 164.
86
+ // 210 > 164, so offset = 164 - 150 - 60 - 20 = -66.
87
+ expect( offsets[ 1 ] ).toBe( -66 );
88
+ } );
89
+
90
+ it( 'cascades overlap adjustment across multiple threads below', () => {
91
+ const threads = [ { id: 1 }, { id: 2 }, { id: 3 } ];
92
+ // All three threads are tightly packed.
93
+ const blockRects = {
94
+ 1: makeRect( 100 ),
95
+ 2: makeRect( 110 ),
96
+ 3: makeRect( 120 ),
97
+ };
98
+ const heights = { 1: 80, 2: 80, 3: 80 };
99
+
100
+ const { offsets } = calculateAllOffsets( {
101
+ threads,
102
+ selectedNoteId: 1,
103
+ blockRects,
104
+ heights,
105
+ } );
106
+
107
+ expect( offsets[ 1 ] ).toBe( -16 );
108
+ // Thread 2: previous bottom = (100-16)+80 = 164. 110 < 164+16, offset = 164-110+20 = 74.
109
+ expect( offsets[ 2 ] ).toBe( 74 );
110
+ // Thread 3: previous bottom = (110+74)+80 = 264. 120 < 264+16, offset = 264-120+20 = 164.
111
+ expect( offsets[ 3 ] ).toBe( 164 );
112
+ } );
113
+
114
+ it( 'skips threads with missing blockRects', () => {
115
+ const threads = [ { id: 1 }, { id: 2 }, { id: 3 } ];
116
+ const blockRects = {
117
+ 1: makeRect( 100 ),
118
+ // id 2 is missing
119
+ 3: makeRect( 500 ),
120
+ };
121
+ const heights = { 1: 50, 3: 50 };
122
+
123
+ const { offsets } = calculateAllOffsets( {
124
+ threads,
125
+ selectedNoteId: 1,
126
+ blockRects,
127
+ heights,
128
+ } );
129
+
130
+ expect( offsets[ 1 ] ).toBe( -16 );
131
+ expect( offsets[ 2 ] ).toBeUndefined();
132
+ expect( offsets[ 3 ] ).toBe( -16 );
133
+ } );
134
+
135
+ it( 'computes minHeight from the last thread position', () => {
136
+ const threads = [ { id: 1 }, { id: 2 } ];
137
+ const blockRects = {
138
+ 1: makeRect( 100 ),
139
+ 2: makeRect( 400 ),
140
+ };
141
+ const heights = { 1: 50, 2: 60 };
142
+
143
+ const { minHeight } = calculateAllOffsets( {
144
+ threads,
145
+ selectedNoteId: 1,
146
+ blockRects,
147
+ heights,
148
+ } );
149
+
150
+ // Last thread: top=400, height=60, offset=-16, + 32 = 476.
151
+ expect( minHeight ).toBe( 476 );
152
+ } );
153
+ } );
@@ -13,10 +13,10 @@ export function sanitizeCommentString( str ) {
13
13
  return str.trim();
14
14
  }
15
15
 
16
- /**
17
- * A no-operation function that does nothing.
18
- */
19
- export function noop() {}
16
+ const THREAD_ALIGN_OFFSET = -16;
17
+ const THREAD_GAP = 16;
18
+ const OVERLAP_MARGIN = 20;
19
+ const BOARD_BOTTOM_PADDING = 32;
20
20
 
21
21
  /**
22
22
  * Avatar border colors chosen to be visually distinct from each other and from
@@ -91,6 +91,114 @@ export function getCommentExcerpt( text, excerptLength = 10 ) {
91
91
  return isTrimmed ? trimmedExcerpt + '…' : trimmedExcerpt;
92
92
  }
93
93
 
94
+ /**
95
+ * Calculate y offsets for all floating comment threads. Adjusts positions
96
+ * to prevent overlapping by pushing threads above the selected one upward
97
+ * and threads below it downward.
98
+ *
99
+ * @param {Object} params
100
+ * @param {Array} params.threads Ordered list of thread objects.
101
+ * @param {string|number|undefined} params.selectedNoteId ID of the currently selected thread.
102
+ * @param {Object<string,DOMRect>} params.blockRects Pre-read bounding rects keyed by thread ID.
103
+ * @param {Object<string,number>} params.heights Rendered heights keyed by thread ID.
104
+ * @return {{ offsets: Object<string,number>, minHeight: number }} Computed offsets and minimum editor height.
105
+ */
106
+ export function calculateAllOffsets( {
107
+ threads,
108
+ selectedNoteId,
109
+ blockRects,
110
+ heights,
111
+ } ) {
112
+ const offsets = {};
113
+
114
+ const anchorIndex = Math.max(
115
+ 0,
116
+ threads.findIndex( ( thread ) => thread.id === selectedNoteId )
117
+ );
118
+
119
+ const anchorThread = threads[ anchorIndex ];
120
+
121
+ if ( ! anchorThread || ! blockRects[ anchorThread.id ] ) {
122
+ return { offsets, minHeight: 0 };
123
+ }
124
+
125
+ const anchorRect = blockRects[ anchorThread.id ];
126
+ const anchorTop = anchorRect.top || 0;
127
+ const anchorHeight = heights[ anchorThread.id ] || 0;
128
+
129
+ offsets[ anchorThread.id ] = THREAD_ALIGN_OFFSET;
130
+
131
+ // Process threads after the anchor, offsetting overlapping threads downward.
132
+ let prevAdjustedTop = anchorTop + THREAD_ALIGN_OFFSET;
133
+ let prevHeight = anchorHeight;
134
+
135
+ for ( let i = anchorIndex + 1; i < threads.length; i++ ) {
136
+ const thread = threads[ i ];
137
+ const threadRect = blockRects[ thread.id ];
138
+ if ( ! threadRect ) {
139
+ continue;
140
+ }
141
+
142
+ const threadTop = threadRect.top || 0;
143
+ const threadHeight = heights[ thread.id ] || 0;
144
+
145
+ let offset = THREAD_ALIGN_OFFSET;
146
+
147
+ const prevBottom = prevAdjustedTop + prevHeight;
148
+ if ( threadTop < prevBottom + THREAD_GAP ) {
149
+ offset = prevBottom - threadTop + OVERLAP_MARGIN;
150
+ }
151
+
152
+ offsets[ thread.id ] = offset;
153
+
154
+ prevAdjustedTop = threadTop + offset;
155
+ prevHeight = threadHeight;
156
+ }
157
+
158
+ // Process threads before the anchor, offsetting overlapping threads upward.
159
+ let belowAdjustedTop = anchorTop + THREAD_ALIGN_OFFSET;
160
+
161
+ for ( let i = anchorIndex - 1; i >= 0; i-- ) {
162
+ const thread = threads[ i ];
163
+ const threadRect = blockRects[ thread.id ];
164
+ if ( ! threadRect ) {
165
+ continue;
166
+ }
167
+
168
+ const threadTop = threadRect.top || 0;
169
+ const threadHeight = heights[ thread.id ] || 0;
170
+
171
+ let offset = THREAD_ALIGN_OFFSET;
172
+
173
+ const threadBottom = threadTop + threadHeight;
174
+
175
+ if ( threadBottom > belowAdjustedTop ) {
176
+ offset =
177
+ belowAdjustedTop - threadTop - threadHeight - OVERLAP_MARGIN;
178
+ }
179
+
180
+ offsets[ thread.id ] = offset;
181
+
182
+ belowAdjustedTop = threadTop + offset;
183
+ }
184
+
185
+ let editorMinHeight = 0;
186
+ const lastThread = threads[ threads.length - 1 ];
187
+ const lastBlockRect = blockRects[ lastThread.id ];
188
+ if ( lastBlockRect ) {
189
+ const lastThreadTop = lastBlockRect.top || 0;
190
+ const lastThreadHeight = heights[ lastThread.id ] || 0;
191
+ const lastThreadOffset = offsets[ lastThread.id ] || 0;
192
+ editorMinHeight =
193
+ lastThreadTop +
194
+ lastThreadHeight +
195
+ lastThreadOffset +
196
+ BOARD_BOTTOM_PADDING;
197
+ }
198
+
199
+ return { offsets, minHeight: editorMinHeight };
200
+ }
201
+
94
202
  /**
95
203
  * Shift focus to the comment thread associated with a particular comment ID.
96
204
  * If an additional selector is provided, the focus will be shifted to the element matching the selector.
@@ -73,7 +73,7 @@ function Avatar( {
73
73
  '--editor-avatar-name-color': nameColor,
74
74
  }
75
75
  : {} ),
76
- } as React.CSSProperties;
76
+ };
77
77
 
78
78
  const avatar = (
79
79
  <div
@@ -63,7 +63,7 @@
63
63
  padding: $grid-unit-15 $grid-unit-20;
64
64
  gap: $grid-unit-10;
65
65
  width: 100%;
66
- cursor: pointer;
66
+ cursor: var(--wpds-cursor-control);
67
67
  transition: background-color 0.2s ease;
68
68
 
69
69
  &:hover:not(:disabled) {
@@ -22,7 +22,7 @@
22
22
  .editor-collaborators-presence__button.editor-collaborators-presence__button.components-button {
23
23
  display: flex;
24
24
  align-items: center;
25
- cursor: pointer;
25
+ cursor: var(--wpds-cursor-control);
26
26
  position: relative;
27
27
  padding: $grid-unit-05;
28
28
  border-radius: $grid-unit-05;
@@ -43,7 +43,7 @@
43
43
  }
44
44
 
45
45
  .document-outline__button {
46
- cursor: pointer;
46
+ cursor: var(--wpds-cursor-control);
47
47
  background: none;
48
48
  border: none;
49
49
  display: flex;
@@ -26,7 +26,7 @@ const getExternalLink = ( url, text ) =>
26
26
  `<a ${ getExternalLinkAttributes( url ) }>${ text }</a>`;
27
27
 
28
28
  const getExternalLinkAttributes = ( url ) =>
29
- `href="${ url }" target="_blank" rel="noreferrer noopener"`;
29
+ `href="${ url }" target="_blank" rel="noopener"`;
30
30
 
31
31
  const getOpenverseLicense = ( license, licenseVersion ) => {
32
32
  let licenseName = license.trim();
@@ -132,7 +132,7 @@ export default function MoreMenu( { disabled = false } ) {
132
132
  'https://wordpress.org/documentation/article/wordpress-block-editor/'
133
133
  ) }
134
134
  target="_blank"
135
- rel="noopener noreferrer"
135
+ rel="noopener"
136
136
  >
137
137
  { __( 'Help' ) }
138
138
  <VisuallyHidden as="span">
@@ -102,7 +102,7 @@ function Image( { clientId, alt, url } ) {
102
102
  height: '32px',
103
103
  objectFit: 'cover',
104
104
  borderRadius: '2px',
105
- cursor: 'pointer',
105
+ cursor: 'var(--wpds-cursor-control)',
106
106
  } }
107
107
  whileHover={ { scale: 1.08 } }
108
108
  />
@@ -89,7 +89,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
89
89
  <a
90
90
  class="components-external-link"
91
91
  href="https://wordpress.local/sample-page/"
92
- rel="external noreferrer noopener"
92
+ rel="external noopener"
93
93
  target="_blank"
94
94
  >
95
95
  <span
@@ -316,7 +316,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
316
316
  <a
317
317
  class="components-external-link"
318
318
  href="https://wordpress.local/sample-page/"
319
- rel="external noreferrer noopener"
319
+ rel="external noopener"
320
320
  target="_blank"
321
321
  >
322
322
  <span
@@ -44,7 +44,7 @@
44
44
  min-height: 4px;
45
45
  border: none;
46
46
  padding: 0;
47
- cursor: pointer;
47
+ cursor: var(--wpds-cursor-control);
48
48
  transition: opacity 0.1s ease;
49
49
 
50
50
  &.is-added {
@@ -227,7 +227,7 @@ export const STYLE_BOOK_IFRAME_STYLES = `
227
227
  .editor-style-book__example {
228
228
  max-width: 900px;
229
229
  border-radius: 2px;
230
- cursor: pointer;
230
+ cursor: var(--wpds-cursor-control);
231
231
  display: flex;
232
232
  flex-direction: column;
233
233
  gap: 40px;
@@ -620,7 +620,7 @@ export const StyleBookBody = ( {
620
620
  <style>
621
621
  { STYLE_BOOK_IFRAME_STYLES }
622
622
  { !! onClick &&
623
- 'body { cursor: pointer; } body * { pointer-events: none; }' }
623
+ 'body { cursor: var(--wpds-cursor-control); } body * { pointer-events: none; }' }
624
624
  </style>
625
625
  <Examples
626
626
  className="editor-style-book__examples"
@@ -19,7 +19,7 @@
19
19
  }
20
20
 
21
21
  &[role="button"] {
22
- cursor: pointer;
22
+ cursor: var(--wpds-cursor-control);
23
23
 
24
24
  &:hover .block-editor-block-preview__container::after {
25
25
  outline-color: rgba($black, 0.3);