@soroush.design/cli 0.2.0-alpha.3 → 0.2.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/dist/bin.mjs +1 -1
  2. package/dist/index.d.mts +4 -4
  3. package/dist/index.mjs +1 -1
  4. package/dist/{io-Bybgct-f.mjs → io-C_8_JerZ.mjs} +368 -1039
  5. package/package.json +13 -5
  6. package/templates/astro/js/base/README.md +93 -0
  7. package/templates/astro/js/base/_gitignore +5 -0
  8. package/templates/astro/js/base/astro.config.mjs +23 -0
  9. package/templates/astro/js/base/src/components/About.jsx +24 -0
  10. package/templates/astro/js/base/src/components/Counter.jsx +26 -0
  11. package/templates/astro/js/base/src/components/Greeting.jsx +60 -0
  12. package/templates/astro/js/base/src/components/Header.jsx +99 -0
  13. package/templates/astro/js/base/src/components/Home.jsx +32 -0
  14. package/templates/astro/js/base/src/components/Home.test.jsx +39 -0
  15. package/templates/astro/js/base/src/components/NotFound.jsx +17 -0
  16. package/templates/astro/js/base/src/data/api.js +84 -0
  17. package/templates/astro/js/base/src/layouts/Layout.astro +52 -0
  18. package/templates/astro/js/base/src/pages/404.astro +12 -0
  19. package/templates/astro/js/base/src/pages/about.astro +12 -0
  20. package/templates/astro/js/base/src/pages/index.astro +23 -0
  21. package/templates/astro/js/base/src/theme/Island.jsx +89 -0
  22. package/templates/astro/js/base/src/theme/scheme.js +32 -0
  23. package/templates/astro/js/base/vitest.config.js +12 -0
  24. package/templates/astro/js/sample-data/src/components/ItemDetails.jsx +64 -0
  25. package/templates/astro/js/sample-data/src/components/ItemList.jsx +100 -0
  26. package/templates/astro/js/sample-data/src/components/StatusChip.jsx +8 -0
  27. package/templates/astro/js/sample-data/src/data/items.js +65 -0
  28. package/templates/astro/js/sample-data/src/pages/items/[id].astro +37 -0
  29. package/templates/astro/js/sample-data/src/pages/items/index.astro +20 -0
  30. package/templates/astro/js/with/jotai/src/components/Counter.jsx +26 -0
  31. package/templates/astro/js/with/jotai/src/state/counter.js +4 -0
  32. package/templates/astro/js/with/msw/_env +3 -0
  33. package/templates/astro/js/with/msw/src/mocks/browser.js +5 -0
  34. package/templates/astro/js/with/msw/src/mocks/handlers.js +24 -0
  35. package/templates/astro/js/with/msw/src/mocks/server.js +5 -0
  36. package/templates/astro/js/with/msw/src/mocks/setupTests.js +7 -0
  37. package/templates/astro/js/with/msw/src/mocks/start.js +14 -0
  38. package/templates/astro/js/with/react-hook-form/src/components/Form.jsx +313 -0
  39. package/templates/astro/js/with/react-hook-form/src/pages/form.astro +8 -0
  40. package/templates/astro/js/with/redux-toolkit/src/components/Counter.jsx +27 -0
  41. package/templates/astro/js/with/redux-toolkit/src/state/store.js +18 -0
  42. package/templates/astro/js/with/tanstack-query/src/data/queryClient.js +13 -0
  43. package/templates/astro/js/with/zustand/src/components/Counter.jsx +24 -0
  44. package/templates/astro/js/with/zustand/src/state/counter.js +14 -0
  45. package/templates/astro/ts/base/README.md +93 -0
  46. package/templates/astro/ts/base/_gitignore +5 -0
  47. package/templates/astro/ts/base/astro.config.mjs +23 -0
  48. package/templates/astro/ts/base/src/components/About.tsx +24 -0
  49. package/templates/astro/ts/base/src/components/Counter.tsx +26 -0
  50. package/templates/astro/ts/base/src/components/Greeting.tsx +61 -0
  51. package/templates/astro/ts/base/src/components/Header.tsx +99 -0
  52. package/templates/astro/ts/base/src/components/Home.test.tsx +39 -0
  53. package/templates/astro/ts/base/src/components/Home.tsx +33 -0
  54. package/templates/astro/ts/base/src/components/NotFound.tsx +17 -0
  55. package/templates/astro/ts/base/src/data/api.ts +92 -0
  56. package/templates/astro/ts/base/src/layouts/Layout.astro +52 -0
  57. package/templates/astro/ts/base/src/pages/404.astro +12 -0
  58. package/templates/astro/ts/base/src/pages/about.astro +12 -0
  59. package/templates/astro/ts/base/src/pages/index.astro +23 -0
  60. package/templates/astro/ts/base/src/theme/Island.tsx +90 -0
  61. package/templates/astro/ts/base/src/theme/scheme.ts +34 -0
  62. package/templates/astro/ts/base/tsconfig.json +9 -0
  63. package/templates/astro/ts/base/vitest.config.ts +12 -0
  64. package/templates/astro/ts/sample-data/src/components/ItemDetails.tsx +65 -0
  65. package/templates/astro/ts/sample-data/src/components/ItemList.tsx +109 -0
  66. package/templates/astro/ts/sample-data/src/components/StatusChip.tsx +9 -0
  67. package/templates/astro/ts/sample-data/src/data/items.ts +71 -0
  68. package/templates/astro/ts/sample-data/src/pages/items/[id].astro +39 -0
  69. package/templates/astro/ts/sample-data/src/pages/items/index.astro +20 -0
  70. package/templates/astro/ts/with/jotai/src/components/Counter.tsx +26 -0
  71. package/templates/astro/ts/with/jotai/src/state/counter.ts +4 -0
  72. package/templates/astro/ts/with/msw/_env +3 -0
  73. package/templates/astro/ts/with/msw/src/mocks/browser.ts +5 -0
  74. package/templates/astro/ts/with/msw/src/mocks/handlers.ts +24 -0
  75. package/templates/astro/ts/with/msw/src/mocks/server.ts +5 -0
  76. package/templates/astro/ts/with/msw/src/mocks/setupTests.ts +7 -0
  77. package/templates/astro/ts/with/msw/src/mocks/start.ts +14 -0
  78. package/templates/astro/ts/with/react-hook-form/src/components/Form.tsx +317 -0
  79. package/templates/astro/ts/with/react-hook-form/src/pages/form.astro +8 -0
  80. package/templates/astro/ts/with/redux-toolkit/src/components/Counter.tsx +27 -0
  81. package/templates/astro/ts/with/redux-toolkit/src/state/store.ts +19 -0
  82. package/templates/astro/ts/with/tanstack-query/src/data/queryClient.ts +13 -0
  83. package/templates/astro/ts/with/zustand/src/components/Counter.tsx +24 -0
  84. package/templates/astro/ts/with/zustand/src/state/counter.ts +19 -0
  85. package/templates/templates.md +66 -0
  86. package/templates/vike/js/base/README.md +87 -0
  87. package/templates/vike/js/base/_gitignore +4 -0
  88. package/templates/vike/js/base/src/data/api.js +76 -0
  89. package/templates/vike/js/base/src/pages/+Layout.jsx +183 -0
  90. package/templates/vike/js/base/src/pages/+config.js +12 -0
  91. package/templates/vike/js/base/src/pages/+onRenderClient.jsx +39 -0
  92. package/templates/vike/js/base/src/pages/+onRenderHtml.jsx +27 -0
  93. package/templates/vike/js/base/src/pages/PageShell.jsx +47 -0
  94. package/templates/vike/js/base/src/pages/_error/+Page.jsx +14 -0
  95. package/templates/vike/js/base/src/pages/about/+Page.jsx +14 -0
  96. package/templates/vike/js/base/src/pages/index/+Page.jsx +33 -0
  97. package/templates/vike/js/base/src/pages/index/Counter.jsx +20 -0
  98. package/templates/vike/js/base/src/pages/index/Greeting.jsx +48 -0
  99. package/templates/vike/js/base/src/pages/index/Page.test.jsx +67 -0
  100. package/templates/vike/js/base/src/pages/usePageContext.jsx +20 -0
  101. package/templates/vike/js/base/vite.config.js +14 -0
  102. package/templates/vike/js/base/vitest.config.js +13 -0
  103. package/templates/vike/js/sample-data/src/data/items.js +58 -0
  104. package/templates/vike/js/sample-data/src/pages/items/+Page.jsx +49 -0
  105. package/templates/vike/js/sample-data/src/pages/items/+data.js +26 -0
  106. package/templates/vike/js/sample-data/src/pages/items/@id/+Page.jsx +40 -0
  107. package/templates/vike/js/sample-data/src/pages/items/@id/+data.js +33 -0
  108. package/templates/vike/js/sample-data/src/pages/items/@id/+onBeforePrerenderStart.js +8 -0
  109. package/templates/vike/js/sample-data/src/pages/items/StatusChip.jsx +8 -0
  110. package/templates/vike/js/spa/src/pages/+config.js +12 -0
  111. package/templates/vike/js/spa/src/pages/+onRenderClient.jsx +25 -0
  112. package/templates/vike/js/spa/src/pages/+onRenderHtml.jsx +16 -0
  113. package/templates/vike/js/spa/src/pages/about/+Page.jsx +14 -0
  114. package/templates/vike/js/ssg/src/pages/+config.js +11 -0
  115. package/templates/vike/js/ssg/src/pages/about/+Page.jsx +13 -0
  116. package/templates/vike/js/ssr/src/pages/+config.js +12 -0
  117. package/templates/vike/js/ssr/src/pages/+onRenderHtml.jsx +27 -0
  118. package/templates/vike/js/ssr/src/pages/about/+Page.jsx +14 -0
  119. package/templates/vike/js/with/jotai/src/pages/index/Counter.jsx +19 -0
  120. package/templates/vike/js/with/jotai/src/state/counter.js +4 -0
  121. package/templates/vike/js/with/jotai/src/state/scheme.js +4 -0
  122. package/templates/vike/js/with/msw/_env +3 -0
  123. package/templates/vike/js/with/msw/src/mocks/browser.js +5 -0
  124. package/templates/vike/js/with/msw/src/mocks/handlers.js +24 -0
  125. package/templates/vike/js/with/msw/src/mocks/server.js +5 -0
  126. package/templates/vike/js/with/msw/src/mocks/setupTests.js +7 -0
  127. package/templates/vike/js/with/msw/src/mocks/start.js +10 -0
  128. package/templates/vike/js/with/react-hook-form/src/pages/form/+Page.jsx +294 -0
  129. package/templates/vike/js/with/redux-toolkit/src/pages/index/Counter.jsx +20 -0
  130. package/templates/vike/js/with/redux-toolkit/src/state/store.js +27 -0
  131. package/templates/vike/js/with/zustand/src/pages/index/Counter.jsx +17 -0
  132. package/templates/vike/js/with/zustand/src/state/counter.js +14 -0
  133. package/templates/vike/js/with/zustand/src/state/scheme.js +14 -0
  134. package/templates/vike/ts/base/README.md +87 -0
  135. package/templates/vike/ts/base/_gitignore +4 -0
  136. package/templates/vike/ts/base/src/data/api.ts +84 -0
  137. package/templates/vike/ts/base/src/pages/+Layout.tsx +184 -0
  138. package/templates/vike/ts/base/src/pages/+config.ts +14 -0
  139. package/templates/vike/ts/base/src/pages/+onRenderClient.tsx +41 -0
  140. package/templates/vike/ts/base/src/pages/+onRenderHtml.tsx +28 -0
  141. package/templates/vike/ts/base/src/pages/PageShell.tsx +48 -0
  142. package/templates/vike/ts/base/src/pages/_error/+Page.tsx +14 -0
  143. package/templates/vike/ts/base/src/pages/about/+Page.tsx +14 -0
  144. package/templates/vike/ts/base/src/pages/index/+Page.tsx +33 -0
  145. package/templates/vike/ts/base/src/pages/index/Counter.tsx +20 -0
  146. package/templates/vike/ts/base/src/pages/index/Greeting.tsx +49 -0
  147. package/templates/vike/ts/base/src/pages/index/Page.test.tsx +67 -0
  148. package/templates/vike/ts/base/src/pages/usePageContext.tsx +27 -0
  149. package/templates/vike/ts/base/src/vike.d.ts +20 -0
  150. package/templates/vike/ts/base/tsconfig.json +18 -0
  151. package/templates/vike/ts/base/vite.config.ts +14 -0
  152. package/templates/vike/ts/base/vitest.config.ts +13 -0
  153. package/templates/vike/ts/sample-data/src/data/items.ts +64 -0
  154. package/templates/vike/ts/sample-data/src/pages/items/+Page.tsx +50 -0
  155. package/templates/vike/ts/sample-data/src/pages/items/+data.ts +28 -0
  156. package/templates/vike/ts/sample-data/src/pages/items/@id/+Page.tsx +41 -0
  157. package/templates/vike/ts/sample-data/src/pages/items/@id/+data.ts +37 -0
  158. package/templates/vike/ts/sample-data/src/pages/items/@id/+onBeforePrerenderStart.ts +8 -0
  159. package/templates/vike/ts/sample-data/src/pages/items/StatusChip.tsx +9 -0
  160. package/templates/vike/ts/spa/src/pages/+config.ts +14 -0
  161. package/templates/vike/ts/spa/src/pages/+onRenderClient.tsx +27 -0
  162. package/templates/vike/ts/spa/src/pages/+onRenderHtml.tsx +17 -0
  163. package/templates/vike/ts/spa/src/pages/about/+Page.tsx +14 -0
  164. package/templates/vike/ts/ssg/src/pages/+config.ts +13 -0
  165. package/templates/vike/ts/ssg/src/pages/about/+Page.tsx +13 -0
  166. package/templates/vike/ts/ssr/src/pages/+config.ts +14 -0
  167. package/templates/vike/ts/ssr/src/pages/+onRenderHtml.tsx +28 -0
  168. package/templates/vike/ts/ssr/src/pages/about/+Page.tsx +14 -0
  169. package/templates/vike/ts/with/jotai/src/pages/index/Counter.tsx +19 -0
  170. package/templates/vike/ts/with/jotai/src/state/counter.ts +4 -0
  171. package/templates/vike/ts/with/jotai/src/state/scheme.ts +4 -0
  172. package/templates/vike/ts/with/msw/_env +3 -0
  173. package/templates/vike/ts/with/msw/src/mocks/browser.ts +5 -0
  174. package/templates/vike/ts/with/msw/src/mocks/handlers.ts +24 -0
  175. package/templates/vike/ts/with/msw/src/mocks/server.ts +5 -0
  176. package/templates/vike/ts/with/msw/src/mocks/setupTests.ts +7 -0
  177. package/templates/vike/ts/with/msw/src/mocks/start.ts +10 -0
  178. package/templates/vike/ts/with/react-hook-form/src/pages/form/+Page.tsx +298 -0
  179. package/templates/vike/ts/with/redux-toolkit/src/pages/index/Counter.tsx +20 -0
  180. package/templates/vike/ts/with/redux-toolkit/src/state/store.ts +29 -0
  181. package/templates/vike/ts/with/zustand/src/pages/index/Counter.tsx +17 -0
  182. package/templates/vike/ts/with/zustand/src/state/counter.ts +19 -0
  183. package/templates/vike/ts/with/zustand/src/state/scheme.ts +19 -0
