@linguanahq/cli 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (412) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +43 -0
  3. package/dist/index.js +1543 -0
  4. package/dist/templates/blog/react/.env.example +15 -0
  5. package/dist/templates/blog/react/ASSETS.md +1 -0
  6. package/dist/templates/blog/react/DEPLOY.md +23 -0
  7. package/dist/templates/blog/react/LICENSE +21 -0
  8. package/dist/templates/blog/react/README.md +36 -0
  9. package/dist/templates/blog/react/_gitignore +11 -0
  10. package/dist/templates/blog/react/index.html +2 -0
  11. package/dist/templates/blog/react/linguana.json +10 -0
  12. package/dist/templates/blog/react/package.json +34 -0
  13. package/dist/templates/blog/react/public/assets/scene-1.svg +1 -0
  14. package/dist/templates/blog/react/public/assets/scene-2.svg +1 -0
  15. package/dist/templates/blog/react/public/assets/scene-3.svg +1 -0
  16. package/dist/templates/blog/react/public/assets/scene-4.svg +1 -0
  17. package/dist/templates/blog/react/public/assets/scene-5.svg +1 -0
  18. package/dist/templates/blog/react/public/assets/scene-6.svg +1 -0
  19. package/dist/templates/blog/react/src/App.tsx +465 -0
  20. package/dist/templates/blog/react/src/Copy.tsx +322 -0
  21. package/dist/templates/blog/react/src/demo-messages.ts +221 -0
  22. package/dist/templates/blog/react/src/i18n.ts +62 -0
  23. package/dist/templates/blog/react/src/main.tsx +11 -0
  24. package/dist/templates/blog/react/src/messages.ts +71 -0
  25. package/dist/templates/blog/react/src/model.ts +128 -0
  26. package/dist/templates/blog/react/src/styles.css +1159 -0
  27. package/dist/templates/blog/react/src/vite-env.d.ts +1 -0
  28. package/dist/templates/blog/react/tsconfig.json +23 -0
  29. package/dist/templates/blog/react/vite.config.ts +36 -0
  30. package/dist/templates/blog/react/wrangler.jsonc +8 -0
  31. package/dist/templates/blog/solidjs/.env.example +15 -0
  32. package/dist/templates/blog/solidjs/ASSETS.md +1 -0
  33. package/dist/templates/blog/solidjs/DEPLOY.md +23 -0
  34. package/dist/templates/blog/solidjs/LICENSE +21 -0
  35. package/dist/templates/blog/solidjs/README.md +36 -0
  36. package/dist/templates/blog/solidjs/_gitignore +11 -0
  37. package/dist/templates/blog/solidjs/index.html +2 -0
  38. package/dist/templates/blog/solidjs/linguana.json +10 -0
  39. package/dist/templates/blog/solidjs/package.json +31 -0
  40. package/dist/templates/blog/solidjs/public/assets/scene-1.svg +1 -0
  41. package/dist/templates/blog/solidjs/public/assets/scene-2.svg +1 -0
  42. package/dist/templates/blog/solidjs/public/assets/scene-3.svg +1 -0
  43. package/dist/templates/blog/solidjs/public/assets/scene-4.svg +1 -0
  44. package/dist/templates/blog/solidjs/public/assets/scene-5.svg +1 -0
  45. package/dist/templates/blog/solidjs/public/assets/scene-6.svg +1 -0
  46. package/dist/templates/blog/solidjs/src/App.tsx +457 -0
  47. package/dist/templates/blog/solidjs/src/Copy.tsx +322 -0
  48. package/dist/templates/blog/solidjs/src/demo-messages.ts +221 -0
  49. package/dist/templates/blog/solidjs/src/i18n.ts +62 -0
  50. package/dist/templates/blog/solidjs/src/main.tsx +14 -0
  51. package/dist/templates/blog/solidjs/src/messages.ts +71 -0
  52. package/dist/templates/blog/solidjs/src/model.ts +128 -0
  53. package/dist/templates/blog/solidjs/src/styles.css +1159 -0
  54. package/dist/templates/blog/solidjs/src/vite-env.d.ts +1 -0
  55. package/dist/templates/blog/solidjs/tsconfig.json +24 -0
  56. package/dist/templates/blog/solidjs/vite.config.ts +36 -0
  57. package/dist/templates/blog/solidjs/wrangler.jsonc +8 -0
  58. package/dist/templates/blog/svelte/.env.example +15 -0
  59. package/dist/templates/blog/svelte/ASSETS.md +1 -0
  60. package/dist/templates/blog/svelte/DEPLOY.md +23 -0
  61. package/dist/templates/blog/svelte/LICENSE +21 -0
  62. package/dist/templates/blog/svelte/README.md +36 -0
  63. package/dist/templates/blog/svelte/_gitignore +11 -0
  64. package/dist/templates/blog/svelte/index.html +2 -0
  65. package/dist/templates/blog/svelte/linguana.json +10 -0
  66. package/dist/templates/blog/svelte/package.json +32 -0
  67. package/dist/templates/blog/svelte/public/assets/scene-1.svg +1 -0
  68. package/dist/templates/blog/svelte/public/assets/scene-2.svg +1 -0
  69. package/dist/templates/blog/svelte/public/assets/scene-3.svg +1 -0
  70. package/dist/templates/blog/svelte/public/assets/scene-4.svg +1 -0
  71. package/dist/templates/blog/svelte/public/assets/scene-5.svg +1 -0
  72. package/dist/templates/blog/svelte/public/assets/scene-6.svg +1 -0
  73. package/dist/templates/blog/svelte/src/App.svelte +196 -0
  74. package/dist/templates/blog/svelte/src/Copy.svelte +60 -0
  75. package/dist/templates/blog/svelte/src/Root.svelte +11 -0
  76. package/dist/templates/blog/svelte/src/demo-messages.ts +221 -0
  77. package/dist/templates/blog/svelte/src/i18n.ts +62 -0
  78. package/dist/templates/blog/svelte/src/main.ts +5 -0
  79. package/dist/templates/blog/svelte/src/messages.ts +71 -0
  80. package/dist/templates/blog/svelte/src/model.ts +128 -0
  81. package/dist/templates/blog/svelte/src/styles.css +1159 -0
  82. package/dist/templates/blog/svelte/src/vite-env.d.ts +1 -0
  83. package/dist/templates/blog/svelte/svelte.config.js +2 -0
  84. package/dist/templates/blog/svelte/tsconfig.json +23 -0
  85. package/dist/templates/blog/svelte/vite.config.ts +36 -0
  86. package/dist/templates/blog/svelte/wrangler.jsonc +8 -0
  87. package/dist/templates/blog/tanstack-start/.env.example +15 -0
  88. package/dist/templates/blog/tanstack-start/ASSETS.md +1 -0
  89. package/dist/templates/blog/tanstack-start/DEPLOY.md +23 -0
  90. package/dist/templates/blog/tanstack-start/LICENSE +21 -0
  91. package/dist/templates/blog/tanstack-start/README.md +36 -0
  92. package/dist/templates/blog/tanstack-start/_gitignore +11 -0
  93. package/dist/templates/blog/tanstack-start/linguana.json +10 -0
  94. package/dist/templates/blog/tanstack-start/nitro.config.ts +2 -0
  95. package/dist/templates/blog/tanstack-start/package.json +42 -0
  96. package/dist/templates/blog/tanstack-start/public/assets/scene-1.svg +1 -0
  97. package/dist/templates/blog/tanstack-start/public/assets/scene-2.svg +1 -0
  98. package/dist/templates/blog/tanstack-start/public/assets/scene-3.svg +1 -0
  99. package/dist/templates/blog/tanstack-start/public/assets/scene-4.svg +1 -0
  100. package/dist/templates/blog/tanstack-start/public/assets/scene-5.svg +1 -0
  101. package/dist/templates/blog/tanstack-start/public/assets/scene-6.svg +1 -0
  102. package/dist/templates/blog/tanstack-start/src/App.tsx +450 -0
  103. package/dist/templates/blog/tanstack-start/src/Copy.tsx +322 -0
  104. package/dist/templates/blog/tanstack-start/src/demo-messages.ts +221 -0
  105. package/dist/templates/blog/tanstack-start/src/i18n.ts +62 -0
  106. package/dist/templates/blog/tanstack-start/src/locale-server.ts +54 -0
  107. package/dist/templates/blog/tanstack-start/src/messages.ts +71 -0
  108. package/dist/templates/blog/tanstack-start/src/model.ts +128 -0
  109. package/dist/templates/blog/tanstack-start/src/router.tsx +10 -0
  110. package/dist/templates/blog/tanstack-start/src/routes/$.tsx +7 -0
  111. package/dist/templates/blog/tanstack-start/src/routes/__root.tsx +50 -0
  112. package/dist/templates/blog/tanstack-start/src/routes/index.tsx +5 -0
  113. package/dist/templates/blog/tanstack-start/src/styles.css +1159 -0
  114. package/dist/templates/blog/tanstack-start/src/vite-env.d.ts +1 -0
  115. package/dist/templates/blog/tanstack-start/tsconfig.json +23 -0
  116. package/dist/templates/blog/tanstack-start/vite.config.ts +50 -0
  117. package/dist/templates/blog/tanstack-start/wrangler.jsonc +12 -0
  118. package/dist/templates/blog/vue/.env.example +15 -0
  119. package/dist/templates/blog/vue/ASSETS.md +1 -0
  120. package/dist/templates/blog/vue/DEPLOY.md +23 -0
  121. package/dist/templates/blog/vue/LICENSE +21 -0
  122. package/dist/templates/blog/vue/README.md +36 -0
  123. package/dist/templates/blog/vue/_gitignore +11 -0
  124. package/dist/templates/blog/vue/index.html +2 -0
  125. package/dist/templates/blog/vue/linguana.json +10 -0
  126. package/dist/templates/blog/vue/package.json +34 -0
  127. package/dist/templates/blog/vue/public/assets/scene-1.svg +1 -0
  128. package/dist/templates/blog/vue/public/assets/scene-2.svg +1 -0
  129. package/dist/templates/blog/vue/public/assets/scene-3.svg +1 -0
  130. package/dist/templates/blog/vue/public/assets/scene-4.svg +1 -0
  131. package/dist/templates/blog/vue/public/assets/scene-5.svg +1 -0
  132. package/dist/templates/blog/vue/public/assets/scene-6.svg +1 -0
  133. package/dist/templates/blog/vue/src/App.vue +188 -0
  134. package/dist/templates/blog/vue/src/Copy.vue +59 -0
  135. package/dist/templates/blog/vue/src/demo-messages.ts +221 -0
  136. package/dist/templates/blog/vue/src/i18n.ts +62 -0
  137. package/dist/templates/blog/vue/src/main.ts +7 -0
  138. package/dist/templates/blog/vue/src/messages.ts +71 -0
  139. package/dist/templates/blog/vue/src/model.ts +128 -0
  140. package/dist/templates/blog/vue/src/styles.css +1159 -0
  141. package/dist/templates/blog/vue/src/vite-env.d.ts +1 -0
  142. package/dist/templates/blog/vue/tsconfig.json +23 -0
  143. package/dist/templates/blog/vue/vite.config.ts +36 -0
  144. package/dist/templates/blog/vue/wrangler.jsonc +8 -0
  145. package/dist/templates/saas/react/.env.example +15 -0
  146. package/dist/templates/saas/react/ASSETS.md +1 -0
  147. package/dist/templates/saas/react/DEPLOY.md +23 -0
  148. package/dist/templates/saas/react/LICENSE +21 -0
  149. package/dist/templates/saas/react/README.md +36 -0
  150. package/dist/templates/saas/react/_gitignore +11 -0
  151. package/dist/templates/saas/react/index.html +2 -0
  152. package/dist/templates/saas/react/linguana.json +10 -0
  153. package/dist/templates/saas/react/package.json +34 -0
  154. package/dist/templates/saas/react/src/App.tsx +631 -0
  155. package/dist/templates/saas/react/src/Copy.tsx +380 -0
  156. package/dist/templates/saas/react/src/demo-messages.ts +228 -0
  157. package/dist/templates/saas/react/src/i18n.ts +62 -0
  158. package/dist/templates/saas/react/src/main.tsx +11 -0
  159. package/dist/templates/saas/react/src/messages.ts +77 -0
  160. package/dist/templates/saas/react/src/model.ts +73 -0
  161. package/dist/templates/saas/react/src/styles.css +1159 -0
  162. package/dist/templates/saas/react/src/vite-env.d.ts +1 -0
  163. package/dist/templates/saas/react/tsconfig.json +23 -0
  164. package/dist/templates/saas/react/vite.config.ts +36 -0
  165. package/dist/templates/saas/react/wrangler.jsonc +8 -0
  166. package/dist/templates/saas/solidjs/.env.example +15 -0
  167. package/dist/templates/saas/solidjs/ASSETS.md +1 -0
  168. package/dist/templates/saas/solidjs/DEPLOY.md +23 -0
  169. package/dist/templates/saas/solidjs/LICENSE +21 -0
  170. package/dist/templates/saas/solidjs/README.md +36 -0
  171. package/dist/templates/saas/solidjs/_gitignore +11 -0
  172. package/dist/templates/saas/solidjs/index.html +2 -0
  173. package/dist/templates/saas/solidjs/linguana.json +10 -0
  174. package/dist/templates/saas/solidjs/package.json +31 -0
  175. package/dist/templates/saas/solidjs/src/App.tsx +629 -0
  176. package/dist/templates/saas/solidjs/src/Copy.tsx +380 -0
  177. package/dist/templates/saas/solidjs/src/demo-messages.ts +228 -0
  178. package/dist/templates/saas/solidjs/src/i18n.ts +62 -0
  179. package/dist/templates/saas/solidjs/src/main.tsx +14 -0
  180. package/dist/templates/saas/solidjs/src/messages.ts +77 -0
  181. package/dist/templates/saas/solidjs/src/model.ts +73 -0
  182. package/dist/templates/saas/solidjs/src/styles.css +1159 -0
  183. package/dist/templates/saas/solidjs/src/vite-env.d.ts +1 -0
  184. package/dist/templates/saas/solidjs/tsconfig.json +24 -0
  185. package/dist/templates/saas/solidjs/vite.config.ts +36 -0
  186. package/dist/templates/saas/solidjs/wrangler.jsonc +8 -0
  187. package/dist/templates/saas/svelte/.env.example +15 -0
  188. package/dist/templates/saas/svelte/ASSETS.md +1 -0
  189. package/dist/templates/saas/svelte/DEPLOY.md +23 -0
  190. package/dist/templates/saas/svelte/LICENSE +21 -0
  191. package/dist/templates/saas/svelte/README.md +36 -0
  192. package/dist/templates/saas/svelte/_gitignore +11 -0
  193. package/dist/templates/saas/svelte/index.html +2 -0
  194. package/dist/templates/saas/svelte/linguana.json +10 -0
  195. package/dist/templates/saas/svelte/package.json +32 -0
  196. package/dist/templates/saas/svelte/src/App.svelte +252 -0
  197. package/dist/templates/saas/svelte/src/Copy.svelte +74 -0
  198. package/dist/templates/saas/svelte/src/Root.svelte +11 -0
  199. package/dist/templates/saas/svelte/src/demo-messages.ts +228 -0
  200. package/dist/templates/saas/svelte/src/i18n.ts +62 -0
  201. package/dist/templates/saas/svelte/src/main.ts +5 -0
  202. package/dist/templates/saas/svelte/src/messages.ts +77 -0
  203. package/dist/templates/saas/svelte/src/model.ts +73 -0
  204. package/dist/templates/saas/svelte/src/styles.css +1159 -0
  205. package/dist/templates/saas/svelte/src/vite-env.d.ts +1 -0
  206. package/dist/templates/saas/svelte/svelte.config.js +2 -0
  207. package/dist/templates/saas/svelte/tsconfig.json +23 -0
  208. package/dist/templates/saas/svelte/vite.config.ts +36 -0
  209. package/dist/templates/saas/svelte/wrangler.jsonc +8 -0
  210. package/dist/templates/saas/tanstack-start/.env.example +15 -0
  211. package/dist/templates/saas/tanstack-start/ASSETS.md +1 -0
  212. package/dist/templates/saas/tanstack-start/DEPLOY.md +23 -0
  213. package/dist/templates/saas/tanstack-start/LICENSE +21 -0
  214. package/dist/templates/saas/tanstack-start/README.md +36 -0
  215. package/dist/templates/saas/tanstack-start/_gitignore +11 -0
  216. package/dist/templates/saas/tanstack-start/linguana.json +10 -0
  217. package/dist/templates/saas/tanstack-start/nitro.config.ts +2 -0
  218. package/dist/templates/saas/tanstack-start/package.json +42 -0
  219. package/dist/templates/saas/tanstack-start/src/App.tsx +616 -0
  220. package/dist/templates/saas/tanstack-start/src/Copy.tsx +380 -0
  221. package/dist/templates/saas/tanstack-start/src/demo-messages.ts +228 -0
  222. package/dist/templates/saas/tanstack-start/src/i18n.ts +62 -0
  223. package/dist/templates/saas/tanstack-start/src/locale-server.ts +54 -0
  224. package/dist/templates/saas/tanstack-start/src/messages.ts +77 -0
  225. package/dist/templates/saas/tanstack-start/src/model.ts +73 -0
  226. package/dist/templates/saas/tanstack-start/src/router.tsx +10 -0
  227. package/dist/templates/saas/tanstack-start/src/routes/$.tsx +7 -0
  228. package/dist/templates/saas/tanstack-start/src/routes/__root.tsx +50 -0
  229. package/dist/templates/saas/tanstack-start/src/routes/index.tsx +5 -0
  230. package/dist/templates/saas/tanstack-start/src/styles.css +1159 -0
  231. package/dist/templates/saas/tanstack-start/src/vite-env.d.ts +1 -0
  232. package/dist/templates/saas/tanstack-start/tsconfig.json +23 -0
  233. package/dist/templates/saas/tanstack-start/vite.config.ts +50 -0
  234. package/dist/templates/saas/tanstack-start/wrangler.jsonc +12 -0
  235. package/dist/templates/saas/vue/.env.example +15 -0
  236. package/dist/templates/saas/vue/ASSETS.md +1 -0
  237. package/dist/templates/saas/vue/DEPLOY.md +23 -0
  238. package/dist/templates/saas/vue/LICENSE +21 -0
  239. package/dist/templates/saas/vue/README.md +36 -0
  240. package/dist/templates/saas/vue/_gitignore +11 -0
  241. package/dist/templates/saas/vue/index.html +2 -0
  242. package/dist/templates/saas/vue/linguana.json +10 -0
  243. package/dist/templates/saas/vue/package.json +34 -0
  244. package/dist/templates/saas/vue/src/App.vue +244 -0
  245. package/dist/templates/saas/vue/src/Copy.vue +73 -0
  246. package/dist/templates/saas/vue/src/demo-messages.ts +228 -0
  247. package/dist/templates/saas/vue/src/i18n.ts +62 -0
  248. package/dist/templates/saas/vue/src/main.ts +7 -0
  249. package/dist/templates/saas/vue/src/messages.ts +77 -0
  250. package/dist/templates/saas/vue/src/model.ts +73 -0
  251. package/dist/templates/saas/vue/src/styles.css +1159 -0
  252. package/dist/templates/saas/vue/src/vite-env.d.ts +1 -0
  253. package/dist/templates/saas/vue/tsconfig.json +23 -0
  254. package/dist/templates/saas/vue/vite.config.ts +36 -0
  255. package/dist/templates/saas/vue/wrangler.jsonc +8 -0
  256. package/dist/templates/storefront/react/.env.example +15 -0
  257. package/dist/templates/storefront/react/ASSETS.md +1 -0
  258. package/dist/templates/storefront/react/DEPLOY.md +23 -0
  259. package/dist/templates/storefront/react/LICENSE +21 -0
  260. package/dist/templates/storefront/react/README.md +36 -0
  261. package/dist/templates/storefront/react/_gitignore +11 -0
  262. package/dist/templates/storefront/react/index.html +2 -0
  263. package/dist/templates/storefront/react/linguana.json +10 -0
  264. package/dist/templates/storefront/react/package.json +34 -0
  265. package/dist/templates/storefront/react/public/assets/collection.svg +1 -0
  266. package/dist/templates/storefront/react/public/assets/product-1.svg +1 -0
  267. package/dist/templates/storefront/react/public/assets/product-2.svg +1 -0
  268. package/dist/templates/storefront/react/public/assets/product-3.svg +1 -0
  269. package/dist/templates/storefront/react/public/assets/product-4.svg +1 -0
  270. package/dist/templates/storefront/react/public/assets/product-5.svg +1 -0
  271. package/dist/templates/storefront/react/public/assets/product-6.svg +1 -0
  272. package/dist/templates/storefront/react/public/assets/product-7.svg +1 -0
  273. package/dist/templates/storefront/react/public/assets/product-8.svg +1 -0
  274. package/dist/templates/storefront/react/src/App.tsx +616 -0
  275. package/dist/templates/storefront/react/src/Copy.tsx +304 -0
  276. package/dist/templates/storefront/react/src/demo-messages.ts +205 -0
  277. package/dist/templates/storefront/react/src/i18n.ts +64 -0
  278. package/dist/templates/storefront/react/src/main.tsx +11 -0
  279. package/dist/templates/storefront/react/src/messages.ts +71 -0
  280. package/dist/templates/storefront/react/src/model.ts +146 -0
  281. package/dist/templates/storefront/react/src/styles.css +1159 -0
  282. package/dist/templates/storefront/react/src/vite-env.d.ts +1 -0
  283. package/dist/templates/storefront/react/tsconfig.json +23 -0
  284. package/dist/templates/storefront/react/vite.config.ts +36 -0
  285. package/dist/templates/storefront/react/wrangler.jsonc +8 -0
  286. package/dist/templates/storefront/solidjs/.env.example +15 -0
  287. package/dist/templates/storefront/solidjs/ASSETS.md +1 -0
  288. package/dist/templates/storefront/solidjs/DEPLOY.md +23 -0
  289. package/dist/templates/storefront/solidjs/LICENSE +21 -0
  290. package/dist/templates/storefront/solidjs/README.md +36 -0
  291. package/dist/templates/storefront/solidjs/_gitignore +11 -0
  292. package/dist/templates/storefront/solidjs/index.html +2 -0
  293. package/dist/templates/storefront/solidjs/linguana.json +10 -0
  294. package/dist/templates/storefront/solidjs/package.json +31 -0
  295. package/dist/templates/storefront/solidjs/public/assets/collection.svg +1 -0
  296. package/dist/templates/storefront/solidjs/public/assets/product-1.svg +1 -0
  297. package/dist/templates/storefront/solidjs/public/assets/product-2.svg +1 -0
  298. package/dist/templates/storefront/solidjs/public/assets/product-3.svg +1 -0
  299. package/dist/templates/storefront/solidjs/public/assets/product-4.svg +1 -0
  300. package/dist/templates/storefront/solidjs/public/assets/product-5.svg +1 -0
  301. package/dist/templates/storefront/solidjs/public/assets/product-6.svg +1 -0
  302. package/dist/templates/storefront/solidjs/public/assets/product-7.svg +1 -0
  303. package/dist/templates/storefront/solidjs/public/assets/product-8.svg +1 -0
  304. package/dist/templates/storefront/solidjs/src/App.tsx +612 -0
  305. package/dist/templates/storefront/solidjs/src/Copy.tsx +304 -0
  306. package/dist/templates/storefront/solidjs/src/demo-messages.ts +205 -0
  307. package/dist/templates/storefront/solidjs/src/i18n.ts +64 -0
  308. package/dist/templates/storefront/solidjs/src/main.tsx +14 -0
  309. package/dist/templates/storefront/solidjs/src/messages.ts +71 -0
  310. package/dist/templates/storefront/solidjs/src/model.ts +146 -0
  311. package/dist/templates/storefront/solidjs/src/styles.css +1159 -0
  312. package/dist/templates/storefront/solidjs/src/vite-env.d.ts +1 -0
  313. package/dist/templates/storefront/solidjs/tsconfig.json +24 -0
  314. package/dist/templates/storefront/solidjs/vite.config.ts +36 -0
  315. package/dist/templates/storefront/solidjs/wrangler.jsonc +8 -0
  316. package/dist/templates/storefront/svelte/.env.example +15 -0
  317. package/dist/templates/storefront/svelte/ASSETS.md +1 -0
  318. package/dist/templates/storefront/svelte/DEPLOY.md +23 -0
  319. package/dist/templates/storefront/svelte/LICENSE +21 -0
  320. package/dist/templates/storefront/svelte/README.md +36 -0
  321. package/dist/templates/storefront/svelte/_gitignore +11 -0
  322. package/dist/templates/storefront/svelte/index.html +2 -0
  323. package/dist/templates/storefront/svelte/linguana.json +10 -0
  324. package/dist/templates/storefront/svelte/package.json +32 -0
  325. package/dist/templates/storefront/svelte/public/assets/collection.svg +1 -0
  326. package/dist/templates/storefront/svelte/public/assets/product-1.svg +1 -0
  327. package/dist/templates/storefront/svelte/public/assets/product-2.svg +1 -0
  328. package/dist/templates/storefront/svelte/public/assets/product-3.svg +1 -0
  329. package/dist/templates/storefront/svelte/public/assets/product-4.svg +1 -0
  330. package/dist/templates/storefront/svelte/public/assets/product-5.svg +1 -0
  331. package/dist/templates/storefront/svelte/public/assets/product-6.svg +1 -0
  332. package/dist/templates/storefront/svelte/public/assets/product-7.svg +1 -0
  333. package/dist/templates/storefront/svelte/public/assets/product-8.svg +1 -0
  334. package/dist/templates/storefront/svelte/src/App.svelte +218 -0
  335. package/dist/templates/storefront/svelte/src/Copy.svelte +66 -0
  336. package/dist/templates/storefront/svelte/src/Root.svelte +11 -0
  337. package/dist/templates/storefront/svelte/src/demo-messages.ts +205 -0
  338. package/dist/templates/storefront/svelte/src/i18n.ts +64 -0
  339. package/dist/templates/storefront/svelte/src/main.ts +5 -0
  340. package/dist/templates/storefront/svelte/src/messages.ts +71 -0
  341. package/dist/templates/storefront/svelte/src/model.ts +146 -0
  342. package/dist/templates/storefront/svelte/src/styles.css +1159 -0
  343. package/dist/templates/storefront/svelte/src/vite-env.d.ts +1 -0
  344. package/dist/templates/storefront/svelte/svelte.config.js +2 -0
  345. package/dist/templates/storefront/svelte/tsconfig.json +23 -0
  346. package/dist/templates/storefront/svelte/vite.config.ts +36 -0
  347. package/dist/templates/storefront/svelte/wrangler.jsonc +8 -0
  348. package/dist/templates/storefront/tanstack-start/.env.example +15 -0
  349. package/dist/templates/storefront/tanstack-start/ASSETS.md +1 -0
  350. package/dist/templates/storefront/tanstack-start/DEPLOY.md +23 -0
  351. package/dist/templates/storefront/tanstack-start/LICENSE +21 -0
  352. package/dist/templates/storefront/tanstack-start/README.md +36 -0
  353. package/dist/templates/storefront/tanstack-start/_gitignore +11 -0
  354. package/dist/templates/storefront/tanstack-start/linguana.json +10 -0
  355. package/dist/templates/storefront/tanstack-start/nitro.config.ts +2 -0
  356. package/dist/templates/storefront/tanstack-start/package.json +42 -0
  357. package/dist/templates/storefront/tanstack-start/public/assets/collection.svg +1 -0
  358. package/dist/templates/storefront/tanstack-start/public/assets/product-1.svg +1 -0
  359. package/dist/templates/storefront/tanstack-start/public/assets/product-2.svg +1 -0
  360. package/dist/templates/storefront/tanstack-start/public/assets/product-3.svg +1 -0
  361. package/dist/templates/storefront/tanstack-start/public/assets/product-4.svg +1 -0
  362. package/dist/templates/storefront/tanstack-start/public/assets/product-5.svg +1 -0
  363. package/dist/templates/storefront/tanstack-start/public/assets/product-6.svg +1 -0
  364. package/dist/templates/storefront/tanstack-start/public/assets/product-7.svg +1 -0
  365. package/dist/templates/storefront/tanstack-start/public/assets/product-8.svg +1 -0
  366. package/dist/templates/storefront/tanstack-start/src/App.tsx +601 -0
  367. package/dist/templates/storefront/tanstack-start/src/Copy.tsx +304 -0
  368. package/dist/templates/storefront/tanstack-start/src/demo-messages.ts +205 -0
  369. package/dist/templates/storefront/tanstack-start/src/i18n.ts +64 -0
  370. package/dist/templates/storefront/tanstack-start/src/locale-server.ts +54 -0
  371. package/dist/templates/storefront/tanstack-start/src/messages.ts +71 -0
  372. package/dist/templates/storefront/tanstack-start/src/model.ts +146 -0
  373. package/dist/templates/storefront/tanstack-start/src/router.tsx +10 -0
  374. package/dist/templates/storefront/tanstack-start/src/routes/$.tsx +7 -0
  375. package/dist/templates/storefront/tanstack-start/src/routes/__root.tsx +50 -0
  376. package/dist/templates/storefront/tanstack-start/src/routes/index.tsx +5 -0
  377. package/dist/templates/storefront/tanstack-start/src/styles.css +1159 -0
  378. package/dist/templates/storefront/tanstack-start/src/vite-env.d.ts +1 -0
  379. package/dist/templates/storefront/tanstack-start/tsconfig.json +23 -0
  380. package/dist/templates/storefront/tanstack-start/vite.config.ts +50 -0
  381. package/dist/templates/storefront/tanstack-start/wrangler.jsonc +12 -0
  382. package/dist/templates/storefront/vue/.env.example +15 -0
  383. package/dist/templates/storefront/vue/ASSETS.md +1 -0
  384. package/dist/templates/storefront/vue/DEPLOY.md +23 -0
  385. package/dist/templates/storefront/vue/LICENSE +21 -0
  386. package/dist/templates/storefront/vue/README.md +36 -0
  387. package/dist/templates/storefront/vue/_gitignore +11 -0
  388. package/dist/templates/storefront/vue/index.html +2 -0
  389. package/dist/templates/storefront/vue/linguana.json +10 -0
  390. package/dist/templates/storefront/vue/package.json +34 -0
  391. package/dist/templates/storefront/vue/public/assets/collection.svg +1 -0
  392. package/dist/templates/storefront/vue/public/assets/product-1.svg +1 -0
  393. package/dist/templates/storefront/vue/public/assets/product-2.svg +1 -0
  394. package/dist/templates/storefront/vue/public/assets/product-3.svg +1 -0
  395. package/dist/templates/storefront/vue/public/assets/product-4.svg +1 -0
  396. package/dist/templates/storefront/vue/public/assets/product-5.svg +1 -0
  397. package/dist/templates/storefront/vue/public/assets/product-6.svg +1 -0
  398. package/dist/templates/storefront/vue/public/assets/product-7.svg +1 -0
  399. package/dist/templates/storefront/vue/public/assets/product-8.svg +1 -0
  400. package/dist/templates/storefront/vue/src/App.vue +210 -0
  401. package/dist/templates/storefront/vue/src/Copy.vue +65 -0
  402. package/dist/templates/storefront/vue/src/demo-messages.ts +205 -0
  403. package/dist/templates/storefront/vue/src/i18n.ts +64 -0
  404. package/dist/templates/storefront/vue/src/main.ts +7 -0
  405. package/dist/templates/storefront/vue/src/messages.ts +71 -0
  406. package/dist/templates/storefront/vue/src/model.ts +146 -0
  407. package/dist/templates/storefront/vue/src/styles.css +1159 -0
  408. package/dist/templates/storefront/vue/src/vite-env.d.ts +1 -0
  409. package/dist/templates/storefront/vue/tsconfig.json +23 -0
  410. package/dist/templates/storefront/vue/vite.config.ts +36 -0
  411. package/dist/templates/storefront/vue/wrangler.jsonc +8 -0
  412. package/package.json +38 -0
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
6
+ "moduleResolution": "Bundler",
7
+ "strict": true,
8
+ "skipLibCheck": true,
9
+ "esModuleInterop": true,
10
+ "allowImportingTsExtensions": true,
11
+ "resolveJsonModule": true,
12
+ "noEmit": true,
13
+ "types": ["vite/client", "node"],
14
+ "jsx": "preserve",
15
+ "jsxImportSource": "solid-js"
16
+ },
17
+ "include": [
18
+ "src/**/*.ts",
19
+ "src/**/*.tsx",
20
+ "src/**/*.vue",
21
+ "src/**/*.svelte",
22
+ "vite.config.ts"
23
+ ]
24
+ }
@@ -0,0 +1,36 @@
1
+ import { linguana } from "@linguanahq/vite";
2
+ import { solid } from "@linguanahq/vite/solid";
3
+ import { defineConfig, loadEnv } from "vite";
4
+ import native from "vite-plugin-solid";
5
+ import config from "./linguana.json" with { type: "json" };
6
+
7
+ export default defineConfig(({ mode }) => {
8
+ const env = { ...loadEnv(mode, process.cwd(), ""), ...process.env };
9
+ const connected = config.mode === "connected";
10
+ if (
11
+ connected &&
12
+ (!env.LINGUANA_PROJECT_ID ||
13
+ !env.VITE_LINGUANA_PUBLISHABLE_KEY ||
14
+ env.LINGUANA_PROJECT_ID !== env.VITE_LINGUANA_PROJECT_ID ||
15
+ env.LINGUANA_ENVIRONMENT !== env.VITE_LINGUANA_ENVIRONMENT ||
16
+ env.LINGUANA_API_URL !== env.VITE_LINGUANA_API_URL)
17
+ )
18
+ throw new Error(
19
+ "Linguana environment is incomplete or inconsistent. Run linguana env pull for this build mode.",
20
+ );
21
+ return {
22
+ plugins: [
23
+ linguana({
24
+ adapter: solid(),
25
+ projectId: connected ? env.LINGUANA_PROJECT_ID! : "demo-storefront",
26
+ environment: connected ? env.LINGUANA_ENVIRONMENT : "development",
27
+ sourceLocale: config.sourceLocale,
28
+ apiUrl: connected ? env.LINGUANA_API_URL : undefined,
29
+ token: connected ? env.LINGUANA_PROJECT_TOKEN : undefined,
30
+ upload: connected && env.LINGUANA_UPLOAD === "true",
31
+ translation: false,
32
+ }),
33
+ native(),
34
+ ],
35
+ };
36
+ });
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "linguana-demo-storefront-solidjs",
3
+ "compatibility_date": "2026-10-01",
4
+ "assets": {
5
+ "directory": "./dist",
6
+ "not_found_handling": "single-page-application"
7
+ }
8
+ }
@@ -0,0 +1,15 @@
1
+ # Demo mode works without credentials. Connect with npx @linguanahq/cli link.
2
+ # Copying this file alone does not enable connected mode; use linguana.json.
3
+ # Build/server only. NEVER prefix the project token with VITE_.
4
+ LINGUANA_PROJECT_ID=
5
+ LINGUANA_ENVIRONMENT=development
6
+ LINGUANA_API_URL=https://linguana-api.mohammedibrahim.dev
7
+ LINGUANA_PROJECT_TOKEN=
8
+ LINGUANA_UPLOAD=false
9
+ # Paid translation is disabled; this template does not enable it automatically.
10
+ LINGUANA_TRANSLATE=false
11
+ # Browser-safe values. A publishable key reads published catalogs only.
12
+ VITE_LINGUANA_PROJECT_ID=
13
+ VITE_LINGUANA_ENVIRONMENT=development
14
+ VITE_LINGUANA_API_URL=https://linguana-api.mohammedibrahim.dev
15
+ VITE_LINGUANA_PUBLISHABLE_KEY=
@@ -0,0 +1 @@
1
+ All illustrations in public/assets were drawn for these templates and are covered by LICENSE (MIT). Sample writing and translations are also MIT. No remote images, tracking pixels, or font services are used. Product images and prices describe fictional demonstration goods.
@@ -0,0 +1,23 @@
1
+ # Deploy Common Goods
2
+
3
+ Demo mode needs no Linguana account. Hosting authentication is separate from the Linguana CLI.
4
+
5
+ ## Cloudflare Workers
6
+
7
+ Install dependencies, choose a unique Worker name in wrangler.jsonc, then:
8
+
9
+ ```sh
10
+ npx wrangler login
11
+ npm run build
12
+ npx wrangler deploy
13
+ ```
14
+
15
+ Wrangler serves dist as static assets with single-page navigation fallback. Deep article/product links continue to work.
16
+
17
+ ## Any static host
18
+
19
+ Run `npm run build` and publish dist/. Configure unknown paths to serve /index.html with status 200 (SPA fallback). A static preview can be started with `npm run preview`. Do not publish the project root.
20
+
21
+ ## Connected deployments
22
+
23
+ Pull the intended environment with `linguana env pull --environment production`. Configure the variables from .env.example in the build host, including the matching public project/environment values. Build tokens are secrets used by the compiler only. Never upload .env files or the CLI account session. LINGUANA_TRANSLATE remains false. Catalog publication is an explicit dashboard action.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Linguana contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,36 @@
1
+ # Common Goods
2
+
3
+ Everyday essentials, considered carefully. Product browsing, a persistent cart, and room to make it yours.
4
+
5
+ A standalone svelte app, generated from Linguana templates v0.1.0. Requires Node 22.12+ (or Bun).
6
+
7
+ ## Run
8
+
9
+ ```sh
10
+ npm install
11
+ npm run dev
12
+ ```
13
+
14
+ You can also use pnpm, Yarn, or Bun. English, French, Spanish, and Arabic catalogs are bundled in demo mode. No Linguana API requests are made. The language cookie persists between visits. Arabic switches the document to RTL.
15
+
16
+ ## Connect your own project
17
+
18
+ ```sh
19
+ npx @linguanahq/cli login
20
+ npx @linguanahq/cli link
21
+ npx @linguanahq/cli doctor
22
+ ```
23
+
24
+ Linking writes nonsecret `linguana.json` and ignored `.env.local`. The account session stays outside this project. Only the public project ID, environment, API URL, and publishable key reach the browser. Build tokens never belong in `VITE_*` variables.
25
+
26
+ Connected mode uses your published project catalogs and English source fallback. It does not load demo translations. Builds can upload the source manifest but do not start paid translations or publish catalogs. Review and publish translations in your dashboard. Existing project languages remain unchanged unless you pass `--locales`.
27
+
28
+ To target another environment, use `linguana env pull --environment staging`, then `npm run build -- --mode staging`. Production uses `.env.production.local` and Vite's default production build mode. Configure matching private and public values on your build host; see .env.example.
29
+
30
+ ## Customize
31
+
32
+ Edit native components in src/App.svelte, literal messages in src/Copy.svelte, source fallbacks in src/messages.ts, and bundled demo catalogs in src/demo-messages.ts. Keep explicit message IDs stable. Each Copy branch is an extractable literal message; structured items in src/model.ts hold identifiers, prices, dates, and media only. Build output includes .linguana/manifest.json for review.
33
+
34
+ The basket persists locally, validates stored quantities, and uses illustrative USD prices. Checkout is simulated; no payments or real orders are accepted.
35
+
36
+ Run `npm run check-types` and `npm run build` before deploying. Deployment instructions are in DEPLOY.md. Source and illustrations are MIT; see LICENSE and ASSETS.md.
@@ -0,0 +1,11 @@
1
+ node_modules/
2
+ dist/
3
+ .output/
4
+ .nitro/
5
+ .tanstack/
6
+ .wrangler/
7
+ .env
8
+ .env.local
9
+ .env.*.local
10
+ .linguana/
11
+ *.log
@@ -0,0 +1,2 @@
1
+ <!doctype html>
2
+ <html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description" content="Everyday essentials, considered carefully. Product browsing, a persistent cart, and room to make it yours."><meta name="theme-color" content="#234f45"><title>Common Goods</title></head><body><div id="app"></div><script type="module" src="/src/main.ts"></script></body></html>
@@ -0,0 +1,10 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "framework": "svelte",
4
+ "template": "storefront",
5
+ "templateVersion": "0.1.0",
6
+ "mode": "demo",
7
+ "apiUrl": "https://linguana-api.mohammedibrahim.dev",
8
+ "sourceLocale": "en",
9
+ "defaultEnvironment": "development"
10
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "storefront-svelte",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "engines": {
8
+ "node": ">=22.12.0"
9
+ },
10
+ "scripts": {
11
+ "dev": "vite --host 127.0.0.1",
12
+ "build": "vite build",
13
+ "preview": "vite preview",
14
+ "check-types": "svelte-check --tsconfig ./tsconfig.json",
15
+ "deploy": "npm run build && wrangler deploy"
16
+ },
17
+ "dependencies": {
18
+ "@linguanahq/catalog": "0.1.1",
19
+ "@linguanahq/core": "0.1.1",
20
+ "@linguanahq/svelte": "0.1.1",
21
+ "svelte": "^5.43.8"
22
+ },
23
+ "devDependencies": {
24
+ "@linguanahq/vite": "0.1.1",
25
+ "typescript": "^6.0.0",
26
+ "vite": "^8.1.3",
27
+ "@types/node": "^24.0.0",
28
+ "wrangler": "^4.127.0",
29
+ "@sveltejs/vite-plugin-svelte": "^7.1.1",
30
+ "svelte-check": "^4.3.3"
31
+ }
32
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><title>Original Linguana template illustration</title><rect width="800" height="600" fill="#e7ecdc"/><path d="M0 455q400-65 800 0v145H0Z" fill="#d5d9c8"/><g transform="translate(-160 30) scale(.8)"><path d="M280 220h240l30 280H250Z" fill="#c7b48e"/><path d="M333 235v-65q67-80 134 0v65" fill="none" stroke="#a68f68" stroke-width="20"/><path d="M265 245h270M290 465h220" stroke="#dfd0b0" stroke-width="3"/><path d="M345 335h110v85H345Z" fill="#e2d5b7"/><path d="M383 358l18 25 18-25" fill="none" stroke="#778878" stroke-width="4"/></g><g transform="translate(300 -15) scale(.85)"><ellipse cx="410" cy="500" rx="130" ry="23" fill="#244f47"/><path d="M410 492V205q0-55 55-55" fill="none" stroke="#436d61" stroke-width="20"/><path d="M280 220q130-245 260 0Z" fill="#3d675b"/><ellipse cx="410" cy="220" rx="130" ry="18" fill="#e5cba1"/></g><g transform="translate(130 225) scale(.55)"><path d="M510 260h45q70 75-5 125h-45" fill="none" stroke="#a5755e" stroke-width="32"/><path d="M265 215h260l-18 240q-112 55-224 0Z" fill="#bf9176"/><ellipse cx="395" cy="215" rx="130" ry="30" fill="#d8b397"/><ellipse cx="395" cy="215" rx="105" ry="17" fill="#6b5748"/><path d="M290 245l12 150" stroke="#d8ad90" stroke-width="10"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><title>Original Linguana template illustration</title><rect width="800" height="600" fill="#e8e3d9"/><ellipse cx="400" cy="519" rx="195" ry="22" fill="#263d3110"/><path d="M280 220h240l30 280H250Z" fill="#c7b48e"/><path d="M333 235v-65q67-80 134 0v65" fill="none" stroke="#a68f68" stroke-width="20"/><path d="M265 245h270M290 465h220" stroke="#dfd0b0" stroke-width="3"/><path d="M345 335h110v85H345Z" fill="#e2d5b7"/><path d="M383 358l18 25 18-25" fill="none" stroke="#778878" stroke-width="4"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><title>Original Linguana template illustration</title><rect width="800" height="600" fill="#e4e9e0"/><ellipse cx="400" cy="519" rx="195" ry="22" fill="#263d3110"/><path d="M510 260h45q70 75-5 125h-45" fill="none" stroke="#a5755e" stroke-width="32"/><path d="M265 215h260l-18 240q-112 55-224 0Z" fill="#bf9176"/><ellipse cx="395" cy="215" rx="130" ry="30" fill="#d8b397"/><ellipse cx="395" cy="215" rx="105" ry="17" fill="#6b5748"/><path d="M290 245l12 150" stroke="#d8ad90" stroke-width="10"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><title>Original Linguana template illustration</title><rect width="800" height="600" fill="#eee8dc"/><ellipse cx="400" cy="519" rx="195" ry="22" fill="#263d3110"/><ellipse cx="410" cy="500" rx="130" ry="23" fill="#244f47"/><path d="M410 492V205q0-55 55-55" fill="none" stroke="#436d61" stroke-width="20"/><path d="M280 220q130-245 260 0Z" fill="#3d675b"/><ellipse cx="410" cy="220" rx="130" ry="18" fill="#e5cba1"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><title>Original Linguana template illustration</title><rect width="800" height="600" fill="#ecece0"/><ellipse cx="400" cy="519" rx="195" ry="22" fill="#263d3110"/><path d="M270 170l245 20v320l-245-25Z" fill="#d5c0a0"/><path d="M270 155l245 20v320l-245-25Z" fill="#779487"/><path d="M294 158v314" stroke="#516f62" stroke-width="7"/><path d="M342 250l110 9m-110 15l110 9m-110 15l70 5" stroke="#b8c9b7" stroke-width="3"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><title>Original Linguana template illustration</title><rect width="800" height="600" fill="#e8e3d9"/><ellipse cx="400" cy="519" rx="195" ry="22" fill="#263d3110"/><path d="M345 155h110v65l40 55v220q-95 45-190 0V275l40-55Z" fill="#87a39b"/><path d="M345 142h110v40H345Z" fill="#34584e"/><path d="M325 285v180" stroke="#bfd0c4" stroke-width="10"/><path d="M352 334h95v80h-95Z" fill="#a7bdb1"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><title>Original Linguana template illustration</title><rect width="800" height="600" fill="#e4e9e0"/><ellipse cx="400" cy="519" rx="195" ry="22" fill="#263d3110"/><path d="M220 220q180 20 360-10-20 130 0 250-190-18-360 0 25-130 0-240Z" fill="#bf8a6f"/><path d="M239 240q160 10 321-9-14 114 0 207-169-14-321 0 17-110 0-198Z" stroke="#d7a990" stroke-width="3" fill="none"/><path d="M260 268l285 135M280 238l245 172M280 422l245-165" stroke="#c8967b" stroke-width="2"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><title>Original Linguana template illustration</title><rect width="800" height="600" fill="#eee8dc"/><ellipse cx="400" cy="519" rx="195" ry="22" fill="#263d3110"/><ellipse cx="400" cy="388" rx="230" ry="90" fill="#a98e63"/><ellipse cx="400" cy="365" rx="230" ry="90" fill="#d0b589"/><ellipse cx="400" cy="365" rx="199" ry="65" fill="#bda077"/><path d="M250 350q150-50 300 0M240 374q170 46 325-2" fill="none" stroke="#b19268" stroke-width="3"/><circle cx="342" cy="364" r="25" fill="none" stroke="#718278" stroke-width="9"/><path d="M365 365h80v18h-10v10h-13v-11h-53" fill="#718278"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><title>Original Linguana template illustration</title><rect width="800" height="600" fill="#ecece0"/><ellipse cx="400" cy="519" rx="195" ry="22" fill="#263d3110"/><circle cx="400" cy="310" r="180" fill="#788f83"/><circle cx="400" cy="310" r="162" fill="#ebe7d9"/><g stroke="#768075" stroke-width="5"><path d="M400 168v22m0 240v22M258 310h22m240 0h22M300 210l15 15m170 170l15 15M300 410l15-15m170-170l15-15"/></g><path d="M400 220v90l80 42" stroke="#3c584d" stroke-width="9" fill="none"/><circle cx="400" cy="310" r="9" fill="#a36e56"/></svg>
@@ -0,0 +1,218 @@
1
+ <script lang="ts">
2
+ import { getLinguana } from "@linguanahq/svelte";
3
+ import { onMount } from "svelte";
4
+ import Copy from "./Copy.svelte";
5
+ import { demoLocales } from "./i18n";
6
+ import { messages } from "./messages";
7
+ import {
8
+ initialState,
9
+ items,
10
+ quantity,
11
+ readCart,
12
+ type State,
13
+ saveCart,
14
+ } from "./model";
15
+
16
+ const client = getLinguana();
17
+ let snapshot = $state(client.getSnapshot());
18
+ const locale = () => snapshot.locale;
19
+ const locales = () =>
20
+ snapshot.availableLocales.length
21
+ ? snapshot.availableLocales
22
+ : demoLocales.filter((item) => item.code === "en");
23
+ const translate = (...args: Parameters<typeof client.translate>) => {
24
+ void snapshot.locale;
25
+ return client.translate(...args);
26
+ };
27
+ const changeLocale = (value: string) => void client.setLocale(value);
28
+ let data = $state(initialState());
29
+ const set = <K extends keyof State>(key: K, value: State[K]) => {
30
+ data[key] = value;
31
+ };
32
+ onMount(() => {
33
+ set("cart", readCart());
34
+ const unsubscribe = client.subscribe(() => {
35
+ snapshot = client.getSnapshot();
36
+ });
37
+ const pop = () => set("path", window.location.pathname);
38
+ window.addEventListener("popstate", pop);
39
+ return () => {
40
+ unsubscribe();
41
+ window.removeEventListener("popstate", pop);
42
+ };
43
+ });
44
+ $effect(() => {
45
+ document.documentElement.lang = locale();
46
+ document.documentElement.dir = locale().startsWith("ar") ? "rtl" : "ltr";
47
+ });
48
+ const msg = (id: string, values?: Record<string, string | number>) =>
49
+ String(translate(id, messages[id] ?? id, values));
50
+ const value = (event: Event | { currentTarget: EventTarget | null }) =>
51
+ (event.currentTarget as HTMLInputElement).value;
52
+ const money = (amount: number) =>
53
+ new Intl.NumberFormat(locale(), {
54
+ style: "currency",
55
+ currency: "USD",
56
+ maximumFractionDigits: 2,
57
+ }).format(amount);
58
+ const date = (input: string) =>
59
+ new Intl.DateTimeFormat(locale(), {
60
+ dateStyle: "medium",
61
+ timeZone: "UTC",
62
+ }).format(new Date(input));
63
+ const visible = () =>
64
+ items
65
+ .filter(
66
+ (item) =>
67
+ (data.category === "all" || item.category === data.category) &&
68
+ `${msg(`${item.id}Title`)} ${msg(`${item.id}Summary`)}`
69
+ .toLocaleLowerCase(locale())
70
+ .includes(data.query.toLocaleLowerCase(locale()).trim()),
71
+ )
72
+ .sort((a, b) =>
73
+ data.sort === "low"
74
+ ? a.price - b.price
75
+ : data.sort === "high"
76
+ ? b.price - a.price
77
+ : 0,
78
+ );
79
+ const detailHref = (id: string) =>
80
+ `/products/${items.find((item) => item.id === id)!.slug}`;
81
+ const detail = () => items.find((item) => detailHref(item.id) === data.path);
82
+ const notFound = () =>
83
+ data.path !== "/" && data.path !== "/cart" && detail() === undefined;
84
+ const clearFilters = () => {
85
+ set("query", "");
86
+ set("category", "all");
87
+ };
88
+ const count = () =>
89
+ Object.values(data.cart).reduce((total, count) => total + count, 0);
90
+ const cartItems = () => items.filter((item) => (data.cart[item.id] ?? 0) > 0);
91
+ const total = () =>
92
+ cartItems().reduce(
93
+ (total, item) => total + item.price * data.cart[item.id]!,
94
+ 0,
95
+ );
96
+ const updateCart = (id: string, count: number) => {
97
+ const cart = { ...data.cart };
98
+ if (count <= 0) delete cart[id];
99
+ else cart[id] = quantity(count);
100
+ set("cart", cart);
101
+ saveCart(cart);
102
+ };
103
+ const add = (id: string, count: number) => {
104
+ updateCart(id, (data.cart[id] ?? 0) + count);
105
+ set("added", true);
106
+ set("checkout", false);
107
+ };
108
+ const checkout = () => {
109
+ set("cart", {});
110
+ saveCart({});
111
+ set("checkout", true);
112
+ set("added", false);
113
+ };
114
+ const submit = (event: { preventDefault(): void }) => {
115
+ event.preventDefault();
116
+ const valid = Boolean(
117
+ data.name.trim() && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(data.email),
118
+ );
119
+ set("error", !valid);
120
+ set("sent", valid);
121
+ };
122
+ const navigate = (event: {
123
+ currentTarget: EventTarget | null;
124
+ preventDefault(): void;
125
+ metaKey: boolean;
126
+ ctrlKey: boolean;
127
+ shiftKey: boolean;
128
+ altKey: boolean;
129
+ button: number;
130
+ }) => {
131
+ if (
132
+ event.metaKey ||
133
+ event.ctrlKey ||
134
+ event.shiftKey ||
135
+ event.altKey ||
136
+ event.button !== 0
137
+ )
138
+ return;
139
+ const target = new URL((event.currentTarget as HTMLAnchorElement).href);
140
+ if (target.origin !== window.location.origin) return;
141
+ event.preventDefault();
142
+ window.history.pushState({}, "", target.pathname);
143
+ set("path", target.pathname);
144
+ set("quantity", 1);
145
+ set("added", false);
146
+ window.scrollTo(0, 0);
147
+ };
148
+ </script>
149
+ <div class="site storefront"><a href="#main" class="skip-link"><Copy name="skip"></Copy></a>
150
+ <header class="site-header"><a href="/" class="brand" onclick={(event) => { navigate(event); }} aria-label={'Common Goods — ' + msg('home')}><span class="brand-mark" aria-hidden="true">◒</span>
151
+ Common Goods</a>
152
+ <nav aria-label={msg('home')}><a href="/" onclick={(event) => { navigate(event); }}><Copy name="collection"></Copy></a>
153
+ <a href="/cart" onclick={(event) => { navigate(event); }}><Copy name="cart"></Copy>
154
+ <span class="cart-count">{count()}</span></a>
155
+ <label class="locale-picker"><span class="sr-only"><Copy name="language"></Copy></span>
156
+ <select value={locale()} aria-label={msg('language')} onchange={(event) => { changeLocale(value(event)); }}>{#each locales() as language (language.code)}<option value={language.code}>{language.nativeName}</option>{/each}</select></label></nav></header>
157
+ <main id="main">{#if data.path === "/"}<section class="hero store-hero"><div class="hero-copy"><p class="eyebrow"><Copy name="eyebrow"></Copy></p>
158
+ <h1 ><Copy name="headline"></Copy></h1>
159
+ <p class="intro"><Copy name="intro"></Copy></p>
160
+ <a href="#collection" class="button"><Copy name="shop"></Copy>
161
+ ↗</a></div>
162
+ <img src="/assets/collection.svg" alt={msg('collection')} class="hero-image" width="800" height="600" loading="lazy" /></section>
163
+ <section class="section" id="collection"><div class="section-heading"><h2 ><Copy name="collection"></Copy></h2>
164
+ <Copy name="count" values={{ count: visible().length }}></Copy></div>
165
+ <div class="filters"><fieldset class="filter-buttons" aria-label={msg('collection' in messages ? 'collection' : 'latest')}><button type="button" class={data.category === 'all' ? 'chip active' : 'chip'} aria-pressed={data.category === 'all'} onclick={(event) => { set('category', 'all'); }}><Copy name="all"></Copy></button>
166
+ <button type="button" class={data.category === 'homeware' ? 'chip active' : 'chip'} aria-pressed={data.category === 'homeware'} onclick={(event) => { set('category', 'homeware'); }}><Copy name="homeware"></Copy></button>
167
+ <button type="button" class={data.category === 'carry' ? 'chip active' : 'chip'} aria-pressed={data.category === 'carry'} onclick={(event) => { set('category', 'carry'); }}><Copy name="carry"></Copy></button>
168
+ <button type="button" class={data.category === 'desk' ? 'chip active' : 'chip'} aria-pressed={data.category === 'desk'} onclick={(event) => { set('category', 'desk'); }}><Copy name="desk"></Copy></button></fieldset>
169
+ <label class="search"><span class="sr-only"><Copy name="search"></Copy></span>
170
+ <input type="search" placeholder={msg('search')} value={data.query} oninput={(event) => { set('query', value(event)); }} /></label>
171
+ <label class="sort"><span class="sr-only"><Copy name="sort"></Copy></span>
172
+ <select value={data.sort} onchange={(event) => { set('sort', value(event)); }}><option value="featured"><Copy name="featured"></Copy></option>
173
+ <option value="low"><Copy name="low"></Copy></option>
174
+ <option value="high"><Copy name="high"></Copy></option></select></label></div>
175
+ <div class="product-grid">{#each visible() as item (item.id)}<article class="product-card"><a href={detailHref(item.id)} onclick={(event) => { navigate(event); }}><img src={item.image} alt={msg(item.id + "Title")} class="" width="800" height="600" loading="lazy" /></a>
176
+ <div class="product-heading"><h3 ><a href={detailHref(item.id)} onclick={(event) => { navigate(event); }}><Copy name={item.id + "Title"}></Copy></a></h3>
177
+ <span >{money(item.price)}</span></div>
178
+ <p class="muted"><Copy name={item.category}></Copy></p>
179
+ <button type="button" class="add-button" onclick={(event) => { add(item.id, 1); }}><Copy name="add"></Copy></button></article>{/each}</div>
180
+ {#if visible().length === 0}<div class="empty" role="status"><h3 ><Copy name="empty"></Copy></h3>
181
+ <p ><Copy name="emptyHint"></Copy></p>
182
+ <button type="button" class="button" onclick={(event) => { clearFilters(); }}><Copy name="clear"></Copy></button></div>{/if}</section>{/if}
183
+ {#if detail() !== undefined}<section class="product-detail section"><img src={detail()!.image} alt={msg(detail()!.id + "Title")} class="detail-image" width="800" height="600" loading="lazy" />
184
+ <div ><a href="/" onclick={(event) => { navigate(event); }}><Copy name="back"></Copy></a>
185
+ <p class="eyebrow"><Copy name={detail()!.category}></Copy></p>
186
+ <h1 ><Copy name={detail()!.id + "Title"}></Copy></h1>
187
+ <p class="price">{money(detail()!.price)}</p>
188
+ <p class="intro"><Copy name={detail()!.id + "Summary"}></Copy></p>
189
+ <label class="quantity"><Copy name="qty"></Copy>
190
+ <input type="number" min="1" max="99" value={data.quantity} oninput={(event) => { set('quantity', quantity(value(event))); }} /></label>
191
+ <button type="button" class="button" onclick={(event) => { add(detail()!.id, data.quantity); }}><Copy name="add"></Copy></button>
192
+ <p class="muted fine"><Copy name="shipping"></Copy></p></div></section>{/if}
193
+ {#if data.path === "/cart"}<section class="section basket"><p class="eyebrow"><Copy name="count" values={{ count: count() }}></Copy></p>
194
+ <h1 ><Copy name="cart"></Copy></h1>
195
+ {#if count() === 0}<div class="empty"><p ><Copy name="emptyCart"></Copy></p>
196
+ <a href="/" onclick={(event) => { navigate(event); }}><Copy name="shop"></Copy></a></div>{/if}
197
+ {#each cartItems() as item (item.id)}<div class="cart-row"><img src={item.image} alt={msg(item.id + "Title")} class="" width="800" height="600" loading="lazy" />
198
+ <div ><h2 ><a href={detailHref(item.id)} onclick={(event) => { navigate(event); }}><Copy name={item.id + "Title"}></Copy></a></h2>
199
+ <span >{money(item.price)}</span></div>
200
+ <label class="quantity"><span class="sr-only"><Copy name="qty"></Copy></span>
201
+ <input type="number" min="1" max="99" value={data.cart[item.id]} oninput={(event) => { updateCart(item.id, quantity(value(event))); }} aria-label={msg('qty') + ': ' + msg(item.id + 'Title')} /></label>
202
+ <button type="button" class="text-button" onclick={(event) => { updateCart(item.id, 0); }}><Copy name="remove"></Copy></button></div>{/each}
203
+ {#if count() > 0}<div class="cart-total"><strong ><Copy name="total"></Copy></strong>
204
+ <strong >{money(total())}</strong></div>
205
+ <button type="button" class="button" onclick={(event) => { checkout(); }}><Copy name="checkout"></Copy></button>{/if}
206
+ <p class="muted"><Copy name="checkoutNote"></Copy></p>
207
+ <p class="muted fine"><Copy name="shipping"></Copy></p>
208
+ {#if data.checkout}<p role="status" class="success"><Copy name="checkoutDone"></Copy></p>{/if}</section>{/if}
209
+ {#if data.added}<div role="status" class="toast"><Copy name="added"></Copy>
210
+ <a href="/cart" onclick={(event) => { navigate(event); }}><Copy name="cart"></Copy></a></div>{/if}
211
+ {#if notFound()}<section class="section empty"><p class="eyebrow">404</p>
212
+ <h1 ><Copy name="missing"></Copy></h1>
213
+ <p ><Copy name="missingHint"></Copy></p>
214
+ <a href="/" onclick={(event) => { navigate(event); }}><Copy name="back"></Copy></a></section>{/if}</main>
215
+ <footer class="site-footer"><div ><a href="/" class="brand" onclick={(event) => { navigate(event); }}>Common Goods</a>
216
+ <p ><Copy name="about"></Copy></p></div>
217
+ <p class="fine"><Copy name="demo"></Copy>
218
+ <a href="https://linguana.mohammedibrahim.dev" rel="noreferrer">Linguana ↗</a></p></footer></div>
@@ -0,0 +1,66 @@
1
+ <script lang="ts">
2
+ import T from "@linguanahq/svelte/T.svelte";
3
+
4
+ let {
5
+ name,
6
+ values = {},
7
+ }: { name: string; values?: Record<string, string | number> } = $props();
8
+ </script>
9
+ {#if name === 'language'}<T id="language" defaultMessage={"Language"} {values} />
10
+ {:else if name === 'skip'}<T id="skip" defaultMessage={"Skip to content"} {values} />
11
+ {:else if name === 'home'}<T id="home" defaultMessage={"Home"} {values} />
12
+ {:else if name === 'search'}<T id="search" defaultMessage={"Search"} {values} />
13
+ {:else if name === 'all'}<T id="all" defaultMessage={"All"} {values} />
14
+ {:else if name === 'empty'}<T id="empty" defaultMessage={"Nothing here yet."} {values} />
15
+ {:else if name === 'emptyHint'}<T id="emptyHint" defaultMessage={"Try another search or clear your filters."} {values} />
16
+ {:else if name === 'clear'}<T id="clear" defaultMessage={"Clear filters"} {values} />
17
+ {:else if name === 'missing'}<T id="missing" defaultMessage={"This page took a different path."} {values} />
18
+ {:else if name === 'missingHint'}<T id="missingHint" defaultMessage={"We could not find that page. There is plenty to discover back home."} {values} />
19
+ {:else if name === 'back'}<T id="back" defaultMessage={"Back to home"} {values} />
20
+ {:else if name === 'demo'}<T id="demo" defaultMessage={"A multilingual demo, made with Linguana."} {values} />
21
+ {:else if name === 'email'}<T id="email" defaultMessage={"Email address"} {values} />
22
+ {:else if name === 'name'}<T id="name" defaultMessage={"Your name"} {values} />
23
+ {:else if name === 'simulated'}<T id="simulated" defaultMessage={"Demo only. Your information stays in this browser."} {values} />
24
+ {:else if name === 'sent'}<T id="sent" defaultMessage={"Thank you, {name}! This was a demo; nothing was sent."} {values} />
25
+ {:else if name === 'formError'}<T id="formError" defaultMessage={"Please enter your name and a valid email address."} {values} />
26
+ {:else if name === 'eyebrow'}<T id="eyebrow" defaultMessage={"Fewer things. Better chosen."} {values} />
27
+ {:else if name === 'headline'}<T id="headline" defaultMessage={"Good things for the everyday."} {values} />
28
+ {:else if name === 'intro'}<T id="intro" defaultMessage={"Useful objects, honest materials, and small details that make a difference. Find your new everyday favourite."} {values} />
29
+ {:else if name === 'collection'}<T id="collection" defaultMessage={"The everyday collection"} {values} />
30
+ {:else if name === 'shop'}<T id="shop" defaultMessage={"Explore the collection"} {values} />
31
+ {:else if name === 'homeware'}<T id="homeware" defaultMessage={"At home"} {values} />
32
+ {:else if name === 'carry'}<T id="carry" defaultMessage={"On the go"} {values} />
33
+ {:else if name === 'desk'}<T id="desk" defaultMessage={"At your desk"} {values} />
34
+ {:else if name === 'sort'}<T id="sort" defaultMessage={"Sort by"} {values} />
35
+ {:else if name === 'featured'}<T id="featured" defaultMessage={"Featured"} {values} />
36
+ {:else if name === 'low'}<T id="low" defaultMessage={"Price: low to high"} {values} />
37
+ {:else if name === 'high'}<T id="high" defaultMessage={"Price: high to low"} {values} />
38
+ {:else if name === 'cart'}<T id="cart" defaultMessage={"Your basket"} {values} />
39
+ {:else if name === 'count'}<T id="count" defaultMessage={"{count, plural, one {# item} other {# items}}"} {values} />
40
+ {:else if name === 'add'}<T id="add" defaultMessage={"Add to basket"} {values} />
41
+ {:else if name === 'added'}<T id="added" defaultMessage={"Added to your basket"} {values} />
42
+ {:else if name === 'qty'}<T id="qty" defaultMessage={"Quantity"} {values} />
43
+ {:else if name === 'remove'}<T id="remove" defaultMessage={"Remove"} {values} />
44
+ {:else if name === 'total'}<T id="total" defaultMessage={"Total"} {values} />
45
+ {:else if name === 'checkout'}<T id="checkout" defaultMessage={"Simulate checkout"} {values} />
46
+ {:else if name === 'checkoutNote'}<T id="checkoutNote" defaultMessage={"This is a demo shop. No payments or real orders are accepted."} {values} />
47
+ {:else if name === 'checkoutDone'}<T id="checkoutDone" defaultMessage={"Demo complete. No payment was taken and no order was placed."} {values} />
48
+ {:else if name === 'emptyCart'}<T id="emptyCart" defaultMessage={"Your basket is waiting for something good."} {values} />
49
+ {:else if name === 'shipping'}<T id="shipping" defaultMessage={"Illustrative prices in USD. No shipping or taxes are charged in this demo."} {values} />
50
+ {:else if name === 'about'}<T id="about" defaultMessage={"Considered objects. A little less ordinary."} {values} />
51
+ {:else if name === 'p1Title'}<T id="p1Title" defaultMessage={"Everyday tote"} {values} />
52
+ {:else if name === 'p1Summary'}<T id="p1Summary" defaultMessage={"Heavy cotton canvas, generous handles, and room for your daily detours."} {values} />
53
+ {:else if name === 'p2Title'}<T id="p2Title" defaultMessage={"Morning mug"} {values} />
54
+ {:else if name === 'p2Summary'}<T id="p2Summary" defaultMessage={"A warm ceramic finish and an easy grip. Made for the first quiet cup."} {values} />
55
+ {:else if name === 'p3Title'}<T id="p3Title" defaultMessage={"Arc desk lamp"} {values} />
56
+ {:else if name === 'p3Summary'}<T id="p3Summary" defaultMessage={"A gentle pool of light, a weighted base, and a shape that feels at home."} {values} />
57
+ {:else if name === 'p4Title'}<T id="p4Title" defaultMessage={"Field notebook"} {values} />
58
+ {:else if name === 'p4Summary'}<T id="p4Summary" defaultMessage={"Lay-flat binding and plain recycled pages for ideas without a deadline."} {values} />
59
+ {:else if name === 'p5Title'}<T id="p5Title" defaultMessage={"Day bottle"} {values} />
60
+ {:else if name === 'p5Summary'}<T id="p5Summary" defaultMessage={"Brushed steel with a simple screw cap. A reusable companion for the road."} {values} />
61
+ {:else if name === 'p6Title'}<T id="p6Title" defaultMessage={"Linen cushion"} {values} />
62
+ {:else if name === 'p6Summary'}<T id="p6Summary" defaultMessage={"Soft washed linen in an earthy tone. An invitation to slow down."} {values} />
63
+ {:else if name === 'p7Title'}<T id="p7Title" defaultMessage={"Oak catchall"} {values} />
64
+ {:else if name === 'p7Summary'}<T id="p7Summary" defaultMessage={"A small home for keys, coins, and the things you put down at the door."} {values} />
65
+ {:else if name === 'p8Title'}<T id="p8Title" defaultMessage={"Quiet clock"} {values} />
66
+ {:else if name === 'p8Summary'}<T id="p8Summary" defaultMessage={"A clean face and a silent movement. Keep time without the ticking."} {values} />{/if}
@@ -0,0 +1,11 @@
1
+ <script lang="ts">
2
+ import { createLinguana, setLinguana } from "@linguanahq/svelte";
3
+ import { onDestroy } from "svelte";
4
+ import App from "./App.svelte";
5
+ import { optionsFor } from "./i18n";
6
+
7
+ const { client } = createLinguana(optionsFor());
8
+ setLinguana(client);
9
+ onDestroy(() => client.dispose());
10
+ </script>
11
+ <App />