@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.
- package/AI_CONTRACT.md +472 -0
- package/README.md +173 -2
- package/dist/components/QtxAppIcon/QtxAppIcon.vue.d.ts +73 -0
- package/dist/components/QtxAppIcon/QtxAppIconBase.vue.d.ts +144 -0
- package/dist/components/QtxAppIcon/index.d.ts +13 -0
- package/dist/components/QtxAppIcon/types.d.ts +157 -0
- package/dist/components/QtxButton/QtxButton.vue.d.ts +24 -0
- package/dist/components/QtxButton/QtxButtonBase.vue.d.ts +64 -0
- package/dist/components/QtxButton/index.d.ts +13 -0
- package/dist/components/QtxCheckbox/QtxCheckbox.vue.d.ts +110 -0
- package/dist/components/QtxCheckbox/index.d.ts +13 -0
- package/dist/components/QtxCheckboxGroup/QtxCheckboxGroup.vue.d.ts +103 -0
- package/dist/components/QtxCheckboxGroup/index.d.ts +13 -0
- package/dist/components/QtxCollapseMenuGroup/QtxCollapseMenuGroup.vue.d.ts +9 -0
- package/dist/components/QtxCollapseMenuGroup/QtxCollapseMenuGroupBase.vue.d.ts +40 -0
- package/dist/components/QtxCollapseMenuGroup/index.d.ts +13 -0
- package/dist/components/QtxCollapseMenuList/QtxCollapseMenuList.vue.d.ts +12 -0
- package/dist/components/QtxCollapseMenuList/QtxCollapseMenuListBase.vue.d.ts +32 -0
- package/dist/components/QtxCollapseMenuList/index.d.ts +13 -0
- package/dist/components/QtxDatePicker/QtxDatePicker.vue.d.ts +28 -0
- package/dist/components/QtxDatePicker/index.d.ts +13 -0
- package/dist/components/QtxGridTabs/QtxGridTabs.vue.d.ts +11 -0
- package/dist/components/QtxGridTabs/index.d.ts +13 -0
- package/dist/components/QtxGridTabs/useGridItemPresence.d.ts +26 -0
- package/dist/components/QtxGridTabs/useGridTabs.d.ts +163 -0
- package/dist/components/QtxGridTabs/useGridTabsData.d.ts +20 -0
- package/dist/components/QtxGridTabs/useGridTabsUpdater.d.ts +24 -0
- package/dist/components/QtxHsvBackground/QtxHsvBackground.vue.d.ts +26 -0
- package/dist/components/QtxHsvBackground/index.d.ts +13 -0
- package/dist/components/QtxInputView/QtxInputView.vue.d.ts +42 -0
- package/dist/components/QtxInputView/QtxInputViewBase.vue.d.ts +46 -0
- package/dist/components/QtxInputView/index.d.ts +13 -0
- package/dist/components/QtxKeyboard/QtxKeyboard.vue.d.ts +59 -0
- package/dist/components/QtxKeyboard/index.d.ts +13 -0
- package/dist/components/QtxList/QtxList.vue.d.ts +96 -0
- package/dist/components/QtxList/QtxListBase.vue.d.ts +11 -0
- package/dist/components/QtxList/capture.d.ts +86 -0
- package/dist/components/QtxList/index.d.ts +13 -0
- package/dist/components/QtxList/types.d.ts +78 -0
- package/dist/components/QtxNumericKeyboard/QtxNumericKeyboard.vue.d.ts +28 -0
- package/dist/components/QtxNumericKeyboard/index.d.ts +13 -0
- package/dist/components/QtxPortalItem/QtxPortalItem.vue.d.ts +24 -0
- package/dist/components/QtxPortalItem/index.d.ts +13 -0
- package/dist/components/QtxPortalPool/QtxPortalPool.vue.d.ts +11 -0
- package/dist/components/QtxPortalPool/index.d.ts +13 -0
- package/dist/components/QtxPoster/QtxPoster.vue.d.ts +60 -0
- package/dist/components/QtxPoster/QtxPosterBase.vue.d.ts +117 -0
- package/dist/components/QtxPoster/index.d.ts +13 -0
- package/dist/components/QtxPoster/types.d.ts +133 -0
- package/dist/components/QtxRadioGroup/QtxRadioGroup.vue.d.ts +103 -0
- package/dist/components/QtxRadioGroup/index.d.ts +13 -0
- package/dist/components/QtxRatingBar/QtxRatingBar.vue.d.ts +34 -0
- package/dist/components/QtxRatingBar/index.d.ts +13 -0
- package/dist/components/QtxSettingSwitch/QtxSettingSwitch.vue.d.ts +111 -0
- package/dist/components/QtxSettingSwitch/index.d.ts +6 -0
- package/dist/components/QtxSvgImage/QtxSvgImage.vue.d.ts +26 -0
- package/dist/components/QtxSvgImage/index.d.ts +13 -0
- package/dist/components/QtxSwitcher/QtxSwitcher.vue.d.ts +52 -0
- package/dist/components/QtxSwitcher/index.d.ts +13 -0
- package/dist/components/QtxTabContent/QtxTabContent.vue.d.ts +24 -0
- package/dist/components/QtxTabs/QtxTabs.vue.d.ts +37 -0
- package/dist/components/QtxTabs/index.d.ts +16 -0
- package/dist/core/installQtx.d.ts +40 -0
- package/dist/core/portalCoordinator.d.ts +4 -0
- package/dist/core/qtxGate.d.ts +13 -0
- package/dist/core/theme.d.ts +12 -0
- package/dist/directives/v-portal-to.d.ts +4 -0
- package/dist/index.d.ts +139 -0
- package/dist/modules/AddonEnvModule.d.ts +4 -0
- package/dist/modules/ExtraUIConfigModule.d.ts +7 -0
- package/dist/modules/GridTabsConfigModule.d.ts +7 -0
- package/dist/modules/QtxVersionModule.d.ts +4 -0
- package/dist/preset-items/QtxStyledList.vue.d.ts +65 -0
- package/dist/preset-items/compact.d.ts +2 -0
- package/dist/preset-items/glint.d.ts +11 -0
- package/dist/preset-items/index.d.ts +45 -0
- package/dist/preset-items/retired-items.d.ts +22 -0
- package/dist/preset-items/types.d.ts +112 -0
- package/dist/qtx.cjs.js +1 -0
- package/dist/qtx.es.js +6375 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +50 -0
- package/package.json +32 -4
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QtxList 组件签名类型(QtxListSDUI.md 契约)。
|
|
3
|
+
* 独立文件以避免 index.ts ⇄ QtxList.vue 类型循环。
|
|
4
|
+
*/
|
|
5
|
+
/** 行数据:键值开放;keyField 指定的字段作为 itemId 锚点(GridTabsSDUI.md §6.13 指令寻址) */
|
|
6
|
+
export interface QtxListItem {
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface QtxListProps {
|
|
10
|
+
/** 行数据(普通响应式数组,可直接变更;捕获期可后置填充) */
|
|
11
|
+
items?: QtxListItem[];
|
|
12
|
+
/** 列数:1 = 纵向列表,N = 网格(默认 1) */
|
|
13
|
+
columns?: number;
|
|
14
|
+
/** itemId 锚点字段名(默认 'id';缺失时组件按索引生成稳定 id) */
|
|
15
|
+
keyField?: string;
|
|
16
|
+
/** 滚动方向(默认 'vertical';'horizontal' 随 M3 提供) */
|
|
17
|
+
direction?: 'vertical' | 'horizontal';
|
|
18
|
+
/** 单元格定高(px,网格必填或与 itemAspectRatio 二选一) */
|
|
19
|
+
itemHeight?: number;
|
|
20
|
+
/** 单元格宽高比(与 columns 共同推导高度) */
|
|
21
|
+
itemAspectRatio?: number;
|
|
22
|
+
/** 单元格间距(px,默认 0) */
|
|
23
|
+
gutter?: number;
|
|
24
|
+
/** 启用触底分页(触发 load-more 事件,默认 false) */
|
|
25
|
+
pageEnabled?: boolean;
|
|
26
|
+
/** B2-1:loading 尾卡开关(C 方案)。开启时 load-more 触发自动显示尾卡、数据到达自动隐藏;默认关闭 */
|
|
27
|
+
loadingTail?: boolean;
|
|
28
|
+
/** 初始焦点行索引(默认 0) */
|
|
29
|
+
initialFocusIndex?: number;
|
|
30
|
+
/**
|
|
31
|
+
* 原生直通属性(内部):{"templates":[...],"items":[...]} 原子初始化载荷。
|
|
32
|
+
* 由组件内部捕获管线生成,业务侧无需传。
|
|
33
|
+
*/
|
|
34
|
+
initData?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface QtxListItemEvent {
|
|
37
|
+
item: QtxListItem | undefined;
|
|
38
|
+
index: number;
|
|
39
|
+
/** 触发节点(§8.1 事件载荷的 nodeId) */
|
|
40
|
+
nodeId?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface QtxListLoadMoreEvent {
|
|
43
|
+
pageNo: number;
|
|
44
|
+
/** 触发触底的末尾 itemId */
|
|
45
|
+
itemId?: string;
|
|
46
|
+
}
|
|
47
|
+
/** 组件事件全集(§8.1;曝光批次复用 GT §6.15 VIEW_PRESENCE_BATCH) */
|
|
48
|
+
export declare const QTX_LIST_EVENTS: readonly ["item-click", "item-focus", "item-bind", "item-unbind", "load-more"];
|
|
49
|
+
export type QtxListEventName = (typeof QTX_LIST_EVENTS)[number];
|
|
50
|
+
/** ref 暴露方法:与 QtxList.vue 的 defineExpose(listApi) 一一对应;改实现须同步本接口并重跑 docs:gen */
|
|
51
|
+
export interface QtxListExpose {
|
|
52
|
+
/** 取原生节点代理(Base→gate→$el,带 nodeId) */
|
|
53
|
+
getNativeNode(): any;
|
|
54
|
+
/** 单行增量更新(等价 items[index] 局部赋值,走 UPDATE_ITEM) */
|
|
55
|
+
updateItem(index: number, patch: Partial<QtxListItem>): Promise<void>;
|
|
56
|
+
/** 追加数据(APPEND_SUB_ITEMS) */
|
|
57
|
+
addListData(items: QtxListItem[]): Promise<void>;
|
|
58
|
+
/** 头部插入(下拉刷新语义);业务须同步维护本地数组,结构性操作走重建 */
|
|
59
|
+
prependItems(items: QtxListItem[]): void;
|
|
60
|
+
/** 删除指定行;删除前把焦点迁移到相邻幸存行,避免焦点抖动 */
|
|
61
|
+
removeItem(index: number): Promise<void>;
|
|
62
|
+
/** 移动行到目标行之前;from/to 以当前 items 序为准,业务须在改本地数组前调用 */
|
|
63
|
+
moveItemBefore(from: number, to: number): void;
|
|
64
|
+
/** 清空列表(等价 setListData([]),空数据走同实例反射清空) */
|
|
65
|
+
clearItems(): Promise<void>;
|
|
66
|
+
/** 滚动到指定行(smooth=false 立即定位) */
|
|
67
|
+
scrollToIndex(index: number, smooth?: boolean): Promise<void>;
|
|
68
|
+
/** 手动控制 loading 尾卡;hasMore=false 时置 false 可抑制触底反复重显 */
|
|
69
|
+
setLoading(visible: boolean): Promise<void>;
|
|
70
|
+
/** 滚动到可见并聚焦指定行(TAB 切换后落列表首项的官方姿势) */
|
|
71
|
+
focusItem(index: number): Promise<void>;
|
|
72
|
+
/** 全量重设(以传入数组为权威快照;空数组即清空;替换 :items 引用可回到 props 驱动) */
|
|
73
|
+
setListData(items: QtxListItem[]): Promise<void>;
|
|
74
|
+
/** 以下发数据整体刷新(重建通道) */
|
|
75
|
+
refresh(): void;
|
|
76
|
+
/** 通用指令入口(当前实现等价全量刷新) */
|
|
77
|
+
dispatchAction(actions: unknown): void;
|
|
78
|
+
}
|
|
@@ -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 QtxNumericKeyboard from './QtxNumericKeyboard.vue';
|
|
3
|
+
export declare const QtxNumericKeyboardPlugin: {
|
|
4
|
+
install: (app: App) => void;
|
|
5
|
+
};
|
|
6
|
+
export { QtxNumericKeyboard };
|
|
7
|
+
export default QtxNumericKeyboardPlugin;
|
|
8
|
+
declare module 'vue' {
|
|
9
|
+
interface GlobalComponents {
|
|
10
|
+
QtxNumericKeyboard: typeof QtxNumericKeyboard;
|
|
11
|
+
'qtx-numeric-keyboard': typeof QtxNumericKeyboard;
|
|
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 QtxPortalItem from './QtxPortalItem.vue';
|
|
3
|
+
export declare const QtxPortalItemPlugin: {
|
|
4
|
+
install: (app: App) => void;
|
|
5
|
+
};
|
|
6
|
+
export { QtxPortalItem };
|
|
7
|
+
export default QtxPortalItemPlugin;
|
|
8
|
+
declare module 'vue' {
|
|
9
|
+
interface GlobalComponents {
|
|
10
|
+
QtxPortalItem: typeof QtxPortalItem;
|
|
11
|
+
'qtx-portal-item': typeof QtxPortalItem;
|
|
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 QtxPortalPool from './QtxPortalPool.vue';
|
|
3
|
+
export declare const QtxPortalPoolPlugin: {
|
|
4
|
+
install: (app: App) => void;
|
|
5
|
+
};
|
|
6
|
+
export { QtxPortalPool };
|
|
7
|
+
export default QtxPortalPoolPlugin;
|
|
8
|
+
declare module 'vue' {
|
|
9
|
+
interface GlobalComponents {
|
|
10
|
+
QtxPortalPool: typeof QtxPortalPool;
|
|
11
|
+
'qtx-portal-pool': typeof QtxPortalPool;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { QtxPosterProps, QtxPosterState } from './types';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<QtxPosterProps>>, {
|
|
3
|
+
getNativeNode(): any;
|
|
4
|
+
setImageSource(source: string, kind?: string | undefined): void;
|
|
5
|
+
setTitle(text: string): void;
|
|
6
|
+
setSubtitle(text: string): void;
|
|
7
|
+
setBadge(badge: Record<string, any> | null): void;
|
|
8
|
+
setPosterType(type: string): void;
|
|
9
|
+
setAspectRatio(ratio: number): void;
|
|
10
|
+
setLoadingState(loading: boolean): void;
|
|
11
|
+
applyPatch(patch: Record<string, any>): void;
|
|
12
|
+
cancelImageLoad(): void;
|
|
13
|
+
clear(): void;
|
|
14
|
+
recycle(): void;
|
|
15
|
+
requestFocus(): Promise<string>;
|
|
16
|
+
getState(): Promise<QtxPosterState>;
|
|
17
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
click: (payload: any) => void;
|
|
19
|
+
focus: (payload: any) => void;
|
|
20
|
+
blur: (payload: any) => void;
|
|
21
|
+
longClick: (payload: any) => void;
|
|
22
|
+
imageLoadStart: (payload: any) => void;
|
|
23
|
+
imageLoadSuccess: (payload: any) => void;
|
|
24
|
+
imageLoadError: (payload: any) => void;
|
|
25
|
+
stateChange: (payload: any) => void;
|
|
26
|
+
bind: (payload: any) => void;
|
|
27
|
+
recycle: (payload: any) => void;
|
|
28
|
+
patch: (payload: any) => void;
|
|
29
|
+
badgeClick: (payload: any) => void;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<QtxPosterProps>>> & Readonly<{
|
|
31
|
+
onBlur?: ((payload: any) => any) | undefined;
|
|
32
|
+
onClick?: ((payload: any) => any) | undefined;
|
|
33
|
+
onFocus?: ((payload: any) => any) | undefined;
|
|
34
|
+
onLongClick?: ((payload: any) => any) | undefined;
|
|
35
|
+
onImageLoadStart?: ((payload: any) => any) | undefined;
|
|
36
|
+
onImageLoadSuccess?: ((payload: any) => any) | undefined;
|
|
37
|
+
onImageLoadError?: ((payload: any) => any) | undefined;
|
|
38
|
+
onStateChange?: ((payload: any) => any) | undefined;
|
|
39
|
+
onBind?: ((payload: any) => any) | undefined;
|
|
40
|
+
onRecycle?: ((payload: any) => any) | undefined;
|
|
41
|
+
onPatch?: ((payload: any) => any) | undefined;
|
|
42
|
+
onBadgeClick?: ((payload: any) => any) | undefined;
|
|
43
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
44
|
+
default?(_: {}): any;
|
|
45
|
+
}>;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
48
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
49
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
50
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
51
|
+
} : {
|
|
52
|
+
type: import('vue').PropType<T[K]>;
|
|
53
|
+
required: true;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|