@quicktvui/qtx 0.0.0-stage → 0.9.0-alpha.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 (87) hide show
  1. package/AI_CONTRACT.md +472 -0
  2. package/README.md +174 -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/QtxChannelNav/QtxChannelNav.vue.d.ts +48 -0
  11. package/dist/components/QtxChannelNav/QtxChannelNavBase.vue.d.ts +127 -0
  12. package/dist/components/QtxChannelNav/index.d.ts +13 -0
  13. package/dist/components/QtxChannelNav/types.d.ts +232 -0
  14. package/dist/components/QtxCheckbox/QtxCheckbox.vue.d.ts +110 -0
  15. package/dist/components/QtxCheckbox/index.d.ts +13 -0
  16. package/dist/components/QtxCheckboxGroup/QtxCheckboxGroup.vue.d.ts +103 -0
  17. package/dist/components/QtxCheckboxGroup/index.d.ts +13 -0
  18. package/dist/components/QtxCollapseMenuGroup/QtxCollapseMenuGroup.vue.d.ts +9 -0
  19. package/dist/components/QtxCollapseMenuGroup/QtxCollapseMenuGroupBase.vue.d.ts +40 -0
  20. package/dist/components/QtxCollapseMenuGroup/index.d.ts +13 -0
  21. package/dist/components/QtxCollapseMenuList/QtxCollapseMenuList.vue.d.ts +12 -0
  22. package/dist/components/QtxCollapseMenuList/QtxCollapseMenuListBase.vue.d.ts +32 -0
  23. package/dist/components/QtxCollapseMenuList/index.d.ts +13 -0
  24. package/dist/components/QtxDatePicker/QtxDatePicker.vue.d.ts +28 -0
  25. package/dist/components/QtxDatePicker/index.d.ts +13 -0
  26. package/dist/components/QtxGridTabs/QtxGridTabs.vue.d.ts +11 -0
  27. package/dist/components/QtxGridTabs/index.d.ts +13 -0
  28. package/dist/components/QtxGridTabs/useGridItemPresence.d.ts +26 -0
  29. package/dist/components/QtxGridTabs/useGridTabs.d.ts +163 -0
  30. package/dist/components/QtxGridTabs/useGridTabsData.d.ts +20 -0
  31. package/dist/components/QtxGridTabs/useGridTabsUpdater.d.ts +24 -0
  32. package/dist/components/QtxHsvBackground/QtxHsvBackground.vue.d.ts +26 -0
  33. package/dist/components/QtxHsvBackground/index.d.ts +13 -0
  34. package/dist/components/QtxInputView/QtxInputView.vue.d.ts +42 -0
  35. package/dist/components/QtxInputView/QtxInputViewBase.vue.d.ts +46 -0
  36. package/dist/components/QtxInputView/index.d.ts +13 -0
  37. package/dist/components/QtxKeyboard/QtxKeyboard.vue.d.ts +59 -0
  38. package/dist/components/QtxKeyboard/index.d.ts +13 -0
  39. package/dist/components/QtxList/QtxList.vue.d.ts +96 -0
  40. package/dist/components/QtxList/QtxListBase.vue.d.ts +11 -0
  41. package/dist/components/QtxList/capture.d.ts +86 -0
  42. package/dist/components/QtxList/index.d.ts +13 -0
  43. package/dist/components/QtxList/types.d.ts +78 -0
  44. package/dist/components/QtxNumericKeyboard/QtxNumericKeyboard.vue.d.ts +28 -0
  45. package/dist/components/QtxNumericKeyboard/index.d.ts +13 -0
  46. package/dist/components/QtxPortalItem/QtxPortalItem.vue.d.ts +24 -0
  47. package/dist/components/QtxPortalItem/index.d.ts +13 -0
  48. package/dist/components/QtxPortalPool/QtxPortalPool.vue.d.ts +11 -0
  49. package/dist/components/QtxPortalPool/index.d.ts +13 -0
  50. package/dist/components/QtxPoster/QtxPoster.vue.d.ts +60 -0
  51. package/dist/components/QtxPoster/QtxPosterBase.vue.d.ts +117 -0
  52. package/dist/components/QtxPoster/index.d.ts +13 -0
  53. package/dist/components/QtxPoster/types.d.ts +133 -0
  54. package/dist/components/QtxRadioGroup/QtxRadioGroup.vue.d.ts +103 -0
  55. package/dist/components/QtxRadioGroup/index.d.ts +13 -0
  56. package/dist/components/QtxRatingBar/QtxRatingBar.vue.d.ts +34 -0
  57. package/dist/components/QtxRatingBar/index.d.ts +13 -0
  58. package/dist/components/QtxSettingSwitch/QtxSettingSwitch.vue.d.ts +111 -0
  59. package/dist/components/QtxSettingSwitch/index.d.ts +6 -0
  60. package/dist/components/QtxSvgImage/QtxSvgImage.vue.d.ts +26 -0
  61. package/dist/components/QtxSvgImage/index.d.ts +13 -0
  62. package/dist/components/QtxSwitcher/QtxSwitcher.vue.d.ts +52 -0
  63. package/dist/components/QtxSwitcher/index.d.ts +13 -0
  64. package/dist/components/QtxTabContent/QtxTabContent.vue.d.ts +24 -0
  65. package/dist/components/QtxTabs/QtxTabs.vue.d.ts +37 -0
  66. package/dist/components/QtxTabs/index.d.ts +16 -0
  67. package/dist/core/installQtx.d.ts +40 -0
  68. package/dist/core/portalCoordinator.d.ts +4 -0
  69. package/dist/core/qtxGate.d.ts +13 -0
  70. package/dist/core/theme.d.ts +12 -0
  71. package/dist/directives/v-portal-to.d.ts +4 -0
  72. package/dist/index.d.ts +146 -0
  73. package/dist/modules/AddonEnvModule.d.ts +4 -0
  74. package/dist/modules/ExtraUIConfigModule.d.ts +7 -0
  75. package/dist/modules/GridTabsConfigModule.d.ts +7 -0
  76. package/dist/modules/QtxVersionModule.d.ts +4 -0
  77. package/dist/preset-items/QtxStyledList.vue.d.ts +65 -0
  78. package/dist/preset-items/compact.d.ts +2 -0
  79. package/dist/preset-items/glint.d.ts +11 -0
  80. package/dist/preset-items/index.d.ts +45 -0
  81. package/dist/preset-items/retired-items.d.ts +22 -0
  82. package/dist/preset-items/types.d.ts +112 -0
  83. package/dist/qtx.cjs.js +1 -0
  84. package/dist/qtx.es.js +6847 -0
  85. package/dist/style.css +1 -0
  86. package/dist/types/index.d.ts +50 -0
  87. package/package.json +32 -4
