@udixio/ui-react 2.10.17 → 2.10.19
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/dist/index.cjs +3 -3
- package/dist/index.js +1512 -1502
- package/dist/lib/effects/ThemeProvider.d.ts +5 -1
- package/dist/lib/effects/ThemeProvider.d.ts.map +1 -1
- package/dist/lib/effects/generateThemeCss.d.ts +28 -0
- package/dist/lib/effects/generateThemeCss.d.ts.map +1 -0
- package/dist/lib/effects/index.d.ts +1 -0
- package/dist/lib/effects/index.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { API, ConfigInterface } from '@udixio/theme';
|
|
2
|
-
export declare const ThemeProvider: ({ config, throttleDelay, onLoad, loadTheme, }: {
|
|
2
|
+
export declare const ThemeProvider: ({ config, throttleDelay, onLoad, loadTheme, initialCss, }: {
|
|
3
3
|
config: Readonly<ConfigInterface>;
|
|
4
4
|
onLoad?: (api: API) => void;
|
|
5
5
|
throttleDelay?: number;
|
|
6
6
|
loadTheme?: boolean;
|
|
7
|
+
/** Pre-generated CSS from the server (e.g. via `generateThemeCss`).
|
|
8
|
+
* When provided, the component renders immediately without waiting for the
|
|
9
|
+
* Worker — eliminates FOUC on SSR pages with dynamic themes. */
|
|
10
|
+
initialCss?: string;
|
|
7
11
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
12
|
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/lib/effects/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EACR,KAAK,eAAe,EAKrB,MAAM,eAAe,CAAC;AAavB,eAAO,MAAM,aAAa,GAAI
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/lib/effects/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EACR,KAAK,eAAe,EAKrB,MAAM,eAAe,CAAC;AAavB,eAAO,MAAM,aAAa,GAAI,2DAM3B;IACD,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;qEAEiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,mDA+IA,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { API, ConfigInterface } from '@udixio/theme';
|
|
2
|
+
/**
|
|
3
|
+
* Generates the full theme CSS string from a config object.
|
|
4
|
+
*
|
|
5
|
+
* Accepts the output of `defineConfig()` — TailwindPlugin and FontPlugin must
|
|
6
|
+
* already be wired (which `defineConfig` does automatically).
|
|
7
|
+
*
|
|
8
|
+
* The optional `onApi` callback runs after initialization but before the first
|
|
9
|
+
* load, allowing palette overrides, context updates, or any other API
|
|
10
|
+
* manipulation (e.g. applying a user-persisted dark mode preference or a
|
|
11
|
+
* tenant-specific palette from a server-side cookie).
|
|
12
|
+
*
|
|
13
|
+
* @example SSR with user preference
|
|
14
|
+
* ```ts
|
|
15
|
+
* const css = await generateThemeCss(config, (api) => {
|
|
16
|
+
* api.context.update({ isDark: userPrefersDark });
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @example Tenant-specific palette
|
|
21
|
+
* ```ts
|
|
22
|
+
* const css = await generateThemeCss(config, (api) => {
|
|
23
|
+
* api.palettes.sync({ primary: () => ({ hue: tenant.hue, chroma: 36 }) });
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function generateThemeCss(config: ConfigInterface, onApi?: (api: API) => void | Promise<void>): Promise<string>;
|
|
28
|
+
//# sourceMappingURL=generateThemeCss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateThemeCss.d.ts","sourceRoot":"","sources":["../../../src/lib/effects/generateThemeCss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,eAAe,EAAU,MAAM,eAAe,CAAC;AAGvE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,eAAe,EACvB,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GACzC,OAAO,CAAC,MAAM,CAAC,CAajB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/effects/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/effects/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@udixio/ui-react",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"react": "^19.1.1",
|
|
41
41
|
"react-dom": "^19.1.1",
|
|
42
|
-
"@udixio/theme": "2.1.
|
|
43
|
-
"@udixio/tailwind": "2.4.
|
|
42
|
+
"@udixio/theme": "2.1.21",
|
|
43
|
+
"@udixio/tailwind": "2.4.21"
|
|
44
44
|
},
|
|
45
45
|
"repository": {
|
|
46
46
|
"type": "git",
|