@wordpress/edit-site 6.15.1 → 6.16.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 (66) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-template/utils.js +1 -1
  3. package/build/components/add-new-template/utils.js.map +1 -1
  4. package/build/components/global-styles/screen-root.js +1 -1
  5. package/build/components/global-styles/screen-root.js.map +1 -1
  6. package/build/components/maybe-editor/index.js +1 -0
  7. package/build/components/maybe-editor/index.js.map +1 -1
  8. package/build/components/resizable-frame/index.js +1 -1
  9. package/build/components/resizable-frame/index.js.map +1 -1
  10. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  11. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  12. package/build/components/style-book/categories.js +13 -6
  13. package/build/components/style-book/categories.js.map +1 -1
  14. package/build/components/style-book/color-examples.js.map +1 -1
  15. package/build/components/style-book/duotone-examples.js.map +1 -1
  16. package/build/components/style-book/examples.js +7 -6
  17. package/build/components/style-book/examples.js.map +1 -1
  18. package/build/components/style-book/types.js.map +1 -1
  19. package/build-module/components/add-new-template/utils.js +1 -1
  20. package/build-module/components/add-new-template/utils.js.map +1 -1
  21. package/build-module/components/global-styles/screen-root.js +1 -1
  22. package/build-module/components/global-styles/screen-root.js.map +1 -1
  23. package/build-module/components/maybe-editor/index.js +1 -0
  24. package/build-module/components/maybe-editor/index.js.map +1 -1
  25. package/build-module/components/resizable-frame/index.js +1 -1
  26. package/build-module/components/resizable-frame/index.js.map +1 -1
  27. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  28. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  29. package/build-module/components/style-book/categories.js +13 -6
  30. package/build-module/components/style-book/categories.js.map +1 -1
  31. package/build-module/components/style-book/color-examples.js +4 -1
  32. package/build-module/components/style-book/color-examples.js.map +1 -1
  33. package/build-module/components/style-book/duotone-examples.js.map +1 -1
  34. package/build-module/components/style-book/examples.js +11 -7
  35. package/build-module/components/style-book/examples.js.map +1 -1
  36. package/build-module/components/style-book/types.js.map +1 -1
  37. package/build-style/posts-rtl.css +29 -26
  38. package/build-style/posts.css +29 -26
  39. package/build-style/style-rtl.css +29 -26
  40. package/build-style/style.css +29 -26
  41. package/build-types/components/style-book/categories.d.ts +18 -0
  42. package/build-types/components/style-book/categories.d.ts.map +1 -0
  43. package/build-types/components/style-book/color-examples.d.ts +7 -0
  44. package/build-types/components/style-book/color-examples.d.ts.map +1 -0
  45. package/build-types/components/style-book/constants.d.ts +11 -0
  46. package/build-types/components/style-book/constants.d.ts.map +1 -0
  47. package/build-types/components/style-book/duotone-examples.d.ts +9 -0
  48. package/build-types/components/style-book/duotone-examples.d.ts.map +1 -0
  49. package/build-types/components/style-book/examples.d.ts +12 -0
  50. package/build-types/components/style-book/examples.d.ts.map +1 -0
  51. package/build-types/components/style-book/types.d.ts +72 -0
  52. package/build-types/components/style-book/types.d.ts.map +1 -0
  53. package/package.json +42 -42
  54. package/src/components/add-new-template/utils.js +1 -1
  55. package/src/components/global-styles/font-library-modal/utils/test/preview-styles.spec.js +1 -1
  56. package/src/components/global-styles/screen-root.js +1 -1
  57. package/src/components/maybe-editor/index.js +3 -0
  58. package/src/components/resizable-frame/index.js +1 -1
  59. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  60. package/src/components/style-book/categories.ts +12 -6
  61. package/src/components/style-book/color-examples.tsx +4 -9
  62. package/src/components/style-book/duotone-examples.tsx +5 -1
  63. package/src/components/style-book/examples.tsx +23 -14
  64. package/src/components/style-book/types.ts +21 -1
  65. package/tsconfig.json +53 -0
  66. package/tsconfig.tsbuildinfo +1 -0
