@toa.io/extensions.configuration 1.0.0-alpha.272 → 1.0.0-alpha.274

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 (522) hide show
  1. package/CHANGELOG.md +210 -0
  2. package/components/configuration.values/manifest.toa.yaml +158 -0
  3. package/components/configuration.values/source/create.ts +56 -0
  4. package/components/configuration.values/source/fetch.ts +24 -0
  5. package/components/configuration.values/source/get.ts +33 -0
  6. package/components/configuration.values/source/lib/map.test.ts +34 -0
  7. package/components/configuration.values/source/lib/map.ts +34 -0
  8. package/components/configuration.values/source/lib/resolve.ts +54 -0
  9. package/components/configuration.values/source/list.ts +19 -0
  10. package/components/configuration.values/tsconfig.json +9 -0
  11. package/cucumber.js +8 -0
  12. package/features/site/_app/immutable/asset.js +1 -0
  13. package/features/site/index.html +6 -0
  14. package/features/steps/UI.ts +88 -0
  15. package/features/steps/tsconfig.json +9 -0
  16. package/features/ui.feature +85 -0
  17. package/package.json +14 -7
  18. package/readme.md +160 -47
  19. package/schemas/annotation.cos.yaml +29 -1
  20. package/schemas/manifest.cos.yaml +9 -3
  21. package/source/Aspect.test.ts +84 -8
  22. package/source/Aspect.ts +59 -5
  23. package/source/Client.test.ts +104 -0
  24. package/source/Client.ts +258 -0
  25. package/source/Composition.ts +57 -0
  26. package/source/Factory.ts +28 -5
  27. package/source/Secret.test.ts +29 -0
  28. package/source/Secret.ts +29 -0
  29. package/source/UI.ts +197 -0
  30. package/source/configuration.test.ts +92 -39
  31. package/source/configuration.ts +30 -11
  32. package/source/const.ts +17 -0
  33. package/source/deployment.test.ts +80 -1
  34. package/source/deployment.ts +73 -24
  35. package/source/epoch.test.ts +26 -0
  36. package/source/epoch.ts +21 -0
  37. package/source/index.ts +2 -1
  38. package/transpiled/Aspect.d.ts +18 -4
  39. package/transpiled/Aspect.js +47 -3
  40. package/transpiled/Aspect.js.map +1 -1
  41. package/transpiled/Aspect.test.js +59 -9
  42. package/transpiled/Aspect.test.js.map +1 -1
  43. package/transpiled/Client.d.ts +61 -0
  44. package/transpiled/Client.js +173 -0
  45. package/transpiled/Client.js.map +1 -0
  46. package/transpiled/Client.test.d.ts +1 -0
  47. package/transpiled/Client.test.js +77 -0
  48. package/transpiled/Client.test.js.map +1 -0
  49. package/transpiled/Composition.d.ts +14 -0
  50. package/transpiled/Composition.js +43 -0
  51. package/transpiled/Composition.js.map +1 -0
  52. package/transpiled/Factory.d.ts +8 -2
  53. package/transpiled/Factory.js +17 -2
  54. package/transpiled/Factory.js.map +1 -1
  55. package/transpiled/Secret.d.ts +13 -0
  56. package/transpiled/Secret.js +26 -0
  57. package/transpiled/Secret.js.map +1 -0
  58. package/transpiled/Secret.test.d.ts +1 -0
  59. package/transpiled/Secret.test.js +26 -0
  60. package/transpiled/Secret.test.js.map +1 -0
  61. package/transpiled/UI.d.ts +25 -0
  62. package/transpiled/UI.js +186 -0
  63. package/transpiled/UI.js.map +1 -0
  64. package/transpiled/configuration.d.ts +7 -2
  65. package/transpiled/configuration.js +31 -13
  66. package/transpiled/configuration.js.map +1 -1
  67. package/transpiled/configuration.test.js +84 -37
  68. package/transpiled/configuration.test.js.map +1 -1
  69. package/transpiled/const.d.ts +11 -0
  70. package/transpiled/const.js +14 -0
  71. package/transpiled/const.js.map +1 -0
  72. package/transpiled/deployment.d.ts +10 -4
  73. package/transpiled/deployment.js +57 -21
  74. package/transpiled/deployment.js.map +1 -1
  75. package/transpiled/deployment.test.js +60 -0
  76. package/transpiled/deployment.test.js.map +1 -1
  77. package/transpiled/epoch.d.ts +2 -0
  78. package/transpiled/epoch.js +21 -0
  79. package/transpiled/epoch.js.map +1 -0
  80. package/transpiled/epoch.test.d.ts +1 -0
  81. package/transpiled/epoch.test.js +22 -0
  82. package/transpiled/epoch.test.js.map +1 -0
  83. package/transpiled/index.d.ts +2 -1
  84. package/transpiled/index.js +4 -1
  85. package/transpiled/index.js.map +1 -1
  86. package/transpiled/tsconfig.tsbuildinfo +1 -1
  87. package/ui/.agents/skills/antcn/SKILL.md +91 -0
  88. package/ui/.agents/skills/antcn/references/analytics.md +78 -0
  89. package/ui/.agents/skills/antcn/references/bridge.md +41 -0
  90. package/ui/.agents/skills/antcn/references/clipboard.md +23 -0
  91. package/ui/.agents/skills/antcn/references/dismissable.md +75 -0
  92. package/ui/.agents/skills/antcn/references/dropdown.md +153 -0
  93. package/ui/.agents/skills/antcn/references/fragments.md +29 -0
  94. package/ui/.agents/skills/antcn/references/fullscreen.md +157 -0
  95. package/ui/.agents/skills/antcn/references/geo.md +27 -0
  96. package/ui/.agents/skills/antcn/references/globals.md +31 -0
  97. package/ui/.agents/skills/antcn/references/grammatical-form.md +69 -0
  98. package/ui/.agents/skills/antcn/references/hints.md +44 -0
  99. package/ui/.agents/skills/antcn/references/hold.md +34 -0
  100. package/ui/.agents/skills/antcn/references/iam.md +117 -0
  101. package/ui/.agents/skills/antcn/references/input-form.md +34 -0
  102. package/ui/.agents/skills/antcn/references/locale.md +66 -0
  103. package/ui/.agents/skills/antcn/references/net.md +33 -0
  104. package/ui/.agents/skills/antcn/references/panel.md +44 -0
  105. package/ui/.agents/skills/antcn/references/passkeys.md +27 -0
  106. package/ui/.agents/skills/antcn/references/payments.md +99 -0
  107. package/ui/.agents/skills/antcn/references/realtime.md +69 -0
  108. package/ui/.agents/skills/antcn/references/scrollable.md +39 -0
  109. package/ui/.agents/skills/antcn/references/selector.md +71 -0
  110. package/ui/.agents/skills/antcn/references/shake.md +36 -0
  111. package/ui/.agents/skills/antcn/references/share.md +28 -0
  112. package/ui/.agents/skills/antcn/references/shell.md +139 -0
  113. package/ui/.agents/skills/antcn/references/stack.md +53 -0
  114. package/ui/.agents/skills/antcn/references/system.md +149 -0
  115. package/ui/.agents/skills/antcn/references/taptap.md +28 -0
  116. package/ui/.agents/skills/antcn/references/tools.md +68 -0
  117. package/ui/.agents/skills/antcn/references/transmission.md +96 -0
  118. package/ui/.agents/skills/shadcn-svelte/SKILL.md +227 -0
  119. package/ui/.agents/skills/shadcn-svelte/agents/openai.yml +5 -0
  120. package/ui/.agents/skills/shadcn-svelte/assets/shadcn-svelte-small.png +0 -0
  121. package/ui/.agents/skills/shadcn-svelte/assets/shadcn-svelte.png +0 -0
  122. package/ui/.agents/skills/shadcn-svelte/cli.md +166 -0
  123. package/ui/.agents/skills/shadcn-svelte/customization.md +213 -0
  124. package/ui/.agents/skills/shadcn-svelte/evals/evals.json +47 -0
  125. package/ui/.agents/skills/shadcn-svelte/rules/composition.md +244 -0
  126. package/ui/.agents/skills/shadcn-svelte/rules/forms.md +234 -0
  127. package/ui/.agents/skills/shadcn-svelte/rules/icons.md +107 -0
  128. package/ui/.agents/skills/shadcn-svelte/rules/styling.md +195 -0
  129. package/ui/.agents/skills/svas/SKILL.md +169 -0
  130. package/ui/.agents/skills/svas/references/patterns.md +95 -0
  131. package/ui/.agents/skills/svintl/SKILL.md +176 -0
  132. package/ui/.claude/settings.json +15 -0
  133. package/ui/.codex/hooks.json +15 -0
  134. package/ui/.cursor/hooks.json +11 -0
  135. package/ui/.env.example +1 -0
  136. package/ui/.prettierrc +9 -0
  137. package/ui/.vscode/extensions.json +7 -0
  138. package/ui/.vscode/settings.json +27 -0
  139. package/ui/AGENTS.md +51 -0
  140. package/ui/architecture.md +390 -0
  141. package/ui/components.json +20 -0
  142. package/ui/eslint.config.js +152 -0
  143. package/ui/features/base.ts +2 -0
  144. package/ui/features/boot.feature +5 -0
  145. package/ui/features/steps/authentication.ts +34 -0
  146. package/ui/features/steps/navigaton.ts +37 -0
  147. package/ui/features/steps/typing.ts +24 -0
  148. package/ui/package-lock.json +8173 -0
  149. package/ui/package.json +76 -0
  150. package/ui/playwright.config.ts +13 -0
  151. package/ui/skills-lock.json +30 -0
  152. package/ui/src/@/configuration/index.ts +1 -0
  153. package/ui/src/@/configuration/svc/create.ts +29 -0
  154. package/ui/src/@/configuration/svc/index.ts +3 -0
  155. package/ui/src/@/configuration/svc/net/Configuration.ts +18 -0
  156. package/ui/src/@/configuration/svc/net/index.ts +2 -0
  157. package/ui/src/@/configuration/svc/net/interface.ts +35 -0
  158. package/ui/src/@/configuration/svc/store.ts +14 -0
  159. package/ui/src/@/configuration/ui/Configurations.svelte +85 -0
  160. package/ui/src/@/configuration/ui/Configurations.ts +5 -0
  161. package/ui/src/@/configuration/ui/Create.svelte +64 -0
  162. package/ui/src/@/configuration/ui/Create.ts +7 -0
  163. package/ui/src/@/configuration/ui/Form.svelte +75 -0
  164. package/ui/src/@/configuration/ui/Form.ts +79 -0
  165. package/ui/src/@/configuration/ui/Row.svelte +44 -0
  166. package/ui/src/@/configuration/ui/Row.ts +9 -0
  167. package/ui/src/@/configuration/ui/Value.svelte +33 -0
  168. package/ui/src/@/configuration/ui/Value.ts +6 -0
  169. package/ui/src/@/configuration/ui/index.ts +9 -0
  170. package/ui/src/@/configuration/ui/intl/built.js +38 -0
  171. package/ui/src/@/configuration/ui/intl/context.yaml +51 -0
  172. package/ui/src/@/configuration/ui/intl/en-US.yaml +21 -0
  173. package/ui/src/@/configuration/ui/intl/index.ts +9 -0
  174. package/ui/src/@/configuration/ui/intl/types.ts +31 -0
  175. package/ui/src/@/configuration/ui/read.test.ts +75 -0
  176. package/ui/src/@/configuration/ui/read.ts +102 -0
  177. package/ui/src/@/configuration/ui/ui.test.ts +69 -0
  178. package/ui/src/@/configuration/ui/ui.ts +115 -0
  179. package/ui/src/@/iam/index.ts +1 -0
  180. package/ui/src/@/iam/rc.ts +22 -0
  181. package/ui/src/@/iam/svc/authenticated.ts +17 -0
  182. package/ui/src/@/iam/svc/basic.ts +23 -0
  183. package/ui/src/@/iam/svc/index.ts +10 -0
  184. package/ui/src/@/iam/svc/logout.ts +5 -0
  185. package/ui/src/@/iam/svc/named.ts +16 -0
  186. package/ui/src/@/iam/svc/net/Echo.ts +9 -0
  187. package/ui/src/@/iam/svc/net/basic/index.ts +1 -0
  188. package/ui/src/@/iam/svc/net/basic/interface.ts +15 -0
  189. package/ui/src/@/iam/svc/net/federation/index.ts +1 -0
  190. package/ui/src/@/iam/svc/net/federation/interface.ts +12 -0
  191. package/ui/src/@/iam/svc/net/index.ts +6 -0
  192. package/ui/src/@/iam/svc/net/interface.ts +17 -0
  193. package/ui/src/@/iam/svc/net/otp/index.ts +1 -0
  194. package/ui/src/@/iam/svc/net/otp/interface.ts +14 -0
  195. package/ui/src/@/iam/svc/net/passkeys/index.ts +1 -0
  196. package/ui/src/@/iam/svc/net/passkeys/interface.ts +12 -0
  197. package/ui/src/@/iam/svc/oidc/apple.ts +47 -0
  198. package/ui/src/@/iam/svc/oidc/authenticate.ts +62 -0
  199. package/ui/src/@/iam/svc/oidc/google.ts +45 -0
  200. package/ui/src/@/iam/svc/oidc/hello.ts +82 -0
  201. package/ui/src/@/iam/svc/oidc/index.ts +3 -0
  202. package/ui/src/@/iam/svc/oidc/nonce.ts +5 -0
  203. package/ui/src/@/iam/svc/oidc/providers.ts +28 -0
  204. package/ui/src/@/iam/svc/oidc/standard.ts +28 -0
  205. package/ui/src/@/iam/svc/otp.ts +18 -0
  206. package/ui/src/@/iam/svc/passkeys/create.ts +20 -0
  207. package/ui/src/@/iam/svc/passkeys/index.ts +2 -0
  208. package/ui/src/@/iam/svc/passkeys/login.ts +21 -0
  209. package/ui/src/@/iam/svc/store.ts +36 -0
  210. package/ui/src/@/iam/svc/sync.ts +18 -0
  211. package/ui/src/@/iam/svc/transfer.ts +11 -0
  212. package/ui/src/@/iam/svc/update.ts +8 -0
  213. package/ui/src/@/iam/ui/AccountLike.ts +4 -0
  214. package/ui/src/@/iam/ui/Authenticated.svelte +37 -0
  215. package/ui/src/@/iam/ui/Authenticated.ts +10 -0
  216. package/ui/src/@/iam/ui/Authentication.svelte +50 -0
  217. package/ui/src/@/iam/ui/Authentication.ts +9 -0
  218. package/ui/src/@/iam/ui/Authorized.svelte +32 -0
  219. package/ui/src/@/iam/ui/Authorized.ts +65 -0
  220. package/ui/src/@/iam/ui/Card.svelte +14 -0
  221. package/ui/src/@/iam/ui/Card.ts +7 -0
  222. package/ui/src/@/iam/ui/Refresh.svelte +39 -0
  223. package/ui/src/@/iam/ui/credentials/Credentials.svelte +26 -0
  224. package/ui/src/@/iam/ui/credentials/Credentials.ts +5 -0
  225. package/ui/src/@/iam/ui/credentials/Provider.svelte +24 -0
  226. package/ui/src/@/iam/ui/credentials/Provider.ts +5 -0
  227. package/ui/src/@/iam/ui/credentials/index.ts +1 -0
  228. package/ui/src/@/iam/ui/credentials/passkeys/Key.svelte +42 -0
  229. package/ui/src/@/iam/ui/credentials/passkeys/Key.ts +29 -0
  230. package/ui/src/@/iam/ui/credentials/passkeys/Manager.svelte +83 -0
  231. package/ui/src/@/iam/ui/credentials/passkeys/Manager.ts +5 -0
  232. package/ui/src/@/iam/ui/credentials/passkeys/Passkeys.svelte +39 -0
  233. package/ui/src/@/iam/ui/credentials/passkeys/Summary.svelte +27 -0
  234. package/ui/src/@/iam/ui/credentials/passkeys/Summary.ts +5 -0
  235. package/ui/src/@/iam/ui/credentials/passkeys/index.ts +1 -0
  236. package/ui/src/@/iam/ui/credentials/providers.ts +15 -0
  237. package/ui/src/@/iam/ui/credentials/transfer/Qr.svelte +24 -0
  238. package/ui/src/@/iam/ui/credentials/transfer/Qr.ts +3 -0
  239. package/ui/src/@/iam/ui/credentials/transfer/Transfer.svelte +48 -0
  240. package/ui/src/@/iam/ui/credentials/transfer/Transfer.ts +5 -0
  241. package/ui/src/@/iam/ui/credentials/transfer/index.ts +1 -0
  242. package/ui/src/@/iam/ui/index.ts +3 -0
  243. package/ui/src/@/iam/ui/intl/built.js +79 -0
  244. package/ui/src/@/iam/ui/intl/context.yaml +91 -0
  245. package/ui/src/@/iam/ui/intl/en-US.yaml +64 -0
  246. package/ui/src/@/iam/ui/intl/index.ts +10 -0
  247. package/ui/src/@/iam/ui/intl/types.ts +70 -0
  248. package/ui/src/@/iam/ui/oidc/Authentication.svelte +16 -0
  249. package/ui/src/@/iam/ui/oidc/Authentication.ts +5 -0
  250. package/ui/src/@/iam/ui/oidc/Button.svelte +36 -0
  251. package/ui/src/@/iam/ui/oidc/Button.ts +11 -0
  252. package/ui/src/@/iam/ui/oidc/Refresh.svelte +16 -0
  253. package/ui/src/@/iam/ui/oidc/icons/Apple.svelte +19 -0
  254. package/ui/src/@/iam/ui/oidc/icons/Google.svelte +31 -0
  255. package/ui/src/@/iam/ui/oidc/icons/index.ts +11 -0
  256. package/ui/src/@/iam/ui/oidc/index.ts +2 -0
  257. package/ui/src/@/iam/ui/passkey/Authentication.svelte +64 -0
  258. package/ui/src/@/iam/ui/passkey/Authentication.ts +8 -0
  259. package/ui/src/@/iam/ui/passkey/Create.svelte +53 -0
  260. package/ui/src/@/iam/ui/passkey/Create.ts +7 -0
  261. package/ui/src/@/iam/ui/passkey/Login.svelte +29 -0
  262. package/ui/src/@/iam/ui/passkey/Refresh.svelte +29 -0
  263. package/ui/src/@/iam/ui/passkey/index.ts +2 -0
  264. package/ui/src/@/iam/ui/password/Authentication.svelte +19 -0
  265. package/ui/src/@/iam/ui/password/Authentication.ts +8 -0
  266. package/ui/src/@/iam/ui/password/Form.svelte +151 -0
  267. package/ui/src/@/iam/ui/password/Form.ts +6 -0
  268. package/ui/src/@/iam/ui/password/Password.svelte +39 -0
  269. package/ui/src/@/iam/ui/password/Password.ts +6 -0
  270. package/ui/src/@/iam/ui/password/Refresh.svelte +5 -0
  271. package/ui/src/@/iam/ui/password/index.ts +2 -0
  272. package/ui/src/@/net/index.ts +1 -0
  273. package/ui/src/@/net/svc/index.ts +3 -0
  274. package/ui/src/@/net/svc/origin.ts +8 -0
  275. package/ui/src/@/net/svc/query.test.ts +45 -0
  276. package/ui/src/@/net/svc/query.ts +25 -0
  277. package/ui/src/@/passkeys/index.ts +1 -0
  278. package/ui/src/@/passkeys/svc/add.ts +15 -0
  279. package/ui/src/@/passkeys/svc/create.ts +58 -0
  280. package/ui/src/@/passkeys/svc/credentials/convert.ts +32 -0
  281. package/ui/src/@/passkeys/svc/credentials/create.ts +34 -0
  282. package/ui/src/@/passkeys/svc/credentials/get.ts +14 -0
  283. package/ui/src/@/passkeys/svc/credentials/index.ts +3 -0
  284. package/ui/src/@/passkeys/svc/credentials/key.ts +10 -0
  285. package/ui/src/@/passkeys/svc/get.ts +10 -0
  286. package/ui/src/@/passkeys/svc/index.ts +6 -0
  287. package/ui/src/@/passkeys/svc/net/CreationResponse.ts +15 -0
  288. package/ui/src/@/passkeys/svc/net/Passkey.ts +8 -0
  289. package/ui/src/@/passkeys/svc/net/RequestResponse.ts +12 -0
  290. package/ui/src/@/passkeys/svc/net/challenges/Options.ts +21 -0
  291. package/ui/src/@/passkeys/svc/net/challenges/index.ts +2 -0
  292. package/ui/src/@/passkeys/svc/net/challenges/interface.ts +16 -0
  293. package/ui/src/@/passkeys/svc/net/index.ts +4 -0
  294. package/ui/src/@/passkeys/svc/net/interface.ts +29 -0
  295. package/ui/src/@/passkeys/svc/remove.ts +13 -0
  296. package/ui/src/@/passkeys/svc/request.ts +50 -0
  297. package/ui/src/@/passkeys/svc/store.ts +13 -0
  298. package/ui/src/@/passkeys/svc/supported.ts +1 -0
  299. package/ui/src/@/passkeys/ui/aaguid.json +150 -0
  300. package/ui/src/@/realtime/events.ts +1 -0
  301. package/ui/src/@/realtime/index.ts +1 -0
  302. package/ui/src/@/realtime/rc.ts +13 -0
  303. package/ui/src/@/realtime/svc/connect.ts +67 -0
  304. package/ui/src/@/realtime/svc/events.ts +17 -0
  305. package/ui/src/@/realtime/svc/index.ts +5 -0
  306. package/ui/src/@/realtime/svc/net/Message.ts +6 -0
  307. package/ui/src/@/realtime/svc/net/index.ts +2 -0
  308. package/ui/src/@/realtime/svc/net/interface.ts +13 -0
  309. package/ui/src/@/realtime/svc/reset.ts +5 -0
  310. package/ui/src/@/realtime/svc/status.ts +12 -0
  311. package/ui/src/@/realtime/svc/store.ts +30 -0
  312. package/ui/src/@/realtime/svc/time.ts +15 -0
  313. package/ui/src/app.d.ts +20 -0
  314. package/ui/src/app.html +13 -0
  315. package/ui/src/config/index.ts +70 -0
  316. package/ui/src/lib/assets/favicon.svg +1 -0
  317. package/ui/src/lib/components/clipboard/Clipboard.svelte +63 -0
  318. package/ui/src/lib/components/clipboard/Clipboard.ts +12 -0
  319. package/ui/src/lib/components/clipboard/index.ts +1 -0
  320. package/ui/src/lib/components/dismissable/Dismissable.svelte +81 -0
  321. package/ui/src/lib/components/dismissable/Dismissable.ts +7 -0
  322. package/ui/src/lib/components/dismissable/index.ts +1 -0
  323. package/ui/src/lib/components/dropdown/Back.svelte +14 -0
  324. package/ui/src/lib/components/dropdown/Back.ts +3 -0
  325. package/ui/src/lib/components/dropdown/Content.svelte +76 -0
  326. package/ui/src/lib/components/dropdown/Content.ts +13 -0
  327. package/ui/src/lib/components/dropdown/Context.ts +18 -0
  328. package/ui/src/lib/components/dropdown/Group.svelte +24 -0
  329. package/ui/src/lib/components/dropdown/Group.ts +8 -0
  330. package/ui/src/lib/components/dropdown/GroupContext.ts +15 -0
  331. package/ui/src/lib/components/dropdown/Item.svelte +31 -0
  332. package/ui/src/lib/components/dropdown/Item.ts +5 -0
  333. package/ui/src/lib/components/dropdown/Layer.svelte +11 -0
  334. package/ui/src/lib/components/dropdown/Layer.ts +7 -0
  335. package/ui/src/lib/components/dropdown/Root.svelte +88 -0
  336. package/ui/src/lib/components/dropdown/Root.ts +6 -0
  337. package/ui/src/lib/components/dropdown/Separator.svelte +13 -0
  338. package/ui/src/lib/components/dropdown/Separator.ts +5 -0
  339. package/ui/src/lib/components/dropdown/Trigger.svelte +33 -0
  340. package/ui/src/lib/components/dropdown/Trigger.ts +5 -0
  341. package/ui/src/lib/components/dropdown/index.ts +8 -0
  342. package/ui/src/lib/components/fullscreen/Fullscreen.svelte +97 -0
  343. package/ui/src/lib/components/fullscreen/Fullscreen.ts +18 -0
  344. package/ui/src/lib/components/fullscreen/Overlay.svelte +15 -0
  345. package/ui/src/lib/components/fullscreen/Overlay.ts +7 -0
  346. package/ui/src/lib/components/fullscreen/index.ts +2 -0
  347. package/ui/src/lib/components/hold/Hold.svelte +133 -0
  348. package/ui/src/lib/components/hold/Hold.ts +23 -0
  349. package/ui/src/lib/components/hold/index.ts +1 -0
  350. package/ui/src/lib/components/scrollable/Scrollable.svelte +49 -0
  351. package/ui/src/lib/components/scrollable/Scrollable.ts +117 -0
  352. package/ui/src/lib/components/scrollable/index.ts +2 -0
  353. package/ui/src/lib/components/shake/Shake.svelte +62 -0
  354. package/ui/src/lib/components/shake/Shake.ts +7 -0
  355. package/ui/src/lib/components/shake/index.ts +1 -0
  356. package/ui/src/lib/components/share/Share.svelte +58 -0
  357. package/ui/src/lib/components/share/Share.ts +9 -0
  358. package/ui/src/lib/components/share/index.ts +1 -0
  359. package/ui/src/lib/components/shell/Attention.svelte +11 -0
  360. package/ui/src/lib/components/shell/Attention.ts +6 -0
  361. package/ui/src/lib/components/shell/Header.svelte +18 -0
  362. package/ui/src/lib/components/shell/Header.ts +7 -0
  363. package/ui/src/lib/components/shell/Screen.svelte +28 -0
  364. package/ui/src/lib/components/shell/Screen.ts +11 -0
  365. package/ui/src/lib/components/shell/Sticky.svelte +23 -0
  366. package/ui/src/lib/components/shell/Sticky.ts +8 -0
  367. package/ui/src/lib/components/shell/Underlay.svelte +21 -0
  368. package/ui/src/lib/components/shell/Underlay.ts +6 -0
  369. package/ui/src/lib/components/shell/index.ts +6 -0
  370. package/ui/src/lib/components/shell/nav/Actions.svelte +31 -0
  371. package/ui/src/lib/components/shell/nav/Actions.ts +16 -0
  372. package/ui/src/lib/components/shell/nav/Back.svelte +20 -0
  373. package/ui/src/lib/components/shell/nav/Back.ts +9 -0
  374. package/ui/src/lib/components/shell/nav/Bar.svelte +24 -0
  375. package/ui/src/lib/components/shell/nav/Bar.ts +3 -0
  376. package/ui/src/lib/components/shell/nav/Button.svelte +64 -0
  377. package/ui/src/lib/components/shell/nav/Button.ts +7 -0
  378. package/ui/src/lib/components/shell/nav/Nav.svelte +62 -0
  379. package/ui/src/lib/components/shell/nav/Nav.ts +35 -0
  380. package/ui/src/lib/components/shell/nav/Return.svelte +29 -0
  381. package/ui/src/lib/components/shell/nav/Return.ts +15 -0
  382. package/ui/src/lib/components/shell/nav/Sections.svelte +58 -0
  383. package/ui/src/lib/components/shell/nav/Sections.ts +6 -0
  384. package/ui/src/lib/components/shell/nav/Toolbar.svelte +73 -0
  385. package/ui/src/lib/components/shell/nav/Toolbar.ts +3 -0
  386. package/ui/src/lib/components/shell/nav/history.ts +36 -0
  387. package/ui/src/lib/components/shell/nav/index.ts +5 -0
  388. package/ui/src/lib/components/shell/nav/store.ts +24 -0
  389. package/ui/src/lib/components/ui/alert/alert-action.svelte +20 -0
  390. package/ui/src/lib/components/ui/alert/alert-description.svelte +23 -0
  391. package/ui/src/lib/components/ui/alert/alert-title.svelte +23 -0
  392. package/ui/src/lib/components/ui/alert/alert.svelte +43 -0
  393. package/ui/src/lib/components/ui/alert/index.ts +17 -0
  394. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte +27 -0
  395. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte +27 -0
  396. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte +32 -0
  397. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte +17 -0
  398. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte +23 -0
  399. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte +20 -0
  400. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-media.svelte +20 -0
  401. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte +17 -0
  402. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-portal.svelte +7 -0
  403. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte +17 -0
  404. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-trigger.svelte +7 -0
  405. package/ui/src/lib/components/ui/alert-dialog/alert-dialog.svelte +7 -0
  406. package/ui/src/lib/components/ui/alert-dialog/index.ts +40 -0
  407. package/ui/src/lib/components/ui/badge/badge.svelte +49 -0
  408. package/ui/src/lib/components/ui/badge/index.ts +2 -0
  409. package/ui/src/lib/components/ui/button/button.svelte +82 -0
  410. package/ui/src/lib/components/ui/button/index.ts +17 -0
  411. package/ui/src/lib/components/ui/button-group/button-group-separator.svelte +23 -0
  412. package/ui/src/lib/components/ui/button-group/button-group-text.svelte +28 -0
  413. package/ui/src/lib/components/ui/button-group/button-group.svelte +46 -0
  414. package/ui/src/lib/components/ui/button-group/index.ts +15 -0
  415. package/ui/src/lib/components/ui/card/card-action.svelte +23 -0
  416. package/ui/src/lib/components/ui/card/card-content.svelte +20 -0
  417. package/ui/src/lib/components/ui/card/card-description.svelte +20 -0
  418. package/ui/src/lib/components/ui/card/card-footer.svelte +20 -0
  419. package/ui/src/lib/components/ui/card/card-header.svelte +23 -0
  420. package/ui/src/lib/components/ui/card/card-title.svelte +20 -0
  421. package/ui/src/lib/components/ui/card/card.svelte +22 -0
  422. package/ui/src/lib/components/ui/card/index.ts +25 -0
  423. package/ui/src/lib/components/ui/checkbox/checkbox.svelte +39 -0
  424. package/ui/src/lib/components/ui/checkbox/index.ts +6 -0
  425. package/ui/src/lib/components/ui/collapsible/collapsible-content.svelte +7 -0
  426. package/ui/src/lib/components/ui/collapsible/collapsible-trigger.svelte +7 -0
  427. package/ui/src/lib/components/ui/collapsible/collapsible.svelte +20 -0
  428. package/ui/src/lib/components/ui/collapsible/index.ts +13 -0
  429. package/ui/src/lib/components/ui/input/index.ts +7 -0
  430. package/ui/src/lib/components/ui/input/input.svelte +48 -0
  431. package/ui/src/lib/components/ui/input-otp/index.ts +15 -0
  432. package/ui/src/lib/components/ui/input-otp/input-otp-group.svelte +20 -0
  433. package/ui/src/lib/components/ui/input-otp/input-otp-separator.svelte +27 -0
  434. package/ui/src/lib/components/ui/input-otp/input-otp-slot.svelte +31 -0
  435. package/ui/src/lib/components/ui/input-otp/input-otp.svelte +23 -0
  436. package/ui/src/lib/components/ui/item/index.ts +34 -0
  437. package/ui/src/lib/components/ui/item/item-actions.svelte +20 -0
  438. package/ui/src/lib/components/ui/item/item-content.svelte +23 -0
  439. package/ui/src/lib/components/ui/item/item-description.svelte +23 -0
  440. package/ui/src/lib/components/ui/item/item-footer.svelte +20 -0
  441. package/ui/src/lib/components/ui/item/item-group.svelte +21 -0
  442. package/ui/src/lib/components/ui/item/item-header.svelte +20 -0
  443. package/ui/src/lib/components/ui/item/item-media.svelte +42 -0
  444. package/ui/src/lib/components/ui/item/item-separator.svelte +19 -0
  445. package/ui/src/lib/components/ui/item/item-title.svelte +20 -0
  446. package/ui/src/lib/components/ui/item/item.svelte +61 -0
  447. package/ui/src/lib/components/ui/kbd/index.ts +10 -0
  448. package/ui/src/lib/components/ui/kbd/kbd-group.svelte +20 -0
  449. package/ui/src/lib/components/ui/kbd/kbd.svelte +23 -0
  450. package/ui/src/lib/components/ui/label/index.ts +7 -0
  451. package/ui/src/lib/components/ui/label/label.svelte +20 -0
  452. package/ui/src/lib/components/ui/progress/index.ts +7 -0
  453. package/ui/src/lib/components/ui/progress/progress.svelte +27 -0
  454. package/ui/src/lib/components/ui/select/index.ts +37 -0
  455. package/ui/src/lib/components/ui/select/select-content.svelte +45 -0
  456. package/ui/src/lib/components/ui/select/select-group-heading.svelte +21 -0
  457. package/ui/src/lib/components/ui/select/select-group.svelte +17 -0
  458. package/ui/src/lib/components/ui/select/select-item.svelte +40 -0
  459. package/ui/src/lib/components/ui/select/select-label.svelte +20 -0
  460. package/ui/src/lib/components/ui/select/select-portal.svelte +7 -0
  461. package/ui/src/lib/components/ui/select/select-scroll-down-button.svelte +20 -0
  462. package/ui/src/lib/components/ui/select/select-scroll-up-button.svelte +20 -0
  463. package/ui/src/lib/components/ui/select/select-separator.svelte +18 -0
  464. package/ui/src/lib/components/ui/select/select-trigger.svelte +29 -0
  465. package/ui/src/lib/components/ui/select/select.svelte +11 -0
  466. package/ui/src/lib/components/ui/separator/index.ts +7 -0
  467. package/ui/src/lib/components/ui/separator/separator.svelte +23 -0
  468. package/ui/src/lib/components/ui/spinner/index.ts +1 -0
  469. package/ui/src/lib/components/ui/spinner/spinner.svelte +18 -0
  470. package/ui/src/lib/components/ui/tabs/index.ts +18 -0
  471. package/ui/src/lib/components/ui/tabs/tabs-content.svelte +17 -0
  472. package/ui/src/lib/components/ui/tabs/tabs-list.svelte +40 -0
  473. package/ui/src/lib/components/ui/tabs/tabs-trigger.svelte +23 -0
  474. package/ui/src/lib/components/ui/tabs/tabs.svelte +19 -0
  475. package/ui/src/lib/components/ui/textarea/index.ts +7 -0
  476. package/ui/src/lib/components/ui/textarea/textarea.svelte +22 -0
  477. package/ui/src/lib/intl/bcp.ts +25 -0
  478. package/ui/src/lib/intl/built.js +18 -0
  479. package/ui/src/lib/intl/context.yaml +18 -0
  480. package/ui/src/lib/intl/en-US.yaml +6 -0
  481. package/ui/src/lib/intl/index.ts +65 -0
  482. package/ui/src/lib/intl/types.ts +19 -0
  483. package/ui/src/lib/tools/ago.ts +10 -0
  484. package/ui/src/lib/tools/assert.ts +3 -0
  485. package/ui/src/lib/tools/cap.ts +5 -0
  486. package/ui/src/lib/tools/clicks.ts +25 -0
  487. package/ui/src/lib/tools/contextmenu.ts +19 -0
  488. package/ui/src/lib/tools/convert.ts +32 -0
  489. package/ui/src/lib/tools/currency.test.ts +10 -0
  490. package/ui/src/lib/tools/currency.ts +55 -0
  491. package/ui/src/lib/tools/date.test.ts +21 -0
  492. package/ui/src/lib/tools/date.ts +35 -0
  493. package/ui/src/lib/tools/delay.ts +7 -0
  494. package/ui/src/lib/tools/image.ts +39 -0
  495. package/ui/src/lib/tools/index.ts +20 -0
  496. package/ui/src/lib/tools/location.ts +41 -0
  497. package/ui/src/lib/tools/metronome.ts +11 -0
  498. package/ui/src/lib/tools/mq.ts +84 -0
  499. package/ui/src/lib/tools/onsubmit.ts +21 -0
  500. package/ui/src/lib/tools/random.ts +15 -0
  501. package/ui/src/lib/tools/search.ts +25 -0
  502. package/ui/src/lib/tools/timeout.ts +26 -0
  503. package/ui/src/lib/tools/transition.ts +207 -0
  504. package/ui/src/lib/tools/types.ts +3 -0
  505. package/ui/src/lib/tools/uuid.test.ts +28 -0
  506. package/ui/src/lib/tools/uuid.ts +9 -0
  507. package/ui/src/lib/typeset.css +502 -0
  508. package/ui/src/lib/utils.ts +12 -0
  509. package/ui/src/routes/(private)/+layout.svelte +112 -0
  510. package/ui/src/routes/(private)/+page.svelte +7 -0
  511. package/ui/src/routes/(private)/[component]/+page.svelte +77 -0
  512. package/ui/src/routes/+layout.svelte +25 -0
  513. package/ui/src/routes/+layout.ts +14 -0
  514. package/ui/src/routes/layout.css +232 -0
  515. package/ui/static/robots.txt +3 -0
  516. package/ui/svelte.config.js +36 -0
  517. package/ui/tools/feat.js +43 -0
  518. package/ui/tools/hooks/README.md +13 -0
  519. package/ui/tools/hooks/guard-intl.sh +40 -0
  520. package/ui/tools/shad.js +7 -0
  521. package/ui/tsconfig.json +20 -0
  522. package/ui/vite.config.ts +8 -0
