@motionscript/charts 0.1.0-alpha.8 → 0.1.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 (76) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/LICENSE +201 -201
  3. package/NOTICE +49 -49
  4. package/README.md +99 -99
  5. package/dist/bar-chart/bar-chart.js.map +1 -1
  6. package/dist/bar-chart/category-axis.js.map +1 -1
  7. package/dist/bar-chart/chart-bars.js.map +1 -1
  8. package/dist/bar-chart/index.js.map +1 -1
  9. package/dist/bar-chart/shared.js.map +1 -1
  10. package/dist/browser/chunks/{chunk-XROBIRQK.js → chunk-TJNHLQGV.js} +1 -1
  11. package/dist/browser/chunks/chunk-TJNHLQGV.js.map +7 -0
  12. package/dist/browser/index.js +1 -1
  13. package/dist/browser/index.js.map +1 -1
  14. package/dist/browser/kit.js +1 -1
  15. package/dist/browser/manifest.json +1 -1
  16. package/dist/engine.d.ts +1 -1
  17. package/dist/engine.js +1 -1
  18. package/dist/engine.js.map +1 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/kit/cartesian.js.map +1 -1
  21. package/dist/kit/chart-border.js.map +1 -1
  22. package/dist/kit/chart-canvas.js.map +1 -1
  23. package/dist/kit/chart-legend.js.map +1 -1
  24. package/dist/kit/entries.js.map +1 -1
  25. package/dist/kit/motion.js.map +1 -1
  26. package/dist/kit/paints.js.map +1 -1
  27. package/dist/kit/shared.js.map +1 -1
  28. package/dist/kit/vertical-axis.js.map +1 -1
  29. package/dist/line-chart/chart-line.js.map +1 -1
  30. package/dist/line-chart/chart-region.js.map +1 -1
  31. package/dist/line-chart/horizontal-axis.js.map +1 -1
  32. package/dist/line-chart/index.d.ts +1 -1
  33. package/dist/line-chart/index.js +1 -1
  34. package/dist/line-chart/index.js.map +1 -1
  35. package/dist/line-chart/line-chart.js.map +1 -1
  36. package/dist/line-chart/shared.js.map +1 -1
  37. package/dist/line-chart/x-scale.js.map +1 -1
  38. package/dist/nodes.js.map +1 -1
  39. package/dist/pie-chart/index.js.map +1 -1
  40. package/dist/pie-chart/pie-chart.js.map +1 -1
  41. package/dist/pie-chart/pie-legend.js.map +1 -1
  42. package/dist/pie-chart/pie-ring.js.map +1 -1
  43. package/dist/pie-chart/shared.js.map +1 -1
  44. package/package.json +4 -4
  45. package/registry.json +23 -23
  46. package/src/bar-chart/bar-chart.ts +542 -542
  47. package/src/bar-chart/category-axis.ts +162 -162
  48. package/src/bar-chart/chart-bars.ts +287 -287
  49. package/src/bar-chart/index.ts +31 -31
  50. package/src/bar-chart/shared.ts +354 -354
  51. package/src/engine.ts +28 -28
  52. package/src/index.ts +5 -5
  53. package/src/kit/cartesian.ts +81 -81
  54. package/src/kit/chart-border.ts +50 -50
  55. package/src/kit/chart-canvas.ts +122 -122
  56. package/src/kit/chart-legend.ts +229 -229
  57. package/src/kit/entries.ts +20 -20
  58. package/src/kit/motion.ts +90 -90
  59. package/src/kit/paints.ts +15 -15
  60. package/src/kit/shared.ts +782 -782
  61. package/src/kit/vertical-axis.ts +194 -194
  62. package/src/line-chart/chart-line.ts +156 -156
  63. package/src/line-chart/chart-region.ts +90 -90
  64. package/src/line-chart/horizontal-axis.ts +151 -151
  65. package/src/line-chart/index.ts +39 -39
  66. package/src/line-chart/line-chart.ts +598 -598
  67. package/src/line-chart/shared.ts +473 -473
  68. package/src/line-chart/x-scale.ts +382 -382
  69. package/src/nodes.ts +18 -18
  70. package/src/pie-chart/index.ts +37 -37
  71. package/src/pie-chart/pie-chart.ts +296 -296
  72. package/src/pie-chart/pie-legend.ts +169 -169
  73. package/src/pie-chart/pie-ring.ts +848 -848
  74. package/src/pie-chart/shared.ts +496 -496
  75. package/dist/browser/chunks/chunk-XROBIRQK.js.map +0 -7
  76. package/src/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