package/dist/bin.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as main, r as version$1, t as createNodeIo } from "./io-Bybgct-f.mjs";
2
+ import { n as main, r as version$1, t as createNodeIo } from "./io-C_8_JerZ.mjs";
3
3
  // ../design-system/package.json
4
4
  var name = "@soroush.tech/design-system";
5
5
  var version = "2.2.0";
package/dist/index.d.mts CHANGED
@@ -75,13 +75,13 @@ export declare function readDesignSystemPackage(fromFile: string): PackageJson;
75
75
  */
76
76
  declare function main(argv: readonly string[], io: Io, designSystem: PackageJson): Promise<number>;
77
77
  /** A library `create` can add to a new app, with its wiring and a small example. */
78
- type Library = 'tanstack-query' | 'swr' | 'msw' | 'zustand' | 'jotai' | 'redux-toolkit' | 'react-hook-form' | 'vitest';
78
+ type Library = 'tanstack-query' | 'swr' | 'msw' | 'zustand' | 'jotai' | 'redux-toolkit' | 'react-hook-form';
79
79
  /**
80
80
  * How the app's pages are rendered: `isomorphic`, prerendered to HTML at build time and then
81
- * moving between pages in the browser; `spa`, rendered in the browser only; `ssg`, HTML only, with
82
- * no JavaScript in the browser.
81
+ * moving between pages in the browser; `ssr`, rendered on a server on each request, then the
82
+ * same; `spa`, rendered in the browser only; `ssg`, HTML only, with no JavaScript in the browser.
83
83
  */
84
- type Rendering = 'isomorphic' | 'spa' | 'ssg';
84
+ type Rendering = 'isomorphic' | 'ssr' | 'spa' | 'ssg';
85
85
  /**
86
86
  * How the repository holds the app: `workspace`, as `apps/web` of a workspace that has room for
87
87
  * more apps and services; `standalone`, the app alone at the root.
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { t as createNodeIo, n as default, i as readDesignSystemPackage } from "./io-Bybgct-f.mjs";
1
+ export { t as createNodeIo, n as default, i as readDesignSystemPackage } from "./io-C_8_JerZ.mjs";