@newtone-dev/ui-react-web 0.41.0 → 0.42.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/README.md +1 -1
- package/dist/beside/beside.css +21 -0
- package/dist/beside/beside.d.ts +8 -1
- package/dist/beside/beside.d.ts.map +1 -1
- package/dist/beside/beside.js +2 -2
- package/dist/beside/beside.js.map +1 -1
- package/dist/body/body.d.ts +3 -0
- package/dist/body/body.d.ts.map +1 -1
- package/dist/body/body.js +4 -1
- package/dist/body/body.js.map +1 -1
- package/dist/canvas/canvas.css +25 -0
- package/dist/canvas/canvas.d.ts +2 -0
- package/dist/canvas/canvas.d.ts.map +1 -1
- package/dist/canvas/canvas.js +2 -1
- package/dist/canvas/canvas.js.map +1 -1
- package/dist/canvas/frame/frame.d.ts +16 -0
- package/dist/canvas/frame/frame.d.ts.map +1 -0
- package/dist/canvas/frame/frame.js +19 -0
- package/dist/canvas/frame/frame.js.map +1 -0
- package/dist/canvas/index.d.ts +1 -0
- package/dist/canvas/index.d.ts.map +1 -1
- package/dist/desktop/bar/apps.d.ts +18 -0
- package/dist/desktop/bar/apps.d.ts.map +1 -0
- package/dist/desktop/bar/apps.js +16 -0
- package/dist/desktop/bar/apps.js.map +1 -0
- package/dist/desktop/bar/bar.d.ts +56 -0
- package/dist/desktop/bar/bar.d.ts.map +1 -0
- package/dist/desktop/bar/bar.js +34 -0
- package/dist/desktop/bar/bar.js.map +1 -0
- package/dist/desktop/bar/monogram.d.ts +14 -0
- package/dist/desktop/bar/monogram.d.ts.map +1 -0
- package/dist/desktop/bar/monogram.js +15 -0
- package/dist/desktop/bar/monogram.js.map +1 -0
- package/dist/desktop/context.d.ts +6 -12
- package/dist/desktop/context.d.ts.map +1 -1
- package/dist/desktop/context.js.map +1 -1
- package/dist/desktop/control/control.d.ts +10 -3
- package/dist/desktop/control/control.d.ts.map +1 -1
- package/dist/desktop/control/control.js +16 -4
- package/dist/desktop/control/control.js.map +1 -1
- package/dist/desktop/desktop.css +845 -335
- package/dist/desktop/desktop.d.ts +36 -33
- package/dist/desktop/desktop.d.ts.map +1 -1
- package/dist/desktop/desktop.js +25 -30
- package/dist/desktop/desktop.js.map +1 -1
- package/dist/desktop/index.d.ts +9 -7
- package/dist/desktop/index.d.ts.map +1 -1
- package/dist/desktop/index.js +3 -3
- package/dist/desktop/index.js.map +1 -1
- package/dist/desktop/launcher/launcher.d.ts +107 -0
- package/dist/desktop/launcher/launcher.d.ts.map +1 -0
- package/dist/desktop/launcher/launcher.js +164 -0
- package/dist/desktop/launcher/launcher.js.map +1 -0
- package/dist/desktop/menu/menu.d.ts +41 -25
- package/dist/desktop/menu/menu.d.ts.map +1 -1
- package/dist/desktop/menu/menu.js +86 -48
- package/dist/desktop/menu/menu.js.map +1 -1
- package/dist/desktop/profile/profile.d.ts +38 -0
- package/dist/desktop/profile/profile.d.ts.map +1 -0
- package/dist/desktop/profile/profile.js +18 -0
- package/dist/desktop/profile/profile.js.map +1 -0
- package/dist/desktop/tiles/layout.d.ts +86 -0
- package/dist/desktop/tiles/layout.d.ts.map +1 -0
- package/dist/desktop/tiles/layout.js +215 -0
- package/dist/desktop/tiles/layout.js.map +1 -0
- package/dist/desktop/tiles/tiles.d.ts +106 -0
- package/dist/desktop/tiles/tiles.d.ts.map +1 -0
- package/dist/desktop/tiles/tiles.js +121 -0
- package/dist/desktop/tiles/tiles.js.map +1 -0
- package/dist/desktop/widget/widget.d.ts +51 -0
- package/dist/desktop/widget/widget.d.ts.map +1 -0
- package/dist/desktop/widget/widget.js +18 -0
- package/dist/desktop/widget/widget.js.map +1 -0
- package/dist/field-row/field-row.css +30 -0
- package/dist/field-row/field-row.d.ts +12 -0
- package/dist/field-row/field-row.d.ts.map +1 -0
- package/dist/field-row/field-row.js +10 -0
- package/dist/field-row/field-row.js.map +1 -0
- package/dist/field-row/index.d.ts +4 -0
- package/dist/field-row/index.d.ts.map +1 -0
- package/dist/field-row/index.js +3 -0
- package/dist/field-row/index.js.map +1 -0
- package/dist/file-grid/file-grid.css +33 -1
- package/dist/file-grid/file-grid.d.ts +12 -2
- package/dist/file-grid/file-grid.d.ts.map +1 -1
- package/dist/file-grid/file-grid.js +4 -4
- package/dist/file-grid/file-grid.js.map +1 -1
- package/dist/framed-icon/art.d.ts +73 -0
- package/dist/framed-icon/art.d.ts.map +1 -0
- package/dist/framed-icon/art.js +66 -0
- package/dist/framed-icon/art.js.map +1 -0
- package/dist/framed-icon/framed-icon.css +161 -0
- package/dist/framed-icon/framed-icon.d.ts +10 -2
- package/dist/framed-icon/framed-icon.d.ts.map +1 -1
- package/dist/framed-icon/framed-icon.js +3 -2
- package/dist/framed-icon/framed-icon.js.map +1 -1
- package/dist/framed-icon/index.d.ts +2 -0
- package/dist/framed-icon/index.d.ts.map +1 -1
- package/dist/framed-icon/index.js +1 -0
- package/dist/framed-icon/index.js.map +1 -1
- package/dist/identity/identity.css +7 -0
- package/dist/identity/identity.d.ts +50 -12
- package/dist/identity/identity.d.ts.map +1 -1
- package/dist/identity/identity.js +24 -13
- package/dist/identity/identity.js.map +1 -1
- package/dist/identity/index.d.ts +2 -2
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +1 -1
- package/dist/identity/index.js.map +1 -1
- package/dist/index.d.ts +12 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/nav-list/nav-list.d.ts +5 -1
- package/dist/nav-list/nav-list.d.ts.map +1 -1
- package/dist/nav-list/nav-list.js +1 -1
- package/dist/nav-list/nav-list.js.map +1 -1
- package/dist/picker/index.d.ts +4 -0
- package/dist/picker/index.d.ts.map +1 -0
- package/dist/picker/index.js +3 -0
- package/dist/picker/index.js.map +1 -0
- package/dist/picker/picker.css +95 -0
- package/dist/picker/picker.d.ts +58 -0
- package/dist/picker/picker.d.ts.map +1 -0
- package/dist/picker/picker.js +106 -0
- package/dist/picker/picker.js.map +1 -0
- package/dist/row-list/row-list.css +10 -0
- package/dist/row-list/row-list.d.ts +3 -1
- package/dist/row-list/row-list.d.ts.map +1 -1
- package/dist/row-list/row-list.js +2 -2
- package/dist/row-list/row-list.js.map +1 -1
- package/dist/split/index.d.ts +1 -1
- package/dist/split/index.d.ts.map +1 -1
- package/dist/split/split.css +136 -0
- package/dist/split/split.d.ts +38 -11
- package/dist/split/split.d.ts.map +1 -1
- package/dist/split/split.js +72 -7
- package/dist/split/split.js.map +1 -1
- package/dist/text/text.d.ts +6 -2
- package/dist/text/text.d.ts.map +1 -1
- package/dist/text/text.js.map +1 -1
- package/dist/text-field/suggested.d.ts +17 -0
- package/dist/text-field/suggested.d.ts.map +1 -0
- package/dist/text-field/suggested.js +72 -0
- package/dist/text-field/suggested.js.map +1 -0
- package/dist/text-field/text-field.css +64 -0
- package/dist/text-field/text-field.d.ts +17 -1
- package/dist/text-field/text-field.d.ts.map +1 -1
- package/dist/text-field/text-field.js +5 -2
- package/dist/text-field/text-field.js.map +1 -1
- package/dist/tooltip/tooltip.css +17 -0
- package/dist/tooltip/tooltip.d.ts +7 -1
- package/dist/tooltip/tooltip.d.ts.map +1 -1
- package/dist/tooltip/tooltip.js +2 -2
- package/dist/tooltip/tooltip.js.map +1 -1
- package/package.json +4 -1
- package/dist/desktop/clock/clock.d.ts +0 -11
- package/dist/desktop/clock/clock.d.ts.map +0 -1
- package/dist/desktop/clock/clock.js +0 -20
- package/dist/desktop/clock/clock.js.map +0 -1
- package/dist/desktop/dock/dock.d.ts +0 -30
- package/dist/desktop/dock/dock.d.ts.map +0 -1
- package/dist/desktop/dock/dock.js +0 -15
- package/dist/desktop/dock/dock.js.map +0 -1
- package/dist/desktop/menu-bar/menu-bar.d.ts +0 -18
- package/dist/desktop/menu-bar/menu-bar.d.ts.map +0 -1
- package/dist/desktop/menu-bar/menu-bar.js +0 -11
- package/dist/desktop/menu-bar/menu-bar.js.map +0 -1
- package/dist/desktop/spaces/spaces.d.ts +0 -23
- package/dist/desktop/spaces/spaces.d.ts.map +0 -1
- package/dist/desktop/spaces/spaces.js +0 -8
- package/dist/desktop/spaces/spaces.js.map +0 -1
- package/dist/desktop/window/window.d.ts +0 -60
- package/dist/desktop/window/window.d.ts.map +0 -1
- package/dist/desktop/window/window.js +0 -86
- package/dist/desktop/window/window.js.map +0 -1
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
// A desk's panes as a tree: a pane, or a split of two or more, side by side (`row`) or one over another (`column`),
|
|
2
|
+
// each child's share of it in `sizes` (summing to 1). Pure: the consumer keeps the tree; these change it and measure
|
|
3
|
+
// it. contracts/desktop.md, *Panes*.
|
|
4
|
+
/**
|
|
5
|
+
* The room between two panes: the divider's line, and nothing else (2026-11-01: panes meet at the line). Its grip is
|
|
6
|
+
* wider than it is (desktop.css), over the panes' edges.
|
|
7
|
+
*/
|
|
8
|
+
export const GAP = 1;
|
|
9
|
+
const isPane = (l) => 'pane' in l;
|
|
10
|
+
/** Every pane's id, in reading order. */
|
|
11
|
+
export function panesOf(layout) {
|
|
12
|
+
if (!layout)
|
|
13
|
+
return [];
|
|
14
|
+
return isPane(layout) ? [layout.pane] : layout.children.flatMap(panesOf);
|
|
15
|
+
}
|
|
16
|
+
/** Each pane's rectangle and every divider, for an area. */
|
|
17
|
+
export function measure(layout, area) {
|
|
18
|
+
const rects = new Map();
|
|
19
|
+
const dividers = [];
|
|
20
|
+
const walk = (l, r, path) => {
|
|
21
|
+
if (isPane(l))
|
|
22
|
+
return void rects.set(l.pane, r);
|
|
23
|
+
const across = l.split === 'row';
|
|
24
|
+
const room = (across ? r.w : r.h) - GAP * (l.children.length - 1);
|
|
25
|
+
let at = across ? r.x : r.y;
|
|
26
|
+
l.children.forEach((child, i) => {
|
|
27
|
+
const size = Math.max(0, Math.round(room * (l.sizes[i] ?? 1 / l.children.length)));
|
|
28
|
+
const last = i === l.children.length - 1;
|
|
29
|
+
const span = last ? (across ? r.x + r.w : r.y + r.h) - at : size;
|
|
30
|
+
walk(child, across ? { x: at, y: r.y, w: span, h: r.h } : { x: r.x, y: at, w: r.w, h: span }, [...path, i]);
|
|
31
|
+
at += span;
|
|
32
|
+
if (!last) {
|
|
33
|
+
dividers.push({ path, after: i, split: l.split, rect: across ? { x: at, y: r.y, w: GAP, h: r.h } : { x: r.x, y: at, w: r.w, h: GAP } });
|
|
34
|
+
at += GAP;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
if (layout)
|
|
39
|
+
walk(layout, { x: 0, y: 0, w: area.w, h: area.h }, []);
|
|
40
|
+
return { rects, dividers };
|
|
41
|
+
}
|
|
42
|
+
const even = (n) => Array.from({ length: n }, () => 1 / n);
|
|
43
|
+
/** Splits a pane in two: the new pane after it, side by side (`row`) or under it (`column`), half each. */
|
|
44
|
+
/**
|
|
45
|
+
* `even`: when the pane is already in a split that way, every pane of that split takes an equal share after the new one
|
|
46
|
+
* joins, in place of the pane halving its own (a row of three becoming four equal columns, 2026-11-01).
|
|
47
|
+
*/
|
|
48
|
+
export function splitPane(layout, id, made, split, even = false) {
|
|
49
|
+
if (!layout)
|
|
50
|
+
return { pane: made };
|
|
51
|
+
const walk = (l) => {
|
|
52
|
+
if (isPane(l))
|
|
53
|
+
return l.pane === id ? { split, sizes: [0.5, 0.5], children: [l, { pane: made }] } : l;
|
|
54
|
+
// Splitting along the split it is already in adds a sibling, sharing the room it had.
|
|
55
|
+
const at = l.children.findIndex((c) => isPane(c) && c.pane === id);
|
|
56
|
+
if (at >= 0 && l.split === split) {
|
|
57
|
+
const half = l.sizes[at] / 2;
|
|
58
|
+
const n = l.children.length + 1;
|
|
59
|
+
return {
|
|
60
|
+
...l,
|
|
61
|
+
sizes: even ? Array.from({ length: n }, () => 1 / n) : [...l.sizes.slice(0, at), half, half, ...l.sizes.slice(at + 1)],
|
|
62
|
+
children: [...l.children.slice(0, at + 1), { pane: made }, ...l.children.slice(at + 1)],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return { ...l, children: l.children.map(walk) };
|
|
66
|
+
};
|
|
67
|
+
return walk(layout);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Takes a pane out: its room goes to its neighbour in its split (the one before it, else the one after), so a split
|
|
71
|
+
* closed again gives back exactly what it took, as a terminal's does; a split left with one child becomes that child.
|
|
72
|
+
* Null when none is left.
|
|
73
|
+
*/
|
|
74
|
+
export function removePane(layout, id) {
|
|
75
|
+
if (!layout)
|
|
76
|
+
return null;
|
|
77
|
+
if (isPane(layout))
|
|
78
|
+
return layout.pane === id ? null : layout;
|
|
79
|
+
const kept = [];
|
|
80
|
+
const sizes = [];
|
|
81
|
+
let freed = -1;
|
|
82
|
+
layout.children.forEach((c, i) => {
|
|
83
|
+
const next = removePane(c, id);
|
|
84
|
+
if (next) {
|
|
85
|
+
kept.push(next);
|
|
86
|
+
sizes.push(layout.sizes[i]);
|
|
87
|
+
}
|
|
88
|
+
else
|
|
89
|
+
freed = i;
|
|
90
|
+
});
|
|
91
|
+
if (!kept.length)
|
|
92
|
+
return null;
|
|
93
|
+
if (kept.length === 1)
|
|
94
|
+
return kept[0];
|
|
95
|
+
if (freed >= 0)
|
|
96
|
+
sizes[Math.max(0, freed - 1)] += layout.sizes[freed];
|
|
97
|
+
const total = sizes.reduce((a, b) => a + b, 0) || 1;
|
|
98
|
+
return { ...layout, children: kept, sizes: sizes.map((s) => s / total) };
|
|
99
|
+
}
|
|
100
|
+
/** The split at a path changed to these sizes. */
|
|
101
|
+
export function resize(layout, path, sizes) {
|
|
102
|
+
if (isPane(layout))
|
|
103
|
+
return layout;
|
|
104
|
+
if (!path.length)
|
|
105
|
+
return { ...layout, sizes };
|
|
106
|
+
const [head, ...rest] = path;
|
|
107
|
+
return { ...layout, children: layout.children.map((c, i) => (i === head ? resize(c, rest, sizes) : c)) };
|
|
108
|
+
}
|
|
109
|
+
/** The split at a path, its children evened out. */
|
|
110
|
+
export const evenOut = (layout, path) => {
|
|
111
|
+
let at = layout;
|
|
112
|
+
for (const i of path)
|
|
113
|
+
if (!isPane(at))
|
|
114
|
+
at = at.children[i];
|
|
115
|
+
return isPane(at) ? layout : resize(layout, path, even(at.children.length));
|
|
116
|
+
};
|
|
117
|
+
/** The pane next to one in a direction, by where they stand: the nearest whose side faces it. Null at the edge. */
|
|
118
|
+
export function neighbour(layout, id, to) {
|
|
119
|
+
const { rects } = measure(layout, { w: 10000, h: 10000 });
|
|
120
|
+
const from = rects.get(id);
|
|
121
|
+
if (!from)
|
|
122
|
+
return null;
|
|
123
|
+
const mid = { x: from.x + from.w / 2, y: from.y + from.h / 2 };
|
|
124
|
+
let best = null;
|
|
125
|
+
let bestDistance = Infinity;
|
|
126
|
+
for (const [other, r] of rects) {
|
|
127
|
+
if (other === id)
|
|
128
|
+
continue;
|
|
129
|
+
const facing = to === 'left' ? r.x + r.w <= from.x && r.y < from.y + from.h && r.y + r.h > from.y
|
|
130
|
+
: to === 'right' ? r.x >= from.x + from.w && r.y < from.y + from.h && r.y + r.h > from.y
|
|
131
|
+
: to === 'up' ? r.y + r.h <= from.y && r.x < from.x + from.w && r.x + r.w > from.x
|
|
132
|
+
: r.y >= from.y + from.h && r.x < from.x + from.w && r.x + r.w > from.x;
|
|
133
|
+
if (!facing)
|
|
134
|
+
continue;
|
|
135
|
+
const d = Math.hypot(r.x + r.w / 2 - mid.x, r.y + r.h / 2 - mid.y);
|
|
136
|
+
if (d < bestDistance) {
|
|
137
|
+
bestDistance = d;
|
|
138
|
+
best = other;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return best;
|
|
142
|
+
}
|
|
143
|
+
/** Panes laid out in rows of at most `perRow`, evenly: how a list of panes becomes a desk. */
|
|
144
|
+
export function grid(ids, perRow = 3) {
|
|
145
|
+
if (!ids.length)
|
|
146
|
+
return null;
|
|
147
|
+
if (ids.length === 1)
|
|
148
|
+
return { pane: ids[0] };
|
|
149
|
+
const rows = [];
|
|
150
|
+
for (let i = 0; i < ids.length; i += perRow)
|
|
151
|
+
rows.push(ids.slice(i, i + perRow));
|
|
152
|
+
const row = (r) => (r.length === 1 ? { pane: r[0] } : { split: 'row', sizes: even(r.length), children: r.map((pane) => ({ pane })) });
|
|
153
|
+
return rows.length === 1 ? row(rows[0]) : { split: 'column', sizes: even(rows.length), children: rows.map(row) };
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The narrowest a pane may be (Joshua, 2026-11-01): a quarter of a 16-inch MacBook Pro's screen (1728 points at its
|
|
157
|
+
* default size) less the three 1-point gaps between four panes: four panes side by side fill it exactly, a fifth does
|
|
158
|
+
* not fit. (1728 - 3) / 4 = 431.25.
|
|
159
|
+
*/
|
|
160
|
+
export const PANE_MIN_W = (1728 - 3 * 1) / 4;
|
|
161
|
+
/**
|
|
162
|
+
* The least each half of a split keeps: below it, the pane is not split that way. Across, a pane's narrowest
|
|
163
|
+
* (PANE_MIN_W); 15rem down, a bar and a few lines (a placeholder, 2026-11-01).
|
|
164
|
+
*/
|
|
165
|
+
export const SPLIT_ROOM = { w: PANE_MIN_W, h: 240 };
|
|
166
|
+
// Whether a pane's own split is one over another: it was split down already.
|
|
167
|
+
function inColumn(layout, id) {
|
|
168
|
+
if (isPane(layout))
|
|
169
|
+
return false;
|
|
170
|
+
if (layout.split === 'column' && layout.children.some((c) => isPane(c) && c.pane === id))
|
|
171
|
+
return true;
|
|
172
|
+
return layout.children.some((c) => inColumn(c, id));
|
|
173
|
+
}
|
|
174
|
+
// The split a pane is a direct child of, and that split's own extent (its panes' rects joined).
|
|
175
|
+
function parentOf(layout, id) {
|
|
176
|
+
if (isPane(layout))
|
|
177
|
+
return null;
|
|
178
|
+
if (layout.children.some((c) => isPane(c) && c.pane === id))
|
|
179
|
+
return { split: layout.split, count: layout.children.length, panes: panesOf(layout) };
|
|
180
|
+
for (const c of layout.children) {
|
|
181
|
+
const found = parentOf(c, id);
|
|
182
|
+
if (found)
|
|
183
|
+
return found;
|
|
184
|
+
}
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* How a pane may be split now (DECISIONS 2026-11-01-a-panes-bar-is-a-navbar): to its right while each half keeps
|
|
189
|
+
* SPLIT_ROOM.w, or, when it is one of a row, while the row evened out with one more column keeps every column that wide
|
|
190
|
+
* (`evenRow`: the split then evens the row out; Joshua, 2026-11-01: up to four columns on a 16-inch laptop); down while
|
|
191
|
+
* each keeps SPLIT_ROOM.h, and only once (not when it is already one of a split down). The split control offers right,
|
|
192
|
+
* else down, else nothing; the keys obey the same.
|
|
193
|
+
*/
|
|
194
|
+
export function splitsOf(layout, area, id) {
|
|
195
|
+
const m = layout ? measure(layout, area) : null;
|
|
196
|
+
const r = m?.rects.get(id);
|
|
197
|
+
if (!layout || !m || !r)
|
|
198
|
+
return { row: false, column: false, evenRow: false };
|
|
199
|
+
// A point of give: panes are laid out on whole points, so a quarter of 1728 comes out as 431 or 432, never 431.25.
|
|
200
|
+
const fits = (room, min) => room >= min - 1;
|
|
201
|
+
const halves = fits((r.w - GAP) / 2, SPLIT_ROOM.w);
|
|
202
|
+
const parent = parentOf(layout, id);
|
|
203
|
+
let evens = false;
|
|
204
|
+
if (!halves && parent?.split === 'row') {
|
|
205
|
+
const rects = parent.panes.map((p) => m.rects.get(p)).filter((x) => !!x);
|
|
206
|
+
const extent = Math.max(...rects.map((x) => x.x + x.w)) - Math.min(...rects.map((x) => x.x));
|
|
207
|
+
evens = fits((extent - parent.count * GAP) / (parent.count + 1), SPLIT_ROOM.w);
|
|
208
|
+
}
|
|
209
|
+
return {
|
|
210
|
+
row: halves || evens,
|
|
211
|
+
column: fits((r.h - GAP) / 2, SPLIT_ROOM.h) && !inColumn(layout, id),
|
|
212
|
+
evenRow: !halves && evens,
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/desktop/tiles/layout.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,qHAAqH;AACr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UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC;QACpE,OAAO,EAAE,CAAC,MAAM,IAAI,KAAK;KAC5B,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type IdentityProps } from '../../identity/identity.js';
|
|
3
|
+
import { type TileLayout } from './layout.js';
|
|
4
|
+
export interface DesktopTilesProps {
|
|
5
|
+
/** The desk's panes as a tree (`TileLayout`); null when it has none. */
|
|
6
|
+
layout: TileLayout | null;
|
|
7
|
+
/** A divider dragged, moved with the arrow keys, or evened out by a double press: the whole tree, changed. */
|
|
8
|
+
onLayoutChange: (layout: TileLayout) => void;
|
|
9
|
+
/** The pane the keys act in: drawn with its edge; at `compact`, the only one drawn. */
|
|
10
|
+
focused: string | null;
|
|
11
|
+
/** The dividers' accessible name. */
|
|
12
|
+
dividerLabel: string;
|
|
13
|
+
/** `Desktop.Pane`s, one for each pane of the layout, in any order: each finds its own place. */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The area as panes, side by side and one over another, with nothing between them but dividers: a desk's panes tile
|
|
18
|
+
* it, as a terminal's do. Every pane is drawn where the layout says, flat and keyed by its id, so splitting or
|
|
19
|
+
* closing one never draws another again (a framed app in it never reloads). contracts/desktop.md, *Panes*.
|
|
20
|
+
*/
|
|
21
|
+
export declare function DesktopTiles({ layout, onLayoutChange, focused, dividerLabel, children }: DesktopTilesProps): import("react").JSX.Element;
|
|
22
|
+
export interface DesktopPaneProps {
|
|
23
|
+
/** Its id in the layout. */
|
|
24
|
+
id: string;
|
|
25
|
+
/** Its name: in its pill, and its accessible name. */
|
|
26
|
+
title: string;
|
|
27
|
+
/** Its app's glyph, an `Icon` name, in its pill before the title. */
|
|
28
|
+
icon?: string;
|
|
29
|
+
/** Its controls' words, the consumer's. `crumbs` names its trail. */
|
|
30
|
+
labels: {
|
|
31
|
+
close: string;
|
|
32
|
+
split: string;
|
|
33
|
+
splitDown: string;
|
|
34
|
+
crumbs?: string;
|
|
35
|
+
back?: string;
|
|
36
|
+
forward?: string;
|
|
37
|
+
clear?: string;
|
|
38
|
+
};
|
|
39
|
+
/** Pressed anywhere while not focused. */
|
|
40
|
+
onFocus?: () => void;
|
|
41
|
+
/** The × at the bar's far end, outside the pill: closes the pane. The desk's last closed, the clean desktop shows. */
|
|
42
|
+
onClose: () => void;
|
|
43
|
+
/**
|
|
44
|
+
* The − at the pill's end: puts away what the pane shows, the pane staying, empty, as a new one (alone, the clean
|
|
45
|
+
* desktop). DECISIONS 2026-11-01-minus-clears-a-pane.
|
|
46
|
+
*/
|
|
47
|
+
onClear?: () => void;
|
|
48
|
+
/**
|
|
49
|
+
* The chevrons at its bar's start (‹ ›): back and forward in the pane's own history, as a browser tab's. Drawn
|
|
50
|
+
* whenever given; disabled while there is nowhere to go (`canBack`, `canForward`). Chevrons, not arrows, so they are
|
|
51
|
+
* not the host's own (DECISIONS 2026-11-01-chevrons-and-close-come-back).
|
|
52
|
+
*/
|
|
53
|
+
onBack?: () => void;
|
|
54
|
+
onForward?: () => void;
|
|
55
|
+
canBack?: boolean;
|
|
56
|
+
canForward?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Where it is, as a trail (DECISIONS 2026-11-01-a-panes-bar-is-a-trail): from its app down to what it shows, each
|
|
59
|
+
* place before the last a way back to it (`onCrumb`). Shown in the pill while it is not being written in; a press on
|
|
60
|
+
* the pill's empty room makes it the search. Without it, the pill shows `find`'s title.
|
|
61
|
+
*/
|
|
62
|
+
crumbs?: {
|
|
63
|
+
id: string;
|
|
64
|
+
label: string;
|
|
65
|
+
}[];
|
|
66
|
+
onCrumb?: (id: string) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Splits it, at its bar's end: to its right while each half keeps its room, else down, once; past that the control
|
|
69
|
+
* is not drawn (`splitsOf`, DECISIONS 2026-11-01-a-panes-bar-is-a-navbar). Not drawn at `compact`.
|
|
70
|
+
*/
|
|
71
|
+
onSplit?: (way: 'row' | 'column') => void;
|
|
72
|
+
/** The keys for each way, shown on the control's title (`⌘D`, `⌘⇧D`), the consumer's words. */
|
|
73
|
+
splitKeys?: {
|
|
74
|
+
row: string;
|
|
75
|
+
column: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* It shows the desk itself (a launcher, nothing open). While it is the desk's only pane, it is drawn as no pane at
|
|
79
|
+
* all: no bar, no edge, no ground, the wallpaper through it, under the desktop's own `Desktop.Bar`. With other panes
|
|
80
|
+
* beside it, it is a pane like any other.
|
|
81
|
+
*/
|
|
82
|
+
bare?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Its pill's words as a search: a `Desktop.Launcher` at `place="bar"`, reading as the title until pressed, then a
|
|
85
|
+
* field, as a browser's address bar (DECISIONS 2026-11-01-a-panes-bar-is-a-search). Without it, the title in words.
|
|
86
|
+
*/
|
|
87
|
+
find?: ReactNode;
|
|
88
|
+
/** A `Desktop.Sheet` asking something of this pane's app: over what it shows, which is inert under it. */
|
|
89
|
+
sheet?: ReactNode;
|
|
90
|
+
/**
|
|
91
|
+
* The identity what it shows wears: its app's (contracts/identities.md). It reaches the pane's main surface only,
|
|
92
|
+
* which paints its ground in it; the bar (‹ ›, the pill, split, close), a sheet over it and the dividers between
|
|
93
|
+
* panes stay in the identity around the desktop (DECISIONS 2026-11-01-an-app-wears-its-look-inside-its-pane).
|
|
94
|
+
*/
|
|
95
|
+
identity?: Pick<IdentityProps, 'name' | 'href' | 'assets'>;
|
|
96
|
+
/** What it shows; its box answers Newtone's breakpoints itself, as a window's did. */
|
|
97
|
+
children?: ReactNode;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* One pane of the tiles. Its bar (DECISIONS 2026-11-01-chevrons-and-close-come-back): back and forward (‹ ›), then a
|
|
101
|
+
* pill (its app's mark, where it is as a trail, its search, and its close at the end), then the way to split it. Alone and `bare`, the
|
|
102
|
+
* desk itself. It names no profile: the desktop is one profile's (DECISIONS 2026-11-01-one-profile-per-desktop).
|
|
103
|
+
* contracts/desktop.md, *Panes*.
|
|
104
|
+
*/
|
|
105
|
+
export declare function DesktopPane({ id, title, icon, labels, onFocus, onClose, onClear, onBack, onForward, canBack, canForward, crumbs, onCrumb, onSplit, splitKeys, bare, find, sheet, identity, children }: DesktopPaneProps): import("react").JSX.Element;
|
|
106
|
+
//# sourceMappingURL=tiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiles.d.ts","sourceRoot":"","sources":["../../../src/desktop/tiles/tiles.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA4E,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAGhH,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKzE,OAAO,EAAoE,KAAK,UAAU,EAAiB,MAAM,aAAa,CAAA;AAO9H,MAAM,WAAW,iBAAiB;IAC9B,wEAAwE;IACxE,MAAM,EAAE,UAAU,GAAG,IAAI,CAAA;IACzB,8GAA8G;IAC9G,cAAc,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAA;IAC5C,uFAAuF;IACvF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,qCAAqC;IACrC,YAAY,EAAE,MAAM,CAAA;IACpB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,SAAS,CAAA;CACvB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,iBAAiB,+BAiB1G;AAsED,MAAM,WAAW,gBAAgB;IAC7B,4BAA4B;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAA;IACb,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,qEAAqE;IACrE,MAAM,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AA;IAC1D,sFAAsF;IACtF,QAAQ,CAAC,EAAE,SAAS,CAAA;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAe,EAAE,UAAkB,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,gBAAgB,+BA6FvO"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext, useEffect, useRef } from 'react';
|
|
4
|
+
import { Crumbs } from '../../crumbs/crumbs.js';
|
|
5
|
+
import { Icon } from '../../icon/icon.js';
|
|
6
|
+
import { Identity } from '../../identity/identity.js';
|
|
7
|
+
import { Surface } from '../../surface/index.js';
|
|
8
|
+
import { Text } from '../../text/text.js';
|
|
9
|
+
import { DesktopControl } from '../control/control.js';
|
|
10
|
+
import { useDesktop } from '../context.js';
|
|
11
|
+
import { evenOut, measure, PANE_MIN_W, resize, splitsOf } from './layout.js';
|
|
12
|
+
/** Never narrower than a pane's narrowest (PANE_MIN_W, a quarter of a 16-inch laptop's screen), nor shorter than a bar and a line of a form. */
|
|
13
|
+
const MIN = { w: PANE_MIN_W, h: 160 };
|
|
14
|
+
const TilesContext = createContext(null);
|
|
15
|
+
/**
|
|
16
|
+
* The area as panes, side by side and one over another, with nothing between them but dividers: a desk's panes tile
|
|
17
|
+
* it, as a terminal's do. Every pane is drawn where the layout says, flat and keyed by its id, so splitting or
|
|
18
|
+
* closing one never draws another again (a framed app in it never reloads). contracts/desktop.md, *Panes*.
|
|
19
|
+
*/
|
|
20
|
+
export function DesktopTiles({ layout, onLayoutChange, focused, dividerLabel, children }) {
|
|
21
|
+
const { area, compact } = useDesktop('Tiles');
|
|
22
|
+
const { rects, dividers } = measure(layout, area);
|
|
23
|
+
// At compact, the focused pane fills the area alone.
|
|
24
|
+
const shown = compact && focused ? new Map([[focused, { x: 0, y: 0, w: area.w, h: area.h }]]) : rects;
|
|
25
|
+
return (_jsx(TilesContext.Provider, { value: { rects: shown, focused, compact, alone: rects.size <= 1, layout, area }, children: _jsxs("div", { className: "newtone-desktop-tiles", children: [children, compact || !layout
|
|
26
|
+
? null
|
|
27
|
+
: dividers.map((d) => (_jsx(Divider, { divider: d, layout: layout, area: area, label: dividerLabel, onChange: onLayoutChange }, `${d.path.join('.')}:${d.after}`)))] }) }));
|
|
28
|
+
}
|
|
29
|
+
// The split a divider divides, as it stands now.
|
|
30
|
+
function splitAt(layout, path) {
|
|
31
|
+
let at = layout;
|
|
32
|
+
for (const i of path)
|
|
33
|
+
if ('children' in at)
|
|
34
|
+
at = at.children[i];
|
|
35
|
+
return 'children' in at ? at : null;
|
|
36
|
+
}
|
|
37
|
+
function Divider({ divider: d, layout, area, label, onChange }) {
|
|
38
|
+
const across = d.split === 'row';
|
|
39
|
+
const start = useRef(null);
|
|
40
|
+
// Moves the line by `delta` pixels, taking from one neighbour what it gives the other, never past their minimum.
|
|
41
|
+
const move = (sizes, room, delta) => {
|
|
42
|
+
const min = (across ? MIN.w : MIN.h) / Math.max(room, 1);
|
|
43
|
+
const share = delta / Math.max(room, 1);
|
|
44
|
+
const a = sizes[d.after];
|
|
45
|
+
const b = sizes[d.after + 1];
|
|
46
|
+
const next = Math.min(Math.max(a + share, min), a + b - min);
|
|
47
|
+
const out = [...sizes];
|
|
48
|
+
out[d.after] = next;
|
|
49
|
+
out[d.after + 1] = a + b - next;
|
|
50
|
+
onChange(resize(layout, d.path, out));
|
|
51
|
+
};
|
|
52
|
+
const split = splitAt(layout, d.path);
|
|
53
|
+
const room = () => {
|
|
54
|
+
// The split's own extent: the area's, scaled by each split it sits in along the same axis.
|
|
55
|
+
const { rects } = measure(layout, area);
|
|
56
|
+
const ids = [];
|
|
57
|
+
const collect = (l) => ('pane' in l ? ids.push(l.pane) : l.children.forEach(collect));
|
|
58
|
+
if (split)
|
|
59
|
+
collect(split);
|
|
60
|
+
const boxes = ids.map((id) => rects.get(id)).filter(Boolean);
|
|
61
|
+
const from = Math.min(...boxes.map((r) => (across ? r.x : r.y)));
|
|
62
|
+
const to = Math.max(...boxes.map((r) => (across ? r.x + r.w : r.y + r.h)));
|
|
63
|
+
return to - from;
|
|
64
|
+
};
|
|
65
|
+
return (_jsx("div", { role: "separator", "aria-label": label, "aria-orientation": across ? 'vertical' : 'horizontal', tabIndex: 0, className: "newtone-desktop-divider", "data-newtone-desktop-split": d.split, style: { transform: `translate(${d.rect.x}px, ${d.rect.y}px)`, inlineSize: d.rect.w, blockSize: d.rect.h }, onPointerDown: (e) => {
|
|
66
|
+
if (e.button !== 0 || !split)
|
|
67
|
+
return;
|
|
68
|
+
e.preventDefault();
|
|
69
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
70
|
+
start.current = { p: across ? e.clientX : e.clientY, sizes: split.sizes, room: room() };
|
|
71
|
+
}, onPointerMove: (e) => {
|
|
72
|
+
const s = start.current;
|
|
73
|
+
if (s)
|
|
74
|
+
move(s.sizes, s.room, (across ? e.clientX : e.clientY) - s.p);
|
|
75
|
+
}, onPointerUp: () => { start.current = null; }, onDoubleClick: () => onChange(evenOut(layout, d.path)), onKeyDown: (e) => {
|
|
76
|
+
if (!split)
|
|
77
|
+
return;
|
|
78
|
+
const step = e.shiftKey ? 64 : 16;
|
|
79
|
+
const keys = across ? { ArrowLeft: -step, ArrowRight: step } : { ArrowUp: -step, ArrowDown: step };
|
|
80
|
+
const delta = keys[e.key];
|
|
81
|
+
if (delta === undefined)
|
|
82
|
+
return;
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
move(split.sizes, room(), delta);
|
|
85
|
+
} }));
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* One pane of the tiles. Its bar (DECISIONS 2026-11-01-chevrons-and-close-come-back): back and forward (‹ ›), then a
|
|
89
|
+
* pill (its app's mark, where it is as a trail, its search, and its close at the end), then the way to split it. Alone and `bare`, the
|
|
90
|
+
* desk itself. It names no profile: the desktop is one profile's (DECISIONS 2026-11-01-one-profile-per-desktop).
|
|
91
|
+
* contracts/desktop.md, *Panes*.
|
|
92
|
+
*/
|
|
93
|
+
export function DesktopPane({ id, title, icon, labels, onFocus, onClose, onClear, onBack, onForward, canBack = false, canForward = false, crumbs, onCrumb, onSplit, splitKeys, bare, find, sheet, identity, children }) {
|
|
94
|
+
const tiles = useContext(TilesContext);
|
|
95
|
+
if (!tiles)
|
|
96
|
+
throw new Error('Desktop.Pane must be used inside Desktop.Tiles');
|
|
97
|
+
const at = tiles.rects.get(id);
|
|
98
|
+
const focused = tiles.focused === id;
|
|
99
|
+
const body = useRef(null);
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
const fill = body.current?.querySelector(':scope > .newtone-desktop-window-fill');
|
|
102
|
+
if (sheet)
|
|
103
|
+
fill?.setAttribute('inert', '');
|
|
104
|
+
else
|
|
105
|
+
fill?.removeAttribute('inert');
|
|
106
|
+
}, [sheet]);
|
|
107
|
+
const desk = tiles.alone && !!bare;
|
|
108
|
+
const { setClean } = useDesktop('Pane');
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
if (!desk)
|
|
111
|
+
return;
|
|
112
|
+
setClean(true);
|
|
113
|
+
return () => setClean(false);
|
|
114
|
+
}, [desk, setClean]);
|
|
115
|
+
const ways = onSplit && !tiles.compact ? splitsOf(tiles.layout, tiles.area, id) : { row: false, column: false };
|
|
116
|
+
const way = ways.row ? 'row' : ways.column ? 'column' : null;
|
|
117
|
+
return (_jsxs(Surface, { as: "section",
|
|
118
|
+
// Every pane stands at base; the clean desktop's too, the bar turned base with it (Joshua, 2026-11-01).
|
|
119
|
+
elevation: "base", className: "newtone-desktop-pane", "data-newtone-desktop-front": (focused && !tiles.alone) || undefined, "data-newtone-desktop-behind": (!focused && !tiles.alone) || undefined, "data-newtone-desktop-desk": desk || undefined, hidden: !at, "aria-label": title, style: at ? { transform: `translate(${at.x}px, ${at.y}px)`, inlineSize: at.w, blockSize: at.h } : undefined, onPointerDownCapture: focused ? undefined : onFocus, children: [desk ? null : (_jsxs("header", { className: "newtone-desktop-window-bar", children: [_jsxs("div", { className: "newtone-desktop-window-start", children: [onBack ? _jsx(DesktopControl, { icon: "chevron_left", label: labels.back ?? '', disabled: !canBack, onClick: onBack }) : null, onForward ? _jsx(DesktopControl, { icon: "chevron_right", label: labels.forward ?? '', disabled: !canForward, onClick: onForward }) : null] }), _jsxs(Surface, { elevation: "high", className: "newtone-desktop-pill", children: [icon ? _jsx(Icon, { name: icon, size: "sm", className: "newtone-desktop-window-mark", "aria-hidden": "true" }) : null, find ?? (_jsx(Text, { as: "h2", scale: "body-sm", weight: "medium", lines: 1, className: "newtone-desktop-window-title", children: title })), crumbs && crumbs.length ? (_jsx("div", { className: "newtone-desktop-pill-crumbs", children: _jsx(Crumbs, { label: labels.crumbs ?? title, children: crumbs.map((c, i) => i === crumbs.length - 1 ? (_jsx(Crumbs.Item, { current: true, children: c.label }, c.id)) : (_jsx(Crumbs.Item, { onGo: () => onCrumb?.(c.id), children: c.label }, c.id))) }) })) : null, onClear ? _jsx(DesktopControl, { icon: "remove", label: labels.clear ?? '', className: "newtone-desktop-pill-close", onClick: onClear }) : null] }), _jsxs("div", { className: "newtone-desktop-window-end", children: [way ? (_jsx(DesktopControl, { icon: way === 'row' ? 'splitscreen_right' : 'splitscreen_bottom', label: way === 'row' ? labels.split : labels.splitDown, keys: splitKeys?.[way], onClick: () => onSplit?.(way) })) : null, _jsx(DesktopControl, { icon: "close", label: labels.close, className: "newtone-desktop-control-close", onClick: onClose })] })] })), _jsxs("div", { ref: body, className: "newtone-desktop-window-body", children: [sheet ? _jsx("div", { className: "newtone-desktop-veil", children: sheet }) : null, _jsx(Identity, { ...identity, className: "newtone-desktop-window-fill", "data-newtone-breakpoints": "container", children: children })] })] }));
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=tiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiles.js","sourceRoot":"","sources":["../../../src/desktop/tiles/tiles.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAA8C,MAAM,OAAO,CAAA;AAChH,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAsB,MAAM,4BAA4B,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAoD,MAAM,aAAa,CAAA;AAE9H,gJAAgJ;AAChJ,MAAM,GAAG,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,CAAA;AAErC,MAAM,YAAY,GAAG,aAAa,CAA+J,IAAI,CAAC,CAAA;AAetM;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAqB;IACvG,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAC7C,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACjD,qDAAqD;IACrD,MAAM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oBAAoB,EAChE,KAAK,EAAE,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EACtD,IAAI,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,GAC/B,CACL,CAAC,CAAC,CAAC,IAAI,EAER,KAAC,cAAc,IAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,EAAC,+BAA+B,EAAC,OAAO,EAAE,OAAO,GAAI,IAC1G,IACD,CACZ,EACD,eAAK,GAAG,EAAE,IAAI,EAAE,SAAS,EAAC,6BAA6B,aAClD,KAAK,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,sBAAsB,YAAE,KAAK,GAAO,CAAC,CAAC,CAAC,IAAI,EAGnE,KAAC,QAAQ,OAAK,QAAQ,EAAE,SAAS,EAAC,6BAA6B,8BAA0B,WAAW,YAC/F,QAAQ,GACF,IACT,IACA,CACb,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { IconArt } from '../../framed-icon/art.js';
|
|
3
|
+
import { type SignagePalette } from '../../framed-icon/framed-icon.js';
|
|
4
|
+
/** One row a widget lists: what it is, where it is, something new in it. */
|
|
5
|
+
export interface DesktopWidgetRow {
|
|
6
|
+
/** Told back by `onPick`. */
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
meta?: string;
|
|
10
|
+
/** An `Icon` name, bare. */
|
|
11
|
+
icon?: string;
|
|
12
|
+
dot?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface DesktopWidgetProps {
|
|
15
|
+
/** Its heading: what it shows ("Waiting for you"). */
|
|
16
|
+
title: string;
|
|
17
|
+
/** Its app's name, under the heading's mark for assistive technology and in its title. */
|
|
18
|
+
app: string;
|
|
19
|
+
/** Its app's mark, as the app's shortcut draws it. */
|
|
20
|
+
icon: string;
|
|
21
|
+
art?: IconArt;
|
|
22
|
+
axes?: Record<string, number>;
|
|
23
|
+
signage?: SignagePalette;
|
|
24
|
+
/**
|
|
25
|
+
* How much room it takes, as every host's widgets do (a watch shows `small` only; a phone's home and the clean
|
|
26
|
+
* desktop all three): `small` one cell, `medium` two across, `large` two across and two down.
|
|
27
|
+
*/
|
|
28
|
+
size?: 'small' | 'medium' | 'large';
|
|
29
|
+
/** Rows to list, each pressed to open it (`onPick`). */
|
|
30
|
+
rows?: DesktopWidgetRow[];
|
|
31
|
+
onPick?: (id: string) => void;
|
|
32
|
+
/** Said when there are no rows. */
|
|
33
|
+
empty?: string;
|
|
34
|
+
/** Anything else the app draws in it, under its rows. Newtone components only. */
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* An app's widget: a glance at one of its things, where the person arrives, without opening it. The same pattern on
|
|
39
|
+
* every host, at every size: a heading with its app's mark, then rows or the app's own glance. Laid out by
|
|
40
|
+
* `Desktop.Widgets`. DECISIONS 2026-11-01-a-new-tab-greets; contracts/desktop.md, *Widgets*.
|
|
41
|
+
*/
|
|
42
|
+
export declare function DesktopWidget({ title, app, icon, art, axes, signage, size, rows, onPick, empty, children }: DesktopWidgetProps): import("react").JSX.Element;
|
|
43
|
+
export interface DesktopWidgetsProps {
|
|
44
|
+
/** The area's accessible name ("Widgets"). */
|
|
45
|
+
label: string;
|
|
46
|
+
/** `Desktop.Widget`s, in the consumer's order. */
|
|
47
|
+
children?: ReactNode;
|
|
48
|
+
}
|
|
49
|
+
/** Where widgets stand: a grid of cells, two across at most on the clean desktop, one on a narrow screen. */
|
|
50
|
+
export declare function DesktopWidgets({ label, children }: DesktopWidgetsProps): import("react").JSX.Element;
|
|
51
|
+
//# sourceMappingURL=widget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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E,KAAK,EAAE,QAAQ,EAAE,EAAE,kBAAkB,+BAkCzI;AAED,MAAM,WAAW,mBAAmB;IAChC,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,QAAQ,CAAC,EAAE,SAAS,CAAA;CACvB;AAED,6GAA6G;AAC7G,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BAMtE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { FramedIcon } from '../../framed-icon/framed-icon.js';
|
|
4
|
+
import { Icon } from '../../icon/icon.js';
|
|
5
|
+
import { Text } from '../../text/text.js';
|
|
6
|
+
/**
|
|
7
|
+
* An app's widget: a glance at one of its things, where the person arrives, without opening it. The same pattern on
|
|
8
|
+
* every host, at every size: a heading with its app's mark, then rows or the app's own glance. Laid out by
|
|
9
|
+
* `Desktop.Widgets`. DECISIONS 2026-11-01-a-new-tab-greets; contracts/desktop.md, *Widgets*.
|
|
10
|
+
*/
|
|
11
|
+
export function DesktopWidget({ title, app, icon, art, axes, signage, size = 'medium', rows, onPick, empty, children }) {
|
|
12
|
+
return (_jsxs("section", { className: "newtone-desktop-widget", "data-size": size, "aria-label": `${app}: ${title}`, children: [_jsxs("header", { className: "newtone-desktop-widget-head", children: [_jsx("span", { className: "newtone-desktop-widget-mark", title: app, children: _jsx(FramedIcon, { icon: icon, art: art, axes: axes, shape: "square", signage: signage }) }), _jsx(Text, { as: "h3", scale: "caption", weight: "medium", tone: "secondary", lines: 1, children: title })] }), rows ? (rows.length ? (_jsx("ul", { className: "newtone-desktop-widget-rows", children: rows.map((r) => (_jsx("li", { children: _jsxs("button", { type: "button", className: "newtone-desktop-widget-row", onClick: () => onPick?.(r.id), children: [r.icon ? _jsx(Icon, { name: r.icon, size: "sm", tone: "secondary" }) : null, _jsxs("span", { className: "newtone-desktop-launcher-row-words", children: [_jsx(Text, { as: "span", scale: "body-sm", className: "newtone-desktop-launcher-row-title", children: r.title }), r.meta ? (_jsx(Text, { as: "span", scale: "caption", tone: "secondary", className: "newtone-desktop-launcher-row-title", children: r.meta })) : null] }), r.dot ? _jsx("span", { className: "newtone-desktop-launcher-dot", "aria-hidden": "true" }) : null] }) }, r.id))) })) : empty ? (_jsx(Text, { as: "p", scale: "body-sm", tone: "secondary", className: "newtone-desktop-widget-empty", children: empty })) : null) : null, children] }));
|
|
13
|
+
}
|
|
14
|
+
/** Where widgets stand: a grid of cells, two across at most on the clean desktop, one on a narrow screen. */
|
|
15
|
+
export function DesktopWidgets({ label, children }) {
|
|
16
|
+
return (_jsx("div", { role: "region", "aria-label": label, className: "newtone-desktop-widgets", children: children }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=widget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget.js","sourceRoot":"","sources":["../../../src/desktop/widget/widget.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAIZ,OAAO,EAAE,UAAU,EAAuB,MAAM,kCAAkC,CAAA;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAqCzC;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAsB;IACtI,OAAO,CACH,mBAAS,SAAS,EAAC,wBAAwB,eAAY,IAAI,gBAAc,GAAG,GAAG,KAAK,KAAK,EAAE,aACvF,kBAAQ,SAAS,EAAC,6BAA6B,aAC3C,eAAM,SAAS,EAAC,6BAA6B,EAAC,KAAK,EAAE,GAAG,YACpD,KAAC,UAAU,IAAC,I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G,CAAC,CAAC,CAAC,IAAI,IAC/E,IAVJ,CAAC,CAAC,EAAE,CAWR,CACR,CAAC,GACD,CACR,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CACR,KAAC,IAAI,IAAC,EAAE,EAAC,GAAG,EAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,WAAW,EAAC,SAAS,EAAC,8BAA8B,YAAE,KAAK,GAAQ,CACxG,CAAC,CAAC,CAAC,IAAI,CACX,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,IACH,CACb,CAAA;AACL,CAAC;AASD,6GAA6G;AAC7G,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAuB;IACnE,OAAO,CACH,cAAK,IAAI,EAAC,QAAQ,gBAAa,KAAK,EAAE,SAAS,EAAC,yBAAyB,YACpE,QAAQ,GACP,CACT,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* FieldRow -- blueprint components/field-row.md. Boxes on one line: the row aligns its fields at their ends, where
|
|
2
|
+
* every field's box is, so a label with a hint and one without still put their boxes level. */
|
|
3
|
+
.newtone-field-row {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: flex-end;
|
|
6
|
+
gap: var(--newtone-space-3);
|
|
7
|
+
container-type: inline-size;
|
|
8
|
+
}
|
|
9
|
+
.newtone-field-row > .newtone-text-field,
|
|
10
|
+
.newtone-field-row > .newtone-picker:not(.newtone-picker--inline) {
|
|
11
|
+
flex: 1 1 0;
|
|
12
|
+
min-inline-size: 0;
|
|
13
|
+
}
|
|
14
|
+
.newtone-field-row > .newtone-picker--inline {
|
|
15
|
+
flex: none;
|
|
16
|
+
}
|
|
17
|
+
/* A dialing code is as wide as its code. */
|
|
18
|
+
.newtone-field-row > .newtone-field-row-narrow,
|
|
19
|
+
.newtone-field-row > .newtone-picker.newtone-field-row-narrow:not(.newtone-picker--inline) {
|
|
20
|
+
flex: 0 0 8rem;
|
|
21
|
+
}
|
|
22
|
+
@container (max-width: 32rem) {
|
|
23
|
+
.newtone-field-row {
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
}
|
|
26
|
+
.newtone-field-row > .newtone-text-field,
|
|
27
|
+
.newtone-field-row > .newtone-picker:not(.newtone-picker--inline) {
|
|
28
|
+
flex-basis: 100%;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface FieldRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** The fields, side by side: `TextField`s and `Picker`s. */
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Fields side by side, their boxes on one line whatever their labels and hints above: a phone's dialing code and
|
|
8
|
+
* number, a place's country and city, a field and who sees it. Each field shares the width; an `inline` picker (who
|
|
9
|
+
* sees it) keeps its own, at the end. It narrows to one column under 32rem. components/field-row.md.
|
|
10
|
+
*/
|
|
11
|
+
export declare function FieldRow({ children, className, ...rest }: FieldRowProps): import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=field-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-row.d.ts","sourceRoot":"","sources":["../../src/field-row/field-row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtD,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,4DAA4D;IAC5D,QAAQ,EAAE,SAAS,CAAA;CACtB;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa,+BAMvE"}
|