@sophistry/charts 0.0.0-stage → 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 (220) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -2
  3. package/dist/3d/bar-chart3d.d.ts +55 -0
  4. package/dist/3d/definitions.d.ts +37 -0
  5. package/dist/3d/definitions.js +14 -0
  6. package/dist/3d/forward.d.ts +64 -0
  7. package/dist/3d/index.d.ts +30 -0
  8. package/dist/3d/index.js +1 -0
  9. package/dist/3d/quiver3d.d.ts +52 -0
  10. package/dist/3d/scatter3d.d.ts +44 -0
  11. package/dist/3d/stem3d.d.ts +45 -0
  12. package/dist/3d/surface-grid3d.d.ts +33 -0
  13. package/dist/3d/tri-surface3d.d.ts +45 -0
  14. package/dist/3d/voxels3d.d.ts +25 -0
  15. package/dist/3d/wireframe3d.d.ts +30 -0
  16. package/dist/band.d.ts +20 -0
  17. package/dist/bars/bar-chart.d.ts +143 -0
  18. package/dist/bars/bar-labels.d.ts +116 -0
  19. package/dist/bars/bars.d.ts +223 -0
  20. package/dist/bars/bullet.d.ts +157 -0
  21. package/dist/bars/candlestick.d.ts +97 -0
  22. package/dist/bars/funnel.d.ts +90 -0
  23. package/dist/bars/histogram.d.ts +108 -0
  24. package/dist/bars/index.d.ts +22 -0
  25. package/dist/bars/race.d.ts +28 -0
  26. package/dist/bars/rules.d.ts +121 -0
  27. package/dist/bars/shared.d.ts +41 -0
  28. package/dist/bars/transforms.d.ts +249 -0
  29. package/dist/bars/waterfall.d.ts +106 -0
  30. package/dist/batch.d.ts +142 -0
  31. package/dist/channels-_Xf-p6Lx.js +56 -0
  32. package/dist/chart.d.ts +87 -0
  33. package/dist/color-norm.d.ts +90 -0
  34. package/dist/context.d.ts +111 -0
  35. package/dist/curves/density.d.ts +125 -0
  36. package/dist/curves/ecdf.d.ts +72 -0
  37. package/dist/curves/fill-between.d.ts +100 -0
  38. package/dist/curves/index.d.ts +15 -0
  39. package/dist/curves/line-plot.d.ts +104 -0
  40. package/dist/curves/regression.d.ts +124 -0
  41. package/dist/curves/shared.d.ts +52 -0
  42. package/dist/curves/stack-plot.d.ts +140 -0
  43. package/dist/curves/stairs.d.ts +170 -0
  44. package/dist/data/channels.d.ts +170 -0
  45. package/dist/end-space.d.ts +81 -0
  46. package/dist/entries/definitions.d.ts +20 -0
  47. package/dist/entries/definitions.js +6 -0
  48. package/dist/frame/band-axis.d.ts +42 -0
  49. package/dist/frame/coords.d.ts +111 -0
  50. package/dist/frame/fit.d.ts +170 -0
  51. package/dist/frame/format.d.ts +40 -0
  52. package/dist/frame/guide-metrics.d.ts +36 -0
  53. package/dist/frame/guides.d.ts +67 -0
  54. package/dist/frame/keys.d.ts +96 -0
  55. package/dist/frame/layout.d.ts +145 -0
  56. package/dist/frame/registry.d.ts +31 -0
  57. package/dist/frame/reports.d.ts +53 -0
  58. package/dist/frame/secondary-axes.d.ts +73 -0
  59. package/dist/frame/secondary.d.ts +56 -0
  60. package/dist/frame/tooltip-overlay.d.ts +64 -0
  61. package/dist/frame/types.d.ts +658 -0
  62. package/dist/grids/barbs.d.ts +51 -0
  63. package/dist/grids/cell-rects.d.ts +37 -0
  64. package/dist/grids/cells.d.ts +130 -0
  65. package/dist/grids/contour-f.d.ts +80 -0
  66. package/dist/grids/contour-shared.d.ts +53 -0
  67. package/dist/grids/contour.d.ts +84 -0
  68. package/dist/grids/dendrogram.d.ts +104 -0
  69. package/dist/grids/heatmap.d.ts +163 -0
  70. package/dist/grids/hex-bin.d.ts +93 -0
  71. package/dist/grids/hist2d.d.ts +107 -0
  72. package/dist/grids/imshow.d.ts +84 -0
  73. package/dist/grids/index.d.ts +26 -0
  74. package/dist/grids/pcolormesh.d.ts +90 -0
  75. package/dist/grids/ramp-cells.d.ts +66 -0
  76. package/dist/grids/tri-contour.d.ts +120 -0
  77. package/dist/grids/tri-shared.d.ts +61 -0
  78. package/dist/grids/tripcolor.d.ts +73 -0
  79. package/dist/guides/colorbar.d.ts +110 -0
  80. package/dist/guides/index.d.ts +11 -0
  81. package/dist/guides/legend.d.ts +118 -0
  82. package/dist/guides/nodes.d.ts +13 -0
  83. package/dist/guides/size-legend.d.ts +233 -0
  84. package/dist/hierarchy/breadcrumbs.d.ts +133 -0
  85. package/dist/hierarchy/circle-pack.d.ts +72 -0
  86. package/dist/hierarchy/drill.d.ts +245 -0
  87. package/dist/hierarchy/frame.d.ts +67 -0
  88. package/dist/hierarchy/icicle.d.ts +76 -0
  89. package/dist/hierarchy/index.d.ts +20 -0
  90. package/dist/hierarchy/labels.d.ts +24 -0
  91. package/dist/hierarchy/mosaic.d.ts +130 -0
  92. package/dist/hierarchy/own-tooltip.d.ts +12 -0
  93. package/dist/hierarchy/props.d.ts +13 -0
  94. package/dist/hierarchy/sankey.d.ts +132 -0
  95. package/dist/hierarchy/shared.d.ts +247 -0
  96. package/dist/hierarchy/sunburst.d.ts +74 -0
  97. package/dist/hierarchy/tree.d.ts +124 -0
  98. package/dist/hierarchy/treemap.d.ts +76 -0
  99. package/dist/index.d.ts +29 -0
  100. package/dist/index.js +5 -0
  101. package/dist/item-tooltip.d.ts +33 -0
  102. package/dist/join.d.ts +223 -0
  103. package/dist/math/3d/bar3d.d.ts +27 -0
  104. package/dist/math/3d/quiver3d.d.ts +26 -0
  105. package/dist/math/3d/scatter3d.d.ts +15 -0
  106. package/dist/math/3d/stem3d.d.ts +22 -0
  107. package/dist/math/3d/surfaceGrid3d.d.ts +33 -0
  108. package/dist/math/3d/trisurface.d.ts +11 -0
  109. package/dist/math/3d/voxels.d.ts +17 -0
  110. package/dist/math/aggregate.d.ts +68 -0
  111. package/dist/math/bar.d.ts +31 -0
  112. package/dist/math/barLabels.d.ts +83 -0
  113. package/dist/math/barbs.d.ts +36 -0
  114. package/dist/math/boxplot.d.ts +36 -0
  115. package/dist/math/breadcrumbs.d.ts +128 -0
  116. package/dist/math/bubble.d.ts +38 -0
  117. package/dist/math/bullet.d.ts +110 -0
  118. package/dist/math/chord.d.ts +103 -0
  119. package/dist/math/cluster.d.ts +88 -0
  120. package/dist/math/contour.d.ts +48 -0
  121. package/dist/math/contourf.d.ts +50 -0
  122. package/dist/math/dodge.d.ts +36 -0
  123. package/dist/math/ecdf.d.ts +41 -0
  124. package/dist/math/errorbar.d.ts +27 -0
  125. package/dist/math/eventplot.d.ts +26 -0
  126. package/dist/math/facet.d.ts +90 -0
  127. package/dist/math/fillBetween.d.ts +28 -0
  128. package/dist/math/gauge.d.ts +71 -0
  129. package/dist/math/hexbin.d.ts +20 -0
  130. package/dist/math/hierarchy.d.ts +179 -0
  131. package/dist/math/hierarchyJoin.d.ts +59 -0
  132. package/dist/math/histogram.d.ts +36 -0
  133. package/dist/math/histogram2d.d.ts +44 -0
  134. package/dist/math/imshow.d.ts +26 -0
  135. package/dist/math/index.d.ts +139 -0
  136. package/dist/math/index.js +3 -0
  137. package/dist/math/jitter.d.ts +16 -0
  138. package/dist/math/join.d.ts +135 -0
  139. package/dist/math/keyframes.d.ts +127 -0
  140. package/dist/math/legend.d.ts +120 -0
  141. package/dist/math/line.d.ts +53 -0
  142. package/dist/math/morph.d.ts +81 -0
  143. package/dist/math/mosaic.d.ts +119 -0
  144. package/dist/math/ordinal.d.ts +79 -0
  145. package/dist/math/parallel.d.ts +38 -0
  146. package/dist/math/pcolormesh.d.ts +22 -0
  147. package/dist/math/pie.d.ts +105 -0
  148. package/dist/math/polarArea.d.ts +34 -0
  149. package/dist/math/radar.d.ts +110 -0
  150. package/dist/math/range.d.ts +98 -0
  151. package/dist/math/regression.d.ts +109 -0
  152. package/dist/math/reveal.d.ts +63 -0
  153. package/dist/math/sankey.d.ts +154 -0
  154. package/dist/math/scatter.d.ts +14 -0
  155. package/dist/math/shared/binning.d.ts +23 -0
  156. package/dist/math/shared/gridCells.d.ts +41 -0
  157. package/dist/math/shared/gridExtent.d.ts +5 -0
  158. package/dist/math/shared/pairs.d.ts +2 -0
  159. package/dist/math/shared/polar.d.ts +23 -0
  160. package/dist/math/stack.d.ts +69 -0
  161. package/dist/math/stackplot.d.ts +35 -0
  162. package/dist/math/stairs.d.ts +17 -0
  163. package/dist/math/stem.d.ts +21 -0
  164. package/dist/math/symbol.d.ts +25 -0
  165. package/dist/math/tree.d.ts +117 -0
  166. package/dist/math/tricontour.d.ts +76 -0
  167. package/dist/math/violin.d.ts +99 -0
  168. package/dist/math/waffle.d.ts +48 -0
  169. package/dist/math/waterfall.d.ts +28 -0
  170. package/dist/math-CSHNpGej.js +3648 -0
  171. package/dist/mix.d.ts +24 -0
  172. package/dist/multiview/brush.d.ts +165 -0
  173. package/dist/multiview/chart-group.d.ts +265 -0
  174. package/dist/multiview/chart-link.d.ts +188 -0
  175. package/dist/multiview/chart-zoom.d.ts +144 -0
  176. package/dist/multiview/facet.d.ts +238 -0
  177. package/dist/multiview/group-guides.d.ts +99 -0
  178. package/dist/multiview/index.d.ts +17 -0
  179. package/dist/multiview/joint-plot.d.ts +114 -0
  180. package/dist/multiview/pair-plot.d.ts +153 -0
  181. package/dist/multiview/panels.d.ts +22 -0
  182. package/dist/multiview/parallel-coordinates.d.ts +109 -0
  183. package/dist/points/event-plot.d.ts +67 -0
  184. package/dist/points/index.d.ts +19 -0
  185. package/dist/points/labels.d.ts +70 -0
  186. package/dist/points/links.d.ts +123 -0
  187. package/dist/points/rects.d.ts +80 -0
  188. package/dist/points/rug.d.ts +72 -0
  189. package/dist/points/scatter.d.ts +169 -0
  190. package/dist/points/segment-marks.d.ts +39 -0
  191. package/dist/points/shared.d.ts +34 -0
  192. package/dist/points/stem.d.ts +75 -0
  193. package/dist/points/strip.d.ts +145 -0
  194. package/dist/points/symbol-marker.d.ts +33 -0
  195. package/dist/points/ticks.d.ts +102 -0
  196. package/dist/props.d.ts +126 -0
  197. package/dist/radial/chord.d.ts +148 -0
  198. package/dist/radial/gauge.d.ts +126 -0
  199. package/dist/radial/index.d.ts +15 -0
  200. package/dist/radial/pie-chart.d.ts +143 -0
  201. package/dist/radial/polar-area-chart.d.ts +135 -0
  202. package/dist/radial/radar-chart.d.ts +176 -0
  203. package/dist/radial/radial-bar-chart.d.ts +116 -0
  204. package/dist/radial/shared.d.ts +78 -0
  205. package/dist/radial/waffle.d.ts +130 -0
  206. package/dist/raster.d.ts +43 -0
  207. package/dist/series.d.ts +71 -0
  208. package/dist/src-CwGo1bes.js +19221 -0
  209. package/dist/stagger.d.ts +54 -0
  210. package/dist/statistics/box-plot.d.ts +151 -0
  211. package/dist/statistics/error-bar.d.ts +148 -0
  212. package/dist/statistics/groups.d.ts +140 -0
  213. package/dist/statistics/index.d.ts +7 -0
  214. package/dist/statistics/violin-plot.d.ts +143 -0
  215. package/dist/text-width.d.ts +9 -0
  216. package/dist/tooltip.d.ts +276 -0
  217. package/dist/util.d.ts +33 -0
  218. package/dist/voxels-9lJ2TZS4.js +235 -0
  219. package/dist/wireframe3d-D157GZAq.js +345 -0
  220. package/package.json +86 -3
