@caartzee/theme-sdk 0.0.0-stage → 1.2.0

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 (179) hide show
  1. package/README.md +222 -2
  2. package/dist/bin/caartzee-theme.js +9223 -0
  3. package/dist/lib/index.js +11614 -0
  4. package/dist/types/src/auth/credentials-store.d.ts +18 -0
  5. package/dist/types/src/auth/index.d.ts +2 -0
  6. package/dist/types/src/auth/oauth-client.d.ts +39 -0
  7. package/dist/types/src/blocks/block-contract.d.ts +242 -0
  8. package/dist/types/src/candy/compatibility-matrix.d.ts +10 -0
  9. package/dist/types/src/candy/context-builder.d.ts +31 -0
  10. package/dist/types/src/candy/engine.d.ts +69 -0
  11. package/dist/types/src/candy/filters.d.ts +32 -0
  12. package/dist/types/src/candy/ide-support.d.ts +20 -0
  13. package/dist/types/src/candy/index.d.ts +9 -0
  14. package/dist/types/src/candy/schema-parser.d.ts +13 -0
  15. package/dist/types/src/candy/security.d.ts +54 -0
  16. package/dist/types/src/candy/tags.d.ts +11 -0
  17. package/dist/types/src/candy/types.d.ts +185 -0
  18. package/dist/types/src/cli/caartzee-cli.d.ts +9 -0
  19. package/dist/types/src/cli/candy-mcp.d.ts +2 -0
  20. package/dist/types/src/cli/candy-tool-server.d.ts +39 -0
  21. package/dist/types/src/cli/index.d.ts +1 -0
  22. package/dist/types/src/cli/mcp/component-tools.d.ts +2 -0
  23. package/dist/types/src/cli/mcp/docs-tools.d.ts +89 -0
  24. package/dist/types/src/cli/mcp/editor-tools.d.ts +22 -0
  25. package/dist/types/src/cli/mcp/resources-and-prompts.d.ts +2 -0
  26. package/dist/types/src/cli/mcp/testing-tools.d.ts +54 -0
  27. package/dist/types/src/cli/sdk-client.d.ts +12 -0
  28. package/dist/types/src/contracts/category-selection.d.ts +15 -0
  29. package/dist/types/src/contracts/commerce.d.ts +282 -0
  30. package/dist/types/src/contracts/footer-builder.d.ts +125 -0
  31. package/dist/types/src/contracts/hooks.d.ts +37 -0
  32. package/dist/types/src/contracts/manifest.d.ts +3127 -0
  33. package/dist/types/src/contracts/navigation.d.ts +39 -0
  34. package/dist/types/src/contracts/order-tracking.d.ts +40 -0
  35. package/dist/types/src/contracts/page.d.ts +262 -0
  36. package/dist/types/src/contracts/storefront-content.d.ts +60 -0
  37. package/dist/types/src/contracts/style-document.d.ts +2 -0
  38. package/dist/types/src/contracts/styles.d.ts +2002 -0
  39. package/dist/types/src/contracts/theme.d.ts +35 -0
  40. package/dist/types/src/dev-server/catalog-preview.d.ts +25 -0
  41. package/dist/types/src/dev-server/dev-server.d.ts +25 -0
  42. package/dist/types/src/dev-server/index.d.ts +1 -0
  43. package/dist/types/src/dev-server/local-commerce-runtime.d.ts +76 -0
  44. package/dist/types/src/dev-server/local-editor-server.d.ts +22 -0
  45. package/dist/types/src/dev-server/theme-preview.d.ts +8 -0
  46. package/dist/types/src/index.d.ts +27 -0
  47. package/dist/types/src/mock/index.d.ts +10 -0
  48. package/dist/types/src/mock/mock-categories.d.ts +2 -0
  49. package/dist/types/src/mock/mock-commerce.d.ts +55 -0
  50. package/dist/types/src/mock/mock-customer.d.ts +47 -0
  51. package/dist/types/src/mock/mock-hooks.d.ts +2 -0
  52. package/dist/types/src/mock/mock-products.d.ts +3 -0
  53. package/dist/types/src/rendering/commerce-pages.d.ts +16 -0
  54. package/dist/types/src/rendering/raw-html.d.ts +12 -0
  55. package/dist/types/src/rendering/section-wrapper.d.ts +30 -0
  56. package/dist/types/src/scaffold/candy-starter-assets.d.ts +2 -0
  57. package/dist/types/src/scaffold/commerce-generator.d.ts +3 -0
  58. package/dist/types/src/scaffold/index.d.ts +2 -0
  59. package/dist/types/src/scaffold/template-generator.d.ts +21 -0
  60. package/dist/types/src/sections/section-contract.d.ts +350 -0
  61. package/dist/types/src/settings/global-settings.d.ts +25 -0
  62. package/dist/types/src/templates/json-template.d.ts +991 -0
  63. package/dist/types/src/validation/package-validator.d.ts +53 -0
  64. package/dist/types/src/validation/rich-text.d.ts +24 -0
  65. package/package.json +29 -3
  66. package/templates/commerce/README.md +165 -0
  67. package/templates/commerce/assets/theme.css +1 -0
  68. package/templates/commerce/manifest.json +1 -0
  69. package/templates/commerce/src/blocks/index.ts +184 -0
  70. package/templates/commerce/src/config/settings-defaults.ts +25 -0
  71. package/templates/commerce/src/config/settings-schema.ts +102 -0
  72. package/templates/commerce/src/index.ts +90 -0
  73. package/templates/commerce/src/layouts/default.ts +275 -0
  74. package/templates/commerce/src/manifest.ts +976 -0
  75. package/templates/commerce/src/pages/account/components.ts +369 -0
  76. package/templates/commerce/src/pages/account/tabs.ts +792 -0
  77. package/templates/commerce/src/pages/account.ts +55 -0
  78. package/templates/commerce/src/pages/campaign.ts +423 -0
  79. package/templates/commerce/src/pages/cart.ts +261 -0
  80. package/templates/commerce/src/pages/category-detail.ts +124 -0
  81. package/templates/commerce/src/pages/category-list.ts +87 -0
  82. package/templates/commerce/src/pages/checkout.ts +712 -0
  83. package/templates/commerce/src/pages/commerce.ts +45 -0
  84. package/templates/commerce/src/pages/home.ts +160 -0
  85. package/templates/commerce/src/pages/index.ts +99 -0
  86. package/templates/commerce/src/pages/login.ts +204 -0
  87. package/templates/commerce/src/pages/order-success.ts +80 -0
  88. package/templates/commerce/src/pages/product-detail.ts +489 -0
  89. package/templates/commerce/src/pages/product-list.ts +125 -0
  90. package/templates/commerce/src/pages/search.ts +88 -0
  91. package/templates/commerce/src/pages/signup.ts +253 -0
  92. package/templates/commerce/src/pages/status.ts +7 -0
  93. package/templates/commerce/src/pages/theme-layout.ts +491 -0
  94. package/templates/commerce/src/pages/track-order.ts +196 -0
  95. package/templates/commerce/src/pages/wishlist.ts +83 -0
  96. package/templates/commerce/src/sections/about-story.ts +117 -0
  97. package/templates/commerce/src/sections/announcement-bar.ts +101 -0
  98. package/templates/commerce/src/sections/banner-grid.ts +319 -0
  99. package/templates/commerce/src/sections/campaign-banners.ts +158 -0
  100. package/templates/commerce/src/sections/category-slider.ts +144 -0
  101. package/templates/commerce/src/sections/content-builder.ts +123 -0
  102. package/templates/commerce/src/sections/content-controls.ts +45 -0
  103. package/templates/commerce/src/sections/custom-form.ts +59 -0
  104. package/templates/commerce/src/sections/faq-accordion.ts +123 -0
  105. package/templates/commerce/src/sections/footer.ts +728 -0
  106. package/templates/commerce/src/sections/header.ts +439 -0
  107. package/templates/commerce/src/sections/hero-slider.ts +492 -0
  108. package/templates/commerce/src/sections/hero.ts +137 -0
  109. package/templates/commerce/src/sections/index.ts +102 -0
  110. package/templates/commerce/src/sections/mobile-slider.ts +102 -0
  111. package/templates/commerce/src/sections/newsletter.ts +43 -0
  112. package/templates/commerce/src/sections/product-grid.ts +191 -0
  113. package/templates/commerce/src/sections/raw-html.ts +1 -0
  114. package/templates/commerce/src/sections/rich-text.ts +26 -0
  115. package/templates/commerce/src/sections/services-features.ts +211 -0
  116. package/templates/commerce/src/sections/testimonials.ts +194 -0
  117. package/templates/commerce/src/snippets/product-card.ts +178 -0
  118. package/templates/commerce/src/snippets/product-price.ts +46 -0
  119. package/templates/commerce/src/snippets/responsive-image.ts +29 -0
  120. package/templates/commerce/src/styles.ts +477 -0
  121. package/templates/commerce/src/templates/404.json +26 -0
  122. package/templates/commerce/src/templates/account.json +17 -0
  123. package/templates/commerce/src/templates/cart.json +17 -0
  124. package/templates/commerce/src/templates/category.json +16 -0
  125. package/templates/commerce/src/templates/checkout.json +15 -0
  126. package/templates/commerce/src/templates/collection.json +16 -0
  127. package/templates/commerce/src/templates/index.json +180 -0
  128. package/templates/commerce/src/templates/login.json +17 -0
  129. package/templates/commerce/src/templates/order-success.json +17 -0
  130. package/templates/commerce/src/templates/page.json +17 -0
  131. package/templates/commerce/src/templates/product.json +17 -0
  132. package/templates/commerce/src/templates/search.json +18 -0
  133. package/templates/commerce/src/templates/signup.json +17 -0
  134. package/templates/commerce/src/templates/track-order.json +17 -0
  135. package/templates/commerce/src/templates/wishlist.json +17 -0
  136. package/templates/commerce/src/templates.ts +510 -0
  137. package/templates/commerce/src/tokens.ts +22 -0
  138. package/templates/theme-candy-boilerplate/.editorconfig +14 -0
  139. package/templates/theme-candy-boilerplate/.gitattributes +1 -0
  140. package/templates/theme-candy-boilerplate/.vscode/extensions.json +7 -0
  141. package/templates/theme-candy-boilerplate/.vscode/settings.json +17 -0
  142. package/templates/theme-candy-boilerplate/assets/theme.css +78 -0
  143. package/templates/theme-candy-boilerplate/assets/theme.js +7 -0
  144. package/templates/theme-candy-boilerplate/candy.config.json +40 -0
  145. package/templates/theme-candy-boilerplate/index.ts +39 -0
  146. package/templates/theme-candy-boilerplate/layout/theme.candy +25 -0
  147. package/templates/theme-candy-boilerplate/locales/en.default.json +37 -0
  148. package/templates/theme-candy-boilerplate/manifest.json +123 -0
  149. package/templates/theme-candy-boilerplate/package.json +16 -0
  150. package/templates/theme-candy-boilerplate/schemas/settings_schema.json +36 -0
  151. package/templates/theme-candy-boilerplate/sections/featured-products.candy +89 -0
  152. package/templates/theme-candy-boilerplate/sections/footer.candy +50 -0
  153. package/templates/theme-candy-boilerplate/sections/header.candy +116 -0
  154. package/templates/theme-candy-boilerplate/sections/hero-banner.candy +135 -0
  155. package/templates/theme-candy-boilerplate/sections/image-with-text.candy +85 -0
  156. package/templates/theme-candy-boilerplate/snippets/price.candy +19 -0
  157. package/templates/theme-candy-boilerplate/snippets/product-card.candy +43 -0
  158. package/templates/theme-candy-boilerplate/templates/404.candy +12 -0
  159. package/templates/theme-candy-boilerplate/templates/cart.candy +51 -0
  160. package/templates/theme-candy-boilerplate/templates/collection.candy +51 -0
  161. package/templates/theme-candy-boilerplate/templates/index.candy +7 -0
  162. package/templates/theme-candy-boilerplate/templates/page.candy +10 -0
  163. package/templates/theme-candy-boilerplate/templates/product.candy +59 -0
  164. package/templates/theme-candy-boilerplate/templates/search.candy +40 -0
  165. package/templates/vscode-candy/LICENSE +21 -0
  166. package/templates/vscode-candy/README.md +22 -0
  167. package/templates/vscode-candy/extension.js +689 -0
  168. package/templates/vscode-candy/icons/candy-dark.svg +23 -0
  169. package/templates/vscode-candy/icons/candy-light.svg +23 -0
  170. package/templates/vscode-candy/icons/candy-logo.png +0 -0
  171. package/templates/vscode-candy/icons/candy-sweet-dark.svg +23 -0
  172. package/templates/vscode-candy/icons/candy-sweet-light.svg +23 -0
  173. package/templates/vscode-candy/language-configuration.json +47 -0
  174. package/templates/vscode-candy/package.json +118 -0
  175. package/templates/vscode-candy/schemas/candy-config.schema.json +56 -0
  176. package/templates/vscode-candy/schemas/candy-settings.schema.json +70 -0
  177. package/templates/vscode-candy/snippets/candy.code-snippets +270 -0
  178. package/templates/vscode-candy/syntaxes/candy.tmLanguage.json +296 -0
  179. package/templates/vscode-candy/vim/ftdetect/candy.vim +5 -0