package/src/nodes.ts CHANGED
@@ -1,18 +1,18 @@
1
- import { LineChart } from "./line-chart";
2
- import { BarChart } from "./bar-chart";
3
- import { PieChart } from "./pie-chart";
4
-
5
- /**
6
- * Every node type this package publishes.
7
- *
8
- * A host registers these by handing the array to an engine —
9
- * `new Engine(platform, { nodes: NODES })` — which reads each component's key.
10
- * Defining a component only *declares* that key: nothing is registered by
11
- * importing a module, so a registry holds exactly what its owner asked for.
12
- *
13
- * Listing the component **values** is also what survives bundling: this package
14
- * declares `sideEffects: false`, and a document names a node type by string, so
15
- * an import kept only for its side effect is exactly what gets shaken out.
16
- */
17
- // Typed by name, so the declaration names each component rather than spelling out its type through core.
18
- export const NODES: (typeof LineChart | typeof BarChart | typeof PieChart)[] = [LineChart, BarChart, PieChart];
1
+ import { LineChart } from "./line-chart";
2
+ import { BarChart } from "./bar-chart";
3
+ import { PieChart } from "./pie-chart";
4
+
5
+ /**
6
+ * Every node type this package publishes.
7
+ *
8
+ * A host registers these by handing the array to an engine —
9
+ * `new Engine(platform, { nodes: NODES })` — which reads each component's key.
10
+ * Defining a component only *declares* that key: nothing is registered by
11
+ * importing a module, so a registry holds exactly what its owner asked for.
12
+ *
13
+ * Listing the component **values** is also what survives bundling: this package
14
+ * declares `sideEffects: false`, and a document names a node type by string, so
15
+ * an import kept only for its side effect is exactly what gets shaken out.
16
+ */
17
+ // Typed by name, so the declaration names each component rather than spelling out its type through core.
18
+ export const NODES: (typeof LineChart | typeof BarChart | typeof PieChart)[] = [LineChart, BarChart, PieChart];
@@ -1,37 +1,37 @@
1
- /**
2
- * The pie chart: the one in the family that draws a mark per **row** rather
3
- * than per column.
4
- *
5
- * So it shares the legend and the theme machinery with its siblings and none of
6
- * the cartesian geometry. Set the theme's `ring.holeRadius` to 0 for a solid
7
- * pie; it defaults to a donut, because the hole is the only place a chart has
8
- * to put its conclusion.
9
- */
10
- export { PieChart, isSliceSelected } from "./pie-chart"
11
- export type { PieChartProps, PieChartValues } from "./pie-chart"
12
- export { PieRing } from "./pie-ring"
13
- export type { PieRingProps } from "./pie-ring"
14
- export { PieLegend } from "./pie-legend"
15
- export type { PieLegendProps } from "./pie-legend"
16
- export {
17
- DEFAULT_PIE_CHART_THEME,
18
- lerpPieChartTheme,
19
- pieArcs,
20
- relaxLabels,
21
- resolvePieChartTheme,
22
- resolvePieSlices,
23
- ringPoint,
24
- sliceTotal,
25
- sliceValue,
26
- } from "./shared"
27
- export type {
28
- CenterConfig,
29
- LabelConfig,
30
- PieArc,
31
- PieChartConfig,
32
- PieChartTheme,
33
- PieLabelMode,
34
- PieLabelPlacement,
35
- PieSlice,
36
- RingConfig,
37
- } from "./shared"
1
+ /**
2
+ * The pie chart: the one in the family that draws a mark per **row** rather
3
+ * than per column.
4
+ *
5
+ * So it shares the legend and the theme machinery with its siblings and none of
6
+ * the cartesian geometry. Set the theme's `ring.holeRadius` to 0 for a solid
7
+ * pie; it defaults to a donut, because the hole is the only place a chart has
8
+ * to put its conclusion.
9
+ */
10
+ export { PieChart, isSliceSelected } from "./pie-chart"
11
+ export type { PieChartProps, PieChartValues } from "./pie-chart"
12
+ export { PieRing } from "./pie-ring"
13
+ export type { PieRingProps } from "./pie-ring"
14
+ export { PieLegend } from "./pie-legend"
15
+ export type { PieLegendProps } from "./pie-legend"
16
+ export {
17
+ DEFAULT_PIE_CHART_THEME,
18
+ lerpPieChartTheme,
19
+ pieArcs,
20
+ relaxLabels,
21
+ resolvePieChartTheme,
22
+ resolvePieSlices,
23
+ ringPoint,
24
+ sliceTotal,
25
+ sliceValue,
26
+ } from "./shared"
27
+ export type {
28
+ CenterConfig,
29
+ LabelConfig,
30
+ PieArc,
31
+ PieChartConfig,
32
+ PieChartTheme,
33
+ PieLabelMode,
34
+ PieLabelPlacement,
35
+ PieSlice,
36
+ RingConfig,
37
+ } from "./shared"