@quicktvui/naddons 1.0.0-alpha.4 → 1.0.0-alpha.6

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.
@@ -0,0 +1,28 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ initialDate?: string | undefined;
3
+ }>>, {
4
+ getNativeNode: () => any;
5
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ onDateChanged: (payload?: any) => void;
7
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
8
+ initialDate?: string | undefined;
9
+ }>>> & Readonly<{
10
+ onOnDateChanged?: ((payload?: any) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
12
+ default?(_: {}): any;
13
+ }>;
14
+ export default _default;
15
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
16
+ type __VLS_TypePropsToRuntimeProps<T> = {
17
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
18
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
19
+ } : {
20
+ type: import('vue').PropType<T[K]>;
21
+ required: true;
22
+ };
23
+ };
24
+ type __VLS_WithTemplateSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import DatePicker from './DatePicker.vue';
3
+ export declare const DatePickerPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { DatePicker };
7
+ export default DatePickerPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ DatePicker: typeof DatePicker;
11
+ 'qt-date-picker': typeof DatePicker;
12
+ }
13
+ }
@@ -1,8 +1,11 @@
1
1
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ protocolVersion?: string | undefined;
2
3
  tabsData?: string | undefined;
3
4
  actionPayload?: string | undefined;
4
5
  }>>, {
5
- scrollToTop: (...args: any[]) => any;
6
+ getNativeNode: () => any;
7
+ dispatchAction: (...args: any[]) => void;
8
+ scrollToTop: (...args: any[]) => void;
6
9
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
10
  onTabSelected: (payload?: any) => void;
8
11
  onTabNeedsData: (payload?: any) => void;
@@ -11,7 +14,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
11
14
  onTabFocused: (payload?: any) => void;
12
15
  onItemClick: (payload?: any) => void;
13
16
  onItemFocused: (payload?: any) => void;
17
+ onProtocolMismatch: (payload?: any) => void;
14
18
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
19
+ protocolVersion?: string | undefined;
15
20
  tabsData?: string | undefined;
16
21
  actionPayload?: string | undefined;
17
22
  }>>> & Readonly<{
@@ -22,6 +27,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
22
27
  onOnTabFocused?: ((payload?: any) => any) | undefined;
23
28
  onOnItemClick?: ((payload?: any) => any) | undefined;
24
29
  onOnItemFocused?: ((payload?: any) => any) | undefined;
30
+ onOnProtocolMismatch?: ((payload?: any) => any) | undefined;
25
31
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
26
32
  default?(_: {}): any;
27
33
  }>;
@@ -0,0 +1,26 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ portalId: string;
3
+ width?: number | undefined;
4
+ height?: number | undefined;
5
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
+ portalId: string;
7
+ width?: number | undefined;
8
+ height?: number | 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,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -4,11 +4,11 @@ export declare const GridTabsPlugin: {
4
4
  install: (app: App) => void;
5
5
  };
6
6
  export { GridTabs };
7
- export * from './useGridItemPresence';
8
7
  export default GridTabsPlugin;
9
8
  declare module 'vue' {
10
9
  interface GlobalComponents {
11
10
  GridTabs: typeof GridTabs;
12
11
  'qt-grid-tabs': typeof GridTabs;
12
+ 'gt-tabs': typeof GridTabs;
13
13
  }
14
14
  }
