@plaudit/gutenberg-api-extensions 2.94.2 → 2.96.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/lib/useful-types.d.ts +1 -4
  3. package/package.json +4 -4
  4. package/src/blocks/MoveError.ts +0 -7
  5. package/src/blocks/PathError.ts +0 -18
  6. package/src/blocks/SNPFlexibleItemsListComponent.tsx +0 -30
  7. package/src/blocks/SNPGroupComponent.tsx +0 -38
  8. package/src/blocks/SNPListComponent.tsx +0 -25
  9. package/src/blocks/SNPTreeContext.tsx +0 -13
  10. package/src/blocks/basic-custom-block-bindings-support.tsx +0 -248
  11. package/src/blocks/common-native-property-constructors.tsx +0 -927
  12. package/src/blocks/conditions.ts +0 -261
  13. package/src/blocks/csnp-api.ts +0 -221
  14. package/src/blocks/data-controller/actions.ts +0 -20
  15. package/src/blocks/data-controller/reducer.ts +0 -146
  16. package/src/blocks/data-controller/trigger-handlers.ts +0 -150
  17. package/src/blocks/data-controller/utils.ts +0 -415
  18. package/src/blocks/data-controller-manager.ts +0 -50
  19. package/src/blocks/data-controller.ts +0 -165
  20. package/src/blocks/hooks/built-in-suspendable-option-protocols/select.ts +0 -51
  21. package/src/blocks/hooks/built-in-suspendable-option-protocols/settings.ts +0 -70
  22. package/src/blocks/hooks/useSuspendableOptions.ts +0 -122
  23. package/src/blocks/index.ts +0 -23
  24. package/src/blocks/layered-styles-api.ts +0 -142
  25. package/src/blocks/layered-styles-impl.ts +0 -95
  26. package/src/blocks/layout/LaidOutProperty.tsx +0 -72
  27. package/src/blocks/layout/LaidOutPropertyRow.tsx +0 -28
  28. package/src/blocks/layout/NodeContext.tsx +0 -54
  29. package/src/blocks/layout/PanelRoot.tsx +0 -30
  30. package/src/blocks/layout/TabsRoot.tsx +0 -56
  31. package/src/blocks/layout/ToolsPanelContext.tsx +0 -22
  32. package/src/blocks/problematic-blocks-blocker.ts +0 -24
  33. package/src/blocks/problematic-variations-blocker.ts +0 -32
  34. package/src/blocks/shared-exportable-types.ts +0 -6
  35. package/src/blocks/shared-internal-types.ts +0 -18
  36. package/src/blocks/simple-block.tsx +0 -74
  37. package/src/blocks/simple-native-property-api.ts +0 -173
  38. package/src/blocks/simple-native-property-impl.tsx +0 -335
  39. package/src/blocks/simple-native-property-internal-shared.ts +0 -19
  40. package/src/blocks/snp-api.ts +0 -5
  41. package/src/blocks/snp-data-store.ts +0 -72
  42. package/src/blocks/utilities.ts +0 -66
  43. package/src/controls/AsynchronousFormTokenField.tsx +0 -86
  44. package/src/controls/BaseSortableItemsControl.tsx +0 -84
  45. package/src/controls/ExtendedFormTokenField.tsx +0 -144
  46. package/src/controls/ExtendedPostPicker.ts +0 -57
  47. package/src/controls/ExtendedRadioControl.tsx +0 -107
  48. package/src/controls/ExtendedTaxonomyPicker.tsx +0 -100
  49. package/src/controls/ExtendedTermPicker.tsx +0 -61
  50. package/src/controls/ExtendedTextareaControl.tsx +0 -65
  51. package/src/controls/ExtendedUserPicker.ts +0 -56
  52. package/src/controls/FileControl.tsx +0 -48
  53. package/src/controls/FullSizeToggleControl.tsx +0 -95
  54. package/src/controls/ImageControl.tsx +0 -143
  55. package/src/controls/InspectorPanel.tsx +0 -37
  56. package/src/controls/LazySuggestionsComboboxControl.tsx +0 -64
  57. package/src/controls/MultiSelectControl.tsx +0 -59
  58. package/src/controls/PickOne.tsx +0 -88
  59. package/src/controls/PromisableComponent.tsx +0 -56
  60. package/src/controls/ProperLinkControl.tsx +0 -98
  61. package/src/controls/SimpleToggle.tsx +0 -9
  62. package/src/controls/SortableFlexibleItemsControl.tsx +0 -37
  63. package/src/controls/SortableItemsControl.tsx +0 -22
  64. package/src/controls/basicNumericallyIdedItemPicker.tsx +0 -75
  65. package/src/controls/hooks/useImprovedTokenManager.ts +0 -163
  66. package/src/controls/hooks/useMultiSingleConversionLayer.ts +0 -17
  67. package/src/controls/hooks/useNonRenderingCounter.ts +0 -6
  68. package/src/controls/hooks/useOutputMemoizingFilter.ts +0 -16
  69. package/src/controls/hooks/useSortableItemsModel.ts +0 -196
  70. package/src/controls/hooks/useSuggestions.ts +0 -91
  71. package/src/controls/hooks/useTokenManager.ts +0 -177
  72. package/src/controls/index.ts +0 -24
  73. package/src/controls/shared.ts +0 -50
  74. package/src/controls/types.ts +0 -18
  75. package/src/editor/insert-sibling-or-child-block-shortcut.tsx +0 -60
  76. package/src/editor/install-insert-sole-allowed-block-shortcut-support.tsx +0 -51
  77. package/src/editor/simple-gutenberg-endpoints-api.ts +0 -31
  78. package/src/editor/simple-gutenberg-endpoints-impl.ts +0 -126
  79. package/src/index.ts +0 -30
  80. package/src/lib/compat-types.ts +0 -21
  81. package/src/lib/gutenberg-api-extensions-state/custom-block-bindings-support-logic.ts +0 -35
  82. package/src/lib/gutenberg-api-extensions-state/general-logic.ts +0 -41
  83. package/src/lib/gutenberg-api-extensions-state/layered-block-styles-logic.ts +0 -43
  84. package/src/lib/gutenberg-api-extensions-state/snp-logic.ts +0 -240
  85. package/src/lib/gutenberg-api-extensions-state.ts +0 -69
  86. package/src/lib/helpers.ts +0 -115
  87. package/src/lib/modified-fast-deep-equals.ts +0 -91
  88. package/src/lib/plaudit-icons/column-1.tsx +0 -6
  89. package/src/lib/plaudit-icons/column-2.tsx +0 -6
  90. package/src/lib/plaudit-icons/column-3.tsx +0 -6
  91. package/src/lib/plaudit-icons/placement-center.tsx +0 -3
  92. package/src/lib/plaudit-icons/placement-end.tsx +0 -3
  93. package/src/lib/plaudit-icons/placement-start.tsx +0 -3
  94. package/src/lib/plaudit-icons/placement-stretch.tsx +0 -3
  95. package/src/lib/plaudit-icons/plaudit-icon.tsx +0 -4
  96. package/src/lib/plaudit-icons/reusable-block-marker.tsx +0 -3
  97. package/src/lib/plaudit-icons.ts +0 -13
  98. package/src/lib/sectioned-cache-store.ts +0 -120
  99. package/src/lib/suspense/promise-handlers.ts +0 -72
  100. package/src/lib/suspense.tsx +0 -18
  101. package/src/lib/useful-types.ts +0 -82
  102. package/src/schemas/README.md +0 -1
  103. package/src/schemas/plaudit-block-schema.json +0 -818
