@ember-joinery/chart 0.0.0-stage → 1.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 (121) hide show
  1. package/CHANGELOG.md +189 -0
  2. package/LICENSE.md +9 -0
  3. package/NOTICE +532 -0
  4. package/README.md +69 -2
  5. package/addon-main.cjs +4 -0
  6. package/declarations/-private/cartesian-chart.d.ts +413 -0
  7. package/declarations/-private/cartesian-chart.d.ts.map +1 -0
  8. package/declarations/-private/cartesian.d.ts +236 -0
  9. package/declarations/-private/cartesian.d.ts.map +1 -0
  10. package/declarations/-private/config.d.ts +13 -0
  11. package/declarations/-private/config.d.ts.map +1 -0
  12. package/declarations/-private/dots.d.ts +27 -0
  13. package/declarations/-private/dots.d.ts.map +1 -0
  14. package/declarations/-private/nice-ticks.d.ts +17 -0
  15. package/declarations/-private/nice-ticks.d.ts.map +1 -0
  16. package/declarations/-private/parts.d.ts +596 -0
  17. package/declarations/-private/parts.d.ts.map +1 -0
  18. package/declarations/-private/paths.d.ts +26 -0
  19. package/declarations/-private/paths.d.ts.map +1 -0
  20. package/declarations/-private/pie-chart.d.ts +244 -0
  21. package/declarations/-private/pie-chart.d.ts.map +1 -0
  22. package/declarations/-private/polar-chart.d.ts +423 -0
  23. package/declarations/-private/polar-chart.d.ts.map +1 -0
  24. package/declarations/-private/polar-geometry.d.ts +230 -0
  25. package/declarations/-private/polar-geometry.d.ts.map +1 -0
  26. package/declarations/-private/polar-parts.d.ts +315 -0
  27. package/declarations/-private/polar-parts.d.ts.map +1 -0
  28. package/declarations/-private/polar.d.ts +156 -0
  29. package/declarations/-private/polar.d.ts.map +1 -0
  30. package/declarations/-private/registry.d.ts +9 -0
  31. package/declarations/-private/registry.d.ts.map +1 -0
  32. package/declarations/-private/text-size.d.ts +13 -0
  33. package/declarations/-private/text-size.d.ts.map +1 -0
  34. package/declarations/-private/tick-interval.d.ts +35 -0
  35. package/declarations/-private/tick-interval.d.ts.map +1 -0
  36. package/declarations/components/area-chart.d.ts +16 -0
  37. package/declarations/components/area-chart.d.ts.map +1 -0
  38. package/declarations/components/bar-chart.d.ts +16 -0
  39. package/declarations/components/bar-chart.d.ts.map +1 -0
  40. package/declarations/components/chart-container.d.ts +66 -0
  41. package/declarations/components/chart-container.d.ts.map +1 -0
  42. package/declarations/components/chart-legend-content.d.ts +42 -0
  43. package/declarations/components/chart-legend-content.d.ts.map +1 -0
  44. package/declarations/components/chart-style.d.ts +19 -0
  45. package/declarations/components/chart-style.d.ts.map +1 -0
  46. package/declarations/components/chart-tooltip-content.d.ts +94 -0
  47. package/declarations/components/chart-tooltip-content.d.ts.map +1 -0
  48. package/declarations/components/dot.d.ts +22 -0
  49. package/declarations/components/dot.d.ts.map +1 -0
  50. package/declarations/components/line-chart.d.ts +16 -0
  51. package/declarations/components/line-chart.d.ts.map +1 -0
  52. package/declarations/components/pie-chart.d.ts +13 -0
  53. package/declarations/components/pie-chart.d.ts.map +1 -0
  54. package/declarations/components/radar-chart.d.ts +21 -0
  55. package/declarations/components/radar-chart.d.ts.map +1 -0
  56. package/declarations/components/radial-bar-chart.d.ts +17 -0
  57. package/declarations/components/radial-bar-chart.d.ts.map +1 -0
  58. package/declarations/components/rectangle.d.ts +32 -0
  59. package/declarations/components/rectangle.d.ts.map +1 -0
  60. package/declarations/components/sector.d.ts +47 -0
  61. package/declarations/components/sector.d.ts.map +1 -0
  62. package/declarations/index.d.ts +24 -0
  63. package/declarations/index.d.ts.map +1 -0
  64. package/declarations/test-support/chart.d.ts +162 -0
  65. package/declarations/test-support/chart.d.ts.map +1 -0
  66. package/declarations/test-support/index.d.ts +3 -0
  67. package/declarations/test-support/index.d.ts.map +1 -0
  68. package/declarations/test-support/polar-chart.d.ts +62 -0
  69. package/declarations/test-support/polar-chart.d.ts.map +1 -0
  70. package/declarations/test-support.d.ts +2 -0
  71. package/declarations/types.d.ts +138 -0
  72. package/declarations/types.d.ts.map +1 -0
  73. package/dist/cartesian-D9hWDamz.js +1217 -0
  74. package/dist/cartesian-D9hWDamz.js.map +1 -0
  75. package/dist/cartesian-chart-BLj6Q_OB.js +1123 -0
  76. package/dist/cartesian-chart-BLj6Q_OB.js.map +1 -0
  77. package/dist/components/area-chart.js +20 -0
  78. package/dist/components/area-chart.js.map +1 -0
  79. package/dist/components/bar-chart.js +20 -0
  80. package/dist/components/bar-chart.js.map +1 -0
  81. package/dist/components/chart-container.js +54 -0
  82. package/dist/components/chart-container.js.map +1 -0
  83. package/dist/components/chart-legend-content.js +48 -0
  84. package/dist/components/chart-legend-content.js.map +1 -0
  85. package/dist/components/chart-style.js +35 -0
  86. package/dist/components/chart-style.js.map +1 -0
  87. package/dist/components/chart-tooltip-content.js +131 -0
  88. package/dist/components/chart-tooltip-content.js.map +1 -0
  89. package/dist/components/dot.js +18 -0
  90. package/dist/components/dot.js.map +1 -0
  91. package/dist/components/line-chart.js +20 -0
  92. package/dist/components/line-chart.js.map +1 -0
  93. package/dist/components/pie-chart.js +6 -0
  94. package/dist/components/pie-chart.js.map +1 -0
  95. package/dist/components/radar-chart.js +22 -0
  96. package/dist/components/radar-chart.js.map +1 -0
  97. package/dist/components/radial-bar-chart.js +20 -0
  98. package/dist/components/radial-bar-chart.js.map +1 -0
  99. package/dist/components/rectangle.js +5 -0
  100. package/dist/components/rectangle.js.map +1 -0
  101. package/dist/components/sector.js +5 -0
  102. package/dist/components/sector.js.map +1 -0
  103. package/dist/config-DnsUmxOT.js +35 -0
  104. package/dist/config-DnsUmxOT.js.map +1 -0
  105. package/dist/index.js +15 -0
  106. package/dist/index.js.map +1 -0
  107. package/dist/parts-BWLhFFjB.js +355 -0
  108. package/dist/parts-BWLhFFjB.js.map +1 -0
  109. package/dist/pie-chart-CmDtW_Ge.js +646 -0
  110. package/dist/pie-chart-CmDtW_Ge.js.map +1 -0
  111. package/dist/polar-chart-GhgOSsH9.js +2242 -0
  112. package/dist/polar-chart-GhgOSsH9.js.map +1 -0
  113. package/dist/rectangle-Cl7tbXuZ.js +166 -0
  114. package/dist/rectangle-Cl7tbXuZ.js.map +1 -0
  115. package/dist/sector-7shQPJuQ.js +565 -0
  116. package/dist/sector-7shQPJuQ.js.map +1 -0
  117. package/dist/test-support.js +470 -0
  118. package/dist/test-support.js.map +1 -0
  119. package/dist/types.js +56 -0
  120. package/dist/types.js.map +1 -0
  121. package/package.json +117 -3
