@gindow/vue 1.0.1 → 1.0.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # vue-go
1
+ # @gindow/vue
2
2
 
3
3
  Vue3 通用基础包,为 `element-go`(桌面端)和 `vant-go`(移动端)提供公共基础设施。
4
4
 
@@ -13,7 +13,7 @@ Vue3 通用基础包,为 `element-go`(桌面端)和 `vant-go`(移动端
13
13
  ## 安装
14
14
 
15
15
  ```bash
16
- npm install vue-go
16
+ npm install @gindow/vue
17
17
  ```
18
18
 
19
19
  ## 使用
@@ -21,14 +21,14 @@ npm install vue-go
21
21
  ```js
22
22
  // main.js
23
23
  import { createApp } from 'vue'
24
- import VueGo from 'vue-go'
25
- import 'vue-go/style.css'
24
+ import Vue from '@gindow/vue'
25
+ import '@gindow/vue/style.css'
26
26
 
27
27
  const app = createApp(App)
28
- app.use(VueGo, { locale: 'zh-CN' })
28
+ app.use(Vue, { locale: 'zh-CN' })
29
29
  ```
30
30
 
31
31
  ```ts
32
32
  // 按需引入
33
- import { request, useBreak, IModel } from 'vue-go'
33
+ import { request, useBreak, IModel } from '@gindow/vue'
34
34
  ```
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e={}){let{importStyle:t=!0,prefix:n=`Vue`}=e;return{type:`component`,resolve(e){if(e.startsWith(n))return{name:e,from:`@gindow/vue`,sideEffects:t?`@gindow/vue/style.css`:void 0}}}}exports.VueResolver=e;
@@ -0,0 +1,15 @@
1
+ export declare function VueResolver(options?: VueResolverOptions): {
2
+ type: "component";
3
+ resolve(name: string): {
4
+ name: string;
5
+ from: string;
6
+ sideEffects: string | undefined;
7
+ } | undefined;
8
+ };
9
+
10
+ export declare interface VueResolverOptions {
11
+ importStyle?: boolean;
12
+ prefix?: string;
13
+ }
14
+
15
+ export { }
@@ -0,0 +1,16 @@
1
+ //#region src/resolver.ts
2
+ function e(e = {}) {
3
+ let { importStyle: t = !0, prefix: n = "Vue" } = e;
4
+ return {
5
+ type: "component",
6
+ resolve(e) {
7
+ if (e.startsWith(n)) return {
8
+ name: e,
9
+ from: "@gindow/vue",
10
+ sideEffects: t ? "@gindow/vue/style.css" : void 0
11
+ };
12
+ }
13
+ };
14
+ }
15
+ //#endregion
16
+ export { e as VueResolver };
package/dist/style.css CHANGED
@@ -1,3 +1,2 @@
1
- /*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
2
- @layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.static{position:static}.shrink{flex-shrink:1}}.flex-center{justify-content:center;align-items:center;display:flex!important}.flex-center-end{justify-content:end;align-items:center;display:flex!important}.flex-center-between{justify-content:space-between;align-items:center;display:flex!important}.flex-center-items{align-items:center;display:flex!important}.text-light{color:#ccc}.dark .text-light{color:#333}[data-v-2533db5c] g,[data-v-2533db5c] path{stroke-width:var(--v1903d129)}
1
+ [data-v-e336ca96] g,[data-v-e336ca96] path{stroke-width:var(--v519ff46c)}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.static{position:static}.shrink{flex-shrink:1}}@media screen and (width>=768px){.mob{display:none!important}}@media screen and (width<=768px){.web{display:none!important}}.bg-light{background-color:#ccc}.text-light{color:#ccc}.dark .bg-light{background-color:#333}.dark .text-light{color:#333}.flex-center{justify-content:center;align-items:center;display:flex!important}.flex-center-end{justify-content:end;align-items:center;display:flex!important}.flex-center-between{justify-content:space-between;align-items:center;display:flex!important}.flex-center-items{align-items:center;display:flex!important}
3
2
  /*$vite$:1*/
