sveltekit-ui 1.0.77 → 1.0.78

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.
@@ -75,2112 +75,6 @@ export const acceptable_storage_mime_types = [
75
75
  "text/markdown",
76
76
  ]
77
77
 
78
- const array_literal = {
79
- kind: "literal",
80
- category: "variables",
81
- name: "Array",
82
- postgres_type: "jsonb",
83
- json_schema: { type: "array" },
84
- validator: (input) => {
85
- // validate tbd
86
- },
87
- }
88
- const array_uniform_literal = {
89
- kind: "literal",
90
- category: "variables",
91
- name: "Array Uniform",
92
- postgres_type: "jsonb",
93
- json_schema: { type: "array" },
94
- validator: (input) => {
95
- // validate tbd
96
- },
97
- }
98
- const object_literal = {
99
- kind: "literal",
100
- category: "variables",
101
- name: "Object",
102
- postgres_type: "jsonb",
103
- json_schema: { type: "object" },
104
- validator: (input) => {
105
- // validate here
106
- },
107
- }
108
- const object_uniform_literal = {
109
- kind: "literal",
110
- category: "variables",
111
- name: "Object Uniform",
112
- postgres_type: "jsonb",
113
- json_schema: { type: "object" },
114
- validator: (input) => {
115
- // validate here
116
- },
117
- }
118
- const text_literal = {
119
- kind: "literal",
120
- category: "variables",
121
- name: "Text",
122
- postgres_type: "text",
123
- json_schema: { type: "string" },
124
- validator: (input) => {
125
- // validate here
126
- },
127
- }
128
- const boolean_literal = {
129
- kind: "literal",
130
- category: "variables",
131
- name: "Boolean",
132
- postgres_type: "boolean",
133
- json_schema: { type: "boolean" },
134
- validator: (input) => {
135
- // validate here
136
- },
137
- }
138
- const int_literal = {
139
- kind: "literal",
140
- category: "variables",
141
- name: "Integer",
142
- postgres_type: "int",
143
- json_schema: { type: "number" },
144
- validator: (input) => {
145
- // validate here
146
- },
147
- }
148
- const bigint_literal = {
149
- kind: "literal",
150
- category: "variables",
151
- name: "Big Integer",
152
- postgres_type: "bigint",
153
- json_schema: { type: "number" },
154
- validator: (input) => {
155
- // validate here
156
- },
157
- }
158
- const null_literal = {
159
- kind: "literal",
160
- category: "variables",
161
- name: "Null",
162
- postgres_type: "jsonb",
163
- json_schema: { type: "null" },
164
- validator: (input) => {
165
- // validate here
166
- },
167
- }
168
- const epoch_literal = {
169
- kind: "literal",
170
- category: "variables",
171
- name: "Epoch",
172
- postgres_type: "bigint",
173
- json_schema: { type: "number", description: "Epoch in seconds" },
174
- validator: (input) => {
175
- // validate here
176
- },
177
- }
178
- const float_literal = {
179
- kind: "literal",
180
- category: "variables",
181
- name: "Float",
182
- postgres_type: "float",
183
- json_schema: { type: "number" },
184
- validator: (input) => {
185
- // validate here
186
- },
187
- }
188
- const color_literal = {
189
- kind: "literal",
190
- category: "variables",
191
- name: "Color",
192
- postgres_type: "jsonb",
193
- json_schema: {
194
- type: "object",
195
- description:
196
- "color parts l (lightness), c (chroma), h (hue), o (opacity) can range from 0-24. An example of a solid black that flips to white in dark mode would be { c: 0, l: 0, h: 0, o: 24, is_dark_theme_invert: true }. Generally use is_dark_theme_invert true, opacity 24, c is chroma and gets probably too vibrant over 14 so 10 is probably a standard amount and 3 if want softer or 0 for white, l is lightness and 0 is black and 24 full light typcally we assume a light backround so you might use something like l 8 for a header text. h is hue and the 0-24 range can be understood as 0: 0 oklch h val, red (pure red), 1: 14 oklch h val, orange-red (red with an orange tint), 2: 29 oklch h val, orange (warm orange), 3: 43 oklch h val, yellow-orange (a deep orange, close to golden), 4: 58 oklch h val, yellow (bright yellow), 5: 72 oklch h val, greenish-yellow (yellow with a slight green tint), 6: 87 oklch h val, yellow-green (green with strong yellow undertones), 7: 101 oklch h val, green (pure green), 8: 116 oklch h val, green-cyan (green shifting toward cyan), 9: 130 oklch h val, cyan (a strong cyan-green color), 10: 145 oklch h val, blue-green (cyan with a blue shift), 11: 159 oklch h val, cyan-blue (a cool blue-leaning cyan), 12: 174 oklch h val, light blue (sky blue, soft and light), 13: 188 oklch h val, blue (pure blue), 14: 203 oklch h val, indigo (a deep blue with hints of purple), 15: 217 oklch h val, blue-violet (a blue shifting toward purple), 16: 232 oklch h val, violet (violet with a blue tint), 17: 246 oklch h val, purple (deep purple), 18: 261 oklch h val, magenta-purple (purple with magenta tones), 19: 275 oklch h val, magenta (deep, vivid magenta), 20: 290 oklch h val, pink-magenta (magenta with a pink hue), 21: 304 oklch h val, pink (a soft, warm pink), 22: 319 oklch h val, pinkish-red (pink leaning toward red), 23: 333 oklch h val, red-pink (vivid red with pink tones), 24: 348 oklch h val, bright red (bright red, slightly pinkish) ",
197
- properties: {
198
- l: { type: "number" },
199
- c: { type: "number" },
200
- h: { type: "number" },
201
- o: { type: "number" },
202
- is_dark_theme_invert: { type: "boolean" },
203
- },
204
- additionalProperties: false,
205
- required: ["l", "c", "h", "o", "is_dark_theme_invert"],
206
- },
207
- validator: (input) => {
208
- // validate here
209
- },
210
- }
211
- const domain_literal = {
212
- kind: "literal",
213
- category: "variables",
214
- name: "Domain",
215
- postgres_type: "text",
216
- json_schema: {
217
- type: "string",
218
- },
219
- validator: (input) => {
220
- // validate here
221
- },
222
- }
223
- const email_address_literal = {
224
- kind: "literal",
225
- category: "variables",
226
- name: "Email Address",
227
- postgres_type: "text",
228
- json_schema: {
229
- type: "string",
230
- // format: "email",
231
- },
232
- validator: (input) => {
233
- // validate here
234
- },
235
- }
236
- const email_address_full_literal = {
237
- kind: "literal",
238
- category: "variables",
239
- name: "Email Address Full",
240
- postgres_type: "jsonb",
241
- json_schema: {
242
- type: "object",
243
- properties: {
244
- domain: domain_literal?.json_schema,
245
- domain_id: text_literal?.json_schema,
246
- account_id: text_literal?.json_schema,
247
- root_domain: domain_literal?.json_schema,
248
- display_name: text_literal?.json_schema,
249
- mailbox_hash: text_literal?.json_schema,
250
- email_address: email_address_literal?.json_schema,
251
- root_email_address: email_address_literal?.json_schema,
252
- epoch_email_address_verified: epoch_literal?.json_schema,
253
- },
254
- additionalProperties: false,
255
- required: ["domain", "root_domain", "mailbox_hash", "email_address", "root_email_address"],
256
- },
257
- validator: (input) => {
258
- // validate here
259
- },
260
- }
261
- const email_attachment_literal = {
262
- kind: "literal",
263
- category: "variables",
264
- name: "Email Attachment",
265
- postgres_type: "jsonb",
266
- json_schema: {
267
- type: "object",
268
- properties: {
269
- name: text_literal?.json_schema,
270
- content: text_literal?.json_schema,
271
- content_id: text_literal?.json_schema,
272
- content_type: text_literal?.json_schema,
273
- },
274
- additionalProperties: false,
275
- required: ["name", "content", "content_id", "content_type"],
276
- },
277
- validator: (input) => {
278
- // validate here
279
- },
280
- }
281
- const json_literal = {
282
- kind: "literal",
283
- category: "variables",
284
- name: "JSON",
285
- postgres_type: "jsonb",
286
- json_schema: {
287
- anyOf: [
288
- { type: "null" },
289
- { type: "boolean" },
290
- { type: "number" },
291
- { type: "string" },
292
- {
293
- type: "array",
294
- items: { $ref: "#/$defs/json_literal" },
295
- },
296
- {
297
- type: "object",
298
- additionalProperties: { $ref: "#/$defs/json_literal" },
299
- },
300
- ],
301
- },
302
- validator: (input) => {
303
- // validate here
304
- },
305
- }
306
- const storage_item_literal = {
307
- kind: "literal",
308
- category: "variables",
309
- name: "Storage Item",
310
- postgres_type: "jsonb",
311
- json_schema: {
312
- type: "object",
313
- properties: {
314
- id: text_literal?.json_schema,
315
- db_epoch_created: epoch_literal?.json_schema,
316
- db_epoch_updated: epoch_literal?.json_schema,
317
- account_id: text_literal?.json_schema,
318
- folder_path: { type: "array", items: text_literal?.json_schema },
319
- file_name: text_literal?.json_schema,
320
- file_extension: text_literal?.json_schema,
321
- mime_type: text_literal?.json_schema,
322
- size_kb: int_literal?.json_schema,
323
- metadata: json_literal?.json_schema,
324
- is_temporary: boolean_literal?.json_schema,
325
- set_to_delete_initiated_at: epoch_literal?.json_schema,
326
- is_public: boolean_literal?.json_schema,
327
- transcription: text_literal?.json_schema,
328
- },
329
- additionalProperties: false,
330
- required: [],
331
- },
332
- validator: (input) => {
333
- // validate here
334
- },
335
- }
336
- const html_literal = {
337
- kind: "literal",
338
- category: "variables",
339
- name: "HTML",
340
- postgres_type: "text",
341
- json_schema: text_literal?.json_schema,
342
- validator: (input) => {
343
- // validate here
344
- },
345
- }
346
- const phone_literal = {
347
- kind: "literal",
348
- category: "variables",
349
- name: "Phone Number",
350
- postgres_type: "jsonb",
351
- json_schema: {
352
- // type: "object",
353
- },
354
- validator: (input) => {
355
- // validate here
356
- },
357
- }
358
- const vector_literal = {
359
- kind: "literal",
360
- category: "variables",
361
- name: "Vector",
362
- postgres_type: "vector",
363
- json_schema: {
364
- type: "array",
365
- items: { type: "number" },
366
- },
367
- validator: (input) => {
368
- // validate here
369
- },
370
- }
371
- const icon_literal = {
372
- kind: "literal",
373
- category: "variables",
374
- name: "Icon",
375
- postgres_type: "jsonb",
376
- json_schema: {
377
- type: "object",
378
- properties: {
379
- icon: text_literal?.json_schema,
380
- color: color_literal?.json_schema,
381
- },
382
- additionalProperties: false,
383
- required: ["icon", "color"],
384
- },
385
- validator: (input) => {
386
- // validate here
387
- },
388
- }
389
- const time_literal = {
390
- kind: "literal",
391
- category: "variables",
392
- name: "Time",
393
- postgres_type: "jsonb",
394
- json_schema: {
395
- type: "object",
396
- properties: {
397
- format: {
398
- type: "string",
399
- description: JSON.stringify(time_formats),
400
- },
401
- epoch: {
402
- anyOf: [
403
- {
404
- type: "number",
405
- description: "epoch in seconds",
406
- },
407
- {
408
- type: "null",
409
- },
410
- ],
411
- description: "derived can keep null",
412
- },
413
- granularity: {
414
- type: "string",
415
- enum: ["year", "month", "week", "day", "hour", "minute", "second"],
416
- description: ["year", "month", "week", "day", "hour", "minute", "second"].join(", "),
417
- },
418
- year: {
419
- anyOf: [
420
- {
421
- type: "number",
422
- },
423
- {
424
- type: "null",
425
- },
426
- ],
427
- description: "derived can keep null",
428
- },
429
- month: {
430
- anyOf: [
431
- {
432
- type: "number",
433
- enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
434
- },
435
- {
436
- type: "null",
437
- },
438
- ],
439
- description: "derived can keep null",
440
- },
441
- day_of_month: {
442
- anyOf: [
443
- {
444
- type: "number",
445
- minimum: 1,
446
- maximum: 31,
447
- },
448
- {
449
- type: "null",
450
- },
451
- ],
452
- description: "derived can keep null",
453
- },
454
- day_of_week: {
455
- anyOf: [
456
- {
457
- type: "number",
458
- enum: [0, 1, 2, 3, 4, 5, 6],
459
- },
460
- {
461
- type: "null",
462
- },
463
- ],
464
- description: "derived can keep null",
465
- },
466
- day_of_year: {
467
- anyOf: [
468
- {
469
- type: "number",
470
- minimum: 1,
471
- maximum: 365,
472
- },
473
- {
474
- type: "null",
475
- },
476
- ],
477
- description: "derived can keep null",
478
- },
479
- week_of_year: {
480
- anyOf: [
481
- {
482
- type: "number",
483
- minimum: 1,
484
- maximum: 52,
485
- },
486
- {
487
- type: "null",
488
- },
489
- ],
490
- description: "derived can keep null",
491
- },
492
- hour: {
493
- anyOf: [
494
- {
495
- type: "number",
496
- minimum: 1,
497
- maximum: 24,
498
- },
499
- {
500
- type: "null",
501
- },
502
- ],
503
- description: "derived can keep null",
504
- },
505
- minute: {
506
- anyOf: [
507
- {
508
- type: "number",
509
- minimum: 1,
510
- maximum: 60,
511
- },
512
- {
513
- type: "null",
514
- },
515
- ],
516
- description: "derived can keep null",
517
- },
518
- timezone: {
519
- anyOf: [
520
- {
521
- type: "string",
522
- description: time_zone_options.map((h) => h?.key).join(", "),
523
- },
524
- {
525
- type: "null",
526
- },
527
- ],
528
- description: "derived can keep null",
529
- },
530
- content: {
531
- anyOf: [
532
- {
533
- type: "string",
534
- },
535
- {
536
- type: "null",
537
- },
538
- ],
539
- description: "derived can keep null",
540
- },
541
- datetime: {
542
- anyOf: [
543
- {
544
- type: "string",
545
- },
546
- {
547
- type: "null",
548
- },
549
- ],
550
- description: "derived can keep null",
551
- },
552
- },
553
- additionalProperties: false,
554
- required: ["epoch"],
555
- },
556
- validator: (input) => {
557
- // validate here
558
- },
559
- }
560
- const time_zone_literal = {
561
- kind: "literal",
562
- category: "variables",
563
- name: "Time Zone",
564
- postgres_type: "text",
565
- json_schema: text_literal?.json_schema,
566
- validator: (input) => {
567
- // validate here
568
- },
569
- }
570
- const location_literal = {
571
- kind: "literal",
572
- category: "variables",
573
- name: "Location Apple",
574
- postgres_type: "jsonb",
575
- json_schema: {
576
- type: "object",
577
- properties: {
578
- place_id: { type: "string" },
579
- name: { type: "string" },
580
- muid: { type: "string" },
581
- latitude: { type: "number" },
582
- longitude: { type: "number" },
583
- formatted_address: { type: "string" },
584
- country: { type: "string" },
585
- country_code: { type: "string" },
586
- administrative_area: { type: "string" },
587
- administrative_area_code: { type: "string" },
588
- locality: { type: "string" },
589
- sub_locality: { type: "string" },
590
- full_thoroughfare: { type: "string" },
591
- },
592
- required: ["latitude", "longitude", "name"],
593
- additionalProperties: false,
594
- },
595
- validator: (input) => {
596
- // validate here
597
- },
598
- }
599
- const cron_literal = {
600
- kind: "literal",
601
- category: "variables",
602
- name: "Cron",
603
- postgres_type: "jsonb",
604
- json_schema: {
605
- type: "object",
606
- properties: {
607
- content: { type: "string" },
608
- cron: { type: "string" },
609
- minute: { type: "string" },
610
- hour: { type: "string" },
611
- day_of_month: { type: "string" },
612
- month: { type: "string" },
613
- day_of_week: { type: "string" },
614
- },
615
- additionalProperties: false,
616
- required: [],
617
- },
618
- validator: (input) => {
619
- // validate here
620
- },
621
- }
622
- const variable_path_literal = {
623
- kind: "literal",
624
- category: "variables",
625
- name: "Variable Path",
626
- postgres_type: "jsonb",
627
- json_schema: {
628
- type: "array",
629
- description: "The path to the value within variables.",
630
- items: {
631
- anyOf: [
632
- {
633
- type: "string",
634
- },
635
- {
636
- type: "number",
637
- },
638
- {
639
- type: "array",
640
- items: {
641
- anyOf: [
642
- {
643
- type: "string",
644
- },
645
- {
646
- type: "number",
647
- },
648
- ],
649
- },
650
- },
651
- ],
652
- },
653
- },
654
- validator: (input) => {
655
- // validate here
656
- },
657
- }
658
- const content_literal = {
659
- kind: "literal",
660
- category: "variables",
661
- name: "Content",
662
- postgres_type: "jsonb",
663
- // json_schema: get_content_node_json_schema("content_literal"),
664
- validator: (input) => {
665
- // validate here
666
- },
667
- }
668
- const table_id_for_foreign_row_literal = {
669
- kind: "literal",
670
- category: "variables",
671
- name: "Table ID for Foreign Row",
672
- postgres_type: "text",
673
- // json_schema: get_content_node_json_schema("content_literal"),
674
- validator: (input) => {
675
- // validate here
676
- },
677
- }
678
- // image_literal
679
- // audio_literal
680
- // file_literal
681
- // dropdown_literal
682
- // text_array_literal
683
- // function_literal
684
-
685
- export const literal_types = {
686
- array_literal,
687
- array_uniform_literal,
688
- object_literal,
689
- object_uniform_literal,
690
- text_literal,
691
- boolean_literal,
692
- int_literal,
693
- bigint_literal,
694
- null_literal,
695
- epoch_literal,
696
- float_literal,
697
- color_literal,
698
- json_literal,
699
- domain_literal,
700
- email_address_literal,
701
- email_address_full_literal,
702
- email_attachment_literal,
703
- storage_item_literal,
704
- html_literal,
705
- phone_literal,
706
- vector_literal,
707
- icon_literal,
708
- time_literal,
709
- time_zone_literal,
710
- location_literal,
711
- cron_literal,
712
- content_literal,
713
- table_id_for_foreign_row_literal,
714
- variable_path_literal,
715
- }
716
-
717
- export const main_child_element_options = {
718
- slot: { display_order: 0, child_min_limit: 0, child_max_limit: 99 },
719
- loop: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
720
- div: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
721
- section: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
722
- show_conditions: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
723
- header: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
724
- footer: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
725
- h1: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
726
- h2: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
727
- h3: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
728
- h4: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
729
- h5: { display_order: 13, child_min_limit: 0, child_max_limit: 99 },
730
- h6: { display_order: 14, child_min_limit: 0, child_max_limit: 99 },
731
- p: { display_order: 15, child_min_limit: 0, child_max_limit: 99 },
732
- br: { display_order: 16, child_min_limit: 0, child_max_limit: 99 },
733
- base_text: { display_order: 17, child_min_limit: 0, child_max_limit: 99 },
734
- span: { display_order: 18, child_min_limit: 0, child_max_limit: 99 },
735
- strong: { display_order: 19, child_min_limit: 0, child_max_limit: 99 },
736
- em: { display_order: 20, child_min_limit: 0, child_max_limit: 99 },
737
- strong_em: { display_order: 21, child_min_limit: 0, child_max_limit: 99 },
738
- link: { display_order: 22, child_min_limit: 0, child_max_limit: 99 },
739
- q: { display_order: 23, child_min_limit: 0, child_max_limit: 99 },
740
- mark: { display_order: 24, child_min_limit: 0, child_max_limit: 99 },
741
- s: { display_order: 25, child_min_limit: 0, child_max_limit: 99 },
742
- blockquote: { display_order: 26, child_min_limit: 0, child_max_limit: 99 },
743
- ul: { display_order: 27, child_min_limit: 0, child_max_limit: 99 },
744
- ol: { display_order: 28, child_min_limit: 0, child_max_limit: 99 },
745
- figure: { display_order: 29, child_min_limit: 0, child_max_limit: 99 },
746
- picture: { display_order: 30, child_min_limit: 0, child_max_limit: 99 },
747
- image: { display_order: 32, child_min_limit: 0, child_max_limit: 99 },
748
- audio: { display_order: 34, child_min_limit: 0, child_max_limit: 99 },
749
- video: { display_order: 35, child_min_limit: 0, child_max_limit: 99 },
750
- youtube_video: { display_order: 36, child_min_limit: 0, child_max_limit: 99 },
751
- x_post: { display_order: 37, child_min_limit: 0, child_max_limit: 99 },
752
- table: { display_order: 38, child_min_limit: 0, child_max_limit: 99 },
753
- table_advanced: { display_order: 39, child_min_limit: 0, child_max_limit: 99 },
754
- hr: { display_order: 40, child_min_limit: 0, child_max_limit: 99 },
755
- qr: { display_order: 41, child_min_limit: 0, child_max_limit: 99 },
756
- code: { display_order: 42, child_min_limit: 0, child_max_limit: 99 },
757
- code_inline: { display_order: 43, child_min_limit: 0, child_max_limit: 99 },
758
- pre: { display_order: 44, child_min_limit: 0, child_max_limit: 99 },
759
- json: { display_order: 45, child_min_limit: 0, child_max_limit: 99 },
760
- email_address: { display_order: 46, child_min_limit: 0, child_max_limit: 99 },
761
- email_address_input: { display_order: 47, child_min_limit: 0, child_max_limit: 99 },
762
- phone_number: { display_order: 48, child_min_limit: 0, child_max_limit: 99 },
763
- phone_number_input: { display_order: 49, child_min_limit: 0, child_max_limit: 99 },
764
- time: { display_order: 50, child_min_limit: 0, child_max_limit: 99 },
765
- time_input: { display_order: 51, child_min_limit: 0, child_max_limit: 99 },
766
- text_input: { display_order: 52, child_min_limit: 0, child_max_limit: 99 },
767
- location: { display_order: 53, child_min_limit: 0, child_max_limit: 99 },
768
- location_input: { display_order: 54, child_min_limit: 0, child_max_limit: 99 },
769
- slider: { display_order: 55, child_min_limit: 0, child_max_limit: 99 },
770
- checkbox: { display_order: 56, child_min_limit: 0, child_max_limit: 99 },
771
- number: { display_order: 57, child_min_limit: 0, child_max_limit: 99 },
772
- icon: { display_order: 58, child_min_limit: 0, child_max_limit: 99 },
773
- icon_input: { display_order: 59, child_min_limit: 0, child_max_limit: 99 },
774
- dropdown: { display_order: 60, child_min_limit: 0, child_max_limit: 99 },
775
- file: { display_order: 61, child_min_limit: 0, child_max_limit: 99 },
776
- file_input: { display_order: 62, child_min_limit: 0, child_max_limit: 99 },
777
- cron: { display_order: 64, child_min_limit: 0, child_max_limit: 99 },
778
- cron_input: { display_order: 65, child_min_limit: 0, child_max_limit: 99 },
779
- color: { display_order: 67, child_min_limit: 0, child_max_limit: 99 },
780
- color_input: { display_order: 68, child_min_limit: 0, child_max_limit: 99 },
781
- tag: { display_order: 69, child_min_limit: 0, child_max_limit: 99 },
782
- }
783
-
784
- export const content_types = {
785
- slot: {
786
- kind: "content",
787
- category: "content",
788
- name: "Slot",
789
- display_order: 0,
790
- attributes: {
791
- val: { type: "text_literal" },
792
- },
793
- child_elements: {},
794
- },
795
- loop: {
796
- kind: "content",
797
- category: "variables",
798
- name: "Loop",
799
- display_order: 0,
800
- child_elements: {
801
- ...main_child_element_options,
802
- },
803
- validator: (input) => {
804
- // validate tbd
805
- },
806
- },
807
- div: {
808
- kind: "content",
809
- category: "content",
810
- name: "Div",
811
- display_order: 1,
812
- attributes: {
813
- background_color: {
814
- type: "color_literal",
815
- display_name: "Background Color",
816
- },
817
- border_color: {
818
- type: "color_literal",
819
- display_name: "Border Color",
820
- },
821
- border_radius: {
822
- type: "float_literal",
823
- display_name: "Border Radius",
824
- },
825
- padding: {
826
- type: "float_literal",
827
- display_name: "Padding",
828
- },
829
- align_content: {
830
- type: "text_literal",
831
- display_name: "Align Content",
832
- },
833
- justify_content: {
834
- type: "text_literal",
835
- display_name: "Justify Content",
836
- },
837
- gap: {
838
- type: "float_literal",
839
- display_name: "Gap",
840
- },
841
- },
842
- child_elements: {
843
- ...main_child_element_options,
844
- },
845
- },
846
- section: {
847
- kind: "content",
848
- category: "content",
849
- name: "Section",
850
- display_order: 2,
851
- attributes: {
852
- background_color: {
853
- type: "color_literal",
854
- display_name: "Background Color",
855
- },
856
- border_color: {
857
- type: "color_literal",
858
- display_name: "Border Color",
859
- },
860
- border_radius: {
861
- display_name: "Border Radius",
862
- json_schema: {
863
- description: "border radius number used as rem units. Typically 1 should be good",
864
- type: "number",
865
- },
866
- },
867
- padding: {
868
- display_name: "Padding",
869
- json_schema: {
870
- description: "padding number used as rem units. Typically 1 should be good",
871
- type: "number",
872
- },
873
- },
874
- },
875
- child_elements: {
876
- div: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
877
- header: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
878
- h1: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
879
- h2: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
880
- h3: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
881
- h4: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
882
- h5: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
883
- h6: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
884
- p: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
885
- ul: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
886
- ol: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
887
- table: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
888
- table_advanced: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
889
- figure: { display_order: 13, child_min_limit: 0, child_max_limit: 99 },
890
- image: { display_order: 14, child_min_limit: 0, child_max_limit: 99 },
891
- audio: { display_order: 16, child_min_limit: 0, child_max_limit: 99 },
892
- video: { display_order: 15, child_min_limit: 0, child_max_limit: 99 },
893
- code: { display_order: 17, child_min_limit: 0, child_max_limit: 99 },
894
- blockquote: { display_order: 18, child_min_limit: 0, child_max_limit: 99 },
895
- pre: { display_order: 19, child_min_limit: 0, child_max_limit: 99 },
896
- hr: { display_order: 20, child_min_limit: 0, child_max_limit: 99 },
897
- footer: { display_order: 21, child_min_limit: 0, child_max_limit: 99 },
898
- youtube_video: { display_order: 22, child_min_limit: 0, child_max_limit: 99 },
899
- x_post: { display_order: 23, child_min_limit: 0, child_max_limit: 99 },
900
- time: { display_order: 24, child_min_limit: 0, child_max_limit: 99 },
901
- location: { display_order: 25, child_min_limit: 0, child_max_limit: 99 },
902
- json: { display_order: 26, child_min_limit: 0, child_max_limit: 99 },
903
- },
904
- },
905
- show_conditions: {
906
- kind: "content",
907
- category: "content",
908
- name: "Show Conditions",
909
- display_order: 1,
910
- attributes: {
911
- is_run_serverside: {
912
- type: "boolean_literal",
913
- display_name: "Is Run Serverside",
914
- default: false,
915
- },
916
- },
917
- child_elements: {
918
- show_conditions_item: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
919
- show_conditions_item_else: { display_order: 1, child_min_limit: 0, child_max_limit: 1 },
920
- },
921
- },
922
- show_conditions_item: {
923
- kind: "content",
924
- category: "content",
925
- name: "Show Conditions Item",
926
- display_order: 1,
927
- attributes: {
928
- is_show: {
929
- type: "boolean_literal",
930
- display_name: "Is Show",
931
- },
932
- },
933
- child_elements: {
934
- ...main_child_element_options,
935
- },
936
- },
937
- show_conditions_item_else: {
938
- kind: "content",
939
- category: "content",
940
- name: "Show Conditions Item Else",
941
- display_order: 1,
942
- attributes: {},
943
- child_elements: {
944
- ...main_child_element_options,
945
- },
946
- },
947
- header: {
948
- kind: "content",
949
- category: "content",
950
- name: "Header",
951
- display_order: 3,
952
- attributes: {},
953
- child_elements: {
954
- h1: { display_order: 1, child_min_limit: 1, child_max_limit: 1 },
955
- h2: { display_order: 2, child_min_limit: 0, child_max_limit: 1 },
956
- },
957
- },
958
- h1: {
959
- kind: "content",
960
- category: "content",
961
- name: "Heading 1",
962
- display_order: 4,
963
- attributes: {},
964
- child_elements: {
965
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
966
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
967
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
968
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
969
- },
970
- },
971
- h2: {
972
- kind: "content",
973
- category: "content",
974
- name: "Heading 2",
975
- display_order: 5,
976
- attributes: {},
977
- child_elements: {
978
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
979
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
980
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
981
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
982
- },
983
- },
984
- h3: {
985
- kind: "content",
986
- category: "content",
987
- name: "Heading 3",
988
- display_order: 6,
989
- attributes: {},
990
- child_elements: {
991
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
992
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
993
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
994
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
995
- },
996
- },
997
- h4: {
998
- kind: "content",
999
- category: "content",
1000
- name: "Heading 4",
1001
- display_order: 7,
1002
- attributes: {},
1003
- child_elements: {
1004
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1005
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1006
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1007
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1008
- },
1009
- },
1010
- h5: {
1011
- kind: "content",
1012
- category: "content",
1013
- name: "Heading 5",
1014
- display_order: 8,
1015
- attributes: {},
1016
- child_elements: {
1017
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1018
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1019
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1020
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1021
- },
1022
- },
1023
- h6: {
1024
- kind: "content",
1025
- category: "content",
1026
- name: "Heading 6",
1027
- display_order: 9,
1028
- attributes: {},
1029
- child_elements: {
1030
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1031
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1032
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1033
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1034
- },
1035
- },
1036
- p: {
1037
- kind: "content",
1038
- category: "content",
1039
- name: "Paragraph",
1040
- display_order: 10,
1041
- attributes: {},
1042
- child_elements: {
1043
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1044
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1045
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1046
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1047
- link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1048
- ref: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1049
- q: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1050
- span: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1051
- sub: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1052
- sup: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1053
- s: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
1054
- mark: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
1055
- code_inline: { display_order: 13, child_min_limit: 0, child_max_limit: 99 },
1056
- br: { display_order: 14, child_min_limit: 0, child_max_limit: 99 },
1057
- time: { display_order: 15, child_min_limit: 0, child_max_limit: 99 },
1058
- location: { display_order: 16, child_min_limit: 0, child_max_limit: 99 },
1059
- number: { display_order: 17, child_min_limit: 0, child_max_limit: 99 },
1060
- color: { display_order: 18, child_min_limit: 0, child_max_limit: 99 },
1061
- },
1062
- },
1063
- base_text: {
1064
- kind: "content",
1065
- category: "content",
1066
- name: "Base Text",
1067
- display_order: 11,
1068
- attributes: {
1069
- content: { type: "text_literal" },
1070
- text_color: { type: "color_literal" },
1071
- },
1072
- child_elements: {},
1073
- },
1074
- span: {
1075
- kind: "content",
1076
- category: "content",
1077
- name: "Span",
1078
- display_order: 12,
1079
- attributes: {},
1080
- child_elements: {},
1081
- },
1082
- strong: {
1083
- kind: "content",
1084
- category: "content",
1085
- name: "Strong Text",
1086
- display_order: 13,
1087
- attributes: {
1088
- content: { type: "text_literal" },
1089
- text_color: { type: "color_literal" },
1090
- },
1091
- child_elements: {},
1092
- },
1093
- em: {
1094
- kind: "content",
1095
- category: "content",
1096
- name: "Emphasized Text",
1097
- display_order: 14,
1098
- attributes: {
1099
- content: { type: "text_literal" },
1100
- text_color: { type: "color_literal" },
1101
- },
1102
- child_elements: {},
1103
- },
1104
- strong_em: {
1105
- kind: "content",
1106
- category: "content",
1107
- name: "Strong Emphasized Text",
1108
- display_order: 15,
1109
- attributes: {
1110
- content: { type: "text_literal" },
1111
- text_color: { type: "color_literal" },
1112
- },
1113
- child_elements: {},
1114
- },
1115
- link: {
1116
- kind: "content",
1117
- category: "content",
1118
- name: "Link",
1119
- display_order: 16,
1120
- attributes: {
1121
- href: { type: "text_literal" },
1122
- display_text: { type: "text_literal" },
1123
- text_color: { type: "color_literal" },
1124
- is_show_preview: { type: "boolean_literal" },
1125
- },
1126
- child_elements: {
1127
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1128
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1129
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1130
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1131
- ref: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1132
- q: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1133
- span: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1134
- sub: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1135
- sup: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1136
- s: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
1137
- mark: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
1138
- code_inline: { display_order: 13, child_min_limit: 0, child_max_limit: 99 },
1139
- br: { display_order: 14, child_min_limit: 0, child_max_limit: 99 },
1140
- time: { display_order: 15, child_min_limit: 0, child_max_limit: 99 },
1141
- location: { display_order: 16, child_min_limit: 0, child_max_limit: 99 },
1142
- number: { display_order: 17, child_min_limit: 0, child_max_limit: 99 },
1143
- color: { display_order: 18, child_min_limit: 0, child_max_limit: 99 },
1144
- },
1145
- },
1146
- q: {
1147
- kind: "content",
1148
- category: "content",
1149
- name: "Quotation",
1150
- display_order: 17,
1151
- attributes: {
1152
- href: { type: "text_literal" },
1153
- content: { type: "text_literal" },
1154
- text_color: { type: "color_literal" },
1155
- },
1156
- child_elements: {},
1157
- },
1158
- mark: {
1159
- kind: "content",
1160
- category: "content",
1161
- name: "Mark",
1162
- display_order: 18,
1163
- attributes: {},
1164
- child_elements: {
1165
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1166
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1167
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1168
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1169
- link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1170
- ref: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1171
- q: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1172
- span: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1173
- code_inline: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1174
- sub: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1175
- sup: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
1176
- s: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
1177
- },
1178
- },
1179
- s: {
1180
- kind: "content",
1181
- category: "content",
1182
- name: "Strikethrough",
1183
- display_order: 19,
1184
- attributes: {},
1185
- child_elements: {
1186
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1187
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1188
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1189
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1190
- link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1191
- q: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1192
- span: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1193
- code_inline: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1194
- sub: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1195
- sup: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1196
- },
1197
- },
1198
- blockquote: {
1199
- kind: "content",
1200
- category: "content",
1201
- name: "Blockquote",
1202
- display_order: 20,
1203
- attributes: {
1204
- cite: { type: "text_literal", display_name: "cite", default_value: null, display_order: 0 },
1205
- },
1206
- child_elements: {
1207
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1208
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1209
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1210
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1211
- link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1212
- ref: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1213
- q: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1214
- span: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1215
- sub: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1216
- sup: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1217
- s: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
1218
- mark: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
1219
- p: { display_order: 13, child_min_limit: 0, child_max_limit: 99 },
1220
- ul: { display_order: 14, child_min_limit: 0, child_max_limit: 99 },
1221
- ol: { display_order: 15, child_min_limit: 0, child_max_limit: 99 },
1222
- code_inline: { display_order: 16, child_min_limit: 0, child_max_limit: 9 },
1223
- },
1224
- },
1225
- ul: {
1226
- kind: "content",
1227
- category: "content",
1228
- name: "Unordered List",
1229
- display_order: 21,
1230
- attributes: {},
1231
- child_elements: {
1232
- li: { display_order: 1, child_min_limit: 1, child_max_limit: 999 },
1233
- },
1234
- },
1235
- ol: {
1236
- kind: "content",
1237
- category: "content",
1238
- name: "Ordered List",
1239
- display_order: 22,
1240
- attributes: {},
1241
- child_elements: {
1242
- li: { display_order: 1, child_min_limit: 1, child_max_limit: 999 },
1243
- },
1244
- },
1245
- li: {
1246
- kind: "content",
1247
- category: "content",
1248
- name: "List Item",
1249
- display_order: 23,
1250
- attributes: {},
1251
- child_elements: {
1252
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1253
- em: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1254
- strong: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1255
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1256
- link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1257
- image: { display_order: 6, child_min_limit: 0, child_max_limit: 9 },
1258
- audio: { display_order: 6, child_min_limit: 0, child_max_limit: 9 },
1259
- br: { display_order: 7, child_min_limit: 0, child_max_limit: 9 },
1260
- q: { display_order: 8, child_min_limit: 0, child_max_limit: 9 },
1261
- s: { display_order: 9, child_min_limit: 0, child_max_limit: 9 },
1262
- mark: { display_order: 10, child_min_limit: 0, child_max_limit: 9 },
1263
- span: { display_order: 11, child_min_limit: 0, child_max_limit: 9 },
1264
- code_inline: { display_order: 12, child_min_limit: 0, child_max_limit: 9 },
1265
- time: { display_order: 13, child_min_limit: 0, child_max_limit: 9 },
1266
- location: { display_order: 14, child_min_limit: 0, child_max_limit: 9 },
1267
- ...main_child_element_options, // tbd
1268
- },
1269
- },
1270
- figure: {
1271
- kind: "content",
1272
- category: "content",
1273
- name: "Figure",
1274
- display_order: 24,
1275
- attributes: {
1276
- caption: { type: "text_literal" },
1277
- },
1278
- child_elements: {
1279
- picture: { display_order: 1, child_min_limit: 0, child_max_limit: 1 },
1280
- video: { display_order: 2, child_min_limit: 0, child_max_limit: 1 },
1281
- audio: { display_order: 3, child_min_limit: 0, child_max_limit: 1 },
1282
- blockquote: { display_order: 4, child_min_limit: 0, child_max_limit: 1 },
1283
- },
1284
- },
1285
- picture: {
1286
- kind: "content",
1287
- category: "content",
1288
- name: "Picture",
1289
- display_order: 25,
1290
- attributes: {},
1291
- child_elements: {
1292
- source: { display_order: 1, child_min_limit: 1, child_max_limit: 9 },
1293
- },
1294
- },
1295
- source: {
1296
- kind: "content",
1297
- category: "content",
1298
- name: "Source",
1299
- display_order: 26,
1300
- attributes: {
1301
- alt: { type: "text_literal" },
1302
- name: { type: "text_literal" },
1303
- width: { type: "int_literal" },
1304
- height: { type: "int_literal" },
1305
- file_type: { type: "text_literal" },
1306
- storage_id: { type: "text_literal" },
1307
- aspect_ratio: { type: "float_literal" },
1308
- },
1309
- child_elements: {},
1310
- },
1311
- image: {
1312
- kind: "content",
1313
- category: "content",
1314
- name: "Image",
1315
- display_order: 27,
1316
- attributes: {
1317
- alt: { type: "text_literal" },
1318
- name: { type: "text_literal" },
1319
- width: { type: "int_literal" },
1320
- height: { type: "int_literal" },
1321
- mime_type: { type: "text_literal" },
1322
- storage_id: { type: "text_literal" },
1323
- aspect_ratio: { type: "float_literal" },
1324
- is_storage_id_public: { type: "boolean_literal" },
1325
- src: { type: "text_literal" },
1326
- src_quick: { type: "text_literal" },
1327
- display_max_height: { type: "int_literal" },
1328
- display_max_width: { type: "int_literal" },
1329
- border_radius: { type: "float_literal" },
1330
- bg_img_blur: { type: "float_literal" },
1331
- bg_img_opacity: { type: "float_literal" },
1332
- },
1333
- child_elements: {},
1334
- },
1335
- audio: {
1336
- kind: "content",
1337
- category: "content",
1338
- name: "Audio",
1339
- display_order: 29,
1340
- attributes: {
1341
- ui_type: { type: "text_literal" },
1342
- storage_id: { type: "text_literal" },
1343
- is_storage_id_public: { type: "boolean_literal" },
1344
- src: { type: "text_literal" },
1345
- mime_type: { type: "text_literal" },
1346
- title: { type: "text_literal" },
1347
- album: { type: "text_literal" },
1348
- artist: { type: "text_literal" },
1349
- image_storage_id: { type: "text_literal" },
1350
- image_is_storage_id_public: { type: "boolean_literal" },
1351
- image_src: { type: "text_literal" },
1352
- image_src_quick: { type: "text_literal" },
1353
- image_mime_type: { type: "text_literal" },
1354
- image_width: { type: "int_literal" },
1355
- image_height: { type: "int_literal" },
1356
- image_aspect_ratio: { type: "float_literal" },
1357
- },
1358
- child_elements: {},
1359
- },
1360
- video: {
1361
- // tbd
1362
- kind: "content",
1363
- category: "content",
1364
- name: "Video",
1365
- display_order: 28,
1366
- attributes: {},
1367
- child_elements: {},
1368
- },
1369
- qr: {
1370
- kind: "content",
1371
- category: "content",
1372
- name: "QR",
1373
- display_order: 29,
1374
- attributes: {
1375
- margin: {
1376
- type: "int_literal",
1377
- minimum: 0,
1378
- maximum: 50,
1379
- default: 10,
1380
- },
1381
- size: {
1382
- type: "int_literal",
1383
- minimum: 50,
1384
- maximum: 500,
1385
- default: 200,
1386
- },
1387
- image_size: {
1388
- type: "float_literal",
1389
- minimum: 0.1,
1390
- maximum: 1,
1391
- default: 0.5,
1392
- },
1393
- type_number: {
1394
- type: "int_literal",
1395
- minimum: 0,
1396
- maximum: 4,
1397
- default: 0,
1398
- },
1399
- error_correction_level: {
1400
- type: "text_literal",
1401
- enum: ["L", "M", "Q", "H"],
1402
- default: "M",
1403
- },
1404
- color: { type: "color_literal", default: "var(--primary-t)" },
1405
- corner_color: {
1406
- type: "color_literal",
1407
- default: "color-mix(in oklab, var(--primary-t), var(--bg) 20%)",
1408
- },
1409
- background_color: {
1410
- type: "color_literal",
1411
- default: "var(--shadow1-t)",
1412
- },
1413
- border_color: {
1414
- type: "color_literal",
1415
- default: "var(--shadow7-t)",
1416
- },
1417
- border_radius: {
1418
- type: "int_literal",
1419
- minimum: 0,
1420
- maximum: 10,
1421
- default: 5,
1422
- },
1423
- border_width: {
1424
- type: "int_literal",
1425
- minimum: 0,
1426
- maximum: 3,
1427
- default: 5,
1428
- },
1429
- data: { type: "text_literal" },
1430
- image: {
1431
- type: "image_literal",
1432
- },
1433
- extension: {
1434
- type: "text_literal",
1435
- enum: ["svg", "png", "jpeg"],
1436
- default: "svg",
1437
- },
1438
- quality: {
1439
- type: "float_literal",
1440
- minimum: 0,
1441
- maximum: 1,
1442
- default: 0.8,
1443
- },
1444
- },
1445
- child_elements: {},
1446
- },
1447
- table: {
1448
- kind: "content",
1449
- category: "content",
1450
- name: "Table",
1451
- display_order: 30,
1452
- attributes: {
1453
- caption: { type: "text_literal" },
1454
- },
1455
- child_elements: {
1456
- thead: { display_order: 1, child_min_limit: 1, child_max_limit: 1 },
1457
- tbody: { display_order: 2, child_min_limit: 1, child_max_limit: 1 },
1458
- tfoot: { display_order: 3, child_min_limit: 0, child_max_limit: 1 },
1459
- },
1460
- },
1461
- thead: {
1462
- kind: "content",
1463
- category: "content",
1464
- name: "Table Header",
1465
- display_order: 31,
1466
- attributes: {},
1467
- child_elements: {
1468
- tr: { display_order: 1, child_min_limit: 1, child_max_limit: 1 },
1469
- },
1470
- },
1471
- tbody: {
1472
- kind: "content",
1473
- category: "content",
1474
- name: "Table Body",
1475
- display_order: 32,
1476
- attributes: {},
1477
- child_elements: {
1478
- tr: { display_order: 1, child_min_limit: 1, child_max_limit: 999 },
1479
- },
1480
- },
1481
- tfoot: {
1482
- kind: "content",
1483
- category: "content",
1484
- name: "Table Footer",
1485
- display_order: 33,
1486
- attributes: {},
1487
- child_elements: {
1488
- tr: { display_order: 1, child_min_limit: 0, child_max_limit: 1 },
1489
- },
1490
- },
1491
- tr: {
1492
- kind: "content",
1493
- category: "content",
1494
- name: "Table Row",
1495
- display_order: 34,
1496
- attributes: {},
1497
- child_elements: {
1498
- th: { display_order: 1, child_min_limit: 1, child_max_limit: 999 },
1499
- td: { display_order: 2, child_min_limit: 1, child_max_limit: 999 },
1500
- },
1501
- },
1502
- th: {
1503
- kind: "content",
1504
- category: "content",
1505
- name: "Table Head Cell",
1506
- display_order: 35,
1507
- attributes: {},
1508
- child_elements: {
1509
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1510
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1511
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1512
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1513
- },
1514
- },
1515
- td: {
1516
- kind: "content",
1517
- category: "content",
1518
- name: "Table Body Cell",
1519
- display_order: 36,
1520
- attributes: {},
1521
- child_elements: {
1522
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1523
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1524
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1525
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1526
- link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1527
- ref: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1528
- q: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1529
- span: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1530
- br: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1531
- sub: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1532
- sup: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
1533
- s: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
1534
- mark: { display_order: 13, child_min_limit: 0, child_max_limit: 99 },
1535
- p: { display_order: 14, child_min_limit: 0, child_max_limit: 99 },
1536
- ul: { display_order: 15, child_min_limit: 0, child_max_limit: 99 },
1537
- ol: { display_order: 16, child_min_limit: 0, child_max_limit: 99 },
1538
- code_inline: { display_order: 17, child_min_limit: 0, child_max_limit: 99 },
1539
- code: { display_order: 18, child_min_limit: 0, child_max_limit: 99 },
1540
- figure: { display_order: 19, child_min_limit: 0, child_max_limit: 99 },
1541
- image: { display_order: 20, child_min_limit: 0, child_max_limit: 99 },
1542
- time: { display_order: 21, child_min_limit: 0, child_max_limit: 99 },
1543
- location: { display_order: 22, child_min_limit: 0, child_max_limit: 99 },
1544
- },
1545
- },
1546
- nav: {
1547
- kind: "content",
1548
- category: "content",
1549
- name: "Navigation",
1550
- display_order: 37,
1551
- attributes: {},
1552
- child_elements: {},
1553
- },
1554
- code: {
1555
- kind: "content",
1556
- category: "content",
1557
- name: "Code Block",
1558
- display_order: 38,
1559
- attributes: {
1560
- content: { type: "text_literal" },
1561
- language: { type: "text_literal" },
1562
- },
1563
- child_elements: {},
1564
- },
1565
- code_inline: {
1566
- kind: "content",
1567
- category: "content",
1568
- name: "Code Inline",
1569
- display_order: 39,
1570
- attributes: {
1571
- content: { type: "text_literal" },
1572
- color: { type: "color_literal" },
1573
- },
1574
- child_elements: {},
1575
- },
1576
- br: {
1577
- kind: "content",
1578
- category: "content",
1579
- name: "Line Break",
1580
- display_order: 40,
1581
- attributes: {},
1582
- child_elements: {},
1583
- },
1584
- spacer: {
1585
- kind: "content",
1586
- category: "content",
1587
- name: "Spacer",
1588
- display_order: 40,
1589
- attributes: {
1590
- mt: { type: "float_literal" },
1591
- mb: { type: "float_literal" },
1592
- ml: { type: "float_literal" },
1593
- mr: { type: "float_literal" },
1594
- is_vert: { type: "boolean_literal" },
1595
- color: { type: "color_literal" },
1596
- },
1597
- child_elements: {},
1598
- },
1599
- hr: {
1600
- kind: "content",
1601
- category: "content",
1602
- name: "Horizontal Rule",
1603
- display_order: 41,
1604
- attributes: {},
1605
- child_elements: {},
1606
- },
1607
- sub: {
1608
- kind: "content",
1609
- category: "content",
1610
- name: "Subscript",
1611
- display_order: 42,
1612
- attributes: {},
1613
- child_elements: {
1614
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1615
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1616
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1617
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1618
- link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1619
- q: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1620
- span: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1621
- s: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1622
- mark: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1623
- },
1624
- },
1625
- sup: {
1626
- kind: "content",
1627
- category: "content",
1628
- name: "Superscript",
1629
- display_order: 43,
1630
- attributes: {},
1631
- child_elements: {
1632
- base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1633
- strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1634
- em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1635
- strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1636
- link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1637
- q: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1638
- span: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1639
- s: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1640
- mark: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1641
- },
1642
- },
1643
- pre: {
1644
- kind: "content",
1645
- category: "content",
1646
- name: "Preformatted Text",
1647
- display_order: 44,
1648
- attributes: {},
1649
- child_elements: {},
1650
- },
1651
- ref: {
1652
- kind: "content",
1653
- category: "content",
1654
- name: "Reference",
1655
- display_order: 45,
1656
- attributes: {
1657
- href: { type: "text_literal" },
1658
- content: { type: "text_literal" },
1659
- text_color: { type: "color_literal" },
1660
- },
1661
- child_elements: {},
1662
- },
1663
- footer: {
1664
- kind: "content",
1665
- category: "content",
1666
- name: "Footer",
1667
- display_order: 46,
1668
- attributes: {},
1669
- child_elements: {
1670
- ol: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1671
- ul: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1672
- p: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1673
- h4: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1674
- h5: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1675
- h6: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1676
- },
1677
- },
1678
- youtube_video: {
1679
- kind: "content",
1680
- category: "content",
1681
- name: "YouTube Video",
1682
- display_order: 47,
1683
- attributes: {
1684
- id: { type: "text_literal" },
1685
- video_id: { type: "text_literal" },
1686
- is_dark_theme: { type: "boolean_literal" },
1687
- },
1688
- child_elements: {},
1689
- },
1690
- x_post: {
1691
- kind: "content",
1692
- category: "content",
1693
- name: "X Post",
1694
- display_order: 48,
1695
- attributes: {
1696
- post_id: { type: "text_literal" },
1697
- },
1698
- child_elements: {},
1699
- },
1700
- table_advanced: {
1701
- kind: "content",
1702
- category: "content",
1703
- name: "Table Advanced",
1704
- display_order: 51,
1705
- attributes: {
1706
- // obviously this is way off just pasted in to start
1707
- columns: {
1708
- type: "object",
1709
- properties: {
1710
- id: { type: "text_literal" },
1711
- description: { type: "text_literal" },
1712
- header_content: { type: "text_literal" },
1713
- body_content: { type: "text_literal" },
1714
- is_shown: { type: "text_literal" },
1715
- is_fixed: { type: "text_literal" },
1716
- alignment: { type: "text_literal" },
1717
- min_width: { type: "text_literal" },
1718
- max_width: { type: "text_literal" },
1719
- display_order: { type: "text_literal" },
1720
- is_use_in_short_display: { type: "boolean_literal" },
1721
- is_autogenerated: { type: "boolean_literal" },
1722
- is_updatable: { type: "boolean_literal" },
1723
- is_db_column: { type: "boolean_literal" },
1724
- db_data_type: { type: "text_literal" },
1725
- postgres_type: { type: "text_literal" },
1726
- default_value: { type: "text_literal" },
1727
- quick_sort_variable_path: { type: "text_literal" },
1728
- is_primary_key: { type: "boolean_literal" },
1729
- is_nullable: { type: "boolean_literal" },
1730
- is_force_uniqueness: { type: "boolean_literal" },
1731
- foreign_table_id: { type: "text_literal" },
1732
- is_cascade: { type: "text_literal" },
1733
- },
1734
- additionalProperties: false,
1735
- required: [],
1736
- },
1737
- rows_data_from_variable_path: { type: "text_literal" },
1738
- is_data_editable: { type: "text_literal" },
1739
- is_paginate: { type: "text_literal" },
1740
- nav_items: { type: "text_literal" },
1741
- sort_by: { type: "text_literal" },
1742
- filter: { type: "text_literal" },
1743
- row_searchable_content: { type: "text_literal" },
1744
- row_input_content: { type: "text_literal" },
1745
- table_header_max_height: { type: "text_literal" },
1746
- table_row_max_height: { type: "text_literal" },
1747
- },
1748
- child_elements: {},
1749
- },
1750
- number: {
1751
- kind: "content",
1752
- category: "content",
1753
- name: "Number",
1754
- display_order: 51,
1755
- attributes: {
1756
- val: { type: ["float_literal", "int_literal", "bigint_literal"] },
1757
- },
1758
- child_elements: {},
1759
- },
1760
- color: {
1761
- kind: "content",
1762
- category: "content",
1763
- name: "Color",
1764
- display_order: 52,
1765
- attributes: {
1766
- val: { type: "color_literal" },
1767
- },
1768
- child_elements: {},
1769
- },
1770
- json: {
1771
- kind: "content",
1772
- category: "content",
1773
- name: "JSON",
1774
- display_order: 53,
1775
- attributes: {
1776
- is_show_buttons: { type: "boolean_literal" },
1777
- val: { type: "json_literal" },
1778
- },
1779
- child_elements: {},
1780
- },
1781
- email_address: {
1782
- kind: "content",
1783
- category: "content",
1784
- name: "Email Address",
1785
- attributes: {
1786
- is_full: { type: "boolean_literal" },
1787
- is_show_copy_to_clipboard: { type: "boolean_literal" },
1788
- is_show_mail_to: { type: "boolean_literal", default: false },
1789
- },
1790
- },
1791
- email_address_input: {
1792
- kind: "content",
1793
- category: "content",
1794
- name: "Email Address Input",
1795
- attributes: {
1796
- placeholder: { type: "text_literal" },
1797
- maximum_length: { type: "int_literal" },
1798
- },
1799
- },
1800
- phone: {
1801
- kind: "content",
1802
- category: "content",
1803
- name: "Phone",
1804
- attributes: {
1805
- is_full: { type: "boolean_literal" },
1806
- is_show_country_code: { type: "boolean_literal", default: true },
1807
- is_show_call_button: { type: "boolean_literal", default: true },
1808
- is_show_local: { type: "boolean_literal", default: true },
1809
- is_show_main_number: { type: "boolean_literal", default: true },
1810
- is_show_type: { type: "boolean_literal", default: true },
1811
- },
1812
- },
1813
- phone_input: {
1814
- kind: "content",
1815
- category: "content",
1816
- name: "Phone",
1817
- attributes: {
1818
- placeholder: { type: "text_literal" },
1819
- },
1820
- },
1821
- time_input: {
1822
- kind: "content",
1823
- category: "content",
1824
- name: "Time Input",
1825
- attributes: {
1826
- val_from_variable_path: {
1827
- type: "variable_path_literal",
1828
- allowed_types: ["time_literal"],
1829
- },
1830
- granularity: {
1831
- type: "text_literal",
1832
- enum: ["year", "month", "week", "day", "hour", "minute", "second"],
1833
- default: "day",
1834
- },
1835
- },
1836
- },
1837
- time: {
1838
- kind: "content",
1839
- category: "content",
1840
- name: "Time",
1841
- display_order: 49,
1842
- attributes: {
1843
- hour: { type: "int_literal" },
1844
- year: { type: "int_literal" },
1845
- color: { type: "color_literal" },
1846
- epoch: { type: "bigint_literal" },
1847
- month: { type: "int_literal" },
1848
- minute: { type: "int_literal" },
1849
- second: { type: "int_literal" },
1850
- content: { type: "text_literal" },
1851
- datetime: { type: "text_literal" },
1852
- timezone: { type: "text_literal" },
1853
- day_of_week: { type: "int_literal" },
1854
- day_of_year: { type: "int_literal" },
1855
- granularity: { type: "text_literal" },
1856
- day_of_month: { type: "int_literal" },
1857
- week_of_year: { type: "int_literal" },
1858
- },
1859
- child_elements: {},
1860
- },
1861
- phone_number: {
1862
- kind: "content",
1863
- category: "content",
1864
- name: "Phone Number",
1865
- display_order: 50,
1866
- attributes: {
1867
- tbd: { type: "text_literal" },
1868
- },
1869
- child_elements: {},
1870
- },
1871
- phone_number_input: {
1872
- kind: "content",
1873
- category: "content",
1874
- name: "Phone Number",
1875
- display_order: 50,
1876
- attributes: {
1877
- tbd: { type: "text_literal" },
1878
- },
1879
- child_elements: {},
1880
- },
1881
- file: {
1882
- kind: "content",
1883
- category: "content",
1884
- name: "File",
1885
- attributes: {},
1886
- },
1887
- boolean_icon: {
1888
- kind: "content",
1889
- category: "content",
1890
- name: "Boolean Icon",
1891
- attributes: {
1892
- true_icon: {
1893
- type: "icon_literal",
1894
- default: "x",
1895
- // enum: icon_ids
1896
- },
1897
- false_icon: {
1898
- type: "icon_literal",
1899
- default: "check",
1900
- // enum: icon_ids
1901
- },
1902
- },
1903
- },
1904
- tag: {
1905
- kind: "content",
1906
- category: "content",
1907
- name: "Tag",
1908
- attributes: {
1909
- // custom options input
1910
- options: {
1911
- type: "array_uniform_literal",
1912
- // items: { anyOf }
1913
- },
1914
- },
1915
- },
1916
- // foreign_key: {
1917
- // kind: "content",
1918
- // category: "content",
1919
- // name: "Foreign Key",
1920
- // attributes: {},
1921
- // },
1922
- variable_path_input: {
1923
- kind: "content",
1924
- category: "content",
1925
- name: "Variable Path Input",
1926
- attributes: {},
1927
- },
1928
- number_input: {
1929
- kind: "content",
1930
- category: "content",
1931
- name: "Number Input",
1932
- attributes: {
1933
- label: { type: "text_literal" },
1934
- placeholder: { type: "text_literal" },
1935
- val_from_variable_path: {
1936
- type: "variable_path_literal",
1937
- allowed_types: ["int_literal", "float_literal", "bigint_literal"],
1938
- },
1939
- },
1940
- },
1941
- text_input: {
1942
- kind: "content",
1943
- category: "content",
1944
- name: "Text Input",
1945
- attributes: {
1946
- val_from_variable_path: {
1947
- type: "variable_path_literal",
1948
- allowed_types: ["text_literal"],
1949
- },
1950
- label: { type: "text_literal" },
1951
- placeholder: { type: "text_literal" },
1952
- maximum_length: { type: "int_literal" },
1953
- is_text_hidable: { type: "boolean_literal", default: false },
1954
- is_text_hidden: { type: "boolean_literal", default: false },
1955
- },
1956
- },
1957
- slider: {
1958
- kind: "content",
1959
- category: "content",
1960
- name: "Slider",
1961
- attributes: {
1962
- val_from_variable_path: {
1963
- type: "variable_path_literal",
1964
- allowed_types: ["int_literal", "float_literal", "bigint_literal"],
1965
- },
1966
- label: { type: "text_literal" },
1967
- is_nullable: { type: "boolean_literal", default: false },
1968
- minimum: { type: "int_literal", default: 0 },
1969
- maximum: { type: "int_literal", default: 10 },
1970
- step: { type: "float_literal", default: 1 },
1971
- color: { type: "color_literal" },
1972
- is_short: { type: "boolean_literal", default: false },
1973
- step: { type: "int_literal", default: 1 },
1974
- },
1975
- },
1976
- checkbox: {
1977
- kind: "content",
1978
- category: "content",
1979
- name: "Checkbox",
1980
- attributes: {
1981
- val_from_variable_path: {
1982
- type: "variable_path_literal",
1983
- allowed_types: ["boolean_literal"],
1984
- },
1985
- label: { type: "text_literal" },
1986
- size: { type: "float_literal", default: 2.4 },
1987
- type: {
1988
- type: "text_literal",
1989
- default: "checkbox",
1990
- enum: ["checkbox", "toggle"],
1991
- },
1992
- label: { type: "text_literal" },
1993
- name: { type: "text_literal" },
1994
- color: { type: "color_literal" },
1995
- // on_val
1996
- // off_val
1997
- },
1998
- },
1999
- arrow_toggle_input: {
2000
- kind: "content",
2001
- category: "content",
2002
- name: "Arrow Toggle",
2003
- },
2004
- icon_input: {
2005
- kind: "content",
2006
- category: "content",
2007
- name: "Icon Input",
2008
- attributes: {
2009
- tbd: { type: "text_literal" },
2010
- },
2011
- },
2012
- icon: {
2013
- kind: "content",
2014
- category: "content",
2015
- name: "Icon",
2016
- display_order: 50,
2017
- attributes: {
2018
- icon_id: { type: "text_literal" },
2019
- color: { type: "color_literal" },
2020
- },
2021
- child_elements: {},
2022
- },
2023
- cron_input: {
2024
- kind: "content",
2025
- category: "content",
2026
- name: "Cron",
2027
- attributes: {
2028
- tbd: { type: "text_literal" },
2029
- },
2030
- },
2031
- cron: {
2032
- kind: "content",
2033
- category: "content",
2034
- name: "Cron",
2035
- attributes: {
2036
- tbd: { type: "text_literal" },
2037
- },
2038
- },
2039
- file_input: {
2040
- kind: "content",
2041
- category: "content",
2042
- name: "File Picker",
2043
- attributes: {
2044
- accept: {
2045
- type: "array_uniform_literal",
2046
- items: {
2047
- type: "text_literal",
2048
- // enum: mime_types
2049
- },
2050
- },
2051
- is_multiselect: { type: "boolean_literal", default: false },
2052
- is_drop_zone: { type: "boolean_literal", default: true },
2053
- },
2054
- },
2055
- color: {
2056
- kind: "content",
2057
- category: "content",
2058
- name: "Color",
2059
- display_order: 52,
2060
- attributes: {
2061
- val: { type: "color_literal" },
2062
- },
2063
- child_elements: {},
2064
- },
2065
- dropdown: {
2066
- kind: "content",
2067
- category: "content",
2068
- name: "Dropdown",
2069
- attributes: {
2070
- options: {
2071
- json_schema: {
2072
- type: "array",
2073
- items: {
2074
- type: "object",
2075
- properties: {
2076
- key: {
2077
- anyOf: [{ type: "string" }, { type: "number" }],
2078
- },
2079
- name: {
2080
- type: "string",
2081
- },
2082
- },
2083
- required: ["key", "name"],
2084
- additionalProperties: false,
2085
- },
2086
- },
2087
- },
2088
- },
2089
- },
2090
- color_input: {
2091
- kind: "content",
2092
- category: "content",
2093
- name: "Color Input",
2094
- attributes: {
2095
- val_from_variable_path: {
2096
- type: "variable_path_literal",
2097
- allowed_types: ["color_literal"],
2098
- },
2099
- is_show_opacity: { type: "boolean_literal", default: true },
2100
- h_options: {
2101
- type: "array_uniform_literal",
2102
- items: {
2103
- type: "int_literal",
2104
- enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24],
2105
- },
2106
- },
2107
- l_options: {
2108
- type: "array_uniform_literal",
2109
- items: {
2110
- type: "int_literal",
2111
- enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24],
2112
- },
2113
- },
2114
- c_options: {
2115
- type: "array_uniform_literal",
2116
- items: {
2117
- type: "int_literal",
2118
- enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24],
2119
- },
2120
- },
2121
- o_options: {
2122
- type: "array_uniform_literal",
2123
- items: {
2124
- type: "int_literal",
2125
- enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24],
2126
- },
2127
- },
2128
- },
2129
- },
2130
- location_input: {
2131
- kind: "content",
2132
- category: "content",
2133
- name: "Location Input",
2134
- attributes: {
2135
- val_from_variable_path: {
2136
- type: "variable_path_literal",
2137
- allowed_types: ["location_literal"],
2138
- },
2139
- is_show_opacity: { type: "boolean_literal", default: true },
2140
- },
2141
- },
2142
- location: {
2143
- kind: "content",
2144
- category: "content",
2145
- name: "Location",
2146
- attributes: {
2147
- // val_from_variable_path: {
2148
- // type: "variable_path_literal",
2149
- // allowed_types: ["location_literal"],
2150
- // },
2151
- val: { type: "location_literal" },
2152
- is_popover: { type: "boolean_literal", default: false },
2153
- is_inline: { type: "boolean_literal", default: false },
2154
- },
2155
- },
2156
- loop: {
2157
- kind: "content",
2158
- category: "content",
2159
- name: "Loop",
2160
- attributes: {
2161
- val_from_variable_path: {
2162
- type: "variable_path_literal",
2163
- allowed_types: ["array_uniform_literal", "object_uniform_literal"],
2164
- },
2165
- iter_identifier: { type: "text_literal" },
2166
- join_text: { type: "text_literal" },
2167
- },
2168
- child_elements: {
2169
- ...main_child_element_options,
2170
- },
2171
- },
2172
- // function_input: {}, maybe?
2173
- }
2174
-
2175
- export const node_types = {
2176
- ...literal_types,
2177
- ...content_types,
2178
- }
2179
-
2180
- function get_content_node_json_schema(type_id) {
2181
- //tbd
2182
- }
2183
-
2184
78
  export const language_options = [
2185
79
  { key: "en", name: "English", english_name: "English", emoji: "🇺🇸" },
2186
80
  { key: "es", name: "Español", english_name: "Spanish", emoji: "🇪🇸" },
@@ -2620,6 +514,2112 @@ export const person_trait_options = [
2620
514
  { key: "use_android", name: "Android User", emoji: "🤖" },
2621
515
  ]
2622
516
 
517
+ const array_literal = {
518
+ kind: "literal",
519
+ category: "variables",
520
+ name: "Array",
521
+ postgres_type: "jsonb",
522
+ json_schema: { type: "array" },
523
+ validator: (input) => {
524
+ // validate tbd
525
+ },
526
+ }
527
+ const array_uniform_literal = {
528
+ kind: "literal",
529
+ category: "variables",
530
+ name: "Array Uniform",
531
+ postgres_type: "jsonb",
532
+ json_schema: { type: "array" },
533
+ validator: (input) => {
534
+ // validate tbd
535
+ },
536
+ }
537
+ const object_literal = {
538
+ kind: "literal",
539
+ category: "variables",
540
+ name: "Object",
541
+ postgres_type: "jsonb",
542
+ json_schema: { type: "object" },
543
+ validator: (input) => {
544
+ // validate here
545
+ },
546
+ }
547
+ const object_uniform_literal = {
548
+ kind: "literal",
549
+ category: "variables",
550
+ name: "Object Uniform",
551
+ postgres_type: "jsonb",
552
+ json_schema: { type: "object" },
553
+ validator: (input) => {
554
+ // validate here
555
+ },
556
+ }
557
+ const text_literal = {
558
+ kind: "literal",
559
+ category: "variables",
560
+ name: "Text",
561
+ postgres_type: "text",
562
+ json_schema: { type: "string" },
563
+ validator: (input) => {
564
+ // validate here
565
+ },
566
+ }
567
+ const boolean_literal = {
568
+ kind: "literal",
569
+ category: "variables",
570
+ name: "Boolean",
571
+ postgres_type: "boolean",
572
+ json_schema: { type: "boolean" },
573
+ validator: (input) => {
574
+ // validate here
575
+ },
576
+ }
577
+ const int_literal = {
578
+ kind: "literal",
579
+ category: "variables",
580
+ name: "Integer",
581
+ postgres_type: "int",
582
+ json_schema: { type: "number" },
583
+ validator: (input) => {
584
+ // validate here
585
+ },
586
+ }
587
+ const bigint_literal = {
588
+ kind: "literal",
589
+ category: "variables",
590
+ name: "Big Integer",
591
+ postgres_type: "bigint",
592
+ json_schema: { type: "number" },
593
+ validator: (input) => {
594
+ // validate here
595
+ },
596
+ }
597
+ const null_literal = {
598
+ kind: "literal",
599
+ category: "variables",
600
+ name: "Null",
601
+ postgres_type: "jsonb",
602
+ json_schema: { type: "null" },
603
+ validator: (input) => {
604
+ // validate here
605
+ },
606
+ }
607
+ const epoch_literal = {
608
+ kind: "literal",
609
+ category: "variables",
610
+ name: "Epoch",
611
+ postgres_type: "bigint",
612
+ json_schema: { type: "number", description: "Epoch in seconds" },
613
+ validator: (input) => {
614
+ // validate here
615
+ },
616
+ }
617
+ const float_literal = {
618
+ kind: "literal",
619
+ category: "variables",
620
+ name: "Float",
621
+ postgres_type: "float",
622
+ json_schema: { type: "number" },
623
+ validator: (input) => {
624
+ // validate here
625
+ },
626
+ }
627
+ const color_literal = {
628
+ kind: "literal",
629
+ category: "variables",
630
+ name: "Color",
631
+ postgres_type: "jsonb",
632
+ json_schema: {
633
+ type: "object",
634
+ description:
635
+ "color parts l (lightness), c (chroma), h (hue), o (opacity) can range from 0-24. An example of a solid black that flips to white in dark mode would be { c: 0, l: 0, h: 0, o: 24, is_dark_theme_invert: true }. Generally use is_dark_theme_invert true, opacity 24, c is chroma and gets probably too vibrant over 14 so 10 is probably a standard amount and 3 if want softer or 0 for white, l is lightness and 0 is black and 24 full light typcally we assume a light backround so you might use something like l 8 for a header text. h is hue and the 0-24 range can be understood as 0: 0 oklch h val, red (pure red), 1: 14 oklch h val, orange-red (red with an orange tint), 2: 29 oklch h val, orange (warm orange), 3: 43 oklch h val, yellow-orange (a deep orange, close to golden), 4: 58 oklch h val, yellow (bright yellow), 5: 72 oklch h val, greenish-yellow (yellow with a slight green tint), 6: 87 oklch h val, yellow-green (green with strong yellow undertones), 7: 101 oklch h val, green (pure green), 8: 116 oklch h val, green-cyan (green shifting toward cyan), 9: 130 oklch h val, cyan (a strong cyan-green color), 10: 145 oklch h val, blue-green (cyan with a blue shift), 11: 159 oklch h val, cyan-blue (a cool blue-leaning cyan), 12: 174 oklch h val, light blue (sky blue, soft and light), 13: 188 oklch h val, blue (pure blue), 14: 203 oklch h val, indigo (a deep blue with hints of purple), 15: 217 oklch h val, blue-violet (a blue shifting toward purple), 16: 232 oklch h val, violet (violet with a blue tint), 17: 246 oklch h val, purple (deep purple), 18: 261 oklch h val, magenta-purple (purple with magenta tones), 19: 275 oklch h val, magenta (deep, vivid magenta), 20: 290 oklch h val, pink-magenta (magenta with a pink hue), 21: 304 oklch h val, pink (a soft, warm pink), 22: 319 oklch h val, pinkish-red (pink leaning toward red), 23: 333 oklch h val, red-pink (vivid red with pink tones), 24: 348 oklch h val, bright red (bright red, slightly pinkish) ",
636
+ properties: {
637
+ l: { type: "number" },
638
+ c: { type: "number" },
639
+ h: { type: "number" },
640
+ o: { type: "number" },
641
+ is_dark_theme_invert: { type: "boolean" },
642
+ },
643
+ additionalProperties: false,
644
+ required: ["l", "c", "h", "o", "is_dark_theme_invert"],
645
+ },
646
+ validator: (input) => {
647
+ // validate here
648
+ },
649
+ }
650
+ const domain_literal = {
651
+ kind: "literal",
652
+ category: "variables",
653
+ name: "Domain",
654
+ postgres_type: "text",
655
+ json_schema: {
656
+ type: "string",
657
+ },
658
+ validator: (input) => {
659
+ // validate here
660
+ },
661
+ }
662
+ const email_address_literal = {
663
+ kind: "literal",
664
+ category: "variables",
665
+ name: "Email Address",
666
+ postgres_type: "text",
667
+ json_schema: {
668
+ type: "string",
669
+ // format: "email",
670
+ },
671
+ validator: (input) => {
672
+ // validate here
673
+ },
674
+ }
675
+ const email_address_full_literal = {
676
+ kind: "literal",
677
+ category: "variables",
678
+ name: "Email Address Full",
679
+ postgres_type: "jsonb",
680
+ json_schema: {
681
+ type: "object",
682
+ properties: {
683
+ domain: domain_literal?.json_schema,
684
+ domain_id: text_literal?.json_schema,
685
+ account_id: text_literal?.json_schema,
686
+ root_domain: domain_literal?.json_schema,
687
+ display_name: text_literal?.json_schema,
688
+ mailbox_hash: text_literal?.json_schema,
689
+ email_address: email_address_literal?.json_schema,
690
+ root_email_address: email_address_literal?.json_schema,
691
+ epoch_email_address_verified: epoch_literal?.json_schema,
692
+ },
693
+ additionalProperties: false,
694
+ required: ["domain", "root_domain", "mailbox_hash", "email_address", "root_email_address"],
695
+ },
696
+ validator: (input) => {
697
+ // validate here
698
+ },
699
+ }
700
+ const email_attachment_literal = {
701
+ kind: "literal",
702
+ category: "variables",
703
+ name: "Email Attachment",
704
+ postgres_type: "jsonb",
705
+ json_schema: {
706
+ type: "object",
707
+ properties: {
708
+ name: text_literal?.json_schema,
709
+ content: text_literal?.json_schema,
710
+ content_id: text_literal?.json_schema,
711
+ content_type: text_literal?.json_schema,
712
+ },
713
+ additionalProperties: false,
714
+ required: ["name", "content", "content_id", "content_type"],
715
+ },
716
+ validator: (input) => {
717
+ // validate here
718
+ },
719
+ }
720
+ const json_literal = {
721
+ kind: "literal",
722
+ category: "variables",
723
+ name: "JSON",
724
+ postgres_type: "jsonb",
725
+ json_schema: {
726
+ anyOf: [
727
+ { type: "null" },
728
+ { type: "boolean" },
729
+ { type: "number" },
730
+ { type: "string" },
731
+ {
732
+ type: "array",
733
+ items: { $ref: "#/$defs/json_literal" },
734
+ },
735
+ {
736
+ type: "object",
737
+ additionalProperties: { $ref: "#/$defs/json_literal" },
738
+ },
739
+ ],
740
+ },
741
+ validator: (input) => {
742
+ // validate here
743
+ },
744
+ }
745
+ const storage_item_literal = {
746
+ kind: "literal",
747
+ category: "variables",
748
+ name: "Storage Item",
749
+ postgres_type: "jsonb",
750
+ json_schema: {
751
+ type: "object",
752
+ properties: {
753
+ id: text_literal?.json_schema,
754
+ db_epoch_created: epoch_literal?.json_schema,
755
+ db_epoch_updated: epoch_literal?.json_schema,
756
+ account_id: text_literal?.json_schema,
757
+ folder_path: { type: "array", items: text_literal?.json_schema },
758
+ file_name: text_literal?.json_schema,
759
+ file_extension: text_literal?.json_schema,
760
+ mime_type: text_literal?.json_schema,
761
+ size_kb: int_literal?.json_schema,
762
+ metadata: json_literal?.json_schema,
763
+ is_temporary: boolean_literal?.json_schema,
764
+ set_to_delete_initiated_at: epoch_literal?.json_schema,
765
+ is_public: boolean_literal?.json_schema,
766
+ transcription: text_literal?.json_schema,
767
+ },
768
+ additionalProperties: false,
769
+ required: [],
770
+ },
771
+ validator: (input) => {
772
+ // validate here
773
+ },
774
+ }
775
+ const html_literal = {
776
+ kind: "literal",
777
+ category: "variables",
778
+ name: "HTML",
779
+ postgres_type: "text",
780
+ json_schema: text_literal?.json_schema,
781
+ validator: (input) => {
782
+ // validate here
783
+ },
784
+ }
785
+ const phone_literal = {
786
+ kind: "literal",
787
+ category: "variables",
788
+ name: "Phone Number",
789
+ postgres_type: "jsonb",
790
+ json_schema: {
791
+ // type: "object",
792
+ },
793
+ validator: (input) => {
794
+ // validate here
795
+ },
796
+ }
797
+ const vector_literal = {
798
+ kind: "literal",
799
+ category: "variables",
800
+ name: "Vector",
801
+ postgres_type: "vector",
802
+ json_schema: {
803
+ type: "array",
804
+ items: { type: "number" },
805
+ },
806
+ validator: (input) => {
807
+ // validate here
808
+ },
809
+ }
810
+ const icon_literal = {
811
+ kind: "literal",
812
+ category: "variables",
813
+ name: "Icon",
814
+ postgres_type: "jsonb",
815
+ json_schema: {
816
+ type: "object",
817
+ properties: {
818
+ icon: text_literal?.json_schema,
819
+ color: color_literal?.json_schema,
820
+ },
821
+ additionalProperties: false,
822
+ required: ["icon", "color"],
823
+ },
824
+ validator: (input) => {
825
+ // validate here
826
+ },
827
+ }
828
+ const time_literal = {
829
+ kind: "literal",
830
+ category: "variables",
831
+ name: "Time",
832
+ postgres_type: "jsonb",
833
+ json_schema: {
834
+ type: "object",
835
+ properties: {
836
+ format: {
837
+ type: "string",
838
+ description: JSON.stringify(time_formats),
839
+ },
840
+ epoch: {
841
+ anyOf: [
842
+ {
843
+ type: "number",
844
+ description: "epoch in seconds",
845
+ },
846
+ {
847
+ type: "null",
848
+ },
849
+ ],
850
+ description: "derived can keep null",
851
+ },
852
+ granularity: {
853
+ type: "string",
854
+ enum: ["year", "month", "week", "day", "hour", "minute", "second"],
855
+ description: ["year", "month", "week", "day", "hour", "minute", "second"].join(", "),
856
+ },
857
+ year: {
858
+ anyOf: [
859
+ {
860
+ type: "number",
861
+ },
862
+ {
863
+ type: "null",
864
+ },
865
+ ],
866
+ description: "derived can keep null",
867
+ },
868
+ month: {
869
+ anyOf: [
870
+ {
871
+ type: "number",
872
+ enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
873
+ },
874
+ {
875
+ type: "null",
876
+ },
877
+ ],
878
+ description: "derived can keep null",
879
+ },
880
+ day_of_month: {
881
+ anyOf: [
882
+ {
883
+ type: "number",
884
+ minimum: 1,
885
+ maximum: 31,
886
+ },
887
+ {
888
+ type: "null",
889
+ },
890
+ ],
891
+ description: "derived can keep null",
892
+ },
893
+ day_of_week: {
894
+ anyOf: [
895
+ {
896
+ type: "number",
897
+ enum: [0, 1, 2, 3, 4, 5, 6],
898
+ },
899
+ {
900
+ type: "null",
901
+ },
902
+ ],
903
+ description: "derived can keep null",
904
+ },
905
+ day_of_year: {
906
+ anyOf: [
907
+ {
908
+ type: "number",
909
+ minimum: 1,
910
+ maximum: 365,
911
+ },
912
+ {
913
+ type: "null",
914
+ },
915
+ ],
916
+ description: "derived can keep null",
917
+ },
918
+ week_of_year: {
919
+ anyOf: [
920
+ {
921
+ type: "number",
922
+ minimum: 1,
923
+ maximum: 52,
924
+ },
925
+ {
926
+ type: "null",
927
+ },
928
+ ],
929
+ description: "derived can keep null",
930
+ },
931
+ hour: {
932
+ anyOf: [
933
+ {
934
+ type: "number",
935
+ minimum: 1,
936
+ maximum: 24,
937
+ },
938
+ {
939
+ type: "null",
940
+ },
941
+ ],
942
+ description: "derived can keep null",
943
+ },
944
+ minute: {
945
+ anyOf: [
946
+ {
947
+ type: "number",
948
+ minimum: 1,
949
+ maximum: 60,
950
+ },
951
+ {
952
+ type: "null",
953
+ },
954
+ ],
955
+ description: "derived can keep null",
956
+ },
957
+ timezone: {
958
+ anyOf: [
959
+ {
960
+ type: "string",
961
+ description: time_zone_options.map((h) => h?.key).join(", "),
962
+ },
963
+ {
964
+ type: "null",
965
+ },
966
+ ],
967
+ description: "derived can keep null",
968
+ },
969
+ content: {
970
+ anyOf: [
971
+ {
972
+ type: "string",
973
+ },
974
+ {
975
+ type: "null",
976
+ },
977
+ ],
978
+ description: "derived can keep null",
979
+ },
980
+ datetime: {
981
+ anyOf: [
982
+ {
983
+ type: "string",
984
+ },
985
+ {
986
+ type: "null",
987
+ },
988
+ ],
989
+ description: "derived can keep null",
990
+ },
991
+ },
992
+ additionalProperties: false,
993
+ required: ["epoch"],
994
+ },
995
+ validator: (input) => {
996
+ // validate here
997
+ },
998
+ }
999
+ const time_zone_literal = {
1000
+ kind: "literal",
1001
+ category: "variables",
1002
+ name: "Time Zone",
1003
+ postgres_type: "text",
1004
+ json_schema: text_literal?.json_schema,
1005
+ validator: (input) => {
1006
+ // validate here
1007
+ },
1008
+ }
1009
+ const location_literal = {
1010
+ kind: "literal",
1011
+ category: "variables",
1012
+ name: "Location Apple",
1013
+ postgres_type: "jsonb",
1014
+ json_schema: {
1015
+ type: "object",
1016
+ properties: {
1017
+ place_id: { type: "string" },
1018
+ name: { type: "string" },
1019
+ muid: { type: "string" },
1020
+ latitude: { type: "number" },
1021
+ longitude: { type: "number" },
1022
+ formatted_address: { type: "string" },
1023
+ country: { type: "string" },
1024
+ country_code: { type: "string" },
1025
+ administrative_area: { type: "string" },
1026
+ administrative_area_code: { type: "string" },
1027
+ locality: { type: "string" },
1028
+ sub_locality: { type: "string" },
1029
+ full_thoroughfare: { type: "string" },
1030
+ },
1031
+ required: ["latitude", "longitude", "name"],
1032
+ additionalProperties: false,
1033
+ },
1034
+ validator: (input) => {
1035
+ // validate here
1036
+ },
1037
+ }
1038
+ const cron_literal = {
1039
+ kind: "literal",
1040
+ category: "variables",
1041
+ name: "Cron",
1042
+ postgres_type: "jsonb",
1043
+ json_schema: {
1044
+ type: "object",
1045
+ properties: {
1046
+ content: { type: "string" },
1047
+ cron: { type: "string" },
1048
+ minute: { type: "string" },
1049
+ hour: { type: "string" },
1050
+ day_of_month: { type: "string" },
1051
+ month: { type: "string" },
1052
+ day_of_week: { type: "string" },
1053
+ },
1054
+ additionalProperties: false,
1055
+ required: [],
1056
+ },
1057
+ validator: (input) => {
1058
+ // validate here
1059
+ },
1060
+ }
1061
+ const variable_path_literal = {
1062
+ kind: "literal",
1063
+ category: "variables",
1064
+ name: "Variable Path",
1065
+ postgres_type: "jsonb",
1066
+ json_schema: {
1067
+ type: "array",
1068
+ description: "The path to the value within variables.",
1069
+ items: {
1070
+ anyOf: [
1071
+ {
1072
+ type: "string",
1073
+ },
1074
+ {
1075
+ type: "number",
1076
+ },
1077
+ {
1078
+ type: "array",
1079
+ items: {
1080
+ anyOf: [
1081
+ {
1082
+ type: "string",
1083
+ },
1084
+ {
1085
+ type: "number",
1086
+ },
1087
+ ],
1088
+ },
1089
+ },
1090
+ ],
1091
+ },
1092
+ },
1093
+ validator: (input) => {
1094
+ // validate here
1095
+ },
1096
+ }
1097
+ const content_literal = {
1098
+ kind: "literal",
1099
+ category: "variables",
1100
+ name: "Content",
1101
+ postgres_type: "jsonb",
1102
+ // json_schema: get_content_node_json_schema("content_literal"),
1103
+ validator: (input) => {
1104
+ // validate here
1105
+ },
1106
+ }
1107
+ const table_id_for_foreign_row_literal = {
1108
+ kind: "literal",
1109
+ category: "variables",
1110
+ name: "Table ID for Foreign Row",
1111
+ postgres_type: "text",
1112
+ // json_schema: get_content_node_json_schema("content_literal"),
1113
+ validator: (input) => {
1114
+ // validate here
1115
+ },
1116
+ }
1117
+ // image_literal
1118
+ // audio_literal
1119
+ // file_literal
1120
+ // dropdown_literal
1121
+ // text_array_literal
1122
+ // function_literal
1123
+
1124
+ export const literal_types = {
1125
+ array_literal,
1126
+ array_uniform_literal,
1127
+ object_literal,
1128
+ object_uniform_literal,
1129
+ text_literal,
1130
+ boolean_literal,
1131
+ int_literal,
1132
+ bigint_literal,
1133
+ null_literal,
1134
+ epoch_literal,
1135
+ float_literal,
1136
+ color_literal,
1137
+ json_literal,
1138
+ domain_literal,
1139
+ email_address_literal,
1140
+ email_address_full_literal,
1141
+ email_attachment_literal,
1142
+ storage_item_literal,
1143
+ html_literal,
1144
+ phone_literal,
1145
+ vector_literal,
1146
+ icon_literal,
1147
+ time_literal,
1148
+ time_zone_literal,
1149
+ location_literal,
1150
+ cron_literal,
1151
+ content_literal,
1152
+ table_id_for_foreign_row_literal,
1153
+ variable_path_literal,
1154
+ }
1155
+
1156
+ export const main_child_element_options = {
1157
+ slot: { display_order: 0, child_min_limit: 0, child_max_limit: 99 },
1158
+ loop: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1159
+ div: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1160
+ section: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1161
+ show_conditions: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1162
+ header: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1163
+ footer: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1164
+ h1: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1165
+ h2: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1166
+ h3: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
1167
+ h4: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
1168
+ h5: { display_order: 13, child_min_limit: 0, child_max_limit: 99 },
1169
+ h6: { display_order: 14, child_min_limit: 0, child_max_limit: 99 },
1170
+ p: { display_order: 15, child_min_limit: 0, child_max_limit: 99 },
1171
+ br: { display_order: 16, child_min_limit: 0, child_max_limit: 99 },
1172
+ base_text: { display_order: 17, child_min_limit: 0, child_max_limit: 99 },
1173
+ span: { display_order: 18, child_min_limit: 0, child_max_limit: 99 },
1174
+ strong: { display_order: 19, child_min_limit: 0, child_max_limit: 99 },
1175
+ em: { display_order: 20, child_min_limit: 0, child_max_limit: 99 },
1176
+ strong_em: { display_order: 21, child_min_limit: 0, child_max_limit: 99 },
1177
+ link: { display_order: 22, child_min_limit: 0, child_max_limit: 99 },
1178
+ q: { display_order: 23, child_min_limit: 0, child_max_limit: 99 },
1179
+ mark: { display_order: 24, child_min_limit: 0, child_max_limit: 99 },
1180
+ s: { display_order: 25, child_min_limit: 0, child_max_limit: 99 },
1181
+ blockquote: { display_order: 26, child_min_limit: 0, child_max_limit: 99 },
1182
+ ul: { display_order: 27, child_min_limit: 0, child_max_limit: 99 },
1183
+ ol: { display_order: 28, child_min_limit: 0, child_max_limit: 99 },
1184
+ figure: { display_order: 29, child_min_limit: 0, child_max_limit: 99 },
1185
+ picture: { display_order: 30, child_min_limit: 0, child_max_limit: 99 },
1186
+ image: { display_order: 32, child_min_limit: 0, child_max_limit: 99 },
1187
+ audio: { display_order: 34, child_min_limit: 0, child_max_limit: 99 },
1188
+ video: { display_order: 35, child_min_limit: 0, child_max_limit: 99 },
1189
+ youtube_video: { display_order: 36, child_min_limit: 0, child_max_limit: 99 },
1190
+ x_post: { display_order: 37, child_min_limit: 0, child_max_limit: 99 },
1191
+ table: { display_order: 38, child_min_limit: 0, child_max_limit: 99 },
1192
+ table_advanced: { display_order: 39, child_min_limit: 0, child_max_limit: 99 },
1193
+ hr: { display_order: 40, child_min_limit: 0, child_max_limit: 99 },
1194
+ qr: { display_order: 41, child_min_limit: 0, child_max_limit: 99 },
1195
+ code: { display_order: 42, child_min_limit: 0, child_max_limit: 99 },
1196
+ code_inline: { display_order: 43, child_min_limit: 0, child_max_limit: 99 },
1197
+ pre: { display_order: 44, child_min_limit: 0, child_max_limit: 99 },
1198
+ json: { display_order: 45, child_min_limit: 0, child_max_limit: 99 },
1199
+ email_address: { display_order: 46, child_min_limit: 0, child_max_limit: 99 },
1200
+ email_address_input: { display_order: 47, child_min_limit: 0, child_max_limit: 99 },
1201
+ phone_number: { display_order: 48, child_min_limit: 0, child_max_limit: 99 },
1202
+ phone_number_input: { display_order: 49, child_min_limit: 0, child_max_limit: 99 },
1203
+ time: { display_order: 50, child_min_limit: 0, child_max_limit: 99 },
1204
+ time_input: { display_order: 51, child_min_limit: 0, child_max_limit: 99 },
1205
+ text_input: { display_order: 52, child_min_limit: 0, child_max_limit: 99 },
1206
+ location: { display_order: 53, child_min_limit: 0, child_max_limit: 99 },
1207
+ location_input: { display_order: 54, child_min_limit: 0, child_max_limit: 99 },
1208
+ slider: { display_order: 55, child_min_limit: 0, child_max_limit: 99 },
1209
+ checkbox: { display_order: 56, child_min_limit: 0, child_max_limit: 99 },
1210
+ number: { display_order: 57, child_min_limit: 0, child_max_limit: 99 },
1211
+ icon: { display_order: 58, child_min_limit: 0, child_max_limit: 99 },
1212
+ icon_input: { display_order: 59, child_min_limit: 0, child_max_limit: 99 },
1213
+ dropdown: { display_order: 60, child_min_limit: 0, child_max_limit: 99 },
1214
+ file: { display_order: 61, child_min_limit: 0, child_max_limit: 99 },
1215
+ file_input: { display_order: 62, child_min_limit: 0, child_max_limit: 99 },
1216
+ cron: { display_order: 64, child_min_limit: 0, child_max_limit: 99 },
1217
+ cron_input: { display_order: 65, child_min_limit: 0, child_max_limit: 99 },
1218
+ color: { display_order: 67, child_min_limit: 0, child_max_limit: 99 },
1219
+ color_input: { display_order: 68, child_min_limit: 0, child_max_limit: 99 },
1220
+ tag: { display_order: 69, child_min_limit: 0, child_max_limit: 99 },
1221
+ }
1222
+
1223
+ export const content_types = {
1224
+ slot: {
1225
+ kind: "content",
1226
+ category: "content",
1227
+ name: "Slot",
1228
+ display_order: 0,
1229
+ attributes: {
1230
+ val: { type: "text_literal" },
1231
+ },
1232
+ child_elements: {},
1233
+ },
1234
+ loop: {
1235
+ kind: "content",
1236
+ category: "variables",
1237
+ name: "Loop",
1238
+ display_order: 0,
1239
+ child_elements: {
1240
+ ...main_child_element_options,
1241
+ },
1242
+ validator: (input) => {
1243
+ // validate tbd
1244
+ },
1245
+ },
1246
+ div: {
1247
+ kind: "content",
1248
+ category: "content",
1249
+ name: "Div",
1250
+ display_order: 1,
1251
+ attributes: {
1252
+ background_color: {
1253
+ type: "color_literal",
1254
+ display_name: "Background Color",
1255
+ },
1256
+ border_color: {
1257
+ type: "color_literal",
1258
+ display_name: "Border Color",
1259
+ },
1260
+ border_radius: {
1261
+ type: "float_literal",
1262
+ display_name: "Border Radius",
1263
+ },
1264
+ padding: {
1265
+ type: "float_literal",
1266
+ display_name: "Padding",
1267
+ },
1268
+ align_content: {
1269
+ type: "text_literal",
1270
+ display_name: "Align Content",
1271
+ },
1272
+ justify_content: {
1273
+ type: "text_literal",
1274
+ display_name: "Justify Content",
1275
+ },
1276
+ gap: {
1277
+ type: "float_literal",
1278
+ display_name: "Gap",
1279
+ },
1280
+ },
1281
+ child_elements: {
1282
+ ...main_child_element_options,
1283
+ },
1284
+ },
1285
+ section: {
1286
+ kind: "content",
1287
+ category: "content",
1288
+ name: "Section",
1289
+ display_order: 2,
1290
+ attributes: {
1291
+ background_color: {
1292
+ type: "color_literal",
1293
+ display_name: "Background Color",
1294
+ },
1295
+ border_color: {
1296
+ type: "color_literal",
1297
+ display_name: "Border Color",
1298
+ },
1299
+ border_radius: {
1300
+ display_name: "Border Radius",
1301
+ json_schema: {
1302
+ description: "border radius number used as rem units. Typically 1 should be good",
1303
+ type: "number",
1304
+ },
1305
+ },
1306
+ padding: {
1307
+ display_name: "Padding",
1308
+ json_schema: {
1309
+ description: "padding number used as rem units. Typically 1 should be good",
1310
+ type: "number",
1311
+ },
1312
+ },
1313
+ },
1314
+ child_elements: {
1315
+ div: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1316
+ header: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1317
+ h1: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1318
+ h2: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1319
+ h3: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1320
+ h4: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1321
+ h5: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1322
+ h6: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1323
+ p: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1324
+ ul: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1325
+ ol: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
1326
+ table: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
1327
+ table_advanced: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
1328
+ figure: { display_order: 13, child_min_limit: 0, child_max_limit: 99 },
1329
+ image: { display_order: 14, child_min_limit: 0, child_max_limit: 99 },
1330
+ audio: { display_order: 16, child_min_limit: 0, child_max_limit: 99 },
1331
+ video: { display_order: 15, child_min_limit: 0, child_max_limit: 99 },
1332
+ code: { display_order: 17, child_min_limit: 0, child_max_limit: 99 },
1333
+ blockquote: { display_order: 18, child_min_limit: 0, child_max_limit: 99 },
1334
+ pre: { display_order: 19, child_min_limit: 0, child_max_limit: 99 },
1335
+ hr: { display_order: 20, child_min_limit: 0, child_max_limit: 99 },
1336
+ footer: { display_order: 21, child_min_limit: 0, child_max_limit: 99 },
1337
+ youtube_video: { display_order: 22, child_min_limit: 0, child_max_limit: 99 },
1338
+ x_post: { display_order: 23, child_min_limit: 0, child_max_limit: 99 },
1339
+ time: { display_order: 24, child_min_limit: 0, child_max_limit: 99 },
1340
+ location: { display_order: 25, child_min_limit: 0, child_max_limit: 99 },
1341
+ json: { display_order: 26, child_min_limit: 0, child_max_limit: 99 },
1342
+ },
1343
+ },
1344
+ show_conditions: {
1345
+ kind: "content",
1346
+ category: "content",
1347
+ name: "Show Conditions",
1348
+ display_order: 1,
1349
+ attributes: {
1350
+ is_run_serverside: {
1351
+ type: "boolean_literal",
1352
+ display_name: "Is Run Serverside",
1353
+ default: false,
1354
+ },
1355
+ },
1356
+ child_elements: {
1357
+ show_conditions_item: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1358
+ show_conditions_item_else: { display_order: 1, child_min_limit: 0, child_max_limit: 1 },
1359
+ },
1360
+ },
1361
+ show_conditions_item: {
1362
+ kind: "content",
1363
+ category: "content",
1364
+ name: "Show Conditions Item",
1365
+ display_order: 1,
1366
+ attributes: {
1367
+ is_show: {
1368
+ type: "boolean_literal",
1369
+ display_name: "Is Show",
1370
+ },
1371
+ },
1372
+ child_elements: {
1373
+ ...main_child_element_options,
1374
+ },
1375
+ },
1376
+ show_conditions_item_else: {
1377
+ kind: "content",
1378
+ category: "content",
1379
+ name: "Show Conditions Item Else",
1380
+ display_order: 1,
1381
+ attributes: {},
1382
+ child_elements: {
1383
+ ...main_child_element_options,
1384
+ },
1385
+ },
1386
+ header: {
1387
+ kind: "content",
1388
+ category: "content",
1389
+ name: "Header",
1390
+ display_order: 3,
1391
+ attributes: {},
1392
+ child_elements: {
1393
+ h1: { display_order: 1, child_min_limit: 1, child_max_limit: 1 },
1394
+ h2: { display_order: 2, child_min_limit: 0, child_max_limit: 1 },
1395
+ },
1396
+ },
1397
+ h1: {
1398
+ kind: "content",
1399
+ category: "content",
1400
+ name: "Heading 1",
1401
+ display_order: 4,
1402
+ attributes: {},
1403
+ child_elements: {
1404
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1405
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1406
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1407
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1408
+ },
1409
+ },
1410
+ h2: {
1411
+ kind: "content",
1412
+ category: "content",
1413
+ name: "Heading 2",
1414
+ display_order: 5,
1415
+ attributes: {},
1416
+ child_elements: {
1417
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1418
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1419
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1420
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1421
+ },
1422
+ },
1423
+ h3: {
1424
+ kind: "content",
1425
+ category: "content",
1426
+ name: "Heading 3",
1427
+ display_order: 6,
1428
+ attributes: {},
1429
+ child_elements: {
1430
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1431
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1432
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1433
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1434
+ },
1435
+ },
1436
+ h4: {
1437
+ kind: "content",
1438
+ category: "content",
1439
+ name: "Heading 4",
1440
+ display_order: 7,
1441
+ attributes: {},
1442
+ child_elements: {
1443
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1444
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1445
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1446
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1447
+ },
1448
+ },
1449
+ h5: {
1450
+ kind: "content",
1451
+ category: "content",
1452
+ name: "Heading 5",
1453
+ display_order: 8,
1454
+ attributes: {},
1455
+ child_elements: {
1456
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1457
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1458
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1459
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1460
+ },
1461
+ },
1462
+ h6: {
1463
+ kind: "content",
1464
+ category: "content",
1465
+ name: "Heading 6",
1466
+ display_order: 9,
1467
+ attributes: {},
1468
+ child_elements: {
1469
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1470
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1471
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1472
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1473
+ },
1474
+ },
1475
+ p: {
1476
+ kind: "content",
1477
+ category: "content",
1478
+ name: "Paragraph",
1479
+ display_order: 10,
1480
+ attributes: {},
1481
+ child_elements: {
1482
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1483
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1484
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1485
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1486
+ link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1487
+ ref: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1488
+ q: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1489
+ span: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1490
+ sub: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1491
+ sup: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1492
+ s: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
1493
+ mark: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
1494
+ code_inline: { display_order: 13, child_min_limit: 0, child_max_limit: 99 },
1495
+ br: { display_order: 14, child_min_limit: 0, child_max_limit: 99 },
1496
+ time: { display_order: 15, child_min_limit: 0, child_max_limit: 99 },
1497
+ location: { display_order: 16, child_min_limit: 0, child_max_limit: 99 },
1498
+ number: { display_order: 17, child_min_limit: 0, child_max_limit: 99 },
1499
+ color: { display_order: 18, child_min_limit: 0, child_max_limit: 99 },
1500
+ },
1501
+ },
1502
+ base_text: {
1503
+ kind: "content",
1504
+ category: "content",
1505
+ name: "Base Text",
1506
+ display_order: 11,
1507
+ attributes: {
1508
+ content: { type: "text_literal" },
1509
+ text_color: { type: "color_literal" },
1510
+ },
1511
+ child_elements: {},
1512
+ },
1513
+ span: {
1514
+ kind: "content",
1515
+ category: "content",
1516
+ name: "Span",
1517
+ display_order: 12,
1518
+ attributes: {},
1519
+ child_elements: {},
1520
+ },
1521
+ strong: {
1522
+ kind: "content",
1523
+ category: "content",
1524
+ name: "Strong Text",
1525
+ display_order: 13,
1526
+ attributes: {
1527
+ content: { type: "text_literal" },
1528
+ text_color: { type: "color_literal" },
1529
+ },
1530
+ child_elements: {},
1531
+ },
1532
+ em: {
1533
+ kind: "content",
1534
+ category: "content",
1535
+ name: "Emphasized Text",
1536
+ display_order: 14,
1537
+ attributes: {
1538
+ content: { type: "text_literal" },
1539
+ text_color: { type: "color_literal" },
1540
+ },
1541
+ child_elements: {},
1542
+ },
1543
+ strong_em: {
1544
+ kind: "content",
1545
+ category: "content",
1546
+ name: "Strong Emphasized Text",
1547
+ display_order: 15,
1548
+ attributes: {
1549
+ content: { type: "text_literal" },
1550
+ text_color: { type: "color_literal" },
1551
+ },
1552
+ child_elements: {},
1553
+ },
1554
+ link: {
1555
+ kind: "content",
1556
+ category: "content",
1557
+ name: "Link",
1558
+ display_order: 16,
1559
+ attributes: {
1560
+ href: { type: "text_literal" },
1561
+ display_text: { type: "text_literal" },
1562
+ text_color: { type: "color_literal" },
1563
+ is_show_preview: { type: "boolean_literal" },
1564
+ },
1565
+ child_elements: {
1566
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1567
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1568
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1569
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1570
+ ref: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1571
+ q: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1572
+ span: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1573
+ sub: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1574
+ sup: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1575
+ s: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
1576
+ mark: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
1577
+ code_inline: { display_order: 13, child_min_limit: 0, child_max_limit: 99 },
1578
+ br: { display_order: 14, child_min_limit: 0, child_max_limit: 99 },
1579
+ time: { display_order: 15, child_min_limit: 0, child_max_limit: 99 },
1580
+ location: { display_order: 16, child_min_limit: 0, child_max_limit: 99 },
1581
+ number: { display_order: 17, child_min_limit: 0, child_max_limit: 99 },
1582
+ color: { display_order: 18, child_min_limit: 0, child_max_limit: 99 },
1583
+ },
1584
+ },
1585
+ q: {
1586
+ kind: "content",
1587
+ category: "content",
1588
+ name: "Quotation",
1589
+ display_order: 17,
1590
+ attributes: {
1591
+ href: { type: "text_literal" },
1592
+ content: { type: "text_literal" },
1593
+ text_color: { type: "color_literal" },
1594
+ },
1595
+ child_elements: {},
1596
+ },
1597
+ mark: {
1598
+ kind: "content",
1599
+ category: "content",
1600
+ name: "Mark",
1601
+ display_order: 18,
1602
+ attributes: {},
1603
+ child_elements: {
1604
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1605
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1606
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1607
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1608
+ link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1609
+ ref: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1610
+ q: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1611
+ span: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1612
+ code_inline: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1613
+ sub: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1614
+ sup: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
1615
+ s: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
1616
+ },
1617
+ },
1618
+ s: {
1619
+ kind: "content",
1620
+ category: "content",
1621
+ name: "Strikethrough",
1622
+ display_order: 19,
1623
+ attributes: {},
1624
+ child_elements: {
1625
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1626
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1627
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1628
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1629
+ link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1630
+ q: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1631
+ span: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1632
+ code_inline: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1633
+ sub: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1634
+ sup: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1635
+ },
1636
+ },
1637
+ blockquote: {
1638
+ kind: "content",
1639
+ category: "content",
1640
+ name: "Blockquote",
1641
+ display_order: 20,
1642
+ attributes: {
1643
+ cite: { type: "text_literal", display_name: "cite", default_value: null, display_order: 0 },
1644
+ },
1645
+ child_elements: {
1646
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1647
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1648
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1649
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1650
+ link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1651
+ ref: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1652
+ q: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1653
+ span: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1654
+ sub: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1655
+ sup: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1656
+ s: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
1657
+ mark: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
1658
+ p: { display_order: 13, child_min_limit: 0, child_max_limit: 99 },
1659
+ ul: { display_order: 14, child_min_limit: 0, child_max_limit: 99 },
1660
+ ol: { display_order: 15, child_min_limit: 0, child_max_limit: 99 },
1661
+ code_inline: { display_order: 16, child_min_limit: 0, child_max_limit: 9 },
1662
+ },
1663
+ },
1664
+ ul: {
1665
+ kind: "content",
1666
+ category: "content",
1667
+ name: "Unordered List",
1668
+ display_order: 21,
1669
+ attributes: {},
1670
+ child_elements: {
1671
+ li: { display_order: 1, child_min_limit: 1, child_max_limit: 999 },
1672
+ },
1673
+ },
1674
+ ol: {
1675
+ kind: "content",
1676
+ category: "content",
1677
+ name: "Ordered List",
1678
+ display_order: 22,
1679
+ attributes: {},
1680
+ child_elements: {
1681
+ li: { display_order: 1, child_min_limit: 1, child_max_limit: 999 },
1682
+ },
1683
+ },
1684
+ li: {
1685
+ kind: "content",
1686
+ category: "content",
1687
+ name: "List Item",
1688
+ display_order: 23,
1689
+ attributes: {},
1690
+ child_elements: {
1691
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1692
+ em: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1693
+ strong: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1694
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1695
+ link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1696
+ image: { display_order: 6, child_min_limit: 0, child_max_limit: 9 },
1697
+ audio: { display_order: 6, child_min_limit: 0, child_max_limit: 9 },
1698
+ br: { display_order: 7, child_min_limit: 0, child_max_limit: 9 },
1699
+ q: { display_order: 8, child_min_limit: 0, child_max_limit: 9 },
1700
+ s: { display_order: 9, child_min_limit: 0, child_max_limit: 9 },
1701
+ mark: { display_order: 10, child_min_limit: 0, child_max_limit: 9 },
1702
+ span: { display_order: 11, child_min_limit: 0, child_max_limit: 9 },
1703
+ code_inline: { display_order: 12, child_min_limit: 0, child_max_limit: 9 },
1704
+ time: { display_order: 13, child_min_limit: 0, child_max_limit: 9 },
1705
+ location: { display_order: 14, child_min_limit: 0, child_max_limit: 9 },
1706
+ ...main_child_element_options, // tbd
1707
+ },
1708
+ },
1709
+ figure: {
1710
+ kind: "content",
1711
+ category: "content",
1712
+ name: "Figure",
1713
+ display_order: 24,
1714
+ attributes: {
1715
+ caption: { type: "text_literal" },
1716
+ },
1717
+ child_elements: {
1718
+ picture: { display_order: 1, child_min_limit: 0, child_max_limit: 1 },
1719
+ video: { display_order: 2, child_min_limit: 0, child_max_limit: 1 },
1720
+ audio: { display_order: 3, child_min_limit: 0, child_max_limit: 1 },
1721
+ blockquote: { display_order: 4, child_min_limit: 0, child_max_limit: 1 },
1722
+ },
1723
+ },
1724
+ picture: {
1725
+ kind: "content",
1726
+ category: "content",
1727
+ name: "Picture",
1728
+ display_order: 25,
1729
+ attributes: {},
1730
+ child_elements: {
1731
+ source: { display_order: 1, child_min_limit: 1, child_max_limit: 9 },
1732
+ },
1733
+ },
1734
+ source: {
1735
+ kind: "content",
1736
+ category: "content",
1737
+ name: "Source",
1738
+ display_order: 26,
1739
+ attributes: {
1740
+ alt: { type: "text_literal" },
1741
+ name: { type: "text_literal" },
1742
+ width: { type: "int_literal" },
1743
+ height: { type: "int_literal" },
1744
+ file_type: { type: "text_literal" },
1745
+ storage_id: { type: "text_literal" },
1746
+ aspect_ratio: { type: "float_literal" },
1747
+ },
1748
+ child_elements: {},
1749
+ },
1750
+ image: {
1751
+ kind: "content",
1752
+ category: "content",
1753
+ name: "Image",
1754
+ display_order: 27,
1755
+ attributes: {
1756
+ alt: { type: "text_literal" },
1757
+ name: { type: "text_literal" },
1758
+ width: { type: "int_literal" },
1759
+ height: { type: "int_literal" },
1760
+ mime_type: { type: "text_literal" },
1761
+ storage_id: { type: "text_literal" },
1762
+ aspect_ratio: { type: "float_literal" },
1763
+ is_storage_id_public: { type: "boolean_literal" },
1764
+ src: { type: "text_literal" },
1765
+ src_quick: { type: "text_literal" },
1766
+ display_max_height: { type: "int_literal" },
1767
+ display_max_width: { type: "int_literal" },
1768
+ border_radius: { type: "float_literal" },
1769
+ bg_img_blur: { type: "float_literal" },
1770
+ bg_img_opacity: { type: "float_literal" },
1771
+ },
1772
+ child_elements: {},
1773
+ },
1774
+ audio: {
1775
+ kind: "content",
1776
+ category: "content",
1777
+ name: "Audio",
1778
+ display_order: 29,
1779
+ attributes: {
1780
+ ui_type: { type: "text_literal" },
1781
+ storage_id: { type: "text_literal" },
1782
+ is_storage_id_public: { type: "boolean_literal" },
1783
+ src: { type: "text_literal" },
1784
+ mime_type: { type: "text_literal" },
1785
+ title: { type: "text_literal" },
1786
+ album: { type: "text_literal" },
1787
+ artist: { type: "text_literal" },
1788
+ image_storage_id: { type: "text_literal" },
1789
+ image_is_storage_id_public: { type: "boolean_literal" },
1790
+ image_src: { type: "text_literal" },
1791
+ image_src_quick: { type: "text_literal" },
1792
+ image_mime_type: { type: "text_literal" },
1793
+ image_width: { type: "int_literal" },
1794
+ image_height: { type: "int_literal" },
1795
+ image_aspect_ratio: { type: "float_literal" },
1796
+ },
1797
+ child_elements: {},
1798
+ },
1799
+ video: {
1800
+ // tbd
1801
+ kind: "content",
1802
+ category: "content",
1803
+ name: "Video",
1804
+ display_order: 28,
1805
+ attributes: {},
1806
+ child_elements: {},
1807
+ },
1808
+ qr: {
1809
+ kind: "content",
1810
+ category: "content",
1811
+ name: "QR",
1812
+ display_order: 29,
1813
+ attributes: {
1814
+ margin: {
1815
+ type: "int_literal",
1816
+ minimum: 0,
1817
+ maximum: 50,
1818
+ default: 10,
1819
+ },
1820
+ size: {
1821
+ type: "int_literal",
1822
+ minimum: 50,
1823
+ maximum: 500,
1824
+ default: 200,
1825
+ },
1826
+ image_size: {
1827
+ type: "float_literal",
1828
+ minimum: 0.1,
1829
+ maximum: 1,
1830
+ default: 0.5,
1831
+ },
1832
+ type_number: {
1833
+ type: "int_literal",
1834
+ minimum: 0,
1835
+ maximum: 4,
1836
+ default: 0,
1837
+ },
1838
+ error_correction_level: {
1839
+ type: "text_literal",
1840
+ enum: ["L", "M", "Q", "H"],
1841
+ default: "M",
1842
+ },
1843
+ color: { type: "color_literal", default: "var(--primary-t)" },
1844
+ corner_color: {
1845
+ type: "color_literal",
1846
+ default: "color-mix(in oklab, var(--primary-t), var(--bg) 20%)",
1847
+ },
1848
+ background_color: {
1849
+ type: "color_literal",
1850
+ default: "var(--shadow1-t)",
1851
+ },
1852
+ border_color: {
1853
+ type: "color_literal",
1854
+ default: "var(--shadow7-t)",
1855
+ },
1856
+ border_radius: {
1857
+ type: "int_literal",
1858
+ minimum: 0,
1859
+ maximum: 10,
1860
+ default: 5,
1861
+ },
1862
+ border_width: {
1863
+ type: "int_literal",
1864
+ minimum: 0,
1865
+ maximum: 3,
1866
+ default: 5,
1867
+ },
1868
+ data: { type: "text_literal" },
1869
+ image: {
1870
+ type: "image_literal",
1871
+ },
1872
+ extension: {
1873
+ type: "text_literal",
1874
+ enum: ["svg", "png", "jpeg"],
1875
+ default: "svg",
1876
+ },
1877
+ quality: {
1878
+ type: "float_literal",
1879
+ minimum: 0,
1880
+ maximum: 1,
1881
+ default: 0.8,
1882
+ },
1883
+ },
1884
+ child_elements: {},
1885
+ },
1886
+ table: {
1887
+ kind: "content",
1888
+ category: "content",
1889
+ name: "Table",
1890
+ display_order: 30,
1891
+ attributes: {
1892
+ caption: { type: "text_literal" },
1893
+ },
1894
+ child_elements: {
1895
+ thead: { display_order: 1, child_min_limit: 1, child_max_limit: 1 },
1896
+ tbody: { display_order: 2, child_min_limit: 1, child_max_limit: 1 },
1897
+ tfoot: { display_order: 3, child_min_limit: 0, child_max_limit: 1 },
1898
+ },
1899
+ },
1900
+ thead: {
1901
+ kind: "content",
1902
+ category: "content",
1903
+ name: "Table Header",
1904
+ display_order: 31,
1905
+ attributes: {},
1906
+ child_elements: {
1907
+ tr: { display_order: 1, child_min_limit: 1, child_max_limit: 1 },
1908
+ },
1909
+ },
1910
+ tbody: {
1911
+ kind: "content",
1912
+ category: "content",
1913
+ name: "Table Body",
1914
+ display_order: 32,
1915
+ attributes: {},
1916
+ child_elements: {
1917
+ tr: { display_order: 1, child_min_limit: 1, child_max_limit: 999 },
1918
+ },
1919
+ },
1920
+ tfoot: {
1921
+ kind: "content",
1922
+ category: "content",
1923
+ name: "Table Footer",
1924
+ display_order: 33,
1925
+ attributes: {},
1926
+ child_elements: {
1927
+ tr: { display_order: 1, child_min_limit: 0, child_max_limit: 1 },
1928
+ },
1929
+ },
1930
+ tr: {
1931
+ kind: "content",
1932
+ category: "content",
1933
+ name: "Table Row",
1934
+ display_order: 34,
1935
+ attributes: {},
1936
+ child_elements: {
1937
+ th: { display_order: 1, child_min_limit: 1, child_max_limit: 999 },
1938
+ td: { display_order: 2, child_min_limit: 1, child_max_limit: 999 },
1939
+ },
1940
+ },
1941
+ th: {
1942
+ kind: "content",
1943
+ category: "content",
1944
+ name: "Table Head Cell",
1945
+ display_order: 35,
1946
+ attributes: {},
1947
+ child_elements: {
1948
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1949
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1950
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1951
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1952
+ },
1953
+ },
1954
+ td: {
1955
+ kind: "content",
1956
+ category: "content",
1957
+ name: "Table Body Cell",
1958
+ display_order: 36,
1959
+ attributes: {},
1960
+ child_elements: {
1961
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
1962
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
1963
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
1964
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
1965
+ link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
1966
+ ref: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
1967
+ q: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
1968
+ span: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
1969
+ br: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
1970
+ sub: { display_order: 10, child_min_limit: 0, child_max_limit: 99 },
1971
+ sup: { display_order: 11, child_min_limit: 0, child_max_limit: 99 },
1972
+ s: { display_order: 12, child_min_limit: 0, child_max_limit: 99 },
1973
+ mark: { display_order: 13, child_min_limit: 0, child_max_limit: 99 },
1974
+ p: { display_order: 14, child_min_limit: 0, child_max_limit: 99 },
1975
+ ul: { display_order: 15, child_min_limit: 0, child_max_limit: 99 },
1976
+ ol: { display_order: 16, child_min_limit: 0, child_max_limit: 99 },
1977
+ code_inline: { display_order: 17, child_min_limit: 0, child_max_limit: 99 },
1978
+ code: { display_order: 18, child_min_limit: 0, child_max_limit: 99 },
1979
+ figure: { display_order: 19, child_min_limit: 0, child_max_limit: 99 },
1980
+ image: { display_order: 20, child_min_limit: 0, child_max_limit: 99 },
1981
+ time: { display_order: 21, child_min_limit: 0, child_max_limit: 99 },
1982
+ location: { display_order: 22, child_min_limit: 0, child_max_limit: 99 },
1983
+ },
1984
+ },
1985
+ nav: {
1986
+ kind: "content",
1987
+ category: "content",
1988
+ name: "Navigation",
1989
+ display_order: 37,
1990
+ attributes: {},
1991
+ child_elements: {},
1992
+ },
1993
+ code: {
1994
+ kind: "content",
1995
+ category: "content",
1996
+ name: "Code Block",
1997
+ display_order: 38,
1998
+ attributes: {
1999
+ content: { type: "text_literal" },
2000
+ language: { type: "text_literal" },
2001
+ },
2002
+ child_elements: {},
2003
+ },
2004
+ code_inline: {
2005
+ kind: "content",
2006
+ category: "content",
2007
+ name: "Code Inline",
2008
+ display_order: 39,
2009
+ attributes: {
2010
+ content: { type: "text_literal" },
2011
+ color: { type: "color_literal" },
2012
+ },
2013
+ child_elements: {},
2014
+ },
2015
+ br: {
2016
+ kind: "content",
2017
+ category: "content",
2018
+ name: "Line Break",
2019
+ display_order: 40,
2020
+ attributes: {},
2021
+ child_elements: {},
2022
+ },
2023
+ spacer: {
2024
+ kind: "content",
2025
+ category: "content",
2026
+ name: "Spacer",
2027
+ display_order: 40,
2028
+ attributes: {
2029
+ mt: { type: "float_literal" },
2030
+ mb: { type: "float_literal" },
2031
+ ml: { type: "float_literal" },
2032
+ mr: { type: "float_literal" },
2033
+ is_vert: { type: "boolean_literal" },
2034
+ color: { type: "color_literal" },
2035
+ },
2036
+ child_elements: {},
2037
+ },
2038
+ hr: {
2039
+ kind: "content",
2040
+ category: "content",
2041
+ name: "Horizontal Rule",
2042
+ display_order: 41,
2043
+ attributes: {},
2044
+ child_elements: {},
2045
+ },
2046
+ sub: {
2047
+ kind: "content",
2048
+ category: "content",
2049
+ name: "Subscript",
2050
+ display_order: 42,
2051
+ attributes: {},
2052
+ child_elements: {
2053
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
2054
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
2055
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
2056
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
2057
+ link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
2058
+ q: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
2059
+ span: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
2060
+ s: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
2061
+ mark: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
2062
+ },
2063
+ },
2064
+ sup: {
2065
+ kind: "content",
2066
+ category: "content",
2067
+ name: "Superscript",
2068
+ display_order: 43,
2069
+ attributes: {},
2070
+ child_elements: {
2071
+ base_text: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
2072
+ strong: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
2073
+ em: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
2074
+ strong_em: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
2075
+ link: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
2076
+ q: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
2077
+ span: { display_order: 7, child_min_limit: 0, child_max_limit: 99 },
2078
+ s: { display_order: 8, child_min_limit: 0, child_max_limit: 99 },
2079
+ mark: { display_order: 9, child_min_limit: 0, child_max_limit: 99 },
2080
+ },
2081
+ },
2082
+ pre: {
2083
+ kind: "content",
2084
+ category: "content",
2085
+ name: "Preformatted Text",
2086
+ display_order: 44,
2087
+ attributes: {},
2088
+ child_elements: {},
2089
+ },
2090
+ ref: {
2091
+ kind: "content",
2092
+ category: "content",
2093
+ name: "Reference",
2094
+ display_order: 45,
2095
+ attributes: {
2096
+ href: { type: "text_literal" },
2097
+ content: { type: "text_literal" },
2098
+ text_color: { type: "color_literal" },
2099
+ },
2100
+ child_elements: {},
2101
+ },
2102
+ footer: {
2103
+ kind: "content",
2104
+ category: "content",
2105
+ name: "Footer",
2106
+ display_order: 46,
2107
+ attributes: {},
2108
+ child_elements: {
2109
+ ol: { display_order: 1, child_min_limit: 0, child_max_limit: 99 },
2110
+ ul: { display_order: 2, child_min_limit: 0, child_max_limit: 99 },
2111
+ p: { display_order: 3, child_min_limit: 0, child_max_limit: 99 },
2112
+ h4: { display_order: 4, child_min_limit: 0, child_max_limit: 99 },
2113
+ h5: { display_order: 5, child_min_limit: 0, child_max_limit: 99 },
2114
+ h6: { display_order: 6, child_min_limit: 0, child_max_limit: 99 },
2115
+ },
2116
+ },
2117
+ youtube_video: {
2118
+ kind: "content",
2119
+ category: "content",
2120
+ name: "YouTube Video",
2121
+ display_order: 47,
2122
+ attributes: {
2123
+ id: { type: "text_literal" },
2124
+ video_id: { type: "text_literal" },
2125
+ is_dark_theme: { type: "boolean_literal" },
2126
+ },
2127
+ child_elements: {},
2128
+ },
2129
+ x_post: {
2130
+ kind: "content",
2131
+ category: "content",
2132
+ name: "X Post",
2133
+ display_order: 48,
2134
+ attributes: {
2135
+ post_id: { type: "text_literal" },
2136
+ },
2137
+ child_elements: {},
2138
+ },
2139
+ table_advanced: {
2140
+ kind: "content",
2141
+ category: "content",
2142
+ name: "Table Advanced",
2143
+ display_order: 51,
2144
+ attributes: {
2145
+ // obviously this is way off just pasted in to start
2146
+ columns: {
2147
+ type: "object",
2148
+ properties: {
2149
+ id: { type: "text_literal" },
2150
+ description: { type: "text_literal" },
2151
+ header_content: { type: "text_literal" },
2152
+ body_content: { type: "text_literal" },
2153
+ is_shown: { type: "text_literal" },
2154
+ is_fixed: { type: "text_literal" },
2155
+ alignment: { type: "text_literal" },
2156
+ min_width: { type: "text_literal" },
2157
+ max_width: { type: "text_literal" },
2158
+ display_order: { type: "text_literal" },
2159
+ is_use_in_short_display: { type: "boolean_literal" },
2160
+ is_autogenerated: { type: "boolean_literal" },
2161
+ is_updatable: { type: "boolean_literal" },
2162
+ is_db_column: { type: "boolean_literal" },
2163
+ db_data_type: { type: "text_literal" },
2164
+ postgres_type: { type: "text_literal" },
2165
+ default_value: { type: "text_literal" },
2166
+ quick_sort_variable_path: { type: "text_literal" },
2167
+ is_primary_key: { type: "boolean_literal" },
2168
+ is_nullable: { type: "boolean_literal" },
2169
+ is_force_uniqueness: { type: "boolean_literal" },
2170
+ foreign_table_id: { type: "text_literal" },
2171
+ is_cascade: { type: "text_literal" },
2172
+ },
2173
+ additionalProperties: false,
2174
+ required: [],
2175
+ },
2176
+ rows_data_from_variable_path: { type: "text_literal" },
2177
+ is_data_editable: { type: "text_literal" },
2178
+ is_paginate: { type: "text_literal" },
2179
+ nav_items: { type: "text_literal" },
2180
+ sort_by: { type: "text_literal" },
2181
+ filter: { type: "text_literal" },
2182
+ row_searchable_content: { type: "text_literal" },
2183
+ row_input_content: { type: "text_literal" },
2184
+ table_header_max_height: { type: "text_literal" },
2185
+ table_row_max_height: { type: "text_literal" },
2186
+ },
2187
+ child_elements: {},
2188
+ },
2189
+ number: {
2190
+ kind: "content",
2191
+ category: "content",
2192
+ name: "Number",
2193
+ display_order: 51,
2194
+ attributes: {
2195
+ val: { type: ["float_literal", "int_literal", "bigint_literal"] },
2196
+ },
2197
+ child_elements: {},
2198
+ },
2199
+ color: {
2200
+ kind: "content",
2201
+ category: "content",
2202
+ name: "Color",
2203
+ display_order: 52,
2204
+ attributes: {
2205
+ val: { type: "color_literal" },
2206
+ },
2207
+ child_elements: {},
2208
+ },
2209
+ json: {
2210
+ kind: "content",
2211
+ category: "content",
2212
+ name: "JSON",
2213
+ display_order: 53,
2214
+ attributes: {
2215
+ is_show_buttons: { type: "boolean_literal" },
2216
+ val: { type: "json_literal" },
2217
+ },
2218
+ child_elements: {},
2219
+ },
2220
+ email_address: {
2221
+ kind: "content",
2222
+ category: "content",
2223
+ name: "Email Address",
2224
+ attributes: {
2225
+ is_full: { type: "boolean_literal" },
2226
+ is_show_copy_to_clipboard: { type: "boolean_literal" },
2227
+ is_show_mail_to: { type: "boolean_literal", default: false },
2228
+ },
2229
+ },
2230
+ email_address_input: {
2231
+ kind: "content",
2232
+ category: "content",
2233
+ name: "Email Address Input",
2234
+ attributes: {
2235
+ placeholder: { type: "text_literal" },
2236
+ maximum_length: { type: "int_literal" },
2237
+ },
2238
+ },
2239
+ phone: {
2240
+ kind: "content",
2241
+ category: "content",
2242
+ name: "Phone",
2243
+ attributes: {
2244
+ is_full: { type: "boolean_literal" },
2245
+ is_show_country_code: { type: "boolean_literal", default: true },
2246
+ is_show_call_button: { type: "boolean_literal", default: true },
2247
+ is_show_local: { type: "boolean_literal", default: true },
2248
+ is_show_main_number: { type: "boolean_literal", default: true },
2249
+ is_show_type: { type: "boolean_literal", default: true },
2250
+ },
2251
+ },
2252
+ phone_input: {
2253
+ kind: "content",
2254
+ category: "content",
2255
+ name: "Phone",
2256
+ attributes: {
2257
+ placeholder: { type: "text_literal" },
2258
+ },
2259
+ },
2260
+ time_input: {
2261
+ kind: "content",
2262
+ category: "content",
2263
+ name: "Time Input",
2264
+ attributes: {
2265
+ val_from_variable_path: {
2266
+ type: "variable_path_literal",
2267
+ allowed_types: ["time_literal"],
2268
+ },
2269
+ granularity: {
2270
+ type: "text_literal",
2271
+ enum: ["year", "month", "week", "day", "hour", "minute", "second"],
2272
+ default: "day",
2273
+ },
2274
+ },
2275
+ },
2276
+ time: {
2277
+ kind: "content",
2278
+ category: "content",
2279
+ name: "Time",
2280
+ display_order: 49,
2281
+ attributes: {
2282
+ hour: { type: "int_literal" },
2283
+ year: { type: "int_literal" },
2284
+ color: { type: "color_literal" },
2285
+ epoch: { type: "bigint_literal" },
2286
+ month: { type: "int_literal" },
2287
+ minute: { type: "int_literal" },
2288
+ second: { type: "int_literal" },
2289
+ content: { type: "text_literal" },
2290
+ datetime: { type: "text_literal" },
2291
+ timezone: { type: "text_literal" },
2292
+ day_of_week: { type: "int_literal" },
2293
+ day_of_year: { type: "int_literal" },
2294
+ granularity: { type: "text_literal" },
2295
+ day_of_month: { type: "int_literal" },
2296
+ week_of_year: { type: "int_literal" },
2297
+ },
2298
+ child_elements: {},
2299
+ },
2300
+ phone_number: {
2301
+ kind: "content",
2302
+ category: "content",
2303
+ name: "Phone Number",
2304
+ display_order: 50,
2305
+ attributes: {
2306
+ tbd: { type: "text_literal" },
2307
+ },
2308
+ child_elements: {},
2309
+ },
2310
+ phone_number_input: {
2311
+ kind: "content",
2312
+ category: "content",
2313
+ name: "Phone Number",
2314
+ display_order: 50,
2315
+ attributes: {
2316
+ tbd: { type: "text_literal" },
2317
+ },
2318
+ child_elements: {},
2319
+ },
2320
+ file: {
2321
+ kind: "content",
2322
+ category: "content",
2323
+ name: "File",
2324
+ attributes: {},
2325
+ },
2326
+ boolean_icon: {
2327
+ kind: "content",
2328
+ category: "content",
2329
+ name: "Boolean Icon",
2330
+ attributes: {
2331
+ true_icon: {
2332
+ type: "icon_literal",
2333
+ default: "x",
2334
+ // enum: icon_ids
2335
+ },
2336
+ false_icon: {
2337
+ type: "icon_literal",
2338
+ default: "check",
2339
+ // enum: icon_ids
2340
+ },
2341
+ },
2342
+ },
2343
+ tag: {
2344
+ kind: "content",
2345
+ category: "content",
2346
+ name: "Tag",
2347
+ attributes: {
2348
+ // custom options input
2349
+ options: {
2350
+ type: "array_uniform_literal",
2351
+ // items: { anyOf }
2352
+ },
2353
+ },
2354
+ },
2355
+ // foreign_key: {
2356
+ // kind: "content",
2357
+ // category: "content",
2358
+ // name: "Foreign Key",
2359
+ // attributes: {},
2360
+ // },
2361
+ variable_path_input: {
2362
+ kind: "content",
2363
+ category: "content",
2364
+ name: "Variable Path Input",
2365
+ attributes: {},
2366
+ },
2367
+ number_input: {
2368
+ kind: "content",
2369
+ category: "content",
2370
+ name: "Number Input",
2371
+ attributes: {
2372
+ label: { type: "text_literal" },
2373
+ placeholder: { type: "text_literal" },
2374
+ val_from_variable_path: {
2375
+ type: "variable_path_literal",
2376
+ allowed_types: ["int_literal", "float_literal", "bigint_literal"],
2377
+ },
2378
+ },
2379
+ },
2380
+ text_input: {
2381
+ kind: "content",
2382
+ category: "content",
2383
+ name: "Text Input",
2384
+ attributes: {
2385
+ val_from_variable_path: {
2386
+ type: "variable_path_literal",
2387
+ allowed_types: ["text_literal"],
2388
+ },
2389
+ label: { type: "text_literal" },
2390
+ placeholder: { type: "text_literal" },
2391
+ maximum_length: { type: "int_literal" },
2392
+ is_text_hidable: { type: "boolean_literal", default: false },
2393
+ is_text_hidden: { type: "boolean_literal", default: false },
2394
+ },
2395
+ },
2396
+ slider: {
2397
+ kind: "content",
2398
+ category: "content",
2399
+ name: "Slider",
2400
+ attributes: {
2401
+ val_from_variable_path: {
2402
+ type: "variable_path_literal",
2403
+ allowed_types: ["int_literal", "float_literal", "bigint_literal"],
2404
+ },
2405
+ label: { type: "text_literal" },
2406
+ is_nullable: { type: "boolean_literal", default: false },
2407
+ minimum: { type: "int_literal", default: 0 },
2408
+ maximum: { type: "int_literal", default: 10 },
2409
+ step: { type: "float_literal", default: 1 },
2410
+ color: { type: "color_literal" },
2411
+ is_short: { type: "boolean_literal", default: false },
2412
+ step: { type: "int_literal", default: 1 },
2413
+ },
2414
+ },
2415
+ checkbox: {
2416
+ kind: "content",
2417
+ category: "content",
2418
+ name: "Checkbox",
2419
+ attributes: {
2420
+ val_from_variable_path: {
2421
+ type: "variable_path_literal",
2422
+ allowed_types: ["boolean_literal"],
2423
+ },
2424
+ label: { type: "text_literal" },
2425
+ size: { type: "float_literal", default: 2.4 },
2426
+ type: {
2427
+ type: "text_literal",
2428
+ default: "checkbox",
2429
+ enum: ["checkbox", "toggle"],
2430
+ },
2431
+ label: { type: "text_literal" },
2432
+ name: { type: "text_literal" },
2433
+ color: { type: "color_literal" },
2434
+ // on_val
2435
+ // off_val
2436
+ },
2437
+ },
2438
+ arrow_toggle_input: {
2439
+ kind: "content",
2440
+ category: "content",
2441
+ name: "Arrow Toggle",
2442
+ },
2443
+ icon_input: {
2444
+ kind: "content",
2445
+ category: "content",
2446
+ name: "Icon Input",
2447
+ attributes: {
2448
+ tbd: { type: "text_literal" },
2449
+ },
2450
+ },
2451
+ icon: {
2452
+ kind: "content",
2453
+ category: "content",
2454
+ name: "Icon",
2455
+ display_order: 50,
2456
+ attributes: {
2457
+ icon_id: { type: "text_literal" },
2458
+ color: { type: "color_literal" },
2459
+ },
2460
+ child_elements: {},
2461
+ },
2462
+ cron_input: {
2463
+ kind: "content",
2464
+ category: "content",
2465
+ name: "Cron",
2466
+ attributes: {
2467
+ tbd: { type: "text_literal" },
2468
+ },
2469
+ },
2470
+ cron: {
2471
+ kind: "content",
2472
+ category: "content",
2473
+ name: "Cron",
2474
+ attributes: {
2475
+ tbd: { type: "text_literal" },
2476
+ },
2477
+ },
2478
+ file_input: {
2479
+ kind: "content",
2480
+ category: "content",
2481
+ name: "File Picker",
2482
+ attributes: {
2483
+ accept: {
2484
+ type: "array_uniform_literal",
2485
+ items: {
2486
+ type: "text_literal",
2487
+ // enum: mime_types
2488
+ },
2489
+ },
2490
+ is_multiselect: { type: "boolean_literal", default: false },
2491
+ is_drop_zone: { type: "boolean_literal", default: true },
2492
+ },
2493
+ },
2494
+ color: {
2495
+ kind: "content",
2496
+ category: "content",
2497
+ name: "Color",
2498
+ display_order: 52,
2499
+ attributes: {
2500
+ val: { type: "color_literal" },
2501
+ },
2502
+ child_elements: {},
2503
+ },
2504
+ dropdown: {
2505
+ kind: "content",
2506
+ category: "content",
2507
+ name: "Dropdown",
2508
+ attributes: {
2509
+ options: {
2510
+ json_schema: {
2511
+ type: "array",
2512
+ items: {
2513
+ type: "object",
2514
+ properties: {
2515
+ key: {
2516
+ anyOf: [{ type: "string" }, { type: "number" }],
2517
+ },
2518
+ name: {
2519
+ type: "string",
2520
+ },
2521
+ },
2522
+ required: ["key", "name"],
2523
+ additionalProperties: false,
2524
+ },
2525
+ },
2526
+ },
2527
+ },
2528
+ },
2529
+ color_input: {
2530
+ kind: "content",
2531
+ category: "content",
2532
+ name: "Color Input",
2533
+ attributes: {
2534
+ val_from_variable_path: {
2535
+ type: "variable_path_literal",
2536
+ allowed_types: ["color_literal"],
2537
+ },
2538
+ is_show_opacity: { type: "boolean_literal", default: true },
2539
+ h_options: {
2540
+ type: "array_uniform_literal",
2541
+ items: {
2542
+ type: "int_literal",
2543
+ enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24],
2544
+ },
2545
+ },
2546
+ l_options: {
2547
+ type: "array_uniform_literal",
2548
+ items: {
2549
+ type: "int_literal",
2550
+ enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24],
2551
+ },
2552
+ },
2553
+ c_options: {
2554
+ type: "array_uniform_literal",
2555
+ items: {
2556
+ type: "int_literal",
2557
+ enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24],
2558
+ },
2559
+ },
2560
+ o_options: {
2561
+ type: "array_uniform_literal",
2562
+ items: {
2563
+ type: "int_literal",
2564
+ enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24],
2565
+ },
2566
+ },
2567
+ },
2568
+ },
2569
+ location_input: {
2570
+ kind: "content",
2571
+ category: "content",
2572
+ name: "Location Input",
2573
+ attributes: {
2574
+ val_from_variable_path: {
2575
+ type: "variable_path_literal",
2576
+ allowed_types: ["location_literal"],
2577
+ },
2578
+ is_show_opacity: { type: "boolean_literal", default: true },
2579
+ },
2580
+ },
2581
+ location: {
2582
+ kind: "content",
2583
+ category: "content",
2584
+ name: "Location",
2585
+ attributes: {
2586
+ // val_from_variable_path: {
2587
+ // type: "variable_path_literal",
2588
+ // allowed_types: ["location_literal"],
2589
+ // },
2590
+ val: { type: "location_literal" },
2591
+ is_popover: { type: "boolean_literal", default: false },
2592
+ is_inline: { type: "boolean_literal", default: false },
2593
+ },
2594
+ },
2595
+ loop: {
2596
+ kind: "content",
2597
+ category: "content",
2598
+ name: "Loop",
2599
+ attributes: {
2600
+ val_from_variable_path: {
2601
+ type: "variable_path_literal",
2602
+ allowed_types: ["array_uniform_literal", "object_uniform_literal"],
2603
+ },
2604
+ iter_identifier: { type: "text_literal" },
2605
+ join_text: { type: "text_literal" },
2606
+ },
2607
+ child_elements: {
2608
+ ...main_child_element_options,
2609
+ },
2610
+ },
2611
+ // function_input: {}, maybe?
2612
+ }
2613
+
2614
+ export const node_types = {
2615
+ ...literal_types,
2616
+ ...content_types,
2617
+ }
2618
+
2619
+ function get_content_node_json_schema(type_id) {
2620
+ //tbd
2621
+ }
2622
+
2623
2623
  function find_match(match_for, value) {
2624
2624
  if (match_for?.type == "operator") {
2625
2625
  if (Array.isArray(match_for?.conditions)) {