@waveinno/ui 1.0.1 → 1.0.3
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/CHANGELOG.md +10 -0
- package/bin/waveinno-ui.mjs +1 -1
- package/dist/lib/boot-script.d.ts +3 -1
- package/dist/lib/boot-script.js +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,16 @@ prop, major = a renamed or removed export or prop.
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## 1.0.3 — 2026-10-03
|
|
10
|
+
|
|
11
|
+
- `themeBootScript(density, defaultTheme)`: a second argument, `"system"` (default, as before), `"light"` or `"dark"`, sets
|
|
12
|
+
the theme a first-time visitor sees. A saved choice still wins. The Wavi site now opens in light mode.
|
|
13
|
+
|
|
14
|
+
## 1.0.2 — 2026-10-03
|
|
15
|
+
|
|
16
|
+
- `npx @waveinno/ui add` fetches Pro components from the new site address, https://wavi.waveinno.app (`--url` and
|
|
17
|
+
`WAVI_URL` still override it).
|
|
18
|
+
|
|
9
19
|
## 1.0.1 — 2026-10-03
|
|
10
20
|
|
|
11
21
|
- `compact()` and `formatMoney(…, { compact: true })` drop trailing zeros: 2.5 crore shows as `2.5Cr`, not `2.50Cr`
|
package/bin/waveinno-ui.mjs
CHANGED
|
@@ -396,7 +396,7 @@ async function init() {
|
|
|
396
396
|
/* ── add (Wavi Pro components) ─────────────────────────────────────────── */
|
|
397
397
|
|
|
398
398
|
/** Where the Pro source is served. Set WAVI_URL (or --url) to your own copy of the docs site. */
|
|
399
|
-
const PRO_URL = (opt("url") ?? process.env.WAVI_URL ?? "https://wavi.waveinno.
|
|
399
|
+
const PRO_URL = (opt("url") ?? process.env.WAVI_URL ?? "https://wavi.waveinno.app").replace(/\/$/, "");
|
|
400
400
|
const KEY_FILE = path.join(os.homedir(), ".wavi", "licence");
|
|
401
401
|
|
|
402
402
|
/** Keep a key the server accepted, for next time, readable only by you. */
|
|
@@ -11,5 +11,7 @@ export declare const PANEL_KEY = "waveinno.panel";
|
|
|
11
11
|
/**
|
|
12
12
|
* Injected into <head>; runs before paint, so the theme never flashes.
|
|
13
13
|
* `defaultDensity` lets the Admin portal start compact (doc 29 §4).
|
|
14
|
+
* `defaultTheme` is used until the visitor picks one: "system" (the default)
|
|
15
|
+
* follows the device's light or dark setting; "light" or "dark" ignores it.
|
|
14
16
|
*/
|
|
15
|
-
export declare function themeBootScript(defaultDensity?: "compact" | "default" | "comfortable"): string;
|
|
17
|
+
export declare function themeBootScript(defaultDensity?: "compact" | "default" | "comfortable", defaultTheme?: "system" | "light" | "dark"): string;
|
package/dist/lib/boot-script.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o="waveinno.theme",r="waveinno.density",c="waveinno.panel";function n(e="default",t="system"){const a=t==="system"?'matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"':`"${t}"`;return`
|
|
2
2
|
(function(){try{
|
|
3
|
-
var t=localStorage.getItem("${
|
|
4
|
-
if(
|
|
5
|
-
var d=localStorage.getItem("${
|
|
3
|
+
var t=localStorage.getItem("${o}");
|
|
4
|
+
if(t!=="light"&&t!=="dark")t=${a};
|
|
5
|
+
var d=localStorage.getItem("${r}")||"${e}";
|
|
6
6
|
var e=document.documentElement;
|
|
7
7
|
e.setAttribute("data-theme",t);
|
|
8
8
|
e.setAttribute("data-density",d);
|
|
9
9
|
e.style.colorScheme=t;
|
|
10
|
-
if(localStorage.getItem("${
|
|
10
|
+
if(localStorage.getItem("${c}")==="1")e.setAttribute("data-panel-collapsed","");
|
|
11
11
|
}catch(_){}})();
|
|
12
|
-
`}export{
|
|
12
|
+
`}export{r as DENSITY_KEY,c as PANEL_KEY,o as THEME_KEY,n as themeBootScript};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waveinno/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Wavi: the React design system from Bangladesh. 100+ components, app shell, charts, and bKash/taka/Bangla-ready inputs for Next.js and Vite, with Tailwind CSS 4. Set up with npx @waveinno/ui init.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"waveinno",
|