@toa.io/extensions.configuration 1.0.0-alpha.273 → 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 (521) hide show
  1. package/CHANGELOG.md +202 -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 +12 -5
  18. package/readme.md +150 -34
  19. package/schemas/annotation.cos.yaml +27 -2
  20. package/source/Aspect.test.ts +84 -8
  21. package/source/Aspect.ts +59 -5
  22. package/source/Client.test.ts +104 -0
  23. package/source/Client.ts +258 -0
  24. package/source/Composition.ts +57 -0
  25. package/source/Factory.ts +28 -5
  26. package/source/Secret.test.ts +29 -0
  27. package/source/Secret.ts +29 -0
  28. package/source/UI.ts +197 -0
  29. package/source/configuration.test.ts +84 -52
  30. package/source/configuration.ts +28 -9
  31. package/source/const.ts +17 -0
  32. package/source/deployment.test.ts +80 -1
  33. package/source/deployment.ts +73 -23
  34. package/source/epoch.test.ts +26 -0
  35. package/source/epoch.ts +21 -0
  36. package/source/index.ts +2 -1
  37. package/transpiled/Aspect.d.ts +18 -4
  38. package/transpiled/Aspect.js +47 -3
  39. package/transpiled/Aspect.js.map +1 -1
  40. package/transpiled/Aspect.test.js +59 -9
  41. package/transpiled/Aspect.test.js.map +1 -1
  42. package/transpiled/Client.d.ts +61 -0
  43. package/transpiled/Client.js +173 -0
  44. package/transpiled/Client.js.map +1 -0
  45. package/transpiled/Client.test.d.ts +1 -0
  46. package/transpiled/Client.test.js +77 -0
  47. package/transpiled/Client.test.js.map +1 -0
  48. package/transpiled/Composition.d.ts +14 -0
  49. package/transpiled/Composition.js +43 -0
  50. package/transpiled/Composition.js.map +1 -0
  51. package/transpiled/Factory.d.ts +8 -2
  52. package/transpiled/Factory.js +17 -2
  53. package/transpiled/Factory.js.map +1 -1
  54. package/transpiled/Secret.d.ts +13 -0
  55. package/transpiled/Secret.js +26 -0
  56. package/transpiled/Secret.js.map +1 -0
  57. package/transpiled/Secret.test.d.ts +1 -0
  58. package/transpiled/Secret.test.js +26 -0
  59. package/transpiled/Secret.test.js.map +1 -0
  60. package/transpiled/UI.d.ts +25 -0
  61. package/transpiled/UI.js +186 -0
  62. package/transpiled/UI.js.map +1 -0
  63. package/transpiled/configuration.d.ts +7 -2
  64. package/transpiled/configuration.js +30 -12
  65. package/transpiled/configuration.js.map +1 -1
  66. package/transpiled/configuration.test.js +77 -51
  67. package/transpiled/configuration.test.js.map +1 -1
  68. package/transpiled/const.d.ts +11 -0
  69. package/transpiled/const.js +14 -0
  70. package/transpiled/const.js.map +1 -0
  71. package/transpiled/deployment.d.ts +10 -4
  72. package/transpiled/deployment.js +57 -20
  73. package/transpiled/deployment.js.map +1 -1
  74. package/transpiled/deployment.test.js +60 -0
  75. package/transpiled/deployment.test.js.map +1 -1
  76. package/transpiled/epoch.d.ts +2 -0
  77. package/transpiled/epoch.js +21 -0
  78. package/transpiled/epoch.js.map +1 -0
  79. package/transpiled/epoch.test.d.ts +1 -0
  80. package/transpiled/epoch.test.js +22 -0
  81. package/transpiled/epoch.test.js.map +1 -0
  82. package/transpiled/index.d.ts +2 -1
  83. package/transpiled/index.js +4 -1
  84. package/transpiled/index.js.map +1 -1
  85. package/transpiled/tsconfig.tsbuildinfo +1 -1
  86. package/ui/.agents/skills/antcn/SKILL.md +91 -0
  87. package/ui/.agents/skills/antcn/references/analytics.md +78 -0
  88. package/ui/.agents/skills/antcn/references/bridge.md +41 -0
  89. package/ui/.agents/skills/antcn/references/clipboard.md +23 -0
  90. package/ui/.agents/skills/antcn/references/dismissable.md +75 -0
  91. package/ui/.agents/skills/antcn/references/dropdown.md +153 -0
  92. package/ui/.agents/skills/antcn/references/fragments.md +29 -0
  93. package/ui/.agents/skills/antcn/references/fullscreen.md +157 -0
  94. package/ui/.agents/skills/antcn/references/geo.md +27 -0
  95. package/ui/.agents/skills/antcn/references/globals.md +31 -0
  96. package/ui/.agents/skills/antcn/references/grammatical-form.md +69 -0
  97. package/ui/.agents/skills/antcn/references/hints.md +44 -0
  98. package/ui/.agents/skills/antcn/references/hold.md +34 -0
  99. package/ui/.agents/skills/antcn/references/iam.md +117 -0
  100. package/ui/.agents/skills/antcn/references/input-form.md +34 -0
  101. package/ui/.agents/skills/antcn/references/locale.md +66 -0
  102. package/ui/.agents/skills/antcn/references/net.md +33 -0
  103. package/ui/.agents/skills/antcn/references/panel.md +44 -0
  104. package/ui/.agents/skills/antcn/references/passkeys.md +27 -0
  105. package/ui/.agents/skills/antcn/references/payments.md +99 -0
  106. package/ui/.agents/skills/antcn/references/realtime.md +69 -0
  107. package/ui/.agents/skills/antcn/references/scrollable.md +39 -0
  108. package/ui/.agents/skills/antcn/references/selector.md +71 -0
  109. package/ui/.agents/skills/antcn/references/shake.md +36 -0
  110. package/ui/.agents/skills/antcn/references/share.md +28 -0
  111. package/ui/.agents/skills/antcn/references/shell.md +139 -0
  112. package/ui/.agents/skills/antcn/references/stack.md +53 -0
  113. package/ui/.agents/skills/antcn/references/system.md +149 -0
  114. package/ui/.agents/skills/antcn/references/taptap.md +28 -0
  115. package/ui/.agents/skills/antcn/references/tools.md +68 -0
  116. package/ui/.agents/skills/antcn/references/transmission.md +96 -0
  117. package/ui/.agents/skills/shadcn-svelte/SKILL.md +227 -0
  118. package/ui/.agents/skills/shadcn-svelte/agents/openai.yml +5 -0
  119. package/ui/.agents/skills/shadcn-svelte/assets/shadcn-svelte-small.png +0 -0
  120. package/ui/.agents/skills/shadcn-svelte/assets/shadcn-svelte.png +0 -0
  121. package/ui/.agents/skills/shadcn-svelte/cli.md +166 -0
  122. package/ui/.agents/skills/shadcn-svelte/customization.md +213 -0
  123. package/ui/.agents/skills/shadcn-svelte/evals/evals.json +47 -0
  124. package/ui/.agents/skills/shadcn-svelte/rules/composition.md +244 -0
  125. package/ui/.agents/skills/shadcn-svelte/rules/forms.md +234 -0
  126. package/ui/.agents/skills/shadcn-svelte/rules/icons.md +107 -0
  127. package/ui/.agents/skills/shadcn-svelte/rules/styling.md +195 -0
  128. package/ui/.agents/skills/svas/SKILL.md +169 -0
  129. package/ui/.agents/skills/svas/references/patterns.md +95 -0
  130. package/ui/.agents/skills/svintl/SKILL.md +176 -0
  131. package/ui/.claude/settings.json +15 -0
  132. package/ui/.codex/hooks.json +15 -0
  133. package/ui/.cursor/hooks.json +11 -0
  134. package/ui/.env.example +1 -0
  135. package/ui/.prettierrc +9 -0
  136. package/ui/.vscode/extensions.json +7 -0
  137. package/ui/.vscode/settings.json +27 -0
  138. package/ui/AGENTS.md +51 -0
  139. package/ui/architecture.md +390 -0
  140. package/ui/components.json +20 -0
  141. package/ui/eslint.config.js +152 -0
  142. package/ui/features/base.ts +2 -0
  143. package/ui/features/boot.feature +5 -0
  144. package/ui/features/steps/authentication.ts +34 -0
  145. package/ui/features/steps/navigaton.ts +37 -0
  146. package/ui/features/steps/typing.ts +24 -0
  147. package/ui/package-lock.json +8173 -0
  148. package/ui/package.json +76 -0
  149. package/ui/playwright.config.ts +13 -0
  150. package/ui/skills-lock.json +30 -0
  151. package/ui/src/@/configuration/index.ts +1 -0
  152. package/ui/src/@/configuration/svc/create.ts +29 -0
  153. package/ui/src/@/configuration/svc/index.ts +3 -0
  154. package/ui/src/@/configuration/svc/net/Configuration.ts +18 -0
  155. package/ui/src/@/configuration/svc/net/index.ts +2 -0
  156. package/ui/src/@/configuration/svc/net/interface.ts +35 -0
  157. package/ui/src/@/configuration/svc/store.ts +14 -0
  158. package/ui/src/@/configuration/ui/Configurations.svelte +85 -0
  159. package/ui/src/@/configuration/ui/Configurations.ts +5 -0
  160. package/ui/src/@/configuration/ui/Create.svelte +64 -0
  161. package/ui/src/@/configuration/ui/Create.ts +7 -0
  162. package/ui/src/@/configuration/ui/Form.svelte +75 -0
  163. package/ui/src/@/configuration/ui/Form.ts +79 -0
  164. package/ui/src/@/configuration/ui/Row.svelte +44 -0
  165. package/ui/src/@/configuration/ui/Row.ts +9 -0
  166. package/ui/src/@/configuration/ui/Value.svelte +33 -0
  167. package/ui/src/@/configuration/ui/Value.ts +6 -0
  168. package/ui/src/@/configuration/ui/index.ts +9 -0
  169. package/ui/src/@/configuration/ui/intl/built.js +38 -0
  170. package/ui/src/@/configuration/ui/intl/context.yaml +51 -0
  171. package/ui/src/@/configuration/ui/intl/en-US.yaml +21 -0
  172. package/ui/src/@/configuration/ui/intl/index.ts +9 -0
  173. package/ui/src/@/configuration/ui/intl/types.ts +31 -0
  174. package/ui/src/@/configuration/ui/read.test.ts +75 -0
  175. package/ui/src/@/configuration/ui/read.ts +102 -0
  176. package/ui/src/@/configuration/ui/ui.test.ts +69 -0
  177. package/ui/src/@/configuration/ui/ui.ts +115 -0
  178. package/ui/src/@/iam/index.ts +1 -0
  179. package/ui/src/@/iam/rc.ts +22 -0
  180. package/ui/src/@/iam/svc/authenticated.ts +17 -0
  181. package/ui/src/@/iam/svc/basic.ts +23 -0
  182. package/ui/src/@/iam/svc/index.ts +10 -0
  183. package/ui/src/@/iam/svc/logout.ts +5 -0
  184. package/ui/src/@/iam/svc/named.ts +16 -0
  185. package/ui/src/@/iam/svc/net/Echo.ts +9 -0
  186. package/ui/src/@/iam/svc/net/basic/index.ts +1 -0
  187. package/ui/src/@/iam/svc/net/basic/interface.ts +15 -0
  188. package/ui/src/@/iam/svc/net/federation/index.ts +1 -0
  189. package/ui/src/@/iam/svc/net/federation/interface.ts +12 -0
  190. package/ui/src/@/iam/svc/net/index.ts +6 -0
  191. package/ui/src/@/iam/svc/net/interface.ts +17 -0
  192. package/ui/src/@/iam/svc/net/otp/index.ts +1 -0
  193. package/ui/src/@/iam/svc/net/otp/interface.ts +14 -0
  194. package/ui/src/@/iam/svc/net/passkeys/index.ts +1 -0
  195. package/ui/src/@/iam/svc/net/passkeys/interface.ts +12 -0
  196. package/ui/src/@/iam/svc/oidc/apple.ts +47 -0
  197. package/ui/src/@/iam/svc/oidc/authenticate.ts +62 -0
  198. package/ui/src/@/iam/svc/oidc/google.ts +45 -0
  199. package/ui/src/@/iam/svc/oidc/hello.ts +82 -0
  200. package/ui/src/@/iam/svc/oidc/index.ts +3 -0
  201. package/ui/src/@/iam/svc/oidc/nonce.ts +5 -0
  202. package/ui/src/@/iam/svc/oidc/providers.ts +28 -0
  203. package/ui/src/@/iam/svc/oidc/standard.ts +28 -0
  204. package/ui/src/@/iam/svc/otp.ts +18 -0
  205. package/ui/src/@/iam/svc/passkeys/create.ts +20 -0
  206. package/ui/src/@/iam/svc/passkeys/index.ts +2 -0
  207. package/ui/src/@/iam/svc/passkeys/login.ts +21 -0
  208. package/ui/src/@/iam/svc/store.ts +36 -0
  209. package/ui/src/@/iam/svc/sync.ts +18 -0
  210. package/ui/src/@/iam/svc/transfer.ts +11 -0
  211. package/ui/src/@/iam/svc/update.ts +8 -0
  212. package/ui/src/@/iam/ui/AccountLike.ts +4 -0
  213. package/ui/src/@/iam/ui/Authenticated.svelte +37 -0
  214. package/ui/src/@/iam/ui/Authenticated.ts +10 -0
  215. package/ui/src/@/iam/ui/Authentication.svelte +50 -0
  216. package/ui/src/@/iam/ui/Authentication.ts +9 -0
  217. package/ui/src/@/iam/ui/Authorized.svelte +32 -0
  218. package/ui/src/@/iam/ui/Authorized.ts +65 -0
  219. package/ui/src/@/iam/ui/Card.svelte +14 -0
  220. package/ui/src/@/iam/ui/Card.ts +7 -0
  221. package/ui/src/@/iam/ui/Refresh.svelte +39 -0
  222. package/ui/src/@/iam/ui/credentials/Credentials.svelte +26 -0
  223. package/ui/src/@/iam/ui/credentials/Credentials.ts +5 -0
  224. package/ui/src/@/iam/ui/credentials/Provider.svelte +24 -0
  225. package/ui/src/@/iam/ui/credentials/Provider.ts +5 -0
  226. package/ui/src/@/iam/ui/credentials/index.ts +1 -0
  227. package/ui/src/@/iam/ui/credentials/passkeys/Key.svelte +42 -0
  228. package/ui/src/@/iam/ui/credentials/passkeys/Key.ts +29 -0
  229. package/ui/src/@/iam/ui/credentials/passkeys/Manager.svelte +83 -0
  230. package/ui/src/@/iam/ui/credentials/passkeys/Manager.ts +5 -0
  231. package/ui/src/@/iam/ui/credentials/passkeys/Passkeys.svelte +39 -0
  232. package/ui/src/@/iam/ui/credentials/passkeys/Summary.svelte +27 -0
  233. package/ui/src/@/iam/ui/credentials/passkeys/Summary.ts +5 -0
  234. package/ui/src/@/iam/ui/credentials/passkeys/index.ts +1 -0
  235. package/ui/src/@/iam/ui/credentials/providers.ts +15 -0
  236. package/ui/src/@/iam/ui/credentials/transfer/Qr.svelte +24 -0
  237. package/ui/src/@/iam/ui/credentials/transfer/Qr.ts +3 -0
  238. package/ui/src/@/iam/ui/credentials/transfer/Transfer.svelte +48 -0
  239. package/ui/src/@/iam/ui/credentials/transfer/Transfer.ts +5 -0
  240. package/ui/src/@/iam/ui/credentials/transfer/index.ts +1 -0
  241. package/ui/src/@/iam/ui/index.ts +3 -0
  242. package/ui/src/@/iam/ui/intl/built.js +79 -0
  243. package/ui/src/@/iam/ui/intl/context.yaml +91 -0
  244. package/ui/src/@/iam/ui/intl/en-US.yaml +64 -0
  245. package/ui/src/@/iam/ui/intl/index.ts +10 -0
  246. package/ui/src/@/iam/ui/intl/types.ts +70 -0
  247. package/ui/src/@/iam/ui/oidc/Authentication.svelte +16 -0
  248. package/ui/src/@/iam/ui/oidc/Authentication.ts +5 -0
  249. package/ui/src/@/iam/ui/oidc/Button.svelte +36 -0
  250. package/ui/src/@/iam/ui/oidc/Button.ts +11 -0
  251. package/ui/src/@/iam/ui/oidc/Refresh.svelte +16 -0
  252. package/ui/src/@/iam/ui/oidc/icons/Apple.svelte +19 -0
  253. package/ui/src/@/iam/ui/oidc/icons/Google.svelte +31 -0
  254. package/ui/src/@/iam/ui/oidc/icons/index.ts +11 -0
  255. package/ui/src/@/iam/ui/oidc/index.ts +2 -0
  256. package/ui/src/@/iam/ui/passkey/Authentication.svelte +64 -0
  257. package/ui/src/@/iam/ui/passkey/Authentication.ts +8 -0
  258. package/ui/src/@/iam/ui/passkey/Create.svelte +53 -0
  259. package/ui/src/@/iam/ui/passkey/Create.ts +7 -0
  260. package/ui/src/@/iam/ui/passkey/Login.svelte +29 -0
  261. package/ui/src/@/iam/ui/passkey/Refresh.svelte +29 -0
  262. package/ui/src/@/iam/ui/passkey/index.ts +2 -0
  263. package/ui/src/@/iam/ui/password/Authentication.svelte +19 -0
  264. package/ui/src/@/iam/ui/password/Authentication.ts +8 -0
  265. package/ui/src/@/iam/ui/password/Form.svelte +151 -0
  266. package/ui/src/@/iam/ui/password/Form.ts +6 -0
  267. package/ui/src/@/iam/ui/password/Password.svelte +39 -0
  268. package/ui/src/@/iam/ui/password/Password.ts +6 -0
  269. package/ui/src/@/iam/ui/password/Refresh.svelte +5 -0
  270. package/ui/src/@/iam/ui/password/index.ts +2 -0
  271. package/ui/src/@/net/index.ts +1 -0
  272. package/ui/src/@/net/svc/index.ts +3 -0
  273. package/ui/src/@/net/svc/origin.ts +8 -0
  274. package/ui/src/@/net/svc/query.test.ts +45 -0
  275. package/ui/src/@/net/svc/query.ts +25 -0
  276. package/ui/src/@/passkeys/index.ts +1 -0
  277. package/ui/src/@/passkeys/svc/add.ts +15 -0
  278. package/ui/src/@/passkeys/svc/create.ts +58 -0
  279. package/ui/src/@/passkeys/svc/credentials/convert.ts +32 -0
  280. package/ui/src/@/passkeys/svc/credentials/create.ts +34 -0
  281. package/ui/src/@/passkeys/svc/credentials/get.ts +14 -0
  282. package/ui/src/@/passkeys/svc/credentials/index.ts +3 -0
  283. package/ui/src/@/passkeys/svc/credentials/key.ts +10 -0
  284. package/ui/src/@/passkeys/svc/get.ts +10 -0
  285. package/ui/src/@/passkeys/svc/index.ts +6 -0
  286. package/ui/src/@/passkeys/svc/net/CreationResponse.ts +15 -0
  287. package/ui/src/@/passkeys/svc/net/Passkey.ts +8 -0
  288. package/ui/src/@/passkeys/svc/net/RequestResponse.ts +12 -0
  289. package/ui/src/@/passkeys/svc/net/challenges/Options.ts +21 -0
  290. package/ui/src/@/passkeys/svc/net/challenges/index.ts +2 -0
  291. package/ui/src/@/passkeys/svc/net/challenges/interface.ts +16 -0
  292. package/ui/src/@/passkeys/svc/net/index.ts +4 -0
  293. package/ui/src/@/passkeys/svc/net/interface.ts +29 -0
  294. package/ui/src/@/passkeys/svc/remove.ts +13 -0
  295. package/ui/src/@/passkeys/svc/request.ts +50 -0
  296. package/ui/src/@/passkeys/svc/store.ts +13 -0
  297. package/ui/src/@/passkeys/svc/supported.ts +1 -0
  298. package/ui/src/@/passkeys/ui/aaguid.json +150 -0
  299. package/ui/src/@/realtime/events.ts +1 -0
  300. package/ui/src/@/realtime/index.ts +1 -0
  301. package/ui/src/@/realtime/rc.ts +13 -0
  302. package/ui/src/@/realtime/svc/connect.ts +67 -0
  303. package/ui/src/@/realtime/svc/events.ts +17 -0
  304. package/ui/src/@/realtime/svc/index.ts +5 -0
  305. package/ui/src/@/realtime/svc/net/Message.ts +6 -0
  306. package/ui/src/@/realtime/svc/net/index.ts +2 -0
  307. package/ui/src/@/realtime/svc/net/interface.ts +13 -0
  308. package/ui/src/@/realtime/svc/reset.ts +5 -0
  309. package/ui/src/@/realtime/svc/status.ts +12 -0
  310. package/ui/src/@/realtime/svc/store.ts +30 -0
  311. package/ui/src/@/realtime/svc/time.ts +15 -0
  312. package/ui/src/app.d.ts +20 -0
  313. package/ui/src/app.html +13 -0
  314. package/ui/src/config/index.ts +70 -0
  315. package/ui/src/lib/assets/favicon.svg +1 -0
  316. package/ui/src/lib/components/clipboard/Clipboard.svelte +63 -0
  317. package/ui/src/lib/components/clipboard/Clipboard.ts +12 -0
  318. package/ui/src/lib/components/clipboard/index.ts +1 -0
  319. package/ui/src/lib/components/dismissable/Dismissable.svelte +81 -0
  320. package/ui/src/lib/components/dismissable/Dismissable.ts +7 -0
  321. package/ui/src/lib/components/dismissable/index.ts +1 -0
  322. package/ui/src/lib/components/dropdown/Back.svelte +14 -0
  323. package/ui/src/lib/components/dropdown/Back.ts +3 -0
  324. package/ui/src/lib/components/dropdown/Content.svelte +76 -0
  325. package/ui/src/lib/components/dropdown/Content.ts +13 -0
  326. package/ui/src/lib/components/dropdown/Context.ts +18 -0
  327. package/ui/src/lib/components/dropdown/Group.svelte +24 -0
  328. package/ui/src/lib/components/dropdown/Group.ts +8 -0
  329. package/ui/src/lib/components/dropdown/GroupContext.ts +15 -0
  330. package/ui/src/lib/components/dropdown/Item.svelte +31 -0
  331. package/ui/src/lib/components/dropdown/Item.ts +5 -0
  332. package/ui/src/lib/components/dropdown/Layer.svelte +11 -0
  333. package/ui/src/lib/components/dropdown/Layer.ts +7 -0
  334. package/ui/src/lib/components/dropdown/Root.svelte +88 -0
  335. package/ui/src/lib/components/dropdown/Root.ts +6 -0
  336. package/ui/src/lib/components/dropdown/Separator.svelte +13 -0
  337. package/ui/src/lib/components/dropdown/Separator.ts +5 -0
  338. package/ui/src/lib/components/dropdown/Trigger.svelte +33 -0
  339. package/ui/src/lib/components/dropdown/Trigger.ts +5 -0
  340. package/ui/src/lib/components/dropdown/index.ts +8 -0
  341. package/ui/src/lib/components/fullscreen/Fullscreen.svelte +97 -0
  342. package/ui/src/lib/components/fullscreen/Fullscreen.ts +18 -0
  343. package/ui/src/lib/components/fullscreen/Overlay.svelte +15 -0
  344. package/ui/src/lib/components/fullscreen/Overlay.ts +7 -0
  345. package/ui/src/lib/components/fullscreen/index.ts +2 -0
  346. package/ui/src/lib/components/hold/Hold.svelte +133 -0
  347. package/ui/src/lib/components/hold/Hold.ts +23 -0
  348. package/ui/src/lib/components/hold/index.ts +1 -0
  349. package/ui/src/lib/components/scrollable/Scrollable.svelte +49 -0
  350. package/ui/src/lib/components/scrollable/Scrollable.ts +117 -0
  351. package/ui/src/lib/components/scrollable/index.ts +2 -0
  352. package/ui/src/lib/components/shake/Shake.svelte +62 -0
  353. package/ui/src/lib/components/shake/Shake.ts +7 -0
  354. package/ui/src/lib/components/shake/index.ts +1 -0
  355. package/ui/src/lib/components/share/Share.svelte +58 -0
  356. package/ui/src/lib/components/share/Share.ts +9 -0
  357. package/ui/src/lib/components/share/index.ts +1 -0
  358. package/ui/src/lib/components/shell/Attention.svelte +11 -0
  359. package/ui/src/lib/components/shell/Attention.ts +6 -0
  360. package/ui/src/lib/components/shell/Header.svelte +18 -0
  361. package/ui/src/lib/components/shell/Header.ts +7 -0
  362. package/ui/src/lib/components/shell/Screen.svelte +28 -0
  363. package/ui/src/lib/components/shell/Screen.ts +11 -0
  364. package/ui/src/lib/components/shell/Sticky.svelte +23 -0
  365. package/ui/src/lib/components/shell/Sticky.ts +8 -0
  366. package/ui/src/lib/components/shell/Underlay.svelte +21 -0
  367. package/ui/src/lib/components/shell/Underlay.ts +6 -0
  368. package/ui/src/lib/components/shell/index.ts +6 -0
  369. package/ui/src/lib/components/shell/nav/Actions.svelte +31 -0
  370. package/ui/src/lib/components/shell/nav/Actions.ts +16 -0
  371. package/ui/src/lib/components/shell/nav/Back.svelte +20 -0
  372. package/ui/src/lib/components/shell/nav/Back.ts +9 -0
  373. package/ui/src/lib/components/shell/nav/Bar.svelte +24 -0
  374. package/ui/src/lib/components/shell/nav/Bar.ts +3 -0
  375. package/ui/src/lib/components/shell/nav/Button.svelte +64 -0
  376. package/ui/src/lib/components/shell/nav/Button.ts +7 -0
  377. package/ui/src/lib/components/shell/nav/Nav.svelte +62 -0
  378. package/ui/src/lib/components/shell/nav/Nav.ts +35 -0
  379. package/ui/src/lib/components/shell/nav/Return.svelte +29 -0
  380. package/ui/src/lib/components/shell/nav/Return.ts +15 -0
  381. package/ui/src/lib/components/shell/nav/Sections.svelte +58 -0
  382. package/ui/src/lib/components/shell/nav/Sections.ts +6 -0
  383. package/ui/src/lib/components/shell/nav/Toolbar.svelte +73 -0
  384. package/ui/src/lib/components/shell/nav/Toolbar.ts +3 -0
  385. package/ui/src/lib/components/shell/nav/history.ts +36 -0
  386. package/ui/src/lib/components/shell/nav/index.ts +5 -0
  387. package/ui/src/lib/components/shell/nav/store.ts +24 -0
  388. package/ui/src/lib/components/ui/alert/alert-action.svelte +20 -0
  389. package/ui/src/lib/components/ui/alert/alert-description.svelte +23 -0
  390. package/ui/src/lib/components/ui/alert/alert-title.svelte +23 -0
  391. package/ui/src/lib/components/ui/alert/alert.svelte +43 -0
  392. package/ui/src/lib/components/ui/alert/index.ts +17 -0
  393. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte +27 -0
  394. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte +27 -0
  395. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte +32 -0
  396. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte +17 -0
  397. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte +23 -0
  398. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte +20 -0
  399. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-media.svelte +20 -0
  400. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte +17 -0
  401. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-portal.svelte +7 -0
  402. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte +17 -0
  403. package/ui/src/lib/components/ui/alert-dialog/alert-dialog-trigger.svelte +7 -0
  404. package/ui/src/lib/components/ui/alert-dialog/alert-dialog.svelte +7 -0
  405. package/ui/src/lib/components/ui/alert-dialog/index.ts +40 -0
  406. package/ui/src/lib/components/ui/badge/badge.svelte +49 -0
  407. package/ui/src/lib/components/ui/badge/index.ts +2 -0
  408. package/ui/src/lib/components/ui/button/button.svelte +82 -0
  409. package/ui/src/lib/components/ui/button/index.ts +17 -0
  410. package/ui/src/lib/components/ui/button-group/button-group-separator.svelte +23 -0
  411. package/ui/src/lib/components/ui/button-group/button-group-text.svelte +28 -0
  412. package/ui/src/lib/components/ui/button-group/button-group.svelte +46 -0
  413. package/ui/src/lib/components/ui/button-group/index.ts +15 -0
  414. package/ui/src/lib/components/ui/card/card-action.svelte +23 -0
  415. package/ui/src/lib/components/ui/card/card-content.svelte +20 -0
  416. package/ui/src/lib/components/ui/card/card-description.svelte +20 -0
  417. package/ui/src/lib/components/ui/card/card-footer.svelte +20 -0
  418. package/ui/src/lib/components/ui/card/card-header.svelte +23 -0
  419. package/ui/src/lib/components/ui/card/card-title.svelte +20 -0
  420. package/ui/src/lib/components/ui/card/card.svelte +22 -0
  421. package/ui/src/lib/components/ui/card/index.ts +25 -0
  422. package/ui/src/lib/components/ui/checkbox/checkbox.svelte +39 -0
  423. package/ui/src/lib/components/ui/checkbox/index.ts +6 -0
  424. package/ui/src/lib/components/ui/collapsible/collapsible-content.svelte +7 -0
  425. package/ui/src/lib/components/ui/collapsible/collapsible-trigger.svelte +7 -0
  426. package/ui/src/lib/components/ui/collapsible/collapsible.svelte +20 -0
  427. package/ui/src/lib/components/ui/collapsible/index.ts +13 -0
  428. package/ui/src/lib/components/ui/input/index.ts +7 -0
  429. package/ui/src/lib/components/ui/input/input.svelte +48 -0
  430. package/ui/src/lib/components/ui/input-otp/index.ts +15 -0
  431. package/ui/src/lib/components/ui/input-otp/input-otp-group.svelte +20 -0
  432. package/ui/src/lib/components/ui/input-otp/input-otp-separator.svelte +27 -0
  433. package/ui/src/lib/components/ui/input-otp/input-otp-slot.svelte +31 -0
  434. package/ui/src/lib/components/ui/input-otp/input-otp.svelte +23 -0
  435. package/ui/src/lib/components/ui/item/index.ts +34 -0
  436. package/ui/src/lib/components/ui/item/item-actions.svelte +20 -0
  437. package/ui/src/lib/components/ui/item/item-content.svelte +23 -0
  438. package/ui/src/lib/components/ui/item/item-description.svelte +23 -0
  439. package/ui/src/lib/components/ui/item/item-footer.svelte +20 -0
  440. package/ui/src/lib/components/ui/item/item-group.svelte +21 -0
  441. package/ui/src/lib/components/ui/item/item-header.svelte +20 -0
  442. package/ui/src/lib/components/ui/item/item-media.svelte +42 -0
  443. package/ui/src/lib/components/ui/item/item-separator.svelte +19 -0
  444. package/ui/src/lib/components/ui/item/item-title.svelte +20 -0
  445. package/ui/src/lib/components/ui/item/item.svelte +61 -0
  446. package/ui/src/lib/components/ui/kbd/index.ts +10 -0
  447. package/ui/src/lib/components/ui/kbd/kbd-group.svelte +20 -0
  448. package/ui/src/lib/components/ui/kbd/kbd.svelte +23 -0
  449. package/ui/src/lib/components/ui/label/index.ts +7 -0
  450. package/ui/src/lib/components/ui/label/label.svelte +20 -0
  451. package/ui/src/lib/components/ui/progress/index.ts +7 -0
  452. package/ui/src/lib/components/ui/progress/progress.svelte +27 -0
  453. package/ui/src/lib/components/ui/select/index.ts +37 -0
  454. package/ui/src/lib/components/ui/select/select-content.svelte +45 -0
  455. package/ui/src/lib/components/ui/select/select-group-heading.svelte +21 -0
  456. package/ui/src/lib/components/ui/select/select-group.svelte +17 -0
  457. package/ui/src/lib/components/ui/select/select-item.svelte +40 -0
  458. package/ui/src/lib/components/ui/select/select-label.svelte +20 -0
  459. package/ui/src/lib/components/ui/select/select-portal.svelte +7 -0
  460. package/ui/src/lib/components/ui/select/select-scroll-down-button.svelte +20 -0
  461. package/ui/src/lib/components/ui/select/select-scroll-up-button.svelte +20 -0
  462. package/ui/src/lib/components/ui/select/select-separator.svelte +18 -0
  463. package/ui/src/lib/components/ui/select/select-trigger.svelte +29 -0
  464. package/ui/src/lib/components/ui/select/select.svelte +11 -0
  465. package/ui/src/lib/components/ui/separator/index.ts +7 -0
  466. package/ui/src/lib/components/ui/separator/separator.svelte +23 -0
  467. package/ui/src/lib/components/ui/spinner/index.ts +1 -0
  468. package/ui/src/lib/components/ui/spinner/spinner.svelte +18 -0
  469. package/ui/src/lib/components/ui/tabs/index.ts +18 -0
  470. package/ui/src/lib/components/ui/tabs/tabs-content.svelte +17 -0
  471. package/ui/src/lib/components/ui/tabs/tabs-list.svelte +40 -0
  472. package/ui/src/lib/components/ui/tabs/tabs-trigger.svelte +23 -0
  473. package/ui/src/lib/components/ui/tabs/tabs.svelte +19 -0
  474. package/ui/src/lib/components/ui/textarea/index.ts +7 -0
  475. package/ui/src/lib/components/ui/textarea/textarea.svelte +22 -0
  476. package/ui/src/lib/intl/bcp.ts +25 -0
  477. package/ui/src/lib/intl/built.js +18 -0
  478. package/ui/src/lib/intl/context.yaml +18 -0
  479. package/ui/src/lib/intl/en-US.yaml +6 -0
  480. package/ui/src/lib/intl/index.ts +65 -0
  481. package/ui/src/lib/intl/types.ts +19 -0
  482. package/ui/src/lib/tools/ago.ts +10 -0
  483. package/ui/src/lib/tools/assert.ts +3 -0
  484. package/ui/src/lib/tools/cap.ts +5 -0
  485. package/ui/src/lib/tools/clicks.ts +25 -0
  486. package/ui/src/lib/tools/contextmenu.ts +19 -0
  487. package/ui/src/lib/tools/convert.ts +32 -0
  488. package/ui/src/lib/tools/currency.test.ts +10 -0
  489. package/ui/src/lib/tools/currency.ts +55 -0
  490. package/ui/src/lib/tools/date.test.ts +21 -0
  491. package/ui/src/lib/tools/date.ts +35 -0
  492. package/ui/src/lib/tools/delay.ts +7 -0
  493. package/ui/src/lib/tools/image.ts +39 -0
  494. package/ui/src/lib/tools/index.ts +20 -0
  495. package/ui/src/lib/tools/location.ts +41 -0
  496. package/ui/src/lib/tools/metronome.ts +11 -0
  497. package/ui/src/lib/tools/mq.ts +84 -0
  498. package/ui/src/lib/tools/onsubmit.ts +21 -0
  499. package/ui/src/lib/tools/random.ts +15 -0
  500. package/ui/src/lib/tools/search.ts +25 -0
  501. package/ui/src/lib/tools/timeout.ts +26 -0
  502. package/ui/src/lib/tools/transition.ts +207 -0
  503. package/ui/src/lib/tools/types.ts +3 -0
  504. package/ui/src/lib/tools/uuid.test.ts +28 -0
  505. package/ui/src/lib/tools/uuid.ts +9 -0
  506. package/ui/src/lib/typeset.css +502 -0
  507. package/ui/src/lib/utils.ts +12 -0
  508. package/ui/src/routes/(private)/+layout.svelte +112 -0
  509. package/ui/src/routes/(private)/+page.svelte +7 -0
  510. package/ui/src/routes/(private)/[component]/+page.svelte +77 -0
  511. package/ui/src/routes/+layout.svelte +25 -0
  512. package/ui/src/routes/+layout.ts +14 -0
  513. package/ui/src/routes/layout.css +232 -0
  514. package/ui/static/robots.txt +3 -0
  515. package/ui/svelte.config.js +36 -0
  516. package/ui/tools/feat.js +43 -0
  517. package/ui/tools/hooks/README.md +13 -0
  518. package/ui/tools/hooks/guard-intl.sh +40 -0
  519. package/ui/tools/shad.js +7 -0
  520. package/ui/tsconfig.json +20 -0
  521. package/ui/vite.config.ts +8 -0
