@unisim/sdk 0.228.0 → 0.230.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.
Files changed (61) hide show
  1. package/README.md +180 -5
  2. package/dist/TuneSync.d.ts +2 -0
  3. package/dist/TuneSync.d.ts.map +1 -0
  4. package/dist/TuneSync.js +182 -0
  5. package/dist/TuneSync.js.map +1 -0
  6. package/dist/defaultView.d.ts +11 -0
  7. package/dist/defaultView.d.ts.map +1 -1
  8. package/dist/defaultView.js +69 -12
  9. package/dist/defaultView.js.map +1 -1
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +4 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/phone/SwipeRow.d.ts +62 -0
  15. package/dist/phone/SwipeRow.d.ts.map +1 -0
  16. package/dist/phone/SwipeRow.js +192 -0
  17. package/dist/phone/SwipeRow.js.map +1 -0
  18. package/dist/phone/TabReorder.d.ts +125 -0
  19. package/dist/phone/TabReorder.d.ts.map +1 -0
  20. package/dist/phone/TabReorder.js +245 -0
  21. package/dist/phone/TabReorder.js.map +1 -0
  22. package/dist/phone/hold.d.ts +87 -0
  23. package/dist/phone/hold.d.ts.map +1 -0
  24. package/dist/phone/hold.js +250 -0
  25. package/dist/phone/hold.js.map +1 -0
  26. package/dist/phone/index.d.ts +12 -0
  27. package/dist/phone/index.d.ts.map +1 -1
  28. package/dist/phone/index.js +12 -0
  29. package/dist/phone/index.js.map +1 -1
  30. package/dist/phone/listCopy.d.ts +28 -0
  31. package/dist/phone/listCopy.d.ts.map +1 -0
  32. package/dist/phone/listCopy.js +115 -0
  33. package/dist/phone/listCopy.js.map +1 -0
  34. package/dist/phone/listStyles.d.ts +4 -0
  35. package/dist/phone/listStyles.d.ts.map +1 -0
  36. package/dist/phone/listStyles.js +105 -0
  37. package/dist/phone/listStyles.js.map +1 -0
  38. package/dist/phone/swipeGeometry.d.ts +62 -0
  39. package/dist/phone/swipeGeometry.d.ts.map +1 -0
  40. package/dist/phone/swipeGeometry.js +96 -0
  41. package/dist/phone/swipeGeometry.js.map +1 -0
  42. package/dist/phone/tabOrder.d.ts +19 -0
  43. package/dist/phone/tabOrder.d.ts.map +1 -0
  44. package/dist/phone/tabOrder.js +46 -0
  45. package/dist/phone/tabOrder.js.map +1 -0
  46. package/dist/provider.d.ts +8 -0
  47. package/dist/provider.d.ts.map +1 -1
  48. package/dist/provider.js +10 -2
  49. package/dist/provider.js.map +1 -1
  50. package/dist/themeStore.d.ts +8 -0
  51. package/dist/themeStore.d.ts.map +1 -1
  52. package/dist/themeStore.js +21 -1
  53. package/dist/themeStore.js.map +1 -1
  54. package/dist/tuneSyncCore.d.ts +52 -0
  55. package/dist/tuneSyncCore.d.ts.map +1 -0
  56. package/dist/tuneSyncCore.js +162 -0
  57. package/dist/tuneSyncCore.js.map +1 -0
  58. package/dist/userPrefs.d.ts.map +1 -1
  59. package/dist/userPrefs.js +28 -15
  60. package/dist/userPrefs.js.map +1 -1
  61. package/package.json +3 -1
package/README.md CHANGED
@@ -425,12 +425,65 @@ preferences** that each app can override.
425
425
  (migration 0151) holds `{ language, colorScheme }`. On sign-in the row wins and is applied
426
426
  without being written back; with no row, one is seeded **only** from values this device
427
427
  explicitly stored (never defaults or the browser locale); every global change upserts the
428
- pair. Fire-and-forget and silent on failure; skipped in mock mode. App overrides are never
429
- synced. ⚠️ This deliberately lets a signed-in person's language cross between the Universal
428
+ pair. Fire-and-forget and silent on failure; skipped in mock mode. App overrides are not part
429
+ of this row; since 0.229.0 they sync through the app's own row (next section). ⚠️ This deliberately lets a signed-in person's language cross between the Universal
430
430
  Apps and Assess — the separation below exists for anonymous visitors on a shared machine,
431
431
  which a row keyed on the user's id cannot affect.
432
432
  - `npm run test:preferences` (51 checks) and `npm run test:profile-menu-order` (53).
433
433
 