@@ -0,0 +1,91 @@
1
+ export interface GTAction {
2
+ op: 'UPDATE_ITEM' | 'APPEND_SUB_ITEMS' | 'REMOVE_ITEM' | 'RELOAD_TABS';
3
+ itemId?: string;
4
+ payload?: any;
5
+ }
6
+ export interface GTAnimationConfig {
7
+ duration?: number;
8
+ easing?: 'ease-in' | 'ease-out' | 'linear';
9
+ layoutEntrance?: 'staggered_slide_up' | 'fade_in' | 'none';
10
+ itemUpdate?: 'fade_cross' | 'default' | 'none';
11
+ }
12
+ export interface GTPageSpec {
13
+ gridBasis?: number;
14
+ unitType?: string;
15
+ contentConfig?: any;
16
+ layoutConfig?: any;
17
+ navConfig?: any;
18
+ animationConfig?: GTAnimationConfig;
19
+ focusConfig?: any;
20
+ [key: string]: any;
21
+ }
22
+ export interface GTConfig extends GTPageSpec {
23
+ referenceResolution?: any;
24
+ }
25
+ export interface GTItemContent {
26
+ title?: string;
27
+ subTitle?: string;
28
+ poster?: string;
29
+ subItems?: GTItem[];
30
+ [key: string]: any;
31
+ }
32
+ export interface GTItem {
33
+ id: string;
34
+ viewType: string;
35
+ span?: number;
36
+ state?: 'ready' | 'loading' | 'error' | 'disabled';
37
+ fallbackTemplates?: Record<string, string>;
38
+ clickPayload?: any;
39
+ focusPayload?: any;
40
+ content?: GTItemContent;
41
+ [key: string]: any;
42
+ }
43
+ export interface GTTab {
44
+ tabId: string;
45
+ title: string;
46
+ initialFocusId?: string;
47
+ loadState?: 'ready' | 'loading' | 'error' | 'empty' | 'loading_more' | 'no_more';
48
+ fallbackTemplates?: Record<string, string>;
49
+ items?: GTItem[];
50
+ hidden?: boolean;
51
+ [key: string]: any;
52
+ }
53
+ export interface GTItemEventPayload {
54
+ itemId: string;
55
+ tabIndex: number;
56
+ itemIndex: number;
57
+ subIndex: number;
58
+ clickPayload?: any;
59
+ focusPayload?: any;
60
+ hasFocus?: boolean;
61
+ [key: string]: any;
62
+ }
63
+ export interface GTCallbacks {
64
+ onTabNeedsData?: (tabId: string, index: number, reason: string) => Promise<GTItem[]>;
65
+ onLoadMore?: (tabId: string, cursor: number, itemId: string) => Promise<GTItem[]>;
66
+ onItemPresence?: (event: any) => void;
67
+ onTabSelected?: (event: any) => void;
68
+ onItemClick?: (payload: GTItemEventPayload) => void;
69
+ onItemFocused?: (payload: GTItemEventPayload) => void;
70
+ onTabFocused?: (event: any) => void;
71
+ }
72
+ export declare function useGridTabs(gridRef: any, defaultConfig?: GTConfig): {
73
+ tabsDataStr: import("vue").Ref<string, string>;
74
+ bindings: import("vue").ComputedRef<{
75
+ tabsData: string;
76
+ onTabNeedsData: (...args: any[]) => Promise<void>;
77
+ onLoadMore: (...args: any[]) => Promise<void>;
78
+ onItemPresence: (...args: any[]) => void;
79
+ onTabSelected: (...args: any[]) => void;
80
+ onItemClick: (...args: any[]) => void;
81
+ onItemFocused: (...args: any[]) => void;
82
+ onTabFocused: (...args: any[]) => void;
83
+ }>;
84
+ tabs: import("vue").ShallowRef<GTTab[], GTTab[]>;
85
+ items: import("vue").ShallowRef<GTItem[], GTItem[]>;
86
+ initData: (data: any[]) => void;
87
+ setCallbacks: (callbacks: GTCallbacks) => void;
88
+ updateItem: (itemId: string, payload: any) => void;
89
+ dispatchAction: (action: GTAction | GTAction[]) => void;
90
+ resetInitialization: () => void;
91
+ };
@@ -0,0 +1,20 @@
1
+ import { Ref } from 'vue';
2
+ import { GridTabsAction } from './useGridTabsUpdater';
3
+ /**
4
+ * 核心 Diff 算法:比对两份 GridTabs 数据,生成局部更新指令。
5
+ * 如果发现结构突变(如 viewType 改变、中间插入、乱序),则返回 'FULL_RELOAD'。
6
+ */
7
+ export declare function diffGridTabsData(oldData: any, newData: any): GridTabsAction[] | 'FULL_RELOAD';
8
+ /**
9
+ * 终极武器:传入响应式的对象数据,内部自动监听并执行 Diff。
10
+ * 能够完美将微小的增删改转化为 actionPayload 指令发送给 Native,
11
+ * 遇到大范围突变时自动降级为 tabsData 全量刷新。
12
+ *
13
+ * 使用方式:
14
+ * const { tabsDataStr, actionPayloadStr } = useGridTabsData(myReactiveData);
15
+ * <qt-grid-tabs :tabsData="tabsDataStr" :actionPayload="actionPayloadStr" />
16
+ */
17
+ export declare function useGridTabsData(sourceDataRef: Ref<any>): {
18
+ tabsDataStr: Ref<string, string>;
19
+ actionPayloadStr: Ref<string, string>;
20
+ };
@@ -0,0 +1,24 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * 局部更新指令结构 (对应 Native 层的 DynamicAction)
4
+ */
5
+ export interface GridTabsAction {
6
+ op: 'UPDATE_ITEM' | 'APPEND_SUB_ITEMS' | 'REMOVE_ITEM';
7
+ itemId: string;
8
+ payload?: any;
9
+ }
10
+ /**
11
+ * 封装 GridTabs 的局部更新能力 (基于 actionPayload 指令)
12
+ *
13
+ * 使用方式:
14
+ * const { actionPayloadStr, updateItem, appendItems, removeItem } = useGridTabsUpdater();
15
+ *
16
+ * <qt-grid-tabs :actionPayload="actionPayloadStr" />
17
+ */
18
+ export declare function useGridTabsUpdater(): {
19
+ actionPayloadStr: Ref<string, string>;
20
+ dispatchAction: (action: GridTabsAction | GridTabsAction[]) => void;
21
+ updateItem: (itemId: string, payload: Record<string, any>) => void;
22
+ appendItems: (containerId: string, subItems: any[]) => void;
23
+ removeItem: (itemId: string) => void;
24
+ };
@@ -0,0 +1,50 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ backgroundColor?: string | undefined;
3
+ textColor?: string | undefined;
4
+ weakTextColor?: string | undefined;
5
+ focusBackgroundColor?: string | undefined;
6
+ focusTextColor?: string | undefined;
7
+ placeholder?: string | undefined;
8
+ textFullKeyboard?: string | undefined;
9
+ textT9Keyboard?: string | undefined;
10
+ textClear?: string | undefined;
11
+ textDelete?: string | undefined;
12
+ currentInput?: string | undefined;
13
+ }>>, {
14
+ getNativeNode: () => any;
15
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ onInputChanged: (payload?: any) => void;
17
+ onKeyPressed: (payload?: any) => void;
18
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
19
+ backgroundColor?: string | undefined;
20
+ textColor?: string | undefined;
21
+ weakTextColor?: string | undefined;
22
+ focusBackgroundColor?: string | undefined;
23
+ focusTextColor?: string | undefined;
24
+ placeholder?: string | undefined;
25
+ textFullKeyboard?: string | undefined;
26
+ textT9Keyboard?: string | undefined;
27
+ textClear?: string | undefined;
28
+ textDelete?: string | undefined;
29
+ currentInput?: string | undefined;
30
+ }>>> & Readonly<{
31
+ onOnInputChanged?: ((payload?: any) => any) | undefined;
32
+ onOnKeyPressed?: ((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 Keyboard from './Keyboard.vue';
3
+ export declare const KeyboardPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { Keyboard };
7
+ export default KeyboardPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ Keyboard: typeof Keyboard;
11
+ 'qt-keyboard': typeof Keyboard;
12
+ }
13
+ }
@@ -0,0 +1,28 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ maxLength?: any;
3
+ }>>, {
4
+ getNativeNode: () => any;
5
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ onNumberPressed: (payload?: any) => void;
7
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
8
+ maxLength?: any;
9
+ }>>> & Readonly<{
10
+ onOnNumberPressed?: ((payload?: any) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
12
+ default?(_: {}): any;
13
+ }>;
14
+ export default _default;
15
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
16
+ type __VLS_TypePropsToRuntimeProps<T> = {
17
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
18
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
19
+ } : {
20
+ type: import('vue').PropType<T[K]>;
21
+ required: true;
22
+ };
23
+ };
24
+ type __VLS_WithTemplateSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import NumericKeyboard from './NumericKeyboard.vue';
3
+ export declare const NumericKeyboardPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { NumericKeyboard };
7
+ export default NumericKeyboardPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ NumericKeyboard: typeof NumericKeyboard;
11
+ 'qt-numeric-keyboard': typeof NumericKeyboard;
12
+ }
13
+ }
@@ -0,0 +1,24 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ portalId?: string | undefined;
3
+ }>>, {
4
+ getNativeNode: () => any;
5
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
+ portalId?: string | undefined;
7
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
8
+ default?(_: {}): any;
9
+ }>;
10
+ export default _default;
11
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
+ type __VLS_TypePropsToRuntimeProps<T> = {
13
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
14
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
+ } : {
16
+ type: import('vue').PropType<T[K]>;
17
+ required: true;
18
+ };
19
+ };
20
+ type __VLS_WithTemplateSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import PortalItem from './PortalItem.vue';
3
+ export declare const PortalItemPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { PortalItem };
7
+ export default PortalItemPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ PortalItem: typeof PortalItem;
11
+ 'qt-portal-item': typeof PortalItem;
12
+ }
13
+ }
@@ -0,0 +1,11 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {
2
+ getNativeNode: () => any;
3
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
4
+ default?(_: {}): any;
5
+ }>;
6
+ export default _default;
7
+ type __VLS_WithTemplateSlots<T, S> = T & {
8
+ new (): {
9
+ $slots: S;
10
+ };
11
+ };
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import PortalPool from './PortalPool.vue';
3
+ export declare const PortalPoolPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { PortalPool };
7
+ export default PortalPoolPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ PortalPool: typeof PortalPool;
11
+ 'qt-portal-pool': typeof PortalPool;
12
+ }
13
+ }
@@ -0,0 +1,34 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ numStars?: any;
3
+ rating?: any;
4
+ stepSize?: any;
5
+ isIndicator?: boolean | undefined;
6
+ }>>, {
7
+ getNativeNode: () => any;
8
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ onRatingChanged: (payload?: any) => void;
10
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
11
+ numStars?: any;
12
+ rating?: any;
13
+ stepSize?: any;
14
+ isIndicator?: boolean | undefined;
15
+ }>>> & Readonly<{
16
+ onOnRatingChanged?: ((payload?: any) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
18
+ default?(_: {}): any;
19
+ }>;
20
+ export default _default;
21
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
+ type __VLS_TypePropsToRuntimeProps<T> = {
23
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
24
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
+ } : {
26
+ type: import('vue').PropType<T[K]>;
27
+ required: true;
28
+ };
29
+ };
30
+ type __VLS_WithTemplateSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import RatingBar from './RatingBar.vue';
3
+ export declare const RatingBarPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { RatingBar };
7
+ export default RatingBarPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ RatingBar: typeof RatingBar;
11
+ 'qt-rating-bar': typeof RatingBar;
12
+ }
13
+ }
@@ -0,0 +1,34 @@
1
+ export declare const ADDON_ENV_CONTEXT_KEY: unique symbol;
2
+ export interface AddonEnv {
3
+ /** 是否存在并且激活了热更新插件 */
4
+ isPluginActive: boolean;
5
+ /**
6
+ * 热更插件特有的名称后缀。
7
+ * 当 isPluginActive 为 true 时,后缀为 '_Plugin',否则为空字符串。
8
+ */
9
+ nameSuffix: string;
10
+ /**
11
+ * 应该使用的底层插件包名。
12
+ * 如果激活了热更插件,则为独立插件包名;否则为内置基础包名。
13
+ */
14
+ pluginPackageName: string;
15
+ /** 宿主内置组件的真实版本映射表 (组件注册名 -> 版本号) */
16
+ builtInVersions: Record<string, string>;
17
+ }
18
+ /**
19
+ * 探测并初始化全局的 Addon 运行环境。
20
+ * 建议在 App.vue 的 onESCreate 或路由前置守卫中调用一次。
21
+ *
22
+ * @param basePluginPackage 基础插件包名,如 'com.quicktvui.plugin.glintui'
23
+ * @param pluginSuffix 探测新插件的专用后缀,默认为 '_Plugin'
24
+ */
25
+ export declare function initAddonEnv(basePluginPackage?: string, pluginSuffix?: string): Promise<AddonEnv>;
26
+ /**
27
+ * 提供 Addon 环境给子组件
28
+ */
29
+ export declare function provideAddonEnv(env: AddonEnv): void;
30
+ /**
31
+ * 在组件内获取当前的 Addon 运行环境。
32
+ * 如果上层没有 provide,则回退到安全默认环境。
33
+ */
34
+ export declare function useAddonEnv(): AddonEnv;
@@ -1,7 +1,22 @@
1
+ export declare const QuickTVUINAddonsConfig: {
2
+ skipPluginCheck: boolean;
3
+ };
1
4
  /**
2
5
  * 提供统一的异步插件安装和降级包装器。
3
6
  * 这个组件不会被暴露给最终用户,只被 auto-generated 的组件代码调用。
4
7
  */
