@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.
- package/build/components/collab-sidebar/add-comment.cjs +6 -22
- package/build/components/collab-sidebar/add-comment.cjs.map +3 -3
- package/build/components/collab-sidebar/board-store.cjs +103 -0
- package/build/components/collab-sidebar/board-store.cjs.map +7 -0
- package/build/components/collab-sidebar/comment-form.cjs +2 -10
- package/build/components/collab-sidebar/comment-form.cjs.map +2 -2
- package/build/components/collab-sidebar/comments.cjs +29 -149
- package/build/components/collab-sidebar/comments.cjs.map +3 -3
- package/build/components/collab-sidebar/floating-container.cjs +62 -0
- package/build/components/collab-sidebar/floating-container.cjs.map +7 -0
- package/build/components/collab-sidebar/hooks.cjs +49 -41
- package/build/components/collab-sidebar/hooks.cjs.map +2 -2
- package/build/components/collab-sidebar/index.cjs +2 -13
- package/build/components/collab-sidebar/index.cjs.map +2 -2
- package/build/components/collab-sidebar/utils.cjs +72 -4
- package/build/components/collab-sidebar/utils.cjs.map +2 -2
- package/build/components/collaborators-presence/avatar/component.cjs.map +1 -1
- package/build/components/collaborators-presence/index.cjs +3 -3
- package/build/components/collaborators-presence/index.cjs.map +2 -2
- package/build/components/collaborators-presence/list.cjs +3 -3
- package/build/components/collaborators-presence/list.cjs.map +2 -2
- package/build/components/media-categories/index.cjs +1 -1
- package/build/components/media-categories/index.cjs.map +1 -1
- package/build/components/more-menu/index.cjs +1 -1
- package/build/components/more-menu/index.cjs.map +1 -1
- package/build/components/post-publish-panel/maybe-upload-media.cjs +1 -1
- package/build/components/post-publish-panel/maybe-upload-media.cjs.map +1 -1
- package/build/components/style-book/constants.cjs +1 -1
- package/build/components/style-book/constants.cjs.map +1 -1
- package/build/components/style-book/index.cjs +1 -1
- package/build/components/style-book/index.cjs.map +1 -1
- package/build-module/components/collab-sidebar/add-comment.mjs +8 -27
- package/build-module/components/collab-sidebar/add-comment.mjs.map +2 -2
- package/build-module/components/collab-sidebar/board-store.mjs +78 -0
- package/build-module/components/collab-sidebar/board-store.mjs.map +7 -0
- package/build-module/components/collab-sidebar/comment-form.mjs +4 -12
- package/build-module/components/collab-sidebar/comment-form.mjs.map +2 -2
- package/build-module/components/collab-sidebar/comments.mjs +30 -151
- package/build-module/components/collab-sidebar/comments.mjs.map +2 -2
- package/build-module/components/collab-sidebar/floating-container.mjs +27 -0
- package/build-module/components/collab-sidebar/floating-container.mjs.map +7 -0
- package/build-module/components/collab-sidebar/hooks.mjs +51 -44
- package/build-module/components/collab-sidebar/hooks.mjs.map +2 -2
- package/build-module/components/collab-sidebar/index.mjs +2 -13
- package/build-module/components/collab-sidebar/index.mjs.map +2 -2
- package/build-module/components/collab-sidebar/utils.mjs +71 -3
- package/build-module/components/collab-sidebar/utils.mjs.map +2 -2
- package/build-module/components/collaborators-presence/avatar/component.mjs.map +1 -1
- package/build-module/components/collaborators-presence/index.mjs +3 -3
- package/build-module/components/collaborators-presence/index.mjs.map +2 -2
- package/build-module/components/collaborators-presence/list.mjs +3 -3
- package/build-module/components/collaborators-presence/list.mjs.map +2 -2
- package/build-module/components/media-categories/index.mjs +1 -1
- package/build-module/components/media-categories/index.mjs.map +1 -1
- package/build-module/components/more-menu/index.mjs +1 -1
- package/build-module/components/more-menu/index.mjs.map +1 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.mjs +1 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.mjs.map +1 -1
- package/build-module/components/style-book/constants.mjs +1 -1
- package/build-module/components/style-book/constants.mjs.map +1 -1
- package/build-module/components/style-book/index.mjs +1 -1
- package/build-module/components/style-book/index.mjs.map +1 -1
- package/build-style/style-rtl.css +12 -30
- package/build-style/style.css +12 -30
- package/build-types/components/collab-sidebar/add-comment.d.ts +2 -6
- package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/board-store.d.ts +8 -0
- package/build-types/components/collab-sidebar/board-store.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/comment-form.d.ts +1 -3
- package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comments.d.ts +1 -3
- package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/floating-container.d.ts +8 -0
- package/build-types/components/collab-sidebar/floating-container.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/hooks.d.ts +13 -9
- package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/utils.d.ts +27 -4
- package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
- package/build-types/components/style-book/constants.d.ts +1 -1
- package/build-types/components/style-book/constants.d.ts.map +1 -1
- package/package.json +45 -45
- package/src/components/collab-sidebar/add-comment.js +9 -31
- package/src/components/collab-sidebar/board-store.js +83 -0
- package/src/components/collab-sidebar/comment-form.js +5 -14
- package/src/components/collab-sidebar/comments.js +29 -202
- package/src/components/collab-sidebar/floating-container.js +29 -0
- package/src/components/collab-sidebar/hooks.js +60 -48
- package/src/components/collab-sidebar/index.js +3 -14
- package/src/components/collab-sidebar/test/utils.js +153 -0
- package/src/components/collab-sidebar/utils.js +112 -4
- package/src/components/collaborators-presence/avatar/component.tsx +1 -1
- package/src/components/collaborators-presence/styles/collaborators-list.scss +1 -1
- package/src/components/collaborators-presence/styles/collaborators-presence.scss +1 -1
- package/src/components/document-outline/style.scss +1 -1
- package/src/components/media-categories/index.js +1 -1
- package/src/components/more-menu/index.js +1 -1
- package/src/components/post-publish-panel/maybe-upload-media.js +1 -1
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +2 -2
- package/src/components/post-revisions-preview/style.scss +1 -1
- package/src/components/style-book/constants.ts +1 -1
- package/src/components/style-book/index.js +1 -1
- package/src/components/template-actions-panel/style.scss +1 -1
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
.admin-ui-page__header {
|
|
122
122
|
padding: var(--wpds-dimension-padding-lg, 16px) var(--wpds-dimension-padding-2xl, 24px);
|
|
123
123
|
border-bottom: var(--wpds-border-width-xs, 1px) solid var(--wpds-color-stroke-surface-neutral-weak, #e4e4e4);
|
|
124
|
-
background: var(--wpds-color-bg-surface-neutral-strong, #
|
|
124
|
+
background: var(--wpds-color-bg-surface-neutral-strong, #fff);
|
|
125
125
|
position: sticky;
|
|
126
126
|
top: 0;
|
|
127
127
|
z-index: 1;
|
|
@@ -161,20 +161,6 @@
|
|
|
161
161
|
padding: var(--wpds-dimension-padding-lg, 16px) var(--wpds-dimension-padding-2xl, 24px);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon {
|
|
165
|
-
width: auto;
|
|
166
|
-
padding: 0 var(--wpds-dimension-padding-xs, 4px);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg {
|
|
170
|
-
display: none;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon::after {
|
|
174
|
-
content: attr(aria-label);
|
|
175
|
-
font-size: var(--wpds-typography-font-size-sm, 12px);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
164
|
/**
|
|
179
165
|
* SCSS Variables.
|
|
180
166
|
*
|
|
@@ -977,7 +963,7 @@ button.font-library__upload-area {
|
|
|
977
963
|
|
|
978
964
|
.global-styles-ui-screen-revisions__revision-item {
|
|
979
965
|
position: relative;
|
|
980
|
-
cursor: pointer;
|
|
966
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
981
967
|
display: flex;
|
|
982
968
|
flex-direction: column;
|
|
983
969
|
}
|
|
@@ -1154,7 +1140,7 @@ button.font-library__upload-area {
|
|
|
1154
1140
|
|
|
1155
1141
|
.global-styles-ui-variations_item {
|
|
1156
1142
|
box-sizing: border-box;
|
|
1157
|
-
cursor: pointer;
|
|
1143
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
1158
1144
|
}
|
|
1159
1145
|
|
|
1160
1146
|
.global-styles-ui-variations_item .global-styles-ui-variations_item-preview {
|
|
@@ -1192,20 +1178,16 @@ button.font-library__upload-area {
|
|
|
1192
1178
|
outline-color: var(--wp-admin-theme-color);
|
|
1193
1179
|
}
|
|
1194
1180
|
|
|
1195
|
-
.global-styles-ui-preview {
|
|
1196
|
-
display: flex;
|
|
1197
|
-
align-items: center;
|
|
1198
|
-
justify-content: center;
|
|
1199
|
-
line-height: 1;
|
|
1200
|
-
cursor: pointer;
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
1181
|
.global-styles-ui-preview__wrapper {
|
|
1204
1182
|
max-width: 100%;
|
|
1205
1183
|
display: block;
|
|
1206
1184
|
width: 100%;
|
|
1207
1185
|
}
|
|
1208
1186
|
|
|
1187
|
+
.global-styles-ui-preview__wrapper.is-hoverable {
|
|
1188
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1209
1191
|
.global-styles-ui-typography-preview {
|
|
1210
1192
|
display: flex;
|
|
1211
1193
|
align-items: center;
|
|
@@ -4185,7 +4167,7 @@ div.dataviews-view-list {
|
|
|
4185
4167
|
}
|
|
4186
4168
|
|
|
4187
4169
|
input[type=radio]:not(:checked) ~ .fields-create-template-part-modal__area-radio-label::before {
|
|
4188
|
-
cursor: pointer;
|
|
4170
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
4189
4171
|
}
|
|
4190
4172
|
|
|
4191
4173
|
input[type=radio]:focus-visible ~ .fields-create-template-part-modal__area-radio-label::before {
|
|
@@ -4313,7 +4295,7 @@ fieldset.fields__media-edit .fields__media-edit-picker-button {
|
|
|
4313
4295
|
border-radius: 2px;
|
|
4314
4296
|
padding: 4px 8px;
|
|
4315
4297
|
min-height: 40px;
|
|
4316
|
-
cursor: pointer;
|
|
4298
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
4317
4299
|
min-width: 0;
|
|
4318
4300
|
}
|
|
4319
4301
|
|
|
@@ -5409,7 +5391,7 @@ fieldset.fields__media-edit .fields__media-edit-expanded:not(.is-empty) .fields_
|
|
|
5409
5391
|
}
|
|
5410
5392
|
|
|
5411
5393
|
.document-outline__button {
|
|
5412
|
-
cursor: pointer;
|
|
5394
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
5413
5395
|
background: none;
|
|
5414
5396
|
border: none;
|
|
5415
5397
|
display: flex;
|
|
@@ -6728,7 +6710,7 @@ fieldset.fields__media-edit .fields__media-edit-expanded:not(.is-empty) .fields_
|
|
|
6728
6710
|
min-height: 4px;
|
|
6729
6711
|
border: none;
|
|
6730
6712
|
padding: 0;
|
|
6731
|
-
cursor: pointer;
|
|
6713
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
6732
6714
|
transition: opacity 0.1s ease;
|
|
6733
6715
|
}
|
|
6734
6716
|
.revision-diff-markers .revision-diff-marker.is-added {
|
|
@@ -6954,7 +6936,7 @@ fieldset.fields__media-edit .fields__media-edit-expanded:not(.is-empty) .fields_
|
|
|
6954
6936
|
}
|
|
6955
6937
|
}
|
|
6956
6938
|
.editor-template-actions-panel__preview[role=button] {
|
|
6957
|
-
cursor: pointer;
|
|
6939
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
6958
6940
|
}
|
|
6959
6941
|
.editor-template-actions-panel__preview[role=button]:hover .block-editor-block-preview__container::after {
|
|
6960
6942
|
outline-color: rgba(0, 0, 0, 0.3);
|
package/build-style/style.css
CHANGED
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
.admin-ui-page__header {
|
|
122
122
|
padding: var(--wpds-dimension-padding-lg, 16px) var(--wpds-dimension-padding-2xl, 24px);
|
|
123
123
|
border-bottom: var(--wpds-border-width-xs, 1px) solid var(--wpds-color-stroke-surface-neutral-weak, #e4e4e4);
|
|
124
|
-
background: var(--wpds-color-bg-surface-neutral-strong, #
|
|
124
|
+
background: var(--wpds-color-bg-surface-neutral-strong, #fff);
|
|
125
125
|
position: sticky;
|
|
126
126
|
top: 0;
|
|
127
127
|
z-index: 1;
|
|
@@ -161,20 +161,6 @@
|
|
|
161
161
|
padding: var(--wpds-dimension-padding-lg, 16px) var(--wpds-dimension-padding-2xl, 24px);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon {
|
|
165
|
-
width: auto;
|
|
166
|
-
padding: 0 var(--wpds-dimension-padding-xs, 4px);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg {
|
|
170
|
-
display: none;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon::after {
|
|
174
|
-
content: attr(aria-label);
|
|
175
|
-
font-size: var(--wpds-typography-font-size-sm, 12px);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
164
|
/**
|
|
179
165
|
* SCSS Variables.
|
|
180
166
|
*
|
|
@@ -977,7 +963,7 @@ button.font-library__upload-area {
|
|
|
977
963
|
|
|
978
964
|
.global-styles-ui-screen-revisions__revision-item {
|
|
979
965
|
position: relative;
|
|
980
|
-
cursor: pointer;
|
|
966
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
981
967
|
display: flex;
|
|
982
968
|
flex-direction: column;
|
|
983
969
|
}
|
|
@@ -1154,7 +1140,7 @@ button.font-library__upload-area {
|
|
|
1154
1140
|
|
|
1155
1141
|
.global-styles-ui-variations_item {
|
|
1156
1142
|
box-sizing: border-box;
|
|
1157
|
-
cursor: pointer;
|
|
1143
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
1158
1144
|
}
|
|
1159
1145
|
|
|
1160
1146
|
.global-styles-ui-variations_item .global-styles-ui-variations_item-preview {
|
|
@@ -1192,20 +1178,16 @@ button.font-library__upload-area {
|
|
|
1192
1178
|
outline-color: var(--wp-admin-theme-color);
|
|
1193
1179
|
}
|
|
1194
1180
|
|
|
1195
|
-
.global-styles-ui-preview {
|
|
1196
|
-
display: flex;
|
|
1197
|
-
align-items: center;
|
|
1198
|
-
justify-content: center;
|
|
1199
|
-
line-height: 1;
|
|
1200
|
-
cursor: pointer;
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
1181
|
.global-styles-ui-preview__wrapper {
|
|
1204
1182
|
max-width: 100%;
|
|
1205
1183
|
display: block;
|
|
1206
1184
|
width: 100%;
|
|
1207
1185
|
}
|
|
1208
1186
|
|
|
1187
|
+
.global-styles-ui-preview__wrapper.is-hoverable {
|
|
1188
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1209
1191
|
.global-styles-ui-typography-preview {
|
|
1210
1192
|
display: flex;
|
|
1211
1193
|
align-items: center;
|
|
@@ -4188,7 +4170,7 @@ div.dataviews-view-list {
|
|
|
4188
4170
|
}
|
|
4189
4171
|
|
|
4190
4172
|
input[type=radio]:not(:checked) ~ .fields-create-template-part-modal__area-radio-label::before {
|
|
4191
|
-
cursor: pointer;
|
|
4173
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
4192
4174
|
}
|
|
4193
4175
|
|
|
4194
4176
|
input[type=radio]:focus-visible ~ .fields-create-template-part-modal__area-radio-label::before {
|
|
@@ -4316,7 +4298,7 @@ fieldset.fields__media-edit .fields__media-edit-picker-button {
|
|
|
4316
4298
|
border-radius: 2px;
|
|
4317
4299
|
padding: 4px 8px;
|
|
4318
4300
|
min-height: 40px;
|
|
4319
|
-
cursor: pointer;
|
|
4301
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
4320
4302
|
min-width: 0;
|
|
4321
4303
|
}
|
|
4322
4304
|
|
|
@@ -5412,7 +5394,7 @@ fieldset.fields__media-edit .fields__media-edit-expanded:not(.is-empty) .fields_
|
|
|
5412
5394
|
}
|
|
5413
5395
|
|
|
5414
5396
|
.document-outline__button {
|
|
5415
|
-
cursor: pointer;
|
|
5397
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
5416
5398
|
background: none;
|
|
5417
5399
|
border: none;
|
|
5418
5400
|
display: flex;
|
|
@@ -6733,7 +6715,7 @@ fieldset.fields__media-edit .fields__media-edit-expanded:not(.is-empty) .fields_
|
|
|
6733
6715
|
min-height: 4px;
|
|
6734
6716
|
border: none;
|
|
6735
6717
|
padding: 0;
|
|
6736
|
-
cursor: pointer;
|
|
6718
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
6737
6719
|
transition: opacity 0.1s ease;
|
|
6738
6720
|
}
|
|
6739
6721
|
.revision-diff-markers .revision-diff-marker.is-added {
|
|
@@ -6959,7 +6941,7 @@ fieldset.fields__media-edit .fields__media-edit-expanded:not(.is-empty) .fields_
|
|
|
6959
6941
|
}
|
|
6960
6942
|
}
|
|
6961
6943
|
.editor-template-actions-panel__preview[role=button] {
|
|
6962
|
-
cursor: pointer;
|
|
6944
|
+
cursor: var(--wpds-cursor-control, pointer);
|
|
6963
6945
|
}
|
|
6964
6946
|
.editor-template-actions-panel__preview[role=button]:hover .block-editor-block-preview__container::after {
|
|
6965
6947
|
outline-color: rgba(0, 0, 0, 0.3);
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
export function AddComment({ onSubmit, commentSidebarRef,
|
|
1
|
+
export function AddComment({ onSubmit, commentSidebarRef, floating }: {
|
|
2
2
|
onSubmit: any;
|
|
3
3
|
commentSidebarRef: any;
|
|
4
|
-
|
|
5
|
-
isFloating?: boolean | undefined;
|
|
6
|
-
y: any;
|
|
7
|
-
refs: any;
|
|
4
|
+
floating: any;
|
|
8
5
|
}): import("react").JSX.Element | null;
|
|
9
|
-
import { noop } from './utils';
|
|
10
6
|
//# sourceMappingURL=add-comment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-comment.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/add-comment.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-comment.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/add-comment.js"],"names":[],"mappings":"AAuBA;;;;uCA+DC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function createBoardStore(): {
|
|
2
|
+
subscribe(listener: any): () => void;
|
|
3
|
+
getSnapshot(): {};
|
|
4
|
+
registerThread(id: any, blockEl: any, floatingEl: any): void;
|
|
5
|
+
unregisterThread(id: any): void;
|
|
6
|
+
getBlockRects(): any;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=board-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board-store.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/board-store.js"],"names":[],"mappings":"AAAA;;;;;;EAkFC"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
export default CommentForm;
|
|
2
|
-
declare function CommentForm({ onSubmit, onCancel, thread, submitButtonText, labelText,
|
|
2
|
+
declare function CommentForm({ onSubmit, onCancel, thread, submitButtonText, labelText, }: {
|
|
3
3
|
onSubmit: any;
|
|
4
4
|
onCancel: any;
|
|
5
5
|
thread: any;
|
|
6
6
|
submitButtonText: any;
|
|
7
7
|
labelText: any;
|
|
8
|
-
reflowComments?: typeof noop | undefined;
|
|
9
8
|
}): import("react").JSX.Element;
|
|
10
|
-
import { noop } from './utils';
|
|
11
9
|
//# sourceMappingURL=comment-form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-form.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/comment-form.js"],"names":[],"mappings":";AAyBA
|
|
1
|
+
{"version":3,"file":"comment-form.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/comment-form.js"],"names":[],"mappings":";AAyBA;;;;;;gCAqEC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
export function Comments({ threads: noteThreads, onEditComment, onAddReply, onCommentDelete, commentSidebarRef,
|
|
1
|
+
export function Comments({ threads: noteThreads, onEditComment, onAddReply, onCommentDelete, commentSidebarRef, isFloating, }: {
|
|
2
2
|
threads: any;
|
|
3
3
|
onEditComment: any;
|
|
4
4
|
onAddReply: any;
|
|
5
5
|
onCommentDelete: any;
|
|
6
6
|
commentSidebarRef: any;
|
|
7
|
-
reflowComments: any;
|
|
8
7
|
isFloating?: boolean | undefined;
|
|
9
|
-
commentLastUpdated: any;
|
|
10
8
|
}): import("react").JSX.Element;
|
|
11
9
|
export default Comments;
|
|
12
10
|
//# sourceMappingURL=comments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/comments.js"],"names":[],"mappings":"AAkDA
|
|
1
|
+
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/comments.js"],"names":[],"mappings":"AAkDA;;;;;;;gCAwPC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floating-container.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/floating-container.js"],"names":[],"mappings":"AAUA;;;;;;gCAkBC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export function useBlockComments(postId: any): {
|
|
2
2
|
resultComments: any[];
|
|
3
3
|
unresolvedSortedThreads: any[];
|
|
4
|
-
reflowComments: import("react").DispatchWithoutAction;
|
|
5
|
-
commentLastUpdated: number;
|
|
6
4
|
};
|
|
7
|
-
export function useBlockCommentsActions(
|
|
5
|
+
export function useBlockCommentsActions(): {
|
|
8
6
|
onCreate: ({ content, parent }: {
|
|
9
7
|
content: any;
|
|
10
8
|
parent: any;
|
|
@@ -17,13 +15,20 @@ export function useBlockCommentsActions(reflowComments?: typeof noop): {
|
|
|
17
15
|
onDelete: (comment: any) => Promise<void>;
|
|
18
16
|
};
|
|
19
17
|
export function useEnableFloatingSidebar(enabled?: boolean): void;
|
|
20
|
-
export function
|
|
18
|
+
export function useFloatingBoard({ threads, selectedNoteId, isFloating }: {
|
|
19
|
+
threads: any;
|
|
20
|
+
selectedNoteId: any;
|
|
21
|
+
isFloating: any;
|
|
22
|
+
}): {
|
|
23
|
+
boardOffsets: {};
|
|
24
|
+
registerThread: (id: any, blockEl: any, floatingEl: any) => void;
|
|
25
|
+
unregisterThread: (id: any) => void;
|
|
26
|
+
};
|
|
27
|
+
export function useFloatingThread({ thread, calculatedOffset, registerThread, unregisterThread, }: {
|
|
21
28
|
thread: any;
|
|
22
29
|
calculatedOffset: any;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
setBlockRef: any;
|
|
26
|
-
commentLastUpdated: any;
|
|
30
|
+
registerThread: any;
|
|
31
|
+
unregisterThread: any;
|
|
27
32
|
}): {
|
|
28
33
|
y: number;
|
|
29
34
|
refs: {
|
|
@@ -33,5 +38,4 @@ export function useFloatingThread({ thread, calculatedOffset, setHeights, select
|
|
|
33
38
|
setFloating: (node: HTMLElement | null) => void;
|
|
34
39
|
};
|
|
35
40
|
};
|
|
36
|
-
import { noop } from './utils';
|
|
37
41
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/hooks.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/hooks.js"],"names":[],"mappings":"AAwCA;;;EA4HC;AAED;;;;;;;;;;;EA8JC;AAED,kEA4BC;AAED;;;;;;;;EAwCC;AAED;;;;;;;;;;;;;EA8CC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/index.js"],"names":[],"mappings":"AAmPA,oFA0BC"}
|
|
@@ -5,10 +5,6 @@
|
|
|
5
5
|
* @return {string} - The sanitized comment string.
|
|
6
6
|
*/
|
|
7
7
|
export function sanitizeCommentString(str: string): string;
|
|
8
|
-
/**
|
|
9
|
-
* A no-operation function that does nothing.
|
|
10
|
-
*/
|
|
11
|
-
export function noop(): void;
|
|
12
8
|
/**
|
|
13
9
|
* Gets the border color for an avatar based on the user ID.
|
|
14
10
|
*
|
|
@@ -24,6 +20,33 @@ export function getAvatarBorderColor(userId: number): string;
|
|
|
24
20
|
* @return {string} - The generated comment excerpt.
|
|
25
21
|
*/
|
|
26
22
|
export function getCommentExcerpt(text: string, excerptLength?: number): string;
|
|
23
|
+
/**
|
|
24
|
+
* Calculate y offsets for all floating comment threads. Adjusts positions
|
|
25
|
+
* to prevent overlapping by pushing threads above the selected one upward
|
|
26
|
+
* and threads below it downward.
|
|
27
|
+
*
|
|
28
|
+
* @param {Object} params
|
|
29
|
+
* @param {Array} params.threads Ordered list of thread objects.
|
|
30
|
+
* @param {string|number|undefined} params.selectedNoteId ID of the currently selected thread.
|
|
31
|
+
* @param {Object<string,DOMRect>} params.blockRects Pre-read bounding rects keyed by thread ID.
|
|
32
|
+
* @param {Object<string,number>} params.heights Rendered heights keyed by thread ID.
|
|
33
|
+
* @return {{ offsets: Object<string,number>, minHeight: number }} Computed offsets and minimum editor height.
|
|
34
|
+
*/
|
|
35
|
+
export function calculateAllOffsets({ threads, selectedNoteId, blockRects, heights, }: {
|
|
36
|
+
threads: any[];
|
|
37
|
+
selectedNoteId: string | number | undefined;
|
|
38
|
+
blockRects: {
|
|
39
|
+
[x: string]: DOMRect;
|
|
40
|
+
};
|
|
41
|
+
heights: {
|
|
42
|
+
[x: string]: number;
|
|
43
|
+
};
|
|
44
|
+
}): {
|
|
45
|
+
offsets: {
|
|
46
|
+
[x: string]: number;
|
|
47
|
+
};
|
|
48
|
+
minHeight: number;
|
|
49
|
+
};
|
|
27
50
|
/**
|
|
28
51
|
* Shift focus to the comment thread associated with a particular comment ID.
|
|
29
52
|
* If an additional selector is provided, the focus will be shifted to the element matching the selector.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/utils.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,2CAHW,MAAM,GACL,MAAM,CAIjB;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/utils.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,2CAHW,MAAM,GACL,MAAM,CAIjB;AAqBD;;;;;GAKG;AACH,6CAHW,MAAM,GACL,MAAM,CAIjB;AAED;;;;;;GAMG;AACH,wCAJW,MAAM,kBACN,MAAM,GACL,MAAM,CA0CjB;AAED;;;;;;;;;;;GAWG;AACH,uFANG;IAAwC,OAAO;IACP,cAAc,EAA9C,MAAM,GAAC,MAAM,GAAC,SAAS;IACS,UAAU,EAA1C;YAAO,MAAM,GAAC,OAAO;KAAC;IACU,OAAO,EAAvC;YAAO,MAAM,GAAC,MAAM;KAAC;CAC7B,GAAS;IAAE,OAAO,EAAE;YAAO,MAAM,GAAC,MAAM;KAAC,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAgGhE;AAED;;;;;;;;;GASG;AACH,8CAJW,MAAM,aACL,WAAW,OAAA,sBACZ,MAAM,4BA0ChB"}
|
|
@@ -7,5 +7,5 @@ export declare const STYLE_BOOK_THEME_SUBCATEGORIES: Omit<StyleBookCategory, 'su
|
|
|
7
7
|
export declare const STYLE_BOOK_CATEGORIES: StyleBookCategory[];
|
|
8
8
|
export declare const STYLE_BOOK_ALL_BLOCKS_SUBCATEGORIES: StyleBookCategory[];
|
|
9
9
|
export declare const STYLE_BOOK_PREVIEW_CATEGORIES: StyleBookCategory[];
|
|
10
|
-
export declare const STYLE_BOOK_IFRAME_STYLES = "\n\tbody {\n\t\tposition: relative;\n\t\tpadding: 32px !important;\n\t}\n\n\t\n\t.is-root-container {\n\t\tdisplay: flow-root;\n\t}\n\n\n\t.editor-style-book__examples {\n\t\tmax-width: 1200px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.editor-style-book__example {\n\t max-width: 900px;\n\t\tborder-radius: 2px;\n\t\tcursor:
|
|
10
|
+
export declare const STYLE_BOOK_IFRAME_STYLES = "\n\tbody {\n\t\tposition: relative;\n\t\tpadding: 32px !important;\n\t}\n\n\t\n\t.is-root-container {\n\t\tdisplay: flow-root;\n\t}\n\n\n\t.editor-style-book__examples {\n\t\tmax-width: 1200px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.editor-style-book__example {\n\t max-width: 900px;\n\t\tborder-radius: 2px;\n\t\tcursor: var(--wpds-cursor-control);\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tpadding: 16px;\n\t\twidth: 100%;\n\t\tbox-sizing: border-box;\n\t\tscroll-margin-top: 32px;\n\t\tscroll-margin-bottom: 32px;\n\t\tmargin: 0 auto 40px auto;\n\t}\n\n\t.editor-style-book__example.is-selected {\n\t\tbox-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t}\n\n\t.editor-style-book__example.is-disabled-example {\n\t\tpointer-events: none;\n\t}\n\n\t.editor-style-book__example:focus:not(:disabled) {\n\t\tbox-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t\toutline: 3px solid transparent;\n\t}\n\n\t.editor-style-book__duotone-example > div:first-child {\n\t\tdisplay: flex;\n\t\taspect-ratio: 16 / 9;\n\t\tgrid-row: span 1;\n\t\tgrid-column: span 2;\n\t}\n\t.editor-style-book__duotone-example img {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\t.editor-style-book__duotone-example > div:not(:first-child) {\n\t\theight: 20px;\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.editor-style-book__color-example {\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.editor-style-book__subcategory-title,\n\t.editor-style-book__example-title {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\n\t\tfont-size: 13px;\n\t\tfont-weight: normal;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\tpadding-top: 8px;\n\t\tborder-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t\tcolor: color-mix( in srgb, currentColor 60%, transparent );\n\t}\n\n\t.editor-style-book__subcategory-title {\n\t\tfont-size: 16px;\n\t\tmargin-bottom: 40px;\n \tpadding-bottom: 8px;\n\t}\n\n\t.editor-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.editor-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.editor-style-book__example-preview .block-list-appender {\n\t\tdisplay: none;\n\t}\n\t:where(.is-root-container > .wp-block:first-child) {\n\t\tmargin-top: 0;\n\t}\n\t:where(.is-root-container > .wp-block:last-child) {\n\t\tmargin-bottom: 0;\n\t}\n";
|
|
11
11
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/style-book/constants.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEtE,eAAO,MAAM,uBAAuB,EAAE,mBAAmB,EA2CxD,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,IAAI,CAChD,iBAAiB,EACjB,eAAe,CACf,EAgDA,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EAwCpD,CAAC;AAGF,eAAO,MAAM,mCAAmC,EAAE,iBAAiB,EAiBlE,CAAC;AAGF,eAAO,MAAM,6BAA6B,EAAE,iBAAiB,EA0B5D,CAAC;AAgBF,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/style-book/constants.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEtE,eAAO,MAAM,uBAAuB,EAAE,mBAAmB,EA2CxD,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,IAAI,CAChD,iBAAiB,EACjB,eAAe,CACf,EAgDA,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EAwCpD,CAAC;AAGF,eAAO,MAAM,mCAAmC,EAAE,iBAAiB,EAiBlE,CAAC;AAGF,eAAO,MAAM,6BAA6B,EAAE,iBAAiB,EA0B5D,CAAC;AAgBF,eAAO,MAAM,wBAAwB,slFA8FpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/editor",
|
|
3
|
-
"version": "14.44.0",
|
|
3
|
+
"version": "14.44.1-next.v.202604201441.0+dab6d8c07",
|
|
4
4
|
"description": "Enhanced block editor for WordPress posts.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -61,49 +61,49 @@
|
|
|
61
61
|
],
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@floating-ui/react-dom": "2.0.8",
|
|
64
|
-
"@wordpress/a11y": "^4.44.0",
|
|
65
|
-
"@wordpress/api-fetch": "^7.44.0",
|
|
66
|
-
"@wordpress/base-styles": "^6.20.0",
|
|
67
|
-
"@wordpress/blob": "^4.44.0",
|
|
68
|
-
"@wordpress/block-editor": "^15.
|
|
69
|
-
"@wordpress/block-serialization-default-parser": "^5.44.0",
|
|
70
|
-
"@wordpress/blocks": "^15.17.0",
|
|
71
|
-
"@wordpress/commands": "^1.
|
|
72
|
-
"@wordpress/components": "^
|
|
73
|
-
"@wordpress/compose": "^7.44.0",
|
|
74
|
-
"@wordpress/core-data": "^7.44.0",
|
|
75
|
-
"@wordpress/data": "^10.
|
|
76
|
-
"@wordpress/dataviews": "^14.1.0",
|
|
77
|
-
"@wordpress/date": "^5.44.0",
|
|
78
|
-
"@wordpress/deprecated": "^4.44.0",
|
|
79
|
-
"@wordpress/dom": "^4.44.0",
|
|
80
|
-
"@wordpress/element": "^6.44.0",
|
|
81
|
-
"@wordpress/fields": "^0.36.0",
|
|
82
|
-
"@wordpress/global-styles-engine": "^1.11.0",
|
|
83
|
-
"@wordpress/global-styles-ui": "^1.11.0",
|
|
84
|
-
"@wordpress/hooks": "^4.44.0",
|
|
85
|
-
"@wordpress/html-entities": "^4.44.0",
|
|
86
|
-
"@wordpress/i18n": "^6.17.0",
|
|
87
|
-
"@wordpress/icons": "^12.2.0",
|
|
88
|
-
"@wordpress/interface": "^9.29.0",
|
|
89
|
-
"@wordpress/keyboard-shortcuts": "^5.44.0",
|
|
90
|
-
"@wordpress/keycodes": "^4.44.0",
|
|
91
|
-
"@wordpress/media-editor": "^0.7.0",
|
|
92
|
-
"@wordpress/media-fields": "^0.9.0",
|
|
93
|
-
"@wordpress/media-utils": "^5.44.0",
|
|
94
|
-
"@wordpress/notices": "^5.44.0",
|
|
95
|
-
"@wordpress/patterns": "^2.44.0",
|
|
96
|
-
"@wordpress/plugins": "^7.44.0",
|
|
97
|
-
"@wordpress/preferences": "^4.44.0",
|
|
98
|
-
"@wordpress/private-apis": "^1.44.0",
|
|
99
|
-
"@wordpress/reusable-blocks": "^5.44.0",
|
|
100
|
-
"@wordpress/rich-text": "^7.44.0",
|
|
101
|
-
"@wordpress/server-side-render": "^6.20.0",
|
|
102
|
-
"@wordpress/upload-media": "^0.29.0",
|
|
103
|
-
"@wordpress/url": "^4.44.0",
|
|
104
|
-
"@wordpress/views": "^1.11.0",
|
|
105
|
-
"@wordpress/warning": "^3.44.0",
|
|
106
|
-
"@wordpress/wordcount": "^4.44.0",
|
|
64
|
+
"@wordpress/a11y": "^4.44.1-next.v.202604201441.0+dab6d8c07",
|
|
65
|
+
"@wordpress/api-fetch": "^7.44.1-next.v.202604201441.0+dab6d8c07",
|
|
66
|
+
"@wordpress/base-styles": "^6.20.1-next.v.202604201441.0+dab6d8c07",
|
|
67
|
+
"@wordpress/blob": "^4.44.1-next.v.202604201441.0+dab6d8c07",
|
|
68
|
+
"@wordpress/block-editor": "^15.18.1-next.v.202604201441.0+dab6d8c07",
|
|
69
|
+
"@wordpress/block-serialization-default-parser": "^5.44.1-next.v.202604201441.0+dab6d8c07",
|
|
70
|
+
"@wordpress/blocks": "^15.17.2-next.v.202604201441.0+dab6d8c07",
|
|
71
|
+
"@wordpress/commands": "^1.45.1-next.v.202604201441.0+dab6d8c07",
|
|
72
|
+
"@wordpress/components": "^33.0.1-next.v.202604201441.0+dab6d8c07",
|
|
73
|
+
"@wordpress/compose": "^7.44.1-next.v.202604201441.0+dab6d8c07",
|
|
74
|
+
"@wordpress/core-data": "^7.44.1-next.v.202604201441.0+dab6d8c07",
|
|
75
|
+
"@wordpress/data": "^10.45.1-next.v.202604201441.0+dab6d8c07",
|
|
76
|
+
"@wordpress/dataviews": "^14.1.1-next.v.202604201441.0+dab6d8c07",
|
|
77
|
+
"@wordpress/date": "^5.44.1-next.v.202604201441.0+dab6d8c07",
|
|
78
|
+
"@wordpress/deprecated": "^4.44.1-next.v.202604201441.0+dab6d8c07",
|
|
79
|
+
"@wordpress/dom": "^4.44.1-next.v.202604201441.0+dab6d8c07",
|
|
80
|
+
"@wordpress/element": "^6.44.1-next.v.202604201441.0+dab6d8c07",
|
|
81
|
+
"@wordpress/fields": "^0.36.1-next.v.202604201441.0+dab6d8c07",
|
|
82
|
+
"@wordpress/global-styles-engine": "^1.11.1-next.v.202604201441.0+dab6d8c07",
|
|
83
|
+
"@wordpress/global-styles-ui": "^1.11.1-next.v.202604201441.0+dab6d8c07",
|
|
84
|
+
"@wordpress/hooks": "^4.44.1-next.v.202604201441.0+dab6d8c07",
|
|
85
|
+
"@wordpress/html-entities": "^4.44.1-next.v.202604201441.0+dab6d8c07",
|
|
86
|
+
"@wordpress/i18n": "^6.17.1-next.v.202604201441.0+dab6d8c07",
|
|
87
|
+
"@wordpress/icons": "^12.2.1-next.v.202604201441.0+dab6d8c07",
|
|
88
|
+
"@wordpress/interface": "^9.29.1-next.v.202604201441.0+dab6d8c07",
|
|
89
|
+
"@wordpress/keyboard-shortcuts": "^5.44.1-next.v.202604201441.0+dab6d8c07",
|
|
90
|
+
"@wordpress/keycodes": "^4.44.1-next.v.202604201441.0+dab6d8c07",
|
|
91
|
+
"@wordpress/media-editor": "^0.7.1-next.v.202604201441.0+dab6d8c07",
|
|
92
|
+
"@wordpress/media-fields": "^0.9.1-next.v.202604201441.0+dab6d8c07",
|
|
93
|
+
"@wordpress/media-utils": "^5.44.1-next.v.202604201441.0+dab6d8c07",
|
|
94
|
+
"@wordpress/notices": "^5.44.1-next.v.202604201441.0+dab6d8c07",
|
|
95
|
+
"@wordpress/patterns": "^2.44.1-next.v.202604201441.0+dab6d8c07",
|
|
96
|
+
"@wordpress/plugins": "^7.44.1-next.v.202604201441.0+dab6d8c07",
|
|
97
|
+
"@wordpress/preferences": "^4.44.1-next.v.202604201441.0+dab6d8c07",
|
|
98
|
+
"@wordpress/private-apis": "^1.44.1-next.v.202604201441.0+dab6d8c07",
|
|
99
|
+
"@wordpress/reusable-blocks": "^5.44.1-next.v.202604201441.0+dab6d8c07",
|
|
100
|
+
"@wordpress/rich-text": "^7.44.1-next.v.202604201441.0+dab6d8c07",
|
|
101
|
+
"@wordpress/server-side-render": "^6.20.1-next.v.202604201441.0+dab6d8c07",
|
|
102
|
+
"@wordpress/upload-media": "^0.29.1-next.v.202604201441.0+dab6d8c07",
|
|
103
|
+
"@wordpress/url": "^4.44.1-next.v.202604201441.0+dab6d8c07",
|
|
104
|
+
"@wordpress/views": "^1.11.1-next.v.202604201441.0+dab6d8c07",
|
|
105
|
+
"@wordpress/warning": "^3.44.1-next.v.202604201441.0+dab6d8c07",
|
|
106
|
+
"@wordpress/wordcount": "^4.44.1-next.v.202604201441.0+dab6d8c07",
|
|
107
107
|
"change-case": "^4.1.2",
|
|
108
108
|
"client-zip": "^2.4.5",
|
|
109
109
|
"clsx": "^2.1.1",
|
|
@@ -126,5 +126,5 @@
|
|
|
126
126
|
"publishConfig": {
|
|
127
127
|
"access": "public"
|
|
128
128
|
},
|
|
129
|
-
"gitHead": "
|
|
129
|
+
"gitHead": "c788005ba4ee2a34851c1217c51602656aa7c3a6"
|
|
130
130
|
}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import clsx from 'clsx';
|
|
5
1
|
/**
|
|
6
2
|
* WordPress dependencies
|
|
7
3
|
*/
|
|
8
4
|
import { __ } from '@wordpress/i18n';
|
|
9
5
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
10
|
-
import {
|
|
11
|
-
__experimentalHStack as HStack,
|
|
12
|
-
__experimentalVStack as VStack,
|
|
13
|
-
} from '@wordpress/components';
|
|
6
|
+
import { __experimentalHStack as HStack } from '@wordpress/components';
|
|
14
7
|
import {
|
|
15
8
|
store as blockEditorStore,
|
|
16
9
|
privateApis as blockEditorPrivateApis,
|
|
@@ -22,19 +15,13 @@ import {
|
|
|
22
15
|
import { unlock } from '../../lock-unlock';
|
|
23
16
|
import CommentAuthorInfo from './comment-author-info';
|
|
24
17
|
import CommentForm from './comment-form';
|
|
25
|
-
import {
|
|
18
|
+
import { FloatingContainer } from './floating-container';
|
|
19
|
+
import { focusCommentThread } from './utils';
|
|
26
20
|
import { store as editorStore } from '../../store';
|
|
27
21
|
|
|
28
22
|
const { useBlockElement } = unlock( blockEditorPrivateApis );
|
|
29
23
|
|
|
30
|
-
export function AddComment( {
|
|
31
|
-
onSubmit,
|
|
32
|
-
commentSidebarRef,
|
|
33
|
-
reflowComments = noop,
|
|
34
|
-
isFloating = false,
|
|
35
|
-
y,
|
|
36
|
-
refs,
|
|
37
|
-
} ) {
|
|
24
|
+
export function AddComment( { onSubmit, commentSidebarRef, floating } ) {
|
|
38
25
|
const { clientId } = useSelect( ( select ) => {
|
|
39
26
|
const { getSelectedBlockClientId } = select( blockEditorStore );
|
|
40
27
|
return {
|
|
@@ -60,23 +47,15 @@ export function AddComment( {
|
|
|
60
47
|
}
|
|
61
48
|
|
|
62
49
|
return (
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
{
|
|
67
|
-
'is-floating': isFloating,
|
|
68
|
-
}
|
|
69
|
-
) }
|
|
50
|
+
<FloatingContainer
|
|
51
|
+
floating={ floating }
|
|
52
|
+
className="editor-collab-sidebar-panel__thread is-selected"
|
|
70
53
|
spacing="3"
|
|
71
54
|
tabIndex={ 0 }
|
|
72
55
|
aria-label={ __( 'New note' ) }
|
|
73
56
|
role="treeitem"
|
|
74
|
-
ref={ isFloating ? refs.setFloating : undefined }
|
|
75
57
|
style={
|
|
76
|
-
|
|
77
|
-
? // Delay showing the floating note box until a Y position is known to prevent blink.
|
|
78
|
-
{ top: y, opacity: ! y ? 0 : undefined }
|
|
79
|
-
: undefined
|
|
58
|
+
floating ? { opacity: ! floating.y ? 0 : undefined } : undefined
|
|
80
59
|
}
|
|
81
60
|
onBlur={ ( event ) => {
|
|
82
61
|
// Don't deselect notes when the browser window/tab loses focus.
|
|
@@ -100,10 +79,9 @@ export function AddComment( {
|
|
|
100
79
|
focusCommentThread( id, commentSidebarRef.current );
|
|
101
80
|
} }
|
|
102
81
|
onCancel={ unselectThread }
|
|
103
|
-
reflowComments={ reflowComments }
|
|
104
82
|
submitButtonText={ __( 'Add note' ) }
|
|
105
83
|
labelText={ __( 'New note' ) }
|
|
106
84
|
/>
|
|
107
|
-
</
|
|
85
|
+
</FloatingContainer>
|
|
108
86
|
);
|
|
109
87
|
}
|