@@ -1,818 +0,0 @@
1
- {
2
- "title": "Plaudit's JSON schema for WordPress blocks",
3
- "$schema": "https://json-schema.org/draft-07/schema",
4
- "$id": "https://schemas.plaudit.net/json/block.json",
5
- "$defs": {
6
- "empty": {
7
- "type": "string",
8
- "maxLength": 0
9
- },
10
- "intOrEmpty": {
11
- "oneOf": [
12
- {"$ref": "#/$defs/empty"},
13
- {"type": "integer"}
14
- ]
15
- },
16
- "slug": {
17
- "type": "string",
18
- "pattern": "^[a-zA-Z0-9\\-_]*$"
19
- },
20
- "php:stringOrStrings": {
21
- "type": ["string", "array"],
22
- "items": {"type": "string"}
23
- },
24
- "php:boolean": {"enum": [true, false, 0, 1, null]},
25
- "php:falsyArray": {
26
- "oneOf": [
27
- {"enum": [false, 0, null]},
28
- {"type": "array"}
29
- ]
30
- },
31
- "equality": {
32
- "type": "string",
33
- "enum": ["==", "!="]
34
- },
35
- "acf:common-field-properties": {
36
- "required": ["name", "label", "type"],
37
- "properties": {
38
- "key": {"$ref": "#/$defs/slug"},
39
- "name": {"$ref": "#/$defs/slug"},
40
- "label": {"type": "string"},
41
- "aria-label": {"type": "string"},
42
- "instructions": {"type": "string"},
43
- "type": {"$ref": "#/$defs/slug"},
44
- "conditional_logic": {
45
- "oneOf": [
46
- {"enum": [false, 0, null]},
47
- {
48
- "type": "array",
49
- "items": {
50
- "type": "array",
51
- "items": {
52
- "type": "object",
53
- "properties": {
54
- "field": {"$ref": "#/$defs/slug"},
55
- "operator": {"$ref": "#/$defs/equality"},
56
- "value": {"type": "string"}
57
- },
58
- "required": ["field", "operator", "value"]
59
- }
60
- }
61
- }
62
- ]
63
- },
64
- "parent_repeater": {"type": "string"},
65
- "required": {"$ref": "#/$defs/php:boolean"},
66
- "multiple": {"$ref": "#/$defs/php:boolean"},
67
- "allow_null": {"$ref": "#/$defs/php:boolean"},
68
- "ui": {"$ref": "#/$defs/php:boolean"},
69
- "ajax": {"$ref": "#/$defs/php:boolean"},
70
- "wrapper": {
71
- "type": "object",
72
- "properties": {
73
- "width": {
74
- "$ref": "#/$defs/intOrEmpty"
75
- },
76
- "class": {
77
- "type": "string"
78
- },
79
- "id": {
80
- "type": "string"
81
- }
82
- }
83
- }
84
- }
85
- },
86
- "acf:non-standard-fields": {"enum": ["repeater", "group"]},
87
- "acf:common-layout-fields": {
88
- "properties": {
89
- "layout": {"enum": ["table", "row", "block"]}
90
- }
91
- },
92
- "acf:fields": {
93
- "type": "array",
94
- "items": {
95
- "type": "object",
96
- "if": {
97
- "properties": {"type": {"enum": ["repeater", "group"]}}
98
- },
99
- "then": {
100
- "allOf": [
101
- {"$ref": "#/$defs/acf:common-field-properties"},
102
- {"$ref": "#/$defs/acf:common-layout-fields"},
103
- {
104
- "properties": {
105
- "type": {"enum": ["repeater", "group"]},
106
- "sub_fields": {"$ref": "#/$defs/acf:fields"}
107
- },
108
- "required": ["sub_fields"]
109
- }
110
- ]
111
- },
112
- "else": {
113
- "if": {
114
- "properties": {"type": {"const": "flexible_content"}}
115
- },
116
- "then": {
117
- "allOf": [
118
- {"$ref": "#/$defs/acf:common-field-properties"},
119
- {"$ref": "#/$defs/acf:common-layout-fields"},
120
- {
121
- "properties": {
122
- "layouts": {
123
- "type": "array",
124
- "items": {
125
- "type": "object",
126
- "properties": {
127
- "key": {"$ref": "#/$defs/slug"},
128
- "label": {"type": "string"},
129
- "name": {"$ref": "#/$defs/slug"},
130
- "display": {"enum": ["table", "block", "row"]},
131
- "sub_fields": {"$ref": "#/$defs/acf:fields"},
132
- "min": {"$ref": "#/$defs/intOrEmpty"},
133
- "max": {"$ref": "#/$defs/intOrEmpty"}
134
- },
135
- "required": ["name", "label", "sub_fields"]
136
- }
137
- }
138
- },
139
- "required": ["layouts"]
140
- }
141
- ]
142
- },
143
- "else": {
144
- "$ref": "#/$defs/acf:common-field-properties",
145
- "properties": {
146
- "default_value": {},
147
- "layout": {"enum": ["horizontal", "vertical"]},
148
- "return_format": {"$ref": "#/$defs/slug"}
149
- }
150
- }
151
- }
152
- }
153
- }
154
- ,
155
- "snp:inspectorPanelGroup": {
156
- "type": "string",
157
- "enum": ["layered-styles", "post", "default", "advanced", "background", "border", "color", "dimensions", "effects", "filter", "list", "position", "settings", "styles", "typography"]
158
- },
159
- "snp:conditionOp": {
160
- "type": "string",
161
- "enum": ["==", "!=", ">", "<", ">=", "<=", "in", "!in", "contains", "!contains", "empty", "!empty"]
162
- },
163
- "snp:conditionCombinerOp": {
164
- "type": "string",
165
- "enum": ["and", "or", "not", "nand", "nor"]
166
- },
167
- "snp:propertyConditionTest": {
168
- "type": "object",
169
- "properties": {
170
- "op": {"$ref": "#/$defs/snp:conditionOp"},
171
- "property": {"type": "string"},
172
- "value": {}
173
- },
174
- "required": ["op", "property"],
175
- "additionalProperties": false
176
- },
177
- "snp:combinerConditionTest": {
178
- "type": "object",
179
- "properties": {
180
- "op": {"$ref": "#/$defs/snp:conditionCombinerOp"},
181
- "conditions": {"$ref": "#/$defs/snp:conditionStruct"}
182
- },
183
- "required": ["op", "conditions"],
184
- "additionalProperties": false
185
- },
186
- "snp:conditionTest": {
187
- "oneOf": [
188
- {"$ref": "#/$defs/snp:propertyConditionTest"},
189
- {"$ref": "#/$defs/snp:combinerConditionTest"}
190
- ]
191
- },
192
- "snp:conditionStruct": {
193
- "type": "array",
194
- "items": {
195
- "oneOf": [
196
- {"$ref": "#/$defs/snp:conditionTest"},
197
- {"$ref": "#/$defs/snp:conditionStruct"}
198
- ]
199
- }
200
- },
201
- "snp:pickableOptionTuple": {
202
- "type": "array",
203
- "minItems": 2,
204
- "maxItems": 2,
205
- "items": [
206
- {"type": ["string", "number"]},
207
- {
208
- "oneOf": [
209
- {"type": "string"},
210
- {
211
- "type": "object",
212
- "properties": {
213
- "text": {"type": "string"},
214
- "tooltip": {"type": "string"},
215
- "icon": {"type": "string"}
216
- },
217
- "required": ["text"],
218
- "additionalProperties": true
219
- }
220
- ]
221
- }
222
- ]
223
- },
224
- "snp:pickableOptionObject": {
225
- "type": "object",
226
- "properties": {
227
- "value": {"type": ["string", "number"]},
228
- "label": {"type": "string"},
229
- "tooltip": {"type": "string"},
230
- "icon": {"type": "string"}
231
- },
232
- "required": ["value"],
233
- "additionalProperties": true
234
- },
235
- "snp:pickableOptionsInline": {
236
- "type": "array",
237
- "items": {
238
- "oneOf": [
239
- {"$ref": "#/$defs/snp:pickableOptionTuple"},
240
- {"$ref": "#/$defs/snp:pickableOptionObject"}
241
- ]
242
- }
243
- },
244
- "snp:suspendablePickableOptions": {
245
- "type": "string",
246
- "pattern": "^(select:[^:]+:[^:]+(:[^:]+)?|setting:[^:]+(:[^:]+)?|[a-zA-Z][a-zA-Z0-9+\\-.]*://.+)$"
247
- },
248
- "snp:pickableOptions": {
249
- "oneOf": [
250
- {"$ref": "#/$defs/snp:pickableOptionsInline"},
251
- {"$ref": "#/$defs/snp:suspendablePickableOptions"}
252
- ]
253
- },
254
- "snp:controlType": {
255
- "type": "string",
256
- "enum": ["colorPalette", "constant", "date", "group", "image", "link", "list", "number", "post", "radio", "range", "select", "taxonomy", "term", "text", "textarea", "toggle", "toggleGroup", "user"]
257
- },
258
- "snp:baseProperty": {
259
- "type": "object",
260
- "properties": {
261
- "name": {"type": "string"},
262
- "label": {"type": "string"},
263
- "control": {"$ref": "#/$defs/snp:controlType"},
264
- "help": {"type": "string"},
265
- "default": {},
266
- "alwaysStore": {"type": "boolean"},
267
- "required": {"type": "boolean"},
268
- "condition": {"$ref": "#/$defs/snp:conditionStruct"},
269
- "component": {"type": "object"},
270
- "styleProperty": {"type": "string"}
271
- },
272
- "required": ["name", "label", "control"],
273
- "additionalProperties": true
274
- },
275
- "snp:text": {
276
- "allOf": [
277
- {"$ref": "#/$defs/snp:baseProperty"},
278
- {
279
- "type": "object",
280
- "properties": {
281
- "control": {"const": "text"},
282
- "placeholder": {"type": "string"}
283
- },
284
- "required": ["control"],
285
- "additionalProperties": true
286
- }
287
- ]
288
- },
289
- "snp:textarea": {
290
- "allOf": [
291
- {"$ref": "#/$defs/snp:baseProperty"},
292
- {
293
- "type": "object",
294
- "properties": {
295
- "control": {"const": "textarea"}
296
- },
297
- "required": ["control"],
298
- "additionalProperties": true
299
- }
300
- ]
301
- },
302
- "snp:number": {
303
- "allOf": [
304
- {"$ref": "#/$defs/snp:baseProperty"},
305
- {
306
- "type": "object",
307
- "properties": {
308
- "control": {"const": "number"},
309
- "placeholder": {"type": "string"},
310
- "float": {"type": "boolean"},
311
- "min": {"type": "number"},
312
- "max": {"type": "number"},
313
- "step": {"oneOf": [{"type": "number"}, {"const": "any"}]}
314
- },
315
- "required": ["control"],
316
- "additionalProperties": true
317
- }
318
- ]
319
- },
320
- "snp:range": {
321
- "allOf": [
322
- {"$ref": "#/$defs/snp:baseProperty"},
323
- {
324
- "type": "object",
325
- "properties": {
326
- "control": {"const": "range"},
327
- "min": {"type": "number"},
328
- "max": {"type": "number"},
329
- "step": {"type": "number"}
330
- },
331
- "required": ["control", "min", "max"],
332
- "additionalProperties": true
333
- }
334
- ]
335
- },
336
- "snp:toggle": {
337
- "allOf": [
338
- {"$ref": "#/$defs/snp:baseProperty"},
339
- {
340
- "type": "object",
341
- "properties": {
342
- "control": {"const": "toggle"},
343
- "switch": {
344
- "oneOf": [
345
- {"enum": ["showHide", "yesNo"]},
346
- {
347
- "type": "object",
348
- "properties": {
349
- "small": {"type": "boolean"},
350
- "narrow": {"type": "boolean"},
351
- "type": {"enum": ["showHide", "yesNo"]},
352
- "onLabel": {},
353
- "offLabel": {}
354
- },
355
- "additionalProperties": true
356
- }
357
- ]
358
- }
359
- },
360
- "required": ["control"],
361
- "additionalProperties": true
362
- }
363
- ]
364
- },
365
- "snp:toggleGroup": {
366
- "allOf": [
367
- {"$ref": "#/$defs/snp:baseProperty"},
368
- {
369
- "type": "object",
370
- "properties": {
371
- "control": {"const": "toggleGroup"},
372
- "options": {"$ref": "#/$defs/snp:pickableOptions"},
373
- "clearable": {"type": "boolean"},
374
- "type": {"enum": ["string", "number"]}
375
- },
376
- "required": ["control", "options"],
377
- "additionalProperties": true
378
- }
379
- ]
380
- },
381
- "snp:select": {
382
- "allOf": [
383
- {"$ref": "#/$defs/snp:baseProperty"},
384
- {
385
- "type": "object",
386
- "properties": {
387
- "control": {"const": "select"},
388
- "options": {"$ref": "#/$defs/snp:pickableOptions"},
389
- "multiple": {"type": "boolean"},
390
- "clearable": {"type": "boolean"},
391
- "expandOnFocus": {"type": "boolean"},
392
- "maxLength": {"type": "number"}
393
- },
394
- "required": ["control", "options"],
395
- "additionalProperties": true
396
- }
397
- ]
398
- },
399
- "snp:radio": {
400
- "allOf": [
401
- {"$ref": "#/$defs/snp:baseProperty"},
402
- {
403
- "type": "object",
404
- "properties": {
405
- "control": {"const": "radio"},
406
- "options": {"$ref": "#/$defs/snp:pickableOptions"},
407
- "allowCustom": {"type": "boolean"}
408
- },
409
- "required": ["control", "options"],
410
- "additionalProperties": true
411
- }
412
- ]
413
- },
414
- "snp:colorPalette": {
415
- "allOf": [
416
- {"$ref": "#/$defs/snp:baseProperty"},
417
- {
418
- "type": "object",
419
- "properties": {
420
- "control": {"const": "colorPalette"},
421
- "options": {"$ref": "#/$defs/snp:pickableOptions"},
422
- "allowCustom": {"type": "boolean"},
423
- "clearable": {"type": "boolean"}
424
- },
425
- "required": ["control", "options"],
426
- "additionalProperties": true
427
- }
428
- ]
429
- },
430
- "snp:date": {
431
- "allOf": [
432
- {"$ref": "#/$defs/snp:baseProperty"},
433
- {
434
- "type": "object",
435
- "properties": {
436
- "control": {"const": "date"},
437
- "time": {"type": "boolean"}
438
- },
439
- "required": ["control"],
440
- "additionalProperties": true
441
- }
442
- ]
443
- },
444
- "snp:image": {
445
- "allOf": [
446
- {"$ref": "#/$defs/snp:baseProperty"},
447
- {
448
- "type": "object",
449
- "properties": {
450
- "control": {"const": "image"},
451
- "includeFocalPointPicker": {"type": "boolean"},
452
- "storage": {"type": "object"}
453
- },
454
- "required": ["control"],
455
- "additionalProperties": true
456
- }
457
- ]
458
- },
459
- "snp:link": {
460
- "allOf": [
461
- {"$ref": "#/$defs/snp:baseProperty"},
462
- {
463
- "type": "object",
464
- "properties": {
465
- "control": {"const": "link"},
466
- "settings": {}
467
- },
468
- "required": ["control"],
469
- "additionalProperties": true
470
- }
471
- ]
472
- },
473
- "snp:post": {
474
- "allOf": [
475
- {"$ref": "#/$defs/snp:baseProperty"},
476
- {
477
- "type": "object",
478
- "properties": {
479
- "control": {"const": "post"},
480
- "postTypes": {"type": "array", "items": {"type": "string"}},
481
- "multiple": {"type": "boolean"},
482
- "placeholder": {"type": "string"},
483
- "taxonomyQuery": {"type": "object"}
484
- },
485
- "required": ["control"],
486
- "additionalProperties": true
487
- }
488
- ]
489
- },
490
- "snp:taxonomy": {
491
- "allOf": [
492
- {"$ref": "#/$defs/snp:baseProperty"},
493
- {
494
- "type": "object",
495
- "properties": {
496
- "control": {"const": "taxonomy"},
497
- "multiple": {"type": "boolean"},
498
- "placeholder": {"type": "string"},
499
- "visibility": {"type": "object"}
500
- },
501
- "required": ["control"],
502
- "additionalProperties": true
503
- }
504
- ]
505
- },
506
- "snp:term": {
507
- "allOf": [
508
- {"$ref": "#/$defs/snp:baseProperty"},
509
- {
510
- "type": "object",
511
- "properties": {
512
- "control": {"const": "term"},
513
- "taxonomy": {"type": "string"},
514
- "multiple": {"type": "boolean"},
515
- "placeholder": {"type": "string"}
516
- },
517
- "required": ["control", "taxonomy"],
518
- "additionalProperties": true
519
- }
520
- ]
521
- },
522
- "snp:user": {
523
- "allOf": [
524
- {"$ref": "#/$defs/snp:baseProperty"},
525
- {
526
- "type": "object",
527
- "properties": {
528
- "control": {"const": "user"},
529
- "userRoles": {"type": "array", "items": {"type": "string"}},
530
- "multiple": {"type": "boolean"},
531
- "placeholder": {"type": "string"}
532
- },
533
- "required": ["control"],
534
- "additionalProperties": true
535
- }
536
- ]
537
- },
538
- "snp:group": {
539
- "allOf": [
540
- {"$ref": "#/$defs/snp:baseProperty"},
541
- {
542
- "type": "object",
543
- "properties": {
544
- "control": {"const": "group"},
545
- "interface": {"enum": ["default", "toolsPanel"]},
546
- "fields": {"type": "array", "items": {"$ref": "#/$defs/snp:property"}}
547
- },
548
- "required": ["control"],
549
- "additionalProperties": true
550
- }
551
- ]
552
- },
553
- "snp:listItemTypeString": {
554
- "enum": ["string"]
555
- },
556
- "snp:listItemTypeNumber": {
557
- "enum": ["int", "integer", "float"]
558
- },
559
- "snp:listItemTypeObject": {
560
- "type": "array",
561
- "items": {"$ref": "#/$defs/snp:property"}
562
- },
563
- "snp:listItemTypeFlexible": {
564
- "type": "object",
565
- "patternProperties": {
566
- "^[a-zA-Z][a-zA-Z0-9_-]*$": {
567
- "type": "object",
568
- "properties": {
569
- "label": {"type": "string"},
570
- "emptyValue": {"type": "object"},
571
- "properties": {
572
- "type": "array",
573
- "items": {"$ref": "#/$defs/snp:property"}
574
- }
575
- },
576
- "required": ["label", "properties"],
577
- "additionalProperties": false
578
- }
579
- },
580
- "additionalProperties": false
581
- },
582
- "snp:list": {
583
- "allOf": [
584
- {"$ref": "#/$defs/snp:baseProperty"},
585
- {
586
- "type": "object",
587
- "properties": {
588
- "control": {"const": "list"},
589
- "itemType": {
590
- "oneOf": [
591
- {"$ref": "#/$defs/snp:listItemTypeString"},
592
- {"$ref": "#/$defs/snp:listItemTypeNumber"},
593
- {"$ref": "#/$defs/snp:listItemTypeObject"},
594
- {"$ref": "#/$defs/snp:listItemTypeFlexible"}
595
- ]
596
- },
597
- "emptyValue": {},
598
- "min": {"type": "number"},
599
- "max": {"type": "number"},
600
- "listComponent": {"type": "object"},
601
- "sharedProperties": {"type": "array", "items": {"$ref": "#/$defs/snp:property"}}
602
- },
603
- "required": ["control", "itemType"],
604
- "additionalProperties": true
605
- }
606
- ]
607
- },
608
- "snp:constant": {
609
- "allOf": [
610
- {"$ref": "#/$defs/snp:baseProperty"},
611
- {
612
- "type": "object",
613
- "properties": {
614
- "control": {"const": "constant"},
615
- "type": {"enum": ["string", "number", "boolean", "array", "object"]}
616
- },
617
- "required": ["control", "type", "default"],
618
- "additionalProperties": true
619
- }
620
- ]
621
- },
622
- "snp:property": {
623
- "oneOf": [
624
- {"$ref": "#/$defs/snp:text"},
625
- {"$ref": "#/$defs/snp:textarea"},
626
- {"$ref": "#/$defs/snp:number"},
627
- {"$ref": "#/$defs/snp:range"},
628
- {"$ref": "#/$defs/snp:toggle"},
629
- {"$ref": "#/$defs/snp:toggleGroup"},
630
- {"$ref": "#/$defs/snp:select"},
631
- {"$ref": "#/$defs/snp:radio"},
632
- {"$ref": "#/$defs/snp:colorPalette"},
633
- {"$ref": "#/$defs/snp:date"},
634
- {"$ref": "#/$defs/snp:image"},
635
- {"$ref": "#/$defs/snp:link"},
636
- {"$ref": "#/$defs/snp:post"},
637
- {"$ref": "#/$defs/snp:taxonomy"},
638
- {"$ref": "#/$defs/snp:term"},
639
- {"$ref": "#/$defs/snp:user"},
640
- {"$ref": "#/$defs/snp:group"},
641
- {"$ref": "#/$defs/snp:list"},
642
- {"$ref": "#/$defs/snp:constant"}
643
- ]
644
- },
645
- "snp:propertyRow": {
646
- "oneOf": [
647
- {"$ref": "#/$defs/snp:property"},
648
- {"type": "array", "items": {"$ref": "#/$defs/snp:property"}}
649
- ]
650
- },
651
- "snp:panel": {
652
- "type": "object",
653
- "properties": {
654
- "title": {"type": "string"},
655
- "group": {"$ref": "#/$defs/snp:inspectorPanelGroup"},
656
- "initialOpen": {"type": "boolean"},
657
- "properties": {"type": "array", "items": {"$ref": "#/$defs/snp:propertyRow"}},
658
- "items": {"type": "array", "items": {"$ref": "#/$defs/snp:propertyRow"}},
659
- "condition": {"$ref": "#/$defs/snp:conditionStruct"},
660
- "position": {"type": "number"},
661
- "raw": {"type": "boolean"},
662
- "identifier": {}
663
- },
664
- "required": ["title"],
665
- "oneOf": [
666
- {"required": ["properties"]},
667
- {"required": ["items"]}
668
- ],
669
- "additionalProperties": true
670
- },
671
- "snp:tab": {
672
- "type": "object",
673
- "properties": {
674
- "title": {"type": "string"},
675
- "group": {"$ref": "#/$defs/snp:inspectorPanelGroup"},
676
- "items": {
677
- "type": "array",
678
- "items": {
679
- "oneOf": [
680
- {"$ref": "#/$defs/snp:panel"},
681
- {"$ref": "#/$defs/snp:propertyRow"}
682
- ]
683
- }
684
- },
685
- "identifier": {}
686
- },
687
- "required": ["title", "items"],
688
- "not": {
689
- "anyOf": [
690
- {"required": ["initialOpen"]},
691
- {"required": ["properties"]},
692
- {"required": ["condition"]},
693
- {"required": ["position"]},
694
- {"required": ["raw"]}
695
- ]
696
- },
697
- "additionalProperties": true
698
- },
699
- "snp:propertiesParameter": {
700
- "oneOf": [
701
- {"$ref": "#/$defs/snp:panel"},
702
- {"$ref": "#/$defs/snp:tab"},
703
- {
704
- "type": "array",
705
- "items": {
706
- "oneOf": [
707
- {"$ref": "#/$defs/snp:panel"},
708
- {"$ref": "#/$defs/snp:tab"},
709
- {"$ref": "#/$defs/snp:propertyRow"}
710
- ]
711
- }
712
- }
713
- ]
714
- },
715
- "plaudit:acfGroup": {
716
- "type": "object",
717
- "properties": {
718
- "fields": {"$ref": "#/$defs/acf:fields"}
719
- },
720
- "additionalProperties": true
721
- }
722
- },
723
- "type": "object",
724
- "additionalProperties": true,
725
- "properties": {
726
- "plaudit": {
727
- "oneOf": [
728
- {
729
- "const": "native"
730
- },
731
- {
732
- "type": "object",
733
- "properties": {
734
- "type": {"const": "native"},
735
- "selfRegistering": {"type": "boolean"},
736
- "disablePreloading": {"type": "boolean"},
737
- "properties": {"$ref": "#/$defs/snp:propertiesParameter"},
738
- "group": {
739
- "oneOf": [
740
- {"type": "string"},
741
- {"$ref": "#/$defs/plaudit:acfGroup"},
742
- {"type": "array", "items": {"type": "string"}}
743
- ]
744
- },
745
- "setup": {"$ref": "#/$defs/php:stringOrStrings"}
746
- },
747
- "additionalProperties": true
748
- },
749
- {
750
- "type": "object",
751
- "properties": {
752
- "properties": {"$ref": "#/$defs/snp:propertiesParameter"},
753
- "group": {
754
- "oneOf": [
755
- {"type": "string"},
756
- {"$ref": "#/$defs/plaudit:acfGroup"},
757
- {"type": "array", "items": {"type": "string"}}
758
- ]
759
- },
760
- "setup": {"$ref": "#/$defs/php:stringOrStrings"},
761
- "disablePreloading": {"type": "boolean"}
762
- },
763
- "not": {
764
- "required": ["type"]
765
- },
766
- "additionalProperties": true
767
- },
768
- {"type": "boolean"}
769
- ]
770
- },
771
- "acf": {
772
- "type": "object",
773
- "description": "An Object containing ACF-specific (version 2) block configuration",
774
- "allOf": [
775
- {
776
- "properties": {
777
- "mode": {
778
- "type": "string",
779
- "description": "The display mode for your block",
780
- "default": "auto",
781
- "enum": [
782
- "auto",
783
- "edit",
784
- "preview"
785
- ]
786
- },
787
- "postTypes": {
788
- "type": "array",
789
- "items": { "$ref": "#/$defs/slug" },
790
- "description": "An array of post types to restrict this block type to"
791
- },
792
- "blockVersion": {
793
- "type": "number",
794
- "description": "The ACF block version this block should use. Defaults to 2",
795
- "default": 2
796
- }
797
- }
798
- },
799
- {
800
- "oneOf": [
801
- {
802
- "renderTemplate": {
803
- "type": "string",
804
- "description": "The path to a template file used to render the block HTML. This can either be a relative path to a file based on where your block.json file is located, or an absolute path"
805
- }
806
- },
807
- {
808
- "renderCallback": {
809
- "type": "string",
810
- "description": "Instead of providing a render_template, a callback function name may be specified to output the block's HTML."
811
- }
812
- }
813
- ]
814
- }
815
- ]
816
- }
817
- }
818
- }