shopify-accelerate-app 1.2.0 → 1.2.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopify-accelerate-app",
3
- "version": "1.2.0",
3
+ "version": "1.2.12",
4
4
  "description": "Shopify App development with full Typescript Support",
5
5
  "author": "Felix Tellmann",
6
6
  "license": "MIT",
package/require.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { createRequire } from "module";
2
-
3
- // export const require = createRequire(import.meta.url);
1
+ import { createRequire } from "module";
2
+
3
+ // export const require = createRequire(import.meta.url);
@@ -194,6 +194,7 @@ export const generateLiquidFiles = (final?: boolean, cssOutput?: string) => {
194
194
  }
195
195
  }
196
196
 
197
+ // @ts-ignore
197
198
  translationArray.push(generateBlockFiles(schema));
198
199
 
199
200
  const outputContent = translationArray.join("\n");
@@ -295,7 +296,8 @@ export const generateLiquidFiles = (final?: boolean, cssOutput?: string) => {
295
296
  const mergedTranslations = mergeLocales(translations, defaultSourceTranslations);
296
297
 
297
298
  const translationsJs = `<script>
298
- window._listify_translations = ${JSON.stringify(transformTranslations(mergedTranslations), undefined, 2)};
299
+ window.__listify = window.__listify || {};
300
+ window.__listify.translations = ${JSON.stringify(transformTranslations(mergedTranslations), undefined, 2)};
299
301
  </script>
300
302
  `;
301
303
 
@@ -306,11 +308,6 @@ export const generateLiquidFiles = (final?: boolean, cssOutput?: string) => {
306
308
  .replace(/`/gi, '"')
307
309
  .replace(/}\n/gi, "};\n")
308
310
  .replace(/\n\n/gi, "\n")};
309
- declare global {
310
- interface Window {
311
- _listify_translations?: Translations;
312
- }
313
- }
314
311
  `;
315
312
 
316
313
  writeCompareFile(
@@ -6,8 +6,18 @@ const { defaultExtractor: createDefaultExtractor } = require("tailwindcss/lib/li
6
6
  const { default: resolveConfig } = require("tailwindcss/lib/util/resolveConfig");
7
7
  const plugin = require("tailwindcss/plugin");
8
8
  import { dotenvLoad } from "dotenv-mono";
9
+
9
10
  const dotenv = dotenvLoad(); // Dotenv instance
10
11
 
12
+ /** Generate a full shade scale (50–950 + DEFAULT) from a CSS variable name */
13
+ function createColorScale(cssVar) {
14
+ const scale = { DEFAULT: `rgb(var(${cssVar}) / <alpha-value>)` };
15
+ for (const shade of [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]) {
16
+ scale[shade] = `rgb(var(${cssVar}-${shade}) / <alpha-value>)`;
17
+ }
18
+ return scale;
19
+ }
20
+
11
21
  /*const defaultExtractor = createDefaultExtractor({
12
22
  tailwindConfig: resolveConfig([
13
23
  {
@@ -55,7 +65,6 @@ module.exports = {
55
65
  }[&>*]:pointer-events-auto`,
56
66
  ],
57
67
  darkMode: "class", // or 'media' or 'class'
58
- // mode: process.env.NODE_ENV ? "jit" : undefined,
59
68
  // important: true,
60
69
  important: process.env.SHOPIFY_ACCELERATE_TAILWIND_IMPORTANT,
61
70
  prefix: process.env.SHOPIFY_ACCELERATE_TAILWIND_PREFIX ? `${process.env.SHOPIFY_ACCELERATE_TAILWIND_PREFIX}-` : undefined,
@@ -74,6 +83,44 @@ module.exports = {
74
83
  "2xl": "16px",
75
84
  "3xl": "24px",
76
85
  full: "9999px",
86
+ 0: "0px",
87
+ 1: "1px",
88
+ 2: "2px",
89
+ 3: "3px",
90
+ 4: "4px",
91
+ 5: "5px",
92
+ 6: "6px",
93
+ 7: "7px",
94
+ 8: "8px",
95
+ 9: "9px",
96
+ 10: "10px",
97
+ 11: "11px",
98
+ 12: "12px",
99
+ 13: "13px",
100
+ 14: "14px",
101
+ 15: "15px",
102
+ 16: "16px",
103
+ 17: "17px",
104
+ 18: "18px",
105
+ 19: "19px",
106
+ 20: "20px",
107
+ 21: "21px",
108
+ 22: "22px",
109
+ 23: "23px",
110
+ 24: "24px",
111
+ "theme-card": "var(--lx-card-radius)",
112
+ "theme-card-sm": "var(--lx-card-radius-sm)",
113
+ "theme-icon": "var(--lx-icon-radius)",
114
+ "theme-input": "var(--lx-input-radius, 6px)",
115
+ },
116
+ borderWidth: {
117
+ DEFAULT: "1px",
118
+ 0: "0px",
119
+ 2: "2px",
120
+ 3: "3px",
121
+ 4: "4px",
122
+ theme: "var(--lx-border-width)",
123
+ "theme-primary": "var(--lx-border-width-primary)",
77
124
  },
78
125
  columns: {
79
126
  auto: "auto",
@@ -137,6 +184,7 @@ module.exports = {
137
184
  "9xl": ["144px", { lineHeight: "1" }],
138
185
  },
139
186
  lineHeight: {
187
+ 1: "1",
140
188
  none: "1",
141
189
  tight: "1.25",
142
190
  snug: "1.375",
@@ -184,8 +232,11 @@ module.exports = {
184
232
  3: "12px",
185
233
  3.5: "14px",
186
234
  4: "16px",
235
+ 4.5: "18px",
187
236
  5: "20px",
237
+ 5.5: "22px",
188
238
  6: "24px",
239
+ 6.5: "26px",
189
240
  7: "28px",
190
241
  8: "32px",
191
242
  9: "36px",
@@ -211,6 +262,9 @@ module.exports = {
211
262
  96: "384px",
212
263
  },
213
264
  extend: {
265
+ transitionTimingFunction: {
266
+ "slide-in": "cubic-bezier(0.32, 0.72, 0, 1)",
267
+ },
214
268
  screens: {
215
269
  xxs: "373px" /* tiny phone*/,
216
270
  xs: "427px" /*smaller than iphone pro max*/,
@@ -289,6 +343,11 @@ module.exports = {
289
343
  "pulse-bg": {
290
344
  "50%": { "--tw-bg-opacity": "0.5" },
291
345
  },
346
+ shake: {
347
+ "0%, 100%": { transform: "translateX(0)" },
348
+ "20%, 60%": { transform: "translateX(-4px)" },
349
+ "40%, 80%": { transform: "translateX(4px)" },
350
+ },
292
351
  },
293
352
  animation: {
294
353
  slide: "slide 30s linear infinite",
@@ -298,9 +357,12 @@ module.exports = {
298
357
  dot: "dot 8.1s linear",
299
358
  typewriter: "typewriter 0.5s linear infinite",
300
359
  "pulse-bg": "pulse-bg 1s cubic-bezier(0.4, 0, 0.6, 1) infinite",
360
+ shake: "shake 0.4s ease-in-out",
301
361
  },
302
362
  colors: {
303
363
  theme: {
364
+ primary: { ...createColorScale("--lx-color-primary"), contrast: "rgb(var(--lx-color-primary-contrast) / <alpha-value>)" },
365
+ accent: createColorScale("--lx-color-accent"),
304
366
  "trigger-bg": "rgb(var(--lx-color-trigger-bg) / <alpha-value>)",
305
367
  "trigger-text": "rgb(var(--lx-color-trigger-text) / <alpha-value>)",
306
368
  bg: "rgb(var(--lx-color-bg) / <alpha-value>)",
@@ -358,6 +420,11 @@ module.exports = {
358
420
  },
359
421
  { values: theme("spacing") }
360
422
  );
423
+ matchUtilities({
424
+ bgi: (value) => ({
425
+ background: value,
426
+ }),
427
+ });
361
428
  matchUtilities(
362
429
  {
363
430
  "auto-col-flow": (value) => {
@@ -366,77 +433,61 @@ module.exports = {
366
433
  const calculatedGap = /^(\d|\.)*$/gi.test(gap?.trim()) ? `${+gap * 4}px` : gap;
367
434
 
368
435
  return {
369
- gridAutoFlow: `column`,
436
+ gridAutoFlow: "column",
370
437
  gridAutoColumns: ` calc((100% - (${calculatedGap} * (${cols} - 1))) / ${cols})`,
371
438
  columnGap: `${calculatedGap}`,
372
439
  };
373
440
  }
374
441
  return {
375
- gridAutoFlow: `column`,
442
+ gridAutoFlow: "column",
376
443
  gridAutoColumns: `${value}`,
377
444
  };
378
445
  },
379
446
  },
380
447
  { values: theme("width") }
381
448
  );
382
- /*matchUtilities(
449
+ matchUtilities(
383
450
  {
384
- "border-w": (value) => ({
385
- borderWidth: `${value}`,
386
- }),
451
+ "border-w": (value) => ({ borderWidth: value }),
387
452
  },
388
- { values: theme("spacing") }
453
+ { values: theme("borderWidth") }
389
454
  );
390
455
  matchUtilities(
391
456
  {
392
- "border-x-w": (value) => ({
393
- borderLeftWidth: `${value}`,
394
- borderRightWidth: `${value}`,
395
- }),
457
+ "border-x-w": (value) => ({ borderLeftWidth: value, borderRightWidth: value }),
396
458
  },
397
- { values: theme("spacing") }
459
+ { values: theme("borderWidth") }
398
460
  );
399
461
  matchUtilities(
400
462
  {
401
- "border-l-w": (value) => ({
402
- borderLeftWidth: `${value}`,
403
- }),
463
+ "border-y-w": (value) => ({ borderTopWidth: value, borderBottomWidth: value }),
404
464
  },
405
- { values: theme("spacing") }
465
+ { values: theme("borderWidth") }
406
466
  );
407
467
  matchUtilities(
408
468
  {
409
- "border-r-w": (value) => ({
410
- borderRightWidth: `${value}`,
411
- }),
469
+ "border-t-w": (value) => ({ borderTopWidth: value }),
412
470
  },
413
- { values: theme("spacing") }
471
+ { values: theme("borderWidth") }
414
472
  );
415
473
  matchUtilities(
416
474
  {
417
- "border-y-w": (value) => ({
418
- borderTopWidth: `${value}`,
419
- borderBottomWidth: `${value}`,
420
- }),
475
+ "border-r-w": (value) => ({ borderRightWidth: value }),
421
476
  },
422
- { values: theme("spacing") }
477
+ { values: theme("borderWidth") }
423
478
  );
424
479
  matchUtilities(
425
480
  {
426
- "border-t-w": (value) => ({
427
- borderTopWidth: `${value}`,
428
- }),
481
+ "border-b-w": (value) => ({ borderBottomWidth: value }),
429
482
  },
430
- { values: theme("spacing") }
483
+ { values: theme("borderWidth") }
431
484
  );
432
485
  matchUtilities(
433
486
  {
434
- "border-b-w": (value) => ({
435
- borderBottomWidth: `${value}`,
436
- }),
487
+ "border-l-w": (value) => ({ borderLeftWidth: value }),
437
488
  },
438
- { values: theme("spacing") }
439
- );*/
489
+ { values: theme("borderWidth") }
490
+ );
440
491
  addUtilities({
441
492
  ".shape-geometric-precision": {
442
493
  "shape-rendering": "geometricPrecision",