@caartzee/theme-sdk 0.0.0-stage → 1.0.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.
- package/README.md +34 -2
- package/dist/bin/caartzee-theme.js +7449 -0
- package/dist/lib/index.js +9838 -0
- package/dist/types/src/auth/credentials-store.d.ts +18 -0
- package/dist/types/src/auth/index.d.ts +2 -0
- package/dist/types/src/auth/oauth-client.d.ts +39 -0
- package/dist/types/src/blocks/block-contract.d.ts +242 -0
- package/dist/types/src/candy/compatibility-matrix.d.ts +10 -0
- package/dist/types/src/candy/context-builder.d.ts +31 -0
- package/dist/types/src/candy/engine.d.ts +69 -0
- package/dist/types/src/candy/filters.d.ts +32 -0
- package/dist/types/src/candy/ide-support.d.ts +20 -0
- package/dist/types/src/candy/index.d.ts +9 -0
- package/dist/types/src/candy/schema-parser.d.ts +13 -0
- package/dist/types/src/candy/security.d.ts +54 -0
- package/dist/types/src/candy/tags.d.ts +11 -0
- package/dist/types/src/candy/types.d.ts +185 -0
- package/dist/types/src/cli/caartzee-cli.d.ts +9 -0
- package/dist/types/src/cli/index.d.ts +1 -0
- package/dist/types/src/cli/sdk-client.d.ts +12 -0
- package/dist/types/src/contracts/category-selection.d.ts +15 -0
- package/dist/types/src/contracts/commerce.d.ts +282 -0
- package/dist/types/src/contracts/footer-builder.d.ts +125 -0
- package/dist/types/src/contracts/hooks.d.ts +37 -0
- package/dist/types/src/contracts/manifest.d.ts +3127 -0
- package/dist/types/src/contracts/navigation.d.ts +39 -0
- package/dist/types/src/contracts/order-tracking.d.ts +40 -0
- package/dist/types/src/contracts/page.d.ts +262 -0
- package/dist/types/src/contracts/storefront-content.d.ts +60 -0
- package/dist/types/src/contracts/style-document.d.ts +2 -0
- package/dist/types/src/contracts/styles.d.ts +2002 -0
- package/dist/types/src/contracts/theme.d.ts +35 -0
- package/dist/types/src/dev-server/catalog-preview.d.ts +25 -0
- package/dist/types/src/dev-server/dev-server.d.ts +22 -0
- package/dist/types/src/dev-server/index.d.ts +1 -0
- package/dist/types/src/dev-server/theme-preview.d.ts +4 -0
- package/dist/types/src/index.d.ts +27 -0
- package/dist/types/src/mock/index.d.ts +10 -0
- package/dist/types/src/mock/mock-categories.d.ts +2 -0
- package/dist/types/src/mock/mock-commerce.d.ts +55 -0
- package/dist/types/src/mock/mock-customer.d.ts +47 -0
- package/dist/types/src/mock/mock-hooks.d.ts +2 -0
- package/dist/types/src/mock/mock-products.d.ts +3 -0
- package/dist/types/src/rendering/commerce-pages.d.ts +16 -0
- package/dist/types/src/rendering/raw-html.d.ts +12 -0
- package/dist/types/src/rendering/section-wrapper.d.ts +30 -0
- package/dist/types/src/scaffold/candy-starter-assets.d.ts +2 -0
- package/dist/types/src/scaffold/commerce-generator.d.ts +3 -0
- package/dist/types/src/scaffold/index.d.ts +2 -0
- package/dist/types/src/scaffold/template-generator.d.ts +21 -0
- package/dist/types/src/sections/section-contract.d.ts +350 -0
- package/dist/types/src/settings/global-settings.d.ts +25 -0
- package/dist/types/src/templates/json-template.d.ts +991 -0
- package/dist/types/src/validation/package-validator.d.ts +53 -0
- package/dist/types/src/validation/rich-text.d.ts +24 -0
- package/package.json +28 -3
- package/templates/commerce/README.md +165 -0
- package/templates/commerce/assets/theme.css +1 -0
- package/templates/commerce/manifest.json +1 -0
- package/templates/commerce/src/blocks/index.ts +184 -0
- package/templates/commerce/src/config/settings-defaults.ts +25 -0
- package/templates/commerce/src/config/settings-schema.ts +102 -0
- package/templates/commerce/src/index.ts +90 -0
- package/templates/commerce/src/layouts/default.ts +275 -0
- package/templates/commerce/src/manifest.ts +976 -0
- package/templates/commerce/src/pages/account/components.ts +369 -0
- package/templates/commerce/src/pages/account/tabs.ts +792 -0
- package/templates/commerce/src/pages/account.ts +55 -0
- package/templates/commerce/src/pages/campaign.ts +423 -0
- package/templates/commerce/src/pages/cart.ts +261 -0
- package/templates/commerce/src/pages/category-detail.ts +124 -0
- package/templates/commerce/src/pages/category-list.ts +87 -0
- package/templates/commerce/src/pages/checkout.ts +712 -0
- package/templates/commerce/src/pages/commerce.ts +45 -0
- package/templates/commerce/src/pages/home.ts +160 -0
- package/templates/commerce/src/pages/index.ts +99 -0
- package/templates/commerce/src/pages/login.ts +204 -0
- package/templates/commerce/src/pages/order-success.ts +80 -0
- package/templates/commerce/src/pages/product-detail.ts +489 -0
- package/templates/commerce/src/pages/product-list.ts +125 -0
- package/templates/commerce/src/pages/search.ts +88 -0
- package/templates/commerce/src/pages/signup.ts +253 -0
- package/templates/commerce/src/pages/status.ts +7 -0
- package/templates/commerce/src/pages/theme-layout.ts +491 -0
- package/templates/commerce/src/pages/track-order.ts +196 -0
- package/templates/commerce/src/pages/wishlist.ts +83 -0
- package/templates/commerce/src/sections/about-story.ts +117 -0
- package/templates/commerce/src/sections/announcement-bar.ts +101 -0
- package/templates/commerce/src/sections/banner-grid.ts +319 -0
- package/templates/commerce/src/sections/campaign-banners.ts +158 -0
- package/templates/commerce/src/sections/category-slider.ts +144 -0
- package/templates/commerce/src/sections/content-builder.ts +123 -0
- package/templates/commerce/src/sections/content-controls.ts +45 -0
- package/templates/commerce/src/sections/custom-form.ts +59 -0
- package/templates/commerce/src/sections/faq-accordion.ts +123 -0
- package/templates/commerce/src/sections/footer.ts +728 -0
- package/templates/commerce/src/sections/header.ts +439 -0
- package/templates/commerce/src/sections/hero-slider.ts +492 -0
- package/templates/commerce/src/sections/hero.ts +137 -0
- package/templates/commerce/src/sections/index.ts +102 -0
- package/templates/commerce/src/sections/mobile-slider.ts +102 -0
- package/templates/commerce/src/sections/newsletter.ts +43 -0
- package/templates/commerce/src/sections/product-grid.ts +191 -0
- package/templates/commerce/src/sections/raw-html.ts +1 -0
- package/templates/commerce/src/sections/rich-text.ts +26 -0
- package/templates/commerce/src/sections/services-features.ts +211 -0
- package/templates/commerce/src/sections/testimonials.ts +194 -0
- package/templates/commerce/src/snippets/product-card.ts +178 -0
- package/templates/commerce/src/snippets/product-price.ts +46 -0
- package/templates/commerce/src/snippets/responsive-image.ts +29 -0
- package/templates/commerce/src/styles.ts +477 -0
- package/templates/commerce/src/templates/404.json +26 -0
- package/templates/commerce/src/templates/account.json +17 -0
- package/templates/commerce/src/templates/cart.json +17 -0
- package/templates/commerce/src/templates/category.json +16 -0
- package/templates/commerce/src/templates/checkout.json +15 -0
- package/templates/commerce/src/templates/collection.json +16 -0
- package/templates/commerce/src/templates/index.json +180 -0
- package/templates/commerce/src/templates/login.json +17 -0
- package/templates/commerce/src/templates/order-success.json +17 -0
- package/templates/commerce/src/templates/page.json +17 -0
- package/templates/commerce/src/templates/product.json +17 -0
- package/templates/commerce/src/templates/search.json +18 -0
- package/templates/commerce/src/templates/signup.json +17 -0
- package/templates/commerce/src/templates/track-order.json +17 -0
- package/templates/commerce/src/templates/wishlist.json +17 -0
- package/templates/commerce/src/templates.ts +510 -0
- package/templates/commerce/src/tokens.ts +22 -0
- package/templates/vscode-candy/README.md +22 -0
- package/templates/vscode-candy/extension.js +338 -0
- package/templates/vscode-candy/icons/candy-dark.svg +23 -0
- package/templates/vscode-candy/icons/candy-light.svg +23 -0
- package/templates/vscode-candy/icons/candy-logo.png +0 -0
- package/templates/vscode-candy/icons/candy-sweet-dark.svg +23 -0
- package/templates/vscode-candy/icons/candy-sweet-light.svg +23 -0
- package/templates/vscode-candy/language-configuration.json +47 -0
- package/templates/vscode-candy/package.json +103 -0
- package/templates/vscode-candy/schemas/candy-config.schema.json +56 -0
- package/templates/vscode-candy/schemas/candy-settings.schema.json +70 -0
- package/templates/vscode-candy/snippets/candy.code-snippets +179 -0
- package/templates/vscode-candy/syntaxes/candy.tmLanguage.json +296 -0
- package/templates/vscode-candy/vim/ftdetect/candy.vim +5 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Caartzee Candy Settings Schema (settings_schema.json)",
|
|
4
|
+
"type": "array",
|
|
5
|
+
"items": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["name", "settings"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Settings group title in Theme Builder."
|
|
12
|
+
},
|
|
13
|
+
"settings": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["type"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"id": { "type": "string" },
|
|
20
|
+
"type": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": [
|
|
23
|
+
"text",
|
|
24
|
+
"textarea",
|
|
25
|
+
"richtext",
|
|
26
|
+
"inline_richtext",
|
|
27
|
+
"html",
|
|
28
|
+
"number",
|
|
29
|
+
"range",
|
|
30
|
+
"select",
|
|
31
|
+
"radio",
|
|
32
|
+
"checkbox",
|
|
33
|
+
"color",
|
|
34
|
+
"color_background",
|
|
35
|
+
"image",
|
|
36
|
+
"image_picker",
|
|
37
|
+
"url",
|
|
38
|
+
"link",
|
|
39
|
+
"font_picker",
|
|
40
|
+
"font",
|
|
41
|
+
"collection",
|
|
42
|
+
"product",
|
|
43
|
+
"header",
|
|
44
|
+
"paragraph"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"label": { "type": "string" },
|
|
48
|
+
"default": {},
|
|
49
|
+
"info": { "type": "string" },
|
|
50
|
+
"min": { "type": "number" },
|
|
51
|
+
"max": { "type": "number" },
|
|
52
|
+
"step": { "type": "number" },
|
|
53
|
+
"unit": { "type": "string" },
|
|
54
|
+
"options": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"required": ["label", "value"],
|
|
59
|
+
"properties": {
|
|
60
|
+
"label": { "type": "string" },
|
|
61
|
+
"value": { "type": ["string", "number", "boolean"] }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Candy Output Expression": {
|
|
3
|
+
"prefix": ["{{", "out"],
|
|
4
|
+
"body": ["{{ ${1:expression} | ${2:escape} }}"],
|
|
5
|
+
"description": "Candy output expression with filter"
|
|
6
|
+
},
|
|
7
|
+
"Candy If Block": {
|
|
8
|
+
"prefix": ["if", "{% if"],
|
|
9
|
+
"body": [
|
|
10
|
+
"{% if ${1:condition} %}",
|
|
11
|
+
" $0",
|
|
12
|
+
"{% endif %}"
|
|
13
|
+
],
|
|
14
|
+
"description": "Candy conditional {% if %} block"
|
|
15
|
+
},
|
|
16
|
+
"Candy If / Else Block": {
|
|
17
|
+
"prefix": ["ifelse", "ife"],
|
|
18
|
+
"body": [
|
|
19
|
+
"{% if ${1:condition} %}",
|
|
20
|
+
" $2",
|
|
21
|
+
"{% else %}",
|
|
22
|
+
" $0",
|
|
23
|
+
"{% endif %}"
|
|
24
|
+
],
|
|
25
|
+
"description": "Candy {% if %} ... {% else %} ... {% endif %} block"
|
|
26
|
+
},
|
|
27
|
+
"Candy Unless Block": {
|
|
28
|
+
"prefix": ["unless"],
|
|
29
|
+
"body": [
|
|
30
|
+
"{% unless ${1:condition} %}",
|
|
31
|
+
" $0",
|
|
32
|
+
"{% endunless %}"
|
|
33
|
+
],
|
|
34
|
+
"description": "Candy {% unless %} block"
|
|
35
|
+
},
|
|
36
|
+
"Candy For Loop": {
|
|
37
|
+
"prefix": ["for", "{% for"],
|
|
38
|
+
"body": [
|
|
39
|
+
"{% for ${1:item} in ${2:collection} %}",
|
|
40
|
+
" $0",
|
|
41
|
+
"{% endfor %}"
|
|
42
|
+
],
|
|
43
|
+
"description": "Candy {% for %} loop"
|
|
44
|
+
},
|
|
45
|
+
"Candy For Loop with Else": {
|
|
46
|
+
"prefix": ["forelse"],
|
|
47
|
+
"body": [
|
|
48
|
+
"{% for ${1:product} in ${2:products} %}",
|
|
49
|
+
" $3",
|
|
50
|
+
"{% else %}",
|
|
51
|
+
" <p>${4:No items found.}</p>",
|
|
52
|
+
"{% endfor %}"
|
|
53
|
+
],
|
|
54
|
+
"description": "Candy {% for %} loop with empty fallback {% else %}"
|
|
55
|
+
},
|
|
56
|
+
"Candy Section Blocks Loop": {
|
|
57
|
+
"prefix": ["forblocks", "blocks"],
|
|
58
|
+
"body": [
|
|
59
|
+
"{% for block in section.blocks %}",
|
|
60
|
+
" <div {{ block.candy_attributes }}>",
|
|
61
|
+
" $0",
|
|
62
|
+
" </div>",
|
|
63
|
+
"{% endfor %}"
|
|
64
|
+
],
|
|
65
|
+
"description": "Iterate over section.blocks with Theme Builder inspector attributes"
|
|
66
|
+
},
|
|
67
|
+
"Candy Assign Variable": {
|
|
68
|
+
"prefix": ["assign"],
|
|
69
|
+
"body": ["{% assign ${1:variable_name} = ${2:value} %}"],
|
|
70
|
+
"description": "Assign a Candy variable"
|
|
71
|
+
},
|
|
72
|
+
"Candy Capture Variable": {
|
|
73
|
+
"prefix": ["capture"],
|
|
74
|
+
"body": [
|
|
75
|
+
"{% capture ${1:variable_name} %}",
|
|
76
|
+
" $0",
|
|
77
|
+
"{% endcapture %}"
|
|
78
|
+
],
|
|
79
|
+
"description": "Capture rendered HTML into a Candy variable"
|
|
80
|
+
},
|
|
81
|
+
"Candy Render Snippet": {
|
|
82
|
+
"prefix": ["render"],
|
|
83
|
+
"body": ["{% render '${1:snippet-name}', ${2:key}: ${3:value} %}"],
|
|
84
|
+
"description": "Render an isolated snippet from snippets/<name>.candy"
|
|
85
|
+
},
|
|
86
|
+
"Candy Section Include": {
|
|
87
|
+
"prefix": ["section"],
|
|
88
|
+
"body": ["{% section '${1:hero-banner}' %}"],
|
|
89
|
+
"description": "Render a section from sections/<name>.candy"
|
|
90
|
+
},
|
|
91
|
+
"Candy Layout Declaration": {
|
|
92
|
+
"prefix": ["layout"],
|
|
93
|
+
"body": ["{% layout '${1:theme}' %}"],
|
|
94
|
+
"description": "Declare the layout template (layout/<name>.candy)"
|
|
95
|
+
},
|
|
96
|
+
"Candy Paginate Block": {
|
|
97
|
+
"prefix": ["paginate"],
|
|
98
|
+
"body": [
|
|
99
|
+
"{% paginate ${1:collection.products} by ${2:12} %}",
|
|
100
|
+
" {% for ${3:product} in ${1:collection.products} %}",
|
|
101
|
+
" $0",
|
|
102
|
+
" {% endfor %}",
|
|
103
|
+
" {{ paginate | default_pagination }}",
|
|
104
|
+
"{% endpaginate %}"
|
|
105
|
+
],
|
|
106
|
+
"description": "Paginate a collection in Candy"
|
|
107
|
+
},
|
|
108
|
+
"Candy Form Block": {
|
|
109
|
+
"prefix": ["form"],
|
|
110
|
+
"body": [
|
|
111
|
+
"{% form '${1|product,cart,search,contact,customer_login|}' %}",
|
|
112
|
+
" $0",
|
|
113
|
+
"{% endform %}"
|
|
114
|
+
],
|
|
115
|
+
"description": "Render a Caartzee storefront form"
|
|
116
|
+
},
|
|
117
|
+
"Candy Style Block": {
|
|
118
|
+
"prefix": ["style"],
|
|
119
|
+
"body": [
|
|
120
|
+
"{% style %}",
|
|
121
|
+
" $0",
|
|
122
|
+
"{% endstyle %}"
|
|
123
|
+
],
|
|
124
|
+
"description": "Scoped Candy <style> block"
|
|
125
|
+
},
|
|
126
|
+
"Candy JavaScript Block": {
|
|
127
|
+
"prefix": ["javascript"],
|
|
128
|
+
"body": [
|
|
129
|
+
"{% javascript %}",
|
|
130
|
+
" $0",
|
|
131
|
+
"{% endjavascript %}"
|
|
132
|
+
],
|
|
133
|
+
"description": "Candy <script> block"
|
|
134
|
+
},
|
|
135
|
+
"Candy Section Schema": {
|
|
136
|
+
"prefix": ["schema", "{% schema"],
|
|
137
|
+
"body": [
|
|
138
|
+
"{% schema %}",
|
|
139
|
+
"{",
|
|
140
|
+
" \"name\": \"${1:Section Name}\",",
|
|
141
|
+
" \"type\": \"${2:section-slug}\",",
|
|
142
|
+
" \"category\": \"${3|Hero,Products,Content,Header,Footer,Marketing|}\",",
|
|
143
|
+
" \"allowedRegions\": [\"${4|body,header,footer|}\"],",
|
|
144
|
+
" \"settings\": [",
|
|
145
|
+
" {",
|
|
146
|
+
" \"id\": \"${5:heading}\",",
|
|
147
|
+
" \"type\": \"${6|text,textarea,richtext,number,range,select,checkbox,color,image,url|}\",",
|
|
148
|
+
" \"label\": \"${7:Heading}\",",
|
|
149
|
+
" \"default\": \"${8:Default value}\"",
|
|
150
|
+
" }",
|
|
151
|
+
" ],",
|
|
152
|
+
" \"blocks\": [],",
|
|
153
|
+
" \"presets\": [",
|
|
154
|
+
" {",
|
|
155
|
+
" \"name\": \"${1:Section Name}\",",
|
|
156
|
+
" \"isDefault\": true,",
|
|
157
|
+
" \"settings\": {",
|
|
158
|
+
" \"${5:heading}\": \"${8:Default value}\"",
|
|
159
|
+
" }",
|
|
160
|
+
" }",
|
|
161
|
+
" ]",
|
|
162
|
+
"}",
|
|
163
|
+
"{% endschema %}"
|
|
164
|
+
],
|
|
165
|
+
"description": "Complete Candy section {% schema %} JSON definition for Theme Builder"
|
|
166
|
+
},
|
|
167
|
+
"Candy Schema Setting Field": {
|
|
168
|
+
"prefix": ["setting"],
|
|
169
|
+
"body": [
|
|
170
|
+
"{",
|
|
171
|
+
" \"id\": \"${1:setting_id}\",",
|
|
172
|
+
" \"type\": \"${2|text,textarea,richtext,number,range,select,checkbox,color,image,url|}\",",
|
|
173
|
+
" \"label\": \"${3:Setting Label}\",",
|
|
174
|
+
" \"default\": \"${4:}\"",
|
|
175
|
+
"}"
|
|
176
|
+
],
|
|
177
|
+
"description": "Candy section schema setting field"
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -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
|
+
}
|