create-packer 1.38.2 → 1.39.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 (125) hide show
  1. package/package.json +4 -5
  2. package/template/docusaurus/package.json +1 -1
  3. package/template/{web-app/react-vite/.eslintignore → lib/workspace/.stylelintignore} +2 -0
  4. package/template/lib/workspace/.stylelintrc +4 -9
  5. package/template/lib/workspace/eslint.config.mjs +116 -0
  6. package/template/lib/workspace/package.json +81 -73
  7. package/template/lib/workspace/packages/react/package.json +41 -41
  8. package/template/lib/workspace/packages/react/tsconfig.json +3 -8
  9. package/template/lib/workspace/packages/react/tsconfig.lint.json +21 -0
  10. package/template/lib/workspace/packages/ts/package.json +29 -29
  11. package/template/lib/workspace/packages/ts/tsconfig.json +9 -6
  12. package/template/lib/workspace/packages/ts/tsconfig.lint.json +21 -0
  13. package/template/nest/package.json +82 -84
  14. package/template/web-app/react-rsbuild/domain/app/components/app-context.tsx +17 -17
  15. package/template/web-app/react-rsbuild/domain/router/components/index.ts +2 -0
  16. package/template/web-app/react-rsbuild/domain/router/components/route-layout.tsx +19 -0
  17. package/template/web-app/react-rsbuild/domain/router/components/sub-route-outlet.tsx +22 -0
  18. package/template/web-app/react-rsbuild/domain/router/index.ts +4 -3
  19. package/template/web-app/react-rsbuild/eslint.config.js +104 -0
  20. package/template/web-app/react-rsbuild/package.json +78 -79
  21. package/template/web-app/react-rsbuild/pages/home/index.ts +1 -1
  22. package/template/web-app/react-rsbuild/pages/home/{home.styled.ts → view.styled.ts} +7 -7
  23. package/template/web-app/react-rsbuild/pages/home/{home.tsx → view.tsx} +10 -10
  24. package/template/web-app/{react-vite/shared/tools → react-rsbuild/shared/components}/componentInstance.tsx +80 -80
  25. package/template/web-app/react-rsbuild/shared/components/index.ts +1 -0
  26. package/template/web-app/react-rsbuild/shared/service/home.ts +8 -8
  27. package/template/web-app/react-rsbuild/shared/theme/theme.styled.ts +56 -56
  28. package/template/web-app/react-rsbuild/shared/tools/index.ts +0 -1
  29. package/template/web-app/react-vite/domain/router/components/index.ts +2 -0
  30. package/template/web-app/react-vite/domain/router/components/route-layout.tsx +19 -0
  31. package/template/web-app/react-vite/domain/router/components/sub-route-outlet.tsx +22 -0
  32. package/template/web-app/react-vite/domain/router/index.ts +4 -3
  33. package/template/web-app/react-vite/eslint.config.js +104 -0
  34. package/template/web-app/react-vite/package.json +79 -79
  35. package/template/web-app/react-vite/pages/home/index.ts +1 -1
  36. package/template/web-app/react-vite/pages/home/{home.mock.ts → view.mock.ts} +19 -19
  37. package/template/web-app/{react-webpack/pages/home/home.styled.ts → react-vite/pages/home/view.styled.ts} +7 -7
  38. package/template/web-app/react-vite/pages/home/{home.tsx → view.tsx} +10 -10
  39. package/template/web-app/{react-rsbuild/shared/tools → react-vite/shared/components}/componentInstance.tsx +80 -80
  40. package/template/web-app/react-vite/shared/components/index.ts +1 -0
  41. package/template/web-app/react-vite/shared/service/home.ts +10 -10
  42. package/template/web-app/react-vite/shared/theme/theme.styled.ts +55 -56
  43. package/template/web-app/react-vite/shared/tools/index.ts +0 -1
  44. package/template/web-app/react-vite/vite.config.ts +80 -76
  45. package/template/web-app/react-webpack/domain/router/components/index.ts +2 -0
  46. package/template/web-app/react-webpack/domain/router/components/route-layout.tsx +19 -0
  47. package/template/web-app/react-webpack/domain/router/components/sub-route-outlet.tsx +22 -0
  48. package/template/web-app/react-webpack/domain/router/index.ts +4 -3
  49. package/template/web-app/react-webpack/eslint.config.js +104 -0
  50. package/template/web-app/react-webpack/package.json +84 -87
  51. package/template/web-app/react-webpack/pages/home/index.ts +1 -1
  52. package/template/web-app/{react-vite/pages/home/home.styled.ts → react-webpack/pages/home/view.styled.ts} +7 -7
  53. package/template/web-app/react-webpack/pages/home/{home.tsx → view.tsx} +10 -10
  54. package/template/web-app/react-webpack/shared/{tools → components}/componentInstance.tsx +78 -78
  55. package/template/web-app/react-webpack/shared/components/index.ts +1 -0
  56. package/template/web-app/react-webpack/shared/theme/theme.styled.ts +56 -56
  57. package/template/web-app/react-webpack/shared/tools/index.ts +0 -1
  58. package/template/web-app/solid/package.json +53 -51
  59. package/template/web-app/solid/src/pages/home/index.ts +1 -1
  60. package/template/web-app/solid/src/pages/home/{home.container.tsx → view.tsx} +5 -5
  61. package/template/web-app/solid/src/pages/notFound/index.ts +1 -1
  62. package/template/web-app/solid/src/pages/notFound/{notFound.container.tsx → view.tsx} +3 -3
  63. package/template/web-app/svelte/.prettierrc +21 -14
  64. package/template/web-app/svelte/.svelte-kit/ambient.d.ts +181 -177
  65. package/template/web-app/svelte/.svelte-kit/generated/client/app.js +28 -23
  66. package/template/web-app/svelte/.svelte-kit/generated/client/matchers.js +1 -1
  67. package/template/web-app/svelte/.svelte-kit/generated/client/nodes/0.js +1 -1
  68. package/template/web-app/svelte/.svelte-kit/generated/client/nodes/1.js +1 -1
  69. package/template/web-app/svelte/.svelte-kit/generated/client/nodes/2.js +1 -1
  70. package/template/web-app/svelte/.svelte-kit/generated/root.js +3 -0
  71. package/template/web-app/svelte/.svelte-kit/generated/root.svelte +66 -62
  72. package/template/web-app/svelte/.svelte-kit/generated/server/internal.js +49 -61
  73. package/template/web-app/svelte/.svelte-kit/non-ambient.d.ts +25 -23
  74. package/template/web-app/svelte/.svelte-kit/tsconfig.json +49 -32
  75. package/template/web-app/svelte/.svelte-kit/types/route_meta_data.json +3 -3
  76. package/template/web-app/svelte/.svelte-kit/types/src/routes/$types.d.ts +22 -35
  77. package/template/web-app/svelte/eslint.config.js +95 -0
  78. package/template/web-app/svelte/package.json +55 -55
  79. package/template/web-app/svelte/src/app.d.ts +13 -12
  80. package/template/web-app/svelte/src/app.html +2 -2
  81. package/template/web-app/svelte/src/lib/index.ts +1 -0
  82. package/template/web-app/svelte/src/routes/+page.svelte +2 -2
  83. package/template/web-app/svelte/vite.config.ts +59 -55
  84. package/template/web-app/vue/eslint.config.js +109 -0
  85. package/template/web-app/vue/package.json +70 -70
  86. package/template/web-app/vue/pages/home/index.ts +1 -1
  87. package/template/web-app/vue/pages/home/{home.mock.ts → view.mock.ts} +19 -19
  88. package/template/web-app/vue/pages/home/{home.vue → view.vue} +16 -16
  89. package/template/web-app/vue/vite.config.ts +69 -65
  90. package/template/web-extension/.wxt/eslint-auto-imports.mjs +28 -0
  91. package/template/web-extension/.wxt/tsconfig.json +28 -25
  92. package/template/web-extension/.wxt/types/globals.d.ts +15 -15
  93. package/template/web-extension/.wxt/types/i18n.d.ts +81 -87
  94. package/template/web-extension/.wxt/types/imports.d.ts +22 -21
  95. package/template/web-extension/.wxt/types/paths.d.ts +16 -15
  96. package/template/web-extension/.wxt/wxt.d.ts +7 -6
  97. package/template/web-extension/entrypoints/content/domain/app/tools/insertApp.tsx +2 -3
  98. package/template/web-extension/entrypoints/content/index.tsx +10 -12
  99. package/template/web-extension/entrypoints/popup/main.tsx +14 -14
  100. package/template/web-extension/entrypoints/popup/{popup.container.tsx → popup.tsx} +3 -3
  101. package/template/web-extension/eslint.config.js +106 -0
  102. package/template/web-extension/package.json +84 -86
  103. package/template/web-extension/shared/content/constant.ts +1 -0
  104. package/template/web-extension/shared/content/index.ts +2 -1
  105. package/template/web-extension/shared/content/message.ts +25 -15
  106. package/template/web-extension/shared/styles/theme.styled.ts +56 -56
  107. package/template/web-extension/shared/tools/message.ts +70 -80
  108. package/template/web-extension/tsconfig.json +32 -32
  109. package/template/web-extension/vite-env.d.ts +20 -19
  110. package/template/web-extension/wxt.config.ts +43 -50
  111. package/template/lib/workspace/.eslintrc +0 -111
  112. package/template/lib/workspace/packages/react/.eslintrc +0 -111
  113. package/template/lib/workspace/packages/react/.stylelintrc +0 -29
  114. package/template/web-app/react-rsbuild/.eslintignore +0 -4
  115. package/template/web-app/react-rsbuild/.eslintrc +0 -111
  116. package/template/web-app/react-vite/.eslintrc +0 -110
  117. package/template/web-app/react-webpack/.eslintignore +0 -4
  118. package/template/web-app/react-webpack/.eslintrc +0 -110
  119. package/template/web-app/svelte/.eslintignore +0 -13
  120. package/template/web-app/svelte/.eslintrc +0 -76
  121. package/template/web-app/vue/.eslintignore +0 -4
  122. package/template/web-app/vue/.eslintrc +0 -97
  123. package/template/web-extension/.eslintignore +0 -4
  124. package/template/web-extension/.eslintrc +0 -110
  125. /package/template/web-app/solid/src/pages/home/{home.css → view.css} +0 -0
