@bcc-code/vue-bcc-chat-ui 1.0.0
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 +34 -0
- package/dist/App.vue.d.ts +2 -0
- package/dist/components/BccChatMessageList.vue.d.ts +10 -0
- package/dist/components.d.ts +3 -0
- package/dist/main.d.ts +1 -0
- package/dist/style.css +1 -0
- package/dist/vite.svg +1 -0
- package/dist/vue-bcc-chat-ui.js +27 -0
- package/dist/vue-bcc-chat-ui.umd.cjs +1 -0
- package/package.json +39 -0
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# BCC Chat UI
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Vue Components
|
|
8
|
+
|
|
9
|
+
1. Add package to project
|
|
10
|
+
```bash
|
|
11
|
+
# npm
|
|
12
|
+
npm -i @bcc-code/vue-bcc-chat-ui
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
2. Use component in Vue
|
|
17
|
+
```ts
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<div>
|
|
21
|
+
<BccChatMessageList :authToken="token" :chat="chatId" />
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts" setup>
|
|
26
|
+
import { BccChatMessageList } from '@bcc-code/vue-bcc-chat-ui';
|
|
27
|
+
|
|
28
|
+
const authToken = ref('....');
|
|
29
|
+
const chatId = ref('my-chat-id');
|
|
30
|
+
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
msg: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
};
|
|
5
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
+
msg: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
};
|
|
9
|
+
}>>, {}, {}>;
|
|
10
|
+
export default _default;
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}.card{padding:2em}#app{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}h1[data-v-79b4fea2]{color:#7e22ce}
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent as a, ref as l, openBlock as p, createElementBlock as i, Fragment as u, createElementVNode as s, toDisplayString as r } from "vue";
|
|
2
|
+
const _ = { class: "card" }, m = /* @__PURE__ */ a({
|
|
3
|
+
__name: "BccChatMessageList",
|
|
4
|
+
props: {
|
|
5
|
+
msg: { type: String }
|
|
6
|
+
},
|
|
7
|
+
setup(t) {
|
|
8
|
+
const e = l(0);
|
|
9
|
+
return (o, n) => (p(), i(u, null, [
|
|
10
|
+
s("h1", null, r(t.msg), 1),
|
|
11
|
+
s("div", _, [
|
|
12
|
+
s("button", {
|
|
13
|
+
type: "button",
|
|
14
|
+
onClick: n[0] || (n[0] = (c) => e.value++)
|
|
15
|
+
}, "count is " + r(e.value), 1)
|
|
16
|
+
])
|
|
17
|
+
], 64));
|
|
18
|
+
}
|
|
19
|
+
}), g = (t, e) => {
|
|
20
|
+
const o = t.__vccOpts || t;
|
|
21
|
+
for (const [n, c] of e)
|
|
22
|
+
o[n] = c;
|
|
23
|
+
return o;
|
|
24
|
+
}, f = /* @__PURE__ */ g(m, [["__scopeId", "data-v-79b4fea2"]]);
|
|
25
|
+
export {
|
|
26
|
+
f as BccChatMessageList
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t["BCC Chat UI"]={},t.Vue))})(this,function(t,e){"use strict";const r={class:"card"},a=((n,o)=>{const c=n.__vccOpts||n;for(const[s,i]of o)c[s]=i;return c})(e.defineComponent({__name:"BccChatMessageList",props:{msg:{type:String}},setup(n){const o=e.ref(0);return(c,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h1",null,e.toDisplayString(n.msg),1),e.createElementVNode("div",r,[e.createElementVNode("button",{type:"button",onClick:s[0]||(s[0]=i=>o.value++)},"count is "+e.toDisplayString(o.value),1)])],64))}}),[["__scopeId","data-v-79b4fea2"]]);t.BccChatMessageList=a,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bcc-code/vue-bcc-chat-ui",
|
|
3
|
+
"author": "bcc-code",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"main": "./dist/vue-bcc-chat-ui.umd.cjs",
|
|
11
|
+
"module": "./dist/vue-bcc-chat-ui.js",
|
|
12
|
+
"types": "./dist/main.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/vue-bcc-chat-ui.js",
|
|
16
|
+
"require": "./dist/vue-bcc-chat-ui.umd.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./style.css": "./dist/style.css"
|
|
19
|
+
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"vue": "^3.0.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"vue": "^3.3.11",
|
|
28
|
+
"@types/node": "^20.11.16",
|
|
29
|
+
"@vitejs/plugin-vue": "^4.5.2",
|
|
30
|
+
"typescript": "^5.2.2",
|
|
31
|
+
"vite": "^5.0.8",
|
|
32
|
+
"vue-tsc": "^1.8.25"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"dev": "vite",
|
|
36
|
+
"build": "vite build && vue-tsc --emitDeclarationOnly && pnpm pack --pack-destination ../demo",
|
|
37
|
+
"preview": "vite preview"
|
|
38
|
+
}
|
|
39
|
+
}
|