@@ -137,13 +137,11 @@
137
137
  flex-shrink: 0;
138
138
  position: sticky;
139
139
  left: 0;
140
- transition: padding ease-out 0.1s;
141
140
  }
142
- @media (prefers-reduced-motion: reduce) {
141
+ @media not (prefers-reduced-motion) {
143
142
  .dataviews__view-actions,
144
143
  .dataviews-filters__container {
145
- transition-duration: 0s;
146
- transition-delay: 0s;
144
+ transition: padding ease-out 0.1s;
147
145
  }
148
146
  }
149
147
 
@@ -154,13 +152,11 @@
154
152
  display: flex;
155
153
  align-items: center;
156
154
  justify-content: center;
157
- transition: padding ease-out 0.1s;
158
155
  }
159
- @media (prefers-reduced-motion: reduce) {
156
+ @media not (prefers-reduced-motion) {
160
157
  .dataviews-no-results,
161
158
  .dataviews-loading {
162
- transition-duration: 0s;
163
- transition-delay: 0s;
159
+ transition: padding ease-out 0.1s;
164
160
  }
165
161
  }
166
162
 
@@ -414,7 +410,6 @@
414
410
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
415
411
  padding: 6px 8px;
416
412
  box-shadow: 0 0 0 transparent;
417
- transition: box-shadow 0.1s linear;
418
413
  border-radius: 2px;
419
414
  border: 1px solid #949494;
420
415
  /* Fonts smaller than 16px causes mobile safari to zoom. */
@@ -432,10 +427,9 @@
432
427
  /* Fonts smaller than 16px causes mobile safari to zoom. */
433
428
  font-size: 16px;
434
429
  }
