@johnmorrisdotca/kuni 1.1.0 → 1.2.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 +11 -0
- package/README.md +2 -2
- 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 +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@ All notable changes to this project are written here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.2.0] - 2026-10-09
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **The demo's Compare view colours each country on its own**: a colour picker for each outline (the family's green and red at first, never the same), and a "Show capitals" switch for the dot on each capital. Both are kept in the address (`#/compare/JP/GB?colours=2f5d4a,b5452c&capitals=off`), so a shared link shows what its sender saw, and swapping the countries takes each one's colour with it.
|
|
14
|
+
- **The demo's tables and lists also download as a Markdown table and as SQL**, beside CSV, JSON and text. The Markdown is a GitHub table (a `|` in a cell is escaped, a line break is `<br>`); the SQL is a `CREATE TABLE` and an `INSERT` a row, with double-quoted names, single-quoted text and NULL for what is missing, and runs in SQLite, PostgreSQL and MySQL (MySQL needs `ANSI_QUOTES` and `NO_BACKSLASH_ESCAPES`, which the file's second line says). The writers are `demo/downloads.js`, the same file in kuni, chizu and hata, held to one hash and tested by loading the SQL into SQLite.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- On a phone, Compare's table no longer squeezes a long label into one character a line or cuts off the second country: each fact is a block, its name above the two countries' values and the difference under them.
|
|
19
|
+
|
|
9
20
|
## [1.1.0] - 2026-10-09
|
|
10
21
|
|
|
11
22
|
### Added
|
package/README.md
CHANGED
|
@@ -94,7 +94,7 @@ Install the scoped name: the unscoped `kuni` on npm is somebody else's package.
|
|
|
94
94
|
- **Groupings** (`/groupings`): the seven continents, the 30 UN M49 areas, 23 international bodies (the UN, the EU, the euro area, Schengen, NATO, the G7 and G20, ASEAN and more) with the days members joined and left, 16 informal groupings (the Middle East, the Balkans, Scandinavia, the Sahel) each with the definition it follows, and regions inside a country (Japan's 地方, the US Census regions, Canada's regions).
|
|
95
95
|
- **Small where it matters.** The countries and lookups are about 57 KB (19 KB gzipped); one country's subdivisions are their own entry (Japan's 47, 2.9 KB) or a dynamic import.
|
|
96
96
|
- **Typed, frozen, pure and the same everywhere.** ESM and CommonJS, types for both, no dependencies, no network and no `Intl`. Every export carries a doc comment with a runnable example, which an editor shows on hover and the tests run.
|
|
97
|
-
- **A demo to use, not just to read.** A page for each country, two countries compared, every country in a sortable table, the groupings explorer, three seeded quizzes, a country and region form widget with its code to copy, and the data's quality in the open, each at an address of its own and downloadable as CSV, JSON or
|
|
97
|
+
- **A demo to use, not just to read.** A page for each country, two countries compared, every country in a sortable table, the groupings explorer, three seeded quizzes, a country and region form widget with its code to copy, and the data's quality in the open, each at an address of its own and downloadable as CSV, JSON, text, a Markdown table or SQL: [the demo](https://johnmorrisdotca.github.io/kuni/).
|
|
98
98
|
- **Never a guess.** A value no source gives is `null`, with the reason written down (`docs/facts.md`, `docs/subdivision-facts.md`, `docs/ja-gaps.md`), never a plausible filler.
|
|
99
99
|
|
|
100
100
|
## Use it in your project
|
|
@@ -525,7 +525,7 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md); the commands are under [Development](#
|
|
|
525
525
|
|
|
526
526
|
## Changes
|
|
527
527
|
|
|
528
|
-
See [CHANGELOG.md](./CHANGELOG.md). The latest release, 1.
|
|
528
|
+
See [CHANGELOG.md](./CHANGELOG.md). The latest release, 1.2.0, lets Compare colour each country and hide the capitals' dots, fits Compare's table on a phone, and downloads every list as a Markdown table and as SQL too.
|
|
529
529
|
|
|
530
530
|
## Licence
|
|
531
531
|
|
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.2.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
|
type CountryOrder = "code" | "en" | "ja";
|
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.2.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
|
type CountryOrder = "code" | "en" | "ja";
|
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.2.0",
|
|
4
4
|
"description": "Kuni 国, every country and its subdivisions (states, provinces, prefectures, regions) with ISO 3166 codes and names in English and Japanese, from Unicode CLDR and Wikidata. Typed lookups by code or by name. Zero dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"countries",
|