silva-ui 1.0.4 → 1.1.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.
@@ -0,0 +1,8 @@
1
+ export declare const gradients: {
2
+ readonly aurora: 'linear-gradient(135deg, #2563eb 0%, #7c3aed 52%, #ec4899 100%)';
3
+ readonly sunrise: 'linear-gradient(135deg, #f97316 0%, #ef4444 48%, #db2777 100%)';
4
+ readonly ocean: 'linear-gradient(135deg, #0891b2 0%, #2563eb 52%, #4338ca 100%)';
5
+ readonly forest: 'linear-gradient(135deg, #16a34a 0%, #0d9488 50%, #0284c7 100%)';
6
+ readonly midnight: 'linear-gradient(135deg, #0f172a 0%, #312e81 50%, #7e22ce 100%)';
7
+ };
8
+ export type GradientName = keyof typeof gradients;
@@ -5,12 +5,19 @@
5
5
  * so the library works with Hono JSX, Preact, or plain string rendering.
6
6
  */
7
7
  import type { Sprinkles } from './sprinkles.css';
8
+ import type { AnimationName } from './visuals.css';
9
+ import type { GradientName } from './gradients';
8
10
  /** Props common to every silva-ui primitive. */
9
- export interface BaseProps extends Sprinkles {
11
+ export type BaseProps = Omit<Sprinkles, 'backgroundColor' | 'color'> & {
12
+ /** Named gradients work with `backgroundColor` and `color` in addition to theme color tokens. */
13
+ backgroundColor?: Sprinkles['backgroundColor'] | GradientName;
14
+ color?: Sprinkles['color'] | GradientName;
15
+ /** A library-provided enter or attention animation. */
16
+ animation?: AnimationName;
10
17
  /** Extra class name(s) to merge after the generated sprinkles class. */
11
18
  class?: string;
12
19
  children?: any;
13
20
  [key: string]: any;
14
- }
21
+ };
15
22
  /** Standard component size scale. */
16
23
  export type ComponentSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
@@ -11,5 +11,5 @@ export declare function splitSprinklesProps<T extends Record<string, unknown>>(p
11
11
  };
12
12
  /** Merge a sprinkles class + optional extra classes into a single string. */
13
13
  export declare function cls(...classes: (string | undefined | false | null)[]): string;
14
- /** Generate a sprinkles class string from sprinkles props. */
14
+ /** Generate CSS classes from sprinkle tokens plus visual shorthand props. */
15
15
  export declare function toSprinklesClass(sprinklesProps: Sprinkles): string;
@@ -0,0 +1,12 @@
1
+ export { gradients } from './gradients';
2
+ export type { GradientName } from './gradients';
3
+ export declare const gradientBackground: Record<"aurora" | "forest" | "midnight" | "ocean" | "sunrise", string>;
4
+ export declare const gradientText: Record<"aurora" | "forest" | "midnight" | "ocean" | "sunrise", string>;
5
+ export declare const animations: {
6
+ readonly fadeIn: `${string} 260ms ease-out both`;
7
+ readonly slideUp: `${string} 360ms cubic-bezier(0.16, 1, 0.3, 1) both`;
8
+ readonly pulse: `${string} 1.6s ease-in-out infinite`;
9
+ };
10
+ export type AnimationName = keyof typeof animations;
11
+ export declare const animationClass: Record<"fadeIn" | "pulse" | "slideUp", string>;
12
+ export declare const visualFocusRing: string;
@@ -2,6 +2,8 @@ export { sprinkles, tokens } from './core/sprinkles.css';
2
2
  export type { Sprinkles } from './core/sprinkles.css';
3
3
  export { cls, splitSprinklesProps, toSprinklesClass } from './core/utils';
4
4
  export type { BaseProps, ComponentSize } from './core/types';
5
+ export { gradients, animations } from './core/visuals.css';
6
+ export type { GradientName, AnimationName } from './core/visuals.css';
5
7
  export { colorScales, darkColorScales, colorTokens, darkColorTokens } from './core/colors';
6
8
  export type { ColorTokenName } from './core/colors';
7
9
  export { themeColors, lightTheme, darkTheme, emeraldTheme, emeraldDarkTheme, midnightTheme, themes, lightColors, darkColors, emeraldColors, emeraldDarkColors, midnightColors, themeDefinitions, TAMAGUI_EMERALD_PREVIEW_URL, } from './core/theme.css';
