@johnmorrisdotca/kuni 1.4.0 → 1.5.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/CHANGELOG.md +15 -0
- package/README.md +10 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +23 -4
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,21 @@ All notable changes to this project are written here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.5.0] - 2026-11-03
|
|
10
|
+
|
|
11
|
+
The demo, the docs and the release tooling follow the family's must-have list. No change to the package's code beyond its version.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Every way to use it, tested.** `examples/` holds a script tag from jsDelivr and from unpkg, Vite, webpack, React (with a server render), Vue, Svelte, Angular, an iframe of the embed page, TypeScript and Node. `pnpm test:usage` builds, type-checks or runs each against the package as npm packs it, opens the ones with a page in a browser, and checks that the guides hold the same text word for word. CI runs it.
|
|
16
|
+
- **Five guides, English and Japanese:** plain HTML and CDNs, Vite and webpack, React, Vue, Svelte and Angular, an iframe, and TypeScript and Node. The README links them ("Use it anywhere").
|
|
17
|
+
- **`scripts/check-standard.mjs`**, the family's must-have list as a check (kazoku-ui's, copied unchanged), run by `pnpm test`.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **The demo's header** has the family's language picker and theme switch (kazoku-ui), and the page is `demo/index.html`. The README's pictures are new screenshots of it.
|
|
22
|
+
- **The Release workflow** calls kazoku-ui's shared release workflow, and refuses a commit CI has not passed.
|
|
23
|
+
|
|
9
24
|
## [1.4.0] - 2026-10-14
|
|
10
25
|
|
|
11
26
|
A country and subdivision card with a shared embed builder joins the demo and the package, tables download as Markdown and SQL, and the package has an English and Japanese documentation site with a checked example for every export. The country data, the codes and the lookups are unchanged.
|
package/README.md
CHANGED
|
@@ -281,6 +281,12 @@ import "@johnmorrisdotca/kuni/element/define";
|
|
|
281
281
|
|
|
282
282
|
The `@johnmorrisdotca/kuni/element` entry exports the class and `defineCard(tag?)`; `@johnmorrisdotca/kuni/element/define` registers the tag. Both are safe to import on a server. The builder also supplies plain HTML, Vue, Svelte, Angular and iframe examples.
|
|
283
283
|
|
|
284
|
+
## Use it anywhere
|
|
285
|
+
|
|
286
|
+
The [demo](https://johnmorrisdotca.github.io/kuni/), the [docs](https://johnmorrisdotca.github.io/kuni/docs/) (English and Japanese) and the [embed page](https://johnmorrisdotca.github.io/kuni/embed/). Each way below is a tested file in [`examples/`](./examples) (`pnpm test:usage`).
|
|
287
|
+
|
|
288
|
+
Guides: [script tag](./docs/guides/html-and-cdn.md), [Vite and webpack](./docs/guides/bundlers.md), [React, Vue, Svelte, Angular](./docs/guides/frameworks.md), [iframe](./docs/guides/embed-in-an-iframe.md), [TypeScript and Node](./docs/guides/typescript-and-node.md).
|
|
289
|
+
|
|
284
290
|
## Examples
|
|
285
291
|
|
|
286
292
|
### A country select, in either language
|
|
@@ -569,7 +575,7 @@ Using Kuni in something else? Open an *Add my project* issue and we will add you
|
|
|
569
575
|
### The family
|
|
570
576
|
|
|
571
577
|
<!-- family:start (made by scripts/family-readme.mjs from scripts/family-template.mjs; change those, not this) -->
|
|
572
|
-
Kuni is one of thirty-
|
|
578
|
+
Kuni is one of thirty-three packages, each made for the same site, each at
|
|
573
579
|
[github.com/johnmorrisdotca](https://github.com/johnmorrisdotca) or [github.com/spxis](https://github.com/spxis). The code of every one is MIT.
|
|
574
580
|
|
|
575
581
|
**Games — board**
|
|
@@ -613,6 +619,7 @@ Kuni is one of thirty-two packages, each made for the same site, each at
|
|
|
613
619
|
**Geography & data**
|
|
614
620
|
|
|
615
621
|
- [address-plus](https://github.com/johnmorrisdotca/address-plus) (アドレスプラス): parse and format addresses in the United States, Canada, Japan, Australia, France, Germany and the United Kingdom. [Demo](https://johnmorrisdotca.github.io/address-plus/).
|
|
622
|
+
- [Chikyu Earth](https://github.com/johnmorrisdotca/chikyu-earth) (地球): a line-drawn globe that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place. [Demo](https://johnmorrisdotca.github.io/chikyu-earth/).
|
|
616
623
|
- [Chizu](https://github.com/johnmorrisdotca/chizu) (地図): maps of the world and of countries' regions, in English and Japanese, with a quiz and callouts. [Demo](https://johnmorrisdotca.github.io/chizu/).
|
|
617
624
|
- [Hata](https://github.com/johnmorrisdotca/hata) (旗): country and regional flags as SVG, at their true proportions and keyed by ISO code. [Demo](https://johnmorrisdotca.github.io/hata/).
|
|
618
625
|
- [Kuni](https://github.com/johnmorrisdotca/kuni) (国): countries and their regions, with ISO codes and names in English and Japanese. [Demo](https://johnmorrisdotca.github.io/kuni/).
|
|
@@ -629,7 +636,7 @@ Kuni is one of thirty-two packages, each made for the same site, each at
|
|
|
629
636
|
- [REST in Pieces](https://github.com/spxis/rest-in-pieces) (レスト・イン・ピーシーズ): seeded test data and REST APIs for frontend development, with latency and error drills. [Demo](https://spxis.github.io/rest-in-pieces/).
|
|
630
637
|
|
|
631
638
|
|
|
632
|
-
**This package is Kuni.** The demos of all thirty-
|
|
639
|
+
**This package is Kuni.** The demos of all thirty-three share one header and footer, so each links the rest.
|
|
633
640
|
<!-- family:end -->
|
|
634
641
|
|
|
635
642
|
## Development
|
|
@@ -661,7 +668,7 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md); the commands are under [Development](#
|
|
|
661
668
|
|
|
662
669
|
## Changes
|
|
663
670
|
|
|
664
|
-
See [CHANGELOG.md](./CHANGELOG.md). The latest release, 1.
|
|
671
|
+
See [CHANGELOG.md](./CHANGELOG.md). The latest release, 1.5.0, changes the demo, the docs and the release tooling only; 1.4.0 added the country card with the standard embed attributes, the shared embed builder, and the documentation site with a checked example for every export.
|
|
665
672
|
|
|
666
673
|
## Licence
|
|
667
674
|
|
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -30,7 +30,7 @@ declare const fold: (text: string) => string;
|
|
|
30
30
|
* console.log(`kuni ${VERSION}`);
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
declare const VERSION = "1.
|
|
33
|
+
declare const VERSION = "1.5.0";
|
|
34
34
|
|
|
35
35
|
/** The order `countries()` lists them in: "code" (alpha-2), "en" (by English name) or "ja" (by Japanese name, in kana).
|
|
36
36
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ declare const fold: (text: string) => string;
|
|
|
30
30
|
* console.log(`kuni ${VERSION}`);
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
declare const VERSION = "1.
|
|
33
|
+
declare const VERSION = "1.5.0";
|
|
34
34
|
|
|
35
35
|
/** The order `countries()` lists them in: "code" (alpha-2), "en" (by English name) or "ja" (by Japanese name, in kana).
|
|
36
36
|
*
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@johnmorrisdotca/kuni",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Kuni 国 — Countries, states and provinces: ISO 3166 codes and English/Japanese names, subdivisions, country facts and groupings, typed lookups, on-demand country data and an optional card. Zero dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"countries",
|
|
@@ -4608,24 +4608,43 @@
|
|
|
4608
4608
|
"docs:make": "node scripts/docs-resources.mjs && node scripts/docs.mjs",
|
|
4609
4609
|
"docs:site": "pnpm build && node scripts/docs-site.mjs build",
|
|
4610
4610
|
"docs:check": "pnpm build && node scripts/docs-site.mjs check",
|
|
4611
|
-
"size": "node scripts/docs-site.mjs size"
|
|
4611
|
+
"size": "node scripts/docs-site.mjs size",
|
|
4612
|
+
"test:usage": "pnpm site && node scripts/check-usage.ts",
|
|
4613
|
+
"check:standard": "node scripts/check-standard.mjs"
|
|
4612
4614
|
},
|
|
4613
4615
|
"devDependencies": {
|
|
4616
|
+
"@angular/common": "^22.2.4",
|
|
4617
|
+
"@angular/compiler": "^22.2.4",
|
|
4618
|
+
"@angular/core": "^22.2.4",
|
|
4619
|
+
"@angular/platform-browser": "^22.2.4",
|
|
4614
4620
|
"@eslint/js": "^9.0.0",
|
|
4615
4621
|
"@johnmorrisdotca/chizu": "1.4.0",
|
|
4622
|
+
"@johnmorrisdotca/kazoku-ui": "^0.10.1",
|
|
4616
4623
|
"@playwright/test": "^1.64.0",
|
|
4624
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
4617
4625
|
"@types/node": "^24.0.0",
|
|
4626
|
+
"@types/react": "^19.3.0",
|
|
4627
|
+
"@types/react-dom": "^19.3.0",
|
|
4628
|
+
"@vitejs/plugin-vue": "^6.0.10",
|
|
4618
4629
|
"cldr-core": "48.2.0",
|
|
4619
4630
|
"cldr-localenames-full": "48.2.0",
|
|
4620
4631
|
"countries-list": "3.4.1",
|
|
4621
4632
|
"esbuild": "^0.28.0",
|
|
4622
4633
|
"eslint": "^9.0.0",
|
|
4634
|
+
"marked": "^18.0.0",
|
|
4635
|
+
"pagefind": "^1.5.2",
|
|
4636
|
+
"react": "^19.3.1",
|
|
4637
|
+
"react-dom": "^19.3.1",
|
|
4638
|
+
"rxjs": "^7.8.2",
|
|
4639
|
+
"svelte": "^5.57.3",
|
|
4623
4640
|
"tsup": "^8.5.0",
|
|
4624
4641
|
"typescript": "~5.9.0",
|
|
4625
4642
|
"typescript-eslint": "^8.0.0",
|
|
4643
|
+
"vite": "^8.3.5",
|
|
4626
4644
|
"vitest": "^5.0.0",
|
|
4627
|
-
"
|
|
4628
|
-
"
|
|
4645
|
+
"vue": "^3.5.44",
|
|
4646
|
+
"webpack": "^5.112.2",
|
|
4647
|
+
"webpack-cli": "^7.3.1"
|
|
4629
4648
|
},
|
|
4630
4649
|
"publishConfig": {
|
|
4631
4650
|
"access": "public"
|