@motionscript/charts 0.1.0-alpha.3 → 0.1.0-alpha.5

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 (93) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/LICENSE +201 -201
  3. package/NOTICE +48 -0
  4. package/README.md +85 -0
  5. package/dist/bar-chart/bar-chart.d.ts +28 -13
  6. package/dist/bar-chart/bar-chart.d.ts.map +1 -1
  7. package/dist/bar-chart/bar-chart.js +60 -56
  8. package/dist/bar-chart/bar-chart.js.map +1 -1
  9. package/dist/bar-chart/category-axis.js.map +1 -1
  10. package/dist/bar-chart/chart-bars.js.map +1 -1
  11. package/dist/bar-chart/index.js.map +1 -1
  12. package/dist/bar-chart/shared.d.ts +3 -3
  13. package/dist/bar-chart/shared.js +3 -3
  14. package/dist/bar-chart/shared.js.map +1 -1
  15. package/dist/browser/chunks/chunk-5ZPBV6BU.js +2 -0
  16. package/dist/browser/chunks/chunk-5ZPBV6BU.js.map +7 -0
  17. package/dist/browser/index.js +1 -1
  18. package/dist/browser/index.js.map +3 -3
  19. package/dist/browser/kit.js +1 -1
  20. package/dist/browser/manifest.json +3 -2
  21. package/dist/engine.js.map +1 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/kit/chart-border.js.map +1 -1
  24. package/dist/kit/chart-canvas.js.map +1 -1
  25. package/dist/kit/chart-legend.d.ts +4 -25
  26. package/dist/kit/chart-legend.d.ts.map +1 -1
  27. package/dist/kit/chart-legend.js +31 -55
  28. package/dist/kit/chart-legend.js.map +1 -1
  29. package/dist/kit/shared.d.ts +29 -6
  30. package/dist/kit/shared.d.ts.map +1 -1
  31. package/dist/kit/shared.js +64 -8
  32. package/dist/kit/shared.js.map +1 -1
  33. package/dist/kit/vertical-axis.js.map +1 -1
  34. package/dist/line-chart/chart-line.d.ts +2 -2
  35. package/dist/line-chart/chart-line.js.map +1 -1
  36. package/dist/line-chart/chart-region.js.map +1 -1
  37. package/dist/line-chart/horizontal-axis.js.map +1 -1
  38. package/dist/line-chart/index.js.map +1 -1
  39. package/dist/line-chart/line-chart.d.ts +9 -1
  40. package/dist/line-chart/line-chart.d.ts.map +1 -1
  41. package/dist/line-chart/line-chart.js +32 -8
  42. package/dist/line-chart/line-chart.js.map +1 -1
  43. package/dist/line-chart/shared.d.ts +3 -3
  44. package/dist/line-chart/shared.d.ts.map +1 -1
  45. package/dist/line-chart/shared.js +19 -4
  46. package/dist/line-chart/shared.js.map +1 -1
  47. package/dist/line-chart/x-scale.d.ts +1 -1
  48. package/dist/line-chart/x-scale.js +1 -1
  49. package/dist/line-chart/x-scale.js.map +1 -1
  50. package/dist/nodes.js.map +1 -1
  51. package/dist/pie-chart/index.js.map +1 -1
  52. package/dist/pie-chart/pie-chart.d.ts +2 -2
  53. package/dist/pie-chart/pie-chart.d.ts.map +1 -1
  54. package/dist/pie-chart/pie-chart.js +9 -7
  55. package/dist/pie-chart/pie-chart.js.map +1 -1
  56. package/dist/pie-chart/pie-legend.js +4 -4
  57. package/dist/pie-chart/pie-legend.js.map +1 -1
  58. package/dist/pie-chart/pie-ring.d.ts +13 -4
  59. package/dist/pie-chart/pie-ring.d.ts.map +1 -1
  60. package/dist/pie-chart/pie-ring.js +44 -14
  61. package/dist/pie-chart/pie-ring.js.map +1 -1
  62. package/dist/pie-chart/shared.d.ts +3 -3
  63. package/dist/pie-chart/shared.js +3 -3
  64. package/dist/pie-chart/shared.js.map +1 -1
  65. package/package.json +6 -5
  66. package/registry.json +23 -23
  67. package/src/bar-chart/bar-chart.ts +820 -814
  68. package/src/bar-chart/category-axis.ts +177 -177
  69. package/src/bar-chart/chart-bars.ts +310 -310
  70. package/src/bar-chart/index.ts +31 -31
  71. package/src/bar-chart/shared.ts +354 -354
  72. package/src/engine.ts +26 -26
  73. package/src/index.ts +5 -5
  74. package/src/kit/chart-border.ts +61 -61
  75. package/src/kit/chart-canvas.ts +157 -157
  76. package/src/kit/chart-legend.ts +245 -250
  77. package/src/kit/shared.ts +733 -675
  78. package/src/kit/vertical-axis.ts +224 -224
  79. package/src/line-chart/chart-line.ts +208 -208
  80. package/src/line-chart/chart-region.ts +135 -135
  81. package/src/line-chart/horizontal-axis.ts +202 -202
  82. package/src/line-chart/index.ts +39 -39
  83. package/src/line-chart/line-chart.ts +961 -929
  84. package/src/line-chart/shared.ts +473 -459
  85. package/src/line-chart/x-scale.ts +367 -367
  86. package/src/nodes.ts +20 -20
  87. package/src/pie-chart/index.ts +37 -37
  88. package/src/pie-chart/pie-chart.ts +383 -381
  89. package/src/pie-chart/pie-legend.ts +159 -159
  90. package/src/pie-chart/pie-ring.ts +935 -903
  91. package/src/pie-chart/shared.ts +490 -490
  92. package/dist/browser/chunks/chunk-RMHQ6GYU.js +0 -2
  93. package/dist/browser/chunks/chunk-RMHQ6GYU.js.map +0 -7
package/src/nodes.ts CHANGED
@@ -1,20 +1,20 @@
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 class's `@node()`
10
- * key. The decorator only *declares* that key: nothing is registered by the mere
11
- * act of importing a module, so a registry holds exactly what its owner asked
12
- * for and two engines in one process can differ about it.
13
- *
14
- * Listing class **values** is also what survives bundling. This package declares
15
- * `sideEffects: false`, which licenses a bundler to drop a module nothing
16
- * imports a value from, and a document names a node type by string — so
17
- * `import "./line-chart"` for its side effect is exactly what gets shaken out, where an
18
- * array of bindings is a data dependency that cannot be.
19
- */
20
- export const NODES = [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 class's `@node()`
10
+ * key. The decorator only *declares* that key: nothing is registered by the mere
11
+ * act of importing a module, so a registry holds exactly what its owner asked
12
+ * for and two engines in one process can differ about it.
13
+ *
14
+ * Listing class **values** is also what survives bundling. This package declares
15
+ * `sideEffects: false`, which licenses a bundler to drop a module nothing
16
+ * imports a value from, and a document names a node type by string — so
17
+ * `import "./line-chart"` for its side effect is exactly what gets shaken out, where an
18
+ * array of bindings is a data dependency that cannot be.
19
+ */
20
+ export const NODES = [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 } from "./pie-chart"
11
- export type { PieChartProps } 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 } from "./pie-chart"
11
+ export type { PieChartProps } 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"