435
- @media (prefers-reduced-motion: reduce) {
430
+ @media not (prefers-reduced-motion) {
436
431
  .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input {
437
- transition-duration: 0s;
438
- transition-delay: 0s;
432
+ transition: box-shadow 0.1s linear;
439
433
  }
440
434
  }
441
435
  @media (min-width: 600px) {
@@ -521,13 +515,11 @@
521
515
  padding: 12px 48px;
522
516
  border-top: 1px solid #f0f0f0;
523
517
  flex-shrink: 0;
524
- transition: padding ease-out 0.1s;
525
518
  z-index: 2;
526
519
  }
527
- @media (prefers-reduced-motion: reduce) {
520
+ @media not (prefers-reduced-motion) {
528
521
  .dataviews-footer {
529
- transition-duration: 0s;
530
- transition-delay: 0s;
522
+ transition: padding ease-out 0.1s;
531
523
  }
532
524
  }
533
525
 
@@ -651,7 +643,8 @@
651
643
  }
652
644
 
653
645
  .dataviews-field-control__field:hover .dataviews-field-control__actions,
654
- .dataviews-field-control__field:focus-within .dataviews-field-control__actions {
646
+ .dataviews-field-control__field:focus-within .dataviews-field-control__actions,
647
+ .dataviews-field-control__field.is-interacting .dataviews-field-control__actions {
655
648
  position: unset;
656
649
  top: unset;
657
650
  }
@@ -661,21 +654,31 @@
661
654
  width: 24px;
662
655
  }
663
656
 
664
- .dataviews-field-control__label {
657
+ .dataviews-field-control__label-sub-label-container {
665
658
  flex-grow: 1;
666
659
  }
667
660
 
661
+ .dataviews-field-control__label {
662
+ display: block;
663
+ }
664
+
665
+ .dataviews-field-control__sub-label {
666
+ margin-top: 8px;
667
+ margin-bottom: 0;
668
+ font-size: 11px;
669
+ font-style: normal;
670
+ color: #757575;
671
+ }
672
+
668
673
  .dataviews-view-grid {
669
674
  margin-bottom: auto;
670
675
  grid-template-rows: max-content;
671
676
  padding: 0 48px 24px;
672
- transition: padding ease-out 0.1s;
673
677
  container-type: inline-size;
674
678
  }
675
- @media (prefers-reduced-motion: reduce) {
679
+ @media not (prefers-reduced-motion) {
676
680
  .dataviews-view-grid {
677
- transition-duration: 0s;
678
- transition-delay: 0s;
681
+ transition: padding ease-out 0.1s;
679
682
  }
680
683
  }
681
684
  .dataviews-view-grid .dataviews-view-grid__card {
@@ -1581,7 +1584,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1581
1584
  contain: content;
1582
1585
  }
1583
1586
 
1584
- @keyframes _15iyx_slide-from-right {
1587
+ @keyframes _u5k8s_slide-from-right {
1585
1588
  from {
1586
1589
  transform: translateX(50px);
1587
1590
  opacity: 0;
@@ -1591,7 +1594,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1591
1594
  opacity: 1;
1592
1595
  }
1593
1596
  }
1594
- @keyframes _15iyx_slide-from-left {
1597
+ @keyframes _u5k8s_slide-from-left {
1595
1598
  from {
1596
1599
  transform: translateX(-50px);
1597
1600
  opacity: 0;
@@ -1647,10 +1650,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1647
1650
  }
1648
1651
  }
1649
1652
  .edit-site-sidebar__screen-wrapper.slide-from-left {
1650
- animation-name: _15iyx_slide-from-left;
1653
+ animation-name: _u5k8s_slide-from-left;
1651
1654
  }
1652
1655
  .edit-site-sidebar__screen-wrapper.slide-from-right {
1653
- animation-name: _15iyx_slide-from-right;
1656
+ animation-name: _u5k8s_slide-from-right;
1654
1657
  }
1655
1658
 
1656
1659
  .edit-site-site-hub {
@@ -137,13 +137,11 @@
137
137
  flex-shrink: 0;
138
138
  position: sticky;
139
139
  right: 0;
140
- transition: padding ease-out 0.1s;
141
140
  }
142
- @media (prefers-reduced-motion: reduce) {
141
+ @media not (prefers-reduced-motion) {
143
142
  .dataviews__view-actions,
144
143
  .dataviews-filters__container {
145
- transition-duration: 0s;
146
- transition-delay: 0s;
144
+ transition: padding ease-out 0.1s;
147
145
  }
148
146
  }
149
147
 
@@ -154,13 +152,11 @@
154
152
  display: flex;
155
153
  align-items: center;
156
154
  justify-content: center;
157
- transition: padding ease-out 0.1s;
158
155
  }
159
- @media (prefers-reduced-motion: reduce) {
156
+ @media not (prefers-reduced-motion) {
160
157
  .dataviews-no-results,
161
158
  .dataviews-loading {
162
- transition-duration: 0s;
163
- transition-delay: 0s;
159
+ transition: padding ease-out 0.1s;
164
160
  }
165
161
  }
166
162
 
@@ -414,7 +410,6 @@
414
410
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
415
411
  padding: 6px 8px;
416
412
  box-shadow: 0 0 0 transparent;
417
- transition: box-shadow 0.1s linear;
418
413
  border-radius: 2px;
419
414
  border: 1px solid #949494;
420
415
  /* Fonts smaller than 16px causes mobile safari to zoom. */
@@ -432,10 +427,9 @@
432
427
  /* Fonts smaller than 16px causes mobile safari to zoom. */
433
428
  font-size: 16px;
434
429
  }
435
- @media (prefers-reduced-motion: reduce) {
430
+ @media not (prefers-reduced-motion) {
436
431
  .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input {
437
- transition-duration: 0s;
438
- transition-delay: 0s;
432
+ transition: box-shadow 0.1s linear;
439
433
  }
440
434
  }
441
435
  @media (min-width: 600px) {
@@ -521,13 +515,11 @@
521
515
  padding: 12px 48px;
522
516
  border-top: 1px solid #f0f0f0;
523
517
  flex-shrink: 0;
524
- transition: padding ease-out 0.1s;
525
518
  z-index: 2;
526
519
  }
527
- @media (prefers-reduced-motion: reduce) {
520
+ @media not (prefers-reduced-motion) {
528
521
  .dataviews-footer {
529
- transition-duration: 0s;
530
- transition-delay: 0s;
522
+ transition: padding ease-out 0.1s;
531
523
  }
532
524
  }
533
525
 
@@ -651,7 +643,8 @@
651
643
  }
652
644
 
653
645
  .dataviews-field-control__field:hover .dataviews-field-control__actions,
654
- .dataviews-field-control__field:focus-within .dataviews-field-control__actions {
646
+ .dataviews-field-control__field:focus-within .dataviews-field-control__actions,
647
+ .dataviews-field-control__field.is-interacting .dataviews-field-control__actions {
655
648
  position: unset;
656
649
  top: unset;
657
650
  }
@@ -661,21 +654,31 @@
661
654
  width: 24px;
662
655
  }
663
656
 
664
- .dataviews-field-control__label {
657
+ .dataviews-field-control__label-sub-label-container {
665
658
  flex-grow: 1;
666
659
  }
667
660
 
661
+ .dataviews-field-control__label {
662
+ display: block;
663
+ }
664
+
665
+ .dataviews-field-control__sub-label {
666
+ margin-top: 8px;
667
+ margin-bottom: 0;
668
+ font-size: 11px;
669
+ font-style: normal;
670
+ color: #757575;
671
+ }
672
+
668
673
  .dataviews-view-grid {
669
674
  margin-bottom: auto;
670
675
  grid-template-rows: max-content;
671
676
  padding: 0 48px 24px;
672
- transition: padding ease-out 0.1s;
673
677
  container-type: inline-size;
674
678
  }
675
- @media (prefers-reduced-motion: reduce) {
679
+ @media not (prefers-reduced-motion) {
676
680
  .dataviews-view-grid {
677
- transition-duration: 0s;
678
- transition-delay: 0s;
681
+ transition: padding ease-out 0.1s;
679
682
  }
680
683
  }
681
684
  .dataviews-view-grid .dataviews-view-grid__card {
@@ -2750,7 +2753,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2750
2753
  contain: content;
2751
2754
  }
2752
2755
 
2753
- @keyframes _j3yax_slide-from-right {
2756
+ @keyframes _s75g6_slide-from-right {
2754
2757
  from {
2755
2758
  transform: translateX(-50px);
2756
2759
  opacity: 0;
@@ -2760,7 +2763,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2760
2763
  opacity: 1;
2761
2764
  }
2762
2765
  }
2763
- @keyframes _j3yax_slide-from-left {
2766
+ @keyframes _s75g6_slide-from-left {
2764
2767
  from {
2765
2768
  transform: translateX(50px);
2766
2769
  opacity: 0;
@@ -2816,10 +2819,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2816
2819
  }
2817
2820
  }
2818
2821
  .edit-site-sidebar__screen-wrapper.slide-from-left {
2819
- animation-name: _j3yax_slide-from-left;
2822
+ animation-name: _s75g6_slide-from-left;
2820
2823
  }
2821
2824
  .edit-site-sidebar__screen-wrapper.slide-from-right {
2822
- animation-name: _j3yax_slide-from-right;
2825
+ animation-name: _s75g6_slide-from-right;
2823
2826
  }
2824
2827
 
2825
2828
  .edit-site-sidebar-button {
@@ -137,13 +137,11 @@
137
137
  flex-shrink: 0;
138
138
  position: sticky;
139
139
  left: 0;
140
- transition: padding ease-out 0.1s;
141
140
  }
142
- @media (prefers-reduced-motion: reduce) {
141
+ @media not (prefers-reduced-motion) {
143
142
  .dataviews__view-actions,
144
143
  .dataviews-filters__container {
145
- transition-duration: 0s;
146
- transition-delay: 0s;
144
+ transition: padding ease-out 0.1s;
147
145
  }
148
146
  }
149
147
 
@@ -154,13 +152,11 @@
154
152
  display: flex;
155
153
  align-items: center;
156
154
  justify-content: center;
157
- transition: padding ease-out 0.1s;
158
155
  }
159
- @media (prefers-reduced-motion: reduce) {
156
+ @media not (prefers-reduced-motion) {
160
157
  .dataviews-no-results,
161
158
  .dataviews-loading {
162
- transition-duration: 0s;
163
- transition-delay: 0s;
159
+ transition: padding ease-out 0.1s;
164
160
  }
165
161
  }
166
162
 
@@ -414,7 +410,6 @@
414
410
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
415
411
  padding: 6px 8px;
416
412
  box-shadow: 0 0 0 transparent;
417
- transition: box-shadow 0.1s linear;
418
413
  border-radius: 2px;
419
414
  border: 1px solid #949494;
420
415
  /* Fonts smaller than 16px causes mobile safari to zoom. */
@@ -432,10 +427,9 @@
432
427
  /* Fonts smaller than 16px causes mobile safari to zoom. */
433
428
  font-size: 16px;
434
429
  }
435
- @media (prefers-reduced-motion: reduce) {
430
+ @media not (prefers-reduced-motion) {
436
431
  .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input {
437
- transition-duration: 0s;
438
- transition-delay: 0s;
432
+ transition: box-shadow 0.1s linear;
439
433
  }
440
434
  }
441
435
  @media (min-width: 600px) {
@@ -521,13 +515,11 @@
521
515
  padding: 12px 48px;
522
516
  border-top: 1px solid #f0f0f0;
523
517
  flex-shrink: 0;
524
- transition: padding ease-out 0.1s;
525
518
  z-index: 2;
526
519
  }
527
- @media (prefers-reduced-motion: reduce) {
520
+ @media not (prefers-reduced-motion) {
528
521
  .dataviews-footer {
529
- transition-duration: 0s;
530
- transition-delay: 0s;
522
+ transition: padding ease-out 0.1s;
531
523
  }
532
524
  }
533
525
 
@@ -651,7 +643,8 @@
651
643
  }
652
644
 
653
645
  .dataviews-field-control__field:hover .dataviews-field-control__actions,
654
- .dataviews-field-control__field:focus-within .dataviews-field-control__actions {
646
+ .dataviews-field-control__field:focus-within .dataviews-field-control__actions,
647
+ .dataviews-field-control__field.is-interacting .dataviews-field-control__actions {
655
648
  position: unset;
656
649
  top: unset;
657
650
  }
@@ -661,21 +654,31 @@
661
654
  width: 24px;
662
655
  }
663
656
 
664
- .dataviews-field-control__label {
657
+ .dataviews-field-control__label-sub-label-container {
665
658
  flex-grow: 1;
666
659
  }
667
660
 
661
+ .dataviews-field-control__label {
662
+ display: block;
663
+ }
664
+
665
+ .dataviews-field-control__sub-label {
666
+ margin-top: 8px;
667
+ margin-bottom: 0;
668
+ font-size: 11px;
669
+ font-style: normal;
670
+ color: #757575;
671
+ }
672
+
668
673
  .dataviews-view-grid {
669
674
  margin-bottom: auto;
670
675
  grid-template-rows: max-content;
671
676
  padding: 0 48px 24px;
672
- transition: padding ease-out 0.1s;
673
677
  container-type: inline-size;
674
678
  }
675
- @media (prefers-reduced-motion: reduce) {
679
+ @media not (prefers-reduced-motion) {
676
680
  .dataviews-view-grid {
677
- transition-duration: 0s;
678
- transition-delay: 0s;
681
+ transition: padding ease-out 0.1s;
679
682
  }
680
683
  }
681
684
  .dataviews-view-grid .dataviews-view-grid__card {
@@ -2751,7 +2754,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2751
2754
  contain: content;
2752
2755
  }
2753
2756
 
2754
- @keyframes _j3yax_slide-from-right {
2757
+ @keyframes _s75g6_slide-from-right {
2755
2758
  from {
2756
2759
  transform: translateX(50px);
2757
2760
  opacity: 0;
@@ -2761,7 +2764,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2761
2764
  opacity: 1;
2762
2765
  }
2763
2766
  }
2764
- @keyframes _j3yax_slide-from-left {
2767
+ @keyframes _s75g6_slide-from-left {
2765
2768
  from {
2766
2769
  transform: translateX(-50px);
2767
2770
  opacity: 0;
@@ -2817,10 +2820,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2817
2820
  }
2818
2821
  }
2819
2822
  .edit-site-sidebar__screen-wrapper.slide-from-left {
2820
- animation-name: _j3yax_slide-from-left;
2823
+ animation-name: _s75g6_slide-from-left;
2821
2824
  }
2822
2825
  .edit-site-sidebar__screen-wrapper.slide-from-right {
2823
- animation-name: _j3yax_slide-from-right;
2826
+ animation-name: _s75g6_slide-from-right;
2824
2827
  }
2825
2828
 
2826
2829
  .edit-site-sidebar-button {
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { BlockExample, StyleBookCategory, CategoryExamples } from './types';
5
+ /**
6
+ * Returns category examples for a given category definition and list of examples.
7
+ * @param {StyleBookCategory} categoryDefinition The category definition.
8
+ * @param {BlockExample[]} examples An array of block examples.
9
+ * @return {CategoryExamples|undefined} An object containing the category examples.
10
+ */
11
+ export declare function getExamplesByCategory(categoryDefinition: StyleBookCategory, examples: BlockExample[]): CategoryExamples | undefined;
12
+ /**
13
+ * Returns category examples for a given category definition and list of examples.
14
+ *
15
+ * @return {StyleBookCategory[]} An array of top-level category definitions.
16
+ */
17
+ export declare function getTopLevelStyleBookCategories(): StyleBookCategory[];
18
+ //# sourceMappingURL=categories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../../src/components/style-book/categories.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,OAAO,KAAK,EACX,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,SAAS,CAAC;AAMjB;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACpC,kBAAkB,EAAE,iBAAiB,EACrC,QAAQ,EAAE,YAAY,EAAE,GACtB,gBAAgB,GAAG,SAAS,CAkD9B;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,IAAI,iBAAiB,EAAE,CAUpE"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { ColorExampleProps } from './types';
5
+ declare const ColorExamples: ({ colors, type, templateColumns, itemHeight, }: ColorExampleProps) => JSX.Element | null;
6
+ export default ColorExamples;
7
+ //# sourceMappingURL=color-examples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-examples.d.ts","sourceRoot":"","sources":["../../../src/components/style-book/color-examples.tsx"],"names":[],"mappings":"AAiBA;;GAEG;AACH,OAAO,KAAK,EAAmB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAElE,QAAA,MAAM,aAAa,mDAKhB,iBAAiB,KAAI,GAAG,CAAC,OAAO,GAAG,IA2BrC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { StyleBookCategory, StyleBookColorGroup } from './types';
5
+ export declare const STYLE_BOOK_COLOR_GROUPS: StyleBookColorGroup[];
6
+ export declare const STYLE_BOOK_THEME_SUBCATEGORIES: Omit<StyleBookCategory, 'subcategories'>[];
7
+ export declare const STYLE_BOOK_CATEGORIES: StyleBookCategory[];
8
+ export declare const STYLE_BOOK_ALL_BLOCKS_SUBCATEGORIES: StyleBookCategory[];
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.edit-site-style-book__examples {\n\t\tmax-width: 1200px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.edit-site-style-book__example {\n\t max-width: 900px;\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\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.edit-site-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.edit-site-style-book__example.is-disabled-example {\n\t\tpointer-events: none;\n\t}\n\n\t.edit-site-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.edit-site-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.edit-site-style-book__duotone-example img {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\t.edit-site-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.edit-site-style-book__color-example {\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.edit-site-style-book__subcategory-title,\n\t.edit-site-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.edit-site-style-book__subcategory-title {\n\t\tfont-size: 16px;\n\t\tmargin-bottom: 40px;\n \tpadding-bottom: 8px;\n\t}\n\n\t.edit-site-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.edit-site-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.edit-site-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
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +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,gnFA8FpC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { Duotone } from './types';
5
+ declare const DuotoneExamples: ({ duotones, }: {
6
+ duotones: Duotone[];
7
+ }) => JSX.Element | null;
8
+ export default DuotoneExamples;
9
+ //# sourceMappingURL=duotone-examples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duotone-examples.d.ts","sourceRoot":"","sources":["../../../src/components/style-book/duotone-examples.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,QAAA,MAAM,eAAe,kBAElB;IACF,QAAQ,EAAE,OAAO,EAAE,CAAC;CACpB,KAAI,GAAG,CAAC,OAAO,GAAG,IAuClB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { BlockExample, MultiOriginPalettes } from './types';
5
+ /**
6
+ * Returns a list of examples for registered block types.
7
+ *
8
+ * @param {MultiOriginPalettes} colors Global styles colors grouped by origin e.g. Core, Theme, and User.
9
+ * @return {BlockExample[]} An array of block examples.
10
+ */
11
+ export declare function getExamples(colors: MultiOriginPalettes): BlockExample[];
12
+ //# sourceMappingURL=examples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"examples.d.ts","sourceRoot":"","sources":["../../../src/components/style-book/examples.tsx"],"names":[],"mappings":"AAaA;;GAEG;AACH,OAAO,KAAK,EACX,YAAY,EAEZ,mBAAmB,EAEnB,MAAM,SAAS,CAAC;AAwLjB;;;;;GAKG;AACH,wBAAgB,WAAW,CAAE,MAAM,EAAE,mBAAmB,GAAI,YAAY,EAAE,CA4DzE"}
@@ -0,0 +1,72 @@
1
+ export type Block = {
2
+ name: string;
3
+ attributes: Record<string, unknown>;
4
+ innerBlocks?: Block[];
5
+ };
6
+ export type StyleBookCategory = {
7
+ title: string;
8
+ slug: string;
9
+ blocks?: string[];
10
+ exclude?: string[];
11
+ include?: string[];
12
+ subcategories?: StyleBookCategory[];
13
+ };
14
+ export type BlockExample = {
15
+ name: string;
16
+ title: string;
17
+ category: string;
18
+ content?: JSX.Element;
19
+ blocks?: Block | Block[];
20
+ };
21
+ export type CategoryExamples = {
22
+ title: string;
23
+ slug: string;
24
+ examples?: BlockExample[];
25
+ subcategories?: CategoryExamples[];
26
+ };
27
+ export type StyleBookColorGroup = {
28
+ origin: string;
29
+ slug: string;
30
+ title: string;
31
+ type: 'colors' | 'gradients' | 'duotones';
32
+ };
33
+ export type Color = {
34
+ slug: string;
35
+ };
36
+ export type Gradient = {
37
+ slug: string;
38
+ };
39
+ export type Duotone = {
40
+ colors: string[];
41
+ slug: string;
42
+ };
43
+ export type ColorExampleProps = {
44
+ colors: Color[] | Gradient[];
45
+ type: StyleBookColorGroup['type'];
46
+ templateColumns?: string | number;
47
+ itemHeight?: string;
48
+ };
49
+ export type ColorOrigin = {
50
+ name: string;
51
+ slug: string;
52
+ colors?: Color[];
53
+ gradients?: Gradient[];
54
+ duotones?: Duotone[];
55
+ };
56
+ export type MultiOriginPalettes = {
57
+ disableCustomColors: boolean;
58
+ disableCustomGradients: boolean;
59
+ hasColorsOrGradients: boolean;
60
+ colors: Omit<ColorOrigin, 'gradients' | 'duotones'>;
61
+ duotones: Omit<ColorOrigin, 'colors' | 'gradients'>;
62
+ gradients: Omit<ColorOrigin, 'colors' | 'duotones'>;
63
+ };
64
+ export type BlockType = {
65
+ name: string;
66
+ title: string;
67
+ category: string;
68
+ example: BlockType;
69
+ attributes: Record<string, unknown>;
70
+ supports: Record<string, unknown>;
71
+ };
72
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/style-book/types.ts"],"names":[],"mappings":"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"}