@@ -0,0 +1,296 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3
+ "name": "Candy",
4
+ "scopeName": "text.html.candy",
5
+ "fileTypes": ["candy"],
6
+ "injections": {
7
+ "L:meta.tag.any.html, L:meta.tag.other.html, L:meta.tag.block.any.html, L:meta.tag.inline.any.html, L:meta.tag.structure.any.html, L:string.quoted.double.html, L:string.quoted.single.html": {
8
+ "patterns": [
9
+ { "include": "#candy-comment-block" },
10
+ { "include": "#candy-inline-comment" },
11
+ { "include": "#candy-output" },
12
+ { "include": "#candy-tag" }
13
+ ]
14
+ }
15
+ },
16
+ "patterns": [
17
+ { "include": "#candy-schema-block" },
18
+ { "include": "#candy-style-block" },
19
+ { "include": "#candy-stylesheet-block" },
20
+ { "include": "#candy-javascript-block" },
21
+ { "include": "#candy-comment-block" },
22
+ { "include": "#candy-doc-block" },
23
+ { "include": "#candy-raw-block" },
24
+ { "include": "#candy-inline-comment" },
25
+ { "include": "#candy-output" },
26
+ { "include": "#candy-tag" },
27
+ { "include": "text.html.basic" }
28
+ ],
29
+ "repository": {
30
+ "candy-schema-block": {
31
+ "name": "meta.block.schema.candy",
32
+ "begin": "(\\{%-?)\\s*(schema)\\s*(-?%\\})",
33
+ "beginCaptures": {
34
+ "1": { "name": "punctuation.definition.tag.begin.candy" },
35
+ "2": { "name": "keyword.control.directive.schema.candy entity.name.tag.candy" },
36
+ "3": { "name": "punctuation.definition.tag.end.candy" }
37
+ },
38
+ "end": "(\\{%-?)\\s*(endschema)\\s*(-?%\\})",
39
+ "endCaptures": {
40
+ "1": { "name": "punctuation.definition.tag.begin.candy" },
41
+ "2": { "name": "keyword.control.directive.schema.candy entity.name.tag.candy" },
42
+ "3": { "name": "punctuation.definition.tag.end.candy" }
43
+ },
44
+ "contentName": "meta.embedded.block.json.candy",
45
+ "patterns": [
46
+ { "include": "source.json" }
47
+ ]
48
+ },
49
+ "candy-style-block": {
50
+ "name": "meta.block.style.candy",
51
+ "begin": "(\\{%-?)\\s*(style)\\s*(-?%\\})",
52
+ "beginCaptures": {
53
+ "1": { "name": "punctuation.definition.tag.begin.candy" },
54
+ "2": { "name": "keyword.control.directive.style.candy entity.name.tag.candy" },
55
+ "3": { "name": "punctuation.definition.tag.end.candy" }
56
+ },
57
+ "end": "(\\{%-?)\\s*(endstyle)\\s*(-?%\\})",
58
+ "endCaptures": {
59
+ "1": { "name": "punctuation.definition.tag.begin.candy" },
60
+ "2": { "name": "keyword.control.directive.style.candy entity.name.tag.candy" },
61
+ "3": { "name": "punctuation.definition.tag.end.candy" }
62
+ },
63
+ "contentName": "meta.embedded.block.css.candy",
64
+ "patterns": [
65
+ { "include": "#candy-output" },
66
+ { "include": "#candy-tag" },
67
+ { "include": "source.css" }
68
+ ]
69
+ },
70
+ "candy-stylesheet-block": {
71
+ "name": "meta.block.stylesheet.candy",
72
+ "begin": "(\\{%-?)\\s*(stylesheet)\\s*(-?%\\})",
73
+ "beginCaptures": {
74
+ "1": { "name": "punctuation.definition.tag.begin.candy" },
75
+ "2": { "name": "keyword.control.directive.stylesheet.candy entity.name.tag.candy" },
76
+ "3": { "name": "punctuation.definition.tag.end.candy" }
77
+ },
78
+ "end": "(\\{%-?)\\s*(endstylesheet)\\s*(-?%\\})",
79
+ "endCaptures": {
80
+ "1": { "name": "punctuation.definition.tag.begin.candy" },
81
+ "2": { "name": "keyword.control.directive.stylesheet.candy entity.name.tag.candy" },
82
+ "3": { "name": "punctuation.definition.tag.end.candy" }
83
+ },
84
+ "contentName": "meta.embedded.block.css.candy",
85
+ "patterns": [
86
+ { "include": "#candy-output" },
87
+ { "include": "#candy-tag" },
88
+ { "include": "source.css" }
89
+ ]
90
+ },
91
+ "candy-javascript-block": {
92
+ "name": "meta.block.javascript.candy",
93
+ "begin": "(\\{%-?)\\s*(javascript)\\s*(-?%\\})",
94
+ "beginCaptures": {
95
+ "1": { "name": "punctuation.definition.tag.begin.candy" },
96
+ "2": { "name": "keyword.control.directive.javascript.candy entity.name.tag.candy" },
97
+ "3": { "name": "punctuation.definition.tag.end.candy" }
98
+ },
99
+ "end": "(\\{%-?)\\s*(endjavascript)\\s*(-?%\\})",
100
+ "endCaptures": {
101
+ "1": { "name": "punctuation.definition.tag.begin.candy" },
102
+ "2": { "name": "keyword.control.directive.javascript.candy entity.name.tag.candy" },
103
+ "3": { "name": "punctuation.definition.tag.end.candy" }
104
+ },
105
+ "contentName": "meta.embedded.block.javascript.candy",
106
+ "patterns": [
107
+ { "include": "#candy-output" },
108
+ { "include": "#candy-tag" },
109
+ { "include": "source.js" }
110
+ ]
111
+ },
112
+ "candy-comment-block": {
113
+ "name": "comment.block.candy",
114
+ "begin": "(\\{%-?)\\s*(comment)\\s*(-?%\\})",
115
+ "beginCaptures": {
116
+ "1": { "name": "punctuation.definition.comment.begin.candy" },
117
+ "2": { "name": "keyword.control.comment.candy" },
118
+ "3": { "name": "punctuation.definition.comment.begin.candy" }
119
+ },
120
+ "end": "(\\{%-?)\\s*(endcomment)\\s*(-?%\\})",
121
+ "endCaptures": {
122
+ "1": { "name": "punctuation.definition.comment.end.candy" },
123
+ "2": { "name": "keyword.control.comment.candy" },
124
+ "3": { "name": "punctuation.definition.comment.end.candy" }
125
+ }
126
+ },
127
+ "candy-doc-block": {
128
+ "name": "comment.block.documentation.candy",
129
+ "begin": "(\\{%-?)\\s*(doc)\\s*(-?%\\})",
130
+ "beginCaptures": {
131
+ "1": { "name": "punctuation.definition.comment.begin.candy" },
132
+ "2": { "name": "keyword.control.doc.candy" },
133
+ "3": { "name": "punctuation.definition.comment.begin.candy" }
134
+ },
135
+ "end": "(\\{%-?)\\s*(enddoc)\\s*(-?%\\})",
136
+ "endCaptures": {
137
+ "1": { "name": "punctuation.definition.comment.end.candy" },
138
+ "2": { "name": "keyword.control.doc.candy" },
139
+ "3": { "name": "punctuation.definition.comment.end.candy" }
140
+ }
141
+ },
142
+ "candy-raw-block": {
143
+ "name": "markup.raw.block.candy",
144
+ "begin": "(\\{%-?)\\s*(raw)\\s*(-?%\\})",
145
+ "beginCaptures": {
146
+ "1": { "name": "punctuation.definition.tag.begin.candy" },
147
+ "2": { "name": "keyword.control.raw.candy" },
148
+ "3": { "name": "punctuation.definition.tag.end.candy" }
149
+ },
150
+ "end": "(\\{%-?)\\s*(endraw)\\s*(-?%\\})",
151
+ "endCaptures": {
152
+ "1": { "name": "punctuation.definition.tag.begin.candy" },
153
+ "2": { "name": "keyword.control.raw.candy" },
154
+ "3": { "name": "punctuation.definition.tag.end.candy" }
155
+ },
156
+ "contentName": "string.unquoted.raw.candy"
157
+ },
158
+ "candy-inline-comment": {
159
+ "name": "comment.line.number-sign.candy",
160
+ "begin": "\\{%-?\\s*#",
161
+ "beginCaptures": {
162
+ "0": { "name": "punctuation.definition.comment.candy" }
163
+ },
164
+ "end": "-?%\\}",
165
+ "endCaptures": {
166
+ "0": { "name": "punctuation.definition.comment.candy" }
167
+ }
168
+ },
169
+ "candy-output": {
170
+ "name": "meta.output.candy",
171
+ "begin": "\\{\\{-?",
172
+ "beginCaptures": {
173
+ "0": { "name": "punctuation.definition.tag.output.begin.candy keyword.operator.output.candy" }
174
+ },
175
+ "end": "-?\\}\\}",
176
+ "endCaptures": {
177
+ "0": { "name": "punctuation.definition.tag.output.end.candy keyword.operator.output.candy" }
178
+ },
179
+ "patterns": [
180
+ { "include": "#candy-filter" },
181
+ { "include": "#candy-expression" }
182
+ ]
183
+ },
184
+ "candy-tag": {
185
+ "name": "meta.tag.directive.candy",
186
+ "begin": "(\\{%-?)\\s*([a-zA-Z_][a-zA-Z0-9_]*)?",
187
+ "beginCaptures": {
188
+ "1": { "name": "punctuation.definition.tag.begin.candy keyword.operator.tag.candy" },
189
+ "2": {
190
+ "patterns": [
191
+ {
192
+ "name": "keyword.control.conditional.candy",
193
+ "match": "^(if|elsif|else|endif|unless|endunless|case|when|endcase)$"
194
+ },
195
+ {
196
+ "name": "keyword.control.loop.candy",
197
+ "match": "^(for|endfor|break|continue|cycle|tablerow|endtablerow|paginate|endpaginate)$"
198
+ },
199
+ {
200
+ "name": "keyword.control.directive.candy",
201
+ "match": "^(layout|section|sections|render|include|content_for|form|endform|block|endblock)$"
202
+ },
203
+ {
204
+ "name": "keyword.other.assign.candy storage.type.candy",
205
+ "match": "^(assign|capture|endcapture|increment|decrement|echo|liquid)$"
206
+ },
207
+ {
208
+ "name": "entity.name.tag.candy",
209
+ "match": "^[a-zA-Z_][a-zA-Z0-9_]*$"
210
+ }
211
+ ]
212
+ }
213
+ },
214
+ "end": "-?%\\}",
215
+ "endCaptures": {
216
+ "0": { "name": "punctuation.definition.tag.end.candy keyword.operator.tag.candy" }
217
+ },
218
+ "patterns": [
219
+ { "include": "#candy-filter" },
220
+ { "include": "#candy-tag-keywords" },
221
+ { "include": "#candy-expression" }
222
+ ]
223
+ },
224
+ "candy-tag-keywords": {
225
+ "patterns": [
226
+ {
227
+ "name": "keyword.control.operator.candy",
228
+ "match": "\\b(in|by|with|as|for|limit|offset|reversed|cols|and|or|not|contains)\\b"
229
+ }
230
+ ]
231
+ },
232
+ "candy-filter": {
233
+ "patterns": [
234
+ {
235
+ "match": "(\\|)\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*(:)?",
236
+ "captures": {
237
+ "1": { "name": "keyword.operator.pipe.candy" },
238
+ "2": { "name": "support.function.filter.candy entity.name.function.candy" },
239
+ "3": { "name": "punctuation.separator.filter-arguments.candy" }
240
+ }
241
+ }
242
+ ]
243
+ },
244
+ "candy-expression": {
245
+ "patterns": [
246
+ {
247
+ "name": "string.quoted.single.candy",
248
+ "begin": "'",
249
+ "end": "'",
250
+ "patterns": [
251
+ { "name": "constant.character.escape.candy", "match": "\\\\." }
252
+ ]
253
+ },
254
+ {
255
+ "name": "string.quoted.double.candy",
256
+ "begin": "\"",
257
+ "end": "\"",
258
+ "patterns": [
259
+ { "name": "constant.character.escape.candy", "match": "\\\\." }
260
+ ]
261
+ },
262
+ {
263
+ "name": "constant.numeric.candy",
264
+ "match": "\\b-?\\d+(\\.\\d+)?\\b"
265
+ },
266
+ {
267
+ "name": "constant.language.boolean.candy",
268
+ "match": "\\b(true|false|nil|null|empty|blank)\\b"
269
+ },
270
+ {
271
+ "name": "keyword.operator.comparison.candy",
272
+ "match": "(==|!=|<=|>=|<|>|=|\\.\\.|\\:|,)"
273
+ },
274
+ {
275
+ "name": "keyword.operator.logical.candy",
276
+ "match": "\\b(and|or|contains)\\b"
277
+ },
278
+ {
279
+ "name": "variable.language.global.candy support.variable.candy",
280
+ "match": "\\b(product|products|collection|collections|cart|shop|store|section|block|settings|theme|request|routes|page|page_title|page_description|canonical_url|content_for_layout|content_for_header|forloop|tablerowloop|paginate|form|customer|linklists| navigation|recommendations|search)\\b"
281
+ },
282
+ {
283
+ "match": "(\\.)([a-zA-Z_][a-zA-Z0-9_-]*)",
284
+ "captures": {
285
+ "1": { "name": "punctuation.accessor.candy" },
286
+ "2": { "name": "variable.other.property.candy" }
287
+ }
288
+ },
289
+ {
290
+ "name": "variable.other.readwrite.candy",
291
+ "match": "\\b[a-zA-Z_][a-zA-Z0-9_-]*\\b"
292
+ }
293
+ ]
294
+ }
295
+ }
296
+ }
@@ -0,0 +1,5 @@
1
+ " Vim / Neovim filetype detection for Caartzee Candy (.candy) templates
2
+ augroup candy_ftdetect
3
+ autocmd!
4
+ autocmd BufRead,BufNewFile *.candy set filetype=liquid syntax=liquid
5
+ augroup END