@@ -1,65 +1,69 @@
1
- import { defineConfig, loadEnv } from 'vite'
2
- import vue from '@vitejs/plugin-vue'
3
- import vueJsx from '@vitejs/plugin-vue-jsx'
4
- import svgLoader from 'vite-svg-loader'
5
- import mockDevServer from 'vite-plugin-mock-dev-server'
6
- import stylelint from 'vite-plugin-stylelint'
7
- import eslint from '@rollup/plugin-eslint'
8
- import { visualizer } from 'rollup-plugin-visualizer'
9
- import { includes } from 'lodash-es'
10
- import { createChunks } from './scripts'
11
-
12
- // https://vitejs.dev/config/
13
- export default defineConfig(({ mode }) => {
14
- const env = loadEnv(mode, process.cwd(), '')
15
- const proxyBaseUrl = env.VITE_BASE_URL + env.VITE_API_HOST
16
- const plugins: any[] = [
17
- vueJsx({
18
- enableObjectSlots: false
19
- }),
20
- stylelint({ cache: false, include: ['**/*.{css,scss,sass,less,styl,vue,svelte}'] }),
21
- eslint({ include: ['**/*.{ts,tsx,js,jsx,vue}'] }),
22
- vue(),
23
- svgLoader(),
24
- mockDevServer({
25
- include: ['**/*.mock.{ts,js}']
26
- })
27
- ]
28
-
29
- if (mode === 'analyse') {
30
- plugins.push(visualizer({ open: true, sourcemap: true, brotliSize: true, gzipSize: true }))
31
- }
32
- return {
33
- base: env.VITE_BASE_URL,
34
- plugins,
35
- resolve: {
36
- alias: {
37
- '@': __dirname
38
- }
39
- },
40
- esbuild: {
41
- drop: includes(['production', 'analyse'], mode) ? ['console', 'debugger'] : []
42
- },
43
- build: {
44
- sourcemap: mode === 'analyse',
45
- reportCompressedSize: mode === 'analyse',
46
- rollupOptions: {
47
- output: {
48
- manualChunks: createChunks({
49
- vue: ['vue', 'vue-router']
50
- })
51
- }
52
- }
53
- },
54
- server: {
55
- host: '0.0.0.0',
56
- proxy: {
57
- [proxyBaseUrl]: {
58
- target: 'http://127.0.0.1',
59
- changeOrigin: true,
60
- rewrite: path => path.replace(proxyBaseUrl, '')
61
- }
62
- }
63
- }
64
- }
65
- })
1
+ import { defineConfig, loadEnv } from 'vite'
2
+ import vue from '@vitejs/plugin-vue'
3
+ import vueJsx from '@vitejs/plugin-vue-jsx'
4
+ import svgLoader from 'vite-svg-loader'
5
+ import mockDevServer from 'vite-plugin-mock-dev-server'
6
+ import stylelint from 'vite-plugin-stylelint'
7
+ import checker from 'vite-plugin-checker'
8
+ import { visualizer } from 'rollup-plugin-visualizer'
9
+ import { includes } from 'lodash-es'
10
+ import { createChunks } from './scripts'
11
+
12
+ // https://vitejs.dev/config/
13
+ export default defineConfig(({ mode }) => {
14
+ const env = loadEnv(mode, process.cwd(), '')
15
+ const proxyBaseUrl = env.VITE_BASE_URL + env.VITE_API_HOST
16
+ const plugins: any[] = [
17
+ vueJsx({
18
+ enableObjectSlots: false
19
+ }),
20
+ stylelint({ cache: false, include: ['**/*.{css,scss,sass,less,styl,vue,svelte}'] }),
21
+ checker({
22
+ enableBuild: false,
23
+ typescript: true,
24
+ eslint: { useFlatConfig: true, lintCommand: 'eslint', dev: { logLevel: ['error'] } }
25
+ }),
26
+ vue(),
27
+ svgLoader(),
28
+ mockDevServer({
29
+ include: ['**/*.mock.{ts,js}']
30
+ })
31
+ ]
32
+
33
+ if (mode === 'analyse') {
34
+ plugins.push(visualizer({ open: true, sourcemap: true, brotliSize: true, gzipSize: true }))
35
+ }
36
+ return {
37
+ base: env.VITE_BASE_URL,
38
+ plugins,
39
+ resolve: {
40
+ alias: {
41
+ '@': __dirname
42
+ }
43
+ },
44
+ esbuild: {
45
+ drop: includes(['production', 'analyse'], mode) ? ['console', 'debugger'] : []
46
+ },
47
+ build: {
48
+ sourcemap: mode === 'analyse',
49
+ reportCompressedSize: mode === 'analyse',
50
+ rollupOptions: {
51
+ output: {
52
+ manualChunks: createChunks({
53
+ vue: ['vue', 'vue-router']
54
+ })
55
+ }
56
+ }
57
+ },
58
+ server: {
59
+ host: '0.0.0.0',
60
+ proxy: {
61
+ [proxyBaseUrl]: {
62
+ target: 'http://127.0.0.1',
63
+ changeOrigin: true,
64
+ rewrite: path => path.replace(proxyBaseUrl, '')
65
+ }
66
+ }
67
+ }
68
+ }
69
+ })
@@ -0,0 +1,28 @@
1
+ const globals = {
2
+ "ContentScriptContext": true,
3
+ "InvalidMatchPattern": true,
4
+ "MatchPattern": true,
5
+ "MigrationError": true,
6
+ "browser": true,
7
+ "createIframeUi": true,
8
+ "createIntegratedUi": true,
9
+ "createShadowRootUi": true,
10
+ "defineAppConfig": true,
11
+ "defineBackground": true,
12
+ "defineConfig": true,
13
+ "defineContentScript": true,
14
+ "defineUnlistedScript": true,
15
+ "defineWxtPlugin": true,
16
+ "fakeBrowser": true,
17
+ "injectScript": true,
18
+ "storage": true,
19
+ "useAppConfig": true
20
+ }
21
+
22
+ export default {
23
+ name: "wxt/auto-imports",
24
+ languageOptions: {
25
+ globals,
26
+ sourceType: "module",
27
+ },
28
+ };
@@ -1,25 +1,28 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "module": "ESNext",
5
- "moduleResolution": "Bundler",
6
- "noEmit": true,
7
- "esModuleInterop": true,
8
- "forceConsistentCasingInFileNames": true,
9
- "resolveJsonModule": true,
10
- "strict": true,
11
- "skipLibCheck": true,
12
- "paths": {
13
- "@": [".."],
14
- "@/*": ["../*"],
15
- "~": [".."],
16
- "~/*": ["../*"],
17
- "@@": [".."],
18
- "@@/*": ["../*"],
19
- "~~": [".."],
20
- "~~/*": ["../*"]
21
- }
22
- },
23
- "include": ["../**/*", "./wxt.d.ts"],
24
- "exclude": ["../dist"]
25
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "moduleResolution": "Bundler",
6
+ "noEmit": true,
7
+ "esModuleInterop": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "resolveJsonModule": true,
10
+ "strict": true,
11
+ "skipLibCheck": true,
12
+ "paths": {
13
+ "@": [".."],
14
+ "@/*": ["../*"],
15
+ "~": [".."],
16
+ "~/*": ["../*"],
17
+ "@@": [".."],
18
+ "@@/*": ["../*"],
19
+ "~~": [".."],
20
+ "~~/*": ["../*"]
21
+ }
22
+ },
23
+ "include": [
24
+ "../**/*",
25
+ "./wxt.d.ts"
26
+ ],
27
+ "exclude": ["../dist"]
28
+ }
@@ -1,15 +1,15 @@
1
- // Generated by wxt
2
- interface ImportMetaEnv {
3
- readonly MANIFEST_VERSION: 2 | 3
4
- readonly BROWSER: string
5
- readonly CHROME: boolean
6
- readonly FIREFOX: boolean
7
- readonly SAFARI: boolean
8
- readonly EDGE: boolean
9
- readonly OPERA: boolean
10
- readonly COMMAND: 'build' | 'serve'
11
- readonly ENTRYPOINT: string
12
- }
13
- interface ImportMeta {
14
- readonly env: ImportMetaEnv
15
- }
1
+ // Generated by wxt
2
+ interface ImportMetaEnv {
3
+ readonly MANIFEST_VERSION: 2 | 3;
4
+ readonly BROWSER: string;
5
+ readonly CHROME: boolean;
6
+ readonly FIREFOX: boolean;
7
+ readonly SAFARI: boolean;
8
+ readonly EDGE: boolean;
9
+ readonly OPERA: boolean;
10
+ readonly COMMAND: "build" | "serve";
11
+ readonly ENTRYPOINT: string;
12
+ }
13
+ interface ImportMeta {
14
+ readonly env: ImportMetaEnv
15
+ }
@@ -1,87 +1,81 @@
1
- // Generated by wxt
2
- import 'wxt/browser'
3
-
4
- declare module 'wxt/browser' {
5
- /**
6
- * See https://developer.chrome.com/docs/extensions/reference/i18n/#method-getMessage
7
- */
8
- interface GetMessageOptions {
9
- /**
10
- * See https://developer.chrome.com/docs/extensions/reference/i18n/#method-getMessage
11
- */
12
- escapeLt?: boolean
13
- }
14
-
15
- export interface WxtI18n extends I18n.Static {
16
- /**
17
- * The extension or app ID; you might use this string to construct URLs for resources inside the extension. Even unlocalized extensions can use this message.
18
- * Note: You can't use this message in a manifest file.
19
- *
20
- * "<browser.runtime.id>"
21
- */
22
- getMessage(
23
- messageName: '@@extension_id',
24
- substitutions?: string | string[],
25
- options?: GetMessageOptions
26
- ): string
27
- /**
28
- * "<browser.i18n.getUiLocale()>"
29
- */
30
- getMessage(
31
- messageName: '@@ui_locale',
32
- substitutions?: string | string[],
33
- options?: GetMessageOptions
34
- ): string
35
- /**
36
- * The text direction for the current locale, either "ltr" for left-to-right languages such as English or "rtl" for right-to-left languages such as Japanese.
37
- *
38
- * "<ltr|rtl>"
39
- */
40
- getMessage(
41
- messageName: '@@bidi_dir',
42
- substitutions?: string | string[],
43
- options?: GetMessageOptions
44
- ): string
45
- /**
46
- * If the @@bidi_dir is "ltr", then this is "rtl"; otherwise, it's "ltr".
47
- *
48
- * "<rtl|ltr>"
49
- */
50
- getMessage(
51
- messageName: '@@bidi_reversed_dir',
52
- substitutions?: string | string[],
53
- options?: GetMessageOptions
54
- ): string
55
- /**
56
- * If the @@bidi_dir is "ltr", then this is "left"; otherwise, it's "right".
57
- *
58
- * "<left|right>"
59
- */
60
- getMessage(
61
- messageName: '@@bidi_start_edge',
62
- substitutions?: string | string[],
63
- options?: GetMessageOptions
64
- ): string
65
- /**
66
- * If the @@bidi_dir is "ltr", then this is "right"; otherwise, it's "left".
67
- *
68
- * "<right|left>"
69
- */
70
- getMessage(
71
- messageName: '@@bidi_end_edge',
72
- substitutions?: string | string[],
73
- options?: GetMessageOptions
74
- ): string
75
- getMessage(
76
- messageName:
77
- | '@@extension_id'
78
- | '@@ui_locale'
79
- | '@@bidi_dir'
80
- | '@@bidi_reversed_dir'
81
- | '@@bidi_start_edge'
82
- | '@@bidi_end_edge',
83
- substitutions?: string | string[],
84
- options?: GetMessageOptions
85
- ): string
86
- }
87
- }
1
+ // Generated by wxt
2
+ import "wxt/browser";
3
+
4
+ declare module "wxt/browser" {
5
+ /**
6
+ * See https://developer.chrome.com/docs/extensions/reference/i18n/#method-getMessage
7
+ */
8
+ interface GetMessageOptions {
9
+ /**
10
+ * See https://developer.chrome.com/docs/extensions/reference/i18n/#method-getMessage
11
+ */
12
+ escapeLt?: boolean
13
+ }
14
+
15
+ export interface WxtI18n extends I18n.Static {
16
+ /**
17
+ * The extension or app ID; you might use this string to construct URLs for resources inside the extension. Even unlocalized extensions can use this message.
18
+ * Note: You can't use this message in a manifest file.
19
+ *
20
+ * "<browser.runtime.id>"
21
+ */
22
+ getMessage(
23
+ messageName: "@@extension_id",
24
+ substitutions?: string | string[],
25
+ options?: GetMessageOptions,
26
+ ): string;
27
+ /**
28
+ * "<browser.i18n.getUiLocale()>"
29
+ */
30
+ getMessage(
31
+ messageName: "@@ui_locale",
32
+ substitutions?: string | string[],
33
+ options?: GetMessageOptions,
34
+ ): string;
35
+ /**
36
+ * The text direction for the current locale, either "ltr" for left-to-right languages such as English or "rtl" for right-to-left languages such as Japanese.
37
+ *
38
+ * "<ltr|rtl>"
39
+ */
40
+ getMessage(
41
+ messageName: "@@bidi_dir",
42
+ substitutions?: string | string[],
43
+ options?: GetMessageOptions,
44
+ ): string;
45
+ /**
46
+ * If the @@bidi_dir is "ltr", then this is "rtl"; otherwise, it's "ltr".
47
+ *
48
+ * "<rtl|ltr>"
49
+ */
50
+ getMessage(
51
+ messageName: "@@bidi_reversed_dir",
52
+ substitutions?: string | string[],
53
+ options?: GetMessageOptions,
54
+ ): string;
55
+ /**
56
+ * If the @@bidi_dir is "ltr", then this is "left"; otherwise, it's "right".
57
+ *
58
+ * "<left|right>"
59
+ */
60
+ getMessage(
61
+ messageName: "@@bidi_start_edge",
62
+ substitutions?: string | string[],
63
+ options?: GetMessageOptions,
64
+ ): string;
65
+ /**
66
+ * If the @@bidi_dir is "ltr", then this is "right"; otherwise, it's "left".
67
+ *
68
+ * "<right|left>"
69
+ */
70
+ getMessage(
71
+ messageName: "@@bidi_end_edge",
72
+ substitutions?: string | string[],
73
+ options?: GetMessageOptions,
74
+ ): string;
75
+ getMessage(
76
+ messageName: "@@extension_id" | "@@ui_locale" | "@@bidi_dir" | "@@bidi_reversed_dir" | "@@bidi_start_edge" | "@@bidi_end_edge",
77
+ substitutions?: string | string[],
78
+ options?: GetMessageOptions,
79
+ ): string;
80
+ }
81
+ }
@@ -1,21 +1,22 @@
1
- // Generated by wxt
2
- export {}
3
- declare global {
4
- const ContentScriptContext: (typeof import('wxt/client'))['ContentScriptContext']
5
- const InvalidMatchPattern: (typeof import('wxt/sandbox'))['InvalidMatchPattern']
6
- const MatchPattern: (typeof import('wxt/sandbox'))['MatchPattern']
7
- const browser: (typeof import('wxt/browser'))['browser']
8
- const createIframeUi: (typeof import('wxt/client'))['createIframeUi']
9
- const createIntegratedUi: (typeof import('wxt/client'))['createIntegratedUi']
10
- const createShadowRootUi: (typeof import('wxt/client'))['createShadowRootUi']
11
- const defineAppConfig: (typeof import('wxt/sandbox'))['defineAppConfig']
12
- const defineBackground: (typeof import('wxt/sandbox'))['defineBackground']
13
- const defineConfig: (typeof import('wxt'))['defineConfig']
14
- const defineContentScript: (typeof import('wxt/sandbox'))['defineContentScript']
15
- const defineUnlistedScript: (typeof import('wxt/sandbox'))['defineUnlistedScript']
16
- const defineWxtPlugin: (typeof import('wxt/sandbox'))['defineWxtPlugin']
17
- const fakeBrowser: (typeof import('wxt/testing'))['fakeBrowser']
18
- const injectScript: (typeof import('wxt/client'))['injectScript']
19
- const storage: (typeof import('wxt/storage'))['storage']
20
- const useAppConfig: (typeof import('wxt/client'))['useAppConfig']
21
- }
1
+ // Generated by wxt
2
+ export {}
3
+ declare global {
4
+ const ContentScriptContext: typeof import('wxt/client')['ContentScriptContext']
5
+ const InvalidMatchPattern: typeof import('wxt/sandbox')['InvalidMatchPattern']
6
+ const MatchPattern: typeof import('wxt/sandbox')['MatchPattern']
7
+ const MigrationError: typeof import('wxt/storage')['MigrationError']
8
+ const browser: typeof import('wxt/browser/chrome')['browser']
9
+ const createIframeUi: typeof import('wxt/client')['createIframeUi']
10
+ const createIntegratedUi: typeof import('wxt/client')['createIntegratedUi']
11
+ const createShadowRootUi: typeof import('wxt/client')['createShadowRootUi']
12
+ const defineAppConfig: typeof import('wxt/sandbox')['defineAppConfig']
13
+ const defineBackground: typeof import('wxt/sandbox')['defineBackground']
14
+ const defineConfig: typeof import('wxt')['defineConfig']
15
+ const defineContentScript: typeof import('wxt/sandbox')['defineContentScript']
16
+ const defineUnlistedScript: typeof import('wxt/sandbox')['defineUnlistedScript']
17
+ const defineWxtPlugin: typeof import('wxt/sandbox')['defineWxtPlugin']
18
+ const fakeBrowser: typeof import('wxt/testing')['fakeBrowser']
19
+ const injectScript: typeof import('wxt/client')['injectScript']
20
+ const storage: typeof import('wxt/storage')['storage']
21
+ const useAppConfig: typeof import('wxt/client')['useAppConfig']
22
+ }
@@ -1,15 +1,16 @@
1
- // Generated by wxt
2
- import 'wxt/browser'
3
-
4
- declare module 'wxt/browser' {
5
- export type PublicPath =
6
- | '/background.js'
7
- | '/content-scripts/content.js'
8
- | '/popup.html'
9
- | '/vite.svg'
10
- type HtmlPublicPath = Extract<PublicPath, `${string}.html`>
11
- export interface WxtRuntime {
12
- getURL(path: PublicPath): string
13
- getURL(path: `${HtmlPublicPath}${string}`): string
14
- }
15
- }
1
+ // Generated by wxt
2
+ import "wxt/browser";
3
+
4
+ declare module "wxt/browser" {
5
+ export type PublicPath =
6
+ | "/"
7
+ | "/background.js"
8
+ | "/content-scripts/content.js"
9
+ | "/popup.html"
10
+ | "/vite.svg"
11
+ type HtmlPublicPath = Extract<PublicPath, `${string}.html`>
12
+ export interface WxtRuntime {
13
+ getURL(path: PublicPath): string;
14
+ getURL(path: `${HtmlPublicPath}${string}`): string;
15
+ }
16
+ }
@@ -1,6 +1,7 @@
1
- // Generated by wxt
2
- /// <reference types="wxt/vite-builder-env" />
3
- /// <reference types="./types/paths.d.ts" />
4
- /// <reference types="./types/i18n.d.ts" />
5
- /// <reference types="./types/globals.d.ts" />
6
- /// <reference types="./types/imports.d.ts" />
1
+ // Generated by wxt
2
+ /// <reference types="wxt/vite-builder-env" />
3
+ /// <reference types="./types/paths.d.ts" />
4
+ /// <reference types="./types/i18n.d.ts" />
5
+ /// <reference types="./types/globals.d.ts" />
6
+ /// <reference types="@types/chrome" />
7
+ /// <reference types="./types/imports.d.ts" />
@@ -1,7 +1,6 @@
1
1
  import { CSSProperties, ReactNode } from 'react'
