@vura-ai/assets 0.1.0 → 0.1.2

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 ADDED
@@ -0,0 +1,54 @@
1
+ # @vura-ai/assets
2
+
3
+ A sophisticated "Liquid Glass" design system for the Vura ecosystem. Built with React 19, Tailwind CSS v4, and Lucide React.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @vura-ai/assets
9
+ ```
10
+
11
+ ## Features
12
+
13
+ - **Liquid Glass Aesthetic**: Sophisticated backdrop blurs and translucent borders.
14
+ - **Monochrome Design**: A clean, elegant interface focused on high-contrast black and white themes.
15
+ - **Atomic Components**: A wide range of primitives from Buttons and Cards to specialized visualization nodes.
16
+ - **Type-Safe**: Fully written in TypeScript with comprehensive type exports.
17
+
18
+ ## Usage
19
+
20
+ ```tsx
21
+ import { Button, Card, ThemeProvider } from "@vura-ai/assets";
22
+
23
+ function App() {
24
+ return (
25
+ <ThemeProvider>
26
+ <Card variant="glass">
27
+ <h1>Vura Assets</h1>
28
+ <Button onClick={() => console.log("Clicked!")}>Primary Action</Button>
29
+ </Card>
30
+ </ThemeProvider>
31
+ );
32
+ }
33
+ ```
34
+
35
+ ## Component Library
36
+
37
+ This package includes:
38
+
39
+ - **Layout**: `PageWrapper`, `PageLayout`, `StageWrapper`, `LiquidScrollContainer`
40
+ - **Navigation**: `Sidebar`, `TopNav`, `NavItem`
41
+ - **Primitives**: `Button`, `Card`, `Input`, `TextArea`, `Dropdown`, `Popover`, `Search`
42
+ - **Visuals**: `ConnectedNodes` (`NodeCanvas`, `Node`), `MountainGraphic`, `Logo`, `Brand`
43
+ - **Feedback**: `ToastProvider`, `useToast`, `ThinkingIndicator`
44
+ - **Environment**: `BackgroundGlow`, `AmbientBacklight`, `ThemeProvider`, `useTheme`
45
+
46
+ ## Design Principles
47
+
48
+ - **Composition over Inheritance**: Containers like `Sidebar` use slots (`header`, `footer`) for maximum flexibility.
49
+ - **Interactive Layers**: Use of `framer-motion` for smooth glass transitions.
50
+ - **Contrast**: High-legibility typography using system font stacks.
51
+
52
+ ## License
53
+
54
+ MIT
package/dist/index.cjs CHANGED
@@ -40,6 +40,7 @@ __export(index_exports, {
40
40
  LiquidScrollContainer: () => LiquidScrollContainer,
41
41
  Logo: () => Logo,
42
42
  MountainGraphic: () => MountainGraphic,
43
+ NavItem: () => NavItem,
43
44
  Node: () => Node,
44
45
  NodeCanvas: () => NodeCanvas,
45
46
  PageLayout: () => PageLayout,
@@ -1199,7 +1200,14 @@ var useTheme = () => {
1199
1200
 
1200
1201
  // src/components/Sidebar.tsx
1201
1202
  var import_jsx_runtime16 = require("react/jsx-runtime");
1202
- function Sidebar({ expanded, className = "", onToggle }) {
1203
+ function Sidebar({
1204
+ expanded,
1205
+ className = "",
1206
+ onToggle,
1207
+ children,
1208
+ footer,
1209
+ header
1210
+ }) {
1203
1211
  const { id } = (0, import_react_router.useParams)();
1204
1212
  const { theme, toggleTheme } = useTheme();
1205
1213
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
@@ -1228,6 +1236,8 @@ function Sidebar({ expanded, className = "", onToggle }) {
1228
1236
  children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Brand, { className: "text-foreground", size: 40 }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex items-center justify-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Logo, { className: "text-foreground", size: 40 }) })
1229
1237
  }
1230
1238
  ),
1239
+ header,
1240
+ "// ...existing code...",
1231
1241
  onToggle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1232
1242
  "button",
1233
1243
  {
@@ -1251,65 +1261,8 @@ function Sidebar({ expanded, className = "", onToggle }) {
1251
1261
  }
1252
1262
  )
1253
1263
  ] }),
1254
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("nav", { className: "flex-1 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1255
- NavItem,
1256
- {
1257
- to: `/projects/${id}/stories`,
1258
- icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react.ScrollText, { size: 20 }),
1259
- label: "Stories",
1260
- expanded
1261
- }
1262
- ) }),
1263
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "pt-4 border-t border-glass-border space-y-1", children: [
1264
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-2", children: [
1265
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1266
- NavItem,
1267
- {
1268
- to: `/projects/${id}/settings`,
1269
- icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react.Settings, { size: 20 }),
1270
- label: "Settings",
1271
- expanded
1272
- }
1273
- ) }),
1274
- expanded && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1275
- "button",
1276
- {
1277
- onClick: toggleTheme,
1278
- className: "flex items-center justify-center h-12 w-12 rounded-2xl transition-all duration-300 cursor-pointer text-foreground/60 hover:text-foreground hover:bg-foreground/10 shrink-0",
1279
- "aria-label": "Toggle theme",
1280
- children: theme === "light" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react.Moon, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react.Sun, { size: 20 })
1281
- }
1282
- )
1283
- ] }),
1284
- !expanded && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1285
- "button",
1286
- {
1287
- onClick: toggleTheme,
1288
- className: "flex items-center justify-center h-12 w-full rounded-2xl text-foreground/60 hover:text-foreground hover:bg-foreground/10 transition-all duration-300 cursor-pointer",
1289
- "aria-label": "Toggle theme",
1290
- children: theme === "light" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react.Moon, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react.Sun, { size: 20 })
1291
- }
1292
- ),
1293
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1294
- "div",
1295
- {
1296
- className: `flex items-center ${expanded ? "justify-start px-3 py-3" : "justify-center py-3"} mt-2 rounded-2xl bg-white/[0.01] dark:bg-black/[0.01] border border-glass-border`,
1297
- children: [
1298
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "w-9 h-9 rounded-full bg-linear-to-tr from-indigo-500 to-purple-500 shrink-0 border border-foreground/20 shadow-lg" }),
1299
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1300
- "div",
1301
- {
1302
- className: `overflow-hidden transition-all duration-300 ${expanded ? "ml-4 opacity-100 max-w-30" : "ml-0 opacity-0 max-w-0"}`,
1303
- children: [
1304
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-sm font-bold text-foreground truncate", children: "Tyler Elton" }),
1305
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-[11px] text-foreground/60 font-medium tracking-wide uppercase truncate", children: "Admin" })
1306
- ]
1307
- }
1308
- )
1309
- ]
1310
- }
1311
- )
1312
- ] })
1264
+ children,
1265
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "pt-4 border-t border-glass-border space-y-1", children: footer })
1313
1266
  ]
1314
1267
  }
1315
1268
  );
@@ -1700,6 +1653,7 @@ function TopNav({
1700
1653
  LiquidScrollContainer,
1701
1654
  Logo,
1702
1655
  MountainGraphic,
1656
+ NavItem,
1703
1657
  Node,
1704
1658
  NodeCanvas,
1705
1659
  PageLayout,
package/dist/index.d.cts CHANGED
@@ -129,8 +129,17 @@ interface SidebarProps {
129
129
  expanded: boolean;
130
130
  className?: string;
131
131
  onToggle?: () => void;
132
- }
133
- declare function Sidebar({ expanded, className, onToggle }: SidebarProps): react_jsx_runtime.JSX.Element;
132
+ children?: React.ReactNode;
133
+ footer?: React.ReactNode;
134
+ header?: React.ReactNode;
135
+ }
136
+ declare function Sidebar({ expanded, className, onToggle, children, footer, header, }: SidebarProps): react_jsx_runtime.JSX.Element;
137
+ declare function NavItem({ to, icon, label, expanded, }: {
138
+ to: string;
139
+ icon: React.ReactNode;
140
+ label: string;
141
+ expanded: boolean;
142
+ }): react_jsx_runtime.JSX.Element;
134
143
 
135
144
  interface StageWrapperProps {
136
145
  children: React__default.ReactNode;
@@ -191,4 +200,4 @@ interface TopNavProps {
191
200
  }
192
201
  declare function TopNav({ className, alignLeft, leftAction, user, onLogout, }: TopNavProps): react_jsx_runtime.JSX.Element;
193
202
 
194
- export { AmbientBacklight, BackgroundGlow, Brand, Button, type ButtonOption, Card, Dropdown, type DropdownItem, Input, LiquidScrollContainer, Logo, MountainGraphic, Node, NodeCanvas, PageLayout, PageWrapper, Popover, Search, Sidebar, StageWrapper, TextArea, type Theme, ThemeProvider, ThemeProviderContext, type ThemeProviderState, ThinkingIndicator, ToastContext, type ToastContextType, ToastProvider, type ToastType, TopNav, initialState, useTheme, useToast };
203
+ export { AmbientBacklight, BackgroundGlow, Brand, Button, type ButtonOption, type ButtonProps, Card, Dropdown, type DropdownItem, Input, LiquidScrollContainer, Logo, MountainGraphic, NavItem, Node, NodeCanvas, PageLayout, PageWrapper, Popover, Search, Sidebar, StageWrapper, TextArea, type Theme, ThemeProvider, ThemeProviderContext, type ThemeProviderState, ThinkingIndicator, ToastContext, type ToastContextType, ToastProvider, type ToastType, TopNav, initialState, useTheme, useToast };
package/dist/index.d.ts CHANGED
@@ -129,8 +129,17 @@ interface SidebarProps {
129
129
  expanded: boolean;
130
130
  className?: string;
131
131
  onToggle?: () => void;
132
- }
133
- declare function Sidebar({ expanded, className, onToggle }: SidebarProps): react_jsx_runtime.JSX.Element;
132
+ children?: React.ReactNode;
133
+ footer?: React.ReactNode;
134
+ header?: React.ReactNode;
135
+ }
136
+ declare function Sidebar({ expanded, className, onToggle, children, footer, header, }: SidebarProps): react_jsx_runtime.JSX.Element;
137
+ declare function NavItem({ to, icon, label, expanded, }: {
138
+ to: string;
139
+ icon: React.ReactNode;
140
+ label: string;
141
+ expanded: boolean;
142
+ }): react_jsx_runtime.JSX.Element;
134
143
 
135
144
  interface StageWrapperProps {
136
145
  children: React__default.ReactNode;
@@ -191,4 +200,4 @@ interface TopNavProps {
191
200
  }
192
201
  declare function TopNav({ className, alignLeft, leftAction, user, onLogout, }: TopNavProps): react_jsx_runtime.JSX.Element;
193
202
 
194
- export { AmbientBacklight, BackgroundGlow, Brand, Button, type ButtonOption, Card, Dropdown, type DropdownItem, Input, LiquidScrollContainer, Logo, MountainGraphic, Node, NodeCanvas, PageLayout, PageWrapper, Popover, Search, Sidebar, StageWrapper, TextArea, type Theme, ThemeProvider, ThemeProviderContext, type ThemeProviderState, ThinkingIndicator, ToastContext, type ToastContextType, ToastProvider, type ToastType, TopNav, initialState, useTheme, useToast };
203
+ export { AmbientBacklight, BackgroundGlow, Brand, Button, type ButtonOption, type ButtonProps, Card, Dropdown, type DropdownItem, Input, LiquidScrollContainer, Logo, MountainGraphic, NavItem, Node, NodeCanvas, PageLayout, PageWrapper, Popover, Search, Sidebar, StageWrapper, TextArea, type Theme, ThemeProvider, ThemeProviderContext, type ThemeProviderState, ThinkingIndicator, ToastContext, type ToastContextType, ToastProvider, type ToastType, TopNav, initialState, useTheme, useToast };
package/dist/index.js CHANGED
@@ -1130,7 +1130,7 @@ function Search({
1130
1130
 
1131
1131
  // src/components/Sidebar.tsx
1132
1132
  import { Link, NavLink, useParams } from "react-router";
1133
- import { ScrollText, Settings, ChevronRight, Moon, Sun } from "lucide-react";
1133
+ import { ChevronRight } from "lucide-react";
1134
1134
 
1135
1135
  // src/components/ThemeContext.tsx
1136
1136
  import { createContext as createContext2, useContext as useContext2 } from "react";
@@ -1149,7 +1149,14 @@ var useTheme = () => {
1149
1149
 
1150
1150
  // src/components/Sidebar.tsx
1151
1151
  import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
1152
- function Sidebar({ expanded, className = "", onToggle }) {
1152
+ function Sidebar({
1153
+ expanded,
1154
+ className = "",
1155
+ onToggle,
1156
+ children,
1157
+ footer,
1158
+ header
1159
+ }) {
1153
1160
  const { id } = useParams();
1154
1161
  const { theme, toggleTheme } = useTheme();
1155
1162
  return /* @__PURE__ */ jsxs13(
@@ -1178,6 +1185,8 @@ function Sidebar({ expanded, className = "", onToggle }) {
1178
1185
  children: expanded ? /* @__PURE__ */ jsx16(Brand, { className: "text-foreground", size: 40 }) : /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-center w-full", children: /* @__PURE__ */ jsx16(Logo, { className: "text-foreground", size: 40 }) })
1179
1186
  }
1180
1187
  ),
1188
+ header,
1189
+ "// ...existing code...",
1181
1190
  onToggle && /* @__PURE__ */ jsx16(
1182
1191
  "button",
1183
1192
  {
@@ -1201,65 +1210,8 @@ function Sidebar({ expanded, className = "", onToggle }) {
1201
1210
  }
1202
1211
  )
1203
1212
  ] }),
1204
- /* @__PURE__ */ jsx16("nav", { className: "flex-1 space-y-1", children: /* @__PURE__ */ jsx16(
1205
- NavItem,
1206
- {
1207
- to: `/projects/${id}/stories`,
1208
- icon: /* @__PURE__ */ jsx16(ScrollText, { size: 20 }),
1209
- label: "Stories",
1210
- expanded
1211
- }
1212
- ) }),
1213
- /* @__PURE__ */ jsxs13("div", { className: "pt-4 border-t border-glass-border space-y-1", children: [
1214
- /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2", children: [
1215
- /* @__PURE__ */ jsx16("div", { className: "flex-1", children: /* @__PURE__ */ jsx16(
1216
- NavItem,
1217
- {
1218
- to: `/projects/${id}/settings`,
1219
- icon: /* @__PURE__ */ jsx16(Settings, { size: 20 }),
1220
- label: "Settings",
1221
- expanded
1222
- }
1223
- ) }),
1224
- expanded && /* @__PURE__ */ jsx16(
1225
- "button",
1226
- {
1227
- onClick: toggleTheme,
1228
- className: "flex items-center justify-center h-12 w-12 rounded-2xl transition-all duration-300 cursor-pointer text-foreground/60 hover:text-foreground hover:bg-foreground/10 shrink-0",
1229
- "aria-label": "Toggle theme",
1230
- children: theme === "light" ? /* @__PURE__ */ jsx16(Moon, { size: 20 }) : /* @__PURE__ */ jsx16(Sun, { size: 20 })
1231
- }
1232
- )
1233
- ] }),
1234
- !expanded && /* @__PURE__ */ jsx16(
1235
- "button",
1236
- {
1237
- onClick: toggleTheme,
1238
- className: "flex items-center justify-center h-12 w-full rounded-2xl text-foreground/60 hover:text-foreground hover:bg-foreground/10 transition-all duration-300 cursor-pointer",
1239
- "aria-label": "Toggle theme",
1240
- children: theme === "light" ? /* @__PURE__ */ jsx16(Moon, { size: 20 }) : /* @__PURE__ */ jsx16(Sun, { size: 20 })
1241
- }
1242
- ),
1243
- /* @__PURE__ */ jsxs13(
1244
- "div",
1245
- {
1246
- className: `flex items-center ${expanded ? "justify-start px-3 py-3" : "justify-center py-3"} mt-2 rounded-2xl bg-white/[0.01] dark:bg-black/[0.01] border border-glass-border`,
1247
- children: [
1248
- /* @__PURE__ */ jsx16("div", { className: "w-9 h-9 rounded-full bg-linear-to-tr from-indigo-500 to-purple-500 shrink-0 border border-foreground/20 shadow-lg" }),
1249
- /* @__PURE__ */ jsxs13(
1250
- "div",
1251
- {
1252
- className: `overflow-hidden transition-all duration-300 ${expanded ? "ml-4 opacity-100 max-w-30" : "ml-0 opacity-0 max-w-0"}`,
1253
- children: [
1254
- /* @__PURE__ */ jsx16("p", { className: "text-sm font-bold text-foreground truncate", children: "Tyler Elton" }),
1255
- /* @__PURE__ */ jsx16("p", { className: "text-[11px] text-foreground/60 font-medium tracking-wide uppercase truncate", children: "Admin" })
1256
- ]
1257
- }
1258
- )
1259
- ]
1260
- }
1261
- )
1262
- ] })
1213
+ children,
1214
+ /* @__PURE__ */ jsx16("div", { className: "pt-4 border-t border-glass-border space-y-1", children: footer })
1263
1215
  ]
1264
1216
  }
1265
1217
  );
@@ -1649,6 +1601,7 @@ export {
1649
1601
  LiquidScrollContainer,
1650
1602
  Logo,
1651
1603
  MountainGraphic,
1604
+ NavItem,
1652
1605
  Node,
1653
1606
  NodeCanvas,
1654
1607
  PageLayout,
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@vura-ai/assets",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
- "main": "./dist/index.js",
6
- "module": "./dist/index.mjs",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "publishConfig": {
9
- "access": "restricted",
9
+ "access": "public",
10
10
  "registry": "https://registry.npmjs.org/"
11
11
  },
12
12
  "exports": {
13
13
  ".": {
14
14
  "types": "./dist/index.d.ts",
15
- "import": "./dist/index.mjs",
16
- "require": "./dist/index.js"
15
+ "import": "./dist/index.js",
16
+ "require": "./dist/index.cjs"
17
17
  }
18
18
  },
19
19
  "files": [