@@ -0,0 +1,345 @@
1
+ import { c as e, l as t, n, o as r } from "./channels-_Xf-p6Lx.js";
2
+ import { a as i, i as a, n as o, o as s, r as c, s as l, t as u } from "./voxels-9lJ2TZS4.js";
3
+ import { Invalidate as d, defineComposite as f } from "@sophistry/core";
4
+ import { delaunayTriangleIndices as p } from "@sophistry/core/internal";
5
+ import { defineMesh3D as m, dot3D as h, line3D as g, mesh3DProps as _, prism3D as v, vector3D as y } from "@sophistry/3d";
6
+ //#region src/3d/forward.ts
7
+ function b(e, t = []) {
8
+ let n = {};
9
+ for (let [r, i] of Object.entries(e)) t.includes(r) || (n[r] = i.kind === "event" ? {
10
+ kind: "event",
11
+ invalidates: d.UPDATE
12
+ } : i.default === void 0 ? { invalidates: d.UPDATE } : {
13
+ default: i.default,
14
+ invalidates: d.UPDATE
15
+ });
16
+ return Object.freeze(n);
17
+ }
18
+ function x(e, t, n) {
19
+ let r = t, i = t.definition.descriptor;
20
+ for (let t of n) {
21
+ let n = e[t];
22
+ n !== void 0 && i[t] && r.set(t, n);
23
+ }
24
+ }
25
+ function S(e, t, n, r) {
26
+ for (let i of e) {
27
+ if (typeof i != "string" || !r.has(i)) continue;
28
+ let e = t[i];
29
+ for (let t of n) t.definition.descriptor[i] && t.set(i, e);
30
+ }
31
+ }
32
+ function C(e, t) {
33
+ for (let n of e) if (typeof n != "string" || !t.has(n)) return !0;
34
+ return !1;
35
+ }
36
+ function w(e, t, n) {
37
+ let r = e, i = r.get(t);
38
+ i && i.x === n.x && i.y === n.y && i.z === n.z || r.set(t, n);
39
+ }
40
+ //#endregion
41
+ //#region src/3d/bar-chart3d.ts
42
+ var T = [], E = b(v.descriptor, [
43
+ "center",
44
+ "width",
45
+ "height",
46
+ "depth",
47
+ "fill"
48
+ ]), ee = Object.keys(E), D = new Set(ee);
49
+ function O(e, t, n) {
50
+ w(e, "center", {
51
+ x: (t.x0 + t.x1) / 2,
52
+ y: (t.y0 + t.y1) / 2,
53
+ z: (t.z0 + t.z1) / 2
54
+ }), e.set("width", t.x1 - t.x0), e.set("height", t.y1 - t.y0), e.set("depth", t.z1 - t.z0), e.set("fill", n);
55
+ }
56
+ function k(e) {
57
+ let i = e.props, a = i.data ?? T, o = e.theme, s = l(r(a, t(i.x)), r(a, t(i.y)), r(a, t(i.z)), r(a, t(i.width, () => 1)), r(a, t(i.height)), r(a, t(i.depth, () => 1))), c = n(i.color, i.colors ?? o.palette.series, o.palette.foreground);
58
+ return e.list("boxes", s, {
59
+ key: (e, t) => t,
60
+ create: (e) => {
61
+ let t = v.create();
62
+ return x(i, t, ee), O(t, e, c(a[e.index], e.index)), t;
63
+ },
64
+ update: (e, t) => O(e, t, c(a[t.index], t.index))
65
+ });
66
+ }
67
+ var te = f({
68
+ name: "BarChart3D",
69
+ props: {
70
+ ...E,
71
+ data: {
72
+ default: T,
73
+ invalidates: d.UPDATE
74
+ },
75
+ x: { invalidates: d.UPDATE },
76
+ y: { invalidates: d.UPDATE },
77
+ z: { invalidates: d.UPDATE },
78
+ width: {
79
+ default: 1,
80
+ invalidates: d.UPDATE
81
+ },
82
+ height: { invalidates: d.UPDATE },
83
+ depth: {
84
+ default: 1,
85
+ invalidates: d.UPDATE
86
+ },
87
+ color: { invalidates: d.UPDATE },
88
+ colors: { invalidates: d.UPDATE }
89
+ },
90
+ setup: (e) => k(e),
91
+ update: (e, t) => (S(e, t.props, t.node.children, D), C(e, D) ? k(t) : void 0)
92
+ }), A = [], j = b(y.descriptor, [
93
+ "from",
94
+ "to",
95
+ "stroke",
96
+ "fill"
97
+ ]), M = Object.keys(j), N = new Set(M);
98
+ function P(e, t, n) {
99
+ e.set("stroke", n), w(e, "from", t.origin), w(e, "to", {
100
+ x: t.origin.x + t.vector.x,
101
+ y: t.origin.y + t.vector.y,
102
+ z: t.origin.z + t.vector.z
103
+ });
104
+ }
105
+ function F(t) {
106
+ let n = t.props, i = n.data ?? A, a = s(r(i, n.x), r(i, n.y), r(i, n.z), r(i, n.u), r(i, n.v), r(i, n.w), { scale: n.scale }), o = e(n.color), c = (e) => o?.(i[e.index], e.index);
107
+ return t.list("arrows", a, {
108
+ key: (e, t) => t,
109
+ create: (e) => {
110
+ let t = y.create({ to: e.origin });
111
+ return x(n, t, M), P(t, e, c(e)), t;
112
+ },
113
+ update: (e, t) => P(e, t, c(t))
114
+ });
115
+ }
116
+ var ne = f({
117
+ name: "Quiver3D",
118
+ props: {
119
+ ...j,
120
+ data: {
121
+ default: A,
122
+ invalidates: d.UPDATE
123
+ },
124
+ x: { invalidates: d.UPDATE },
125
+ y: { invalidates: d.UPDATE },
126
+ z: { invalidates: d.UPDATE },
127
+ u: { invalidates: d.UPDATE },
128
+ v: { invalidates: d.UPDATE },
129
+ w: { invalidates: d.UPDATE },
130
+ scale: {
131
+ default: 1,
132
+ invalidates: d.UPDATE
133
+ },
134
+ color: { invalidates: d.UPDATE }
135
+ },
136
+ setup: (e) => F(e),
137
+ update: (e, t) => (S(e, t.props, t.node.children, N), C(e, N) ? F(t) : void 0)
138
+ }), I = [], L = b(h.descriptor, [
139
+ "center",
140
+ "radius",
141
+ "color"
142
+ ]), R = Object.keys(L), z = new Set(R);
143
+ function B(n) {
144
+ let a = n.props, o = a.data ?? I, s = t(a.radius), c = e(a.color), l = i(r(o, a.x), r(o, a.y), r(o, a.z)), u = (e, t) => {
145
+ let n = o[t.index];
146
+ w(e, "center", {
147
+ x: t.x,
148
+ y: t.y,
149
+ z: t.z
150
+ }), e.set("radius", s?.(n, t.index)), e.set("color", c?.(n, t.index));
151
+ };
152
+ return n.list("markers", l, {
153
+ key: (e, t) => t,
154
+ create: (e) => {
155
+ let t = h.create();
156
+ return x(a, t, R), u(t, e), t;
157
+ },
158
+ update: u
159
+ });
160
+ }
161
+ var re = f({
162
+ name: "Scatter3D",
163
+ props: {
164
+ ...L,
165
+ data: {
166
+ default: I,
167
+ invalidates: d.UPDATE
168
+ },
169
+ x: { invalidates: d.UPDATE },
170
+ y: { invalidates: d.UPDATE },
171
+ z: { invalidates: d.UPDATE },
172
+ radius: {
173
+ default: .08,
174
+ invalidates: d.UPDATE
175
+ },
176
+ color: { invalidates: d.UPDATE }
177
+ },
178
+ setup: (e) => B(e),
179
+ update: (e, t) => (S(e, t.props, t.node.children, z), C(e, z) ? B(t) : void 0)
180
+ }), V = [], H = b(g.descriptor, [
181
+ "from",
182
+ "to",
183
+ "stroke",
184
+ "fill"
185
+ ]), U = Object.keys(H), W = new Set(U);
186
+ function G(t) {
187
+ let n = t.props, i = n.data ?? V, o = a(r(i, n.x), r(i, n.y), r(i, n.z), { baseline: n.baseline }), s = e(n.color), c = (e) => s?.(i[e.index], e.index), l = (e, t) => {
188
+ e.set("stroke", c(t)), w(e, "from", t.drop[0]), w(e, "to", t.drop[1]);
189
+ }, u = (e, t) => {
190
+ e.set("color", c(t)), w(e, "center", t.marker), e.set("radius", n.markerRadius);
191
+ }, d = t.list("lines", o, {
192
+ key: (e, t) => t,
193
+ create: (e) => {
194
+ let t = g.create({ to: e.drop[1] });
195
+ return x(n, t, U), l(t, e), t;
196
+ },
197
+ update: l
198
+ }), f = t.list("markers", o, {
199
+ key: (e, t) => t,
200
+ create: (e) => {
201
+ let t = h.create();
202
+ return x(n, t, U), u(t, e), t;
203
+ },
204
+ update: u
205
+ }), p = Array(o.length * 2);
206
+ for (let e = 0; e < o.length; e++) p[2 * e] = d[e], p[2 * e + 1] = f[e];
207
+ return p;
208
+ }
209
+ var ie = f({
210
+ name: "Stem3D",
211
+ props: {
212
+ ...H,
213
+ data: {
214
+ default: V,
215
+ invalidates: d.UPDATE
216
+ },
217
+ x: { invalidates: d.UPDATE },
218
+ y: { invalidates: d.UPDATE },
219
+ z: { invalidates: d.UPDATE },
220
+ baseline: {
221
+ default: 0,
222
+ invalidates: d.UPDATE
223
+ },
224
+ markerRadius: {
225
+ default: .08,
226
+ invalidates: d.UPDATE
227
+ },
228
+ color: { invalidates: d.UPDATE }
229
+ },
230
+ setup: (e) => G(e),
231
+ update: (e, t) => (S(e, t.props, t.node.children, W), C(e, W) ? G(t) : void 0)
232
+ }), K = [], ae = m({
233
+ name: "SurfaceGrid3D",
234
+ props: {
235
+ ..._,
236
+ xs: {
237
+ default: K,
238
+ invalidates: d.GEOMETRY
239
+ },
240
+ ys: {
241
+ default: K,
242
+ invalidates: d.GEOMETRY
243
+ },
244
+ zs: {
245
+ default: K,
246
+ invalidates: d.GEOMETRY
247
+ }
248
+ },
249
+ faces: (e) => o(e.xs ?? K, e.ys ?? K, e.zs ?? K)
250
+ }), q = [];
251
+ function oe(e) {
252
+ let t = e.data ?? q, n = r(t, e.x), i = r(t, e.y), a = r(t, e.z), o = p(a, n), s = [];
253
+ for (let [e, t, r] of o) {
254
+ let o = i[e], c = i[t], l = i[r];
255
+ Number.isFinite(o) && Number.isFinite(c) && Number.isFinite(l) && s.push({ points: [
256
+ {
257
+ x: n[e],
258
+ y: o,
259
+ z: a[e]
260
+ },
261
+ {
262
+ x: n[t],
263
+ y: c,
264
+ z: a[t]
265
+ },
266
+ {
267
+ x: n[r],
268
+ y: l,
269
+ z: a[r]
270
+ }
271
+ ] });
272
+ }
273
+ return s;
274
+ }
275
+ var se = m({
276
+ name: "TriSurface3D",
277
+ props: {
278
+ ..._,
279
+ data: {
280
+ default: q,
281
+ invalidates: d.GEOMETRY
282
+ },
283
+ x: { invalidates: d.GEOMETRY },
284
+ y: { invalidates: d.GEOMETRY },
285
+ z: { invalidates: d.GEOMETRY }
286
+ },
287
+ faces: oe
288
+ }), J = [], ce = m({
289
+ name: "Voxels3D",
290
+ props: {
291
+ ..._,
292
+ values: {
293
+ default: J,
294
+ invalidates: d.GEOMETRY
295
+ }
296
+ },
297
+ faces: (e) => u(e.values ?? J)
298
+ });
299
+ //#endregion
300
+ //#region src/3d/wireframe3d.ts
301
+ function le(e) {
302
+ let t = [];
303
+ for (let n of e) for (let e = 0; e < n.length - 1; e++) t.push({
304
+ from: n[e],
305
+ to: n[e + 1]
306
+ });
307
+ return t;
308
+ }
309
+ var Y = b(g.descriptor, ["from", "to"]), X = Object.keys(Y), Z = new Set(X), Q = [];
310
+ function $(e, t) {
311
+ w(e, "from", t.from), w(e, "to", t.to);
312
+ }
313
+ function ue(e) {
314
+ let t = e.props, n = le(c(t.xs ?? Q, t.ys ?? Q, t.zs ?? Q));
315
+ return e.list("segments", n, {
316
+ key: (e, t) => t,
317
+ create: (e) => {
318
+ let n = g.create({ to: e.to });
319
+ return x(t, n, X), $(n, e), n;
320
+ },
321
+ update: $
322
+ });
323
+ }
324
+ var de = f({
325
+ name: "Wireframe3D",
326
+ props: {
327
+ ...Y,
328
+ xs: {
329
+ default: Q,
330
+ invalidates: d.UPDATE
331
+ },
332
+ ys: {
333
+ default: Q,
334
+ invalidates: d.UPDATE
335
+ },
336
+ zs: {
337
+ default: Q,
338
+ invalidates: d.UPDATE
339
+ }
340
+ },
341
+ setup: (e) => ue(e),
342
+ update: (e, t) => (S(e, t.props, t.node.children, Z), C(e, Z) ? ue(t) : void 0)
343
+ });
344
+ //#endregion
345
+ export { ie as a, te as c, ae as i, ce as n, re as o, se as r, ne as s, de as t };
package/package.json CHANGED
@@ -1,6 +1,89 @@
1
1
  {
2
2
  "name": "@sophistry/charts",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "description": "Charts for Sophistry scenes: bars, lines, scatter, pies, hierarchies and more, with keyed transitions and reveals.",
7
+ "keywords": [
8
+ "charts",
9
+ "data-visualization",
10
+ "visualization",
11
+ "canvas",
12
+ "animation"
13
+ ],
14
+ "author": "Benjamin Lucier <benjaminlucier@gmail.com>",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/BenjaminLucier/sophistry.git",
18
+ "directory": "packages/charts"
19
+ },
20
+ "sideEffects": false,
21
+ "files": [
22
+ "dist",
23
+ "README.md",
24
+ "LICENSE"
25
+ ],
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/index.d.ts",
29
+ "default": "./dist/index.js"
30
+ },
31
+ "./math": {
32
+ "types": "./dist/math/index.d.ts",
33
+ "default": "./dist/math/index.js"
34
+ },
35
+ "./3d": {
36
+ "types": "./dist/3d/index.d.ts",
37
+ "default": "./dist/3d/index.js"
38
+ },
39
+ "./3d/definitions": {
40
+ "types": "./dist/3d/definitions.d.ts",
41
+ "default": "./dist/3d/definitions.js"
42
+ },
43
+ "./definitions": {
44
+ "types": "./dist/entries/definitions.d.ts",
45
+ "default": "./dist/entries/definitions.js"
46
+ }
47
+ },
48
+ "publishConfig": {
49
+ "access": "public",
50
+ "provenance": true
51
+ },
52
+ "dependencies": {
53
+ "d3-array": "^3.2.4",
54
+ "d3-hierarchy": "^3.1.2",
55
+ "d3-interpolate": "^3.0.1"
56
+ },
57
+ "peerDependencies": {
58
+ "@sophistry/core": "^0.1.0",
59
+ "@sophistry/3d": "^0.1.0"
60
+ },
61
+ "devDependencies": {
62
+ "@biomejs/biome": "^2.5.15",
63
+ "@sophistry/3d": "0.1.0",
64
+ "@sophistry/core": "0.1.0",
65
+ "@types/d3-array": "^3.2.2",
66
+ "@types/d3-hierarchy": "^3.1.7",
67
+ "@types/d3-interpolate": "^3.0.4",
68
+ "happy-dom": "^20.11.2",
69
+ "typescript": "~7.0.2",
70
+ "vite": "^8.3.4",
71
+ "vitest": "^4.1.10"
72
+ },
73
+ "homepage": "https://sophistry.dev",
74
+ "bugs": {
75
+ "url": "https://github.com/BenjaminLucier/sophistry/issues"
76
+ },
77
+ "peerDependenciesMeta": {
78
+ "@sophistry/3d": {
79
+ "optional": true
80
+ }
81
+ },
82
+ "scripts": {
83
+ "typecheck": "tsc -b",
84
+ "lint": "biome check",
85
+ "format": "biome check --write",
86
+ "test": "vitest run",
87
+ "build": "vite build && tsc -p tsconfig.build.json"
88
+ }
6
89
  }