@tekkare/romulus 0.1.20 → 0.1.21

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/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
- "version": "0.1.19",
7
+ "version": "0.1.20",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -24,6 +24,40 @@ const star = (cx, cy, r, fill = "#FFFFFF") => {
24
24
  });
25
25
  return `<polygon points="${points.join(" ")}" fill="${fill}"/>`;
26
26
  };
27
+ const trigram = (cx, cy, angle) => `
28
+ <g transform="translate(${cx} ${cy}) rotate(${angle})" fill="#000000">
29
+ <rect x="-1.5" y="-1.15" width="3" height="0.5"/>
30
+ <rect x="-1.5" y="-0.25" width="3" height="0.5"/>
31
+ <rect x="-1.5" y="0.65" width="3" height="0.5"/>
32
+ </g>`;
33
+ const MAPLE = (() => {
34
+ const outline = [
35
+ [50, 4],
36
+ [54, 24],
37
+ [68, 20],
38
+ [65, 32],
39
+ [80, 29],
40
+ [76, 41],
41
+ [96, 45],
42
+ [78, 57],
43
+ [84, 70],
44
+ [64, 66],
45
+ [62, 78],
46
+ [50, 62],
47
+ [38, 78],
48
+ [36, 66],
49
+ [16, 70],
50
+ [22, 57],
51
+ [4, 45],
52
+ [24, 41],
53
+ [20, 29],
54
+ [35, 32],
55
+ [32, 20],
56
+ [46, 24]
57
+ ];
58
+ const points = outline.map(([x, y]) => `${(10.5 + (x - 50) * 0.088).toFixed(2)},${(7.5 + (y - 41) * 0.108).toFixed(2)}`).join(" ");
59
+ return `<polygon points="${points}" fill="#D80621"/>`;
60
+ })();
27
61
  export const RM_FLAGS = {
28
62
  fr: vertical("#002654", "#FFFFFF", "#ED2939"),
29
63
  be: vertical("#000000", "#FDDA24", "#EF3340"),
@@ -51,15 +85,14 @@ export const RM_FLAGS = {
51
85
  ${[1, 3, 5, 7, 9, 11].map((i) => `<rect y="${(i * 15 / 13).toFixed(2)}" width="21" height="${(15 / 13).toFixed(2)}" fill="#FFFFFF"/>`).join("")}
52
86
  <rect width="8.4" height="${(7 * 15 / 13).toFixed(2)}" fill="#0A3161"/>
53
87
  ${[0, 1, 2].flatMap((row) => [0, 1, 2].map((col) => `<circle cx="${2 + col * 2.2}" cy="${1.8 + row * 2.4}" r="0.5" fill="#FFFFFF"/>`)).join("")}`,
54
- ca: `<rect width="21" height="15" fill="#FFFFFF"/><rect width="5.25" height="15" fill="#D80621"/><rect x="15.75" width="5.25" height="15" fill="#D80621"/>
55
- <path d="M10.5 3.2 11.3 5.2 12.9 4.6 12.4 6.6 14 6.3 13.3 7.6 14.6 8.6 12.9 9.2 13.2 10.3 11.2 10 11.4 12.3 10.5 11.4 9.6 12.3 9.8 10 7.8 10.3 8.1 9.2 6.4 8.6 7.7 7.6 7 6.3 8.6 6.6 8.1 4.6 9.7 5.2Z" fill="#D80621"/>`,
88
+ ca: `<rect width="21" height="15" fill="#FFFFFF"/><rect width="5.25" height="15" fill="#D80621"/><rect x="15.75" width="5.25" height="15" fill="#D80621"/>${MAPLE}`,
56
89
  jp: `<rect width="21" height="15" fill="#FFFFFF"/><circle cx="10.5" cy="7.5" r="4.2" fill="#BC002D"/>`,
57
90
  // Taegeuk simplifie : deux demi-disques et les quatre trigrammes ramenes a
58
91
  // des barres. A 21x15 les traits interrompus ne se distinguent plus.
59
92
  kr: `<rect width="21" height="15" fill="#FFFFFF"/>
60
- <path d="M7.2 7.5a3.3 3.3 0 0 1 6.6 0 1.65 1.65 0 0 0-3.3 0 1.65 1.65 0 0 1-3.3 0Z" fill="#CD2E3A"/>
61
- <path d="M7.2 7.5a1.65 1.65 0 0 1 3.3 0 1.65 1.65 0 0 0 3.3 0 3.3 3.3 0 0 1-6.6 0Z" fill="#0047A0"/>
62
- <g stroke="#000000" stroke-width="0.7"><path d="M2.6 3.1 4.8 4.6M2 4 4.2 5.5M4.2 10.4 2 11.9M4.8 11.3 2.6 12.8M16.2 4.6 18.4 3.1M16.8 5.5 19 4M16.2 10.4 18.4 11.9M16.8 11.3 19 12.8"/></g>`,
93
+ <path d="M6.9 7.5a3.6 3.6 0 0 1 7.2 0 1.8 1.8 0 0 0-3.6 0 1.8 1.8 0 0 1-3.6 0Z" fill="#CD2E3A"/>
94
+ <path d="M6.9 7.5a1.8 1.8 0 0 1 3.6 0 1.8 1.8 0 0 0 3.6 0 3.6 3.6 0 0 1-7.2 0Z" fill="#0047A0"/>
95
+ ${trigram(3.4, 3.2, -58.4)}${trigram(17.6, 3.2, 58.4)}${trigram(3.4, 11.8, 58.4)}${trigram(17.6, 11.8, -58.4)}`,
63
96
  cn: `<rect width="21" height="15" fill="#EE1C25"/>${star(4.5, 4.2, 2.4, "#FFDE00")}${star(8.6, 1.9, 0.9, "#FFDE00")}${star(9.9, 3.7, 0.9, "#FFDE00")}${star(9.9, 5.9, 0.9, "#FFDE00")}${star(8.6, 7.6, 0.9, "#FFDE00")}`,
64
97
  au: `<rect width="21" height="15" fill="#012169"/><g transform="scale(0.5)">${UNION}</g>
65
98
  ${star(5.2, 11.4, 1.1)}${star(16.5, 3.4, 0.9)}${star(18.2, 7.4, 0.9)}${star(16.2, 11.2, 0.9)}${star(14.2, 8.6, 0.6)}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/romulus",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "Romulus Design System - Nuxt module by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",