@pibbl/core 0.0.3-alpha.85.1 → 0.0.3-alpha.90.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 (59) hide show
  1. package/dist/features/viz/index.d.ts +13 -0
  2. package/dist/features/viz/index.js +57 -0
  3. package/dist/features/viz/index.js.map +2 -2
  4. package/dist/features/viz/lib/graph/bipartite.d.ts +14 -0
  5. package/dist/features/viz/lib/graph/bipartite.js +250 -0
  6. package/dist/features/viz/lib/graph/bipartite.js.map +7 -0
  7. package/dist/features/viz/lib/graph/chord.d.ts +44 -0
  8. package/dist/features/viz/lib/graph/chord.js +348 -0
  9. package/dist/features/viz/lib/graph/chord.js.map +7 -0
  10. package/dist/features/viz/lib/graph/dependency.d.ts +26 -0
  11. package/dist/features/viz/lib/graph/dependency.js +141 -0
  12. package/dist/features/viz/lib/graph/dependency.js.map +7 -0
  13. package/dist/features/viz/lib/graph/force.d.ts +28 -0
  14. package/dist/features/viz/lib/graph/force.js +580 -0
  15. package/dist/features/viz/lib/graph/force.js.map +7 -0
  16. package/dist/features/viz/lib/graph/hierarchy.d.ts +21 -0
  17. package/dist/features/viz/lib/graph/hierarchy.js +112 -0
  18. package/dist/features/viz/lib/graph/hierarchy.js.map +7 -0
  19. package/dist/features/viz/lib/graph/icicle.d.ts +16 -0
  20. package/dist/features/viz/lib/graph/icicle.js +153 -0
  21. package/dist/features/viz/lib/graph/icicle.js.map +7 -0
  22. package/dist/features/viz/lib/graph/matrix.d.ts +30 -0
  23. package/dist/features/viz/lib/graph/matrix.js +243 -0
  24. package/dist/features/viz/lib/graph/matrix.js.map +7 -0
  25. package/dist/features/viz/lib/graph/neighborhood.d.ts +11 -0
  26. package/dist/features/viz/lib/graph/neighborhood.js +281 -0
  27. package/dist/features/viz/lib/graph/neighborhood.js.map +7 -0
  28. package/dist/features/viz/lib/graph/routes.d.ts +35 -0
  29. package/dist/features/viz/lib/graph/routes.js +102 -0
  30. package/dist/features/viz/lib/graph/routes.js.map +7 -0
  31. package/dist/features/viz/lib/graph/sankey.d.ts +44 -0
  32. package/dist/features/viz/lib/graph/sankey.js +341 -0
  33. package/dist/features/viz/lib/graph/sankey.js.map +7 -0
  34. package/dist/features/viz/lib/graph/shared.d.ts +59 -0
  35. package/dist/features/viz/lib/graph/shared.js +296 -0
  36. package/dist/features/viz/lib/graph/shared.js.map +7 -0
  37. package/dist/features/viz/lib/graph/tree.d.ts +11 -0
  38. package/dist/features/viz/lib/graph/tree.js +232 -0
  39. package/dist/features/viz/lib/graph/tree.js.map +7 -0
  40. package/dist/features/viz/lib/graph/treemap.d.ts +20 -0
  41. package/dist/features/viz/lib/graph/treemap.js +227 -0
  42. package/dist/features/viz/lib/graph/treemap.js.map +7 -0
  43. package/dist/features/viz/lib/graph/types.d.ts +1097 -0
  44. package/dist/filters/backdrop-contrast-gpu.d.ts +5 -0
  45. package/dist/filters/backdrop-contrast-gpu.js +33 -0
  46. package/dist/filters/backdrop-contrast-gpu.js.map +7 -0
  47. package/dist/filters/backdrop-contrast.d.ts +21 -0
  48. package/dist/filters/backdrop-contrast.js +61 -0
  49. package/dist/filters/backdrop-contrast.js.map +7 -0
  50. package/dist/filters/filter-executor.d.ts +11 -4
  51. package/dist/filters/filter-executor.js +104 -49
  52. package/dist/filters/filter-executor.js.map +2 -2
  53. package/dist/filters/render-backdrop-contrast-boundary.d.ts +31 -0
  54. package/dist/filters/render-backdrop-contrast-boundary.js +116 -0
  55. package/dist/filters/render-backdrop-contrast-boundary.js.map +7 -0
  56. package/dist/filters.d.ts +9 -7
  57. package/dist/filters.js +2 -0
  58. package/dist/filters.js.map +2 -2
  59. package/package.json +2 -2
