@soroush.design/cli 0.2.0 → 0.3.0-alpha.1

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 (130) hide show
  1. package/README.md +6 -4
  2. package/dist/bin.mjs +2 -9
  3. package/dist/index.d.mts +19 -27
  4. package/dist/index.mjs +1 -1
  5. package/dist/init-D8jcA_md.mjs +1279 -0
  6. package/dist/{io-dfx17dYF.mjs → io-CcfotW1X.mjs} +105 -883
  7. package/dist/migrate-jUWXX1hA.mjs +22239 -0
  8. package/package.json +23 -22
  9. package/templates/astro/js/base/README.md +4 -3
  10. package/templates/astro/js/base/astro.config.mjs +16 -1
  11. package/templates/astro/js/base/src/components/About.jsx +2 -2
  12. package/templates/astro/js/base/src/components/Counter.jsx +3 -3
  13. package/templates/astro/js/base/src/components/Greeting.jsx +1 -1
  14. package/templates/astro/js/base/src/components/Header.jsx +6 -6
  15. package/templates/astro/js/base/src/components/Home.jsx +6 -6
  16. package/templates/astro/js/base/src/components/Home.test.jsx +5 -1
  17. package/templates/astro/js/base/src/components/NotFound.jsx +3 -3
  18. package/templates/astro/js/base/src/components/SchemeSwitch.jsx +4 -4
  19. package/templates/astro/js/base/src/layouts/Layout.astro +24 -13
  20. package/templates/astro/js/base/src/theme/Island.jsx +1 -1
  21. package/templates/astro/js/sample-data/src/components/ItemDetails.jsx +3 -3
  22. package/templates/astro/js/sample-data/src/components/ItemList.jsx +3 -3
  23. package/templates/astro/js/sample-data/src/components/StatusChip.jsx +1 -1
  24. package/templates/astro/js/with/jotai/src/components/Counter.jsx +3 -3
  25. package/templates/astro/js/with/react-hook-form/src/components/Form.jsx +4 -4
  26. package/templates/astro/js/with/redux-toolkit/src/components/Counter.jsx +3 -3
  27. package/templates/astro/js/with/zustand/src/components/Counter.jsx +3 -3
  28. package/templates/astro/ts/base/README.md +4 -3
  29. package/templates/astro/ts/base/astro.config.mjs +16 -1
  30. package/templates/astro/ts/base/src/components/About.tsx +2 -2
  31. package/templates/astro/ts/base/src/components/Counter.tsx +3 -3
  32. package/templates/astro/ts/base/src/components/Greeting.tsx +1 -1
  33. package/templates/astro/ts/base/src/components/Header.tsx +6 -6
  34. package/templates/astro/ts/base/src/components/Home.test.tsx +5 -1
  35. package/templates/astro/ts/base/src/components/Home.tsx +6 -6
  36. package/templates/astro/ts/base/src/components/NotFound.tsx +3 -3
  37. package/templates/astro/ts/base/src/components/SchemeSwitch.tsx +4 -4
  38. package/templates/astro/ts/base/src/layouts/Layout.astro +24 -13
  39. package/templates/astro/ts/base/src/theme/Island.tsx +1 -1
  40. package/templates/astro/ts/sample-data/src/components/ItemDetails.tsx +3 -3
  41. package/templates/astro/ts/sample-data/src/components/ItemList.tsx +3 -3
  42. package/templates/astro/ts/sample-data/src/components/StatusChip.tsx +1 -1
  43. package/templates/astro/ts/with/jotai/src/components/Counter.tsx +3 -3
  44. package/templates/astro/ts/with/react-hook-form/src/components/Form.tsx +4 -4
  45. package/templates/astro/ts/with/redux-toolkit/src/components/Counter.tsx +3 -3
  46. package/templates/astro/ts/with/zustand/src/components/Counter.tsx +3 -3
  47. package/templates/react-router/js/base/README.md +4 -3
  48. package/templates/react-router/js/base/src/components/Header.jsx +5 -5
  49. package/templates/react-router/js/base/src/components/RouterLink.jsx +2 -2
  50. package/templates/react-router/js/base/src/components/SchemeSwitch.jsx +4 -4
  51. package/templates/react-router/js/base/src/main.jsx +5 -0
  52. package/templates/react-router/js/base/src/pages/ErrorPage.jsx +2 -2
  53. package/templates/react-router/js/base/src/pages/Layout.jsx +1 -1
  54. package/templates/react-router/js/base/src/pages/about/Page.jsx +2 -2
  55. package/templates/react-router/js/base/src/pages/index/Counter.jsx +3 -3
  56. package/templates/react-router/js/base/src/pages/index/Greeting.jsx +1 -1
  57. package/templates/react-router/js/base/src/pages/index/Page.jsx +6 -6
  58. package/templates/react-router/js/base/src/pages/index/Page.test.jsx +5 -1
  59. package/templates/react-router/js/sample-data/src/pages/item/Page.jsx +2 -2
  60. package/templates/react-router/js/sample-data/src/pages/items/Page.jsx +2 -2
  61. package/templates/react-router/js/sample-data/src/pages/items/StatusChip.jsx +1 -1
  62. package/templates/react-router/js/with/jotai/src/pages/index/Counter.jsx +3 -3
  63. package/templates/react-router/js/with/react-hook-form/src/pages/form/Page.jsx +4 -4
  64. package/templates/react-router/js/with/redux-toolkit/src/pages/index/Counter.jsx +3 -3
  65. package/templates/react-router/js/with/zustand/src/pages/index/Counter.jsx +3 -3
  66. package/templates/react-router/ts/base/README.md +4 -3
  67. package/templates/react-router/ts/base/src/components/Header.tsx +5 -5
  68. package/templates/react-router/ts/base/src/components/RouterLink.tsx +2 -2
  69. package/templates/react-router/ts/base/src/components/SchemeSwitch.tsx +4 -4
  70. package/templates/react-router/ts/base/src/main.tsx +5 -0
  71. package/templates/react-router/ts/base/src/pages/ErrorPage.tsx +2 -2
  72. package/templates/react-router/ts/base/src/pages/Layout.tsx +1 -1
  73. package/templates/react-router/ts/base/src/pages/about/Page.tsx +2 -2
  74. package/templates/react-router/ts/base/src/pages/index/Counter.tsx +3 -3
  75. package/templates/react-router/ts/base/src/pages/index/Greeting.tsx +1 -1
  76. package/templates/react-router/ts/base/src/pages/index/Page.test.tsx +5 -1
  77. package/templates/react-router/ts/base/src/pages/index/Page.tsx +6 -6
  78. package/templates/react-router/ts/sample-data/src/pages/item/Page.tsx +2 -2
  79. package/templates/react-router/ts/sample-data/src/pages/items/Page.tsx +2 -2
  80. package/templates/react-router/ts/sample-data/src/pages/items/StatusChip.tsx +1 -1
  81. package/templates/react-router/ts/with/jotai/src/pages/index/Counter.tsx +3 -3
  82. package/templates/react-router/ts/with/react-hook-form/src/pages/form/Page.tsx +4 -4
  83. package/templates/react-router/ts/with/redux-toolkit/src/pages/index/Counter.tsx +3 -3
  84. package/templates/react-router/ts/with/zustand/src/pages/index/Counter.tsx +3 -3
  85. package/templates/vike/js/base/README.md +3 -2
  86. package/templates/vike/js/base/src/components/Header.jsx +6 -6
  87. package/templates/vike/js/base/src/components/SchemeSwitch.jsx +4 -4
  88. package/templates/vike/js/base/src/pages/+Layout.jsx +1 -1
  89. package/templates/vike/js/base/src/pages/+onCreateGlobalContext.js +7 -0
  90. package/templates/vike/js/base/src/pages/+onRenderHtml.jsx +2 -3
  91. package/templates/vike/js/base/src/pages/PageShell.jsx +2 -2
  92. package/templates/vike/js/base/src/pages/_error/+Page.jsx +3 -3
  93. package/templates/vike/js/base/src/pages/about/+Page.jsx +2 -2
  94. package/templates/vike/js/base/src/pages/index/+Page.jsx +6 -6
  95. package/templates/vike/js/base/src/pages/index/Counter.jsx +3 -3
  96. package/templates/vike/js/base/src/pages/index/Greeting.jsx +1 -1
  97. package/templates/vike/js/base/src/pages/index/Page.test.jsx +5 -1
  98. package/templates/vike/js/sample-data/src/pages/items/+Page.jsx +3 -3
  99. package/templates/vike/js/sample-data/src/pages/items/@id/+Page.jsx +3 -3
  100. package/templates/vike/js/sample-data/src/pages/items/StatusChip.jsx +1 -1
  101. package/templates/vike/js/ssg/src/pages/about/+Page.jsx +2 -2
  102. package/templates/vike/js/ssr/src/pages/+onRenderHtml.jsx +2 -3
  103. package/templates/vike/js/ssr/src/pages/about/+Page.jsx +2 -2
  104. package/templates/vike/js/with/jotai/src/pages/index/Counter.jsx +3 -3
  105. package/templates/vike/js/with/react-hook-form/src/pages/form/+Page.jsx +4 -4
  106. package/templates/vike/js/with/redux-toolkit/src/pages/index/Counter.jsx +3 -3
  107. package/templates/vike/js/with/zustand/src/pages/index/Counter.jsx +3 -3
  108. package/templates/vike/ts/base/README.md +3 -2
  109. package/templates/vike/ts/base/src/components/Header.tsx +6 -6
  110. package/templates/vike/ts/base/src/components/SchemeSwitch.tsx +4 -4
  111. package/templates/vike/ts/base/src/pages/+Layout.tsx +1 -1
  112. package/templates/vike/ts/base/src/pages/+onCreateGlobalContext.ts +7 -0
  113. package/templates/vike/ts/base/src/pages/+onRenderHtml.tsx +2 -3
  114. package/templates/vike/ts/base/src/pages/PageShell.tsx +2 -2
  115. package/templates/vike/ts/base/src/pages/_error/+Page.tsx +3 -3
  116. package/templates/vike/ts/base/src/pages/about/+Page.tsx +2 -2
  117. package/templates/vike/ts/base/src/pages/index/+Page.tsx +6 -6
  118. package/templates/vike/ts/base/src/pages/index/Counter.tsx +3 -3
  119. package/templates/vike/ts/base/src/pages/index/Greeting.tsx +1 -1
  120. package/templates/vike/ts/base/src/pages/index/Page.test.tsx +5 -1
  121. package/templates/vike/ts/sample-data/src/pages/items/+Page.tsx +3 -3
  122. package/templates/vike/ts/sample-data/src/pages/items/@id/+Page.tsx +3 -3
  123. package/templates/vike/ts/sample-data/src/pages/items/StatusChip.tsx +1 -1
  124. package/templates/vike/ts/ssg/src/pages/about/+Page.tsx +2 -2
  125. package/templates/vike/ts/ssr/src/pages/+onRenderHtml.tsx +2 -3
  126. package/templates/vike/ts/ssr/src/pages/about/+Page.tsx +2 -2
  127. package/templates/vike/ts/with/jotai/src/pages/index/Counter.tsx +3 -3
  128. package/templates/vike/ts/with/react-hook-form/src/pages/form/+Page.tsx +4 -4
  129. package/templates/vike/ts/with/redux-toolkit/src/pages/index/Counter.tsx +3 -3
  130. package/templates/vike/ts/with/zustand/src/pages/index/Counter.tsx +3 -3
