create-packer 1.47.1 → 1.47.2
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.
- package/package.json +3 -2
- package/template/web-app/react-rsbuild/domain/components/app-context.tsx +1 -10
- package/template/web-app/react-rsbuild/env.d.ts +0 -7
- package/template/web-app/react-rsbuild/main.tsx +1 -0
- package/template/web-app/react-rsbuild/package.json +3 -3
- package/template/web-app/react-rsbuild/pages/home/view.module.css +3 -0
- package/template/web-app/react-rsbuild/pages/home/view.tsx +2 -2
- package/template/web-app/react-rsbuild/postcss.config.cjs +1 -0
- package/template/web-app/react-rsbuild/rsbuild.config.ts +1 -12
- package/template/web-app/react-rsbuild/tsconfig.json +0 -1
- package/template/web-app/react-vite/domain/components/app-context.tsx +1 -10
- package/template/web-app/react-vite/main.tsx +1 -0
- package/template/web-app/react-vite/package.json +3 -3
- package/template/web-app/react-vite/pages/home/view.module.css +3 -0
- package/template/web-app/react-vite/pages/home/view.tsx +2 -2
- package/template/web-app/react-vite/tsconfig.json +0 -1
- package/template/web-app/react-vite/vite-env.d.ts +6 -15
- package/template/web-app/react-vite/vite.config.ts +3 -3
- package/template/web-app/vue/main.ts +1 -1
- package/template/web-app/vue/package.json +2 -1
- package/template/web-app/vue/shared/styles/theme.css +4 -0
- package/template/web-app/vue-rsbuild/main.ts +1 -1
- package/template/web-app/vue-rsbuild/package.json +5 -1
- package/template/web-app/vue-rsbuild/pages/home/view.vue +1 -1
- package/template/web-app/vue-rsbuild/shared/styles/theme.css +4 -0
- package/template/web-extension/.wxt/eslint-auto-imports.mjs +56 -56
- package/template/web-extension/.wxt/tsconfig.json +27 -27
- package/template/web-extension/.wxt/types/globals.d.ts +15 -15
- package/template/web-extension/.wxt/types/i18n.d.ts +81 -81
- package/template/web-extension/.wxt/types/imports-module.d.ts +20 -20
- package/template/web-extension/.wxt/types/imports.d.ts +50 -50
- package/template/web-extension/.wxt/types/paths.d.ts +17 -17
- package/template/web-extension/.wxt/wxt.d.ts +7 -7
- package/template/web-extension/entrypoints/content/index.tsx +1 -0
- package/template/web-extension/entrypoints/popup/main.tsx +1 -0
- package/template/web-extension/entrypoints/popup/popup.tsx +1 -1
- package/template/web-extension/package.json +3 -4
- package/template/web-extension/shared/components/app-context/view.tsx +1 -10
- package/template/web-extension/shared/styles/theme.css +4 -0
- package/template/web-extension/tsconfig.json +0 -1
- package/template/web-extension/vite-env.d.ts +6 -15
- package/template/web-extension/wxt.config.ts +2 -1
- package/template/web-app/react-rsbuild/pages/home/view.styled.ts +0 -5
- package/template/web-app/react-rsbuild/shared/styles/global.ts +0 -7
- package/template/web-app/react-rsbuild/shared/styles/index.ts +0 -2
- package/template/web-app/react-rsbuild/shared/styles/theme.ts +0 -50
- package/template/web-app/react-vite/pages/home/view.styled.ts +0 -5
- package/template/web-app/react-vite/shared/styles/global.ts +0 -7
- package/template/web-app/react-vite/shared/styles/index.ts +0 -2
- package/template/web-app/react-vite/shared/styles/theme.ts +0 -50
- package/template/web-extension/shared/styles/global.ts +0 -9
- package/template/web-extension/shared/styles/index.ts +0 -2
- package/template/web-extension/shared/styles/theme.ts +0 -50
- /package/template/web-app/{vue-rsbuild/main.css → react-rsbuild/shared/styles/theme.css} +0 -0
- /package/template/web-app/{vue/main.css → react-vite/shared/styles/theme.css} +0 -0
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react'
|
|
2
|
-
import { isString } from 'es-toolkit'
|
|
3
|
-
import { isNumber } from 'es-toolkit/compat'
|
|
4
|
-
|
|
5
|
-
export const theme = {
|
|
6
|
-
tools: {
|
|
7
|
-
ellipsis: () => ({
|
|
8
|
-
overflow: 'hidden',
|
|
9
|
-
textOverflow: 'ellipsis',
|
|
10
|
-
whiteSpace: 'nowrap'
|
|
11
|
-
}),
|
|
12
|
-
lineClamp: (n: number) => ({
|
|
13
|
-
'-webkit-line-clamp': `${n}`,
|
|
14
|
-
'-webkit-box-orient': 'vertical',
|
|
15
|
-
overflow: 'hidden',
|
|
16
|
-
display: '-webkit-box'
|
|
17
|
-
}),
|
|
18
|
-
size: (s: string) => ({ width: s, height: s }),
|
|
19
|
-
py: (s: string) => ({ paddingTop: s, paddingBottom: s }),
|
|
20
|
-
px: (s: string) => ({ paddingLeft: s, paddingRight: s }),
|
|
21
|
-
my: (s: string) => ({ marginTop: s, marginBottom: s }),
|
|
22
|
-
mx: (s: string) => ({ marginLeft: s, marginRight: s }),
|
|
23
|
-
flex: (
|
|
24
|
-
align: CSSProperties['alignItems'],
|
|
25
|
-
justify: CSSProperties['justifyContent'],
|
|
26
|
-
vertical?: boolean
|
|
27
|
-
) => {
|
|
28
|
-
return {
|
|
29
|
-
display: 'flex',
|
|
30
|
-
alignItems: align,
|
|
31
|
-
justifyContent: justify,
|
|
32
|
-
flexDirection: vertical ? 'column' : 'row'
|
|
33
|
-
} satisfies CSSProperties
|
|
34
|
-
},
|
|
35
|
-
/** 数字为元素数量,字符串为对应css的值 */
|
|
36
|
-
grid: (
|
|
37
|
-
rows: number | CSSProperties['gridTemplateRows'],
|
|
38
|
-
cols: number | CSSProperties['gridTemplateColumns'],
|
|
39
|
-
gap?: number | string
|
|
40
|
-
) => {
|
|
41
|
-
return {
|
|
42
|
-
display: 'grid',
|
|
43
|
-
gridTemplateRows: isString(rows) ? rows : `repeat(${rows}, minmax(0, 1fr))`,
|
|
44
|
-
gridTemplateColumns: isString(cols) ? cols : `repeat(${cols}, minmax(0, 1fr))`,
|
|
45
|
-
gap: isNumber(gap) ? `${gap}px` : gap
|
|
46
|
-
} satisfies CSSProperties
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
export type themeType = typeof theme
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react'
|
|
2
|
-
import { isString } from 'es-toolkit'
|
|
3
|
-
import { isNumber } from 'es-toolkit/compat'
|
|
4
|
-
|
|
5
|
-
export const theme = {
|
|
6
|
-
tools: {
|
|
7
|
-
ellipsis: () => ({
|
|
8
|
-
overflow: 'hidden',
|
|
9
|
-
textOverflow: 'ellipsis',
|
|
10
|
-
whiteSpace: 'nowrap'
|
|
11
|
-
}),
|
|
12
|
-
lineClamp: (n: number) => ({
|
|
13
|
-
'-webkit-line-clamp': `${n}`,
|
|
14
|
-
'-webkit-box-orient': 'vertical',
|
|
15
|
-
overflow: 'hidden',
|
|
16
|
-
display: '-webkit-box'
|
|
17
|
-
}),
|
|
18
|
-
size: (s: string) => ({ width: s, height: s }),
|
|
19
|
-
py: (s: string) => ({ paddingTop: s, paddingBottom: s }),
|
|
20
|
-
px: (s: string) => ({ paddingLeft: s, paddingRight: s }),
|
|
21
|
-
my: (s: string) => ({ marginTop: s, marginBottom: s }),
|
|
22
|
-
mx: (s: string) => ({ marginLeft: s, marginRight: s }),
|
|
23
|
-
flex: (
|
|
24
|
-
align: CSSProperties['alignItems'],
|
|
25
|
-
justify: CSSProperties['justifyContent'],
|
|
26
|
-
vertical?: boolean
|
|
27
|
-
) => {
|
|
28
|
-
return {
|
|
29
|
-
display: 'flex',
|
|
30
|
-
alignItems: align,
|
|
31
|
-
justifyContent: justify,
|
|
32
|
-
flexDirection: vertical ? 'column' : 'row'
|
|
33
|
-
} satisfies CSSProperties
|
|
34
|
-
},
|
|
35
|
-
/** 数字为元素数量,字符串为对应css的值 */
|
|
36
|
-
grid: (
|
|
37
|
-
rows: number | CSSProperties['gridTemplateRows'],
|
|
38
|
-
cols: number | CSSProperties['gridTemplateColumns'],
|
|
39
|
-
gap?: number | string
|
|
40
|
-
) => {
|
|
41
|
-
return {
|
|
42
|
-
display: 'grid',
|
|
43
|
-
gridTemplateRows: isString(rows) ? rows : `repeat(${rows}, minmax(0, 1fr))`,
|
|
44
|
-
gridTemplateColumns: isString(cols) ? cols : `repeat(${cols}, minmax(0, 1fr))`,
|
|
45
|
-
gap: isNumber(gap) ? `${gap}px` : gap
|
|
46
|
-
} satisfies CSSProperties
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
export type themeType = typeof theme
|
|
File without changes
|
|
File without changes
|