@quicktvui/naddons 1.0.0-rc.0 → 1.0.0-rc.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 (32) hide show
  1. package/dist/components/GridTabs/GridTabs.vue.d.ts +56 -2
  2. package/dist/components/GridTabs/useGridTabs.d.ts +5 -1
  3. package/dist/components/HsvBackground/HsvBackground.vue.d.ts +7 -19
  4. package/dist/components/HsvBackground/index.d.ts +9 -2
  5. package/dist/components/NaButton/NaButton.vue.d.ts +24 -0
  6. package/dist/components/NaButton/NaButtonBase.vue.d.ts +60 -0
  7. package/dist/components/NaButton/index.d.ts +13 -0
  8. package/dist/components/NaCheckbox/NaCheckbox.vue.d.ts +108 -0
  9. package/dist/components/NaCheckbox/index.d.ts +13 -0
  10. package/dist/components/NaCheckboxGroup/NaCheckboxGroup.vue.d.ts +103 -0
  11. package/dist/components/NaCheckboxGroup/index.d.ts +13 -0
  12. package/dist/components/NaInputView/NaInputView.vue.d.ts +42 -0
  13. package/dist/components/NaInputView/NaInputViewBase.vue.d.ts +46 -0
  14. package/dist/components/NaInputView/index.d.ts +13 -0
  15. package/dist/components/NaRadioGroup/NaRadioGroup.vue.d.ts +103 -0
  16. package/dist/components/NaRadioGroup/index.d.ts +13 -0
  17. package/dist/components/NaSettingSwitch/NaSettingSwitch.vue.d.ts +111 -0
  18. package/dist/components/NaSettingSwitch/index.d.ts +6 -0
  19. package/dist/components/NaSwitcher/NaSwitcher.vue.d.ts +50 -0
  20. package/dist/components/NaSwitcher/index.d.ts +13 -0
  21. package/dist/components/SvgImage/SvgImage.vue.d.ts +26 -0
  22. package/dist/components/SvgImage/index.d.ts +13 -0
  23. package/dist/core/AddonProvider.d.ts +14 -1
  24. package/dist/index.d.ts +33 -1
  25. package/dist/modules/AddonEnvModule.d.ts +4 -0
  26. package/dist/modules/ExtraUIConfigModule.d.ts +7 -0
  27. package/dist/modules/GridTabsConfigModule.d.ts +7 -0
  28. package/dist/naddons.cjs.js +1 -1
  29. package/dist/naddons.es.js +1528 -622
  30. package/dist/style.css +1 -0
  31. package/dist/types/index.d.ts +50 -0
  32. package/package.json +1 -1
