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,81 +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: "@@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
|
+
// 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,20 +1,20 @@
|
|
|
1
|
-
// Generated by wxt
|
|
2
|
-
// Types for the #import virtual module
|
|
3
|
-
declare module '#imports' {
|
|
4
|
-
export { browser, Browser } from 'wxt/browser';
|
|
5
|
-
export { storage, StorageArea, WxtStorage, WxtStorageItem, StorageItemKey, StorageAreaChanges, MigrationError } from 'wxt/utils/storage';
|
|
6
|
-
export { useAppConfig } from 'wxt/utils/app-config';
|
|
7
|
-
export { ContentScriptContext, WxtWindowEventMap } from 'wxt/utils/content-script-context';
|
|
8
|
-
export { createIframeUi, IframeContentScriptUi, IframeContentScriptUiOptions } from 'wxt/utils/content-script-ui/iframe';
|
|
9
|
-
export { createIntegratedUi, IntegratedContentScriptUi, IntegratedContentScriptUiOptions } from 'wxt/utils/content-script-ui/integrated';
|
|
10
|
-
export { createShadowRootUi, ShadowRootContentScriptUi, ShadowRootContentScriptUiOptions } from 'wxt/utils/content-script-ui/shadow-root';
|
|
11
|
-
export { ContentScriptUi, ContentScriptUiOptions, ContentScriptOverlayAlignment, ContentScriptAppendMode, ContentScriptInlinePositioningOptions, ContentScriptOverlayPositioningOptions, ContentScriptModalPositioningOptions, ContentScriptPositioningOptions, ContentScriptAnchoredOptions, AutoMountOptions, StopAutoMount, AutoMount } from 'wxt/utils/content-script-ui/types';
|
|
12
|
-
export { defineAppConfig, WxtAppConfig } from 'wxt/utils/define-app-config';
|
|
13
|
-
export { defineBackground } from 'wxt/utils/define-background';
|
|
14
|
-
export { defineContentScript } from 'wxt/utils/define-content-script';
|
|
15
|
-
export { defineUnlistedScript } from 'wxt/utils/define-unlisted-script';
|
|
16
|
-
export { defineWxtPlugin } from 'wxt/utils/define-wxt-plugin';
|
|
17
|
-
export { injectScript, ScriptPublicPath, InjectScriptOptions } from 'wxt/utils/inject-script';
|
|
18
|
-
export { InvalidMatchPattern, MatchPattern } from 'wxt/utils/match-patterns';
|
|
19
|
-
export { fakeBrowser } from 'wxt/testing';
|
|
20
|
-
}
|
|
1
|
+
// Generated by wxt
|
|
2
|
+
// Types for the #import virtual module
|
|
3
|
+
declare module '#imports' {
|
|
4
|
+
export { browser, Browser } from 'wxt/browser';
|
|
5
|
+
export { storage, StorageArea, WxtStorage, WxtStorageItem, StorageItemKey, StorageAreaChanges, MigrationError } from 'wxt/utils/storage';
|
|
6
|
+
export { useAppConfig } from 'wxt/utils/app-config';
|
|
7
|
+
export { ContentScriptContext, WxtWindowEventMap } from 'wxt/utils/content-script-context';
|
|
8
|
+
export { createIframeUi, IframeContentScriptUi, IframeContentScriptUiOptions } from 'wxt/utils/content-script-ui/iframe';
|
|
9
|
+
export { createIntegratedUi, IntegratedContentScriptUi, IntegratedContentScriptUiOptions } from 'wxt/utils/content-script-ui/integrated';
|
|
10
|
+
export { createShadowRootUi, ShadowRootContentScriptUi, ShadowRootContentScriptUiOptions } from 'wxt/utils/content-script-ui/shadow-root';
|
|
11
|
+
export { ContentScriptUi, ContentScriptUiOptions, ContentScriptOverlayAlignment, ContentScriptAppendMode, ContentScriptInlinePositioningOptions, ContentScriptOverlayPositioningOptions, ContentScriptModalPositioningOptions, ContentScriptPositioningOptions, ContentScriptAnchoredOptions, AutoMountOptions, StopAutoMount, AutoMount } from 'wxt/utils/content-script-ui/types';
|
|
12
|
+
export { defineAppConfig, WxtAppConfig } from 'wxt/utils/define-app-config';
|
|
13
|
+
export { defineBackground } from 'wxt/utils/define-background';
|
|
14
|
+
export { defineContentScript } from 'wxt/utils/define-content-script';
|
|
15
|
+
export { defineUnlistedScript } from 'wxt/utils/define-unlisted-script';
|
|
16
|
+
export { defineWxtPlugin } from 'wxt/utils/define-wxt-plugin';
|
|
17
|
+
export { injectScript, ScriptPublicPath, InjectScriptOptions } from 'wxt/utils/inject-script';
|
|
18
|
+
export { InvalidMatchPattern, MatchPattern } from 'wxt/utils/match-patterns';
|
|
19
|
+
export { fakeBrowser } from 'wxt/testing';
|
|
20
|
+
}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
// Generated by wxt
|
|
2
|
-
export {}
|
|
3
|
-
declare global {
|
|
4
|
-
const ContentScriptContext: typeof import('wxt/utils/content-script-context')
|
|
5
|
-
const InvalidMatchPattern: typeof import('wxt/utils/match-patterns')
|
|
6
|
-
const MatchPattern: typeof import('wxt/utils/match-patterns')
|
|
7
|
-
const browser: typeof import('wxt/browser')
|
|
8
|
-
const createIframeUi: typeof import('wxt/utils/content-script-ui/iframe')
|
|
9
|
-
const createIntegratedUi: typeof import('wxt/utils/content-script-ui/integrated')
|
|
10
|
-
const createShadowRootUi: typeof import('wxt/utils/content-script-ui/shadow-root')
|
|
11
|
-
const defineAppConfig: typeof import('wxt/utils/define-app-config')
|
|
12
|
-
const defineBackground: typeof import('wxt/utils/define-background')
|
|
13
|
-
const defineContentScript: typeof import('wxt/utils/define-content-script')
|
|
14
|
-
const defineUnlistedScript: typeof import('wxt/utils/define-unlisted-script')
|
|
15
|
-
const defineWxtPlugin: typeof import('wxt/utils/define-wxt-plugin')
|
|
16
|
-
const fakeBrowser: typeof import('wxt/testing')
|
|
17
|
-
const injectScript: typeof import('wxt/utils/inject-script')
|
|
18
|
-
const storage: typeof import('wxt/utils/storage')
|
|
19
|
-
const useAppConfig: typeof import('wxt/utils/app-config')
|
|
20
|
-
}
|
|
21
|
-
// for type re-export
|
|
22
|
-
declare global {
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
export type { Browser } from 'wxt/browser'
|
|
25
|
-
import('wxt/browser')
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
export type { StorageArea, WxtStorage, WxtStorageItem, StorageItemKey, StorageAreaChanges, MigrationError } from 'wxt/utils/storage'
|
|
28
|
-
import('wxt/utils/storage')
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
export type { WxtWindowEventMap } from 'wxt/utils/content-script-context'
|
|
31
|
-
import('wxt/utils/content-script-context')
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
export type { IframeContentScriptUi, IframeContentScriptUiOptions } from 'wxt/utils/content-script-ui/iframe'
|
|
34
|
-
import('wxt/utils/content-script-ui/iframe')
|
|
35
|
-
// @ts-ignore
|
|
36
|
-
export type { IntegratedContentScriptUi, IntegratedContentScriptUiOptions } from 'wxt/utils/content-script-ui/integrated'
|
|
37
|
-
import('wxt/utils/content-script-ui/integrated')
|
|
38
|
-
// @ts-ignore
|
|
39
|
-
export type { ShadowRootContentScriptUi, ShadowRootContentScriptUiOptions } from 'wxt/utils/content-script-ui/shadow-root'
|
|
40
|
-
import('wxt/utils/content-script-ui/shadow-root')
|
|
41
|
-
// @ts-ignore
|
|
42
|
-
export type { ContentScriptUi, ContentScriptUiOptions, ContentScriptOverlayAlignment, ContentScriptAppendMode, ContentScriptInlinePositioningOptions, ContentScriptOverlayPositioningOptions, ContentScriptModalPositioningOptions, ContentScriptPositioningOptions, ContentScriptAnchoredOptions, AutoMountOptions, StopAutoMount, AutoMount } from 'wxt/utils/content-script-ui/types'
|
|
43
|
-
import('wxt/utils/content-script-ui/types')
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
export type { WxtAppConfig } from 'wxt/utils/define-app-config'
|
|
46
|
-
import('wxt/utils/define-app-config')
|
|
47
|
-
// @ts-ignore
|
|
48
|
-
export type { ScriptPublicPath, InjectScriptOptions } from 'wxt/utils/inject-script'
|
|
49
|
-
import('wxt/utils/inject-script')
|
|
50
|
-
}
|
|
1
|
+
// Generated by wxt
|
|
2
|
+
export {}
|
|
3
|
+
declare global {
|
|
4
|
+
const ContentScriptContext: typeof import('wxt/utils/content-script-context').ContentScriptContext
|
|
5
|
+
const InvalidMatchPattern: typeof import('wxt/utils/match-patterns').InvalidMatchPattern
|
|
6
|
+
const MatchPattern: typeof import('wxt/utils/match-patterns').MatchPattern
|
|
7
|
+
const browser: typeof import('wxt/browser').browser
|
|
8
|
+
const createIframeUi: typeof import('wxt/utils/content-script-ui/iframe').createIframeUi
|
|
9
|
+
const createIntegratedUi: typeof import('wxt/utils/content-script-ui/integrated').createIntegratedUi
|
|
10
|
+
const createShadowRootUi: typeof import('wxt/utils/content-script-ui/shadow-root').createShadowRootUi
|
|
11
|
+
const defineAppConfig: typeof import('wxt/utils/define-app-config').defineAppConfig
|
|
12
|
+
const defineBackground: typeof import('wxt/utils/define-background').defineBackground
|
|
13
|
+
const defineContentScript: typeof import('wxt/utils/define-content-script').defineContentScript
|
|
14
|
+
const defineUnlistedScript: typeof import('wxt/utils/define-unlisted-script').defineUnlistedScript
|
|
15
|
+
const defineWxtPlugin: typeof import('wxt/utils/define-wxt-plugin').defineWxtPlugin
|
|
16
|
+
const fakeBrowser: typeof import('wxt/testing').fakeBrowser
|
|
17
|
+
const injectScript: typeof import('wxt/utils/inject-script').injectScript
|
|
18
|
+
const storage: typeof import('wxt/utils/storage').storage
|
|
19
|
+
const useAppConfig: typeof import('wxt/utils/app-config').useAppConfig
|
|
20
|
+
}
|
|
21
|
+
// for type re-export
|
|
22
|
+
declare global {
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
export type { Browser } from 'wxt/browser'
|
|
25
|
+
import('wxt/browser')
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
export type { StorageArea, WxtStorage, WxtStorageItem, StorageItemKey, StorageAreaChanges, MigrationError } from 'wxt/utils/storage'
|
|
28
|
+
import('wxt/utils/storage')
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
export type { WxtWindowEventMap } from 'wxt/utils/content-script-context'
|
|
31
|
+
import('wxt/utils/content-script-context')
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
export type { IframeContentScriptUi, IframeContentScriptUiOptions } from 'wxt/utils/content-script-ui/iframe'
|
|
34
|
+
import('wxt/utils/content-script-ui/iframe')
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
export type { IntegratedContentScriptUi, IntegratedContentScriptUiOptions } from 'wxt/utils/content-script-ui/integrated'
|
|
37
|
+
import('wxt/utils/content-script-ui/integrated')
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
export type { ShadowRootContentScriptUi, ShadowRootContentScriptUiOptions } from 'wxt/utils/content-script-ui/shadow-root'
|
|
40
|
+
import('wxt/utils/content-script-ui/shadow-root')
|
|
41
|
+
// @ts-ignore
|
|
42
|
+
export type { ContentScriptUi, ContentScriptUiOptions, ContentScriptOverlayAlignment, ContentScriptAppendMode, ContentScriptInlinePositioningOptions, ContentScriptOverlayPositioningOptions, ContentScriptModalPositioningOptions, ContentScriptPositioningOptions, ContentScriptAnchoredOptions, AutoMountOptions, StopAutoMount, AutoMount } from 'wxt/utils/content-script-ui/types'
|
|
43
|
+
import('wxt/utils/content-script-ui/types')
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
export type { WxtAppConfig } from 'wxt/utils/define-app-config'
|
|
46
|
+
import('wxt/utils/define-app-config')
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
export type { ScriptPublicPath, InjectScriptOptions } from 'wxt/utils/inject-script'
|
|
49
|
+
import('wxt/utils/inject-script')
|
|
50
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
// Generated by wxt
|
|
2
|
-
import "wxt/browser";
|
|
3
|
-
|
|
4
|
-
declare module "wxt/browser" {
|
|
5
|
-
export type PublicPath =
|
|
6
|
-
| ""
|
|
7
|
-
| "/"
|
|
8
|
-
| "/background.js"
|
|
9
|
-
| "/content-scripts/content.js"
|
|
10
|
-
| "/popup.html"
|
|
11
|
-
| "/vite.svg"
|
|
12
|
-
type HtmlPublicPath = Extract<PublicPath, `${string}.html`>
|
|
13
|
-
export interface WxtRuntime {
|
|
14
|
-
getURL(path: PublicPath): string;
|
|
15
|
-
getURL(path: `${HtmlPublicPath}${string}`): string;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
// Generated by wxt
|
|
2
|
+
import "wxt/browser";
|
|
3
|
+
|
|
4
|
+
declare module "wxt/browser" {
|
|
5
|
+
export type PublicPath =
|
|
6
|
+
| ""
|
|
7
|
+
| "/"
|
|
8
|
+
| "/background.js"
|
|
9
|
+
| "/content-scripts/content.js"
|
|
10
|
+
| "/popup.html"
|
|
11
|
+
| "/vite.svg"
|
|
12
|
+
type HtmlPublicPath = Extract<PublicPath, `${string}.html`>
|
|
13
|
+
export interface WxtRuntime {
|
|
14
|
+
getURL(path: PublicPath): string;
|
|
15
|
+
getURL(path: `${HtmlPublicPath}${string}`): string;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// Generated by wxt
|
|
2
|
-
/// <reference types="wxt/vite-builder-env" />
|
|
3
|
-
/// <reference path="./types/paths.d.ts" />
|
|
4
|
-
/// <reference path="./types/i18n.d.ts" />
|
|
5
|
-
/// <reference path="./types/globals.d.ts" />
|
|
6
|
-
/// <reference path="./types/imports-module.d.ts" />
|
|
7
|
-
/// <reference path="./types/imports.d.ts" />
|
|
1
|
+
// Generated by wxt
|
|
2
|
+
/// <reference types="wxt/vite-builder-env" />
|
|
3
|
+
/// <reference path="./types/paths.d.ts" />
|
|
4
|
+
/// <reference path="./types/i18n.d.ts" />
|
|
5
|
+
/// <reference path="./types/globals.d.ts" />
|
|
6
|
+
/// <reference path="./types/imports-module.d.ts" />
|
|
7
|
+
/// <reference path="./types/imports.d.ts" />
|
|
@@ -2,6 +2,7 @@ import { StrictMode } from 'react'
|
|
|
2
2
|
import { createRoot } from 'react-dom/client'
|
|
3
3
|
import { AppContext } from '@/shared/components'
|
|
4
4
|
import Popup from './popup'
|
|
5
|
+
import '@/shared/styles/theme.css'
|
|
5
6
|
|
|
6
7
|
createRoot(document.getElementById('root') as HTMLElement).render(
|
|
7
8
|
<StrictMode>
|
|
@@ -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.1",
|
|
30
28
|
"@tanstack/react-query": "5.51.15",
|
|
31
29
|
"@webext-core/messaging": "2.2.0",
|
|
32
30
|
"axios": "1.7.9",
|
|
@@ -36,6 +34,7 @@
|
|
|
36
34
|
"qs": "6.11.2",
|
|
37
35
|
"react": "18.3.1",
|
|
38
36
|
"react-dom": "18.3.1",
|
|
37
|
+
"tailwindcss": "4.1.4",
|
|
39
38
|
"type-fest": "4.33.0",
|
|
40
39
|
"zustand": "5.0.3"
|
|
41
40
|
},
|
|
@@ -43,8 +42,8 @@
|
|
|
43
42
|
"@commitlint/cli": "17.6.1",
|
|
44
43
|
"@commitlint/config-conventional": "17.6.1",
|
|
45
44
|
"@commitlint/cz-commitlint": "17.5.0",
|
|
46
|
-
"@emotion/babel-plugin": "11.13.5",
|
|
47
45
|
"@eslint/js": "9.15.0",
|
|
46
|
+
"@tailwindcss/vite": "4.1.18",
|
|
48
47
|
"@types/chrome": "0.0.254",
|
|
49
48
|
"@types/node": "18.16.0",
|
|
50
49
|
"@types/qs": "6.9.7",
|
|
@@ -61,7 +60,7 @@
|
|
|
61
60
|
"eslint-plugin-react-hooks": "5.1.0",
|
|
62
61
|
"globals": "15.12.0",
|
|
63
62
|
"husky": "9.1.6",
|
|
64
|
-
"inquirer": "
|
|
63
|
+
"inquirer": "8.1.2",
|
|
65
64
|
"postcss": "8.4.31",
|
|
66
65
|
"postcss-import": "15.1.0",
|
|
67
66
|
"postcss-nesting": "11.2.2",
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react'
|
|
2
2
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
|
3
|
-
import { Global, ThemeProvider } from '@emotion/react'
|
|
4
|
-
import { createGlobalCss, theme } from '@/shared/styles'
|
|
5
3
|
|
|
6
4
|
const queryClient = new QueryClient()
|
|
7
5
|
|
|
8
6
|
const AppContext: FunctionComponent<{ children: ReactNode; classNameSpace?: string }> = props => {
|
|
9
|
-
return
|
|
10
|
-
<ThemeProvider theme={theme}>
|
|
11
|
-
<QueryClientProvider client={queryClient}>
|
|
12
|
-
<Global styles={createGlobalCss(props.classNameSpace)} />
|
|
13
|
-
{props.children}
|
|
14
|
-
</QueryClientProvider>
|
|
15
|
-
</ThemeProvider>
|
|
16
|
-
)
|
|
7
|
+
return <QueryClientProvider client={queryClient}>{props.children}</QueryClientProvider>
|
|
17
8
|
}
|
|
18
9
|
|
|
19
10
|
export default AppContext
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
/// <reference types="vite/client" />
|
|
2
2
|
/// <reference types="./.wxt/wxt.d.ts" />
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
20
|
-
|
|
10
|
+
interface ImportMeta {
|
|
11
|
+
readonly env: ImportMetaEnv
|
|
21
12
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineConfig, UserManifestFn } from 'wxt'
|
|
2
2
|
import react from '@vitejs/plugin-react'
|
|
3
3
|
import svgr from 'vite-plugin-svgr'
|
|
4
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
4
5
|
import pkgJson from './package.json'
|
|
5
6
|
|
|
6
7
|
const manifest: UserManifestFn = () => {
|
|
@@ -29,7 +30,7 @@ export default defineConfig({
|
|
|
29
30
|
runner: { disabled: true },
|
|
30
31
|
imports: { eslintrc: { enabled: 9 } },
|
|
31
32
|
vite: ({ mode }) => ({
|
|
32
|
-
plugins: [svgr(), react(
|
|
33
|
+
plugins: [tailwindcss(), svgr(), react()] as any,
|
|
33
34
|
resolve: {
|
|
34
35
|
alias: {
|
|
35
36
|
'@': __dirname
|
|
@@ -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
|