@fusion.dev/helix-core 0.229.1 → 0.231.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.
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* **A number that would cover another label is left out**, which thins an
|
|
15
15
|
* axis seen at a slant, and an axis whose edge is seen end on is left out
|
|
16
16
|
* whole. Every name is kept, and where two axes' labels meet, the axis with
|
|
17
|
-
* fewer keeps its own.
|
|
17
|
+
* fewer keeps its own. A category has no neighbor to read it from, so it is
|
|
18
|
+
* left out only where its ink would meet another label's.
|
|
18
19
|
*
|
|
19
20
|
* Pure, and measured in the page's own units: the SVG drawing passes its
|
|
20
21
|
* drawing's units, and three.js passes pixels.
|
|
@@ -31,6 +32,8 @@ export interface BoxAxisText {
|
|
|
31
32
|
name: string;
|
|
32
33
|
ticks: readonly {
|
|
33
34
|
at: number;
|
|
35
|
+
/** Whether this is a category's name, which the labels beside it do not give. */
|
|
36
|
+
category?: boolean;
|
|
34
37
|
text: string;
|
|
35
38
|
}[];
|
|
36
39
|
}
|
|
@@ -62,6 +62,7 @@ export const boxLabels = (seen, axes, sizes) => {
|
|
|
62
62
|
const box = size(tick.text, false);
|
|
63
63
|
ticks.push({
|
|
64
64
|
...off(seen(along(tick.at)), out, box, sizes.gap),
|
|
65
|
+
category: tick.category === true,
|
|
65
66
|
of: axis.ticks.length,
|
|
66
67
|
text: tick.text,
|
|
67
68
|
});
|
|
@@ -88,7 +89,7 @@ export const boxLabels = (seen, axes, sizes) => {
|
|
|
88
89
|
y: one.y,
|
|
89
90
|
}));
|
|
90
91
|
for (const tick of [...ticks].sort((one, other) => one.of - other.of)) {
|
|
91
|
-
if (kept.some((other) => overlaps(tick, other, sizes.gap / 2))) {
|
|
92
|
+
if (kept.some((other) => overlaps(tick, other, tick.category ? 0 : sizes.gap / 2))) {
|
|
92
93
|
continue;
|
|
93
94
|
}
|
|
94
95
|
kept.push(tick);
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.231.0';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-core",
|
|
3
3
|
"description": "Helix element primitives: base classes, mixins, decorators, utilities.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.231.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Fusion Development Group",
|
|
7
7
|
"repository": {
|
|
@@ -81,12 +81,12 @@
|
|
|
81
81
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"@floating-ui/dom": "^1.8.0",
|
|
84
|
-
"@fusion.dev/helix-icons": "0.
|
|
84
|
+
"@fusion.dev/helix-icons": "0.231.0",
|
|
85
85
|
"tslib": "^2.8.1"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@fusion.dev/helix-cem": "0.
|
|
89
|
-
"@fusion.dev/helix-testing": "0.
|
|
88
|
+
"@fusion.dev/helix-cem": "0.231.0",
|
|
89
|
+
"@fusion.dev/helix-testing": "0.231.0",
|
|
90
90
|
"@lit-labs/ssr": "^4.1.0",
|
|
91
91
|
"lit": "^3.2.1"
|
|
92
92
|
},
|