@meistrari/chat-nuxt 4.10.0-rc.1 → 4.10.0-rc.3

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.
Files changed (140) hide show
  1. package/dist/module.d.mts +7 -0
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +2 -1
  4. package/dist/runtime/embed/components/mobile/chat-mobile-shell.d.vue.ts +2 -2
  5. package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue.d.ts +2 -2
  6. package/dist/runtime/files/components/{audio-preview.d.vue.ts → chat-file-audio.d.vue.ts} +8 -7
  7. package/dist/runtime/files/components/chat-file-audio.vue +94 -0
  8. package/dist/runtime/files/components/{image-preview.d.vue.ts → chat-file-audio.vue.d.ts} +8 -7
  9. package/dist/runtime/files/components/chat-file-card.d.vue.ts +31 -0
  10. package/dist/runtime/files/components/chat-file-card.vue +44 -0
  11. package/dist/runtime/files/components/chat-file-card.vue.d.ts +31 -0
  12. package/dist/runtime/files/components/chat-file-preview.vue +90 -196
  13. package/dist/runtime/files/composables/pdf.d.ts +5 -842
  14. package/dist/runtime/files/content-detection.js +7 -3
  15. package/dist/runtime/files/formatting.d.ts +1 -0
  16. package/dist/runtime/files/formatting.js +4 -0
  17. package/dist/runtime/files/presentation.d.ts +3 -0
  18. package/dist/runtime/files/presentation.js +24 -0
  19. package/dist/runtime/messages/answer.d.ts +0 -5
  20. package/dist/runtime/messages/answer.js +0 -18
  21. package/dist/runtime/messages/components/chat-answer.vue +4 -3
  22. package/dist/runtime/messages/components/chat-message-bubble.vue +12 -0
  23. package/dist/runtime/messages/components/widgets/chat-thinking-widget.vue +4 -0
  24. package/dist/runtime/rendering/components/openui/bar-chart.d.vue.ts +10 -0
  25. package/dist/runtime/rendering/components/openui/bar-chart.vue +39 -0
  26. package/dist/runtime/rendering/components/openui/bar-chart.vue.d.ts +10 -0
  27. package/dist/runtime/rendering/components/openui/bar.d.vue.ts +10 -0
  28. package/dist/runtime/rendering/components/openui/bar.vue +12 -0
  29. package/dist/runtime/rendering/components/openui/bar.vue.d.ts +10 -0
  30. package/dist/runtime/rendering/components/openui/button.d.vue.ts +11 -0
  31. package/dist/runtime/rendering/components/openui/button.vue +30 -0
  32. package/dist/runtime/rendering/components/openui/button.vue.d.ts +11 -0
  33. package/dist/runtime/rendering/components/openui/buttons.d.vue.ts +8 -0
  34. package/dist/runtime/rendering/components/openui/buttons.vue +14 -0
  35. package/dist/runtime/rendering/components/openui/buttons.vue.d.ts +8 -0
  36. package/dist/runtime/rendering/components/openui/callout.d.vue.ts +11 -0
  37. package/dist/runtime/rendering/components/openui/callout.vue +27 -0
  38. package/dist/runtime/rendering/components/openui/callout.vue.d.ts +11 -0
  39. package/dist/runtime/rendering/components/openui/card.d.vue.ts +9 -0
  40. package/dist/runtime/rendering/components/openui/card.vue +19 -0
  41. package/dist/runtime/rendering/components/openui/card.vue.d.ts +9 -0
  42. package/dist/runtime/rendering/components/openui/checkbox.d.vue.ts +9 -0
  43. package/dist/runtime/rendering/components/openui/checkbox.vue +26 -0
  44. package/dist/runtime/rendering/components/openui/checkbox.vue.d.ts +9 -0
  45. package/dist/runtime/rendering/components/openui/citation.d.vue.ts +9 -0
  46. package/dist/runtime/rendering/components/openui/citation.vue +13 -0
  47. package/dist/runtime/rendering/components/openui/citation.vue.d.ts +9 -0
  48. package/dist/runtime/rendering/components/openui/col.d.vue.ts +10 -0
  49. package/dist/runtime/rendering/components/openui/col.vue +16 -0
  50. package/dist/runtime/rendering/components/openui/col.vue.d.ts +10 -0
  51. package/dist/runtime/rendering/components/openui/file-card.d.vue.ts +9 -0
  52. package/dist/runtime/rendering/components/openui/file-card.vue +15 -0
  53. package/dist/runtime/rendering/components/openui/file-card.vue.d.ts +9 -0
  54. package/dist/runtime/rendering/components/openui/form.d.vue.ts +10 -0
  55. package/dist/runtime/rendering/components/openui/form.vue +60 -0
  56. package/dist/runtime/rendering/components/openui/form.vue.d.ts +10 -0
  57. package/dist/runtime/rendering/components/openui/image.d.vue.ts +10 -0
  58. package/dist/runtime/rendering/components/openui/image.vue +40 -0
  59. package/dist/runtime/rendering/components/openui/image.vue.d.ts +10 -0
  60. package/dist/runtime/rendering/components/openui/input.d.vue.ts +10 -0
  61. package/dist/runtime/rendering/components/openui/input.vue +23 -0
  62. package/dist/runtime/rendering/components/openui/input.vue.d.ts +10 -0
  63. package/dist/runtime/rendering/components/openui/markdown.d.vue.ts +9 -0
  64. package/dist/runtime/rendering/components/openui/markdown.vue +14 -0
  65. package/dist/runtime/rendering/components/openui/markdown.vue.d.ts +9 -0
  66. package/dist/runtime/rendering/components/openui/metric.d.vue.ts +11 -0
  67. package/dist/runtime/rendering/components/openui/metric.vue +20 -0
  68. package/dist/runtime/rendering/components/openui/metric.vue.d.ts +11 -0
  69. package/dist/runtime/rendering/components/openui/option.d.vue.ts +10 -0
  70. package/dist/runtime/rendering/components/openui/option.vue +12 -0
  71. package/dist/runtime/rendering/components/openui/option.vue.d.ts +10 -0
  72. package/dist/runtime/rendering/components/openui/question.d.vue.ts +11 -0
  73. package/dist/runtime/rendering/components/openui/question.vue +15 -0
  74. package/dist/runtime/rendering/components/openui/question.vue.d.ts +11 -0
  75. package/dist/runtime/rendering/components/openui/questions.d.vue.ts +9 -0
  76. package/dist/runtime/rendering/components/openui/questions.vue +91 -0
  77. package/dist/runtime/rendering/components/openui/questions.vue.d.ts +9 -0
  78. package/dist/runtime/rendering/components/openui/select.d.vue.ts +10 -0
  79. package/dist/runtime/rendering/components/openui/select.vue +27 -0
  80. package/dist/runtime/rendering/components/openui/select.vue.d.ts +10 -0
  81. package/dist/runtime/rendering/components/openui/stack.d.vue.ts +9 -0
  82. package/dist/runtime/rendering/components/openui/stack.vue +18 -0
  83. package/dist/runtime/rendering/components/openui/stack.vue.d.ts +9 -0
  84. package/dist/runtime/rendering/components/openui/table.d.vue.ts +9 -0
  85. package/dist/runtime/rendering/components/openui/table.vue +41 -0
  86. package/dist/runtime/rendering/components/openui/table.vue.d.ts +9 -0
  87. package/dist/runtime/rendering/components/openui-block.d.vue.ts +12 -0
  88. package/dist/runtime/rendering/components/openui-block.vue +73 -0
  89. package/dist/runtime/rendering/components/openui-block.vue.d.ts +12 -0
  90. package/dist/runtime/rendering/components/openui-reasoning-placeholder.d.vue.ts +3 -0
  91. package/dist/runtime/rendering/components/openui-reasoning-placeholder.vue +10 -0
  92. package/dist/runtime/rendering/components/openui-reasoning-placeholder.vue.d.ts +3 -0
  93. package/dist/runtime/rendering/components/renderers/artifact-display.vue +1 -1
  94. package/dist/runtime/rendering/openui/actions.d.ts +15 -0
  95. package/dist/runtime/rendering/openui/actions.js +40 -0
  96. package/dist/runtime/rendering/openui/context.d.ts +22 -0
  97. package/dist/runtime/rendering/openui/context.js +4 -0
  98. package/dist/runtime/rendering/openui/form-fields.d.ts +10 -0
  99. package/dist/runtime/rendering/openui/form-fields.js +30 -0
  100. package/dist/runtime/rendering/openui/markdown-link.d.ts +2 -0
  101. package/dist/runtime/rendering/openui/markdown-link.js +5 -0
  102. package/dist/runtime/rendering/openui/program.d.ts +15 -0
  103. package/dist/runtime/rendering/openui/program.js +74 -0
  104. package/dist/runtime/rendering/openui/registry.d.ts +5 -0
  105. package/dist/runtime/rendering/openui/registry.js +44 -0
  106. package/dist/runtime/rendering/openui/render.d.ts +21 -0
  107. package/dist/runtime/rendering/openui/render.js +45 -0
  108. package/dist/runtime/rendering/openui/use-openui-context.d.ts +2 -0
  109. package/dist/runtime/rendering/openui/use-openui-context.js +8 -0
  110. package/dist/runtime/rendering/openui/use-widget-prose.d.ts +2 -0
  111. package/dist/runtime/rendering/openui/use-widget-prose.js +7 -0
  112. package/dist/runtime/server/utils/chat-api-proxy.js +4 -1
  113. package/dist/runtime/shared/composables/polling.d.ts +1 -1
  114. package/dist/runtime/types/schemas/chat/chat-config.d.ts +6 -2
  115. package/dist/runtime/types/schemas/chat/chat-config.js +1 -0
  116. package/dist/runtime/types/schemas/chat/conversation-runtime.d.ts +20 -0
  117. package/dist/runtime/types/schemas/chat/conversations.d.ts +20 -0
  118. package/dist/runtime/types/schemas/chat/conversations.js +3 -0
  119. package/dist/runtime/types/schemas/chat/messages.d.ts +30 -0
  120. package/dist/runtime/types/schemas/chat/ui-language.d.ts +31 -0
  121. package/dist/runtime/types/schemas/chat/ui-language.js +13 -0
  122. package/dist/runtime/types/schemas/integrations/tela-agent-api.d.ts +40 -0
  123. package/dist/runtime/types/schemas/integrations/tela-agent-api.js +3 -0
  124. package/package.json +3 -1
  125. package/dist/runtime/files/components/audio-preview.vue +0 -52
  126. package/dist/runtime/files/components/audio-preview.vue.d.ts +0 -14
  127. package/dist/runtime/files/components/csv-preview.d.vue.ts +0 -20
  128. package/dist/runtime/files/components/csv-preview.vue +0 -157
  129. package/dist/runtime/files/components/csv-preview.vue.d.ts +0 -20
  130. package/dist/runtime/files/components/image-preview.vue +0 -54
  131. package/dist/runtime/files/components/image-preview.vue.d.ts +0 -14
  132. package/dist/runtime/files/components/pdf-preview.client.d.vue.ts +0 -20
  133. package/dist/runtime/files/components/pdf-preview.client.vue +0 -90
  134. package/dist/runtime/files/components/pdf-preview.client.vue.d.ts +0 -20
  135. package/dist/runtime/files/components/text-preview.d.vue.ts +0 -19
  136. package/dist/runtime/files/components/text-preview.vue +0 -105
  137. package/dist/runtime/files/components/text-preview.vue.d.ts +0 -19
  138. package/dist/runtime/files/components/video-preview.d.vue.ts +0 -14
  139. package/dist/runtime/files/components/video-preview.vue +0 -55
  140. package/dist/runtime/files/components/video-preview.vue.d.ts +0 -14
