@unisim/sdk 0.186.0 → 0.187.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 +36 -93
- package/dist/SignInDialog.d.ts.map +1 -1
- package/dist/SignInDialog.js +37 -12
- package/dist/SignInDialog.js.map +1 -1
- package/dist/SuiteSwitcher.d.ts +3 -2
- package/dist/SuiteSwitcher.d.ts.map +1 -1
- package/dist/SuiteSwitcher.js +5 -1
- package/dist/SuiteSwitcher.js.map +1 -1
- package/dist/UniversalNavBar.d.ts +2 -2
- package/dist/UniversalNavBar.d.ts.map +1 -1
- package/dist/UniversalNavBar.js +8 -16
- package/dist/UniversalNavBar.js.map +1 -1
- package/dist/UserCountBreakdown.d.ts +9 -18
- package/dist/UserCountBreakdown.d.ts.map +1 -1
- package/dist/UserCountBreakdown.js +9 -403
- package/dist/UserCountBreakdown.js.map +1 -1
- package/dist/UserCountLine.d.ts +9 -49
- package/dist/UserCountLine.d.ts.map +1 -1
- package/dist/UserCountLine.js +8 -218
- package/dist/UserCountLine.js.map +1 -1
- package/dist/UserProfile.d.ts +4 -4
- package/dist/UserProfile.d.ts.map +1 -1
- package/dist/UserProfile.js +2 -3
- package/dist/UserProfile.js.map +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +0 -223
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/presence.d.ts +63 -152
- package/dist/presence.d.ts.map +1 -1
- package/dist/presence.js +141 -499
- package/dist/presence.js.map +1 -1
- package/dist/provider.d.ts +20 -10
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +39 -20
- package/dist/provider.js.map +1 -1
- package/dist/recentApp.d.ts +8 -0
- package/dist/recentApp.d.ts.map +1 -0
- package/dist/recentApp.js +42 -0
- package/dist/recentApp.js.map +1 -0
- package/package.json +3 -2
|
@@ -1,408 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { NAV_OVERLAY_Z_INDEX } from './DropdownSurface.js';
|
|
6
|
-
import { t } from './i18n.js';
|
|
7
|
-
import { MENU } from './menuTheme.js';
|
|
8
|
-
import { productDisplayName } from './productNames.js';
|
|
9
|
-
import { useLanguage, useUniversal } from './provider.js';
|
|
10
|
-
import { PRESENCE_BEAT_MS, cachedUniversalIdCounts, cachedUserCountsByProduct, fetchUniversalIdCounts, fetchUserCountsByProduct, formatUserCounts, userCountFigures, } from './presence.js';
|
|
11
|
-
// ──────────────────────────────────────────────────────────────────────────────
|
|
12
|
-
// <UserCountBreakdown /> — "…and which apps are those people in?"
|
|
13
|
-
//
|
|
14
|
-
// James, 2026-09-19: "on the user count, can you add it so if you long press on
|
|
15
|
-
// the X people use UNI·SIM then you see a pop up with the breakdown of users per
|
|
16
|
-
// app". So the count line now has three depths rather than two: the suite figure
|
|
17
|
-
// it opens on, this app's figure on a tap (2026-09-17), and this list on a press
|
|
18
|
-
// and hold.
|
|
19
|
-
//
|
|
20
|
-
// James, 2026-09-21 added two more things to it: the web / native split on
|
|
21
|
-
// every figure ("perhaps on the long press of unisim users it can show
|
|
22
|
-
// web | native | live if there's enough space"), and the collapsed "How we
|
|
23
|
-
// count a user" fold at the bottom.
|
|
24
|
-
//
|
|
25
|
-
// James, 2026-09-27: "Add a line at top of apps list for 'Universal IDs' to
|
|
26
|
-
// show how many have been created - just X created, X live". It is the first
|
|
27
|
-
// row of the list, styled like an app row, and left out when the database has
|
|
28
|
-
// no migration 0188. Guests are not IDs; see the migration.
|
|
29
|
-
//
|
|
30
|
-
// Five things worth knowing before changing it:
|
|
31
|
-
//
|
|
32
|
-
// 1. **The rows do not add up to the suite total, and the note says so.** An
|
|
33
|
-
// account that uses four apps is four rows here and one person in the suite
|
|
34
|
-
// figure — that is the whole point of the suite figure. A reader who adds the
|
|
35
|
-
// column up and gets a bigger number has found the documented behaviour, not
|
|
36
|
-
// a bug, so the sentence stating it is part of the popup rather than a
|
|
37
|
-
// footnote somebody might cut.
|
|
38
|
-
//
|
|
39
|
-
// 2. **An app this build has never heard of still gets a row.** The names come
|
|
40
|
-
// from the switcher catalogue (productNames.ts), the rows come from the
|
|
41
|
-
// database enum, and the two have gone out of step twice already (0176 added
|
|
42
|
-
// `family`, 0179 the two Bipolar apps). An unknown code renders prettified —
|
|
43
|
-
// never dropped, because a live app missing from a list of live apps is worse
|
|
44
|
-
// than one with a plain-looking name.
|
|
45
|
-
//
|
|
46
|
-
// 3. **It is portaled to <body> and guards the menu it was opened from.** Same
|
|
47
|
-
// problem AccountLimits' flyout has and the same fix: the parent menu's
|
|
48
|
-
// outside-click test asks whether the event happened inside its panel, and a
|
|
49
|
-
// portal is not, so without the capture-phase guard below the first click in
|
|
50
|
-
// here would close the menu and take this popup down with it.
|
|
51
|
-
//
|
|
52
|
-
// 4. **"If there's enough space" is CSS, not a measurement.** The figures are
|
|
53
|
-
// four separate phrases in a wrapping flex row, so "1,234 users · 900 web ·
|
|
54
|
-
// 334 native · 5 live" sits beside the app name where it fits and drops to
|
|
55
|
-
// its own line where it does not — at any width, in any language, with no
|
|
56
|
-
// ResizeObserver and nothing to get wrong at 320px. Never join them into one
|
|
57
|
-
// string: a string can only wrap where its language puts spaces, and German
|
|
58
|
-
// ("gerade aktiv") and Turkish do not put them where English does.
|
|
59
|
-
//
|
|
60
|
-
// 5. **A row can have no split, and that is not an empty one.** `web`/`native`
|
|
61
|
-
// come back null for an app whose total is its own account counter
|
|
62
|
-
// (migration 0185 — the Bipolar apps, counted in Firestore). The split is
|
|
63
|
-
// left OUT of such a row rather than drawn as "0 web · 0 native", which
|
|
64
|
-
// would be a claim, and a false one. `userCountParts` does that filtering;
|
|
65
|
-
// this file just renders what it gets. [Since 0198 (2026-09-29) the Bipolar
|
|
66
|
-
// rows DO get a split: native from presence, the rest counted as web.]
|
|
67
|
-
//
|
|
68
|
-
// 6. **The figures are emoji, not words** (James, 2026-09-29: "57 🧑🤝🧑 | 51 🕸️
|
|
69
|
-
// | 6 ☎️ | 1 🟢"). Each one keeps its worded phrase as an aria-label, and the
|
|
70
|
-
// 🟢 replaced the separate green live dot. [Later the same day: "replace red
|
|
71
|
-
// telephone counter with 📱", so native is 📱 since 0.168.0.]
|
|
72
|
-
//
|
|
73
|
-
// ⚠️ Inline styles, not Tailwind — this ships inside node_modules and the apps'
|
|
74
|
-
// Tailwind builds do not scan it. Same as AboutAppDialog and PrivacyNote.
|
|
75
|
-
// ──────────────────────────────────────────────────────────────────────────────
|
|
76
|
-
/**
|
|
77
|
-
* `{ product, total, live }` per app, refreshed on the presence beat while
|
|
78
|
-
* `active`. Starts from the last breakdown this origin read so the popup has
|
|
79
|
-
* something in it the moment it opens.
|
|
80
|
-
*
|
|
81
|
-
* `null` while there is nothing to show — which covers both "the read has not
|
|
82
|
-
* landed yet" and "this database has not got migration 0184". The popup tells
|
|
83
|
-
* those two apart with its own `loading` flag; a caller that just wants the
|
|
84
|
-
* numbers does not need to.
|
|
85
|
-
*/
|
|
86
|
-
export function useUserCountsByProduct(active = true) {
|
|
87
|
-
const { supabase } = useUniversal();
|
|
88
|
-
const [rows, setRows] = useState(() => cachedUserCountsByProduct());
|
|
89
|
-
useEffect(() => {
|
|
90
|
-
if (!active)
|
|
91
|
-
return;
|
|
92
|
-
let cancelled = false;
|
|
93
|
-
const load = () => {
|
|
94
|
-
if (typeof document !== 'undefined' && document.visibilityState === 'hidden')
|
|
95
|
-
return;
|
|
96
|
-
void fetchUserCountsByProduct(supabase).then((r) => {
|
|
97
|
-
if (!cancelled && r)
|
|
98
|
-
setRows(r);
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
load();
|
|
102
|
-
const timer = setInterval(load, PRESENCE_BEAT_MS);
|
|
103
|
-
return () => { cancelled = true; clearInterval(timer); };
|
|
104
|
-
}, [active, supabase]);
|
|
105
|
-
return rows;
|
|
2
|
+
/** @deprecated Retired in 0.187.0: always null. */
|
|
3
|
+
export function useUserCountsByProduct(_active = true) {
|
|
4
|
+
return null;
|
|
106
5
|
}
|
|
107
|
-
/**
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const { supabase } = useUniversal();
|
|
111
|
-
const [counts, setCounts] = useState(() => cachedUniversalIdCounts());
|
|
112
|
-
useEffect(() => {
|
|
113
|
-
if (!active)
|
|
114
|
-
return;
|
|
115
|
-
let cancelled = false;
|
|
116
|
-
const load = () => {
|
|
117
|
-
if (typeof document !== 'undefined' && document.visibilityState === 'hidden')
|
|
118
|
-
return;
|
|
119
|
-
void fetchUniversalIdCounts(supabase).then((r) => {
|
|
120
|
-
if (!cancelled && r)
|
|
121
|
-
setCounts(r);
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
load();
|
|
125
|
-
const timer = setInterval(load, PRESENCE_BEAT_MS);
|
|
126
|
-
return () => { cancelled = true; clearInterval(timer); };
|
|
127
|
-
}, [active, supabase]);
|
|
128
|
-
return counts;
|
|
6
|
+
/** @deprecated Retired in 0.187.0: always null. */
|
|
7
|
+
export function useUniversalIdCounts(_active = true) {
|
|
8
|
+
return null;
|
|
129
9
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const rows = useUserCountsByProduct(open);
|
|
134
|
-
const ids = useUniversalIdCounts(open);
|
|
135
|
-
const cardRef = useRef(null);
|
|
136
|
-
// Only ever true on a FIRST open on this origin — every later open paints the
|
|
137
|
-
// cached rows immediately and swaps them when the fresh read lands.
|
|
138
|
-
const [settled, setSettled] = useState(false);
|
|
139
|
-
useEffect(() => {
|
|
140
|
-
if (!open) {
|
|
141
|
-
setSettled(false);
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
// Long enough for the read to answer, short enough that a database without
|
|
145
|
-
// 0184 says "not available" rather than spinning for ever.
|
|
146
|
-
const timer = setTimeout(() => setSettled(true), 4000);
|
|
147
|
-
return () => clearTimeout(timer);
|
|
148
|
-
}, [open]);
|
|
149
|
-
// Two CAPTURE-phase listeners on document, copied from AccountLimits' flyout
|
|
150
|
-
// for the same reason (note 3).
|
|
151
|
-
//
|
|
152
|
-
// ⚠️ They have to be real listeners, not React's `onMouseDownCapture`: React
|
|
153
|
-
// attaches one listener at its root container, so a document-level capture
|
|
154
|
-
// handler — which is where DropdownSurface and UserProfile put theirs — has
|
|
155
|
-
// already run by the time any React handler sees the event.
|
|
156
|
-
useEffect(() => {
|
|
157
|
-
if (!open)
|
|
158
|
-
return;
|
|
159
|
-
// A press inside this card is not a click "outside" the menu that opened it.
|
|
160
|
-
function onDown(e) {
|
|
161
|
-
if (cardRef.current?.contains(e.target))
|
|
162
|
-
e.stopPropagation();
|
|
163
|
-
}
|
|
164
|
-
// Escape backs out one level: the first press closes this popup, a second
|
|
165
|
-
// closes the menu underneath.
|
|
166
|
-
function onKey(e) {
|
|
167
|
-
if (e.key !== 'Escape')
|
|
168
|
-
return;
|
|
169
|
-
e.stopPropagation();
|
|
170
|
-
onClose();
|
|
171
|
-
}
|
|
172
|
-
document.addEventListener('mousedown', onDown, true);
|
|
173
|
-
document.addEventListener('keydown', onKey, true);
|
|
174
|
-
return () => {
|
|
175
|
-
document.removeEventListener('mousedown', onDown, true);
|
|
176
|
-
document.removeEventListener('keydown', onKey, true);
|
|
177
|
-
};
|
|
178
|
-
}, [open, onClose]);
|
|
179
|
-
if (!open || typeof document === 'undefined')
|
|
180
|
-
return null;
|
|
181
|
-
const loading = !rows && !settled;
|
|
182
|
-
return createPortal(_jsx("div", { style: overlayStyle, role: "presentation",
|
|
183
|
-
// ⚠️ pointerDOWN, not click: with a mouse, the press that opened this
|
|
184
|
-
// popup is still down when it appears, so the mouseup lands on the
|
|
185
|
-
// backdrop. An onClick here would close the popup in the same gesture
|
|
186
|
-
// that opened it. A fresh press on the backdrop sends its own
|
|
187
|
-
// pointerdown, which is the dismissal we actually want.
|
|
188
|
-
onPointerDown: onClose, children: _jsxs("div", { role: "dialog", "aria-modal": "true", "aria-label": t(language, 'users.breakdown_title'), ref: cardRef, style: cardStyle(p), onPointerDown: (e) => e.stopPropagation(), children: [_jsxs("div", { style: headerRowStyle, children: [_jsx("h2", { style: titleStyle(p), children: t(language, 'users.breakdown_title') }), _jsx("button", { type: "button", onClick: onClose, "aria-label": t(language, 'nav.menu_close'), style: closeButtonStyle(p), children: _jsx(IconClose, {}) })] }), suite && (_jsxs(_Fragment, { children: [_jsx("p", { style: suiteLineStyle(p), children: formatUserCounts(language, suite, 'suite') }), _jsx(SuiteSplit, { counts: suite, language: language, palette: p })] })), loading && _jsx("p", { style: quietStyle(p), children: t(language, 'users.breakdown_loading') }), !loading && !rows && _jsx("p", { style: quietStyle(p), children: t(language, 'users.breakdown_empty') }), (rows || ids) && (_jsxs("ul", { style: listStyle, children: [ids && (_jsxs("li", { style: rowStyle(p), children: [_jsx("span", { style: idsNameStyle(p), children: "Universal IDs" }), _jsx("span", { style: figureStyle(p), children: _jsx(Phrases, { parts: userCountFigures(language, ids), palette: p }) })] })), rows?.map((row) => (_jsxs("li", { style: rowStyle(p), children: [_jsx("span", { style: nameStyle(p), children: productDisplayName(row.product) }), _jsx("span", { style: figureStyle(p), children: _jsx(Figures, { counts: row, language: language, palette: p }) })] }, row.product)))] })), rows && _jsx("p", { style: noteStyle(p), children: t(language, 'users.breakdown_note') }), _jsx(HowWeCount, { language: language, palette: p })] }) }), document.body);
|
|
10
|
+
/** @deprecated Retired in 0.187.0: renders nothing. */
|
|
11
|
+
export function UserCountBreakdown(_props) {
|
|
12
|
+
return null;
|
|
189
13
|
}
|
|
190
|
-
/**
|
|
191
|
-
* "1,234 users · 900 web · 334 native · 5 live" — as four spans that can wrap
|
|
192
|
-
* between one another, never mid-phrase, with the separators marked
|
|
193
|
-
* `aria-hidden` so a screen reader reads four facts rather than a row of dots.
|
|
194
|
-
*
|
|
195
|
-
* ⚠️ The whole point is that this is NOT one string. See note 4 in the header.
|
|
196
|
-
*/
|
|
197
|
-
function Figures({ counts, language, palette }) {
|
|
198
|
-
return _jsx(Phrases, { parts: userCountFigures(language, counts), palette: palette });
|
|
199
|
-
}
|
|
200
|
-
function Phrases({ parts, palette }) {
|
|
201
|
-
return (_jsx(_Fragment, { children: parts.map((part, i) => (_jsxs("span", { style: figurePartStyle, children: [i > 0 && _jsx("span", { "aria-hidden": true, style: separatorStyle(palette), children: "|" }), _jsx("span", { role: "img", "aria-label": part.label, children: part.text })] }, i))) }));
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* The suite figure's own split, on the line under it. Drawn only when there is
|
|
205
|
-
* one: a database without migration 0187 answers null, and "0 web · 0 native"
|
|
206
|
-
* beneath a four-figure total would read as a broken count rather than a
|
|
207
|
-
* missing one.
|
|
208
|
-
*/
|
|
209
|
-
function SuiteSplit({ counts, language, palette }) {
|
|
210
|
-
if (typeof counts.web !== 'number' || typeof counts.native !== 'number')
|
|
211
|
-
return null;
|
|
212
|
-
return (_jsx("p", { style: suiteSplitStyle(palette), children: _jsx(Phrases, { parts: userCountFigures(language, counts).slice(1, -1), palette: palette }) }));
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* "How we count a user", collapsed (James, 2026-09-21). Every figure in this
|
|
216
|
-
* popup is a judgement call about who a person is, and the popup is the only
|
|
217
|
-
* place anybody meets those calls — so the answer belongs in it rather than in
|
|
218
|
-
* a migration header nobody outside this repo can read.
|
|
219
|
-
*
|
|
220
|
-
* ⚠️ A real `<details>`, not a state-driven fold: it is the suite's house
|
|
221
|
-
* pattern, it opens with no JavaScript, and `installRevealOnExpand` (on by
|
|
222
|
-
* default in every app) already scrolls an opened fold into view — here that
|
|
223
|
-
* means the card scrolls, because the card is the nearest thing with
|
|
224
|
-
* `overflow-y: auto` and `scrollChain` finds the innermost scroller first.
|
|
225
|
-
*/
|
|
226
|
-
function HowWeCount({ language, palette }) {
|
|
227
|
-
const lines = ['users.how_ids', 'users.how_person', 'users.how_web', 'users.how_native', 'users.how_live', 'users.how_split'];
|
|
228
|
-
return (_jsxs("details", { style: detailsStyle(palette), children: [_jsx("summary", { style: summaryStyle(palette), children: t(language, 'users.how_title') }), _jsx("ul", { style: howListStyle, children: lines.map((key) => (_jsx("li", { style: howItemStyle(palette), children: t(language, key) }, key))) })] }));
|
|
229
|
-
}
|
|
230
|
-
function IconClose() {
|
|
231
|
-
return (_jsx("svg", { viewBox: "0 0 24 24", width: "15", height: "15", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", "aria-hidden": "true", children: _jsx("path", { d: "M6 6 18 18M18 6 6 18" }) }));
|
|
232
|
-
}
|
|
233
|
-
// ── Styles — the menu palette, so the popup matches the dropdown it came from.
|
|
234
|
-
const overlayStyle = {
|
|
235
|
-
position: 'fixed',
|
|
236
|
-
inset: 0,
|
|
237
|
-
background: 'rgba(15, 23, 42, 0.45)',
|
|
238
|
-
display: 'flex',
|
|
239
|
-
alignItems: 'center',
|
|
240
|
-
justifyContent: 'center',
|
|
241
|
-
padding: 16,
|
|
242
|
-
// Above the menu it was opened from, which already sits above everything the
|
|
243
|
-
// host app draws.
|
|
244
|
-
zIndex: NAV_OVERLAY_Z_INDEX + 100,
|
|
245
|
-
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif",
|
|
246
|
-
};
|
|
247
|
-
const cardStyle = (p) => ({
|
|
248
|
-
position: 'relative',
|
|
249
|
-
width: '100%',
|
|
250
|
-
maxWidth: 380,
|
|
251
|
-
// Thirty apps on a short phone outruns the viewport, and a list that cannot
|
|
252
|
-
// be scrolled is a list whose bottom half does not exist. ⚠️ But not the
|
|
253
|
-
// viewport less 32px either (James, 2026-09-27: "Have a smaller max height on
|
|
254
|
-
// the # users popup so it has more padding top / bottom"): full height, it
|
|
255
|
-
// ran under the notch and the home bar and read as a page, not a popup. So
|
|
256
|
-
// 80px clear above and below, beyond the safe areas, and no taller than 560.
|
|
257
|
-
maxHeight: 'min(560px, calc(100dvh - 160px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)))',
|
|
258
|
-
overflowY: 'auto',
|
|
259
|
-
background: p.surface,
|
|
260
|
-
color: p.text,
|
|
261
|
-
borderRadius: 16,
|
|
262
|
-
border: `1px solid ${p.border}`,
|
|
263
|
-
boxShadow: p.shadow,
|
|
264
|
-
padding: '16px 18px 18px',
|
|
265
|
-
boxSizing: 'border-box',
|
|
266
|
-
});
|
|
267
|
-
const headerRowStyle = {
|
|
268
|
-
display: 'flex',
|
|
269
|
-
alignItems: 'center',
|
|
270
|
-
justifyContent: 'space-between',
|
|
271
|
-
gap: 12,
|
|
272
|
-
};
|
|
273
|
-
const titleStyle = (p) => ({
|
|
274
|
-
margin: 0,
|
|
275
|
-
fontSize: 15,
|
|
276
|
-
fontWeight: 700,
|
|
277
|
-
letterSpacing: '-0.01em',
|
|
278
|
-
color: p.text,
|
|
279
|
-
});
|
|
280
|
-
const closeButtonStyle = (p) => ({
|
|
281
|
-
display: 'inline-flex',
|
|
282
|
-
alignItems: 'center',
|
|
283
|
-
justifyContent: 'center',
|
|
284
|
-
width: 28,
|
|
285
|
-
height: 28,
|
|
286
|
-
flexShrink: 0,
|
|
287
|
-
borderRadius: 8,
|
|
288
|
-
border: 0,
|
|
289
|
-
background: 'transparent',
|
|
290
|
-
color: p.muted,
|
|
291
|
-
cursor: 'pointer',
|
|
292
|
-
});
|
|
293
|
-
const suiteLineStyle = (p) => ({
|
|
294
|
-
margin: '6px 0 0',
|
|
295
|
-
fontSize: 11,
|
|
296
|
-
lineHeight: 1.4,
|
|
297
|
-
color: p.muted,
|
|
298
|
-
});
|
|
299
|
-
const suiteSplitStyle = (p) => ({
|
|
300
|
-
margin: '2px 0 0',
|
|
301
|
-
display: 'flex',
|
|
302
|
-
flexWrap: 'wrap',
|
|
303
|
-
gap: '0 5px',
|
|
304
|
-
fontSize: 11,
|
|
305
|
-
lineHeight: 1.4,
|
|
306
|
-
color: p.faint,
|
|
307
|
-
});
|
|
308
|
-
const quietStyle = (p) => ({
|
|
309
|
-
margin: '14px 0 0',
|
|
310
|
-
fontSize: 12,
|
|
311
|
-
color: p.muted,
|
|
312
|
-
});
|
|
313
|
-
const listStyle = {
|
|
314
|
-
listStyle: 'none',
|
|
315
|
-
margin: '12px 0 0',
|
|
316
|
-
padding: 0,
|
|
317
|
-
display: 'grid',
|
|
318
|
-
gap: 2,
|
|
319
|
-
};
|
|
320
|
-
const rowStyle = (p) => ({
|
|
321
|
-
display: 'flex',
|
|
322
|
-
alignItems: 'baseline',
|
|
323
|
-
justifyContent: 'space-between',
|
|
324
|
-
// ⚠️ The row WRAPS now that a figure can be four phrases long (0.158.0).
|
|
325
|
-
// `gap: '2px 12px'` keeps the old 12px between the name and the figures and
|
|
326
|
-
// adds a hair of leading when they end up stacked — which is what "if
|
|
327
|
-
// there's enough space" amounts to: a row too narrow for both puts the
|
|
328
|
-
// figures under the app name instead of squeezing or clipping them.
|
|
329
|
-
flexWrap: 'wrap',
|
|
330
|
-
gap: '2px 12px',
|
|
331
|
-
padding: '5px 0',
|
|
332
|
-
borderBottom: `1px solid ${p.divider}`,
|
|
333
|
-
});
|
|
334
|
-
const nameStyle = (p) => ({
|
|
335
|
-
fontSize: 13,
|
|
336
|
-
color: p.body,
|
|
337
|
-
minWidth: 0,
|
|
338
|
-
});
|
|
339
|
-
// "Universal IDs" is a product name, never translated, and heads the list, so
|
|
340
|
-
// it is set a little heavier than the app names under it.
|
|
341
|
-
const idsNameStyle = (p) => ({
|
|
342
|
-
...nameStyle(p),
|
|
343
|
-
fontWeight: 600,
|
|
344
|
-
color: p.text,
|
|
345
|
-
});
|
|
346
|
-
const figureStyle = (p) => ({
|
|
347
|
-
display: 'inline-flex',
|
|
348
|
-
alignItems: 'baseline',
|
|
349
|
-
// The phrases wrap between themselves; each one is nowrap on its own, so a
|
|
350
|
-
// grouped figure is never broken away from the word it belongs to.
|
|
351
|
-
flexWrap: 'wrap',
|
|
352
|
-
justifyContent: 'flex-end',
|
|
353
|
-
gap: '0 5px',
|
|
354
|
-
fontSize: 12,
|
|
355
|
-
color: p.muted,
|
|
356
|
-
});
|
|
357
|
-
const figurePartStyle = {
|
|
358
|
-
whiteSpace: 'nowrap',
|
|
359
|
-
};
|
|
360
|
-
const separatorStyle = (p) => ({
|
|
361
|
-
// The dot belongs to the phrase after it, so a wrap never leaves one
|
|
362
|
-
// stranded at the end of a line.
|
|
363
|
-
marginRight: 5,
|
|
364
|
-
color: p.faint,
|
|
365
|
-
});
|
|
366
|
-
const noteStyle = (p) => ({
|
|
367
|
-
margin: '12px 0 0',
|
|
368
|
-
fontSize: 11,
|
|
369
|
-
lineHeight: 1.45,
|
|
370
|
-
color: p.faint,
|
|
371
|
-
});
|
|
372
|
-
// ── "How we count a user" ────────────────────────────────────────────────────
|
|
373
|
-
const detailsStyle = (p) => ({
|
|
374
|
-
marginTop: 12,
|
|
375
|
-
paddingTop: 10,
|
|
376
|
-
borderTop: `1px solid ${p.divider}`,
|
|
377
|
-
});
|
|
378
|
-
const summaryStyle = (p) => ({
|
|
379
|
-
// A summary is a button to everyone who can see it; these two make it one to
|
|
380
|
-
// a pointer and to a reader who presses and holds on a phone, where the
|
|
381
|
-
// browser would otherwise offer to select the words instead of opening it.
|
|
382
|
-
cursor: 'pointer',
|
|
383
|
-
WebkitUserSelect: 'none',
|
|
384
|
-
userSelect: 'none',
|
|
385
|
-
fontSize: 12,
|
|
386
|
-
fontWeight: 600,
|
|
387
|
-
color: p.muted,
|
|
388
|
-
// The disclosure triangle is left in place on purpose: it is the one thing on
|
|
389
|
-
// screen that says the fold opens, and it is drawn by the browser in the
|
|
390
|
-
// reader's own conventions.
|
|
391
|
-
listStyle: 'revert',
|
|
392
|
-
});
|
|
393
|
-
const howListStyle = {
|
|
394
|
-
listStyle: 'none',
|
|
395
|
-
margin: '8px 0 0',
|
|
396
|
-
padding: 0,
|
|
397
|
-
display: 'grid',
|
|
398
|
-
gap: 6,
|
|
399
|
-
};
|
|
400
|
-
const howItemStyle = (p) => ({
|
|
401
|
-
fontSize: 11,
|
|
402
|
-
lineHeight: 1.45,
|
|
403
|
-
color: p.faint,
|
|
404
|
-
// No marker and no indent: the card is 380px at its widest and a <ul>'s
|
|
405
|
-
// default 40px of padding costs one of these sentences a whole line on a
|
|
406
|
-
// phone. The gap between items is what separates them.
|
|
407
|
-
});
|
|
408
14
|
//# sourceMappingURL=UserCountBreakdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserCountBreakdown.js","sourceRoot":"","sources":["../src/UserCountBreakdown.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAsB,MAAM,OAAO,CAAA;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAkB,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,GAKjB,MAAM,eAAe,CAAA;AAEtB,iFAAiF;AACjF,kEAAkE;AAClE,EAAE;AACF,gFAAgF;AAChF,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AACjF,YAAY;AACZ,EAAE;AACF,2EAA2E;AAC3E,uEAAuE;AACvE,2EAA2E;AAC3E,oCAAoC;AACpC,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,8EAA8E;AAC9E,4DAA4D;AAC5D,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,iFAAiF;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AAUD,uDAAuD;AACvD,MAAM,UAAU,kBAAkB,CAAC,MAA+B;IAChE,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/dist/UserCountLine.d.ts
CHANGED
|
@@ -1,58 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
/**
|
|
5
|
-
* `{ total, live }` for every UNI·SIM app at once — or, with `scope: 'app'`,
|
|
6
|
-
* for this app alone — refreshed every 45 s while `active`. Starts from the
|
|
7
|
-
* last value this origin read, so the line paints at once. `null` until there
|
|
8
|
-
* is a real, non-zero total.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useUserCounts(active?: boolean, scope?: CountScope): UserCounts | null;
|
|
11
|
-
/**
|
|
12
|
-
* How long a press has to last to be a press-and-hold rather than a tap.
|
|
13
|
-
*
|
|
14
|
-
* 500 ms is the platform figure — it is what iOS and Android use for their own
|
|
15
|
-
* long press, and what the browsers' `contextmenu` on touch fires at — so a
|
|
16
|
-
* person who already knows the gesture from every other app gets the same
|
|
17
|
-
* timing here. Shorter and an ordinary slow tap opens the popup by accident;
|
|
18
|
-
* longer and the gesture feels broken before it fires.
|
|
19
|
-
*/
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { MenuTheme } from './menuTheme.js';
|
|
3
|
+
import type { CountScope, UserCounts } from './presence.js';
|
|
4
|
+
/** @deprecated Retired in 0.187.0. */
|
|
20
5
|
export declare const LONG_PRESS_MS = 500;
|
|
6
|
+
/** @deprecated Retired in 0.187.0: always null. */
|
|
7
|
+
export declare function useUserCounts(_active?: boolean, _scope?: CountScope): UserCounts | null;
|
|
8
|
+
/** @deprecated Retired in 0.187.0. */
|
|
21
9
|
export interface UserCountLineProps {
|
|
22
|
-
/** Fetch only while this is true (the menu is open). Default true. */
|
|
23
10
|
active?: boolean;
|
|
24
11
|
theme?: MenuTheme;
|
|
25
12
|
style?: CSSProperties;
|
|
26
13
|
className?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Offer the per-app breakdown on a press and hold. Default true.
|
|
29
|
-
*
|
|
30
|
-
* Turn it off where the popup has nowhere sensible to land — a surface with
|
|
31
|
-
* no <UniversalProvider> above it cannot read the breakdown at all.
|
|
32
|
-
*/
|
|
33
14
|
breakdown?: boolean;
|
|
34
15
|
}
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
* quiet sentence, and a tap switches it to this app's own figure and back
|
|
38
|
-
* (James, 2026-09-17: the suite first, the app on a click). Every app opens on
|
|
39
|
-
* the suite figure, every time; the tap is not remembered — see
|
|
40
|
-
* `forgetStoredScope` below for why it used to be and why it is not.
|
|
41
|
-
*
|
|
42
|
-
* It WRAPS to the width of whatever it is mounted in rather than setting that
|
|
43
|
-
* width — see the style below. It is the longest string in the menu by some
|
|
44
|
-
* way, and a dropdown sizes itself to its content.
|
|
45
|
-
*
|
|
46
|
-
* **Press and hold** (or right-click, or Shift+Enter) opens the per-app
|
|
47
|
-
* breakdown behind the suite figure — <UserCountBreakdown /> (James,
|
|
48
|
-
* 2026-09-19). The click that ends a long press is swallowed rather than
|
|
49
|
-
* flipping the figure; see `heldRef`.
|
|
50
|
-
*
|
|
51
|
-
* Renders nothing until a real number arrives, and nothing on the hubs
|
|
52
|
-
* (`central`), which are not an app anybody "uses" in this sense.
|
|
53
|
-
*
|
|
54
|
-
* The navbars' profile menu already shows it, at the bottom; mount this
|
|
55
|
-
* yourself only to show the figure somewhere else too (a home screen).
|
|
56
|
-
*/
|
|
57
|
-
export declare function UserCountLine({ active, theme, style, className, breakdown, }: UserCountLineProps): import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
/** @deprecated Retired in 0.187.0: renders nothing. */
|
|
17
|
+
export declare function UserCountLine(_props: UserCountLineProps): null;
|
|
58
18
|
//# sourceMappingURL=UserCountLine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserCountLine.d.ts","sourceRoot":"","sources":["../src/UserCountLine.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UserCountLine.d.ts","sourceRoot":"","sources":["../src/UserCountLine.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE3D,sCAAsC;AACtC,eAAO,MAAM,aAAa,MAAM,CAAA;AAEhC,mDAAmD;AACnD,wBAAgB,aAAa,CAAC,OAAO,UAAO,EAAE,MAAM,GAAE,UAAoB,GAAG,UAAU,GAAG,IAAI,CAE7F;AAED,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,uDAAuD;AACvD,wBAAgB,aAAa,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAE9D"}
|