create-packer 1.43.14 → 1.44.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 (34) hide show
  1. package/package.json +1 -1
  2. package/template/web-app/react-rsbuild/domain/app/components/app-context.tsx +1 -7
  3. package/template/web-app/react-rsbuild/domain/app/components/app.tsx +0 -2
  4. package/template/web-app/react-rsbuild/env.d.ts +13 -24
  5. package/template/web-app/react-rsbuild/main.css +7 -0
  6. package/template/web-app/react-rsbuild/main.tsx +1 -0
  7. package/template/web-app/react-rsbuild/package.json +2 -4
  8. package/template/web-app/react-rsbuild/pages/home/view.tsx +1 -2
  9. package/template/web-app/react-rsbuild/postcss.config.cjs +1 -0
  10. package/template/web-app/react-rsbuild/rsbuild.config.ts +1 -12
  11. package/template/web-app/react-vite/domain/app/components/app-context.tsx +1 -7
  12. package/template/web-app/react-vite/domain/app/components/app.tsx +0 -2
  13. package/template/web-app/react-vite/main.css +7 -0
  14. package/template/web-app/react-vite/main.tsx +1 -0
  15. package/template/web-app/react-vite/package.json +2 -4
  16. package/template/web-app/react-vite/pages/home/view.tsx +9 -10
  17. package/template/web-app/react-vite/vite-env.d.ts +6 -15
  18. package/template/web-app/react-vite/vite.config.ts +2 -0
  19. package/template/web-app/vue/{style.css → main.css} +2 -2
  20. package/template/web-app/vue/main.ts +1 -1
  21. package/template/web-app/vue/pages/home/view.vue +1 -1
  22. package/template/web-app/vue/vite.config.ts +0 -1
  23. package/template/web-app/vue-rsbuild/{style.css → main.css} +2 -2
  24. package/template/web-app/vue-rsbuild/main.ts +1 -1
  25. package/template/web-app/vue-rsbuild/pages/home/view.vue +1 -1
  26. package/template/web-extension/package.json +0 -2
  27. package/template/web-app/react-rsbuild/pages/home/view.styled.ts +0 -5
  28. package/template/web-app/react-rsbuild/shared/styles/global-style.tsx +0 -14
  29. package/template/web-app/react-rsbuild/shared/styles/index.ts +0 -2
  30. package/template/web-app/react-rsbuild/shared/styles/theme.styled.ts +0 -55
  31. package/template/web-app/react-vite/pages/home/view.styled.ts +0 -5
  32. package/template/web-app/react-vite/shared/styles/global-style.tsx +0 -14
  33. package/template/web-app/react-vite/shared/styles/index.ts +0 -2
  34. package/template/web-app/react-vite/shared/styles/theme.styled.ts +0 -55
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-packer",
3
- "version": "1.43.14",
3
+ "version": "1.44.0",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/kevily/create-packer",
6
6
  "author": "1k <bug_zero@163.com>",
@@ -1,8 +1,6 @@
1
1
  import { FunctionComponent, ReactNode } from 'react'
2
- import { ThemeProvider } from '@emotion/react'
3
2
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
4
3
  import { request } from '@/shared/service'
5
- import { theme } from '@/shared/styles'
6
4
 
