shopify-accelerate-app 1.1.6 → 1.1.8
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 +1 -1
- package/src/tailwind/tailwind-base.css +74 -74
- package/src/tailwind/tailwind-watch.ts +14 -10
package/package.json
CHANGED
|
@@ -64,82 +64,82 @@
|
|
|
64
64
|
--radius-full: 9999px;
|
|
65
65
|
|
|
66
66
|
/* ---- Font Size ---- */
|
|
67
|
-
--
|
|
68
|
-
--
|
|
69
|
-
--
|
|
70
|
-
--
|
|
71
|
-
--
|
|
72
|
-
--
|
|
73
|
-
--
|
|
74
|
-
--
|
|
75
|
-
--
|
|
76
|
-
--
|
|
77
|
-
--
|
|
78
|
-
--
|
|
79
|
-
--
|
|
80
|
-
--
|
|
81
|
-
--
|
|
82
|
-
--
|
|
83
|
-
--
|
|
84
|
-
--
|
|
85
|
-
--
|
|
86
|
-
--
|
|
87
|
-
--
|
|
88
|
-
--
|
|
89
|
-
--
|
|
90
|
-
--
|
|
91
|
-
--
|
|
92
|
-
--
|
|
93
|
-
--
|
|
94
|
-
--
|
|
95
|
-
--
|
|
96
|
-
--
|
|
97
|
-
--
|
|
98
|
-
--
|
|
99
|
-
--
|
|
100
|
-
--
|
|
101
|
-
--
|
|
102
|
-
--
|
|
103
|
-
--
|
|
104
|
-
--
|
|
105
|
-
--
|
|
106
|
-
--
|
|
107
|
-
--
|
|
108
|
-
--
|
|
109
|
-
--
|
|
110
|
-
--
|
|
111
|
-
--
|
|
112
|
-
--
|
|
113
|
-
--
|
|
114
|
-
--
|
|
115
|
-
--
|
|
116
|
-
--
|
|
117
|
-
--
|
|
118
|
-
--
|
|
119
|
-
--
|
|
120
|
-
--
|
|
121
|
-
--
|
|
122
|
-
--
|
|
123
|
-
--
|
|
124
|
-
--
|
|
125
|
-
--
|
|
126
|
-
--
|
|
67
|
+
--text-8: 9px;
|
|
68
|
+
--text-8--line-height: 1.55;
|
|
69
|
+
--text-9: 9px;
|
|
70
|
+
--text-9--line-height: 1.5;
|
|
71
|
+
--text-10: 10px;
|
|
72
|
+
--text-10--line-height: 1.5;
|
|
73
|
+
--text-11: 11px;
|
|
74
|
+
--text-11--line-height: 1.5;
|
|
75
|
+
--text-12: 12px;
|
|
76
|
+
--text-12--line-height: 1.5;
|
|
77
|
+
--text-13: 13px;
|
|
78
|
+
--text-13--line-height: 1.5;
|
|
79
|
+
--text-14: 14px;
|
|
80
|
+
--text-14--line-height: 1.5;
|
|
81
|
+
--text-15: 15px;
|
|
82
|
+
--text-15--line-height: 1.5;
|
|
83
|
+
--text-16: 16px;
|
|
84
|
+
--text-16--line-height: 1.5;
|
|
85
|
+
--text-17: 17px;
|
|
86
|
+
--text-17--line-height: 1.5;
|
|
87
|
+
--text-18: 18px;
|
|
88
|
+
--text-18--line-height: 1.45;
|
|
89
|
+
--text-19: 19px;
|
|
90
|
+
--text-19--line-height: 1.45;
|
|
91
|
+
--text-20: 20px;
|
|
92
|
+
--text-20--line-height: 1.45;
|
|
93
|
+
--text-21: 21px;
|
|
94
|
+
--text-21--line-height: 1.45;
|
|
95
|
+
--text-22: 22px;
|
|
96
|
+
--text-22--line-height: 1.4;
|
|
97
|
+
--text-23: 23px;
|
|
98
|
+
--text-23--line-height: 1.4;
|
|
99
|
+
--text-24: 24px;
|
|
100
|
+
--text-24--line-height: 1.4;
|
|
101
|
+
--text-xs: 12px;
|
|
102
|
+
--text-xs--line-height: 16px;
|
|
103
|
+
--text-sm: 14px;
|
|
104
|
+
--text-sm--line-height: 20px;
|
|
105
|
+
--text-base: 16px;
|
|
106
|
+
--text-base--line-height: 24px;
|
|
107
|
+
--text-lg: 18px;
|
|
108
|
+
--text-lg--line-height: 28px;
|
|
109
|
+
--text-xl: 20px;
|
|
110
|
+
--text-xl--line-height: 28px;
|
|
111
|
+
--text-2xl: 24px;
|
|
112
|
+
--text-2xl--line-height: 32px;
|
|
113
|
+
--text-3xl: 30px;
|
|
114
|
+
--text-3xl--line-height: 36px;
|
|
115
|
+
--text-4xl: 36px;
|
|
116
|
+
--text-4xl--line-height: 36px;
|
|
117
|
+
--text-5xl: 48px;
|
|
118
|
+
--text-5xl--line-height: 1;
|
|
119
|
+
--text-6xl: 60px;
|
|
120
|
+
--text-6xl--line-height: 1;
|
|
121
|
+
--text-7xl: 72px;
|
|
122
|
+
--text-7xl--line-height: 1;
|
|
123
|
+
--text-8xl: 96px;
|
|
124
|
+
--text-8xl--line-height: 1;
|
|
125
|
+
--text-9xl: 144px;
|
|
126
|
+
--text-9xl--line-height: 1;
|
|
127
127
|
|
|
128
128
|
/* ---- Line Height ---- */
|
|
129
|
-
--
|
|
130
|
-
--
|
|
131
|
-
--
|
|
132
|
-
--
|
|
133
|
-
--
|
|
134
|
-
--
|
|
135
|
-
--
|
|
136
|
-
--
|
|
137
|
-
--
|
|
138
|
-
--
|
|
139
|
-
--
|
|
140
|
-
--
|
|
141
|
-
--
|
|
142
|
-
--
|
|
129
|
+
--leading-none: 1;
|
|
130
|
+
--leading-tight: 1.25;
|
|
131
|
+
--leading-snug: 1.375;
|
|
132
|
+
--leading-normal: 1.5;
|
|
133
|
+
--leading-relaxed: 1.625;
|
|
134
|
+
--leading-loose: 2;
|
|
135
|
+
--leading-3: 12px;
|
|
136
|
+
--leading-4: 16px;
|
|
137
|
+
--leading-5: 20px;
|
|
138
|
+
--leading-6: 24px;
|
|
139
|
+
--leading-7: 28px;
|
|
140
|
+
--leading-8: 32px;
|
|
141
|
+
--leading-9: 36px;
|
|
142
|
+
--leading-10: 40px;
|
|
143
143
|
|
|
144
144
|
/* ---- Columns ---- */
|
|
145
145
|
--columns-auto: auto;
|
|
@@ -18,7 +18,7 @@ const generateInputCSS = (base_css_path: string, user_css_path: string): string
|
|
|
18
18
|
const important = process.env.SHOPIFY_ACCELERATE_TAILWIND_IMPORTANT;
|
|
19
19
|
|
|
20
20
|
// Build the @import "tailwindcss" line with options
|
|
21
|
-
// In v4, preflight
|
|
21
|
+
// In v4, we import theme, preflight, and utilities as individual layers
|
|
22
22
|
const tailwind_import_options: string[] = [];
|
|
23
23
|
if (prefix) {
|
|
24
24
|
tailwind_import_options.push(`prefix(${prefix})`);
|
|
@@ -26,11 +26,12 @@ const generateInputCSS = (base_css_path: string, user_css_path: string): string
|
|
|
26
26
|
|
|
27
27
|
// Resolve tailwindcss paths to absolute so they work from the generated file's location
|
|
28
28
|
const tw_theme_path = path.join(package_root, "node_modules/tailwindcss/theme.css").replace(/\\/g, "/");
|
|
29
|
+
const tw_preflight_path = path.join(package_root, "node_modules/tailwindcss/preflight.css").replace(/\\/g, "/");
|
|
29
30
|
const tw_utilities_path = path.join(package_root, "node_modules/tailwindcss/utilities.css").replace(/\\/g, "/");
|
|
30
31
|
|
|
31
32
|
let tailwind_import: string;
|
|
32
33
|
if (important || tailwind_import_options.length > 0) {
|
|
33
|
-
// When
|
|
34
|
+
// When using prefix/important, import layers individually with options
|
|
34
35
|
const theme_options = prefix ? ` prefix(${prefix})` : "";
|
|
35
36
|
const utilities_options_parts: string[] = [];
|
|
36
37
|
if (prefix) utilities_options_parts.push(`prefix(${prefix})`);
|
|
@@ -40,24 +41,27 @@ const generateInputCSS = (base_css_path: string, user_css_path: string): string
|
|
|
40
41
|
tailwind_import = [
|
|
41
42
|
`@layer theme, base, components;`,
|
|
42
43
|
`@import "${tw_theme_path}" layer(theme)${theme_options} source(none);`,
|
|
43
|
-
|
|
44
|
+
`@import "${tw_preflight_path}" layer(base) source(none);`,
|
|
44
45
|
`/* Utilities are NOT in a @layer so they keep normal cascade priority (like v3) and can override other libraries */`,
|
|
45
|
-
`@import "${tw_utilities_path}"${utilities_options}
|
|
46
|
+
`@import "${tw_utilities_path}"${utilities_options};`,
|
|
46
47
|
].join("\n");
|
|
47
48
|
} else {
|
|
48
|
-
// No prefix or important —
|
|
49
|
+
// No prefix or important — simple imports
|
|
49
50
|
tailwind_import = [
|
|
50
51
|
`@layer theme, base, components;`,
|
|
51
52
|
`@import "${tw_theme_path}" layer(theme) source(none);`,
|
|
52
|
-
|
|
53
|
+
`@import "${tw_preflight_path}" layer(base) source(none);`,
|
|
53
54
|
`/* Utilities are NOT in a @layer so they keep normal cascade priority (like v3) and can override other libraries */`,
|
|
54
|
-
`@import "${tw_utilities_path}"
|
|
55
|
+
`@import "${tw_utilities_path}";`,
|
|
55
56
|
].join("\n");
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
// Source paths for content detection
|
|
59
|
-
const
|
|
60
|
-
const
|
|
59
|
+
// Source paths for content detection — resolve to absolute so they work from the generated file's location
|
|
60
|
+
const extension_path_raw = process.env.SHOPIFY_ACCELERATE_EXTENSION_PATH ?? "";
|
|
61
|
+
const extension_path_abs = extension_path_raw ? path.resolve(root_dir, extension_path_raw).replace(/\\/g, "/") : "";
|
|
62
|
+
const source_directive = extension_path_abs ? `@source "${extension_path_abs}/**/*.{html,liquid,js,json}";` : "";
|
|
63
|
+
|
|
64
|
+
console.log({ source_directive });
|
|
61
65
|
|
|
62
66
|
// Safelist equivalent via @source inline()
|
|
63
67
|
const safelist_prefix = prefix ? `${prefix}:` : "";
|