@@ -0,0 +1,69 @@
1
+ # realtime
2
+
3
+ Server-pushed event stream layered on `@toa.io/origin` multipart. `connect(id)` opens a long-running multipart POST to `/presence/{id}/`, parses each chunk into a typed event, and re-emits it on a `mitt` bus. `rc()` ties the connection lifecycle to `@/iam`'s `authenticated` derived: connects with the current account id on sign-in, disconnects on sign-out, reconnects automatically on errors. Exposes a `dashboard` store (`status` + last 128 events), a `time` store (server clock — updated from `origin` response `Date` headers), and the `events` emitter for domain modules to subscribe to.
4
+
5
+ ## Wiring
6
+
7
+ Both `@/iam` and `@/realtime` install `rc()` bootstraps that must run once in the browser. Call them from the root `+layout.ts`:
8
+
9
+ ```ts
10
+ import { rc as iam } from '@/iam/rc'
11
+ import { rc as realtime } from '@/realtime/rc'
12
+ import { browser } from '$app/environment'
13
+
14
+ if (browser) {
15
+ iam()
16
+ realtime()
17
+ }
18
+ ```
19
+
20
+ ## Domain events
21
+
22
+ `svc/events.ts` declares `Events = Record<string, unknown> // add domain events here`. Extend it per domain so the emitter is typed end-to-end. Convention: every domain that publishes server events exposes an `Events` type from `@/<domain>/svc/net` and the host intersects them:
23
+
24
+ ```ts
25
+ // src/@/realtime/svc/events.ts (edit after install)
26
+ import type { Events as Contacts } from '@/contacts/svc/net'
27
+ import type { Events as Notifications } from '@/notifications/svc/net'
28
+
29
+ export type Events = Contacts & Notifications
30
+ ```
31
+
32
+ Subscribe in any domain's store:
33
+
34
+ ```ts
35
+ import { events } from '@/realtime'
36
+
37
+ events.on('contact.added', (data) => { /* … */ })
38
+ ```
39
+
40
+ ## Notes
41
+
42
+ - **Backend contract.** `/presence/{id}/` must return `multipart/mixed` per `@toa.io/origin` multipart: first part `"ACK"`, then JSON parts of shape `{ event, data }` or the literal string `"heartbeat"`, terminated by `"FIN"`. The Solution forces `credentials: 'include'` and sends `{ timezone }` in the body.
43
+ - **Auto-reconnect.** Errors other than `AbortError` retry after 3 s. `disconnect()` (or sign-out via `rc()`) aborts the in-flight request.
44
+ - **`time` store.** Seeded with `Date.now()` and updated on every `origin` response — handy for clock skew correction in UI relative timestamps.
45
+
46
+ ## Usage
47
+
48
+ Read connection status and the last events for a debug panel:
49
+
50
+ ```svelte
51
+ <script lang="ts">
52
+ import { dashboard } from '@/realtime'
53
+ </script>
54
+
55
+ <p>Status: {$dashboard.status}</p>
56
+ <ul>
57
+ {#each $dashboard.events as e (e)}
58
+ <li>{e.label}: {JSON.stringify(e.payload)}</li>
59
+ {/each}
60
+ </ul>
61
+ ```
62
+
63
+ Subscribe to a typed event:
64
+
65
+ ```ts
66
+ import { events } from '@/realtime'
67
+
68
+ events.on('heartbeat', () => console.debug('alive'))
69
+ ```
@@ -0,0 +1,39 @@
1
+ # Scrollable
2
+
3
+ Horizontal snap scroller with optional infinite loop and programmatic scroll-to-index. Give each child `snap-center` or `snap-start` (and fixed width) for predictable snapping.
4
+
5
+ ## Usage
6
+
7
+ ```svelte
8
+ <script lang="ts">
9
+ import { Scrollable } from '$com/scrollable'
10
+
11
+ let index = $state(0)
12
+ const items = ['One', 'Two', 'Three']
13
+ </script>
14
+
15
+ <Scrollable scroll={index} class="gap-2">
16
+ {#each items as item, i (item)}
17
+ <button class="snap-center shrink-0 rounded-lg border px-4 py-2" onclick={() => (index = i)}>
18
+ {item}
19
+ </button>
20
+ {/each}
21
+ </Scrollable>
22
+ ```
23
+
24
+ ## Props
25
+
26
+ | Prop | Type | Default | Notes |
27
+ | ------------ | ------------------------ | --------- | --------------------------------------------------------------------- |
28
+ | `children` | `Snippet` | — | Scroll items. Duplicated internally when `infinite` is true. |
29
+ | `infinite` | `boolean` | `false` | Loop by cloning children; recenters on `scrollend`. |
30
+ | `align` | `'start' \| 'center'` | `'start'` | How `scroll` index is positioned. |
31
+ | `scroll` | `number` | `0` | Child index to scroll to. Use `-1` to skip initial scroll. |
32
+ | `bleed` | `boolean` | `false` | Break out to full viewport width (edge-to-edge carousel). |
33
+ | `gutter` | `boolean` | `false` | Half-track end gutters so the first/last item can sit dead-center. Pairs with `align="center"`; ignored when `infinite`. |
34
+ | `controlled` | `boolean` | `false` | Hide native overflow; drive scroll externally. |
35
+ | `dir` | `'ltr' \| 'rtl'` | — | Direction on the outer container. |
36
+ | `class` | `ClassValue` | — | Classes on the scroll track (gap, padding, etc.). |
37
+ | `style` | `string` | — | Inline style on the outer container. |
38
+ | `id` | `string` | — | Id on the scroll track. |
39
+ | `onscroll` | `(e: Event) => void` | — | Scroll handler on the track. |
@@ -0,0 +1,71 @@
1
+ # Selector
2
+
3
+ Card-style option list for single- or multi-choice selection. Import as a namespace (`import * as Selector from '$com/selector'`).
4
+
5
+ ## Usage
6
+
7
+ ```svelte
8
+ <script lang="ts">
9
+ import * as Selector from '$com/selector'
10
+
11
+ let value = $state('')
12
+ let values = $state<string[]>([])
13
+ </script>
14
+
15
+ <Selector.Root bind:value>
16
+ <Selector.Option value="yearly">
17
+ <Selector.Title>
18
+ <strong>Yearly</strong>
19
+ 129,99€ per year
20
+ </Selector.Title>
21
+ <Selector.Description>32€ monthly</Selector.Description>
22
+ </Selector.Option>
23
+ <Selector.Option value="monthly">
24
+ <Selector.Title>
25
+ <strong>Monthly</strong>
26
+ 29,99€ per month
27
+ </Selector.Title>
28
+ <Selector.Description>Flexible, slightly pricier</Selector.Description>
29
+ </Selector.Option>
30
+ </Selector.Root>
31
+
32
+ <Selector.Root bind:values type="multi" position="end">
33
+ <Selector.Option value="notifications">
34
+ <Selector.Title>Notifications</Selector.Title>
35
+ <Selector.Description>Email and push alerts</Selector.Description>
36
+ </Selector.Option>
37
+ </Selector.Root>
38
+ ```
39
+
40
+ ## Notes
41
+
42
+ More than one `Selector.Root` on the same page with overlapping option `value`s needs a unique `id` on each root (e.g. `id="billing"` / `id="addons"`).
43
+
44
+ ## Props
45
+
46
+ ### Root
47
+
48
+ | Prop | Type | Default | Notes |
49
+ | ---------- | --------------------- | --------- | -------------------------------------------------- |
50
+ | `id` | `string` | `'radio'` | Prefix for each option’s control/label id. |
51
+ | `type` | `'single' \| 'multi'` | `'single'`| Single uses radio group; multi uses checkboxes. |
52
+ | `value` | `string` | `''` | Bindable selection for `type="single"`. |
53
+ | `values` | `string[]` | `[]` | Bindable selection for `type="multi"`. |
54
+ | `position` | `'start' \| 'end'` | `'start'` | Indicator column: leading media or trailing actions. |
55
+ | `variant` | `ItemVariant` | `'outline'` | Forwarded to each `Option` row. |
56
+ | `size` | `ItemSize` | — | Forwarded to each `Option` row. |
57
+ | `class` | `ClassValue` | — | Wrapper classes (`single` mode radio group only). |
58
+ | `children` | `Snippet` | — | `Option` slots. |
59
+
60
+ ### Option
61
+
62
+ | Prop | Type | Default | Notes |
63
+ | ---------- | --------- | ------- | ------------------------------------------ |
64
+ | `value` | `string` | — | Option id stored in `value` / `values`. |
65
+ | `id` | `string` | `{rootId}-{value}` | Override control/label id for this row. |
66
+ | `class` | `ClassValue` | — | Row classes. |
67
+ | `children` | `Snippet` | — | `Title` and `Description` slots. |
68
+
69
+ ### Title / Description
70
+
71
+ Pass through shadcn `Item` title and description props (`class`, etc.).
@@ -0,0 +1,36 @@
1
+ # Shake
2
+
3
+ ## Notes
4
+
5
+ Use for obvious failures on small forms where error copy adds little value — e.g. a wrong password is already clear from context. Prefer a real error message when the user needs to know *what* went wrong.
6
+
7
+ ## Usage
8
+
9
+ ```svelte
10
+ <script lang="ts">
11
+ import { Shake } from '$com/shake'
12
+
13
+ let shake: { shake: () => Promise<void> } | undefined = $state()
14
+ </script>
15
+
16
+ <Shake bind:this={shake} class="w-full">
17
+ <input type="password" />
18
+ </Shake>
19
+
20
+ <button onclick={() => shake?.shake()}>Retry</button>
21
+ ```
22
+
23
+ ## Props
24
+
25
+ | Prop | Type | Default | Notes |
26
+ | ---------- | ------------ | ------- | ------------------------------ |
27
+ | `children` | `Snippet` | — | Content that shakes. |
28
+ | `class` | `ClassValue` | — | Classes on the wrapper `div`. |
29
+
30
+ ## Instance methods
31
+
32
+ Bind with `bind:this` to trigger the animation:
33
+
34
+ | Method | Notes |
35
+ | ---------- | ------------------------------------------ |
36
+ | `shake()` | Plays the shake; resolves when it finishes. |
@@ -0,0 +1,28 @@
1
+ # Share
2
+
3
+ Invokes the Web Share API when `navigator.share` exists; otherwise renders `Clipboard` with the share URL so desktop users can still copy the link.
4
+
5
+ `data` may be a `ShareData` object or an async retriever (e.g. fetch an invite URL first). Returns early when the retriever resolves to `null`.
6
+
7
+ ## Usage
8
+
9
+ ```svelte
10
+ <script lang="ts">
11
+ import { Share } from '$com/share'
12
+
13
+ const data = { title: 'Join me', url: 'https://example.com/join/abc' }
14
+ </script>
15
+
16
+ <Share {data} label="Share invite" variant="outline" />
17
+ ```
18
+
19
+ ## Props
20
+
21
+ | Prop | Type | Default | Notes |
22
+ | --------- | ----------------------------------------- | ------- | ------------------------------------------------------------ |
23
+ | `data` | `ShareData \| () => Promise<ShareData \| null>` | — | Payload for `navigator.share`. Retriever may return `null`. |
24
+ | `label` | `string` | — | Button label when no `children` snippet. |
25
+ | `onshare` | `() => void` | — | Fires after share (or clipboard fallback copy). |
26
+ | `children`| `Snippet` | — | Custom button content; replaces icon + label. |
27
+
28
+ All other props pass through to the underlying `Button` (or `Clipboard` on unsupported browsers).
@@ -0,0 +1,139 @@
1
+ # Shell
2
+
3
+ ## Notes
4
+
5
+ `Screen` and `Nav` lay out against `env(safe-area-inset-*)`, which stays zero unless the viewport opts in. Add `viewport-fit=cover` to the viewport meta in `src/app.html`:
6
+
7
+ ```html
8
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
9
+ ```
10
+
11
+ Safari 26 on iOS also keeps its bottom toolbar translucent only while page content reaches the bottom edge — `Nav` holds itself 6px above it for that.
12
+
13
+ ## Usage
14
+
15
+ Root layout with section nav:
16
+
17
+ ```svelte
18
+ <script lang="ts">
19
+ import { Screen, Nav, type Section } from '$com/shell'
20
+ import { House } from '@lucide/svelte'
21
+
22
+ const sections: Section[] = [
23
+ { id: 'home', href: '/', label: 'Home', Icon: House },
24
+ ]
25
+
26
+ let { children } = $props()
27
+ </script>
28
+
29
+ <Screen>
30
+ {@render children()}
31
+ <Nav {sections} underlay />
32
+ </Screen>
33
+ ```
34
+
35
+ Nested route — show back instead of tabs:
36
+
37
+ ```svelte
38
+ <script lang="ts">
39
+ import { Return } from '$com/shell'
40
+ </script>
41
+
42
+ <Return href=".." />
43
+ ```
44
+
45
+ ## `back` / `jump`
46
+
47
+ History-aware navigation for nested routes and editors. Both use the [Navigation API](https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API) session stack; when the stack cannot satisfy the request, they fall back to SvelteKit `goto(href)`.
48
+
49
+ **Why not plain `goto`?** A SPA that pushes a new history entry on every screen builds a long back chain. Users expect Back to undo their recent steps (and to keep scroll position / in-app transitions). `back` and `jump` prefer real history moves so the browser — and your shell — behave like a native app.
50
+
51
+ ### `back(href)`
52
+
53
+ Go back one step when possible; otherwise navigate to `href`.
54
+
55
+ Use when closing a nested screen, cancelling an editor, or deleting an item — anywhere `<Return href="…" />` would go, but triggered from code:
56
+
57
+ ```svelte
58
+ <script lang="ts">
59
+ import { back } from '$com/shell'
60
+
61
+ async function onDelete() {
62
+ await deleteItem(id)
63
+ await back(`/items/${parentId}/`)
64
+ }
65
+ </script>
66
+ ```
67
+
68
+ If the user landed via deep link (nothing to pop), `back` opens `href` instead of doing nothing.
69
+
70
+ ### `jump(href)`
71
+
72
+ Return to a URL already visited earlier in this session — without pushing another entry.
73
+
74
+ Walks the session history backwards, finds the nearest prior entry whose path matches `href`, and calls `history.go(-n)`. If no match (or the match is too far back), falls back to `goto(href)`.
75
+
76
+ Use after save/complete when the target list or detail page is already on the stack — e.g. editor → save → land on the list the user came from, skipping intermediate steps:
77
+
78
+ ```svelte
79
+ <script lang="ts">
80
+ import { jump } from '$com/shell'
81
+
82
+ async function onSaved() {
83
+ await save(data)
84
+ await jump('/contacts/')
85
+ }
86
+ </script>
87
+ ```
88
+
89
+ Typical split: **`back`** for “undo my last navigation” (one step, parent route); **`jump`** for “take me to that earlier screen” (possibly several steps, exact URL).
90
+
91
+ ## Exports
92
+
93
+ | Export | Role |
94
+ | -------------- | ----------------------------------------------------------------------- |
95
+ | `Screen` | Page wrapper with safe-area insets and optional iOS status-bar underlay |
96
+ | `Header` | Sticky top bar with blur |
97
+ | `Nav` | Fixed bottom bar: sections, back, toolbar |
98
+ | `Return` | Registers a back button in `Nav` for the current route |
99
+ | `Actions` | Registers toolbar snippets in `Nav` |
100
+ | `Attention` | Small constructive dot (e.g. unseen badge on nav item) |
101
+ | `Underlay` | Gradient fade under fixed chrome |
102
+ | `Sticky` | Sticky top/bottom bar over a blurred `Underlay` (e.g. a pinned action bar) |
103
+ | `Section` | Type for nav tab config |
104
+ | `back`, `jump` | History-aware navigation — see above |
105
+
106
+ ## Nav sections
107
+
108
+ Each `Section` has `id`, `href`, `label`, `Icon` (Lucide component), optional `nested` path prefixes, optional `unseen` badge.
109
+
110
+ When the current path is nested under an active section, other tabs collapse and a back chevron returns to the section root.
111
+
112
+ ## Props
113
+
114
+ ### `Screen`
115
+
116
+ | Prop | Type | Default | Notes |
117
+ | ---------- | --------- | ------- | -------------------------------- |
118
+ | `underlay` | `boolean` | `true` | iOS status-bar gradient underlay |
119
+ | `unsafe` | `boolean` | `false` | Skip safe-area padding |
120
+
121
+ ### `Nav`
122
+
123
+ | Prop | Type | Default | Notes |
124
+ | ---------- | ------------------------------ | --------- | ----------------------------------- |
125
+ | `sections` | `Section[]` | `[]` | Bottom tab config |
126
+ | `position` | `'start' \| 'center' \| 'end'` | `'start'` | Toolbar side; also flips bar layout |
127
+ | `underlay` | `boolean` | `false` | Gradient fade behind the bar |
128
+
129
+ ### `Return`
130
+
131
+ | Prop | Type | Default | Notes |
132
+ | ------ | -------- | ------- | ---------------------------------------------- |
133
+ | `href` | `string` | `'..'` | Passed to `back()` when history cannot go back |
134
+
135
+ ### `Actions`
136
+
137
+ | Prop | Type | Default | Notes |
138
+ | -------- | ------------------- | ------- | -------------------------------------------- |
139
+ | `active` | `Writable<boolean>` | — | When true, fades nav items (e.g. modal open) |
@@ -0,0 +1,53 @@
1
+ # Stack
2
+
3
+ Collapsible card stack with view-transition morphs. Click the stack (or press Enter/Space on the root) to expand; bind `collapsed` or call `collapse()` / `expand()` / `toggle()` on a `Root` ref. Each `Item` needs a stable `id` for transition names.
4
+
5
+ ## Usage
6
+
7
+ ```svelte
8
+ <script lang="ts">
9
+ import * as Stack from '$com/stack'
10
+ import { Button } from '$ui/button'
11
+
12
+ let stack: ReturnType<typeof Stack.Root> | undefined
13
+ </script>
14
+
15
+ <Stack.Root bind:this={stack}>
16
+ {#each items as item (item.id)}
17
+ <Stack.Item id={item.id}>
18
+ <Card>{item.title}</Card>
19
+ </Stack.Item>
20
+ {/each}
21
+ <Stack.Toolbar>
22
+ <Button variant="ghost" size="sm" onclick={() => stack?.collapse()}>Collapse</Button>
23
+ </Stack.Toolbar>
24
+ </Stack.Root>
25
+ ```
26
+
27
+ ## Props
28
+
29
+ ### Root
30
+
31
+ | Prop | Type | Default | Notes |
32
+ | ----------- | ------------- | ------- | --------------------------------------------------------------------- |
33
+ | `children` | `Snippet` | — | `Item` and optional `Toolbar` slots. |
34
+ | `collapsed` | `boolean` | `true` | Bindable. When true and item count ≥ `min`, cards stack visually. |
35
+ | `min` | `number` | `3` | Minimum items before the stacked collapsed layout applies. |
36
+ | `class` | `ClassValue` | — | Root container classes. |
37
+
38
+ **Methods** (via `bind:this`): `toggle(on?)`, `expand()`, `collapse()`.
39
+
40
+ ### Item
41
+
42
+ | Prop | Type | Default | Notes |
43
+ | ---------- | --------- | ------- | ------------------------------------------ |
44
+ | `children` | `Snippet` | — | Card content. |
45
+ | `id` | `string` | — | Stable key for `view-transition-name`. |
46
+ | `class` | `ClassValue` | — | Wrapper classes. |
47
+
48
+ ### Toolbar
49
+
50
+ | Prop | Type | Default | Notes |
51
+ | ---------- | ------------ | ------- | ------------------------------------------------------------ |
52
+ | `children` | `Snippet` | — | Shown only when expanded and stacked (≥ `min` items). |
53
+ | `class` | `ClassValue` | — | Wrapper classes. |
@@ -0,0 +1,149 @@
1
+ # system
2
+
3
+ The app's browser/OS platform layer — the counterpart to `shell`/`bridge` for system integration (service-worker lifecycle, updates, offline shell, in-app-webview escape). Its first capability is transparent, user-controlled updates: an installed PWA sees the new version download with live progress, gets a one-tap install control when ready, and restarts cleanly into it. The app version is derived from a bundled `changelog` mount — the same source that feeds the in-app release notes — so the version a user sees, the notes they read, and the build they get never drift.
4
+
5
+ ## Version identity & ordering
6
+
7
+ The version is the build's **commit short-hash** (e.g. `f3a9c21`), used verbatim as the changelog key, the git release tag, and the on-screen version — so a version you see traces straight to its source with `git show <version>`. It is separate from `$service-worker.version` (the per-build hash), which the worker uses only for its cache name.
8
+
9
+ Chronological order lives in each entry's `timestamp` (Unix milliseconds): the history sort, the pre-apply update delta, and the running-build baseline all compare `timestamp`. The running build exposes both identities:
10
+
11
+ | Constant | Type | Meaning |
12
+ | --- | --- | --- |
13
+ | `version` | `string` | the running build's hash — for display / logging / the SW broadcast |
14
+ | `timestamp` | `number` | the running build's release time — the ordering signal |
15
+
16
+ `timestamp` is stored in svintl as a digit string and read back as a `number`. A fresh install with no releases yet shows a friendly empty state — key `0000000`, headline `Hello`, no date — which the first merged release replaces.
17
+
18
+ ## Setup
19
+
20
+ Solution-level wiring that feeds the update store the UI reads.
21
+
22
+ ### Runtime wiring — `rc()`
23
+
24
+ Call `rc()` once in the browser from the root `+layout.ts`. It wires reload-on-apply, the broadcast listener that feeds the `update` store, and cold detection of an already-waiting worker. It never reloads on its own — only an explicit `apply()` (the install control) triggers a restart, so an update can never interrupt a form in progress.
25
+
26
+ ```ts
27
+ // src/routes/+layout.ts
28
+ import { rc } from '@/system/rc'
29
+ import { browser } from '$app/environment'
30
+
31
+ if (browser) void rc()
32
+ ```
33
+
34
+ ### Service worker & caches
35
+
36
+ - **The worker is self-contained.** It carries its own inlined push-payload `Notification` type and keeps the push / notification-click / offline-shell behaviour of a typical app worker, with no `@/transmission` dependency. If you already run `@/transmission`, reconcile the two workers yourself.
37
+ - **Two caches.** The versioned app shell + build assets live in `cache-${hash}` (evicted on every update, so the app never serves stale code); runtime images from the API — requests under `/pictures/` — live in a separate `storage` cache, cache-first. Nothing evicts `storage` automatically: it survives updates, so only an explicit `clear()` empties it.
38
+
39
+ ### Localization
40
+
41
+ This Solution ships **two** svintl mounts — the UI strings (`ui/intl`) and the machine-owned release notes (`svc/changelog/intl`) — each carrying only the locales this repo builds. Reconcile **both** to your own locale set once after install:
42
+
43
+ ```sh
44
+ npx intl import system src/@/system/ui/intl
45
+ npx intl import changelog src/@/system/svc/changelog/intl
46
+ ```
47
+
48
+ Until both are imported, each `built.js` is typed against your `Locale` union and `check` fails on the locales it lacks. Never hand-edit the generated `*.yaml`/`built.js`/`types.ts`.
49
+
50
+ ## In-app-webview escape — `InApp`
51
+
52
+ An in-app webview (Telegram, Instagram, Facebook, generic embedded browsers) is an insecure, degraded context where passkeys and OIDC popups misbehave. `InApp` guards the whole app against it: on mount it tries to bounce the user out into the real system browser, and if the OS swallows that redirect it overlays a full-screen "Insecure Context" card with a manual Continue control. In a normal browser it renders nothing.
53
+
54
+ Because the protection must fire on **every** route — not just an auth screen — mount it once, high in the tree, in the root `+layout.svelte`:
55
+
56
+ ```svelte
57
+ <script lang="ts">
58
+ import { InApp } from '@/system/ui'
59
+ const { children } = $props()
60
+ </script>
61
+
62
+ <InApp />
63
+ {@render children()}
64
+ ```
65
+
66
+ The webview detection and the pop-out side-effect are internal — no conditional wiring or environment checks are needed in your layout.
67
+
68
+ ## `VersionControl`
69
+
70
+ The update status card: a single row that reads the `update` state and renders the running build with an up-to-date check, download progress while caching, or a one-tap install control once an update is waiting. Pass the `update` store value; drop it into a settings/about screen.
71
+
72
+ ### Usage
73
+
74
+ ```svelte
75
+ <script lang="ts">
76
+ import { VersionControl } from '@/system/ui'
77
+ import { update } from '@/system'
78
+ </script>
79
+
80
+ <VersionControl update={$update} href="/changelog" />
81
+ ```
82
+
83
+ ### Props
84
+
85
+ | Prop | Type | Notes |
86
+ | --- | --- | --- |
87
+ | `update` | `Update` | The update store value (`$update`). |
88
+ | `href` | `string` | Optional. When set, renders a release-notes / what's-new link. |
89
+
90
+ ## `Changelog`
91
+
92
+ The full release-notes list for a settings/about or dedicated notes screen. Renders the running build's bundled history and, when an update is waiting, the incoming entries above it — the waiting version carries an inline install control, and the running version is tagged as installed. Both come in as props, so you choose the source (the bundled `changelog` mount for history, the `update` store for the incoming delta).
93
+
94
+ ### Usage
95
+
96
+ ```svelte
97
+ <script lang="ts">
98
+ import { Changelog } from '@/system/ui'
99
+ import { update, changelog } from '@/system'
100
+ </script>
101
+
102
+ <Changelog update={$update} {changelog} />
103
+ ```
104
+
105
+ ### Props
106
+
107
+ | Prop | Type | Notes |
108
+ | --- | --- | --- |
109
+ | `update` | `Update` | The update store value; a `ready` state contributes the incoming delta and its install control. |
110
+ | `changelog` | `Log` | An all-locales changelog — typically the bundled `changelog` mount. |
111
+ | `class` | `ClassValue` | Applied to the list. |
112
+
113
+ ## On-demand check — `check()`
114
+
115
+ Force a fresh update check wherever it makes sense (settings/about screen, pull-to-refresh). `version` is the running app's commit short-hash — the same string shown, tagged, and keyed in the changelog.
116
+
117
+ ```ts
118
+ import { check, version } from '@/system'
119
+
120
+ await check()
121
+ ```
122
+
123
+ ## Authoring notes
124
+
125
+ The `changelog` mount is maintained through the `npx intl` CLI — by hand, or automatically by the CI workflows below. Each entry is keyed by commit short-hash and holds translatable `headline`/`description` (Markdown) and non-translatable `timestamp` (Unix milliseconds) / `picture`. `description` renders through `marked` (trusted-content — the notes are authored in-repo, so there is no sanitizer). Never hand-edit the generated `*.yaml`/`built.js`/`types.ts`.
126
+
127
+ ## Automated versioning & changelog (CI)
128
+
129
+ Two GitHub Actions workflows install to your repo (`.github/workflows/changelog.yml`, `.github/workflows/release.yml`) alongside a static agent prompt (`.github/changelog-prompt.md`). They keep the changelog, the version, and the git tag in sync with zero manual bumping — the responsibility split is deterministic-by-default: an AI agent only edits the intl mount, while committing, pushing, tagging, and releasing are done by fixed steps. **The version is never LLM-generated.**
130
+
131
+ ### `changelog.yml` — on merge to `dev`
132
+
133
+ Each PR merged into `dev` folds its user-visible changes into the single unreleased "next release" entry:
134
+
135
+ 1. A deterministic Node step computes three things — the version (`git rev-parse --short=7 HEAD`, the commit short-hash), the release timestamp (`Date.now()`, Unix ms), and **which entry is unreleased**: the changelog key present on `dev` but not on `production` (a pure set difference over the built dictionaries, so it needs no ordering and survives a deleted tag). It fails loudly if it ever finds more than one unreleased entry. The agent never picks a version, a time, or an entry.
136
+ 2. The Cursor CLI is installed from the **official** `curl https://cursor.com/install` (no first-party Action exists; the third-party marketplace one is deliberately avoided — it would receive your `CURSOR_API_KEY` plus write access).
137
+ 3. `cursor-agent` runs `.github/changelog-prompt.md` and **edits the changelog intl mount only** (it is instructed never to commit, branch, push, or reason about git/ordering): it keys the unreleased entry to the computed hash, writes the timestamp verbatim, integrates the PR diff into its Markdown description, and rebuilds the mount via `npx intl`.
138
+ 4. `stefanzweifel/git-auto-commit-action` commits the result back to `dev` (`chore(changelog): <hash>`). A `pull_request` trigger does not re-run on this push, so there is no loop.
139
+
140
+ ### `release.yml` — on merge to `production`
141
+
142
+ Fully deterministic, no AI: reads the newest changelog key (by `timestamp`), tags the released `production` commit with that key verbatim (the commit short-hash), and publishes a GitHub Release whose body is the entry's en-US `description`. The tag is a release label matching the changelog key; it points at the `production` commit, whose own hash differs from the tag name.
143
+
144
+ ### Setup
145
+
146
+ - **`CURSOR_API_KEY` secret** — required by `changelog.yml`. Add it under repo → Settings → Secrets and variables → Actions.
147
+ - **Let the Actions bot push to `dev`.** `changelog.yml` commits back to `dev` with the default `GITHUB_TOKEN`. If `dev` is a protected branch, either add the Actions bot to the bypass list or swap in a PAT / GitHub App token with push rights; on an unprotected `dev` it works as-is.
148
+ - **svintl Cursor skill.** The agent drives `npx intl` through the svintl Cursor skill — install it in the repo if absent (e.g. `npx skills add temich/svintl -a --all`).
149
+ - **Branches.** The workflows assume a `dev` → `production` flow; rename the trigger branches if yours differ.
@@ -0,0 +1,28 @@
1
+ # TapTap
2
+
3
+ Fires `onclick` only after `taps` consecutive presses within `gap` ms. Use the `child` snippet to wrap an existing control; otherwise renders a native `<button>`.
4
+
5
+ ## Usage
6
+
7
+ ```svelte
8
+ <script lang="ts">
9
+ import { TapTap } from '$com/taptap'
10
+ </script>
11
+
12
+ <TapTap taps={3} gap={400} onclick={() => confirm()}>
13
+ Tap 3×
14
+ </TapTap>
15
+ ```
16
+
17
+ ## Props
18
+
19
+ | Prop | Type | Default | Notes |
20
+ | ---------- | ------------------------------------------------- | ---------- | --------------------------------------------------------------------- |
21
+ | `taps` | `number` | `2` | Consecutive presses required before `onclick` fires. |
22
+ | `gap` | `number` (ms) | `500` | Max interval between presses to count as consecutive. |
23
+ | `onclick` | `MouseEventHandler<HTMLButtonElement>` | — | Fires after the tap sequence completes. |
24
+ | `child` | `Snippet<[{ onclick: () => void; n: number }]>` | — | Renders instead of the default button; pass `onclick` to your control. `n` is the current position in the sequence (`0` when idle). |
25
+ | `children` | `Snippet` | — | Button content when `child` is omitted. |
26
+ | `type` | `HTMLButtonAttributes['type']` | `'button'` | Native button type when not using `child`. |
27
+
28
+ All other props pass through to the underlying `<button>` when `child` is omitted.