@quicktvui/qtx 0.0.0-stage → 0.9.0-alpha.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 (83) hide show
  1. package/AI_CONTRACT.md +472 -0
  2. package/README.md +173 -2
  3. package/dist/components/QtxAppIcon/QtxAppIcon.vue.d.ts +73 -0
  4. package/dist/components/QtxAppIcon/QtxAppIconBase.vue.d.ts +144 -0
  5. package/dist/components/QtxAppIcon/index.d.ts +13 -0
  6. package/dist/components/QtxAppIcon/types.d.ts +157 -0
  7. package/dist/components/QtxButton/QtxButton.vue.d.ts +24 -0
  8. package/dist/components/QtxButton/QtxButtonBase.vue.d.ts +64 -0
  9. package/dist/components/QtxButton/index.d.ts +13 -0
  10. package/dist/components/QtxCheckbox/QtxCheckbox.vue.d.ts +110 -0
  11. package/dist/components/QtxCheckbox/index.d.ts +13 -0
  12. package/dist/components/QtxCheckboxGroup/QtxCheckboxGroup.vue.d.ts +103 -0
  13. package/dist/components/QtxCheckboxGroup/index.d.ts +13 -0
  14. package/dist/components/QtxCollapseMenuGroup/QtxCollapseMenuGroup.vue.d.ts +9 -0
  15. package/dist/components/QtxCollapseMenuGroup/QtxCollapseMenuGroupBase.vue.d.ts +40 -0
  16. package/dist/components/QtxCollapseMenuGroup/index.d.ts +13 -0
  17. package/dist/components/QtxCollapseMenuList/QtxCollapseMenuList.vue.d.ts +12 -0
  18. package/dist/components/QtxCollapseMenuList/QtxCollapseMenuListBase.vue.d.ts +32 -0
  19. package/dist/components/QtxCollapseMenuList/index.d.ts +13 -0
  20. package/dist/components/QtxDatePicker/QtxDatePicker.vue.d.ts +28 -0
  21. package/dist/components/QtxDatePicker/index.d.ts +13 -0
  22. package/dist/components/QtxGridTabs/QtxGridTabs.vue.d.ts +11 -0
  23. package/dist/components/QtxGridTabs/index.d.ts +13 -0
  24. package/dist/components/QtxGridTabs/useGridItemPresence.d.ts +26 -0
  25. package/dist/components/QtxGridTabs/useGridTabs.d.ts +163 -0
  26. package/dist/components/QtxGridTabs/useGridTabsData.d.ts +20 -0
  27. package/dist/components/QtxGridTabs/useGridTabsUpdater.d.ts +24 -0
  28. package/dist/components/QtxHsvBackground/QtxHsvBackground.vue.d.ts +26 -0
  29. package/dist/components/QtxHsvBackground/index.d.ts +13 -0
  30. package/dist/components/QtxInputView/QtxInputView.vue.d.ts +42 -0
  31. package/dist/components/QtxInputView/QtxInputViewBase.vue.d.ts +46 -0
  32. package/dist/components/QtxInputView/index.d.ts +13 -0
  33. package/dist/components/QtxKeyboard/QtxKeyboard.vue.d.ts +59 -0
  34. package/dist/components/QtxKeyboard/index.d.ts +13 -0
  35. package/dist/components/QtxList/QtxList.vue.d.ts +96 -0
  36. package/dist/components/QtxList/QtxListBase.vue.d.ts +11 -0
  37. package/dist/components/QtxList/capture.d.ts +86 -0
  38. package/dist/components/QtxList/index.d.ts +13 -0
  39. package/dist/components/QtxList/types.d.ts +78 -0
  40. package/dist/components/QtxNumericKeyboard/QtxNumericKeyboard.vue.d.ts +28 -0
  41. package/dist/components/QtxNumericKeyboard/index.d.ts +13 -0
  42. package/dist/components/QtxPortalItem/QtxPortalItem.vue.d.ts +24 -0
  43. package/dist/components/QtxPortalItem/index.d.ts +13 -0
  44. package/dist/components/QtxPortalPool/QtxPortalPool.vue.d.ts +11 -0
  45. package/dist/components/QtxPortalPool/index.d.ts +13 -0
  46. package/dist/components/QtxPoster/QtxPoster.vue.d.ts +60 -0
  47. package/dist/components/QtxPoster/QtxPosterBase.vue.d.ts +117 -0
  48. package/dist/components/QtxPoster/index.d.ts +13 -0
  49. package/dist/components/QtxPoster/types.d.ts +133 -0
  50. package/dist/components/QtxRadioGroup/QtxRadioGroup.vue.d.ts +103 -0
  51. package/dist/components/QtxRadioGroup/index.d.ts +13 -0
  52. package/dist/components/QtxRatingBar/QtxRatingBar.vue.d.ts +34 -0
  53. package/dist/components/QtxRatingBar/index.d.ts +13 -0
  54. package/dist/components/QtxSettingSwitch/QtxSettingSwitch.vue.d.ts +111 -0
  55. package/dist/components/QtxSettingSwitch/index.d.ts +6 -0
  56. package/dist/components/QtxSvgImage/QtxSvgImage.vue.d.ts +26 -0
  57. package/dist/components/QtxSvgImage/index.d.ts +13 -0
  58. package/dist/components/QtxSwitcher/QtxSwitcher.vue.d.ts +52 -0
  59. package/dist/components/QtxSwitcher/index.d.ts +13 -0
  60. package/dist/components/QtxTabContent/QtxTabContent.vue.d.ts +24 -0
  61. package/dist/components/QtxTabs/QtxTabs.vue.d.ts +37 -0
  62. package/dist/components/QtxTabs/index.d.ts +16 -0
  63. package/dist/core/installQtx.d.ts +40 -0
  64. package/dist/core/portalCoordinator.d.ts +4 -0
  65. package/dist/core/qtxGate.d.ts +13 -0
  66. package/dist/core/theme.d.ts +12 -0
  67. package/dist/directives/v-portal-to.d.ts +4 -0
  68. package/dist/index.d.ts +139 -0
  69. package/dist/modules/AddonEnvModule.d.ts +4 -0
  70. package/dist/modules/ExtraUIConfigModule.d.ts +7 -0
  71. package/dist/modules/GridTabsConfigModule.d.ts +7 -0
  72. package/dist/modules/QtxVersionModule.d.ts +4 -0
  73. package/dist/preset-items/QtxStyledList.vue.d.ts +65 -0
  74. package/dist/preset-items/compact.d.ts +2 -0
  75. package/dist/preset-items/glint.d.ts +11 -0
  76. package/dist/preset-items/index.d.ts +45 -0
  77. package/dist/preset-items/retired-items.d.ts +22 -0
  78. package/dist/preset-items/types.d.ts +112 -0
  79. package/dist/qtx.cjs.js +1 -0
  80. package/dist/qtx.es.js +6375 -0
  81. package/dist/style.css +1 -0
  82. package/dist/types/index.d.ts +50 -0
  83. package/package.json +32 -4
