@newtone-dev/ui-react-web 0.65.0 → 0.67.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.
- package/dist/icon/icon.css +8 -0
- package/dist/icon/icon.d.ts +7 -1
- package/dist/icon/icon.d.ts.map +1 -1
- package/dist/icon/icon.js +3 -2
- package/dist/icon/icon.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/nav-list/nav-list.css +18 -1
- package/dist/nav-list/nav-list.d.ts +23 -2
- package/dist/nav-list/nav-list.d.ts.map +1 -1
- package/dist/nav-list/nav-list.js +44 -6
- package/dist/nav-list/nav-list.js.map +1 -1
- package/dist/node-map/beads-gl.d.ts +39 -1
- package/dist/node-map/beads-gl.d.ts.map +1 -1
- package/dist/node-map/beads-gl.js +266 -34
- package/dist/node-map/beads-gl.js.map +1 -1
- package/dist/node-map/index.d.ts +1 -1
- package/dist/node-map/index.d.ts.map +1 -1
- package/dist/node-map/index.js +1 -1
- package/dist/node-map/index.js.map +1 -1
- package/dist/node-map/node-map-3d.d.ts +7 -1
- package/dist/node-map/node-map-3d.d.ts.map +1 -1
- package/dist/node-map/node-map-3d.js +524 -98
- package/dist/node-map/node-map-3d.js.map +1 -1
- package/dist/node-map/node-map.css +93 -3
- package/dist/node-map/node-map.d.ts +51 -2
- package/dist/node-map/node-map.d.ts.map +1 -1
- package/dist/node-map/node-map.js +9 -3
- package/dist/node-map/node-map.js.map +1 -1
- package/dist/node-map/space.d.ts +121 -0
- package/dist/node-map/space.d.ts.map +1 -1
- package/dist/node-map/space.js +551 -1
- package/dist/node-map/space.js.map +1 -1
- package/dist/pick/index.d.ts +29 -0
- package/dist/pick/index.d.ts.map +1 -0
- package/dist/pick/index.js +45 -0
- package/dist/pick/index.js.map +1 -0
- package/dist/pick/palettes.d.ts +2 -0
- package/dist/pick/palettes.d.ts.map +1 -0
- package/dist/pick/palettes.js +3 -0
- package/dist/pick/palettes.js.map +1 -0
- package/dist/pick/pick.css +634 -0
- package/dist/shade-picker/index.d.ts +5 -0
- package/dist/shade-picker/index.d.ts.map +1 -0
- package/dist/shade-picker/index.js +3 -0
- package/dist/shade-picker/index.js.map +1 -0
- package/dist/shade-picker/shade-picker.css +52 -0
- package/dist/shade-picker/shade-picker.d.ts +31 -0
- package/dist/shade-picker/shade-picker.d.ts.map +1 -0
- package/dist/shade-picker/shade-picker.js +61 -0
- package/dist/shade-picker/shade-picker.js.map +1 -0
- package/dist/split/split.css +1 -0
- package/dist/split/split.d.ts +9 -1
- package/dist/split/split.d.ts.map +1 -1
- package/dist/split/split.js +2 -2
- package/dist/split/split.js.map +1 -1
- package/package.json +13 -1
package/dist/node-map/space.d.ts
CHANGED
|
@@ -54,4 +54,125 @@ export declare function turned(x: number, y: number, z: number, cam: Pick<Camera
|
|
|
54
54
|
export declare function unturned(v: Point3, cam: Pick<Camera, 'yaw' | 'pitch'>): Point3;
|
|
55
55
|
/** Where a point falls, seen by `cam` with focal length `f`, in a box whose middle is (`cx`, `cy`). */
|
|
56
56
|
export declare function seen(p: Point3, cam: Camera, f: number, cx: number, cy: number): Seen;
|
|
57
|
+
/** The tree the ties make from `home`: each node's parent is its neighbour one tie nearer to home (breadth first). */
|
|
58
|
+
export interface Tree {
|
|
59
|
+
home: string;
|
|
60
|
+
/** How many ties from home; nodes home cannot reach are absent. */
|
|
61
|
+
depth: Map<string, number>;
|
|
62
|
+
parent: Map<string, string>;
|
|
63
|
+
/** Each node's children, in the consumer's order of `nodes`. */
|
|
64
|
+
children: Map<string, string[]>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The tree from `home` over the ties, breadth first. Neighbours are visited in the consumer's order of `nodes`, so a
|
|
68
|
+
* node with two neighbours one tie nearer hangs from the one listed first, the same every time.
|
|
69
|
+
*/
|
|
70
|
+
export declare function treeOf(nodes: readonly {
|
|
71
|
+
id: string;
|
|
72
|
+
}[], edges: readonly {
|
|
73
|
+
from: string;
|
|
74
|
+
to: string;
|
|
75
|
+
}[], home: string): Tree;
|
|
76
|
+
/**
|
|
77
|
+
* A branch (s_map_branch): the node, everything that hangs from it in the tree from `home`, and the path back to home.
|
|
78
|
+
* Without a home the node's tree is rooted at itself, so its branch is everything joined to it. A node home cannot
|
|
79
|
+
* reach is its own branch with its direct ties.
|
|
80
|
+
*/
|
|
81
|
+
export declare function branchOf(nodes: readonly {
|
|
82
|
+
id: string;
|
|
83
|
+
}[], edges: readonly {
|
|
84
|
+
from: string;
|
|
85
|
+
to: string;
|
|
86
|
+
}[], home: string | undefined, id: string): Set<string>;
|
|
87
|
+
/**
|
|
88
|
+
* `count` directions spread as evenly as can be: the corners of a regular shape where one exists (2: a line, 3: a
|
|
89
|
+
* triangle, 4: a tetrahedron, 6: an octahedron, 8: a cube, 12: an icosahedron, 20: a dodecahedron); otherwise a
|
|
90
|
+
* Fibonacci sphere eased apart by a fixed number of pushes. The same every time.
|
|
91
|
+
*/
|
|
92
|
+
export declare function evenDirections(count: number): Point3[];
|
|
93
|
+
/** The box the burst is laid out for: its first view is judged as it would fall in this box (2026-12-05). */
|
|
94
|
+
export declare const BURST_VIEW: {
|
|
95
|
+
width: number;
|
|
96
|
+
height: number;
|
|
97
|
+
};
|
|
98
|
+
/** How much a big map shrinks every bead: the same as node-map-3d.tsx's marks. */
|
|
99
|
+
export declare const crowdOf: (count: number) => number;
|
|
100
|
+
/** A pill's half width and half height in CSS pixels, for its name and the scale depth gives it. */
|
|
101
|
+
export declare const pillHalf: (label: string, scale?: number) => {
|
|
102
|
+
hw: number;
|
|
103
|
+
hh: number;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* The first view of a map, as node-map-3d.tsx opens it: everything fitted, then turned round `home`, standing back as
|
|
107
|
+
* far again as home is from the map's middle; a burst (`ball`) instead fits the ball round its home.
|
|
108
|
+
*/
|
|
109
|
+
export declare function firstView(points: Iterable<Point3>, home?: Point3, ball?: boolean): Camera;
|
|
110
|
+
/** A node as the burst reads it: its look in the map (pill or bead), its name, its radius in pixels. */
|
|
111
|
+
export interface BurstNode {
|
|
112
|
+
id: string;
|
|
113
|
+
shape?: 'sphere' | 'pill';
|
|
114
|
+
label?: string;
|
|
115
|
+
r?: number;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The burst layout (s_map_even, s_map_outward), laid out for how it first looks in `view`: home in the middle; its
|
|
119
|
+
* direct children (the topics) at equal distances from it and from each other, as the corners of `evenDirections`,
|
|
120
|
+
* the shape turned so their pills stand apart at the first view; each topic's subtopic pills on a shell outside, in its
|
|
121
|
+
* cone, each put where it covers no pill already placed; everything deeper on thin shells further out, each a bead's
|
|
122
|
+
* width or two past the last (and staggered by its id), spread over its parent's cone (a chain bends a little each
|
|
123
|
+
* step), so the map fills its sphere instead of running out in spokes. Every node is farther from home than its parent.
|
|
124
|
+
* Nodes home cannot reach sit evenly on a shell outside everything. No simulation: the same graph, the same places.
|
|
125
|
+
*/
|
|
126
|
+
export declare function burstOf(nodes: readonly BurstNode[], edges: readonly {
|
|
127
|
+
from: string;
|
|
128
|
+
to: string;
|
|
129
|
+
}[], home: string, length?: number, view?: {
|
|
130
|
+
width: number;
|
|
131
|
+
height: number;
|
|
132
|
+
}): Map<string, Point3>;
|
|
133
|
+
/** The median length of the consumer's own flat ties, or 100: the unit both layouts are measured in. */
|
|
134
|
+
export declare function tieLength(nodes: readonly {
|
|
135
|
+
id: string;
|
|
136
|
+
x: number;
|
|
137
|
+
y: number;
|
|
138
|
+
}[], edges: readonly {
|
|
139
|
+
from: string;
|
|
140
|
+
to: string;
|
|
141
|
+
}[]): number;
|
|
142
|
+
/** Where every node sits in depth: the burst from `home` when asked for and there is a home, else `spaceOf`. */
|
|
143
|
+
export declare function layoutOf(nodes: {
|
|
144
|
+
id: string;
|
|
145
|
+
x: number;
|
|
146
|
+
y: number;
|
|
147
|
+
z?: number;
|
|
148
|
+
shape?: 'sphere' | 'pill';
|
|
149
|
+
label?: string;
|
|
150
|
+
r?: number;
|
|
151
|
+
}[], edges: {
|
|
152
|
+
from: string;
|
|
153
|
+
to: string;
|
|
154
|
+
}[], layout?: 'force' | 'burst', home?: string): Map<string, Point3>;
|
|
155
|
+
/** A pill on the screen this frame: where its node falls, its half size, its depth, and whether it is a topic. */
|
|
156
|
+
export interface PillOnScreen {
|
|
157
|
+
id: string;
|
|
158
|
+
x: number;
|
|
159
|
+
y: number;
|
|
160
|
+
hw: number;
|
|
161
|
+
hh: number;
|
|
162
|
+
depth: number;
|
|
163
|
+
topic: boolean;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Where each pill stands on the screen this frame (s_map_pills, 2026-12-05): pills are drawn over everything, so none
|
|
167
|
+
* may stand on another. Topics take their places first, then the nearer pills; a pill that would stand on one already
|
|
168
|
+
* placed moves up or down by its own height, then aside by half its width, until it is free (at most four steps
|
|
169
|
+
* away), and failing that tries the same a fifth smaller (`shrink`); one that finds no room keeps its place and is
|
|
170
|
+
* `faded`. About pills² × 25 box tests, for a few dozen pills.
|
|
171
|
+
*/
|
|
172
|
+
export declare function placePills(pills: readonly PillOnScreen[]): Map<string, {
|
|
173
|
+
x: number;
|
|
174
|
+
y: number;
|
|
175
|
+
faded: boolean;
|
|
176
|
+
shrink: number;
|
|
177
|
+
}>;
|
|
57
178
|
//# sourceMappingURL=space.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../src/node-map/space.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,MAAM;IACnB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,2GAA2G;AAC3G,MAAM,WAAW,MAAM;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAA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