@@ -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
+ };
@@ -0,0 +1,46 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ text?: string | undefined;
3
+ placeholder?: string | undefined;
4
+ type?: string | undefined;
5
+ status?: string | undefined;
6
+ disabled?: boolean | undefined;
7
+ inputSize?: string | undefined;
8
+ cursorVisible?: boolean | undefined;
9
+ useSystemKeyboard?: boolean | undefined;
10
+ trailingIcon?: string | undefined;
11
+ }>>, {
12
+ getNativeNode: () => any;
13
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ onInputClick: (payload?: any) => void;
15
+ onChange: (payload?: any) => void;
16
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
17
+ text?: string | undefined;
18
+ placeholder?: string | undefined;
19
+ type?: string | undefined;
20
+ status?: string | undefined;
21
+ disabled?: boolean | undefined;
22
+ inputSize?: string | undefined;
23
+ cursorVisible?: boolean | undefined;
24
+ useSystemKeyboard?: boolean | undefined;
25
+ trailingIcon?: string | undefined;
26
+ }>>> & Readonly<{
27
+ onOnChange?: ((payload?: any) => any) | undefined;
28
+ onOnInputClick?: ((payload?: any) => any) | undefined;
29
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
30
+ default?(_: {}): any;
31
+ }>;
32
+ export default _default;
33
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
34
+ type __VLS_TypePropsToRuntimeProps<T> = {
35
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
36
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
37
+ } : {
38
+ type: import('vue').PropType<T[K]>;
39
+ required: true;
40
+ };
41
+ };
42
+ type __VLS_WithTemplateSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import QtxInputView from './QtxInputView.vue';
3
+ export declare const QtxInputViewPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { QtxInputView };
7
+ export default QtxInputViewPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ QtxInputView: typeof QtxInputView;
11
+ 'qtx-input-view': typeof QtxInputView;
12
+ }
13
+ }
@@ -0,0 +1,59 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ backgroundColor?: string | undefined;
3
+ backgroundGradient?: string | undefined;
4
+ textColor?: string | undefined;
5
+ weakTextColor?: string | undefined;
6
+ focusBackgroundColor?: string | undefined;
7
+ focusTextColor?: string | undefined;
8
+ placeholder?: string | undefined;
9
+ textFullKeyboard?: string | undefined;
10
+ textT9Keyboard?: string | undefined;
11
+ keyboardType?: any;
12
+ textClear?: string | undefined;
13
+ textDelete?: string | undefined;
14
+ currentInput?: string | undefined;
15
+ autofocus?: boolean | undefined;
16
+ rememberKeyboardType?: boolean | undefined;
17
+ }>>, {
18
+ getNativeNode: () => any;
19
+ requestFocus: (...args: any[]) => void;
20
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ onInputChanged: (payload?: any) => void;
22
+ onKeyPressed: (payload?: any) => void;
23
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
24
+ backgroundColor?: string | undefined;
25
+ backgroundGradient?: string | undefined;
26
+ textColor?: string | undefined;
27
+ weakTextColor?: string | undefined;
28
+ focusBackgroundColor?: string | undefined;
29
+ focusTextColor?: string | undefined;
30
+ placeholder?: string | undefined;
31
+ textFullKeyboard?: string | undefined;
32
+ textT9Keyboard?: string | undefined;
33
+ keyboardType?: any;
34
+ textClear?: string | undefined;
35
+ textDelete?: string | undefined;
36
+ currentInput?: string | undefined;
37
+ autofocus?: boolean | undefined;
38
+ rememberKeyboardType?: boolean | undefined;
39
+ }>>> & Readonly<{
40
+ onOnInputChanged?: ((payload?: any) => any) | undefined;
41
+ onOnKeyPressed?: ((payload?: any) => any) | undefined;
42
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
43
+ default?(_: {}): any;
44
+ }>;
45
+ export default _default;
46
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
47
+ type __VLS_TypePropsToRuntimeProps<T> = {
48
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
49
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
50
+ } : {
51
+ type: import('vue').PropType<T[K]>;
52
+ required: true;
53
+ };
54
+ };
55
+ type __VLS_WithTemplateSlots<T, S> = T & {
56
+ new (): {
57
+ $slots: S;
58
+ };
59
+ };
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import QtxKeyboard from './QtxKeyboard.vue';
3
+ export declare const QtxKeyboardPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { QtxKeyboard };
7
+ export default QtxKeyboardPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ QtxKeyboard: typeof QtxKeyboard;
11
+ 'qtx-keyboard': typeof QtxKeyboard;
12
+ }
13
+ }
@@ -0,0 +1,96 @@
1
+ import type { QtxListItem, QtxListProps } from './types';
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<QtxListProps>, {
3
+ columns: number;
4
+ keyField: string;
5
+ direction: string;
6
+ gutter: number;
7
+ itemHeight: number;
8
+ loadingTail: boolean;
9
+ }>>, {
10
+ getNativeNode: () => any;
11
+ updateItem(index: number, patch: Partial<QtxListItem>): Promise<void>;
12
+ addListData(items: QtxListItem[]): Promise<void>;
13
+ /** P1 组2:头部插入(下拉刷新语义,E3)——业务同步维护本地数组 */
14
+ prependItems(items: QtxListItem[]): void;
15
+ /** P1 组2:删除行(E4) */
16
+ removeItem(index: number): Promise<void>;
17
+ /** P1 组2:移动行到目标行之前(E4,引擎 before/after + anchor 语义)
18
+ * 注意:from/to 以「当前 props.items 序」为准,业务须在改本地数组前调用 */
19
+ moveItemBefore(from: number, to: number): void;
20
+ /** P1 组2:清空(E1 空态切换)——等价 setListData([]),走同实例反射清空 */
21
+ clearItems(): Promise<void>;
22
+ /** P2 组2:滚动到行(smooth=false 立即定位;scrollCommand prop 通道) */
23
+ scrollToIndex(index: number, smooth?: boolean): Promise<void>;
24
+ /** loading 尾卡手动控制(盲写反馈坑3 收尾姿势):hasMore=false 时 setLoading(false)
25
+ * 隐藏尾卡并抑制触底反复重显;下次分页前 setLoading(true) 重新武装。 */
26
+ setLoading(visible: boolean): Promise<void>;
27
+ /** 定位并聚焦行(滚动到可见 + requestFocus——hub.focus 反射通道;
28
+ * fav 验收缺口 §304 收口:TAB 切换后落列表首项的官方姿势) */
29
+ focusItem(index: number): Promise<void>;
30
+ /** P2 组2:全量重设(以传入数组为权威快照;空数组 = 清空) */
31
+ setListData(items: QtxListItem[]): Promise<void>;
32
+ /** P2 组2:以下发数据整体刷新 */
33
+ refresh(): void;
34
+ /** 通用指令入口(command prop 通道) */
35
+ /** 通用指令入口:重建通道时代等价全量刷新 */
36
+ dispatchAction(actions: unknown): void;
37
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
38
+ "item-click": (...args: any[]) => void;
39
+ "item-focus": (...args: any[]) => void;
40
+ "load-more": (...args: any[]) => void;
41
+ "nested-item-click": (...args: any[]) => void;
42
+ "nested-item-focus": (...args: any[]) => void;
43
+ "capture-diagnostics": (...args: any[]) => void;
44
+ onItemEvent: (...args: any[]) => void;
45
+ "portal-viewport-enter": (...args: any[]) => void;
46
+ "portal-viewport-leave": (...args: any[]) => void;
47
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<QtxListProps>, {
48
+ columns: number;
49
+ keyField: string;
50
+ direction: string;
51
+ gutter: number;
52
+ itemHeight: number;
53
+ loadingTail: boolean;
54
+ }>>> & Readonly<{
55
+ "onItem-click"?: ((...args: any[]) => any) | undefined;
56
+ "onItem-focus"?: ((...args: any[]) => any) | undefined;
57
+ "onLoad-more"?: ((...args: any[]) => any) | undefined;
58
+ "onNested-item-click"?: ((...args: any[]) => any) | undefined;
59
+ "onNested-item-focus"?: ((...args: any[]) => any) | undefined;
60
+ "onCapture-diagnostics"?: ((...args: any[]) => any) | undefined;
61
+ onOnItemEvent?: ((...args: any[]) => any) | undefined;
62
+ "onPortal-viewport-enter"?: ((...args: any[]) => any) | undefined;
63
+ "onPortal-viewport-leave"?: ((...args: any[]) => any) | undefined;
64
+ }>, {
65
+ keyField: string;
66
+ columns: number;
67
+ direction: "horizontal" | "vertical";
68
+ itemHeight: number;
69
+ gutter: number;
70
+ loadingTail: boolean;
71
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
72
+ portals?(_: {}): any;
73
+ }>;
74
+ export default _default;
75
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
76
+ type __VLS_TypePropsToRuntimeProps<T> = {
77
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
78
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
79
+ } : {
80
+ type: import('vue').PropType<T[K]>;
81
+ required: true;
82
+ };
83
+ };
84
+ type __VLS_WithDefaults<P, D> = {
85
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
86
+ default: D[K];
87
+ }> : P[K];
88
+ };
89
+ type __VLS_Prettify<T> = {
90
+ [K in keyof T]: T[K];
91
+ } & {};
92
+ type __VLS_WithTemplateSlots<T, S> = T & {
93
+ new (): {
94
+ $slots: S;
95
+ };
96
+ };
@@ -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,86 @@
1
+ /**
2
+ * 探针捕获器(QtxListSDUI.md §5):#item 插槽 → 模板树 + 绑定描述符。
3
+ *
4
+ * 机制:以带哨兵值的记录代理作探针 item 屏外调用插槽函数(纯函数调用,不挂载),
5
+ * 遍历 VNode 产物——含哨兵的属性值恢复为 path/concat 描述符(T0),
6
+ * 恢复不了的进诊断(T1 候选),静态值冻结进 layout/props(§6 归一化)。
7
+ *
8
+ * M2 spike 边界(决策门实验对象):
9
+ * - 仅支持词汇表内的原生标签子树;自定义组件/带状态子树 → 诊断(T2,M3 Portal 兜底)
10
+ * - 三元/比较等完整表达式在运行时不可恢复(值已被求值)→ 若其依赖路径未被任何
11
+ * 属性消费,产出 unaccounted 诊断(潜在隐性绑定警示);v2 编译期提取彻底解决
12
+ * - 带参格式化器(toFixed(1))不可恢复参数 → 诊断;无参 toUpperCase/trim 可恢复
13
+ */
14
+ export interface TemplateNodeJson {
15
+ id: string;
16
+ pid: string | null;
17
+ tag: string;
18
+ tier: number;
19
+ layout: Record<string, unknown>;
20
+ props: Record<string, unknown>;
21
+ binds: Record<string, unknown>;
22
+ events: string[];
23
+ /** v-for 折叠产物(P0-3):list 路径 + key;单元 binds 以 $each 相对路径引用 */
24
+ repeat?: {
25
+ list: unknown;
26
+ key: unknown;
27
+ } | null;
28
+ /** P0-6 焦点态样式(focus-* 键) */
29
+ focusStyle?: Record<string, unknown>;
30
+ }
31
+ export interface TemplateRegistrationJson {
32
+ viewType: string;
33
+ discriminators: unknown[];
34
+ rootId: string;
35
+ nodes: TemplateNodeJson[];
36
+ /**
37
+ * M3-4 混排:JS 侧行→模板分配的判别组合(§5.2 的运行时形态)。
38
+ * P1 组3:嵌套判别(外层 v-if 分支内的内层 v-if)需组合匹配——单字段 disc 升级
39
+ * 为 discs 数组(行数据须全匹配才命中该模板;空数组 = base 兜底)。
40
+ * 原生按 §3 忽略此字段;编译期提取(v2)落地后转为原生 discriminators 求值。
41
+ */
42
+ discs?: Array<{
43
+ path: string;
44
+ value: unknown;
45
+ }> | null;
46
+ }
47
+ export interface CaptureDiagnostic {
48
+ level: 'warn' | 'error';
49
+ nodeId: string;
50
+ reason: string;
51
+ detail: string;
52
+ fix: string;
53
+ }
54
+ export interface CaptureResult {
55
+ templates: TemplateRegistrationJson[];
56
+ diagnostics: CaptureDiagnostic[];
57
+ /** 探测到但未被任何属性消费的路径(隐性绑定候选,三元/方法调用特征) */
58
+ unaccountedPaths: string[];
59
+ /**
60
+ * P0-8 T1 求值器(§8.2 预投影):以真实行重渲染插槽(走该行自己的 v-if 分支),
61
+ * 按节点 id 对位提取 T1 属性真值 → 影子字段值集。单一共享(不按 viewType 查表:
62
+ * 求值以行真实渲染为准,与模板分配解耦——同构模板分裂 skip 亦无害)。
63
+ */
64
+ t1Evaluator: ((row: unknown) => Record<string, unknown> | null) | null;
65
+ }
66
+ export declare function fingerprint(canonical: string): string;
67
+ /**
68
+ * 捕获 #item 插槽为模板注册集(多样本混排版,§5.2)。
69
+ * 算法:哨兵全真值渲染得默认模板 + 「accessed-bound」暴露判别字段候选 →
70
+ * 枚举样本行中该字段的真实值做混合探针渲染(判别字段真值 + 其余哨兵)→
71
+ * 结构签名去重得到模板集;每模板携带 {path, value} 判别信息供行分配。
72
+ * @param slot 插槽函数
73
+ * @param sampleRows 数据代表行(用于判别字段取值枚举)
74
+ */
75
+ export declare function captureItemTemplate(slot: (scope: any) => any, sampleRows?: unknown[]): CaptureResult;
76
+ /** 行数据 → 原生 ItemEntity 线格式(itemId 锚点 + viewType + content)。
77
+ * t1Patch:P0-8 预投影的 T1 影子字段(binds 已指向影子键,随 content 下发)。 */
78
+ export declare function buildRowJson(item: Record<string, unknown>, keyField: string, viewType: string, t1Patch?: Record<string, unknown> | null): Record<string, unknown>;
79
+ export declare namespace buildRowJson {
80
+ var seq: number;
81
+ }
82
+ /**
83
+ * M3-4 行→模板分配(§5.2 运行时形态):特定判别值模板优先、无 disc 的默认模板兜底。
84
+ * 编译期提取(v2)后此逻辑转为原生 discriminators 求值。
85
+ */
86
+ export declare function pickViewType(templates: TemplateRegistrationJson[], row: Record<string, unknown>): string;
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import QtxList from './QtxList.vue';
3
+ export declare const QtxListPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { QtxList };
7
+ export default QtxListPlugin;
8
+ declare module 'vue' {
9
+ interface GlobalComponents {
10
+ QtxList: typeof QtxList;
11
+ 'qtx-list': typeof QtxList;
12
+ }
13
+ }