@@ -0,0 +1,227 @@
1
+ import { jsx, jsxs } from "@pibbl/core/jsx-runtime";
2
+ import {
3
+ Group,
4
+ Rectangle,
5
+ resolveSignalValue
6
+ } from "@pibbl/core";
7
+ import {
8
+ defaultGraphLabelStyle,
9
+ GraphLabel,
10
+ resolveMarkStyle,
11
+ useGraphFrame
12
+ } from "./shared.js";
13
+ import {
14
+ checkedBounds,
15
+ finiteGap,
16
+ hierarchy,
17
+ partitionLabel,
18
+ partitionLabelFits
19
+ } from "./hierarchy.js";
20
+ function defaultPartitionCellStyle(cell) {
21
+ const shade = 82 - Math.min(cell.depth, 4) * 8;
22
+ return {
23
+ fill: `hsl(174 42% ${shade}%)`,
24
+ stroke: "#fbfaf6",
25
+ strokeWidth: 1,
26
+ cornerRadius: 3
27
+ };
28
+ }
29
+ function inset(box, amount) {
30
+ return {
31
+ x: box.x + amount,
32
+ y: box.y + amount,
33
+ width: Math.max(0, box.width - amount * 2),
34
+ height: Math.max(0, box.height - amount * 2)
35
+ };
36
+ }
37
+ function worstAspect(row, length) {
38
+ if (row.length === 0 || length <= 0) return Infinity;
39
+ const sum = row.reduce((total, item) => total + item.area, 0);
40
+ if (sum === 0) return Infinity;
41
+ const min = Math.min(...row.map((item) => item.area));
42
+ const max = Math.max(...row.map((item) => item.area));
43
+ const side2 = length * length;
44
+ return Math.max(side2 * max / (sum * sum), sum * sum / (side2 * min));
45
+ }
46
+ function squarify(records, box) {
47
+ const total = records.reduce((sum, record) => sum + record.value, 0);
48
+ const weighted = records.map((record) => ({
49
+ record,
50
+ area: box.width * box.height * (total === 0 ? 1 / records.length : record.value / total)
51
+ }));
52
+ const boxes = /* @__PURE__ */ new Map();
53
+ let remaining = { ...box };
54
+ let index = 0;
55
+ while (index < weighted.length && remaining.width > 0 && remaining.height > 0) {
56
+ const row = [weighted[index++]];
57
+ const length = Math.min(remaining.width, remaining.height);
58
+ while (index < weighted.length && worstAspect([...row, weighted[index]], length) <= worstAspect(row, length))
59
+ row.push(weighted[index++]);
60
+ const area = row.reduce((sum, item) => sum + item.area, 0);
61
+ if (remaining.width >= remaining.height) {
62
+ const rowWidth = area / remaining.height;
63
+ let y = remaining.y;
64
+ for (const item of row) {
65
+ const height = rowWidth === 0 ? 0 : item.area / rowWidth;
66
+ boxes.set(item.record, { x: remaining.x, y, width: rowWidth, height });
67
+ y += height;
68
+ }
69
+ remaining = {
70
+ x: remaining.x + rowWidth,
71
+ y: remaining.y,
72
+ width: Math.max(0, remaining.width - rowWidth),
73
+ height: remaining.height
74
+ };
75
+ } else {
76
+ const rowHeight = area / remaining.width;
77
+ let x = remaining.x;
78
+ for (const item of row) {
79
+ const width = rowHeight === 0 ? 0 : item.area / rowHeight;
80
+ boxes.set(item.record, { x, y: remaining.y, width, height: rowHeight });
81
+ x += width;
82
+ }
83
+ remaining = {
84
+ x: remaining.x,
85
+ y: remaining.y + rowHeight,
86
+ width: remaining.width,
87
+ height: Math.max(0, remaining.height - rowHeight)
88
+ };
89
+ }
90
+ }
91
+ return boxes;
92
+ }
93
+ function layoutTreemap(root, options) {
94
+ const bounds = checkedBounds(options.bounds, "layoutTreemap");
95
+ const gap = finiteGap(options.cellGap, 4, "layoutTreemap cellGap");
96
+ const padding = finiteGap(options.padding, 6, "layoutTreemap padding");
97
+ const headerHeight = finiteGap(
98
+ options.headerHeight,
99
+ 26,
100
+ "layoutTreemap headerHeight"
101
+ );
102
+ const tree = hierarchy(root, options, "layoutTreemap", options.value);
103
+ const cells = [];
104
+ const add = (record, box, depth, parentKey, rootItem) => {
105
+ const children = record.collapsed ? [] : record.children;
106
+ const boxLabel = partitionLabel(record, options, {
107
+ x: box.x + 12,
108
+ y: box.y + 8,
109
+ width: Math.max(0, box.width - 24),
110
+ height: Math.max(0, box.height - 16)
111
+ });
112
+ if (!rootItem || record.isLeaf)
113
+ cells.push(
114
+ Object.freeze({
115
+ key: record.key,
116
+ datum: record.datum,
117
+ parentKey,
118
+ depth,
119
+ value: record.value,
120
+ fraction: tree.value === 0 ? 0 : record.value / tree.value,
121
+ isLeaf: record.isLeaf,
122
+ collapsed: record.collapsed,
123
+ bounds: Object.freeze(box),
124
+ label: partitionLabelFits(boxLabel, box) ? boxLabel : null
125
+ })
126
+ );
127
+ if (children.length === 0) return;
128
+ const content = inset(
129
+ {
130
+ x: box.x,
131
+ y: box.y + headerHeight,
132
+ width: box.width,
133
+ height: Math.max(0, box.height - headerHeight)
134
+ },
135
+ padding
136
+ );
137
+ const laidOut = squarify(children, content);
138
+ for (const child of children) {
139
+ const raw = laidOut.get(child);
140
+ const childBox = inset(raw, gap / 2);
141
+ add(
142
+ child,
143
+ childBox,
144
+ rootItem ? 0 : depth + 1,
145
+ rootItem ? null : record.key,
146
+ false
147
+ );
148
+ }
149
+ };
150
+ add(tree, bounds, 0, null, true);
151
+ return Object.freeze({
152
+ bounds,
153
+ rootKey: tree.key,
154
+ total: tree.value,
155
+ unit: options.unit,
156
+ cells: Object.freeze(cells)
157
+ });
158
+ }
159
+ function TreemapCell(props) {
160
+ const { bounds } = props.cell;
161
+ const { children, style, ...events } = props;
162
+ return /* @__PURE__ */ jsxs(Group, { children: [
163
+ /* @__PURE__ */ jsx(
164
+ Rectangle,
165
+ {
166
+ ...events,
167
+ style: {
168
+ ...resolveSignalValue(style),
169
+ left: bounds.x,
170
+ top: bounds.y,
171
+ width: bounds.width,
172
+ height: bounds.height
173
+ }
174
+ }
175
+ ),
176
+ children
177
+ ] });
178
+ }
179
+ function Treemap(props) {
180
+ const frame = useGraphFrame(props.style);
181
+ const root = resolveSignalValue(props.root);
182
+ if (frame.bounds.width === 0 || frame.bounds.height === 0)
183
+ return /* @__PURE__ */ jsx(Group, { style: frame.groupStyle, children: null });
184
+ const layout = layoutTreemap(root, {
185
+ ...props,
186
+ bounds: frame.bounds,
187
+ cellGap: frame.style.cellGap,
188
+ padding: frame.style.padding,
189
+ headerHeight: frame.style.headerHeight
190
+ });
191
+ const labelStyle = resolveSignalValue(props.labelStyle);
192
+ return /* @__PURE__ */ jsx(Group, { style: frame.groupStyle, children: layout.cells.map(
193
+ (cell) => props.renderCell ? /* @__PURE__ */ jsx(
194
+ Group,
195
+ {
196
+ onClick: (event) => props.onCellClick?.(cell, event),
197
+ children: props.renderCell(cell)
198
+ },
199
+ cell.key
200
+ ) : /* @__PURE__ */ jsx(
201
+ TreemapCell,
202
+ {
203
+ cell,
204
+ style: {
205
+ ...defaultPartitionCellStyle(cell),
206
+ ...resolveMarkStyle(cell, props.cellStyle)
207
+ },
208
+ onClick: (event) => props.onCellClick?.(cell, event),
209
+ children: cell.label && /* @__PURE__ */ jsx(
210
+ GraphLabel,
211
+ {
212
+ label: cell.label,
213
+ style: { ...defaultGraphLabelStyle(cell.label), ...labelStyle }
214
+ }
215
+ )
216
+ },
217
+ cell.key
218
+ )
219
+ ) });
220
+ }
221
+ export {
222
+ Treemap,
223
+ TreemapCell,
224
+ defaultPartitionCellStyle,
225
+ layoutTreemap
226
+ };
227
+ //# sourceMappingURL=treemap.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/features/viz/lib/graph/treemap.tsx"],
4
+ "sourcesContent": ["import type { NodeStyle } from \"./types.js\";\nimport {\n Group,\n Rectangle,\n resolveSignalValue,\n type PibblNode,\n} from \"@pibbl/core\";\nimport {\n defaultGraphLabelStyle,\n GraphLabel,\n resolveMarkStyle,\n useGraphFrame,\n} from \"./shared.js\";\nimport type {\n Bounds,\n PartitionCellGeometry,\n PartitionLayout,\n PartitionCellProps,\n TreemapOptions,\n TreemapProps,\n TreemapStyle,\n} from \"./types.js\";\nimport {\n checkedBounds,\n finiteGap,\n hierarchy,\n partitionLabel,\n partitionLabelFits,\n type HierarchyRecord,\n} from \"./hierarchy.js\";\n\n/** Return the built-in depth-aware partition paint.\n * @param cell - Partition cell geometry.\n * @returns Ordinary rectangle style. @see {@link PartitionCellGeometry} */\nexport function defaultPartitionCellStyle<D>(\n cell: PartitionCellGeometry<D>,\n): NodeStyle {\n const shade = 82 - Math.min(cell.depth, 4) * 8;\n return {\n fill: `hsl(174 42% ${shade}%)`,\n stroke: \"#fbfaf6\",\n strokeWidth: 1,\n cornerRadius: 3,\n };\n}\n\nfunction inset(box: Bounds, amount: number): Bounds {\n return {\n x: box.x + amount,\n y: box.y + amount,\n width: Math.max(0, box.width - amount * 2),\n height: Math.max(0, box.height - amount * 2),\n };\n}\n\ninterface WeightedRecord<D> {\n readonly record: HierarchyRecord<D>;\n readonly area: number;\n}\n\nfunction worstAspect<D>(\n row: readonly WeightedRecord<D>[],\n length: number,\n): number {\n if (row.length === 0 || length <= 0) return Infinity;\n const sum = row.reduce((total, item) => total + item.area, 0);\n if (sum === 0) return Infinity;\n const min = Math.min(...row.map((item) => item.area));\n const max = Math.max(...row.map((item) => item.area));\n const side2 = length * length;\n return Math.max((side2 * max) / (sum * sum), (sum * sum) / (side2 * min));\n}\n\n/** Stable squarification: append records while doing so improves the current row\u2019s worst aspect ratio. */\nfunction squarify<D>(\n records: readonly HierarchyRecord<D>[],\n box: Bounds,\n): ReadonlyMap<HierarchyRecord<D>, Bounds> {\n const total = records.reduce((sum, record) => sum + record.value, 0);\n const weighted = records.map((record) => ({\n record,\n area:\n box.width *\n box.height *\n (total === 0 ? 1 / records.length : record.value / total),\n }));\n const boxes = new Map<HierarchyRecord<D>, Bounds>();\n let remaining = { ...box };\n let index = 0;\n while (\n index < weighted.length &&\n remaining.width > 0 &&\n remaining.height > 0\n ) {\n const row: WeightedRecord<D>[] = [weighted[index++]];\n const length = Math.min(remaining.width, remaining.height);\n while (\n index < weighted.length &&\n worstAspect([...row, weighted[index]], length) <= worstAspect(row, length)\n )\n row.push(weighted[index++]);\n const area = row.reduce((sum, item) => sum + item.area, 0);\n if (remaining.width >= remaining.height) {\n const rowWidth = area / remaining.height;\n let y = remaining.y;\n for (const item of row) {\n const height = rowWidth === 0 ? 0 : item.area / rowWidth;\n boxes.set(item.record, { x: remaining.x, y, width: rowWidth, height });\n y += height;\n }\n remaining = {\n x: remaining.x + rowWidth,\n y: remaining.y,\n width: Math.max(0, remaining.width - rowWidth),\n height: remaining.height,\n };\n } else {\n const rowHeight = area / remaining.width;\n let x = remaining.x;\n for (const item of row) {\n const width = rowHeight === 0 ? 0 : item.area / rowHeight;\n boxes.set(item.record, { x, y: remaining.y, width, height: rowHeight });\n x += width;\n }\n remaining = {\n x: remaining.x,\n y: remaining.y + rowHeight,\n width: remaining.width,\n height: Math.max(0, remaining.height - rowHeight),\n };\n }\n }\n return boxes;\n}\n\n/** Squarify weighted hierarchy leaves into stable, compact rectangles.\n * @param root - Hierarchy root.\n * @param options - Accessors, units, and finite bounds.\n * @returns Immutable partition geometry. @see {@link PartitionLayout} */\nexport function layoutTreemap<D>(\n root: D,\n options: TreemapOptions<D>,\n): PartitionLayout<D> {\n const bounds = checkedBounds(options.bounds, \"layoutTreemap\");\n const gap = finiteGap(options.cellGap, 4, \"layoutTreemap cellGap\");\n const padding = finiteGap(options.padding, 6, \"layoutTreemap padding\");\n const headerHeight = finiteGap(\n options.headerHeight,\n 26,\n \"layoutTreemap headerHeight\",\n );\n const tree = hierarchy(root, options, \"layoutTreemap\", options.value);\n const cells: PartitionCellGeometry<D>[] = [];\n const add = (\n record: HierarchyRecord<D>,\n box: Bounds,\n depth: number,\n parentKey: PartitionCellGeometry<D>[\"parentKey\"],\n rootItem: boolean,\n ) => {\n const children = record.collapsed ? [] : record.children;\n const boxLabel = partitionLabel(record, options, {\n x: box.x + 12,\n y: box.y + 8,\n width: Math.max(0, box.width - 24),\n height: Math.max(0, box.height - 16),\n });\n if (!rootItem || record.isLeaf)\n cells.push(\n Object.freeze({\n key: record.key,\n datum: record.datum,\n parentKey,\n depth,\n value: record.value,\n fraction: tree.value === 0 ? 0 : record.value / tree.value,\n isLeaf: record.isLeaf,\n collapsed: record.collapsed,\n bounds: Object.freeze(box),\n label: partitionLabelFits(boxLabel, box) ? boxLabel : null,\n }),\n );\n if (children.length === 0) return;\n const content = inset(\n {\n x: box.x,\n y: box.y + headerHeight,\n width: box.width,\n height: Math.max(0, box.height - headerHeight),\n },\n padding,\n );\n const laidOut = squarify(children, content);\n for (const child of children) {\n const raw = laidOut.get(child)!;\n const childBox = inset(raw, gap / 2);\n add(\n child,\n childBox,\n rootItem ? 0 : depth + 1,\n rootItem ? null : record.key,\n false,\n );\n }\n };\n add(tree, bounds, 0, null, true);\n return Object.freeze({\n bounds,\n rootKey: tree.key,\n total: tree.value,\n unit: options.unit,\n cells: Object.freeze(cells),\n });\n}\n\n/** Paint one partition cell at its immutable geometry.\n * @param props - Cell geometry, paint, events, and optional global-coordinate children.\n * @returns Canvas composition. @see {@link PartitionCellGeometry} */\nexport function TreemapCell<D>(props: PartitionCellProps<D>): PibblNode {\n const { bounds } = props.cell;\n const { children, style, ...events } = props;\n return (\n <Group>\n <Rectangle\n {...events}\n style={{\n ...resolveSignalValue(style),\n left: bounds.x,\n top: bounds.y,\n width: bounds.width,\n height: bounds.height,\n }}\n />\n {children}\n </Group>\n );\n}\n\n/** Render a squarified hierarchy with visible quantitative labels.\n * @param props - Reactive hierarchy data and presentation.\n * @returns Canvas composition. @see {@link layoutTreemap} */\nexport function Treemap<D>(props: TreemapProps<D>): PibblNode {\n const frame = useGraphFrame<TreemapStyle>(props.style);\n const root = resolveSignalValue(props.root);\n if (frame.bounds.width === 0 || frame.bounds.height === 0)\n return <Group style={frame.groupStyle}>{null}</Group>;\n const layout = layoutTreemap(root, {\n ...props,\n bounds: frame.bounds,\n cellGap: frame.style.cellGap,\n padding: frame.style.padding,\n headerHeight: frame.style.headerHeight,\n });\n const labelStyle = resolveSignalValue(props.labelStyle);\n return (\n <Group style={frame.groupStyle}>\n {layout.cells.map((cell) =>\n props.renderCell ? (\n <Group\n key={cell.key}\n onClick={(event) => props.onCellClick?.(cell, event)}\n >\n {props.renderCell(cell)}\n </Group>\n ) : (\n <TreemapCell\n key={cell.key}\n cell={cell}\n style={{\n ...defaultPartitionCellStyle(cell),\n ...resolveMarkStyle(cell, props.cellStyle),\n }}\n onClick={(event) => props.onCellClick?.(cell, event)}\n >\n {cell.label && (\n <GraphLabel\n label={cell.label}\n style={{ ...defaultGraphLabelStyle(cell.label), ...labelStyle }}\n />\n )}\n </TreemapCell>\n ),\n )}\n </Group>\n );\n}\n"],
5
+ "mappings": "AA8NI,SACE,KADF;AA7NJ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