tailwind-styled-v4 5.0.0 → 5.0.1
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/CHANGELOG.md +398 -0
- package/LICENSE +21 -0
- package/README.md +532 -0
- package/dist/analyzer.d.mts +114 -0
- package/dist/analyzer.d.ts +114 -0
- package/dist/analyzer.js +1555 -0
- package/dist/analyzer.js.map +1 -0
- package/dist/analyzer.mjs +1544 -0
- package/dist/analyzer.mjs.map +1 -0
- package/dist/{animate.d.cts → animate.d.mts} +3 -30
- package/dist/animate.d.ts +3 -30
- package/dist/animate.js +149 -99
- package/dist/animate.js.map +1 -1
- package/dist/{animate.cjs → animate.mjs} +130 -119
- package/dist/animate.mjs.map +1 -0
- package/dist/atomic.d.mts +18 -0
- package/dist/atomic.d.ts +18 -0
- package/dist/atomic.js +191 -0
- package/dist/atomic.js.map +1 -0
- package/dist/atomic.mjs +185 -0
- package/dist/atomic.mjs.map +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +6063 -0
- package/dist/cli.js.map +1 -0
- package/dist/cli.mjs +6053 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/compiler.d.mts +1009 -0
- package/dist/compiler.d.ts +1009 -0
- package/dist/compiler.js +4518 -0
- package/dist/compiler.js.map +1 -0
- package/dist/compiler.mjs +4443 -0
- package/dist/compiler.mjs.map +1 -0
- package/dist/dashboard.d.mts +272 -0
- package/dist/dashboard.d.ts +272 -0
- package/dist/dashboard.js +249 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/dashboard.mjs +239 -0
- package/dist/dashboard.mjs.map +1 -0
- package/dist/devtools.js +170 -157
- package/dist/devtools.js.map +1 -1
- package/dist/{devtools.cjs → devtools.mjs} +165 -166
- package/dist/devtools.mjs.map +1 -0
- package/dist/engine.d.mts +84 -0
- package/dist/engine.d.ts +84 -0
- package/dist/engine.js +3014 -0
- package/dist/engine.js.map +1 -0
- package/dist/engine.mjs +3005 -0
- package/dist/engine.mjs.map +1 -0
- package/dist/{index.d.cts → index.d.mts} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +945 -36
- package/dist/index.js.map +1 -1
- package/dist/{index.cjs → index.mjs} +899 -90
- package/dist/index.mjs.map +1 -0
- package/dist/liveTokenEngine-DYN3Zale.d.mts +34 -0
- package/dist/liveTokenEngine-DYN3Zale.d.ts +34 -0
- package/dist/{next.d.cts → next.d.mts} +2 -1
- package/dist/next.d.ts +2 -1
- package/dist/next.js +6853 -35
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +7050 -0
- package/dist/next.mjs.map +1 -0
- package/dist/plugin.d.mts +90 -0
- package/dist/plugin.d.ts +90 -0
- package/dist/plugin.js +185 -0
- package/dist/plugin.js.map +1 -0
- package/dist/plugin.mjs +174 -0
- package/dist/plugin.mjs.map +1 -0
- package/dist/pluginRegistry.d.mts +83 -0
- package/dist/pluginRegistry.d.ts +83 -0
- package/dist/pluginRegistry.js +303 -0
- package/dist/pluginRegistry.js.map +1 -0
- package/dist/pluginRegistry.mjs +298 -0
- package/dist/pluginRegistry.mjs.map +1 -0
- package/dist/preset.js +9 -4
- package/dist/preset.js.map +1 -1
- package/dist/{preset.cjs → preset.mjs} +5 -14
- package/dist/preset.mjs.map +1 -0
- package/dist/rspack.d.mts +33 -0
- package/dist/rspack.d.ts +33 -0
- package/dist/rspack.js +55 -0
- package/dist/rspack.js.map +1 -0
- package/dist/rspack.mjs +45 -0
- package/dist/rspack.mjs.map +1 -0
- package/dist/runtime.d.mts +62 -0
- package/dist/runtime.d.ts +62 -0
- package/dist/runtime.js +207 -0
- package/dist/runtime.js.map +1 -0
- package/dist/runtime.mjs +188 -0
- package/dist/runtime.mjs.map +1 -0
- package/dist/runtimeCss.d.mts +65 -0
- package/dist/runtimeCss.d.ts +65 -0
- package/dist/{css.cjs → runtimeCss.js} +71 -4
- package/dist/runtimeCss.js.map +1 -0
- package/dist/{css.js → runtimeCss.mjs} +66 -5
- package/dist/runtimeCss.mjs.map +1 -0
- package/dist/scanner.d.mts +25 -0
- package/dist/scanner.d.ts +25 -0
- package/dist/scanner.js +717 -0
- package/dist/scanner.js.map +1 -0
- package/dist/scanner.mjs +703 -0
- package/dist/scanner.mjs.map +1 -0
- package/dist/shared.d.mts +85 -0
- package/dist/shared.d.ts +85 -0
- package/dist/shared.js +255 -0
- package/dist/shared.js.map +1 -0
- package/dist/shared.mjs +233 -0
- package/dist/shared.mjs.map +1 -0
- package/dist/storybookAddon.d.mts +108 -0
- package/dist/storybookAddon.d.ts +108 -0
- package/dist/storybookAddon.js +95 -0
- package/dist/storybookAddon.js.map +1 -0
- package/dist/storybookAddon.mjs +88 -0
- package/dist/storybookAddon.mjs.map +1 -0
- package/dist/svelte.d.mts +114 -0
- package/dist/svelte.d.ts +114 -0
- package/dist/svelte.js +67 -0
- package/dist/svelte.js.map +1 -0
- package/dist/svelte.mjs +59 -0
- package/dist/svelte.mjs.map +1 -0
- package/dist/testing.d.mts +185 -0
- package/dist/testing.d.ts +185 -0
- package/dist/testing.js +173 -0
- package/dist/testing.js.map +1 -0
- package/dist/testing.mjs +158 -0
- package/dist/testing.mjs.map +1 -0
- package/dist/theme.d.mts +188 -0
- package/dist/theme.d.ts +188 -0
- package/dist/theme.js +334 -0
- package/dist/theme.js.map +1 -0
- package/dist/theme.mjs +311 -0
- package/dist/theme.mjs.map +1 -0
- package/dist/types-DXr2PmGP.d.mts +31 -0
- package/dist/types-DXr2PmGP.d.ts +31 -0
- package/dist/vite.js +4181 -16
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +4281 -0
- package/dist/vite.mjs.map +1 -0
- package/dist/vue.d.mts +89 -0
- package/dist/vue.d.ts +89 -0
- package/dist/vue.js +104 -0
- package/dist/vue.js.map +1 -0
- package/dist/vue.mjs +96 -0
- package/dist/vue.mjs.map +1 -0
- package/package.json +168 -65
- package/dist/animate.cjs.map +0 -1
- package/dist/chunk-VZEJV27B.js +0 -11
- package/dist/chunk-VZEJV27B.js.map +0 -1
- package/dist/chunk-Y5D3E72P.cjs +0 -13
- package/dist/chunk-Y5D3E72P.cjs.map +0 -1
- package/dist/css.cjs.map +0 -1
- package/dist/css.d.cts +0 -30
- package/dist/css.d.ts +0 -30
- package/dist/css.js.map +0 -1
- package/dist/devtools.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/next.cjs +0 -248
- package/dist/next.cjs.map +0 -1
- package/dist/preset.cjs.map +0 -1
- package/dist/turbopackLoader.cjs +0 -37
- package/dist/turbopackLoader.cjs.map +0 -1
- package/dist/turbopackLoader.d.cts +0 -12
- package/dist/turbopackLoader.d.ts +0 -12
- package/dist/turbopackLoader.js +0 -35
- package/dist/turbopackLoader.js.map +0 -1
- package/dist/vite.cjs +0 -138
- package/dist/vite.cjs.map +0 -1
- package/dist/webpackLoader.cjs +0 -51
- package/dist/webpackLoader.cjs.map +0 -1
- package/dist/webpackLoader.d.cts +0 -17
- package/dist/webpackLoader.d.ts +0 -17
- package/dist/webpackLoader.js +0 -49
- package/dist/webpackLoader.js.map +0 -1
- /package/dist/{devtools.d.cts → devtools.d.mts} +0 -0
- /package/dist/{preset.d.cts → preset.d.mts} +0 -0
- /package/dist/{vite.d.cts → vite.d.mts} +0 -0
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { spawnSync } from 'child_process';
|
|
2
|
+
import { createHash } from 'crypto';
|
|
3
|
+
import { existsSync, readFileSync } from 'fs';
|
|
4
|
+
import { join } from 'path';
|
|
5
|
+
|
|
6
|
+
/* tailwind-styled-v4 v5.0.1 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// packages/plugin-registry/registry.json
|
|
13
|
+
var require_registry = __commonJS({
|
|
14
|
+
"packages/plugin-registry/registry.json"(exports$1, module) {
|
|
15
|
+
module.exports = {
|
|
16
|
+
version: "5.0.0",
|
|
17
|
+
updatedAt: "2026-03-23",
|
|
18
|
+
official: [
|
|
19
|
+
{
|
|
20
|
+
name: "@tailwind-styled/plugin-animation",
|
|
21
|
+
description: "Animation presets and keyframes \u2014 enter/exit transitions, spring physics, scroll-triggered",
|
|
22
|
+
version: "5.0.0",
|
|
23
|
+
tags: ["animation", "motion", "transition", "keyframes"],
|
|
24
|
+
docs: "https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/packages/animate",
|
|
25
|
+
install: "npm install @tailwind-styled/plugin-animation@5.0.0",
|
|
26
|
+
integrity: "sha256-abc123"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "@tailwind-styled/plugin-typography",
|
|
30
|
+
description: "Prose and typography utilities \u2014 headings, body, code blocks, with dark mode",
|
|
31
|
+
version: "5.0.0",
|
|
32
|
+
tags: ["typography", "prose", "markdown", "content"],
|
|
33
|
+
docs: "https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins",
|
|
34
|
+
install: "npm install @tailwind-styled/plugin-typography@5.0.0",
|
|
35
|
+
integrity: "sha256-def456"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "@tailwind-styled/plugin-forms",
|
|
39
|
+
description: "Form input styling helpers \u2014 reset, validation states, custom checkboxes/radios",
|
|
40
|
+
version: "5.0.0",
|
|
41
|
+
tags: ["forms", "inputs", "validation", "checkbox", "radio"],
|
|
42
|
+
docs: "https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins",
|
|
43
|
+
install: "npm install @tailwind-styled/plugin-forms@5.0.0",
|
|
44
|
+
integrity: "sha256-ghi789"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "@tailwind-styled/plugin-container-queries",
|
|
48
|
+
description: "Container query utilities \u2014 @container breakpoints for component-level responsiveness",
|
|
49
|
+
version: "5.0.0",
|
|
50
|
+
tags: ["container-queries", "responsive", "layout"],
|
|
51
|
+
docs: "https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins",
|
|
52
|
+
install: "npm install @tailwind-styled/plugin-container-queries@5.0.0",
|
|
53
|
+
integrity: "sha256-jkl012"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
community: [
|
|
57
|
+
{
|
|
58
|
+
name: "tailwind-styled-animate",
|
|
59
|
+
description: "Community animation variants \u2014 bounce, pulse, wiggle, and more",
|
|
60
|
+
version: "0.1.0",
|
|
61
|
+
tags: ["animation", "community"],
|
|
62
|
+
author: "community",
|
|
63
|
+
install: "npm install tailwind-styled-animate"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "tailwind-styled-icons",
|
|
67
|
+
description: "SVG icon system integrated with tw() variant API",
|
|
68
|
+
version: "0.1.0",
|
|
69
|
+
tags: ["icons", "svg", "community"],
|
|
70
|
+
author: "community",
|
|
71
|
+
install: "npm install tailwind-styled-icons"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
var PLUGIN_NAME_REGEX = /^(@[a-z0-9-]+\/)?[a-z0-9-]+(@[0-9]+\.[0-9]+\.[0-9]+)?$/;
|
|
78
|
+
var PluginRegistryError = class extends Error {
|
|
79
|
+
constructor(payload) {
|
|
80
|
+
super(payload.message);
|
|
81
|
+
this.name = "PluginRegistryError";
|
|
82
|
+
this.code = payload.code;
|
|
83
|
+
this.context = payload.context;
|
|
84
|
+
}
|
|
85
|
+
toObject() {
|
|
86
|
+
return {
|
|
87
|
+
code: this.code,
|
|
88
|
+
message: this.message,
|
|
89
|
+
context: this.context
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
var PluginRegistry = class _PluginRegistry {
|
|
94
|
+
constructor(registryData, options = {}) {
|
|
95
|
+
if (options.registryUrl) {
|
|
96
|
+
this.plugins = [];
|
|
97
|
+
this.registryVersion = "0.0.0";
|
|
98
|
+
} else {
|
|
99
|
+
const data = registryData;
|
|
100
|
+
const version = data?.version ?? "4.2.0";
|
|
101
|
+
const official = (data?.official ?? []).map((item) => ({
|
|
102
|
+
name: item.name,
|
|
103
|
+
description: item.description,
|
|
104
|
+
version: item.version,
|
|
105
|
+
tags: [...item.tags],
|
|
106
|
+
official: true,
|
|
107
|
+
docs: item.docs,
|
|
108
|
+
install: item.install,
|
|
109
|
+
integrity: item.integrity
|
|
110
|
+
}));
|
|
111
|
+
const community = (data?.community ?? []).map((item) => ({
|
|
112
|
+
name: item.name,
|
|
113
|
+
description: item.description,
|
|
114
|
+
version: item.version,
|
|
115
|
+
tags: [...item.tags],
|
|
116
|
+
official: false
|
|
117
|
+
}));
|
|
118
|
+
this.plugins = [...official, ...community];
|
|
119
|
+
this.registryVersion = version;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
static async loadFromUrl(url) {
|
|
123
|
+
try {
|
|
124
|
+
const response = await fetch(url);
|
|
125
|
+
if (!response.ok) {
|
|
126
|
+
throw new PluginRegistryError({
|
|
127
|
+
code: "NETWORK_ERROR",
|
|
128
|
+
message: `Failed to fetch registry: ${response.status} ${response.statusText}`,
|
|
129
|
+
context: { url, status: response.status }
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
const data = await response.json();
|
|
133
|
+
return new _PluginRegistry(data, { registryUrl: url });
|
|
134
|
+
} catch (error) {
|
|
135
|
+
if (error instanceof PluginRegistryError) throw error;
|
|
136
|
+
throw new PluginRegistryError({
|
|
137
|
+
code: "NETWORK_ERROR",
|
|
138
|
+
message: `Failed to load registry: ${error instanceof Error ? error.message : String(error)}`,
|
|
139
|
+
context: { url }
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
getVersion() {
|
|
144
|
+
return this.registryVersion;
|
|
145
|
+
}
|
|
146
|
+
search(query) {
|
|
147
|
+
const q = query.trim().toLowerCase();
|
|
148
|
+
if (!q) return [...this.plugins];
|
|
149
|
+
return this.plugins.filter((plugin) => {
|
|
150
|
+
return plugin.name.toLowerCase().includes(q) || plugin.description.toLowerCase().includes(q) || plugin.tags.some((tag) => tag.toLowerCase().includes(q));
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
getAll() {
|
|
154
|
+
return [...this.plugins];
|
|
155
|
+
}
|
|
156
|
+
getByName(pluginName) {
|
|
157
|
+
const nameWithoutVersion = pluginName.split("@").slice(0, 2).join("@");
|
|
158
|
+
return this.plugins.find((plugin) => plugin.name === nameWithoutVersion);
|
|
159
|
+
}
|
|
160
|
+
install(pluginName, options = {}) {
|
|
161
|
+
const npmBin = options.npmBin ?? process.env.TW_PLUGIN_NPM_BIN ?? "npm";
|
|
162
|
+
if (!PLUGIN_NAME_REGEX.test(pluginName)) {
|
|
163
|
+
throw new PluginRegistryError({
|
|
164
|
+
code: "INVALID_PLUGIN_NAME",
|
|
165
|
+
message: `Nama plugin tidak valid: '${pluginName}'.`,
|
|
166
|
+
context: {
|
|
167
|
+
pluginName,
|
|
168
|
+
expectedPattern: String(PLUGIN_NAME_REGEX)
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
const knownPlugin = this.getByName(pluginName);
|
|
173
|
+
const isExternal = !knownPlugin;
|
|
174
|
+
if (isExternal && !options.allowExternal) {
|
|
175
|
+
throw new PluginRegistryError({
|
|
176
|
+
code: "PLUGIN_NOT_FOUND",
|
|
177
|
+
message: `Plugin '${pluginName}' tidak ditemukan di registry. Coba cari dengan 'tw-plugin search <keyword>'.`,
|
|
178
|
+
context: {
|
|
179
|
+
pluginName,
|
|
180
|
+
allowExternal: false
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
if (isExternal && options.allowExternal && !options.confirmExternal) {
|
|
185
|
+
throw new PluginRegistryError({
|
|
186
|
+
code: "EXTERNAL_CONFIRMATION_REQUIRED",
|
|
187
|
+
message: `Plugin eksternal '${pluginName}' butuh konfirmasi. Jalankan ulang dengan --allow-external --yes.`,
|
|
188
|
+
context: {
|
|
189
|
+
pluginName,
|
|
190
|
+
allowExternal: true
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
const command = `${npmBin} install ${pluginName}`;
|
|
195
|
+
if (options.dryRun) {
|
|
196
|
+
return { plugin: pluginName, installed: true, command, exitCode: 0 };
|
|
197
|
+
}
|
|
198
|
+
const child = spawnSync(npmBin, ["install", pluginName], { stdio: "inherit" });
|
|
199
|
+
if (child.error) {
|
|
200
|
+
throw new PluginRegistryError({
|
|
201
|
+
code: "INSTALL_COMMAND_FAILED",
|
|
202
|
+
message: `Gagal menjalankan perintah install: ${command}`,
|
|
203
|
+
context: {
|
|
204
|
+
pluginName,
|
|
205
|
+
command,
|
|
206
|
+
reason: child.error.message
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
if (child.status !== 0) {
|
|
211
|
+
throw new PluginRegistryError({
|
|
212
|
+
code: "INSTALL_FAILED",
|
|
213
|
+
message: `Install gagal (${child.status ?? 1}): ${command}`,
|
|
214
|
+
context: {
|
|
215
|
+
pluginName,
|
|
216
|
+
command,
|
|
217
|
+
exitCode: child.status ?? 1
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
return {
|
|
222
|
+
plugin: pluginName,
|
|
223
|
+
installed: true,
|
|
224
|
+
command,
|
|
225
|
+
exitCode: 0
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
uninstall(pluginName, options = {}) {
|
|
229
|
+
const npmBin = options.npmBin ?? process.env.TW_PLUGIN_NPM_BIN ?? "npm";
|
|
230
|
+
const command = `${npmBin} uninstall ${pluginName}`;
|
|
231
|
+
if (options.dryRun) {
|
|
232
|
+
return { plugin: pluginName, uninstalled: true, command, exitCode: 0 };
|
|
233
|
+
}
|
|
234
|
+
const child = spawnSync(npmBin, ["uninstall", pluginName], { stdio: "inherit" });
|
|
235
|
+
if (child.status !== 0 && child.status !== null) {
|
|
236
|
+
throw new PluginRegistryError({
|
|
237
|
+
code: "INSTALL_FAILED",
|
|
238
|
+
message: `Uninstall gagal (${child.status}): ${command}`,
|
|
239
|
+
context: { pluginName, command, exitCode: child.status }
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
return {
|
|
243
|
+
plugin: pluginName,
|
|
244
|
+
uninstalled: true,
|
|
245
|
+
command,
|
|
246
|
+
exitCode: child.status ?? 0
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
verifyIntegrity(pluginName) {
|
|
250
|
+
const plugin = this.getByName(pluginName);
|
|
251
|
+
if (!plugin) return { ok: false, reason: `Plugin '${pluginName}' not in registry` };
|
|
252
|
+
if (!plugin.integrity) {
|
|
253
|
+
return { ok: true, reason: "no checksum registered (skip)" };
|
|
254
|
+
}
|
|
255
|
+
try {
|
|
256
|
+
const pkgPath = join(process.cwd(), "node_modules", pluginName, "package.json");
|
|
257
|
+
if (!existsSync(pkgPath)) return { ok: false, reason: "plugin not installed" };
|
|
258
|
+
const content = readFileSync(pkgPath, "utf8");
|
|
259
|
+
const hash = "sha256-" + createHash("sha256").update(content).digest("base64");
|
|
260
|
+
return hash === plugin.integrity ? { ok: true } : { ok: false, reason: `Integrity mismatch: expected ${plugin.integrity}` };
|
|
261
|
+
} catch (e) {
|
|
262
|
+
return { ok: false, reason: `Integrity check failed: ${e.message}` };
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
checkForUpdate(pluginName) {
|
|
266
|
+
const plugin = this.getByName(pluginName);
|
|
267
|
+
if (!plugin) return { hasUpdate: false, error: `Plugin '${pluginName}' not in registry` };
|
|
268
|
+
try {
|
|
269
|
+
const pkgPath = join(process.cwd(), "node_modules", pluginName, "package.json");
|
|
270
|
+
if (!existsSync(pkgPath)) return { hasUpdate: false, error: "plugin not installed" };
|
|
271
|
+
const current = JSON.parse(readFileSync(pkgPath, "utf8")).version ?? "0.0.0";
|
|
272
|
+
const latest = plugin.version;
|
|
273
|
+
const parseV = (v) => v.replace(/[^0-9.]/g, "").split(".").map(Number);
|
|
274
|
+
const [ca, cb, cc] = parseV(current);
|
|
275
|
+
const [la, lb, lc] = parseV(latest);
|
|
276
|
+
const hasUpdate = la > ca || la === ca && lb > cb || la === ca && lb === cb && lc > cc;
|
|
277
|
+
return { hasUpdate, current, latest };
|
|
278
|
+
} catch (e) {
|
|
279
|
+
return { hasUpdate: false, error: `Update check failed: ${e.message}` };
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
checkAllUpdates() {
|
|
283
|
+
return this.plugins.map((p) => ({ name: p.name, ...this.checkForUpdate(p.name) }));
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
var defaultRegistry = null;
|
|
287
|
+
function getRegistry() {
|
|
288
|
+
if (!defaultRegistry) {
|
|
289
|
+
const registryData = require_registry();
|
|
290
|
+
defaultRegistry = new PluginRegistry(registryData);
|
|
291
|
+
}
|
|
292
|
+
return defaultRegistry;
|
|
293
|
+
}
|
|
294
|
+
var registry = getRegistry();
|
|
295
|
+
|
|
296
|
+
export { PluginRegistry, PluginRegistryError, getRegistry, registry };
|
|
297
|
+
//# sourceMappingURL=pluginRegistry.mjs.map
|
|
298
|
+
//# sourceMappingURL=pluginRegistry.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../packages/plugin-registry/registry.json","../packages/plugin-registry/src/index.ts"],"names":["exports"],"mappings":";;;;;;;;;;;;AAAA,IAAA,gBAAA,GAAA,UAAA,CAAA;AAAA,EAAA,wCAAA,CAAAA,SAAA,EAAA,MAAA,EAAA;AAAA,IAAA,MAAA,CAAA,OAAA,GAAA;AAAA,MACE,OAAA,EAAW,OAAA;AAAA,MACX,SAAA,EAAa,YAAA;AAAA,MACb,QAAA,EAAY;AAAA,QACV;AAAA,UACE,IAAA,EAAQ,mCAAA;AAAA,UACR,WAAA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,SAAS,WAAA,GAA8B;AAC5C,EAAA,IAAI,CAAC,eAAA,EAAiB;AACpB,IAAA,MAAM,YAAA,GAAe,gBAAA,EAAA;AACrB,IAAA,eAAA,GAAkB,IAAI,eAAe,YAAY,CAAA;AAAA,EACnD;AACA,EAAA,OAAO,eAAA;AACT;AAEO,IAAM,WAAW,WAAA","file":"pluginRegistry.mjs","sourcesContent":["{\n \"version\": \"5.0.0\",\n \"updatedAt\": \"2026-03-23\",\n \"official\": [\n {\n \"name\": \"@tailwind-styled/plugin-animation\",\n \"description\": \"Animation presets and keyframes — enter/exit transitions, spring physics, scroll-triggered\",\n \"version\": \"5.0.0\",\n \"tags\": [\"animation\", \"motion\", \"transition\", \"keyframes\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/packages/animate\",\n \"install\": \"npm install @tailwind-styled/plugin-animation@5.0.0\",\n \"integrity\": \"sha256-abc123\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-typography\",\n \"description\": \"Prose and typography utilities — headings, body, code blocks, with dark mode\",\n \"version\": \"5.0.0\",\n \"tags\": [\"typography\", \"prose\", \"markdown\", \"content\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-typography@5.0.0\",\n \"integrity\": \"sha256-def456\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-forms\",\n \"description\": \"Form input styling helpers — reset, validation states, custom checkboxes/radios\",\n \"version\": \"5.0.0\",\n \"tags\": [\"forms\", \"inputs\", \"validation\", \"checkbox\", \"radio\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-forms@5.0.0\",\n \"integrity\": \"sha256-ghi789\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-container-queries\",\n \"description\": \"Container query utilities — @container breakpoints for component-level responsiveness\",\n \"version\": \"5.0.0\",\n \"tags\": [\"container-queries\", \"responsive\", \"layout\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-container-queries@5.0.0\",\n \"integrity\": \"sha256-jkl012\"\n }\n ],\n \"community\": [\n {\n \"name\": \"tailwind-styled-animate\",\n \"description\": \"Community animation variants — bounce, pulse, wiggle, and more\",\n \"version\": \"0.1.0\",\n \"tags\": [\"animation\", \"community\"],\n \"author\": \"community\",\n \"install\": \"npm install tailwind-styled-animate\"\n },\n {\n \"name\": \"tailwind-styled-icons\",\n \"description\": \"SVG icon system integrated with tw() variant API\",\n \"version\": \"0.1.0\",\n \"tags\": [\"icons\", \"svg\", \"community\"],\n \"author\": \"community\",\n \"install\": \"npm install tailwind-styled-icons\"\n }\n ]\n}\n","import { spawnSync } from \"node:child_process\"\nimport { createHash } from \"node:crypto\"\nimport { existsSync, readFileSync } from \"node:fs\"\nimport { join } from \"node:path\"\n\nconst PLUGIN_NAME_REGEX = /^(@[a-z0-9-]+\\/)?[a-z0-9-]+(@[0-9]+\\.[0-9]+\\.[0-9]+)?$/\n\nexport interface PluginInfo {\n name: string\n description: string\n version: string\n tags: string[]\n official?: boolean\n docs?: string\n install?: string\n integrity?: string\n}\n\ninterface RegistryData {\n version: string\n official: PluginInfo[]\n community: PluginInfo[]\n}\n\nexport interface InstallResult {\n plugin: string\n installed: boolean\n command: string\n exitCode: number\n}\n\nexport type PluginRegistryErrorCode =\n | \"INVALID_PLUGIN_NAME\"\n | \"PLUGIN_NOT_FOUND\"\n | \"EXTERNAL_CONFIRMATION_REQUIRED\"\n | \"INSTALL_COMMAND_FAILED\"\n | \"INSTALL_FAILED\"\n | \"NETWORK_ERROR\"\n | \"REGISTRY_LOAD_FAILED\"\n\nexport interface PluginRegistryErrorPayload {\n code: PluginRegistryErrorCode\n message: string\n context?: Record<string, unknown>\n}\n\nexport class PluginRegistryError extends Error {\n readonly code: PluginRegistryErrorCode\n readonly context?: Record<string, unknown>\n\n constructor(payload: PluginRegistryErrorPayload) {\n super(payload.message)\n this.name = \"PluginRegistryError\"\n this.code = payload.code\n this.context = payload.context\n }\n\n toObject(): PluginRegistryErrorPayload {\n return {\n code: this.code,\n message: this.message,\n context: this.context,\n }\n }\n}\n\nexport interface InstallOptions {\n dryRun?: boolean\n npmBin?: string\n allowExternal?: boolean\n confirmExternal?: boolean\n}\n\nexport interface RegistryOptions {\n registryUrl?: string\n}\n\nexport class PluginRegistry {\n private readonly plugins: PluginInfo[]\n private readonly registryVersion: string\n\n constructor(registryData?: RegistryData, options: RegistryOptions = {}) {\n if (options.registryUrl) {\n this.plugins = []\n this.registryVersion = \"0.0.0\"\n } else {\n const data = registryData\n const version = data?.version ?? \"4.2.0\"\n const official = (data?.official ?? []).map((item) => ({\n name: item.name,\n description: item.description,\n version: item.version,\n tags: [...item.tags],\n official: true,\n docs: item.docs,\n install: item.install,\n integrity: item.integrity,\n }))\n const community = (data?.community ?? []).map((item) => ({\n name: item.name,\n description: item.description,\n version: item.version,\n tags: [...item.tags],\n official: false,\n }))\n this.plugins = [...official, ...community]\n this.registryVersion = version\n }\n }\n\n static async loadFromUrl(url: string): Promise<PluginRegistry> {\n try {\n const response = await fetch(url)\n if (!response.ok) {\n throw new PluginRegistryError({\n code: \"NETWORK_ERROR\",\n message: `Failed to fetch registry: ${response.status} ${response.statusText}`,\n context: { url, status: response.status },\n })\n }\n const data = (await response.json()) as RegistryData\n return new PluginRegistry(data, { registryUrl: url })\n } catch (error) {\n if (error instanceof PluginRegistryError) throw error\n throw new PluginRegistryError({\n code: \"NETWORK_ERROR\",\n message: `Failed to load registry: ${error instanceof Error ? error.message : String(error)}`,\n context: { url },\n })\n }\n }\n\n getVersion(): string {\n return this.registryVersion\n }\n\n search(query: string): PluginInfo[] {\n const q = query.trim().toLowerCase()\n if (!q) return [...this.plugins]\n\n return this.plugins.filter((plugin) => {\n return (\n plugin.name.toLowerCase().includes(q) ||\n plugin.description.toLowerCase().includes(q) ||\n plugin.tags.some((tag) => tag.toLowerCase().includes(q))\n )\n })\n }\n\n getAll(): PluginInfo[] {\n return [...this.plugins]\n }\n\n getByName(pluginName: string): PluginInfo | undefined {\n const nameWithoutVersion = pluginName.split(\"@\").slice(0, 2).join(\"@\")\n return this.plugins.find((plugin) => plugin.name === nameWithoutVersion)\n }\n\n install(pluginName: string, options: InstallOptions = {}): InstallResult {\n const npmBin = options.npmBin ?? process.env.TW_PLUGIN_NPM_BIN ?? \"npm\"\n\n if (!PLUGIN_NAME_REGEX.test(pluginName)) {\n throw new PluginRegistryError({\n code: \"INVALID_PLUGIN_NAME\",\n message: `Nama plugin tidak valid: '${pluginName}'.`,\n context: {\n pluginName,\n expectedPattern: String(PLUGIN_NAME_REGEX),\n },\n })\n }\n\n const knownPlugin = this.getByName(pluginName)\n const isExternal = !knownPlugin\n\n if (isExternal && !options.allowExternal) {\n throw new PluginRegistryError({\n code: \"PLUGIN_NOT_FOUND\",\n message: `Plugin '${pluginName}' tidak ditemukan di registry. Coba cari dengan 'tw-plugin search <keyword>'.`,\n context: {\n pluginName,\n allowExternal: false,\n },\n })\n }\n\n if (isExternal && options.allowExternal && !options.confirmExternal) {\n throw new PluginRegistryError({\n code: \"EXTERNAL_CONFIRMATION_REQUIRED\",\n message: `Plugin eksternal '${pluginName}' butuh konfirmasi. Jalankan ulang dengan --allow-external --yes.`,\n context: {\n pluginName,\n allowExternal: true,\n },\n })\n }\n\n const command = `${npmBin} install ${pluginName}`\n if (options.dryRun) {\n return { plugin: pluginName, installed: true, command, exitCode: 0 }\n }\n\n const child = spawnSync(npmBin, [\"install\", pluginName], { stdio: \"inherit\" })\n if (child.error) {\n throw new PluginRegistryError({\n code: \"INSTALL_COMMAND_FAILED\",\n message: `Gagal menjalankan perintah install: ${command}`,\n context: {\n pluginName,\n command,\n reason: child.error.message,\n },\n })\n }\n\n if (child.status !== 0) {\n throw new PluginRegistryError({\n code: \"INSTALL_FAILED\",\n message: `Install gagal (${child.status ?? 1}): ${command}`,\n context: {\n pluginName,\n command,\n exitCode: child.status ?? 1,\n },\n })\n }\n\n return {\n plugin: pluginName,\n installed: true,\n command,\n exitCode: 0,\n }\n }\n\n uninstall(\n pluginName: string,\n options: { dryRun?: boolean; npmBin?: string } = {}\n ): {\n plugin: string\n uninstalled: boolean\n command: string\n exitCode: number\n } {\n const npmBin = options.npmBin ?? process.env.TW_PLUGIN_NPM_BIN ?? \"npm\"\n const command = `${npmBin} uninstall ${pluginName}`\n\n if (options.dryRun) {\n return { plugin: pluginName, uninstalled: true, command, exitCode: 0 }\n }\n\n const child = spawnSync(npmBin, [\"uninstall\", pluginName], { stdio: \"inherit\" })\n if (child.status !== 0 && child.status !== null) {\n throw new PluginRegistryError({\n code: \"INSTALL_FAILED\",\n message: `Uninstall gagal (${child.status}): ${command}`,\n context: { pluginName, command, exitCode: child.status },\n })\n }\n\n return {\n plugin: pluginName,\n uninstalled: true,\n command,\n exitCode: child.status ?? 0,\n }\n }\n\n verifyIntegrity(pluginName: string): { ok: boolean; reason?: string } {\n const plugin = this.getByName(pluginName)\n if (!plugin) return { ok: false, reason: `Plugin '${pluginName}' not in registry` }\n if (!plugin.integrity) {\n return { ok: true, reason: \"no checksum registered (skip)\" }\n }\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", pluginName, \"package.json\")\n if (!existsSync(pkgPath)) return { ok: false, reason: \"plugin not installed\" }\n const content = readFileSync(pkgPath, \"utf8\")\n const hash = \"sha256-\" + createHash(\"sha256\").update(content).digest(\"base64\")\n return hash === plugin.integrity\n ? { ok: true }\n : { ok: false, reason: `Integrity mismatch: expected ${plugin.integrity}` }\n } catch (e: any) {\n return { ok: false, reason: `Integrity check failed: ${e.message}` }\n }\n }\n\n checkForUpdate(pluginName: string): {\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n } {\n const plugin = this.getByName(pluginName)\n if (!plugin) return { hasUpdate: false, error: `Plugin '${pluginName}' not in registry` }\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", pluginName, \"package.json\")\n if (!existsSync(pkgPath)) return { hasUpdate: false, error: \"plugin not installed\" }\n const current = JSON.parse(readFileSync(pkgPath, \"utf8\")).version ?? \"0.0.0\"\n const latest = plugin.version\n const parseV = (v: string) =>\n v\n .replace(/[^0-9.]/g, \"\")\n .split(\".\")\n .map(Number)\n const [ca, cb, cc] = parseV(current)\n const [la, lb, lc] = parseV(latest)\n const hasUpdate = la > ca || (la === ca && lb > cb) || (la === ca && lb === cb && lc > cc)\n return { hasUpdate, current, latest }\n } catch (e: any) {\n return { hasUpdate: false, error: `Update check failed: ${e.message}` }\n }\n }\n\n checkAllUpdates(): Array<{\n name: string\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n }> {\n return this.plugins.map((p) => ({ name: p.name, ...this.checkForUpdate(p.name) }))\n }\n}\n\nlet defaultRegistry: PluginRegistry | null = null\n\nexport function getRegistry(): PluginRegistry {\n if (!defaultRegistry) {\n const registryData = require(\"../registry.json\") as RegistryData\n defaultRegistry = new PluginRegistry(registryData)\n }\n return defaultRegistry\n}\n\nexport const registry = getRegistry()\n"]}
|
package/dist/preset.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
2
|
|
|
3
|
-
/* tailwind-styled-v4
|
|
3
|
+
/* tailwind-styled-v4 v5.0.1 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// packages/preset/src/defaultPreset.ts
|
|
6
6
|
var STANDARD_CONTENT_PATHS = [
|
|
7
7
|
// Next.js App Router
|
|
8
8
|
"./src/**/*.{tsx,ts,jsx,js,mdx}",
|
|
@@ -411,6 +411,11 @@ export default {
|
|
|
411
411
|
`;
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
-
|
|
414
|
+
exports.defaultGlobalCss = defaultGlobalCss;
|
|
415
|
+
exports.defaultPreset = defaultPreset;
|
|
416
|
+
exports.defaultThemeCss = defaultThemeCss;
|
|
417
|
+
exports.designTokens = designTokens;
|
|
418
|
+
exports.generateTailwindConfig = generateTailwindConfig;
|
|
419
|
+
exports.generateTailwindCss = generateTailwindCss;
|
|
415
420
|
//# sourceMappingURL=preset.js.map
|
|
416
421
|
//# sourceMappingURL=preset.js.map
|
package/dist/preset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../preset/src/defaultPreset.ts"],"names":[],"mappings":";;;;;AAuBA,IAAM,sBAAA,GAAyB;AAAA;AAAA,EAE7B,gCAAA;AAAA,EACA,gCAAA;AAAA,EACA,kCAAA;AAAA,EACA,uCAAA;AAAA;AAAA,EAEA,4BAAA;AAAA,EACA,cAAA;AAAA;AAAA,EAEA;AACF,CAAA;AAMO,IAAM,YAAA,GAAe;AAAA,EAC1B,MAAA,EAAQ;AAAA,IACN,OAAA,EAAS,EAAE,OAAA,EAAS,SAAA,EAAW,OAAO,SAAA,EAAW,MAAA,EAAQ,SAAA,EAAW,UAAA,EAAY,SAAA,EAAU;AAAA,IAC1F,SAAA,EAAW,EAAE,OAAA,EAAS,SAAA,EAAW,OAAO,SAAA,EAAW,MAAA,EAAQ,SAAA,EAAW,UAAA,EAAY,SAAA,EAAU;AAAA,IAC5F,MAAA,EAAQ,EAAE,OAAA,EAAS,SAAA,EAAW,OAAO,SAAA,EAAW,MAAA,EAAQ,SAAA,EAAW,UAAA,EAAY,SAAA,EAAU;AAAA,IACzF,OAAA,EAAS,EAAE,OAAA,EAAS,SAAA,EAAW,YAAY,SAAA,EAAU;AAAA,IACrD,OAAA,EAAS,EAAE,OAAA,EAAS,SAAA,EAAW,YAAY,SAAA,EAAU;AAAA,IACrD,MAAA,EAAQ,EAAE,OAAA,EAAS,SAAA,EAAW,YAAY,SAAA,EAAU;AAAA,IACpD,IAAA,EAAM,EAAE,OAAA,EAAS,SAAA,EAAW,YAAY,SAAA,EAAU;AAAA,IAClD,OAAA,EAAS,SAAA;AAAA,IACT,MAAA,EAAQ,SAAA;AAAA,I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A;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA,QAAA,EAyFC,YAAA,CAAa,IAAA,CAAK,YAAY,CAAC;AAAA,CAAA;AAEzC;AAQO,SAAS,sBAAA,CACd,YAAA,GAAe,gCAAA,EACf,YAAA,GAAe,sBAAA,EACP;AACR,EAAA,OAAO,CAAA;AAAA;;AAAA;AAAA;AAAA,uBAAA,EAKgB,IAAA,CAAK,SAAA,CAAU,YAAY,CAAC,CAAA;AAAA;AAAA;;AAAA;AAAA;AAAA,WAAA,EAMxC,IAAA,CAAK,SAAA,CAAU,YAAA,EAAc,IAAA,EAAM,CAAC,CAAC,CAAA;AAAA;AAAA;AAAA,CAAA;AAIlD","file":"preset.js","sourcesContent":["/**\n * tailwind-styled-v4 — Default Preset\n *\n * Tailwind config built-in yang dipakai ketika developer tidak punya\n * tailwind.config.ts / tailwind.config.js di project mereka.\n *\n * Developer tidak perlu setup apapun:\n * npm install tailwind-styled-v4\n * → langsung bisa tw.div`p-4 bg-blue-500`\n *\n * Preset ini juga menyediakan design tokens yang consistent\n * untuk semua project yang pakai tailwind-styled-v4.\n *\n * Override per-project:\n * // tailwind.config.ts\n * import { defaultPreset } from \"tailwind-styled-v4/preset\"\n * export default { presets: [defaultPreset], theme: { extend: {...} } }\n */\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Content paths — auto-detect berdasarkan project structure\n// ─────────────────────────────────────────────────────────────────────────────\n\nconst STANDARD_CONTENT_PATHS = [\n // Next.js App Router\n \"./src/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./app/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./pages/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./components/**/*.{tsx,ts,jsx,js,mdx}\",\n // Vite / React\n \"./src/**/*.{tsx,ts,jsx,js}\",\n \"./index.html\",\n // Monorepo\n \"../../packages/**/src/**/*.{tsx,ts,jsx,js}\",\n]\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Design tokens — consistent across all tailwind-styled-v4 projects\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const designTokens = {\n colors: {\n primary: { DEFAULT: \"#3b82f6\", hover: \"#2563eb\", active: \"#1d4ed8\", foreground: \"#ffffff\" },\n secondary: { DEFAULT: \"#6366f1\", hover: \"#4f46e5\", active: \"#4338ca\", foreground: \"#ffffff\" },\n accent: { DEFAULT: \"#f59e0b\", hover: \"#d97706\", active: \"#b45309\", foreground: \"#000000\" },\n success: { DEFAULT: \"#10b981\", foreground: \"#ffffff\" },\n warning: { DEFAULT: \"#f59e0b\", foreground: \"#000000\" },\n danger: { DEFAULT: \"#ef4444\", foreground: \"#ffffff\" },\n info: { DEFAULT: \"#3b82f6\", foreground: \"#ffffff\" },\n surface: \"#18181b\",\n border: \"#27272a\",\n muted: \"#71717a\",\n subtle: \"#3f3f46\",\n },\n\n spacing: {\n 1: \"0.25rem\",\n 2: \"0.5rem\",\n 3: \"0.75rem\",\n 4: \"1rem\",\n 5: \"1.25rem\",\n 6: \"1.5rem\",\n 8: \"2rem\",\n 10: \"2.5rem\",\n 12: \"3rem\",\n 16: \"4rem\",\n },\n\n breakpoints: {\n sm: \"40rem\",\n md: \"48rem\",\n lg: \"64rem\",\n xl: \"80rem\",\n \"2xl\": \"96rem\",\n },\n\n fontWeight: {\n normal: \"400\",\n medium: \"500\",\n semibold: \"600\",\n bold: \"700\",\n },\n\n fontFamily: {\n sans: [\"InterVariable\", \"Inter\", \"system-ui\", \"sans-serif\"],\n mono: [\"JetBrains Mono\", \"Fira Code\", \"Consolas\", \"monospace\"],\n },\n\n borderRadius: {\n sm: \"0.25rem\",\n DEFAULT: \"0.5rem\",\n md: \"0.5rem\",\n lg: \"0.75rem\",\n xl: \"1rem\",\n \"2xl\": \"1.5rem\",\n full: \"9999px\",\n },\n\n animation: {\n \"fade-in\": \"fadeIn 0.2s ease-out\",\n \"fade-out\": \"fadeOut 0.2s ease-in\",\n \"slide-up\": \"slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"slide-down\": \"slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"scale-in\": \"scaleIn 0.2s ease-out\",\n },\n\n keyframes: {\n fadeIn: { from: { opacity: \"0\" }, to: { opacity: \"1\" } },\n fadeOut: { from: { opacity: \"1\" }, to: { opacity: \"0\" } },\n slideUp: {\n from: { transform: \"translateY(8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n slideDown: {\n from: { transform: \"translateY(-8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n scaleIn: {\n from: { transform: \"scale(0.95)\", opacity: \"0\" },\n to: { transform: \"scale(1)\", opacity: \"1\" },\n },\n },\n} as const\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Tailwind Config — dipakai sebagai fallback + preset\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultPreset = {\n content: STANDARD_CONTENT_PATHS,\n\n darkMode: \"class\" as const,\n\n theme: {\n extend: {\n colors: designTokens.colors,\n fontFamily: designTokens.fontFamily,\n borderRadius: designTokens.borderRadius,\n animation: designTokens.animation,\n keyframes: designTokens.keyframes,\n },\n },\n\n plugins: [],\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Theme CSS — Tailwind v4 @theme block\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultThemeCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config globals.css — tidak perlu @tailwind base dll\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultGlobalCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n/* tailwind-styled-v4 — zero-config base styles */\n*, *::before, *::after {\n box-sizing: border-box;\n}\n\nhtml {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n}\n\nbody {\n margin: 0;\n font-family: var(--font-sans, system-ui, sans-serif);\n background: var(--color-surface, #18181b);\n color: var(--color-foreground, #fafafa);\n}\n`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config Tailwind v4 CSS generator\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindCss(contentPaths = STANDARD_CONTENT_PATHS): string {\n return `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n@source ${contentPaths.join(\"\\n@source \")}\n`\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config tailwind.config.ts generator\n// DEPRECATED: Use generateTailwindCss for Tailwind v4 instead\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindConfig(\n safelistPath = \".tailwind-styled-safelist.json\",\n contentPaths = STANDARD_CONTENT_PATHS\n): string {\n return `import type { Config } from \"tailwindcss\"\nimport { defaultPreset } from \"tailwind-styled-v4/preset\"\n\n// Auto-generated safelist dari tailwind-styled-v4 compiler\nconst safelist = (() => {\n try { return require(${JSON.stringify(safelistPath)}) as string[] }\n catch { return [] }\n})()\n\nexport default {\n presets: [defaultPreset],\n content: ${JSON.stringify(contentPaths, null, 2)},\n safelist,\n} satisfies Config\n`\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../packages/preset/src/defaultPreset.ts"],"names":[],"mappings":";;;;;AAuBA,IAAM,sBAAA,GAAyB;AAAA;AAAA,EAE7B,gCAAA;AAAA,EACA,gCAAA;AAAA,EACA,kCAAA;AAAA,EACA,uCAAA;AAAA;AAAA,EAEA,4BAAA;AAAA,EACA,cAAA;AAAA;AAAA,EAEA;AACF,CAAA;AAMO,IAAM,YAAA,GAAe;AAAA,EAC1B,MAAA,EAAQ;AAAA,IACN,OAAA,EAAS,EAAE,OAAA,EAAS,SAAA,EAAW,OAAO,SAAA,EAAW,MAAA,EAAQ,SAAA,EAAW,UAAA,EAAY,SAAA,EAAU;AAAA,IAC1F,SAAA,EAAW,EA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;AAAA;AAAA;AAAA,uBAAA,EAKgB,IAAA,CAAK,SAAA,CAAU,YAAY,CAAC,CAAA;AAAA;AAAA;;AAAA;AAAA;AAAA,WAAA,EAMxC,IAAA,CAAK,SAAA,CAAU,YAAA,EAAc,IAAA,EAAM,CAAC,CAAC,CAAA;AAAA;AAAA;AAAA,CAAA;AAIlD","file":"preset.js","sourcesContent":["/**\n * tailwind-styled-v4 — Default Preset\n *\n * Tailwind config built-in yang dipakai ketika developer tidak punya\n * tailwind.config.ts / tailwind.config.js di project mereka.\n *\n * Developer tidak perlu setup apapun:\n * npm install tailwind-styled-v4\n * → langsung bisa tw.div`p-4 bg-blue-500`\n *\n * Preset ini juga menyediakan design tokens yang consistent\n * untuk semua project yang pakai tailwind-styled-v4.\n *\n * Override per-project:\n * // tailwind.config.ts\n * import { defaultPreset } from \"tailwind-styled-v4/preset\"\n * export default { presets: [defaultPreset], theme: { extend: {...} } }\n */\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Content paths — auto-detect berdasarkan project structure\n// ─────────────────────────────────────────────────────────────────────────────\n\nconst STANDARD_CONTENT_PATHS = [\n // Next.js App Router\n \"./src/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./app/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./pages/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./components/**/*.{tsx,ts,jsx,js,mdx}\",\n // Vite / React\n \"./src/**/*.{tsx,ts,jsx,js}\",\n \"./index.html\",\n // Monorepo\n \"../../packages/**/src/**/*.{tsx,ts,jsx,js}\",\n]\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Design tokens — consistent across all tailwind-styled-v4 projects\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const designTokens = {\n colors: {\n primary: { DEFAULT: \"#3b82f6\", hover: \"#2563eb\", active: \"#1d4ed8\", foreground: \"#ffffff\" },\n secondary: { DEFAULT: \"#6366f1\", hover: \"#4f46e5\", active: \"#4338ca\", foreground: \"#ffffff\" },\n accent: { DEFAULT: \"#f59e0b\", hover: \"#d97706\", active: \"#b45309\", foreground: \"#000000\" },\n success: { DEFAULT: \"#10b981\", foreground: \"#ffffff\" },\n warning: { DEFAULT: \"#f59e0b\", foreground: \"#000000\" },\n danger: { DEFAULT: \"#ef4444\", foreground: \"#ffffff\" },\n info: { DEFAULT: \"#3b82f6\", foreground: \"#ffffff\" },\n surface: \"#18181b\",\n border: \"#27272a\",\n muted: \"#71717a\",\n subtle: \"#3f3f46\",\n },\n\n spacing: {\n 1: \"0.25rem\",\n 2: \"0.5rem\",\n 3: \"0.75rem\",\n 4: \"1rem\",\n 5: \"1.25rem\",\n 6: \"1.5rem\",\n 8: \"2rem\",\n 10: \"2.5rem\",\n 12: \"3rem\",\n 16: \"4rem\",\n },\n\n breakpoints: {\n sm: \"40rem\",\n md: \"48rem\",\n lg: \"64rem\",\n xl: \"80rem\",\n \"2xl\": \"96rem\",\n },\n\n fontWeight: {\n normal: \"400\",\n medium: \"500\",\n semibold: \"600\",\n bold: \"700\",\n },\n\n fontFamily: {\n sans: [\"InterVariable\", \"Inter\", \"system-ui\", \"sans-serif\"],\n mono: [\"JetBrains Mono\", \"Fira Code\", \"Consolas\", \"monospace\"],\n },\n\n borderRadius: {\n sm: \"0.25rem\",\n DEFAULT: \"0.5rem\",\n md: \"0.5rem\",\n lg: \"0.75rem\",\n xl: \"1rem\",\n \"2xl\": \"1.5rem\",\n full: \"9999px\",\n },\n\n animation: {\n \"fade-in\": \"fadeIn 0.2s ease-out\",\n \"fade-out\": \"fadeOut 0.2s ease-in\",\n \"slide-up\": \"slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"slide-down\": \"slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"scale-in\": \"scaleIn 0.2s ease-out\",\n },\n\n keyframes: {\n fadeIn: { from: { opacity: \"0\" }, to: { opacity: \"1\" } },\n fadeOut: { from: { opacity: \"1\" }, to: { opacity: \"0\" } },\n slideUp: {\n from: { transform: \"translateY(8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n slideDown: {\n from: { transform: \"translateY(-8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n scaleIn: {\n from: { transform: \"scale(0.95)\", opacity: \"0\" },\n to: { transform: \"scale(1)\", opacity: \"1\" },\n },\n },\n} as const\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Tailwind Config — dipakai sebagai fallback + preset\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultPreset = {\n content: STANDARD_CONTENT_PATHS,\n\n darkMode: \"class\" as const,\n\n theme: {\n extend: {\n colors: designTokens.colors,\n fontFamily: designTokens.fontFamily,\n borderRadius: designTokens.borderRadius,\n animation: designTokens.animation,\n keyframes: designTokens.keyframes,\n },\n },\n\n plugins: [],\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Theme CSS — Tailwind v4 @theme block\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultThemeCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config globals.css — tidak perlu @tailwind base dll\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultGlobalCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n/* tailwind-styled-v4 — zero-config base styles */\n*, *::before, *::after {\n box-sizing: border-box;\n}\n\nhtml {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n}\n\nbody {\n margin: 0;\n font-family: var(--font-sans, system-ui, sans-serif);\n background: var(--color-surface, #18181b);\n color: var(--color-foreground, #fafafa);\n}\n`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config Tailwind v4 CSS generator\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindCss(contentPaths = STANDARD_CONTENT_PATHS): string {\n return `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n@source ${contentPaths.join(\"\\n@source \")}\n`\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config tailwind.config.ts generator\n// DEPRECATED: Use generateTailwindCss for Tailwind v4 instead\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindConfig(\n safelistPath = \".tailwind-styled-safelist.json\",\n contentPaths = STANDARD_CONTENT_PATHS\n): string {\n return `import type { Config } from \"tailwindcss\"\nimport { defaultPreset } from \"tailwind-styled-v4/preset\"\n\n// Auto-generated safelist dari tailwind-styled-v4 compiler\nconst safelist = (() => {\n try { return require(${JSON.stringify(safelistPath)}) as string[] }\n catch { return [] }\n})()\n\nexport default {\n presets: [defaultPreset],\n content: ${JSON.stringify(contentPaths, null, 2)},\n safelist,\n} satisfies Config\n`\n}\n"]}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/* tailwind-styled-v4 v5.0.1 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/* tailwind-styled-v4 v4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
6
|
-
|
|
7
|
-
// ../preset/src/defaultPreset.ts
|
|
3
|
+
// packages/preset/src/defaultPreset.ts
|
|
8
4
|
var STANDARD_CONTENT_PATHS = [
|
|
9
5
|
// Next.js App Router
|
|
10
6
|
"./src/**/*.{tsx,ts,jsx,js,mdx}",
|
|
@@ -413,11 +409,6 @@ export default {
|
|
|
413
409
|
`;
|
|
414
410
|
}
|
|
415
411
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
exports.designTokens = designTokens;
|
|
420
|
-
exports.generateTailwindConfig = generateTailwindConfig;
|
|
421
|
-
exports.generateTailwindCss = generateTailwindCss;
|
|
422
|
-
//# sourceMappingURL=preset.cjs.map
|
|
423
|
-
//# sourceMappingURL=preset.cjs.map
|
|
412
|
+
export { defaultGlobalCss, defaultPreset, defaultThemeCss, designTokens, generateTailwindConfig, generateTailwindCss };
|
|
413
|
+
//# sourceMappingURL=preset.mjs.map
|
|
414
|
+
//# sourceMappingURL=preset.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../packages/preset/src/defaultPreset.ts"],"names":[],"mappings":";;;AAuBA,IAAM,sBAAA,GAAyB;AAAA;AAAA,EAE7B,gCAAA;AAAA,EACA,gCAAA;AAAA,EACA,kCAAA;AAAA,EACA,uCAAA;AAAA;AAAA,EAEA,4BAAA;AAAA,EACA,cAAA;AAAA;AAAA,EAEA;AACF,C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A;AAAA;AAAA;AAAA;AAAA;;AAAA,QAAA,EAyFC,YAAA,CAAa,IAAA,CAAK,YAAY,CAAC;AAAA,CAAA;AAEzC;AAQO,SAAS,sBAAA,CACd,YAAA,GAAe,gCAAA,EACf,YAAA,GAAe,sBAAA,EACP;AACR,EAAA,OAAO,CAAA;AAAA;;AAAA;AAAA;AAAA,uBAAA,EAKgB,IAAA,CAAK,SAAA,CAAU,YAAY,CAAC,CAAA;AAAA;AAAA;;AAAA;AAAA;AAAA,WAAA,EAMxC,IAAA,CAAK,SAAA,CAAU,YAAA,EAAc,IAAA,EAAM,CAAC,CAAC,CAAA;AAAA;AAAA;AAAA,CAAA;AAIlD","file":"preset.mjs","sourcesContent":["/**\n * tailwind-styled-v4 — Default Preset\n *\n * Tailwind config built-in yang dipakai ketika developer tidak punya\n * tailwind.config.ts / tailwind.config.js di project mereka.\n *\n * Developer tidak perlu setup apapun:\n * npm install tailwind-styled-v4\n * → langsung bisa tw.div`p-4 bg-blue-500`\n *\n * Preset ini juga menyediakan design tokens yang consistent\n * untuk semua project yang pakai tailwind-styled-v4.\n *\n * Override per-project:\n * // tailwind.config.ts\n * import { defaultPreset } from \"tailwind-styled-v4/preset\"\n * export default { presets: [defaultPreset], theme: { extend: {...} } }\n */\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Content paths — auto-detect berdasarkan project structure\n// ─────────────────────────────────────────────────────────────────────────────\n\nconst STANDARD_CONTENT_PATHS = [\n // Next.js App Router\n \"./src/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./app/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./pages/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./components/**/*.{tsx,ts,jsx,js,mdx}\",\n // Vite / React\n \"./src/**/*.{tsx,ts,jsx,js}\",\n \"./index.html\",\n // Monorepo\n \"../../packages/**/src/**/*.{tsx,ts,jsx,js}\",\n]\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Design tokens — consistent across all tailwind-styled-v4 projects\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const designTokens = {\n colors: {\n primary: { DEFAULT: \"#3b82f6\", hover: \"#2563eb\", active: \"#1d4ed8\", foreground: \"#ffffff\" },\n secondary: { DEFAULT: \"#6366f1\", hover: \"#4f46e5\", active: \"#4338ca\", foreground: \"#ffffff\" },\n accent: { DEFAULT: \"#f59e0b\", hover: \"#d97706\", active: \"#b45309\", foreground: \"#000000\" },\n success: { DEFAULT: \"#10b981\", foreground: \"#ffffff\" },\n warning: { DEFAULT: \"#f59e0b\", foreground: \"#000000\" },\n danger: { DEFAULT: \"#ef4444\", foreground: \"#ffffff\" },\n info: { DEFAULT: \"#3b82f6\", foreground: \"#ffffff\" },\n surface: \"#18181b\",\n border: \"#27272a\",\n muted: \"#71717a\",\n subtle: \"#3f3f46\",\n },\n\n spacing: {\n 1: \"0.25rem\",\n 2: \"0.5rem\",\n 3: \"0.75rem\",\n 4: \"1rem\",\n 5: \"1.25rem\",\n 6: \"1.5rem\",\n 8: \"2rem\",\n 10: \"2.5rem\",\n 12: \"3rem\",\n 16: \"4rem\",\n },\n\n breakpoints: {\n sm: \"40rem\",\n md: \"48rem\",\n lg: \"64rem\",\n xl: \"80rem\",\n \"2xl\": \"96rem\",\n },\n\n fontWeight: {\n normal: \"400\",\n medium: \"500\",\n semibold: \"600\",\n bold: \"700\",\n },\n\n fontFamily: {\n sans: [\"InterVariable\", \"Inter\", \"system-ui\", \"sans-serif\"],\n mono: [\"JetBrains Mono\", \"Fira Code\", \"Consolas\", \"monospace\"],\n },\n\n borderRadius: {\n sm: \"0.25rem\",\n DEFAULT: \"0.5rem\",\n md: \"0.5rem\",\n lg: \"0.75rem\",\n xl: \"1rem\",\n \"2xl\": \"1.5rem\",\n full: \"9999px\",\n },\n\n animation: {\n \"fade-in\": \"fadeIn 0.2s ease-out\",\n \"fade-out\": \"fadeOut 0.2s ease-in\",\n \"slide-up\": \"slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"slide-down\": \"slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"scale-in\": \"scaleIn 0.2s ease-out\",\n },\n\n keyframes: {\n fadeIn: { from: { opacity: \"0\" }, to: { opacity: \"1\" } },\n fadeOut: { from: { opacity: \"1\" }, to: { opacity: \"0\" } },\n slideUp: {\n from: { transform: \"translateY(8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n slideDown: {\n from: { transform: \"translateY(-8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n scaleIn: {\n from: { transform: \"scale(0.95)\", opacity: \"0\" },\n to: { transform: \"scale(1)\", opacity: \"1\" },\n },\n },\n} as const\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Tailwind Config — dipakai sebagai fallback + preset\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultPreset = {\n content: STANDARD_CONTENT_PATHS,\n\n darkMode: \"class\" as const,\n\n theme: {\n extend: {\n colors: designTokens.colors,\n fontFamily: designTokens.fontFamily,\n borderRadius: designTokens.borderRadius,\n animation: designTokens.animation,\n keyframes: designTokens.keyframes,\n },\n },\n\n plugins: [],\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Theme CSS — Tailwind v4 @theme block\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultThemeCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config globals.css — tidak perlu @tailwind base dll\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultGlobalCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n/* tailwind-styled-v4 — zero-config base styles */\n*, *::before, *::after {\n box-sizing: border-box;\n}\n\nhtml {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n}\n\nbody {\n margin: 0;\n font-family: var(--font-sans, system-ui, sans-serif);\n background: var(--color-surface, #18181b);\n color: var(--color-foreground, #fafafa);\n}\n`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config Tailwind v4 CSS generator\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindCss(contentPaths = STANDARD_CONTENT_PATHS): string {\n return `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n@source ${contentPaths.join(\"\\n@source \")}\n`\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config tailwind.config.ts generator\n// DEPRECATED: Use generateTailwindCss for Tailwind v4 instead\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindConfig(\n safelistPath = \".tailwind-styled-safelist.json\",\n contentPaths = STANDARD_CONTENT_PATHS\n): string {\n return `import type { Config } from \"tailwindcss\"\nimport { defaultPreset } from \"tailwind-styled-v4/preset\"\n\n// Auto-generated safelist dari tailwind-styled-v4 compiler\nconst safelist = (() => {\n try { return require(${JSON.stringify(safelistPath)}) as string[] }\n catch { return [] }\n})()\n\nexport default {\n presets: [defaultPreset],\n content: ${JSON.stringify(contentPaths, null, 2)},\n safelist,\n} satisfies Config\n`\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tailwind-styled-v4 — Rspack Plugin v5 (stable)
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* import { tailwindStyledRspackPlugin } from "@tailwind-styled/rspack"
|
|
6
|
+
*
|
|
7
|
+
* export default defineConfig({
|
|
8
|
+
* plugins: [tailwindStyledRspackPlugin()],
|
|
9
|
+
* })
|
|
10
|
+
*
|
|
11
|
+
* v5:
|
|
12
|
+
* - Simplified API
|
|
13
|
+
* - Uses @tailwind-styled/engine for build
|
|
14
|
+
* - Mode always zero-runtime
|
|
15
|
+
*/
|
|
16
|
+
interface RspackPluginOptions {
|
|
17
|
+
/** File patterns to include. Default: /\.[jt]sx?$/ */
|
|
18
|
+
include?: RegExp;
|
|
19
|
+
/** File patterns to exclude. Default: /node_modules/ */
|
|
20
|
+
exclude?: RegExp;
|
|
21
|
+
/** Add data-tw debug attributes in dev. Default: true in dev */
|
|
22
|
+
addDataAttr?: boolean;
|
|
23
|
+
/** Enable analyzer. Default: false */
|
|
24
|
+
analyze?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare class TailwindStyledRspackPlugin {
|
|
27
|
+
private opts;
|
|
28
|
+
constructor(opts?: RspackPluginOptions);
|
|
29
|
+
apply(compiler: any): void;
|
|
30
|
+
}
|
|
31
|
+
declare function tailwindStyledRspackPlugin(opts?: RspackPluginOptions): TailwindStyledRspackPlugin;
|
|
32
|
+
|
|
33
|
+
export { type RspackPluginOptions, TailwindStyledRspackPlugin, tailwindStyledRspackPlugin as default, tailwindStyledRspackPlugin };
|
package/dist/rspack.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tailwind-styled-v4 — Rspack Plugin v5 (stable)
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* import { tailwindStyledRspackPlugin } from "@tailwind-styled/rspack"
|
|
6
|
+
*
|
|
7
|
+
* export default defineConfig({
|
|
8
|
+
* plugins: [tailwindStyledRspackPlugin()],
|
|
9
|
+
* })
|
|
10
|
+
*
|
|
11
|
+
* v5:
|
|
12
|
+
* - Simplified API
|
|
13
|
+
* - Uses @tailwind-styled/engine for build
|
|
14
|
+
* - Mode always zero-runtime
|
|
15
|
+
*/
|
|
16
|
+
interface RspackPluginOptions {
|
|
17
|
+
/** File patterns to include. Default: /\.[jt]sx?$/ */
|
|
18
|
+
include?: RegExp;
|
|
19
|
+
/** File patterns to exclude. Default: /node_modules/ */
|
|
20
|
+
exclude?: RegExp;
|
|
21
|
+
/** Add data-tw debug attributes in dev. Default: true in dev */
|
|
22
|
+
addDataAttr?: boolean;
|
|
23
|
+
/** Enable analyzer. Default: false */
|
|
24
|
+
analyze?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare class TailwindStyledRspackPlugin {
|
|
27
|
+
private opts;
|
|
28
|
+
constructor(opts?: RspackPluginOptions);
|
|
29
|
+
apply(compiler: any): void;
|
|
30
|
+
}
|
|
31
|
+
declare function tailwindStyledRspackPlugin(opts?: RspackPluginOptions): TailwindStyledRspackPlugin;
|
|
32
|
+
|
|
33
|
+
export { type RspackPluginOptions, TailwindStyledRspackPlugin, tailwindStyledRspackPlugin as default, tailwindStyledRspackPlugin };
|