@waveinno/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/CHANGELOG.md CHANGED
@@ -6,6 +6,11 @@ prop, major = a renamed or removed export or prop.
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.0.1 — 2026-10-03
10
+
11
+ - `compact()` and `formatMoney(…, { compact: true })` drop trailing zeros: 2.5 crore shows as `2.5Cr`, not `2.50Cr`
12
+ (same for M and B).
13
+
9
14
  ## 1.0.0 — 2026-10-03
10
15
 
11
16
  - **Breaking: four components move to Wavi Pro.** `OrgChart` (with `orgIds`, `OrgNode`), `KanbanBoard`, `AppLauncher`
package/README.md CHANGED
@@ -88,8 +88,11 @@ through `labels` props, so each product passes its own language.
88
88
  ```bash
89
89
  npm install
90
90
  npm run dev # http://localhost:4500 — docs (/docs), blocks (/blocks), templates (/templates), theme builder (/themes), every component on one page (/playground), live from src/
91
+ npm run build && npm run start:production # production build, served on port 4500
91
92
  ```
92
93
 
94
+ Deploy the site to a VPS with Docker and nginx: [deploy/README.md](deploy/README.md).
95
+
93
96
  Adding or changing a component: see [CONTRIBUTING.md](CONTRIBUTING.md).
94
97
 
95
98
  ## Licence
@@ -1 +1 @@
1
- const t=[{code:"BDT",symbol:"\u09F3",name:"Bangladeshi taka",decimals:2,grouping:"south-asian"},{code:"INR",symbol:"\u20B9",name:"Indian rupee",decimals:2,grouping:"south-asian"},{code:"PKR",symbol:"\u20A8",name:"Pakistani rupee",decimals:2,grouping:"south-asian"},{code:"LKR",symbol:"Rs",name:"Sri Lankan rupee",decimals:2,grouping:"south-asian"},{code:"NPR",symbol:"\u0930\u0942",name:"Nepalese rupee",decimals:2,grouping:"south-asian"},{code:"USD",symbol:"$",name:"US dollar",decimals:2,grouping:"western"},{code:"EUR",symbol:"\u20AC",name:"Euro",decimals:2,grouping:"western"},{code:"GBP",symbol:"\xA3",name:"Pound sterling",decimals:2,grouping:"western"},{code:"AED",symbol:"\u062F.\u0625",name:"UAE dirham",decimals:2,grouping:"western"},{code:"SAR",symbol:"\uFDFC",name:"Saudi riyal",decimals:2,grouping:"western"},{code:"MYR",symbol:"RM",name:"Malaysian ringgit",decimals:2,grouping:"western"},{code:"SGD",symbol:"S$",name:"Singapore dollar",decimals:2,grouping:"western"},{code:"AUD",symbol:"A$",name:"Australian dollar",decimals:2,grouping:"western"},{code:"CAD",symbol:"C$",name:"Canadian dollar",decimals:2,grouping:"western"},{code:"CNY",symbol:"\xA5",name:"Chinese yuan",decimals:2,grouping:"western"},{code:"JPY",symbol:"\xA5",name:"Japanese yen",decimals:0,grouping:"western"}],i=Object.fromEntries(t.map(e=>[e.code,e])),a=i.BDT,s={"south-asian":"en-IN",western:"en-US"};function m(e,n){return new Intl.NumberFormat(s[n.grouping],{minimumFractionDigits:n.decimals,maximumFractionDigits:n.decimals}).format(e)}function c(e,n){return new Intl.NumberFormat(s[n]).format(e)}function g(e,n){const o=Math.abs(e);if(n.grouping==="south-asian"){if(o>=1e7)return`${(e/1e7).toFixed(2).replace(/\.00$/,"")}Cr`;if(o>=1e5)return`${(e/1e5).toFixed(1).replace(/\.0$/,"")}L`;if(o>=1e3)return`${(e/1e3).toFixed(1).replace(/\.0$/,"")}K`}else{if(o>=1e9)return`${(e/1e9).toFixed(2).replace(/\.00$/,"")}B`;if(o>=1e6)return`${(e/1e6).toFixed(2).replace(/\.00$/,"")}M`;if(o>=1e3)return`${(e/1e3).toFixed(1).replace(/\.0$/,"")}K`}return c(e,n.grouping)}function u(e,n,o={}){const r=o.compact?g(e,n):m(e,n);return n.position==="before"?`${n.symbol}${r}`:`${r} ${n.symbol}`}function l(e,n={}){const o=i[e]??a;return{code:o.code,symbol:n.symbol??o.symbol,decimals:n.decimals??o.decimals,grouping:n.grouping??o.grouping,position:n.position??"before"}}export{t as CURRENCIES,i as CURRENCY_MAP,a as DEFAULT_CURRENCY,g as compact,l as configFor,u as formatMoney,m as groupDigits,c as groupPlain};
1
+ const m=[{code:"BDT",symbol:"\u09F3",name:"Bangladeshi taka",decimals:2,grouping:"south-asian"},{code:"INR",symbol:"\u20B9",name:"Indian rupee",decimals:2,grouping:"south-asian"},{code:"PKR",symbol:"\u20A8",name:"Pakistani rupee",decimals:2,grouping:"south-asian"},{code:"LKR",symbol:"Rs",name:"Sri Lankan rupee",decimals:2,grouping:"south-asian"},{code:"NPR",symbol:"\u0930\u0942",name:"Nepalese rupee",decimals:2,grouping:"south-asian"},{code:"USD",symbol:"$",name:"US dollar",decimals:2,grouping:"western"},{code:"EUR",symbol:"\u20AC",name:"Euro",decimals:2,grouping:"western"},{code:"GBP",symbol:"\xA3",name:"Pound sterling",decimals:2,grouping:"western"},{code:"AED",symbol:"\u062F.\u0625",name:"UAE dirham",decimals:2,grouping:"western"},{code:"SAR",symbol:"\uFDFC",name:"Saudi riyal",decimals:2,grouping:"western"},{code:"MYR",symbol:"RM",name:"Malaysian ringgit",decimals:2,grouping:"western"},{code:"SGD",symbol:"S$",name:"Singapore dollar",decimals:2,grouping:"western"},{code:"AUD",symbol:"A$",name:"Australian dollar",decimals:2,grouping:"western"},{code:"CAD",symbol:"C$",name:"Canadian dollar",decimals:2,grouping:"western"},{code:"CNY",symbol:"\xA5",name:"Chinese yuan",decimals:2,grouping:"western"},{code:"JPY",symbol:"\xA5",name:"Japanese yen",decimals:0,grouping:"western"}],i=Object.fromEntries(m.map(e=>[e.code,e])),u=i.BDT,s={"south-asian":"en-IN",western:"en-US"};function g(e,n){return new Intl.NumberFormat(s[n.grouping],{minimumFractionDigits:n.decimals,maximumFractionDigits:n.decimals}).format(e)}function c(e,n){return new Intl.NumberFormat(s[n]).format(e)}function l(e,n){const o=Math.abs(e),r=(t,a)=>String(Number(t.toFixed(a)));if(n.grouping==="south-asian"){if(o>=1e7)return`${r(e/1e7,2)}Cr`;if(o>=1e5)return`${r(e/1e5,1)}L`;if(o>=1e3)return`${r(e/1e3,1)}K`}else{if(o>=1e9)return`${r(e/1e9,2)}B`;if(o>=1e6)return`${r(e/1e6,2)}M`;if(o>=1e3)return`${r(e/1e3,1)}K`}return c(e,n.grouping)}function p(e,n,o={}){const r=o.compact?l(e,n):g(e,n);return n.position==="before"?`${n.symbol}${r}`:`${r} ${n.symbol}`}function d(e,n={}){const o=i[e]??u;return{code:o.code,symbol:n.symbol??o.symbol,decimals:n.decimals??o.decimals,grouping:n.grouping??o.grouping,position:n.position??"before"}}export{m as CURRENCIES,i as CURRENCY_MAP,u as DEFAULT_CURRENCY,l as compact,d as configFor,p as formatMoney,g as groupDigits,c as groupPlain};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@waveinno/ui",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
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",
@@ -62,14 +62,18 @@
62
62
  ],