2
2
  import { createRoot } from 'react-dom/client'
3
3
  import { forEach, isFunction } from 'lodash-es'
4
- import { Nullable } from '1k-types'
5
4
  import { AppContext } from '@/shared/components'
6
5
  import { classNameSpace } from '@/entrypoints/content/constants'
7
6
 
@@ -11,12 +10,12 @@ export enum insertAppStatus {
11
10
  root_existed
12
11
  }
13
12
  export interface insertAppResultType {
14
- rootEle: Nullable<HTMLElement>
13
+ rootEle: HTMLElement | undefined | null
15
14
  result: boolean
16
15
  status: insertAppStatus
17
16
  }
18
17
  export function insertApp<T extends HTMLElement>(
19
- target: Nullable<T>,
18
+ target: T | null | undefined,
20
19
  option: {
21
20
  insert?: (rootEle: HTMLElement, target: T) => void
22
21
  reactNode: ReactNode
@@ -1,12 +1,10 @@
1
- import { Common } from './modules'
2
-
3
- export default defineContentScript({
4
- run_at: 'document_start',
5
- matches: [
6
- 'https://developer.chrome.com/docs/extensions/*',
7
- 'https://developer.chrome.com/docs/webstore/*'
8
- ],
9
- main: () => {
10
- Common.insert()
11
- }
12
- })
1
+ import { Common } from './modules'
2
+ import { CONTENT_MATCHES } from '@/shared/content'
3
+
4
+ export default defineContentScript({
5
+ run_at: 'document_idle',
6
+ matches: CONTENT_MATCHES,
7
+ main: () => {
8
+ Common.insert()
9
+ }
10
+ })
@@ -1,14 +1,14 @@
1
- import { StrictMode } from 'react'
2
- import { createRoot } from 'react-dom/client'
3
- import { AppContext } from '@/shared/components'
4
- import { GlobalStyle } from '@/shared/styles'
5
- import Popup from './popup.container'
6
-
7
- createRoot(document.getElementById('root') as HTMLElement).render(
8
- <StrictMode>
9
- <AppContext>
10
- <GlobalStyle />
11
- <Popup />
12
- </AppContext>
13
- </StrictMode>
14
- )
1
+ import { StrictMode } from 'react'
2
+ import { createRoot } from 'react-dom/client'
3
+ import { AppContext } from '@/shared/components'
4
+ import { GlobalStyle } from '@/shared/styles'
5
+ import Popup from './popup'
6
+
7
+ createRoot(document.getElementById('root') as HTMLElement).render(
8
+ <StrictMode>
9
+ <AppContext>
10
+ <GlobalStyle />
11
+ <Popup />
12
+ </AppContext>
13
+ </StrictMode>
14
+ )
@@ -1,3 +1,3 @@
1
- export default function Home() {
2
- return <div>home</div>
3
- }
1
+ export default function Home() {
2
+ return <div>home</div>
3
+ }