package/package.json CHANGED
@@ -1 +1,73 @@
1
- {"name":"silva-ui","version":"1.0.4","description":"A Hono JSX UI component library with framework-neutral styling and Tamagui-inspired theming.","main":"./dist/library/silva-ui.js","module":"./dist/library/silva-ui.js","types":"./dist/types/index.d.ts","style":"./dist/library/silva-ui.css","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/library/silva-ui.js","default":"./dist/library/silva-ui.js"},"./style.css":{"types":"./style.css.d.ts","default":"./dist/library/silva-ui.css"}},"sideEffects":["**/*.css"],"files":["dist/library","dist/types","style.css.d.ts","README.md","LICENSE"],"scripts":{"dev":"vite","build":"vite build","build:library":"vite build --config vite.library.config.ts","build:types":"tsc -p tsconfig.types.json","build:package":"npm run build:library && npm run build:types","profile:library":"vite build --config vite.library.config.ts --profile","pack:check":"npm run build:package && npm pack --dry-run","preview":"vite preview","typecheck":"tsc --noEmit"},"keywords":["ui","ui-components","component-library","design-system","hono","hono-jsx","jsx","typescript","vanilla-extract","sprinkles","theming","accessible"],"author":"BlackSilva","license":"MIT","type":"module","peerDependencies":{"hono":"^4.13.13"},"devDependencies":{"@vanilla-extract/vite-plugin":"^5.2.6","@vanilla-extract/css":"^1.21.3","@vanilla-extract/sprinkles":"^1.7.1","hono":"^4.13.13","typescript":"^7.0.2","vite":"^8.3.4"},"repository":{"type":"git","url":"git+https://github.com/black-silva/silva-ui.git"}}
1
+ {
2
+ "name": "silva-ui",
3
+ "version": "1.1.0",
4
+ "description": "A Hono JSX UI component library with framework-neutral styling and Tamagui-inspired theming.",
5
+ "main": "./dist/library/silva-ui.js",
6
+ "module": "./dist/library/silva-ui.js",
7
+ "types": "./dist/types/index.d.ts",
8
+ "style": "./dist/library/silva-ui.css",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types/index.d.ts",
12
+ "import": "./dist/library/silva-ui.js",
13
+ "default": "./dist/library/silva-ui.js"
14
+ },
15
+ "./style.css": {
16
+ "types": "./style.css.d.ts",
17
+ "default": "./dist/library/silva-ui.css"
18
+ }
19
+ },
20
+ "sideEffects": [
21
+ "**/*.css"
22
+ ],
23
+ "files": [
24
+ "dist/library",
25
+ "dist/types",
26
+ "style.css.d.ts",
27
+ "README.md",
28
+ "LICENSE"
29
+ ],
30
+ "scripts": {
31
+ "dev": "vite",
32
+ "build": "vite build",
33
+ "build:library": "vite build --config vite.library.config.ts",
34
+ "build:types": "tsc -p tsconfig.types.json",
35
+ "build:package": "npm run build:library && npm run build:types",
36
+ "profile:library": "vite build --config vite.library.config.ts --profile",
37
+ "pack:check": "npm run build:package && npm pack --dry-run",
38
+ "preview": "vite preview",
39
+ "typecheck": "tsc --noEmit"
40
+ },
41
+ "keywords": [
42
+ "ui",
43
+ "ui-components",
44
+ "component-library",
45
+ "design-system",
46
+ "hono",
47
+ "hono-jsx",
48
+ "jsx",
49
+ "typescript",
50
+ "vanilla-extract",
51
+ "sprinkles",
52
+ "theming",
53
+ "accessible"
54
+ ],
55
+ "author": "BlackSilva",
56
+ "license": "MIT",
57
+ "type": "module",
58
+ "peerDependencies": {
59
+ "hono": "^4.13.13"
60
+ },
61
+ "devDependencies": {
62
+ "@vanilla-extract/vite-plugin": "^5.2.6",
63
+ "@vanilla-extract/css": "^1.21.3",
64
+ "@vanilla-extract/sprinkles": "^1.7.1",
65
+ "hono": "^4.13.13",
66
+ "typescript": "^7.0.2",
67
+ "vite": "^8.3.4"
68
+ },
69
+ "repository": {
70
+ "type": "git",
71
+ "url": "git+https://github.com/black-silva/silva-ui.git"
72
+ }
73
+ }
package/style.css.d.ts CHANGED
@@ -1,3 +1,8 @@
1
- /** Type declarations for Silva UI CSS. */
1
+ /**
2
+ * TypeScript declaration for Silva UI's prebuilt stylesheet.
3
+ *
4
+ * Usage:
5
+ * import 'silva-ui/style.css';
6
+ */
2
7
  declare const css: string;
3
8
  export default css;