reend-components 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -9
- package/dist/bin/cli.cjs +9578 -0
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.cjs.map +1 -1
- package/dist/lib/index.d.ts +383 -14
- package/dist/lib/index.mjs +2878 -1096
- package/dist/lib/index.mjs.map +1 -1
- package/package.json +15 -3
- package/src/tailwind-preset.ts +93 -84
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reend-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Tactical, sci-fi, and gaming-inspired React component library — Arknights: Endfield Design System",
|
|
6
6
|
"type": "module",
|
|
@@ -25,8 +25,12 @@
|
|
|
25
25
|
"require": "./src/tailwind-preset.ts"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
+
"bin": {
|
|
29
|
+
"reend-ui": "./dist/bin/cli.cjs"
|
|
30
|
+
},
|
|
28
31
|
"files": [
|
|
29
32
|
"dist/lib",
|
|
33
|
+
"dist/bin",
|
|
30
34
|
"src/styles",
|
|
31
35
|
"src/tailwind-preset.ts",
|
|
32
36
|
"README.md",
|
|
@@ -80,11 +84,14 @@
|
|
|
80
84
|
},
|
|
81
85
|
"scripts": {
|
|
82
86
|
"dev": "vite",
|
|
83
|
-
"prebuild": "node --experimental-strip-types scripts/
|
|
87
|
+
"prebuild": "node --experimental-strip-types scripts/sync-release.ts",
|
|
84
88
|
"build": "vite build",
|
|
85
89
|
"build:dev": "vite build --mode development",
|
|
86
90
|
"build:lib": "vite build --config vite.lib.config.ts",
|
|
87
|
-
"
|
|
91
|
+
"build:cli": "node scripts/build-cli.mjs",
|
|
92
|
+
"prepublishOnly": "npm run build:lib && npm run build:cli",
|
|
93
|
+
"version": "node --experimental-strip-types scripts/sync-release.ts && git add CHANGELOG.md public/llms.txt",
|
|
94
|
+
"sync": "node --experimental-strip-types scripts/sync-release.ts",
|
|
88
95
|
"lint": "eslint .",
|
|
89
96
|
"preview": "vite preview",
|
|
90
97
|
"test": "vitest run",
|
|
@@ -113,6 +120,7 @@
|
|
|
113
120
|
"tailwindcss-animate": "^1.0.7"
|
|
114
121
|
},
|
|
115
122
|
"devDependencies": {
|
|
123
|
+
"@codesandbox/sandpack-react": "^2.20.0",
|
|
116
124
|
"@eslint/js": "^9.32.0",
|
|
117
125
|
"@testing-library/dom": "^10.4.1",
|
|
118
126
|
"@testing-library/jest-dom": "^6.6.0",
|
|
@@ -123,6 +131,9 @@
|
|
|
123
131
|
"@vitejs/plugin-react-swc": "^3.11.0",
|
|
124
132
|
"@vitest/coverage-v8": "^3.2.4",
|
|
125
133
|
"autoprefixer": "^10.4.21",
|
|
134
|
+
"chalk": "^5.6.2",
|
|
135
|
+
"commander": "^14.0.3",
|
|
136
|
+
"esbuild": "^0.27.3",
|
|
126
137
|
"eslint": "^9.32.0",
|
|
127
138
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
128
139
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
@@ -134,6 +145,7 @@
|
|
|
134
145
|
"jsdom": "^20.0.3",
|
|
135
146
|
"lucide-react": "^0.462.0",
|
|
136
147
|
"postcss": "^8.5.6",
|
|
148
|
+
"prompts": "^2.4.2",
|
|
137
149
|
"react": "^18.3.1",
|
|
138
150
|
"react-dom": "^18.3.1",
|
|
139
151
|
"react-error-boundary": "^6.1.1",
|
package/src/tailwind-preset.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ReEnd-Components — Tailwind CSS Preset
|
|
3
|
-
* Arknights: Endfield Design System
|
|
4
|
-
*
|
|
5
3
|
* Usage:
|
|
6
4
|
* // tailwind.config.ts
|
|
7
5
|
* import reendPreset from "reend-components/tailwind";
|
|
@@ -15,6 +13,8 @@
|
|
|
15
13
|
*/
|
|
16
14
|
|
|
17
15
|
import type { Config } from "tailwindcss";
|
|
16
|
+
import tailwindcssAnimate from "tailwindcss-animate";
|
|
17
|
+
import plugin from "tailwindcss/plugin";
|
|
18
18
|
|
|
19
19
|
const reendPreset: Partial<Config> = {
|
|
20
20
|
darkMode: ["class"],
|
|
@@ -133,7 +133,6 @@ const reendPreset: Partial<Config> = {
|
|
|
133
133
|
},
|
|
134
134
|
// ─── Keyframes ───────────────────────────────────────────────────────
|
|
135
135
|
keyframes: {
|
|
136
|
-
// Existing
|
|
137
136
|
"accordion-down": {
|
|
138
137
|
from: { height: "0" },
|
|
139
138
|
to: { height: "var(--radix-accordion-content-height)" },
|
|
@@ -142,7 +141,6 @@ const reendPreset: Partial<Config> = {
|
|
|
142
141
|
from: { height: "var(--radix-accordion-content-height)" },
|
|
143
142
|
to: { height: "0" },
|
|
144
143
|
},
|
|
145
|
-
// Signature & design system animations
|
|
146
144
|
fadeIn: {
|
|
147
145
|
from: { opacity: "0" },
|
|
148
146
|
to: { opacity: "1" },
|
|
@@ -194,6 +192,14 @@ const reendPreset: Partial<Config> = {
|
|
|
194
192
|
from: { opacity: "0", transform: "translateY(8px)" },
|
|
195
193
|
to: { opacity: "1", transform: "translateY(0)" },
|
|
196
194
|
},
|
|
195
|
+
"dialog-in": {
|
|
196
|
+
from: { opacity: "0", scale: "0.96" },
|
|
197
|
+
to: { opacity: "1", scale: "1" },
|
|
198
|
+
},
|
|
199
|
+
"frequency-bar": {
|
|
200
|
+
"0%": { transform: "scaleY(0.15)" },
|
|
201
|
+
"100%": { transform: "scaleY(1)" },
|
|
202
|
+
},
|
|
197
203
|
},
|
|
198
204
|
// ─── Animation utilities ─────────────────────────────────────────────
|
|
199
205
|
animation: {
|
|
@@ -211,96 +217,99 @@ const reendPreset: Partial<Config> = {
|
|
|
211
217
|
skeleton: "skeletonShimmer 1.5s infinite",
|
|
212
218
|
shrink: "shrink 5s linear forwards",
|
|
213
219
|
"count-up": "countUp 0.4s var(--ease-default, ease) forwards",
|
|
220
|
+
"dialog-in": "dialog-in 0.2s var(--ease-default, ease) forwards",
|
|
221
|
+
"frequency-bar": "frequency-bar 0.8s ease-in-out infinite alternate",
|
|
214
222
|
},
|
|
215
223
|
},
|
|
216
224
|
},
|
|
217
225
|
plugins: [
|
|
218
|
-
|
|
219
|
-
require("tailwindcss-animate"),
|
|
226
|
+
tailwindcssAnimate,
|
|
220
227
|
// ─── Endfield Signature Utilities ────────────────────────────────────
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
228
|
+
plugin(
|
|
229
|
+
({
|
|
230
|
+
addUtilities,
|
|
231
|
+
addComponents,
|
|
232
|
+
}: {
|
|
233
|
+
addUtilities: (
|
|
234
|
+
utilities: Record<string, Record<string, string>>,
|
|
235
|
+
) => void;
|
|
236
|
+
addComponents: (
|
|
237
|
+
components: Record<string, Record<string, string>>,
|
|
238
|
+
) => void;
|
|
239
|
+
}) => {
|
|
240
|
+
addComponents({
|
|
241
|
+
".clip-corner": {
|
|
242
|
+
"clip-path":
|
|
243
|
+
"polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px))",
|
|
244
|
+
},
|
|
245
|
+
".clip-corner-sm": {
|
|
246
|
+
"clip-path":
|
|
247
|
+
"polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px))",
|
|
248
|
+
},
|
|
249
|
+
".clip-corner-lg": {
|
|
250
|
+
"clip-path":
|
|
251
|
+
"polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px))",
|
|
252
|
+
},
|
|
253
|
+
});
|
|
241
254
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
"
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
});
|
|
255
|
+
addComponents({
|
|
256
|
+
".scanline-overlay": {
|
|
257
|
+
position: "relative",
|
|
258
|
+
},
|
|
259
|
+
".scanline-overlay::after": {
|
|
260
|
+
content: '""',
|
|
261
|
+
position: "absolute",
|
|
262
|
+
inset: "0",
|
|
263
|
+
background:
|
|
264
|
+
"repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.015) 2px, rgba(255, 255, 255, 0.015) 4px)",
|
|
265
|
+
"pointer-events": "none",
|
|
266
|
+
"z-index": "1",
|
|
267
|
+
},
|
|
268
|
+
});
|
|
257
269
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
"
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
});
|
|
270
|
+
addUtilities({
|
|
271
|
+
".animate-skeleton": {
|
|
272
|
+
background:
|
|
273
|
+
"linear-gradient(90deg, hsl(var(--surface-1)) 0%, hsl(var(--surface-2)) 50%, hsl(var(--surface-1)) 100%)",
|
|
274
|
+
"background-size": "200% 100%",
|
|
275
|
+
animation: "skeletonShimmer 1.5s infinite",
|
|
276
|
+
},
|
|
277
|
+
});
|
|
267
278
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
});
|
|
279
|
+
addUtilities({
|
|
280
|
+
".animate-slide-down": {
|
|
281
|
+
animation: "slideDown 0.3s ease forwards",
|
|
282
|
+
"transform-origin": "top",
|
|
283
|
+
overflow: "hidden",
|
|
284
|
+
},
|
|
285
|
+
});
|
|
276
286
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
});
|
|
287
|
+
addUtilities({
|
|
288
|
+
".glow-yellow": {
|
|
289
|
+
"box-shadow": "0 0 20px hsl(var(--primary) / 0.2)",
|
|
290
|
+
},
|
|
291
|
+
".glow-yellow-strong": {
|
|
292
|
+
"box-shadow": "0 0 40px hsl(var(--primary) / 0.3)",
|
|
293
|
+
},
|
|
294
|
+
".text-glow-yellow": {
|
|
295
|
+
"text-shadow": "0 0 20px hsl(var(--primary) / 0.3)",
|
|
296
|
+
},
|
|
297
|
+
});
|
|
289
298
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
299
|
+
addUtilities({
|
|
300
|
+
".gradient-line-h": {
|
|
301
|
+
height: "1px",
|
|
302
|
+
background:
|
|
303
|
+
"linear-gradient(90deg, transparent 0%, hsl(var(--primary)) 50%, transparent 100%)",
|
|
304
|
+
},
|
|
305
|
+
".gradient-line-v": {
|
|
306
|
+
width: "1px",
|
|
307
|
+
background:
|
|
308
|
+
"linear-gradient(180deg, transparent 0%, hsl(var(--primary)) 50%, transparent 100%)",
|
|
309
|
+
},
|
|
310
|
+
});
|
|
311
|
+
},
|
|
312
|
+
),
|
|
304
313
|
],
|
|
305
314
|
};
|
|
306
315
|
|