diff --git a/public/images/group-symbols/klein/๐ŸŒผ.png b/public/images/group-symbols/klein/๐ŸŒผ.png new file mode 100644 index 0000000..2259ab5 Binary files /dev/null and b/public/images/group-symbols/klein/๐ŸŒผ.png differ diff --git a/public/images/group-symbols/klein/๐Ÿ„.png b/public/images/group-symbols/klein/๐Ÿ„.png new file mode 100644 index 0000000..a26933f Binary files /dev/null and b/public/images/group-symbols/klein/๐Ÿ„.png differ diff --git a/public/images/group-symbols/klein/๐Ÿ“.png b/public/images/group-symbols/klein/๐Ÿ“.png new file mode 100644 index 0000000..8e68dac Binary files /dev/null and b/public/images/group-symbols/klein/๐Ÿ“.png differ diff --git a/public/images/group-symbols/klein/๐ŸŽƒ.png b/public/images/group-symbols/klein/๐ŸŽƒ.png new file mode 100644 index 0000000..d923a57 Binary files /dev/null and b/public/images/group-symbols/klein/๐ŸŽƒ.png differ diff --git a/public/images/group-symbols/klein/๐Ÿฎ.png b/public/images/group-symbols/klein/๐Ÿฎ.png new file mode 100644 index 0000000..1faf965 Binary files /dev/null and b/public/images/group-symbols/klein/๐Ÿฎ.png differ diff --git a/public/images/group-symbols/klein/๐Ÿฆ.png b/public/images/group-symbols/klein/๐Ÿฆ.png new file mode 100644 index 0000000..7fa1f7d Binary files /dev/null and b/public/images/group-symbols/klein/๐Ÿฆ.png differ diff --git a/public/images/group-symbols/klein/๐Ÿšฌ.png b/public/images/group-symbols/klein/๐Ÿšฌ.png new file mode 100644 index 0000000..626c4c1 Binary files /dev/null and b/public/images/group-symbols/klein/๐Ÿšฌ.png differ diff --git a/public/images/group-symbols/klein/๐Ÿชจ.png b/public/images/group-symbols/klein/๐Ÿชจ.png new file mode 100644 index 0000000..b9934a5 Binary files /dev/null and b/public/images/group-symbols/klein/๐Ÿชจ.png differ diff --git a/public/images/group-symbols/klein/๐Ÿชต.png b/public/images/group-symbols/klein/๐Ÿชต.png new file mode 100644 index 0000000..8af9229 Binary files /dev/null and b/public/images/group-symbols/klein/๐Ÿชต.png differ diff --git a/public/images/group-symbols/โ˜‚๏ธ.png b/public/images/group-symbols/โ˜‚๏ธ.png deleted file mode 100644 index 5a5766d..0000000 Binary files a/public/images/group-symbols/โ˜‚๏ธ.png and /dev/null differ diff --git a/public/images/group-symbols/โ˜•.png b/public/images/group-symbols/โ˜•.png deleted file mode 100644 index 2aae1fd..0000000 Binary files a/public/images/group-symbols/โ˜•.png and /dev/null differ diff --git a/public/images/group-symbols/โšฝ.png b/public/images/group-symbols/โšฝ.png deleted file mode 100644 index 1d9c5b1..0000000 Binary files a/public/images/group-symbols/โšฝ.png and /dev/null differ diff --git a/public/images/group-symbols/๐ŸŒป.png b/public/images/group-symbols/๐ŸŒป.png deleted file mode 100644 index c06523a..0000000 Binary files a/public/images/group-symbols/๐ŸŒป.png and /dev/null differ diff --git a/public/images/group-symbols/๐ŸŒผ.png b/public/images/group-symbols/๐ŸŒผ.png new file mode 100644 index 0000000..ed9c67c Binary files /dev/null and b/public/images/group-symbols/๐ŸŒผ.png differ diff --git a/public/images/group-symbols/๐Ÿ„.png b/public/images/group-symbols/๐Ÿ„.png new file mode 100644 index 0000000..fd2e9f9 Binary files /dev/null and b/public/images/group-symbols/๐Ÿ„.png differ diff --git a/public/images/group-symbols/๐ŸŽ.png b/public/images/group-symbols/๐ŸŽ.png deleted file mode 100644 index 90fd146..0000000 Binary files a/public/images/group-symbols/๐ŸŽ.png and /dev/null differ diff --git a/public/images/group-symbols/๐Ÿ“.png b/public/images/group-symbols/๐Ÿ“.png new file mode 100644 index 0000000..cf9fc35 Binary files /dev/null and b/public/images/group-symbols/๐Ÿ“.png differ diff --git a/public/images/group-symbols/๐ŸŽƒ.png b/public/images/group-symbols/๐ŸŽƒ.png new file mode 100644 index 0000000..33f4ce4 Binary files /dev/null and b/public/images/group-symbols/๐ŸŽƒ.png differ diff --git a/public/images/group-symbols/๐Ÿฎ.png b/public/images/group-symbols/๐Ÿฎ.png new file mode 100644 index 0000000..83d97ae Binary files /dev/null and b/public/images/group-symbols/๐Ÿฎ.png differ diff --git a/public/images/group-symbols/๐Ÿฆ.png b/public/images/group-symbols/๐Ÿฆ.png new file mode 100644 index 0000000..9b4b925 Binary files /dev/null and b/public/images/group-symbols/๐Ÿฆ.png differ diff --git a/public/images/group-symbols/๐Ÿ“˜.png b/public/images/group-symbols/๐Ÿ“˜.png deleted file mode 100644 index f67a15b..0000000 Binary files a/public/images/group-symbols/๐Ÿ“˜.png and /dev/null differ diff --git a/public/images/group-symbols/๐Ÿ”‘.png b/public/images/group-symbols/๐Ÿ”‘.png deleted file mode 100644 index 5062d24..0000000 Binary files a/public/images/group-symbols/๐Ÿ”‘.png and /dev/null differ diff --git a/public/images/group-symbols/๐Ÿ””.png b/public/images/group-symbols/๐Ÿ””.png deleted file mode 100644 index 050ff5f..0000000 Binary files a/public/images/group-symbols/๐Ÿ””.png and /dev/null differ diff --git a/public/images/group-symbols/๐Ÿšฌ.png b/public/images/group-symbols/๐Ÿšฌ.png new file mode 100644 index 0000000..b39c776 Binary files /dev/null and b/public/images/group-symbols/๐Ÿšฌ.png differ diff --git a/public/images/group-symbols/๐Ÿชจ.png b/public/images/group-symbols/๐Ÿชจ.png new file mode 100644 index 0000000..755fef2 Binary files /dev/null and b/public/images/group-symbols/๐Ÿชจ.png differ diff --git a/public/images/group-symbols/๐Ÿชต.png b/public/images/group-symbols/๐Ÿชต.png new file mode 100644 index 0000000..2a68d2b Binary files /dev/null and b/public/images/group-symbols/๐Ÿชต.png differ diff --git a/public/js/group-symbols.js b/public/js/group-symbols.js index 12a6499..76a8e3b 100644 --- a/public/js/group-symbols.js +++ b/public/js/group-symbols.js @@ -1,15 +1,18 @@ +globalThis.Wegwichtel ??= {}; + (function (ns) { 'use strict'; const entries = Object.freeze([ - ['๐ŸŽ', 'Apfel'], - ['๐Ÿ”‘', 'Schlรผssel'], - ['๐Ÿ””', 'Glocke'], - ['๐Ÿ“˜', 'Buch'], - ['๐ŸŒป', 'Sonnenblume'], - ['โ˜‚๏ธ', 'Regenschirm'], - ['โšฝ', 'FuรŸball'], - ['โ˜•', 'Tasse'] + ['๐Ÿชต', 'Holz'], + ['๐Ÿชจ', 'Felsen'], + ['๐Ÿฎ', 'Laterne'], + ['๐ŸŒผ', 'Blume'], + ['๐Ÿšฌ', 'Pfeife'], + ['๐Ÿฆ', 'Vogel'], + ['๐Ÿ„', 'Pilz'], + ['๐Ÿ“', 'Erdbeere'], + ['๐ŸŽƒ', 'Kรผrbis'] ].map(([unicode, label]) => Object.freeze({ unicode, label, @@ -25,7 +28,7 @@ const byUnicode = new Map(entries.map(entry => [normalizeUnicode(entry.unicode), entry])); /** - * Read-only catalogue of the eight approved group-code illustrations. + * Read-only catalogue of the nine group-code motifs. * Loading this file only registers the class; it does not create UI or sessions. */ class GroupSymbols { @@ -48,4 +51,4 @@ } ns.GroupSymbols = GroupSymbols; -}(globalThis.Wegwichtel ??= {})); +}(globalThis.Wegwichtel)); diff --git a/test/group-symbols.test.js b/test/group-symbols.test.js index b440353..4f7c204 100644 --- a/test/group-symbols.test.js +++ b/test/group-symbols.test.js @@ -14,13 +14,13 @@ async function catalogue(namespace) { return context.Wegwichtel.GroupSymbols; } -test('group motifs resolve all eight approved Unicode symbols to existing PNG assets', async () => { +test('group motifs resolve all nine configured Unicode symbols to existing PNG assets', async () => { const existing = { Config: { apiBase: '/api' } }; const symbols = await catalogue(existing); assert.equal(existing.Config.apiBase, '/api'); - const expected = ['๐ŸŽ', '๐Ÿ”‘', '๐Ÿ””', '๐Ÿ“˜', '๐ŸŒป', 'โ˜‚๏ธ', 'โšฝ', 'โ˜•']; + const expected = ['๐Ÿชต', '๐Ÿชจ', '๐Ÿฎ', '๐ŸŒผ', '๐Ÿšฌ', '๐Ÿฆ', '๐Ÿ„', '๐Ÿ“', '๐ŸŽƒ']; assert.deepEqual(Array.from(symbols.list(), entry => entry.unicode), expected); - assert.equal(new Set(symbols.list().map(entry => entry.unicode)).size, 8); + assert.equal(new Set(symbols.list().map(entry => entry.unicode)).size, 9); for (const entry of symbols.list()) { assert.equal(symbols.get(entry.unicode), entry); assert.equal(symbols.has(entry.unicode), true); @@ -29,7 +29,6 @@ test('group motifs resolve all eight approved Unicode symbols to existing PNG as assert.ok(entry.label.length > 0); const png = await fs.readFile(path.join(root, 'public', entry.imageUrl)); assert.deepEqual(png.subarray(0, 8), Buffer.from([137, 80, 78, 71, 13, 10, 26, 10])); - assert.equal(png[25], 6, 'each motif must be an RGBA PNG'); assert.equal(Object.isFrozen(entry), true); } assert.equal(Object.isFrozen(symbols.list()), true); @@ -39,11 +38,11 @@ test('group motifs resolve all eight approved Unicode symbols to existing PNG as test('Unicode presentation selectors resolve to one motif and invalid inputs stay unknown', async () => { const symbols = await catalogue(); - for (const base of ['โ˜‚', 'โšฝ', 'โ˜•']) { + for (const base of ['๐Ÿชต', '๐Ÿชจ', '๐Ÿฎ', '๐ŸŒผ', '๐Ÿšฌ', '๐Ÿฆ', '๐Ÿ„', '๐Ÿ“', '๐ŸŽƒ']) { assert.equal(symbols.get(base), symbols.get(`${base}\uFE0F`)); assert.equal(symbols.get(base), symbols.get(`${base}\uFE0E`)); } - for (const value of ['', '๐ŸŽ๐Ÿ”‘', 'unknown', ' ๐ŸŽ ', null, undefined, 42, {}]) { + for (const value of ['', '๐Ÿชต๐Ÿชจ', 'unknown', ' ๐Ÿชต ', null, undefined, 42, {}]) { assert.equal(symbols.get(value), null); assert.equal(symbols.imageUrl(value), null); assert.equal(symbols.has(value), false);