@@ -0,0 +1,103 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ modelValue: {
3
+ type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
4
+ default: string;
5
+ };
6
+ options: {
7
+ type: () => Array<{
8
+ label: string;
9
+ value: any;
10
+ disabled?: boolean;
11
+ props?: any;
12
+ }>;
13
+ default: () => never[];
14
+ };
15
+ direction: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ itemWidth: {
20
+ type: NumberConstructor;
21
+ default: undefined;
22
+ };
23
+ itemHeight: {
24
+ type: NumberConstructor;
25
+ default: undefined;
26
+ };
27
+ itemGap: {
28
+ type: NumberConstructor;
29
+ default: number;
30
+ };
31
+ gravity: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ showBackground: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ }>, {
40
+ groupStyle: import("vue").ComputedRef<{
41
+ display: string;
42
+ flexDirection: any;
43
+ alignItems: string;
44
+ }>;
45
+ getItemStyle: (item: any, index: number) => any;
46
+ onItemClick: (item: any) => void;
47
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
48
+ modelValue: {
49
+ type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
50
+ default: string;
51
+ };
52
+ options: {
53
+ type: () => Array<{
54
+ label: string;
55
+ value: any;
56
+ disabled?: boolean;
57
+ props?: any;
58
+ }>;
59
+ default: () => never[];
60
+ };
61
+ direction: {
62
+ type: StringConstructor;
63
+ default: string;
64
+ };
65
+ itemWidth: {
66
+ type: NumberConstructor;
67
+ default: undefined;
68
+ };
69
+ itemHeight: {
70
+ type: NumberConstructor;
71
+ default: undefined;
72
+ };
73
+ itemGap: {
74
+ type: NumberConstructor;
75
+ default: number;
76
+ };
77
+ gravity: {
78
+ type: StringConstructor;
79
+ default: string;
80
+ };
81
+ showBackground: {
82
+ type: BooleanConstructor;
83
+ default: boolean;
84
+ };
85
+ }>> & Readonly<{
86
+ onChange?: ((...args: any[]) => any) | undefined;
87
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
88
+ }>, {
89
+ gravity: string;
90
+ showBackground: boolean;
91
+ modelValue: string | number | boolean;
92
+ options: {
93
+ label: string;
94
+ value: any;
95
+ disabled?: boolean | undefined;
96
+ props?: any;
97
+ }[];
98
+ direction: string;
99
+ itemWidth: number;
100
+ itemHeight: number;
101
+ itemGap: number;
102
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
103
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import NaRadioGroup from './NaRadioGroup.vue';
3
+ export declare const NaRadioGroupPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { NaRadioGroup };
7
+ export default NaRadioGroupPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ NaRadioGroup: typeof NaRadioGroup;
11
+ 'qt-na-radio-group': typeof NaRadioGroup;
12
+ }
13
+ }
@@ -0,0 +1,111 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ title: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ subtitle: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ modelValue: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ textOn: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ textOff: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ titleTextSize: {
23
+ type: NumberConstructor;
24
+ default: number;
25
+ };
26
+ subtitleTextSize: {
27
+ type: NumberConstructor;
28
+ default: number;
29
+ };
30
+ stateTextSize: {
31
+ type: NumberConstructor;
32
+ default: number;
33
+ };
34
+ disabled: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ width: {
39
+ type: (NumberConstructor | StringConstructor)[];
40
+ default: number;
41
+ };
42
+ height: {
43
+ type: (NumberConstructor | StringConstructor)[];
44
+ default: number;
45
+ };
46
+ }>, {
47
+ checked: import("vue").Ref<boolean, boolean>;
48
+ handleCheckedChange: (e: any) => void;
49
+ mergedStyle: import("vue").ComputedRef<any>;
50
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
51
+ title: {
52
+ type: StringConstructor;
53
+ default: string;
54
+ };
55
+ subtitle: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
59
+ modelValue: {
60
+ type: BooleanConstructor;
61
+ default: boolean;
62
+ };
63
+ textOn: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
67
+ textOff: {
68
+ type: StringConstructor;
69
+ default: string;
70
+ };
71
+ titleTextSize: {
72
+ type: NumberConstructor;
73
+ default: number;
74
+ };
75
+ subtitleTextSize: {
76
+ type: NumberConstructor;
77
+ default: number;
78
+ };
79
+ stateTextSize: {
80
+ type: NumberConstructor;
81
+ default: number;
82
+ };
83
+ disabled: {
84
+ type: BooleanConstructor;
85
+ default: boolean;
86
+ };
87
+ width: {
88
+ type: (NumberConstructor | StringConstructor)[];
89
+ default: number;
90
+ };
91
+ height: {
92
+ type: (NumberConstructor | StringConstructor)[];
93
+ default: number;
94
+ };
95
+ }>> & Readonly<{
96
+ onChange?: ((...args: any[]) => any) | undefined;
97
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
98
+ }>, {
99
+ title: string;
100
+ disabled: boolean;
101
+ width: string | number;
102
+ height: string | number;
103
+ modelValue: boolean;
104
+ textOn: string;
105
+ textOff: string;
106
+ subtitle: string;
107
+ titleTextSize: number;
108
+ subtitleTextSize: number;
109
+ stateTextSize: number;
110
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
111
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { App } from 'vue';
2
+ import NaSettingSwitch from './NaSettingSwitch.vue';
3
+ export declare const NaSettingSwitchPlugin: {
4
+ install(app: App): void;
5
+ };
6
+ export { NaSettingSwitch };
@@ -0,0 +1,50 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ checked?: boolean | undefined;
3
+ disabled?: boolean | undefined;
4
+ title?: string | undefined;
5
+ textOn?: string | undefined;
6
+ textOff?: string | undefined;
7
+ subtitle?: string | undefined;
8
+ subtitleColor?: string | undefined;
9
+ titleColor?: string | undefined;
10
+ focusTitleColor?: string | undefined;
11
+ titleTextSize?: any;
12
+ subtitleTextSize?: any;
13
+ stateTextSize?: any;
14
+ }>>, {
15
+ getNativeNode: () => any;
16
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
+ onCheckedChange: (payload?: any) => void;
18
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
19
+ checked?: boolean | undefined;
20
+ disabled?: boolean | undefined;
21
+ title?: string | undefined;
22
+ textOn?: string | undefined;
23
+ textOff?: string | undefined;
24
+ subtitle?: string | undefined;
25
+ subtitleColor?: string | undefined;
26
+ titleColor?: string | undefined;
27
+ focusTitleColor?: string | undefined;
28
+ titleTextSize?: any;
29
+ subtitleTextSize?: any;
30
+ stateTextSize?: any;
31
+ }>>> & Readonly<{
32
+ onOnCheckedChange?: ((payload?: any) => any) | undefined;
33
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
34
+ default?(_: {}): any;
35
+ }>;
36
+ export default _default;
37
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
38
+ type __VLS_TypePropsToRuntimeProps<T> = {
39
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
40
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
41
+ } : {
42
+ type: import('vue').PropType<T[K]>;
43
+ required: true;
44
+ };
45
+ };
46
+ type __VLS_WithTemplateSlots<T, S> = T & {
47
+ new (): {
48
+ $slots: S;
49
+ };
50
+ };
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import NaSwitcher from './NaSwitcher.vue';
3
+ export declare const NaSwitcherPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { NaSwitcher };
7
+ export default NaSwitcherPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ NaSwitcher: typeof NaSwitcher;
11
+ 'qt-na-switcher': typeof NaSwitcher;
12
+ }
13
+ }
@@ -0,0 +1,26 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ src?: string | undefined;
3
+ tintColor?: string | undefined;
4
+ }>>, {
5
+ getNativeNode: () => any;
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
7
+ src?: string | undefined;
8
+ tintColor?: string | undefined;
9
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
10
+ default?(_: {}): any;
11
+ }>;
12
+ export default _default;
13
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
+ type __VLS_TypePropsToRuntimeProps<T> = {
15
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
16
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
+ } : {
18
+ type: import('vue').PropType<T[K]>;
19
+ required: true;
20
+ };
21
+ };
22
+ type __VLS_WithTemplateSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import SvgImage from './SvgImage.vue';
3
+ export declare const SvgImagePlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { SvgImage };
7
+ export default SvgImagePlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ SvgImage: typeof SvgImage;
11
+ 'qt-svg-image': typeof SvgImage;
12
+ }
13
+ }
@@ -36,6 +36,19 @@ export declare function useAddonEnv(): AddonEnv;
36
36
  * 初始化 GridTabs 的全局兜底配置。
