@johnmorrisdotca/dougu-sports 0.7.0 → 0.7.2
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 +21 -4
- package/README.md +6 -6
- package/dist/emblems/emblem.descriptions.js +1 -1
- package/dist/emblems/gear/gear.budo.steps.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,23 @@ All notable changes to this project are written here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.7.2] - 2026-10-14
|
|
10
|
+
|
|
11
|
+
The docs are one language to a page. No change to the pictures; the only change to the package is one English description.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **The docs are single-language.** `CONTRIBUTING.md` says so (one page per language, no mixed tables, the Japanese twin named `<name>.ja.md`), and a new test, `test/docs-language.test.ts`, fails when an English page holds Japanese outside code or a Japanese page holds English prose. The Japanese words that were in English pages are gone from them: [docs/japanese-sports.md](docs/japanese-sports.md) lost its Japanese column and its Japanese sentences to a new page in Japanese, [docs/japanese-sports.ja.md](docs/japanese-sports.ja.md); [docs/obi-steps.md](docs/obi-steps.md) lost its Japanese column, and [docs/obi-steps.ja.md](docs/obi-steps.ja.md) its English one; the glosses in [docs/references.md](docs/references.md) and the gallery's English description of `gear:obi-step-5` (it named the knot in kanji too) are English only. Three exceptions are named in the test with their reasons: the family list in the README, the package's own name (`道具`) in the README, and the titles of rulebooks cited in Japanese pages.
|
|
16
|
+
|
|
17
|
+
## [0.7.1] - 2026-10-14
|
|
18
|
+
|
|
19
|
+
Real countries in the examples instead of made-up teams. No change to the package's code or its pictures.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- **The crest examples are Canada and Japan.** The README's crest example is a red-and-white roundel lettered CAN (it was a roundel lettered NO), and the one in docs/emblems.md is a shield in Japan's red and white lettered JPN (it was HC).
|
|
24
|
+
- **The "bring your own picture" puck example is our own red maple leaf with CANADA** (it was a green triangle and WOLVES, "NORTH DIVISION CLUB"). The JAPAN example, with our own red sun disc drawn through the `flags` option, stays.
|
|
25
|
+
|
|
9
26
|
## [0.7.0] - 2026-10-14
|
|
10
27
|
|
|
11
28
|
Ten national volleyballs that can be told apart, a 2010-style grooved ball that reads, and six pictures of how a judo belt is tied. 269 emblems.
|
|
@@ -17,7 +34,7 @@ Ten national volleyballs that can be told apart, a 2010-style grooved ball that
|
|
|
17
34
|
|
|
18
35
|
### Added
|
|
19
36
|
|
|
20
|
-
- **`gear:obi-step-1` to `gear:obi-step-6`, and `obiStep(step, options)`**: how a judo belt is tied, in six close-ups of the jacket of `gear:judogi` (lapels crossed left over right,
|
|
37
|
+
- **`gear:obi-step-1` to `gear:obi-step-6`, and `obiStep(step, options)`**: how a judo belt is tied, in six close-ups of the jacket of `gear:judogi` (lapels crossed left over right, `右前`) with the belt at each stage: 1 the middle of the belt against the belly, 2 wrapped twice round the waist, 3 the ends crossed in front, 4 one end tucked up under both wraps, 5 the flat square knot (`本結び`), 6 both ends hanging even. A red number and a few red marks say what to look at. `tint` is the jacket and `accent` the belt. Six ids rather than a `step` option, because this package makes a drawing that differs by more than a colour an id (the suits, the back views, the belts) and keeps options for colours and fill-ins. Names and captions in English and Japanese, the pages [docs/obi-steps.md](docs/obi-steps.md) and [in Japanese](docs/obi-steps.ja.md), and `JAPANESE_IDS` has 41 entries.
|
|
21
38
|
- Tests: every pair of national volleyballs differs by a mean CIE L\*a\*b\* distance of 35 or more with at least 7 panels clearly different, and no two share a layout; the grooved ball's contrast against a light and a dark page; the belt steps' order, their agreement with the judogi, their names and captions, and that they turn without clipping.
|
|
22
39
|
|
|
23
40
|
### Internal
|
|
@@ -73,7 +90,7 @@ The judo suit, the belt and the football pictograms were wrong, and are redrawn
|
|
|
73
90
|
|
|
74
91
|
- **`gear:judogi-blue`, `gear:judogi-folded` and `gear:judogi-blue-folded`**: the blue judogi (IJF colour rule C1.9, `JUDOGI_BLUE`), and both suits folded into a neat rectangle with the collar and lapel stitching on top and the belt tied round it. `JUDOGI_WHITE` and `JUDOGI_BLUE` are exported.
|
|
75
92
|
- **A belt for every grade**: `gear:obi-white`, `-yellow`, `-orange`, `-green`, `-blue`, `-brown`, `gear:obi-kohaku` (red and white panels, 6th to 8th dan), `gear:obi-red` (9th and 10th dan), `gear:obi-women` (the black belt with the white stripe women wear in Japan) and the two-colour belts `gear:obi-white-yellow`, `-yellow-orange`, `-orange-green`, `-green-blue` and `-blue-brown`. `OBI_RANKS` gains `kohaku` and `red`, and `obi(rank, options)` takes a grade or a pair of grades (`obi(["white", "yellow"])`), `tint` as one colour or a pair, and `women: true`.
|
|
76
|
-
- Japanese names and descriptions read by a Japanese reviewer (
|
|
93
|
+
- Japanese names and descriptions read by a Japanese reviewer (`右前` for the lapels, `本結び` for the knot; the two-colour belts are a European custom with no Japanese standard name, so they are `「A と B の二色帯」`), tests (`test/judo.test.ts`) for the colours, the belts and the football stripes, regenerated gallery pages and gear contact sheet.
|
|
77
94
|
|
|
78
95
|
### Changed
|
|
79
96
|
|
|
@@ -160,7 +177,7 @@ Eleven balls and implements drawn to the rulebook's proportions, flat emblems tu
|
|
|
160
177
|
|
|
161
178
|
### Changed
|
|
162
179
|
|
|
163
|
-
- **The gallery is two pages, one language each.** `docs/gallery.md` (English) and `docs/gallery.ja.md` (
|
|
180
|
+
- **The gallery is two pages, one language each.** `docs/gallery.md` (English) and `docs/gallery.ja.md` (the Japanese) are both written by `scripts/make-gallery.mjs`, linked to each other at the top, with the columns Id, name, kind, source and description. The Constant and Import columns are gone (the long paths made GitHub squeeze the Japanese column to one character wide, so the names stacked): each page states once that the constant is the id in capitals (`trophy:lidded-cup` becomes `TROPHY_LIDDED_CUP`) and that it is imported from `@johnmorrisdotca/dougu-sports/trophy/lidded-cup`, and the generator stops if the rule fails for any emblem. `pnpm test:readme` checks both pages and accepts the rule as naming each emblem's constant.
|
|
164
181
|
|
|
165
182
|
## [0.2.0] - 2026-10-14
|
|
166
183
|
|
|
@@ -169,7 +186,7 @@ The package is now 167 emblems (24 trophies, 5 awards, 6 medals, 4 crests, 38 sp
|
|
|
169
186
|
### Added
|
|
170
187
|
|
|
171
188
|
- **Japanese sports and budō** ([docs/japanese-sports.md](docs/japanese-sports.md)), all original drawings with generic ids and no real trophy's name: `trophy:sumo-cup` (a tall silver cup on a tall stepped stand with phoenix-crested handles, a body of revolution), `trophy:championship-banner` (a fringed banner on a pole with a gilt finial and an embroidered border, no lettering unless `initials` gives up to three letters; `tint` is the cloth, `accent` the trim), and the gear `gear:gunbai` (the referee's war fan with its tassel), `gear:mawashi`, `gear:shinai`, `gear:kendo-men`, `gear:judogi`, `gear:obi` (with `OBI_RANKS`, white to black, and `obi(rank, options)`), `gear:yumi`, `gear:ya` and `gear:karate-gi`. Five sports are added to `SPORT_NAMES` (now 38) with a pictogram each: `sumo`, `kendo`, `judo`, `kyudo`, `karate`. `JAPANESE_IDS` lists the 16 together, and the gallery page shows them in a section of their own.
|
|
172
|
-
- **Japanese names are first-class**, read by a reviewer and using the governing bodies' words (
|
|
189
|
+
- **Japanese names are first-class**, read by a reviewer and using the governing bodies' words (`柔道衣`, `空手衣`, `廻し`, `軍配`, `竹刀`, `剣道の面`, `優勝旗`, `弓`, `矢`); `emblemInfo(id).description` and `EMBLEM_DESCRIPTIONS` hold a longer description in English and Japanese for the docs and the gallery.
|
|
173
190
|
- Gear has the `color` style (flat fills) as well as `metal` and `line`, and a part can be shaded across its width (`cyl`) as a round shaft is.
|
|
174
191
|
- **Labels.** `EmblemOptions` takes `locale` (`"en"` or `"ja"`: the `<title>` is the emblem's Japanese name, with `lang="ja"` on the drawing) and `title` (a string is written, escaped; `false` drops the `<title>` and marks the drawing `aria-hidden="true"`). Both work for every emblem in every style, still and turned, and in `crest()` and `medal()`.
|
|
175
192
|
- **`emblemDataUri(ref, options)`**: a percent-encoded `data:image/svg+xml;utf8,…` address for an `<img>`, a CSS background or a canvas, with `currentColor` made a concrete colour (`color` for the line, else the theme's ink; the default is dark ink), and a browser test that loads it in an `<img>` and on a canvas.
|
package/README.md
CHANGED
|
@@ -199,17 +199,17 @@ console.log(renderEmblem("ball:soccer", { tint: "not a colour" }) === renderEmbl
|
|
|
199
199
|
|
|
200
200
|
A tint is `#rgb`, `#rrggbb` or `rgb(r, g, b)`; anything else is ignored, so a colour that comes from outside cannot reach the markup. The `accent` option is a second colour in the same form: a medal's ribbon, a crest's band, a rosette's tails.
|
|
201
201
|
|
|
202
|
-
### Draw a crest for a team with no logo
|
|
202
|
+
### Draw a crest for a country or a team with no logo
|
|
203
203
|
|
|
204
204
|
```js
|
|
205
205
|
import { crest } from "@johnmorrisdotca/dougu-sports/emblems";
|
|
206
206
|
|
|
207
|
-
const svg = crest({ shape: "roundel", colors: ["#
|
|
208
|
-
console.log(svg.includes(">
|
|
209
|
-
console.log(svg.includes("#
|
|
207
|
+
const svg = crest({ shape: "roundel", colors: ["#d52b1e", "#ffffff"], initials: "can" });
|
|
208
|
+
console.log(svg.includes(">CAN<")); // true
|
|
209
|
+
console.log(svg.includes("#d52b1e") && svg.includes("#ffffff")); // true
|
|
210
210
|
```
|
|
211
211
|
|
|
212
|
-
A crest takes the team's colour and a second colour, and up to three letters, in the ink that reads on the colour; with no letters it has a star. `medal("gold")` and `sportIcon("nhl")` are the same kind of shortcut.
|
|
212
|
+
A crest takes the country's or team's colour and a second colour, and up to three letters, in the ink that reads on the colour; with no letters it has a star. `medal("gold")` and `sportIcon("nhl")` are the same kind of shortcut.
|
|
213
213
|
|
|
214
214
|
### Draw balls at their true sizes
|
|
215
215
|
|
|
@@ -604,7 +604,7 @@ Bug reports and ideas go in the [issues](https://github.com/johnmorrisdotca/doug
|
|
|
604
604
|
|
|
605
605
|
## Changes
|
|
606
606
|
|
|
607
|
-
See [CHANGELOG.md](./CHANGELOG.md). 0.7.0 gives the national volleyballs layouts that tell them apart (Japan a crimson band, Poland white above and red below, the USA a navy field), strengthens the 2010-style grooved soccer ball, and adds six pictures of how the judo belt is tied, `gear:obi-step-1` to `gear:obi-step-6` (269 emblems: [docs/obi-steps.md](./docs/obi-steps.md)); 0.6.0 gives the judo suit and the karate suit their sleeves (a judogi has no short ones: they reach the wrist) and adds the judogi seen from behind with the IJF-style back number, a family name and a country code on a patch, with a `backnumber` option (269 emblems: [docs/judogi-back.md](./docs/judogi-back.md)); 0.5.1 redraws the judo suit, the belt and the football pictograms and adds the blue and folded suits and the belts of every grade (261 emblems: [docs/japanese-sports.md](./docs/japanese-sports.md)); 0.5.0 adds fifty balls: vintage leather soccer balls, era-style and shop-wall soccer balls, baseballs of other threads and volleyballs in national colours, with a `colors` option (244 emblems: [docs/vintage-balls.md](./docs/vintage-balls.md)); 0.4.0 adds eight printed pucks and a `face` option (194 emblems: [docs/pucks.md](./docs/pucks.md)); 0.3.0 adds nineteen soccer balls (26, 18, 14, 12 and 6 panels, winter orange and high-visibility yellow, futsal and beach soccer: 186 emblems); 0.2.1 draws every ball and implement to the rulebook's proportions; 0.2.0 is 167 emblems, every one drawn here, with the Japanese sports, engraving, a turn for every emblem and the compose helpers; 0.1.0 brought the first full set of 148; 0.0.1 was the first preview.
|
|
607
|
+
See [CHANGELOG.md](./CHANGELOG.md). 0.7.2 makes every docs page single-language (a page in Japanese beside each page that had Japanese words in it, and a test that holds them apart), with no change to the pictures; 0.7.1 puts real countries (Canada, Japan) in the crest and puck examples in place of made-up teams, with no change to the code; 0.7.0 gives the national volleyballs layouts that tell them apart (Japan a crimson band, Poland white above and red below, the USA a navy field), strengthens the 2010-style grooved soccer ball, and adds six pictures of how the judo belt is tied, `gear:obi-step-1` to `gear:obi-step-6` (269 emblems: [docs/obi-steps.md](./docs/obi-steps.md)); 0.6.0 gives the judo suit and the karate suit their sleeves (a judogi has no short ones: they reach the wrist) and adds the judogi seen from behind with the IJF-style back number, a family name and a country code on a patch, with a `backnumber` option (269 emblems: [docs/judogi-back.md](./docs/judogi-back.md)); 0.5.1 redraws the judo suit, the belt and the football pictograms and adds the blue and folded suits and the belts of every grade (261 emblems: [docs/japanese-sports.md](./docs/japanese-sports.md)); 0.5.0 adds fifty balls: vintage leather soccer balls, era-style and shop-wall soccer balls, baseballs of other threads and volleyballs in national colours, with a `colors` option (244 emblems: [docs/vintage-balls.md](./docs/vintage-balls.md)); 0.4.0 adds eight printed pucks and a `face` option (194 emblems: [docs/pucks.md](./docs/pucks.md)); 0.3.0 adds nineteen soccer balls (26, 18, 14, 12 and 6 panels, winter orange and high-visibility yellow, futsal and beach soccer: 186 emblems); 0.2.1 draws every ball and implement to the rulebook's proportions; 0.2.0 is 167 emblems, every one drawn here, with the Japanese sports, engraving, a turn for every emblem and the compose helpers; 0.1.0 brought the first full set of 148; 0.0.1 was the first preview.
|
|
608
608
|
|
|
609
609
|
## Credits
|
|
610
610
|
|
|
@@ -106,7 +106,7 @@ export const EMBLEM_DESCRIPTIONS = {
|
|
|
106
106
|
"gear:obi-step-2": { en: "Step 2 of tying the judo belt: the belt is wrapped twice round the waist, and both ends come back to the front", ja: "柔道の帯の結び方、手順2。帯を腰に二重に巻き、両端を前に戻す" },
|
|
107
107
|
"gear:obi-step-3": { en: "Step 3 of tying the judo belt: the two ends are crossed in front of the belly, the wearer's left end over the right one", ja: "柔道の帯の結び方、手順3。おなかの前で両端を交差させる。着る人の左の端が、右の端の上になるように重ねる" },
|
|
108
108
|
"gear:obi-step-4": { en: "Step 4 of tying the judo belt: one end is brought up from below, under both layers of the belt round the waist", ja: "柔道の帯の結び方、手順4。片方の端を、腰に巻いた二重の帯の下から上へ通す" },
|
|
109
|
-
"gear:obi-step-5": { en: "Step 5 of tying the judo belt: the flat square knot (hon-musubi
|
|
109
|
+
"gear:obi-step-5": { en: "Step 5 of tying the judo belt: the flat square knot (hon-musubi), left over right and then right over left", ja: "柔道の帯の結び方、手順5。本結びで結ぶ。左を右の上に重ね、次に右を左の上に重ねる" },
|
|
110
110
|
"gear:obi-step-6": { en: "Step 6 of tying the judo belt: the knot is pulled tight and both ends hang down even, with a mark under their tips", ja: "柔道の帯の結び方、手順6。結び目を締め、両端の長さをそろえて垂らす。先端の下に、長さがそろっていることを示す印がある" },
|
|
111
111
|
"gear:yumi": { en: "The long asymmetric bow, held a third of the way up, with its string and wrapped grip", ja: "上が長い非対称の長弓。弦を張り、握り革と籐巻きが付く" },
|
|
112
112
|
"gear:ya": { en: "A kyudo arrow with feather fletching, a nock and a steel point", ja: "弓道の矢。矢羽根、筈、矢尻が付く" },
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// avoided) in close-up, and the belt (`$accent`, black by default) at each stage. The belt is the one `gear:judogi` and the belts are drawn with, so a step's belt takes `accent` like theirs.
|
|
3
3
|
//
|
|
4
4
|
// 1. the middle of the belt against the belly; 2. wrapped twice round the waist, both ends back in front; 3. the ends crossed in front; 4. one end brought up under both layers;
|
|
5
|
-
// 5. the flat square knot (hon-musubi
|
|
5
|
+
// 5. the flat square knot (hon-musubi); 6. both ends hanging even.
|
|
6
6
|
//
|
|
7
7
|
// The close-up is the jacket alone, drawn 1.55 times as big, so that the belt's width and the knot read at small sizes; a red number says which step it is, and a few small red marks (the middle, the way an end
|
|
8
8
|
// travels, the equal lengths) say what to look at. The marks and the number are not the suit's, so they ignore `tint` and `accent`.
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.7.
|
|
1
|
+
export declare const VERSION = "0.7.2";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.7.
|
|
1
|
+
export const VERSION = "0.7.2";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@johnmorrisdotca/dougu-sports",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Dougu Sports 道具, sports emblems as SVG strings: trophies, medals, crests, sport icons, and the ball and gear of every sport, in metal, line or flat colour, with optional 3D turning. Light and dark, accessible, tree-shakeable. Zero dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sports",
|