@wordpress/edit-site 5.28.3 → 5.28.5

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 (125) hide show
  1. package/build/components/global-styles/font-library-modal/collection-font-variant.js +2 -2
  2. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  3. package/build/components/global-styles/font-library-modal/context.js +51 -58
  4. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  5. package/build/components/global-styles/font-library-modal/font-card.js +10 -15
  6. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  7. package/build/components/global-styles/font-library-modal/font-collection.js +115 -62
  8. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  9. package/build/components/global-styles/font-library-modal/font-demo.js +29 -8
  10. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  11. package/build/components/global-styles/font-library-modal/index.js +17 -4
  12. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  13. package/build/components/global-styles/font-library-modal/installed-fonts.js +151 -79
  14. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  15. package/build/components/global-styles/font-library-modal/library-font-variant.js +2 -2
  16. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  17. package/build/components/global-styles/font-library-modal/upload-fonts.js +8 -14
  18. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  19. package/build/components/global-styles/font-library-modal/utils/index.js +11 -4
  20. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  21. package/build/components/global-styles/screen-revisions/index.js +2 -2
  22. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  23. package/build/components/global-styles/ui.js +27 -2
  24. package/build/components/global-styles/ui.js.map +1 -1
  25. package/build/components/header-edit-mode/index.js +1 -1
  26. package/build/components/header-edit-mode/index.js.map +1 -1
  27. package/build/components/page-patterns/index.js +14 -14
  28. package/build/components/page-patterns/index.js.map +1 -1
  29. package/build/components/resizable-frame/index.js +2 -1
  30. package/build/components/resizable-frame/index.js.map +1 -1
  31. package/build/components/sidebar/index.js +3 -2
  32. package/build/components/sidebar/index.js.map +1 -1
  33. package/build/components/sidebar-dataviews/default-views.js +2 -0
  34. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  35. package/build/components/sidebar-navigation-screen-templates-browse/content.js +2 -2
  36. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  37. package/build/components/sidebar-navigation-screen-templates-browse/index.js +7 -5
  38. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  39. package/build/components/style-book/index.js +2 -0
  40. package/build/components/style-book/index.js.map +1 -1
  41. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +4 -4
  42. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  43. package/build-module/components/global-styles/font-library-modal/context.js +51 -58
  44. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  45. package/build-module/components/global-styles/font-library-modal/font-card.js +11 -16
  46. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  47. package/build-module/components/global-styles/font-library-modal/font-collection.js +118 -65
  48. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  49. package/build-module/components/global-styles/font-library-modal/font-demo.js +30 -9
  50. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  51. package/build-module/components/global-styles/font-library-modal/index.js +17 -4
  52. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  53. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +151 -79
  54. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  55. package/build-module/components/global-styles/font-library-modal/library-font-variant.js +4 -4
  56. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  57. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +9 -15
  58. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  59. package/build-module/components/global-styles/font-library-modal/utils/index.js +11 -4
  60. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  61. package/build-module/components/global-styles/screen-revisions/index.js +2 -2
  62. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  63. package/build-module/components/global-styles/ui.js +27 -2
  64. package/build-module/components/global-styles/ui.js.map +1 -1
  65. package/build-module/components/header-edit-mode/index.js +1 -1
  66. package/build-module/components/header-edit-mode/index.js.map +1 -1
  67. package/build-module/components/page-patterns/index.js +14 -14
  68. package/build-module/components/page-patterns/index.js.map +1 -1
  69. package/build-module/components/resizable-frame/index.js +2 -1
  70. package/build-module/components/resizable-frame/index.js.map +1 -1
  71. package/build-module/components/sidebar/index.js +3 -2
  72. package/build-module/components/sidebar/index.js.map +1 -1
  73. package/build-module/components/sidebar-dataviews/default-views.js +3 -1
  74. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  75. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +2 -2
  76. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  77. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +7 -5
  78. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  79. package/build-module/components/style-book/index.js +2 -0
  80. package/build-module/components/style-book/index.js.map +1 -1
  81. package/build-style/style-rtl.css +36 -23
  82. package/build-style/style.css +36 -23
  83. package/package.json +18 -18
  84. package/src/components/global-styles/font-library-modal/collection-font-variant.js +4 -4
  85. package/src/components/global-styles/font-library-modal/context.js +92 -104
  86. package/src/components/global-styles/font-library-modal/font-card.js +11 -26
  87. package/src/components/global-styles/font-library-modal/font-collection.js +307 -211
  88. package/src/components/global-styles/font-library-modal/font-demo.js +38 -4
  89. package/src/components/global-styles/font-library-modal/index.js +21 -14
  90. package/src/components/global-styles/font-library-modal/installed-fonts.js +243 -114
  91. package/src/components/global-styles/font-library-modal/library-font-variant.js +4 -4
  92. package/src/components/global-styles/font-library-modal/style.scss +15 -8
  93. package/src/components/global-styles/font-library-modal/upload-fonts.js +16 -18
  94. package/src/components/global-styles/font-library-modal/utils/index.js +10 -4
  95. package/src/components/global-styles/font-library-modal/utils/test/getDisplaySrcFromFontFace.spec.js +7 -18
  96. package/src/components/global-styles/screen-revisions/index.js +5 -2
  97. package/src/components/global-styles/ui.js +26 -2
  98. package/src/components/header-edit-mode/index.js +3 -1
  99. package/src/components/page-patterns/index.js +20 -20
  100. package/src/components/resizable-frame/index.js +1 -0
  101. package/src/components/sidebar/index.js +2 -1
  102. package/src/components/sidebar-dataviews/default-views.js +3 -1
  103. package/src/components/sidebar-navigation-screen-templates-browse/content.js +2 -2
  104. package/src/components/sidebar-navigation-screen-templates-browse/index.js +5 -3
  105. package/src/components/style-book/index.js +5 -1
  106. package/build/components/global-styles/font-library-modal/collection-font-details.js +0 -50
  107. package/build/components/global-styles/font-library-modal/collection-font-details.js.map +0 -1
  108. package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js +0 -30
  109. package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js.map +0 -1
  110. package/build/components/global-styles/font-library-modal/library-font-card.js +0 -39
  111. package/build/components/global-styles/font-library-modal/library-font-card.js.map +0 -1
  112. package/build/components/global-styles/font-library-modal/tab-panel-layout.js +0 -67
  113. package/build/components/global-styles/font-library-modal/tab-panel-layout.js.map +0 -1
  114. package/build-module/components/global-styles/font-library-modal/collection-font-details.js +0 -42
  115. package/build-module/components/global-styles/font-library-modal/collection-font-details.js.map +0 -1
  116. package/build-module/components/global-styles/font-library-modal/confirm-delete-dialog.js +0 -23
  117. package/build-module/components/global-styles/font-library-modal/confirm-delete-dialog.js.map +0 -1
  118. package/build-module/components/global-styles/font-library-modal/library-font-card.js +0 -31
  119. package/build-module/components/global-styles/font-library-modal/library-font-card.js.map +0 -1
  120. package/build-module/components/global-styles/font-library-modal/tab-panel-layout.js +0 -60
  121. package/build-module/components/global-styles/font-library-modal/tab-panel-layout.js.map +0 -1
  122. package/src/components/global-styles/font-library-modal/collection-font-details.js +0 -56
  123. package/src/components/global-styles/font-library-modal/confirm-delete-dialog.js +0 -33
  124. package/src/components/global-styles/font-library-modal/library-font-card.js +0 -34
  125. package/src/components/global-styles/font-library-modal/tab-panel-layout.js +0 -85