37
37
  * 允许设置全局的 themeConfig、loadingConfig 等,避免每个页面重复配置。
38
38
  *
39
- * @param config 全局配置对象 (如 { themeConfig: { placeholderColor: '#1AFFFFFF', glowColor: '#000000', outerBorderColor: '#FFFFFF' } })
39
+ * @param config 全局配置对象 (如 { themeConfig: { placeholderColor: '#282A32', glowColor: '#000000', outerBorderColor: '#FFFFFF' } })
40
40
  */
41
41
  export declare function initGridTabsGlobalConfig(config: Record<string, any>): Promise<boolean>;
42
+ /**
43
+ * 初始化 ExtraUI 的全局主题配置。
44
+ * 允许设置全局的 primaryColor、focusBorderColor、cornerRadius 等,避免每个组件重复配置。
45
+ *
46
+ * @param config 全局配置对象 (如 { primaryColor: '#007AFF', cornerRadius: 8, focusBorderColor: '#FFFFFF' })
47
+ */
48
+ export declare function initExtraUIGlobalTheme(config: Record<string, any>): Promise<boolean>;
49
+ /**
50
+ * 一键设置全局主题(联合配置)
51
+ * 供业务层在启动时调用,一键同时配置 extra-ui、glint 以及 grid-tabs 的主题参数
52
+ * @param themeConfig 统一的主题配置参数
53
+ */
54
+ export declare function initGlobalTheme(themeConfig: Record<string, any>): Promise<boolean>;
package/dist/index.d.ts CHANGED
@@ -5,7 +5,15 @@ import { KeyboardPlugin, Keyboard } from './components/Keyboard';
5
5
  import { PortalPoolPlugin, PortalPool } from './components/PortalPool';
6
6
  import { PortalItemPlugin, PortalItem } from './components/PortalItem';
7
7
  import { HsvBackgroundPlugin, HsvBackground } from './components/HsvBackground';
