cyberui-2045 2.3.0 → 2.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.
Files changed (70) hide show
  1. package/AGENT.md +25 -23
  2. package/README.md +31 -28
  3. package/bin/init.js +11 -5
  4. package/bin/markers.js +18 -0
  5. package/bin/usage-content.js +136 -210
  6. package/dist/component-manifest.json +1454 -0
  7. package/dist/components/Badge.js +49 -0
  8. package/dist/components/Badge.js.map +1 -0
  9. package/dist/components/Button.js +62 -0
  10. package/dist/components/Button.js.map +1 -0
  11. package/dist/components/Card.js +31 -0
  12. package/dist/components/Card.js.map +1 -0
  13. package/dist/components/Carousel.js +585 -0
  14. package/dist/components/Carousel.js.map +1 -0
  15. package/dist/components/Checkbox.js +92 -0
  16. package/dist/components/Checkbox.js.map +1 -0
  17. package/dist/components/CircularProgress.js +87 -0
  18. package/dist/components/CircularProgress.js.map +1 -0
  19. package/dist/components/Divider.js +24 -0
  20. package/dist/components/Divider.js.map +1 -0
  21. package/dist/components/GradientText.js +27 -0
  22. package/dist/components/GradientText.js.map +1 -0
  23. package/dist/components/Image.js +369 -0
  24. package/dist/components/Image.js.map +1 -0
  25. package/dist/components/Input.js +70 -0
  26. package/dist/components/Input.js.map +1 -0
  27. package/dist/components/LinearProgress.js +39 -0
  28. package/dist/components/LinearProgress.js.map +1 -0
  29. package/dist/components/Modal.d.ts +19 -0
  30. package/dist/components/Modal.js +211 -0
  31. package/dist/components/Modal.js.map +1 -0
  32. package/dist/components/Notification.js +88 -0
  33. package/dist/components/Notification.js.map +1 -0
  34. package/dist/components/SectionTitle.js +33 -0
  35. package/dist/components/SectionTitle.js.map +1 -0
  36. package/dist/components/SegmentedProgress.js +82 -0
  37. package/dist/components/SegmentedProgress.js.map +1 -0
  38. package/dist/components/Select.js +93 -0
  39. package/dist/components/Select.js.map +1 -0
  40. package/dist/components/Skeleton.js +106 -0
  41. package/dist/components/Skeleton.js.map +1 -0
  42. package/dist/components/Steps.js +88 -0
  43. package/dist/components/Steps.js.map +1 -0
  44. package/dist/components/TabNavigation.js +153 -0
  45. package/dist/components/TabNavigation.js.map +1 -0
  46. package/dist/components/Timeline.js +99 -0
  47. package/dist/components/Timeline.js.map +1 -0
  48. package/dist/components/Toggle.js +73 -0
  49. package/dist/components/Toggle.js.map +1 -0
  50. package/dist/contexts/NotificationContext.js +100 -0
  51. package/dist/contexts/NotificationContext.js.map +1 -0
  52. package/dist/contexts/NotificationContextBase.js +6 -0
  53. package/dist/contexts/NotificationContextBase.js.map +1 -0
  54. package/dist/hooks/useAnimatedProgress.js +17 -0
  55. package/dist/hooks/useAnimatedProgress.js.map +1 -0
  56. package/dist/hooks/useCyberNotifications.js +14 -0
  57. package/dist/hooks/useCyberNotifications.js.map +1 -0
  58. package/dist/hooks/useCyberScrollbar.js +254 -0
  59. package/dist/hooks/useCyberScrollbar.js.map +1 -0
  60. package/dist/index.d.ts +1 -1
  61. package/dist/index.es.js +63 -5954
  62. package/dist/index.js +13 -13
  63. package/dist/utils/cn.js +9 -0
  64. package/dist/utils/cn.js.map +1 -0
  65. package/dist/utils/devWarn.d.ts +5 -0
  66. package/dist/utils/devWarn.js +8 -0
  67. package/dist/utils/devWarn.js.map +1 -0
  68. package/dist/utils/responsive.js +120 -0
  69. package/dist/utils/responsive.js.map +1 -0
  70. package/package.json +158 -125
