Skip to content

Commit 0115664

Browse files
committed
Update to work with Keystone 1.1.0
1 parent ac1114e commit 0115664

14 files changed

Lines changed: 531 additions & 443 deletions

File tree

.shopifyignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ tsconfig.json
33
tailwind.config.js
44
postcss.config.js
55
vite.config.ts
6-
README.md
6+
README.md
7+
manifest.json

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"name": "keystone",
3+
"type": "commonjs",
4+
"version": "1.1.0",
35
"scripts": {
46
"dev": "npm-run-all --parallel vite_dev shopify_dev",
57
"pull": "shopify theme pull --nodelete --store brickspacetestingstore.myshopify.com",

src/css/base/forms.css

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@
33
/* ======= */
44

55
@layer base {
6+
/* minimum height */
7+
input[type="text"],
8+
input[type="password"],
9+
input[type="email"],
10+
input[type="number"],
11+
input[type="url"],
12+
input[type="date"],
13+
input[type="datetime-local"],
14+
input[type="month"],
15+
input[type="week"],
16+
input[type="time"],
17+
input[type="search"],
18+
input[type="tel"],
19+
select,
20+
select[multiple],
21+
textarea {
22+
@apply min-h-[44px];
23+
}
24+
625
/* basic inputs */
726
input[type="text"],
827
input[type="password"],
@@ -16,16 +35,23 @@
1635
input[type="time"],
1736
input[type="search"],
1837
input[type="tel"],
38+
input,
1939
select,
2040
select[multiple],
2141
textarea {
22-
@apply animation-300 w-full appearance-none py-1.5 px-4 min-h-[44px] border__input border__input--radius color__border-input color__bg-input border--input-padding;
42+
@apply animation-300 border__input border__input--radius color__border-input color__bg-input border--input-padding w-full appearance-none px-4 py-1.5;
43+
&::placeholder {
44+
@apply !color__input;
45+
}
2346
&:hover {
2447
@apply border__input--hover;
2548
}
2649
&:focus-visible {
2750
@apply border__input--focus color__bg-body;
2851
}
52+
&:focus-visible::placeholder {
53+
@apply !color__text;
54+
}
2955
}
3056
textarea {
3157
@apply min-h-[88px];
@@ -52,7 +78,7 @@
5278
input[type="tel"],
5379
select,
5480
select[multiple] {
55-
@apply border__input--radius
81+
@apply border__input--radius;
5682
}
5783
textarea {
5884
@apply border__textarea--radius;
@@ -72,7 +98,7 @@
7298

7399
/* checkboxes and radios */
74100
input[type="checkbox"] {
75-
@apply cursor-pointer color__text color__border-divider-1 color__border-selected-1;
101+
@apply color__text color__border-divider-1 color__border-selected-1 cursor-pointer;
76102
&:checked {
77103
@apply !color__bg-text color__text;
78104
}
@@ -84,7 +110,7 @@
84110
}
85111
}
86112
input[type="radio"] {
87-
@apply rounded-full cursor-pointer color__text color__border-divider-1 color__border-selected-1;
113+
@apply color__text color__border-divider-1 color__border-selected-1 cursor-pointer rounded-full;
88114
&:checked {
89115
@apply !color__bg-text color__text;
90116
}
@@ -96,16 +122,20 @@
96122
}
97123
}
98124

99-
[type='checkbox']:focus, [type='radio']:focus {
125+
[type="checkbox"]:focus,
126+
[type="radio"]:focus {
100127
outline: 2px solid transparent;
101128
outline-offset: 2px;
102129
--tw-ring-inset: var(--tw-empty, /*!*/ /*!*/);
103130
--tw-ring-offset-width: 2px;
104131
--tw-ring-offset-color: var(--color__background-body);
105132
--tw-ring-color: var(--color__border-selected-1);
106-
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
107-
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
108-
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
133+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0
134+
var(--tw-ring-offset-width) var(--tw-ring-offset-color);
135+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0
136+
calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
137+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
138+
var(--tw-shadow);
109139
}
110140

111141
/* buttons */

src/css/utilities/borders.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
/* ======= */
44

55
@layer utilities {
6-
76
/* ======= */
87
/* default borders */
98
/* - default border width */
@@ -91,7 +90,9 @@
9190
@apply !no-underline;
9291
outline: 2px solid transparent;
9392
outline-offset: 2px;
94-
box-shadow: var(--color__background-body) 0px 0px 0px 2px, var(--color__border-selected-1) 0px 0px 0px 4px;
93+
box-shadow:
94+
var(--color__background-body) 0px 0px 0px 2px,
95+
var(--color__border-selected-1) 0px 0px 0px 4px;
9596
}
9697
.border--focus--inset {
9798
box-shadow: inset var(--color__border-selected-1) 0px 0px 0px 2px;
@@ -135,7 +136,6 @@
135136

136137
/* shadow */
137138
.shadow--blur {
138-
box-shadow: 0px 0px 100px 10px rgb(0 0 0 / 0.30);
139+
box-shadow: 0px 0px 100px 10px rgb(0 0 0 / 0.3);
139140
}
140-
141141
}

src/css/utilities/colors.css

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,9 @@
132132
* {
133133
color: var(--color__text-light);
134134
}
135-
}
136-
.color__text::placeholder {
137-
color: var(--color__text-light);
138-
opacity: 0.75 !important;
135+
*::placeholder, ::placeholder {
136+
color: var(--color__text-light);
137+
}
139138
}
140139

141140
/* force text color, dark color that contrasts on light background */
@@ -144,10 +143,9 @@
144143
* {
145144
color: var(--color__text-light);
146145
}
147-
}
148-
.color__dark::placeholder {
149-
color: var(--color__text-light) !important;
150-
opacity: 0.75 !important;
146+
*::placeholder, ::placeholder {
147+
color: var(--color__text-light);
148+
}
151149
}
152150

153151
/* force text color, light color that contrasts on dark background */
@@ -156,10 +154,9 @@
156154
* {
157155
color: var(--color__text-dark);
158156
}
159-
}
160-
.color__light::placeholder {
161-
color: var(--color__text-dark) !important;
162-
opacity: 0.75 !important;
157+
*::placeholder, ::placeholder {
158+
color: var(--color__text-dark);
159+
}
163160
}
164161