8
- export { GridTabsPlugin, GridTabs, KeyboardPlugin, Keyboard, PortalPoolPlugin, PortalPool, PortalItemPlugin, PortalItem, HsvBackgroundPlugin, HsvBackground };
8
+ import { SvgImagePlugin, SvgImage } from './components/SvgImage';
9
+ import { NaButtonPlugin, NaButton } from './components/NaButton';
10
+ import { NaCheckboxPlugin, NaCheckbox } from './components/NaCheckbox';
11
+ import { NaRadioGroupPlugin, NaRadioGroup } from './components/NaRadioGroup';
12
+ import { NaCheckboxGroupPlugin, NaCheckboxGroup } from './components/NaCheckboxGroup';
13
+ import { NaSwitcherPlugin, NaSwitcher } from './components/NaSwitcher';
14
+ import { NaSettingSwitchPlugin, NaSettingSwitch } from './components/NaSettingSwitch';
15
+ import { NaInputViewPlugin, NaInputView } from './components/NaInputView';
16
+ export { GridTabsPlugin, GridTabs, KeyboardPlugin, Keyboard, PortalPoolPlugin, PortalPool, PortalItemPlugin, PortalItem, HsvBackgroundPlugin, HsvBackground, SvgImagePlugin, SvgImage, NaButtonPlugin, NaButton, NaCheckboxPlugin, NaCheckbox, NaRadioGroupPlugin, NaRadioGroup, NaCheckboxGroupPlugin, NaCheckboxGroup, NaSwitcherPlugin, NaSwitcher, NaSettingSwitchPlugin, NaSettingSwitch, NaInputViewPlugin, NaInputView };
9
17
  export { withAsyncPlugin, QuickTVUINAddonsConfig } from './core/withAsyncPlugin';
10
18
  export * from './core/AddonProvider';
11
19
  import { App } from 'vue';
@@ -26,6 +34,18 @@ declare module '@vue/runtime-core' {
26
34
  'qt-portal-item': typeof PortalItem;
27
35
  HsvBackground: typeof HsvBackground;
28
36
  'qt-hsv-background': typeof HsvBackground;
37
+ SvgImage: typeof SvgImage;
38
+ 'qt-svg-image': typeof SvgImage;
39
+ NaRadioGroup: typeof NaRadioGroup;
40
+ 'qt-na-radio-group': typeof NaRadioGroup;
41
+ NaCheckboxGroup: typeof NaCheckboxGroup;
42
+ 'qt-na-checkbox-group': typeof NaCheckboxGroup;
43
+ NaSwitcher: typeof NaSwitcher;
44
+ 'qt-na-switcher': typeof NaSwitcher;
45
+ NaSettingSwitch: typeof NaSettingSwitch;
46
+ 'qt-na-setting-switch': typeof NaSettingSwitch;
47
+ NaInputView: typeof NaInputView;
48
+ 'qt-na-input-view': typeof NaInputView;
29
49
  }
30
50
  }
31
51
  declare module 'vue' {
@@ -41,5 +61,17 @@ declare module 'vue' {
41
61
  'qt-portal-item': typeof PortalItem;
42
62
  HsvBackground: typeof HsvBackground;
43
63
  'qt-hsv-background': typeof HsvBackground;
64
+ SvgImage: typeof SvgImage;
65
+ 'qt-svg-image': typeof SvgImage;
66
+ NaRadioGroup: typeof NaRadioGroup;
67
+ 'qt-na-radio-group': typeof NaRadioGroup;
68
+ NaCheckboxGroup: typeof NaCheckboxGroup;
69
+ 'qt-na-checkbox-group': typeof NaCheckboxGroup;
70
+ NaSwitcher: typeof NaSwitcher;
71
+ 'qt-na-switcher': typeof NaSwitcher;
72
+ NaSettingSwitch: typeof NaSettingSwitch;
73
+ 'qt-na-setting-switch': typeof NaSettingSwitch;
74
+ NaInputView: typeof NaInputView;
75
+ 'qt-na-input-view': typeof NaInputView;
44
76
  }
45
77
  }
@@ -0,0 +1,4 @@
1
+ export declare const AddonEnvModule: {
2
+ getBuiltInVersions(): Promise<any>;
3
+ };
4
+ export default AddonEnvModule;
@@ -0,0 +1,7 @@
1
+ export declare const ExtraUIConfigModule: {
2
+ /**
3
+ * 前端调用此方法,传入 JSON 字符串配置以更新 ExtraUI 的主题
4
+ */
5
+ setThemeConfig(jsonConfig: Record<string, any> | string): Promise<any>;
6
+ };
7
+ export default ExtraUIConfigModule;
@@ -0,0 +1,7 @@
1
+ export declare const GridTabsConfigModule: {
2
+ /**
3
+ * 前端调用此方法,传入 JSON 字符串配置
4
+ */
5
+ setDefaultConfig(jsonConfig: Record<string, any> | string): Promise<any>;
6
+ };
7
+ export default GridTabsConfigModule;