@samizdata/mozaic 0.11.0 → 0.12.1

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 (43) hide show
  1. package/README.md +1 -1
  2. package/dist/flags/index.d.ts +16 -0
  3. package/dist/flags/index.js +16 -0
  4. package/dist/flags/svgs.d.ts +261 -0
  5. package/dist/flags/svgs.js +265 -0
  6. package/dist/guides/AxisX.svelte +18 -3
  7. package/dist/guides/AxisX.svelte.d.ts +4 -0
  8. package/dist/interactive/Tooltip.svelte +10 -3
  9. package/dist/locale/index.d.ts +8 -0
  10. package/dist/locale/index.js +10 -0
  11. package/dist/marks/Beeswarm.svelte +31 -12
  12. package/dist/marks/Beeswarm.svelte.d.ts +3 -0
  13. package/dist/marks/Flag.svelte +65 -0
  14. package/dist/marks/Flag.svelte.d.ts +27 -0
  15. package/dist/marks/Flags.svelte +69 -0
  16. package/dist/marks/Flags.svelte.d.ts +45 -0
  17. package/dist/marks/index.d.ts +2 -0
  18. package/dist/marks/index.js +2 -0
  19. package/dist/recipes/ArrowChart.svelte +4 -1
  20. package/dist/recipes/ArrowChart.svelte.d.ts +2 -0
  21. package/dist/recipes/BarChart.svelte +103 -18
  22. package/dist/recipes/BarChart.svelte.d.ts +20 -2
  23. package/dist/recipes/BarDotChart.svelte +4 -1
  24. package/dist/recipes/BarDotChart.svelte.d.ts +2 -0
  25. package/dist/recipes/ColumnChart.svelte +7 -3
  26. package/dist/recipes/ColumnChart.svelte.d.ts +2 -0
  27. package/dist/recipes/LineChart.svelte +8 -2
  28. package/dist/recipes/LineChart.svelte.d.ts +2 -0
  29. package/dist/recipes/ScatterChart.svelte +179 -18
  30. package/dist/recipes/ScatterChart.svelte.d.ts +40 -1
  31. package/dist/recipes/StripChart.svelte +301 -0
  32. package/dist/recipes/StripChart.svelte.d.ts +89 -0
  33. package/dist/recipes/index.d.ts +2 -1
  34. package/dist/recipes/index.js +3 -1
  35. package/package.json +174 -170
  36. package/src/lib/recipes/ArrowChart.svelte +4 -1
  37. package/src/lib/recipes/BarChart.svelte +103 -18
  38. package/src/lib/recipes/BarDotChart.svelte +4 -1
  39. package/src/lib/recipes/ColumnChart.svelte +7 -3
  40. package/src/lib/recipes/LineChart.svelte +8 -2
  41. package/src/lib/recipes/ScatterChart.svelte +179 -18
  42. package/src/lib/recipes/StripChart.svelte +301 -0
  43. package/src/lib/recipes/index.ts +3 -1
package/README.md CHANGED
@@ -40,7 +40,7 @@ pnpm add @samizdata/mozaic d3-scale d3-array d3-shape
40
40
  | `@samizdata/mozaic/locale` | `createLocale` (`en`, `ro`, `ru`) |
41
41
  | `@samizdata/mozaic/embed` | `Embed`, `useEmbedParams`, `embedCode`, `hostScript`, `observeHeight` |
42
42
  | `@samizdata/mozaic/export` | `figureToSvg`, `downloadSvg`, `downloadPng`, `figureToPng` |
43
- | `@samizdata/mozaic/recipes` | `BarChart`, `ColumnChart`, `LineChart`, `ScatterChart`, `ArrowChart`, `BarDotChart`, `StackedBarChart`, `MosaicChart`, `PercentileChart` |
43
+ | `@samizdata/mozaic/recipes` | `BarChart`, `ColumnChart`, `LineChart`, `ScatterChart`, `ArrowChart`, `BarDotChart`, `StackedBarChart`, `MosaicChart`, `PercentileChart`, `StripChart` |
44
44
 
45
45
  ## CLI
46
46
 
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Square flags for the `Flag` and `Flags` marks, `Beeswarm`, `BarChart` and `StripChart`, drawn
3
+ * as circles in the style of ggflags. Each export is a country's flag as inner SVG markup on a
4
+ * 512 × 512 viewBox, named by its upper-case ISO 3166-1 alpha-2 code (`MD`, `RO`), plus `EU`,
5
+ * `UN` and Eurostat's `EL` (Greece) and `UK` (United Kingdom).
6
+ *
7
+ * Import only the flags a chart uses, so the others stay out of the bundle:
8
+ *
9
+ * ```ts
10
+ * import { MD, RO, UA } from '@samizdata/mozaic/flags';
11
+ * const flags: Record<string, string> = { MD, RO, UA };
12
+ * ```
13
+ *
14
+ * Flags from flag-icons (https://github.com/lipis/flag-icons), MIT License.
15
+ */
16
+ export * from './svgs.js';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Square flags for the `Flag` and `Flags` marks, `Beeswarm`, `BarChart` and `StripChart`, drawn
3
+ * as circles in the style of ggflags. Each export is a country's flag as inner SVG markup on a
4
+ * 512 × 512 viewBox, named by its upper-case ISO 3166-1 alpha-2 code (`MD`, `RO`), plus `EU`,
5
+ * `UN` and Eurostat's `EL` (Greece) and `UK` (United Kingdom).
6
+ *
7
+ * Import only the flags a chart uses, so the others stay out of the bundle:
8
+ *
9
+ * ```ts
10
+ * import { MD, RO, UA } from '@samizdata/mozaic/flags';
11
+ * const flags: Record<string, string> = { MD, RO, UA };
12
+ * ```
13
+ *
14
+ * Flags from flag-icons (https://github.com/lipis/flag-icons), MIT License.
15
+ */
16
+ export * from './svgs.js';