165162
/* - link */
@@ -168,6 +165,9 @@
168165
* {
169166
color: var(--color__text-link);
170167
}
168+
*::placeholder, ::placeholder {
169+
color: var(--color__text-link);
170+
}
171171
}
172172

173173
/* - primary */
@@ -176,6 +176,9 @@
176176
* {
177177
color: var(--color__foreground-primary);
178178
}
179+
*::placeholder, ::placeholder {
180+
color: var(--color__foreground-primary);
181+
}
179182
}
180183

181184
/* - secondary */
@@ -184,6 +187,9 @@
184187
* {
185188
color: var(--color__foreground-secondary);
186189
}
190+
*::placeholder, ::placeholder {
191+
color: var(--color__foreground-secondary);
192+
}
187193
}
188194

189195
/* - tertiary */
@@ -192,6 +198,9 @@
192198
* {
193199
color: var(--color__foreground-tertiary);
194200
}
201+
*::placeholder, ::placeholder {
202+
color: var(--color__foreground-tertiary);
203+
}
195204
}
196205

197206
/* - neutral */
@@ -200,6 +209,9 @@
200209
* {
201210
color: var(--color__foregound-neutral);
202211
}
212+
*::placeholder, ::placeholder {
213+
color: var(--color__foreground-neutral);
214+
}
203215
}
204216

205217
/* - transparent */
@@ -208,6 +220,9 @@
208220
* {
209221
color: transparent;
210222
}
223+
*::placeholder, ::placeholder {
224+
color: transparent;
225+
}
211226
}
212227

213228
/* - inherit */
@@ -216,6 +231,17 @@
216231
* {
217232
color: inherit;
218233
}
234+
*::placeholder, ::placeholder {
235+
color: inherit;
236+
}
237+
}
238+
239+
/* inputs */
240+
.color__input {
241+
color: var(--inputs__text);
242+
* {
243+
color: var(--inputs__text);
244+
}
219245
}
220246

221247
/* ======= */

src/entrypoints/styles.css

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ html {
5050
}
5151

