@opentiny/genui-sdk-vue 1.3.0-alpha.3 → 1.3.0-alpha.5

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.
@@ -0,0 +1,49 @@
1
+ import { defineComponent as a, ref as i, provide as m, createBlock as c, openBlock as u, mergeProps as l, createSlots as f, renderList as _, withCtx as d, renderSlot as h, normalizeProps as C, guardReactiveProps as g } from "vue";
2
+ import { materials as S } from "@opentiny/genui-sdk-materials-vue-opentiny-vue/materials";
3
+ import { b as y } from "./injection-tokens-CuDQs1ne.js";
4
+ import { G as k } from "./chat.types-CBZg59yQ.js";
5
+ const b = /* @__PURE__ */ a({
6
+ __name: "GenuiChatWithMaterials",
7
+ props: {
8
+ url: {},
9
+ model: {},
10
+ temperature: {},
11
+ messages: {},
12
+ chatConfig: {},
13
+ requiredCompleteFieldSelectors: {},
14
+ customComponents: {},
15
+ customSnippets: {},
16
+ customExamples: {},
17
+ customActions: {},
18
+ rendererSlots: {},
19
+ thinkComponent: { type: [Object, Function] },
20
+ roles: {},
21
+ features: {},
22
+ customFetch: { type: Function }
23
+ },
24
+ setup(v, { expose: n }) {
25
+ const r = i();
26
+ return m(y, S), n(
27
+ new Proxy({}, {
28
+ get(o, s) {
29
+ const t = r.value, e = t == null ? void 0 : t[s];
30
+ return typeof e == "function" ? e.bind(t) : e;
31
+ }
32
+ })
33
+ ), (o, s) => (u(), c(k, l({
34
+ ref_key: "chatRef",
35
+ ref: r
36
+ }, o.$props), f({ _: 2 }, [
37
+ _(o.$slots, (t, e) => ({
38
+ name: e,
39
+ fn: d((p) => [
40
+ h(o.$slots, e, C(g(p || {})))
41
+ ])
42
+ }))
43
+ ]), 1040));
44
+ }
45
+ });
46
+ export {
47
+ b as _
48
+ };
49
+ //# sourceMappingURL=GenuiChatWithMaterials.vue_vue_type_script_setup_true_lang-vvi_xm8P.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenuiChatWithMaterials.vue_vue_type_script_setup_true_lang-vvi_xm8P.js","sources":["../src/legacy-chat/GenuiChatWithMaterials.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { provide, ref } from 'vue';\nimport { materials as defaultMaterials } from '@opentiny/genui-sdk-materials-vue-opentiny-vue/materials';\nimport { GENUI_MATERIALS } from '../config-provider/injection-tokens';\nimport GenuiChat from '../chat/GenuiChat.vue';\nimport type { IChatProps } from '../chat/chat.types';\n\ndefineProps<IChatProps>();\n\nconst chatRef = ref<InstanceType<typeof GenuiChat>>();\n\nprovide(GENUI_MATERIALS, defaultMaterials);\n\ndefineExpose(\n new Proxy({} as InstanceType<typeof GenuiChat>, {\n get(_target, prop) {\n const instance = chatRef.value;\n const value = instance?.[prop as keyof typeof instance];\n return typeof value === 'function' ? value.bind(instance) : value;\n },\n }),\n);\n</script>\n\n<template>\n <GenuiChat ref=\"chatRef\" v-bind=\"$props\">\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </GenuiChat>\n</template>\n"],"names":["chatRef","ref","provide","GENUI_MATERIALS","defaultMaterials","__expose","_target","prop","instance","value","_openBlock","_createBlock","GenuiChat","_mergeProps","$props","_createSlots","$slots","_","name","_withCtx","slotProps","_renderSlot","_ctx","_normalizeProps","_guardReactiveProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AASA,UAAMA,IAAUC,EAAA;AAEhB,WAAAC,EAAQC,GAAiBC,CAAgB,GAEzCC;AAAA,MACE,IAAI,MAAM,CAAA,GAAsC;AAAA,QAC9C,IAAIC,GAASC,GAAM;AACjB,gBAAMC,IAAWR,EAAQ,OACnBS,IAAQD,KAAA,gBAAAA,EAAWD;AACzB,iBAAO,OAAOE,KAAU,aAAaA,EAAM,KAAKD,CAAQ,IAAIC;AAAA,QAC9D;AAAA,MAAA,CACD;AAAA,IAAA,cAKDC,EAAA,GAAAC,EAIYC,GAJZC,EAIY;AAAA,eAJG;AAAA,MAAJ,KAAIb;AAAA,IAAA,GAAkBc,EAAAA,MAAM,GAAAC,EAAA,EAAA,GAAA,KAAA;AAAA,QACPC,EAAAA,QAAM,CAAlBC,GAAGC;;QACnB,IAAAC,EAAA,CAD6CC,MAAS;AAAA,UACtDC,EAA8CC,EAAA,QAAjCJ,GAAIK,EAAAC,EAAUJ,KAAS,CAAA,CAAA,CAAA,CAAA;AAAA,QAAA;;;;;"}
@@ -1,4 +1,4 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".loading-warp[data-v-4cf1cd88]{display:flex;flex-direction:column;justify-content:center;position:fixed;top:-75px;bottom:0;left:0;right:0}.loading[data-v-4cf1cd88]{width:60px;height:60px;margin:0 auto;position:relative;animation:load-4cf1cd88 3s linear infinite}.loading div[data-v-4cf1cd88]{width:100%;height:100%;position:absolute}.loading span[data-v-4cf1cd88]{display:inline-block;width:20px;height:20px;border-radius:50%;background:#9c6;position:absolute;left:50%;margin-top:-10px;margin-left:-10px;animation:changeBgColor-4cf1cd88 3s ease infinite}@keyframes load-4cf1cd88{0%{transform:rotate(0)}33.3%{transform:rotate(120deg)}66.6%{transform:rotate(240deg)}to{transform:rotate(360deg)}}@keyframes changeBgColor-4cf1cd88{0%,to{background:#9c6}33.3%{background:#ff6}66.6%{background:#f66}}.loading div[data-v-4cf1cd88]:nth-child(2){transform:rotate(120deg)}.loading div[data-v-4cf1cd88]:nth-child(3){transform:rotate(240deg)}.loading div:nth-child(2) span[data-v-4cf1cd88]{animation-delay:1s}.loading div:nth-child(3) span[data-v-4cf1cd88]{animation-delay:2s}.iconwarp[data-v-703e7595]{display:inline-flex;justify-content:center;align-items:center;fill:currentColor;width:1em;height:1em}.canvas-container[data-v-f6282d9a]{min-height:48px}[data-v-01be6a9b] .tiny-card.tiny-card.tiny-card{width:100%;background-color:var(--content-bg);border-radius:24px}[data-v-01be6a9b] .tiny-card.tiny-card.tiny-card .tiny-card--logo__main{color:var(--text-color)}[data-v-01be6a9b] .tiny-card.tiny-card.tiny-card .tiny-card--logo{max-width:100%}[data-v-01be6a9b] .tiny-row.tiny-row{line-height:2}[data-v-01be6a9b] ol[data-tag=ol],[data-v-01be6a9b] ul[data-tag=ul]{list-style:revert;margin:revert;padding:revert}[data-v-01be6a9b] li[data-tag=li]{margin:revert;padding:revert}[data-v-01be6a9b] *,[data-v-01be6a9b] *:before,[data-v-01be6a9b] *:after{box-sizing:border-box}[data-v-01be6a9b] h1[data-tag=h1],[data-v-01be6a9b] h2[data-tag=h2],[data-v-01be6a9b] h3[data-tag=h3],[data-v-01be6a9b] h4[data-tag=h4],[data-v-01be6a9b] h5[data-tag=h5],[data-v-01be6a9b] h6[data-tag=h6],[data-v-01be6a9b] p[data-tag=p]{font-size:revert;font-weight:revert;color:revert;margin:revert;padding:revert}.schema-render-container[data-v-01be6a9b]{position:relative;color:var(--tv-color-text, #191919)}.schema-render-container[data-v-01be6a9b]:has(.loading-warp):after{display:none}[data-v-01be6a9b] .loading-warp.loading-warp,[data-v-01be6a9b] .loading-warp .loading{display:none}")),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".loading-warp[data-v-4cf1cd88]{display:flex;flex-direction:column;justify-content:center;position:fixed;top:-75px;bottom:0;left:0;right:0}.loading[data-v-4cf1cd88]{width:60px;height:60px;margin:0 auto;position:relative;animation:load-4cf1cd88 3s linear infinite}.loading div[data-v-4cf1cd88]{width:100%;height:100%;position:absolute}.loading span[data-v-4cf1cd88]{display:inline-block;width:20px;height:20px;border-radius:50%;background:#9c6;position:absolute;left:50%;margin-top:-10px;margin-left:-10px;animation:changeBgColor-4cf1cd88 3s ease infinite}@keyframes load-4cf1cd88{0%{transform:rotate(0)}33.3%{transform:rotate(120deg)}66.6%{transform:rotate(240deg)}to{transform:rotate(360deg)}}@keyframes changeBgColor-4cf1cd88{0%,to{background:#9c6}33.3%{background:#ff6}66.6%{background:#f66}}.loading div[data-v-4cf1cd88]:nth-child(2){transform:rotate(120deg)}.loading div[data-v-4cf1cd88]:nth-child(3){transform:rotate(240deg)}.loading div:nth-child(2) span[data-v-4cf1cd88]{animation-delay:1s}.loading div:nth-child(3) span[data-v-4cf1cd88]{animation-delay:2s}.iconwarp[data-v-703e7595]{display:inline-flex;justify-content:center;align-items:center;fill:currentColor;width:1em;height:1em}.canvas-container[data-v-f6282d9a]{min-height:48px}[data-v-d578368d] .tiny-card.tiny-card.tiny-card{width:100%;background-color:var(--content-bg);border-radius:24px}[data-v-d578368d] .tiny-card.tiny-card.tiny-card .tiny-card--logo__main{color:var(--text-color)}[data-v-d578368d] .tiny-card.tiny-card.tiny-card .tiny-card--logo{max-width:100%}[data-v-d578368d] .tiny-row.tiny-row{line-height:2}[data-v-d578368d] ol[data-tag=ol],[data-v-d578368d] ul[data-tag=ul]{list-style:revert;margin:revert;padding:revert}[data-v-d578368d] li[data-tag=li]{margin:revert;padding:revert}[data-v-d578368d] *,[data-v-d578368d] *:before,[data-v-d578368d] *:after{box-sizing:border-box}[data-v-d578368d] h1[data-tag=h1],[data-v-d578368d] h2[data-tag=h2],[data-v-d578368d] h3[data-tag=h3],[data-v-d578368d] h4[data-tag=h4],[data-v-d578368d] h5[data-tag=h5],[data-v-d578368d] h6[data-tag=h6],[data-v-d578368d] p[data-tag=p]{font-size:revert;font-weight:revert;color:revert;margin:revert;padding:revert}.schema-render-container[data-v-d578368d]{position:relative;color:var(--tv-color-text, #191919)}.schema-render-container[data-v-d578368d]:has(.loading-warp):after{display:none}[data-v-d578368d] .loading-warp.loading-warp,[data-v-d578368d] .loading-warp .loading{display:none}")),document.head.appendChild(a)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})();
2
2
  import * as Me from "vue";