package/CHANGELOG.md ADDED
@@ -0,0 +1,189 @@
1
+ # @ember-joinery/chart
2
+
3
+ ## 1.1.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [9728270]
8
+ - Updated dependencies [9728270]
9
+ - Updated dependencies [9728270]
10
+ - Updated dependencies [9728270]
11
+ - Updated dependencies [9728270]
12
+ - Updated dependencies [9728270]
13
+ - Updated dependencies [9728270]
14
+ - Updated dependencies [9728270]
15
+ - Updated dependencies [9728270]
16
+ - Updated dependencies [9728270]
17
+ - Updated dependencies [9728270]
18
+ - Updated dependencies [9728270]
19
+ - Updated dependencies [9728270]
20
+ - Updated dependencies [9728270]
21
+ - @ember-joinery/ember@1.1.0
22
+ - @ember-joinery/test-support@1.1.0
23
+ - @ember-joinery/primitives@1.1.0
24
+
25
+ ## 1.0.1
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [2b887bf]
30
+ - Updated dependencies [2b887bf]
31
+ - Updated dependencies [2b887bf]
32
+ - Updated dependencies [2b887bf]
33
+ - Updated dependencies [2b887bf]
34
+ - Updated dependencies [2b887bf]
35
+ - Updated dependencies [2b887bf]
36
+ - Updated dependencies [2b887bf]
37
+ - @ember-joinery/primitives@1.0.1
38
+ - @ember-joinery/ember@1.0.1
39
+ - @ember-joinery/test-support@1.0.1
40
+
41
+ ## 1.0.0
42
+
43
+ ### Major Changes
44
+
45
+ - a73065d: `@ember-joinery/chart` is a new add-on: shadcn's charts, drawn as declarative Glimmer SVG on
46
+ `d3-scale` and `d3-shape` with an API shaped like recharts. `ChartContainer` takes the chart's
47
+ `@config` (labels, icons and colours, set as `--color-<key>` variables, light and dark) and the
48
+ `@initialDimension` it draws at before it is measured, and yields `AreaChart`, `BarChart` and `LineChart`, which yield recharts' parts: `XAxis`, `YAxis`,
49
+ `CartesianGrid`, `Area`, `Bar` and `Line` (each with `LabelList`), `ChartTooltip` and
50
+ `ChartLegend`. The geometry is recharts 3's (margins, nice ticks, overlapping labels dropped,
51
+ stacking, bar bands, curves), so a chart draws the paths recharts draws, with recharts' class
52
+ names. `ChartTooltipContent` and `ChartLegendContent` are shadcn's; the tooltip follows the
53
+ pointer and, with the accessibility layer, the arrow keys, and its `@formatter` is a function
54
+ that returns an entry's text or a component that draws the entry (recharts' formatter can
55
+ return markup). `Dot` and `ChartStyle` go with them. Its `/test-support` has `ChartHarness`,
56
+ `ChartTooltipHarness` and `ChartLegendHarness`. `@ember-joinery/ember`'s CSS styles the chart,
57
+ its tooltip and its legend. The built modules that hold code ported from recharts keep
58
+ recharts' MIT notice.
59
+
60
+ ### Minor Changes
61
+
62
+ - a73065d: `ChartContainer` yields `PieChart`, recharts' pie chart: its `Pie` draws recharts 3's sectors,
63
+ with a label and a line past each one (`@label`, `true` or a component), an inner radius for a
64
+ donut, and a `@shape` that draws each sector with `Sector`; it yields `LabelList`, `Label` (a
65
+ `@content` component handed the chart's ring, for a donut's total) and `Cell`. Its tooltip shows
66
+ the sector under the pointer, and with the accessibility layer the arrow keys step through the
67
+ sectors. A bar takes the `fill` in its row and its `Cell`'s, its labels take that fill, its
68
+ `@shape` draws each bar with `Rectangle`, and a bar with no length is left out, as recharts'
69
+ are. A `ChartLegend`'s `@class` reaches its content. `ChartHarness` reads a pie's sectors, label
70
+ lists and label lines, and points at a sector. The guide's Charts section has the bar and pie
71
+ charts of shadcn's charts gallery.
72
+ - a73065d: `ChartContainer` yields `RadarChart` and `RadialBarChart`, recharts 3's polar charts, with
73
+ recharts' polar parts: `PolarGrid` (polygon or circle rings, spokes), `PolarAngleAxis` (whose
74
+ `@tick` takes a component), `PolarRadiusAxis` (yielding `Label`, whose `@content` component is
75
+ handed the chart's ring, for a total in the middle), `Radar` (with `@dot` and `@activeDot`, and
76
+ `[low, high]` pairs for a band) and `RadialBar` (with a `@background` track, `@cornerRadius`,
77
+ `@stackId`, a row's own `fill`, and `LabelList`, whose `insideStart` labels run along the bar).
78
+ They draw the paths recharts draws, with its class names; the tooltip follows the pointer round
79
+ the ring and, with the accessibility layer, the arrow keys from row to row. A bar chart's
80
+ tooltip opened by `@defaultIndex` or the keyboard now points at the row's tick half way down the
81
+ chart, as recharts' does, rather than at its bar, and a tooltip glides from row to row only
82
+ when the user doesn't prefer reduced motion (`@isAnimationActive`, `'auto'` by default, as
83
+ recharts'). `/test-support` adds `PolarChartHarness`. The guide's Charts section has the radar,
84
+ radial and tooltip charts of shadcn's charts gallery.
85
+
86
+ ### Patch Changes
87
+
88
+ - a53c07b: Type checks in package source use `@sindresorhus/is` (`isString`, `isFunction`, …) instead of `typeof`, and a lint rule keeps it that way. `@sindresorhus/is` is a new runtime dependency, so `ember-joinery add` now installs it into the app for most components, `icon` included. `isNumber` rejects `NaN`, so a `NaN` reaching a numeric check now takes the non-number branch.
89
+ - a73065d: Every package's tarball carries Joinery's `LICENSE.md` and `NOTICE`, with the licences and
90
+ notices of what it ports (shadcn/ui, ember-primitives, sonner, recharts and the rest), copied in
91
+ from the repository's root by the package's `prepack`.
92
+ - Updated dependencies [a73065d]
93
+ - Updated dependencies [a73065d]
94
+ - Updated dependencies [a73065d]
95
+ - Updated dependencies [a73065d]
96
+ - Updated dependencies [a73065d]
97
+ - Updated dependencies [a73065d]
98
+ - Updated dependencies [a73065d]
99
+ - Updated dependencies [a73065d]
100
+ - Updated dependencies [a73065d]
101
+ - Updated dependencies [a73065d]
102
+ - Updated dependencies [a73065d]
103
+ - Updated dependencies [a73065d]
104
+ - Updated dependencies [a73065d]
105
+ - Updated dependencies [a73065d]
106
+ - Updated dependencies [a73065d]
107
+ - Updated dependencies [a73065d]
108
+ - Updated dependencies [a73065d]
109
+ - Updated dependencies [a73065d]
110
+ - Updated dependencies [a73065d]
111
+ - Updated dependencies [a73065d]
112
+ - Updated dependencies [a73065d]
113
+ - Updated dependencies [a73065d]
114
+ - Updated dependencies [a73065d]
115
+ - Updated dependencies [a73065d]
116
+ - Updated dependencies [a73065d]
117
+ - Updated dependencies [a73065d]
118
+ - Updated dependencies [a73065d]
119
+ - Updated dependencies [a73065d]
120
+ - Updated dependencies [a73065d]
121
+ - Updated dependencies [a73065d]
122
+ - Updated dependencies [a73065d]
123
+ - Updated dependencies [a73065d]
124
+ - Updated dependencies [a73065d]
125
+ - Updated dependencies [a73065d]
126
+ - Updated dependencies [a73065d]
127
+ - Updated dependencies [a73065d]
128
+ - Updated dependencies [a73065d]
129
+ - Updated dependencies [17c5b5c]
130
+ - Updated dependencies [17c5b5c]
131
+ - Updated dependencies [99eab0c]
132
+ - Updated dependencies [a73065d]
133
+ - Updated dependencies [a73065d]
134
+ - Updated dependencies [a73065d]
135
+ - Updated dependencies [a73065d]
136
+ - Updated dependencies [a73065d]
137
+ - Updated dependencies [a73065d]
138
+ - Updated dependencies [a73065d]
139
+ - Updated dependencies [a73065d]
140
+ - Updated dependencies [a73065d]
141
+ - Updated dependencies [a73065d]
142
+ - Updated dependencies [a73065d]
143
+ - Updated dependencies [a73065d]
144
+ - Updated dependencies [a73065d]
145
+ - Updated dependencies [a73065d]
146
+ - Updated dependencies [a73065d]
147
+ - Updated dependencies [a73065d]
148
+ - Updated dependencies [a73065d]
149
+ - Updated dependencies [a73065d]
150
+ - Updated dependencies [a73065d]
151
+ - Updated dependencies [a73065d]
152
+ - Updated dependencies [a73065d]
153
+ - Updated dependencies [a73065d]
154
+ - Updated dependencies [a73065d]
155
+ - Updated dependencies [a73065d]
156
+ - Updated dependencies [a73065d]
157
+ - Updated dependencies [a73065d]
158
+ - Updated dependencies [a73065d]
159
+ - Updated dependencies [a73065d]
160
+ - Updated dependencies [a73065d]
161
+ - Updated dependencies [a73065d]
162
+ - Updated dependencies [a73065d]
163
+ - Updated dependencies [a73065d]
164
+ - Updated dependencies [a73065d]
165
+ - Updated dependencies [a73065d]
166
+ - Updated dependencies [a73065d]
167
+ - Updated dependencies [a73065d]
168
+ - Updated dependencies [a73065d]
169
+ - Updated dependencies [a73065d]
170
+ - Updated dependencies [a73065d]
171
+ - Updated dependencies [a73065d]
172
+ - Updated dependencies [a73065d]
173
+ - Updated dependencies [a73065d]
174
+ - Updated dependencies [a73065d]
175
+ - Updated dependencies [a73065d]
176
+ - Updated dependencies [a73065d]
177
+ - Updated dependencies [a73065d]
178
+ - Updated dependencies [a73065d]
179
+ - Updated dependencies [a73065d]
180
+ - Updated dependencies [a73065d]
181
+ - Updated dependencies [a73065d]
182
+ - Updated dependencies [a73065d]
183
+ - Updated dependencies [a73065d]
184
+ - Updated dependencies [a73065d]
185
+ - Updated dependencies [a73065d]
186
+ - Updated dependencies [a73065d]
187
+ - @ember-joinery/primitives@1.0.0
188
+ - @ember-joinery/ember@1.0.0
189
+ - @ember-joinery/test-support@1.0.0
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 Joe Gaudet
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.