7
5
  const queryClient = new QueryClient({
8
6
  defaultOptions: {
@@ -20,9 +18,5 @@ export interface propsType {
20
18
  children: ReactNode
21
19
  }
22
20
  export const Root: FunctionComponent<propsType> = props => {
23
- return (
24
- <QueryClientProvider client={queryClient}>
25
- <ThemeProvider theme={theme}>{props.children}</ThemeProvider>
26
- </QueryClientProvider>
27
- )
21
+ return <QueryClientProvider client={queryClient}>{props.children}</QueryClientProvider>
28
22
  }
@@ -2,7 +2,6 @@ import { useLayoutEffect, Suspense } from 'react'
2
2
  import { RouterProvider } from 'react-router/dom'
3
3
  import { request } from '@/shared/service'
4
4
  import { routerInstance } from '@/domain/router'
5
- import { GlobalStyle } from '@/shared/styles'
6
5
  import * as AppContext from './app-context'
7
6
 
8
7
  export const Root = () => {
@@ -17,7 +16,6 @@ export const Root = () => {
17
16
 
18
17
  return (
19
18
  <AppContext.Root>
20
- <GlobalStyle />
21
19
  <Suspense fallback={<>loading...</>}>
22
20
  <RouterProvider router={routerInstance} />
23
21
  </Suspense>
@@ -1,32 +1,21 @@
1
1
  /// <reference types="@rsbuild/core/types" />
2
- import '@emotion/react'
3
- import { themeType } from './shared/styles'
4
2
 
5
- declare module 'styled-components' {
6
- export interface DefaultTheme extends themeType {}
3
+ interface ImportMetaEnv {
4
+ readonly PUBLIC_BASE_URL: string
5
+ readonly PUBLIC_API_HOST: string
6
+ readonly PUBLIC_ENV_MODE: 'production' | 'development'
7
7
  }
8
- declare global {
9
- interface ImportMetaEnv {
10
- readonly PUBLIC_BASE_URL: string
11
- readonly PUBLIC_API_HOST: string
12
- readonly PUBLIC_ENV_MODE: 'production' | 'development'
13
- }
14
8
 
15
- interface ImportMeta {
16
- readonly env: ImportMetaEnv
17
- }
18
-
19
- declare module '*.svg' {
20
- const content: string
21
- export default content
22
- }
9
+ interface ImportMeta {
10
+ readonly env: ImportMetaEnv
11
+ }
23
12
 
24
- declare module '*.svg?react' {
25
- const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement>>
26
- export default ReactComponent
27
- }
13
+ declare module '*.svg' {
14
+ const content: string
15
+ export default content
28
16
  }
29
17
 
30
- declare module '@emotion/react' {
31
- export interface Theme extends themeType {}
18
+ declare module '*.svg?react' {
19
+ const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement>>
20
+ export default ReactComponent
32
21
  }
@@ -0,0 +1,7 @@
1
+ @layer theme, base, components, utilities;
2
+ @import "tailwindcss/theme.css" prefix(tw) layer(theme);
3
+ @import "tailwindcss/utilities.css" layer(utilities);
4
+
5
+ body {
6
+ margin: 0;
7
+ }
@@ -1,3 +1,4 @@
1
1
  import { startApp } from '@/domain/app'
2
+ import './main.css'
2
3
 
3
4
  startApp()
@@ -19,8 +19,6 @@
19
19
  "commit": "git add . && npm run cz"
20
20
  },
21
21
  "dependencies": {
22
- "@emotion/react": "11.14.0",
23
- "@emotion/styled": "11.14.0",
24
22
  "@tanstack/react-query": "5.51.15",
25
23
  "axios": "1.7.9",
26
24
  "define-zustand": "3.2.1",
@@ -31,6 +29,7 @@
31
29
  "react-dom": "18.3.1",
32
30
  "react-router": "7.5.0",
33
31
  "react-use": "17.5.0",
32
+ "tailwindcss": "4.1.4",
34
33
  "type-fest": "4.33.0",
35
34
  "zustand": "5.0.3"
36
35
  },
@@ -45,7 +44,7 @@
45
44
  "@rsbuild/plugin-svgr": "1.0.7",
46
45
  "@rsbuild/plugin-type-check": "1.2.1",
47
46
  "@rsdoctor/rspack-plugin": "0.4.13",
48
- "@swc/plugin-emotion": "9.0.3",
47
+ "@tailwindcss/postcss": "4.1.4",
49
48
  "@types/lodash-es": "4.17.12",
50
49
  "@types/node": "18.16.0",
51
50
  "@types/qs": "6.9.7",
@@ -65,7 +64,6 @@
65
64
  "postcss": "8.4.35",
66
65
  "postcss-import": "16.0.1",
67
66
  "postcss-nesting": "12.0.3",
68
- "postcss-styled-syntax": "0.6.4",
69
67
  "prettier": "3.2.5",
70
68
  "stylelint": "16.10.0",
71
69
  "stylelint-config-standard": "36.0.1",
@@ -1,10 +1,9 @@
1
1
  import { useHomeData } from '@/shared/service'
2
- import { StyledRoot } from './view.styled'
3
2
 
4
3
  export default function Home() {
5
4
  const { data } = useHomeData()
6
5
 
7
6
  console.log('data', data)
8
7
 
9
- return <StyledRoot>sdfs</StyledRoot>
8
+ return <div className="tw:flex tw:items-center tw:justify-center">sdfs</div>
10
9
  }
@@ -2,6 +2,7 @@ module.exports = {
2
2
  plugins: {
3
3
  'postcss-import': {},
4
4
  autoprefixer: {},
5
+ "@tailwindcss/postcss": {},
5
6
  ...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {})
6
7
  }
7
8
  }
@@ -41,13 +41,6 @@ export default defineConfig(({ envMode, command }) => {
41
41
  new StylelintWebpackPlugin(),
42
42
  process.env.RSDOCTOR && new RsdoctorRspackPlugin()
43
43
  ]
44
- },
45
- swc: {
46
- jsc: {
47
- experimental: {
48
- plugins: [['@swc/plugin-emotion', {}]]
49
- }
50
- }
51
44
  }
52
45
  },
53
46
  plugins: [
@@ -59,11 +52,7 @@ export default defineConfig(({ envMode, command }) => {
59
52
  }
60
53
  }),
61
54
  pluginSvgr(),
62
- pluginReact({
63
- swcReactOptions: {
64
- importSource: '@emotion/react'
65
- }
66
- })
55
+ pluginReact()
67
56
  ],
68
57
  performance: {
69
58
  removeConsole: command === 'build' ? ['log'] : false,
@@ -1,8 +1,6 @@
1
1
  import { FunctionComponent, ReactNode } from 'react'
2
- import { ThemeProvider } from '@emotion/react'
3
2
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
4
3
  import { request } from '@/shared/service'
5
- import { theme } from '@/shared/styles'
6
4
 
7
5
  const queryClient = new QueryClient({
8
6
  defaultOptions: {
@@ -20,9 +18,5 @@ export interface propsType {
20
18
  children: ReactNode
21
19
  }
22
20
  export const Root: FunctionComponent<propsType> = props => {
23
- return (
24
- <QueryClientProvider client={queryClient}>
25
- <ThemeProvider theme={theme}>{props.children}</ThemeProvider>
26
- </QueryClientProvider>
27
- )
21
+ return <QueryClientProvider client={queryClient}>{props.children}</QueryClientProvider>
28
22
  }
@@ -2,7 +2,6 @@ import { useLayoutEffect, Suspense } from 'react'
2
2
  import { RouterProvider } from 'react-router/dom'
3
3
  import { request } from '@/shared/service'
4
4
  import { routerInstance } from '@/domain/router'
5
- import { GlobalStyle } from '@/shared/styles'
6
5
  import * as AppContext from './app-context'
7
6
 
8
7
  export const Root = () => {
@@ -17,7 +16,6 @@ export const Root = () => {
17
16
 
18
17
  return (
19
18
  <AppContext.Root>
20
- <GlobalStyle />
21
19
  <Suspense fallback={<>loading...</>}>
22
20
  <RouterProvider router={routerInstance} />
23
21
  </Suspense>
@@ -0,0 +1,7 @@
1
+ @layer theme, base, components, utilities;
2
+ @import "tailwindcss/theme.css" prefix(tw) layer(theme);
3
+ @import "tailwindcss/utilities.css" layer(utilities);
4
+
5
+ body {
6
+ margin: 0;
7
+ }
@@ -1,3 +1,4 @@
1
1
  import { startApp } from '@/domain/app'
2
+ import './main.css'
2
3
 
3
4
  startApp()
@@ -18,8 +18,6 @@
18
18
  "commit": "git add . && npm run cz"
19
19
  },
20
20
  "dependencies": {
21
- "@emotion/react": "11.14.0",
22
- "@emotion/styled": "11.14.0",
23
21
  "@tanstack/react-query": "5.51.15",
24
22
  "axios": "1.7.9",
25
23
  "define-zustand": "3.2.1",
@@ -30,6 +28,7 @@
30
28
  "react-dom": "18.3.1",
31
29
  "react-router": "7.5.0",
32
30
  "react-use": "17.5.0",
31
+ "tailwindcss": "4.1.4",
33
32
  "type-fest": "4.33.0",
34
33
  "zustand": "5.0.3"
35
34
  },
@@ -40,6 +39,7 @@
40
39
  "@emotion/babel-plugin": "11.13.5",
41
40
  "@eslint/js": "9.15.0",
42
41
  "@faker-js/faker": "8.4.1",
42
+ "@tailwindcss/vite": "4.1.4",
43
43
  "@types/lodash-es": "4.17.12",
44
44
  "@types/node": "18.16.0",
45
45
  "@types/qs": "6.9.7",
@@ -47,7 +47,6 @@
47
47
  "@types/react-dom": "18.3.0",
48
48
  "@vitejs/plugin-react": "4.3.4",
49
49
  "autoprefixer": "10.4.14",
50
- "babel-plugin-styled-components": "2.1.4",
51
50
  "commitizen": "4.3.0",
52
51
  "cssnano": "6.0.0",
53
52
  "eslint": "9.17.0",
@@ -61,7 +60,6 @@
61
60
  "postcss": "8.4.35",
62
61
  "postcss-import": "16.0.1",
63
62
  "postcss-nesting": "12.0.3",
64
- "postcss-styled-syntax": "0.6.4",
65
63
  "prettier": "3.2.5",
66
64
  "rollup-plugin-visualizer": "5.12.0",
67
65
  "stylelint": "16.10.0",
@@ -1,10 +1,9 @@
1
- import { useHomeData } from '@/shared/service'
2
- import { StyledRoot } from './view.styled'
3
-
4
- export default function Home() {
5
- const { data } = useHomeData()
6
-
7
- console.log('data', data)
8
-
9
- return <StyledRoot>sdfs</StyledRoot>
10
- }
1
+ import { useHomeData } from '@/shared/service'
2
+
3
+ export default function Home() {
4
+ const { data } = useHomeData()
5
+
6
+ console.log('data', data)
7
+
8
+ return <div className="tw:flex tw:items-center tw:justify-center">sdfs</div>
9
+ }
@@ -1,21 +1,12 @@
1
1
  /// <reference types="vite/client" />
2
2
  /// <reference types="vite-plugin-svgr/client" />
3
3
 
4
- import '@emotion/react'
5
- import { themeType } from './shared/styles'
6
-
7
- declare global {
8
- interface ImportMetaEnv {
9
- readonly VITE_BASE_URL: string
10
- readonly VITE_API_HOST: string
11
- // 更多环境变量...
12
- }
13
-
14
- interface ImportMeta {
15
- readonly env: ImportMetaEnv
16
- }
4
+ interface ImportMetaEnv {
5
+ readonly VITE_BASE_URL: string
6
+ readonly VITE_API_HOST: string
7
+ // 更多环境变量...
17
8
  }
18
9
 
19
- declare module '@emotion/react' {
20
- export interface Theme extends themeType {}
10
+ interface ImportMeta {
11
+ readonly env: ImportMetaEnv
21
12
  }
@@ -5,6 +5,7 @@ import mockDevServer from 'vite-plugin-mock-dev-server'
5
5
  import checker from 'vite-plugin-checker'
6
6
  import { visualizer } from 'rollup-plugin-visualizer'
7
7
  import { includes } from 'lodash-es'
8
+ import tailwindcss from '@tailwindcss/vite'
8
9
  import { createChunks } from './scripts'
9
10
 
10
11
  // https://vitejs.dev/config/
@@ -12,6 +13,7 @@ export default defineConfig(({ mode }) => {
12
13
  const env = loadEnv(mode, process.cwd(), '')
13
14
  const proxyBaseUrl = env.VITE_BASE_URL + env.VITE_API_HOST
14
15
  const plugins: any[] = [
16
+ tailwindcss(),
15
17
  svgr(),
16
18
  mockDevServer({
17
19
  include: ['**/*.mock.{ts,js}']
@@ -1,4 +1,4 @@
1
- @import "tailwindcss/theme.css" layer(theme);
2
- @import "tailwindcss/utilities.css" layer(utilities);
3
1
  @layer theme, base, components, utilities;
2
+ @import "tailwindcss/theme.css" prefix(tw) layer(theme);
3
+ @import "tailwindcss/utilities.css" layer(utilities);
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { createPinia } from 'pinia'
2
2
  import { router } from '@/domain/router'
3
3
  import { app } from '@/domain/app'
4
- import './style.css'
4
+ import './main.css'
5
5
 
6
6
  app.use(createPinia()).use(router).mount('#app')
@@ -11,6 +11,6 @@ console.log('data', data)
11
11
 
12
12
  <style scoped>
13
13
  .root {
14
- @apply flex items-center justify-center;
14
+ @apply tw:flex tw:items-center tw:justify-center;
15
15
  }
16
16
  </style>
@@ -4,7 +4,6 @@ import vueJsx from '@vitejs/plugin-vue-jsx'
4
4
  import svgLoader from 'vite-svg-loader'
5
5
  import mockDevServer from 'vite-plugin-mock-dev-server'
6
6
  import checker from 'vite-plugin-checker'
7
- // @ts-ignore
8
7
  import tailwindcss from '@tailwindcss/vite'
9
8
  import { visualizer } from 'rollup-plugin-visualizer'
10
9
  import { includes } from 'lodash-es'
@@ -1,4 +1,4 @@
1
- @import "tailwindcss/theme.css" layer(theme);
2
- @import "tailwindcss/utilities.css" layer(utilities);
3
1
  @layer theme, base, components, utilities;
2
+ @import "tailwindcss/theme.css" prefix(tw) layer(theme);
3
+ @import "tailwindcss/utilities.css" layer(utilities);
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { createPinia } from 'pinia'
2
2
  import { router } from '@/domain/router'
3
3
  import { app } from '@/domain/app'
4
- import './style.css'
4
+ import './main.css'
5
5
 
6
6
  app.use(createPinia()).use(router).mount('#app')
@@ -11,6 +11,6 @@ console.log('data', data)
11
11
 
12
12
  <style scoped>
13
13
  .root {
14
- @apply flex items-center justify-center;
14
+ @apply tw:flex tw:items-center tw:justify-center;
15
15
  }
16
16
  </style>
@@ -25,8 +25,6 @@
25
25
  "commit": "git add . && npm run cz"
26
26
  },
27
27
  "dependencies": {
28
- "@emotion/react": "11.14.0",
29
- "@emotion/styled": "11.14.0",
30
28
  "@tanstack/react-query": "5.51.15",
31
29
  "@webext-core/messaging": "2.2.0",
32
30
  "axios": "1.7.9",
@@ -1,5 +0,0 @@
1
- import styled from '@emotion/styled'
2
-
3
- export const StyledRoot = styled.div`
4
- ${props => props.theme.tools.flex('center', 'center')}
5
- `
@@ -1,14 +0,0 @@
1
- import { FunctionComponent } from 'react'
2
- import { css, Global } from '@emotion/react'
3
-
4
- export const GlobalStyle: FunctionComponent<{ nameSpace?: string }> = props => {
5
- return (
6
- <Global
7
- styles={css`
8
- ${props.nameSpace ? '.' + props.nameSpace : 'body'} {
9
- margin: 0;
10
- }
11
- `}
12
- />
13
- )
14
- }
@@ -1,2 +0,0 @@
1
- export * from './theme.styled'
2
- export * from './global-style'
@@ -1,55 +0,0 @@
1
- import { CSSProperties } from 'react'
2
- import { isString } from 'lodash-es'
3
-
4
- export const theme = {
5
- tools: {
6
- ellipsis: () => ({
7
- overflow: 'hidden',
8
- textOverflow: 'ellipsis',
9
- whiteSpace: 'nowrap'
10
- }),
11
- lineClamp: (n: number) => ({
12
- '-webkit-line-clamp': `${n}`,
13
- '-webkit-box-orient': 'vertical',
14
- overflow: 'hidden',
15
- display: '-webkit-box'
16
- }),
17
- size: (s: string) => ({ width: s, height: s }),
18
- py: (s: string) => ({ paddingTop: s, paddingBottom: s }),
19
- px: (s: string) => ({ paddingLeft: s, paddingRight: s }),
20
- my: (s: string) => ({ marginTop: s, marginBottom: s }),
21
- mx: (s: string) => ({ marginLeft: s, marginRight: s }),
22
- flex: (
23
- align: CSSProperties['alignItems'],
24
- justify: CSSProperties['justifyContent'],
25
- vertical?: boolean
26
- ) => {
27
- return {
28
- display: 'flex',
29
- alignItems: align,
30
- justifyContent: justify,
31
- flexDirection: vertical ? 'column' : 'row'
32
- } satisfies CSSProperties
33
- },
34
- /** 数字为元素数量,字符串为对应css的值 */
35
- grid: {
36
- grid: (rows: number | string, cols: number | string, gap?: number) => ({
37
- display: 'grid',
38
- gridTemplateRows: isString(rows) ? rows : `repeat(${rows}, minmax(0, 1fr))`,
39
- gridTemplateColumns: isString(cols) ? cols : `repeat(${cols}, minmax(0, 1fr))`,
40
- gap: gap ? `${gap}px` : void 0
41
- }),
42
- rows: (rows: number | string, gap?: number) => ({
43
- display: 'grid',
44
- gridTemplateRows: isString(rows) ? rows : `repeat(${rows}, minmax(0, 1fr))`,
45
- rowGap: gap ? `${gap}px` : void 0
46
- }),
47
- cols: (cols: number | string, gap?: number) => ({
48
- display: 'grid',
49
- gridTemplateColumns: isString(cols) ? cols : `repeat(${cols}, minmax(0, 1fr))`,
50
- columnGap: gap ? `${gap}px` : void 0
51
- })
52
- } satisfies Record<string, (...args: any) => CSSProperties>
53
- }
54
- }
55
- export type themeType = typeof theme
@@ -1,5 +0,0 @@
1
- import styled from '@emotion/styled'
2
-
3
- export const StyledRoot = styled.div`
4
- ${props => props.theme.tools.flex('center', 'center')}
5
- `
@@ -1,14 +0,0 @@
1
- import { FunctionComponent } from 'react'
2
- import { css, Global } from '@emotion/react'
3
-
4
- export const GlobalStyle: FunctionComponent<{ nameSpace?: string }> = props => {
5
- return (
6
- <Global
7
- styles={css`
8
- ${props.nameSpace ? '.' + props.nameSpace : 'body'} {
9
- margin: 0;
10
- }
11
- `}
12
- />
13
- )
14
- }
@@ -1,2 +0,0 @@
1
- export * from './theme.styled'
2
- export * from './global-style'
@@ -1,55 +0,0 @@
1
- import { CSSProperties } from 'react'
2
- import { isString } from 'lodash-es'
3
-
4
- export const theme = {
5
- tools: {
6
- ellipsis: () => ({
7
- overflow: 'hidden',
8
- textOverflow: 'ellipsis',
9
- whiteSpace: 'nowrap'
10
- }),
11
- lineClamp: (n: number) => ({
12
- '-webkit-line-clamp': `${n}`,
13
- '-webkit-box-orient': 'vertical',
14
- overflow: 'hidden',
15
- display: '-webkit-box'
16
- }),
17
- size: (s: string) => ({ width: s, height: s }),
18
- py: (s: string) => ({ paddingTop: s, paddingBottom: s }),
19
- px: (s: string) => ({ paddingLeft: s, paddingRight: s }),
20
- my: (s: string) => ({ marginTop: s, marginBottom: s }),
21
- mx: (s: string) => ({ marginLeft: s, marginRight: s }),
22
- flex: (
23
- align: CSSProperties['alignItems'],
24
- justify: CSSProperties['justifyContent'],
25
- vertical?: boolean
26
- ) => {
27
- return {
28
- display: 'flex',
29
- alignItems: align,
30
- justifyContent: justify,
31
- flexDirection: vertical ? 'column' : 'row'
32
- } satisfies CSSProperties
33
- },
34
- /** 数字为元素数量,字符串为对应css的值 */
35
- grid: {
36
- grid: (rows: number | string, cols: number | string, gap?: number) => ({
37
- display: 'grid',
38
- gridTemplateRows: isString(rows) ? rows : `repeat(${rows}, minmax(0, 1fr))`,
39
- gridTemplateColumns: isString(cols) ? cols : `repeat(${cols}, minmax(0, 1fr))`,
40
- gap: gap ? `${gap}px` : void 0
41
- }),
42
- rows: (rows: number | string, gap?: number) => ({
43
- display: 'grid',
44
- gridTemplateRows: isString(rows) ? rows : `repeat(${rows}, minmax(0, 1fr))`,
45
- rowGap: gap ? `${gap}px` : void 0
46
- }),
47
- cols: (cols: number | string, gap?: number) => ({
48
- display: 'grid',
49
- gridTemplateColumns: isString(cols) ? cols : `repeat(${cols}, minmax(0, 1fr))`,
50
- columnGap: gap ? `${gap}px` : void 0
51
- })
52
- } satisfies Record<string, (...args: any) => CSSProperties>
53
- }
54
- }
55
- export type themeType = typeof theme