soinproduction-gutenberg 0.3.49 → 0.3.51
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/admin-ui/README.md +11 -0
- package/admin-ui/editor.css +93 -30
- package/admin-ui/tokens.css +4 -0
- package/components/drag/editor.tsx +3 -2
- package/core/editor/inspector.tsx +1 -1
- package/core/editor/styles.css +30 -30
- package/core/media/universal/editor.css +7 -10
- package/dist/admin-ui/README.md +11 -0
- package/dist/admin-ui/editor.css +93 -30
- package/dist/admin-ui/tokens.css +4 -0
- package/dist/components/drag/editor.js +2 -1
- package/dist/components/drag/editor.js.map +2 -2
- package/dist/core/editor/inspector.js +1 -1
- package/dist/core/editor/inspector.js.map +2 -2
- package/dist/core/editor/styles.css +30 -30
- package/dist/core/media/universal/editor.css +7 -10
- package/dist/host/editor/index.js +2 -2
- package/dist/host/editor/index.js.map +2 -2
- package/dist/modules/forms/frontend/field-blocks.js +3 -2
- package/dist/modules/forms/frontend/field-blocks.js.map +2 -2
- package/dist/modules/forms/frontend/layout-controls.js +3 -2
- package/dist/modules/forms/frontend/layout-controls.js.map +2 -2
- package/dist/modules/forms/frontend/settings-editor.js +2 -1
- package/dist/modules/forms/frontend/settings-editor.js.map +2 -2
- package/host/editor/index.tsx +3 -3
- package/modules/forms/frontend/field-blocks.tsx +4 -3
- package/modules/forms/frontend/layout-controls.tsx +4 -3
- package/modules/forms/frontend/settings-editor.tsx +3 -2
- package/package.json +1 -1
package/dist/admin-ui/editor.css
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
border-radius: 2px !important;
|
|
25
25
|
background-color: var(--sp-ui-surface);
|
|
26
26
|
color: var(--sp-ui-ink);
|
|
27
|
-
font-size:
|
|
27
|
+
font-size: var(--sp-ui-font-size-small);
|
|
28
28
|
min-height: var(--sp-ui-control-height);
|
|
29
29
|
box-shadow: none;
|
|
30
30
|
padding-inline: 11px;
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
.fe-settings-dialog
|
|
43
43
|
)
|
|
44
44
|
:is(.components-base-control__label, .components-input-control__label) {
|
|
45
|
-
font-size:
|
|
45
|
+
font-size: var(--sp-ui-label-size) !important;
|
|
46
46
|
text-transform: none !important;
|
|
47
47
|
letter-spacing: 0 !important;
|
|
48
48
|
color: var(--sp-ui-muted);
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
.components-button:is(.is-secondary, .is-primary, .is-tertiary) {
|
|
61
61
|
border-radius: 2px;
|
|
62
62
|
min-height: 32px;
|
|
63
|
-
font-size:
|
|
63
|
+
font-size: var(--sp-ui-font-size-small);
|
|
64
64
|
font-weight: 500;
|
|
65
65
|
box-shadow: none;
|
|
66
66
|
}
|
|
@@ -87,18 +87,18 @@
|
|
|
87
87
|
border-color: #e0e0e0;
|
|
88
88
|
}
|
|
89
89
|
.site-menu-toggle {
|
|
90
|
-
font-size:
|
|
90
|
+
font-size: var(--sp-ui-font-size-small);
|
|
91
91
|
color: var(--sp-ui-ink);
|
|
92
92
|
}
|
|
93
93
|
.site-menu-card-body {
|
|
94
94
|
padding: 16px;
|
|
95
95
|
}
|
|
96
96
|
.site-menu-heading {
|
|
97
|
-
font-size:
|
|
97
|
+
font-size: var(--sp-ui-font-size-small);
|
|
98
98
|
color: var(--sp-ui-ink);
|
|
99
99
|
}
|
|
100
100
|
.site-menu-hint {
|
|
101
|
-
font-size:
|
|
101
|
+
font-size: var(--sp-ui-font-size-small);
|
|
102
102
|
line-height: 1.7;
|
|
103
103
|
color: #757575;
|
|
104
104
|
}
|
|
@@ -126,12 +126,12 @@
|
|
|
126
126
|
border-color: #949494;
|
|
127
127
|
border-radius: 2px;
|
|
128
128
|
box-shadow: none;
|
|
129
|
-
font-size:
|
|
129
|
+
font-size: var(--sp-ui-font-size);
|
|
130
130
|
}
|
|
131
131
|
.site-relationship-option,
|
|
132
132
|
.site-relationship-row {
|
|
133
133
|
border-color: #e0e0e0;
|
|
134
|
-
font-size:
|
|
134
|
+
font-size: var(--sp-ui-font-size);
|
|
135
135
|
color: #1e1e1e;
|
|
136
136
|
}
|
|
137
137
|
.site-relationship-row:last-child {
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
}
|
|
153
153
|
.site-relationship-empty {
|
|
154
154
|
color: #8c98aa;
|
|
155
|
-
font-size:
|
|
155
|
+
font-size: var(--sp-ui-label-size);
|
|
156
156
|
}
|
|
157
157
|
.site-relationship-thumbnail {
|
|
158
158
|
border-radius: 2px;
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
}
|
|
211
211
|
.fe-settings-dialog .components-tab-panel__tabs button {
|
|
212
212
|
border-radius: 2px;
|
|
213
|
-
font-size:
|
|
213
|
+
font-size: var(--sp-ui-font-size-small);
|
|
214
214
|
color: #7a879a;
|
|
215
215
|
height: 36px;
|
|
216
216
|
}
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
.fe-channel-heading p,
|
|
241
241
|
.fe-template-heading p,
|
|
242
242
|
.fe-help {
|
|
243
|
-
font-size:
|
|
243
|
+
font-size: var(--sp-ui-label-size);
|
|
244
244
|
color: #757575;
|
|
245
245
|
line-height: 1.7;
|
|
246
246
|
}
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
border-radius: 2px;
|
|
260
260
|
color: #1e1e1e;
|
|
261
261
|
background: var(--sp-ui-surface);
|
|
262
|
-
font-size:
|
|
262
|
+
font-size: var(--sp-ui-label-size);
|
|
263
263
|
}
|
|
264
264
|
.fe-action-options {
|
|
265
265
|
gap: 8px;
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
border-radius: 2px;
|
|
307
307
|
}
|
|
308
308
|
.sp-media-control .sp-media-tabs button {
|
|
309
|
-
font-size:
|
|
309
|
+
font-size: var(--sp-ui-label-size);
|
|
310
310
|
min-height: 32px;
|
|
311
311
|
color: var(--sp-ui-muted);
|
|
312
312
|
}
|
|
@@ -320,7 +320,7 @@
|
|
|
320
320
|
border-radius: 2px;
|
|
321
321
|
}
|
|
322
322
|
.sp-media-help {
|
|
323
|
-
font-size:
|
|
323
|
+
font-size: var(--sp-ui-label-size);
|
|
324
324
|
color: var(--sp-ui-subtle);
|
|
325
325
|
line-height: 1.7;
|
|
326
326
|
}
|
|
@@ -654,13 +654,13 @@
|
|
|
654
654
|
.site-select-control > label {
|
|
655
655
|
margin-bottom: 8px;
|
|
656
656
|
color: #1e1e1e;
|
|
657
|
-
font-size:
|
|
657
|
+
font-size: var(--sp-ui-label-size);
|
|
658
658
|
font-weight: 500;
|
|
659
659
|
text-transform: uppercase;
|
|
660
660
|
}
|
|
661
661
|
.site-select-control > p {
|
|
662
662
|
color: #757575;
|
|
663
|
-
font-size:
|
|
663
|
+
font-size: var(--sp-ui-font-size-small);
|
|
664
664
|
}
|
|
665
665
|
.site-select-trigger[data-density='admin'] {
|
|
666
666
|
min-height: 40px;
|
|
@@ -670,7 +670,7 @@
|
|
|
670
670
|
background: #fff;
|
|
671
671
|
box-shadow: none;
|
|
672
672
|
color: #1e1e1e;
|
|
673
|
-
font-size:
|
|
673
|
+
font-size: var(--sp-ui-font-size);
|
|
674
674
|
}
|
|
675
675
|
.site-select-trigger[data-density='admin']:focus-visible,
|
|
676
676
|
.site-select-trigger[data-density='admin'][data-state='open'] {
|
|
@@ -688,7 +688,7 @@
|
|
|
688
688
|
padding: 4px 8px;
|
|
689
689
|
border-radius: 2px;
|
|
690
690
|
color: #1e1e1e;
|
|
691
|
-
font-size:
|
|
691
|
+
font-size: var(--sp-ui-font-size);
|
|
692
692
|
}
|
|
693
693
|
.site-select-menu[data-density='admin'] .site-select-option[data-highlighted] {
|
|
694
694
|
background: #f0f0f0;
|
|
@@ -705,7 +705,7 @@
|
|
|
705
705
|
|
|
706
706
|
/* Shared visual column alignment controls, used in both Inspector and popover. */
|
|
707
707
|
.site-flow-alignment{border:0;margin:16px 0 0;padding:0;min-width:0}
|
|
708
|
-
.site-flow-alignment legend{font-size:
|
|
708
|
+
.site-flow-alignment legend{font-size:var(--sp-ui-label-size);font-weight:500;text-transform:uppercase;margin-bottom:8px;padding:0}
|
|
709
709
|
.site-flow-alignment-options{display:flex;gap:4px}
|
|
710
710
|
.site-flow-alignment-options .components-button{display:flex;align-items:center;justify-content:center;flex:1;min-width:32px;height:36px;padding:0;border:1px solid #e0e0e0;border-radius:2px;background:#fff;color:#1e1e1e}
|
|
711
711
|
.site-flow-alignment-options .components-button:hover{border-color:var(--wp-admin-theme-color,#3858e9);color:var(--wp-admin-theme-color,#3858e9)}
|
|
@@ -716,16 +716,16 @@
|
|
|
716
716
|
|
|
717
717
|
/* Compact Gutenberg-style collection mode selector. */
|
|
718
718
|
.site-list-display-settings{display:grid;gap:16px;margin-block:16px}
|
|
719
|
-
.site-collection-display-title{margin:0;font-size:
|
|
719
|
+
.site-collection-display-title{margin:0;font-size:var(--sp-ui-font-size);font-weight:600}
|
|
720
720
|
.site-collection-modes{border:0;padding:0;margin:0;min-width:0}
|
|
721
|
-
.site-collection-modes legend{margin-bottom:8px;padding:0;font-size:
|
|
721
|
+
.site-collection-modes legend{margin-bottom:8px;padding:0;font-size:var(--sp-ui-label-size);font-weight:500;text-transform:uppercase}
|
|
722
722
|
.site-collection-mode-options{display:flex;gap:4px}
|
|
723
723
|
.site-list-display-settings .site-collection-mode.components-button{display:flex;align-items:center;justify-content:center;flex:1;min-width:32px;height:36px;min-height:36px;padding:0;border:1px solid #ddd;border-radius:2px;background:#fff;color:#1e1e1e;box-shadow:none}
|
|
724
724
|
.site-list-display-settings .site-collection-mode.components-button:hover{border-color:var(--wp-admin-theme-color,#3858e9);color:var(--wp-admin-theme-color,#3858e9);background:#fff}
|
|
725
725
|
.site-list-display-settings .site-collection-mode.components-button[aria-pressed="true"]{background:var(--wp-admin-theme-color,#3858e9);border-color:var(--wp-admin-theme-color,#3858e9);color:#fff;box-shadow:none}
|
|
726
726
|
.site-collection-mode.components-button svg{pointer-events:none;width:20px;height:20px}
|
|
727
727
|
.site-collection-mode.components-button:focus-visible{outline:2px solid var(--wp-admin-theme-color,#3858e9);outline-offset:2px}
|
|
728
|
-
.site-collection-mode-label{margin:6px 0 0;color:#757575;font-size:
|
|
728
|
+
.site-collection-mode-label{margin:6px 0 0;color:#757575;font-size:var(--sp-ui-font-size-small);line-height:1.4}
|
|
729
729
|
.site-list-display-settings .components-base-control{margin-bottom:0}
|
|
730
730
|
|
|
731
731
|
.site-collection-modes legend strong{font-weight:600;text-transform:none;color:var(--wp-admin-theme-color,#3858e9)}
|
|
@@ -744,9 +744,9 @@
|
|
|
744
744
|
.site-collection-button-row .components-base-control__help{display:none}
|
|
745
745
|
.site-button-icon-settings{display:grid;gap:16px}
|
|
746
746
|
.site-button-icon-position{border:0;padding:0;margin:0;min-width:0}
|
|
747
|
-
.site-button-icon-position legend{margin-bottom:8px;padding:0;font-size:
|
|
747
|
+
.site-button-icon-position legend{margin-bottom:8px;padding:0;font-size:var(--sp-ui-label-size);font-weight:500;text-transform:uppercase}
|
|
748
748
|
.site-button-icon-position>div{display:flex;gap:4px}
|
|
749
|
-
.site-button-icon-position .components-button{flex:1;justify-content:center;gap:6px;height:32px;padding:0 8px;border:1px solid #ddd;border-radius:2px;background:#fff;color:#1e1e1e;font-size:
|
|
749
|
+
.site-button-icon-position .components-button{flex:1;justify-content:center;gap:6px;height:32px;padding:0 8px;border:1px solid #ddd;border-radius:2px;background:#fff;color:#1e1e1e;font-size:var(--sp-ui-font-size-small);white-space:nowrap}
|
|
750
750
|
.site-button-icon-position .components-button[aria-pressed="true"]{background:var(--wp-admin-theme-color,#3858e9);border-color:var(--wp-admin-theme-color,#3858e9);color:#fff}
|
|
751
751
|
.site-button-icon-position .components-button:focus-visible{outline:2px solid var(--wp-admin-theme-color,#3858e9);outline-offset:2px}
|
|
752
752
|
.site-button-icon-position svg{flex:none;pointer-events:none}
|
|
@@ -765,15 +765,15 @@
|
|
|
765
765
|
.site-list-display-settings .site-collection-button-row .components-dropdown>.components-button[aria-pressed="true"]:hover{
|
|
766
766
|
background:var(--wp-admin-theme-color-darker-10,#2145cf);border-color:var(--wp-admin-theme-color-darker-10,#2145cf);color:#fff;
|
|
767
767
|
}
|
|
768
|
-
.site-collection-icon-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-4px -4px 12px 0;padding-bottom:8px;border-bottom:1px solid #e0e0e0;font-size:
|
|
768
|
+
.site-collection-icon-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-4px -4px 12px 0;padding-bottom:8px;border-bottom:1px solid #e0e0e0;font-size:var(--sp-ui-font-size);font-weight:600}
|
|
769
769
|
.site-collection-icon-header .components-button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:28px;min-width:28px;height:28px;padding:0;color:#1e1e1e;background:#fff;border-radius:2px}
|
|
770
770
|
.site-collection-icon-header .components-button:hover{background:#f0f0f0;color:var(--wp-admin-theme-color,#3858e9)}
|
|
771
771
|
.site-collection-icon-header .components-button:focus-visible{outline:2px solid var(--wp-admin-theme-color,#3858e9);outline-offset:1px}
|
|
772
772
|
/* Independent HTML tag and heading style presets. */
|
|
773
773
|
.site-heading-setting{border:0;margin:0 0 calc(var(--sp-ui-space)*2);padding:0;min-width:0}
|
|
774
774
|
.site-heading-setting:last-child{margin-bottom:0}
|
|
775
|
-
.site-heading-setting legend{display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:var(--sp-ui-space);padding:0;font-size:
|
|
776
|
-
.site-heading-setting legend>.components-button{height:auto;min-height:0;padding:0;font-size:
|
|
775
|
+
.site-heading-setting legend{display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:var(--sp-ui-space);padding:0;font-size:var(--sp-ui-label-size);font-weight:500;text-transform:uppercase}
|
|
776
|
+
.site-heading-setting legend>.components-button{height:auto;min-height:0;padding:0;font-size:var(--sp-ui-label-size);text-transform:none}
|
|
777
777
|
.site-heading-options{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:2px;padding:3px;border:1px solid var(--sp-ui-border);border-radius:var(--sp-ui-radius-control);background:var(--sp-ui-canvas)}
|
|
778
778
|
.site-heading-options>.components-button{display:flex;justify-content:center;min-width:0;height:var(--sp-ui-control-small);padding:0;border-radius:calc(var(--sp-ui-radius-control) - 3px);background:transparent;color:var(--sp-ui-muted);box-shadow:none}
|
|
779
779
|
.site-heading-options>.components-button:hover{background:var(--sp-ui-surface-soft);color:var(--sp-ui-ink)}
|
|
@@ -806,11 +806,74 @@
|
|
|
806
806
|
.site-archive-filter-options > .site-select-control { margin:0; }
|
|
807
807
|
|
|
808
808
|
/* Color setting labels match heading and other inspector field labels. */
|
|
809
|
-
.site-field-color > legend .site-setting-label > span:first-child { font-size:
|
|
809
|
+
.site-field-color > legend .site-setting-label > span:first-child { font-size: var(--sp-ui-label-size); font-weight: 500; text-transform: uppercase; }
|
|
810
810
|
|
|
811
811
|
/* Text uses the same preset tiles as Heading; its color stays in the same panel. */
|
|
812
812
|
.site-text-size-options{grid-template-columns:repeat(3,minmax(0,1fr))}
|
|
813
|
-
.site-text-size-options>.components-button{text-transform:uppercase;font-size:
|
|
814
|
-
.site-text-color-setting>span{font-size:
|
|
813
|
+
.site-text-size-options>.components-button{text-transform:uppercase;font-size:var(--sp-ui-label-size);padding:0 4px}
|
|
814
|
+
.site-text-color-setting>span{font-size:var(--sp-ui-label-size);font-weight:500;text-transform:uppercase}
|
|
815
815
|
|
|
816
816
|
.site-text-size-options>.components-button:disabled{grid-column:1/-1}
|
|
817
|
+
|
|
818
|
+
/* One typographic and control scale for Kit inspectors, never authored canvas content. */
|
|
819
|
+
.site-control-scope,
|
|
820
|
+
.site-field-controls,
|
|
821
|
+
.sp-media-control {
|
|
822
|
+
font: 400 var(--sp-ui-font-size)/var(--sp-ui-line-height) var(--sp-ui-font);
|
|
823
|
+
color: var(--sp-ui-ink);
|
|
824
|
+
letter-spacing: normal;
|
|
825
|
+
text-transform: none;
|
|
826
|
+
}
|
|
827
|
+
:where(.site-control-scope, .site-field-controls, .sp-media-control)
|
|
828
|
+
:is(.components-base-control__label, .components-input-control__label,
|
|
829
|
+
.site-item-field-label, .site-field-control-heading > span, .site-field-rich-control > span) {
|
|
830
|
+
font: 500 var(--sp-ui-label-size)/var(--sp-ui-line-height) var(--sp-ui-font);
|
|
831
|
+
letter-spacing: normal;
|
|
832
|
+
text-transform: uppercase;
|
|
833
|
+
color: var(--sp-ui-ink);
|
|
834
|
+
}
|
|
835
|
+
:where(.site-control-scope, .site-field-controls, .sp-media-control)
|
|
836
|
+
:is(.components-text-control__input, .components-input-control__input,
|
|
837
|
+
.components-select-control__input, .components-combobox-control__input) {
|
|
838
|
+
box-sizing: border-box;
|
|
839
|
+
min-height: var(--sp-ui-control-height);
|
|
840
|
+
font: 400 var(--sp-ui-font-size)/var(--sp-ui-line-height) var(--sp-ui-font);
|
|
841
|
+
border-radius: var(--sp-ui-radius-control);
|
|
842
|
+
}
|
|
843
|
+
:where(.site-control-scope, .site-field-controls, .sp-media-control)
|
|
844
|
+
.components-textarea-control__input,
|
|
845
|
+
.site-field-rich-control > .block-editor-rich-text__editable {
|
|
846
|
+
font: 400 var(--sp-ui-font-size)/1.5 var(--sp-ui-font);
|
|
847
|
+
border-radius: var(--sp-ui-radius-control);
|
|
848
|
+
}
|
|
849
|
+
:where(.site-control-scope, .site-field-controls, .sp-media-control)
|
|
850
|
+
.components-base-control__help,
|
|
851
|
+
:where(.site-control-scope) .components-panel__body > p,
|
|
852
|
+
.sp-media-help {
|
|
853
|
+
font: 400 var(--sp-ui-font-size-small)/1.5 var(--sp-ui-font);
|
|
854
|
+
color: var(--sp-ui-muted);
|
|
855
|
+
}
|
|
856
|
+
.site-control-scope .components-panel__body-toggle.components-button {
|
|
857
|
+
font: 600 var(--sp-ui-font-size)/var(--sp-ui-line-height) var(--sp-ui-font);
|
|
858
|
+
text-transform: none;
|
|
859
|
+
letter-spacing: normal;
|
|
860
|
+
}
|
|
861
|
+
.site-heading-options > .components-button,
|
|
862
|
+
.site-button-icon-position .components-button,
|
|
863
|
+
.sp-media-tabs button {
|
|
864
|
+
box-sizing: border-box;
|
|
865
|
+
min-height: var(--sp-ui-control-small);
|
|
866
|
+
font: 500 var(--sp-ui-font-size)/var(--sp-ui-line-height) var(--sp-ui-font);
|
|
867
|
+
}
|
|
868
|
+
.site-item-heading-toggle.components-button {
|
|
869
|
+
font: 500 var(--sp-ui-label-size)/var(--sp-ui-line-height) var(--sp-ui-font);
|
|
870
|
+
}
|
|
871
|
+
.site-setting-reset.components-button.components-button {
|
|
872
|
+
font: 400 var(--sp-ui-label-size)/var(--sp-ui-line-height) var(--sp-ui-font);
|
|
873
|
+
text-transform: none;
|
|
874
|
+
letter-spacing: normal;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
.site-control-scope > .components-panel__body > .components-base-control:not(:last-child) {
|
|
878
|
+
margin-bottom: calc(var(--sp-ui-space) * 2);
|
|
879
|
+
}
|
package/dist/admin-ui/tokens.css
CHANGED
|
@@ -22,5 +22,9 @@
|
|
|
22
22
|
--sp-ui-control-height: 40px;
|
|
23
23
|
--sp-ui-control-small: 32px;
|
|
24
24
|
--sp-ui-space: 8px;
|
|
25
|
+
--sp-ui-font-size: 13px;
|
|
26
|
+
--sp-ui-font-size-small: 12px;
|
|
27
|
+
--sp-ui-label-size: 11px;
|
|
28
|
+
--sp-ui-line-height: 1.4;
|
|
25
29
|
--sp-ui-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
26
30
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { OrderedInspectorControls } from "../../core/editor/inspector.js";
|
|
3
4
|
import { ResetButton } from "../../core/editor/reset.js";
|
|
4
5
|
import { addStyle, addVariables } from "../../core/editor/add-position.js";
|
|
5
6
|
import { viewClasses } from "../../core/fields/view-classes.js";
|
|
@@ -170,7 +171,7 @@ function FlowColumnEditor({ section, field, palettes, attributes, setAttributes,
|
|
|
170
171
|
] });
|
|
171
172
|
const { children, ...containerProps } = innerProps;
|
|
172
173
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
173
|
-
/* @__PURE__ */ jsx(
|
|
174
|
+
/* @__PURE__ */ jsx(OrderedInspectorControls, { children: /* @__PURE__ */ jsxs(wp.components.PanelBody, { title: `Column ${layout.index + 1}`, children: [
|
|
174
175
|
/* @__PURE__ */ jsx("p", { children: grid ? `Set the column start and width on the ${tracks}-column grid.` : `Rows are arranged automatically. Up to ${field.controlOptions.maxCol} columns per row.` }),
|
|
175
176
|
controls
|
|
176
177
|
] }) }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../components/drag/editor.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\nimport { ResetButton } from '../../core/editor/reset.js';\nimport { addStyle, addVariables } from '../../core/editor/add-position.js';\nimport { viewClasses } from '../../core/fields/view-classes.js';\nimport { MonitorSmartphone, AlignVerticalJustifyCenter, AlignVerticalJustifyStart, AlignVerticalJustifyEnd, AlignHorizontalJustifyStart, AlignHorizontalJustifyCenter, AlignHorizontalJustifyEnd, StretchHorizontal } from 'lucide-react';\nimport {SyncedColumn,SyncArea} from './sync.js';\nimport { useState, useEffect } from 'react';\nimport { EditorAction } from '../../core/ui/editor-action.js';\nimport { flowColumnLayout, flowLayers, flowTracks, flowBreakpoint, resolveFlowTemplate, type Placement } from './layout.js';\nimport { BREAKPOINTS, COLUMN_BREAKPOINT, LAYOUT_BREAKPOINTS } from '../../generated/responsive.js';\nimport { BreakpointIcon, breakpointLabel, breakpointRange, editorBreakpoints, setViewport, setDefaultLayout, useDefaultLayout, useCanvasWidth, useViewport } from '../../admin-ui/viewport.js';\ndeclare const wp: any;\nexport function flowPalettes(field: any) {\n const palettes = field.controlOptions.palettes ?? [];\n return palettes.length ? palettes : [{ name: '', label: 'Column', template: field.controlOptions.dragTemplate ?? [], className: '' }];\n}\nexport function FlowDragEditor(props: {field:any;className?:string}){return props.field.controlOptions?.sync?<SyncedFlowDragEditor {...props}/>:<PlainFlowDragEditor {...props}/>;}\nfunction PlainFlowDragEditor({ field, className }: { field: any; className?: string }) {\n const {name,clientId} = wp.blockEditor.useBlockEditContext();\n const palettes = flowPalettes(field);\n const appender = false;\n const template = palettes.filter((palette:any)=>palette.initial !== false).map((palette:any) => [name+'-column',{\n palette:palette.name,fullRow:palette.fullRow ?? false,metadata:{name:palette.label}\n },resolveFlowTemplate(palette.template ?? [],name,palette.name)]);\n const grid=Number(field.controlOptions.grid)||0,mobileGrid=Number(field.controlOptions.mobileGrid)||grid;\n const tracks=useCanvasWidth()<BREAKPOINTS[COLUMN_BREAKPOINT as keyof typeof BREAKPOINTS]?mobileGrid:grid;\n const {children,...props}=wp.blockEditor.useInnerBlocksProps({'data-toolbar-position':field.controlOptions.toolbarPosition ?? 'top right',className:['site-flow-drag',grid?'has-grid':'',className].filter(Boolean).join(' '),style:{'--site-flow-columns':grid||field.controlOptions.maxCol||2,'--site-flow-mobile-columns':grid?mobileGrid:undefined,'--site-flow-gap':field.controlOptions.gap}},{\n allowedBlocks:[name+'-column'],template,templateInsertUpdatesSelection:false,templateLock:false,renderAppender:appender,\n });\n return <div {...props}>\n <svg className=\"site-record-add-frame site-flow-drag-frame\" aria-hidden=\"true\"><rect rx=\"2\" /></svg>\n <div style={addStyle(field.controlOptions.toolbarPosition)} className=\"site-flow-drag-tools site-inline-tools\" contentEditable={false} onClick={(event:any)=>event.stopPropagation()}>\n <wp.blockEditor.Inserter rootClientId={clientId} isAppender __experimentalIsQuick\n renderToggle={({onToggle,disabled,isOpen}:any)=><EditorAction action=\"addColumn\" label=\"Add column\" aria-expanded={isOpen} disabled={disabled} onClick={onToggle} />} />\n </div>\n {children}\n {grid ? <div className=\"site-flow-guides\" contentEditable={false} aria-hidden=\"true\">{Array.from({length:tracks},(_,index)=><span key={index} />)}</div> : null}\n </div>;\n}\nfunction SyncedDragSource({field}:{field:any}){\n const {name}=wp.blockEditor.useBlockEditContext();\n const template=flowPalettes(field).filter((palette:any)=>palette.initial!==false).map((palette:any)=>[name+'-column',{palette:palette.name,syncArea:palette.syncArea,fullRow:palette.fullRow??false,metadata:{name:palette.label}},resolveFlowTemplate(palette.template??[],name,palette.name)]);\n const props=wp.blockEditor.useInnerBlocksProps({className:'site-sync-source',style:{display:'contents'}},{allowedBlocks:[name+'-column'],template,templateInsertUpdatesSelection:false,templateLock:false,renderAppender:false});\n return <div {...props}/>;\n}\nfunction SyncedFlowDragEditor({field,className}:{field:any;className?:string}){\n const {name,clientId}=wp.blockEditor.useBlockEditContext(),options=field.controlOptions,grid=Number(options.grid)||0,mobileGrid=Number(options.mobileGrid)||grid;\n const tracks=useCanvasWidth()<BREAKPOINTS[COLUMN_BREAKPOINT as keyof typeof BREAKPOINTS]?mobileGrid:grid;\n return <>\n {options.syncPrimary&&<SyncedDragSource field={field}/>}\n <SyncArea group={String(options.sync)} name={field.name} toolbarPosition={options.toolbarPosition??'top right'} className={['site-flow-drag',grid?'has-grid':'',className].filter(Boolean).join(' ')} style={{'--site-flow-columns':grid||options.maxCol||2,'--site-flow-mobile-columns':grid?mobileGrid:undefined,'--site-flow-gap':options.gap} as any}>\n <svg className=\"site-record-add-frame site-flow-drag-frame\" aria-hidden=\"true\"><rect rx=\"2\"/></svg>\n <div style={addStyle(options.toolbarPosition)} className=\"site-flow-drag-tools site-inline-tools\" contentEditable={false} onClick={(event:any)=>event.stopPropagation()}>\n <EditorAction action=\"addColumn\" label=\"Add column\" onClick={()=>wp.data.dispatch('core/block-editor').insertBlocks(wp.blocks.createBlock(name+'-column',{palette:'',syncArea:field.name}),undefined,clientId)}/>\n </div>\n {grid?<div className=\"site-flow-guides\" contentEditable={false} aria-hidden=\"true\">{Array.from({length:tracks},(_,index)=><span key={index}/>)}</div>:null}\n </SyncArea>\n </>;\n}\nexport function registerFlowColumn(section:any,field:any) {\n const palettes=flowPalettes(field);\n wp.blocks.registerBlockType(section.name+'-column',{\n apiVersion:3,title:'Content column',category:'site',icon:'columns',parent:[section.name],\n attributes:{syncArea:{type:'string'},syncId:{type:'string'},palette:{type:'string',default:palettes[0].name},start:{type:'number',default:0},span:{type:'number',default:0},responsive:{type:'object',default:{}},fullRow:{type:'boolean',default:false},verticalAlign:{type:'string',enum:['top','center','bottom'],default:'top'},horizontalAlign:{type:'string',enum:['stretch','left','center','right'],default:'stretch'}},\n supports:{html:false,reusable:false},\n variations:[{name:'columns',title:'Columns',icon:'columns',isDefault:true,isActive:(attrs:any)=>attrs.palette==='',scope:['inserter','block'],\n attributes:{palette:'',metadata:{name:'Columns'}},innerBlocks:[]}],\n edit: ({attributes,setAttributes,clientId}:any) => <FlowColumnEditor section={section} field={field} palettes={palettes} attributes={attributes} setAttributes={setAttributes} clientId={clientId} />,\n save:()=> <wp.blockEditor.InnerBlocks.Content />,\n });\n}\nfunction FlowColumnEditor({section,field,palettes,attributes,setAttributes,clientId}:any) {\n useEffect(()=>{if(field.controlOptions.sync&&!attributes.syncId)setAttributes({syncId:clientId});},[field.controlOptions.sync,attributes.syncId,clientId]);\n const palette=attributes.palette===''?{name:'',label:'Columns',className:'',buttonPosition:'bottom center'}:palettes.find((item:any)=>item.name===attributes.palette)??palettes[0];\n const layout=wp.data.useSelect((select:any)=>{\n const store=select('core/block-editor'),parent=store.getBlockRootClientId(clientId);\n const siblings=store.getBlocks(parent).filter((block:any)=>block.name===section.name+'-column');\n return {index:siblings.findIndex((block:any)=>block.clientId===clientId),empty:store.getBlockCount(clientId)===0};\n },[clientId]);\n const appender = wp.blockEditor.InnerBlocks.ButtonBlockAppender;\n const grid=Number(field.controlOptions.grid)||0,maxCol=Number(field.controlOptions.maxCol)||2,mobileGrid=Number(field.controlOptions.mobileGrid)||grid;\n const names=[...LAYOUT_BREAKPOINTS];\n const selected=useViewport(),defaultLayout=useDefaultLayout();\n const canvasWidth=useCanvasWidth();\n const chosen=defaultLayout?null:selected??(canvasWidth?flowBreakpoint(canvasWidth,BREAKPOINTS,names):null);\n // Fit window previews and edits the real canvas range. Only explicit Default mode suppresses overrides.\n const columnLayout=flowColumnLayout(grid,defaultLayout?{...attributes,responsive:{}}:attributes,palette,maxCol,COLUMN_BREAKPOINT,names,mobileGrid);\n const layers=flowLayers(grid,attributes,palette,maxCol,COLUMN_BREAKPOINT,names,mobileGrid);\n // The layer an edit writes to: `default` or the chosen breakpoint.\n const target=grid?chosen??'default':null;\n const tracks=chosen?flowTracks(grid,mobileGrid,COLUMN_BREAKPOINT,names,chosen):grid;\n const resizable=Boolean(target&&(chosen||canvasWidth>=BREAKPOINTS[COLUMN_BREAKPOINT as keyof typeof BREAKPOINTS]));\n const aboveBase=(name:string)=>names.indexOf(name)>=names.indexOf(COLUMN_BREAKPOINT);\n const responsive:Record<string,Placement>=attributes.responsive??{};\n const adaptive=editorBreakpoints.filter(name=>responsive[name]);\n // A breakpoint without a placement of its own uses the default from the columns breakpoint up and spans the row below it.\n const inherited=chosen&&!layers[chosen]&&aboveBase(chosen)?'default':undefined;\n const placement=target?layers[target]??(inherited?layers.default:{start:1,span:tracks}):null;\n const place=(value:{start:number;span:number})=>{\n if(!target)return;\n if(target==='default')setAttributes({...value,fullRow:false});\n else setAttributes({fullRow:false,responsive:{...responsive,[target]:{...responsive[target],...value}}});\n };\n const alignment=chosen?{...attributes,...responsive[chosen]}:attributes;\n const align=(value:Placement)=>chosen?setAttributes({responsive:{...responsive,[chosen]:{...responsive[chosen],...value}}}):setAttributes(value);\n const reset=()=>{const {[target as string]:_removed,...rest}=responsive;setAttributes({responsive:rest});};\n const blockProps=wp.blockEditor.useBlockProps({style:{...columnLayout.style,...addVariables(palette.buttonPosition),'--site-flow-color':columnColors[Math.max(0,layout.index)%columnColors.length]},'data-site-add-positioned':Boolean(addStyle(palette.buttonPosition))||undefined,'data-button-position':palette.buttonPosition??'bottom right','data-vertical-align':attributes.verticalAlign??'top','data-horizontal-align':attributes.horizontalAlign??'stretch',className:['site-flow-column',layout.empty?'is-empty':'',attributes.fullRow?'is-full-row':'',...columnLayout.classes,viewClasses(palette, true)].filter(Boolean).join(' ')});\n const innerProps=wp.blockEditor.useInnerBlocksProps(blockProps,{\n allowedBlocks:[section.name+'-element',...(field.controlOptions.sync?(field.controlOptions.palettes??[]).map((item:any)=>section.name+'-'+item.name+'-element'):[]),...(field.controlOptions.allow??[])],templateLock:false,renderAppender:appender,templateInsertUpdatesSelection:false,\n });\n const fullRow=Boolean(attributes.fullRow);\n const setFullRow=(value:boolean)=>setAttributes({fullRow:value});\n const controls = <>\n {field.controlOptions.sync&&<wp.components.SelectControl label=\"Area\" help=\"One shared column. Choose its area for this screen range.\" value={chosen?(attributes.responsive?.[chosen]?.syncArea??''):(attributes.syncArea??palette.syncArea??field.controlOptions.syncAreas[0]?.name)} options={[...(chosen?[{label:'Default area',value:''}]:[]),...field.controlOptions.syncAreas.map((area:any)=>({label:area.label,value:area.name}))]} onChange={(syncArea:string)=>chosen?setAttributes({responsive:{...responsive,[chosen]:{...responsive[chosen],syncArea:syncArea||undefined}}}):setAttributes({syncArea})}/> }\n <wp.components.ToggleControl label=\"Full row\" checked={fullRow} onChange={setFullRow} />\n {grid && !fullRow ? <ColumnLayout grid={tracks} target={target} isDefault={!chosen} placement={placement} inherited={inherited} own={!chosen||Boolean(chosen&&responsive[chosen])}\n placed={adaptive} color={columnColors[Math.max(0,layout.index)%columnColors.length]} onPlace={place} onReset={chosen&&responsive[chosen]?reset:undefined} /> : null}\n <AlignmentButtons label=\"Vertical alignment\" value={alignment.verticalAlign??'top'} options={[\n {value:'top',label:'Top',Icon:AlignVerticalJustifyStart},\n {value:'center',label:'Center',Icon:AlignVerticalJustifyCenter},\n {value:'bottom',label:'Bottom',Icon:AlignVerticalJustifyEnd},\n ]} onChange={(verticalAlign:string)=>align({verticalAlign})} />\n <AlignmentButtons label=\"Horizontal alignment\" value={alignment.horizontalAlign??'stretch'} options={[\n {value:'left',label:'Left',Icon:AlignHorizontalJustifyStart},\n {value:'center',label:'Center',Icon:AlignHorizontalJustifyCenter},\n {value:'right',label:'Right',Icon:AlignHorizontalJustifyEnd},\n {value:'stretch',label:'Stretch',Icon:StretchHorizontal},\n ]} onChange={(horizontalAlign:string)=>align({horizontalAlign})} />\n\n </>;\n const {children,...containerProps}=innerProps;\n const content=<>\n <wp.blockEditor.InspectorControls><wp.components.PanelBody title={`Column ${layout.index+1}`}>\n <p>{grid?`Set the column start and width on the ${tracks}-column grid.`:`Rows are arranged automatically. Up to ${field.controlOptions.maxCol} columns per row.`}</p>\n {controls}\n </wp.components.PanelBody></wp.blockEditor.InspectorControls>\n <div {...containerProps}>\n <svg className=\"site-record-add-frame site-flow-column-frame\" aria-hidden=\"true\"><rect rx=\"2\" /></svg>\n {grid && target && resizable && !fullRow ? <>\n <span className=\"site-flow-resize is-start\" contentEditable={false} aria-hidden=\"true\" onPointerDown={(event:any)=>resizeColumn(event,'start',tracks,target,place)} />\n <span className=\"site-flow-resize is-end\" contentEditable={false} aria-hidden=\"true\" onPointerDown={(event:any)=>resizeColumn(event,'end',tracks,target,place)} />\n </> : null}\n {children}\n </div>\n </>;\n return field.controlOptions.sync?<SyncedColumn group={String(field.controlOptions.sync)} column={attributes} palette={palette} areas={field.controlOptions.syncAreas} index={layout.index} editor>{content}</SyncedColumn>:content;\n}\n\n/** Each column has its own outline colour, so neighbours are easy to tell apart. */\nconst columnColors=['#3858e9','#d9480f','#7c3aed','#0b8a7a','#c2255c','#a16207'];\n/** Grid lines of the Drag container, measured from its rendered tracks; the middle of a gap counts as the line. */\nfunction gridLines(container: HTMLElement, grid: number) {\n const style=getComputedStyle(container);\n const tracks=style.gridTemplateColumns.split(' ').map(parseFloat);\n if(tracks.length!==grid||tracks.some(Number.isNaN))return null;\n const gap=parseFloat(style.columnGap)||0;\n let x=container.getBoundingClientRect().left+(parseFloat(style.borderLeftWidth)||0)+(parseFloat(style.paddingLeft)||0);\n const lines=[x];\n tracks.forEach((track,index)=>{x+=track;lines.push(index<grid-1?x+gap/2:x);x+=gap;});\n return lines;\n}\nconst nearestLine=(lines:number[],x:number)=>lines.reduce((best,line,index)=>Math.abs(line-x)<Math.abs(lines[best]-x)?index:best,0)+1;\n/** Drags one edge to a grid line; the column previews through CSS variables and saves once on release. */\nfunction resizeColumn(event: any, edge: 'start' | 'end', grid: number, breakpoint: string, place: (value: { start: number; span: number }) => void) {\n const handle=event.currentTarget as HTMLElement,column=handle.closest('.site-flow-column') as HTMLElement|null,container=column?.closest('.site-flow-drag') as HTMLElement|null;\n const lines=column&&container?gridLines(container,grid):null;\n if(!column||!container||!lines||event.button!==0)return;\n event.preventDefault();event.stopPropagation();\n const peers=container.dataset.siteDragSync?Array.from(container.closest('section')?.querySelectorAll<HTMLElement>('[data-site-drag-sync]')??[]).filter(node=>node.dataset.siteDragSync===container.dataset.siteDragSync):[container];\n const box=column.getBoundingClientRect();\n const pointerOffset=event.clientX-(edge==='start'?box.left:box.right);\n let start=nearestLine(lines,box.left),end=Math.max(start+1,nearestLine(lines,box.right));\n const initial=[start,end].join(),startVar=`--site-col-${breakpoint}-start`,spanVar=`--site-col-${breakpoint}-span`;\n const before={placed:column.classList.contains('site-col-at-'+breakpoint),full:column.classList.contains('is-full-row'),start:column.style.getPropertyValue(startVar),span:column.style.getPropertyValue(spanVar)};\n const preview=()=>{\n column.style.setProperty(startVar,String(start));column.style.setProperty(spanVar,String(end-start));\n handle.dataset.span=`${end-start} / ${grid}`;\n };\n column.classList.remove('is-full-row');column.classList.add('is-resizing','site-col-at-'+breakpoint);peers.forEach(node=>node.classList.add('is-resizing'));handle.classList.add('is-active');preview();\n handle.setPointerCapture(event.pointerId);\n const move=(next:PointerEvent)=>{\n const line=nearestLine(lines,next.clientX-pointerOffset);\n if(edge==='start')start=Math.min(line,end-1);else end=Math.max(line,start+1);\n preview();\n };\n const stop=()=>{\n handle.removeEventListener('pointermove',move);handle.removeEventListener('pointerup',stop);handle.removeEventListener('pointercancel',stop);\n peers.forEach(node=>node.classList.remove('is-resizing'));column.classList.remove('is-resizing');handle.classList.remove('is-active');\n // React rewrites the class and the variables from the saved placement on the next render.\n if([start,end].join()!==initial)return place({start,span:end-start});\n // Released without a change: put back what React rendered.\n column.classList.toggle('site-col-at-'+breakpoint,before.placed);column.classList.toggle('is-full-row',before.full);\n for(const [name,value] of [[startVar,before.start],[spanVar,before.span]])value?column.style.setProperty(name,value):column.style.removeProperty(name);\n };\n handle.addEventListener('pointermove',move);handle.addEventListener('pointerup',stop);handle.addEventListener('pointercancel',stop);\n}\n\n/**\n * Column placement for one breakpoint: device tabs (a dot marks an own placement), a strip of the grid tracks\n * where dragging across cells sets start and width, and the exact numbers below it.\n */\nfunction ColumnLayout({grid,target,isDefault,placement,inherited,own,placed,color,onPlace,onReset}:{grid:number;target:string|null;isDefault:boolean;placement:{start:number;span:number}|null;inherited?:string;own:boolean;placed:string[];color:string;onPlace:(value:{start:number;span:number})=>void;onReset?:()=>void}) {\n const [range,setRange]=useState<[number,number]|null>(null);\n const start=placement?.start||1,end=start+(placement?.span??grid)-1;\n const shown=range?[Math.min(...range),Math.max(...range)]:[start,end];\n const select=(event:any,cell:number)=>{\n if(event.type==='pointerdown'){event.currentTarget.setPointerCapture(event.pointerId);setRange([cell,cell]);}\n else if(range&&event.buttons===1)setRange([range[0],cell]);\n };\n const finish=()=>{if(!range)return;const [from,to]=[Math.min(...range),Math.max(...range)];setRange(null);onPlace({start:from,span:to-from+1});};\n const cellAt=(event:any)=>{const box=event.currentTarget.getBoundingClientRect();return Math.min(grid,Math.max(1,Math.floor((event.clientX-box.left)/box.width*grid)+1));};\n const { __experimentalNumberControl: NumberControl } = wp.components;\n return <div className=\"site-flow-layout\" style={{'--site-flow-color':color} as any}>\n <div className=\"site-flow-layout-tabs\" role=\"tablist\" aria-label=\"Breakpoint\">\n <button type=\"button\" role=\"tab\" aria-selected={isDefault} className=\"has-own\" title={`Default \u00B7 from ${breakpointLabel(COLUMN_BREAKPOINT)} up, wherever a breakpoint has no layout of its own`} onClick={()=>setDefaultLayout()}><MonitorSmartphone size={20} strokeWidth={1.5} aria-hidden=\"true\" /></button>\n {editorBreakpoints.map(name=>{const width=BREAKPOINTS[name as keyof typeof BREAKPOINTS];return <button key={name} type=\"button\" role=\"tab\" aria-selected={!isDefault&&name===target}\n className={placed.includes(name)?'has-own':undefined} title={`${breakpointLabel(name)} \u00B7 ${breakpointRange(name)}`} onClick={()=>setViewport(name)}><BreakpointIcon value={width} /></button>;})}\n </div>\n {target&&placement?<>\n <div className=\"site-flow-layout-head\">\n <strong>{isDefault?'Default':breakpointLabel(target)}</strong><span>{isDefault?`${BREAKPOINTS[COLUMN_BREAKPOINT as keyof typeof BREAKPOINTS]}px and up`:breakpointRange(target)}</span>\n {onReset?<ResetButton onClick={onReset} label=\"Reset layout for this breakpoint\" />:null}\n </div>\n <p className=\"site-flow-layout-state\">{isDefault?`Applies from ${breakpointLabel(COLUMN_BREAKPOINT)} up wherever a breakpoint has no layout of its own; narrower, the column spans the row.`:own?'Own layout for this screen range only.':inherited?'Uses the default. A change applies to this screen range only.':'Spans the row. A change applies to this screen range only.'}</p>\n <div className={'site-flow-layout-grid'+(own?'':' is-inherited')+(placement.start?'':' is-auto')} style={{gridTemplateColumns:`repeat(${grid},1fr)`}}\n onPointerDown={(event)=>select(event,cellAt(event))} onPointerMove={(event)=>select(event,cellAt(event))} onPointerUp={finish} onPointerCancel={()=>setRange(null)}\n role=\"img\" aria-label={`Columns ${shown[0]} to ${shown[1]} of ${grid}`}>\n {Array.from({length:grid},(_,index)=><span key={index} className={index+1>=shown[0]&&index+1<=shown[1]?'is-on':undefined} />)}\n </div>\n <p className=\"site-flow-layout-hint\">Drag across the cells to place the column.</p>\n <div className=\"site-flow-layout-numbers\">\n <NumberControl label=\"Start\" min={1} max={grid-placement.span+1} value={placement.start||''} placeholder=\"Auto\" spinControls=\"custom\" __next40pxDefaultSize\n onChange={(value:string)=>onPlace({start:value===''?0:Math.min(grid-placement.span+1,Math.max(1,Number(value))),span:placement.span})} />\n <NumberControl label=\"Width\" min={1} max={grid} value={placement.span} spinControls=\"custom\" __next40pxDefaultSize\n onChange={(value:string)=>{const span=Math.min(grid,Math.max(1,Number(value)||1));onPlace({span,start:placement.start?Math.min(placement.start,grid-span+1):0});}} />\n </div>\n </>:<p className=\"site-flow-layout-state\">Below the first breakpoint the column spans the row.</p>}\n </div>;\n}\n\nfunction AlignmentButtons({label,value,options,onChange}:any) {\n return <fieldset className=\"site-flow-alignment\">\n <legend>{label}</legend>\n <div className=\"site-flow-alignment-options\" role=\"group\" aria-label={label}>\n {options.map(({value:option,label:optionLabel,Icon}:any)=><wp.components.Button\n key={option} label={optionLabel} aria-label={`${label}: ${optionLabel}`}\n aria-pressed={value===option} isPressed={value===option}\n onClick={()=>onChange(option)}><Icon size={20} strokeWidth={1.75} aria-hidden=\"true\" /></wp.components.Button>)}\n </div>\n </fieldset>;\n}\n"],
|
|
5
|
-
"mappings": ";AAgB6G,SAgClG,UAhCkG,KAalG,YAbkG;AAf7G,SAAS,mBAAmB;AAC5B,SAAS,UAAU,oBAAoB;AACvC,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB,4BAA4B,2BAA2B,yBAAyB,6BAA6B,8BAA8B,2BAA2B,yBAAyB;AAC3N,SAAQ,cAAa,gBAAe;AACpC,SAAS,UAAU,iBAAiB;AACpC,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB,YAAY,YAAY,gBAAgB,2BAA2C;AAC9G,SAAS,aAAa,mBAAmB,0BAA0B;AACnE,SAAS,gBAAgB,iBAAiB,iBAAiB,mBAAmB,aAAa,kBAAkB,kBAAkB,gBAAgB,mBAAmB;AAE3J,SAAS,aAAa,OAAY;AACrC,QAAM,WAAW,MAAM,eAAe,YAAY,CAAC;AACnD,SAAO,SAAS,SAAS,WAAW,CAAC,EAAE,MAAM,IAAI,OAAO,UAAU,UAAU,MAAM,eAAe,gBAAgB,CAAC,GAAG,WAAW,GAAG,CAAC;AACxI;AACO,SAAS,eAAe,OAAqC;AAAC,SAAO,MAAM,MAAM,gBAAgB,OAAK,oBAAC,wBAAsB,GAAG,OAA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C;AAAA;AAAA,QAAG;AAAA,QAC3I;AAAA,UAAC;AAAA;AAAA,YAAc,OAAM;AAAA,YAAQ,KAAK;AAAA,YAAG,KAAK;AAAA,YAAM,OAAO,UAAU;AAAA,YAAM,cAAa;AAAA,YAAS,uBAAqB;AAAA,YAC9G,UAAU,CAAC,UAAe;AAAC,oBAAM,OAAK,KAAK,IAAI,MAAK,KAAK,IAAI,GAAE,OAAO,KAAK,KAAG,CAAC,CAAC;AAAE,sBAAQ,EAAC,MAAK,OAAM,UAAU,QAAM,KAAK,IAAI,UAAU,OAAM,OAAK,OAAK,CAAC,IAAE,EAAC,CAAC;AAAA,YAAE;AAAA;AAAA,QAAG;AAAA,SAC3K;AAAA,OACJ,IAAI,oBAAC,OAAE,WAAU,0BAAyB,kEAAoD;AAAA,KAClG;AACJ;AAEA,SAAS,iBAAiB,EAAC,OAAM,OAAM,SAAQ,SAAQ,GAAO;AAC1D,SAAO,qBAAC,cAAS,WAAU,uBACvB;AAAA,wBAAC,YAAQ,iBAAM;AAAA,IACf,oBAAC,SAAI,WAAU,+BAA8B,MAAK,SAAQ,cAAY,OACjE,kBAAQ,IAAI,CAAC,EAAC,OAAM,QAAO,OAAM,aAAY,KAAI,MAAQ;AAAA,MAAC,GAAG,WAAW;AAAA,MAAd;AAAA,QAC1C,OAAO;AAAA,QAAa,cAAY,GAAG,KAAK,KAAK,WAAW;AAAA,QACrE,gBAAc,UAAQ;AAAA,QAAQ,WAAW,UAAQ;AAAA,QACjD,SAAS,MAAI,SAAS,MAAM;AAAA,QAAG,8BAAC,QAAK,MAAM,IAAI,aAAa,MAAM,eAAY,QAAO;AAAA;AAAA,MAFhF;AAAA,IAEkF,CAAuB,GACtH;AAAA,KACJ;AACJ;",
|
|
4
|
+
"sourcesContent": ["'use client';\nimport { OrderedInspectorControls } from '../../core/editor/inspector.js';\nimport { ResetButton } from '../../core/editor/reset.js';\nimport { addStyle, addVariables } from '../../core/editor/add-position.js';\nimport { viewClasses } from '../../core/fields/view-classes.js';\nimport { MonitorSmartphone, AlignVerticalJustifyCenter, AlignVerticalJustifyStart, AlignVerticalJustifyEnd, AlignHorizontalJustifyStart, AlignHorizontalJustifyCenter, AlignHorizontalJustifyEnd, StretchHorizontal } from 'lucide-react';\nimport {SyncedColumn,SyncArea} from './sync.js';\nimport { useState, useEffect } from 'react';\nimport { EditorAction } from '../../core/ui/editor-action.js';\nimport { flowColumnLayout, flowLayers, flowTracks, flowBreakpoint, resolveFlowTemplate, type Placement } from './layout.js';\nimport { BREAKPOINTS, COLUMN_BREAKPOINT, LAYOUT_BREAKPOINTS } from '../../generated/responsive.js';\nimport { BreakpointIcon, breakpointLabel, breakpointRange, editorBreakpoints, setViewport, setDefaultLayout, useDefaultLayout, useCanvasWidth, useViewport } from '../../admin-ui/viewport.js';\ndeclare const wp: any;\nexport function flowPalettes(field: any) {\n const palettes = field.controlOptions.palettes ?? [];\n return palettes.length ? palettes : [{ name: '', label: 'Column', template: field.controlOptions.dragTemplate ?? [], className: '' }];\n}\nexport function FlowDragEditor(props: {field:any;className?:string}){return props.field.controlOptions?.sync?<SyncedFlowDragEditor {...props}/>:<PlainFlowDragEditor {...props}/>;}\nfunction PlainFlowDragEditor({ field, className }: { field: any; className?: string }) {\n const {name,clientId} = wp.blockEditor.useBlockEditContext();\n const palettes = flowPalettes(field);\n const appender = false;\n const template = palettes.filter((palette:any)=>palette.initial !== false).map((palette:any) => [name+'-column',{\n palette:palette.name,fullRow:palette.fullRow ?? false,metadata:{name:palette.label}\n },resolveFlowTemplate(palette.template ?? [],name,palette.name)]);\n const grid=Number(field.controlOptions.grid)||0,mobileGrid=Number(field.controlOptions.mobileGrid)||grid;\n const tracks=useCanvasWidth()<BREAKPOINTS[COLUMN_BREAKPOINT as keyof typeof BREAKPOINTS]?mobileGrid:grid;\n const {children,...props}=wp.blockEditor.useInnerBlocksProps({'data-toolbar-position':field.controlOptions.toolbarPosition ?? 'top right',className:['site-flow-drag',grid?'has-grid':'',className].filter(Boolean).join(' '),style:{'--site-flow-columns':grid||field.controlOptions.maxCol||2,'--site-flow-mobile-columns':grid?mobileGrid:undefined,'--site-flow-gap':field.controlOptions.gap}},{\n allowedBlocks:[name+'-column'],template,templateInsertUpdatesSelection:false,templateLock:false,renderAppender:appender,\n });\n return <div {...props}>\n <svg className=\"site-record-add-frame site-flow-drag-frame\" aria-hidden=\"true\"><rect rx=\"2\" /></svg>\n <div style={addStyle(field.controlOptions.toolbarPosition)} className=\"site-flow-drag-tools site-inline-tools\" contentEditable={false} onClick={(event:any)=>event.stopPropagation()}>\n <wp.blockEditor.Inserter rootClientId={clientId} isAppender __experimentalIsQuick\n renderToggle={({onToggle,disabled,isOpen}:any)=><EditorAction action=\"addColumn\" label=\"Add column\" aria-expanded={isOpen} disabled={disabled} onClick={onToggle} />} />\n </div>\n {children}\n {grid ? <div className=\"site-flow-guides\" contentEditable={false} aria-hidden=\"true\">{Array.from({length:tracks},(_,index)=><span key={index} />)}</div> : null}\n </div>;\n}\nfunction SyncedDragSource({field}:{field:any}){\n const {name}=wp.blockEditor.useBlockEditContext();\n const template=flowPalettes(field).filter((palette:any)=>palette.initial!==false).map((palette:any)=>[name+'-column',{palette:palette.name,syncArea:palette.syncArea,fullRow:palette.fullRow??false,metadata:{name:palette.label}},resolveFlowTemplate(palette.template??[],name,palette.name)]);\n const props=wp.blockEditor.useInnerBlocksProps({className:'site-sync-source',style:{display:'contents'}},{allowedBlocks:[name+'-column'],template,templateInsertUpdatesSelection:false,templateLock:false,renderAppender:false});\n return <div {...props}/>;\n}\nfunction SyncedFlowDragEditor({field,className}:{field:any;className?:string}){\n const {name,clientId}=wp.blockEditor.useBlockEditContext(),options=field.controlOptions,grid=Number(options.grid)||0,mobileGrid=Number(options.mobileGrid)||grid;\n const tracks=useCanvasWidth()<BREAKPOINTS[COLUMN_BREAKPOINT as keyof typeof BREAKPOINTS]?mobileGrid:grid;\n return <>\n {options.syncPrimary&&<SyncedDragSource field={field}/>}\n <SyncArea group={String(options.sync)} name={field.name} toolbarPosition={options.toolbarPosition??'top right'} className={['site-flow-drag',grid?'has-grid':'',className].filter(Boolean).join(' ')} style={{'--site-flow-columns':grid||options.maxCol||2,'--site-flow-mobile-columns':grid?mobileGrid:undefined,'--site-flow-gap':options.gap} as any}>\n <svg className=\"site-record-add-frame site-flow-drag-frame\" aria-hidden=\"true\"><rect rx=\"2\"/></svg>\n <div style={addStyle(options.toolbarPosition)} className=\"site-flow-drag-tools site-inline-tools\" contentEditable={false} onClick={(event:any)=>event.stopPropagation()}>\n <EditorAction action=\"addColumn\" label=\"Add column\" onClick={()=>wp.data.dispatch('core/block-editor').insertBlocks(wp.blocks.createBlock(name+'-column',{palette:'',syncArea:field.name}),undefined,clientId)}/>\n </div>\n {grid?<div className=\"site-flow-guides\" contentEditable={false} aria-hidden=\"true\">{Array.from({length:tracks},(_,index)=><span key={index}/>)}</div>:null}\n </SyncArea>\n </>;\n}\nexport function registerFlowColumn(section:any,field:any) {\n const palettes=flowPalettes(field);\n wp.blocks.registerBlockType(section.name+'-column',{\n apiVersion:3,title:'Content column',category:'site',icon:'columns',parent:[section.name],\n attributes:{syncArea:{type:'string'},syncId:{type:'string'},palette:{type:'string',default:palettes[0].name},start:{type:'number',default:0},span:{type:'number',default:0},responsive:{type:'object',default:{}},fullRow:{type:'boolean',default:false},verticalAlign:{type:'string',enum:['top','center','bottom'],default:'top'},horizontalAlign:{type:'string',enum:['stretch','left','center','right'],default:'stretch'}},\n supports:{html:false,reusable:false},\n variations:[{name:'columns',title:'Columns',icon:'columns',isDefault:true,isActive:(attrs:any)=>attrs.palette==='',scope:['inserter','block'],\n attributes:{palette:'',metadata:{name:'Columns'}},innerBlocks:[]}],\n edit: ({attributes,setAttributes,clientId}:any) => <FlowColumnEditor section={section} field={field} palettes={palettes} attributes={attributes} setAttributes={setAttributes} clientId={clientId} />,\n save:()=> <wp.blockEditor.InnerBlocks.Content />,\n });\n}\nfunction FlowColumnEditor({section,field,palettes,attributes,setAttributes,clientId}:any) {\n useEffect(()=>{if(field.controlOptions.sync&&!attributes.syncId)setAttributes({syncId:clientId});},[field.controlOptions.sync,attributes.syncId,clientId]);\n const palette=attributes.palette===''?{name:'',label:'Columns',className:'',buttonPosition:'bottom center'}:palettes.find((item:any)=>item.name===attributes.palette)??palettes[0];\n const layout=wp.data.useSelect((select:any)=>{\n const store=select('core/block-editor'),parent=store.getBlockRootClientId(clientId);\n const siblings=store.getBlocks(parent).filter((block:any)=>block.name===section.name+'-column');\n return {index:siblings.findIndex((block:any)=>block.clientId===clientId),empty:store.getBlockCount(clientId)===0};\n },[clientId]);\n const appender = wp.blockEditor.InnerBlocks.ButtonBlockAppender;\n const grid=Number(field.controlOptions.grid)||0,maxCol=Number(field.controlOptions.maxCol)||2,mobileGrid=Number(field.controlOptions.mobileGrid)||grid;\n const names=[...LAYOUT_BREAKPOINTS];\n const selected=useViewport(),defaultLayout=useDefaultLayout();\n const canvasWidth=useCanvasWidth();\n const chosen=defaultLayout?null:selected??(canvasWidth?flowBreakpoint(canvasWidth,BREAKPOINTS,names):null);\n // Fit window previews and edits the real canvas range. Only explicit Default mode suppresses overrides.\n const columnLayout=flowColumnLayout(grid,defaultLayout?{...attributes,responsive:{}}:attributes,palette,maxCol,COLUMN_BREAKPOINT,names,mobileGrid);\n const layers=flowLayers(grid,attributes,palette,maxCol,COLUMN_BREAKPOINT,names,mobileGrid);\n // The layer an edit writes to: `default` or the chosen breakpoint.\n const target=grid?chosen??'default':null;\n const tracks=chosen?flowTracks(grid,mobileGrid,COLUMN_BREAKPOINT,names,chosen):grid;\n const resizable=Boolean(target&&(chosen||canvasWidth>=BREAKPOINTS[COLUMN_BREAKPOINT as keyof typeof BREAKPOINTS]));\n const aboveBase=(name:string)=>names.indexOf(name)>=names.indexOf(COLUMN_BREAKPOINT);\n const responsive:Record<string,Placement>=attributes.responsive??{};\n const adaptive=editorBreakpoints.filter(name=>responsive[name]);\n // A breakpoint without a placement of its own uses the default from the columns breakpoint up and spans the row below it.\n const inherited=chosen&&!layers[chosen]&&aboveBase(chosen)?'default':undefined;\n const placement=target?layers[target]??(inherited?layers.default:{start:1,span:tracks}):null;\n const place=(value:{start:number;span:number})=>{\n if(!target)return;\n if(target==='default')setAttributes({...value,fullRow:false});\n else setAttributes({fullRow:false,responsive:{...responsive,[target]:{...responsive[target],...value}}});\n };\n const alignment=chosen?{...attributes,...responsive[chosen]}:attributes;\n const align=(value:Placement)=>chosen?setAttributes({responsive:{...responsive,[chosen]:{...responsive[chosen],...value}}}):setAttributes(value);\n const reset=()=>{const {[target as string]:_removed,...rest}=responsive;setAttributes({responsive:rest});};\n const blockProps=wp.blockEditor.useBlockProps({style:{...columnLayout.style,...addVariables(palette.buttonPosition),'--site-flow-color':columnColors[Math.max(0,layout.index)%columnColors.length]},'data-site-add-positioned':Boolean(addStyle(palette.buttonPosition))||undefined,'data-button-position':palette.buttonPosition??'bottom right','data-vertical-align':attributes.verticalAlign??'top','data-horizontal-align':attributes.horizontalAlign??'stretch',className:['site-flow-column',layout.empty?'is-empty':'',attributes.fullRow?'is-full-row':'',...columnLayout.classes,viewClasses(palette, true)].filter(Boolean).join(' ')});\n const innerProps=wp.blockEditor.useInnerBlocksProps(blockProps,{\n allowedBlocks:[section.name+'-element',...(field.controlOptions.sync?(field.controlOptions.palettes??[]).map((item:any)=>section.name+'-'+item.name+'-element'):[]),...(field.controlOptions.allow??[])],templateLock:false,renderAppender:appender,templateInsertUpdatesSelection:false,\n });\n const fullRow=Boolean(attributes.fullRow);\n const setFullRow=(value:boolean)=>setAttributes({fullRow:value});\n const controls = <>\n {field.controlOptions.sync&&<wp.components.SelectControl label=\"Area\" help=\"One shared column. Choose its area for this screen range.\" value={chosen?(attributes.responsive?.[chosen]?.syncArea??''):(attributes.syncArea??palette.syncArea??field.controlOptions.syncAreas[0]?.name)} options={[...(chosen?[{label:'Default area',value:''}]:[]),...field.controlOptions.syncAreas.map((area:any)=>({label:area.label,value:area.name}))]} onChange={(syncArea:string)=>chosen?setAttributes({responsive:{...responsive,[chosen]:{...responsive[chosen],syncArea:syncArea||undefined}}}):setAttributes({syncArea})}/> }\n <wp.components.ToggleControl label=\"Full row\" checked={fullRow} onChange={setFullRow} />\n {grid && !fullRow ? <ColumnLayout grid={tracks} target={target} isDefault={!chosen} placement={placement} inherited={inherited} own={!chosen||Boolean(chosen&&responsive[chosen])}\n placed={adaptive} color={columnColors[Math.max(0,layout.index)%columnColors.length]} onPlace={place} onReset={chosen&&responsive[chosen]?reset:undefined} /> : null}\n <AlignmentButtons label=\"Vertical alignment\" value={alignment.verticalAlign??'top'} options={[\n {value:'top',label:'Top',Icon:AlignVerticalJustifyStart},\n {value:'center',label:'Center',Icon:AlignVerticalJustifyCenter},\n {value:'bottom',label:'Bottom',Icon:AlignVerticalJustifyEnd},\n ]} onChange={(verticalAlign:string)=>align({verticalAlign})} />\n <AlignmentButtons label=\"Horizontal alignment\" value={alignment.horizontalAlign??'stretch'} options={[\n {value:'left',label:'Left',Icon:AlignHorizontalJustifyStart},\n {value:'center',label:'Center',Icon:AlignHorizontalJustifyCenter},\n {value:'right',label:'Right',Icon:AlignHorizontalJustifyEnd},\n {value:'stretch',label:'Stretch',Icon:StretchHorizontal},\n ]} onChange={(horizontalAlign:string)=>align({horizontalAlign})} />\n\n </>;\n const {children,...containerProps}=innerProps;\n const content=<>\n <OrderedInspectorControls><wp.components.PanelBody title={`Column ${layout.index+1}`}>\n <p>{grid?`Set the column start and width on the ${tracks}-column grid.`:`Rows are arranged automatically. Up to ${field.controlOptions.maxCol} columns per row.`}</p>\n {controls}\n </wp.components.PanelBody></OrderedInspectorControls>\n <div {...containerProps}>\n <svg className=\"site-record-add-frame site-flow-column-frame\" aria-hidden=\"true\"><rect rx=\"2\" /></svg>\n {grid && target && resizable && !fullRow ? <>\n <span className=\"site-flow-resize is-start\" contentEditable={false} aria-hidden=\"true\" onPointerDown={(event:any)=>resizeColumn(event,'start',tracks,target,place)} />\n <span className=\"site-flow-resize is-end\" contentEditable={false} aria-hidden=\"true\" onPointerDown={(event:any)=>resizeColumn(event,'end',tracks,target,place)} />\n </> : null}\n {children}\n </div>\n </>;\n return field.controlOptions.sync?<SyncedColumn group={String(field.controlOptions.sync)} column={attributes} palette={palette} areas={field.controlOptions.syncAreas} index={layout.index} editor>{content}</SyncedColumn>:content;\n}\n\n/** Each column has its own outline colour, so neighbours are easy to tell apart. */\nconst columnColors=['#3858e9','#d9480f','#7c3aed','#0b8a7a','#c2255c','#a16207'];\n/** Grid lines of the Drag container, measured from its rendered tracks; the middle of a gap counts as the line. */\nfunction gridLines(container: HTMLElement, grid: number) {\n const style=getComputedStyle(container);\n const tracks=style.gridTemplateColumns.split(' ').map(parseFloat);\n if(tracks.length!==grid||tracks.some(Number.isNaN))return null;\n const gap=parseFloat(style.columnGap)||0;\n let x=container.getBoundingClientRect().left+(parseFloat(style.borderLeftWidth)||0)+(parseFloat(style.paddingLeft)||0);\n const lines=[x];\n tracks.forEach((track,index)=>{x+=track;lines.push(index<grid-1?x+gap/2:x);x+=gap;});\n return lines;\n}\nconst nearestLine=(lines:number[],x:number)=>lines.reduce((best,line,index)=>Math.abs(line-x)<Math.abs(lines[best]-x)?index:best,0)+1;\n/** Drags one edge to a grid line; the column previews through CSS variables and saves once on release. */\nfunction resizeColumn(event: any, edge: 'start' | 'end', grid: number, breakpoint: string, place: (value: { start: number; span: number }) => void) {\n const handle=event.currentTarget as HTMLElement,column=handle.closest('.site-flow-column') as HTMLElement|null,container=column?.closest('.site-flow-drag') as HTMLElement|null;\n const lines=column&&container?gridLines(container,grid):null;\n if(!column||!container||!lines||event.button!==0)return;\n event.preventDefault();event.stopPropagation();\n const peers=container.dataset.siteDragSync?Array.from(container.closest('section')?.querySelectorAll<HTMLElement>('[data-site-drag-sync]')??[]).filter(node=>node.dataset.siteDragSync===container.dataset.siteDragSync):[container];\n const box=column.getBoundingClientRect();\n const pointerOffset=event.clientX-(edge==='start'?box.left:box.right);\n let start=nearestLine(lines,box.left),end=Math.max(start+1,nearestLine(lines,box.right));\n const initial=[start,end].join(),startVar=`--site-col-${breakpoint}-start`,spanVar=`--site-col-${breakpoint}-span`;\n const before={placed:column.classList.contains('site-col-at-'+breakpoint),full:column.classList.contains('is-full-row'),start:column.style.getPropertyValue(startVar),span:column.style.getPropertyValue(spanVar)};\n const preview=()=>{\n column.style.setProperty(startVar,String(start));column.style.setProperty(spanVar,String(end-start));\n handle.dataset.span=`${end-start} / ${grid}`;\n };\n column.classList.remove('is-full-row');column.classList.add('is-resizing','site-col-at-'+breakpoint);peers.forEach(node=>node.classList.add('is-resizing'));handle.classList.add('is-active');preview();\n handle.setPointerCapture(event.pointerId);\n const move=(next:PointerEvent)=>{\n const line=nearestLine(lines,next.clientX-pointerOffset);\n if(edge==='start')start=Math.min(line,end-1);else end=Math.max(line,start+1);\n preview();\n };\n const stop=()=>{\n handle.removeEventListener('pointermove',move);handle.removeEventListener('pointerup',stop);handle.removeEventListener('pointercancel',stop);\n peers.forEach(node=>node.classList.remove('is-resizing'));column.classList.remove('is-resizing');handle.classList.remove('is-active');\n // React rewrites the class and the variables from the saved placement on the next render.\n if([start,end].join()!==initial)return place({start,span:end-start});\n // Released without a change: put back what React rendered.\n column.classList.toggle('site-col-at-'+breakpoint,before.placed);column.classList.toggle('is-full-row',before.full);\n for(const [name,value] of [[startVar,before.start],[spanVar,before.span]])value?column.style.setProperty(name,value):column.style.removeProperty(name);\n };\n handle.addEventListener('pointermove',move);handle.addEventListener('pointerup',stop);handle.addEventListener('pointercancel',stop);\n}\n\n/**\n * Column placement for one breakpoint: device tabs (a dot marks an own placement), a strip of the grid tracks\n * where dragging across cells sets start and width, and the exact numbers below it.\n */\nfunction ColumnLayout({grid,target,isDefault,placement,inherited,own,placed,color,onPlace,onReset}:{grid:number;target:string|null;isDefault:boolean;placement:{start:number;span:number}|null;inherited?:string;own:boolean;placed:string[];color:string;onPlace:(value:{start:number;span:number})=>void;onReset?:()=>void}) {\n const [range,setRange]=useState<[number,number]|null>(null);\n const start=placement?.start||1,end=start+(placement?.span??grid)-1;\n const shown=range?[Math.min(...range),Math.max(...range)]:[start,end];\n const select=(event:any,cell:number)=>{\n if(event.type==='pointerdown'){event.currentTarget.setPointerCapture(event.pointerId);setRange([cell,cell]);}\n else if(range&&event.buttons===1)setRange([range[0],cell]);\n };\n const finish=()=>{if(!range)return;const [from,to]=[Math.min(...range),Math.max(...range)];setRange(null);onPlace({start:from,span:to-from+1});};\n const cellAt=(event:any)=>{const box=event.currentTarget.getBoundingClientRect();return Math.min(grid,Math.max(1,Math.floor((event.clientX-box.left)/box.width*grid)+1));};\n const { __experimentalNumberControl: NumberControl } = wp.components;\n return <div className=\"site-flow-layout\" style={{'--site-flow-color':color} as any}>\n <div className=\"site-flow-layout-tabs\" role=\"tablist\" aria-label=\"Breakpoint\">\n <button type=\"button\" role=\"tab\" aria-selected={isDefault} className=\"has-own\" title={`Default \u00B7 from ${breakpointLabel(COLUMN_BREAKPOINT)} up, wherever a breakpoint has no layout of its own`} onClick={()=>setDefaultLayout()}><MonitorSmartphone size={20} strokeWidth={1.5} aria-hidden=\"true\" /></button>\n {editorBreakpoints.map(name=>{const width=BREAKPOINTS[name as keyof typeof BREAKPOINTS];return <button key={name} type=\"button\" role=\"tab\" aria-selected={!isDefault&&name===target}\n className={placed.includes(name)?'has-own':undefined} title={`${breakpointLabel(name)} \u00B7 ${breakpointRange(name)}`} onClick={()=>setViewport(name)}><BreakpointIcon value={width} /></button>;})}\n </div>\n {target&&placement?<>\n <div className=\"site-flow-layout-head\">\n <strong>{isDefault?'Default':breakpointLabel(target)}</strong><span>{isDefault?`${BREAKPOINTS[COLUMN_BREAKPOINT as keyof typeof BREAKPOINTS]}px and up`:breakpointRange(target)}</span>\n {onReset?<ResetButton onClick={onReset} label=\"Reset layout for this breakpoint\" />:null}\n </div>\n <p className=\"site-flow-layout-state\">{isDefault?`Applies from ${breakpointLabel(COLUMN_BREAKPOINT)} up wherever a breakpoint has no layout of its own; narrower, the column spans the row.`:own?'Own layout for this screen range only.':inherited?'Uses the default. A change applies to this screen range only.':'Spans the row. A change applies to this screen range only.'}</p>\n <div className={'site-flow-layout-grid'+(own?'':' is-inherited')+(placement.start?'':' is-auto')} style={{gridTemplateColumns:`repeat(${grid},1fr)`}}\n onPointerDown={(event)=>select(event,cellAt(event))} onPointerMove={(event)=>select(event,cellAt(event))} onPointerUp={finish} onPointerCancel={()=>setRange(null)}\n role=\"img\" aria-label={`Columns ${shown[0]} to ${shown[1]} of ${grid}`}>\n {Array.from({length:grid},(_,index)=><span key={index} className={index+1>=shown[0]&&index+1<=shown[1]?'is-on':undefined} />)}\n </div>\n <p className=\"site-flow-layout-hint\">Drag across the cells to place the column.</p>\n <div className=\"site-flow-layout-numbers\">\n <NumberControl label=\"Start\" min={1} max={grid-placement.span+1} value={placement.start||''} placeholder=\"Auto\" spinControls=\"custom\" __next40pxDefaultSize\n onChange={(value:string)=>onPlace({start:value===''?0:Math.min(grid-placement.span+1,Math.max(1,Number(value))),span:placement.span})} />\n <NumberControl label=\"Width\" min={1} max={grid} value={placement.span} spinControls=\"custom\" __next40pxDefaultSize\n onChange={(value:string)=>{const span=Math.min(grid,Math.max(1,Number(value)||1));onPlace({span,start:placement.start?Math.min(placement.start,grid-span+1):0});}} />\n </div>\n </>:<p className=\"site-flow-layout-state\">Below the first breakpoint the column spans the row.</p>}\n </div>;\n}\n\nfunction AlignmentButtons({label,value,options,onChange}:any) {\n return <fieldset className=\"site-flow-alignment\">\n <legend>{label}</legend>\n <div className=\"site-flow-alignment-options\" role=\"group\" aria-label={label}>\n {options.map(({value:option,label:optionLabel,Icon}:any)=><wp.components.Button\n key={option} label={optionLabel} aria-label={`${label}: ${optionLabel}`}\n aria-pressed={value===option} isPressed={value===option}\n onClick={()=>onChange(option)}><Icon size={20} strokeWidth={1.75} aria-hidden=\"true\" /></wp.components.Button>)}\n </div>\n </fieldset>;\n}\n"],
|
|
5
|
+
"mappings": ";AAiB6G,SAgClG,UAhCkG,KAalG,YAbkG;AAhB7G,SAAS,gCA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;AAC1D,SAAO,qBAAC,cAAS,WAAU,uBACvB;AAAA,wBAAC,YAAQ,iBAAM;AAAA,IACf,oBAAC,SAAI,WAAU,+BAA8B,MAAK,SAAQ,cAAY,OACjE,kBAAQ,IAAI,CAAC,EAAC,OAAM,QAAO,OAAM,aAAY,KAAI,MAAQ;AAAA,MAAC,GAAG,WAAW;AAAA,MAAd;AAAA,QAC1C,OAAO;AAAA,QAAa,cAAY,GAAG,KAAK,KAAK,WAAW;AAAA,QACrE,gBAAc,UAAQ;AAAA,QAAQ,WAAW,UAAQ;AAAA,QACjD,SAAS,MAAI,SAAS,MAAM;AAAA,QAAG,8BAAC,QAAK,MAAM,IAAI,aAAa,MAAM,eAAY,QAAO;AAAA;AAAA,MAFhF;AAAA,IAEkF,CAAuB,GACtH;AAAA,KACJ;AACJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,7 +4,7 @@ import { fieldOrder } from "../fields/order.js";
|
|
|
4
4
|
const InspectorOrderContext = createContext(void 0);
|
|
5
5
|
function OrderedInspectorControls({ children, order }) {
|
|
6
6
|
const inherited = useContext(InspectorOrderContext);
|
|
7
|
-
return /* @__PURE__ */ jsx(wp.blockEditor.InspectorControls, { children: /* @__PURE__ */ jsx("div", { className: "site-inspector-group", style: { order: fieldOrder(order ?? inherited) }, children }) });
|
|
7
|
+
return /* @__PURE__ */ jsx(wp.blockEditor.InspectorControls, { children: /* @__PURE__ */ jsx("div", { className: "site-inspector-group site-control-scope", style: { order: fieldOrder(order ?? inherited) }, children }) });
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
10
|
InspectorOrderContext,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../core/editor/inspector.tsx"],
|
|
4
|
-
"sourcesContent": ["import { createContext, useContext, type ReactNode } from 'react';\nimport { fieldOrder } from '../fields/order.js';\ndeclare const wp: any;\nexport const InspectorOrderContext = createContext<number | undefined>(undefined);\n/** Keep an editor-only priority out of authored DOM attributes and frontend CSS. */\nexport function OrderedInspectorControls({ children, order }: { children: ReactNode; order?: number }) {\n const inherited = useContext(InspectorOrderContext);\n return <wp.blockEditor.InspectorControls><div className=\"site-inspector-group\" style={{order: fieldOrder(order ?? inherited)}}>{children}</div></wp.blockEditor.InspectorControls>;\n}\n"],
|
|
5
|
-
"mappings": "AAO2C;AAP3C,SAAS,eAAe,kBAAkC;AAC1D,SAAS,kBAAkB;AAEpB,MAAM,wBAAwB,cAAkC,MAAS;AAEzE,SAAS,yBAAyB,EAAE,UAAU,MAAM,GAA4C;AACrG,QAAM,YAAY,WAAW,qBAAqB;AAClD,SAAO,oBAAC,GAAG,YAAY,mBAAf,EAAiC,8BAAC,SAAI,WAAU,
|
|
4
|
+
"sourcesContent": ["import { createContext, useContext, type ReactNode } from 'react';\nimport { fieldOrder } from '../fields/order.js';\ndeclare const wp: any;\nexport const InspectorOrderContext = createContext<number | undefined>(undefined);\n/** Keep an editor-only priority out of authored DOM attributes and frontend CSS. */\nexport function OrderedInspectorControls({ children, order }: { children: ReactNode; order?: number }) {\n const inherited = useContext(InspectorOrderContext);\n return <wp.blockEditor.InspectorControls><div className=\"site-inspector-group site-control-scope\" style={{order: fieldOrder(order ?? inherited)}}>{children}</div></wp.blockEditor.InspectorControls>;\n}\n"],
|
|
5
|
+
"mappings": "AAO2C;AAP3C,SAAS,eAAe,kBAAkC;AAC1D,SAAS,kBAAkB;AAEpB,MAAM,wBAAwB,cAAkC,MAAS;AAEzE,SAAS,yBAAyB,EAAE,UAAU,MAAM,GAA4C;AACrG,QAAM,YAAY,WAAW,qBAAqB;AAClD,SAAO,oBAAC,GAAG,YAAY,mBAAf,EAAiC,8BAAC,SAAI,WAAU,2CAA0C,OAAO,EAAC,OAAO,WAAW,SAAS,SAAS,EAAC,GAAI,UAAS,GAAM;AACpK;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|