@@ -0,0 +1,68 @@
1
+ # Tools
2
+
3
+ Small Svelte/TypeScript utilities — formatters, reactive helpers, browser glue, view transitions. Installs to `$lib/tools/` with barrel `index.ts`.
4
+
5
+ ```sh
6
+ npx shadcn-svelte add https://cn.ants.dev/r/tools.json
7
+ ```
8
+
9
+ ```ts
10
+ import { ago, date, navigate, ios } from '$lib/tools'
11
+ ```
12
+
13
+ Most modules need only an import. Below: app-wide setup the CLI cannot merge.
14
+
15
+ ## Transitions (`transition.ts`)
16
+
17
+ View Transition API helpers for SvelteKit navigation and in-page morphs.
18
+
19
+ | Export | Role |
20
+ | --- | --- |
21
+ | `navigate` | Pass to SvelteKit `onNavigate` — wraps route changes in `document.startViewTransition` |
22
+ | `transit` | Manual `startViewTransition` wrapper (async callback optional) |
23
+ | `takeoff` | Before navigation, pin a departing element by `id` + transition name |
24
+ | `transition` | Svelte action for non-navigation morphs |
25
+ | `styles` | Store of inline `view-transition-*` style while a non-nav transition runs |
26
+
27
+ ### Route transitions — wire once in root layout
28
+
29
+ CSS alone (`view-transition-name`, antcn `globals` layers) does **not** start transitions. Hook SvelteKit navigation:
30
+
31
+ ```svelte
32
+ <!-- src/routes/+layout.svelte -->
33
+ <script lang="ts">
34
+ import { onNavigate } from '$app/navigation'
35
+ import { navigate } from '$lib/tools'
36
+
37
+ let { children } = $props()
38
+
39
+ onNavigate(navigate)
40
+ </script>
41
+
42
+ {@render children()}
43
+ ```
44
+
45
+ Required for route morphs (e.g. `shell` nav). Without this, transition CSS is inert. Unsupported browsers no-op (`transit` runs the callback immediately).
46
+
47
+ ### Shared CSS
48
+
49
+ Antcn components using `transition-morph` / `standalone:` / `constructive` need `globals` (pulled in by `shell`) — see **globals** (`globals.md`).
50
+
51
+ ### Named morphs across navigation
52
+
53
+ ```ts
54
+ import { takeoff } from '$lib/tools'
55
+
56
+ takeoff('my-avatar', 'avatar', 'transition-morph')
57
+ await goto('/profile')
58
+ ```
59
+
60
+ ### In-page (no navigation)
61
+
62
+ ```svelte
63
+ <div use:transition={{ name: 'panel', classes: 'transition-morph' }}>...</div>
64
+ ```
65
+
66
+ ```ts
67
+ await transit(async () => { /* DOM updates */ })
68
+ ```
@@ -0,0 +1,96 @@
1
+ # transmission
2
+
3
+ Web-push / FCM notification permission, subscription, and per-domain preferences for the signed-in account. Boots a single push channel (FCM iOS handler if present, else Web Push), reconciles permission with the backend after sign-in, exposes a `permissions` store keyed by `ScopeKey`, and lets you toggle them via `configure(...)`.
4
+
5
+ `subscribe`/`unsubscribe` drive the platform channel and the backend record together; `request()` prompts the OS and follows through with a subscribe on grant. `ping()` round-trips a test notification. State lives under `transmission:subscribed` and `transmission:permissions` (bound to `@/iam`'s `account`); the `default.transmission.sync` realtime event refreshes permissions when other devices change them.
6
+
7
+ Ships two UI pieces (`Permission`, `Scopes`) plus its own `ui/intl/` mount. Run `await rc()` from app bootstrap (after `@/iam` and `@/realtime`) to wire auto-subscribe on sign-in and `@/realtime` sync.
8
+
9
+ ## `$config`
10
+
11
+ - `VAPID_PUBLIC_KEY: string` — base64url VAPID public key for Web Push subscriptions. Empty disables the Web Push channel (`getVapidKey` returns an `Error` and `subscribe()` short-circuits). Not used by the FCM/TWA channels.
12
+
13
+ ## Notes
14
+
15
+ - **Intersect `transmission`'s `Events` into your `@/realtime`.** After install, edit your own `src/@/realtime/svc/events.ts` and add `TransmissionEvents` to the `Events` intersection — typed payloads everywhere, no cast in `store.ts`:
16
+
17
+ ```ts
18
+ // src/@/realtime/svc/events.ts
19
+ import type { Events as TransmissionEvents } from '@/transmission/svc/net'
20
+ // ...other Solutions' Events imports
21
+
22
+ export type Events = TransmissionEvents & /* & OtherEvents */
23
+ ```
24
+
25
+ Until you do, `store.ts` keeps a `(data as Transmission)` cast against `@/realtime`'s default `Record<string, unknown>`.
26
+
27
+ - **`Window.webkit` global.** The FCM channel declares `Window.webkit` and `WebkitMessageHandlers` globally from its `types.d.ts`. If you ship more native bridges (e.g. Apple Pay), extend `WebkitMessageHandlers` the same way — interface merging means you don't need to redeclare `Window.webkit`.
28
+
29
+ - **TWA channel ships but isn't wired by default.** `svc/channel/active.ts` only boots `web` and `fcm`. Add `twa` to the boot order if you target Android TWAs.
30
+
31
+ ## Usage
32
+
33
+ Bootstrap once, after `@/iam` and `@/realtime`:
34
+
35
+ ```ts
36
+ // src/routes/+layout.svelte (or wherever you boot Solutions)
37
+ import { rc } from '@/transmission'
38
+
39
+ await rc()
40
+ ```
41
+
42
+ Programmatic API (no UI):
43
+
44
+ ```ts
45
+ import { configure, ping, request, unsubscribe, key, permissions } from '@/transmission'
46
+
47
+ await request() // OS prompt + subscribe (idempotent)
48
+ await configure({ [key({ domain: 'expenses' })]: false }) // mute one domain
49
+ await ping() // round-trip a test push (signed-in + subscribed)
50
+ await unsubscribe() // drop subscription on this device
51
+ $permissions // reactive scope→bool map
52
+ ```
53
+
54
+ Send a real push from your backend by `POST`ing to the user's `transmission/<identity>` row — see `svc/net` for the wire shape.
55
+
56
+ ## `Permission`
57
+
58
+ Onboarding nag card asking the user to enable push. Drop it on a high-traffic surface (dashboard, home, post-sign-in screen). Self-hides via `@/hints` once the user is no longer `unfamiliar('transmission_permission')`: **Enable** calls `request()` (OS prompt + subscribe on grant) and consumes the hint permanently; **Dismiss** marks it `later(KEY, 7d)` so the card disappears for a week. Gate it on `$promptable` yourself — the component does not check whether the browser can still prompt, so the caller decides when there's nothing left to ask for (denied, already subscribed, unsupported).
59
+
60
+ ```svelte
61
+ <script lang="ts">
62
+ import { promptable } from '@/transmission'
63
+ import { Permission } from '@/transmission/ui'
64
+ </script>
65
+
66
+ {#if $promptable}
67
+ <Permission class="mb-4" />
68
+ {/if}
69
+ ```
70
+
71
+ ### Props
72
+
73
+ | Prop | Type | Default | Notes |
74
+ | ------- | ------------ | ------- | ------------------------------ |
75
+ | `class` | `ClassValue` | — | Forwarded to the root `Card`. |
76
+
77
+ ## `Scopes`
78
+
79
+ Settings row for managing notifications on the current device. The master switch flips the whole subscription (`unsubscribe()` / `request()` under the hood); when on, per-domain switches expand below and toggle a single channel via `configure({ [key(scope)]: bool })` — muting it without dropping the subscription. Reads `$permissions`, so it reflects remote changes pushed via the `default.transmission.sync` realtime event (other devices, backend writes). The domain set is declared in `ui/Scopes.ts` (`scopes`) — edit it to add/remove rows; each row pulls its label/description from `ui/intl` keyed by `scope.domain`.
80
+
81
+ ```svelte
82
+ <script lang="ts">
83
+ import { Scopes } from '@/transmission/ui'
84
+ import * as Item from '$ui/item'
85
+ </script>
86
+
87
+ <Item.Group>
88
+ <Scopes />
89
+ </Item.Group>
90
+ ```
91
+
92
+ ### Props
93
+
94
+ | Prop | Type | Default | Notes |
95
+ | ------- | ------------ | ------- | ---------------------------------------------------- |
96
+ | `class` | `ClassValue` | — | Forwarded to the top-level `Item.Root` (master row). |
@@ -0,0 +1,227 @@
1
+ ---
2
+ name: shadcn-svelte
3
+ description: Manages shadcn-svelte components and projects — adding, updating, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn-svelte, the CLI, design-system presets, or any project with a components.json file. Also triggers for "shadcn-svelte init", "add component", or registry URLs.
4
+ user-invocable: false
5
+ allowed-tools: Bash(npx shadcn-svelte@latest *), Bash(pnpm dlx shadcn-svelte@latest *), Bash(bunx --bun shadcn-svelte@latest *)
6
+ ---
7
+
8
+ # shadcn-svelte
9
+
10
+ A framework for building UI, components, and design systems for Svelte. Components are added as source to the user's project via the CLI.
11
+
12
+ > **IMPORTANT:** Run all CLI commands using the project's package runner: `npx shadcn-svelte@latest`, `pnpm dlx shadcn-svelte@latest`, or `bunx --bun shadcn-svelte@latest` — based on the project's package manager. Examples below use `npx shadcn-svelte@latest` but substitute the correct runner for the project.
13
+
14
+ ## Current Project Context
15
+
16
+ Read `components.json` at the project root and, when you need the live file layout, list the directory given by the `aliases.ui` path (resolved with the same rules as the CLI).
17
+
18
+ ## Imports (Svelte)
19
+
20
+ Each component lives in its own folder with an `index.ts` barrel. Match the [installation docs](https://shadcn-svelte.com/docs/installation):
21
+
22
+ - **Multi-part components** (dialog, select, card, field, tabs, …): `import * as Dialog from "$lib/components/ui/dialog"` then `Dialog.Content`, `Dialog.Title`, `Card.Root`, `Card.Header`, etc. — whatever the barrel exports (short names and/or `Root as …` aliases).
23
+ - **Single-component barrels** (only one meaningful component in the folder): **named imports** — `import { Button } from "$lib/components/ui/button"` and `<Button>`, not `import * as Button` + `Button.Root`. Same pattern for `{ Input }`, `{ Badge }`, `{ Spinner }`, `{ Checkbox }`, `{ Separator }`, `{ Skeleton }`, etc.
24
+
25
+ ```ts
26
+ import * as Dialog from "$lib/components/ui/dialog";
27
+ import { Button } from "$lib/components/ui/button";
28
+ import { Separator } from "$lib/components/ui/separator";
29
+ ```
30
+
31
+ Use the real aliases from `components.json` (often `$lib/components/ui/...`), not hardcoded paths.
32
+
33
+ ## Principles
34
+
35
+ 1. **Use existing components first.** Run `npx shadcn-svelte@latest add` with no arguments to browse available components, or check [Components](https://shadcn-svelte.com/docs/components) before writing custom UI.
36
+ 2. **Compose, don't reinvent.** Settings page = Tabs + Card + form controls. Dashboard = Sidebar + Card + Chart + Table.
37
+ 3. **Use built-in variants before custom styles.** `variant="outline"`, `size="sm"`, etc.
38
+ 4. **Use semantic colors.** `bg-primary`, `text-muted-foreground` — never raw values like `bg-blue-500`.
39
+
40
+ ## Critical Rules
41
+
42
+ These rules are **always enforced**. Each links to a file with Incorrect/Correct code pairs.
43
+
44
+ ### Styling & Tailwind → [styling.md](./rules/styling.md)
45
+
46
+ - **`class` for layout, not styling.** Never override component colors or typography.
47
+ - **No `space-x-*` or `space-y-*`.** Use `flex` with `gap-*`. For vertical stacks, `flex flex-col gap-*`.
48
+ - **Use `size-*` when width and height are equal.** `size-10` not `w-10 h-10`.
49
+ - **Use `truncate` shorthand.** Not `overflow-hidden text-ellipsis whitespace-nowrap`.
50
+ - **No manual `dark:` color overrides.** Use semantic tokens (`bg-background`, `text-muted-foreground`).
51
+ - **Use `cn()` for conditional classes.** Don't write manual template literal ternaries.
52
+ - **No manual `z-index` on overlay components.** Dialog, Sheet, Popover, etc. handle their own stacking.
53
+
54
+ ### Forms & Inputs → [forms.md](./rules/forms.md)
55
+
56
+ - **Forms use `Field.FieldGroup` + `Field.Field`.** Never use raw `div` with `space-y-*` or `grid gap-*` for form layout.
57
+ - **`InputGroup` uses `InputGroup.Input`/`InputGroup.Textarea`.** Never raw `Input`/`Textarea` inside `InputGroup.Root`.
58
+ - **Buttons inside inputs use `InputGroup.Root` + `InputGroup.Addon`.**
59
+ - **Option sets (2–7 choices) use `ToggleGroup`.** Don't loop `Button` with manual active state.
60
+ - **`Field.FieldSet` + `Field.FieldLegend` for grouping related checkboxes/radios.** Don't use a `div` with a heading.
61
+ - **Field validation uses `data-invalid` + `aria-invalid`.** `data-invalid` on `Field`, `aria-invalid` on the control. For disabled: `data-disabled` on `Field`, `disabled` on the control.
62
+
63
+ ### Component Structure → [composition.md](./rules/composition.md)
64
+
65
+ - **Items always inside their Group.** `Select.Item` → `Select.Group`. `DropdownMenu.Item` → `DropdownMenu.Group`. `Command.Item` → `Command.Group`.
66
+ - **Custom triggers.** Wrap controls in `Dialog.Trigger` / `AlertDialog.Trigger`, or control open state with `bind:open` on the root — see component docs.
67
+ - **Dialog, Sheet, and Drawer always need a Title.** `Dialog.Title`, `Sheet.Title`, `Drawer.Title` required for accessibility. Use `class="sr-only"` if visually hidden.
68
+ - **Use full Card composition.** `Card.Header`/`Card.Title`/`Card.Description`/`Card.Content`/`Card.Footer`. Don't dump everything in `Card.Content`.
69
+ - **Button has no `isPending`/`isLoading`.** Compose with `Spinner` inside `Button` + `disabled`; use `data-icon="inline-start"` / `inline-end` on `Spinner` for correct spacing (`import { Button }`, `import { Spinner }`).
70
+ - **`Tabs.Trigger` must be inside `Tabs.List`.** Never render triggers directly in `Tabs`.
71
+ - **`Avatar` always needs `Avatar.Fallback`.** For when the image fails to load.
72
+
73
+ ### Use Components, Not Custom Markup → [composition.md](./rules/composition.md)
74
+
75
+ - **Use existing components before custom markup.** Check if a component exists before writing a styled `div`.
76
+ - **Callouts use `Alert`.** Don't build custom styled divs.
77
+ - **Empty states use `Empty`.** Don't build custom empty state markup.
78
+ - **Toast via `svelte-sonner`.** Use `toast()` from `svelte-sonner` with the Sonner component from your UI folder.
79
+ - **Use `Separator`** instead of `<hr>` or a `div` with border-only classes.
80
+ - **Use `Skeleton`** for loading placeholders. No custom `animate-pulse` divs.
81
+ - **Use `Badge`** instead of custom styled spans.
82
+
83
+ ### Icons → [icons.md](./rules/icons.md)
84
+
85
+ - **Icons in `<Button>` use `data-icon`.** `data-icon="inline-start"` or `data-icon="inline-end"` on the icon.
86
+ - **No sizing classes on icons inside components.** Components handle icon sizing via CSS. No `size-4` or `w-4 h-4`.
87
+ - **Pass icons as components.** Import from the configured `iconLibrary` (e.g. `@lucide/svelte`), not string keys.
88
+
89
+ ### CLI
90
+
91
+ - **Presets** — copy the encoded string from the design-system builder on [shadcn-svelte.com](https://shadcn-svelte.com) and pass it to `npx shadcn-svelte@latest init --preset <code>`.
92
+
93
+ ## Key Patterns
94
+
95
+ These are the most common patterns that differentiate correct shadcn-svelte code. For edge cases, see the linked rule files above.
96
+
97
+ ```svelte
98
+ <script lang="ts">
99
+ import * as Field from "$lib/components/ui/field";
100
+ import { Input } from "$lib/components/ui/input";
101
+ import { Button } from "$lib/components/ui/button";
102
+ import SearchIcon from "@lucide/svelte/icons/search";
103
+ import { Badge } from "$lib/components/ui/badge";
104
+ import * as Avatar from "$lib/components/ui/avatar";
105
+ </script>
106
+
107
+ <!-- Form layout: Field.FieldGroup + Field.Field, not div + Label. -->
108
+ <Field.FieldGroup>
109
+ <Field.Field>
110
+ <Field.FieldLabel for="email">Email</Field.FieldLabel>
111
+ <Input id="email" />
112
+ </Field.Field>
113
+ </Field.FieldGroup>
114
+
115
+ <!-- Validation: data-invalid on Field, aria-invalid on the control. -->
116
+ <Field.Field data-invalid>
117
+ <Field.FieldLabel for="email">Email</Field.FieldLabel>
118
+ <Input id="email" aria-invalid />
119
+ <Field.FieldDescription>Invalid email.</Field.FieldDescription>
120
+ </Field.Field>
121
+
122
+ <!-- Icons in buttons: data-icon, no sizing classes. -->
123
+ <Button>
124
+ <SearchIcon data-icon="inline-start" />
125
+ Search
126
+ </Button>
127
+
128
+ <!-- Spacing: gap-*, not space-y-*. -->
129
+ <div class="flex flex-col gap-4"></div>
130
+
131
+ <!-- Equal dimensions: size-*, not w-* h-*. -->
132
+ <Avatar.Root class="size-10">
133
+ <Avatar.Image src="/u.png" alt="User" />
134
+ <Avatar.Fallback>U</Avatar.Fallback>
135
+ </Avatar.Root>
136
+
137
+ <!-- Status colors: Badge variants or semantic tokens, not raw colors. -->
138
+ <Badge variant="secondary">+20.1%</Badge>
139
+ ```
140
+
141
+ ## Component Selection
142
+
143
+ | Need | Use |
144
+ | -------------------------- | --------------------------------------------------------------------------------------------------- |
145
+ | Button/action | `Button` with appropriate variant (`import { Button }`) |
146
+ | Form inputs | `Input`, `Select`, `Combobox`, `Switch`, `Checkbox`, `RadioGroup`, `Textarea`, `InputOTP`, `Slider` |
147
+ | Toggle between 2–5 options | `ToggleGroup.Root` + `ToggleGroup.Item` |
148
+ | Data display | `Table`, `Card`, `Badge`, `Avatar` |
149
+ | Navigation | `Sidebar`, `NavigationMenu`, `Breadcrumb`, `Tabs`, `Pagination` |
150
+ | Overlays | `Dialog` (modal), `Sheet` (side panel), `Drawer` (bottom sheet), `AlertDialog` (confirmation) |
151
+ | Feedback | `svelte-sonner` (toast), `Alert`, `Progress`, `Skeleton`, `Spinner` |
152
+ | Command palette | `Command` inside `Dialog` |
153
+ | Charts | `Chart` (LayerChart) |
154
+ | Layout | `Card`, `Separator`, `Resizable`, `ScrollArea`, `Accordion`, `Collapsible` |
155
+ | Empty states | `Empty` |
156
+ | Menus | `DropdownMenu`, `ContextMenu`, `Menubar` |
157
+ | Tooltips/info | `Tooltip`, `HoverCard`, `Popover` |
158
+
159
+ ## Key Fields
160
+
161
+ Use `components.json` and the filesystem — not a separate `info` command:
162
+
163
+ - **`aliases`** → use the actual alias prefix from config (e.g. `$lib/`), never hardcode unrelated projects.
164
+ - **`tailwind.css`** → the global CSS file where theme variables live. Edit this file for theme tweaks; don't add a second globals file unless the user already uses one.
165
+ - **`style`** → visual treatment (e.g. `nova`, `vega`, …) and registry style path.
166
+ - **`iconLibrary`** → determines icon packages (`@lucide/svelte`, `@tabler/icons-svelte`, etc.). Never assume `@lucide/svelte`.
167
+ - **`registry`** → where the CLI fetches components; default official registry at `shadcn-svelte.com`.
168
+ - **`resolvedPaths`** (conceptual) → the CLI resolves `aliases` to absolute paths; list `aliases.ui` on disk to see installed components.
169
+
170
+ See [cli.md](./cli.md) for commands and flags.
171
+
172
+ ## Component Docs, Examples, and Usage
173
+
174
+ Open `https://shadcn-svelte.com/docs/components/<name>.md` for docs and examples. **When creating, fixing, debugging, or using a component, read the official page first** so you follow the documented APIs.
175
+
176
+ ## Workflow
177
+
178
+ 1. **Get project context** — read `components.json` and list the UI components directory when needed.
179
+ 2. **Check installed components first** — before running `add`, list files under the resolved `ui` path. Don't import components that haven't been added, and don't re-add ones already present unless updating.
180
+ 3. **Discover components** — `npx shadcn-svelte@latest add` with no arguments (interactive list), or the docs site.
181
+ 4. **Install or update** — `npx shadcn-svelte@latest add <name>` or a registry **URL**. To refresh existing files from the registry, use `npx shadcn-svelte@latest update` (see [cli.md](./cli.md)).
182
+ 5. **Fix imports in third-party / URL-added items** — After adding from a custom registry URL, check for hardcoded paths that don't match the project's `aliases`. Rewrite imports to use the project's `ui` / `lib` aliases from `components.json`.
183
+ 6. **Review added components** — After adding, **read the added files** and verify composition (groups, titles, validation attrs). Align icon imports with `iconLibrary`.
184
+ 7. **Remote registry items** — Adding by URL is explicit; if the user wants a component from an unknown source, confirm the registry URL or item before running `add`.
185
+
186
+ ## Updating Components
187
+
188
+ Use the **`update`** command to pull the latest registry versions of components already in the project. Review changes with `git diff` after `update`.
189
+
190
+ 1. Commit or stash local work.
191
+ 2. Run `npx shadcn-svelte@latest update [component]` or `--all`.
192
+ 3. Resolve merge conflicts if you had customized files.
193
+ 4. **Never use `--overwrite` on `add` without the user's explicit approval** when it would destroy intentional edits.
194
+
195
+ ## Quick Reference
196
+
197
+ ```bash
198
+ # Initialize shadcn-svelte in your project.
199
+ npx shadcn-svelte@latest init
200
+
201
+ # Initialize with a preset string from the docs site builder.
202
+ npx shadcn-svelte@latest init --preset <code>
203
+
204
+ # Add components (interactive when run with no names).
205
+ npx shadcn-svelte@latest add
206
+ npx shadcn-svelte@latest add button card dialog
207
+ npx shadcn-svelte@latest add --all
208
+
209
+ # Update components already installed.
210
+ npx shadcn-svelte@latest update button
211
+ npx shadcn-svelte@latest update --all --yes
212
+
213
+ # Build a custom registry (registry authors).
214
+ npx shadcn-svelte@latest registry build
215
+ ```
216
+
217
+ **Registry:** default `https://shadcn-svelte.com/registry` — override in `components.json` if needed.
218
+ **Docs:** [shadcn-svelte.com](https://shadcn-svelte.com)
219
+
220
+ ## Detailed References
221
+
222
+ - [rules/forms.md](./rules/forms.md) — Field.FieldGroup, Field.Field, InputGroup, ToggleGroup, Field.FieldSet, validation states
223
+ - [rules/composition.md](./rules/composition.md) — Groups, overlays, Card, Tabs, Avatar, Alert, Empty, Toast, Separator, Skeleton, Badge, Button loading
224
+ - [rules/icons.md](./rules/icons.md) — data-icon, icon sizing, passing icon components
225
+ - [rules/styling.md](./rules/styling.md) — Semantic colors, variants, class, spacing, size, truncate, dark mode, cn(), z-index
226
+ - [cli.md](./cli.md) — Commands, flags, registry
227
+ - [customization.md](./customization.md) — Theming, CSS variables, extending components
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "shadcn-svelte"
3
+ short_description: "Manages shadcn-svelte components — adding, updating, fixing, debugging, styling, and composing UI."
4
+ icon_small: "./assets/shadcn-svelte-small.png"
5
+ icon_large: "./assets/shadcn-svelte.png"
@@ -0,0 +1,166 @@
1
+ # shadcn-svelte CLI Reference
2
+
3
+ Configuration is read from `components.json`. See [components.json](https://shadcn-svelte.com/docs/components-json) on the docs site for the full schema.
4
+
5
+ > **IMPORTANT:** Always run commands using the project's package runner: `npx shadcn-svelte@latest`, `pnpm dlx shadcn-svelte@latest`, or `bunx --bun shadcn-svelte@latest`. Check `packageManager` from the project (or lockfile) to choose the right one. Examples below use `npx shadcn-svelte@latest` but substitute the correct runner for the project.
6
+
7
+ > **IMPORTANT:** Only use the flags documented below. Do not invent or guess flags — if a flag isn't listed here, it doesn't exist. The CLI auto-detects the package manager; there is no `--package-manager` flag.
8
+
9
+ ## Contents
10
+
11
+ - Commands: `init`, `add`, `apply`, `update`, `registry build`
12
+ - Proxy / outgoing requests
13
+ - Presets (via `init` and `apply`)
14
+
15
+ ---
16
+
17
+ ## Commands
18
+
19
+ ### `init` — Initialize an existing project
20
+
21
+ ```bash
22
+ npx shadcn-svelte@latest init [options]
23
+ ```
24
+
25
+ Installs dependencies, adds the `cn` util, creates `components.json`, and sets up CSS variables. Run `init` from the root of your project.
26
+
27
+ | Flag | Short | Description | Default |
28
+ | --------------------------- | ----- | ------------------------------------------------------------------------- | --------- |
29
+ | `--preset <preset>` | — | Encoded design-system preset string from the docs site | — |
30
+ | `-c, --cwd <path>` | `-c` | Working directory | current |
31
+ | `-o, --overwrite` | — | Overwrite existing files | `false` |
32
+ | `--no-deps` | — | Do not add or install dependencies | — |
33
+ | `--skip-preflight` | — | Ignore preflight checks and continue | `false` |
34
+ | `--base-color <name>` | — | Base color: `neutral`, `stone`, `zinc`, `mauve`, `olive`, `mist`, `taupe` | — |
35
+ | `--css <path>` | — | Path to the global CSS file | — |
36
+ | `--components-alias <path>` | — | Import alias for components | — |
37
+ | `--lib-alias <path>` | — | Import alias for lib | — |
38
+ | `--utils-alias <path>` | — | Import alias for utils | — |
39
+ | `--hooks-alias <path>` | — | Import alias for hooks | — |
40
+ | `--ui-alias <path>` | — | Import alias for UI components | — |
41
+ | `--proxy <proxy>` | — | Fetch registry items through this proxy | env-based |
42
+ | `--design-system-url` | — | Optional design-system URL (see docs / preset builder) | — |
43
+ | `-h, --help` | `-h` | Help | — |
44
+
45
+ ---
46
+
47
+ ### `add` — Add components
48
+
49
+ ```bash
50
+ npx shadcn-svelte@latest add [options] [components...]
51
+ ```
52
+
53
+ Adds components from the configured registry. Arguments are component names from the registry index, or a **URL** to a registry JSON item. With **no** component names, the CLI prompts you to pick components interactively.
54
+
55
+ | Flag | Short | Description | Default |
56
+ | ------------------ | ----- | ----------------------------------------------- | --------- |
57
+ | `-c, --cwd <path>` | `-c` | Working directory | current |
58
+ | `--no-deps` | — | Skip adding and installing package dependencies | — |
59
+ | `--skip-preflight` | — | Ignore preflight checks and continue | `false` |
60
+ | `-a, --all` | — | Install all UI components | `false` |
61
+ | `-y, --yes` | — | Skip confirmation prompt | `false` |
62
+ | `-o, --overwrite` | — | Overwrite existing files | `false` |
63
+ | `--proxy <proxy>` | — | Fetch components through this proxy | env-based |
64
+ | `-h, --help` | `-h` | Help | — |
65
+
66
+ ---
67
+
68
+ ### `apply` — Apply a preset to an existing project
69
+
70
+ ```bash
71
+ npx shadcn-svelte@latest apply [options]
72
+ ```
73
+
74
+ Applies a design-system preset to a project that has already been initialized. Updates `components.json` with the preset settings, reinstalls existing components (except `utils`) with the new styles, and installs any required dependencies.
75
+
76
+ Use `--only theme` or `--only font` to apply only part of a preset without reinstalling UI components.
77
+
78
+ Get a preset code from the builder at [shadcn-svelte.com/create](https://shadcn-svelte.com/create).
79
+
80
+ | Flag | Short | Description | Default |
81
+ | ------------------- | ----- | ---------------------------------------------- | --------- |
82
+ | `--preset <preset>` | — | Encoded design-system preset string (required) | — |
83
+ | `--only [parts]` | — | Apply only `theme` or `font` from the preset | — |
84
+ | `-c, --cwd <path>` | `-c` | Working directory | current |
85
+ | `-y, --yes` | `-y` | Overwrite existing files without confirmation | `false` |
86
+ | `-s, --silent` | `-s` | Mute output | `false` |
87
+ | `--skip-preflight` | — | Ignore preflight checks and continue | `false` |
88
+ | `--proxy <proxy>` | — | Fetch registry items through this proxy | env-based |
89
+ | `-h, --help` | `-h` | Help | — |
90
+
91
+ Requires an existing `components.json`. Run `init` first if the project is not yet configured.
92
+
93
+ ---
94
+
95
+ ### `update` — Update installed components
96
+
97
+ ```bash
98
+ npx shadcn-svelte@latest update [options] [components...]
99
+ ```
100
+
101
+ Re-fetches and applies registry content for components **already present** in the project. Run `shadcn-svelte update --help` for options.
102
+
103
+ | Flag | Short | Description | Default |
104
+ | ------------------ | ----- | ----------------------------------------------- | --------- |
105
+ | `-c, --cwd <path>` | `-c` | Working directory | current |
106
+ | `--skip-preflight` | — | Ignore preflight checks and continue | `false` |
107
+ | `--no-deps` | — | Skip adding and installing package dependencies | — |
108
+ | `-a, --all` | — | Update every installed component | `false` |
109
+ | `-y, --yes` | — | Skip confirmation prompt | `false` |
110
+ | `--proxy <proxy>` | — | Fetch through this proxy | env-based |
111
+ | `-h, --help` | `-h` | Help | — |
112
+
113
+ Commit your work before updating; overwrites are destructive.
114
+
115
+ ---
116
+
117
+ ### `registry build` — Build a custom registry
118
+
119
+ ```bash
120
+ npx shadcn-svelte@latest registry build [options] [registry]
121
+ ```
122
+
123
+ Reads a `registry.json` and writes registry JSON files for distribution. Default input: `./registry.json`, default output: `./static/r`.
124
+
125
+ | Flag | Short | Description | Default |
126
+ | --------------------- | ----- | ------------------------------- | ------------ |
127
+ | `-c, --cwd <path>` | `-c` | Working directory | current |
128
+ | `-o, --output <path>` | `-o` | Output directory for JSON files | `./static/r` |
129
+ | `-h, --help` | `-h` | Help | — |
130
+
131
+ ---
132
+
133
+ ## Outgoing Requests
134
+
135
+ ### Proxy
136
+
137
+ The CLI can fetch the registry through a proxy. If `HTTP_PROXY` or `http_proxy` is set, requests respect it. You can also pass `--proxy` on `init`, `add`, `apply`, or `update`.
138
+
139
+ ```bash
140
+ HTTP_PROXY="<proxy-url>" npx shadcn-svelte@latest init
141
+ ```
142
+
143
+ ---
144
+
145
+ ## Presets
146
+
147
+ Design-system options (style, theme, icons, fonts, etc.) can be captured as an encoded **preset** string from the builder on [shadcn-svelte.com/create](https://shadcn-svelte.com/create).
148
+
149
+ - **New project:** pass the preset to **`init`** with `--preset <string>`.
150
+ - **Existing project:** use **`apply --preset <string>`** to update configuration, restyle installed components, and install any new dependencies.
151
+
152
+ ---
153
+
154
+ ## `components.json` — useful fields for agents
155
+
156
+ | Field / path | Meaning |
157
+ | -------------------- | ---------------------------------------------------------------- |
158
+ | `tailwind.css` | Global CSS file path (Tailwind entry / theme variables) |
159
+ | `tailwind.baseColor` | Base palette (cannot change after init) |
160
+ | `aliases.*` | Import aliases; must match `svelte.config.js` / `tsconfig` paths |
161
+ | `registry` | Base registry URL (default `https://shadcn-svelte.com/registry`) |
162
+ | `style` | Registered style name (e.g. `nova`, `vega`, …) |
163
+ | `iconLibrary` | Icon set key (`lucide`, `tabler`, …) — drives generated imports |
164
+ | `typescript` | Whether TS and optional custom config path |
165
+
166
+ Resolved paths (including `tailwindCss`, `ui`, `components`) are computed by the CLI from `components.json` and the filesystem. Read `components.json` and list the UI directory when you need a snapshot of what is installed.