package/dist/vue.cjs ADDED
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let e=require("vue"),t=require("@iconify/vue");var n={cancel:`取消`,confirm:`确认`,empty:{noData:`暂无数据`},dialog:{tip:`操作提示`,confirm:`操作确认`}},r={cancel:`Cancel`,confirm:`Confirm`,empty:{noData:`No data`},dialog:{tip:`Tip`,confirm:`Confirm`}},i=()=>{let e=[`en`,`zh-CN`],t=localStorage.getItem(`locale`),n=navigator.language;return t&&e.includes(t)?t:n&&e.includes(n)?n:n&&e.includes(n.split(`-`)[0])?n.split(`-`)[0]:e[0]??`zh-CN`},a=Symbol(`vue-locale`),o=(0,e.ref)(i()),s=(0,e.reactive)({en:r,"zh-CN":n}),c=t=>{if(t?.locale&&(o.value=t.locale),t?.messages)for(let[e,n]of Object.entries(t.messages))s[e]=n;return(0,e.provide)(a,{locale:o,messages:s}),{locale:o,messages:s}},l=()=>{let t=(0,e.inject)(a,void 0),n=t?.locale??o,r=t?.messages??s;return{locale:n,t:(e,t)=>{let i=r[n.value],a=e.replace(/\[(\d+)]/g,`.$1`).split(`.`),o=i;for(let t of a)if(o=o?.[t],o===void 0)return e;let s=o??e;return t&&typeof s==`string`&&(s=s.replace(/\{(\w+)\}/g,(e,n)=>t[n]===void 0?`{${n}}`:String(t[n]))),s}}},u=e=>o.value=e,d=()=>o.value,f=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,e.defineComponent)({__name:`VueIcon`,props:{vendor:{type:String,default:`icon-park-outline`},icon:{type:String,default:``},type:{type:String,default:``},size:{type:Number,default:16},strokeWidth:{type:Number,default:3},color:{type:String}},setup(n){(0,e.useCssVars)(e=>({v519ff46c:l.value}));let r=n,i={folder:`folder-close`,png:`pic-one`,jpeg:`pic-one`,jpg:`pic-one`,gif:`pic-one`,webp:`pic-one`,bmp:`pic-one`,svg:`pic-one`,mp4:`video`,avi:`video`,mov:`video`,wmv:`video`,flv:`video`,mkv:`video`,webm:`video`,mp3:`music-one`,wav:`music-one`,wma:`music-one`,aac:`music-one`,ogg:`music-one`,flac:`music-one`,pdf:`file-pdf`,doc:`file-word`,docx:`file-word`,xls:`file-excel`,xlsx:`file-excel`,csv:`file-excel`,ppt:`file-ppt`,pptx:`file-ppt`,txt:`file-txt`,md:`file-txt-one`,json:`code`,xml:`code`,html:`code`,css:`code`,js:`code`,ts:`code`,jsx:`code`,tsx:`code`,py:`code`,php:`code`,cpp:`code`,c:`code`,java:`code`,go:`code`,rs:`code`,zip:`zip`,rar:`zip`,"7z":`zip`,tar:`zip`,gz:`zip`,bz2:`zip`},a={image:`pic-one`,video:`video`,audio:`music-one`,text:`file-txt`,application:`file-text`,font:`file-text`,pdf:`file-pdf`,doc:`file-word`,sheet:`file-excel`,ppt:`file-ppt`,md:`file-txt-one`,canvas:`book-open`,album:`pic-one`,yearbook:`book-open`},o=(0,e.computed)(()=>{if(r.icon)return r.icon;if(!r.type)return``;if(r.type===`folder`)return`folder-close`;let[e,t]=r.type.toLowerCase().split(`/`);return t&&i[t]?i[t]:e&&a[e]?a[e]:e&&i[e]?i[e]:`file-text`}),s=(0,e.computed)(()=>{let e=o.value;return e?e.includes(`:`)?e:`${r.vendor}:${e}`:``}),c=(0,e.computed)(()=>r.color?{color:r.color}:void 0),l=(0,e.computed)(()=>r.strokeWidth);return(r,i)=>((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(t.Icon),{icon:s.value,width:n.size,height:n.size,style:(0,e.normalizeStyle)(c.value),"aria-hidden":null},null,8,[`icon`,`width`,`height`,`style`]))}}),[[`__scopeId`,`data-v-e336ca96`]]),p=class{static{this.config={}}static{this.set=e=>this.config=e}static{this.id=(e=``)=>e.slice(-12).toUpperCase()}static{this.date=(e=``)=>e.substring(0,10)+` `+e.substring(11,19)}static{this.idcard=(e=``)=>e?e.substring(0,6)+`****`+e.substring(14):``}static{this.phone=(e=``,t=!1)=>t||!e?e:e.substring(0,3)+`****`+e.substring(e.length-4)}static{this.email=(e=``)=>{let[t,n]=e.split(`@`);return!t||!n?e:`${t.length>2?t[0]+`****`+t[t.length-1]:t}@${n}`}}static{this.bankcard=(e=``)=>e.substring(0,4)+`****`+e.substring(e.length-4)}static{this.url=(e=``)=>e.replace(/:\/\//g,`:##`).replace(/\/+/g,`/`).replace(/:##/g,`://`)}static{this.price=(e=0,t)=>{let{locale:n,decimals:r,currency:i}=this.config,a=typeof e==`string`?parseFloat(e):e;return new Intl.NumberFormat(n,{style:`currency`,currency:t??i??`CNY`,minimumFractionDigits:r??2,maximumFractionDigits:r??2}).format(a/100)}}static{this.currency=(e=0,t)=>this.price(e,t)}},m=class e{static{this.country=``}static{this.set=e=>this.country=e}static get phone_pattern(){return this.country.toUpperCase()===`CN`?/([1][3,4,5,6,7,8,9][0-9]{9})$/:/^(?:\+?[1-9]\d{7,14}|\d{6,11})$/}static{this.email_pattern=/^([a-zA-Z0-9_\.-]+)@([\da-zA-Z\.-]+)\.([a-zA-Z\.]{2,6})$/}static{this.idcard_pattern=/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/}static{this.cname_pattern=/^(?:[\u4e00-\u9fa5·]{2,16})$/}static{this.password_pattern=/^(?![A-Za-z]+$)(?![0-9]+$)(?![^A-Za-z0-9]+$).{8,20}$/}static{this.phone=t=>e.phone_pattern.test(t)}static{this.email=t=>e.email_pattern.test(t)}static{this.idcard=t=>e.idcard_pattern.test(t)}static{this.cname=t=>e.cname_pattern.test(t)}},h=768,g=()=>{let t=(0,e.ref)(typeof window<`u`?window.matchMedia(`(min-width: ${h}px)`).matches:!0),n,r=e=>t.value=e.matches;(0,e.onMounted)(()=>{typeof window>`u`||(n=window.matchMedia(`(min-width: ${h}px)`),t.value=n.matches,n.addEventListener(`change`,r))}),(0,e.onBeforeUnmount)(()=>n?.removeEventListener(`change`,r));let i=(0,e.computed)(()=>t.value);return{isMobile:(0,e.computed)(()=>!t.value),isDesktop:i}},_=t=>{let n=(0,e.ref)(0),r=(0,e.ref)(!1),i=(e={})=>new Promise((n,i)=>{r.value||(r.value=!0,t(e).then(()=>{a(),n(!0)}).catch(e=>i(e)).finally(()=>r.value=!1))}),a=()=>{n.value=60;let e=setInterval(()=>{n.value--,n.value||clearTimeout(e)},1e3)};return{waiting:n,send:i}},v=()=>({i:(t,n={})=>t?(0,e.h)(f,{icon:t,...n}):void 0}),y=[f];y.forEach(e=>{e.install=t=>{let n=e.name??e.__name;n&&t.component(n,e)}});var b={install(e,t){c(t),y.forEach(t=>e.use(t))}};exports.Formatter=p,exports.Validate=m,exports.VueIcon=f,exports.default=b,exports.getLocale=d,exports.setLocale=u,exports.useBreak=g,exports.useCaptcha=_,exports.useIcon=v,exports.useLocale=l;
package/dist/vue.d.ts CHANGED
@@ -1,36 +1,10 @@
1
- import { AxiosInstance } from 'axios';
2
- import { AxiosResponse } from 'axios';
3
- import { ComputedRef } from 'vue';
4
- import { default as default_2 } from 'dayjs';
5
- import { nanoid } from 'nanoid';
1
+ import { ComponentOptionsMixin } from 'vue';
2
+ import { ComponentProvideOptions } from 'vue';
3
+ import { DefineComponent } from 'vue';
6
4
  import { Plugin as Plugin_2 } from 'vue';
7
- import { Ref } from 'vue';
5
+ import { PublicProps } from 'vue';
8
6
  import { RendererElement } from 'vue';
9
7
  import { RendererNode } from 'vue';
10
- import { VNode } from 'vue';
11
-
12
- export declare const $params: (params: IModel) => {
13
- [property: string]: any;
14
- id?: string | any;
15
- created_at?: string;
16
- updated_at?: string;
17
- deleted_at?: string;
18
- };
19
-
20
- export declare class DateTime {
21
- static dayjs: typeof default_2;
22
- static s(date?: default_2.ConfigType, symbol?: string): string;
23
- static m(date?: default_2.ConfigType, symbol?: string): string;
24
- static h(date?: default_2.ConfigType, symbol?: string): string;
25
- static d(date?: default_2.ConfigType, symbol?: string): string;
26
- static M(date?: default_2.ConfigType, symbol?: string): string;
27
- static y(date?: default_2.ConfigType): string;
28
- static date(date?: default_2.ConfigType, symbol?: string): string;
29
- static time(date?: default_2.ConfigType): string;
30
- static format(date?: default_2.ConfigType, format?: string): string;
31
- }
32
-
33
- export declare const download: (blob: Blob, filename: string) => void;
34
8
 
35
9
  export declare class Formatter {
36
10
  static config: {
@@ -58,16 +32,8 @@ export declare class Formatter {
58
32
  static currency: (value?: string | number, currency?: string) => string;
59
33
  }
60
34
 
61
- export declare const get: (object: any, path: string | string[], defaultValue?: any) => any;
62
-
63
35
  export declare const getLocale: () => string;
64
36
 
65
- export declare interface IAIResponse {
66
- message: IChatMessageItem;
67
- sessionId: string;
68
- suggestions?: string[];
69
- }
70
-
71
37
  export declare interface IAsset extends IModel {
72
38
  id: string;
73
39
  type: string;
@@ -76,68 +42,6 @@ export declare interface IAsset extends IModel {
76
42
  shrink: string;
77
43
  }
78
44
 
79
- export declare interface IChatConfig {
80
- placeholder?: string;
81
- maxFileSize?: number;
82
- allowedFileTypes?: string[];
83
- enableStreaming?: boolean;
84
- showTimestamp?: boolean;
85
- showSuggestions?: boolean;
86
- }
87
-
88
- export declare interface IChatFile {
89
- id: string;
90
- name: string;
91
- type: string;
92
- size: number;
93
- url?: string;
94
- thumbnail?: string;
95
- }
96
-
97
- export declare interface IChatMessage {
98
- question: string;
99
- answer: string;
100
- conversation_id: string;
101
- message_id: string;
102
- created_at: number;
103
- }
104
-
105
- export declare interface IChatMessageItem {
106
- id: string;
107
- role: MessageRole;
108
- content: string;
109
- contentType?: MessageContentType;
110
- timestamp: number;
111
- isLoading?: boolean;
112
- isError?: boolean;
113
- files?: IChatFile[];
114
- metadata?: Record<string, any>;
115
- }
116
-
117
- export declare interface IChatSession {
118
- id: string;
119
- title: string;
120
- messages: IChatMessageItem[];
121
- createdAt: number;
122
- updatedAt: number;
123
- isPinned?: boolean;
124
- isArchived?: boolean;
125
- }
126
-
127
- export declare interface ICodeBlock {
128
- language: string;
129
- code: string;
130
- filename?: string;
131
- }
132
-
133
- export declare interface IErrorEvent {
134
- event: 'error';
135
- task_id: string;
136
- id: string;
137
- code: string;
138
- message: string;
139
- }
140
-
141
45
  export declare interface IField extends IModel {
142
46
  name: string;
143
47
  type: string;
@@ -169,17 +73,6 @@ export declare interface IMenu {
169
73
  isGroup?: boolean;
170
74
  }
171
75
 
172
- export declare interface IMessageEvent {
173
- event: 'message' | 'agent_message' | 'agent_thought' | 'message_file' | 'message_end' | 'tts_message' | 'tts_message_end' | 'message_replace' | 'error' | 'ping';
174
- task_id: string;
175
- id: string;
176
- conversation_id: string;
177
- message_id: string;
178
- created_at: number;
179
- answer?: string;
180
- metadata?: Record<string, any>;
181
- }
182
-
183
76
  export declare interface IModel {
184
77
  id?: string | any;
185
78
  created_at?: string;
@@ -213,28 +106,6 @@ export declare interface IResult {
213
106
  };
214
107
  }
215
108
 
216
- export declare interface ISendChatParams {
217
- content: string;
218
- contentType?: MessageContentType;
219
- files?: IChatFile[];
220
- sessionId?: string;
221
- }
222
-
223
- export declare interface ISendMessageParams {
224
- query: string;
225
- inputs?: Record<string, any>;
226
- response_mode?: 'streaming' | 'blocking';
227
- conversation_id?: string;
228
- user: string;
229
- files?: Array<{
230
- type: string;
231
- transfer_method: 'remote_url' | 'local_file';
232
- url?: string;
233
- upload_file_id?: string;
234
- }>;
235
- auto_generate_name?: boolean;
236
- }
237
-
238
109
  export declare interface IUploadUserFile {
239
110
  id?: string;
240
111
  percentage?: number;
@@ -246,143 +117,32 @@ export declare interface IUploadUserFile {
246
117
  mimeType?: string;
247
118
  }
248
119
 
249
- export declare interface IUsageEvent {
250
- event: 'message_end';
251
- task_id: string;
252
- id: string;
253
- conversation_id: string;
254
- message_id: string;
255
- created_at: number;
256
- usage: {
257
- prompt_tokens: number;
258
- prompt_unit_price: number;
259
- prompt_price_unit: number;
260
- prompt_price: number;
261
- completion_tokens: number;
262
- completion_unit_price: number;
263
- completion_price_unit: number;
264
- completion_price: number;
265
- total_tokens: number;
266
- total_price: number;
267
- currency: string;
268
- latency: number;
269
- };
270
- metadata?: Record<string, any>;
271
- }
272
-
273
- export declare type MessageContentType = 'text' | 'image' | 'code' | 'file';
274
-
275
- export declare type MessageRole = 'user' | 'assistant' | 'system';
276
-
277
- export declare class Platform {
278
- static get userAgent(): string;
279
- static get isFlutter(): boolean;
280
- static get isFlutterIOS(): boolean;
281
- static get isWeb(): boolean;
282
- static get isMobile(): boolean;
283
- static get isIOS(): boolean;
284
- static get isWechat(): boolean;
285
- static get isWxwork(): boolean;
286
- static get isMiniprogram(): boolean;
287
- }
288
-
289
- export declare const request: {
290
- baseURL: string;
291
- publicKey: string;
292
- headers: Record<string, string>;
293
- instance: AxiosInstance | null;
294
- accessToken: string;
295
- init(config?: {
296
- baseURL?: string;
297
- publicKey?: string;
298
- }): void;
299
- setToken(token: string, options?: {
300
- expires?: number;
301
- domain?: string;
302
- }): void;
303
- getToken(): string;
304
- delToken(): void;
305
- get(url: string, params?: {}, auth?: boolean): any;
306
- put(url: string, data?: {}, auth?: boolean): any;
307
- patch(url: string, data?: {}, auth?: boolean): any;
308
- delete(url: string, params?: {}, auth?: boolean): any;
309
- post(url: string, data?: {}, auth?: boolean): any;
310
- blob(url: string, params?: {}, auth?: boolean): any;
311
- request(para: any, auth?: boolean): any;
312
- download(url: string, params?: {}, filename?: string, auth?: boolean): Promise<any>;
313
- upload(url: string, data?: {}): Promise<AxiosResponse<any, any, {}>>;
314
- sse(url: string, para?: {
315
- [key: string]: string | number | undefined | null | void;
316
- } | null): EventSource;
317
- setHeader(key: string, value: string): void;
318
- delHeader(key: string): void;
319
- };
320
-
321
- export declare class resource {
322
- url: string;
323
- auth: boolean;
324
- constructor(url: string, auth?: boolean);
325
- select: (para?: {}) => any;
326
- create: (para?: {}) => any;
327
- find: (id: string, para?: {}) => any;
328
- update: (id: string, para?: {}) => any;
329
- delete: (id: string, para?: {}) => any;
330
- get(para: any): Promise<any>;
331
- }
332
-
333
120
  export declare const setLocale: (lang: string) => string;
334
121
 
335
- export declare const useBreak: () => {
336
- isMobile: ComputedRef<boolean>;
337
- isDesktop: ComputedRef<boolean>;
122
+ declare const useBreak_2: () => {
123
+ isMobile: globalThis.ComputedRef<boolean>;
124
+ isDesktop: globalThis.ComputedRef<boolean>;
338
125
  };
126
+ export { useBreak_2 as useBreak }
339
127
 
340
- export declare const useCaptcha: (api: (data: any) => Promise<void>) => {
341
- waiting: Ref<number, number>;
128
+ declare const useCaptcha_2: (api: (data: any) => Promise<void>) => {
129
+ waiting: globalThis.Ref<number, number>;
342
130
  send: (para?: {}) => Promise<unknown>;
343
131
  };
132
+ export { useCaptcha_2 as useCaptcha }
344
133
 
345
- export declare const useChat: (baseURL: string, apiKey: string) => {
346
- sendMessage: (params: ISendMessageParams, callbacks: {
347
- onMessage?: (text: string) => void;
348
- onEnd?: (conversationId: string, messageId: string) => void;
349
- onError?: (error: {
350
- code: string;
351
- message: string;
352
- }) => void;
353
- onFinish?: () => void;
354
- }) => Promise<void>;
355
- };
356
-
357
- export declare const useIcon: () => {
358
- i: (icon: string, para?: Object) => VNode<RendererNode, RendererElement, {
359
- [key: string]: any;
134
+ declare const useIcon_2: () => {
135
+ i: (icon: string, para?: Object) => globalThis.VNode<RendererNode, RendererElement, {
136
+ [key: string]: any;
360
137
  }> | undefined;
361
138
  };
139
+ export { useIcon_2 as useIcon }
362
140
 
363
141
  export declare const useLocale: () => {
364
- locale: Ref<string, string>;
142
+ locale: globalThis.Ref<string, string>;
365
143
  t: (path: string, params?: Record<string, string | number>) => string;
366
144
  };
367
145
 
368
- export declare const useNanoid: () => {
369
- nanoid: typeof nanoid;
370
- numeric: (length?: number) => string;
371
- };
372
-
373
- export declare const useUpload: () => {
374
- handler: (file: File, para?: {
375
- compressor: boolean;
376
- }) => Promise<File>;
377
- getDimension: (blob: Blob) => Promise<{
378
- width: number;
379
- height: number;
380
- }>;
381
- getFileType: (file: File) => Promise<{
382
- mimeType: string;
383
- }>;
384
- };
385
-
386
146
  export declare class Validate {
387
147
  static country: string;
388
148
  static set: (country: string) => string;
@@ -397,7 +157,63 @@ export declare class Validate {
397
157
  static cname: (str: string) => boolean;
398
158
  }
399
159
 
400
- declare const VueGo: Plugin_2;
401
- export default VueGo;
160
+ declare const Vue: Plugin_2;
161
+ export default Vue;
162
+
163
+ export declare const VueIcon: DefineComponent<globalThis.ExtractPropTypes<{
164
+ vendor: {
165
+ type: StringConstructor;
166
+ default: string;
167
+ };
168
+ icon: {
169
+ type: StringConstructor;
170
+ default: string;
171
+ };
172
+ type: {
173
+ type: StringConstructor;
174
+ default: string;
175
+ };
176
+ size: {
177
+ type: NumberConstructor;
178
+ default: number;
179
+ };
180
+ strokeWidth: {
181
+ type: NumberConstructor;
182
+ default: number;
183
+ };
184
+ color: {
185
+ type: StringConstructor;
186
+ };
187
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
188
+ vendor: {
189
+ type: StringConstructor;
190
+ default: string;
191
+ };
192
+ icon: {
193
+ type: StringConstructor;
194
+ default: string;
195
+ };
196
+ type: {
197
+ type: StringConstructor;
198
+ default: string;
199
+ };
200
+ size: {
201
+ type: NumberConstructor;
202
+ default: number;
203
+ };
204
+ strokeWidth: {
205
+ type: NumberConstructor;
206
+ default: number;
207
+ };
208
+ color: {
209
+ type: StringConstructor;
210
+ };
211
+ }>> & Readonly<{}>, {
212
+ size: number;
213
+ vendor: string;
214
+ icon: string;
215
+ type: string;
216
+ strokeWidth: number;
217
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
402
218
 
403
219
  export { }