5
- export declare function withAsyncPlugin(NativeTag: string, pluginPkgName?: string, pluginInitClass?: string): import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
8
+ export declare function withAsyncPlugin(NativeTag: string, pluginPkgName?: string, pluginInitClass?: string): import("vue").DefineComponent<import("vue").ExtractPropTypes<{
9
+ skipPluginCheck: {
10
+ type: BooleanConstructor;
11
+ default: boolean;
12
+ };
13
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
6
14
  [key: string]: any;
7
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
15
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ skipPluginCheck: {
17
+ type: BooleanConstructor;
18
+ default: boolean;
19
+ };
20
+ }>> & Readonly<{}>, {
21
+ skipPluginCheck: boolean;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
package/dist/index.d.ts CHANGED
@@ -1,14 +1,40 @@
1
1
  export * from './components/GridTabs';
2
- import { GridTabs } from './components/GridTabs';
3
- export { withAsyncPlugin } from './core/withAsyncPlugin';
2
+ export { useGridTabs } from './components/GridTabs/useGridTabs';
3
+ import { GridTabsPlugin, GridTabs } from './components/GridTabs';
4
+ import { KeyboardPlugin, Keyboard } from './components/Keyboard';
5
+ import { PortalPoolPlugin, PortalPool } from './components/PortalPool';
6
+ import { PortalItemPlugin, PortalItem } from './components/PortalItem';
7
+ export { GridTabsPlugin, GridTabs, KeyboardPlugin, Keyboard, PortalPoolPlugin, PortalPool, PortalItemPlugin, PortalItem };
8
+ export { withAsyncPlugin, QuickTVUINAddonsConfig } from './core/withAsyncPlugin';
9
+ export * from './core/AddonProvider';
4
10
  import { App } from 'vue';
5
11
  export declare const QuickTVUINAddons: {
6
12
  install: (app: App) => void;
7
13
  };
8
14
  export default QuickTVUINAddons;
15
+ declare module '@vue/runtime-core' {
16
+ interface GlobalComponents {
17
+ GridTabs: typeof GridTabs;
18
+ 'gt-tabs': typeof GridTabs;
19
+ 'qt-grid-tabs': typeof GridTabs;
20
+ Keyboard: typeof Keyboard;
21
+ 'qt-keyboard': typeof Keyboard;
22
+ PortalPool: typeof PortalPool;
23
+ 'qt-portal-pool': typeof PortalPool;
24
+ PortalItem: typeof PortalItem;
25
+ 'qt-portal-item': typeof PortalItem;
26
+ }
27
+ }
9
28
  declare module 'vue' {
10
29
  interface GlobalComponents {
11
30
  GridTabs: typeof GridTabs;
31
+ 'gt-tabs': typeof GridTabs;
12
32
  'qt-grid-tabs': typeof GridTabs;
33
+ Keyboard: typeof Keyboard;
34
+ 'qt-keyboard': typeof Keyboard;
35
+ PortalPool: typeof PortalPool;
36
+ 'qt-portal-pool': typeof PortalPool;
37
+ PortalItem: typeof PortalItem;
38
+ 'qt-portal-item': typeof PortalItem;
13
39
  }
14
40
  }