3
3
  import { createVNode as Nt, withDirectives as Q0, vShow as K0, h as qn, onErrorCaptured as md, inject as $r, watch as jn, provide as il, reactive as cf, shallowReactive as gd, onUnmounted as Z0, watchEffect as X0, nextTick as ri, resolveComponent as vd, createBlock as yd, openBlock as Tr, createElementBlock as mn, normalizeClass as bd, renderSlot as ln, computed as is, createElementVNode as sr, createTextVNode as eS, toDisplayString as wd, normalizeStyle as tS, resolveDynamicComponent as rS, normalizeProps as Sd, guardReactiveProps as _d, withCtx as nS, defineComponent as oS, ref as Wa, shallowRef as iS, unref as aS } from "vue";
4
4
  import { d as qr, m as sS, y as Vt, p as al, h as lS } from "./___vite-browser-external_commonjs-proxy-4gYZYw55.js";
@@ -15060,7 +15060,7 @@ const ol = Symbol("RENDERER_SETTINGS_KEY"), RC = (r) => r == null || typeof r !=
15060
15060
  return (O = t.customActions[M]) == null ? void 0 : O.execute(y, i.value.getContext());
15061
15061
  }, s = $r(TS, {}), d = $r(ol, {});
15062
15062
  jn(() => t.customComponents, (M) => {
15063
- Object.assign(s.components, M);
15063
+ s.components && Object.assign(s.components, M);
15064
15064
  }, { immediate: !0 }), il(ol, {
15065
15065
  ...d,
15066
15066
  materials: s
@@ -15154,11 +15154,11 @@ const ol = Symbol("RENDERER_SETTINGS_KEY"), RC = (r) => r == null || typeof r !=
15154
15154
  }, void 0, !0)
15155
15155
  ]));
15156
15156
  }
15157
- }), ZC = /* @__PURE__ */ ES(BC, [["__scopeId", "data-v-01be6a9b"]]);
15157
+ }), ZC = /* @__PURE__ */ ES(BC, [["__scopeId", "data-v-d578368d"]]);
15158
15158
  export {
15159
15159
  ZC as G,
15160
15160
  ol as I,
15161
15161
  CS as c,
15162
15162
  qC as r
15163
15163
  };
15164
- //# sourceMappingURL=GenuiRenderer-B9wcUl25.js.map
15164
+ //# sourceMappingURL=GenuiRenderer-Bo_1qj4M.js.map