@@ -1,6 +1,6 @@
1
- import { Flex } from '@soroush.tech/design-system/Flex'
2
- import { Link } from '@soroush.tech/design-system/Link'
3
- import { Typography } from '@soroush.tech/design-system/Typography'
1
+ import { Flex } from '@gild-ui/react/Flex'
2
+ import { Link } from '@gild-ui/react/Link'
3
+ import { Typography } from '@gild-ui/react/Typography'
4
4
  // @if tanstack-query
5
5
  import { useQuery } from '@tanstack/react-query'
6
6
  import { fetchItem } from '../../../data/api'
@@ -1,4 +1,4 @@
1
- import { Chip } from '@soroush.tech/design-system/Chip'
1
+ import { Chip } from '@gild-ui/react/Chip'
2
2
  import type { Item } from '../../data/items'
3
3
 
4
4
  const COLORS = { todo: 'default', doing: 'primary', done: 'success' } as const
@@ -1,5 +1,5 @@
1
- import { Flex } from '@soroush.tech/design-system/Flex'
2
- import { Typography } from '@soroush.tech/design-system/Typography'
1
+ import { Flex } from '@gild-ui/react/Flex'
2
+ import { Typography } from '@gild-ui/react/Typography'
3
3
 
4
4
  export default function Page() {
5
5
  return (
@@ -1,6 +1,5 @@
1
- import createEmotionServer from '@emotion/server/create-instance'
2
1
  import { renderToString } from 'react-dom/server'
3
- import { styleCache } from '@soroush.tech/design-system/engine'
2
+ import { styleServer } from '@gild-ui/react/server'
4
3
  import { dangerouslySkipEscape, escapeInject } from 'vike/server'
5
4
  import type { OnRenderHtmlSync } from 'vike/types'
6
5
  import { PageShell } from './PageShell'
@@ -10,7 +9,7 @@ import { PageShell } from './PageShell'
10
9
  * head, so it is drawn styled before any script runs.
11
10
  */
12
11
  export const onRenderHtml: OnRenderHtmlSync = (pageContext) => {
13
- const { extractCriticalToChunks, constructStyleTagsFromChunks } = createEmotionServer(styleCache)
12
+ const { extractCriticalToChunks, constructStyleTagsFromChunks } = styleServer
14
13
  const html = renderToString(<PageShell pageContext={pageContext} />)
15
14
  const styles = constructStyleTagsFromChunks(extractCriticalToChunks(html))
16
15
  return escapeInject`<!doctype html>
@@ -1,5 +1,5 @@
1
- import { Flex } from '@soroush.tech/design-system/Flex'
2
- import { Typography } from '@soroush.tech/design-system/Typography'
1
+ import { Flex } from '@gild-ui/react/Flex'
2
+ import { Typography } from '@gild-ui/react/Typography'
3
3
 
4
4
  export default function Page() {
5
5
  return (
@@ -1,6 +1,6 @@
1
- import { Button } from '@soroush.tech/design-system/Button'
2
- import { Flex } from '@soroush.tech/design-system/Flex'
3
- import { Typography } from '@soroush.tech/design-system/Typography'
1
+ import { Button } from '@gild-ui/react/Button'
2
+ import { Flex } from '@gild-ui/react/Flex'
3
+ import { Typography } from '@gild-ui/react/Typography'
4
4
  import { useAtom } from 'jotai'
5
5
  import { countAtom } from '../../state/counter'
6
6
 
@@ -10,10 +10,10 @@ import { Controller, useForm } from 'react-hook-form'
10
10
  import useSWRMutation from 'swr/mutation'
11
11
  // @endif
12
12
  import { z } from 'zod'
13
- import { Button } from '@soroush.tech/design-system/Button'
14
- import { Flex } from '@soroush.tech/design-system/Flex'
15
- import { TextInput } from '@soroush.tech/design-system/TextInput'
16
- import { Typography } from '@soroush.tech/design-system/Typography'
13
+ import { Button } from '@gild-ui/react/Button'
14
+ import { Flex } from '@gild-ui/react/Flex'
15
+ import { TextInput } from '@gild-ui/react/TextInput'
16
+ import { Typography } from '@gild-ui/react/Typography'
17
17
  // @if tanstack-query || swr || msw
18
18
  import { sendMessage } from '../../data/api'
19
19
  // @endif
@@ -1,6 +1,6 @@
1
- import { Button } from '@soroush.tech/design-system/Button'
2
- import { Flex } from '@soroush.tech/design-system/Flex'
3
- import { Typography } from '@soroush.tech/design-system/Typography'
1
+ import { Button } from '@gild-ui/react/Button'
2
+ import { Flex } from '@gild-ui/react/Flex'
3
+ import { Typography } from '@gild-ui/react/Typography'
4
4
  import { useDispatch, useSelector } from 'react-redux'
5
5
  import { incremented, type RootState } from '../../state/store'
6
6
 
@@ -1,6 +1,6 @@
1
- import { Button } from '@soroush.tech/design-system/Button'
2
- import { Flex } from '@soroush.tech/design-system/Flex'
3
- import { Typography } from '@soroush.tech/design-system/Typography'
1
+ import { Button } from '@gild-ui/react/Button'
2
+ import { Flex } from '@gild-ui/react/Flex'
3
+ import { Typography } from '@gild-ui/react/Typography'
4
4
  import { useCounter } from '../../state/counter'
5
5
 
6
6
  /** A count, held in a zustand store, src/state/counter, and the button that adds to it. */