@@ -0,0 +1,9 @@
1
+ import { twMerge as o } from "../node_modules/tailwind-merge/dist/bundle-mjs.js";
2
+ import { clsx as t } from "../node_modules/clsx/dist/clsx.js";
3
+ function n(...r) {
4
+ return o(t(r));
5
+ }
6
+ export {
7
+ n as cn
8
+ };
9
+ //# sourceMappingURL=cn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.js","sources":["../../src/utils/cn.ts"],"sourcesContent":["import { twMerge } from 'tailwind-merge';\r\nimport { clsx, type ClassValue } from 'clsx';\r\n\r\n/**\r\n * Merges Tailwind CSS class names, resolving conflicts so the last value wins.\r\n * Use this everywhere a component accepts a `className` prop.\r\n *\r\n * @example\r\n * cn('px-4 py-2', 'px-6') // → 'py-2 px-6'\r\n * cn('text-primary', className) // → user className wins on conflict\r\n */\r\nexport function cn(...inputs: ClassValue[]): string {\r\n return twMerge(clsx(inputs));\r\n}\r\n"],"names":["cn","inputs","twMerge","clsx"],"mappings":";;AAWO,SAASA,KAAMC,GAA8B;AAClD,SAAOC,EAAQC,EAAKF,CAAM,CAAC;AAC7B;"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Logs a `[cyberui-2045]`-prefixed console warning once per distinct `key` per
3
+ * session, so a misconfigured component re-rendering doesn't spam the console.
4
+ */
5
+ export declare function warnOnce(key: string, message: string): void;
@@ -0,0 +1,8 @@
1
+ const e = /* @__PURE__ */ new Set();
2
+ function a(n, r) {
3
+ e.has(n) || (e.add(n), console.warn(`[cyberui-2045] ${r}`));
4
+ }
5
+ export {
6
+ a as warnOnce
7
+ };
8
+ //# sourceMappingURL=devWarn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devWarn.js","sources":["../../src/utils/devWarn.ts"],"sourcesContent":["const warned = new Set<string>();\n\n/**\n * Logs a `[cyberui-2045]`-prefixed console warning once per distinct `key` per\n * session, so a misconfigured component re-rendering doesn't spam the console.\n */\nexport function warnOnce(key: string, message: string): void {\n if (warned.has(key)) return;\n warned.add(key);\n console.warn(`[cyberui-2045] ${message}`);\n}\n"],"names":["warned","warnOnce","key","message"],"mappings":"AAAA,MAAMA,wBAAa,IAAA;AAMZ,SAASC,EAASC,GAAaC,GAAuB;AAC3D,EAAIH,EAAO,IAAIE,CAAG,MAClBF,EAAO,IAAIE,CAAG,GACd,QAAQ,KAAK,kBAAkBC,CAAO,EAAE;AAC1C;"}
@@ -0,0 +1,120 @@
1
+ import { useCallback as d, useState as g, useEffect as o } from "react";
2
+ const x = (e) => typeof e == "object" && e !== null, h = (e, t) => {
3
+ if (!x(e))
4
+ return t[e] || "";
5
+ const s = [];
6
+ if (e.base && t[e.base] && s.push(t[e.base]), e.sm && t[e.sm]) {
7
+ const n = t[e.sm].split(" ").map((m) => `sm:${m}`);
8
+ s.push(...n);
9
+ }
10
+ if (e.md && t[e.md]) {
11
+ const n = t[e.md].split(" ").map((m) => `md:${m}`);
12
+ s.push(...n);
13
+ }
14
+ if (e.lg && t[e.lg]) {
15
+ const n = t[e.lg].split(" ").map((m) => `lg:${m}`);
16
+ s.push(...n);
17
+ }
18
+ if (e.xl && t[e.xl]) {
19
+ const n = t[e.xl].split(" ").map((m) => `xl:${m}`);
20
+ s.push(...n);
21
+ }
22
+ if (e["2xl"] && t[e["2xl"]]) {
23
+ const n = t[e["2xl"]].split(" ").map((m) => `2xl:${m}`);
24
+ s.push(...n);
25
+ }
26
+ return s.join(" ");
27
+ }, f = (...e) => e.filter(Boolean).join(" "), a = {
28
+ button: {
29
+ sm: "py-1 px-4 text-sm",
30
+ md: "py-2 px-6 text-lg",
31
+ lg: "py-3 px-8 text-xl"
32
+ },
33
+ badge: {
34
+ sm: "px-2 py-1 text-xs gap-1",
35
+ md: "px-4 py-2 text-sm gap-2",
36
+ lg: "px-6 py-3 text-base gap-3"
37
+ },
38
+ input: {
39
+ sm: "py-2 text-sm",
40
+ md: "py-3 text-base",
41
+ lg: "py-4 text-lg"
42
+ },
43
+ card: {
44
+ sm: "p-3 space-y-3 text-sm",
45
+ md: "p-6 space-y-6 text-base",
46
+ lg: "p-8 space-y-8 text-lg"
47
+ },
48
+ notification: {
49
+ sm: "p-3 space-x-2",
50
+ md: "p-4 space-x-4",
51
+ lg: "p-6 space-x-6"
52
+ },
53
+ tabNavigation: {
54
+ sm: "px-3 py-1 text-sm",
55
+ md: "px-6 py-2 text-lg",
56
+ lg: "px-8 py-3 text-xl"
57
+ },
58
+ linearProgress: {
59
+ width: {
60
+ sm: "w-48",
61
+ md: "w-80",
62
+ lg: "w-96"
63
+ },
64
+ height: {
65
+ sm: "h-1.5",
66
+ md: "h-3",
67
+ lg: "h-4"
68
+ }
69
+ },
70
+ skeleton: {
71
+ sm: "text-sm",
72
+ md: "text-base",
73
+ lg: "text-lg"
74
+ },
75
+ carousel: {
76
+ sm: "h-48",
77
+ md: "h-64",
78
+ lg: "h-80"
79
+ }
80
+ }, u = {
81
+ base: 0,
82
+ sm: 640,
83
+ md: 768,
84
+ lg: 1024,
85
+ xl: 1280,
86
+ "2xl": 1536
87
+ }, y = (e, t, s) => {
88
+ if (!x(e))
89
+ return e ?? s;
90
+ let n = e.base ?? s;
91
+ const m = ["sm", "md", "lg", "xl", "2xl"];
92
+ for (const i of m) {
93
+ const l = u[i];
94
+ t >= l && e[i] !== void 0 && (n = e[i]);
95
+ }
96
+ return n;
97
+ }, v = (e, t) => {
98
+ const s = d(
99
+ () => typeof window > "u" ? t : y(e, window.innerWidth, t),
100
+ [t, e]
101
+ ), [n, m] = g(s);
102
+ return o(() => {
103
+ if (!x(e)) {
104
+ m(e ?? t);
105
+ return;
106
+ }
107
+ const i = () => m(s());
108
+ return i(), window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
109
+ }, [t, s, e]), n;
110
+ };
111
+ export {
112
+ u as BREAKPOINT_PIXELS,
113
+ a as RESPONSIVE_SIZE_MAPS,
114
+ f as combineResponsiveClasses,
115
+ h as getResponsiveClasses,
116
+ x as isResponsiveObject,
117
+ y as resolveResponsiveValue,
118
+ v as useResponsiveValue
119
+ };
120
+ //# sourceMappingURL=responsive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responsive.js","sources":["../../src/utils/responsive.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from \"react\";\r\n\r\nexport type ResponsiveObject<T> = {\r\n base?: T;\r\n sm?: T;\r\n md?: T;\r\n lg?: T;\r\n xl?: T;\r\n \"2xl\"?: T;\r\n};\r\n\r\nexport type ResponsiveValue<T> = T | ResponsiveObject<T>;\r\n\r\n// Type guard to safely narrow a ResponsiveValue<T> to the object shape\r\nexport const isResponsiveObject = <T>(\r\n v: ResponsiveValue<T>\r\n): v is ResponsiveObject<T> => typeof v === \"object\" && v !== null;\r\n\r\nexport type Breakpoint = \"base\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\r\n/**\r\n * Resolves responsive classes based on the current viewport size.\r\n *\r\n * @param prop The responsive value configuration (string or object)\r\n * @param classMap Map of values to CSS classes\r\n * @returns A string of combined Tailwind classes\r\n */\r\nexport const getResponsiveClasses = <T extends string>(\r\n prop: ResponsiveValue<T>,\r\n classMap: Record<T, string>\r\n): string => {\r\n if (!isResponsiveObject(prop)) {\r\n return classMap[prop] || \"\";\r\n }\r\n\r\n const classes: string[] = [];\r\n\r\n if (prop.base && classMap[prop.base]) {\r\n classes.push(classMap[prop.base]);\r\n }\r\n\r\n if (prop.sm && classMap[prop.sm]) {\r\n const smClasses = classMap[prop.sm].split(\" \").map((cls) => `sm:${cls}`);\r\n classes.push(...smClasses);\r\n }\r\n\r\n if (prop.md && classMap[prop.md]) {\r\n const mdClasses = classMap[prop.md].split(\" \").map((cls) => `md:${cls}`);\r\n classes.push(...mdClasses);\r\n }\r\n\r\n if (prop.lg && classMap[prop.lg]) {\r\n const lgClasses = classMap[prop.lg].split(\" \").map((cls) => `lg:${cls}`);\r\n classes.push(...lgClasses);\r\n }\r\n\r\n if (prop.xl && classMap[prop.xl]) {\r\n const xlClasses = classMap[prop.xl].split(\" \").map((cls) => `xl:${cls}`);\r\n classes.push(...xlClasses);\r\n }\r\n\r\n if (prop[\"2xl\"] && classMap[prop[\"2xl\"]]) {\r\n const xl2Classes = classMap[prop[\"2xl\"]]\r\n .split(\" \")\r\n .map((cls) => `2xl:${cls}`);\r\n classes.push(...xl2Classes);\r\n }\r\n\r\n return classes.join(\" \");\r\n};\r\n\r\n/**\r\n * Combines multiple class strings, filtering out falsy values.\r\n *\r\n * @param classes List of class strings\r\n * @returns Combined class string\r\n */\r\nexport const combineResponsiveClasses = (\r\n ...classes: (string | undefined)[]\r\n): string => {\r\n return classes.filter(Boolean).join(\" \");\r\n};\r\n\r\nexport const RESPONSIVE_SIZE_MAPS = {\r\n button: {\r\n sm: \"py-1 px-4 text-sm\",\r\n md: \"py-2 px-6 text-lg\",\r\n lg: \"py-3 px-8 text-xl\",\r\n },\r\n badge: {\r\n sm: \"px-2 py-1 text-xs gap-1\",\r\n md: \"px-4 py-2 text-sm gap-2\",\r\n lg: \"px-6 py-3 text-base gap-3\",\r\n },\r\n input: {\r\n sm: \"py-2 text-sm\",\r\n md: \"py-3 text-base\",\r\n lg: \"py-4 text-lg\",\r\n },\r\n card: {\r\n sm: \"p-3 space-y-3 text-sm\",\r\n md: \"p-6 space-y-6 text-base\",\r\n lg: \"p-8 space-y-8 text-lg\",\r\n },\r\n notification: {\r\n sm: \"p-3 space-x-2\",\r\n md: \"p-4 space-x-4\",\r\n lg: \"p-6 space-x-6\",\r\n },\r\n tabNavigation: {\r\n sm: \"px-3 py-1 text-sm\",\r\n md: \"px-6 py-2 text-lg\",\r\n lg: \"px-8 py-3 text-xl\",\r\n },\r\n linearProgress: {\r\n width: {\r\n sm: \"w-48\",\r\n md: \"w-80\",\r\n lg: \"w-96\",\r\n },\r\n height: {\r\n sm: \"h-1.5\",\r\n md: \"h-3\",\r\n lg: \"h-4\",\r\n },\r\n },\r\n skeleton: {\r\n sm: \"text-sm\",\r\n md: \"text-base\",\r\n lg: \"text-lg\",\r\n },\r\n carousel: {\r\n sm: \"h-48\",\r\n md: \"h-64\",\r\n lg: \"h-80\",\r\n },\r\n} as const;\r\n\r\n// Breakpoint pixel map aligned with Tailwind defaults\r\nexport const BREAKPOINT_PIXELS = {\r\n base: 0,\r\n sm: 640,\r\n md: 768,\r\n lg: 1024,\r\n xl: 1280,\r\n \"2xl\": 1536,\r\n} as const;\r\n\r\nexport type BreakpointPixels = typeof BREAKPOINT_PIXELS;\r\n\r\n// Resolve a ResponsiveValue<T> to a concrete value at a given viewport width\r\n/**\r\n * Resolves a ResponsiveValue to a concrete value for a specific width.\r\n *\r\n * @param prop The responsive value to resolve\r\n * @param width The current viewport width in pixels\r\n * @param fallback Fallback value if no breakpoint matches\r\n * @returns The resolved value\r\n */\r\nexport const resolveResponsiveValue = <T>(\r\n prop: ResponsiveValue<T>,\r\n width: number,\r\n fallback: T\r\n): T => {\r\n if (!isResponsiveObject<T>(prop)) {\r\n return (prop as T) ?? fallback;\r\n }\r\n\r\n let resolved: T = (prop.base ?? fallback) as T;\r\n const order: (keyof BreakpointPixels)[] = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\r\n for (const key of order) {\r\n const min = BREAKPOINT_PIXELS[key];\r\n if (width >= min && prop[key] !== undefined) {\r\n resolved = prop[key] as T;\r\n }\r\n }\r\n return resolved;\r\n};\r\n\r\n// React hook to resolve a ResponsiveValue<T> and update on resize\r\n/**\r\n * A hook that returns the current resolved value based on window resize events.\r\n *\r\n * @param prop The responsive value configuration\r\n * @param fallback Default value to use during SSR or initial render\r\n * @returns The current resolved value\r\n */\r\nexport const useResponsiveValue = <T>(\r\n prop: ResponsiveValue<T>,\r\n fallback: T\r\n): T => {\r\n const get = useCallback(\r\n () =>\r\n typeof window === \"undefined\"\r\n ? fallback\r\n : resolveResponsiveValue(prop, window.innerWidth, fallback),\r\n [fallback, prop]\r\n );\r\n\r\n const [value, setValue] = useState<T>(get);\r\n\r\n useEffect(() => {\r\n if (!isResponsiveObject<T>(prop)) {\r\n setValue((prop as T) ?? fallback);\r\n return;\r\n }\r\n const onResize = () => setValue(get());\r\n onResize();\r\n window.addEventListener(\"resize\", onResize);\r\n return () => window.removeEventListener(\"resize\", onResize);\r\n }, [fallback, get, prop]);\r\n\r\n return value;\r\n};\r\n"],"names":["isResponsiveObject","v","getResponsiveClasses","prop","classMap","classes","smClasses","cls","mdClasses","lgClasses","xlClasses","xl2Classes","combineResponsiveClasses","RESPONSIVE_SIZE_MAPS","BREAKPOINT_PIXELS","resolveResponsiveValue","width","fallback","resolved","order","key","min","useResponsiveValue","get","useCallback","value","setValue","useState","useEffect","onResize"],"mappings":";AAcO,MAAMA,IAAqB,CAChCC,MAC6B,O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CAAI;AAC7B,WAAQA,KAAcc;AAGxB,MAAIC,IAAef,EAAK,QAAQc;AAChC,QAAME,IAAoC,CAAC,MAAM,MAAM,MAAM,MAAM,KAAK;AACxE,aAAWC,KAAOD,GAAO;AACvB,UAAME,IAAMP,EAAkBM,CAAG;AACjC,IAAIJ,KAASK,KAAOlB,EAAKiB,CAAG,MAAM,WAChCF,IAAWf,EAAKiB,CAAG;AAAA,EAEvB;AACA,SAAOF;AACT,GAUaI,IAAqB,CAChCnB,GACAc,MACM;AACN,QAAMM,IAAMC;AAAA,IACV,MACE,OAAO,SAAW,MACdP,IACAF,EAAuBZ,GAAM,OAAO,YAAYc,CAAQ;AAAA,IAC9D,CAACA,GAAUd,CAAI;AAAA,EAAA,GAGX,CAACsB,GAAOC,CAAQ,IAAIC,EAAYJ,CAAG;AAEzC,SAAAK,EAAU,MAAM;AACd,QAAI,CAAC5B,EAAsBG,CAAI,GAAG;AAChC,MAAAuB,EAAUvB,KAAcc,CAAQ;AAChC;AAAA,IACF;AACA,UAAMY,IAAW,MAAMH,EAASH,GAAK;AACrC,WAAAM,EAAA,GACA,OAAO,iBAAiB,UAAUA,CAAQ,GACnC,MAAM,OAAO,oBAAoB,UAAUA,CAAQ;AAAA,EAC5D,GAAG,CAACZ,GAAUM,GAAKpB,CAAI,CAAC,GAEjBsB;AACT;"}
package/package.json CHANGED
@@ -1,125 +1,158 @@
1
- {
2
- "name": "cyberui-2045",
3
- "version": "2.3.0",
4
- "description": "The AI-first cyberpunk React UI library — built-in coding assistant context for Claude, Cursor, and Copilot out of the box.",
5
- "private": false,
6
- "type": "module",
7
- "main": "dist/index.js",
8
- "module": "dist/index.es.js",
9
- "types": "dist/index.d.ts",
10
- "bin": {
11
- "cyberui-2045": "bin/init.js"
12
- },
13
- "files": [
14
- "dist/assets",
15
- "dist/components",
16
- "dist/hooks",
17
- "dist/contexts",
18
- "dist/utils",
19
- "dist/index.d.ts",
20
- "dist/index.js",
21
- "dist/index.es.js",
22
- "dist/cyberui-2045.css",
23
- "bin/",
24
- "README.md",
25
- "AGENT.md"
26
- ],
27
- "sideEffects": [
28
- "dist/*.css",
29
- "*.css"
30
- ],
31
- "exports": {
32
- ".": {
33
- "types": "./dist/index.d.ts",
34
- "import": "./dist/index.es.js",
35
- "require": "./dist/index.js"
36
- },
37
- "./styles.css": "./dist/cyberui-2045.css"
38
- },
39
- "keywords": [
40
- "react",
41
- "ui",
42
- "components",
43
- "cyberpunk",
44
- "CyberUI",
45
- "neon",
46
- "futuristic",
47
- "typescript",
48
- "tailwind",
49
- "ai-friendly",
50
- "claude",
51
- "cursor",
52
- "copilot",
53
- "design-system",
54
- "component-library"
55
- ],
56
- "author": "Patrick Yang <azureroki@gmail.com>",
57
- "license": "MIT",
58
- "repository": {
59
- "type": "git",
60
- "url": "git+https://github.com/patrickkuei/CyberUI.git"
61
- },
62
- "bugs": {
63
- "url": "https://github.com/patrickkuei/CyberUI/issues"
64
- },
65
- "homepage": "https://patrickkuei.github.io/CyberUI",
66
- "scripts": {
67
- "postinstall": "node -e \"!process.env.CI && console.log('\\n cyberui-2045 installed\\n\\n AI coding setup \\u2192 npx cyberui-2045 init\\n Docs \\u2192 https://patrickkuei.github.io/CyberUI\\n')\"",
68
- "dev": "vite",
69
- "build": "vite build --mode library",
70
- "build:demo": "vite build",
71
- "lint": "eslint .",
72
- "preview": "vite preview",
73
- "test": "vitest run",
74
- "type-check": "tsc --noEmit",
75
- "storybook": "storybook dev -p 6006",
76
- "build-storybook": "storybook build",
77
- "predeploy": "npm run build:demo",
78
- "deploy": "gh-pages -d dist",
79
- "prepublishOnly": "npm run build"
80
- },
81
- "peerDependencies": {
82
- "react": "^18.0.0 || ^19.0.0",
83
- "react-dom": "^18.0.0 || ^19.0.0"
84
- },
85
- "devDependencies": {
86
- "@chromatic-com/storybook": "^4.1.0",
87
- "@eslint/js": "^9.30.1",
88
- "@storybook/addon-a11y": "^9.1.0",
89
- "@storybook/addon-docs": "^9.1.0",
90
- "@storybook/addon-onboarding": "^9.1.0",
91
- "@storybook/addon-vitest": "^9.1.0",
92
- "@storybook/react-vite": "^9.1.0",
93
- "@tailwindcss/vite": "^4.1.11",
94
- "@testing-library/dom": "^10.4.1",
95
- "@testing-library/jest-dom": "^6.9.1",
96
- "@testing-library/react": "^16.3.2",
97
- "@types/node": "^24.1.0",
98
- "@types/react": "^19.1.8",
99
- "@types/react-dom": "^19.1.6",
100
- "@vitejs/plugin-react": "^4.6.0",
101
- "@vitest/browser": "^3.2.4",
102
- "@vitest/coverage-v8": "^3.2.4",
103
- "autoprefixer": "^10.4.21",
104
- "eslint": "^9.30.1",
105
- "eslint-plugin-react-hooks": "^5.2.0",
106
- "eslint-plugin-react-refresh": "^0.4.20",
107
- "eslint-plugin-storybook": "^9.1.0",
108
- "gh-pages": "^6.3.0",
109
- "globals": "^16.3.0",
110
- "jsdom": "^29.0.1",
111
- "playwright": "^1.54.2",
112
- "postcss": "^8.5.6",
113
- "storybook": "^9.1.0",
114
- "tailwindcss": "^4.1.11",
115
- "typescript": "~5.8.3",
116
- "typescript-eslint": "^8.35.1",
117
- "vite": "^7.0.4",
118
- "vite-plugin-dts": "^4.5.4",
119
- "vitest": "^3.2.4"
120
- },
121
- "dependencies": {
122
- "clsx": "^2.1.1",
123
- "tailwind-merge": "^3.5.0"
124
- }
125
- }
1
+ {
2
+ "name": "cyberui-2045",
3
+ "version": "2.4.0",
4
+ "description": "The AI-first cyberpunk React UI library — built-in coding assistant context for Claude, Cursor, Copilot, and AGENTS.md out of the box.",
5
+ "private": false,
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "module": "dist/index.es.js",
9
+ "types": "dist/index.d.ts",
10
+ "bin": {
11
+ "cyberui-2045": "bin/init.js"
12
+ },
13
+ "files": [
14
+ "dist/assets",
15
+ "dist/components",
16
+ "dist/hooks",
17
+ "dist/contexts",
18
+ "dist/utils",
19
+ "dist/index.d.ts",
20
+ "dist/index.js",
21
+ "dist/index.es.js",
22
+ "dist/cyberui-2045.css",
23
+ "dist/component-manifest.json",
24
+ "bin/",
25
+ "README.md",
26
+ "AGENT.md"
27
+ ],
28
+ "sideEffects": [
29
+ "dist/*.css",
30
+ "*.css"
31
+ ],
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/index.es.js",
36
+ "require": "./dist/index.js"
37
+ },
38
+ "./styles.css": "./dist/cyberui-2045.css"
39
+ },
40
+ "keywords": [
41
+ "react",
42
+ "ui",
43
+ "components",
44
+ "cyberpunk",
45
+ "CyberUI",
46
+ "neon",
47
+ "futuristic",
48
+ "typescript",
49
+ "tailwind",
50
+ "ai-friendly",
51
+ "claude",
52
+ "cursor",
53
+ "copilot",
54
+ "agents.md",
55
+ "design-system",
56
+ "component-library"
57
+ ],
58
+ "author": "Patrick Yang <azureroki@gmail.com>",
59
+ "license": "MIT",
60
+ "engines": {
61
+ "node": ">=20"
62
+ },
63
+ "repository": {
64
+ "type": "git",
65
+ "url": "git+https://github.com/patrickkuei/CyberUI.git"
66
+ },
67
+ "bugs": {
68
+ "url": "https://github.com/patrickkuei/CyberUI/issues"
69
+ },
70
+ "homepage": "https://patrickkuei.github.io/CyberUI",
71
+ "scripts": {
72
+ "postinstall": "node -e \"!process.env.CI && console.log('\\n cyberui-2045 installed\\n\\n AI coding setup \\u2192 npx cyberui-2045 init\\n Docs \\u2192 https://patrickkuei.github.io/CyberUI\\n')\"",
73
+ "dev": "vite",
74
+ "build": "vite build --mode library",
75
+ "build:demo": "vite build",
76
+ "lint": "eslint .",
77
+ "preview": "vite preview",
78
+ "test": "vitest run",
79
+ "type-check": "tsc --noEmit",
80
+ "storybook": "storybook dev -p 6006",
81
+ "build-storybook": "storybook build",
82
+ "docs:generate": "node scripts/generate-manifest.js",
83
+ "size": "size-limit",
84
+ "predeploy": "npm run build:demo",
85
+ "deploy": "gh-pages -d dist",
86
+ "prepublishOnly": "npm run build"
87
+ },
88
+ "peerDependencies": {
89
+ "react": "^18.0.0 || ^19.0.0",
90
+ "react-dom": "^18.0.0 || ^19.0.0"
91
+ },
92
+ "devDependencies": {
93
+ "@chromatic-com/storybook": "^4.1.0",
94
+ "@eslint/js": "^9.30.1",
95
+ "@size-limit/esbuild": "^12.1.0",
96
+ "@size-limit/file": "^12.1.0",
97
+ "@storybook/addon-a11y": "^9.1.0",
98
+ "@storybook/addon-docs": "^9.1.0",
99
+ "@storybook/addon-onboarding": "^9.1.0",
100
+ "@storybook/addon-vitest": "^9.1.0",
101
+ "@storybook/react-vite": "^9.1.0",
102
+ "@tailwindcss/vite": "^4.1.11",
103
+ "@testing-library/dom": "^10.4.1",
104
+ "@testing-library/jest-dom": "^6.9.1",
105
+ "@testing-library/react": "^16.3.2",
106
+ "@types/node": "^24.1.0",
107
+ "@types/react": "^19.1.8",
108
+ "@types/react-dom": "^19.1.6",
109
+ "@vitejs/plugin-react": "^4.6.0",
110
+ "@vitest/browser": "^3.2.4",
111
+ "@vitest/coverage-v8": "^3.2.4",
112
+ "autoprefixer": "^10.4.21",
113
+ "eslint": "^9.30.1",
114
+ "eslint-plugin-react-hooks": "^5.2.0",
115
+ "eslint-plugin-react-refresh": "^0.4.20",
116
+ "eslint-plugin-storybook": "^9.1.0",
117
+ "gh-pages": "^6.3.0",
118
+ "globals": "^16.3.0",
119
+ "jsdom": "^29.0.1",
120
+ "playwright": "^1.54.2",
121
+ "postcss": "^8.5.6",
122
+ "react-docgen-typescript": "^2.4.0",
123
+ "size-limit": "^12.1.0",
124
+ "storybook": "^9.1.0",
125
+ "tailwindcss": "^4.1.11",
126
+ "typescript": "~5.8.3",
127
+ "typescript-eslint": "^8.35.1",
128
+ "vite": "^7.0.4",
129
+ "vite-plugin-dts": "^4.5.4",
130
+ "vitest": "^3.2.4"
131
+ },
132
+ "dependencies": {
133
+ "clsx": "^2.1.1",
134
+ "tailwind-merge": "^3.5.0"
135
+ },
136
+ "size-limit": [
137
+ {
138
+ "name": "Single component import (tree-shaking guard)",
139
+ "path": "dist/index.es.js",
140
+ "import": "{ Button }",
141
+ "limit": "15 KB",
142
+ "gzip": true
143
+ },
144
+ {
145
+ "name": "Full library (all components, ESM)",
146
+ "path": "dist/index.es.js",
147
+ "import": "*",
148
+ "limit": "40 KB",
149
+ "gzip": true
150
+ },
151
+ {
152
+ "name": "Stylesheet (CSS)",
153
+ "path": "dist/cyberui-2045.css",
154
+ "limit": "17 KB",
155
+ "gzip": true
156
+ }
157
+ ]
158
+ }