@orca-pt/orca-components 1.0.1
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/LICENSE +21 -0
- package/README.md +473 -0
- package/dist/components/ContentElement.vue.d.ts +21 -0
- package/dist/components/OrcaMarkdown.vue.d.ts +15 -0
- package/dist/components/loading/CardLoading.vue.d.ts +9 -0
- package/dist/components/loading/GeneralLoading.vue.d.ts +11 -0
- package/dist/components/loading/ImageLoading.vue.d.ts +9 -0
- package/dist/components/loading/MapLoading.vue.d.ts +9 -0
- package/dist/components/loading/VideoLoading.vue.d.ts +9 -0
- package/dist/components/renderers/OrcaAudio.vue.d.ts +11 -0
- package/dist/components/renderers/OrcaButtons.vue.d.ts +16 -0
- package/dist/components/renderers/OrcaCardList.vue.d.ts +11 -0
- package/dist/components/renderers/OrcaImage.vue.d.ts +14 -0
- package/dist/components/renderers/OrcaLocation.vue.d.ts +13 -0
- package/dist/components/renderers/OrcaTracing.vue.d.ts +13 -0
- package/dist/components/renderers/OrcaVideo.vue.d.ts +11 -0
- package/dist/components/renderers/OrcaYouTube.vue.d.ts +10 -0
- package/dist/composables/__tests__/useContentParser.test.d.ts +1 -0
- package/dist/composables/core/index.d.ts +3 -0
- package/dist/composables/core/matchFinder.d.ts +13 -0
- package/dist/composables/core/matchProcessor.d.ts +9 -0
- package/dist/composables/core/recursiveParser.d.ts +6 -0
- package/dist/composables/parsers/__tests__/parsers.test.d.ts +1 -0
- package/dist/composables/parsers/baseParser.d.ts +34 -0
- package/dist/composables/parsers/index.d.ts +5 -0
- package/dist/composables/parsers/parseAudio.d.ts +2 -0
- package/dist/composables/parsers/parseButton.d.ts +2 -0
- package/dist/composables/parsers/parseCard.d.ts +2 -0
- package/dist/composables/parsers/parseLocation.d.ts +11 -0
- package/dist/composables/parsers/parseTracing.d.ts +9 -0
- package/dist/composables/parsing/index.d.ts +8 -0
- package/dist/composables/parsing/markerCleaner.d.ts +15 -0
- package/dist/composables/parsing/markerDefinitions.d.ts +20 -0
- package/dist/composables/parsing/markerOperations.d.ts +27 -0
- package/dist/composables/parsing/markerUtils.d.ts +58 -0
- package/dist/composables/useCodeButtons.d.ts +8 -0
- package/dist/composables/useContentParser.d.ts +12 -0
- package/dist/composables/useImageModal.d.ts +10 -0
- package/dist/composables/useLoadingStates.d.ts +13 -0
- package/dist/composables/useMarkdown.d.ts +8 -0
- package/dist/constants/loadingTypes.d.ts +9 -0
- package/dist/index.d.ts +16 -0
- package/dist/orca-components.css +13 -0
- package/dist/orca-components.es.js +1851 -0
- package/dist/orca-components.es.js.map +1 -0
- package/dist/orca-components.umd.js +2 -0
- package/dist/orca-components.umd.js.map +1 -0
- package/dist/types/index.d.ts +128 -0
- package/dist/utils/helpers.d.ts +48 -0
- package/package.json +83 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Orca Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
# π Orca Components
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@orcapt/orca-components)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
Native Vue 3 components for rendering rich content using Orca Markers. Designed for chat applications, messaging systems, and any interface that requires dynamic content rendering with Vuetify.
|
|
7
|
+
|
|
8
|
+
## β¨ Features
|
|
9
|
+
|
|
10
|
+
- πΌοΈ **Image Display** - With modal zoom and loading states
|
|
11
|
+
- π¬ **Video Playback** - Video.js player and YouTube embed support
|
|
12
|
+
- π΅ **Audio Player** - Customizable audio playback
|
|
13
|
+
- πΊοΈ **Maps** - Mapbox GL JS integration
|
|
14
|
+
- π΄ **Card Lists** - Display content in beautiful card layouts
|
|
15
|
+
- π **Interactive Buttons** - Action and link buttons with events
|
|
16
|
+
- π **Markdown** - Full markdown rendering with syntax highlighting
|
|
17
|
+
- β‘ **Loading States** - Smart loading indicators for all content types
|
|
18
|
+
- π **Tracing** - Debug trace logs display
|
|
19
|
+
- π― **TypeScript** - Full TypeScript support with type definitions
|
|
20
|
+
- π¨ **Tailwind CSS** - Built with Tailwind utility classes (prefixed `tw-`)
|
|
21
|
+
- π **Stream Support** - Real-time content streaming compatible
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## π¦ Installation
|
|
26
|
+
|
|
27
|
+
### From NPM
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install @orcapt/orca-components
|
|
31
|
+
# or
|
|
32
|
+
yarn add @orcapt/orca-components
|
|
33
|
+
# or
|
|
34
|
+
pnpm add @orcapt/orca-components
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Package:** [@orcapt/orca-components](https://www.npmjs.com/package/@orcapt/orca-components)
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## π Quick Start
|
|
42
|
+
|
|
43
|
+
### 1. Basic Usage
|
|
44
|
+
|
|
45
|
+
```vue
|
|
46
|
+
<script setup lang="ts">
|
|
47
|
+
import { OrcaMarkdown } from "@orcapt/orca-components";
|
|
48
|
+
import "@orcapt/orca-components/style.css";
|
|
49
|
+
import { ref } from "vue";
|
|
50
|
+
|
|
51
|
+
const message = ref(`
|
|
52
|
+
Hello! This is a test message.
|
|
53
|
+
|
|
54
|
+
[orca.image.start]
|
|
55
|
+
https://example.com/image.jpg
|
|
56
|
+
[orca.image.end]
|
|
57
|
+
`);
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<OrcaMarkdown :description="message" role="assistant" :isLastMessage="true" />
|
|
62
|
+
</template>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 2. With Event Handling
|
|
66
|
+
|
|
67
|
+
```vue
|
|
68
|
+
<script setup lang="ts">
|
|
69
|
+
import { OrcaMarkdown } from "@orcapt/orca-components";
|
|
70
|
+
import "@orcapt/orca-components/style.css";
|
|
71
|
+
|
|
72
|
+
const handleButtonClick = async (data) => {
|
|
73
|
+
console.log("Button clicked:", data);
|
|
74
|
+
// Send to backend or update store
|
|
75
|
+
};
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<template>
|
|
79
|
+
<OrcaMarkdown
|
|
80
|
+
v-for="msg in messages"
|
|
81
|
+
:key="msg.id"
|
|
82
|
+
:description="msg.content"
|
|
83
|
+
:role="msg.role"
|
|
84
|
+
:isLastMessage="msg.id === lastMessageId"
|
|
85
|
+
@send-message="handleButtonClick"
|
|
86
|
+
/>
|
|
87
|
+
</template>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## π Orca Markers Reference
|
|
93
|
+
|
|
94
|
+
> **π Complete Reference:** See [MARKERS_REFERENCE.md](./MARKERS_REFERENCE.md) for a comprehensive guide to all supported markers.
|
|
95
|
+
|
|
96
|
+
### πΌοΈ Images
|
|
97
|
+
|
|
98
|
+
```markdown
|
|
99
|
+
[orca.image.start]
|
|
100
|
+
https://example.com/image.jpg
|
|
101
|
+
[orca.image.end]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
With loading state:
|
|
105
|
+
|
|
106
|
+
```markdown
|
|
107
|
+
[orca.loading.image.start]
|
|
108
|
+
|
|
109
|
+
[orca.image.start]
|
|
110
|
+
https://example.com/image.jpg
|
|
111
|
+
[orca.image.end]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### π¬ Videos
|
|
115
|
+
|
|
116
|
+
**Regular Video:**
|
|
117
|
+
|
|
118
|
+
```markdown
|
|
119
|
+
[orca.video.start]
|
|
120
|
+
https://example.com/video.mp4
|
|
121
|
+
[orca.video.end]
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**YouTube:**
|
|
125
|
+
|
|
126
|
+
```markdown
|
|
127
|
+
[orca.youtube.start]
|
|
128
|
+
https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
129
|
+
[orca.youtube.end]
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**With Loading:**
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
[orca.loading.video.start]
|
|
136
|
+
|
|
137
|
+
[orca.video.start]
|
|
138
|
+
https://example.com/video.mp4
|
|
139
|
+
[orca.video.end]
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### πΊοΈ Maps (Location)
|
|
143
|
+
|
|
144
|
+
```markdown
|
|
145
|
+
[orca.location.start]
|
|
146
|
+
35.6892, 51.3890
|
|
147
|
+
[orca.location.end]
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### π Buttons
|
|
151
|
+
|
|
152
|
+
```yaml
|
|
153
|
+
[orca.buttons.start]
|
|
154
|
+
- type: action
|
|
155
|
+
label: Option 1
|
|
156
|
+
id: option1
|
|
157
|
+
color: primary
|
|
158
|
+
row: 1
|
|
159
|
+
- type: action
|
|
160
|
+
label: Option 2
|
|
161
|
+
id: option2
|
|
162
|
+
color: secondary
|
|
163
|
+
row: 1
|
|
164
|
+
- type: link
|
|
165
|
+
label: Visit Website
|
|
166
|
+
url: https://example.com
|
|
167
|
+
color: info
|
|
168
|
+
row: 2
|
|
169
|
+
[orca.buttons.end]
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Properties:**
|
|
173
|
+
|
|
174
|
+
- `type`: `action` or `link`
|
|
175
|
+
- `color`: Vuetify colors (primary, secondary, error, success, warning, info)
|
|
176
|
+
- `row`: Row number for grouping buttons
|
|
177
|
+
- `id`: Unique identifier (for action buttons)
|
|
178
|
+
- `url`: Link URL (for link buttons)
|
|
179
|
+
|
|
180
|
+
### π΄ Card Lists
|
|
181
|
+
|
|
182
|
+
```yaml
|
|
183
|
+
[orca.list.card.start]
|
|
184
|
+
- photo: https://example.com/image1.jpg
|
|
185
|
+
header: Card Title 1
|
|
186
|
+
subheader: Card description 1
|
|
187
|
+
text: Additional content for card 1
|
|
188
|
+
- photo: https://example.com/image2.jpg
|
|
189
|
+
header: Card Title 2
|
|
190
|
+
subheader: Card description 2
|
|
191
|
+
text: Additional content for card 2
|
|
192
|
+
[orca.list.card.end]
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**With Loading:**
|
|
196
|
+
|
|
197
|
+
```markdown
|
|
198
|
+
[orca.loading.card.start]
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### π΅ Audio
|
|
202
|
+
|
|
203
|
+
```yaml
|
|
204
|
+
[orca.audio.start]
|
|
205
|
+
- label: Track 1
|
|
206
|
+
url: https://example.com/audio1.mp3
|
|
207
|
+
type: audio/mp3
|
|
208
|
+
- label: Track 2
|
|
209
|
+
url: https://example.com/audio2.mp3
|
|
210
|
+
type: audio/mp3
|
|
211
|
+
[orca.audio.end]
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### π Tracing (Debug)
|
|
215
|
+
|
|
216
|
+
```yaml
|
|
217
|
+
[orca.tracing.start]
|
|
218
|
+
visibility: admin
|
|
219
|
+
content: {
|
|
220
|
+
"request_id": "req_123456",
|
|
221
|
+
"timestamp": "2024-12-10T12:00:00Z",
|
|
222
|
+
"duration": "245ms",
|
|
223
|
+
"status": "success"
|
|
224
|
+
}
|
|
225
|
+
[orca.tracing.end]
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Visibility Options:**
|
|
229
|
+
|
|
230
|
+
- `all`: Visible to everyone
|
|
231
|
+
- `admin`: Only visible to admins
|
|
232
|
+
|
|
233
|
+
### β³ Loading States
|
|
234
|
+
|
|
235
|
+
**General Loading:**
|
|
236
|
+
|
|
237
|
+
```markdown
|
|
238
|
+
[orca.loading.start]
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**Image Loading:**
|
|
242
|
+
|
|
243
|
+
```markdown
|
|
244
|
+
[orca.loading.image.start]
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
**Video Loading:**
|
|
248
|
+
|
|
249
|
+
```markdown
|
|
250
|
+
[orca.loading.video.start]
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Card Loading:**
|
|
254
|
+
|
|
255
|
+
```markdown
|
|
256
|
+
[orca.loading.card.start]
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Note:** Loading markers don't need an end tag - they're replaced when actual content arrives.
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## π― Props
|
|
264
|
+
|
|
265
|
+
```typescript
|
|
266
|
+
interface OrcaMarkdownProps {
|
|
267
|
+
/** Content string with Orca markers */
|
|
268
|
+
description: string;
|
|
269
|
+
|
|
270
|
+
/** Sender role */
|
|
271
|
+
role: "user" | "assistant";
|
|
272
|
+
|
|
273
|
+
/** Additional images */
|
|
274
|
+
images?: Record<string, any>;
|
|
275
|
+
|
|
276
|
+
/** Attached files */
|
|
277
|
+
fileAttachments?: string[];
|
|
278
|
+
|
|
279
|
+
/** Is this the last message? (enables buttons) */
|
|
280
|
+
isLastMessage?: boolean;
|
|
281
|
+
|
|
282
|
+
/** Store identifier for message management */
|
|
283
|
+
storeIdentifier?: string;
|
|
284
|
+
|
|
285
|
+
/** Visibility level */
|
|
286
|
+
visibility?: "all" | "admin";
|
|
287
|
+
|
|
288
|
+
/** Agent ID */
|
|
289
|
+
agentId?: string;
|
|
290
|
+
|
|
291
|
+
/** Message ID */
|
|
292
|
+
messageId?: string;
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## π€ Events
|
|
299
|
+
|
|
300
|
+
### @send-message
|
|
301
|
+
|
|
302
|
+
Emitted when user clicks action buttons:
|
|
303
|
+
|
|
304
|
+
```typescript
|
|
305
|
+
interface SendMessageData {
|
|
306
|
+
message: string;
|
|
307
|
+
buttonData?: ButtonData;
|
|
308
|
+
type: "text" | "button-action" | "button-link";
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
**Example:**
|
|
313
|
+
|
|
314
|
+
```vue
|
|
315
|
+
<OrcaMarkdown
|
|
316
|
+
:description="message"
|
|
317
|
+
role="assistant"
|
|
318
|
+
@send-message="handleSendMessage"
|
|
319
|
+
/>
|
|
320
|
+
|
|
321
|
+
<script setup>
|
|
322
|
+
const handleSendMessage = (data) => {
|
|
323
|
+
console.log("Message:", data.message);
|
|
324
|
+
console.log("Button:", data.buttonData);
|
|
325
|
+
// Send to server or update store
|
|
326
|
+
};
|
|
327
|
+
</script>
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## π§ Advanced Configuration
|
|
333
|
+
|
|
334
|
+
### Mapbox Token Setup
|
|
335
|
+
|
|
336
|
+
The component uses a default token, but for production you should use your own:
|
|
337
|
+
|
|
338
|
+
```typescript
|
|
339
|
+
// In your main app file
|
|
340
|
+
import mapboxgl from "mapbox-gl";
|
|
341
|
+
|
|
342
|
+
mapboxgl.accessToken = "YOUR_MAPBOX_TOKEN";
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Custom Styling
|
|
346
|
+
|
|
347
|
+
```vue
|
|
348
|
+
<style scoped>
|
|
349
|
+
/* Override default styles */
|
|
350
|
+
:deep(.message-content) {
|
|
351
|
+
/* Custom styles */
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
:deep(.image-container img) {
|
|
355
|
+
border-radius: 20px;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
:deep(.action-button) {
|
|
359
|
+
font-size: 16px;
|
|
360
|
+
}
|
|
361
|
+
</style>
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Tailwind Classes
|
|
365
|
+
|
|
366
|
+
All Tailwind classes are prefixed with `tw-` to avoid conflicts:
|
|
367
|
+
|
|
368
|
+
```html
|
|
369
|
+
<div class="tw-flex tw-items-center tw-gap-4">
|
|
370
|
+
<!-- Your content -->
|
|
371
|
+
</div>
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## π οΈ Development
|
|
377
|
+
|
|
378
|
+
### Local Development
|
|
379
|
+
|
|
380
|
+
```bash
|
|
381
|
+
# Clone repository
|
|
382
|
+
git clone <repository-url>
|
|
383
|
+
cd orca-components-package
|
|
384
|
+
|
|
385
|
+
# Install dependencies
|
|
386
|
+
npm install --legacy-peer-deps
|
|
387
|
+
|
|
388
|
+
# Start dev server
|
|
389
|
+
npm run dev
|
|
390
|
+
|
|
391
|
+
# Build package
|
|
392
|
+
npm run build
|
|
393
|
+
|
|
394
|
+
# Type check
|
|
395
|
+
npm run type-check
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Quick Deploy (for local testing)
|
|
399
|
+
|
|
400
|
+
```bash
|
|
401
|
+
# Build, pack, and install in one command
|
|
402
|
+
npm run quick-deploy
|
|
403
|
+
|
|
404
|
+
# Or use the bash script
|
|
405
|
+
./dev-deploy.sh
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
See [DEV_GUIDE.md](./DEV_GUIDE.md) for detailed development instructions.
|
|
409
|
+
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
## π Changelog
|
|
413
|
+
|
|
414
|
+
See [CHANGELOG.md](./CHANGELOG.md) for release notes.
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
## π Complete Markers Reference
|
|
419
|
+
|
|
420
|
+
For a complete reference of all supported Orca markers, see **[MARKERS_REFERENCE.md](./MARKERS_REFERENCE.md)**.
|
|
421
|
+
|
|
422
|
+
This includes:
|
|
423
|
+
|
|
424
|
+
- β
All loading markers (`orca.loading.*`, `orca.image.loading`, etc.)
|
|
425
|
+
- β
All content markers (image, video, location, card, buttons, audio, tracing)
|
|
426
|
+
- β
Complete usage examples
|
|
427
|
+
- β
Best practices
|
|
428
|
+
- β
Format specifications
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
## π€ Contributing
|
|
433
|
+
|
|
434
|
+
Contributions are welcome! Please:
|
|
435
|
+
|
|
436
|
+
1. Fork the repository
|
|
437
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
438
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
439
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
440
|
+
5. Open a Pull Request
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
|
|
444
|
+
## π Bug Reports
|
|
445
|
+
|
|
446
|
+
To report bugs or request features:
|
|
447
|
+
|
|
448
|
+
- [GitHub Issues](https://github.com/orca-team/orca-components/issues)
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
## π License
|
|
453
|
+
|
|
454
|
+
MIT Β© Orca Team
|
|
455
|
+
|
|
456
|
+
---
|
|
457
|
+
|
|
458
|
+
## π Credits
|
|
459
|
+
|
|
460
|
+
Built with amazing tools:
|
|
461
|
+
|
|
462
|
+
- [Vue.js](https://vuejs.org/)
|
|
463
|
+
- [Vuetify](https://vuetifyjs.com/)
|
|
464
|
+
- [Tailwind CSS](https://tailwindcss.com/)
|
|
465
|
+
- [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js/)
|
|
466
|
+
- [Video.js](https://videojs.com/)
|
|
467
|
+
- [Markdown-it](https://github.com/markdown-it/markdown-it)
|
|
468
|
+
- [Highlight.js](https://highlightjs.org/)
|
|
469
|
+
- [KaTeX](https://katex.org/)
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
**Made with β€οΈ by the Orca Team**
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ContentPart, ButtonData } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* ContentElement - Router component for different content types
|
|
4
|
+
* Automatically renders the appropriate component based on element type
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
element: ContentPart;
|
|
8
|
+
disabledButton?: boolean;
|
|
9
|
+
visibility?: "all" | "admin";
|
|
10
|
+
isAdmin?: boolean;
|
|
11
|
+
mapboxToken?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
+
"button-click": (button: ButtonData) => any;
|
|
15
|
+
"image-modal": (url: string) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
+
"onButton-click"?: ((button: ButtonData) => any) | undefined;
|
|
18
|
+
"onImage-modal"?: ((url: string) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "highlight.js/styles/stackoverflow-light.css";
|
|
2
|
+
import "katex/dist/katex.min.css";
|
|
3
|
+
import "../styles/tailwind.css";
|
|
4
|
+
import type { OrcaMarkdownProps } from "../types";
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<OrcaMarkdownProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
"send-message": (data: import("../types").SendMessageData) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<OrcaMarkdownProps> & Readonly<{
|
|
8
|
+
"onSend-message"?: ((data: import("../types").SendMessageData) => any) | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
visibility: "all" | "admin" | string;
|
|
11
|
+
fileAttachments: string[];
|
|
12
|
+
isLastMessage: boolean;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CardLoading - Displays card loading placeholder
|
|
3
|
+
*/
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GeneralLoading - Displays general loading indicator
|
|
3
|
+
* Positioned inline in the chat flow
|
|
4
|
+
*/
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
message: string;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ImageLoading - Displays image loading placeholder
|
|
3
|
+
*/
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MapLoading - Displays map loading placeholder
|
|
3
|
+
*/
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VideoLoading - Displays video loading placeholder
|
|
3
|
+
*/
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AudioData } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* OrcaAudio - Renders audio player content
|
|
4
|
+
* Displays multiple audio tracks with modern UI design
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
audioItems: AudioData[];
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ButtonData } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* OrcaButtons - Renders interactive buttons
|
|
4
|
+
* Supports both action buttons (emit events) and link buttons (open URLs)
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
buttons: ButtonData[];
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
|
+
"button-click": (button: ButtonData) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
"onButton-click"?: ((button: ButtonData) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CardData } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* OrcaCardList - Renders card list content
|
|
4
|
+
* Displays multiple cards in a responsive grid layout with modern UI
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
cards: CardData[];
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OrcaImage - Renders image content
|
|
3
|
+
* Displays images with modal zoom functionality and modern UI
|
|
4
|
+
*/
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
url: string;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
"open-modal": (url: string) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onOpen-modal"?: ((url: string) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "mapbox-gl/dist/mapbox-gl.css";
|
|
2
|
+
/**
|
|
3
|
+
* OrcaLocation - Renders map/location content using Mapbox GL JS
|
|
4
|
+
* Displays interactive map with marker and navigation controls
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
latitude: number;
|
|
8
|
+
longitude: number;
|
|
9
|
+
mapboxToken?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TracingData } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* OrcaTracing - Renders tracing/debug log content
|
|
4
|
+
* Displays trace logs with expand/collapse functionality
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
tracingData: TracingData | TracingData[];
|
|
8
|
+
visibility?: "all" | "admin";
|
|
9
|
+
isAdmin?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "video.js/dist/video-js.css";
|
|
2
|
+
/**
|
|
3
|
+
* OrcaVideo - Renders video content using Video.js
|
|
4
|
+
* Provides professional video playback with controls
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
url: string;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|