@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,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Guidelines and examples for organizing and structuring the Shopify theme settings schema.
|
|
3
|
+
globs: config/settings_schema.json
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Settings schema standards
|
|
7
|
+
|
|
8
|
+
## Settings schema structure
|
|
9
|
+
|
|
10
|
+
```json
|
|
11
|
+
{
|
|
12
|
+
"name": "theme_info",
|
|
13
|
+
"theme_name": "Theme Name",
|
|
14
|
+
"theme_version": "1.0.0",
|
|
15
|
+
"theme_author": "Author Name",
|
|
16
|
+
"theme_documentation_url": "https://...",
|
|
17
|
+
"theme_support_url": "https://..."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "Colors",
|
|
21
|
+
"settings": [
|
|
22
|
+
{
|
|
23
|
+
"type": "header",
|
|
24
|
+
"content": "Brand Colors"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "color",
|
|
28
|
+
"id": "color_primary",
|
|
29
|
+
"label": "Primary",
|
|
30
|
+
"default": "#121212"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Setting categories
|
|
37
|
+
|
|
38
|
+
**Typography:**
|
|
39
|
+
- `font_picker` for font selections
|
|
40
|
+
- `range` for font sizes (12-72px)
|
|
41
|
+
- `select` for font weights
|
|
42
|
+
|
|
43
|
+
**Layout:**
|
|
44
|
+
- `range` for spacing (0-100px)
|
|
45
|
+
- `select` for layout options
|
|
46
|
+
- `checkbox` for feature toggles
|
|
47
|
+
|
|
48
|
+
**Performance:**
|
|
49
|
+
- `checkbox` for lazy loading
|
|
50
|
+
- `select` for image quality
|
|
51
|
+
- `number` for pagination limits
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Snippets coding standards and best practices guide
|
|
3
|
+
globs: snippets/*.liquid
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Snippet development standards
|
|
8
|
+
|
|
9
|
+
## Snippet documentation
|
|
10
|
+
|
|
11
|
+
Every snippet must include JSDoc-style comments using LiquidDoc:
|
|
12
|
+
|
|
13
|
+
```liquid
|
|
14
|
+
{% doc %}
|
|
15
|
+
Product Card Component
|
|
16
|
+
|
|
17
|
+
Renders a product card with customizable options.
|
|
18
|
+
|
|
19
|
+
@param {product} product - product object (required)
|
|
20
|
+
@param {boolean} show_vendor - display vendor name (default: false)
|
|
21
|
+
@param {boolean} show_quick_add - show quick add button (default: false)
|
|
22
|
+
@param {string} image_ratio - image aspect ratio (default: 'adapt')
|
|
23
|
+
@param {boolean} lazy_load - enable lazy loading (default: true)
|
|
24
|
+
@param {string} card_class - Additional CSS classes
|
|
25
|
+
|
|
26
|
+
@example
|
|
27
|
+
{% render 'product-card',
|
|
28
|
+
product: product,
|
|
29
|
+
show_vendor: true,
|
|
30
|
+
image_ratio: 'square'
|
|
31
|
+
%}
|
|
32
|
+
{% enddoc %}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Parameter handling
|
|
36
|
+
|
|
37
|
+
Always provide defaults and validate parameters:
|
|
38
|
+
|
|
39
|
+
```liquid
|
|
40
|
+
{% liquid
|
|
41
|
+
# Parameter validation and defaults
|
|
42
|
+
assign product = product | default: empty
|
|
43
|
+
assign show_vendor = show_vendor | default: false
|
|
44
|
+
assign show_quick_add = show_quick_add | default: false
|
|
45
|
+
assign image_ratio = image_ratio | default: 'adapt'
|
|
46
|
+
assign lazy_load = lazy_load | default: true
|
|
47
|
+
assign card_class = card_class | default: ''
|
|
48
|
+
|
|
49
|
+
# Early return if required parameters missing
|
|
50
|
+
unless product != empty
|
|
51
|
+
echo '<!-- Error: product parameter required for product-card snippet -->'
|
|
52
|
+
break
|
|
53
|
+
endunless
|
|
54
|
+
%}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Common snippet patterns
|
|
58
|
+
|
|
59
|
+
**Icon snippet:**
|
|
60
|
+
```liquid
|
|
61
|
+
{% doc %}
|
|
62
|
+
@param {string} icon - Icon name (required)
|
|
63
|
+
@param {string} size - Icon size class (default: 'icon--medium')
|
|
64
|
+
@param {string} css_class - Additional CSS class
|
|
65
|
+
{% enddoc %}
|
|
66
|
+
|
|
67
|
+
{% liquid
|
|
68
|
+
assign icon = icon | default: ''
|
|
69
|
+
assign size = size | default: 'icon--medium'
|
|
70
|
+
assign css_class = css_class | default: ''
|
|
71
|
+
|
|
72
|
+
unless icon != blank
|
|
73
|
+
break
|
|
74
|
+
endunless
|
|
75
|
+
%}
|
|
76
|
+
|
|
77
|
+
<svg class="icon {{ size }} {{ css_class }}" aria-hidden="true" focusable="false">
|
|
78
|
+
<use href="#icon-{{ icon }}"></use>
|
|
79
|
+
</svg>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Price snippet:**
|
|
83
|
+
```liquid
|
|
84
|
+
{% doc %}
|
|
85
|
+
@param {product} product - Product object (required)
|
|
86
|
+
@param {boolean} show_compare_at - Show compare at price (default: true)
|
|
87
|
+
@param {boolean} show_unit_price - Show unit price (default: false)
|
|
88
|
+
{% enddoc %}
|
|
89
|
+
|
|
90
|
+
{% liquid
|
|
91
|
+
assign show_compare_at = show_compare_at | default: true
|
|
92
|
+
assign show_unit_price = show_unit_price | default: false
|
|
93
|
+
%}
|
|
94
|
+
|
|
95
|
+
<div class="price">
|
|
96
|
+
<div class="price__regular">
|
|
97
|
+
{{ product.price | money }}
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
{% if show_compare_at and product.compare_at_price > product.price %}
|
|
101
|
+
<div class="price__compare-at">
|
|
102
|
+
<s>{{ product.compare_at_price | money }}</s>
|
|
103
|
+
</div>
|
|
104
|
+
{% endif %}
|
|
105
|
+
|
|
106
|
+
{% if show_unit_price and product.selected_or_first_available_variant.unit_price_measurement %}
|
|
107
|
+
<div class="price__unit">
|
|
108
|
+
{{ product.selected_or_first_available_variant.unit_price | money }}/
|
|
109
|
+
{%- if product.selected_or_first_available_variant.unit_price_measurement.reference_value != 1 -%}
|
|
110
|
+
{{ product.selected_or_first_available_variant.unit_price_measurement.reference_value }}
|
|
111
|
+
{%- endif -%}
|
|
112
|
+
{{ product.selected_or_first_available_variant.unit_price_measurement.reference_unit }}
|
|
113
|
+
</div>
|
|
114
|
+
{% endif %}
|
|
115
|
+
</div>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
[snippet-example.liquid](mdc:.cursor/rules/examples/snippet-example.liquid)
|
|
119
|
+
|