package/dist/module.d.mts CHANGED
@@ -51,6 +51,13 @@ interface ChatNuxtModuleOptions {
51
51
  * to `false`; also settable via `NUXT_CHAT_NUXT_ROUTE_CLAUDE_VIA_GATEWAY`.
52
52
  */
53
53
  routeClaudeViaGateway?: boolean;
54
+ /**
55
+ * Opt this deployment into generative widgets: the server proxy adds
56
+ * `"ui-language": "web"` to the `x-chat-config` header, so chat-api asks the
57
+ * agent for OpenUI Lang widget blocks and chat-nuxt renders them. Defaults
58
+ * to `false`; also settable via `NUXT_CHAT_NUXT_UI_LANGUAGE`.
59
+ */
60
+ uiLanguage?: boolean;
54
61
  }
55
62
  declare const _default: any;
56
63
 
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
3
  "configKey": "chatNuxt",
4
- "version": "4.10.0-rc.1",
4
+ "version": "4.10.0-rc.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -471,7 +471,8 @@ const module$1 = defineNuxtModule({
471
471
  agentApiV5: options.agentApiV5 ?? existingChatNuxtRuntimeConfig?.agentApiV5 ?? false,
472
472
  // Explicit boolean default keeps the key in runtime config so the
473
473
  // NUXT_CHAT_NUXT_ROUTE_CLAUDE_VIA_GATEWAY env override can apply.