@@ -96,6 +96,7 @@
96
96
  --wp-admin-border-width-focus: 2px;
97
97
  --wp-block-synced-color: #7a00df;
98
98
  --wp-block-synced-color--rgb: 122, 0, 223;
99
+ --wp-bound-block-color: #9747ff;
99
100
  }
100
101
  @media (min-resolution: 192dpi) {
101
102
  :root {
@@ -501,19 +502,12 @@ body.is-fullscreen-mode .interface-interface-skeleton {
501
502
  .dataviews-filters__view-actions {
502
503
  padding: 12px 32px 0;
503
504
  }
504
- .dataviews-filters__view-actions .components-search-control {
505
- flex-grow: 1;
506
- }
507
505
  .dataviews-filters__view-actions .components-search-control .components-base-control__field {
508
506
  max-width: 240px;
509
507
  }
510
508
 
511
509
  .dataviews-filters__container {
512
- padding: 0 32px;
513
- }
514
-
515
- .dataviews-filters__view-actions.components-h-stack {
516
- align-items: center;
510
+ padding-left: 32px;
517
511
  }
518
512
 
519
513
  .dataviews-filters-button {
@@ -532,6 +526,13 @@ body.is-fullscreen-mode .interface-interface-skeleton {
532
526
  color: #757575;
533
527
  }
534
528
 
529
+ .dataviews-pagination__page-selection {
530
+ font-size: 11px;
531
+ text-transform: uppercase;
532
+ font-weight: 500;
533
+ color: #1e1e1e;
534
+ }
535
+
535
536
  .dataviews-filters-options {
536
537
  margin: 32px 0 16px;
537
538
  }
@@ -602,10 +603,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
602
603
  .dataviews-view-table tr:hover {
603
604
  background-color: #f8f8f8;
604
605
  }
605
- .dataviews-view-table tr .components-checkbox-control__input {
606
+ .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input {
606
607
  opacity: 0;
607
608
  }
608
- .dataviews-view-table tr .components-checkbox-control__input:checked, .dataviews-view-table tr .components-checkbox-control__input:indeterminate, .dataviews-view-table tr .components-checkbox-control__input:focus {
609
+ .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:checked, .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:indeterminate, .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:focus {
609
610
  opacity: 1;
610
611
  }
611
612
  .dataviews-view-table tr:focus-within .components-checkbox-control__input, .dataviews-view-table tr:hover .components-checkbox-control__input {
@@ -666,6 +667,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
666
667
  .dataviews-view-table .dataviews-view-table__actions-column {
667
668
  width: 1%;
668
669
  }
670
+ .dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input {
671
+ opacity: 1;
672
+ }
669
673
 
670
674
  .dataviews-view-list__primary-field,
671
675
  .dataviews-view-grid__primary-field,
@@ -675,7 +679,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
675
679
  color: #1e1e1e;
676
680
  text-overflow: ellipsis;
677
681
  white-space: nowrap;
678
- overflow: hidden;
679
682
  display: block;
680
683
  width: 100%;
681
684
  }
@@ -695,6 +698,13 @@ body.is-fullscreen-mode .interface-interface-skeleton {
695
698
  .dataviews-view-table__primary-field a:hover {
696
699
  color: #1e1e1e;
697
700
  }
701
+ .dataviews-view-list__primary-field a:focus,
702
+ .dataviews-view-grid__primary-field a:focus,
703
+ .dataviews-view-table__primary-field a:focus {
704
+ color: var(--wp-admin-theme-color--rgb);
705
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color, #007cba);
706
+ border-radius: 2px;
707
+ }
698
708
  .dataviews-view-list__primary-field button.components-button.is-link,
699
709
  .dataviews-view-grid__primary-field button.components-button.is-link,
700
710
  .dataviews-view-table__primary-field button.components-button.is-link {
@@ -1089,7 +1099,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
1089
1099
  .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-reset {
1090
1100
  padding-inline-end: 28px;
1091
1101
  }
1092
- .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:hover, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible {
1102
+ .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:hover, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip[aria-expanded=true] {
1093
1103
  background: #e0e0e0;
1094
1104
  color: #1e1e1e;
1095
1105
  }
@@ -1097,8 +1107,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
1097
1107
  color: var(--wp-admin-theme-color);
1098
1108
  background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
1099
1109
  }
1100
- .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values:hover {
1101
- background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
1110
+ .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values:hover, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values[aria-expanded=true] {
1111
+ background: rgba(var(--wp-admin-theme-color--rgb), 0.12);
1102
1112
  }
1103
1113
  .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible {
1104
1114
  outline: none;
@@ -4301,7 +4311,13 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4301
4311
  font-weight: 500;
4302
4312
  font-size: 11px;
4303
4313
  }
4314
+ .font-library-modal .components-navigator-screen {
4315
+ padding: 3px;
4316
+ }
4304
4317
 
4318
+ .font-library-modal__tabpanel-layout {
4319
+ margin-top: 32px;
4320
+ }
4305
4321
  .font-library-modal__tabpanel-layout .font-library-modal__tabpanel-layout__footer {
4306
4322
  border-top: 1px solid #ddd;
4307
4323
  margin: 0 -32px -32px;
@@ -4324,6 +4340,9 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4324
4340
  margin-top: -1px;
4325
4341
  /* To collapse the margin with the previous element */
4326
4342
  }
4343
+ .font-library-modal__font-card:hover {
4344
+ background-color: #f0f0f0;
4345
+ }
4327
4346
  .font-library-modal__font-card .font-library-modal__font-card__name {
4328
4347
  font-weight: bold;
4329
4348
  }
@@ -4331,13 +4350,6 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4331
4350
  color: #757575;
4332
4351
  }
4333
4352
 
4334
- .font-library-modal__library-font-variant {
4335
- border: 1px solid #e0e0e0;
4336
- padding: 16px;
4337
- margin-top: -1px;
4338
- /* To collapse the margin with the previous element */
4339
- }
4340
-
4341
4353
  .font-library-modal__font-variant_demo-image {
4342
4354
  display: block;
4343
4355
  height: 24px;
@@ -4395,14 +4407,15 @@ button.font-library-modal__upload-area {
4395
4407
  display: flex;
4396
4408
  justify-content: center;
4397
4409
  align-items: center;
4410
+ margin-top: 64px;
4398
4411
  }
4399
4412
  .font-library__google-fonts-confirm h3 {
4400
4413
  font-size: 1.4rem;
4401
4414
  }
4402
4415
  .font-library__google-fonts-confirm .components-card {
4403
4416
  width: 50%;
4404
- min-width: 250px;
4405
- max-width: 350px;
4417
+ min-width: 350px;
4418
+ max-width: 400px;
4406
4419
  }
4407
4420
 
4408
4421
  .edit-site-pagination .components-button.is-tertiary {
@@ -96,6 +96,7 @@
96
96
  --wp-admin-border-width-focus: 2px;
97
97
  --wp-block-synced-color: #7a00df;
98
98
  --wp-block-synced-color--rgb: 122, 0, 223;
99
+ --wp-bound-block-color: #9747ff;
99
100
  }
100
101
  @media (min-resolution: 192dpi) {
101
102
  :root {
@@ -501,19 +502,12 @@ body.is-fullscreen-mode .interface-interface-skeleton {
501
502
  .dataviews-filters__view-actions {
502
503
  padding: 12px 32px 0;
503
504
  }
504
- .dataviews-filters__view-actions .components-search-control {
505
- flex-grow: 1;
506
- }
507
505
  .dataviews-filters__view-actions .components-search-control .components-base-control__field {
508
506
  max-width: 240px;
509
507
  }
510
508
 
511
509
  .dataviews-filters__container {
512
- padding: 0 32px;
513
- }
514
-
515
- .dataviews-filters__view-actions.components-h-stack {
516
- align-items: center;
510
+ padding-right: 32px;
517
511
  }
518
512
 
519
513
  .dataviews-filters-button {
@@ -532,6 +526,13 @@ body.is-fullscreen-mode .interface-interface-skeleton {
532
526
  color: #757575;
533
527
  }
534
528
 
529
+ .dataviews-pagination__page-selection {
530
+ font-size: 11px;
531
+ text-transform: uppercase;
532
+ font-weight: 500;
533
+ color: #1e1e1e;
534
+ }
535
+
535
536
  .dataviews-filters-options {
536
537
  margin: 32px 0 16px;
537
538
  }
@@ -602,10 +603,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
602
603
  .dataviews-view-table tr:hover {
603
604
  background-color: #f8f8f8;
604
605
  }
605
- .dataviews-view-table tr .components-checkbox-control__input {
606
+ .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input {
606
607
  opacity: 0;
607
608
  }
608
- .dataviews-view-table tr .components-checkbox-control__input:checked, .dataviews-view-table tr .components-checkbox-control__input:indeterminate, .dataviews-view-table tr .components-checkbox-control__input:focus {
609
+ .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:checked, .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:indeterminate, .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:focus {
609
610
  opacity: 1;
610
611
  }
611
612
  .dataviews-view-table tr:focus-within .components-checkbox-control__input, .dataviews-view-table tr:hover .components-checkbox-control__input {
@@ -666,6 +667,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
666
667
  .dataviews-view-table .dataviews-view-table__actions-column {
667
668
  width: 1%;
668
669
  }
670
+ .dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input {
671
+ opacity: 1;
672
+ }
669
673
 
670
674
  .dataviews-view-list__primary-field,
671
675
  .dataviews-view-grid__primary-field,
@@ -675,7 +679,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
675
679
  color: #1e1e1e;
676
680
  text-overflow: ellipsis;
677
681
  white-space: nowrap;
678
- overflow: hidden;
679
682
  display: block;
680
683
  width: 100%;
681
684
  }
@@ -695,6 +698,13 @@ body.is-fullscreen-mode .interface-interface-skeleton {
695
698
  .dataviews-view-table__primary-field a:hover {
696
699
  color: #1e1e1e;
697
700
  }
701
+ .dataviews-view-list__primary-field a:focus,
702
+ .dataviews-view-grid__primary-field a:focus,
703
+ .dataviews-view-table__primary-field a:focus {
704
+ color: var(--wp-admin-theme-color--rgb);
705
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color, #007cba);
706
+ border-radius: 2px;
707
+ }
698
708
  .dataviews-view-list__primary-field button.components-button.is-link,
699
709
  .dataviews-view-grid__primary-field button.components-button.is-link,
700
710
  .dataviews-view-table__primary-field button.components-button.is-link {
@@ -1089,7 +1099,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
1089
1099
  .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-reset {
1090
1100
  padding-inline-end: 28px;
1091
1101
  }
1092
- .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:hover, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible {
1102
+ .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:hover, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip[aria-expanded=true] {
1093
1103
  background: #e0e0e0;
1094
1104
  color: #1e1e1e;
1095
1105
  }
@@ -1097,8 +1107,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
1097
1107
  color: var(--wp-admin-theme-color);
1098
1108
  background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
1099
1109
  }
1100
- .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values:hover {
1101
- background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
1110
+ .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values:hover, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values[aria-expanded=true] {
1111
+ background: rgba(var(--wp-admin-theme-color--rgb), 0.12);
1102
1112
  }
1103
1113
  .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible {
1104
1114
  outline: none;
@@ -4302,7 +4312,13 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4302
4312
  font-weight: 500;
4303
4313
  font-size: 11px;
4304
4314
  }
4315
+ .font-library-modal .components-navigator-screen {
4316
+ padding: 3px;
4317
+ }
4305
4318
 
4319
+ .font-library-modal__tabpanel-layout {
4320
+ margin-top: 32px;
4321
+ }
4306
4322
  .font-library-modal__tabpanel-layout .font-library-modal__tabpanel-layout__footer {
4307
4323
  border-top: 1px solid #ddd;
4308
4324
  margin: 0 -32px -32px;
@@ -4325,6 +4341,9 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4325
4341
  margin-top: -1px;
4326
4342
  /* To collapse the margin with the previous element */
4327
4343
  }
4344
+ .font-library-modal__font-card:hover {
4345
+ background-color: #f0f0f0;
4346
+ }
4328
4347
  .font-library-modal__font-card .font-library-modal__font-card__name {
4329
4348
  font-weight: bold;
4330
4349
  }
@@ -4332,13 +4351,6 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4332
4351
  color: #757575;
4333
4352
  }
4334
4353
 
4335
- .font-library-modal__library-font-variant {
4336
- border: 1px solid #e0e0e0;
4337
- padding: 16px;
4338
- margin-top: -1px;
4339
- /* To collapse the margin with the previous element */
4340
- }
4341
-
4342
4354
  .font-library-modal__font-variant_demo-image {
4343
4355
  display: block;
4344
4356
  height: 24px;
@@ -4396,14 +4408,15 @@ button.font-library-modal__upload-area {
4396
4408
  display: flex;
4397
4409
  justify-content: center;
4398
4410
  align-items: center;
4411
+ margin-top: 64px;
4399
4412
  }
4400
4413
  .font-library__google-fonts-confirm h3 {
4401
4414
  font-size: 1.4rem;
4402
4415
  }
4403
4416
  .font-library__google-fonts-confirm .components-card {
4404
4417
  width: 50%;
4405
- min-width: 250px;
4406
- max-width: 350px;
4418
+ min-width: 350px;
4419
+ max-width: 400px;
4407
4420
  }
4408
4421
 
4409
4422
  .edit-site-pagination .components-button.is-tertiary {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "5.28.3",
3
+ "version": "5.28.5",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -30,42 +30,42 @@
30
30
  "@wordpress/a11y": "^3.51.1",
31
31
  "@wordpress/api-fetch": "^6.48.1",
32
32
  "@wordpress/blob": "^3.51.1",
33
- "@wordpress/block-editor": "^12.19.3",
34
- "@wordpress/block-library": "^8.28.3",
35
- "@wordpress/blocks": "^12.28.3",
36
- "@wordpress/commands": "^0.22.2",
37
- "@wordpress/components": "^26.0.2",
33
+ "@wordpress/block-editor": "^12.19.5",
34
+ "@wordpress/block-library": "^8.28.5",
35
+ "@wordpress/blocks": "^12.28.5",
36
+ "@wordpress/commands": "^0.22.4",
37
+ "@wordpress/components": "^26.0.4",
38
38
  "@wordpress/compose": "^6.28.1",
39
- "@wordpress/core-commands": "^0.20.3",
40
- "@wordpress/core-data": "^6.28.3",
39
+ "@wordpress/core-commands": "^0.20.5",
40
+ "@wordpress/core-data": "^6.28.5",
41
41
  "@wordpress/data": "^9.21.1",
42
- "@wordpress/dataviews": "^0.5.3",
42
+ "@wordpress/dataviews": "^0.5.5",
43
43
  "@wordpress/date": "^4.51.1",
44
44
  "@wordpress/deprecated": "^3.51.1",
45
45
  "@wordpress/dom": "^3.51.1",
46
- "@wordpress/editor": "^13.28.3",
46
+ "@wordpress/editor": "^13.28.5",
47
47
  "@wordpress/element": "^5.28.1",
48
48
  "@wordpress/escape-html": "^2.51.1",
49
49
  "@wordpress/hooks": "^3.51.1",
50
50
  "@wordpress/html-entities": "^3.51.1",
51
51
  "@wordpress/i18n": "^4.51.1",
52
- "@wordpress/icons": "^9.42.1",
53
- "@wordpress/interface": "^5.28.2",
52
+ "@wordpress/icons": "^9.42.3",
53
+ "@wordpress/interface": "^5.28.4",
54
54
  "@wordpress/keyboard-shortcuts": "^4.28.1",
55
55
  "@wordpress/keycodes": "^3.51.1",
56
56
  "@wordpress/media-utils": "^4.42.1",
57
57
  "@wordpress/notices": "^4.19.1",
58
- "@wordpress/patterns": "^1.12.3",
59
- "@wordpress/plugins": "^6.19.2",
60
- "@wordpress/preferences": "^3.28.2",
58
+ "@wordpress/patterns": "^1.12.5",
59
+ "@wordpress/plugins": "^6.19.4",
60
+ "@wordpress/preferences": "^3.28.4",
61
61
  "@wordpress/primitives": "^3.49.1",
62
62
  "@wordpress/private-apis": "^0.33.1",
63
- "@wordpress/reusable-blocks": "^4.28.3",
63
+ "@wordpress/reusable-blocks": "^4.28.5",
64
64
  "@wordpress/router": "^0.20.1",
65
65
  "@wordpress/style-engine": "^1.34.1",
66
66
  "@wordpress/url": "^3.52.1",
67
67
  "@wordpress/viewport": "^5.28.1",
68
- "@wordpress/widgets": "^3.28.3",
68
+ "@wordpress/widgets": "^3.28.5",
69
69
  "@wordpress/wordcount": "^3.51.1",
70
70
  "change-case": "^4.1.2",
71
71
  "classnames": "^2.3.1",
@@ -85,5 +85,5 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "gitHead": "b12d75c5c5256fda2a0509bb432e20ddd3354d5e"
88
+ "gitHead": "4927ea437069f9aed12f696df294a79bd8e12fd5"
89
89
  }
@@ -11,7 +11,7 @@ import {
11
11
  * Internal dependencies
12
12
  */
13
13
  import { getFontFaceVariantName } from './utils';
14
- import FontFaceDemo from './font-demo';
14
+ import FontDemo from './font-demo';
15
15
  import { unlock } from '../../../lock-unlock';
16
16
 
17
17
  function CollectionFontVariant( {
@@ -35,7 +35,7 @@ function CollectionFontVariant( {
35
35
  );
36
36
 
37
37
  return (
38
- <div className="font-library-modal__library-font-variant">
38
+ <div className="font-library-modal__font-card">
39
39
  <Flex justify="flex-start" align="center" gap="1rem">
40
40
  <CheckboxControl
41
41
  checked={ selected }
@@ -44,8 +44,8 @@ function CollectionFontVariant( {
44
44
  id={ checkboxId }
45
45
  />
46
46
  <label htmlFor={ checkboxId }>
47
- <FontFaceDemo
48
- fontFace={ face }
47
+ <FontDemo
48
+ font={ face }
49
49
  text={ displayName }
50
50
  onClick={ handleToggleActivation }
51
51
  />
@@ -162,16 +162,6 @@ function FontLibraryProvider( { children } ) {
162
162
  // Demo
163
163
  const [ loadedFontUrls ] = useState( new Set() );
164
164
 
165
- // Theme data
166
- const { site, currentTheme } = useSelect( ( select ) => {
167
- return {
168
- site: select( coreStore ).getSite(),
169
- currentTheme: select( coreStore ).getCurrentTheme(),
170
- };
171
- } );
172
- const themeUrl =
173
- site?.url + '/wp-content/themes/' + currentTheme?.stylesheet;
174
-
175
165
  const getAvailableFontsOutline = ( availableFontFamilies ) => {
176
166
  const outline = availableFontFamilies.reduce( ( acc, font ) => {
177
167
  const availableFontFaces =
@@ -210,113 +200,115 @@ function FontLibraryProvider( { children } ) {
210
200
  return getActivatedFontsOutline( source )[ slug ] || [];
211
201
  };
212
202
 
213
- async function installFont( fontFamilyToInstall ) {
203
+ async function installFonts( fontFamiliesToInstall ) {
214
204
  setIsInstalling( true );
215
205
  try {
216
- // Get the font family if it already exists.
217
- let installedFontFamily = await fetchGetFontFamilyBySlug(
218
- fontFamilyToInstall.slug
219
- );
206
+ const fontFamiliesToActivate = [];
207
+ let installationErrors = [];
208
+
209
+ for ( const fontFamilyToInstall of fontFamiliesToInstall ) {
210
+ let isANewFontFamily = false;
220
211
 
221
- // Otherwise create it.
222
- if ( ! installedFontFamily ) {
223
- // Prepare font family form data to install.
224
- installedFontFamily = await fetchInstallFontFamily(
225
- makeFontFamilyFormData( fontFamilyToInstall )
212
+ // Get the font family if it already exists.
213
+ let installedFontFamily = await fetchGetFontFamilyBySlug(
214
+ fontFamilyToInstall.slug
226
215
  );
227
- }
228
216
 
229
- // Collect font faces that have already been installed (to be activated later)
230
- const alreadyInstalledFontFaces =
231
- installedFontFamily.fontFace && fontFamilyToInstall.fontFace
232
- ? installedFontFamily.fontFace.filter(
217
+ // Otherwise create it.
218
+ if ( ! installedFontFamily ) {
219
+ isANewFontFamily = true;
220
+ // Prepare font family form data to install.
221
+ installedFontFamily = await fetchInstallFontFamily(
222
+ makeFontFamilyFormData( fontFamilyToInstall )
223
+ );
224
+ }
225
+
226
+ // Collect font faces that have already been installed (to be activated later)
227
+ const alreadyInstalledFontFaces =
228
+ installedFontFamily.fontFace && fontFamilyToInstall.fontFace
229
+ ? installedFontFamily.fontFace.filter(
230
+ ( fontFaceToInstall ) =>
231
+ checkFontFaceInstalled(
232
+ fontFaceToInstall,
233
+ fontFamilyToInstall.fontFace
234
+ )
235
+ )
236
+ : [];
237
+
238
+ // Filter out Font Faces that have already been installed (so that they are not re-installed)
239
+ if (
240
+ installedFontFamily.fontFace &&
241
+ fontFamilyToInstall.fontFace
242
+ ) {
243
+ fontFamilyToInstall.fontFace =
244
+ fontFamilyToInstall.fontFace.filter(
233
245
  ( fontFaceToInstall ) =>
234
- checkFontFaceInstalled(
246
+ ! checkFontFaceInstalled(
235
247
  fontFaceToInstall,
236
- fontFamilyToInstall.fontFace
248
+ installedFontFamily.fontFace
237
249
  )
238
- )
239
- : [];
240
-
241
- // Filter out Font Faces that have already been installed (so that they are not re-installed)
242
- if (
243
- installedFontFamily.fontFace &&
244
- fontFamilyToInstall.fontFace
245
- ) {
246
- fontFamilyToInstall.fontFace =
247
- fontFamilyToInstall.fontFace.filter(
248
- ( fontFaceToInstall ) =>
249
- ! checkFontFaceInstalled(
250
- fontFaceToInstall,
251
- installedFontFamily.fontFace
252
- )
250
+ );
251
+ }
252
+
253
+ // Install the fonts (upload the font files to the server and create the post in the database).
254
+ let sucessfullyInstalledFontFaces = [];
255
+ let unsucessfullyInstalledFontFaces = [];
256
+ if ( fontFamilyToInstall?.fontFace?.length > 0 ) {
257
+ const response = await batchInstallFontFaces(
258
+ installedFontFamily.id,
259
+ makeFontFacesFormData( fontFamilyToInstall )
253
260
  );
254
- }
255
-
256
- // Install the fonts (upload the font files to the server and create the post in the database).
257
- let sucessfullyInstalledFontFaces = [];
258
- let unsucessfullyInstalledFontFaces = [];
259
- if ( fontFamilyToInstall?.fontFace?.length > 0 ) {
260
- const response = await batchInstallFontFaces(
261
- installedFontFamily.id,
262
- makeFontFacesFormData( fontFamilyToInstall )
261
+ sucessfullyInstalledFontFaces = response?.successes;
262
+ unsucessfullyInstalledFontFaces = response?.errors;
263
+ }
264
+
265
+ // Use the sucessfully installed font faces
266
+ // As well as any font faces that were already installed (those will be activated)
267
+ if (
268
+ sucessfullyInstalledFontFaces?.length > 0 ||
269
+ alreadyInstalledFontFaces?.length > 0
270
+ ) {
271
+ fontFamilyToInstall.fontFace = [
272
+ ...sucessfullyInstalledFontFaces,
273
+ ...alreadyInstalledFontFaces,
274
+ ];
275
+ fontFamiliesToActivate.push( fontFamilyToInstall );
276
+ } else if ( isANewFontFamily ) {
277
+ // If the font family is new, delete it to avoid having font families without font faces.
278
+ await fetchUninstallFontFamily( installedFontFamily.id );
279
+ }
280
+
281
+ installationErrors = installationErrors.concat(
282
+ unsucessfullyInstalledFontFaces
263
283
  );
264
- sucessfullyInstalledFontFaces = response?.successes;
265
- unsucessfullyInstalledFontFaces = response?.errors;
266
284
  }
267
285
 
268
- const detailedErrorMessage = unsucessfullyInstalledFontFaces.reduce(
269
- ( errorMessageCollection, error ) => {
270
- return `${ errorMessageCollection } ${ error.message }`;
271
- },
272
- ''
273
- );
286
+ if ( fontFamiliesToActivate.length > 0 ) {
287
+ // Activate the font family (add the font family to the global styles).
288
+ activateCustomFontFamilies( fontFamiliesToActivate );
274
289
 
275
- // If there were no successes and nothing already installed then we don't need to activate anything and can bounce now.
276
- if (
277
- fontFamilyToInstall?.fontFace?.length > 0 &&
278
- sucessfullyInstalledFontFaces.length === 0 &&
279
- alreadyInstalledFontFaces.length === 0
280
- ) {
281
- throw new Error(
282
- sprintf(
283
- /* translators: %s: Specific error message returned from server. */
284
- __( 'No font faces were installed. %s' ),
285
- detailedErrorMessage
286
- )
290
+ // Save the global styles to the database.
291
+ await saveSpecifiedEntityEdits(
292
+ 'root',
293
+ 'globalStyles',
294
+ globalStylesId,
295
+ [ 'settings.typography.fontFamilies' ]
287
296
  );
288
- }
289
297
 
290
- // Use the sucessfully installed font faces
291
- // As well as any font faces that were already installed (those will be activated)
292
- if (
293
- sucessfullyInstalledFontFaces?.length > 0 ||
294
- alreadyInstalledFontFaces?.length > 0
295
- ) {
296
- fontFamilyToInstall.fontFace = [
297
- ...sucessfullyInstalledFontFaces,
298
- ...alreadyInstalledFontFaces,
299
- ];
298
+ refreshLibrary();
300
299
  }
301
300
 
302
- // Activate the font family (add the font family to the global styles).
303
- activateCustomFontFamilies( [ fontFamilyToInstall ] );
304
-
305
- // Save the global styles to the database.
306
- saveSpecifiedEntityEdits( 'root', 'globalStyles', globalStylesId, [
307
- 'settings.typography.fontFamilies',
308
- ] );
309
-
310
- refreshLibrary();
311
-
312
- if ( unsucessfullyInstalledFontFaces.length > 0 ) {
301
+ if ( installationErrors.length > 0 ) {
313
302
  throw new Error(
314
303
  sprintf(
315
304
  /* translators: %s: Specific error message returned from server. */
316
- __(
317
- 'Some font faces were installed. There were some errors. %s'
318
- ),
319
- detailedErrorMessage
305
+ __( 'There were some errors installing fonts. %s' ),
306
+ installationErrors.reduce(
307
+ ( errorMessageCollection, error ) => {
308
+ return `${ errorMessageCollection } ${ error.message }`;
309
+ },
310
+ ''
311
+ )
320
312
  )
321
313
  );
322
314
  }
@@ -375,14 +367,10 @@ function FontLibraryProvider( { children } ) {
375
367
 
376
368
  const activateCustomFontFamilies = ( fontsToAdd ) => {
377
369
  // Merge the existing custom fonts with the new fonts.
378
- const newCustomFonts = mergeFontFamilies(
379
- fontFamilies?.custom,
380
- fontsToAdd
381
- );
382
370
  // Activate the fonts by set the new custom fonts array.
383
371
  setFontFamilies( {
384
372
  ...fontFamilies,
385
- custom: newCustomFonts,
373
+ custom: mergeFontFamilies( fontFamilies?.custom, fontsToAdd ),
386
374
  } );
387
375
  // Add custom fonts to the browser.
388
376
  fontsToAdd.forEach( ( font ) => {
@@ -416,7 +404,7 @@ function FontLibraryProvider( { children } ) {
416
404
  // If the font doesn't have a src, don't load it.
417
405
  if ( ! fontFace.src ) return;
418
406
  // Get the src of the font.
419
- const src = getDisplaySrcFromFontFace( fontFace.src, themeUrl );
407
+ const src = getDisplaySrcFromFontFace( fontFace.src );
420
408
  // If the font is already loaded, don't load it again.
421
409
  if ( ! src || loadedFontUrls.has( src ) ) return;
422
410
  // Load the font in the browser.
@@ -467,7 +455,7 @@ function FontLibraryProvider( { children } ) {
467
455
  isFontActivated,
468
456
  getFontFacesActivated,
469
457
  loadFontFaceAsset,
470
- installFont,
458
+ installFonts,
471
459
  uninstallFontFamily,
472
460
  toggleActivateFont,
473
461
  getAvailableFontsOutline,