@augeo/smelt 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/.claude/settings.json +11 -0
  2. package/.github/workflows/verify.yml +64 -0
  3. package/.gitmodules +3 -0
  4. package/.prettierignore +25 -0
  5. package/.prettierrc.cjs +9 -0
  6. package/.zed/settings.json +21 -0
  7. package/AGENTS.md +232 -0
  8. package/LICENSE +21 -0
  9. package/README.md +266 -0
  10. package/biome.json +58 -0
  11. package/dist/cli.d.mts +1 -0
  12. package/dist/cli.mjs +350 -0
  13. package/dist/schema.d.mts +265 -0
  14. package/dist/schema.mjs +21 -0
  15. package/docs/TESTING.md +293 -0
  16. package/docs/assets-plan.md +197 -0
  17. package/docs/build-spec.md +466 -0
  18. package/docs/library-conversion-plan.md +419 -0
  19. package/example/.gitattributes +7 -0
  20. package/example/.shopifyignore +28 -0
  21. package/example/.theme-check.yml +7 -0
  22. package/example/blocks/_built--sections--hero--blocks--feature.liquid +52 -0
  23. package/example/config/settings_schema.json +10 -0
  24. package/example/layout/theme.liquid +25 -0
  25. package/example/locales/en.default.json +1 -0
  26. package/example/package-lock.json +51 -0
  27. package/example/package.json +20 -0
  28. package/example/sections/built--sections--hero.liquid +83 -0
  29. package/example/snippets/built--components--button.liquid +38 -0
  30. package/example/snippets/built--components--card.liquid +33 -0
  31. package/example/src/components/button/button.css +13 -0
  32. package/example/src/components/card/card.css +16 -0
  33. package/example/src/components/card/card.liquid +9 -0
  34. package/example/src/sections/hero/blocks/feature/feature.css +11 -0
  35. package/example/src/sections/hero/blocks/feature/feature.liquid +9 -0
  36. package/example/src/sections/hero/blocks/feature/feature.schema.ts +14 -0
  37. package/example/src/sections/hero/hero.css +15 -0
  38. package/example/src/sections/hero/hero.liquid +16 -0
  39. package/example/src/sections/hero/hero.schema.ts +26 -0
  40. package/example/src/sections/hero/hero.test.ts +43 -0
  41. package/example/src/utilities/labels.ts +5 -0
  42. package/example/templates/index.liquid +1 -0
  43. package/example/tsconfig.json +10 -0
  44. package/example/vitest.config.ts +6 -0
  45. package/lib/build/build.test.ts +475 -0
  46. package/lib/build/build.ts +314 -0
  47. package/lib/build/command.ts +27 -0
  48. package/lib/build/index.ts +1 -0
  49. package/lib/cli.ts +17 -0
  50. package/lib/dev/command.ts +25 -0
  51. package/lib/dev/index.ts +1 -0
  52. package/lib/dev/watch.ts +52 -0
  53. package/lib/resolver.test.ts +275 -0
  54. package/lib/resolver.ts +156 -0
  55. package/lib/schema.ts +37 -0
  56. package/package.json +59 -0
  57. package/scripts/codegen-schema.ts +66 -0
  58. package/src/components/button/button.css +13 -0
  59. package/src/components/button/button.liquid +5 -0
  60. package/src/components/button/button.ts +5 -0
  61. package/src/tsconfig.json +10 -0
  62. package/tests/example.test.ts +101 -0
  63. package/tsconfig.json +20 -0
  64. package/tsdown.config.ts +14 -0
  65. package/vendor/theme-liquid-docs/.gitattributes +10 -0
  66. package/vendor/theme-liquid-docs/.github/CODEOWNERS +1 -0
  67. package/vendor/theme-liquid-docs/.github/CODE_OF_CONDUCT.md +73 -0
  68. package/vendor/theme-liquid-docs/.github/ISSUE_TEMPLATE/bug_report.md +17 -0
  69. package/vendor/theme-liquid-docs/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
  70. package/vendor/theme-liquid-docs/.github/dependabot.yaml +6 -0
  71. package/vendor/theme-liquid-docs/.github/workflows/ci.yml +33 -0
  72. package/vendor/theme-liquid-docs/.github/workflows/cla.yml +27 -0
  73. package/vendor/theme-liquid-docs/.github/workflows/shopify-dev-preview-automation.yml +86 -0
  74. package/vendor/theme-liquid-docs/.github/workflows/update-latest.yml +56 -0
  75. package/vendor/theme-liquid-docs/.prettierrc.json +16 -0
  76. package/vendor/theme-liquid-docs/.vscode/settings.json +28 -0
  77. package/vendor/theme-liquid-docs/LICENSE.md +7 -0
  78. package/vendor/theme-liquid-docs/README.md +48 -0
  79. package/vendor/theme-liquid-docs/ai/claude/CLAUDE.md +1485 -0
  80. package/vendor/theme-liquid-docs/ai/cursor/rules/assets.mdc +15 -0
  81. package/vendor/theme-liquid-docs/ai/cursor/rules/blocks.mdc +339 -0
  82. package/vendor/theme-liquid-docs/ai/cursor/rules/examples/block-example-group.mdc +103 -0
  83. package/vendor/theme-liquid-docs/ai/cursor/rules/examples/block-example-text.mdc +59 -0
  84. package/vendor/theme-liquid-docs/ai/cursor/rules/examples/section-example.mdc +61 -0
  85. package/vendor/theme-liquid-docs/ai/cursor/rules/examples/snippet-example.mdc +72 -0
  86. package/vendor/theme-liquid-docs/ai/cursor/rules/liquid.mdc +837 -0
  87. package/vendor/theme-liquid-docs/ai/cursor/rules/locales.mdc +100 -0
  88. package/vendor/theme-liquid-docs/ai/cursor/rules/localization.mdc +67 -0
  89. package/vendor/theme-liquid-docs/ai/cursor/rules/mcp.mdc +2 -0
  90. package/vendor/theme-liquid-docs/ai/cursor/rules/schemas.mdc +184 -0
  91. package/vendor/theme-liquid-docs/ai/cursor/rules/sections.mdc +84 -0
  92. package/vendor/theme-liquid-docs/ai/cursor/rules/settings-schema.mdc +51 -0
  93. package/vendor/theme-liquid-docs/ai/cursor/rules/snippets.mdc +119 -0
  94. package/vendor/theme-liquid-docs/ai/github/copilot-instructions.md +1485 -0
  95. package/vendor/theme-liquid-docs/ai/liquid.mdc +638 -0
  96. package/vendor/theme-liquid-docs/data/filters.json +6148 -0
  97. package/vendor/theme-liquid-docs/data/latest.json +2 -0
  98. package/vendor/theme-liquid-docs/data/objects.json +20594 -0
  99. package/vendor/theme-liquid-docs/data/shopify_system_translations.json +2586 -0
  100. package/vendor/theme-liquid-docs/data/tags.json +1276 -0
  101. package/vendor/theme-liquid-docs/package.json +20 -0
  102. package/vendor/theme-liquid-docs/schemas/manifest_schema.json +31 -0
  103. package/vendor/theme-liquid-docs/schemas/manifest_theme.json +19 -0
  104. package/vendor/theme-liquid-docs/schemas/manifest_theme_app_extension.json +10 -0
  105. package/vendor/theme-liquid-docs/schemas/theme/app_block_entry.json +13 -0
  106. package/vendor/theme-liquid-docs/schemas/theme/default_setting_values.json +24 -0
  107. package/vendor/theme-liquid-docs/schemas/theme/local_block_entry.json +25 -0
  108. package/vendor/theme-liquid-docs/schemas/theme/preset.json +72 -0
  109. package/vendor/theme-liquid-docs/schemas/theme/preset_blocks.json +91 -0
  110. package/vendor/theme-liquid-docs/schemas/theme/section.json +208 -0
  111. package/vendor/theme-liquid-docs/schemas/theme/setting.json +1413 -0
  112. package/vendor/theme-liquid-docs/schemas/theme/settings.json +10 -0
  113. package/vendor/theme-liquid-docs/schemas/theme/targetted_block_entry.json +15 -0
  114. package/vendor/theme-liquid-docs/schemas/theme/theme_block.json +91 -0
  115. package/vendor/theme-liquid-docs/schemas/theme/theme_block_entry.json +14 -0
  116. package/vendor/theme-liquid-docs/schemas/theme/theme_settings.json +83 -0
  117. package/vendor/theme-liquid-docs/schemas/theme/translations.json +63 -0
  118. package/vendor/theme-liquid-docs/schemas/update/update_extension_schema_v1.json +186 -0
  119. package/vendor/theme-liquid-docs/tests/fixtures/section-nested-blocks.json +18 -0
  120. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-1.json +90 -0
  121. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-2.json +201 -0
  122. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-3.json +29 -0
  123. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-4.json +315 -0
  124. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-5.json +114 -0
  125. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-6.json +63 -0
  126. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-conditional-settings.json +145 -0
  127. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-preset-blocks-as-hash.json +60 -0
  128. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-static-block-preset.json +76 -0
  129. package/vendor/theme-liquid-docs/tests/fixtures/section-settings.json +34 -0
  130. package/vendor/theme-liquid-docs/tests/fixtures/theme-block-1.json +234 -0
  131. package/vendor/theme-liquid-docs/tests/fixtures/theme-block-2.json +253 -0
  132. package/vendor/theme-liquid-docs/tests/fixtures/theme-block-basics.json +48 -0
  133. package/vendor/theme-liquid-docs/tests/fixtures/theme-block-conditional-settings.json +202 -0
  134. package/vendor/theme-liquid-docs/tests/fixtures/theme-block-presets-as-hash.json +50 -0
  135. package/vendor/theme-liquid-docs/tests/fixtures/theme-block-settings.json +34 -0
  136. package/vendor/theme-liquid-docs/tests/fixtures/theme-settings-all-settings.json +313 -0
  137. package/vendor/theme-liquid-docs/tests/fixtures/theme-settings-dawn.json +1469 -0
  138. package/vendor/theme-liquid-docs/tests/fixtures/theme-settings-metadata.json +10 -0
  139. package/vendor/theme-liquid-docs/tests/fixtures/translations-1.json +14 -0
  140. package/vendor/theme-liquid-docs/tests/section.spec.ts +367 -0
  141. package/vendor/theme-liquid-docs/tests/test-constants.ts +58 -0
  142. package/vendor/theme-liquid-docs/tests/test-helpers.ts +104 -0
  143. package/vendor/theme-liquid-docs/tests/theme-settings/color_palette.spec.ts +184 -0
  144. package/vendor/theme-liquid-docs/tests/theme-settings/color_scheme_group.spec.ts +143 -0
  145. package/vendor/theme-liquid-docs/tests/theme-settings/general.spec.ts +192 -0
  146. package/vendor/theme-liquid-docs/tests/theme-settings/metaobject.spec.ts +94 -0
  147. package/vendor/theme-liquid-docs/tests/theme-settings/resource_list.spec.ts +58 -0
  148. package/vendor/theme-liquid-docs/tests/theme-settings/theme-metadata.spec.ts +59 -0
  149. package/vendor/theme-liquid-docs/tests/theme_block.spec.ts +266 -0
  150. package/vendor/theme-liquid-docs/tests/translations_schema.spec.ts +31 -0
  151. package/vendor/theme-liquid-docs/yarn.lock +543 -0
  152. package/vitest.config.ts +7 -0