63
63
  "scripts": {
64
64
  "dev": "npm run dev -w playground",
65
- "build": "node scripts/build.mjs",
66
- "test:dist": "npm run build && cross-env UI_FROM=dist npm run build -w playground",
67
- "build:playground": "npm run build -w playground",
65
+ "build": "npm run build:lib && npm run build:site",
66
+ "build:lib": "node scripts/build.mjs",
67
+ "build:site": "npm run build -w playground",
68
+ "start": "npm run start -w playground",
69
+ "start:production": "npm run start:production -w playground",
70
+ "test:dist": "npm run build:lib && cross-env UI_FROM=dist npm run build -w playground",
68
71
  "new": "node scripts/new-component.mjs",
69
72
  "typecheck": "tsc --noEmit",
70
- "check": "npm run typecheck && node scripts/check-exports.mjs && npm run typecheck -w playground",
71
- "prepublishOnly": "npm run check && npm run build",
72
- "pack:local": "npm run build && node -e \"require('fs').mkdirSync('packs',{recursive:true})\" && npm pack --pack-destination ./packs"
73
+ "test": "vitest run",
74
+ "check": "npm run typecheck && node scripts/check-exports.mjs && npm run typecheck -w playground && npm test",
75
+ "prepublishOnly": "npm run check && npm run build:lib",
76
+ "pack:local": "npm run build:lib && node -e \"require('fs').mkdirSync('packs',{recursive:true})\" && npm pack --pack-destination ./packs"
73
77
  },
74
78
  "publishConfig": {
75
79
  "access": "public",
@@ -125,7 +129,8 @@
125
129
  "react": "^19.3.0",
126
130
  "react-dom": "^19.3.0",
127
131
  "tailwindcss": "^4.3.3",
128
- "typescript": "^7.0.2"
132
+ "typescript": "^7.0.2",
133
+ "vitest": "^3.2.7"
129
134
  },
130
135
  "bin": {
131
136
  "waveinno-ui": "bin/waveinno-ui.mjs"