oasis-chat 0.2.5 → 0.2.6
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 +45 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/react/index.cjs.js.map +1 -1
- package/dist/react/index.es.js.map +1 -1
- package/dist/vue/index.cjs.js.map +1 -1
- package/dist/vue/index.es.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
# Oasis
|
|
1
|
+
# Oasis Chat
|
|
2
2
|
|
|
3
|
-
`createButton`을 제공하는 가벼운 바닐라 JS 버튼 컴포넌트입니다. React와 Vue를 위한 wrapper 컴포넌트도 제공됩니다.
|
|
3
|
+
`createButton`을 제공하는 가벼운 바닐라 JS 채팅 버튼 컴포넌트입니다. React와 Vue를 위한 wrapper 컴포넌트도 제공됩니다.
|
|
4
|
+
|
|
5
|
+
## 프로젝트 구조
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
src/
|
|
9
|
+
├── wrapper/ # 프레임워크별 래퍼 컴포넌트
|
|
10
|
+
│ ├── react/ # React wrapper
|
|
11
|
+
│ └── vue/ # Vue wrapper
|
|
12
|
+
└── app/ # 메인 애플리케이션 로직
|
|
13
|
+
├── assets/ # 이미지 등 리소스
|
|
14
|
+
├── service/ # API 클라이언트 (auth, http, portal)
|
|
15
|
+
├── utils/ # 유틸리티 함수
|
|
16
|
+
├── index.js # 메인 export (createButton)
|
|
17
|
+
└── style.css # 스타일시트
|
|
18
|
+
```
|
|
4
19
|
|
|
5
20
|
## 설치
|
|
6
21
|
|
|
@@ -82,7 +97,13 @@ React 프로젝트에서 사용할 때는 wrapper 컴포넌트를 사용하면 C
|
|
|
82
97
|
import { OasisButton } from 'oasis-chat/react';
|
|
83
98
|
|
|
84
99
|
function App() {
|
|
85
|
-
return
|
|
100
|
+
return (
|
|
101
|
+
<OasisButton
|
|
102
|
+
account_id="your-account-id"
|
|
103
|
+
password="your-password"
|
|
104
|
+
assistant_uuid="your-assistant-uuid"
|
|
105
|
+
/>
|
|
106
|
+
);
|
|
86
107
|
}
|
|
87
108
|
```
|
|
88
109
|
|
|
@@ -93,14 +114,14 @@ Vue 프로젝트에서 사용할 때도 wrapper 컴포넌트를 사용하면 CSS
|
|
|
93
114
|
```vue
|
|
94
115
|
<script setup>
|
|
95
116
|
import { OasisButton } from 'oasis-chat/vue';
|
|
96
|
-
|
|
97
|
-
const handleClick = () => {
|
|
98
|
-
alert('hello');
|
|
99
|
-
};
|
|
100
117
|
</script>
|
|
101
118
|
|
|
102
119
|
<template>
|
|
103
|
-
<OasisButton
|
|
120
|
+
<OasisButton
|
|
121
|
+
account_id="your-account-id"
|
|
122
|
+
password="your-password"
|
|
123
|
+
assistant_uuid="your-assistant-uuid"
|
|
124
|
+
/>
|
|
104
125
|
</template>
|
|
105
126
|
```
|
|
106
127
|
|
|
@@ -113,8 +134,9 @@ import { createButton } from 'oasis-chat';
|
|
|
113
134
|
import 'oasis-chat/style.css'; // CSS 파일 import 필요
|
|
114
135
|
|
|
115
136
|
const btn = createButton({
|
|
116
|
-
|
|
117
|
-
|
|
137
|
+
account_id: 'your-account-id',
|
|
138
|
+
password: 'your-password',
|
|
139
|
+
assistant_uuid: 'your-assistant-uuid',
|
|
118
140
|
});
|
|
119
141
|
|
|
120
142
|
document.body.appendChild(btn);
|
|
@@ -122,13 +144,25 @@ document.body.appendChild(btn);
|
|
|
122
144
|
|
|
123
145
|
**참고**: React나 Vue wrapper를 사용할 때는 CSS를 별도로 import할 필요가 없습니다. wrapper 컴포넌트 내부에서 자동으로 CSS가 포함됩니다.
|
|
124
146
|
|
|
147
|
+
## Props
|
|
148
|
+
|
|
149
|
+
- `account_id` (string, 필수): 로그인에 사용할 계정 ID
|
|
150
|
+
- `password` (string, 필수): 로그인에 사용할 비밀번호
|
|
151
|
+
- `assistant_uuid` (string, 필수): 어시스턴트 UUID
|
|
152
|
+
|
|
125
153
|
## 개발/빌드
|
|
126
154
|
|
|
127
155
|
```bash
|
|
128
156
|
npm run dev # 데모 앱 실행 (Vite)
|
|
129
|
-
npm run build:lib # 라이브러리 빌드 (
|
|
157
|
+
npm run build:lib # 라이브러리 빌드 (Vanilla JS, React, Vue 모두 빌드)
|
|
130
158
|
```
|
|
131
159
|
|
|
160
|
+
빌드 후 `dist/` 폴더에 다음 파일들이 생성됩니다:
|
|
161
|
+
- `index.*.js` - Vanilla JS 버전
|
|
162
|
+
- `react/index.*.js` - React wrapper 버전
|
|
163
|
+
- `vue/index.*.js` - Vue wrapper 버전
|
|
164
|
+
- `oasis-chat.css` - 스타일시트
|
|
165
|
+
|
|
132
166
|
## 라이선스
|
|
133
167
|
|
|
134
168
|
MIT
|