fiboui 2.8.4 → 2.9.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 +89 -0
- package/dist/{client-DOrZXJAN.js → client-3NdKI2xE.js} +9527 -6843
- package/dist/content.d.ts +1535 -1
- package/dist/content.js +3 -3
- package/dist/core.d.ts +1897 -2
- package/dist/core.js +52 -46
- package/dist/{icons-DujcjAOD.js → icons-DS8J4SFk.js} +83 -75
- package/dist/{index-rNMzRy8Y.js → index-B6F3yf3H.js} +8 -8
- package/dist/{index-C0qI47Zw.js → index-BLEG6Nql.js} +5 -5
- package/dist/{index-uks8jtfK.js → index-BaTO66yA.js} +561 -492
- package/dist/index-FuD1J3Qo.js +785 -0
- package/dist/{index-19mPjg_D.js → index-I-MXiId0.js} +10 -10
- package/dist/index.d.ts +2218 -117983
- package/dist/index.js +1155 -1070
- package/dist/interactive.d.ts +1702 -2
- package/dist/interactive.js +15 -15
- package/dist/layout.d.ts +1680 -1
- package/dist/layout.js +20 -16
- package/dist/{metadata-9Bpw89m2.js → metadata-B2MRlDTz.js} +19 -19
- package/dist/navigation.d.ts +88 -1
- package/dist/navigation.js +6 -6
- package/dist/page-xwU8SnoZ.js +263 -0
- package/dist/server.d.ts +1729 -2
- package/dist/server.js +3795 -2401
- package/dist/structure.d.ts +1697 -1
- package/dist/structure.js +8 -8
- package/dist/style.css +1 -1
- package/dist/theme.d.ts +149 -2
- package/dist/theme.js +3 -3
- package/package.json +5 -3
- package/dist/index-CYMoWJMX.js +0 -839
- package/dist/page-BOQJIKa5.js +0 -184
package/dist/theme.d.ts
CHANGED
|
@@ -1,2 +1,149 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
type FiboThemeName = "material" | "cupertino" | "web" | "noir";
|
|
6
|
+
interface TextStyle {
|
|
7
|
+
fontSize?: string | number;
|
|
8
|
+
fontWeight?: string | number;
|
|
9
|
+
fontFamily?: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
lineHeight?: string | number;
|
|
12
|
+
letterSpacing?: string | number;
|
|
13
|
+
}
|
|
14
|
+
export interface ThemeColors {
|
|
15
|
+
primary: string;
|
|
16
|
+
primaryVariant?: string;
|
|
17
|
+
primaryContainer?: string;
|
|
18
|
+
onPrimaryContainer?: string;
|
|
19
|
+
secondary: string;
|
|
20
|
+
secondaryVariant?: string;
|
|
21
|
+
secondaryContainer?: string;
|
|
22
|
+
onSecondaryContainer?: string;
|
|
23
|
+
tertiary?: string;
|
|
24
|
+
onTertiary?: string;
|
|
25
|
+
tertiaryContainer?: string;
|
|
26
|
+
onTertiaryContainer?: string;
|
|
27
|
+
background: string;
|
|
28
|
+
surface: string;
|
|
29
|
+
surfaceVariant?: string;
|
|
30
|
+
onSurfaceVariant?: string;
|
|
31
|
+
error: string;
|
|
32
|
+
errorContainer?: string;
|
|
33
|
+
onErrorContainer?: string;
|
|
34
|
+
success?: string;
|
|
35
|
+
warning?: string;
|
|
36
|
+
info?: string;
|
|
37
|
+
onPrimary: string;
|
|
38
|
+
onSecondary: string;
|
|
39
|
+
onBackground: string;
|
|
40
|
+
onSurface: string;
|
|
41
|
+
onError: string;
|
|
42
|
+
/** Borders / hairlines — maps to `--fibo-outline`. */
|
|
43
|
+
outline?: string;
|
|
44
|
+
outlineVariant?: string;
|
|
45
|
+
/** Maps to `--fibo-surface-container-low` (M3 card surfaces). */
|
|
46
|
+
surfaceContainerLow?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ThemeTypography {
|
|
49
|
+
h1: TextStyle;
|
|
50
|
+
h2: TextStyle;
|
|
51
|
+
h3: TextStyle;
|
|
52
|
+
h4: TextStyle;
|
|
53
|
+
h5: TextStyle;
|
|
54
|
+
h6: TextStyle;
|
|
55
|
+
body: TextStyle;
|
|
56
|
+
caption: TextStyle;
|
|
57
|
+
label: TextStyle;
|
|
58
|
+
}
|
|
59
|
+
interface ThemeSpacing {
|
|
60
|
+
xs: string;
|
|
61
|
+
sm: string;
|
|
62
|
+
md: string;
|
|
63
|
+
lg: string;
|
|
64
|
+
xl: string;
|
|
65
|
+
}
|
|
66
|
+
interface ThemeBorderRadius {
|
|
67
|
+
/** Maps to `--fibo-radius-xs` when set (CSS sheets already define it). */
|
|
68
|
+
xs?: string;
|
|
69
|
+
sm: string;
|
|
70
|
+
md: string;
|
|
71
|
+
lg: string;
|
|
72
|
+
/** Maps to `--fibo-radius-xl` when set (CSS sheets already define it). */
|
|
73
|
+
xl?: string;
|
|
74
|
+
full: string;
|
|
75
|
+
}
|
|
76
|
+
interface ThemeShadows {
|
|
77
|
+
sm: string;
|
|
78
|
+
md: string;
|
|
79
|
+
lg: string;
|
|
80
|
+
}
|
|
81
|
+
export interface FiboTheme {
|
|
82
|
+
name: FiboThemeName;
|
|
83
|
+
colors: ThemeColors;
|
|
84
|
+
typography: ThemeTypography;
|
|
85
|
+
spacing: ThemeSpacing;
|
|
86
|
+
borderRadius: ThemeBorderRadius;
|
|
87
|
+
shadows: ThemeShadows;
|
|
88
|
+
fontFamily: string;
|
|
89
|
+
}
|
|
90
|
+
/** Built-in presets. `noir` is the dark editorial theme (site / dense apps). */
|
|
91
|
+
export declare const FIBO_THEMES: {
|
|
92
|
+
readonly material: FiboTheme;
|
|
93
|
+
readonly cupertino: FiboTheme;
|
|
94
|
+
readonly web: FiboTheme;
|
|
95
|
+
readonly noir: FiboTheme;
|
|
96
|
+
};
|
|
97
|
+
export type FiboThemePreset = keyof typeof FIBO_THEMES;
|
|
98
|
+
export type ThemeInput = FiboTheme | FiboThemePreset;
|
|
99
|
+
export declare function resolveTheme(input: ThemeInput): FiboTheme;
|
|
100
|
+
export type FiboThemePatch = {
|
|
101
|
+
name?: string;
|
|
102
|
+
colors?: Partial<ThemeColors>;
|
|
103
|
+
typography?: Partial<Record<keyof ThemeTypography, Partial<TextStyle>>>;
|
|
104
|
+
spacing?: Partial<ThemeSpacing>;
|
|
105
|
+
borderRadius?: Partial<ThemeBorderRadius>;
|
|
106
|
+
shadows?: Partial<ThemeShadows>;
|
|
107
|
+
fontFamily?: string;
|
|
108
|
+
};
|
|
109
|
+
/** Flutter-style copyWith / SwiftUI environment override. */
|
|
110
|
+
export declare function copyWithTheme(base: FiboTheme, patch: FiboThemePatch): FiboTheme;
|
|
111
|
+
/** Alias — SwiftUI/Flutter mental model. */
|
|
112
|
+
export declare const extendTheme: typeof copyWithTheme;
|
|
113
|
+
/** Flat CSS custom properties for a theme (inline style or :root block). */
|
|
114
|
+
export declare function themeToCssVars(theme: FiboTheme): Record<string, string>;
|
|
115
|
+
/** Inline style object safe for React (CSSProperties + custom props). */
|
|
116
|
+
export declare function themeToInlineStyle(theme: FiboTheme): CSSProperties;
|
|
117
|
+
/** CSS rule body for `.fibo-theme-{name}` — SSR-safe, no useEffect. */
|
|
118
|
+
export declare function themeToCssRule(theme: FiboTheme): string;
|
|
119
|
+
export declare function themeClassName(theme: FiboTheme): string;
|
|
120
|
+
interface FiboThemeContextValue {
|
|
121
|
+
theme: FiboTheme;
|
|
122
|
+
themeName: string;
|
|
123
|
+
setTheme: (input: ThemeInput) => void;
|
|
124
|
+
}
|
|
125
|
+
export interface FiboThemeProviderProps {
|
|
126
|
+
/** Preset name (`"noir"`) or full `FiboTheme` / `extendTheme(...)`. */
|
|
127
|
+
theme?: ThemeInput;
|
|
128
|
+
children: ReactNode;
|
|
129
|
+
/** Extra class on the theme root. */
|
|
130
|
+
className?: string;
|
|
131
|
+
/** Merge into the theme root style (after theme vars). */
|
|
132
|
+
style?: CSSProperties;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Theme environment (Flutter Theme / SwiftUI Environment).
|
|
136
|
+
* SSR-safe: class + CSS vars on first paint — no documentElement useEffect.
|
|
137
|
+
*/
|
|
138
|
+
export declare function FiboThemeProvider({ theme: themeProp, children, className, style, }: FiboThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
139
|
+
export declare function useFiboTheme(): FiboThemeContextValue;
|
|
140
|
+
export declare const materialTheme: FiboTheme;
|
|
141
|
+
export declare const cupertinoTheme: FiboTheme;
|
|
142
|
+
export declare const webTheme: FiboTheme;
|
|
143
|
+
/**
|
|
144
|
+
* Obsidian editorial dark — Fibonacci site / dense dashboards.
|
|
145
|
+
* Apply fluently: `Column().theme("noir")` or `FiboThemeProvider({ theme: "noir" })`.
|
|
146
|
+
*/
|
|
147
|
+
export declare const noirTheme: FiboTheme;
|
|
148
|
+
|
|
149
|
+
export {};
|
package/dist/theme.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aW as s, aQ as m, aY as h, aT as T, aZ as o, aS as t, aV as r, aX as i, b1 as l, b0 as b, a_ as n, a$ as p, aR as u, aU as C } from "./client-3NdKI2xE.js";
|
|
2
2
|
export {
|
|
3
3
|
s as FIBO_THEMES,
|
|
4
4
|
m as FiboThemeProvider,
|
|
@@ -9,8 +9,8 @@ export {
|
|
|
9
9
|
r as noirTheme,
|
|
10
10
|
i as resolveTheme,
|
|
11
11
|
l as themeClassName,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
b as themeToCssRule,
|
|
13
|
+
n as themeToCssVars,
|
|
14
14
|
p as themeToInlineStyle,
|
|
15
15
|
u as useFiboTheme,
|
|
16
16
|
C as webTheme
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fiboui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "Flutter/SwiftUI-inspired React UI — fluent builders, signals, and themes. https://fiboui.vercel.app",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"scripts": {
|
|
61
61
|
"dev": "vite",
|
|
62
62
|
"build": "tsc --noEmit && vite build && vite build --config vite.server.config.ts && npm run build:dts && tsc --project tsconfig.cli.json",
|
|
63
|
-
"build:dts": "
|
|
63
|
+
"build:dts": "node scripts/build-dts.mjs",
|
|
64
64
|
"type-check": "tsc --noEmit",
|
|
65
65
|
"test": "vitest run",
|
|
66
66
|
"test:ssr-e2e": "npm run build && npm --prefix examples/ssr-fixtures install && npm --prefix examples/ssr-fixtures run test:e2e",
|
|
@@ -73,7 +73,8 @@
|
|
|
73
73
|
"prepublishOnly": "bash scripts/secret-scan.sh --pack",
|
|
74
74
|
"docs:dev": "vitepress dev docs",
|
|
75
75
|
"docs:build": "vitepress build docs",
|
|
76
|
-
"docs:preview": "vitepress preview docs"
|
|
76
|
+
"docs:preview": "vitepress preview docs",
|
|
77
|
+
"pack:local": "pnpm exec vite build && npm run build:dts && mkdir -p .pack && npm pack --pack-destination .pack && node -e \"const v=require('./package.json').version; console.log('packed .pack/fiboui-'+v+'.tgz')\""
|
|
77
78
|
},
|
|
78
79
|
"keywords": [
|
|
79
80
|
"react",
|
|
@@ -112,6 +113,7 @@
|
|
|
112
113
|
"@vitejs/plugin-react": "^4.2.0",
|
|
113
114
|
"@vitest/coverage-v8": "^3.2.7",
|
|
114
115
|
"autoprefixer": "^10.4.16",
|
|
116
|
+
"csstype": "3.2.3",
|
|
115
117
|
"dts-bundle-generator": "^9.5.1",
|
|
116
118
|
"eslint": "^9.39.5",
|
|
117
119
|
"jsdom": "^26.1.0",
|