@@ -0,0 +1,103 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ modelValue: {
3
+ type: () => any[];
4
+ default: () => never[];
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: () => any[];
50
+ default: () => never[];
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
+ direction: string;
90
+ itemHeight: number;
91
+ gravity: string;
92
+ showBackground: boolean;
93
+ modelValue: any[];
94
+ options: {
95
+ label: string;
96
+ value: any;
97
+ disabled?: boolean | undefined;
98
+ props?: any;
99
+ }[];
100
+ itemWidth: 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 QtxCheckboxGroup from './QtxCheckboxGroup.vue';
3
+ export declare const QtxCheckboxGroupPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { QtxCheckboxGroup };
7
+ export default QtxCheckboxGroupPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ QtxCheckboxGroup: typeof QtxCheckboxGroup;
11
+ 'qtx-checkbox-group': typeof QtxCheckboxGroup;
12
+ }
13
+ }
@@ -0,0 +1,9 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
2
+ default?(_: {}): any;
3
+ }>;
4
+ export default _default;
5
+ type __VLS_WithTemplateSlots<T, S> = T & {
6
+ new (): {
7
+ $slots: S;
8
+ };
9
+ };
@@ -0,0 +1,40 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ icon?: string | undefined;
3
+ title?: string | undefined;
4
+ titleColor?: string | undefined;
5
+ titleSelectedColor?: string | undefined;
6
+ titleSize?: any;
7
+ expanded?: boolean | undefined;
8
+ data?: any;
9
+ }>>, {
10
+ getNativeNode: () => any;
11
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ onFocus: (payload?: any) => void;
13
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
14
+ icon?: string | undefined;
15
+ title?: string | undefined;
16
+ titleColor?: string | undefined;
17
+ titleSelectedColor?: string | undefined;
18
+ titleSize?: any;
19
+ expanded?: boolean | undefined;
20
+ data?: any;
21
+ }>>> & Readonly<{
22
+ onOnFocus?: ((payload?: any) => any) | undefined;
23
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
24
+ default?(_: {}): any;
25
+ }>;
26
+ export default _default;
27
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
+ type __VLS_TypePropsToRuntimeProps<T> = {
29
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
30
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
31
+ } : {
32
+ type: import('vue').PropType<T[K]>;
33
+ required: true;
34
+ };
35
+ };
36
+ type __VLS_WithTemplateSlots<T, S> = T & {
37
+ new (): {
38
+ $slots: S;
39
+ };
40
+ };
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import QtxCollapseMenuGroup from './QtxCollapseMenuGroup.vue';
3
+ export declare const QtxCollapseMenuGroupPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { QtxCollapseMenuGroup };
7
+ export default QtxCollapseMenuGroupPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ QtxCollapseMenuGroup: typeof QtxCollapseMenuGroup;
11
+ 'qtx-collapse-menu-group': typeof QtxCollapseMenuGroup;
12
+ }
13
+ }
@@ -0,0 +1,12 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {
2
+ expandIndex: (index: number, requestFocus?: boolean) => void;
3
+ getNativeNode: () => any;
4
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
5
+ default?(_: {}): any;
6
+ }>;
7
+ export default _default;
8
+ type __VLS_WithTemplateSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
@@ -0,0 +1,32 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ data?: any;
3
+ defaultExpandedIndex?: any;
4
+ defaultFocus?: boolean | undefined;
5
+ }>>, {
6
+ getNativeNode: () => any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ onItemFocus: (payload?: any) => void;
9
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
10
+ data?: any;
11
+ defaultExpandedIndex?: any;
12
+ defaultFocus?: boolean | undefined;
13
+ }>>> & Readonly<{
14
+ onOnItemFocus?: ((payload?: any) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
16
+ default?(_: {}): any;
17
+ }>;
18
+ export default _default;
19
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
20
+ type __VLS_TypePropsToRuntimeProps<T> = {
21
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
22
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
23
+ } : {
24
+ type: import('vue').PropType<T[K]>;
25
+ required: true;
26
+ };
27
+ };
28
+ type __VLS_WithTemplateSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import QtxCollapseMenuList from './QtxCollapseMenuList.vue';
3
+ export declare const QtxCollapseMenuListPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { QtxCollapseMenuList };
7
+ export default QtxCollapseMenuListPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ QtxCollapseMenuList: typeof QtxCollapseMenuList;
11
+ 'qtx-collapse-menu-list': typeof QtxCollapseMenuList;
12
+ }
13
+ }
@@ -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 QtxDatePicker from './QtxDatePicker.vue';
3
+ export declare const QtxDatePickerPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { QtxDatePicker };
7
+ export default QtxDatePickerPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ QtxDatePicker: typeof QtxDatePicker;
11
+ 'qtx-date-picker': typeof QtxDatePicker;
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 QtxGridTabs from './QtxGridTabs.vue';
3
+ export declare const QtxGridTabsPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { QtxGridTabs };
7
+ export default QtxGridTabsPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ QtxGridTabs: typeof QtxGridTabs;
11
+ 'qtx-grid-tabs': typeof QtxGridTabs;
12
+ }
13
+ }
@@ -0,0 +1,26 @@
1
+ export type PresenceState = 'attached' | 'enter' | 'visible' | 'leave';
2
+ export interface PresencePayload {
3
+ itemId: string;
4
+ state: PresenceState;
5
+ index: number;
6
+ }
7
+ export interface UseGridItemPresenceOptions {
8
+ /** 当组件刚刚进入视口时触发 (用于发起网络请求) */
9
+ onEnter?: () => Promise<any> | void;
10
+ /** 当组件完全无遮挡显示时触发 (用于发送曝光埋点) */
11
+ onVisible?: () => void;
12
+ /** 当组件离开视口时触发 (用于取消网络请求或暂停视频) */
13
+ onLeave?: () => void;
14
+ }
15
+ /**
16
+ * 6.15 视图状态反馈与延迟加载协议 - 前端声明式 Hook
17
+ *
18
+ * 用于在 Vue 组件内部响应底层 Native 传来的可见性状态。
19
+ * 使用此 Hook 之前,父组件必须监听 `<GridTabs @onItemPresence="handlePresence">`
20
+ * 并通过 EventBus 或 Provide/Inject 将事件分发到此 Hook。
21
+ */
22
+ export declare function useGridItemPresence(itemId: string, options?: UseGridItemPresenceOptions): {
23
+ isIntersecting: import("vue").Ref<boolean, boolean>;
24
+ isVisible: import("vue").Ref<boolean, boolean>;
25
+ handlePresenceState: (state: PresenceState) => void;
26
+ };
@@ -0,0 +1,163 @@
1
+ import { Ref, ShallowRef, ComputedRef } from 'vue';
2
+ export interface GTAction {
3
+ op: 'UPDATE_ITEM' | 'APPEND_SUB_ITEMS' | 'PREPEND_SUB_ITEMS' | 'CLEAR_SUB_ITEMS' | 'REMOVE_ITEM' | 'DELETE_ITEM' | 'INSERT_ITEM' | 'MOVE_ITEM' | 'REPLACE_ITEM' | 'RELOAD_TABS' | 'UPDATE_TAB_STATE';
4
+ itemId?: string;
5
+ payload?: any;
6
+ }
7
+ export interface GTAnimationConfig {
8
+ duration?: number;
9
+ easing?: 'ease-in' | 'ease-out' | 'linear';
10
+ layoutEntrance?: 'staggered_slide_up' | 'fade_in' | 'none';
11
+ itemUpdate?: 'fade_cross' | 'default' | 'none';
12
+ }
13
+ export interface GTThemeConfig {
14
+ hsvHue?: number | null;
15
+ }
16
+ export interface GTBackgroundConfig {
17
+ type?: 'solid' | 'gradient';
18
+ color?: string;
19
+ colors?: string[];
20
+ orientation?: 'TOP_BOTTOM' | 'BOTTOM_TOP' | 'LEFT_RIGHT' | 'RIGHT_LEFT' | 'TL_BR' | 'TR_BL' | 'BL_TR' | 'BR_TL';
21
+ cornerRadius?: number;
22
+ }
23
+ export interface GTPageSpec {
24
+ gridBasis?: number;
25
+ unitType?: string;
26
+ contentConfig?: {
27
+ background?: GTBackgroundConfig;
28
+ [key: string]: any;
29
+ };
30
+ layoutConfig?: any;
31
+ navConfig?: {
32
+ background?: GTBackgroundConfig;
33
+ [key: string]: any;
34
+ };
35
+ animationConfig?: GTAnimationConfig;
36
+ focusConfig?: {
37
+ defaultFocusId?: string;
38
+ defaultTabFocusId?: string;
39
+ defaultContentFocusId?: string;
40
+ defaultTabFocusIndex?: number;
41
+ defaultContentFocusIndex?: number;
42
+ navToContentDirectFocus?: boolean;
43
+ boundaryLock?: {
44
+ left?: boolean;
45
+ right?: boolean;
46
+ bottom?: boolean;
47
+ top?: boolean;
48
+ };
49
+ tabBoundaryLock?: {
50
+ left?: boolean;
51
+ right?: boolean;
52
+ bottom?: boolean;
53
+ top?: boolean;
54
+ };
55
+ contentBoundaryLock?: {
56
+ left?: boolean;
57
+ right?: boolean;
58
+ bottom?: boolean;
59
+ top?: boolean;
60
+ };
61
+ [key: string]: any;
62
+ };
63
+ themeConfig?: GTThemeConfig;
64
+ interactionStrategy?: {
65
+ defaultFocus?: 'content' | 'nav';
66
+ interceptBack?: boolean;
67
+ focusBackToTab?: boolean;
68
+ focusBackToMainTab?: boolean;
69
+ backMode?: 'standard' | 'home-first';
70
+ autoScrollToTop?: boolean;
71
+ scrollThreshold?: number;
72
+ edgeScrollProtection?: number;
73
+ [key: string]: any;
74
+ };
75
+ [key: string]: any;
76
+ }
77
+ export interface GTConfig extends GTPageSpec {
78
+ referenceResolution?: any;
79
+ }
80
+ export interface GTItemContent {
81
+ title?: string;
82
+ subTitle?: string;
83
+ poster?: string;
84
+ subItems?: GTItem[];
85
+ [key: string]: any;
86
+ }
87
+ export interface GTItem {
88
+ id: string;
89
+ viewType: string;
90
+ span?: number;
91
+ state?: 'ready' | 'loading' | 'error' | 'disabled';
92
+ fallbackTemplates?: Record<string, string>;
93
+ clickPayload?: any;
94
+ focusPayload?: any;
95
+ content?: GTItemContent;
96
+ [key: string]: any;
97
+ }
98
+ export interface GTTab {
99
+ tabId: string;
100
+ title: string;
101
+ initialFocusId?: string;
102
+ restoreFocusId?: string;
103
+ loadState?: 'ready' | 'loading' | 'error' | 'empty' | 'loading_more' | 'no_more';
104
+ fallbackTemplates?: Record<string, string>;
105
+ items?: GTItem[];
106
+ hidden?: boolean;
107
+ [key: string]: any;
108
+ }
109
+ export interface GTItemEventPayload {
110
+ itemId: string;
111
+ tabIndex: number;
112
+ itemIndex: number;
113
+ subIndex: number;
114
+ clickPayload?: any;
115
+ focusPayload?: any;
116
+ hasFocus?: boolean;
117
+ [key: string]: any;
118
+ }
119
+ export interface GTCallbacks<I extends GTItem = GTItem> {
120
+ onTabNeedsData?: (tabId: string, index: number, reason: string) => Promise<I[]>;
121
+ onLoadMore?: (tabId: string, cursor: number, itemId: string) => Promise<I[]>;
122
+ onItemPresence?: (event: any) => void;
123
+ onTabSelected?: (event: any) => void;
124
+ onTabClick?: (event: any) => void;
125
+ onItemClick?: (payload: GTItemEventPayload) => void;
126
+ onItemLongClick?: (payload: GTItemEventPayload) => void;
127
+ onItemFocused?: (payload: GTItemEventPayload) => void;
128
+ onTabFocused?: (event: any) => void;
129
+ onScroll?: (event: {
130
+ scrollX: number;
131
+ scrollY: number;
132
+ dx: number;
133
+ dy: number;
134
+ }) => void;
135
+ onScrollStateChanged?: (event: {
136
+ scrollX: number;
137
+ scrollY: number;
138
+ state: number;
139
+ }) => void;
140
+ }
141
+ export interface UseGridTabsReturn<T extends GTTab = GTTab, I extends GTItem = GTItem> {
142
+ tabsDataStr: Ref<string>;
143
+ bindings: ComputedRef<any>;
144
+ tabs: ShallowRef<T[]>;
145
+ items: ShallowRef<I[]>;
146
+ initData: (data: any[]) => void;
147
+ setCallbacks: (callbacks: GTCallbacks<I>) => void;
148
+ updateItem: (itemId: string, payload: any) => void;
149
+ deleteItem: (itemId: string) => void;
150
+ prependItems: (containerItemId: string, newItems: any[]) => void;
151
+ clearItems: (containerItemId: string) => void;
152
+ moveItem: (itemId: string, targetPosition: 'before' | 'after', anchorItemId: string) => void;
153
+ replaceItem: (itemId: string, newItem: any) => void;
154
+ dispatchAction: (action: GTAction | GTAction[]) => void;
155
+ resetInitialization: () => void;
156
+ getFocusState: () => Promise<any>;
157
+ getItemRect: (itemId: string) => Promise<any>;
158
+ requestFocus: (itemId: string) => void;
159
+ updatePageSpec: (partialSpec: any) => void;
160
+ reloadAll: (newSpec: any, newTabs: any[]) => void;
161
+ scrollToTop: () => void;
162
+ }
163
+ export declare function useGridTabs<T extends GTTab = GTTab, I extends GTItem = GTItem>(gridRef: any, initialConfig?: GTConfig): UseGridTabsReturn<T, I>;
@@ -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
+ * <qtx-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
+ * <qtx-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,26 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ hue?: any;
3
+ hueDuration?: any;
4
+ }>>, {
5
+ getNativeNode: () => any;
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
7
+ hue?: any;
8
+ hueDuration?: any;
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 QtxHsvBackground from './QtxHsvBackground.vue';
3
+ export declare const QtxHsvBackgroundPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { QtxHsvBackground };
7
+ export default QtxHsvBackgroundPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ QtxHsvBackground: typeof QtxHsvBackground;
11
+ 'qtx-hsv-background': typeof QtxHsvBackground;
12
+ }
13
+ }
@@ -0,0 +1,42 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ inputSize?: "small" | "medium" | "large" | undefined;
3
+ }>, {
4
+ inputSize: string;
5
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ onChange: (...args: any[]) => void;
7
+ onInputClick: (...args: any[]) => void;
8
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
9
+ inputSize?: "small" | "medium" | "large" | undefined;
10
+ }>, {
11
+ inputSize: string;
12
+ }>>> & Readonly<{
13
+ onOnChange?: ((...args: any[]) => any) | undefined;
14
+ onOnInputClick?: ((...args: any[]) => any) | undefined;
15
+ }>, {
16
+ inputSize: 'large' | 'medium' | 'small';
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_WithDefaults<P, D> = {
31
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
32
+ default: D[K];
33
+ }> : P[K];
34
+ };
35
+ type __VLS_Prettify<T> = {
36
+ [K in keyof T]: T[K];
37
+ } & {};
38
+ type __VLS_WithTemplateSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };