@opentiny/genui-sdk-vue 1.2.1 → 1.3.0-alpha.3
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 +10 -2
- package/dist/ConfigProvider-BzxW9L3f.js +95 -0
- package/dist/ConfigProvider-BzxW9L3f.js.map +1 -0
- package/dist/GenuiRenderer-B9wcUl25.js +15164 -0
- package/dist/GenuiRenderer-B9wcUl25.js.map +1 -0
- package/dist/___vite-browser-external_commonjs-proxy-4gYZYw55.js +1 -0
- package/dist/___vite-browser-external_commonjs-proxy-4gYZYw55.js.map +1 -0
- package/dist/chat.d.ts +82 -2410
- package/dist/chat.js +18 -19
- package/dist/chat.js.map +1 -0
- package/dist/chat.types-BRLoMarP.js +1792 -0
- package/dist/chat.types-BRLoMarP.js.map +1 -0
- package/dist/config-provider.d.ts +9 -0
- package/dist/config-provider.js +6 -1
- package/dist/config-provider.js.map +1 -0
- package/dist/index.d.ts +89 -2407
- package/dist/index.js +28 -26
- package/dist/index.js.map +1 -0
- package/dist/{injection-tokens-D8CFCpjy.js → injection-tokens-CuDQs1ne.js} +49 -49
- package/dist/injection-tokens-CuDQs1ne.js.map +1 -0
- package/dist/legacy-chat.d.ts +1277 -0
- package/dist/legacy-chat.js +67 -0
- package/dist/legacy-chat.js.map +1 -0
- package/dist/legacy-renderer.d.ts +59 -0
- package/dist/legacy-renderer.js +41 -0
- package/dist/legacy-renderer.js.map +1 -0
- package/dist/renderer.d.ts +6 -2031
- package/dist/renderer.js +2 -1
- package/dist/renderer.js.map +1 -0
- package/dist/transform-jsx.d.ts +3 -1
- package/dist/transform-jsx.js +1 -0
- package/dist/transform-jsx.js.map +1 -0
- package/package.json +30 -33
- package/dist/ConfigProvider-BaJsiFgd.js +0 -86
- package/dist/SchemaCardRenderer-Bjn61C0M.js +0 -13440
- package/dist/chat.types-Cqd67Yp-.js +0 -1753
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/genui-sdk-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0-alpha.3",
|
|
4
4
|
"description": "A Vue3 component library for enhanced LLM display and interaction",
|
|
5
5
|
"author": "OpenTiny Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,10 +31,18 @@
|
|
|
31
31
|
"types": "./dist/chat.d.ts",
|
|
32
32
|
"import": "./dist/chat.js"
|
|
33
33
|
},
|
|
34
|
+
"./legacy-chat": {
|
|
35
|
+
"types": "./dist/legacy-chat.d.ts",
|
|
36
|
+
"import": "./dist/legacy-chat.js"
|
|
37
|
+
},
|
|
34
38
|
"./renderer": {
|
|
35
39
|
"types": "./dist/renderer.d.ts",
|
|
36
40
|
"import": "./dist/renderer.js"
|
|
37
41
|
},
|
|
42
|
+
"./legacy-renderer": {
|
|
43
|
+
"types": "./dist/legacy-renderer.d.ts",
|
|
44
|
+
"import": "./dist/legacy-renderer.js"
|
|
45
|
+
},
|
|
38
46
|
"./config-provider": {
|
|
39
47
|
"types": "./dist/config-provider.d.ts",
|
|
40
48
|
"import": "./dist/config-provider.js"
|
|
@@ -50,6 +58,8 @@
|
|
|
50
58
|
"README.md"
|
|
51
59
|
],
|
|
52
60
|
"dependencies": {
|
|
61
|
+
"@opentiny/genui-sdk-core": "1.3.0-alpha.3",
|
|
62
|
+
"@opentiny/genui-sdk-materials-vue-opentiny-vue": "1.3.0-alpha.3",
|
|
53
63
|
"@opentiny/tiny-robot": "0.3.3",
|
|
54
64
|
"@opentiny/tiny-robot-kit": "0.3.3",
|
|
55
65
|
"@opentiny/tiny-robot-svgs": "0.3.3",
|
|
@@ -59,38 +69,25 @@
|
|
|
59
69
|
"@opentiny/vue-theme": "^3.28.0",
|
|
60
70
|
"uuid": "^11.1.0",
|
|
61
71
|
"vue": "^3.5.13",
|
|
62
|
-
"@opentiny/vue-chart-bar": "~3.14.0",
|
|
63
|
-
"@opentiny/vue-chart-histogram": "~3.14.0",
|
|
64
|
-
"@opentiny/vue-chart-line": "~3.14.0",
|
|
65
|
-
"@opentiny/vue-chart-pie": "~3.14.0",
|
|
66
|
-
"@opentiny/vue-chart-radar": "~3.14.0",
|
|
67
|
-
"@opentiny/vue-chart-ring": "3.14.0",
|
|
68
|
-
"@opentiny/vue-carousel": "^3.28.0",
|
|
69
|
-
"@opentiny/vue-carousel-item": "^3.28.0",
|
|
70
|
-
"@opentiny/vue-checkbox-button": "^3.28.0",
|
|
71
|
-
"@opentiny/vue-checkbox-group": "^3.28.0",
|
|
72
|
-
"@opentiny/vue-col": "^3.28.0",
|
|
73
|
-
"@opentiny/vue-date-picker": "^3.28.0",
|
|
74
|
-
"@opentiny/vue-layout": "^3.28.0",
|
|
75
|
-
"@opentiny/vue-row": "^3.28.0",
|
|
76
|
-
"@opentiny/vue-search": "^3.28.0",
|
|
77
|
-
"@opentiny/vue-select": "^3.28.0",
|
|
78
|
-
"@opentiny/vue-transfer": "^3.28.0",
|
|
79
|
-
"@opentiny/vue-button": "^3.28.0",
|
|
80
|
-
"@opentiny/vue-grid": "^3.28.0",
|
|
81
|
-
"@opentiny/vue-form": "^3.28.0",
|
|
82
|
-
"@opentiny/vue-form-item": "^3.28.0",
|
|
83
|
-
"@opentiny/vue-input": "^3.28.0",
|
|
84
|
-
"@opentiny/vue-notify": "^3.28.0",
|
|
85
|
-
"@opentiny/vue-card": "^3.28.0",
|
|
86
|
-
"@opentiny/vue-checkbox": "^3.28.0",
|
|
87
|
-
"@opentiny/vue-numeric": "^3.28.0",
|
|
88
|
-
"@opentiny/vue-radio": "^3.28.0",
|
|
89
|
-
"@opentiny/vue-switch": "^3.28.0",
|
|
90
|
-
"@opentiny/vue-tabs": "^3.28.0",
|
|
91
|
-
"@opentiny/vue-tab-item": "^3.28.0",
|
|
92
|
-
"@opentiny/vue-tree": "^3.28.0",
|
|
93
|
-
"@opentiny/vue-radio-group": "^3.28.0",
|
|
94
72
|
"@opentiny/tiny-engine-builtin-component": "^2.6.0"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
76
|
+
"rollup-plugin-visualizer": "^6.0.5",
|
|
77
|
+
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
78
|
+
"vite-plugin-dts": "^4.0.0",
|
|
79
|
+
"typescript": "^5.9.3",
|
|
80
|
+
"tsx": "^4.8.1",
|
|
81
|
+
"escape-string-regexp": "^1.0.5",
|
|
82
|
+
"vite": "^6.0.0",
|
|
83
|
+
"vitest": "^3.0.0",
|
|
84
|
+
"@opentiny/tiny-schema-renderer": "1.0.0-beta.6"
|
|
85
|
+
},
|
|
86
|
+
"scripts": {
|
|
87
|
+
"build": "vite build",
|
|
88
|
+
"analyze": "vite build --mode analyze",
|
|
89
|
+
"prebuild:lib:npm": "pnpm -F @opentiny/genui-sdk-core build && pnpm -F @opentiny/genui-sdk-materials-vue-opentiny-vue build && pnpm -F @opentiny/tiny-schema-renderer build",
|
|
90
|
+
"build:lib:npm": "pnpm build",
|
|
91
|
+
"test": "vitest"
|
|
95
92
|
}
|
|
96
93
|
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".tg-config-provider[data-v-e0ab6374]{--tr-sender-bg-color: var(--tr-container-bg-default);--tr-sender-text-color: var(--tr-text-primary);--tr-sender-action-buttons-icon-color: var(--tr-text-secondary);--tr-sender-action-buttons-send-bg-color: var(--tr-color-primary);height:100%}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { ref as p, readonly as k, defineComponent as y, provide as m, computed as a, watch as h, onMounted as P, createBlock as I, openBlock as N, unref as u, withCtx as f, createVNode as E, normalizeProps as G, guardReactiveProps as $, renderSlot as b } from "vue";
|
|
3
|
-
import { TinyConfigProvider as x } from "@opentiny/vue";
|
|
4
|
-
import { ThemeProvider as L } from "@opentiny/tiny-robot";
|
|
5
|
-
import R, { tinyOldTheme as z, tinyDarkTheme as A } from "@opentiny/vue-theme/theme-tool";
|
|
6
|
-
import { G as B, u as O, b as Q, _ as U } from "./injection-tokens-D8CFCpjy.js";
|
|
7
|
-
const v = () => typeof window < "u" && window.matchMedia, g = () => v() && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", T = p(g());
|
|
8
|
-
let s = null;
|
|
9
|
-
const D = () => {
|
|
10
|
-
T.value = g();
|
|
11
|
-
}, F = () => {
|
|
12
|
-
v() && !s && (s = window.matchMedia("(prefers-color-scheme: dark)"), s.addEventListener("change", D));
|
|
13
|
-
}, S = () => (F(), {
|
|
14
|
-
theme: k(T)
|
|
15
|
-
}), V = /* @__PURE__ */ y({
|
|
16
|
-
__name: "ConfigProvider",
|
|
17
|
-
props: {
|
|
18
|
-
theme: {},
|
|
19
|
-
id: { default: "tiny-genui-config-provider" },
|
|
20
|
-
locale: { default: "zh_CN" },
|
|
21
|
-
i18n: {}
|
|
22
|
-
},
|
|
23
|
-
setup(_) {
|
|
24
|
-
const e = _, i = O();
|
|
25
|
-
m(B, i);
|
|
26
|
-
const d = (t) => {
|
|
27
|
-
const r = structuredClone(t);
|
|
28
|
-
return r.css = r.css.replaceAll(":host", `#${e.id}`).replaceAll(":root", `#${e.id}`), r;
|
|
29
|
-
}, c = {
|
|
30
|
-
dark: d(A),
|
|
31
|
-
lite: d(z),
|
|
32
|
-
light: { css: " " }
|
|
33
|
-
}, w = new R(), { theme: C } = S(), n = a(() => e.theme === "auto" ? C.value : e.theme), o = a(() => ({
|
|
34
|
-
theme: n.value,
|
|
35
|
-
id: e.id
|
|
36
|
-
}));
|
|
37
|
-
m(Q, o), h(
|
|
38
|
-
() => [e.locale, e.i18n],
|
|
39
|
-
() => {
|
|
40
|
-
i.setLocale(e.locale), e.i18n && i.mergeMessages(e.i18n);
|
|
41
|
-
},
|
|
42
|
-
{ immediate: !0 }
|
|
43
|
-
), h(
|
|
44
|
-
() => n.value,
|
|
45
|
-
(t) => {
|
|
46
|
-
const r = c[t] || c.light;
|
|
47
|
-
w.changeTheme(r);
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
immediate: !0
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
const l = p();
|
|
54
|
-
P(() => {
|
|
55
|
-
var t;
|
|
56
|
-
(t = l.value) == null || t.$el.classList.remove("tiny-config-provider");
|
|
57
|
-
});
|
|
58
|
-
const M = a(() => {
|
|
59
|
-
var r;
|
|
60
|
-
const t = {
|
|
61
|
-
colorMode: n.value === "dark" ? "dark" : "light"
|
|
62
|
-
};
|
|
63
|
-
return (r = o == null ? void 0 : o.value) != null && r.id && (t.targetElement = "#" + o.value.id), t;
|
|
64
|
-
});
|
|
65
|
-
return (t, r) => (N(), I(u(x), {
|
|
66
|
-
ref_key: "providerRef",
|
|
67
|
-
ref: l,
|
|
68
|
-
class: "tg-config-provider",
|
|
69
|
-
id: e.id
|
|
70
|
-
}, {
|
|
71
|
-
default: f(() => [
|
|
72
|
-
E(u(L), G($(M.value)), {
|
|
73
|
-
default: f(() => [
|
|
74
|
-
b(t.$slots, "default", {}, void 0, !0)
|
|
75
|
-
]),
|
|
76
|
-
_: 3
|
|
77
|
-
}, 16)
|
|
78
|
-
]),
|
|
79
|
-
_: 3
|
|
80
|
-
}, 8, ["id"]));
|
|
81
|
-
}
|
|
82
|
-
}), K = /* @__PURE__ */ U(V, [["__scopeId", "data-v-e0ab6374"]]);
|
|
83
|
-
export {
|
|
84
|
-
K as C,
|
|
85
|
-
S as u
|
|
86
|
-
};
|