@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.
- package/.claude/settings.json +11 -0
- package/.github/workflows/verify.yml +64 -0
- package/.gitmodules +3 -0
- package/.prettierignore +25 -0
- package/.prettierrc.cjs +9 -0
- package/.zed/settings.json +21 -0
- package/AGENTS.md +232 -0
- package/LICENSE +21 -0
- package/README.md +266 -0
- package/biome.json +58 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +350 -0
- package/dist/schema.d.mts +265 -0
- package/dist/schema.mjs +21 -0
- package/docs/TESTING.md +293 -0
- package/docs/assets-plan.md +197 -0
- package/docs/build-spec.md +466 -0
- package/docs/library-conversion-plan.md +419 -0
- package/example/.gitattributes +7 -0
- package/example/.shopifyignore +28 -0
- package/example/.theme-check.yml +7 -0
- package/example/blocks/_built--sections--hero--blocks--feature.liquid +52 -0
- package/example/config/settings_schema.json +10 -0
- package/example/layout/theme.liquid +25 -0
- package/example/locales/en.default.json +1 -0
- package/example/package-lock.json +51 -0
- package/example/package.json +20 -0
- package/example/sections/built--sections--hero.liquid +83 -0
- package/example/snippets/built--components--button.liquid +38 -0
- package/example/snippets/built--components--card.liquid +33 -0
- package/example/src/components/button/button.css +13 -0
- package/example/src/components/card/card.css +16 -0
- package/example/src/components/card/card.liquid +9 -0
- package/example/src/sections/hero/blocks/feature/feature.css +11 -0
- package/example/src/sections/hero/blocks/feature/feature.liquid +9 -0
- package/example/src/sections/hero/blocks/feature/feature.schema.ts +14 -0
- package/example/src/sections/hero/hero.css +15 -0
- package/example/src/sections/hero/hero.liquid +16 -0
- package/example/src/sections/hero/hero.schema.ts +26 -0
- package/example/src/sections/hero/hero.test.ts +43 -0
- package/example/src/utilities/labels.ts +5 -0
- package/example/templates/index.liquid +1 -0
- package/example/tsconfig.json +10 -0
- package/example/vitest.config.ts +6 -0
- package/lib/build/build.test.ts +475 -0
- package/lib/build/build.ts +314 -0
- package/lib/build/command.ts +27 -0
- package/lib/build/index.ts +1 -0
- package/lib/cli.ts +17 -0
- package/lib/dev/command.ts +25 -0
- package/lib/dev/index.ts +1 -0
- package/lib/dev/watch.ts +52 -0
- package/lib/resolver.test.ts +275 -0
- package/lib/resolver.ts +156 -0
- package/lib/schema.ts +37 -0
- package/package.json +59 -0
- package/scripts/codegen-schema.ts +66 -0
- package/src/components/button/button.css +13 -0
- package/src/components/button/button.liquid +5 -0
- package/src/components/button/button.ts +5 -0
- package/src/tsconfig.json +10 -0
- package/tests/example.test.ts +101 -0
- package/tsconfig.json +20 -0
- package/tsdown.config.ts +14 -0
- package/vendor/theme-liquid-docs/.gitattributes +10 -0
- package/vendor/theme-liquid-docs/.github/CODEOWNERS +1 -0
- package/vendor/theme-liquid-docs/.github/CODE_OF_CONDUCT.md +73 -0
- package/vendor/theme-liquid-docs/.github/ISSUE_TEMPLATE/bug_report.md +17 -0
- package/vendor/theme-liquid-docs/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
- package/vendor/theme-liquid-docs/.github/dependabot.yaml +6 -0
- package/vendor/theme-liquid-docs/.github/workflows/ci.yml +33 -0
- package/vendor/theme-liquid-docs/.github/workflows/cla.yml +27 -0
- package/vendor/theme-liquid-docs/.github/workflows/shopify-dev-preview-automation.yml +86 -0
- package/vendor/theme-liquid-docs/.github/workflows/update-latest.yml +56 -0
- package/vendor/theme-liquid-docs/.prettierrc.json +16 -0
- package/vendor/theme-liquid-docs/.vscode/settings.json +28 -0
- package/vendor/theme-liquid-docs/LICENSE.md +7 -0
- package/vendor/theme-liquid-docs/README.md +48 -0
- package/vendor/theme-liquid-docs/ai/claude/CLAUDE.md +1485 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/assets.mdc +15 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/blocks.mdc +339 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/examples/block-example-group.mdc +103 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/examples/block-example-text.mdc +59 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/examples/section-example.mdc +61 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/examples/snippet-example.mdc +72 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/liquid.mdc +837 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/locales.mdc +100 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/localization.mdc +67 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/mcp.mdc +2 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/schemas.mdc +184 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/sections.mdc +84 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/settings-schema.mdc +51 -0
- package/vendor/theme-liquid-docs/ai/cursor/rules/snippets.mdc +119 -0
- package/vendor/theme-liquid-docs/ai/github/copilot-instructions.md +1485 -0
- package/vendor/theme-liquid-docs/ai/liquid.mdc +638 -0
- package/vendor/theme-liquid-docs/data/filters.json +6148 -0
- package/vendor/theme-liquid-docs/data/latest.json +2 -0
- package/vendor/theme-liquid-docs/data/objects.json +20594 -0
- package/vendor/theme-liquid-docs/data/shopify_system_translations.json +2586 -0
- package/vendor/theme-liquid-docs/data/tags.json +1276 -0
- package/vendor/theme-liquid-docs/package.json +20 -0
- package/vendor/theme-liquid-docs/schemas/manifest_schema.json +31 -0
- package/vendor/theme-liquid-docs/schemas/manifest_theme.json +19 -0
- package/vendor/theme-liquid-docs/schemas/manifest_theme_app_extension.json +10 -0
- package/vendor/theme-liquid-docs/schemas/theme/app_block_entry.json +13 -0
- package/vendor/theme-liquid-docs/schemas/theme/default_setting_values.json +24 -0
- package/vendor/theme-liquid-docs/schemas/theme/local_block_entry.json +25 -0
- package/vendor/theme-liquid-docs/schemas/theme/preset.json +72 -0
- package/vendor/theme-liquid-docs/schemas/theme/preset_blocks.json +91 -0
- package/vendor/theme-liquid-docs/schemas/theme/section.json +208 -0
- package/vendor/theme-liquid-docs/schemas/theme/setting.json +1413 -0
- package/vendor/theme-liquid-docs/schemas/theme/settings.json +10 -0
- package/vendor/theme-liquid-docs/schemas/theme/targetted_block_entry.json +15 -0
- package/vendor/theme-liquid-docs/schemas/theme/theme_block.json +91 -0
- package/vendor/theme-liquid-docs/schemas/theme/theme_block_entry.json +14 -0
- package/vendor/theme-liquid-docs/schemas/theme/theme_settings.json +83 -0
- package/vendor/theme-liquid-docs/schemas/theme/translations.json +63 -0
- package/vendor/theme-liquid-docs/schemas/update/update_extension_schema_v1.json +186 -0
- package/vendor/theme-liquid-docs/tests/fixtures/section-nested-blocks.json +18 -0
- package/vendor/theme-liquid-docs/tests/fixtures/section-schema-1.json +90 -0
- package/vendor/theme-liquid-docs/tests/fixtures/section-schema-2.json +201 -0
- package/vendor/theme-liquid-docs/tests/fixtures/section-schema-3.json +29 -0
- package/vendor/theme-liquid-docs/tests/fixtures/section-schema-4.json +315 -0
- package/vendor/theme-liquid-docs/tests/fixtures/section-schema-5.json +114 -0
- package/vendor/theme-liquid-docs/tests/fixtures/section-schema-6.json +63 -0
- package/vendor/theme-liquid-docs/tests/fixtures/section-schema-conditional-settings.json +145 -0
- package/vendor/theme-liquid-docs/tests/fixtures/section-schema-preset-blocks-as-hash.json +60 -0
- package/vendor/theme-liquid-docs/tests/fixtures/section-schema-static-block-preset.json +76 -0
- package/vendor/theme-liquid-docs/tests/fixtures/section-settings.json +34 -0
- package/vendor/theme-liquid-docs/tests/fixtures/theme-block-1.json +234 -0
- package/vendor/theme-liquid-docs/tests/fixtures/theme-block-2.json +253 -0
- package/vendor/theme-liquid-docs/tests/fixtures/theme-block-basics.json +48 -0
- package/vendor/theme-liquid-docs/tests/fixtures/theme-block-conditional-settings.json +202 -0
- package/vendor/theme-liquid-docs/tests/fixtures/theme-block-presets-as-hash.json +50 -0
- package/vendor/theme-liquid-docs/tests/fixtures/theme-block-settings.json +34 -0
- package/vendor/theme-liquid-docs/tests/fixtures/theme-settings-all-settings.json +313 -0
- package/vendor/theme-liquid-docs/tests/fixtures/theme-settings-dawn.json +1469 -0
- package/vendor/theme-liquid-docs/tests/fixtures/theme-settings-metadata.json +10 -0
- package/vendor/theme-liquid-docs/tests/fixtures/translations-1.json +14 -0
- package/vendor/theme-liquid-docs/tests/section.spec.ts +367 -0
- package/vendor/theme-liquid-docs/tests/test-constants.ts +58 -0
- package/vendor/theme-liquid-docs/tests/test-helpers.ts +104 -0
- package/vendor/theme-liquid-docs/tests/theme-settings/color_palette.spec.ts +184 -0
- package/vendor/theme-liquid-docs/tests/theme-settings/color_scheme_group.spec.ts +143 -0
- package/vendor/theme-liquid-docs/tests/theme-settings/general.spec.ts +192 -0
- package/vendor/theme-liquid-docs/tests/theme-settings/metaobject.spec.ts +94 -0
- package/vendor/theme-liquid-docs/tests/theme-settings/resource_list.spec.ts +58 -0
- package/vendor/theme-liquid-docs/tests/theme-settings/theme-metadata.spec.ts +59 -0
- package/vendor/theme-liquid-docs/tests/theme_block.spec.ts +266 -0
- package/vendor/theme-liquid-docs/tests/translations_schema.spec.ts +31 -0
- package/vendor/theme-liquid-docs/yarn.lock +543 -0
- package/vitest.config.ts +7 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Locales coding standards and best practices guide
|
|
3
|
+
globs: locales/*.json
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Translation development standards
|
|
7
|
+
|
|
8
|
+
Auto-attached when working in `locales/` directory.
|
|
9
|
+
|
|
10
|
+
### File structure
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
locales/
|
|
14
|
+
├── en.default.json # English (required)
|
|
15
|
+
├── en.default.schema.json # English (required)
|
|
16
|
+
├── es.json # Spanish
|
|
17
|
+
├── est.schema.json # Spanish
|
|
18
|
+
├── fr.json # French
|
|
19
|
+
├── frt.schema.json # French
|
|
20
|
+
└── pt-BR.json # Portuguese
|
|
21
|
+
└── pt-BR..schema.json # Portuguese
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
#### Locale files
|
|
25
|
+
|
|
26
|
+
Locale files are JSON files containing translations for all the text strings used throughout a Shopify theme and its editor. They let merchants easily update and localize repeated words and phrases, making it possible to translate store content and settings into multiple languages for international customers. These files provide a centralized way to manage and edit translations.
|
|
27
|
+
|
|
28
|
+
**Example:**
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"general": {
|
|
32
|
+
"cart": "Cart",
|
|
33
|
+
"checkout": "Checkout"
|
|
34
|
+
},
|
|
35
|
+
"products": {
|
|
36
|
+
"add_to_cart": "Add to Cart"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### Schema locale files
|
|
42
|
+
|
|
43
|
+
Schema locale files, saved with a .schema.json extension, store translation strings specifically for theme editor setting schemas. They follow a structured organization—category, group, and description—to give context to each translation, enabling accurate localization of editor content. Schema locale files must use the IETF language tag format in their naming, such as en-GB.schema.json for British English or fr-CA.schema.json for Canadian French.
|
|
44
|
+
|
|
45
|
+
**Example:**
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"products": {
|
|
49
|
+
"card": {
|
|
50
|
+
"description": "Product card layout"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Key organization
|
|
57
|
+
|
|
58
|
+
**Hierarchical structure:**
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"general": {
|
|
62
|
+
"meta": {
|
|
63
|
+
"title": "{{ shop_name }}",
|
|
64
|
+
"description": "{{ shop_description }}"
|
|
65
|
+
},
|
|
66
|
+
"accessibility": {
|
|
67
|
+
"skip_to_content": "Skip to content",
|
|
68
|
+
"close": "Close"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"products": {
|
|
72
|
+
"add_to_cart": "Add to cart",
|
|
73
|
+
"quick_view": "Quick view",
|
|
74
|
+
"price": {
|
|
75
|
+
"regular": "Regular price",
|
|
76
|
+
"sale": "Sale price",
|
|
77
|
+
"unit": "Unit price"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
**Usage**
|
|
83
|
+
```liquid
|
|
84
|
+
{{ 'general.meta.title' | t: shop_name: shop.name }}
|
|
85
|
+
{{ 'general.meta.description' | t: shop_description: shop.description }}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Translation guidelines
|
|
89
|
+
|
|
90
|
+
**Key naming:**
|
|
91
|
+
- Use descriptive, hierarchical keys
|
|
92
|
+
- Maximum 3 levels deep
|
|
93
|
+
- Use snake_case for key names
|
|
94
|
+
- Group related translations
|
|
95
|
+
|
|
96
|
+
**Content rules:**
|
|
97
|
+
- Keep text concise for UI elements
|
|
98
|
+
- Use variables for dynamic content
|
|
99
|
+
- Consider character limits
|
|
100
|
+
- Maintain consistent terminology
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Shopify Liquid localization and translation guidelines
|
|
3
|
+
globs: *.liquid
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Localization Standards
|
|
7
|
+
|
|
8
|
+
### Translation requirements
|
|
9
|
+
|
|
10
|
+
- **Every user-facing text** must use translation filters.
|
|
11
|
+
- **Update `locales/en.default.json`** with all new keys.
|
|
12
|
+
- **Use descriptive, hierarchical keys** for organization.
|
|
13
|
+
- **Only add English text**; translators handle other languages.
|
|
14
|
+
|
|
15
|
+
### Translation filter usage
|
|
16
|
+
|
|
17
|
+
**Use `{{ 'key' | t }}` for all text:**
|
|
18
|
+
|
|
19
|
+
```liquid
|
|
20
|
+
<!-- Good -->
|
|
21
|
+
<h2>{{ 'sections.featured_collection.title' | t }}</h2>
|
|
22
|
+
<p>{{ 'sections.featured_collection.description' | t }}</p>
|
|
23
|
+
<button>{{ 'products.add_to_cart' | t }}</button>
|
|
24
|
+
|
|
25
|
+
<!-- Bad -->
|
|
26
|
+
<h2>Featured Collection</h2>
|
|
27
|
+
<p>Check out our best products</p>
|
|
28
|
+
<button>Add to cart</button>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Translation with variables
|
|
32
|
+
|
|
33
|
+
**Use variables for interpolation:**
|
|
34
|
+
|
|
35
|
+
```liquid
|
|
36
|
+
<!-- Liquid template -->
|
|
37
|
+
<p>{{ 'products.price_range' | t: min: product.price_min | money, max: product.price_max | money }}</p>
|
|
38
|
+
<p>{{ 'general.pagination.page' | t: page: paginate.current_page, pages: paginate.pages }}</p>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Corresponding keys in locale files:**
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"products": {
|
|
46
|
+
"price_range": "From {{ min }} to {{ max }}"
|
|
47
|
+
},
|
|
48
|
+
"general": {
|
|
49
|
+
"pagination": {
|
|
50
|
+
"page": "Page {{ page }} of {{ pages }}"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Best practices
|
|
57
|
+
|
|
58
|
+
**Content guidelines:**
|
|
59
|
+
- Write clear, concise text.
|
|
60
|
+
- **Use sentence case** for all user-facing text, including titles, headings, and button labels (capitalize only the first word and proper nouns; e.g., `Featured collection` → `Featured collection`, not `Featured Collection`).
|
|
61
|
+
- Be consistent with terminology.
|
|
62
|
+
- Consider character limits for UI elements.
|
|
63
|
+
|
|
64
|
+
**Variable usage:**
|
|
65
|
+
- Use interpolation rather than appending strings together.
|
|
66
|
+
- Prioritize clarity over brevity for variable naming.
|
|
67
|
+
- Escape variables unless they output HTML: `{{ variable | escape }}`.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: JSON schemas to write config files, translations, and the {% schema %} tag in blocks and sections.
|
|
3
|
+
globs: blocks/*.liquid, sections/*.liquid, config/settings_schema.json, locales/*.json
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# JSON schemas for Liquid themes
|
|
8
|
+
|
|
9
|
+
## The `{% schema %}` tag on blocks and sections
|
|
10
|
+
|
|
11
|
+
**Key principles: follow the "Good practices" and "Validate the `{% schema %}` content" using JSON schemas**
|
|
12
|
+
|
|
13
|
+
### Good practices
|
|
14
|
+
|
|
15
|
+
When defining the `{% schema %}` tag on sections and blocks, follow these guidelines to use the values:
|
|
16
|
+
|
|
17
|
+
**Single property settings**: For settings that correspond to a single CSS property, use CSS variables:
|
|
18
|
+
```liquid
|
|
19
|
+
<div class="collection" style="--gap: {{ block.settings.gap }}px">
|
|
20
|
+
Example
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
{% stylesheet %}
|
|
24
|
+
.collection {
|
|
25
|
+
gap: var(--gap);
|
|
26
|
+
}
|
|
27
|
+
{% endstylesheet %}
|
|
28
|
+
|
|
29
|
+
{% schema %}
|
|
30
|
+
{
|
|
31
|
+
"settings": [{
|
|
32
|
+
"type": "range",
|
|
33
|
+
"label": "gap",
|
|
34
|
+
"id": "gap",
|
|
35
|
+
"min": 0,
|
|
36
|
+
"max": 100,
|
|
37
|
+
"unit": "px",
|
|
38
|
+
"default": 0,
|
|
39
|
+
}]
|
|
40
|
+
}
|
|
41
|
+
{% endschema %}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Multiple property settings**: For settings that control multiple CSS properties, use CSS classes:
|
|
45
|
+
```liquid
|
|
46
|
+
<div class="collection {{ block.settings.layout }}">
|
|
47
|
+
Example
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
{% stylesheet %}
|
|
51
|
+
.collection--full-width {
|
|
52
|
+
/* multiple styles */
|
|
53
|
+
}
|
|
54
|
+
.collection--narrow {
|
|
55
|
+
/* multiple styles */
|
|
56
|
+
}
|
|
57
|
+
{% endstylesheet %}
|
|
58
|
+
|
|
59
|
+
{% schema %}
|
|
60
|
+
{
|
|
61
|
+
"settings": [{
|
|
62
|
+
"type": "select",
|
|
63
|
+
"id": "layout",
|
|
64
|
+
"label": "layout",
|
|
65
|
+
"values": [
|
|
66
|
+
{ "value": "collection--full-width", "label": "t:options.full" },
|
|
67
|
+
{ "value": "collection--narrow", "label": "t:options.narrow" }
|
|
68
|
+
]
|
|
69
|
+
}]
|
|
70
|
+
}
|
|
71
|
+
{% endschema %}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
#### Mobile layouts
|
|
75
|
+
|
|
76
|
+
If you need to create a mobile layout and you want the merchant to be able to select one or two columns, use a select input:
|
|
77
|
+
|
|
78
|
+
```liquid
|
|
79
|
+
{% schema %}
|
|
80
|
+
{
|
|
81
|
+
"type": "select",
|
|
82
|
+
"id": "columns_mobile",
|
|
83
|
+
"label": "Columns on mobile",
|
|
84
|
+
"options": [
|
|
85
|
+
{ "value": 1, "label": "1" },
|
|
86
|
+
{ "value": "2", "label": "2" }
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
{% endschema %}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Validate the `{% schema %}` content
|
|
93
|
+
|
|
94
|
+
Use this mafinest to validate schemas to validate
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
{
|
|
98
|
+
"$schema": "manifest_schema.json",
|
|
99
|
+
"$comment": "Declares all the JSON schemas you need to validate themes",
|
|
100
|
+
"schemas": [
|
|
101
|
+
{ "fileMatch": ["locales/*.json"], "uri": "schemas/translations.json" },
|
|
102
|
+
{ "fileMatch": ["blocks/*.liquid"], "uri": "schemas/theme_block.json" },
|
|
103
|
+
{ "fileMatch": ["config/settings_schema.json"], "uri": "schemas/theme_settings.json" },
|
|
104
|
+
{ "fileMatch": ["sections/*.liquid"], "uri": "schemas/section.json" },
|
|
105
|
+
{ "uri": "schemas/settings.json" },
|
|
106
|
+
{ "uri": "schemas/setting.json" },
|
|
107
|
+
{ "uri": "schemas/default_setting_values.json" },
|
|
108
|
+
{ "uri": "schemas/app_block_entry.json" },
|
|
109
|
+
{ "uri": "schemas/theme_block_entry.json" },
|
|
110
|
+
{ "uri": "schemas/targetted_block_entry.json" },
|
|
111
|
+
{ "uri": "schemas/preset_blocks.json" },
|
|
112
|
+
{ "uri": "schemas/preset.json" },
|
|
113
|
+
{ "uri": "schemas/local_block_entry.json" }
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
**schemas/app_block_entry.json**
|
|
120
|
+
```
|
|
121
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","$comment":"An @app block entry","type":"object","additionalProperties":false,"properties":{"type":{"const":"@app","description":"The \"@app\" type is used to denote that this container accepts app blocks. App blocks enable app developers to create blocks for merchants to add app content to their theme without having to directly edit theme code.","markdownDescription":"The `@app` type is used to denote that this container accepts app blocks. [App blocks](https://shopify.dev/docs/themes/architecture/sections/app-blocks) enable app developers to create blocks for merchants to add app content to their theme without having to directly edit theme code.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/blocks/app-blocks#supporting-app-blocks)"}}}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**schemas/default_setting_values.json**
|
|
125
|
+
```
|
|
126
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","description":"A list of default values for any settings that you might want to populate. Each entry should include the setting name and the value.","additionalProperties":{"anyOf":[{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"array","items":{"type":"string"}}]}}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**schemas/local_block_entry.json**
|
|
130
|
+
```
|
|
131
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","$comment":"For block definitions that are local to the file.","type":"object","required":["type","name"],"additionalProperties":false,"properties":{"type":{"type":"string","description":"The block type. This is a free-form string that you can use as an identifier.","markdownDescription":"The block type. This is a free-form string that you can use as an identifier.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#blocks)"},"name":{"type":"string","description":"The block name, which will show as the block title in the theme editor."},"limit":{"type":"integer","description":"The number of blocks of this type that can be used."},"settings":{"$ref":"./settings.json"}}}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**schemas/preset_blocks.json**
|
|
135
|
+
```
|
|
136
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","title":"Shopify Liquid Preset Blocks Schema","definitions":{"blocksArray":{"type":"array","description":"A list of child blocks that you might want to include.","markdownDescription":"A list of child blocks that you might want to include.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#presets)","items":{"type":"object","allOf":[{"$ref":"#/definitions/commonBlockAttributes"}],"properties":{"static":true,"type":true,"name":true,"settings":true,"blocks":{"$ref":"#/definitions/blocksArray"},"id":{"type":"string","description":"A unique identifier for the block."}},"additionalProperties":false,"if":{"properties":{"static":{"const":true}},"required":["static"]},"then":{"required":["id"]}}},"blocksHash":{"type":"object","description":"A list of child blocks that you might want to include.","markdownDescription":"A list of child blocks that you might want to include.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#presets)","additionalProperties":{"allOf":[{"$ref":"#/definitions/commonBlockAttributes"}],"properties":{"static":true,"type":true,"name":true,"settings":true,"blocks":{"$ref":"#/definitions/blocksHash"},"block_order":{"type":"array","description":"The order of the blocks in the section."}},"additionalProperties":false}},"commonBlockAttributes":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The block type."},"name":{"type":"string","description":"The block name."},"settings":{"$ref":"./default_setting_values.json"},"static":{"type":"boolean","description":"If the block is rendered statically or not."}}}}}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**schemas/preset.json**
|
|
140
|
+
```
|
|
141
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","title":"Shopify Liquid Section or Block Preset Schema","oneOf":[{"$ref":"#/definitions/presetWithBlocksArray"},{"$ref":"#/definitions/presetWithBlocksHash"}],"definitions":{"presetBase":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"The preset name, which will show in the 'Add section' or 'Add block' picker of the theme editor.","markdownDescription":"The preset name, which will show in the 'Add section' or 'Add block' picker of the theme editor.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#presets)"},"category":{"type":"string","description":"The category of the preset, which will show in the 'Add section' or 'Add block' picker of the theme editor.","markdownDescription":"The category of the preset, which will show in the 'Add section' or 'Add block' picker of the theme editor.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#presets)"},"settings":{"$ref":"./default_setting_values.json"}}},"presetWithBlocksArray":{"type":"object","allOf":[{"$ref":"#/definitions/presetBase"}],"properties":{"name":true,"category":true,"settings":true,"blocks":{"$ref":"./preset_blocks.json#/definitions/blocksArray"}},"additionalProperties":false},"presetWithBlocksHash":{"type":"object","allOf":[{"$ref":"#/definitions/presetBase"}],"required":["blocks"],"properties":{"name":true,"settings":true,"blocks":{"$ref":"./preset_blocks.json#/definitions/blocksHash"},"block_order":{"type":"array","description":"The order of blocks in the preset.","markdownDescription":"The order of blocks in the preset."},"additionalProperties":false}}}}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**schemas/section.json**
|
|
145
|
+
```
|
|
146
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","title":"Shopify Liquid Theme Section Schema","type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name attribute determines the section title that is shown in the theme editor.","markdownDescription":"The `name` attribute determines the section title that is shown in the theme editor.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#name)"},"tag":{"type":"string","description":"The HTML element that is used to wrap the section.","markdownDescription":"The HTML element that is used to wrap the section.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#tag)","enum":["article","aside","div","footer","header","section"]},"class":{"type":"string","description":"Additional CSS class for the section.","markdownDescription":"Additional CSS class for the section.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#class)"},"limit":{"type":"integer","description":"The number of times a section can be added to a template or section group.","markdownDescription":"The number of times a section can be added to a template or section group.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#limit)","minimum":1,"maximum":2},"settings":{"$ref":"./settings.json"},"max_blocks":{"type":"integer","description":"There's a limit of 50 blocks per section. You can specify a lower limit with the max_blocks attribute","markdownDescription":"There's a limit of 50 blocks per section. You can specify a lower limit with the `max_blocks` attribute.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#max_blocks)","minimum":1,"maximum":50},"blocks":{"type":"array","description":"Blocks are reusable modules of content that can be added, removed, and reordered within a section.","markdownDescription":"Blocks are reusable modules of content that can be added, removed, and reordered within a section.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#blocks)","properties":{"type":{"description":"The block type. Can be one of the following values: @theme, @app, or a custom block type.","markdownDescription":"The block type. Can be one of the following values: @theme, @app, or a custom block type.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#blocks)"}},"items":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of block that can be added to this block.","markdownDescription":"The type of block that can be added to this block.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/blocks/theme-blocks/schema#blocks)"}},"$comment":"The allOf rule here exists because that's how we do discriminated unions in JSON schemas. If a rule matches, that rule will be used to document the type property. Otherwise we fallback to the docs above.","allOf":[{"if":{"required":["type"],"properties":{"type":{"const":"@theme"}}},"then":{"$ref":"./theme_block_entry.json"}},{"if":{"required":["type"],"properties":{"type":{"const":"@app"}}},"then":{"$ref":"./app_block_entry.json"}},{"if":{"required":["type"],"properties":{"type":{"type":"string","not":{"enum":["@app","@theme"]}}}},"then":{"oneOf":[{"$ref":"./targetted_block_entry.json"},{"$ref":"./local_block_entry.json"}]}}]}},"presets":{"type":"array","description":"Presets are default configurations of sections that enable users to easily add a section to a JSON template through the theme editor.","markdownDescription":"Presets are default configurations of sections that enable users to easily add a section to a [JSON template](https://shopify.dev/docs/themes/architecture/templates/json-templates) through the theme editor.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#presets)","items":{"$ref":"./preset.json"}},"default":{"type":"object","description":"Default configuration for statically rendered sections.","markdownDescription":"Default configuration for statically rendered sections.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#default)","properties":{"settings":{"$ref":"./default_setting_values.json"},"blocks":{"type":"array","description":"Default blocks configurations to ship with this default.","markdownDescription":"Default blocks configurations to ship with this default.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#default)","items":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The block type."},"settings":{"$ref":"./default_setting_values.json"}}}}}},"locales":{"type":"object","description":"Sections can provide their own set of translated strings through the locales object. This is separate from the locales directory of the theme, which makes it a useful feature for sections that are meant to be installed on multiple themes or shops.","markdownDescription":"Sections can provide their own set of translated strings through the `locales` object. This is separate from the `locales` directory of the theme, which makes it a useful feature for sections that are meant to be installed on multiple themes or shops.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#locales)","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}},"enabled_on":{"description":"Restrict the section to certain template page types and section group types.","markdownDescription":"Restrict the section to certain template page types and section group types.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#enabled_on)","$ref":"#/definitions/sectionToggle"},"disabled_on":{"description":"Prevent the section from being used on certain template page types and section group types.","markdownDescription":"Prevent the section from being used on certain template page types and section group types.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#disabled_on)","$ref":"#/definitions/sectionToggle"}},"definitions":{"sectionToggle":{"type":"object","description":"Restrict the section to certain template page types and section group types.","additionalProperties":false,"properties":{"templates":{"type":"array","items":{"type":"string","enum":["*","404","article","blog","captcha","cart","collection","customers/account","customers/activate_account","customers/addresses","customers/login","customers/order","customers/register","customers/reset_password","gift_card","index","list-collections","metaobject","page","password","policy","product","search"]},"uniqueItems":true},"groups":{"type":"array","items":{"type":"string"},"uniqueItems":true}}}}}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**schemas/setting.json**
|
|
150
|
+
```
|
|
151
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"type":{"description":"The type of the input or sidebar setting. This value determines the type of field that gets rendered into the editor.","markdownDescription":"The type of the input or sidebar setting. This value determines the type of field that gets rendered into the editor.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings)","enum":["article","blog","checkbox","collection","collection_list","color","color_background","color_scheme","color_scheme_group","font_picker","header","html","image_picker","inline_richtext","link_list","liquid","metaobject","metaobject_list","number","page","paragraph","product","product_list","radio","range","richtext","select","text","text_alignment","textarea","url","video","video_url"]}},"$comment":"We're doing the weird allOf here so that we have better error messages when type is invalid. We're also doing the allOf so that we can use additionalProperties properly.","allOf":[{"if":{"required":["type"],"properties":{"type":{"const":"header"}}},"then":{"$ref":"#/definitions/header"}},{"if":{"required":["type"],"properties":{"type":{"const":"paragraph"}}},"then":{"$ref":"#/definitions/paragraph"}},{"if":{"required":["type"],"properties":{"type":{"const":"article"}}},"then":{"$ref":"#/definitions/article"}},{"if":{"required":["type"],"properties":{"type":{"const":"blog"}}},"then":{"$ref":"#/definitions/blog"}},{"if":{"required":["type"],"properties":{"type":{"const":"checkbox"}}},"then":{"$ref":"#/definitions/checkbox"}},{"if":{"required":["type"],"properties":{"type":{"const":"collection"}}},"then":{"$ref":"#/definitions/collection"}},{"if":{"required":["type"],"properties":{"type":{"const":"collection_list"}}},"then":{"$ref":"#/definitions/collection_list"}},{"if":{"required":["type"],"properties":{"type":{"const":"color"}}},"then":{"$ref":"#/definitions/color"}},{"if":{"required":["type"],"properties":{"type":{"const":"color_background"}}},"then":{"$ref":"#/definitions/color_background"}},{"if":{"required":["type"],"properties":{"type":{"const":"color_scheme"}}},"then":{"$ref":"#/definitions/color_scheme"}},{"if":{"required":["type"],"properties":{"type":{"const":"color_scheme_group"}}},"then":{"$ref":"#/definitions/color_scheme_group"}},{"if":{"required":["type"],"properties":{"type":{"const":"font_picker"}}},"then":{"$ref":"#/definitions/font_picker"}},{"if":{"required":["type"],"properties":{"type":{"const":"html"}}},"then":{"$ref":"#/definitions/html"}},{"if":{"required":["type"],"properties":{"type":{"const":"image_picker"}}},"then":{"$ref":"#/definitions/image_picker"}},{"if":{"required":["type"],"properties":{"type":{"const":"inline_richtext"}}},"then":{"$ref":"#/definitions/inline_richtext"}},{"if":{"required":["type"],"properties":{"type":{"const":"link_list"}}},"then":{"$ref":"#/definitions/link_list"}},{"if":{"required":["type"],"properties":{"type":{"const":"liquid"}}},"then":{"$ref":"#/definitions/liquid"}},{"if":{"required":["type"],"properties":{"type":{"const":"metaobject"}}},"then":{"$ref":"#/definitions/metaobject"}},{"if":{"required":["type"],"properties":{"type":{"const":"metaobject_list"}}},"then":{"$ref":"#/definitions/metaobject_list"}},{"if":{"required":["type"],"properties":{"type":{"const":"number"}}},"then":{"$ref":"#/definitions/number"}},{"if":{"required":["type"],"properties":{"type":{"const":"page"}}},"then":{"$ref":"#/definitions/page"}},{"if":{"required":["type"],"properties":{"type":{"const":"product"}}},"then":{"$ref":"#/definitions/product"}},{"if":{"required":["type"],"properties":{"type":{"const":"product_list"}}},"then":{"$ref":"#/definitions/product_list"}},{"if":{"required":["type"],"properties":{"type":{"const":"radio"}}},"then":{"$ref":"#/definitions/radio"}},{"if":{"required":["type"],"properties":{"type":{"const":"range"}}},"then":{"$ref":"#/definitions/range"}},{"if":{"required":["type"],"properties":{"type":{"const":"richtext"}}},"then":{"$ref":"#/definitions/richtext"}},{"if":{"required":["type"],"properties":{"type":{"const":"select"}}},"then":{"$ref":"#/definitions/select"}},{"if":{"required":["type"],"properties":{"type":{"const":"text"}}},"then":{"$ref":"#/definitions/text"}},{"if":{"required":["type"],"properties":{"type":{"const":"text_alignment"}}},"then":{"$ref":"#/definitions/text_alignment"}},{"if":{"required":["type"],"properties":{"type":{"const":"textarea"}}},"then":{"$ref":"#/definitions/textarea"}},{"if":{"required":["type"],"properties":{"type":{"const":"url"}}},"then":{"$ref":"#/definitions/url"}},{"if":{"required":["type"],"properties":{"type":{"const":"video"}}},"then":{"$ref":"#/definitions/video"}},{"if":{"required":["type"],"properties":{"type":{"const":"video_url"}}},"then":{"$ref":"#/definitions/video_url"}}],"definitions":{"article":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"}],"properties":{"type":{"const":"article","description":"A setting of type article outputs an article picker field that's automatically populated with the available articles for the store. You can use these fields to capture an article selection, such as the article to feature on the homepage.","markdownDescription":"A setting of type `article` outputs an article picker field that's automatically populated with the available articles for the store. You can use these fields to capture an article selection, such as the article to feature on the homepage.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#article)"},"default":true,"label":true,"info":true,"id":true},"additionalProperties":false},"blog":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"}],"properties":{"type":{"const":"blog","description":"A setting of type blog outputs a blog picker field that's automatically populated with the available blogs for the store. You can use these fields to capture a blog selection, such as the blog to feature in the sidebar.","markdownDescription":"A setting of type `blog` outputs a blog picker field that's automatically populated with the available blogs for the store. You can use these fields to capture a blog selection, such as the blog to feature in the sidebar.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#blog)"},"default":true,"label":true,"info":true,"id":true},"additionalProperties":false},"checkbox":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"checkbox","description":"A setting of type checkbox outputs a checkbox field. These fields can be used for toggling features on and off, such as whether to show an announcement bar.","markdownDescription":"A setting of type `checkbox` outputs a checkbox field. These fields can be used for toggling features on and off, such as whether to show an announcement bar.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#checkbox)"},"default":{"type":"boolean"},"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"collection":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"}],"properties":{"type":{"const":"collection","description":"A setting of type collection outputs a collection picker field that's automatically populated with the available collections for the store. You can use these fields to capture a collection selection, such as a collection for featuring products on the homepage.","markdownDescription":"A setting of type `collection` outputs a collection picker field that's automatically populated with the available collections for the store. You can use these fields to capture a collection selection, such as a collection for featuring products on the homepage.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#collection)"},"default":true,"label":true,"info":true,"id":true},"additionalProperties":false},"collection_list":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"}],"properties":{"type":{"const":"collection_list","description":"A setting of type collection_list outputs a collection picker field that's automatically populated with the available collections for the store. You can use these fields to capture multiple collections, such as a group of collections to feature on the homepage.","markdownDescription":"A setting of type `collection_list` outputs a collection picker field that's automatically populated with the available collections for the store. You can use these fields to capture multiple collections, such as a group of collections to feature on the homepage.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#collection_list)"},"limit":{"type":"integer","description":"The maximum number that the merchant can select. The default limit, and the maximum limit you can set, is 50."},"default":true,"label":true,"info":true,"id":true},"additionalProperties":false},"color":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"color","description":"A setting of type color outputs a color picker field. You can use these fields to capture a color selection for various theme elements, such as the body text color.","markdownDescription":"A setting of type `color` outputs a color picker field. You can use these fields to capture a color selection for various theme elements, such as the body text color.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#color)"},"default":{"type":"string"},"label":true,"info":true,"id":true,"visible_if":true,"alpha":{"type":"boolean","description":"A boolean value that determines whether the color picker should include an alpha slider. The default value is true.","markdownDescription":"A boolean value that determines whether the color picker should include an alpha slider. The default value is true.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#color)"}},"additionalProperties":false},"color_background":{"type":"object","allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"color_background","description":"A setting of type color_background outputs a text field for entering CSS background properties. You can use these fields to capture background settings for various theme elements, such as the store background.","markdownDescription":"A setting of type `color_background` outputs a text field for entering [CSS background](https://developer.mozilla.org/en-US/docs/Web/CSS/background) properties. You can use these fields to capture background settings for various theme elements, such as the store background.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#color_background)"},"default":{"type":"string"},"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"color_scheme":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"color_scheme","description":"A setting of type color_scheme outputs a picker with all of the available theme color schemes, and a preview of the selected color scheme.","markdownDescription":"A setting of type `color_scheme` outputs a picker with all of the available theme color schemes, and a preview of the selected color scheme.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#color_scheme)"},"default":{"type":"string"},"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"color_scheme_group":{"allOf":[{"$ref":"#/definitions/colorSchemeGroupStandardAttributes"}],"properties":{"type":{"const":"color_scheme_group","description":"A setting of type color_scheme_group outputs a color scheme.","markdownDescription":"A setting of type `color_scheme_group` outputs a color scheme which is composed of the following input setting types:\n\n- `header`\n- `color`\n- `color_background`\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#color_scheme_group)"},"definition":{"description":"An array of header, color and color_background input settings.","markdownDescription":"An array of `header`, `color` and `color_background` input settings.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#color_scheme_group)","type":"array","items":{"type":"object","properties":{"type":{"enum":["header","color","color_background"]},"visible_if":{"not":{"type":"string"},"errorMessage":"The property visible_if is not allowed within color_scheme_group"}},"allOf":[{"if":{"required":["type"],"properties":{"type":{"const":"header"}}},"then":{"$ref":"#/definitions/header"}},{"if":{"required":["type"],"properties":{"type":{"const":"color"}}},"then":{"$ref":"#/definitions/color"}},{"if":{"required":["type"],"properties":{"type":{"const":"color_background"}}},"then":{"$ref":"#/definitions/color_background"}}]}},"role":{"type":"object","properties":{"background":{"description":"Renders the background color of the preview","oneOf":[{"type":"string"},{"$ref":"#/definitions/gradient"}]},"text":{"description":"Renders the text color of the preview","type":"string"},"primary_button":{"description":"Renders the first pill in the preview","oneOf":[{"type":"string"},{"$ref":"#/definitions/gradient"}]},"secondary_button":{"description":"Renders the second pill in the preview","oneOf":[{"type":"string"},{"$ref":"#/definitions/gradient"}]},"primary_button_border":{"description":"Render the first pills' border in the preview","type":"string"},"secondary_button_border":{"description":"Render the second pills' border in the preview","type":"string"},"on_primary_button":{"description":"Not used in the preview","type":"string"},"on_secondary_button":{"description":"Not used in the preview","type":"string"},"links":{"description":"Not used in the preview","type":"string"},"icons":{"description":"Not used in the preview","type":"string"}},"required":["background","text","primary_button","secondary_button","primary_button_border","secondary_button_border","on_primary_button","on_secondary_button","links","icons"]},"info":true,"id":true},"required":["definition","role"],"additionalProperties":false},"font_picker":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"font_picker","description":"A setting of type font_picker outputs a font picker field that's automatically populated with fonts from the Shopify font library. This library includes web-safe fonts, a selection of Google Fonts, and fonts licensed by Monotype.","markdownDescription":"A setting of type `font_picker` outputs a font picker field that's automatically populated with fonts from the [Shopify font library](https://shopify.dev/docs/themes/architecture/settings/fonts#shopify-font-library). This library includes web-safe fonts, a selection of Google Fonts, and fonts licensed by Monotype.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#font_picker)"},"default":{"type":"string","description":"The default font from the Shopify font library.","markdownDescription":"The default font from the [Shopify font library](https://shopify.dev/docs/themes/architecture/settings/fonts#shopify-font-library)."},"label":true,"info":true,"id":true,"visible_if":true},"required":["default"],"additionalProperties":false},"html":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"html","description":"A setting of type html outputs a multi-line text field that accepts HTML markup.","markdownDescription":"A setting of type `html` outputs a multi-line text field that accepts HTML markup.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#html)"},"default":{"type":"string"},"placeholder":{"type":"string","description":"A placeholder value for the input."},"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"image_picker":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"image_picker","description":"A setting of type image_picker outputs an image picker field that's automatically populated with the available images from the Files section of Shopify admin, and has the option to upload new images. Merchants also have an opportunity to enter alt text and select a focal point for their image.","markdownDescription":"A setting of type `image_picker` outputs an image picker field that's automatically populated with the available images from the [Files](https://help.shopify.com/manual/shopify-admin/productivity-tools/file-uploads) section of Shopify admin, and has the option to upload new images. Merchants also have an opportunity to enter alt text and select a [focal point](https://shopify.dev/docs/themes/architecture/settings/input-settings#image-focal-points) for their image.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#image_picker)"},"default":true,"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"inline_richtext":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"inline_richtext","description":"A setting of type inline_richtext outputs HTML markup that isn't wrapped in paragraph tags (<p>)","markdownDescription":"A setting of type `inline_richtext` outputs HTML markup that isn't wrapped in paragraph tags (`<p>`). The setting includes the following basic formatting options:\n\n- Bold\n- Italic\n- Link\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#inline_richtext)"},"default":{"type":"string"},"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"link_list":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"link_list","description":"A setting of type link_list outputs a menu picker field that's automatically populated with the available menus for the store. You can use these fields to capture a menu selection, such as the menu to use for footer links.","markdownDescription":"A setting of type `link_list` outputs a menu picker field that's automatically populated with the available menus for the store. You can use these fields to capture a menu selection, such as the menu to use for footer links.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#link_list)"},"default":true,"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"liquid":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"liquid","description":"A setting of type liquid outputs a multi-line text field that accepts HTML and limited Liquid markup. You can use these fields to capture custom blocks of HTML and Liquid content, such as a product-specific message. Merchants can also use a liquid setting to add the code needed to integrate certain types of apps into your theme.","markdownDescription":"A setting of type `liquid` outputs a multi-line text field that accepts HTML and [limited](https://shopify.dev/docs/themes/architecture/settings/input-settings#limitations) Liquid markup. You can use these fields to capture custom blocks of HTML and Liquid content, such as a product-specific message. Merchants can also use a liquid setting to add the code needed to integrate certain types of [apps](https://shopify.dev/docs/apps/online-store) into your theme.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#liquid)"},"default":{"type":"string"},"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"metaobject":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"}],"properties":{"type":{"const":"metaobject","description":"A setting of type metaobject outputs a metaobject picker field that's automatically populated with the compatible metaobject entries for the store. You can use these fields to capture a metaobject entry selection for a known metaobject type.","markdownDescription":"A setting of type `metaobject` outputs a metaobject picker field that's automatically populated with the compatible metaobject entries for the store. You can use these fields to capture a metaobject entry selection for a known metaobject type. \n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#metaobject)"},"metaobject_type":{"type":"string","description":"The metaobject type allowed by the picker."},"default":true,"label":true,"info":true,"id":true},"required":["metaobject_type"],"additionalProperties":false},"metaobject_list":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"}],"properties":{"type":{"const":"metaobject_list","description":"A setting of type metaobject_list outputs a metaobject picker field that's automatically populated with the compatible metaobject entries for the store. You can use these fields to capture multiple metaobject entry selections for a known metaobject type.","markdownDescription":"A setting of type `metaobject_list` outputs a metaobject picker field that's automatically populated with the compatible metaobject entries for the store. You can use these fields to capture multiple metaobject entry selections for a known metaobject type.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#metaobject_list)"},"metaobject_type":{"type":"string","description":"The metaobject type allowed by the picker."},"limit":{"type":"integer","description":"The maximum number that the merchant can select. The default limit, and the maximum limit you can set, is 50."},"default":true,"label":true,"info":true,"id":true},"required":["metaobject_type"],"additionalProperties":false},"number":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"number","description":"A setting of type number outputs a single number field.","markdownDescription":"A setting of type `number` outputs a single number field.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#number)"},"placeholder":{"type":"string","description":"A placeholder value for the input."},"default":{"type":"number"},"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"page":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"}],"properties":{"type":{"const":"page","description":"A setting of type page outputs a page picker field that's automatically populated with the available pages for the store. You can use these fields to capture a page selection, such as the page to feature content for in a size-chart display.","markdownDescription":"A setting of type `page` outputs a page picker field that's automatically populated with the available pages for the store. You can use these fields to capture a page selection, such as the page to feature content for in a size-chart display.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#page)"},"default":true,"label":true,"info":true,"id":true},"additionalProperties":false},"product":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"}],"properties":{"type":{"const":"product","description":"A setting of type product outputs a product picker field that's automatically populated with the available products for the store. You can use these fields to capture a product selection, such as the product to feature on the homepage.","markdownDescription":"A setting of type `product` outputs a product picker field that's automatically populated with the available products for the store. You can use these fields to capture a product selection, such as the product to feature on the homepage.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#product)"},"default":true,"label":true,"info":true,"id":true},"additionalProperties":false},"product_list":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"}],"properties":{"type":{"const":"product_list","description":"A setting of type product_list outputs a product picker field that's automatically populated with the available products for the store. You can use these fields to capture multiple products, such as a group of products to feature on the homepage.","markdownDescription":"A setting of type `product_list` outputs a product picker field that's automatically populated with the available products for the store. You can use these fields to capture multiple products, such as a group of products to feature on the homepage.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#product_list)"},"limit":{"type":"integer","description":"The maximum number that the merchant can select. The default limit, and the maximum limit you can set, is 50."},"default":true,"label":true,"info":true,"id":true},"additionalProperties":false},"radio":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"radio","description":"A setting of type radio outputs a radio option field.","markdownDescription":"A setting of type `radio` outputs a radio option field.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#radio)"},"default":{"type":"string","description":"The value of the default option"},"options":{"$ref":"#/definitions/options"},"label":true,"info":true,"id":true,"visible_if":true},"required":["options"],"additionalProperties":false},"range":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"range","description":"A setting of type range outputs a range slider field with an input field.","markdownDescription":"A setting of type `range` outputs a range slider field with an input field.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#range)"},"default":{"type":"number"},"min":{"type":"number","description":"The minimum value of the input"},"max":{"type":"number","description":"The maximum value of the input"},"step":{"type":"number","multipleOf":0.1,"description":"The increment size between steps of the slider"},"unit":{"type":"string","description":"The unit for the input. For example, you can set \"px\" for a font-size slider","markdownDescription":"The unit for the input. For example, you can set `px` for a font-size slider"},"label":true,"info":true,"id":true,"visible_if":true},"required":["default","min","max"],"additionalProperties":false},"richtext":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"richtext","description":"A setting of type richtext outputs a multi-line text field.","markdownDescription":"A setting of type `richtext` outputs a multi-line text field with the following basic formatting options:\n\n- Bold\n- Italic\n- Underline\n- Link\n- Paragraph\n- Unordered list\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#richtext)"},"default":{"type":"string"},"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"select":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"select","description":"A setting of type select outputs different selector fields, depending on certain criteria.","markdownDescription":"A setting of type `select` outputs [different selector fields](https://shopify.dev/docs/themes/architecture/settings/input-settings#selector-fields), depending on certain criteria.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#select)"},"default":{"type":"string","description":"The value of the default option"},"group":{"type":"string","description":"An optional attribute that you can add to each option to create option groups in the drop-down."},"options":{"$ref":"#/definitions/options"},"label":true,"info":true,"id":true,"visible_if":true},"required":["options"],"additionalProperties":false},"lengthPattern":{"type":"string","pattern":"^[0-9]+(px|%)$"},"lengthAutoPattern":{"type":"string","pattern":"^([0-9]+(px|%)|auto|fit-content)$"},"lengthNonePattern":{"type":"string","pattern":"^([0-9]+(px|%)|none|fit-content)$"},"negativeLengthPattern":{"type":"string","pattern":"^-?[0-9]+(px|%)$"},"numberPattern":{"type":"string","pattern":"^[0-9]+$"},"negativeNumberPattern":{"type":"string","pattern":"^-?[0-9]+$"},"text":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"text","description":"A setting of type text outputs a single-line text field.","markdownDescription":"A setting of type `text` outputs a single-line text field.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#text)"},"default":{"type":"string"},"placeholder":{"type":"string","description":"A placeholder value for the input."},"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"text_alignment":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"text_alignment","description":"A setting of type text_alignment outputs a SegmentedControl field with icons.","markdownDescription":"A setting of type `text_alignment` outputs a `SegmentedControl` field with icons.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#text_alignment)"},"default":{"type":"string","enum":["left","right","center"]},"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"textarea":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"textarea","description":"A setting of type textarea outputs a multi-line text field.","markdownDescription":"A setting of type `textarea` outputs a multi-line text field\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#textarea)"},"default":{"type":"string"},"placeholder":{"type":"string","description":"A placeholder value for the input."},"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"url":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"url","description":"A setting of type url outputs a URL entry field where you can manually enter external URLs and relative paths.","markdownDescription":"A setting of type `url` outputs a URL entry field where you can manually enter external URLs and relative paths.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#url)"},"default":{"type":"string"},"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"video":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"video","description":"A setting of type video outputs a video picker that's automatically populated with the available videos from the Files section of the Shopify admin. The merchant also has the option to upload new videos.","markdownDescription":"A setting of type `video` outputs a video picker that's automatically populated with the available videos from the [Files](https://help.shopify.com/en/manual/shopify-admin/productivity-tools/file-uploads) section of the Shopify admin. The merchant also has the option to upload new videos.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#video)"},"default":true,"label":true,"info":true,"id":true,"visible_if":true},"additionalProperties":false},"video_url":{"allOf":[{"$ref":"#/definitions/inputSettingsStandardAttributes"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"video_url","description":"A setting of type video_url outputs a URL entry field.","markdownDescription":"A setting of type `video_url` outputs a URL entry field.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#video_url)"},"placeholder":{"type":"string","description":"A placeholder value for the input."},"accept":{"description":"Takes an array of accepted video providers. Valid values are youtube, vimeo, or both.","markdownDescription":"Takes an array of accepted video providers. Valid values are `youtube`, `vimeo`, or both.","type":"array","items":{"type":"string","enum":["youtube","vimeo"]}},"default":true,"label":true,"info":true,"id":true,"visible_if":true},"required":["accept"],"additionalProperties":false},"header":{"allOf":[{"$ref":"#/definitions/sidebarStandardSettings"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"header","description":"A setting of type `header` outputs a header element to help you better organize your input settings.","markdownDescription":"A setting of type `header` outputs a header element to help you better organize your input settings.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/sidebar-settings#header)"},"info":{"$ref":"#/definitions/info"},"content":true,"visible_if":true},"additionalProperties":false},"paragraph":{"allOf":[{"$ref":"#/definitions/sidebarStandardSettings"},{"$ref":"#/definitions/conditionalSetting"}],"properties":{"type":{"const":"paragraph","description":"A setting of type paragraph outputs a text element to help you better describe your input settings.","markdownDescription":"A setting of type `paragraph` outputs a text element to help you better describe your input settings.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/sidebar-settings#paragraph)"},"content":true,"visible_if":true},"additionalProperties":false},"sidebarStandardSettings":{"$comment":"Sidebar standard settings","required":["type","content"],"properties":{"content":{"type":"string","description":"The setting content, which will show in the theme editor."}}},"conditionalSetting":{"$comment":"Conditional setting property","properties":{"visible_if":{"type":"string","description":"A liquid expression that determines whether the setting should be visible.","markdownDescription":"A liquid expression that determines whether the setting should be visible.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#visible_if)"}}},"inputSettingsStandardAttributes":{"required":["type","id","label"],"properties":{"id":{"type":"string","description":"The unique identifier for the setting, which is used to access the setting value.","markdownDescription":"The unique identifier for the setting, which is used to access the setting value.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#standard-attributes)"},"label":{"type":"string","description":"The label for the setting, which will show in the theme editor."},"default":{"description":"The default value for the setting."},"info":{"$ref":"#/definitions/info"}}},"colorSchemeGroupStandardAttributes":{"required":["type","id"],"properties":{"id":{"type":"string","description":"The unique identifier for the setting, which is used to access the setting value.","markdownDescription":"The unique identifier for the setting, which is used to access the setting value.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#standard-attributes)"}}},"info":{"type":"string","description":"An option for informational text about the setting."},"gradient":{"type":"object","required":["solid","gradient"],"properties":{"solid":{"type":"string"},"gradient":{"type":"string"}}},"style.flex_layout_properties":{"type":"object","properties":{"flex-direction":{"type":"string","description":"Determines how flex items are arranged within the flex container by specifying the main axis and direction. Valid values are row (default), row-reverse, column, and column-reverse.","enum":["row","row-reverse","column","column-reverse"]},"flex-wrap":{"type":"string","description":"Specifies whether flex items are confined to a single line or can flow onto multiple lines. If wrapping is allowed, it defines the stacking direction of the lines. Valid values are nowrap (default), wrap, and wrap-reverse.","enum":["nowrap","wrap","wrap-reverse"]},"row-gap":{"$ref":"#/definitions/lengthPattern","description":"Defines the size of the gap between the rows of a wrapped flex container."},"column-gap":{"$ref":"#/definitions/lengthPattern","description":"Defines the size of the gap between flex items."},"gap":{"type":"string","description":"Shorthand for row-gap and column-gap. Defines the gaps between flex items.","pattern":"^([0-9]+(px|%) ?){1,2}$"},"justify-content":{"type":"string","description":"Defines the alignment of flex items along the main axis of the flex container. Valid values are flex-start (default), flex-end, start, end, left, right, center, space-between, space-around and space-evenly.","enum":["flex-start","flex-end","start","end","left","right","center","space-between","space-around","space-evenly"]},"align-items":{"type":"string","description":"Defines the alignment of flex items along the cross axis of the flex container. Valid values are stretch (default), flex-start / start / self-start, flex-end / end / self-end, center and baseline.","enum":["stretch","flex-start","start","self-start","flex-end","end","self-end","center","baseline"]},"align-content":{"type":"string","description":"Defines the distribution of space between and around flex items along the cross axis. Valid values are stretch, flex-start / start, flex-end / end, center, space-between, space-around, and space-evenly.","enum":["stretch","flex-start","start","flex-end","end","center","space-between","space-around","space-evenly"]}}},"style.size_properties":{"type":"object","properties":{"flex-grow":{"$ref":"#/definitions/numberPattern","description":"Defines the flex grow factor of a flex item, determining how much of the available space in the flex container the item should occupy."},"flex-shrink":{"$ref":"#/definitions/numberPattern","description":"Defines the flex shrink factor of a flex item, determining how much the item should reduce in size compared to the other flex items when space is insufficient."},"flex-basis":{"$ref":"#/definitions/lengthAutoPattern","description":"Defines the initial main size of a flex item, determining the size of the content-box unless otherwise specified by box-sizing."},"width":{"$ref":"#/definitions/lengthAutoPattern","description":"Defines the width of an item."},"min-width":{"$ref":"#/definitions/lengthAutoPattern","description":"Defines the minimum width of an item."},"max-width":{"$ref":"#/definitions/lengthNonePattern","description":"Defines the maximum width of an item."},"height":{"$ref":"#/definitions/lengthAutoPattern","description":"Defines the height of an item."},"min-height":{"$ref":"#/definitions/lengthAutoPattern","description":"Defines the minimum height of an item."},"max-height":{"$ref":"#/definitions/lengthNonePattern","description":"Defines the maximum height of an item."}}},"style.spacing_properties":{"type":"object","properties":{"padding":{"description":"Shorthand that defines the padding on all four sides of an element.","pattern":"^([0-9]+(px|%) ?){1,4}$"},"padding-top":{"description":"Defines the padding on the top side of an element.","$ref":"#/definitions/lengthPattern"},"padding-right":{"description":"Defines the padding on the right side of an element.","$ref":"#/definitions/lengthPattern"},"padding-bottom":{"description":"Defines the padding on the bottom side of an element.","$ref":"#/definitions/lengthPattern"},"padding-left":{"description":"Defines the padding on the left side of an element.","$ref":"#/definitions/lengthPattern"},"padding-block-start":{"description":"Defines the logical block start padding of an element, translating to physical padding based on the element's writing mode, text direction, and text orientation.","$ref":"#/definitions/lengthPattern"},"padding-block-end":{"description":"Defines the logical block end padding of an element, translating to physical padding based on the element's writing mode, text direction, and text orientation.","$ref":"#/definitions/lengthPattern"},"padding-block":{"type":"string","description":"Shorthand for padding-block-start and padding-block end. Defines the logical block start and end padding of an element, translating to physical padding based on the element's writing mode, text direction, and text orientation.","pattern":"^([0-9]+(px|%) ?){1,2}$"},"padding-inline-start":{"description":"Defines the logical inline start padding of an element, translating to physical padding based on the element's writing mode, text direction, and text orientation.","$ref":"#/definitions/lengthPattern"},"padding-inline-end":{"description":"Defines the logical inline end padding of an element, translating to physical padding based on the element's writing mode, text direction, and text orientation.","$ref":"#/definitions/lengthPattern"},"padding-inline":{"type":"string","description":"Shorthand that defines the logical inline start and end padding of an element, translating to physical padding based on the element's writing mode, text direction, and text orientation.","pattern":"^([0-9]+(px|%) ?){1,2}$"},"margin":{"type":"string","description":"Shorthand that defines the margin on all four sides of an element.","pattern":"^(-?[0-9]+(px|%) ?){1,4}$"},"margin-top":{"description":"Defines the margin on the top side of an element.","$ref":"#/definitions/negativeLengthPattern"},"margin-right":{"description":"Defines the margin on the right side of an element.","$ref":"#/definitions/negativeLengthPattern"},"margin-bottom":{"description":"Defines the margin on the bottom side of an element.","$ref":"#/definitions/negativeLengthPattern"},"margin-left":{"description":"Defines the margin on the left side of an element.","$ref":"#/definitions/negativeLengthPattern"},"margin-block-start":{"description":"Defines the logical block start margin of an element, translating to physical margin based on the element's writing mode, text direction, and text orientation.","$ref":"#/definitions/negativeLengthPattern"},"margin-block-end":{"description":"Defines the logical block end margin of an element, translating to physical margin based on the element's writing mode, text direction, and text orientation.","$ref":"#/definitions/negativeLengthPattern"},"margin-block":{"type":"string","description":"Shorthand that defines the logical block start and end margins of an element, translating to physical margin based on the element's writing mode, text direction, and text orientation.","pattern":"^(-?[0-9]+(px|%) ?){1,2}$"},"margin-inline-start":{"description":"Defines the logical inline start margin of an element, translating to physical margin based on the element's writing mode, text direction, and text orientation.","$ref":"#/definitions/negativeLengthPattern"},"margin-inline-end":{"description":"Defines the logical inline end margin of an element, translating to physical margin based on the element's writing mode, text direction, and text orientation.","$ref":"#/definitions/negativeLengthPattern"},"margin-inline":{"type":"string","description":"Shorthand that defines both the logical inline start and end margins of an element, translating to physical margin based on the element's writing mode, text direction, and text orientation.","pattern":"^(-?[0-9]+(px|%) ?){1,2}$"}}},"options":{"description":"Takes an array of `value`/`label` definitions.","type":"array","items":{"type":"object","properties":{"value":{"description":"The value of the option.","type":"string"},"label":{"description":"The label of the option.","type":"string"}},"required":["value","label"]}}}}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**schemas/settings.json**
|
|
155
|
+
```
|
|
156
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","description":"Settings that merchants can configure through the theme editor.","markdownDescription":"Settings that merchants can configure through the [theme editor](https://help.shopify.com/en/manual/online-store/themes/customizing-themes#theme-editor)\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings).","type":"array","items":{"$ref":"./setting.json"},"minItems":0}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**schemas/targetted_block_entry.json**
|
|
160
|
+
```
|
|
161
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","$comment":"A targetted private or public theme block from the blocks/ folder.","type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a theme block found in the blocks/ folder of the theme.","markdownDescription":"The name of a theme block found in the `blocks/` folder of the theme.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/blocks/theme-blocks/schema#blocks)"}}}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**schemas/theme_block_entry.json**
|
|
165
|
+
```
|
|
166
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","$comment":"A @theme block entry","type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"const":"@theme","description":"The \"@theme\" type denotes that this container accepts theme blocks that live in the blocks/ folder of the theme.","markdownDescription":"The `@theme` type denotes that this container accepts theme blocks that live in the `blocks/` folder of the theme.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/blocks/theme-blocks/schema#blocks)"}}}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**schemas/theme_block.json**
|
|
170
|
+
```
|
|
171
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","title":"Shopify Liquid Theme Block Schema","type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name attribute determines the block title that's shown in the theme editor.","markdownDescription":"The `name` attribute determines the block title that's shown in the theme editor.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/blocks/theme-blocks/schema#name)"},"settings":{"$ref":"./settings.json"},"blocks":{"type":"array","description":"Theme blocks can accept other app and theme blocks as children using the blocks attribute of their schema.","markdownDescription":"Theme blocks can accept other app and theme blocks as children using the `blocks` attribute of their schema.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/blocks/theme-blocks/schema#blocks)","items":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","description":"The type of block that can be added to this block.","markdownDescription":"The type of block that can be added to this block.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/blocks/theme-blocks/schema#blocks)"}},"$comment":"The allOf rule here exists because that's how we do discriminated unions in JSON schemas. If a rule matches, that rule will be used to document the type property. Otherwise we fallback to the docs above.","allOf":[{"if":{"required":["type"],"properties":{"type":{"const":"@theme"}}},"then":{"$ref":"./theme_block_entry.json"}},{"if":{"required":["type"],"properties":{"type":{"const":"@app"}}},"then":{"$ref":"./app_block_entry.json"}},{"if":{"required":["type"],"properties":{"type":{"type":"string","not":{"enum":["@app","@theme"]}}}},"then":{"$ref":"./targetted_block_entry.json"}}]}},"presets":{"type":"array","description":"Presets are default configurations of blocks that enable merchants to easily add a block to a JSON template through the theme editor.","markdownDescription":"Presets are default configurations of blocks that enable merchants to easily add a block to a JSON template through the theme editor.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/blocks/theme-blocks/schema#presets)","items":{"$ref":"./preset.json"}},"tag":{"description":"The HTML element that is used to wrap the rendered block. Accepts any string up to 50 characters. Can be used to render custom HTML elements. Use null to render without a wrapping element.","markdownDescription":"The HTML element that is used to wrap the rendered block. Accepts any string up to 50 characters. Can be used to render custom HTML elements.\n\nUse `null` to render without a wrapping element.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/blocks/theme-blocks/schema#tag)","oneOf":[{"description":"If you don't want to use a <div>, then you can specify which kind of HTML element to use.","markdownDescription":"If you don't want to use a `<div>`, then you can specify which kind of HTML element to use.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/blocks/theme-blocks/schema#tag)","type":"string","maxLength":50},{"description":"Used to render the block without a wrapping element.","markdownDescription":"Used to render the block without a wrapping element.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/blocks/theme-blocks/schema#rendering-blocks-without-a-wrapper)","type":"null"}]},"class":{"type":"string","description":"When Shopify renders a block, it's wrapped in an HTML element with the shopify-block class. You can append other classes by using the class attribute.","markdownDescription":"When Shopify renders a block, it's wrapped in an HTML element with the `shopify-block` class. You can append other classes by using the class attribute.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/blocks/theme-blocks/schema#class)"}}}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**schemas/theme_settings.json**
|
|
175
|
+
```
|
|
176
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","title":"JSON schema for config/settings_schema.json files.","description":"The settings that merchants can configure in the theme editor.","markdownDescription":"The settings that merchants can configure in the theme editor.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/config/settings-schema-json)","type":"array","items":{"anyOf":[{"title":"Theme metadata","markdownDescription":"Additional metadata for your theme that shows up in the Theme actions menu of the theme editor.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/config/settings-schema-json#add-theme-metadata)","type":"object","properties":{"name":{"description":"You may use the 'theme_info' object for theme metadata.","markdownDescription":"[Shopify reference](https://shopify.dev/docs/themes/architecture/config/settings-schema-json#add-theme-metadata)","const":"theme_info"},"theme_name":{"type":"string","description":"The name of the theme."},"theme_author":{"type":"string","description":"The author of the theme."},"theme_version":{"type":"string","description":"The version number of the theme."},"theme_documentation_url":{"type":"string","format":"uri","description":"A URL where merchants can find documentation for the theme."},"theme_support_email":{"type":"string","format":"email","description":"An email address that merchants can contact for support for the theme."},"theme_support_url":{"type":"string","format":"uri","description":"A URL where merchants can find support for the theme."}},"required":["name","theme_name","theme_author","theme_version","theme_documentation_url"],"oneOf":[{"required":["theme_support_email"],"not":{"required":["theme_support_url"]}},{"required":["theme_support_url"],"not":{"required":["theme_support_email"]}}]},{"type":"object","properties":{"name":{"type":"string","description":"The name of the category of settings.","markdownDescription":"The name of the category of settings.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/config/settings-schema-json#schema)","not":{"const":"theme_info"}},"settings":{"$ref":"./settings.json"}}}]}}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**schemas/translations.json**
|
|
180
|
+
```
|
|
181
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/definitions/pluralizedString"},{"$ref":"#"}]},"patternProperties":{".*_html$":{"oneOf":[{"type":"string","description":"A string that can contain HTML content, typically used for translations that include HTML tags."},{"$ref":"#/definitions/pluralizedString"}]}},"definitions":{"pluralizedString":{"type":"object","properties":{"one":{"type":"string","description":"Translation for the singular form"},"other":{"type":"string","description":"Translation for the plural form"},"few":{"type":"string","description":"Translation for 'few' form, used in some languages"},"many":{"type":"string","description":"Translation for 'many' form, used in some languages"},"two":{"type":"string","description":"Translation for 'two' form, used in some languages"},"zero":{"type":"string","description":"Translation for 'zero' form, used in some languages"}},"additionalProperties":false,"description":"An object representing a pluralized translation string"}}}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Section coding standards and best practices guide
|
|
3
|
+
globs: sections/*.liquid
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Section development standards
|
|
7
|
+
|
|
8
|
+
## Section requirements
|
|
9
|
+
|
|
10
|
+
Every section must include:
|
|
11
|
+
|
|
12
|
+
- `{% schema %}` tag with valid JSON
|
|
13
|
+
- Proper HTML semantic structure
|
|
14
|
+
- CSS scoping with section classes
|
|
15
|
+
- Translation keys for all text
|
|
16
|
+
|
|
17
|
+
## Section patterns
|
|
18
|
+
|
|
19
|
+
**Basic section structure:**
|
|
20
|
+
|
|
21
|
+
```liquid
|
|
22
|
+
{% liquid
|
|
23
|
+
assign section_id = section.settings.custom_id | default: section.id
|
|
24
|
+
assign section_class = 'section-' | append: section.type
|
|
25
|
+
%}
|
|
26
|
+
|
|
27
|
+
<section
|
|
28
|
+
id="{{ section_id }}"
|
|
29
|
+
class="{{ section_class }}"
|
|
30
|
+
style="
|
|
31
|
+
--section-padding-top: {{ section.settings.padding_top }}px;
|
|
32
|
+
--section-padding-bottom: {{ section.settings.padding_bottom }}px;
|
|
33
|
+
"
|
|
34
|
+
>
|
|
35
|
+
<div class="page-width">
|
|
36
|
+
{% content_for 'blocks %}
|
|
37
|
+
</div>
|
|
38
|
+
</section>
|
|
39
|
+
|
|
40
|
+
{% stylesheet %}
|
|
41
|
+
.{{ section_class }} {
|
|
42
|
+
padding-top: var(--section-padding-top, 40px);
|
|
43
|
+
padding-bottom: var(--section-padding-bottom, 40px);
|
|
44
|
+
}
|
|
45
|
+
{% endstylesheet %}
|
|
46
|
+
|
|
47
|
+
{% schema %}
|
|
48
|
+
{
|
|
49
|
+
"name": "t:names.section_name",
|
|
50
|
+
"tag": "section",
|
|
51
|
+
"class": "section-name",
|
|
52
|
+
"blocks": [
|
|
53
|
+
{"type": "@theme"},
|
|
54
|
+
{"type": "@app"}
|
|
55
|
+
],
|
|
56
|
+
"settings": [
|
|
57
|
+
{
|
|
58
|
+
"type": "range",
|
|
59
|
+
"id": "padding_top",
|
|
60
|
+
"label": "t:settings.padding",
|
|
61
|
+
"min": 0,
|
|
62
|
+
"max": 100,
|
|
63
|
+
"default": 40,
|
|
64
|
+
"unit": "px"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"presets": [
|
|
68
|
+
{
|
|
69
|
+
"name": "t:names.section_name"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
{% endschema %}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Performance patterns
|
|
77
|
+
|
|
78
|
+
- Use `{% liquid %}` for multiline logic
|
|
79
|
+
- Lazy load images with `loading="lazy"`
|
|
80
|
+
- Scope CSS variables to section
|
|
81
|
+
- Use `container-queries` for responsive behavior
|
|
82
|
+
|
|
83
|
+
[section-example.liquid](mdc:.cursor/rules/examples/section-example.liquid)
|
|
84
|
+
|