434
+ ### Tune this app follows the account (since 0.229.0)
435
+
436
+ James, 2026-10-30: *"mobile app and web app settings in tune this app should be saved and synced
437
+ to their account … Global rule"*; and 2026-10-26: *"if the person changed any tuning before signing
438
+ in, save it for that app on their profile; if they changed nothing, import their Global Tuning"*.
439
+
440
+ **Every app gets it by bumping the SDK; there's no app code.** `<UniversalProvider>` renders a
441
+ `TuneSync` itself (not in mock mode).
442
+
443
+ - **What syncs, per app:** the app's colour-scheme override (its `createThemeStore`), its language
444
+ override (`setAppLanguage`), and every default view (`useDefaultView` / `<DefaultViewSelect>`).
445
+ The app's own Tune rows aren't included yet; that's phase 2's `createSyncedSettings`.
446
+ - **Where:** its own `user_app_prefs` row, `app = 'tune:<product>'`, with
447
+ `data = { at, colorScheme, language, views }` and nothing else. ⚠️ It isn't a key in the app's
448
+ `<product>` row, because that row belongs to `useUserPrefs`, and every version of `useUserPrefs`
449
+ upserts its whole bag. A phone build one version behind the website would wipe the key. "Call me"
450
+ has its own row for the same reason. No migration: `app` is free text (0151), and the stamp sits
451
+ inside `data`.
452
+ - **The rules** (`tuneSyncCore.ts`):
453
+ - Signed in means synced. Signed out, or an anonymous trial, means this device only.
454
+ - **One stamp per app.** Any change to the three stamps the whole set, and the newer set wins.
455
+ Two devices never merge field by field. A change is pushed about 60 ms after it is made, so a
456
+ Reset to defaults that clears all three is one write. The row is read on sign-in and again
457
+ on resume (throttled to 30 s, like Global Tuning).
458
+ - **A device that never changed anything says nothing.** It has no stamp, so it takes the
459
+ account's set if there is one and never writes its own. Picking the value already there is
460
+ not a change.
461
+ - **A guest's change wins on sign-in.** A change made signed out is stamped as the guest's, and
462
+ when a session arrives (signed in here, or recognised through the shared cookie) it is saved
463
+ for that app on the profile, even over a newer row. The guest's global language or colour
464
+ scheme becomes the app's override on sign-in (0.207.0), and that conversion is saved the same
465
+ way. A guest who changed nothing gets the account's app set and its Global Tuning.
466
+ - **On a shared device, another account's stamp counts as no stamp** (`uid` in the device's
467
+ stamp), so one person's look is never pushed onto the next person's row.
468
+ - **Reset to defaults** is a change like any other: the empty set goes up, and the account's
469
+ other devices follow.
470
+ - Fire-and-forget and silent on failure. A failed write leaves this device newer than the row,
471
+ so the next pull writes it again.
472
+ - **Device storage:** the values stay where they were (table above, and
473
+ `unisim:default-view:<product>:<id>`), so apps still read them synchronously. The stamp is
474
+ localStorage `unisim:tune-stamp:<product>` = `{ at, uid } | { at, guest: true }`.
475
+ - ⚠️ **No stamp means existing choices stay on their device.** An override chosen before 0.229.0
476
+ isn't pushed until it's changed again. If the account already has a row, that row replaces it.
477
+ - **An app that synced its look itself** (BlackBook's `useTuneLook`, until 0.229.0) should drop
478
+ that, or the look syncs twice.
479
+ - **`useUserPrefs.setPref` writes in the caller's event (fixed 0.229.0).** It used to write inside
480
+ a state updater. React runs a queued updater only when it next renders the component, so a sheet
481
+ that closed on pick (after a state update of its own) dropped the pick, on the device and on the
482
+ account.
483
+ - `npm run test:tune-sync`: 21 rule checks plus 31 in a browser. `test:guest-tuning` and
484
+ `test:preferences` now expect a guest's tuning, and an app override, to reach the app's tune row
485
+ (never the `suite` row).
486
+
434
487
  ### One app: no Global Tuning (since 0.144.0)
435
488
  James, 2026-09-17: *"start with app and show global once they start using a second app, or if
436
489
  they are part of an enterprise? It's kinda pointless if they only use one app"*.
@@ -486,8 +539,9 @@ should have a reset defaults button."* Universal Jukebox's library tabs are the
486
539
  - **`<DefaultViewSelect id label fallback views />`** — the same choice as a Tune this app row,
487
540
  for anybody who can't double-tap. Pass it in `appPreferences`. It follows the dialog's
488
541
  colourway (`PreferencesThemeContext`).
489
- - **Storage:** localStorage `unisim:default-view:<config.product>:<id>`. It is per device and is
490
- never synced to the account. `readDefaultView(product, id)` / `writeDefaultView(...)` are for
542
+ - **Storage:** localStorage `unisim:default-view:<config.product>:<id>`. Since 0.229.0 it also
543
+ follows a signed-in account, in the app's `tune:<product>` row (see "Tune this app follows the
544
+ account"); before that it was per device. `readDefaultView(product, id)` / `writeDefaultView(...)` are for
491
545
  a store that needs the value outside React, such as a zustand store's initial state.
492
546
  - **Reset to defaults is in EVERY Tune this app now.** Before 0.170.0 it showed only when the app
493
547
  passed `onResetDefaults`. The SDK's part of the reset always runs:
@@ -579,6 +633,126 @@ const sel = useSelection(rows.map((r) => r.id))
579
633
  ```
580
634
  - Lifted from Universal Invoices; `npm run test:selection` checks it in Chromium.
581
635
 
636
+ ### Phone lists: swipe, hold to select, reorder tabs (since 0.230.0)
637
+
638
+ The suite's phone rules for lists and tab bars (`Docs_UNI_SIM/BRANDING.md` → "A deletable row
639
+ swipes: delete one way, a second action the other" and "Tabs reorder: hold and drag"), in the
640
+ phone kit. Moved here from Universal BlackBook (the reference), with Universal PDF's and
641
+ Jukebox's copies. Also from `@unisim/sdk/phone`.
642
+
643
+ **A row that swipes.** Swipe LEFT for the action on the right edge (Delete, with Undo), RIGHT
644
+ for the list's second action on the left edge (Pin, Select, Edit…). A first swipe only
645
+ uncovers the button; a tap on it, or a second swipe the same way, runs it and closes the row.
646
+ A short swipe settles back; a vertical drag stays the list's scroll; a side with no action is a
647
+ wall. The click a swipe leaves behind never opens the row, and a tap on an open row closes it.
648
+
649
+ ```tsx
650
+ import { SwipeGroup, SwipeRow, useUndo } from '@unisim/sdk'
651
+
652
+ const undo = useUndo<Note>((n) => restore(n)) // six seconds; show your own toast while undo.item
653
+ <SwipeGroup> // one row open at a time in this list
654
+ {notes.map((n) => (
655
+ <SwipeRow
656
+ key={n.id} id={n.id}
657
+ left={{ text: t('pin'), label: t('pinNamed', { title: n.title }), icon: <PinIcon />, onAction: () => pin(n) }}
658
+ right={{ text: t('delete'), label: t('deleteNamed', { title: n.title }), icon: <BinIcon />, tone: 'danger',
659
+ onAction: () => { remove(n); undo.deleted(n) } }}
660
+ className="rounded-xl" // match the card's corners
661
+ >
662
+ <NoteCard note={n} onClick={() => open(n)} />
663
+ </SwipeRow>
664
+ ))}
665
+ </SwipeGroup>
666
+ ```
667
+
668
+ - **Actions** are `{ text, label, icon?, onAction, tone?, className? }`. `label` names the
669
+ target for a screen reader. `tone`: `'danger'` (red, a delete), `'accent'` (orange, the
670
+ default), `'neutral'`; or your own `className` (it wins). They are drawn only while the row
671
+ is off its rest, and never on a mouse-and-trackpad device (the gesture is touch only).
672
+ - **Open state:** inside a `<SwipeGroup>` give each row an `id`; outside one, rows still close
673
+ each other; or control it with `open` + `onOpenChange`. The row carries
674
+ `data-swipe-open="left|right"` and `data-swipe-x` (the sheets' pull leaves it alone).
675
+ - **Accessible equivalent:** each action is also a button that shows only when focused
676
+ (VoiceOver, TalkBack, keyboard). `focusActions={[{ label, onClick }]}` adds more (Select…);
677
+ `focusActions={false}` drops them where the row's own buttons already do every job.
678
+ - `fireOnSecondSwipe={false}` makes a tap the only way to run it; `disabled` turns the swipe
679
+ off (selection mode); `frontClassName` goes on the sliding layer (an opaque background).
680
+ - The geometry is exported for tests: `decideSwipeAxis`, `swipeSettles`, `swipeFiresOnRelease`…
681
+
682
+ **Hold to select.** Hold a row still for 0.45 s and it is ticked and the list goes into
683
+ selection mode (a light haptic). A finger that moves first is the swipe or the scroll. The
684
+ lifting finger's click is swallowed — until 0.4 s after it lifts, wherever it lands — so the
685
+ hold never opens the row and never presses what slides in under it (your selection bar).
686
+ Done, Android's back (a layer on the phone kit's stack) or a swipe in from the left edge leaves.
687
+
688
+ ```tsx
689
+ import { useHoldSelect } from '@unisim/sdk'
690
+
691
+ const sel = useHoldSelect(rows.map((r) => r.id), { gestures: isPhoneApp })
692
+ {sel.selecting && <MyBar count={sel.picked.length} onAll={sel.all} onDone={sel.done} onDelete={() => del(sel.picked)} />}
693
+ {rows.map((r) => (
694
+ <li key={r.id} onTouchStart={sel.selecting ? undefined : sel.holdStart(r.id)}
695
+ onClick={(e) => (sel.selecting ? sel.toggle(r.id, e.shiftKey) : open(r))}>…</li>
696
+ ))}
697
+ ```
698
+
699
+ - `useHoldSelect(ids, { gestures?, ms?, vibrate? })` returns `{ selecting, isSelected, picked,
700
+ start(id?), toggle(id, range?), all, done, holdStart(id) }`. `toggle(id, true)` (Shift-click)
701
+ ticks the run from the last one. `gestures: false` keeps Back and the edge swipe out (a
702
+ website). Pair it with `<SwipeRow focusActions={[{ label: 'Select …', onClick: () => sel.start(id) }]}>`.
703
+ - The parts, for a list that keeps its own state: **`useHold(onHold, { ms?, vibrate? })`**
704
+ returns `holdStart(id)` for a row's `onTouchStart`; **`useLeaveSelection(selecting, leave,
705
+ { enabled? })`** is Back and the edge swipe; **`swallowReleaseClick(onSwallowed?)`** eats
706
+ the release's click (call it as your own hold fires).
707
+ - On the website, tick boxes do the job: `useSelection` / `<SelectionBar>` above.
708
+
709
+ **Tabs reorder.** Hold a tab ~0.5 s and drag it along the bar; let go to drop it. A quick tap
710
+ still switches, and a hold is never a tap (nor half of a double tap). Tune this app stays last.
711
+ A tab that Tune can switch off can be dropped on a bin that rises above the bar ("Drop here to
712
+ hide", red and "Let go to hide" under the finger), which switches it off — offer Undo.
713
+
714
+ ```tsx
715
+ import { useTabReorder, TabBin, TabOrderList, withShownOrder, normaliseTabOrder } from '@unisim/sdk'
716
+
717
+ const all = normaliseTabOrder(stored.tabOrder, TABS) // the whole order, hidden tabs included
718
+ const shown = all.filter(isOn)
719
+ const r = useTabReorder({
720
+ tabs: shown, // the movable tabs on the bar (not Tune)
721
+ onReorder: (order) => save({ tabOrder: withShownOrder(all, order) }),
722
+ onBin: (tab) => { switchOff(tab); undo.deleted(tab) }, // omit: no bin
723
+ canBin: (tab) => tab !== 'home', // the main tab can't be hidden
724
+ })
725
+ <nav ref={r.barRef}>
726
+ {[...r.order, 'tune'].map((tab) => (
727
+ <button key={tab} {...(tab === 'tune' ? {} : r.tabProps(tab))} onClick={() => go(tab)}>…</button>
728
+ ))}
729
+ </nav>
730
+ {r.showBin && <TabBin binRef={r.binRef} over={r.overBin} />}
731
+
732
+ // Tune this app ▸ Tab order: the same order with grips and Move up / Move down
733
+ <TabOrderList order={all} onChange={(o) => save({ tabOrder: o })} label={(tab) => t(`tab.${tab}`)} hidden={(tab) => !isOn(tab)} />
734
+ ```
735
+
736
+ - `useTabReorder` returns `{ order, dragging, overBin, showBin, barRef, binRef, tabProps(tab) }`.
737
+ `order` is the live order while a tab is lifted. `tabProps` adds the touch start, no system
738
+ menu on a hold, `data-reorder-tab`, and `data-reorder-lifted` on the lifted tab (drawn raised;
739
+ restyle it in your CSS). The order is a setting like any other: sync it, carry it in the
740
+ backup, and put it back in **Reset to defaults**.
741
+ - `<TabBin>` sits fixed above the foot of the screen (`className` moves it); `hint` / `drop`
742
+ replace its words. The Undo toast is yours: `phoneListCopy(lang).binned` is "Notes tab hidden.
743
+ Bring it back in Tune this app." with `{tab}` to fill in.
744
+ - `<TabOrderList>`: `title` / `note` replace the heading and the line under it (`note={null}`
745
+ drops it). **`useTabOrderList(order, onChange)`** is the same without the drawing (`listRef`,
746
+ `gripProps(tab)`, `move(tab, to)`, `held`), for an app keeping its own look.
747
+ - Pure helpers: `moveTab`, `normaliseTabOrder(raw, defaults)` (unknown names out, a new tab
748
+ just after its default neighbour), `withShownOrder(full, shown)`, `isDefaultTabOrder`.
749
+
750
+ **Words and look.** The bin's and the list's words come in every SDK language
751
+ (`phoneListCopy(lang)`: the `language` prop, else the provider's, else `<html lang>`). Light by
752
+ default, dark under `html.dark` / `[data-theme="dark"]` / `[data-u-ground="dark"]`; layered like
753
+ the rest of the kit, so Tailwind utilities win. `npm run test:phone-lists` checks it all with
754
+ real touches at 390 px.
755
+
582
756
  ### New features: a one-time sheet with their switches (since 0.202.0)
583
757
 
584
758
  James, 2026-10-20: *"every time we add a major new feature … a message when they first open
@@ -954,7 +1128,8 @@ The phone apps' chrome — what every website dialog, menu and fold becomes in t
954
1128
  Android apps (store-listings README §7, "no website popups"), with BRANDING.md's phone rules
955
1129
  built in. Moved here from Universal PDF's `src/native/parts.tsx` + `edgeSwipe.ts` and the
956
1130
  copies of them in Images, Converter, Compress, BlackBook and Family. Also at
957
- `@unisim/sdk/phone`.
1131
+ `@unisim/sdk/phone`. The list gestures (a row that swipes, hold to select, tabs
1132
+ that reorder) are in the kit too: "Phone lists: swipe, hold to select, reorder tabs" above.
958
1133
 
959
1134
  ```tsx
960
1135
  import { PhonePage, BottomSheet, PhoneDialogHost, phoneConfirm, useScrollHint } from '@unisim/sdk'
@@ -0,0 +1,2 @@
1
+ export declare function TuneSync(): null;
2
+ //# sourceMappingURL=TuneSync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TuneSync.d.ts","sourceRoot":"","sources":["../src/TuneSync.tsx"],"names":[],"mappings":"AAgDA,wBAAgB,QAAQ,IAAI,IAAI,CAqI/B"}
@@ -0,0 +1,182 @@
1
+ 'use client';
2
+ // Tune this app follows the account (since 0.229.0). The rules are in
3
+ // tuneSyncCore.ts; this applies them for the provider's app. Rendered by
4
+ // <UniversalProvider> itself (not in mock mode), so every app gets it by
5
+ // bumping the SDK — no app code.
6
+ //
7
+ // • A change on this device (theme store override, app language override,
8
+ // a default view) is stamped at once; signed in, it is pushed a moment
9
+ // later (one write for a Reset to defaults that clears all three).
10
+ // • When a session arrives, and again on resume (throttled like the Global
11
+ // Tuning pull), the app's `tune:<product>` row is read and the newer side
12
+ // wins: the row is applied here, or this device's set is written to it.
13
+ // • A guest's change (made signed out) is written to the row on sign-in.
14
+ //
15
+ // ⚠️ Fire-and-forget and silent, like the Global Tuning row: offline, an RLS
16
+ // refusal or a self-hosted fork without the table cost the sync and nothing
17
+ // else. A failed write leaves this device's stamp newer than the row, so the
18
+ // next pull writes it again.
19
+ //
20
+ // ⚠️ Rendered BEFORE the provider's children, and child effects run before a
21
+ // parent's: the change listener is in place before the provider's guest-
22
+ // adoption effect (GUEST_TUNED_PREFIX) turns a guest's global choice into this
23
+ // app's override, so that adoption is stamped and saved like any change.
24
+ import { useEffect, useRef, useState } from 'react';
25
+ import { appLanguageKey, useUniversal } from './provider.js';
26
+ import { readAllDefaultViews, replaceDefaultViews } from './defaultView.js';
27
+ import { readAppColorSchemeOverride, setAppColorSchemeOverride } from './themeStore.js';
28
+ import { resolveLanguage } from './i18n.js';
29
+ import { decideTuneSync, normaliseViews, onTuneChange, parseTuneRow, quietly, readTuneStamp, tuneRowApp, writeTuneStamp, } from './tuneSyncCore.js';
30
+ /** At most one re-read of the row per this long, on resume. */
31
+ const RESUME_THROTTLE_MS = 30_000;
32
+ /** Changes closer together than this go up as one write. */
33
+ const PUSH_DELAY_MS = 60;
34
+ export function TuneSync() {
35
+ const { supabase, session, config, setAppLanguage } = useUniversal();
36
+ const product = config.product;
37
+ // A person, not an anonymous trial: signed in = synced.
38
+ const user = session?.user;
39
+ const uid = user && !user.is_anonymous ? user.id : null;
40
+ const live = useRef({ supabase, product, uid, setAppLanguage });
41
+ live.current = { supabase, product, uid, setAppLanguage };
42
+ // The last row seen: its colour scheme is carried on a page with no theme
43
+ // store, which has none of its own to report.
44
+ const lastRow = useRef(null);
45
+ const timer = useRef(null);
46
+ // The set this page last wrote (`uid:at`), so a pull that lands just after
47
+ // a change's own write does not send it again. A new page retries.
48
+ const sent = useRef(null);
49
+ const snapshot = () => {
50
+ const { product } = live.current;
51
+ const scheme = readAppColorSchemeOverride();
52
+ let language = null;
53
+ try {
54
+ language = resolveLanguage(window.localStorage.getItem(appLanguageKey(product)));
55
+ }
56
+ catch { /* ignore */ }
57
+ return {
58
+ colorScheme: scheme === undefined ? (lastRow.current?.colorScheme ?? null) : scheme,
59
+ language,
60
+ views: normaliseViews(readAllDefaultViews(product)),
61
+ };
62
+ };
63
+ const push = (at) => {
64
+ const { supabase, product, uid } = live.current;
65
+ if (!uid)
66
+ return;
67
+ const data = { at, ...snapshot() };
68
+ lastRow.current = data;
69
+ sent.current = `${uid}:${at}`;
70
+ writeTuneStamp(product, { at, uid });
71
+ try {
72
+ void supabase
73
+ .from('user_app_prefs')
74
+ .upsert({ user_id: uid, app: tuneRowApp(product), data }, { onConflict: 'user_id,app' })
75
+ .then(() => { }, () => { });
76
+ }
77
+ catch { /* see the header */ }
78
+ };
79
+ const apply = (row) => {
80
+ const { product, uid, setAppLanguage } = live.current;
81
+ const hasThemeStore = readAppColorSchemeOverride() !== undefined;
82
+ quietly(() => {
83
+ if (hasThemeStore)
84
+ setAppColorSchemeOverride(row.colorScheme);
85
+ setAppLanguage(row.language ? resolveLanguage(row.language) : null);
86
+ replaceDefaultViews(product, row.views);
87
+ });
88
+ // Stamped as agreed only when all of it landed: a page with no theme
89
+ // store could not apply a colour scheme, so the next page tries again.
90
+ if (uid && (hasThemeStore || row.colorScheme === null))
91
+ writeTuneStamp(product, { at: row.at, uid });
92
+ };
93
+ // ── A change on this device ────────────────────────────────────────────────
94
+ useEffect(() => onTuneChange((changed) => {
95
+ const { product, uid } = live.current;
96
+ if (changed && changed !== product)
97
+ return;
98
+ const at = Date.now();
99
+ writeTuneStamp(product, uid ? { at, uid } : { at, guest: true });
100
+ if (!uid)
101
+ return;
102
+ if (timer.current)
103
+ clearTimeout(timer.current);
104
+ timer.current = setTimeout(() => {
105
+ timer.current = null;
106
+ push(readTuneStamp(live.current.product)?.at ?? at);
107
+ }, PUSH_DELAY_MS);
108
+ // eslint-disable-next-line react-hooks/exhaustive-deps
109
+ }), []);
110
+ // A write still waiting when the provider goes is sent now, not lost.
111
+ useEffect(() => () => {
112
+ if (!timer.current)
113
+ return;
114
+ clearTimeout(timer.current);
115
+ timer.current = null;
116
+ push(readTuneStamp(live.current.product)?.at ?? Date.now());
117
+ // eslint-disable-next-line react-hooks/exhaustive-deps
118
+ }, []);
119
+ // ── Re-read on resume (phone apps stay resident) ───────────────────────────
120
+ const [pull, setPull] = useState(0);
121
+ useEffect(() => {
122
+ if (!uid || typeof window === 'undefined')
123
+ return;
124
+ let last = Date.now();
125
+ const again = () => {
126
+ if (Date.now() - last < RESUME_THROTTLE_MS)
127
+ return;
128
+ last = Date.now();
129
+ setPull((n) => n + 1);
130
+ };
131
+ const onVisibility = () => { if (document.visibilityState === 'visible')
132
+ again(); };
133
+ const onPageShow = (e) => { if (e.persisted)
134
+ again(); };
135
+ document.addEventListener('visibilitychange', onVisibility);
136
+ window.addEventListener('pageshow', onPageShow);
137
+ return () => {
138
+ document.removeEventListener('visibilitychange', onVisibility);
139
+ window.removeEventListener('pageshow', onPageShow);
140
+ };
141
+ }, [uid]);
142
+ // ── Sign-in (and resume): newer side wins ──────────────────────────────────
143
+ useEffect(() => {
144
+ if (!uid || typeof window === 'undefined')
145
+ return;
146
+ let cancelled = false;
147
+ void (async () => {
148
+ try {
149
+ const { data, error } = await supabase
150
+ .from('user_app_prefs')
151
+ .select('data')
152
+ .eq('app', tuneRowApp(product))
153
+ .maybeSingle();
154
+ if (cancelled || error)
155
+ return;
156
+ const remote = parseTuneRow(data?.data);
157
+ if (remote)
158
+ lastRow.current = remote;
159
+ // Read now, not before the await: a change made meanwhile (the guest
160
+ // adoption on sign-in, say) is part of the answer.
161
+ const local = readTuneStamp(product);
162
+ const action = decideTuneSync(local, remote, uid);
163
+ if (action === 'apply' && remote)
164
+ apply(remote);
165
+ else if (action === 'push' && local) {
166
+ // A change's own write still waiting on its timer will send it.
167
+ if (timer.current)
168
+ return;
169
+ if (local.guest)
170
+ push(Date.now());
171
+ else if (sent.current !== `${uid}:${local.at}`)
172
+ push(local.at);
173
+ }
174
+ }
175
+ catch { /* no sync this time — see the header */ }
176
+ })();
177
+ return () => { cancelled = true; };
178
+ // eslint-disable-next-line react-hooks/exhaustive-deps
179
+ }, [supabase, product, uid, pull]);
180
+ return null;
181
+ }
182
+ //# sourceMappingURL=TuneSync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TuneSync.js","sourceRoot":"","sources":["../src/TuneSync.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,sEAAsE;AACtE,yEAAyE;AACzE,yEAAyE;AACzE,iCAAiC;AACjC,EAAE;AACF,4EAA4E;AAC5E,2EAA2E;AAC3E,uEAAuE;AACvE,6EAA6E;AAC7E,8EAA8E;AAC9E,4EAA4E;AAC5E,2EAA2E;AAC3E,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,6EAA6E;AAC7E,6BAA6B;AAC7B,EAAE;AACF,6EAA6E;AAC7E,yEAAyE;AACzE,+EAA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AC,OAAO,CAAC,CAAC;qBAC9B,WAAW,EAAE,CAAA;gBAChB,IAAI,SAAS,IAAI,KAAK;oBAAE,OAAM;gBAC9B,MAAM,MAAM,GAAG,YAAY,CAAE,IAAkC,EAAE,IAAI,CAAC,CAAA;gBACtE,IAAI,MAAM;oBAAE,OAAO,CAAC,OAAO,GAAG,MAAM,CAAA;gBACpC,qEAAqE;gBACrE,mDAAmD;gBACnD,MAAM,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC,CAAA;gBACpC,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,CAAA;gBACjD,IAAI,MAAM,KAAK,OAAO,IAAI,MAAM;oBAAE,KAAK,CAAC,MAAM,CAAC,CAAA;qBAC1C,IAAI,MAAM,KAAK,MAAM,IAAI,KAAK,EAAE,CAAC;oBACpC,gEAAgE;oBAChE,IAAI,KAAK,CAAC,OAAO;wBAAE,OAAM;oBACzB,IAAI,KAAK,CAAC,KAAK;wBAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAA;yBAC5B,IAAI,IAAI,CAAC,OAAO,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,EAAE,EAAE;wBAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;gBAChE,CAAC;YACH,CAAC;YAAC,MAAM,CAAC,CAAC,wCAAwC,CAAC,CAAC;QACtD,CAAC,CAAC,EAAE,CAAA;QACJ,OAAO,GAAG,EAAE,GAAG,SAAS,GAAG,IAAI,CAAA,CAAC,CAAC,CAAA;QACjC,uDAAuD;IACzD,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,CAAA;IAElC,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -10,6 +10,17 @@ export declare const DEFAULT_VIEW_DOUBLE_TAP_MS = 350;
10
10
  export declare function readDefaultView(product: string, id: string): string | null;
11
11
  /** Store (or, with `null`, forget) one view row's default. */
12
12
  export declare function writeDefaultView(product: string, id: string, view: string | null): void;
13
+ /**
14
+ * Every default view `product` has on this device, id → view. For Tune sync
15
+ * (TuneSync.tsx); an app reads one with {@link readDefaultView}.
16
+ */
17
+ export declare function readAllDefaultViews(product: string): Record<string, string>;
18
+ /**
19
+ * Make `views` the whole set of `product`'s default views on this device: the
20
+ * account's set arriving from another device. Not a change of this device's
21
+ * own, so it is not stamped (TuneSync runs it quietly).
22
+ */
23
+ export declare function replaceDefaultViews(product: string, views: Record<string, string>): void;
13
24
  /**
14
25
  * Forget every default view `product` has. Reset to defaults calls this, so an
15
26
  * app gets it without wiring anything.
@@ -1 +1 @@
1
- {"version":3,"file":"defaultView.d.ts","sourceRoot":"","sources":["../src/defaultView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA6F,KAAK,aAAa,EAAE,MAAM,OAAO,CAAA;AAGrI,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AA6BrD,yEAAyE;AACzE,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAwB7C;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG1E;AAED,8DAA8D;AAC9D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAOvF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAYvD;AAgCD,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,MAAM;IACrD;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,EAAE,CAAA;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,KAAK,EAAE,aAAa,CA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AAE,MAAM;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,WAAW,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,CAAA;KAAE,CAAA;CAAE,GACrF,MAAM,IAAI,CAYZ"}
@@ -5,6 +5,7 @@ import { useUniversal } from './provider.js';
5
5
  import { t } from './i18n.js';
6
6
  import { MENU } from './menuTheme.js';
7
7
  import { clearWhatsNewSeen } from './whatsNew.js';
8
+ import { noteTuneChange } from './tuneSyncCore.js';
8
9
  // ──────────────────────────────────────────────────────────────────────────────
9
10
  // Double-tap a view button to make it the default — every app, one behaviour.
10
11
  //
@@ -24,11 +25,19 @@ import { clearWhatsNewSeen } from './whatsNew.js';
24
25
  // • the same choice as a row in Tune this app (<DefaultViewSelect />), for
25
26
  // anybody who cannot double-tap.
26
27
  //
27
- // WHERE IT LIVES. localStorage, `unisim:default-view:<product>:<id>`, never the
28
- // account: it is how one device likes to open, like the Jukebox tab it came
29
- // from. The product in the key is what lets **Reset to defaults** clear every
30
- // default view an app has without the app listing them (clearDefaultViews),
31
- // including ones on screens that are not mounted at the time.
28
+ // WHERE IT LIVES. localStorage, `unisim:default-view:<product>:<id>`. The
29
+ // product in the key is what lets **Reset to defaults** clear every default
30
+ // view an app has without the app listing them (clearDefaultViews), including
31
+ // ones on screens that are not mounted at the time.
32
+ //
33
+ // ⚠️ AND, SIGNED IN, THE ACCOUNT (since 0.229.0). This said "never the account"
34
+ // until then — a default view was how one device liked to open. James's global
35
+ // rule of 2026-10-30 overrides that: everything in Tune this app is saved and
36
+ // synced to the account. So every default view an app has rides in its
37
+ // `tune:<product>` row with its colour scheme and language override (newest
38
+ // change wins, one stamp per app — tuneSyncCore.ts, TuneSync.tsx). The writers
39
+ // below tell the sync about a real change; the device copy here is still the
40
+ // one the app reads, synchronously, so a view never waits on the network.
32
41
  // ──────────────────────────────────────────────────────────────────────────────
33
42
  /** Two taps on one button closer together than this are a double tap. */
34
43
  export const DEFAULT_VIEW_DOUBLE_TAP_MS = 350;
@@ -74,6 +83,7 @@ export function readDefaultView(product, id) {
74
83
  export function writeDefaultView(product, id, view) {
75
84
  if (typeof window === 'undefined')
76
85
  return;
86
+ const changed = readDefaultView(product, id) !== view;
77
87
  try {
78
88
  if (view === null)
79
89
  window.localStorage.removeItem(storageKey(product, id));
@@ -82,6 +92,57 @@ export function writeDefaultView(product, id, view) {
82
92
  }
83
93
  catch { /* private mode: the default just does not stick */ }
84
94
  notify();
95
+ if (changed)
96
+ noteTuneChange(product);
97
+ }
98
+ function productKeys(product) {
99
+ const prefix = `${PREFIX}${product}:`;
100
+ const keys = [];
101
+ try {
102
+ for (let i = 0; i < window.localStorage.length; i++) {
103
+ const k = window.localStorage.key(i);
104
+ if (k && k.startsWith(prefix))
105
+ keys.push(k);
106
+ }
107
+ }
108
+ catch { /* ignore */ }
109
+ return keys;
110
+ }
111
+ /**
112
+ * Every default view `product` has on this device, id → view. For Tune sync
113
+ * (TuneSync.tsx); an app reads one with {@link readDefaultView}.
114
+ */
115
+ export function readAllDefaultViews(product) {
116
+ if (typeof window === 'undefined')
117
+ return {};
118
+ const prefix = `${PREFIX}${product}:`;
119
+ const out = {};
120
+ try {
121
+ for (const k of productKeys(product)) {
122
+ const v = window.localStorage.getItem(k);
123
+ if (v)
124
+ out[k.slice(prefix.length)] = v;
125
+ }
126
+ }
127
+ catch { /* ignore */ }
128
+ return out;
129
+ }
130
+ /**
131
+ * Make `views` the whole set of `product`'s default views on this device: the
132
+ * account's set arriving from another device. Not a change of this device's
133
+ * own, so it is not stamped (TuneSync runs it quietly).
134
+ */
135
+ export function replaceDefaultViews(product, views) {
136
+ if (typeof window === 'undefined')
137
+ return;
138
+ try {
139
+ for (const k of productKeys(product))
140
+ window.localStorage.removeItem(k);
141
+ for (const [id, view] of Object.entries(views))
142
+ window.localStorage.setItem(storageKey(product, id), view);
143
+ }
144
+ catch { /* ignore */ }
145
+ notify();
85
146
  }
86
147
  /**
87
148
  * Forget every default view `product` has. Reset to defaults calls this, so an
@@ -90,19 +151,15 @@ export function writeDefaultView(product, id, view) {
90
151
  export function clearDefaultViews(product) {
91
152
  if (typeof window === 'undefined')
92
153
  return;
93
- const prefix = `${PREFIX}${product}:`;
154
+ const doomed = productKeys(product);
94
155
  try {
95
- const doomed = [];
96
- for (let i = 0; i < window.localStorage.length; i++) {
97
- const k = window.localStorage.key(i);
98
- if (k && k.startsWith(prefix))
99
- doomed.push(k);
100
- }
101
156
  for (const k of doomed)
102
157
  window.localStorage.removeItem(k);
103
158
  }
104
159
  catch { /* ignore */ }
105
160
  notify();
161
+ if (doomed.length > 0)
162
+ noteTuneChange(product);
106
163
  }
107
164
  function ensurePopKeyframes() {
108
165
  if (typeof document === 'undefined' || document.getElementById(POP_KEYFRAMES))
@@ -1 +1 @@
1
- {"version":3,"file":"defaultView.js","sourceRoot":"","sources":["../src/defaultView.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,EAAsB,MAAM,OAAO,CAAA;AACrI,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAkB,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEjD,iFAAiF;AACjF,8EAA8E;AAC9E,EAAE;AACF,6EAA6E;AAC7E,0EAA0E;AAC1E,6EAA6E;AAC7E,iEAAiE;AACjE,EAAE;AACF,oEAAoE;AACpE,gDAAgD;AAChD,gFAAgF;AAChF,gCAAgC;AAChC,0EAA0E;AAC1E,8EAA8E;AAC9E,gFAAgF;AAChF,wDAAwD;AACxD,6EAA6E;AAC7E,qCAAqC;AACrC,EAAE;AACF,gFAAgF;AAChF,4EAA4E;AAC5E,8EAA8E;AAC9E,4EAA4E;AAC5E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AC,CAAC,SAAS;oBAClB,WAAW,EAAE,KAAK;oBAClB,MAAM,EAAE,SAAS;oBACjB,QAAQ,EAAE,MAAM;iBACjB,YAEA,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAsB,KAAK,EAAE,CAAC,CAAC,KAAK,YAAG,CAAC,CAAC,KAAK,IAAjC,CAAC,CAAC,KAAK,CAAoC,CAAC,GACpE,IACL,CACP,CAAA;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CACjC,eAA4B,EAC5B,UAAsF;IAEtF,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,YAAY,EAAE,CAAA;IAC9D,OAAO,WAAW,CAAC,GAAG,EAAE;QACtB,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;QACjC,sEAAsE;QACtE,uEAAuE;QACvE,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;QACjC,IAAI,WAAW;YAAE,cAAc,CAAC,IAAI,CAAC,CAAA;QACrC,MAAM,KAAK,GAAG,UAAU,EAAE,QAAQ,EAAE,CAAA;QACpC,IAAI,KAAK,EAAE,QAAQ;YAAE,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QAC5C,eAAe,EAAE,EAAE,CAAA;IACrB,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAA;AAChF,CAAC"}
package/dist/index.d.ts CHANGED
@@ -137,8 +137,8 @@ export { useRevealOnOpen } from './revealOnOpen.js';
137
137
  export type { RevealOnExpandOptions } from './revealOnExpand.js';
138
138
  export { PullDrawer, PULL_TO_OPEN, PULL_RESIST, PULL_DECIDE_AT, PULL_SIDEWAYS, PULL_SETTLE_MS, PHONE_QUERY, TOUCH_PHONE_QUERY, prefersReducedMotion, useMediaQuery, topBarBottom, modalIsOpen, insideScrolledChild, openThenFocus, OPEN_SEARCH_EVENT, SHUT_SEARCH_EVENT, requestSearch, useSearchRequests, usePullHint, useContainOverscroll, } from './PullDrawer.js';
139
139
  export type { PullDrawerProps } from './PullDrawer.js';
140
- export { PhonePage, BottomSheet, PhoneSheetGrip, PhoneDialogHost, phoneAlert, phoneConfirm, phonePrompt, hasPhoneDialogHost, usePhoneLayer, usePhoneLayerCount, useAnyPhoneLayerOpen, closeTopPhoneLayer, configurePhoneLayers, phoneLayerDebug, useEdgeSwipeBack, EDGE_SWIPE_START_PX, EDGE_SWIPE_PAST, useSheetPull, useSheetBodyPull, usePagePullToType, firstTypeBox, PHONE_LAYER_ATTR, PULL_EXEMPT, TYPE_BOX, SHEET_CLOSE_SHARE, SHEET_CLOSE_MAX_PX, SHEET_TYPE_PX, PAGE_TYPE_PX, useScrollHint, SCROLL_HINT_FADE_PX, injectPhoneStyles, PHONE_STYLE_ID, } from './phone/index.js';
141
- export type { PhonePageProps, BottomSheetProps, PhoneAlertOptions, PhoneConfirmOptions, PhonePromptOptions, PhoneLayerKind, PhoneLayerOptions, PhoneLayerState, GripProps, ScrollHint, PhoneTheme, } from './phone/index.js';
140
+ export { PhonePage, BottomSheet, PhoneSheetGrip, PhoneDialogHost, phoneAlert, phoneConfirm, phonePrompt, hasPhoneDialogHost, usePhoneLayer, usePhoneLayerCount, useAnyPhoneLayerOpen, closeTopPhoneLayer, configurePhoneLayers, phoneLayerDebug, useEdgeSwipeBack, EDGE_SWIPE_START_PX, EDGE_SWIPE_PAST, useSheetPull, useSheetBodyPull, usePagePullToType, firstTypeBox, PHONE_LAYER_ATTR, PULL_EXEMPT, TYPE_BOX, SHEET_CLOSE_SHARE, SHEET_CLOSE_MAX_PX, SHEET_TYPE_PX, PAGE_TYPE_PX, useScrollHint, SCROLL_HINT_FADE_PX, injectPhoneStyles, PHONE_STYLE_ID, SwipeRow, SwipeGroup, SWIPE_ACTION_WIDTH, SWIPE_AXIS_SLOP, SWIPE_FIRE_DISTANCE, SWIPE_FIRE_TRAVEL, decideSwipeAxis, swipeDragOffset, swipeSettles, swipeRestingOffset, swipeFiresOnRelease, swipeDragOffsetFromOpen, useHold, useLeaveSelection, useHoldSelect, useUndo, swallowReleaseClick, HOLD_MS, HOLD_SLOP_PX, useTabReorder, TabBin, useTabOrderList, TabOrderList, TAB_HOLD_MS, moveTab, normaliseTabOrder, isDefaultTabOrder, withShownOrder, phoneListCopy, PHONE_LIST_COPY, injectPhoneListStyles, PHONE_LIST_STYLE_ID, } from './phone/index.js';
141
+ export type { PhonePageProps, BottomSheetProps, PhoneAlertOptions, PhoneConfirmOptions, PhonePromptOptions, PhoneLayerKind, PhoneLayerOptions, PhoneLayerState, GripProps, ScrollHint, PhoneTheme, SwipeRowProps, SwipeAction, SwipeAxis, SwipeSide, SwipeWidths, HoldOptions, HoldSelect, TabReorderOptions, TabReorder, TabBinProps, TabOrderListState, TabOrderListProps, PhoneListCopy, } from './phone/index.js';
142
142
  export { GrowingTextarea } from './GrowingTextarea.js';
143
143
  export type { GrowingTextareaProps } from './GrowingTextarea.js';
144
144
  export { growToFit, useTypingRoom } from './typingRoom.js';