@veltra/utils 1.15.0 → 1.15.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.
- package/dist/ai/openai.d.ts +0 -2
- package/dist/ai/openai.js +1 -2
- package/dist/ai/request.d.ts +0 -2
- package/dist/ai/request.js +1 -2
- package/dist/ai/types.d.ts +0 -2
- package/dist/dom/class-name.d.ts +0 -2
- package/dist/dom/class-name.js +1 -2
- package/dist/dom/expand-transition.d.ts +0 -2
- package/dist/dom/expand-transition.js +1 -2
- package/dist/dom/highlight.d.ts +0 -2
- package/dist/dom/highlight.js +1 -2
- package/dist/dom/position.d.ts +0 -2
- package/dist/dom/position.js +1 -2
- package/dist/dom/style.d.ts +0 -2
- package/dist/dom/style.js +1 -2
- package/dist/dom/z-index.d.ts +0 -2
- package/dist/dom/z-index.js +1 -2
- package/dist/helper/create-increase.d.ts +0 -2
- package/dist/helper/create-increase.js +1 -2
- package/dist/helper/create-toggle.d.ts +0 -2
- package/dist/helper/create-toggle.js +1 -2
- package/dist/helper/frame.d.ts +0 -2
- package/dist/helper/frame.js +1 -2
- package/dist/helper/make-bem.d.ts +0 -2
- package/dist/helper/make-bem.js +1 -2
- package/dist/helper/overflow-nav.d.ts +0 -2
- package/dist/helper/overflow-nav.js +1 -2
- package/dist/helper/tween.d.ts +0 -2
- package/dist/helper/tween.js +1 -2
- package/dist/helper/vue.d.ts +0 -2
- package/dist/helper/vue.js +1 -2
- package/dist/reactive/proxy.d.ts +0 -2
- package/dist/reactive/proxy.js +1 -2
- package/dist/shared/constants.d.ts +0 -2
- package/dist/shared/constants.js +1 -2
- package/dist/types/component-common.d.ts +0 -2
- package/dist/types/form-context.d.ts +0 -2
- package/dist/types/form-context.js +1 -2
- package/dist/types/helper.d.ts +0 -2
- package/package.json +1 -1
package/dist/ai/openai.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AiMessage, AiStreamHandlers, AiTool } from "./types.js";
|
|
2
|
-
//#region src/ai/openai.d.ts
|
|
3
2
|
/** 请求体构造选项 */
|
|
4
3
|
export interface OpenAIBodyOptions {
|
|
5
4
|
/** 模型 id */
|
|
@@ -36,5 +35,4 @@ export declare function parseOpenAISSEStream(body: ReadableStream<Uint8Array>, s
|
|
|
36
35
|
* 响应形状不含可解析文本时返回 undefined。
|
|
37
36
|
*/
|
|
38
37
|
export declare function parseOpenAICompletionText(json: unknown): string | undefined;
|
|
39
|
-
//#endregion
|
|
40
38
|
//# sourceMappingURL=openai.d.ts.map
|
package/dist/ai/openai.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/ai/openai.ts
|
|
2
2
|
function toOpenAIMessages(messages, systemPrompt) {
|
|
3
3
|
const result = [];
|
|
4
4
|
if (systemPrompt) result.push({
|
|
@@ -205,7 +205,6 @@ function parseOpenAICompletionText(json) {
|
|
|
205
205
|
const message = isRecord(first) && isRecord(first.message) ? first.message : void 0;
|
|
206
206
|
return typeof message?.content === "string" ? message.content : void 0;
|
|
207
207
|
}
|
|
208
|
-
//#endregion
|
|
209
208
|
export { buildOpenAIBody, parseOpenAICompletionText, parseOpenAISSEStream };
|
|
210
209
|
|
|
211
210
|
//# sourceMappingURL=openai.js.map
|
package/dist/ai/request.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AiStreamHandlers, AiTextRequestOptions } from "./types.js";
|
|
2
|
-
//#region src/ai/request.d.ts
|
|
3
2
|
/** OpenAI 兼容请求的发送选项(body 用 buildOpenAIBody 构造) */
|
|
4
3
|
export interface OpenAIRequestOptions {
|
|
5
4
|
/** OpenAI 兼容 chat/completions 完整请求地址 */
|
|
@@ -33,5 +32,4 @@ export declare function requestOpenAIStream(options: OpenAIRequestOptions, callb
|
|
|
33
32
|
* 失败触发 onError;signal 中断不触发任何回调(静默)。
|
|
34
33
|
*/
|
|
35
34
|
export declare function requestAiText(options: AiTextRequestOptions): Promise<void>;
|
|
36
|
-
//#endregion
|
|
37
35
|
//# sourceMappingURL=request.d.ts.map
|
package/dist/ai/request.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { buildOpenAIBody, parseOpenAICompletionText, parseOpenAISSEStream } from "./openai.js";
|
|
2
|
-
|
|
2
|
+
// src/ai/request.ts
|
|
3
3
|
/**
|
|
4
4
|
* 发送 OpenAI 兼容 POST 并统一错误处理。
|
|
5
5
|
* 返回 null 表示失败(错误已报给 onError)或已中断(静默)。
|
|
@@ -106,7 +106,6 @@ async function requestAiText(options) {
|
|
|
106
106
|
}
|
|
107
107
|
onSuccess?.(text);
|
|
108
108
|
}
|
|
109
|
-
//#endregion
|
|
110
109
|
export { requestAiText, requestOpenAIStream };
|
|
111
110
|
|
|
112
111
|
//# sourceMappingURL=request.js.map
|
package/dist/ai/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/ai/types.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* AI 服务商配置(OpenAI 兼容 chat/completions)。
|
|
4
3
|
* 组件实例 prop 与全局配置(useConfig 的 ai 键)字段级合并后使用。
|
|
@@ -105,5 +104,4 @@ export interface AiTextRequestOptions {
|
|
|
105
104
|
/** 失败:网络错误、非 2xx 响应、流中断 */
|
|
106
105
|
onError?(error: Error): void;
|
|
107
106
|
}
|
|
108
|
-
//#endregion
|
|
109
107
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/dom/class-name.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { BEMFactory } from "../helper/make-bem.js";
|
|
2
2
|
import { CLS_PREFIX } from "../shared/constants.js";
|
|
3
|
-
//#region src/dom/class-name.d.ts
|
|
4
3
|
export declare const bem: BEMFactory<typeof CLS_PREFIX>;
|
|
5
4
|
export declare function addClass(el: HTMLElement, className: string | string[]): void;
|
|
6
5
|
export declare function removeClass(el: HTMLElement, className: string | string[]): void;
|
|
7
|
-
//#endregion
|
|
8
6
|
//# sourceMappingURL=class-name.d.ts.map
|
package/dist/dom/class-name.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeBEM } from "../helper/make-bem.js";
|
|
2
2
|
import "../shared/constants.js";
|
|
3
|
-
|
|
3
|
+
// src/dom/class-name.ts
|
|
4
4
|
const bem = makeBEM("u-");
|
|
5
5
|
function addClass(el, className) {
|
|
6
6
|
if (Array.isArray(className)) className.forEach((c) => el.classList.add(c));
|
|
@@ -10,7 +10,6 @@ function removeClass(el, className) {
|
|
|
10
10
|
if (Array.isArray(className)) className.forEach((c) => el.classList.remove(c));
|
|
11
11
|
else el.classList.remove(className);
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { addClass, bem, removeClass };
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=class-name.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/dom/expand-transition.d.ts
|
|
2
1
|
export interface ExpandTransitionOptions {
|
|
3
2
|
transition?: string;
|
|
4
3
|
enterTransition?: string;
|
|
@@ -27,5 +26,4 @@ export declare class ExpandTransition {
|
|
|
27
26
|
private resetTransitionStyles;
|
|
28
27
|
private resetTemporaryStyles;
|
|
29
28
|
}
|
|
30
|
-
//#endregion
|
|
31
29
|
//# sourceMappingURL=expand-transition.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { removeStyles, setStyles } from "./style.js";
|
|
2
|
-
|
|
2
|
+
// src/dom/expand-transition.ts
|
|
3
3
|
function readVerticalPadding(el) {
|
|
4
4
|
const { paddingTop, paddingBottom } = getComputedStyle(el);
|
|
5
5
|
return {
|
|
@@ -151,7 +151,6 @@ var ExpandTransition = class {
|
|
|
151
151
|
]);
|
|
152
152
|
}
|
|
153
153
|
};
|
|
154
|
-
//#endregion
|
|
155
154
|
export { ExpandTransition };
|
|
156
155
|
|
|
157
156
|
//# sourceMappingURL=expand-transition.js.map
|
package/dist/dom/highlight.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/dom/highlight.d.ts
|
|
2
1
|
interface HighlightChunk {
|
|
3
2
|
text: string;
|
|
4
3
|
highlight: boolean;
|
|
@@ -9,6 +8,5 @@ interface HighlightChunk {
|
|
|
9
8
|
* @param substrings 需要匹配的字串列表
|
|
10
9
|
*/
|
|
11
10
|
export declare function getHighlightChunks(str: string, substrings: string[]): HighlightChunk[];
|
|
12
|
-
//#endregion
|
|
13
11
|
export {};
|
|
14
12
|
//# sourceMappingURL=highlight.d.ts.map
|
package/dist/dom/highlight.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/dom/highlight.ts
|
|
2
2
|
const escapeRegexp = (term) => term.replace(/[|\\{}()[\]^$+*?.-]/g, (char) => `\\${char}`);
|
|
3
3
|
/**
|
|
4
4
|
* 获取文本高亮片段
|
|
@@ -13,7 +13,6 @@ function getHighlightChunks(str, substrings) {
|
|
|
13
13
|
highlight: re.test(text)
|
|
14
14
|
}));
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
export { getHighlightChunks };
|
|
18
17
|
|
|
19
18
|
//# sourceMappingURL=highlight.js.map
|
package/dist/dom/position.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/dom/position.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* 获取可滚动的父级(纵向或横向可滚动均计入:overflow-x 容器如横向滚动条
|
|
4
3
|
* 也是滚动父级,弹层需监听其 scroll 事件)
|
|
@@ -24,6 +23,5 @@ export declare function scrollIntoContainerView(el: HTMLElement, container: HTML
|
|
|
24
23
|
block?: ScrollViewPosition;
|
|
25
24
|
inline?: ScrollViewPosition;
|
|
26
25
|
}): void;
|
|
27
|
-
//#endregion
|
|
28
26
|
export {};
|
|
29
27
|
//# sourceMappingURL=position.d.ts.map
|
package/dist/dom/position.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/dom/position.ts
|
|
2
2
|
/**
|
|
3
3
|
* 获取可滚动的父级(纵向或横向可滚动均计入:overflow-x 容器如横向滚动条
|
|
4
4
|
* 也是滚动父级,弹层需监听其 scroll 事件)
|
|
@@ -54,7 +54,6 @@ function scrollIntoContainerView(el, container, options) {
|
|
|
54
54
|
else if (inline === "end") container.scrollLeft = eOffsetLeft - cClientWidth + eOffsetWidth;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { getNearestScrollParent, getScrollParents, scrollIntoContainerView };
|
|
59
58
|
|
|
60
59
|
//# sourceMappingURL=position.js.map
|
package/dist/dom/style.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CSSProperties } from "vue";
|
|
2
|
-
//#region src/dom/style.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* 给数值加上单位
|
|
5
4
|
* @param value 数值
|
|
@@ -19,5 +18,4 @@ export declare function setStyles(el: HTMLElement, styles: CSSProperties): void;
|
|
|
19
18
|
* @param props 要移除的样式属性
|
|
20
19
|
*/
|
|
21
20
|
export declare function removeStyles(el: HTMLElement, props: string[]): void;
|
|
22
|
-
//#endregion
|
|
23
21
|
//# sourceMappingURL=style.d.ts.map
|
package/dist/dom/style.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { str } from "@cat-kit/core";
|
|
2
|
-
|
|
2
|
+
// src/dom/style.ts
|
|
3
3
|
/**
|
|
4
4
|
* 给数值加上单位
|
|
5
5
|
* @param value 数值
|
|
@@ -32,7 +32,6 @@ function removeStyles(el, props) {
|
|
|
32
32
|
el.style.removeProperty(key);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
export { removeStyles, setStyles, withUnit };
|
|
37
36
|
|
|
38
37
|
//# sourceMappingURL=style.js.map
|
package/dist/dom/z-index.d.ts
CHANGED
package/dist/dom/z-index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { createIncrease } from "../helper/create-increase.js";
|
|
2
|
-
|
|
2
|
+
// src/dom/z-index.ts
|
|
3
3
|
/**
|
|
4
4
|
* z轴层级
|
|
5
5
|
* 保证每个新打开的弹框的位置都处于上层
|
|
6
6
|
*/
|
|
7
7
|
const zIndex = createIncrease(1e3);
|
|
8
|
-
//#endregion
|
|
9
8
|
export { zIndex };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=z-index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helper/create-increase.ts
|
|
2
2
|
/**
|
|
3
3
|
* 创建一个自增函数
|
|
4
4
|
* @param initial 初始值
|
|
@@ -11,7 +11,6 @@ function createIncrease(initial = 1e3) {
|
|
|
11
11
|
};
|
|
12
12
|
return increase;
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
14
|
export { createIncrease };
|
|
16
15
|
|
|
17
16
|
//# sourceMappingURL=create-increase.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/helper/create-toggle.d.ts
|
|
2
1
|
type Active = boolean | ((active: boolean) => boolean) | ((active: boolean) => Promise<boolean>);
|
|
3
2
|
type ToggleReturn = [{
|
|
4
3
|
value: boolean;
|
|
@@ -10,6 +9,5 @@ type ToggleReturn = [{
|
|
|
10
9
|
* @returns
|
|
11
10
|
*/
|
|
12
11
|
export declare function createToggle(initial?: boolean, onChange?: (active: boolean) => void): ToggleReturn;
|
|
13
|
-
//#endregion
|
|
14
12
|
export {};
|
|
15
13
|
//# sourceMappingURL=create-toggle.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helper/create-toggle.ts
|
|
2
2
|
/**
|
|
3
3
|
* 创建一个toggle函数
|
|
4
4
|
* @param initial 初始值
|
|
@@ -18,7 +18,6 @@ function createToggle(initial = false, onChange) {
|
|
|
18
18
|
}
|
|
19
19
|
return [state, toggle];
|
|
20
20
|
}
|
|
21
|
-
//#endregion
|
|
22
21
|
export { createToggle };
|
|
23
22
|
|
|
24
23
|
//# sourceMappingURL=create-toggle.js.map
|
package/dist/helper/frame.d.ts
CHANGED
package/dist/helper/frame.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/helper/make-bem.d.ts
|
|
2
1
|
/** BEM实例 */
|
|
3
2
|
export type BEM<N extends string, P extends string = 'u-', B extends string = `${P}${N}`> = {
|
|
4
3
|
/** BEM中的块 */
|
|
@@ -48,5 +47,4 @@ export interface BEMFactory<Prefix extends string> {
|
|
|
48
47
|
* @param prefix 前缀
|
|
49
48
|
*/
|
|
50
49
|
export declare function makeBEM<Prefix extends '' | `${string}-`>(prefix: Prefix): BEMFactory<Prefix>;
|
|
51
|
-
//#endregion
|
|
52
50
|
//# sourceMappingURL=make-bem.d.ts.map
|
package/dist/helper/make-bem.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helper/make-bem.ts
|
|
2
2
|
/**
|
|
3
3
|
* 创建一个bem函数
|
|
4
4
|
* @param prefix 前缀
|
|
@@ -33,7 +33,6 @@ function makeBEM(prefix) {
|
|
|
33
33
|
bem.is = is;
|
|
34
34
|
return bem;
|
|
35
35
|
}
|
|
36
|
-
//#endregion
|
|
37
36
|
export { makeBEM };
|
|
38
37
|
|
|
39
38
|
//# sourceMappingURL=make-bem.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/helper/overflow-nav.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* 水平溢出滚动导航的共享纯逻辑(tabs / toolbar 三处复制的收敛,见 #17)。
|
|
4
3
|
* 只提供无 Vue 依赖的计算与副作用,事件绑定 / ResizeObserver / watch 由各
|
|
@@ -36,6 +35,5 @@ export declare function scrollElementIntoView(vp: HTMLElement, el: HTMLElement,
|
|
|
36
35
|
* navActive = 导航按钮是否可见(内容未溢出时不消费滚轮)。
|
|
37
36
|
*/
|
|
38
37
|
export declare function applyWheelHorizontalScroll(e: WheelEvent, vp: HTMLElement, navActive: boolean): void;
|
|
39
|
-
//#endregion
|
|
40
38
|
export {};
|
|
41
39
|
//# sourceMappingURL=overflow-nav.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helper/overflow-nav.ts
|
|
2
2
|
/** 依据视口与内容尺寸推导滚动按钮可用状态 */
|
|
3
3
|
function computeOverflowNavState(vp) {
|
|
4
4
|
const overflowing = vp.scrollWidth - vp.clientWidth > 1;
|
|
@@ -39,7 +39,6 @@ function applyWheelHorizontalScroll(e, vp, navActive) {
|
|
|
39
39
|
e.preventDefault();
|
|
40
40
|
vp.scrollLeft += e.deltaY;
|
|
41
41
|
}
|
|
42
|
-
//#endregion
|
|
43
42
|
export { applyWheelHorizontalScroll, computeOverflowNavState, scrollElementIntoView, scrollViewportByStep };
|
|
44
43
|
|
|
45
44
|
//# sourceMappingURL=overflow-nav.js.map
|
package/dist/helper/tween.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/helper/tween.d.ts
|
|
2
1
|
/** 自 cat-kit 3.x Tween 行为对齐的轻量动画(原 `cat-kit/fe` 导出) */
|
|
3
2
|
export interface AnimeConfig<State extends Record<string, number>> {
|
|
4
3
|
duration?: number;
|
|
@@ -38,5 +37,4 @@ export declare class Tween<State extends Record<string, number> = Record<string,
|
|
|
38
37
|
easeInOutBack: (p: number) => number;
|
|
39
38
|
};
|
|
40
39
|
}
|
|
41
|
-
//#endregion
|
|
42
40
|
//# sourceMappingURL=tween.d.ts.map
|
package/dist/helper/tween.js
CHANGED
package/dist/helper/vue.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ShallowRef, VNode, VNodeArrayChildren } from "vue";
|
|
2
|
-
//#region src/helper/vue.d.ts
|
|
3
2
|
interface TextVNode extends VNode {
|
|
4
3
|
children: string;
|
|
5
4
|
}
|
|
@@ -50,6 +49,5 @@ export declare function fieldKey(key: string | null | undefined, fallback: strin
|
|
|
50
49
|
*/
|
|
51
50
|
export declare function renderLabelTemplate(template: string | undefined, row: Record<string, any> | undefined | null): string | undefined;
|
|
52
51
|
export declare function shallowComputed<T>(getter: () => T): ShallowRef<T>;
|
|
53
|
-
//#endregion
|
|
54
52
|
export {};
|
|
55
53
|
//# sourceMappingURL=vue.d.ts.map
|
package/dist/helper/vue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o } from "@cat-kit/core";
|
|
2
2
|
import { Comment, Fragment, Text, createTextVNode, isVNode, shallowRef, watch } from "vue";
|
|
3
|
-
|
|
3
|
+
// src/helper/vue.ts
|
|
4
4
|
/**
|
|
5
5
|
* 是否为文本
|
|
6
6
|
* @param node
|
|
@@ -85,7 +85,6 @@ function shallowComputed(getter) {
|
|
|
85
85
|
});
|
|
86
86
|
return result;
|
|
87
87
|
}
|
|
88
|
-
//#endregion
|
|
89
88
|
export { extractNormalVNodes, fieldKey, isComment, isFragment, isTemplate, isTextNode, renderLabelTemplate, shallowComputed };
|
|
90
89
|
|
|
91
90
|
//# sourceMappingURL=vue.js.map
|
package/dist/reactive/proxy.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/reactive/proxy.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* 中间代理, 用于vue的reactive和shallowReactive方法的中间层
|
|
4
3
|
* @param o 代理对象
|
|
@@ -14,5 +13,4 @@ export declare function middleProxy<O extends Record<string, any>>(o: O, handler
|
|
|
14
13
|
*/
|
|
15
14
|
changed?: (fields: string[]) => void;
|
|
16
15
|
}): O;
|
|
17
|
-
//#endregion
|
|
18
16
|
//# sourceMappingURL=proxy.d.ts.map
|
package/dist/reactive/proxy.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/reactive/proxy.ts
|
|
2
2
|
/**
|
|
3
3
|
* 创建一个介于vue的reactive和shallowReactive对象的中间层
|
|
4
4
|
* @description
|
|
@@ -51,7 +51,6 @@ function createMiddleProxy(o, handler, options) {
|
|
|
51
51
|
function middleProxy(o, handler) {
|
|
52
52
|
return createMiddleProxy(o, handler);
|
|
53
53
|
}
|
|
54
|
-
//#endregion
|
|
55
54
|
export { middleProxy };
|
|
56
55
|
|
|
57
56
|
//# sourceMappingURL=proxy.js.map
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
//#region src/shared/constants.d.ts
|
|
2
1
|
/** 命名前缀 */
|
|
3
2
|
export declare const NAME_SPACE = "U";
|
|
4
3
|
/** 类前缀 */
|
|
5
4
|
export declare const CLS_PREFIX: "u-";
|
|
6
5
|
/** 表单空内容 */
|
|
7
6
|
export declare const FORM_EMPTY_CONTENT = "-";
|
|
8
|
-
//#endregion
|
|
9
7
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/shared/constants.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
// src/shared/constants.ts
|
|
2
2
|
/** 命名前缀 */
|
|
3
3
|
const NAME_SPACE = "U";
|
|
4
4
|
/** 类前缀 */
|
|
5
5
|
const CLS_PREFIX = `${"U".toLowerCase()}-`;
|
|
6
6
|
/** 表单空内容 */
|
|
7
7
|
const FORM_EMPTY_CONTENT = "-";
|
|
8
|
-
//#endregion
|
|
9
8
|
export { CLS_PREFIX, FORM_EMPTY_CONTENT, NAME_SPACE };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/types/component-common.d.ts
|
|
2
1
|
export type ComponentSize = 'small' | 'default' | 'large';
|
|
3
2
|
export type ColorType = 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
4
3
|
/** 断点名称 */
|
|
@@ -56,5 +55,4 @@ export interface PropsWithServerQuery {
|
|
|
56
55
|
/** 请求查询参数 */
|
|
57
56
|
query?: Record<string, any>;
|
|
58
57
|
}
|
|
59
|
-
//#endregion
|
|
60
58
|
//# sourceMappingURL=component-common.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentSize } from "./component-common.js";
|
|
2
|
-
//#region src/types/form-context.d.ts
|
|
3
2
|
export interface FormContextModel {
|
|
4
3
|
errors: Map<any, string[] | undefined>;
|
|
5
4
|
fields: Record<string, {
|
|
@@ -46,6 +45,5 @@ export declare function injectFormContext(): {
|
|
|
46
45
|
/** 是否在表单中 */
|
|
47
46
|
inForm: boolean;
|
|
48
47
|
} & Partial<DIContext>;
|
|
49
|
-
//#endregion
|
|
50
48
|
export {};
|
|
51
49
|
//# sourceMappingURL=form-context.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject, provide } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/types/form-context.ts
|
|
3
3
|
const FormComponentDIKey = Symbol("FormComponentDIKey");
|
|
4
4
|
function provideFormContext(context) {
|
|
5
5
|
provide(FormComponentDIKey, context);
|
|
@@ -11,7 +11,6 @@ function injectFormContext() {
|
|
|
11
11
|
...context
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
14
|
export { injectFormContext, provideFormContext };
|
|
16
15
|
|
|
17
16
|
//# sourceMappingURL=form-context.js.map
|
package/dist/types/helper.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { VNode } from "vue";
|
|
2
|
-
//#region src/types/helper.d.ts
|
|
3
2
|
export type Null<T> = null | T;
|
|
4
3
|
export type Undef<T> = undefined | T;
|
|
5
4
|
/** 自定义事件, 可以指定target类型 */
|
|
@@ -16,5 +15,4 @@ export type Index<Keys extends string, Val> = { [key in Keys]?: Val; };
|
|
|
16
15
|
* 渲染函数返回内容
|
|
17
16
|
*/
|
|
18
17
|
export type RenderReturn = (undefined | VNode | string | null | number)[] | undefined | VNode | string | null | number;
|
|
19
|
-
//#endregion
|
|
20
18
|
//# sourceMappingURL=helper.d.ts.map
|