@augeo/smelt 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/.claude/settings.json +11 -0
  2. package/.github/workflows/verify.yml +64 -0
  3. package/.gitmodules +3 -0
  4. package/.prettierignore +25 -0
  5. package/.prettierrc.cjs +9 -0
  6. package/.zed/settings.json +21 -0
  7. package/AGENTS.md +232 -0
  8. package/LICENSE +21 -0
  9. package/README.md +266 -0
  10. package/biome.json +58 -0
  11. package/dist/cli.d.mts +1 -0
  12. package/dist/cli.mjs +350 -0
  13. package/dist/schema.d.mts +265 -0
  14. package/dist/schema.mjs +21 -0
  15. package/docs/TESTING.md +293 -0
  16. package/docs/assets-plan.md +197 -0
  17. package/docs/build-spec.md +466 -0
  18. package/docs/library-conversion-plan.md +419 -0
  19. package/example/.gitattributes +7 -0
  20. package/example/.shopifyignore +28 -0
  21. package/example/.theme-check.yml +7 -0
  22. package/example/blocks/_built--sections--hero--blocks--feature.liquid +52 -0
  23. package/example/config/settings_schema.json +10 -0
  24. package/example/layout/theme.liquid +25 -0
  25. package/example/locales/en.default.json +1 -0
  26. package/example/package-lock.json +51 -0
  27. package/example/package.json +20 -0
  28. package/example/sections/built--sections--hero.liquid +83 -0
  29. package/example/snippets/built--components--button.liquid +38 -0
  30. package/example/snippets/built--components--card.liquid +33 -0
  31. package/example/src/components/button/button.css +13 -0
  32. package/example/src/components/card/card.css +16 -0
  33. package/example/src/components/card/card.liquid +9 -0
  34. package/example/src/sections/hero/blocks/feature/feature.css +11 -0
  35. package/example/src/sections/hero/blocks/feature/feature.liquid +9 -0
  36. package/example/src/sections/hero/blocks/feature/feature.schema.ts +14 -0
  37. package/example/src/sections/hero/hero.css +15 -0
  38. package/example/src/sections/hero/hero.liquid +16 -0
  39. package/example/src/sections/hero/hero.schema.ts +26 -0
  40. package/example/src/sections/hero/hero.test.ts +43 -0
  41. package/example/src/utilities/labels.ts +5 -0
  42. package/example/templates/index.liquid +1 -0
  43. package/example/tsconfig.json +10 -0
  44. package/example/vitest.config.ts +6 -0
  45. package/lib/build/build.test.ts +475 -0
  46. package/lib/build/build.ts +314 -0
  47. package/lib/build/command.ts +27 -0
  48. package/lib/build/index.ts +1 -0
  49. package/lib/cli.ts +17 -0
  50. package/lib/dev/command.ts +25 -0
  51. package/lib/dev/index.ts +1 -0
  52. package/lib/dev/watch.ts +52 -0
  53. package/lib/resolver.test.ts +275 -0
  54. package/lib/resolver.ts +156 -0
  55. package/lib/schema.ts +37 -0
  56. package/package.json +59 -0
  57. package/scripts/codegen-schema.ts +66 -0
  58. package/src/components/button/button.css +13 -0
  59. package/src/components/button/button.liquid +5 -0
  60. package/src/components/button/button.ts +5 -0
  61. package/src/tsconfig.json +10 -0
  62. package/tests/example.test.ts +101 -0
  63. package/tsconfig.json +20 -0
  64. package/tsdown.config.ts +14 -0
  65. package/vendor/theme-liquid-docs/.gitattributes +10 -0
  66. package/vendor/theme-liquid-docs/.github/CODEOWNERS +1 -0
  67. package/vendor/theme-liquid-docs/.github/CODE_OF_CONDUCT.md +73 -0
  68. package/vendor/theme-liquid-docs/.github/ISSUE_TEMPLATE/bug_report.md +17 -0
  69. package/vendor/theme-liquid-docs/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
  70. package/vendor/theme-liquid-docs/.github/dependabot.yaml +6 -0
  71. package/vendor/theme-liquid-docs/.github/workflows/ci.yml +33 -0
  72. package/vendor/theme-liquid-docs/.github/workflows/cla.yml +27 -0
  73. package/vendor/theme-liquid-docs/.github/workflows/shopify-dev-preview-automation.yml +86 -0
  74. package/vendor/theme-liquid-docs/.github/workflows/update-latest.yml +56 -0
  75. package/vendor/theme-liquid-docs/.prettierrc.json +16 -0
  76. package/vendor/theme-liquid-docs/.vscode/settings.json +28 -0
  77. package/vendor/theme-liquid-docs/LICENSE.md +7 -0
  78. package/vendor/theme-liquid-docs/README.md +48 -0
  79. package/vendor/theme-liquid-docs/ai/claude/CLAUDE.md +1485 -0
  80. package/vendor/theme-liquid-docs/ai/cursor/rules/assets.mdc +15 -0
  81. package/vendor/theme-liquid-docs/ai/cursor/rules/blocks.mdc +339 -0
  82. package/vendor/theme-liquid-docs/ai/cursor/rules/examples/block-example-group.mdc +103 -0
  83. package/vendor/theme-liquid-docs/ai/cursor/rules/examples/block-example-text.mdc +59 -0
  84. package/vendor/theme-liquid-docs/ai/cursor/rules/examples/section-example.mdc +61 -0
  85. package/vendor/theme-liquid-docs/ai/cursor/rules/examples/snippet-example.mdc +72 -0
  86. package/vendor/theme-liquid-docs/ai/cursor/rules/liquid.mdc +837 -0
  87. package/vendor/theme-liquid-docs/ai/cursor/rules/locales.mdc +100 -0
  88. package/vendor/theme-liquid-docs/ai/cursor/rules/localization.mdc +67 -0
  89. package/vendor/theme-liquid-docs/ai/cursor/rules/mcp.mdc +2 -0
  90. package/vendor/theme-liquid-docs/ai/cursor/rules/schemas.mdc +184 -0
  91. package/vendor/theme-liquid-docs/ai/cursor/rules/sections.mdc +84 -0
  92. package/vendor/theme-liquid-docs/ai/cursor/rules/settings-schema.mdc +51 -0
  93. package/vendor/theme-liquid-docs/ai/cursor/rules/snippets.mdc +119 -0
  94. package/vendor/theme-liquid-docs/ai/github/copilot-instructions.md +1485 -0
  95. package/vendor/theme-liquid-docs/ai/liquid.mdc +638 -0
  96. package/vendor/theme-liquid-docs/data/filters.json +6148 -0
  97. package/vendor/theme-liquid-docs/data/latest.json +2 -0
  98. package/vendor/theme-liquid-docs/data/objects.json +20594 -0
  99. package/vendor/theme-liquid-docs/data/shopify_system_translations.json +2586 -0
  100. package/vendor/theme-liquid-docs/data/tags.json +1276 -0
  101. package/vendor/theme-liquid-docs/package.json +20 -0
  102. package/vendor/theme-liquid-docs/schemas/manifest_schema.json +31 -0
  103. package/vendor/theme-liquid-docs/schemas/manifest_theme.json +19 -0
  104. package/vendor/theme-liquid-docs/schemas/manifest_theme_app_extension.json +10 -0
  105. package/vendor/theme-liquid-docs/schemas/theme/app_block_entry.json +13 -0
  106. package/vendor/theme-liquid-docs/schemas/theme/default_setting_values.json +24 -0
  107. package/vendor/theme-liquid-docs/schemas/theme/local_block_entry.json +25 -0
  108. package/vendor/theme-liquid-docs/schemas/theme/preset.json +72 -0
  109. package/vendor/theme-liquid-docs/schemas/theme/preset_blocks.json +91 -0
  110. package/vendor/theme-liquid-docs/schemas/theme/section.json +208 -0
  111. package/vendor/theme-liquid-docs/schemas/theme/setting.json +1413 -0
  112. package/vendor/theme-liquid-docs/schemas/theme/settings.json +10 -0
  113. package/vendor/theme-liquid-docs/schemas/theme/targetted_block_entry.json +15 -0
  114. package/vendor/theme-liquid-docs/schemas/theme/theme_block.json +91 -0
  115. package/vendor/theme-liquid-docs/schemas/theme/theme_block_entry.json +14 -0
  116. package/vendor/theme-liquid-docs/schemas/theme/theme_settings.json +83 -0
  117. package/vendor/theme-liquid-docs/schemas/theme/translations.json +63 -0
  118. package/vendor/theme-liquid-docs/schemas/update/update_extension_schema_v1.json +186 -0
  119. package/vendor/theme-liquid-docs/tests/fixtures/section-nested-blocks.json +18 -0
  120. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-1.json +90 -0
  121. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-2.json +201 -0
  122. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-3.json +29 -0
  123. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-4.json +315 -0
  124. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-5.json +114 -0
  125. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-6.json +63 -0
  126. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-conditional-settings.json +145 -0
  127. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-preset-blocks-as-hash.json +60 -0
  128. package/vendor/theme-liquid-docs/tests/fixtures/section-schema-static-block-preset.json +76 -0
  129. package/vendor/theme-liquid-docs/tests/fixtures/section-settings.json +34 -0
  130. package/vendor/theme-liquid-docs/tests/fixtures/theme-block-1.json +234 -0
  131. package/vendor/theme-liquid-docs/tests/fixtures/theme-block-2.json +253 -0
  132. package/vendor/theme-liquid-docs/tests/fixtures/theme-block-basics.json +48 -0
  133. package/vendor/theme-liquid-docs/tests/fixtures/theme-block-conditional-settings.json +202 -0
  134. package/vendor/theme-liquid-docs/tests/fixtures/theme-block-presets-as-hash.json +50 -0
  135. package/vendor/theme-liquid-docs/tests/fixtures/theme-block-settings.json +34 -0
  136. package/vendor/theme-liquid-docs/tests/fixtures/theme-settings-all-settings.json +313 -0
  137. package/vendor/theme-liquid-docs/tests/fixtures/theme-settings-dawn.json +1469 -0
  138. package/vendor/theme-liquid-docs/tests/fixtures/theme-settings-metadata.json +10 -0
  139. package/vendor/theme-liquid-docs/tests/fixtures/translations-1.json +14 -0
  140. package/vendor/theme-liquid-docs/tests/section.spec.ts +367 -0
  141. package/vendor/theme-liquid-docs/tests/test-constants.ts +58 -0
  142. package/vendor/theme-liquid-docs/tests/test-helpers.ts +104 -0
  143. package/vendor/theme-liquid-docs/tests/theme-settings/color_palette.spec.ts +184 -0
  144. package/vendor/theme-liquid-docs/tests/theme-settings/color_scheme_group.spec.ts +143 -0
  145. package/vendor/theme-liquid-docs/tests/theme-settings/general.spec.ts +192 -0
  146. package/vendor/theme-liquid-docs/tests/theme-settings/metaobject.spec.ts +94 -0
  147. package/vendor/theme-liquid-docs/tests/theme-settings/resource_list.spec.ts +58 -0
  148. package/vendor/theme-liquid-docs/tests/theme-settings/theme-metadata.spec.ts +59 -0
  149. package/vendor/theme-liquid-docs/tests/theme_block.spec.ts +266 -0
  150. package/vendor/theme-liquid-docs/tests/translations_schema.spec.ts +31 -0
  151. package/vendor/theme-liquid-docs/yarn.lock +543 -0
  152. package/vitest.config.ts +7 -0
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "description": "Settings that merchants can configure through the theme editor.",
4
+ "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).",
5
+ "type": "array",
6
+ "items": {
7
+ "$ref": "./setting.json"
8
+ },
9
+ "minItems": 0
10
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$comment": "A targetted private or public theme block from the blocks/ folder.",
4
+ "type": "object",
5
+ "required": ["type"],
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "type": {
9
+ "type": "string",
10
+ "pattern": "^[a-zA-Z0-9_-]+$",
11
+ "description": "The name of a theme block found in the blocks/ folder of the theme.",
12
+ "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)"
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Shopify Liquid Theme Block Schema",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "properties": {
7
+ "name": {
8
+ "type": "string",
9
+ "description": "The name attribute determines the block title that's shown in the theme editor.",
10
+ "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)"
11
+ },
12
+
13
+ "settings": {
14
+ "$ref": "./settings.json"
15
+ },
16
+
17
+ "blocks": {
18
+ "type": "array",
19
+ "description": "Theme blocks can accept other app and theme blocks as children using the blocks attribute of their schema.",
20
+ "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)",
21
+ "items": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": ["type"],
25
+ "properties": {
26
+ "type": {
27
+ "type": "string",
28
+ "description": "The type of block that can be added to this block.",
29
+ "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)"
30
+ }
31
+ },
32
+ "$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.",
33
+ "allOf": [
34
+ {
35
+ "if": { "required": ["type"], "properties": { "type": { "const": "@theme" } } },
36
+ "then": { "$ref": "./theme_block_entry.json" }
37
+ },
38
+ {
39
+ "if": { "required": ["type"], "properties": { "type": { "const": "@app" } } },
40
+ "then": { "$ref": "./app_block_entry.json" }
41
+ },
42
+ {
43
+ "if": {
44
+ "required": ["type"],
45
+ "properties": {
46
+ "type": {
47
+ "type": "string",
48
+ "not": { "enum": ["@app", "@theme"] }
49
+ }
50
+ }
51
+ },
52
+ "then": { "$ref": "./targetted_block_entry.json" }
53
+ }
54
+ ]
55
+ }
56
+ },
57
+
58
+ "presets": {
59
+ "type": "array",
60
+ "description": "Presets are default configurations of blocks that enable merchants to easily add a block to a JSON template through the theme editor.",
61
+ "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)",
62
+ "items": {
63
+ "$ref": "./preset.json"
64
+ }
65
+ },
66
+
67
+ "tag": {
68
+ "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.",
69
+ "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)",
70
+ "oneOf": [
71
+ {
72
+ "description": "If you don't want to use a <div>, then you can specify which kind of HTML element to use.",
73
+ "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)",
74
+ "type": "string",
75
+ "maxLength": 50
76
+ },
77
+ {
78
+ "description": "Used to render the block without a wrapping element.",
79
+ "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)",
80
+ "type": "null"
81
+ }
82
+ ]
83
+ },
84
+
85
+ "class": {
86
+ "type": "string",
87
+ "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.",
88
+ "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)"
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$comment": "A @theme block entry",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": ["type"],
7
+ "properties": {
8
+ "type": {
9
+ "const": "@theme",
10
+ "description": "The \"@theme\" type denotes that this container accepts theme blocks that live in the blocks/ folder of the theme.",
11
+ "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)"
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "JSON schema for config/settings_schema.json files.",
4
+ "description": "The settings that merchants can configure in the theme editor.",
5
+ "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)",
6
+ "type": "array",
7
+ "items": {
8
+ "anyOf": [
9
+ {
10
+ "title": "Theme metadata",
11
+ "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)",
12
+ "type": "object",
13
+ "properties": {
14
+ "name": {
15
+ "description": "You may use the 'theme_info' object for theme metadata.",
16
+ "markdownDescription": "[Shopify reference](https://shopify.dev/docs/themes/architecture/config/settings-schema-json#add-theme-metadata)",
17
+ "const": "theme_info"
18
+ },
19
+ "theme_name": {
20
+ "type": "string",
21
+ "description": "The name of the theme."
22
+ },
23
+ "theme_author": {
24
+ "type": "string",
25
+ "description": "The author of the theme."
26
+ },
27
+ "theme_version": {
28
+ "type": "string",
29
+ "description": "The version number of the theme."
30
+ },
31
+ "theme_documentation_url": {
32
+ "type": "string",
33
+ "format": "uri",
34
+ "description": "A URL where merchants can find documentation for the theme."
35
+ },
36
+ "theme_support_email": {
37
+ "type": "string",
38
+ "format": "email",
39
+ "description": "An email address that merchants can contact for support for the theme."
40
+ },
41
+ "theme_support_url": {
42
+ "type": "string",
43
+ "format": "uri",
44
+ "description": "A URL where merchants can find support for the theme."
45
+ }
46
+ },
47
+ "required": [
48
+ "name",
49
+ "theme_name",
50
+ "theme_author",
51
+ "theme_version",
52
+ "theme_documentation_url"
53
+ ],
54
+ "oneOf": [
55
+ {
56
+ "required": ["theme_support_email"],
57
+ "not": { "required": ["theme_support_url"] }
58
+ },
59
+ {
60
+ "required": ["theme_support_url"],
61
+ "not": { "required": ["theme_support_email"] }
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ "type": "object",
67
+ "properties": {
68
+ "name": {
69
+ "type": "string",
70
+ "description": "The name of the category of settings.",
71
+ "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)",
72
+ "not": {
73
+ "const": "theme_info"
74
+ }
75
+ },
76
+ "settings": {
77
+ "$ref": "./settings.json"
78
+ }
79
+ }
80
+ }
81
+ ]
82
+ }
83
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "additionalProperties": {
5
+ "anyOf": [
6
+ {
7
+ "type": "string"
8
+ },
9
+ {
10
+ "$ref": "#/definitions/pluralizedString"
11
+ },
12
+ {
13
+ "$ref": "#"
14
+ }
15
+ ]
16
+ },
17
+ "patternProperties": {
18
+ ".*_html$": {
19
+ "oneOf": [
20
+ {
21
+ "type": "string",
22
+ "description": "A string that can contain HTML content, typically used for translations that include HTML tags."
23
+ },
24
+ {
25
+ "$ref": "#/definitions/pluralizedString"
26
+ }
27
+ ]
28
+ }
29
+ },
30
+ "definitions": {
31
+ "pluralizedString": {
32
+ "type": "object",
33
+ "properties": {
34
+ "one": {
35
+ "type": "string",
36
+ "description": "Translation for the singular form"
37
+ },
38
+ "other": {
39
+ "type": "string",
40
+ "description": "Translation for the plural form"
41
+ },
42
+ "few": {
43
+ "type": "string",
44
+ "description": "Translation for 'few' form, used in some languages"
45
+ },
46
+ "many": {
47
+ "type": "string",
48
+ "description": "Translation for 'many' form, used in some languages"
49
+ },
50
+ "two": {
51
+ "type": "string",
52
+ "description": "Translation for 'two' form, used in some languages"
53
+ },
54
+ "zero": {
55
+ "type": "string",
56
+ "description": "Translation for 'zero' form, used in some languages"
57
+ }
58
+ },
59
+ "additionalProperties": false,
60
+ "description": "An object representing a pluralized translation string"
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,186 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "definitions": {
4
+ "moveStep": {
5
+ "type": "object",
6
+ "properties": {
7
+ "action": {
8
+ "const": "move",
9
+ "description": "The action type."
10
+ },
11
+ "file": {
12
+ "description": "The file referenced in this step can be either a string, if the source and target are the same, or an object with 'source' and 'target' properties.",
13
+ "oneOf": [
14
+ {
15
+ "type": "string",
16
+ "description": "The relative path of the file, within the theme folder, to move the key-value pair."
17
+ },
18
+ {
19
+ "type": "object",
20
+ "properties": {
21
+ "source": {
22
+ "type": "string",
23
+ "description": "The relative path of source file."
24
+ },
25
+ "target": {
26
+ "type": "string",
27
+ "description": "The relative path of target file."
28
+ }
29
+ },
30
+ "required": ["source", "target"]
31
+ }
32
+ ]
33
+ },
34
+ "from_key": {
35
+ "type": "string",
36
+ "description": "The key to move from."
37
+ },
38
+ "to_key": {
39
+ "type": "string",
40
+ "description": "The key to move to."
41
+ }
42
+ },
43
+ "required": ["action", "file", "from_key", "to_key"],
44
+ "additionalProperties": false
45
+ },
46
+ "copyStep": {
47
+ "type": "object",
48
+ "properties": {
49
+ "action": {
50
+ "const": "copy",
51
+ "description": "The action type."
52
+ },
53
+ "file": {
54
+ "description": "The file referenced in this step can be either a string, if the source and target are the same, or an object with 'source' and 'target' properties.",
55
+ "oneOf": [
56
+ {
57
+ "type": "string",
58
+ "description": "The relative path of the file to copy the key-value pair."
59
+ },
60
+ {
61
+ "type": "object",
62
+ "properties": {
63
+ "source": {
64
+ "type": "string",
65
+ "description": "The relative path of source file."
66
+ },
67
+ "target": {
68
+ "type": "string",
69
+ "description": "The relative path of target file."
70
+ }
71
+ },
72
+ "required": ["source", "target"]
73
+ }
74
+ ]
75
+ },
76
+ "from_key": {
77
+ "type": "string",
78
+ "description": "The key to copy from."
79
+ },
80
+ "to_key": {
81
+ "type": "string",
82
+ "description": "The key to copy to."
83
+ }
84
+ },
85
+ "required": ["action", "file", "from_key", "to_key"],
86
+ "additionalProperties": false
87
+ },
88
+ "addStep": {
89
+ "type": "object",
90
+ "properties": {
91
+ "action": {
92
+ "const": "add",
93
+ "description": "The action type."
94
+ },
95
+ "file": {
96
+ "type": "string",
97
+ "description": "The relative path of the file to add the key-value pair to."
98
+ },
99
+ "key": {
100
+ "type": "string",
101
+ "description": "The existing key to add the value to."
102
+ },
103
+ "value": {
104
+ "description": "The value to add, either as an object or an array.",
105
+ "oneOf": [
106
+ {
107
+ "type": "object"
108
+ },
109
+ {
110
+ "type": "array"
111
+ }
112
+ ]
113
+ }
114
+ },
115
+ "required": ["action", "file", "key", "value"],
116
+ "additionalProperties": false
117
+ },
118
+ "deleteStep": {
119
+ "type": "object",
120
+ "properties": {
121
+ "action": {
122
+ "const": "delete",
123
+ "description": "The action type."
124
+ },
125
+ "file": {
126
+ "type": "string",
127
+ "description": "The relative path of the file to delete the key-value pair from."
128
+ },
129
+ "key": {
130
+ "type": "string",
131
+ "description": "The key to delete."
132
+ },
133
+ "value": {
134
+ "type": "string",
135
+ "description": "The optional value to delete in the key."
136
+ }
137
+ },
138
+ "required": ["action", "file", "key"],
139
+ "additionalProperties": false
140
+ }
141
+ },
142
+ "type": "object",
143
+ "properties": {
144
+ "$schema": {
145
+ "type": "string",
146
+ "description": "The URL for the JSON schema version used for validation and execution."
147
+ },
148
+ "theme_name": {
149
+ "type": "string",
150
+ "description": "The name of the theme to which the update extension script applies."
151
+ },
152
+ "theme_version": {
153
+ "type": "string",
154
+ "description": "The version of the theme to which the update extension script applies."
155
+ },
156
+ "operations": {
157
+ "type": "array",
158
+ "description": "An array of operations to be performed on the theme during an update.",
159
+ "minItems": 1,
160
+ "items": {
161
+ "type": "object",
162
+ "properties": {
163
+ "id": {
164
+ "type": "string"
165
+ },
166
+ "actions": {
167
+ "type": "array",
168
+ "minItems": 1,
169
+ "items": {
170
+ "anyOf": [
171
+ { "$ref": "#/definitions/moveStep" },
172
+ { "$ref": "#/definitions/copyStep" },
173
+ { "$ref": "#/definitions/addStep" },
174
+ { "$ref": "#/definitions/deleteStep" }
175
+ ]
176
+ }
177
+ }
178
+ },
179
+ "required": ["id", "actions"],
180
+ "additionalProperties": false
181
+ }
182
+ }
183
+ },
184
+ "required": ["$schema", "theme_name", "theme_version", "operations"],
185
+ "additionalProperties": false
186
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "Example Section",
3
+ "blocks": [{ "type": "@theme" }],
4
+ "presets": [
5
+ {
6
+ "name": "Example Preset",
7
+ "blocks": [
8
+ {
9
+ "type": "group",
10
+ "blocks": [
11
+ { "type": "text", "settings": { "text": "Hello" } },
12
+ { "type": "header", "name": "Header", "settings": { "text": "World" } }
13
+ ]
14
+ }
15
+ ]
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,90 @@
1
+ {
2
+ "name": "t:sections.announcement-bar.name",
3
+ "max_blocks": 12,
4
+ "class": "announcement-bar-section",
5
+ "enabled_on": {
6
+ "groups": ["*", "header"]
7
+ },
8
+ "settings": [
9
+ {
10
+ "type": "color_scheme",
11
+ "id": "color_scheme",
12
+ "label": "t:sections.all.colors.label",
13
+ "default": "accent-1"
14
+ },
15
+ {
16
+ "type": "color",
17
+ "id": "color_picker",
18
+ "label": "t:sections.all.colors.label",
19
+ "default": "accent-1",
20
+ "alpha": false
21
+ },
22
+ {
23
+ "type": "checkbox",
24
+ "id": "show_line_separator",
25
+ "default": true,
26
+ "label": "t:sections.header.settings.show_line_separator.label"
27
+ },
28
+ {
29
+ "type": "header",
30
+ "content": "t:sections.announcement-bar.settings.header__1.content",
31
+ "info": "t:sections.announcement-bar.settings.header__1.info"
32
+ },
33
+ {
34
+ "type": "checkbox",
35
+ "id": "show_social",
36
+ "default": false,
37
+ "label": "t:sections.announcement-bar.settings.show_social.label"
38
+ },
39
+ {
40
+ "type": "header",
41
+ "content": "t:sections.announcement-bar.settings.header__2.content"
42
+ },
43
+ {
44
+ "type": "checkbox",
45
+ "id": "auto_rotate",
46
+ "label": "t:sections.announcement-bar.settings.auto_rotate.label",
47
+ "default": false
48
+ },
49
+ {
50
+ "type": "range",
51
+ "id": "change_slides_speed",
52
+ "min": 5,
53
+ "max": 10,
54
+ "step": 1,
55
+ "unit": "s",
56
+ "label": "t:sections.announcement-bar.settings.change_slides_speed.label",
57
+ "default": 5
58
+ }
59
+ ],
60
+ "blocks": [
61
+ {
62
+ "type": "announcement",
63
+ "name": "t:sections.announcement-bar.blocks.announcement.name",
64
+ "settings": [
65
+ {
66
+ "type": "text",
67
+ "id": "text",
68
+ "default": "Welcome to our store",
69
+ "label": "t:sections.announcement-bar.blocks.announcement.settings.text.label"
70
+ },
71
+ {
72
+ "type": "url",
73
+ "id": "link",
74
+ "label": "t:sections.announcement-bar.blocks.announcement.settings.link.label"
75
+ }
76
+ ]
77
+ }
78
+ ],
79
+ "presets": [
80
+ {
81
+ "name": "t:sections.announcement-bar.presets.name",
82
+ "category": "t:sections.announcement-bar.presets.category",
83
+ "blocks": [
84
+ {
85
+ "type": "announcement"
86
+ }
87
+ ]
88
+ }
89
+ ]
90
+ }