silva-ui 1.0.0 → 1.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/README.md +8 -28
- package/package.json +17 -4
package/README.md
CHANGED
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
A Hono JSX UI component library with framework-neutral styling and Tamagui-inspired theming, built on `@vanilla-extract/css` and `@vanilla-extract/sprinkles`.
|
|
9
9
|
|
|
10
|
+
Contributions are welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) for
|
|
11
|
+
development setup, validation commands, and pull request expectations.
|
|
12
|
+
|
|
10
13
|
---
|
|
11
14
|
|
|
12
15
|
## Component Inventory
|
|
@@ -63,24 +66,13 @@ A Hono JSX UI component library with framework-neutral styling and Tamagui-inspi
|
|
|
63
66
|
- [`ContextMenu`](./src/overlays/ContextMenu.tsx) family — Fixed positioning at coordinates via CSS custom properties
|
|
64
67
|
- [`Accordion`](./src/overlays/Accordion.tsx) family (`Item`, `Trigger` with rotating chevron, `Content`)
|
|
65
68
|
|
|
66
|
-
## Profiling the library
|
|
67
|
-
|
|
68
|
-
The library can be profiled without including the documentation example app:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
npm run profile:library
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
This builds from `src/index.ts` using `vite.library.config.ts`, excludes the
|
|
75
|
-
`example/` entry point, writes the library output to `dist/library`, and
|
|
76
|
-
generates `vite-profile-0.cpuprofile`. Open the `.cpuprofile` file in Chrome
|
|
77
|
-
DevTools under **Performance** to inspect build-time CPU usage.
|
|
78
69
|
|
|
79
70
|
---
|
|
80
71
|
|
|
81
72
|
## Quick Example in Hono JSX
|
|
82
73
|
|
|
83
74
|
```tsx
|
|
75
|
+
import 'silva-ui/style.css';
|
|
84
76
|
import {
|
|
85
77
|
YStack,
|
|
86
78
|
XStack,
|
|
@@ -128,6 +120,9 @@ export function SignupCard() {
|
|
|
128
120
|
}
|
|
129
121
|
```
|
|
130
122
|
|
|
123
|
+
The published package includes prebuilt CSS. Import `silva-ui/style.css` once
|
|
124
|
+
from your application entry point.
|
|
125
|
+
|
|
131
126
|
## Colors and themes
|
|
132
127
|
|
|
133
128
|
Theme styling is generated at build time with Vanilla Extract. `Theme` scopes the
|
|
@@ -176,8 +171,7 @@ variables are emitted at build time.
|
|
|
176
171
|
`themeColors.background` or `themeColors.blue6`; Vanilla Extract can then keep
|
|
177
172
|
the variable names consistent through production builds.
|
|
178
173
|
|
|
179
|
-
Silva UI follows Tamagui's palette/template model
|
|
180
|
-
agnostic. The exported `createThemes` helper composes named palettes and
|
|
174
|
+
Silva UI follows Tamagui's palette/template model. The exported `createThemes` helper composes named palettes and
|
|
181
175
|
templates into theme records, and built-in themes include generated surface
|
|
182
176
|
variants such as `dark_surface1` and `light_surface2`:
|
|
183
177
|
|
|
@@ -211,17 +205,3 @@ to that `Theme` subtree. Built-in names such as `dark`, `emerald`, and
|
|
|
211
205
|
`midnight` continue to use their precompiled theme classes. Supported palette
|
|
212
206
|
names are the exported color scales, including `red`, `blue`, `green`,
|
|
213
207
|
`purple`, and the other Radix scales.
|
|
214
|
-
|
|
215
|
-
Theme values are extracted into CSS classes at build time. For framework-neutral
|
|
216
|
-
runtime tooling, `addTheme`, `updateTheme`, `replaceTheme`, `getTheme`, and
|
|
217
|
-
`getThemes` provide an in-memory theme registry; applications can use the
|
|
218
|
-
returned records with their own CSS or rendering integration.
|
|
219
|
-
|
|
220
|
-
## Interactive documentation
|
|
221
|
-
|
|
222
|
-
The `example` app is the interactive component documentation. Start it with
|
|
223
|
-
`npm run dev`, then use the sidebar or home page to browse live examples for
|
|
224
|
-
each exported component, color tokens, and themes. The theme selector in the
|
|
225
|
-
header lets you preview the documentation in every built-in theme. The
|
|
226
|
-
installation and project setup walkthrough is available from its **Get started**
|
|
227
|
-
page in the documentation sidebar.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "silva-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A Hono JSX UI component library with framework-neutral styling and Tamagui-inspired theming.",
|
|
5
5
|
"main": "./dist/library/silva-ui.js",
|
|
6
6
|
"module": "./dist/library/silva-ui.js",
|
|
@@ -31,9 +31,22 @@
|
|
|
31
31
|
"preview": "vite preview",
|
|
32
32
|
"typecheck": "tsc --noEmit"
|
|
33
33
|
},
|
|
34
|
-
"keywords": [
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
"keywords": [
|
|
35
|
+
"ui",
|
|
36
|
+
"ui-components",
|
|
37
|
+
"component-library",
|
|
38
|
+
"design-system",
|
|
39
|
+
"hono",
|
|
40
|
+
"hono-jsx",
|
|
41
|
+
"jsx",
|
|
42
|
+
"typescript",
|
|
43
|
+
"vanilla-extract",
|
|
44
|
+
"sprinkles",
|
|
45
|
+
"theming",
|
|
46
|
+
"accessible"
|
|
47
|
+
],
|
|
48
|
+
"author": "BlackSilva",
|
|
49
|
+
"license": "MIT",
|
|
37
50
|
"type": "module",
|
|
38
51
|
"peerDependencies": {
|
|
39
52
|
"hono": "^4.13.13"
|