474
- routeClaudeViaGateway: options.routeClaudeViaGateway ?? existingChatNuxtRuntimeConfig?.routeClaudeViaGateway ?? false
474
+ routeClaudeViaGateway: options.routeClaudeViaGateway ?? existingChatNuxtRuntimeConfig?.routeClaudeViaGateway ?? false,
475
+ uiLanguage: options.uiLanguage ?? existingChatNuxtRuntimeConfig?.uiLanguage ?? false
475
476
  };
476
477
  if (hostAuthComposablePath && !rc.chatNuxt.authTokenCookie) {
477
478
  console.warn(
@@ -71,8 +71,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
71
71
  copyLink: () => any;
72
72
  debug: () => any;
73
73
  selectConversation: (id: string) => any;
74
- settings: () => any;
75
74
  send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
75
+ settings: () => any;
76
76
  selectExecutionProfile: (profile: ChatExecutionProfile) => any;
77
77
  tabChange: (tab: TopbarTab) => any;
78
78
  newConversation: (groupId?: string | null | undefined) => any;
@@ -93,8 +93,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
93
93
  onCopyLink?: (() => any) | undefined;
94
94
  onDebug?: (() => any) | undefined;
95
95
  onSelectConversation?: ((id: string) => any) | undefined;
96
- onSettings?: (() => any) | undefined;
97
96
  onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
97
+ onSettings?: (() => any) | undefined;
98
98
  onSelectExecutionProfile?: ((profile: ChatExecutionProfile) => any) | undefined;
99
99
  "onUpdate:selectedModel"?: ((value: string | null) => any) | undefined;
100
100
  "onUpdate:selectedReasoningEffort"?: ((value: any) => any) | undefined;
@@ -71,8 +71,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
71
71
  copyLink: () => any;
72
72
  debug: () => any;
73
73
  selectConversation: (id: string) => any;
74
- settings: () => any;
75
74
  send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
75
+ settings: () => any;
76
76
  selectExecutionProfile: (profile: ChatExecutionProfile) => any;
77
77
  tabChange: (tab: TopbarTab) => any;
78
78
  newConversation: (groupId?: string | null | undefined) => any;
@@ -93,8 +93,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
93
93
  onCopyLink?: (() => any) | undefined;
94
94
  onDebug?: (() => any) | undefined;
95
95
  onSelectConversation?: ((id: string) => any) | undefined;
96
- onSettings?: (() => any) | undefined;
97
96
  onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
97
+ onSettings?: (() => any) | undefined;
98
98
  onSelectExecutionProfile?: ((profile: ChatExecutionProfile) => any) | undefined;
99
99
  "onUpdate:selectedModel"?: ((value: string | null) => any) | undefined;
100
100
  "onUpdate:selectedReasoningEffort"?: ((value: any) => any) | undefined;
@@ -1,14 +1,15 @@
1
+ import type { ChatFileMenuItem } from './chat-file-card.vue.js';
1
2
  type __VLS_Props = {
2
- url: string;
3
- name?: string;
4
- clickable?: boolean;
3
+ url?: string;
4
+ iconSrc: string;
5
+ name: string;
6
+ meta: string;
7
+ menuItems: ChatFileMenuItem[];
5
8
  };
6
9
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
- click: () => any;
8
- loaded: () => any;
10
+ open: () => any;
9
11
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
- onClick?: (() => any) | undefined;
11
- onLoaded?: (() => any) | undefined;
12
+ onOpen?: (() => any) | undefined;
12
13
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
14
  declare const _default: typeof __VLS_export;
14
15
  export default _default;
@@ -0,0 +1,94 @@
1
+ <script setup>
2
+ import ChatFileCard from "./chat-file-card.vue";
3
+ import { formatPlaybackTime } from "../formatting";
4
+ const props = defineProps({
5
+ url: { type: String, required: false },
6
+ iconSrc: { type: String, required: true },
7
+ name: { type: String, required: true },
8
+ meta: { type: String, required: true },
9
+ menuItems: { type: Array, required: true }
10
+ });
11
+ const emit = defineEmits(["open"]);
12
+ const player = ref();
13
+ const playing = ref(false);
14
+ const currentTime = ref(0);
15
+ const duration = ref(0);
16
+ const failed = ref(false);
17
+ const progress = computed(() => duration.value > 0 ? currentTime.value / duration.value * 100 : 0);
18
+ function togglePlayback() {
19
+ const audio = player.value;
20
+ if (!audio)
21
+ return;
22
+ if (audio.paused)
23
+ void audio.play();
24
+ else
25
+ audio.pause();
26
+ }
27
+ function seek(event) {
28
+ const audio = player.value;
29
+ if (!audio || duration.value <= 0)
30
+ return;
31
+ audio.currentTime = Number(event.target.value) / 100 * duration.value;
32
+ }
33
+ watch(() => props.url, () => {
34
+ playing.value = false;
35
+ currentTime.value = 0;
36
+ duration.value = 0;
37
+ failed.value = false;
38
+ });
39
+ </script>
40
+
41
+ <template>
42
+ <ChatFileCard
43
+ :icon-src="iconSrc"
44
+ :name="name"
45
+ :meta="failed ? 'Falha ao carregar \xE1udio' : meta"
46
+ :menu-items="menuItems"
47
+ :disabled="!url"
48
+ @open="emit('open')"
49
+ >
50
+ <template #actions>
51
+ <TelaIconButton
52
+ :icon="playing ? 'i-ph-pause-fill' : 'i-ph-play-fill'"
53
+ color="secondary"
54
+ size="xs"
55
+ :aria-label="playing ? 'Pausar \xE1udio' : 'Reproduzir \xE1udio'"
56
+ :disabled="!url || failed"
57
+ @click="togglePlayback"
58
+ />
59
+ </template>
60
+ <div flex items-center gap-12px px-12px py-10px border-t-0.5px border>
61
+ <input
62
+ type="range"
63
+ min="0"
64
+ max="100"
65
+ step="0.1"
66
+ :value="progress"
67
+ :disabled="!url || failed || duration <= 0"
68
+ aria-label="Posição do áudio"
69
+ flex-1 cursor-pointer text-primary
70
+ class="chat-file-audio__track"
71
+ @input="seek"
72
+ >
73
+ <span body-12-regular text-secondary tabular-nums shrink-0>
74
+ {{ formatPlaybackTime(currentTime) }} / {{ formatPlaybackTime(duration) }}
75
+ </span>
76
+ </div>
77
+ <audio
78
+ v-if="url"
79
+ ref="player"
80
+ :src="url"
81
+ preload="metadata"
82
+ @play="playing = true"
83
+ @pause="playing = false"
84
+ @ended="playing = false"
85
+ @timeupdate="currentTime = player?.currentTime ?? 0"
86
+ @loadedmetadata="duration = player?.duration ?? 0"
87
+ @error="failed = true"
88
+ />
89
+ </ChatFileCard>
90
+ </template>
91
+
92
+ <style scoped>
93
+ .chat-file-audio__track{accent-color:currentColor;height:4px}
94
+ </style>
@@ -1,14 +1,15 @@
1
+ import type { ChatFileMenuItem } from './chat-file-card.vue.js';
1
2
  type __VLS_Props = {
2
- url: string;
3
- maxHeight?: number;
4
- clickable?: boolean;
3
+ url?: string;
4
+ iconSrc: string;
5
+ name: string;
6
+ meta: string;
7
+ menuItems: ChatFileMenuItem[];
5
8
  };
6
9
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
- click: () => any;
8
- loaded: () => any;
10
+ open: () => any;
9
11
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
- onClick?: (() => any) | undefined;
11
- onLoaded?: (() => any) | undefined;
12
+ onOpen?: (() => any) | undefined;
12
13
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
14
  declare const _default: typeof __VLS_export;
14
15
  export default _default;
@@ -0,0 +1,31 @@
1
+ export interface ChatFileMenuItem {
2
+ label: string;
3
+ icon: string;
4
+ click: () => void;
5
+ }
6
+ type __VLS_Props = {
7
+ iconSrc: string;
8
+ name: string;
9
+ meta: string;
10
+ menuItems: ChatFileMenuItem[];
11
+ disabled?: boolean;
12
+ };
13
+ declare var __VLS_1: {}, __VLS_14: {};
14
+ type __VLS_Slots = {} & {
15
+ actions?: (props: typeof __VLS_1) => any;
16
+ } & {
17
+ default?: (props: typeof __VLS_14) => any;
18
+ };
19
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ open: () => any;
21
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
+ onOpen?: (() => any) | undefined;
23
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,44 @@
1
+ <script setup>
2
+ defineProps({
3
+ iconSrc: { type: String, required: true },
4
+ name: { type: String, required: true },
5
+ meta: { type: String, required: true },
6
+ menuItems: { type: Array, required: true },
7
+ disabled: { type: Boolean, required: false }
8
+ });
9
+ const emit = defineEmits(["open"]);
10
+ </script>
11
+
12
+ <template>
13
+ <div w-full max-w-480px rounded-12px border-0.5px border bg overflow-hidden data-chat-file="card">
14
+ <div flex items-center gap-12px p-12px>
15
+ <button
16
+ type="button"
17
+ flex items-center gap-12px flex-1 min-w-0 text-left
18
+ :class="disabled ? 'cursor-default' : 'cursor-pointer'"
19
+ :disabled="disabled"
20
+ :aria-label="`Abrir ${name}`"
21
+ @click="emit('open')"
22
+ >
23
+ <span size-40px rounded-8px bg-subtle flex items-center justify-center shrink-0>
24
+ <img :src="iconSrc" alt="" size-20px>
25
+ </span>
26
+ <span flex flex-col min-w-0>
27
+ <span body-14-medium text-primary truncate :title="name">{{ name }}</span>
28
+ <span body-12-regular text-secondary truncate>{{ meta }}</span>
29
+ </span>
30
+ </button>
31
+ <slot name="actions" />
32
+ <TelaDropdownMenu :items="menuItems" align="end">
33
+ <TelaIconButton
34
+ icon="i-ph-dots-three"
35
+ color="secondary"
36
+ size="3xs"
37
+ aria-label="Ações do arquivo"
38
+ :disabled="disabled"
39
+ />
40
+ </TelaDropdownMenu>
41
+ </div>
42
+ <slot />
43
+ </div>
44
+ </template>
@@ -0,0 +1,31 @@
1
+ export interface ChatFileMenuItem {
2
+ label: string;
3
+ icon: string;
4
+ click: () => void;
5
+ }
6
+ type __VLS_Props = {
7
+ iconSrc: string;
8
+ name: string;
9
+ meta: string;
10
+ menuItems: ChatFileMenuItem[];
11
+ disabled?: boolean;
12
+ };
13
+ declare var __VLS_1: {}, __VLS_14: {};
14
+ type __VLS_Slots = {} & {
15
+ actions?: (props: typeof __VLS_1) => any;
16
+ } & {
17
+ default?: (props: typeof __VLS_14) => any;
18
+ };
19
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ open: () => any;
21
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
+ onOpen?: (() => any) | undefined;
23
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };