qvac-charts 0.1.2 → 0.3.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.
Files changed (36) hide show
  1. package/README.md +25 -5
  2. package/dist-lib/index.d.ts +3 -1
  3. package/dist-lib/index.js +2 -2
  4. package/dist-lib/lib/charts/index.js +2 -3
  5. package/dist-lib/lib/charts/maps.d.ts +0 -1
  6. package/dist-lib/lib/charts/maps.js +24 -81
  7. package/dist-lib/lib/colors.d.ts +11 -0
  8. package/dist-lib/lib/colors.js +205 -0
  9. package/dist-lib/lib/maps/continents/africa.d.ts +82 -0
  10. package/dist-lib/lib/maps/continents/africa.js +1 -0
  11. package/dist-lib/lib/maps/continents/asia.d.ts +86 -0
  12. package/dist-lib/lib/maps/continents/asia.js +1 -0
  13. package/dist-lib/lib/maps/continents/europe.d.ts +69 -0
  14. package/dist-lib/lib/maps/continents/europe.js +1 -0
  15. package/dist-lib/lib/maps/continents/index.d.ts +3 -0
  16. package/dist-lib/lib/maps/continents/index.js +9 -0
  17. package/dist-lib/lib/maps/continents/north-america.d.ts +52 -0
  18. package/dist-lib/lib/maps/continents/north-america.js +1 -0
  19. package/dist-lib/lib/maps/continents/oceania.d.ts +38 -0
  20. package/dist-lib/lib/maps/continents/oceania.js +1 -0
  21. package/dist-lib/lib/maps/continents/south-america.d.ts +32 -0
  22. package/dist-lib/lib/maps/continents/south-america.js +1 -0
  23. package/dist-lib/lib/normalize.js +11 -8
  24. package/dist-lib/lib/pick.js +2 -5
  25. package/dist-lib/lib/places.d.ts +11 -16
  26. package/dist-lib/lib/places.js +21 -31
  27. package/dist-lib/lib/render.d.ts +3 -2
  28. package/dist-lib/lib/render.js +3 -2
  29. package/dist-lib/lib/spec.d.ts +1 -1
  30. package/dist-lib/lib/themes.d.ts +5 -0
  31. package/dist-lib/lib/themes.js +1 -1
  32. package/dist-lib/maps.d.ts +4 -2
  33. package/dist-lib/maps.js +18 -5
  34. package/package.json +4 -1
  35. package/dist-lib/lib/maps/brazil.d.ts +0 -2
  36. package/dist-lib/lib/maps/brazil.js +0 -29
@@ -0,0 +1 @@
1
+ export const map = { "width": 936, "height": 627, "regions": [{ "name": "Vanuatu", "d": "M749.8,152.4L753.8,154.5L754.5,162.1L748.6,163.2L746.9,152.2ZM756.1,170.8L760.8,176.5L755.8,177.1Z", "cx": 751, "cy": 158 }, { "name": "Timor-Leste", "d": "M202.5,77.5L200,70.1L211.1,62.5L230.8,59.2L219.2,67.8Z", "cx": 212, "cy": 67 }, { "name": "Solomon Islands", "d": "M639.6,50.1L632.4,50.5L635.3,46.3ZM665.3,66.3L673.1,69.1L678.9,75.6L666.2,73.3ZM667.6,56.6L655.5,48.8L649.3,41.6L667.3,53.8ZM636.4,37.7L631.3,37.2L623,28.4ZM679.3,54.8L685.8,72.7L680.3,66.3ZM690.2,83.9L698.4,90.8L687.7,86.1Z", "cx": 671, "cy": 71 }, { "name": "Papua New Guinea", "d": "M564.9,0L563.5,2.2L565.2,6.9L556.6,9.1L552.6,13.8L541.7,18.2L531.1,18L514.2,10.6L513.5,7.7L525.8,8.4L549,7.1L558.9,0.4L558.8,0L564.9,0ZM478.4,0L478.1,5.3L506,17.7L506.6,22.3L496.7,23L497.6,31.7L510.2,41.5L516.1,54.3L525,54.7L524.4,59.2L534.6,62.9L533.2,67.5L543.7,71.2L538.9,76.3L531.5,72L505,67.6L490.8,53.5L481.9,40.8L461.4,34L449.3,42.5L442.3,44L446,52.6L436.4,57.6L430.8,55.6L414,55.3L414,55.3L413.2,0L478.4,0ZM616.3,27.5L608,27.4L600.7,17L600.3,10L605.1,12.6Z", "cx": 463, "cy": 31 }, { "name": "New Zealand", "d": "M748.8,521L756,518.8L761.3,520.7L757.3,525.4L758,530.1L742.8,543.5L736.7,547.2L737.6,554.8L729.3,552.9L721.5,554.3L708.6,572.8L696,581.8L684.1,579.8L679.3,573.1L670.7,571.3L670,565.9L677,557.8L693.1,546.9L697.6,546.6L719.7,536.9L726.6,531.2L731.2,523.8L737.6,520.5L740.7,514.2L747.3,509.9ZM681.1,582.7L681.2,585.6L674.1,586.6L678.4,579.9ZM774.7,437.7L784.5,444.7L785.4,460.1L782.5,466.9L789.3,473.9L791.4,464.1L793.6,471.6L792.6,480.6L803.8,489.5L812.3,485.8L816.9,489.2L803.8,507.6L799.6,504L794,506.4L794.1,510.9L776.4,527.8L768.3,531.1L763.3,525.1L771.2,517.8L772.6,508.6L763.9,499.9L764.5,494.8L773.4,492.2L780.7,480.2L778.4,460.8L772.2,440.9ZM834.5,584.9L831.4,588.2L828.2,583.6Z", "cx": 714, "cy": 550 }, { "name": "Indonesia", "d": "M91.4,83.5L88.5,88.5L83.6,82.6L87.6,78.6ZM75.2,80.4L79,83.1L73.6,89.7L62.6,82.5ZM172.3,14.5L168.5,30.2L165.4,28.9L169.1,13.5ZM165.9,25.1L161.1,26.5L161.7,19L166,16.3ZM284.1,47.9L280.8,46.4L287.7,35.8ZM223.5,49.9L219.4,54.2L210.5,55.8L212.5,51.2ZM194.5,60L201.6,61.9L193.1,64.3ZM171.4,69.7L157,75.8L134.2,79L133.7,73.5L142.5,69.2L153.8,72L164.6,70.9L173.4,63.1ZM136.2,85.8L147.8,92.9L143.1,97.2L131.5,92.1L124.7,92.4L125.5,87.8ZM111.7,75.6L121.4,74.1L123.7,78.3L97.6,89L93.8,81.9L103.1,78.7L106.6,82ZM160.1,0L159.1,3.8L168.4,12.4L151.3,20.4L151,11.4L141.1,5.7L141.2,0L160.1,0ZM132.3,0L131.9,0.3L134.9,8.7L134.4,28.3L136.9,34L127.6,36.9L122.7,34L124.5,14.8L121.2,7.8L115.6,9.5L112.2,0L132.3,0ZM0,79.6L8.7,78.3L11.9,70.9L35.8,71.7L40.1,79.5L46.2,80.5L56.6,77L61.9,79.6L65.1,91L47.2,88.2L40.1,91.5L13.2,94.1L5.5,92.3L0,92.7L0,79.6ZM81.2,0L81.9,1.4L75.5,17.5L59.7,28.5L56.5,18.2L47,21.2L36.4,16.2L31.3,23.7L21.4,27.7L20.8,21.2L0.9,24.7L0,21.3L0,0ZM200,70.1L202.5,77.5L194.9,87.2L184.8,90.8L184.8,81.4L188.8,77.1L193.9,74.3ZM328.8,13.9L329.1,20L320.9,18.6L326.9,10.4ZM326.3,23.8L320,28.6L321.2,20.6ZM380.9,45.2L369.6,47.5L373.6,37.1L383.8,33.3L386.9,37.3ZM413.2,0L414,55.3L399.7,42.2L385.2,43.3L387.5,30.7L379,19.6L373.6,8.2L360.2,1.7L354.4,0L413.2,0ZM52.9,70.5L42.7,74.2L40,70.4L54.2,67ZM80.4,20.3L76.5,18.7L79.3,12.1Z", "cx": -1, "cy": -1 }, { "name": "New Caledonia", "d": "M708.9,220.5L720.2,229.4L725.1,237L739,250.6L736.4,254.1L719.4,239.7L708.1,223.6Z", "cx": 723, "cy": 238 }, { "name": "Fiji", "d": "M911.8,205.3L905,211.8L894,212.2L892,208.9L906.2,205ZM887.8,216.2L890.5,227L880.2,226.8L874.3,222.8L879.5,215.4Z", "cx": 883, "cy": 222 }, { "name": "Australia", "d": "M443.9,92.5L451.7,124.4L461.1,122.8L471.8,132.3L473.5,151.8L482.5,168.4L481.2,176.9L486.9,187.8L498.7,192L504.9,198.7L513.5,202.6L514.4,208.4L523.7,222.2L525.2,231.3L529.8,235.4L531.2,230.3L539.6,236.2L540,248.1L552.6,258.7L564,276L566.6,283.3L564.9,299.8L569.4,314.2L569.2,322.5L565.8,328.1L560.9,345L559.1,356.6L552.8,369.8L544.9,375.5L538.6,384.4L530.7,405.4L524.8,414L520.8,436.5L513.9,439.9L502.8,440L493.4,444.9L487.6,450.8L480.2,453.4L472.2,448.9L466.8,440.4L464.4,444.5L452.6,452.8L442.7,448L430.1,447.2L421.5,443L412,432.9L412.4,425L408.6,417.6L401.9,411L393.3,411.9L396.4,403.8L391,392.6L387.5,405.9L378.7,407.8L384,403.1L384.4,392.9L388.8,384.8L386.5,374.8L381,386L372.5,391.9L364.8,404.8L353.4,384L347.7,382.3L346.1,374.1L328.6,367.7L322.6,369L309.7,363.5L285.2,369.3L268.1,379.4L252.6,382.3L234.9,396.7L231.5,407.1L227.1,410L215.7,412.3L207.2,411.7L191,417.2L188,423.4L182.5,426.2L176.2,434.8L170.7,437.7L159.2,439L140.8,433.4L137.8,423.6L143.4,422.3L143.9,417.4L138.8,397.4L130,387L122.9,369.2L109.4,353.4L105.4,343.9L94.5,333.5L103,330.9L102.7,323.3L89,306.6L89.8,291.8L86.6,281.5L89.4,269.3L91.5,278.1L97.8,265.9L104.2,261L117,246.2L125.6,245.3L140.7,235.7L165.4,222.6L171.8,213.7L174.8,204.5L180.5,197.4L176.7,188.1L185.3,174.6L194.6,188L196.2,178.8L191.9,174.3L203.9,170.3L202.4,159L215.5,143.3L219.6,144.6L222.6,135.8L227.8,137.3L231.5,131.1L242,135.9L249.5,142.6L263.4,142.6L268.4,145.7L270.8,141.2L264.3,136L269.4,124.4L274.6,120.2L273,115.7L278.5,108L286.9,102.3L289,104.9L304.5,100.3L304.7,95.1L293.1,91L299,89.6L304.7,93.2L325.6,98.3L338.7,100.2L345,98.9L352.5,102.2L356,95.6L361.5,100.5L355.6,112.6L348.7,114.1L348.6,125.5L342.8,134L344.6,137.1L373.5,152L380.8,158.1L390.7,160.1L394,165.7L404.3,170.3L414.4,166.1L419.1,155.7L424,134.3L421.7,117.5L423.3,106.1L427.3,104.1L424.2,98.1L430.3,79.3L434.1,76L439.2,83.9L439.8,90.8ZM565.7,280.4L565.7,272.8L569.6,271.3ZM359.3,120.1L361.9,126.6L354.6,125.9ZM277.4,93.9L285.8,90.6L289.6,93.6L282.3,100.9ZM387,414L392,413.9L385.8,418.6L378.2,418.5L376.6,414.8ZM468.4,479L481.4,484.1L493.1,482.1L498.5,479.3L501.7,481.6L501.3,496.2L497.2,503.1L497.5,510.9L492,507.3L486.4,516.8L478.3,515.8L472.8,507.5L470,498.2L473.2,499.9L465.7,487.4L465.1,477.4Z", "cx": 339, "cy": 281 }], "aliases": { "Vanuatu": ["VU", "VUT"], "Micronesia": ["Federated States of Micronesia", "Micronésia", "Estados Federados de Micronesia", "États fédérés de Micronésie", "Föderierte Staaten von Mikronesien", "Stati Federati di Micronesia", "FM", "FSM"], "Marshall Is.": ["Marshall Islands", "Ilhas Marshall", "Islas Marshall", "Îles Marshall", "Marshallinseln", "Isole Marshall", "MH", "MHL"], "N. Mariana Is.": ["Northern Mariana Islands", "Ilhas Marianas do Norte", "Islas Marianas del Norte", "îles Mariannes du Nord", "Nördliche Marianen", "Isole Marianne Settentrionali", "MP", "MNP"], "Guam": ["GU", "GUM"], "American Samoa": ["Samoa Americana", "Samoa Estadounidense", "Samoa américaines", "Amerikanisch-Samoa", "Samoa Americane", "AS", "ASM"], "Pitcairn Is.": ["Pitcairn Islands", "Ilhas Pitcairn", "Islas Pitcairn", "Iles Pitcairn", "Pitcairninseln", "Isole Pitcairn", "PN", "PCN"], "Tonga": ["TO", "TON"], "Timor-Leste": ["East Timor", "Timor Oriental", "Timor oriental", "Osttimor", "Timor Est", "TL", "TLS"], "Solomon Islands": ["Solomon Is.", "Ilhas Salomão", "Islas Salomón", "Îles Salomon", "Salomonen", "Isole Salomone", "SB", "SLB"], "Samoa": ["WS", "WSM"], "Papua New Guinea": ["Papua-Nova Guiné", "Papúa Nueva Guinea", "Papouasie-Nouvelle-Guinée", "Papua-Neuguinea", "Papua Nuova Guinea", "PG", "PNG"], "Palau": ["Palaos", "PW", "PLW"], "New Zealand": ["Nova Zelândia", "Nueva Zelanda", "Nouvelle-Zélande", "Neuseeland", "Nuova Zelanda", "NZ", "NZL"], "Niue": ["NU", "NIU"], "Cook Is.": ["Cook Islands", "Ilhas Cook", "Islas Cook", "Îles Cook", "Cookinseln", "Isole Cook", "CK", "COK"], "Nauru": ["NR", "NRU"], "Kiribati": ["KI", "KIR"], "Wallis and Futuna Is.": ["Wallis and Futuna Islands", "Wallis and Futuna", "Wallis e Futuna", "Wallis y Futuna", "Wallis-et-Futuna", "Wallis und Futuna", "WF", "WLF"], "Fr. Polynesia": ["French Polynesia", "Polinésia Francesa", "Polinesia Francesa", "Polynésie française", "Französisch-Polynesien", "Polinesia francese", "PF", "PYF"], "New Caledonia": ["Nova Caledónia", "Nueva Caledonia", "Nouvelle-Calédonie", "Neukaledonien", "Nuova Caledonia", "NC", "NCL"], "Fiji": ["Fiyi", "Fidji", "Fidschi", "Figi", "FJ", "FJI"], "Australia": ["Austrália", "Australie", "Australien", "AU", "AUS"], "Norfolk Island": ["Ilha Norfolk", "Isla Norfolk", "Île Norfolk", "Norfolkinsel", "Isola Norfolk", "NF", "NFK"], "Ashmore and Cartier Is.": ["Ashmore and Cartier Islands", "Ilhas Ashmore e Cartier", "Islas Ashmore y Cartier", "Îles Ashmore-et-Cartier", "Ashmore- und Cartierinseln", "Isole Ashmore e Cartier", "AU", "AUS"], "Tuvalu": ["TV", "TUV"] } };
@@ -0,0 +1,32 @@
1
+ export declare const map: {
2
+ width: number;
3
+ height: number;
4
+ regions: {
5
+ name: string;
6
+ d: string;
7
+ cx: number;
8
+ cy: number;
9
+ }[];
10
+ aliases: {
11
+ Venezuela: string[];
12
+ Uruguay: string[];
13
+ "Falkland Islands": string[];
14
+ "Trinidad and Tobago": string[];
15
+ Suriname: string[];
16
+ Peru: string[];
17
+ Paraguay: string[];
18
+ Panama: string[];
19
+ Nicaragua: string[];
20
+ Aruba: string[];
21
+ Curaçao: string[];
22
+ Guyana: string[];
23
+ Grenada: string[];
24
+ Ecuador: string[];
25
+ "Costa Rica": string[];
26
+ Colombia: string[];
27
+ Chile: string[];
28
+ Brazil: string[];
29
+ Bolivia: string[];
30
+ Argentina: string[];
31
+ };
32
+ };
@@ -0,0 +1 @@
1
+ export const map = { "width": 796, "height": 936, "regions": [{ "name": "Venezuela", "d": "M431.8,57.1L434.4,60.3L422.3,70.6L427.6,75.4L416.4,80.9L413.3,91.1L421.9,100.3L418.4,108.9L395.1,115.6L391.6,121.1L387.1,116.9L377.2,116.8L366.4,113L374.5,121.3L376.9,135.1L385.9,136.5L376,146.9L362.6,153.7L357.6,159.3L354.7,155.5L346.3,158.6L338.5,152.6L333.9,137.5L325.3,131.1L332.4,124.1L325,110.1L328.8,87.5L303.3,89.6L294.4,79.5L286.8,77.8L269.9,79.7L262.4,74L262.8,62L257.7,52.8L250.1,51.6L256.8,35L269.3,19.4L278,16.6L269.3,20.7L274.1,31.3L267,43.3L272.8,52.6L278.1,51.8L281.4,44.2L275.9,28.2L297.4,21.3L292,15.8L295.9,12L300.9,20.8L311.8,21.1L317.6,24.4L321.1,32.9L346.9,30.6L352.3,35.3L365.9,37.2L379.4,31.2L406.4,28.8L392.3,31.5L400.4,41.1L410.4,39.7L421.2,46.6L414.3,58.8Z", "cx": 348, "cy": 76 }, { "name": "Uruguay", "d": "M499.5,619.1L494.3,627.2L481.4,633.8L468.1,632.8L456.9,626.3L449.6,626.3L443.6,618.6L446.5,599.6L446.9,592.4L454.4,569.5L463.4,568.8L470.6,576L472.3,582.1L477.6,579.6L496.9,596.5L503.4,605.9L498.4,611.4Z", "cx": 471, "cy": 605 }, { "name": "Falkland Islands", "d": "M429.4,845.7L436.9,847.4L437.8,851.6L426,855.2ZM417,847.8L425.7,847.6L419.9,854.4L411,855.4L417.3,851.8Z", "cx": 432, "cy": 850 }, { "name": "Trinidad and Tobago", "d": "M418.2,36.7L411.6,34.9L409.7,29.4L419.5,27.6Z", "cx": 415, "cy": 32 }, { "name": "Suriname", "d": "M511.7,100.3L507.6,104.6L508.9,117.2L513.8,123.4L510.9,133.4L505.2,139.6L500.3,135.9L484.6,139.3L486,145.3L479.8,143.8L476.8,142.5L458.5,114.2L463.3,103.7L468.4,103.4L470.3,96.6L473.4,90.9L487.4,93.8L502.5,91.8L513.1,94.5Z", "cx": 488, "cy": 116 }, { "name": "Peru", "d": "M297.7,225.6L286.5,225.2L272.6,230.2L258.9,239.1L254.8,258.5L248.1,263.4L245.2,272.3L259.5,290.5L256.6,296.3L267.6,296.9L270.4,303.4L282.8,302.2L290.5,295.4L291.1,315.7L305,314.3L317.3,334.5L313.6,339.7L312.7,350.4L315.4,357.2L309.4,367.6L309.1,376.2L314.7,389.8L307.3,397.5L308.9,401.6L304,411.1L297.9,413.3L285.8,405L283.1,400L270.8,392.9L253.1,386.6L236.2,377.9L224.9,368.3L218.6,358.5L220.7,353.6L205.8,330L200.1,325.5L183.2,291.2L164,266.6L149.9,260L153.1,255.7L146.3,241.8L146.8,237.1L158.9,223.4L161.2,229.8L156.9,232.7L168.7,236.8L176.5,243.2L181.4,237.1L185.3,221.3L191.5,215.2L207.1,208.5L221.6,193.8L225,174.8L231.5,175.6L239.2,185.3L247.1,188.6L254.3,201.7L264.5,203.2L273.1,199.1L284.4,199.5L295.9,206.1L287.2,220Z", "cx": 241, "cy": 293 }, { "name": "Paraguay", "d": "M452.2,435.8L456,447L454,461.8L466.5,464.4L473.3,462.2L482.5,470.4L484.8,488.1L493.9,486.2L498.4,489.5L492.7,509.7L489.4,523.9L478.3,533.5L469.6,535L443.7,529.3L457.2,507.6L454.4,502.2L435.9,492.6L429.7,487.7L418.2,484.4L405,473.7L396.1,462.6L400.7,440.4L407.3,428.2L429.3,423.8L440.8,423.8L452.1,431.2Z", "cx": 447, "cy": 476 }, { "name": "Panama", "d": "M195.6,61.9L198,70.7L188.4,81L181.4,70.6L185.6,66.2L172.5,59.1L167.7,59.3L153.9,72.4L159.9,79.5L148.7,84L144.5,76.1L124.1,71.7L121.4,75.2L123.3,63.5L120.7,57.2L125.7,55.1L130,61.9L141.9,64.2L158.5,57.3L165.9,51.7L186.1,55Z", "cx": 160, "cy": 66 }, { "name": "Nicaragua", "d": "M116.3,0L112.9,16L110.5,18.4L111.5,38.9L83.5,39.5L70.3,26.5L58.5,17.9L62.9,16.5L71.4,11.3L71.3,5.5L80.6,0.9L83.9,3.3L87,0L116.3,0Z", "cx": 92, "cy": 19 }, { "name": "Honduras", "d": "M87,0L83.9,3.3L80.6,0.9L71.3,5.5L71.4,11.3L62.9,16.5L56.8,11.7L58.3,6.1L48.2,6.6L40,0.7L39.9,0L87,0Z", "cx": -1, "cy": -1 }, { "name": "Guyana", "d": "M421.9,100.3L413.3,91.1L416.4,80.9L427.6,75.4L422.3,70.6L434.4,60.3L431.8,57.1L443,63.4L452.8,73.2L453.7,79.4L459.6,80.3L470.4,89.5L470.3,96.6L468.4,103.4L463.3,103.7L458.5,114.2L476.8,142.5L479.8,143.8L471.1,142.6L454.5,147.8L452.1,151.7L442.4,150.4L435.3,143.4L432.1,133.1L434,121.4L438.1,117L430,109.1L432.2,102Z", "cx": 445, "cy": 106 }, { "name": "France", "d": "M505.2,139.6L510.9,133.4L513.8,123.4L508.9,117.2L507.6,104.6L511.7,100.3L515.9,95L528.8,100.1L543.8,111.9L545.6,118.7L541,123.1L531.1,140.2L527.5,142.4Z", "cx": -1, "cy": -1 }, { "name": "Ecuador", "d": "M225,174.8L221.6,193.8L207.1,208.5L191.5,215.2L185.3,221.3L181.4,237.1L176.5,243.2L168.7,236.8L156.9,232.7L161.2,229.8L158.9,223.4L166.4,212L159.1,214.3L152.3,206.6L150,193.5L154.5,190L159.8,178.3L160.1,167.8L175.9,161L176.4,157.6L195.3,167L208.6,171.4L211,168.4ZM12.2,195.1L18.9,204.6L11.6,209.3L14.6,202.6Z", "cx": 184, "cy": 195 }, { "name": "Costa Rica", "d": "M125.7,55.1L120.7,57.2L123.3,63.5L121.4,75.2L117.6,68.8L109.9,69.1L111.3,63.5L97.7,56.7L84.8,54.6L83.5,39.5L111.5,38.9L114,44.5Z", "cx": 105, "cy": 52 }, { "name": "Colombia", "d": "M278,16.6L269.3,19.4L256.8,35L250.1,51.6L257.7,52.8L262.8,62L262.4,74L269.9,79.7L286.8,77.8L294.4,79.5L303.3,89.6L328.8,87.5L325,110.1L332.4,124.1L325.3,131.1L333.9,137.5L338.5,152.6L330,141.3L320.8,146.6L298.1,147.4L298.1,155.9L304.8,155.6L307.4,161.2L295.5,162.3L295.4,171.7L300.9,176L304.6,185.3L297.7,225.6L287.2,220L295.9,206.1L284.4,199.5L273.1,199.1L264.5,203.2L254.3,201.7L247.1,188.6L239.2,185.3L231.5,175.6L225,174.8L211,168.4L208.6,171.4L195.3,167L176.4,157.6L179.4,146.2L192,137.7L199.9,123.6L195.1,122L197.3,99.3L195.8,89.9L188.4,81L198,70.7L195.6,61.9L204.1,69.9L201.7,62.6L219.1,50.3L221.9,35.1L230.1,28.3L236.1,32.4L240.8,24.8L250.9,24.9L265,16.7L272.7,9.6L278.8,10.5Z", "cx": 254, "cy": 121 }, { "name": "Chile", "d": "M297.9,413.3L304,411.1L308.9,401.6L314.4,408.6L316.5,420.8L323,426.7L320,440.5L327.3,451.5L331.9,471.7L340.3,471.4L342.7,473.7L338.9,487.6L328.2,492.7L324.7,498.8L328.5,527.9L322.7,529.8L319.3,540.2L314,547L310.4,559.4L312,573.1L309.8,574.3L305.9,589.5L316.1,611.8L316.5,624.3L310.8,639.3L312.2,648.9L305.7,655.5L305.9,671.9L309.2,684.6L304.6,688.2L301.5,711L305.1,729.3L301.7,732.2L302.5,741.3L308.3,753.2L307.6,759.2L313.5,759.5L313.5,763.8L306.8,764.6L313.2,769.9L310,774.7L311.8,787.7L310.8,795.9L306.2,805.1L308.5,811.3L303,824L300.2,824.4L301.3,834.9L305.4,842.5L310.7,840.4L313.2,852.3L318,857.7L334.6,856.7L347.8,860.4L340.9,858.9L328.6,866.9L328.4,880L318.6,878.9L316.9,874.1L321.5,873.5L323.7,867.2L315.6,874.2L310.7,874.5L313,867.9L322.4,865.3L312.8,865.1L309.8,872.4L301.6,867.6L298.3,861.2L308,860.4L298.2,855.5L300.1,850.8L291.7,848.1L288.5,843.5L293.7,833.7L291,818.5L287.7,808.4L296.5,807.5L286.5,804.7L290,797.5L279.8,790.9L275.1,791.5L281,784.9L279.1,781.4L287.5,779.1L288.8,783.8L295.8,772.9L293.7,768.2L299.5,760.5L293.3,757.5L295.1,750.3L295.1,732.8L298.9,734.2L295.4,724.3L284.8,726.2L281.5,718.3L282.9,704.4L286.2,692.8L279.4,673L279.3,666.3L283.4,665.6L287.6,644.3L291.4,637.5L292.7,625L295.9,617.9L294.4,610.6L297.3,601L293.3,585L292.3,573.8L295.8,564.5L292.7,555.1L296.1,547.5L300.7,519.9L302.2,504.3L300.2,497.4L299.2,476.2L301.9,473.3L304,455.1L302.1,432.6ZM346.6,864.3L348.7,892.5L340,891.2L334,892.8L322.2,889.7L331.7,887.1L329.6,881.2L336,887.2L345.1,886.9L337.1,883.6L335.3,879.3L341.5,875.2L333.3,874.5L332.4,870L339.1,862.7ZM361.5,895.7L353.8,896.9L351.7,893.9ZM287,747.2L280.8,746.3L281.9,727.2L287.1,728.1L289.7,741.6ZM290.8,823.2L291.5,834.3L287.3,828.6L282.7,832.5L287.2,817.8ZM280.9,819.2L280.4,809.5L283.7,817ZM289,816.1L285.8,816.9L282.1,808.7L285.2,806.7ZM312.2,877.5L318.6,881.1L310,883.7L304.8,879ZM292.8,855.4L296,859.8L293.9,863.6ZM340.4,893.8L352.1,897.4L354.3,902.3L344,896.7L343.4,900.3L338.5,896.8ZM325.6,883.5L328.1,887.7L321.6,887.2L320.5,882ZM289.1,760.9L290.4,770.3L287.3,773.3L281.1,765L287.1,757.7ZM285.9,778.3L282.3,778.3L285,771.5Z", "cx": 306, "cy": 628 }, { "name": "Brazil", "d": "M338.5,152.6L346.3,158.6L354.7,155.5L357.6,159.3L362.6,153.7L376,146.9L385.9,136.5L376.9,135.1L374.5,121.3L366.4,113L377.2,116.8L387.1,116.9L391.6,121.1L395.1,115.6L418.4,108.9L421.9,100.3L432.2,102L430,109.1L438.1,117L434,121.4L432.1,133.1L435.3,143.4L442.4,150.4L452.1,151.7L454.5,147.8L471.1,142.6L479.8,143.8L486,145.3L484.6,139.3L500.3,135.9L505.2,139.6L527.5,142.4L531.1,140.2L541,123.1L545.6,118.7L551.5,118.6L553.6,129.3L561.4,148.7L568.1,151.4L568.8,157.9L556.2,170.2L549.8,173.3L539.5,190L540.5,192.6L554.8,184.8L561.1,199.4L575.8,196.6L577.1,199.1L592.3,184.6L601.9,183.8L632.7,197.4L640.9,207.5L636.5,220.1L654.8,211.6L669.5,218.7L681.8,221.9L699.7,223L718.6,236.8L734.6,255.1L755.5,261L759.1,267.5L762.6,291.6L761.4,300.8L755.9,313.1L737.9,331.6L730.6,335.1L711.1,359.9L705.7,356.1L699.2,368.4L698.3,399.4L691.7,418.3L691.8,423.6L682.9,435.1L682.2,443.7L671.4,459.8L666,463.7L661.7,476.9L652.4,480.9L647.1,488.9L625.3,485.5L615.7,486.4L604.6,495.2L598.5,494.4L587.1,499.1L574,508.1L564.9,518.2L562.9,536.6L558,554.7L546,564.2L538.2,577.7L528.4,576.1L524.1,585L517.9,588.9L515.2,599.2L508.2,611.6L499.5,619.1L498.4,611.4L503.4,605.9L496.9,596.5L477.6,579.6L472.3,582.1L470.6,576L463.4,568.8L454.4,569.5L462.5,561.9L477.6,544L488.6,535.8L500.7,530.8L503.4,519L501.3,511.4L492.7,509.7L498.4,489.5L493.9,486.2L484.8,488.1L482.5,470.4L473.3,462.2L466.5,464.4L454,461.8L456,447L452.2,435.8L452.7,430.2L460.3,410.9L457.3,400.6L450.2,396.7L448.7,384.6L427.7,383.4L423.8,350.3L416.4,346.3L407.2,346.7L390.6,335.3L372.9,332.4L361,319.3L359.7,296.4L342.2,300.2L320.5,314.7L305,314.3L291.1,315.7L290.5,295.4L282.8,302.2L270.4,303.4L267.6,296.9L256.6,296.3L259.5,290.5L245.2,272.3L248.1,263.4L254.8,258.5L258.9,239.1L272.6,230.2L286.5,225.2L297.7,225.6L304.6,185.3L300.9,176L295.4,171.7L295.5,162.3L307.4,161.2L304.8,155.6L298.1,155.9L298.1,147.4L320.8,146.6L330,141.3ZM572.1,176.5L588.8,179.2L581.1,193.6L569.2,196.9L559.8,196.3L556.3,185.8L558.4,176.2ZM542.1,190.6L546.1,180.5L549.7,185.6Z", "cx": 518, "cy": 314 }, { "name": "Bolivia", "d": "M308.9,401.6L307.3,397.5L314.7,389.8L309.1,376.2L309.4,367.6L315.4,357.2L312.7,350.4L313.6,339.7L317.3,334.5L305,314.3L320.5,314.7L342.2,300.2L359.7,296.4L361,319.3L372.9,332.4L390.6,335.3L407.2,346.7L416.4,346.3L423.8,350.3L427.7,383.4L448.7,384.6L450.2,396.7L457.3,400.6L460.3,410.9L452.7,430.2L452.2,435.8L452.1,431.2L440.8,423.8L429.3,423.8L407.3,428.2L400.7,440.4L396.1,462.6L393.7,459.5L379.7,460.6L375.5,470.7L372,462.8L357.6,461.3L351.9,457.4L340.3,471.4L331.9,471.7L327.3,451.5L320,440.5L323,426.7L316.5,420.8L314.4,408.6Z", "cx": 370, "cy": 389 }, { "name": "Argentina", "d": "M454.4,569.5L446.9,592.4L446.5,599.6L446.6,606.1L442,615.3L444.5,628.9L454.9,636L454.7,648.6L460.7,652.6L460.6,658.2L450.4,674.1L443.5,678.5L426,683.3L407.4,685.2L399.3,683.2L402.6,690.1L399,710.1L385,713.5L371,710.2L372.2,724.5L381.9,729.9L384.9,726.2L386.1,735.2L376.5,731.8L372.8,734.8L379.9,737.4L370.6,746.3L370.2,757.4L367.8,764.3L362.4,763.9L355.4,768L350.1,777.5L350.3,782.4L358.1,790.7L368,794.8L367.6,802.6L356.9,811.8L351.5,820.1L351.2,828L341.5,835.3L339.9,843.3L347.8,860.4L334.6,856.7L318,857.7L313.2,852.3L310.7,840.4L305.4,842.5L301.3,834.9L300.2,824.4L303,824L308.5,811.3L306.2,805.1L310.8,795.9L311.8,787.7L310,774.7L313.2,769.9L306.8,764.6L313.5,763.8L313.5,759.5L307.6,759.2L308.3,753.2L302.5,741.3L301.7,732.2L305.1,729.3L301.5,711L304.6,688.2L309.2,684.6L305.9,671.9L305.7,655.5L312.2,648.9L310.8,639.3L316.5,624.3L316.1,611.8L305.9,589.5L309.8,574.3L312,573.1L310.4,559.4L314,547L319.3,540.2L322.7,529.8L328.5,527.9L324.7,498.8L328.2,492.7L338.9,487.6L342.7,473.7L340.3,471.4L351.9,457.4L357.6,461.3L372,462.8L375.5,470.7L379.7,460.6L393.7,459.5L396.1,462.6L405,473.7L418.2,484.4L429.7,487.7L435.9,492.6L454.4,502.2L457.2,507.6L443.7,529.3L469.6,535L478.3,533.5L489.4,523.9L492.7,509.7L501.3,511.4L503.4,519L500.7,530.8L488.6,535.8L477.6,544L462.5,561.9ZM348.7,892.5L346.6,864.3L348.4,872L358.9,881.7L367.8,887.5L376.4,889.1L375.2,891.7L366,894Z", "cx": 373, "cy": 626 }], "aliases": { "Venezuela": ["VE", "VEN"], "Uruguay": ["Uruguai", "UY", "URY"], "Falkland Islands": ["Falkland Is.", "Falkland Islands / Malvinas", "Ilhas Malvinas", "Islas Malvinas", "îles Malouines", "Falklandinseln", "Isole Falkland", "FK", "FLK"], "Trinidad and Tobago": ["Trinidad e Tobago", "Trinidad y Tobago", "Trinité-et-Tobago", "Trinidad und Tobago", "TT", "TTO"], "Suriname": ["Surinam", "SR", "SUR"], "Peru": ["Perú", "Pérou", "Perù", "PE", "PER"], "Paraguay": ["Paraguai", "PY", "PRY"], "Panama": ["Panamá", "PA", "PAN"], "Nicaragua": ["Nicarágua", "NI", "NIC"], "Aruba": ["AW", "ABW"], "Curaçao": ["Curazao", "CW", "CUW"], "Guyana": ["Guiana", "GY", "GUY"], "Grenada": ["Granada", "Grenade", "GD", "GRD"], "Ecuador": ["Equador", "Équateur", "EC", "ECU"], "Costa Rica": ["CR", "CRI"], "Colombia": ["Colômbia", "Colombie", "Kolumbien", "CO", "COL"], "Chile": ["Chili", "Cile", "CL", "CHL"], "Brazil": ["Brasil", "Brésil", "Brasilien", "Brasile", "BR", "BRA"], "Bolivia": ["Bolívia", "Bolivie", "Bolivien", "BO", "BOL"], "Argentina": ["Argentine", "Argentinien", "AR", "ARG"] } };
@@ -1,4 +1,4 @@
1
- import { canonical, mapFor, region } from './places.js';
1
+ import { lookup, mapFor, WORLD } from './places.js';
2
2
  import { pick } from './pick.js';
3
3
  import { MAX_ITEMS } from './schema.js';
4
4
  const prefixes = {
@@ -29,10 +29,9 @@ const PARTS = [
29
29
  'bubbles',
30
30
  'stacked',
31
31
  'choropleth',
32
- 'bubble-map',
33
- 'tiles'
32
+ 'bubble-map'
34
33
  ];
35
- const MAP_TYPES = ['choropleth', 'bubble-map', 'tiles'];
34
+ const MAP_TYPES = ['choropleth', 'bubble-map'];
36
35
  const PERIOD = /^(\d{4}|q[1-4]|jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i;
37
36
  export function normalize(input, maps) {
38
37
  if (input.data.length > MAX_ITEMS) {
@@ -77,7 +76,7 @@ export function normalize(input, maps) {
77
76
  prefix,
78
77
  suffix,
79
78
  decimals: decimals(spec, { data, scaled }),
80
- map: spec.map ?? 'world',
79
+ map: spec.map ?? WORLD,
81
80
  maps,
82
81
  from: spec.from,
83
82
  to: spec.to,
@@ -155,19 +154,23 @@ function places(spec, maps) {
155
154
  const seen = new Set();
156
155
  const data = [];
157
156
  for (const d of spec.data) {
158
- const label = canonical(maps, { map, label: d.label }) ?? d.label;
157
+ const found = lookup(maps, { map, label: d.label });
158
+ const label = found?.name ?? d.label;
159
159
  if (seen.has(label)) {
160
160
  continue;
161
161
  }
162
162
  seen.add(label);
163
- data.push({ ...d, label, region: region(maps, { map, label: d.label }) });
163
+ data.push({ ...d, label, region: found?.name });
164
+ }
165
+ if (!data.some((d) => d.region)) {
166
+ return { ...spec, shape: 'ranking' };
164
167
  }
165
168
  return {
166
169
  ...spec,
167
170
  map,
168
171
  maps,
169
172
  data,
170
- highlight: canonical(maps, { map, label: spec.highlight }) ?? spec.highlight,
173
+ highlight: lookup(maps, { map, label: spec.highlight })?.name ?? spec.highlight,
171
174
  annotations: []
172
175
  };
173
176
  }
@@ -1,11 +1,10 @@
1
- import { isTiles } from './places.js';
2
1
  export function pick(spec, data) {
3
2
  if (spec.type)
4
3
  return spec.type;
5
4
  const v = spec.variant;
6
5
  const n = data.length;
7
6
  if (spec.shape === 'places' && spec.maps) {
8
- return placesChart(spec, spec.maps);
7
+ return placesChart(spec);
9
8
  }
10
9
  if (spec.shape === 'ranking') {
11
10
  return v === 'radial' && n <= 10 ? 'radial' : 'ranked-bar';
@@ -25,9 +24,7 @@ function hasSeries(data) {
25
24
  return (new Set(data.map((d) => d.group).filter(Boolean)).size > 1 &&
26
25
  new Set(data.map((d) => d.label)).size < data.length);
27
26
  }
28
- function placesChart(spec, maps) {
29
- if (isTiles(maps, spec.map ?? 'world'))
30
- return 'tiles';
27
+ function placesChart(spec) {
31
28
  return spec.variant === 'bubbles' ? 'bubble-map' : 'choropleth';
32
29
  }
33
30
  function overTime(spec, data) {
@@ -4,27 +4,22 @@ export interface GeoRegion {
4
4
  cx: number;
5
5
  cy: number;
6
6
  }
7
- export interface Tile {
8
- code: string;
9
- name: string;
10
- col: number;
11
- row: number;
7
+ export interface GeoMap {
8
+ width: number;
9
+ height: number;
10
+ regions: ReadonlyArray<GeoRegion>;
11
+ aliases: Readonly<Record<string, ReadonlyArray<string>>>;
12
12
  }
13
13
  export interface Maps {
14
- world: {
15
- width: number;
16
- height: number;
17
- regions: ReadonlyArray<GeoRegion>;
18
- aliases: Readonly<Record<string, ReadonlyArray<string>>>;
19
- };
20
- tiles: Readonly<Record<string, ReadonlyArray<Tile>>>;
14
+ world: GeoMap;
15
+ continents: Readonly<Record<string, GeoMap>>;
21
16
  }
22
- export declare const isTiles: (maps: Maps, map: string) => boolean;
23
- export declare function region(maps: Maps, { map, label }: Place): string | undefined;
17
+ export declare const WORLD = "world";
18
+ export declare const key: (s: string) => string;
19
+ export declare function geoMap(maps: Maps, map: string): GeoMap;
24
20
  export interface Place {
25
21
  map: string;
26
22
  label: string | undefined;
27
23
  }
28
- export declare function canonical(maps: Maps, place: Place): string | undefined;
29
- export declare function regionCount(maps: Maps, map: string): number;
24
+ export declare function lookup(maps: Maps, { map, label }: Place): GeoRegion | undefined;
30
25
  export declare function mapFor(maps: Maps, labels: ReadonlyArray<string>): string;
@@ -1,43 +1,33 @@
1
- const key = (s) => s.normalize('NFD').replace(/[̀-ͯ]/g, '').toLowerCase().trim();
1
+ export const WORLD = 'world';
2
+ export const key = (s) => s.normalize('NFD').replace(/[̀-ͯ]/g, '').toLowerCase().trim();
2
3
  const indexed = new WeakMap();
3
- function names(maps) {
4
- const known = indexed.get(maps);
4
+ function names(map) {
5
+ const known = indexed.get(map);
5
6
  if (known) {
6
7
  return known;
7
8
  }
8
- const spell = (entries) => new Map(entries.map(([name, id]) => [key(name), id]));
9
- const world = spell(maps.world.regions.flatMap((r) => [r.name, ...(maps.world.aliases[r.name] ?? [])].map((n) => [n, r.name])));
10
- const tiles = new Map(Object.entries(maps.tiles).map(([map, grid]) => [
11
- map,
12
- spell(grid.flatMap((t) => [
13
- [t.name, t.code],
14
- [t.code, t.code]
15
- ]))
16
- ]));
17
- const built = { world, tiles };
18
- indexed.set(maps, built);
9
+ const built = new Map();
10
+ for (const r of map.regions) {
11
+ for (const name of [r.name, ...(map.aliases[r.name] ?? [])]) {
12
+ if (!built.has(key(name))) {
13
+ built.set(key(name), r);
14
+ }
15
+ }
16
+ }
17
+ indexed.set(map, built);
19
18
  return built;
20
19
  }
21
- export const isTiles = (maps, map) => map in maps.tiles;
22
- export function region(maps, { map, label }) {
23
- const n = names(maps);
24
- return (isTiles(maps, map) ? n.tiles.get(map) : n.world)?.get(key(label ?? ''));
25
- }
26
- export function canonical(maps, place) {
27
- const id = region(maps, place);
28
- if (!isTiles(maps, place.map)) {
29
- return id;
30
- }
31
- return maps.tiles[place.map].find((t) => t.code === id)?.name;
20
+ export function geoMap(maps, map) {
21
+ return map === WORLD ? maps.world : maps.continents[map];
32
22
  }
33
- export function regionCount(maps, map) {
34
- return isTiles(maps, map) ? maps.tiles[map].length : maps.world.regions.length;
23
+ export function lookup(maps, { map, label }) {
24
+ return names(geoMap(maps, map)).get(key(label ?? ''));
35
25
  }
36
26
  export function mapFor(maps, labels) {
37
- const hits = (map) => labels.filter((label) => region(maps, { map, label })).length;
38
- let best = 'world';
39
- for (const map of Object.keys(maps.tiles)) {
40
- if (hits(map) > hits(best)) {
27
+ const hits = (map) => labels.filter((label) => lookup(maps, { map, label })).length;
28
+ let best = WORLD;
29
+ for (const map of Object.keys(maps.continents)) {
30
+ if (hits(map) >= hits(best)) {
41
31
  best = map;
42
32
  }
43
33
  }
@@ -1,8 +1,9 @@
1
+ import { type Overrides } from './colors.ts';
1
2
  import { type Mark } from './frame.ts';
2
3
  import type { Chart } from './spec.ts';
3
4
  import { type ThemeName } from './themes.ts';
4
- export interface RenderOptions {
5
+ export interface RenderOptions extends Overrides {
5
6
  theme: ThemeName;
6
7
  mark?: Mark | undefined;
7
8
  }
8
- export declare function render(chart: Chart, { theme, mark }: RenderOptions): string;
9
+ export declare function render(chart: Chart, { theme, mark, accent, palette }: RenderOptions): string;
@@ -1,10 +1,11 @@
1
1
  import { charts } from './charts/index.js';
2
+ import { withColors } from './colors.js';
2
3
  import { formatter } from './format.js';
3
4
  import { frame, svg } from './frame.js';
4
5
  import { fixed } from './svg.js';
5
6
  import { themes } from './themes.js';
6
- export function render(chart, { theme, mark }) {
7
- const t = themes[theme];
7
+ export function render(chart, { theme, mark, accent, palette }) {
8
+ const t = withColors(themes[theme], { accent, palette });
8
9
  const { out: head, box } = frame(chart, { t, mark });
9
10
  const out = [];
10
11
  charts[chart.type]({ out, spec: chart, t, b: box, fmt: formatter(chart) });
@@ -1,5 +1,5 @@
1
1
  import type { Maps } from './places.ts';
2
- export type ChartType = 'ranked-bar' | 'bubbles' | 'treemap' | 'line' | 'column' | 'multi-line' | 'donut' | 'waffle' | 'stacked' | 'slope' | 'radial' | 'choropleth' | 'bubble-map' | 'tiles';
2
+ export type ChartType = 'ranked-bar' | 'bubbles' | 'treemap' | 'line' | 'column' | 'multi-line' | 'donut' | 'waffle' | 'stacked' | 'slope' | 'radial' | 'choropleth' | 'bubble-map';
3
3
  export interface Item {
4
4
  label: string;
5
5
  value: number;
@@ -25,4 +25,9 @@ export interface Ramp {
25
25
  hi: number;
26
26
  }
27
27
  export declare function ramp(data: ReadonlyArray<Row>, t: Theme): Ramp;
28
+ export interface Blend {
29
+ to: string;
30
+ f: number;
31
+ }
32
+ export declare function mix(from: string, { to, f }: Blend): string;
28
33
  export declare function contrast(fill: string, t: Theme): string;
@@ -54,7 +54,7 @@ export function ramp(data, t) {
54
54
  const shade = (v) => mix(t.bg, { to: t.accent, f: 0.28 + 0.72 * (hi === lo ? 1 : (v - lo) / (hi - lo)) });
55
55
  return { shade, lo, hi };
56
56
  }
57
- function mix(from, { to, f }) {
57
+ export function mix(from, { to, f }) {
58
58
  const [x, y] = [from, to].map((h) => [1, 3, 5].map((i) => parseInt(h.slice(i, i + 2), 16)));
59
59
  return ('#' +
60
60
  x
@@ -1,3 +1,5 @@
1
- import type { Maps } from './lib/places.ts';
2
- export type { Maps };
1
+ import { type GeoMap, type GeoRegion, type Maps } from './lib/places.ts';
2
+ export type { GeoMap, GeoRegion, Maps };
3
3
  export declare const maps: Maps;
4
+ export declare const continents: ReadonlyArray<string>;
5
+ export declare function mapsFor(labels: ReadonlyArray<string>): Promise<Maps>;
package/dist-lib/maps.js CHANGED
@@ -1,7 +1,20 @@
1
1
  import { aliases } from './lib/maps/aliases.js';
2
- import { brazil } from './lib/maps/brazil.js';
2
+ import { loaders, members } from './lib/maps/continents/index.js';
3
3
  import { world } from './lib/maps/world.js';
4
- export const maps = {
5
- world: { ...world, aliases },
6
- tiles: { brazil }
7
- };
4
+ import { key } from './lib/places.js';
5
+ export const maps = { world: { ...world, aliases }, continents: {} };
6
+ export const continents = Object.keys(loaders);
7
+ const sets = new Map(Object.entries(members).map(([id, names]) => [id, new Set(names)]));
8
+ export async function mapsFor(labels) {
9
+ let best;
10
+ for (const [id, names] of sets) {
11
+ const hits = labels.filter((label) => names.has(key(label))).length;
12
+ if (hits > 0 && (!best || hits > best.hits)) {
13
+ best = { id, hits };
14
+ }
15
+ }
16
+ if (!best) {
17
+ return maps;
18
+ }
19
+ return { ...maps, continents: { [best.id]: await loaders[best.id]() } };
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qvac-charts",
3
- "version": "0.1.2",
3
+ "version": "0.3.0",
4
4
  "description": "Renders a small JSON chart spec into an SVG, on Bare and Node",
5
5
  "type": "module",
6
6
  "exports": {
@@ -32,6 +32,7 @@
32
32
  "test:generate": "brittle-make-test test/all.mjs test/*.ts",
33
33
  "build:lib": "node scripts/build-lib.mjs",
34
34
  "build:world": "node scripts/project-world.mjs lib/maps/world.ts",
35
+ "build:continents": "node scripts/project-continents.mjs",
35
36
  "snapshots:update": "node scripts/snapshots.mjs"
36
37
  },
37
38
  "devDependencies": {
@@ -44,6 +45,8 @@
44
45
  "prettier": "^3.9.6",
45
46
  "prettier-config-holepunch": "^2.0.0",
46
47
  "topojson-client": "3.1.0",
48
+ "topojson-server": "3.0.1",
49
+ "topojson-simplify": "3.0.3",
47
50
  "typescript": "^7.0.2",
48
51
  "world-atlas": "2.0.2"
49
52
  },
@@ -1,2 +0,0 @@
1
- import type { Tile } from '../places.ts';
2
- export declare const brazil: ReadonlyArray<Tile>;
@@ -1,29 +0,0 @@
1
- export const brazil = [
2
- { code: 'AC', name: 'Acre', col: 0, row: 2 },
3
- { code: 'AL', name: 'Alagoas', col: 5, row: 3 },
4
- { code: 'AP', name: 'Amapá', col: 2, row: 0 },
5
- { code: 'AM', name: 'Amazonas', col: 1, row: 1 },
6
- { code: 'BA', name: 'Bahia', col: 3, row: 3 },
7
- { code: 'CE', name: 'Ceará', col: 4, row: 1 },
8
- { code: 'DF', name: 'Distrito Federal', col: 2, row: 4 },
9
- { code: 'ES', name: 'Espírito Santo', col: 4, row: 4 },
10
- { code: 'GO', name: 'Goiás', col: 2, row: 3 },
11
- { code: 'MA', name: 'Maranhão', col: 3, row: 1 },
12
- { code: 'MT', name: 'Mato Grosso', col: 1, row: 3 },
13
- { code: 'MS', name: 'Mato Grosso do Sul', col: 1, row: 4 },
14
- { code: 'MG', name: 'Minas Gerais', col: 3, row: 4 },
15
- { code: 'PA', name: 'Pará', col: 2, row: 1 },
16
- { code: 'PB', name: 'Paraíba', col: 5, row: 2 },
17
- { code: 'PR', name: 'Paraná', col: 1, row: 5 },
18
- { code: 'PE', name: 'Pernambuco', col: 4, row: 2 },
19
- { code: 'PI', name: 'Piauí', col: 3, row: 2 },
20
- { code: 'RJ', name: 'Rio de Janeiro', col: 3, row: 5 },
21
- { code: 'RN', name: 'Rio Grande do Norte', col: 5, row: 1 },
22
- { code: 'RS', name: 'Rio Grande do Sul', col: 1, row: 7 },
23
- { code: 'RO', name: 'Rondônia', col: 1, row: 2 },
24
- { code: 'RR', name: 'Roraima', col: 1, row: 0 },
25
- { code: 'SC', name: 'Santa Catarina', col: 1, row: 6 },
26
- { code: 'SP', name: 'São Paulo', col: 2, row: 5 },
27
- { code: 'SE', name: 'Sergipe', col: 4, row: 3 },
28
- { code: 'TO', name: 'Tocantins', col: 2, row: 2 }
29
- ];