5252
/* - fix for firefox range slider */
53-
input[type=range]::-moz-range-thumb {
54-
pointer-events: all;
53+
input[type="range"]::-moz-range-thumb {
54+
pointer-events: all;
5555
cursor: pointer;
56-
-moz-appearance: none;
57-
width: 32px;
58-
height: 24px;
59-
/* @apply w-6 h-6 appearance-none pointer-events-auto; */
56+
-moz-appearance: none;
57+
width: 32px;
58+
height: 24px;
59+
/* @apply w-6 h-6 appearance-none pointer-events-auto; */
6060
}
6161

6262
/* - strikethrough */
6363
.strikethrough {
64-
@apply line-through decoration-2 decoration-[#00000050];
64+
@apply line-through decoration-[#00000050] decoration-2;
6565
}
6666

6767
/* - reset line-height */
@@ -104,9 +104,8 @@ input[type=range]::-moz-range-thumb {
104104

105105
/* video */
106106
video::-webkit-media-controls-enclosure {
107-
width:100%;
107+
width: 100%;
108108
overflow: hidden;
109-
110109
}
111110
video::-webkit-media-controls-panel {
112111
padding: var(--sizes__gap-width);
@@ -122,7 +121,7 @@ video::-webkit-media-controls-panel {
122121
@apply hidden;
123122
}
124123
.customscrollbar::-webkit-scrollbar {
125-
@apply w-1 h-1 px-4 m-auto opacity-50;
124+
@apply m-auto h-1 w-1 px-4 opacity-50;
126125
}
127126
.customscrollbar::-webkit-scrollbar-track {
128127
@apply color__bg-overlay-2 border__button--radius;
@@ -136,7 +135,7 @@ video::-webkit-media-controls-panel {
136135

137136
/* - flag icons */
138137
.fi {
139-
@apply relative inline-block pr-2 bg-center bg-no-repeat bg-contain rounded-full border--width color__border-divider-2;
138+
@apply border--width color__border-divider-2 relative inline-block rounded-full bg-contain bg-center bg-no-repeat pr-2;
140139
width: 1.33333333em;
141140
line-height: 1em;
142141
}
@@ -203,4 +202,4 @@ video::-webkit-media-controls-panel {
203202
}
204203
.shopify-payment-button__more-options {
205204
@apply !color__bg-overlay-1 px-6 py-2;
206-
}
205+
}

src/prompts/DeleteThemes.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
As a Shopify CLI expert, please analyze the provided theme list and generate commands to safely delete development themes. Your task is to:
2+
3+
1. Identify development themes from the provided list
4+
2. Generate properly formatted CLI commands to delete these themes
5+
3. Exclude any production, live, or published themes from deletion
6+
7+
Please provide:
8+
9+
1. A list of themes that will be deleted
10+
2. The corresponding deletion commands in the format: `shopify theme delete --theme --force [THEMEID]`
11+
3. Any warnings or considerations before executing the commands
12+
13+
When providing commands, ensure they follow the correct Shopify CLI syntax and include the --force flag for non-interactive deletion.

src/prompts/FormatJavaScript.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
1. Indentation:
2+
3+
- Use consistent indentation throughout the code (2 spaces)
4+
- Indent nested elements properly to improve readability
5+
6+
2. Braces and Parentheses:
7+
8+
- Place opening braces on the same line as the statement or declaration
9+
- Use a single space before the opening brace
10+
- Place closing braces on a new line
11+
- Use a single space after keywords like `if`, `for`, `while`, etc.
12+
- Do not use spaces inside parentheses
13+
14+
3. Semicolons:
15+
16+
- Always use semicolons at the end of statements
17+
18+
4. Comments:
19+
20+
- Add comments to explain complex or non-obvious code sections
21+
- Use comments to describe the purpose or functionality of specific functions or blocks of code
22+
- Use single-line comments (`//`) for brief comments
23+
- Use multi-line comments (`/* */`) for longer comments or to temporarily disable code
24+
25+
5. Naming Conventions:
26+
27+
- Use camelCase for variable and function names
28+
- Use PascalCase for constructor functions and class names
29+
- Use UPPERCASE for constants
30+
- Use descriptive and meaningful names
31+
32+
6. Whitespace:
33+
34+
- Remove unnecessary whitespace, such as trailing spaces or multiple blank lines
35+
- Add appropriate spacing around operators, commas, and after keywords
36+
- Use blank lines to separate logical sections of code
37+
38+
7. Line Length:
39+
- Limit line length to a maximum of 80 characters for better readability
40+
- If a line exceeds the limit, break it into multiple lines and indent accordingly

0 commit comments

Comments
 (0)