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.
Files changed (55) hide show
  1. package/package.json +3 -2
  2. package/template/web-app/react-rsbuild/domain/components/app-context.tsx +1 -10
  3. package/template/web-app/react-rsbuild/env.d.ts +0 -7
  4. package/template/web-app/react-rsbuild/main.tsx +1 -0
  5. package/template/web-app/react-rsbuild/package.json +3 -3
  6. package/template/web-app/react-rsbuild/pages/home/view.module.css +3 -0
  7. package/template/web-app/react-rsbuild/pages/home/view.tsx +2 -2
  8. package/template/web-app/react-rsbuild/postcss.config.cjs +1 -0
  9. package/template/web-app/react-rsbuild/rsbuild.config.ts +1 -12
  10. package/template/web-app/react-rsbuild/tsconfig.json +0 -1
  11. package/template/web-app/react-vite/domain/components/app-context.tsx +1 -10
  12. package/template/web-app/react-vite/main.tsx +1 -0
  13. package/template/web-app/react-vite/package.json +3 -3
  14. package/template/web-app/react-vite/pages/home/view.module.css +3 -0
  15. package/template/web-app/react-vite/pages/home/view.tsx +2 -2
  16. package/template/web-app/react-vite/tsconfig.json +0 -1
  17. package/template/web-app/react-vite/vite-env.d.ts +6 -15
  18. package/template/web-app/react-vite/vite.config.ts +3 -3
  19. package/template/web-app/vue/main.ts +1 -1
  20. package/template/web-app/vue/package.json +2 -1
  21. package/template/web-app/vue/shared/styles/theme.css +4 -0
  22. package/template/web-app/vue-rsbuild/main.ts +1 -1
  23. package/template/web-app/vue-rsbuild/package.json +5 -1
  24. package/template/web-app/vue-rsbuild/pages/home/view.vue +1 -1
  25. package/template/web-app/vue-rsbuild/shared/styles/theme.css +4 -0
  26. package/template/web-extension/.wxt/eslint-auto-imports.mjs +56 -56
  27. package/template/web-extension/.wxt/tsconfig.json +27 -27
  28. package/template/web-extension/.wxt/types/globals.d.ts +15 -15
  29. package/template/web-extension/.wxt/types/i18n.d.ts +81 -81
  30. package/template/web-extension/.wxt/types/imports-module.d.ts +20 -20
  31. package/template/web-extension/.wxt/types/imports.d.ts +50 -50
  32. package/template/web-extension/.wxt/types/paths.d.ts +17 -17
  33. package/template/web-extension/.wxt/wxt.d.ts +7 -7
  34. package/template/web-extension/entrypoints/content/index.tsx +1 -0
  35. package/template/web-extension/entrypoints/popup/main.tsx +1 -0
  36. package/template/web-extension/entrypoints/popup/popup.tsx +1 -1
  37. package/template/web-extension/package.json +3 -4
  38. package/template/web-extension/shared/components/app-context/view.tsx +1 -10
  39. package/template/web-extension/shared/styles/theme.css +4 -0
  40. package/template/web-extension/tsconfig.json +0 -1
  41. package/template/web-extension/vite-env.d.ts +6 -15
  42. package/template/web-extension/wxt.config.ts +2 -1
  43. package/template/web-app/react-rsbuild/pages/home/view.styled.ts +0 -5
  44. package/template/web-app/react-rsbuild/shared/styles/global.ts +0 -7
  45. package/template/web-app/react-rsbuild/shared/styles/index.ts +0 -2
  46. package/template/web-app/react-rsbuild/shared/styles/theme.ts +0 -50
  47. package/template/web-app/react-vite/pages/home/view.styled.ts +0 -5
  48. package/template/web-app/react-vite/shared/styles/global.ts +0 -7
  49. package/template/web-app/react-vite/shared/styles/index.ts +0 -2
  50. package/template/web-app/react-vite/shared/styles/theme.ts +0 -50
  51. package/template/web-extension/shared/styles/global.ts +0 -9
  52. package/template/web-extension/shared/styles/index.ts +0 -2
  53. package/template/web-extension/shared/styles/theme.ts +0 -50
  54. /package/template/web-app/{vue-rsbuild/main.css → react-rsbuild/shared/styles/theme.css} +0 -0
  55. /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,9 +0,0 @@
1
- import { css } from '@emotion/react'
2
-
3
- export function createGlobalCss(nameSpace?: string) {
4
- return css`
5
- ${nameSpace ? `.${nameSpace}` : 'body'} {
6
- margin: 0;
7
- }
8
- `
9
- }
@@ -1,2 +0,0 @@
1
- export * from './global'
2
- export * from './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