@tinycloud/web-sdk 3.7.0-beta.2 → 3.7.0-beta.4

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 (90) hide show
  1. package/README.md +40 -0
  2. package/dist/adapters/BrowserNotificationHandler.d.ts +22 -6
  3. package/dist/authorization/WebSpaceCreationHandler.d.ts +12 -0
  4. package/dist/index.cjs +1 -1
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.mjs +1 -1
  7. package/dist/modals.cjs +1 -0
  8. package/dist/modals.mjs +1 -0
  9. package/dist/modules/tcw.d.ts +16 -2
  10. package/dist/notifications/ModalManager.d.ts +21 -7
  11. package/dist/notifications/PermissionRequestModal.d.ts +8 -1
  12. package/dist/notifications/SpaceCreationModal.d.ts +8 -1
  13. package/dist/notifications/dialogFocus.d.ts +39 -0
  14. package/dist/notifications/index.d.ts +1 -6
  15. package/dist/notifications/lazy-prompts.d.ts +16 -0
  16. package/dist/notifications/legacy-config.d.ts +11 -0
  17. package/dist/notifications/modals-entry.d.ts +7 -0
  18. package/dist/notifications/modals-registry.d.ts +15 -0
  19. package/dist/notifications/scrollLock.d.ts +2 -0
  20. package/dist/notifications/types.d.ts +6 -33
  21. package/dist/notifications/types.schema.d.ts +7 -148
  22. package/dist/panel-data.cjs +1 -0
  23. package/dist/panel-data.mjs +1 -0
  24. package/dist/panel.cjs +1 -0
  25. package/dist/panel.mjs +1 -0
  26. package/dist/ui/api.d.ts +30 -0
  27. package/dist/ui/button.d.ts +10 -0
  28. package/dist/ui/client.d.ts +27 -0
  29. package/dist/ui/config.d.ts +35 -0
  30. package/dist/ui/data/map.d.ts +23 -0
  31. package/dist/ui/data/prefetch.d.ts +18 -0
  32. package/dist/ui/data/real.d.ts +12 -0
  33. package/dist/ui/data.d.ts +241 -0
  34. package/dist/ui/frame-guard.d.ts +7 -0
  35. package/dist/ui/host.d.ts +29 -0
  36. package/dist/ui/ids.d.ts +7 -0
  37. package/dist/ui/index.d.ts +38 -0
  38. package/dist/ui/manage-url.d.ts +8 -0
  39. package/dist/ui/panel-data-entry.d.ts +28 -0
  40. package/dist/ui/panel-entry.d.ts +23 -0
  41. package/dist/ui/panel-modal.d.ts +13 -0
  42. package/dist/ui/panel-styles.d.ts +10 -0
  43. package/dist/ui/panel-toasts.d.ts +30 -0
  44. package/dist/ui/panel.d.ts +42 -0
  45. package/dist/ui/parts/index.d.ts +4 -0
  46. package/dist/ui/parts/prompts.d.ts +39 -0
  47. package/dist/ui/parts/storage-watch.d.ts +11 -0
  48. package/dist/ui/parts/sync-status.d.ts +7 -0
  49. package/dist/ui/parts/toasts.d.ts +8 -0
  50. package/dist/ui/pending.d.ts +13 -0
  51. package/dist/ui/persistence.d.ts +28 -0
  52. package/dist/ui/phone.d.ts +14 -0
  53. package/dist/ui/section-data.d.ts +20 -0
  54. package/dist/ui/section-dialogs.d.ts +10 -0
  55. package/dist/ui/sections/account.d.ts +3 -0
  56. package/dist/ui/sections/account.strings.d.ts +29 -0
  57. package/dist/ui/sections/activity.d.ts +7 -0
  58. package/dist/ui/sections/activity.strings.d.ts +46 -0
  59. package/dist/ui/sections/delegations.d.ts +25 -0
  60. package/dist/ui/sections/delegations.strings.d.ts +143 -0
  61. package/dist/ui/sections/freshness-copy.d.ts +17 -0
  62. package/dist/ui/sections/index.d.ts +4 -0
  63. package/dist/ui/sections/local-copy.d.ts +3 -0
  64. package/dist/ui/sections/local-copy.strings.d.ts +70 -0
  65. package/dist/ui/sections/local-tinycloud.d.ts +9 -0
  66. package/dist/ui/sections/local-tinycloud.strings.d.ts +48 -0
  67. package/dist/ui/sections/nodes.d.ts +7 -0
  68. package/dist/ui/sections/nodes.strings.d.ts +27 -0
  69. package/dist/ui/sections/placeholder.d.ts +8 -0
  70. package/dist/ui/sections/status.d.ts +10 -0
  71. package/dist/ui/sections/storage.d.ts +37 -0
  72. package/dist/ui/sections/storage.strings.d.ts +37 -0
  73. package/dist/ui/sections/ui.d.ts +77 -0
  74. package/dist/ui/sections/view-body.d.ts +23 -0
  75. package/dist/ui/sign-out-purge.d.ts +39 -0
  76. package/dist/ui/slots.d.ts +218 -0
  77. package/dist/ui/status.d.ts +16 -0
  78. package/dist/ui/storage-state.d.ts +12 -0
  79. package/dist/ui/strings-panel.d.ts +29 -0
  80. package/dist/ui/strings.d.ts +76 -0
  81. package/dist/ui/stub/index.d.ts +48 -0
  82. package/dist/ui/styles.d.ts +9 -0
  83. package/dist/ui/toast-store.d.ts +46 -0
  84. package/dist/ui/view-result.d.ts +6 -0
  85. package/package.json +13 -4
  86. package/dist/notifications/ErrorHandler.d.ts +0 -32
  87. package/dist/notifications/NodeSelectionModal.d.ts +0 -29
  88. package/dist/notifications/ToastContainer.d.ts +0 -16
  89. package/dist/notifications/ToastElement.d.ts +0 -22
  90. package/dist/notifications/ToastManager.d.ts +0 -36
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Phone = a viewport at most 600 CSS px wide, or a coarse pointer. Phones always
3
+ * open the full page. The host reads this query in JS, and the panel stylesheet
4
+ * uses the same query, so state and CSS cannot disagree.
5
+ */
6
+ export declare const PHONE_QUERY = "(max-width: 600px), (pointer: coarse)";
7
+ export interface PhoneWatch {
8
+ /** Current match. False where `matchMedia` is missing (jsdom, older runtimes). */
9
+ readonly phone: boolean;
10
+ stop(): void;
11
+ }
12
+ /** Calls `onChange` each time the phone query flips, until `stop()`. */
13
+ export declare function watchPhone(onChange: (phone: boolean) => void): PhoneWatch;
14
+ //# sourceMappingURL=phone.d.ts.map
@@ -0,0 +1,20 @@
1
+ import type { PanelDataSource } from "./data";
2
+ import type { SectionData } from "./slots";
3
+ /** The cache the shell owns. `start` and `stop` follow the panel being open. */
4
+ export interface SectionDataCache extends SectionData {
5
+ /** Reads every view now, follows source changes, and refreshes each minute until `stop`. */
6
+ start(): void;
7
+ /** Stops following the source and the timer. Cached results stay for the next open. */
8
+ stop(): void;
9
+ /** Drops cached results and rebinds to the new source (account switch or sign-out). */
10
+ reset(): void;
11
+ /** Tells subscribers to repaint without a read (a section changed something the source did not announce). */
12
+ notify(): void;
13
+ }
14
+ /**
15
+ * Read cache over the client's `PanelDataSource` for synchronous `status(ctx)`.
16
+ * A read that fails is cached as an error result, so a status shows "Unavailable" instead of a stale value.
17
+ * A read that finishes after `reset` or `stop` is dropped.
18
+ */
19
+ export declare function createSectionData(getSource: () => PanelDataSource | undefined, now?: () => number): SectionDataCache;
20
+ //# sourceMappingURL=section-data.d.ts.map
@@ -0,0 +1,10 @@
1
+ import type { ConfirmHandle, ConfirmRequest, DrawerHandle, DrawerRequest } from "./slots";
2
+ /** `ctx.confirm` and `ctx.openDrawer`, bound to whichever section element is mounted. */
3
+ export interface SectionDialogs {
4
+ confirm(request: ConfirmRequest): ConfirmHandle;
5
+ openDrawer(request: DrawerRequest): DrawerHandle;
6
+ /** Removes every box and drawer still open. The shell calls it when the section unmounts. */
7
+ closeAll(): void;
8
+ }
9
+ export declare function createSectionDialogs(getHost: () => HTMLElement | undefined): SectionDialogs;
10
+ //# sourceMappingURL=section-dialogs.d.ts.map
@@ -0,0 +1,3 @@
1
+ import type { PanelSection } from "../slots";
2
+ export declare const accountSection: PanelSection;
3
+ //# sourceMappingURL=account.d.ts.map
@@ -0,0 +1,29 @@
1
+ /** Overview copy. Registered with the panel string table by account.ts. */
2
+ export declare const ACCOUNT_STRINGS: {
3
+ readonly "account.copied": "DID copied";
4
+ readonly "account.copy_failed": "Could not copy the DID";
5
+ readonly "account.signed_out": "TinyCloud is signed out in this app. Sign in to see your account.";
6
+ readonly "account.signed_in_as": "Signed in as";
7
+ readonly "account.copy_did": "Copy your DID";
8
+ readonly "account.hint": "Need more room? Choose Open full page, at the top, for these same sections on a full screen.";
9
+ readonly "account.button.title": "This button";
10
+ readonly "account.button.body": "TinyCloud shows a round button at the bottom right of {app}. If you'd rather open TinyCloud from the app's own settings, hide it.";
11
+ readonly "account.button.app": "this app";
12
+ readonly "account.button.dev.lead": "For developers.";
13
+ readonly "account.button.dev.body": "Once the button is hidden, your app needs its own way back in: add a place in your settings that calls";
14
+ readonly "account.button.dev.tail": "TinyCloud doesn't bring the button back on its own.";
15
+ readonly "account.loading": "Loading account…";
16
+ readonly "account.unavailable": "Account details are unavailable.";
17
+ readonly "account.session.label": "Session";
18
+ readonly "account.session.expires": "Expires in {hours}h {minutes}m";
19
+ readonly "account.app.label": "You're in";
20
+ readonly "account.glance.title": "At a glance";
21
+ readonly "account.signout.button": "Sign out";
22
+ readonly "account.signout.question": "Sign out of TinyCloud on this device?";
23
+ readonly "account.signout.cancel": "Stay signed in";
24
+ readonly "account.signout.confirm": "Sign out";
25
+ readonly "account.signout.busy": "Signing out…";
26
+ readonly "account.signout.failed": "Sign-out failed. Try again.";
27
+ readonly "account.status.signed_out": "Signed out";
28
+ };
29
+ //# sourceMappingURL=account.strings.d.ts.map
@@ -0,0 +1,7 @@
1
+ import type { PanelSection } from "../slots";
2
+ /**
3
+ * Request log for developer mode. Shown only while developer mode is on, as in the mockup.
4
+ * Without a request log on the client the body keeps the neutral placeholder.
5
+ */
6
+ export declare const activitySection: PanelSection;
7
+ //# sourceMappingURL=activity.d.ts.map
@@ -0,0 +1,46 @@
1
+ /** Activity copy that is not in strings.ts. Registered with the panel string table by its section module. */
2
+ export declare const ACTIVITY_STRINGS: {
3
+ readonly "activity.summary": "Recent requests this session";
4
+ readonly "activity.glance.no_errors": "No errors";
5
+ readonly "activity.glance.errors": "{count} errors";
6
+ readonly "activity.glance.clear": "Clear";
7
+ readonly "activity.chip": "Developer mode";
8
+ readonly "activity.lede": "Every request this app makes to TinyCloud, newest first. Only the first path segment is shown.";
9
+ readonly "activity.devnote_title": "Developer mode is set by {app} in code,";
10
+ readonly "activity.devnote": "in the SDK config. It isn't a user setting, and people using {app} never see this section.";
11
+ readonly "activity.app_fallback": "this app";
12
+ readonly "activity.count_of": " of {total} requests · ";
13
+ readonly "activity.count_error_one": " error";
14
+ readonly "activity.count_error_many": " errors";
15
+ readonly "activity.cap": "Showing the newest {shown} requests.";
16
+ readonly "activity.errors_only": "Errors only";
17
+ readonly "activity.pause": "Pause live";
18
+ readonly "activity.resume": "Resume live";
19
+ readonly "activity.copy_all": "Copy all";
20
+ readonly "activity.copy_one": "Copy request: {target} at {time}";
21
+ readonly "activity.copied_one": "Request copied.";
22
+ readonly "activity.copied_many": "Requests copied as text.";
23
+ readonly "activity.copy_failed": "Could not copy. Select the text and copy it by hand.";
24
+ readonly "activity.no_errors_table": "No errors. Everything this app asked for went through.";
25
+ readonly "activity.table_label": "Request log";
26
+ readonly "activity.col.time": "Time";
27
+ readonly "activity.col.op": "Operation";
28
+ readonly "activity.col.path": "Path";
29
+ readonly "activity.col.space": "Space";
30
+ readonly "activity.col.host": "Host";
31
+ readonly "activity.col.bytes": "Bytes";
32
+ readonly "activity.col.took": "Took";
33
+ readonly "activity.col.result": "Result";
34
+ readonly "activity.col.source": "Source";
35
+ readonly "activity.col.copy": "Copy";
36
+ readonly "activity.res_ok": "ok";
37
+ readonly "activity.res_unknown": "unknown";
38
+ readonly "activity.unavailable": "The request log can't be read right now.";
39
+ readonly "activity.no_errors_unsure": "No failed requests in the log. Some requests have no recorded result.";
40
+ readonly "activity.host_local": "this device";
41
+ readonly "activity.node": "Node";
42
+ readonly "activity.local_copy": "Local copy";
43
+ readonly "activity.on": "On";
44
+ readonly "activity.off": "Off";
45
+ };
46
+ //# sourceMappingURL=activity.strings.d.ts.map
@@ -0,0 +1,25 @@
1
+ import type { DelegationGroup, DelegationResource, DelegationRow, DescribedAbilities } from "../data";
2
+ import type { PanelSection } from "../slots";
3
+ /**
4
+ * Plain-words rendering of a resource list. `tinycloud.kv/get` reads as "read",
5
+ * `put` as "write", `list` as "list", `del` as "delete". Any other action is
6
+ * shown as it is (cleaned and shortened) in the line and in `chips`. An empty
7
+ * list says no actions are listed; a list that cannot be read says the abilities
8
+ * are unknown, never "none". This never throws.
9
+ */
10
+ export declare function describeAbilities(resources: readonly DelegationResource[]): DescribedAbilities;
11
+ type Shown = "active" | "soon" | "expired" | "revoked" | "pending" | "unknown";
12
+ /** What the card says. An active grant whose end has passed reads as expired, so it offers no revoke. */
13
+ export declare function shownStatus(row: DelegationRow, now: number): Shown;
14
+ /** Rows by group, in the order the page lists them. */
15
+ export declare function groupRows(rows: readonly DelegationRow[]): Record<DelegationGroup, DelegationRow[]>;
16
+ type Phase = "idle" | "busy" | "failed" | "denied" | "stale" | "unconfirmed";
17
+ /** Which message a refused revoke maps to. Anything else, REVOCATION_FAILED included, is a plain failure. */
18
+ export declare function refusalPhase(code: string): Exclude<Phase, "idle" | "busy">;
19
+ /**
20
+ * Delegations the account granted or received. Mounted only while the panel is
21
+ * open and the session is signed in.
22
+ */
23
+ export declare const delegationsSection: PanelSection;
24
+ export {};
25
+ //# sourceMappingURL=delegations.d.ts.map
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Delegations copy that is not in strings.ts. Registered with the panel string
3
+ * table by its section module. Keys avoid every `delegations.*` key that
4
+ * strings.ts already holds.
5
+ */
6
+ export declare const DELEGATIONS_STRINGS: {
7
+ readonly "delegations.summary": "Who can act on your data";
8
+ readonly "delegations.glance.visible": "Visible";
9
+ readonly "delegations.lede": "Who can use your TinyCloud, and what they can do.";
10
+ readonly "delegations.unavailable": "Delegations aren't available here.";
11
+ readonly "delegations.denied": "This session doesn't have access to this list.";
12
+ readonly "delegations.app.fallback": "this app";
13
+ readonly "delegations.app.subject": "This app";
14
+ readonly "delegations.g.app": "Granted to {app}";
15
+ readonly "delegations.g.app.sub": "Access {app} holds on this device.";
16
+ readonly "delegations.g.others": "Granted to others";
17
+ readonly "delegations.g.others.sub": "Other apps and agents you gave access to.";
18
+ readonly "delegations.g.received": "Received";
19
+ readonly "delegations.g.received.sub": "Access that other people or apps gave you.";
20
+ readonly "delegations.g.none": "Nothing here.";
21
+ readonly "delegations.g.none.more": "None in what's loaded so far.";
22
+ readonly "delegations.party.unknown": "Unknown";
23
+ readonly "delegations.firstpage": "Showing {count}. There are more.";
24
+ readonly "delegations.more.btn": "Show more";
25
+ readonly "delegations.more.busy": "Loading…";
26
+ readonly "delegations.more.err": "Couldn't load more.";
27
+ readonly "delegations.reload": "Reload list";
28
+ readonly "delegations.more.loaded": "{count} more loaded.";
29
+ readonly "delegations.empty.title": "No one has access yet";
30
+ readonly "delegations.empty.body": "When you give an app or an agent access to your TinyCloud, it shows up here, with what it can do and when it ends. You can take access back at any time.";
31
+ readonly "delegations.loading": "Loading delegations";
32
+ readonly "delegations.error": "The list of delegations didn't load.";
33
+ readonly "delegations.ask.title": "{app} can't list delegations yet";
34
+ readonly "delegations.ask.body": "To show who has access, TinyCloud needs your permission to read your list of delegations. It can't change them.";
35
+ readonly "delegations.ask.openkey": " You'll approve it in OpenKey.";
36
+ readonly "delegations.ask.button": "Allow delegation list";
37
+ readonly "delegations.ask.declined": "That wasn't allowed, so nothing changed.";
38
+ readonly "delegations.kind.app": "This app";
39
+ readonly "delegations.kind.others": "Granted by you";
40
+ readonly "delegations.kind.received": "Shared with you by {who}";
41
+ readonly "delegations.st.active": "Active";
42
+ readonly "delegations.st.soon": "Expiring soon";
43
+ readonly "delegations.st.expired": "Expired";
44
+ readonly "delegations.st.revoked": "Revoked";
45
+ readonly "delegations.st.pending": "Not active yet";
46
+ readonly "delegations.st.unknown": "Unknown";
47
+ readonly "delegations.meta.space": "{space} space";
48
+ readonly "delegations.meta.spaces": "{count} spaces";
49
+ readonly "delegations.meta.created": "Created {when}";
50
+ readonly "delegations.meta.expires": "Expires {when}";
51
+ readonly "delegations.meta.expired": "Expired {when}";
52
+ readonly "delegations.meta.space.unknown": "Space unknown";
53
+ readonly "delegations.meta.created.unknown": "Creation time unknown";
54
+ readonly "delegations.meta.expires.unknown": "Expiry unknown";
55
+ readonly "delegations.meta.sep": " · ";
56
+ readonly "delegations.time.now": "just now";
57
+ readonly "delegations.time.min": "{n} min ago";
58
+ readonly "delegations.time.hour": "{n} h ago";
59
+ readonly "delegations.time.day": "{n} d ago";
60
+ readonly "delegations.time.in": "in {t}";
61
+ readonly "delegations.time.ago": "{t} ago";
62
+ readonly "delegations.ability.can": "Can {what}";
63
+ readonly "delegations.ability.none": "No actions listed";
64
+ readonly "delegations.ability.unknown": "Abilities unknown";
65
+ readonly "delegations.ability.more": " and more that couldn't be read";
66
+ readonly "delegations.ability.all": "everything";
67
+ readonly "delegations.ability.and": " and ";
68
+ readonly "delegations.ability.sep": "; ";
69
+ readonly "delegations.verb.read": "read";
70
+ readonly "delegations.verb.write": "write";
71
+ readonly "delegations.verb.list": "list";
72
+ readonly "delegations.verb.delete": "delete";
73
+ readonly "delegations.chip.read": "Read";
74
+ readonly "delegations.chip.write": "Write";
75
+ readonly "delegations.chip.list": "List";
76
+ readonly "delegations.chip.delete": "Delete";
77
+ readonly "delegations.chip.terminal": "Terminal";
78
+ readonly "delegations.chip.terminal.tip": "Terminal: it can't pass this access on to anyone else.";
79
+ readonly "delegations.see": "See details";
80
+ readonly "delegations.see.for": "See details for {name}";
81
+ readonly "delegations.revoke.btn": "Revoke";
82
+ readonly "delegations.revoke.for": "Revoke access for {name}";
83
+ readonly "delegations.ended.expired": "Expired grants can't be used. Nothing to revoke.";
84
+ readonly "delegations.ended.revoked": "Already revoked. Nothing to revoke.";
85
+ readonly "delegations.ended.pending": "Not active yet. Nothing to revoke.";
86
+ readonly "delegations.ended.unknown": "Status unknown. Nothing to revoke here.";
87
+ readonly "delegations.ended.received": "Shared with you. Only the one who shared it can end it.";
88
+ readonly "delegations.confirm.title": "Revoke access for {name}?";
89
+ readonly "delegations.confirm.title.app": "Revoke access for {name} on this device?";
90
+ readonly "delegations.confirm.after.app": "{name} will stop working here until you sign in again.";
91
+ readonly "delegations.confirm.what": "{name} will stop being able to {what}{where}.";
92
+ readonly "delegations.confirm.generic": "{name} will stop being able to use this access{where}.";
93
+ readonly "delegations.confirm.where": " in your {space} space";
94
+ readonly "delegations.confirm.openkey": "You'll confirm with your wallet in OpenKey. You can give access again later; this can't be undone from here.";
95
+ readonly "delegations.confirm.keep": "Keep access";
96
+ readonly "delegations.confirm.go": "Revoke access";
97
+ readonly "delegations.busy": "Revoking…";
98
+ readonly "delegations.err.failed": "Couldn't revoke this access.";
99
+ readonly "delegations.err.unconfirmed": "We couldn't confirm whether this worked. The list was re-read; try again if this still shows Active.";
100
+ readonly "delegations.err.unconfirmed.later": "We couldn't confirm whether this worked. Reload the list and check.";
101
+ readonly "delegations.prev.ok": "A revoke for your previous account finished.";
102
+ readonly "delegations.prev.failed": "A revoke for your previous account did not finish.";
103
+ readonly "delegations.err.denied": "This session can't change this access. Nothing was changed.";
104
+ readonly "delegations.err.stale": "This access had already ended, so nothing was changed.";
105
+ readonly "delegations.err.ended": "This access has ended.";
106
+ readonly "delegations.live.revoked": "Access revoked for {name}.";
107
+ readonly "delegations.receipt.title": "Access revoked";
108
+ readonly "delegations.receipt.body": "That access has ended.";
109
+ readonly "delegations.receipt.for": "For";
110
+ readonly "delegations.receipt.cid": "Delegation";
111
+ readonly "delegations.receipt.time": "Time";
112
+ readonly "delegations.d.close": "Close";
113
+ readonly "delegations.d.status": "Status";
114
+ readonly "delegations.d.by": "Granted by";
115
+ readonly "delegations.d.to": "Granted to";
116
+ readonly "delegations.d.id": "Delegation ID";
117
+ readonly "delegations.d.resources": "What it covers";
118
+ readonly "delegations.d.issued": "Issued";
119
+ readonly "delegations.d.notbefore": "Not valid before";
120
+ readonly "delegations.d.expires": "Expires";
121
+ readonly "delegations.d.expired": "Expired";
122
+ readonly "delegations.d.parents": "Passed down from";
123
+ readonly "delegations.d.parents.none": "Nothing, it was granted directly";
124
+ readonly "delegations.d.parents.n": "{count} earlier delegations";
125
+ readonly "delegations.d.revokedat": "Revoked";
126
+ readonly "delegations.d.revokedby": "Revoked by";
127
+ readonly "delegations.d.revokedvia": "Revoked through";
128
+ readonly "delegations.d.none": "Unknown";
129
+ readonly "delegations.d.resources.unreadable": "Some of what it covers couldn't be read.";
130
+ readonly "delegations.d.space": "Space";
131
+ readonly "delegations.d.terminal": "Terminal";
132
+ readonly "delegations.d.terminal.yes": "Yes · can't pass access on";
133
+ readonly "delegations.d.terminal.no": "No · can pass access on";
134
+ readonly "delegations.d.noforward": "It can't pass this access on to anyone else.";
135
+ readonly "delegations.receipt.what": "{name} can no longer {what}.";
136
+ readonly "delegations.receipt.generic": "{name} can no longer use this access.";
137
+ readonly "delegations.receipt.what.app": "{name} can no longer {what} on this device.";
138
+ readonly "delegations.receipt.generic.app": "{name} can no longer use this access on this device.";
139
+ readonly "delegations.d.copy.by": "Copy the identity that granted this";
140
+ readonly "delegations.d.copy.to": "Copy the identity that received this";
141
+ readonly "delegations.d.copy.id": "Copy the delegation ID";
142
+ };
143
+ //# sourceMappingURL=delegations.strings.d.ts.map
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Freshness chip copy. Only the lazy panel sections read it, so it stays out of
3
+ * the eager STRINGS table in ../strings.ts.
4
+ */
5
+ declare const FRESHNESS_COPY: {
6
+ readonly "freshness.updating": "Updating…";
7
+ readonly "freshness.updated": "Updated {age}";
8
+ readonly "freshness.failed": "Couldn't refresh. Showing data from {age}.";
9
+ readonly "freshness.age.now": "just now";
10
+ readonly "freshness.age.minutes": "{n} min ago";
11
+ readonly "freshness.age.hours": "{n} h ago";
12
+ readonly "freshness.age.days": "{n} d ago";
13
+ };
14
+ export type FreshnessCode = keyof typeof FRESHNESS_COPY;
15
+ export declare function freshnessCopy(code: FreshnessCode): string;
16
+ export {};
17
+ //# sourceMappingURL=freshness-copy.d.ts.map
@@ -0,0 +1,4 @@
1
+ import type { PanelSection } from "../slots";
2
+ /** Static, ordered as the nav lists them. */
3
+ export declare const PANEL_SECTIONS: readonly PanelSection[];
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ import type { PanelSection } from "../slots";
2
+ export declare const localCopySection: PanelSection;
3
+ //# sourceMappingURL=local-copy.d.ts.map
@@ -0,0 +1,70 @@
1
+ /** Local copy copy that is not in strings.ts. Registered with the panel string table by its section module. */
2
+ export declare const LOCAL_COPY_STRINGS: {
3
+ readonly "local-copy.summary": "Keep a copy of your data on this device";
4
+ readonly "local-copy.glance.on": "On";
5
+ readonly "local-copy.glance.off": "Off";
6
+ readonly "local-copy.glance.pending": "Pending";
7
+ readonly "local-copy.lede": "Keep a copy of your data in this browser, so it opens fast and works offline.";
8
+ readonly "local-copy.switch": "Keep a local copy on this device";
9
+ readonly "local-copy.switch.on": "Changes sync both ways";
10
+ readonly "local-copy.switch.off": "Reads and writes go straight to your TinyCloud";
11
+ readonly "local-copy.switch.state.on": "On";
12
+ readonly "local-copy.switch.state.off": "Off";
13
+ readonly "local-copy.state.enabling": "Turning on the local copy";
14
+ readonly "local-copy.state.wiping": "Wiping local data";
15
+ readonly "local-copy.state.pending": "The last wipe is not confirmed yet";
16
+ readonly "local-copy.state.unavailable": "The local copy is not available here";
17
+ readonly "local-copy.unavailable.note": "Your data in TinyCloud is not affected.";
18
+ readonly "local-copy.pending.note": "Some local data may still be on this device. You can wipe it again below.";
19
+ readonly "local-copy.off.title": "The local copy is off.";
20
+ readonly "local-copy.off.empty": "Nothing is kept on this device.";
21
+ readonly "local-copy.off.unknown": "What is kept on this device is unknown.";
22
+ readonly "local-copy.off.body": "{app} reads and writes your TinyCloud directly, so it needs a connection.";
23
+ readonly "local-copy.off.app": "This app";
24
+ readonly "local-copy.synced": "Synced {ago}";
25
+ readonly "local-copy.synced.unknown": "Last synced: unknown";
26
+ readonly "local-copy.ago.now": "just now";
27
+ readonly "local-copy.ago.minutes": "{count} min ago";
28
+ readonly "local-copy.ago.hours": "{count} h ago";
29
+ readonly "local-copy.ago.days": "{count} d ago";
30
+ readonly "local-copy.unknown": "unknown";
31
+ readonly "local-copy.row.waiting": "Waiting to sync";
32
+ readonly "local-copy.row.waiting.none": "Nothing";
33
+ readonly "local-copy.row.waiting.one": "1 change";
34
+ readonly "local-copy.row.waiting.many": "{count} changes";
35
+ readonly "local-copy.row.size": "Size on this device";
36
+ readonly "local-copy.folders.title": "Folders covered";
37
+ readonly "local-copy.folder.items": "{count} items";
38
+ readonly "local-copy.folder.items.unknown": "items unknown";
39
+ readonly "local-copy.folder.size.unknown": "size unknown";
40
+ readonly "local-copy.folder.waiting": "{count} waiting";
41
+ readonly "local-copy.folder.waiting.unknown": "waiting unknown";
42
+ readonly "local-copy.folder.unknown": "details unknown";
43
+ readonly "local-copy.folder.syncing": "Syncing";
44
+ readonly "local-copy.folder.paused": "Paused";
45
+ readonly "local-copy.bytes.b": "{value} B";
46
+ readonly "local-copy.bytes.kib": "{value} KiB";
47
+ readonly "local-copy.bytes.mib": "{value} MiB";
48
+ readonly "local-copy.bytes.gib": "{value} GiB";
49
+ readonly "local-copy.wipe.title": "Wipe local data";
50
+ readonly "local-copy.wipe.body": "Erases TinyCloud's copy on this device. Your data stays on your TinyCloud; the app's own files are not touched.";
51
+ readonly "local-copy.wipe.button": "Wipe local data";
52
+ readonly "local-copy.wipe.question": "Wipe local data? Erases TinyCloud's copy on this device. Your data stays on your TinyCloud; the app's own files are not touched.";
53
+ readonly "local-copy.wipe.question.off": "Turn off local copy and wipe local data? Erases TinyCloud's copy on this device. Your data stays on your TinyCloud; the app's own files are not touched.";
54
+ readonly "local-copy.wipe.unsynced.one": "1 change hasn't synced yet. Wiping now loses it.";
55
+ readonly "local-copy.wipe.unsynced.many": "{count} changes haven't synced yet. Wiping now loses them.";
56
+ readonly "local-copy.wipe.unsynced.unknown": "It isn't known whether all changes have synced. Wiping now may lose changes that haven't.";
57
+ readonly "local-copy.wipe.refill": "The copy downloads again the next time it syncs.";
58
+ readonly "local-copy.wipe.keep": "Keep local data";
59
+ readonly "local-copy.wipe.confirm": "Wipe local data";
60
+ readonly "local-copy.wipe.busy": "Wiping…";
61
+ readonly "local-copy.wipe.done": "Local data wiped. Your TinyCloud still has everything.";
62
+ readonly "local-copy.wipe.failed": "The wipe didn't finish. The copy may still be on this device.";
63
+ readonly "local-copy.wipe.retry": "Try again";
64
+ readonly "local-copy.purge.pending": "The local copy on this browser was not removed yet.";
65
+ readonly "local-copy.purge.readable": "The local copy on this browser was not removed yet. It may still be readable here.";
66
+ readonly "local-copy.purge.toast.pending": "The local copy on this browser was not removed yet. Try again from Local copy.";
67
+ readonly "local-copy.purge.toast.readable": "The local copy on this browser was not removed yet. It may still be readable here. Try again from Local copy.";
68
+ readonly "local-copy.purge.done": "The local copy was removed from this browser.";
69
+ };
70
+ //# sourceMappingURL=local-copy.strings.d.ts.map
@@ -0,0 +1,9 @@
1
+ import type { PanelSection } from "../slots";
2
+ /**
3
+ * Local TinyCloud on this computer. Mounted only while the panel is open.
4
+ * The switch is on for any connection except `off` and `unavailable`. It is
5
+ * disabled only when the app cannot change the setting. While looking, the
6
+ * switch stays usable so the check can be cancelled.
7
+ */
8
+ export declare const localTinycloudSection: PanelSection;
9
+ //# sourceMappingURL=local-tinycloud.d.ts.map
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Copy for the Local TinyCloud section. Keys are prefixed with the section id
3
+ * so they cannot clash with strings.ts or another section. Registered by the
4
+ * section module at load.
5
+ */
6
+ export declare const LOCAL_TINYCLOUD_STRINGS: {
7
+ readonly "local-tinycloud.summary": "Use a TinyCloud node on this computer";
8
+ readonly "local-tinycloud.intro": "Use a TinyCloud that runs on this computer, next to your browser, instead of only your hosted one.";
9
+ readonly "local-tinycloud.switch": "Use TinyCloud on this computer";
10
+ readonly "local-tinycloud.switch.on": "On";
11
+ readonly "local-tinycloud.switch.off": "Off";
12
+ readonly "local-tinycloud.sub.off": "Off for this app";
13
+ readonly "local-tinycloud.sub.looking": "Checking this computer…";
14
+ readonly "local-tinycloud.sub.found": "Connected to a TinyCloud on this computer";
15
+ readonly "local-tinycloud.sub.not_found": "Switched on, but nothing answered";
16
+ readonly "local-tinycloud.sub.unavailable": "Not available in this app yet";
17
+ readonly "local-tinycloud.app_fallback": "This app";
18
+ readonly "local-tinycloud.glance.found": "Found";
19
+ readonly "local-tinycloud.glance.looking": "Looking";
20
+ readonly "local-tinycloud.glance.not_found": "Not found";
21
+ readonly "local-tinycloud.glance.off": "Off";
22
+ readonly "local-tinycloud.off.body": "{app} talks to your hosted TinyCloud only. Turn this on and it looks for a TinyCloud running on this computer.";
23
+ readonly "local-tinycloud.looking.title": "Looking for TinyCloud on this computer…";
24
+ readonly "local-tinycloud.looking.permission": "Your browser may ask to let {app} reach devices on your network. Allow it so the check can finish.";
25
+ readonly "local-tinycloud.looking.cancel": "Cancel";
26
+ readonly "local-tinycloud.found.recheck": "Check again";
27
+ readonly "local-tinycloud.found.node_id": "Node ID";
28
+ readonly "local-tinycloud.found.version": "Version";
29
+ readonly "local-tinycloud.found.host": "Host";
30
+ readonly "local-tinycloud.unknown": "Unknown";
31
+ readonly "local-tinycloud.copy.node_id_label": "Copy node ID";
32
+ readonly "local-tinycloud.copy.host_label": "Copy host";
33
+ readonly "local-tinycloud.copy.command_label": "Copy command";
34
+ readonly "local-tinycloud.copied": "Copied";
35
+ readonly "local-tinycloud.copy_failed": "Couldn't copy. Select the text and copy it by hand.";
36
+ readonly "local-tinycloud.not_found.title": "We couldn't find TinyCloud on this computer.";
37
+ readonly "local-tinycloud.not_found.unchanged": "Nothing has changed: {app} still uses your hosted TinyCloud.";
38
+ readonly "local-tinycloud.not_found.steps_title": "To start it";
39
+ readonly "local-tinycloud.not_found.step_open": "Open TinyCloud on this computer, or start it from a terminal.";
40
+ readonly "local-tinycloud.not_found.step_command": "tinycloud start";
41
+ readonly "local-tinycloud.not_found.step_listen": "Check that it's listening on 127.0.0.1:8787.";
42
+ readonly "local-tinycloud.not_found.step_retry": "Come back here and choose Try again.";
43
+ readonly "local-tinycloud.not_found.retry": "Try again";
44
+ readonly "local-tinycloud.unavailable.line": "Local TinyCloud can't be checked from this app.";
45
+ readonly "local-tinycloud.unavailable.explain": "This app can't turn TinyCloud on this computer on or off yet, so the switch is off.";
46
+ readonly "local-tinycloud.error": "Couldn't change TinyCloud on this computer. Try again.";
47
+ };
48
+ //# sourceMappingURL=local-tinycloud.strings.d.ts.map
@@ -0,0 +1,7 @@
1
+ import type { PanelSection } from "../slots";
2
+ /**
3
+ * Nodes this session talks to. Mounted only while the panel is open.
4
+ * Without a client or data source it shows the unavailable line.
5
+ */
6
+ export declare const nodesSection: PanelSection;
7
+ //# sourceMappingURL=nodes.d.ts.map
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Nodes copy that is not in strings.ts. Registered with the panel string table by its section module.
3
+ * Mockup copy wins where the spec and the mockup differ (see the section brief).
4
+ */
5
+ export declare const NODES_STRINGS: {
6
+ readonly "nodes.summary": "Nodes your data syncs with";
7
+ readonly "nodes.title": "Connected nodes";
8
+ readonly "nodes.lede": "The nodes this session is talking to right now. TinyCloud picks the node for each space; there is nothing to switch here.";
9
+ readonly "nodes.empty": "No node is in use right now.";
10
+ readonly "nodes.unavailable": "Not available right now.";
11
+ readonly "nodes.glance.none": "None";
12
+ readonly "nodes.glance.healthy": "Healthy";
13
+ readonly "nodes.glance.slow": "{count} slow";
14
+ readonly "nodes.glance.down": "{count} down";
15
+ readonly "nodes.card.ok": "Connected";
16
+ readonly "nodes.card.slow": "Slow to respond";
17
+ readonly "nodes.role.local": "On this computer";
18
+ readonly "nodes.role.ownHosted": "Your hosted TinyCloud";
19
+ readonly "nodes.nodeid": "Node ID";
20
+ readonly "nodes.copy": "Copy the node ID of {host}";
21
+ readonly "nodes.spaces": "Spaces here";
22
+ readonly "nodes.latency.value": "{ms} ms · seen {seen}";
23
+ readonly "nodes.latency.only": "{ms} ms";
24
+ readonly "nodes.seen.seconds": "{count} s ago";
25
+ readonly "nodes.seen.minutes": "{count} min ago";
26
+ };
27
+ //# sourceMappingURL=nodes.strings.d.ts.map
@@ -0,0 +1,8 @@
1
+ /** Always available. Sections with no sign-in or developer gate use this. */
2
+ export declare const alwaysAvailable: () => boolean;
3
+ /**
4
+ * Body for shell sections whose content lands in a later slice. The host sets
5
+ * `data-section` on `el` before mount, so the title comes from the section id.
6
+ */
7
+ export declare function mountPlaceholder(el: HTMLElement): () => void;
8
+ //# sourceMappingURL=placeholder.d.ts.map
@@ -0,0 +1,10 @@
1
+ import type { ViewResult } from "../data";
2
+ import type { SectionContext, SectionStatus } from "../slots";
3
+ /**
4
+ * Status for a data-backed section, shared by every section's `status(ctx)`.
5
+ * No data source reads as unavailable; a view the shell has not read yet shows
6
+ * nothing; loading, needs-permission and error stay neutral. Only `ready`
7
+ * reaches the section's own mapping.
8
+ */
9
+ export declare function viewStatus<T>(ctx: SectionContext, result: ViewResult<T> | undefined, ready: (data: T) => SectionStatus): SectionStatus | undefined;
10
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1,37 @@
1
+ import type { PanelSection } from "../slots";
2
+ export type StorageLevel = "normal" | "nearly" | "full";
3
+ /** Binary units as the mockup writes them: `312.4 MiB`, `1 GiB`, `1.25 GiB`. */
4
+ export declare function splitBinary(bytes: number): {
5
+ readonly amount: string;
6
+ readonly unit: string;
7
+ };
8
+ export declare function formatBinary(bytes: number): string;
9
+ export interface SpaceDisplay {
10
+ readonly space: string;
11
+ readonly usedBytes: number;
12
+ readonly limitBytes: number | null;
13
+ readonly source: string;
14
+ }
15
+ /** What the page shows for one usable status. Built by `storageDisplay`; no strings, no DOM. */
16
+ export interface StorageDisplay {
17
+ readonly level: StorageLevel;
18
+ readonly usedBytes: number;
19
+ /** Null: no limit. Zero: no room at all. */
20
+ readonly limitBytes: number | null;
21
+ /** Meter fill, 0 to 100. Only for a positive limit; otherwise there is no meter to draw. */
22
+ readonly percent: number | undefined;
23
+ readonly plan: string | undefined;
24
+ readonly leftBytes: number | undefined;
25
+ /** Empty when the data carries no per-space rows. Never zero-filled. */
26
+ readonly spaces: readonly SpaceDisplay[];
27
+ readonly manageHref: string;
28
+ }
29
+ /**
30
+ * The page model for one status read, or undefined when the value is not a usable status.
31
+ * The word follows the status `state`; the panel adds no threshold of its own.
32
+ * Account totals win over the space, as in the status reducer.
33
+ */
34
+ export declare function storageDisplay(view: unknown): StorageDisplay | undefined;
35
+ /** Storage usage, read through `ctx.data`. */
36
+ export declare const storageSection: PanelSection;
37
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1,37 @@
1
+ /** Storage copy that is not in strings.ts. Registered with the panel string table by its section module. */
2
+ export declare const STORAGE_PANEL_STRINGS: {
3
+ readonly "storage.summary": "How much space is used";
4
+ readonly "storage.glance.normal": "Normal";
5
+ readonly "storage.glance.nearly_full": "Nearly full";
6
+ readonly "storage.glance.full": "Full";
7
+ readonly "storage.page.lede": "Your storage is shared by every TinyCloud app you use.";
8
+ readonly "storage.page.lede_short": "How much of your TinyCloud you use.";
9
+ readonly "storage.page.used": "Used";
10
+ readonly "storage.page.by_space": "By space";
11
+ readonly "storage.page.meter": "Storage used";
12
+ readonly "storage.page.of_limit": "of {limit}";
13
+ readonly "storage.page.meter_text": "{used} of {limit} used. {state}.";
14
+ readonly "storage.page.meter_text_open": "{used} used. {state}.";
15
+ readonly "storage.page.space_meter": "{space} storage used";
16
+ readonly "storage.page.space_meter_text": "{used} of {limit}";
17
+ readonly "storage.page.plan": "Plan";
18
+ readonly "storage.page.left": "Left";
19
+ readonly "storage.page.none": "None";
20
+ readonly "storage.page.no_limit": "No limit";
21
+ readonly "storage.page.manage_hint": "(opens in a new tab)";
22
+ readonly "storage.page.nearly_note": "You're close to your limit. Saving large recordings may fail soon.";
23
+ readonly "storage.page.full_title": "Storage full: you can't add more data right now.";
24
+ readonly "storage.page.full_body": "Your existing data stays as it is.";
25
+ readonly "storage.page.unavailable_node": "Storage usage isn't available on this node.";
26
+ readonly "storage.page.permission_title": "{app} can't see your storage yet";
27
+ readonly "storage.page.permission_app": "This app";
28
+ readonly "storage.page.permission_body": "To show how much you use and your plan, TinyCloud needs your permission to read storage details. It can't read, change or delete your files.";
29
+ readonly "storage.page.permission_approve": "You'll approve it in OpenKey.";
30
+ readonly "storage.page.permission_blocked": "This session has no way to ask for it here.";
31
+ readonly "storage.page.allow": "Allow storage details";
32
+ readonly "storage.page.waiting": "Waiting for OpenKey…";
33
+ readonly "storage.page.age_now": "Updated just now";
34
+ readonly "storage.page.age_minutes": "Updated {count} min ago";
35
+ readonly "storage.page.age_hours": "Updated {count} h ago";
36
+ };
37
+ //# sourceMappingURL=storage.strings.d.ts.map