@tongfun/ui 0.0.0-alpha.3 → 0.0.1-alpha.10
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/README.md +110 -0
- package/dist/agent-schema/index.d.ts +12 -0
- package/dist/agent-schema/index.js +33 -0
- package/dist/agent-schema/types.d.ts +27 -0
- package/dist/formula/index.d.ts +17 -0
- package/dist/formula/types.d.ts +136 -0
- package/dist/html2canvas.esm-Bfw1xMTR.js +4886 -0
- package/dist/index-C0rb4BPV.js +482 -0
- package/dist/index-Ci3-2oB_.js +323459 -0
- package/dist/index.d.ts +719 -0
- package/dist/index.es-CoCAKfeh.js +5790 -0
- package/dist/index.js +842 -0
- package/dist/jspdf.es.min-B9-wXZ_S.js +10769 -0
- package/dist/lowcode-agent/icons.d.ts +12 -0
- package/dist/lowcode-agent/icons.js +229 -0
- package/dist/lowcode-agent/index.d.ts +27 -0
- package/dist/lowcode-agent/index.js +79577 -0
- package/dist/lowcode-agent/types.d.ts +471 -0
- package/dist/skill/golden-examples/dashboard-workbench.md +224 -0
- package/dist/skill/golden-examples/form-create.md +227 -0
- package/dist/skill/golden-examples/management-list.md +264 -0
- package/dist/skill/golden-examples/new-document.md +748 -0
- package/dist/skill/tongfun-ui-skill.json +470 -0
- package/dist/skill/tongfun-ui-skill.md +297 -0
- package/dist/style.css +10 -0
- package/package.json +113 -38
- package/Button/button-props.d.ts +0 -9
- package/Button/button-variants.d.ts +0 -5
- package/Button/index.d.ts +0 -20
- package/Button/index.js +0 -111
- package/index.css +0 -596
- package/index.d.ts +0 -15
- package/index.js +0 -19
- package/utils/forward-attrs.d.ts +0 -6
- package/utils/install.d.ts +0 -6
- package/utils/utils.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,38 +1,113 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tongfun/ui",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@tongfun/ui",
|
|
3
|
+
"version": "0.0.1-alpha.10",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"sideEffects": [
|
|
9
|
+
"*.css",
|
|
10
|
+
"**/*.css"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./style.css": "./dist/style.css",
|
|
19
|
+
"./lowcode-agent": {
|
|
20
|
+
"types": "./dist/lowcode-agent/index.d.ts",
|
|
21
|
+
"import": "./dist/lowcode-agent/index.js",
|
|
22
|
+
"default": "./dist/lowcode-agent/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./lowcode-agent/icons": {
|
|
25
|
+
"types": "./dist/lowcode-agent/icons.d.ts",
|
|
26
|
+
"import": "./dist/lowcode-agent/icons.js",
|
|
27
|
+
"default": "./dist/lowcode-agent/icons.js"
|
|
28
|
+
},
|
|
29
|
+
"./agent-schema": {
|
|
30
|
+
"types": "./dist/agent-schema/index.d.ts",
|
|
31
|
+
"import": "./dist/agent-schema/index.js",
|
|
32
|
+
"default": "./dist/agent-schema/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./skill.md": "./dist/skill/tongfun-ui-skill.md",
|
|
35
|
+
"./skill.json": "./dist/skill/tongfun-ui-skill.json",
|
|
36
|
+
"./golden-examples/*": "./dist/skill/golden-examples/*",
|
|
37
|
+
"./package.json": "./package.json",
|
|
38
|
+
"./component-registry-summary.json": "./dist/component-registry-summary.json"
|
|
39
|
+
},
|
|
40
|
+
"description": "企业级组件库 - 通用UI基础层 + 业务组件封装层",
|
|
41
|
+
"scripts": {
|
|
42
|
+
"dev": "vite playground --host 0.0.0.0",
|
|
43
|
+
"dev:mock": "vite playground --host 0.0.0.0 --mode mock",
|
|
44
|
+
"build:ui": "vite build && node scripts/generate-package-dts.mjs",
|
|
45
|
+
"build:business": "vite build packages/business",
|
|
46
|
+
"docs:dev": "vitepress dev packages/docs",
|
|
47
|
+
"docs:build": "vitepress build packages/docs",
|
|
48
|
+
"test": "vitest",
|
|
49
|
+
"test:coverage": "vitest --coverage",
|
|
50
|
+
"sync:registry": "node scripts/sync-lowcode-registry.mjs",
|
|
51
|
+
"lint": "eslint packages --ext .vue,.ts,.tsx",
|
|
52
|
+
"check:tokens": "node scripts/check-design-token-compliance.mjs",
|
|
53
|
+
"check:tokens:strict": "node scripts/check-design-token-compliance.mjs --strict",
|
|
54
|
+
"check:tokens:incremental": "node scripts/check-design-token-compliance.mjs --incremental",
|
|
55
|
+
"check:tokens:update-baseline": "node scripts/check-design-token-compliance.mjs --update-baseline",
|
|
56
|
+
"release": "changeset publish",
|
|
57
|
+
"build:registry": "node scripts/extract-ai-registry.mjs",
|
|
58
|
+
"deploy:registry": "node scripts/extract-ai-registry.mjs && node scripts/upload-registry-oss.mjs"
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"ag-grid-community": "^35.3.1",
|
|
62
|
+
"ag-grid-enterprise": "^35.3.1",
|
|
63
|
+
"ag-grid-vue3": "^35.3.1",
|
|
64
|
+
"axios": "^1.18.1",
|
|
65
|
+
"bpmn-js": "^18.26.0",
|
|
66
|
+
"class-variance-authority": "^0.7.1",
|
|
67
|
+
"clsx": "^2.1.1",
|
|
68
|
+
"cropperjs": "^2.1.1",
|
|
69
|
+
"echarts": "^6.1.0",
|
|
70
|
+
"html-to-image": "^1.11.13",
|
|
71
|
+
"jsbarcode": "^3.12.3",
|
|
72
|
+
"jspdf": "^4.2.1",
|
|
73
|
+
"localforage": "^1.10.0",
|
|
74
|
+
"lucide-vue-next": "^1.0.0",
|
|
75
|
+
"qrcode": "^1.5.4",
|
|
76
|
+
"reka-ui": "^2.9.8",
|
|
77
|
+
"tailwind-merge": "^3.6.0",
|
|
78
|
+
"vue": "^3.4.0",
|
|
79
|
+
"vue-echarts": "^8.0.1",
|
|
80
|
+
"vue-router": "^4.6.4"
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@changesets/cli": "^2.27.0",
|
|
84
|
+
"@eslint/js": "^10.0.1",
|
|
85
|
+
"@tailwindcss/postcss": "^4.3.1",
|
|
86
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
87
|
+
"@types/jsbarcode": "^3.11.4",
|
|
88
|
+
"@types/qrcode": "^1.5.6",
|
|
89
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
90
|
+
"@vue/test-utils": "^2.4.0",
|
|
91
|
+
"eslint": "^10.5.0",
|
|
92
|
+
"eslint-plugin-vue": "^10.9.2",
|
|
93
|
+
"happy-dom": "^13.10.1",
|
|
94
|
+
"postcss": "^8.5.15",
|
|
95
|
+
"shadcn-vue": "^2.7.3",
|
|
96
|
+
"tailwindcss": "^4.3.0",
|
|
97
|
+
"tw-animate-css": "^1.4.0",
|
|
98
|
+
"typescript": "^5.4.0",
|
|
99
|
+
"typescript-eslint": "^8.61.1",
|
|
100
|
+
"vite": "^5.0.0",
|
|
101
|
+
"vitepress": "^1.0.0",
|
|
102
|
+
"vitest": "^1.2.0",
|
|
103
|
+
"vue-eslint-parser": "^10.4.1"
|
|
104
|
+
},
|
|
105
|
+
"pnpm": {
|
|
106
|
+
"overrides": {}
|
|
107
|
+
},
|
|
108
|
+
"files": [
|
|
109
|
+
"dist",
|
|
110
|
+
"README.md",
|
|
111
|
+
"package.json"
|
|
112
|
+
]
|
|
113
|
+
}
|
package/Button/button-props.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { PrimitiveProps } from "reka-ui";
|
|
2
|
-
import type { HTMLAttributes } from "vue";
|
|
3
|
-
export type ButtonVariant = "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
4
|
-
export type ButtonSize = "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg";
|
|
5
|
-
export interface ButtonProps extends PrimitiveProps {
|
|
6
|
-
variant?: ButtonVariant;
|
|
7
|
-
size?: ButtonSize;
|
|
8
|
-
class?: HTMLAttributes["class"];
|
|
9
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { VariantProps } from "class-variance-authority";
|
|
2
|
-
export declare const buttonVariants: (props?: ({
|
|
3
|
-
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
4
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
-
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
package/Button/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { App, DefineComponent } from 'vue';
|
|
2
|
-
import type { ButtonProps } from './button-props.js';
|
|
3
|
-
export type { ButtonProps, ButtonSize, ButtonVariant } from './button-props.js';
|
|
4
|
-
export { buttonVariants } from './button-variants.js';
|
|
5
|
-
export type { ButtonVariants } from './button-variants.js';
|
|
6
|
-
declare const _Button: {
|
|
7
|
-
new (...args: any[]): any;
|
|
8
|
-
__isFragment?: never;
|
|
9
|
-
__isTeleport?: never;
|
|
10
|
-
__isSuspense?: never;
|
|
11
|
-
} & import("vue").ComponentOptionsBase<Readonly<any>, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {} | {
|
|
12
|
-
[x: string]: any;
|
|
13
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
14
|
-
install(app: App): void;
|
|
15
|
-
};
|
|
16
|
-
export default _Button;
|
|
17
|
-
type ErpButtonComponent = DefineComponent<ButtonProps> & {
|
|
18
|
-
install(app: App): void;
|
|
19
|
-
};
|
|
20
|
-
export declare const ErpButton: ErpButtonComponent;
|
package/Button/index.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { computed, createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, useAttrs, withCtx } from "vue";
|
|
2
|
-
import { Primitive } from "reka-ui";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { twMerge } from "tailwind-merge";
|
|
5
|
-
import { cva } from "class-variance-authority";
|
|
6
|
-
|
|
7
|
-
//#region src/utils/utils.ts
|
|
8
|
-
function cn(...inputs) {
|
|
9
|
-
return twMerge(clsx(inputs));
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/utils/forward-attrs.ts
|
|
14
|
-
function useForwardedAttrs() {
|
|
15
|
-
const attrs = useAttrs();
|
|
16
|
-
return {
|
|
17
|
-
forwardedAttrs: computed(() => {
|
|
18
|
-
const { class: _class,...rest } = attrs;
|
|
19
|
-
return rest;
|
|
20
|
-
}),
|
|
21
|
-
forwardedClass: computed(() => attrs.class)
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
|
-
//#region src/Button/button-variants.ts
|
|
27
|
-
const buttonVariants = cva("bg-[var(--ui-primary)] ", {
|
|
28
|
-
variants: { size: {
|
|
29
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
30
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
31
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
32
|
-
icon: "size-9",
|
|
33
|
-
"icon-sm": "size-8",
|
|
34
|
-
"icon-lg": "size-10"
|
|
35
|
-
} },
|
|
36
|
-
defaultVariants: { size: "default" }
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/Button/Button.vue?vue&type=script&setup=true&lang.ts
|
|
41
|
-
var Button_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
42
|
-
inheritAttrs: false,
|
|
43
|
-
__name: "Button",
|
|
44
|
-
props: {
|
|
45
|
-
variant: {
|
|
46
|
-
type: String,
|
|
47
|
-
required: false
|
|
48
|
-
},
|
|
49
|
-
size: {
|
|
50
|
-
type: String,
|
|
51
|
-
required: false
|
|
52
|
-
},
|
|
53
|
-
class: {
|
|
54
|
-
type: null,
|
|
55
|
-
required: false
|
|
56
|
-
},
|
|
57
|
-
asChild: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
required: false
|
|
60
|
-
},
|
|
61
|
-
as: {
|
|
62
|
-
type: null,
|
|
63
|
-
required: false,
|
|
64
|
-
default: "button"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
setup(__props) {
|
|
68
|
-
const props = __props;
|
|
69
|
-
const { forwardedAttrs, forwardedClass } = useForwardedAttrs();
|
|
70
|
-
return (_ctx, _cache) => {
|
|
71
|
-
return openBlock(), createBlock(unref(Primitive), mergeProps({
|
|
72
|
-
"data-slot": "button",
|
|
73
|
-
as: props.as,
|
|
74
|
-
"as-child": props.asChild
|
|
75
|
-
}, unref(forwardedAttrs), { class: unref(cn)(unref(buttonVariants)({
|
|
76
|
-
variant: props.variant,
|
|
77
|
-
size: props.size
|
|
78
|
-
}), unref(forwardedClass), props.class) }), {
|
|
79
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
80
|
-
_: 3
|
|
81
|
-
}, 16, [
|
|
82
|
-
"as",
|
|
83
|
-
"as-child",
|
|
84
|
-
"class"
|
|
85
|
-
]);
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
//#endregion
|
|
91
|
-
//#region src/Button/Button.vue
|
|
92
|
-
var Button_default$1 = Button_vue_vue_type_script_setup_true_lang_default;
|
|
93
|
-
|
|
94
|
-
//#endregion
|
|
95
|
-
//#region src/utils/install.ts
|
|
96
|
-
function withInstall(comp) {
|
|
97
|
-
const component = comp.default ?? comp;
|
|
98
|
-
component.install = (app) => {
|
|
99
|
-
if (component.name) app.component(component.name, component);
|
|
100
|
-
};
|
|
101
|
-
return component;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region src/Button/index.ts
|
|
106
|
-
const _Button = withInstall(Button_default$1);
|
|
107
|
-
var Button_default = _Button;
|
|
108
|
-
const ErpButton = _Button;
|
|
109
|
-
|
|
110
|
-
//#endregion
|
|
111
|
-
export { ErpButton, buttonVariants, Button_default as default };
|