@@ -0,0 +1,253 @@
1
+ {
2
+ "name": "Group",
3
+ "tag": null,
4
+ "blocks": [{ "type": "@theme" }, { "type": "@app" }, { "type": "group" }],
5
+ "settings": [
6
+ {
7
+ "type": "select",
8
+ "id": "direction",
9
+ "label": "Content direction",
10
+ "options": [
11
+ {
12
+ "value": "row",
13
+ "label": "Horizontal"
14
+ },
15
+ {
16
+ "value": "column",
17
+ "label": "Vertical"
18
+ }
19
+ ],
20
+ "default": "row"
21
+ },
22
+ {
23
+ "type": "select",
24
+ "id": "justify_content",
25
+ "label": "Content position",
26
+ "options": [
27
+ {
28
+ "value": "flex-start",
29
+ "label": "Start"
30
+ },
31
+ {
32
+ "value": "center",
33
+ "label": "Center"
34
+ },
35
+ {
36
+ "value": "flex-end",
37
+ "label": "End"
38
+ }
39
+ ],
40
+ "default": "flex-start"
41
+ },
42
+ {
43
+ "type": "color_scheme",
44
+ "id": "color_scheme",
45
+ "label": "Color scheme",
46
+ "default": "scheme-1"
47
+ },
48
+ {
49
+ "type": "range",
50
+ "id": "width",
51
+ "label": "Width",
52
+ "min": 20,
53
+ "max": 100,
54
+ "step": 1,
55
+ "unit": "%",
56
+ "default": 100
57
+ },
58
+ {
59
+ "type": "paragraph",
60
+ "content": "Width is automatically optimized for mobile."
61
+ },
62
+ {
63
+ "type": "range",
64
+ "id": "padding",
65
+ "label": "Padding",
66
+ "min": 0,
67
+ "max": 100,
68
+ "step": 1,
69
+ "unit": "px",
70
+ "default": 16
71
+ }
72
+ ],
73
+ "presets": [
74
+ {
75
+ "name": "Group"
76
+ },
77
+ {
78
+ "name": "Column",
79
+ "settings": {
80
+ "direction": "column",
81
+ "width": 25,
82
+ "padding": 0
83
+ },
84
+ "blocks": [
85
+ {
86
+ "type": "image",
87
+ "settings": {
88
+ "ratio": "1"
89
+ }
90
+ },
91
+ {
92
+ "type": "group",
93
+ "settings": {
94
+ "padding": 0
95
+ },
96
+ "blocks": [
97
+ {
98
+ "type": "heading",
99
+ "settings": {
100
+ "heading": "Column",
101
+ "heading_size": "h3"
102
+ }
103
+ },
104
+ {
105
+ "type": "text",
106
+ "settings": {
107
+ "text": "<p>Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.</p>"
108
+ }
109
+ }
110
+ ]
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ "name": "Row",
116
+ "settings": {
117
+ "direction": "column"
118
+ },
119
+ "blocks": [
120
+ {
121
+ "type": "group",
122
+ "settings": {
123
+ "padding": 0
124
+ },
125
+ "blocks": [
126
+ {
127
+ "type": "image",
128
+ "settings": {
129
+ "width": 50
130
+ }
131
+ },
132
+ {
133
+ "type": "group",
134
+ "settings": {
135
+ "direction": "column",
136
+ "width": 50,
137
+ "padding": 60
138
+ },
139
+ "blocks": [
140
+ {
141
+ "type": "text",
142
+ "settings": {
143
+ "text": "<p>Caption</p>",
144
+ "text_style": "text-block--caption"
145
+ }
146
+ },
147
+ {
148
+ "type": "heading",
149
+ "settings": {
150
+ "heading": "Row"
151
+ }
152
+ },
153
+ {
154
+ "type": "text",
155
+ "settings": {
156
+ "text": "<p>Share information about your brand with your customers. Describe a product, make announcements, or welcome customers to your store.</p>"
157
+ }
158
+ },
159
+ {
160
+ "type": "link",
161
+ "settings": {
162
+ "style_class": "button-secondary"
163
+ }
164
+ }
165
+ ]
166
+ }
167
+ ]
168
+ }
169
+ ]
170
+ },
171
+ {
172
+ "name": "Icon with text",
173
+ "settings": {
174
+ "justify_content": "center",
175
+ "padding": 0
176
+ },
177
+ "blocks": [
178
+ {
179
+ "type": "group",
180
+ "settings": {
181
+ "direction": "column",
182
+ "justify_content": "center",
183
+ "width": 33,
184
+ "padding": 0
185
+ },
186
+ "blocks": [
187
+ {
188
+ "type": "icon",
189
+ "settings": {
190
+ "icon": "dairy_free"
191
+ }
192
+ },
193
+ {
194
+ "type": "heading",
195
+ "settings": {
196
+ "heading_size": "h3",
197
+ "alignment": "center"
198
+ }
199
+ }
200
+ ]
201
+ },
202
+ {
203
+ "type": "group",
204
+ "settings": {
205
+ "direction": "column",
206
+ "justify_content": "center",
207
+ "width": 33,
208
+ "padding": 0
209
+ },
210
+ "blocks": [
211
+ {
212
+ "type": "icon",
213
+ "settings": {
214
+ "icon": "carrot"
215
+ }
216
+ },
217
+ {
218
+ "type": "heading",
219
+ "settings": {
220
+ "heading_size": "h3",
221
+ "alignment": "center"
222
+ }
223
+ }
224
+ ]
225
+ },
226
+ {
227
+ "type": "group",
228
+ "settings": {
229
+ "direction": "column",
230
+ "justify_content": "center",
231
+ "width": 33,
232
+ "padding": 0
233
+ },
234
+ "blocks": [
235
+ {
236
+ "type": "icon",
237
+ "settings": {
238
+ "icon": "nut_free"
239
+ }
240
+ },
241
+ {
242
+ "type": "heading",
243
+ "settings": {
244
+ "heading_size": "h3",
245
+ "alignment": "center"
246
+ }
247
+ }
248
+ ]
249
+ }
250
+ ]
251
+ }
252
+ ]
253
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "my block",
3
+ "blocks": [{ "type": "@app" }, { "type": "@theme" }],
4
+ "class": "my-class",
5
+ "tag": "custom-element",
6
+ "settings": [
7
+ {
8
+ "type": "header",
9
+ "content": "header name",
10
+ "info": "header info"
11
+ },
12
+ {
13
+ "type": "number",
14
+ "id": "number",
15
+ "label": "my number"
16
+ }
17
+ ],
18
+ "presets": [
19
+ {
20
+ "name": "preset name",
21
+ "category": "The Category",
22
+ "settings": {
23
+ "number": 1
24
+ },
25
+ "blocks": [
26
+ {
27
+ "type": "thing",
28
+ "name": "The Thing",
29
+ "settings": {
30
+ "some-setting": "some-value"
31
+ },
32
+ "blocks": [
33
+ {
34
+ "type": "text",
35
+ "name": "Nested Text Block",
36
+ "settings": {}
37
+ }
38
+ ]
39
+ },
40
+ {
41
+ "type": "button",
42
+ "static": true,
43
+ "id": "static-block-id1"
44
+ }
45
+ ]
46
+ }
47
+ ]
48
+ }
@@ -0,0 +1,202 @@
1
+ {
2
+ "name": "Content Block",
3
+ "settings": [
4
+ {
5
+ "type": "select",
6
+ "id": "layout_style",
7
+ "label": "Layout style",
8
+ "options": [
9
+ {
10
+ "value": "standard",
11
+ "label": "Standard"
12
+ },
13
+ {
14
+ "value": "custom",
15
+ "label": "Custom"
16
+ }
17
+ ],
18
+ "default": "standard"
19
+ },
20
+ {
21
+ "type": "range",
22
+ "id": "width_percent",
23
+ "label": "Width",
24
+ "min": 25,
25
+ "max": 100,
26
+ "step": 5,
27
+ "unit": "%",
28
+ "default": 100,
29
+ "visible_if": "{{ block.settings.layout_style == 'custom' }}"
30
+ },
31
+ {
32
+ "type": "select",
33
+ "id": "border_style",
34
+ "label": "Border style",
35
+ "options": [
36
+ {
37
+ "value": "none",
38
+ "label": "None"
39
+ },
40
+ {
41
+ "value": "solid",
42
+ "label": "Solid"
43
+ },
44
+ {
45
+ "value": "dashed",
46
+ "label": "Dashed"
47
+ }
48
+ ],
49
+ "default": "none"
50
+ },
51
+ {
52
+ "type": "range",
53
+ "id": "border_width",
54
+ "label": "Border width",
55
+ "min": 1,
56
+ "max": 10,
57
+ "step": 1,
58
+ "unit": "px",
59
+ "default": 1,
60
+ "visible_if": "{{ block.settings.border_style != 'none' }}"
61
+ },
62
+ {
63
+ "type": "range",
64
+ "id": "border_opacity",
65
+ "label": "Border opacity",
66
+ "min": 0,
67
+ "max": 100,
68
+ "step": 5,
69
+ "unit": "%",
70
+ "default": 100,
71
+ "visible_if": "{{ block.settings.border_style != 'none' }}"
72
+ },
73
+ {
74
+ "type": "checkbox",
75
+ "id": "enable_background",
76
+ "label": "Enable background",
77
+ "default": false
78
+ },
79
+ {
80
+ "type": "select",
81
+ "id": "background_type",
82
+ "label": "Background type",
83
+ "options": [
84
+ {
85
+ "value": "color",
86
+ "label": "Color"
87
+ },
88
+ {
89
+ "value": "image",
90
+ "label": "Image"
91
+ },
92
+ {
93
+ "value": "video",
94
+ "label": "Video"
95
+ }
96
+ ],
97
+ "default": "color",
98
+ "visible_if": "{{ block.settings.enable_background }}"
99
+ },
100
+ {
101
+ "type": "image_picker",
102
+ "id": "background_image",
103
+ "label": "Background image",
104
+ "visible_if": "{{ block.settings.enable_background and block.settings.background_type == 'image' }}"
105
+ },
106
+ {
107
+ "type": "url",
108
+ "id": "video_url",
109
+ "label": "Video URL",
110
+ "visible_if": "{{ block.settings.enable_background and block.settings.background_type == 'video' }}"
111
+ },
112
+ {
113
+ "type": "checkbox",
114
+ "id": "video_loop",
115
+ "label": "Loop video",
116
+ "default": true,
117
+ "visible_if": "{{ block.settings.enable_background and block.settings.background_type == 'video' }}"
118
+ },
119
+ {
120
+ "type": "color_background",
121
+ "id": "bg_color",
122
+ "label": "Background Color",
123
+ "default": "#ffffff",
124
+ "visible_if": "{{ block.settings.enable_background and block.settings.background_type == 'color' }}"
125
+ },
126
+ {
127
+ "type": "color_scheme",
128
+ "id": "color_scheme",
129
+ "label": "Color scheme",
130
+ "visible_if": "{{ block.settings.enable_custom_colors }}"
131
+ },
132
+ {
133
+ "type": "color",
134
+ "id": "text_color",
135
+ "label": "Text Color",
136
+ "default": "#000000",
137
+ "visible_if": "{{ block.settings.enable_custom_colors }}"
138
+ },
139
+ {
140
+ "type": "font_picker",
141
+ "id": "heading_font",
142
+ "label": "Heading Font",
143
+ "default": "helvetica_n4",
144
+ "visible_if": "{{ block.settings.enable_custom_typography }}"
145
+ },
146
+ {
147
+ "type": "html",
148
+ "id": "custom_html",
149
+ "label": "Custom HTML",
150
+ "default": "<p>Add your HTML here</p>",
151
+ "visible_if": "{{ block.settings.enable_custom_code }}"
152
+ },
153
+ {
154
+ "type": "inline_richtext",
155
+ "id": "caption",
156
+ "label": "Caption",
157
+ "default": "Add your caption",
158
+ "visible_if": "{{ block.settings.show_caption }}"
159
+ },
160
+ {
161
+ "type": "link_list",
162
+ "id": "menu",
163
+ "label": "Menu",
164
+ "default": "main-menu",
165
+ "visible_if": "{{ block.settings.show_navigation }}"
166
+ },
167
+ {
168
+ "type": "liquid",
169
+ "id": "custom_liquid",
170
+ "label": "Custom Liquid",
171
+ "default": "{% if customer %}Hello {{ customer.name }}{% endif %}",
172
+ "visible_if": "{{ block.settings.enable_custom_code }}"
173
+ },
174
+ {
175
+ "type": "richtext",
176
+ "id": "content",
177
+ "label": "Content",
178
+ "default": "<p>Add your content here</p>",
179
+ "visible_if": "{{ block.settings.show_content }}"
180
+ },
181
+ {
182
+ "type": "text_alignment",
183
+ "id": "text_align",
184
+ "label": "Text alignment",
185
+ "default": "center",
186
+ "visible_if": "{{ block.settings.enable_custom_layout }}"
187
+ },
188
+ {
189
+ "type": "video_url",
190
+ "id": "video_url_with_hosts",
191
+ "label": "Video URL",
192
+ "accept": ["youtube", "vimeo"],
193
+ "visible_if": "{{ block.settings.enable_background and block.settings.background_type == 'video' }}"
194
+ },
195
+ {
196
+ "type": "video",
197
+ "id": "video_file",
198
+ "label": "Video file",
199
+ "visible_if": "{{ block.settings.enable_background and block.settings.background_type == 'video' }}"
200
+ }
201
+ ]
202
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "my block",
3
+ "blocks": [{ "type": "@app" }, { "type": "@theme" }],
4
+ "class": "my-class",
5
+ "tag": "custom-element",
6
+ "settings": [
7
+ {
8
+ "type": "header",
9
+ "content": "header name",
10
+ "info": "header info"
11
+ },
12
+ {
13
+ "type": "number",
14
+ "id": "number",
15
+ "label": "my number"
16
+ }
17
+ ],
18
+ "presets": [
19
+ {
20
+ "name": "preset name",
21
+ "settings": {
22
+ "number": 1
23
+ },
24
+ "blocks": {
25
+ "some-block-id": {
26
+ "type": "button"
27
+ },
28
+ "some-other-block-id": {
29
+ "type": "image",
30
+ "name": "Image Block",
31
+ "static": true,
32
+ "settings": {
33
+ "some-setting": "some-value"
34
+ },
35
+ "blocks": {
36
+ "nested-block-id": {
37
+ "type": "text",
38
+ "name": "Nested Text Block"
39
+ }
40
+ },
41
+ "block_order": ["nested-block-id"]
42
+ }
43
+ },
44
+ "block_order": [
45
+ "some-block-id",
46
+ "some-other-block-id"
47
+ ]
48
+ }
49
+ ]
50
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "Example Section",
3
+ "settings": [
4
+ {
5
+ "type": "checkbox",
6
+ "id": "checkbox",
7
+ "label": "Checkbox",
8
+ "default": "not-a-boolean"
9
+ },
10
+ {
11
+ "type": "number",
12
+ "id": "number",
13
+ "label": "Number",
14
+ "default": "not-a-number"
15
+ },
16
+ {
17
+ "type": "text",
18
+ "id": "text",
19
+ "label": "Text",
20
+ "default": 10
21
+ },
22
+ {
23
+ "type": "radio",
24
+ "id": "radio",
25
+ "label": "Radio"
26
+ },
27
+ {
28
+ "type": "video_url",
29
+ "id": "video_url",
30
+ "label": "Video URL",
31
+ "accept": ["not-youtube", "not-vimeo"]
32
+ }
33
+ ]
34
+ }