nuxt-discord 0.0.17 → 0.2.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.
Files changed (132) hide show
  1. package/README.md +249 -171
  2. package/dist/module.d.mts +146 -10
  3. package/dist/module.json +3 -3
  4. package/dist/module.mjs +1077 -348
  5. package/dist/runtime/acknowledgement.d.ts +11 -0
  6. package/dist/runtime/acknowledgement.js +156 -0
  7. package/dist/runtime/client/chat-theme.css +52 -0
  8. package/dist/runtime/client/components/ChatAvatar.d.vue.ts +6 -0
  9. package/dist/runtime/client/components/ChatAvatar.vue +11 -0
  10. package/dist/runtime/client/components/ChatAvatar.vue.d.ts +6 -0
  11. package/dist/runtime/client/components/CommandPicker.d.vue.ts +24 -0
  12. package/dist/runtime/client/components/CommandPicker.vue +67 -0
  13. package/dist/runtime/client/components/CommandPicker.vue.d.ts +24 -0
  14. package/dist/runtime/client/components/CommandReference.d.vue.ts +20 -0
  15. package/dist/runtime/client/components/CommandReference.vue +21 -0
  16. package/dist/runtime/client/components/CommandReference.vue.d.ts +20 -0
  17. package/dist/runtime/client/components/CommandTestBar.d.vue.ts +60 -0
  18. package/dist/runtime/client/components/CommandTestBar.vue +332 -0
  19. package/dist/runtime/client/components/CommandTestBar.vue.d.ts +60 -0
  20. package/dist/runtime/client/components/CommandTranscript.d.vue.ts +39 -0
  21. package/dist/runtime/client/components/CommandTranscript.vue +147 -0
  22. package/dist/runtime/client/components/CommandTranscript.vue.d.ts +39 -0
  23. package/dist/runtime/client/components/ProjectLogo.d.vue.ts +3 -0
  24. package/dist/runtime/client/components/ProjectLogo.vue +31 -0
  25. package/dist/runtime/client/components/ProjectLogo.vue.d.ts +3 -0
  26. package/dist/runtime/client/components/ReferenceContent.d.ts +26 -0
  27. package/dist/runtime/client/components/ReferenceContent.js +73 -0
  28. package/dist/runtime/client/components/TheHeader.d.vue.ts +3 -0
  29. package/dist/runtime/client/components/TheHeader.vue +53 -16
  30. package/dist/runtime/client/components/TheHeader.vue.d.ts +2 -2
  31. package/dist/runtime/client/components/appearance-select.d.ts +17 -0
  32. package/dist/runtime/client/components/appearance-select.js +15 -0
  33. package/dist/runtime/client/pages/activity.d.vue.ts +3 -0
  34. package/dist/runtime/client/pages/activity.vue +202 -0
  35. package/dist/runtime/client/pages/activity.vue.d.ts +3 -0
  36. package/dist/runtime/client/pages/context-menus.d.vue.ts +3 -0
  37. package/dist/runtime/client/pages/context-menus.vue +120 -0
  38. package/dist/runtime/client/pages/context-menus.vue.d.ts +3 -0
  39. package/dist/runtime/client/pages/listeners.d.vue.ts +3 -0
  40. package/dist/runtime/client/pages/listeners.vue +68 -0
  41. package/dist/runtime/client/pages/listeners.vue.d.ts +3 -0
  42. package/dist/runtime/client/pages/overview.d.vue.ts +3 -0
  43. package/dist/runtime/client/pages/overview.vue +280 -0
  44. package/dist/runtime/client/pages/overview.vue.d.ts +3 -0
  45. package/dist/runtime/client/pages/slash-commands.d.vue.ts +3 -0
  46. package/dist/runtime/client/pages/slash-commands.vue +185 -359
  47. package/dist/runtime/client/pages/slash-commands.vue.d.ts +2 -3
  48. package/dist/runtime/client/reference.css +46 -0
  49. package/dist/runtime/client/style.css +4 -1
  50. package/dist/runtime/client/useActivityLog.d.ts +7 -0
  51. package/dist/runtime/client/useActivityLog.js +76 -0
  52. package/dist/runtime/client/useCommandRegistry.d.ts +7 -0
  53. package/dist/runtime/client/useCommandRegistry.js +34 -0
  54. package/dist/runtime/client/useDashboardCatalog.d.ts +5 -0
  55. package/dist/runtime/client/useDashboardCatalog.js +9 -0
  56. package/dist/runtime/client/useDiscordCommandReference.d.ts +2 -0
  57. package/dist/runtime/client/useDiscordCommandReference.js +6 -0
  58. package/dist/runtime/dashboard/auth.d.ts +4 -0
  59. package/dist/runtime/dashboard/auth.js +55 -0
  60. package/dist/runtime/dashboard/oauth.d.ts +17 -0
  61. package/dist/runtime/dashboard/oauth.js +172 -0
  62. package/dist/runtime/dashboard/origin.d.ts +3 -0
  63. package/dist/runtime/dashboard/origin.js +15 -0
  64. package/dist/runtime/dashboard/permissions.d.ts +4 -0
  65. package/dist/runtime/dashboard/permissions.js +84 -0
  66. package/dist/runtime/dashboard/signin.d.ts +3 -0
  67. package/dist/runtime/dashboard/signin.js +42 -0
  68. package/dist/runtime/diagnostics.d.ts +4 -0
  69. package/dist/runtime/diagnostics.js +24 -0
  70. package/dist/runtime/discordInvocation.d.ts +14 -0
  71. package/dist/runtime/discordInvocation.js +28 -0
  72. package/dist/runtime/middleware.d.ts +1 -0
  73. package/dist/runtime/middleware.js +12 -0
  74. package/dist/runtime/reference/access.d.ts +6 -0
  75. package/dist/runtime/reference/access.js +143 -0
  76. package/dist/runtime/reference/catalog.d.ts +2 -0
  77. package/dist/runtime/reference/catalog.js +9 -0
  78. package/dist/runtime/reference/document.d.ts +2 -0
  79. package/dist/runtime/reference/document.js +22 -0
  80. package/dist/runtime/reference/hosted.d.ts +2 -0
  81. package/dist/runtime/reference/hosted.js +16 -0
  82. package/dist/runtime/reference/oauth.d.ts +2 -0
  83. package/dist/runtime/reference/oauth.js +4 -0
  84. package/dist/runtime/registration.d.ts +65 -0
  85. package/dist/runtime/registration.js +354 -0
  86. package/dist/runtime/server/api/discord/activity.get.d.ts +2 -0
  87. package/dist/runtime/server/api/discord/activity.get.js +6 -0
  88. package/dist/runtime/server/api/discord/catalog.get.d.ts +2 -0
  89. package/dist/runtime/server/api/discord/catalog.get.js +3 -0
  90. package/dist/runtime/server/api/discord/slash-command/autocomplete.post.d.ts +2 -0
  91. package/dist/runtime/server/api/discord/slash-command/autocomplete.post.js +14 -0
  92. package/dist/runtime/server/api/discord/slash-command/register.post.d.ts +1 -1
  93. package/dist/runtime/server/api/discord/slash-command/register.post.js +1 -1
  94. package/dist/runtime/server/api/discord/slash-command/remote-all.get.d.ts +1 -1
  95. package/dist/runtime/server/api/discord/slash-command/remote-diff.post.d.ts +1 -238
  96. package/dist/runtime/server/api/discord/slash-command/remote-diff.post.js +3 -1
  97. package/dist/runtime/server/api/discord/slash-command/test.post.d.ts +20 -0
  98. package/dist/runtime/server/api/discord/slash-command/test.post.js +19 -0
  99. package/dist/runtime/server/plugins/discord.js +95 -31
  100. package/dist/runtime/server/utils/client.d.ts +59 -246
  101. package/dist/runtime/server/utils/client.js +413 -451
  102. package/dist/runtime/server/utils/defineContextMenu.d.ts +49 -0
  103. package/dist/runtime/server/utils/defineContextMenu.js +12 -0
  104. package/dist/runtime/server/utils/defineListener.d.ts +24 -0
  105. package/dist/runtime/server/utils/defineListener.js +7 -0
  106. package/dist/runtime/server/utils/defineMiddleware.d.ts +29 -0
  107. package/dist/runtime/server/utils/defineMiddleware.js +24 -0
  108. package/dist/runtime/server/utils/describeCommand.d.ts +2 -0
  109. package/dist/runtime/server/utils/describeOption.d.ts +1 -1
  110. package/dist/runtime/server/utils/messageSender.d.ts +37 -0
  111. package/dist/runtime/server/utils/messageSender.js +149 -0
  112. package/dist/runtime/server/utils/middleware/cooldown.d.ts +1 -0
  113. package/dist/runtime/server/utils/middleware/cooldown.js +39 -0
  114. package/dist/runtime/server/utils/middleware/guildOnly.d.ts +1 -0
  115. package/dist/runtime/server/utils/middleware/guildOnly.js +6 -0
  116. package/dist/runtime/server/utils/middleware/ownerOnly.d.ts +1 -0
  117. package/dist/runtime/server/utils/middleware/ownerOnly.js +10 -0
  118. package/dist/runtime/server/utils/middleware/requireRole.d.ts +1 -0
  119. package/dist/runtime/server/utils/middleware/requireRole.js +15 -0
  120. package/dist/runtime/server/utils/reply.d.ts +13 -3
  121. package/dist/runtime/server/utils/reply.js +111 -162
  122. package/dist/runtime/server/utils/simulateInteraction.d.ts +20 -0
  123. package/dist/runtime/server/utils/simulateInteraction.js +127 -0
  124. package/dist/runtime/server/utils/useTextChannel.d.ts +56 -0
  125. package/dist/runtime/server/utils/useTextChannel.js +105 -0
  126. package/dist/types.d.mts +11 -1
  127. package/dist/types.d.ts +11 -1
  128. package/package.json +62 -44
  129. package/dist/runtime/client/components/TheHeader.css +0 -1
  130. package/dist/runtime/client/pages/slash-commands.css +0 -1
  131. package/dist/runtime/client/uno.config.d.ts +0 -2
  132. package/dist/runtime/client/uno.config.js +0 -10
@@ -0,0 +1,332 @@
1
+ <script setup>
2
+ import { computed, nextTick, reactive, ref, useId, watch } from "vue";
3
+ import ChatAvatar from "./ChatAvatar.vue";
4
+ import CommandPicker from "./CommandPicker.vue";
5
+ import CommandTranscript from "./CommandTranscript.vue";
6
+ const props = defineProps({
7
+ commands: { type: Array, required: true },
8
+ channel: { type: Boolean, required: false },
9
+ search: { type: String, required: false },
10
+ pinned: { type: Boolean, required: false },
11
+ suggest: { type: Function, required: false },
12
+ execute: { type: Function, required: false }
13
+ });
14
+ const id = useId();
15
+ const input = ref();
16
+ const query = ref("");
17
+ const open = ref(false);
18
+ const command = ref();
19
+ const values = ref({});
20
+ const fields = /* @__PURE__ */ new Map();
21
+ const runButton = ref();
22
+ const addedOptions = ref([]);
23
+ const pickingOption = ref(false);
24
+ const focusIndex = ref(0);
25
+ const index = ref(0);
26
+ const entries = ref([]);
27
+ let sequence = 0;
28
+ const more = ref(false);
29
+ const emojis = ref(false);
30
+ const emojiChoices = ["\u{1F600}", "\u{1F602}", "\u2764\uFE0F", "\u{1F44D}", "\u{1F389}", "\u{1F44B}", "\u2728", "\u{1F916}"];
31
+ const remoteChoices = ref([]);
32
+ const showChoices = ref(true);
33
+ function leaves(commands2, prefix = "") {
34
+ return commands2.flatMap((cmd) => {
35
+ const name = prefix + cmd.name;
36
+ return cmd.subcommands?.length ? leaves(cmd.subcommands, `${name} `) : [{ ...cmd, name }];
37
+ });
38
+ }
39
+ const commands = computed(() => leaves(props.commands));
40
+ const visibleOptions = computed(() => command.value?.options.filter((o) => o.required || addedOptions.value.includes(o.name)) ?? []);
41
+ const remainingOptions = computed(() => command.value?.options.filter((o) => !o.required && !addedOptions.value.includes(o.name)) ?? []);
42
+ const option = computed(() => visibleOptions.value[focusIndex.value]);
43
+ const value = computed(() => values.value[option.value?.name ?? ""] ?? "");
44
+ const matches = computed(() => commands.value.filter((cmd) => cmd.name.includes(query.value.slice(1).toLowerCase())).map((cmd) => ({
45
+ name: `/${cmd.name}`,
46
+ value: cmd.name,
47
+ description: cmd.description,
48
+ required: cmd.options.filter((o) => o.required).map((o) => o.name),
49
+ optional: cmd.options.filter((o) => !o.required).length
50
+ })));
51
+ const choices = computed(() => {
52
+ const fixed = option.value?.choices ?? (option.value?.type === 5 ? [{ name: "True", value: "true" }, { name: "False", value: "false" }] : void 0);
53
+ return (fixed?.filter((c) => c.name.toLowerCase().includes(value.value.toLowerCase())) ?? remoteChoices.value ?? []).map((c) => ({ name: c.name, value: String(c.value) }));
54
+ });
55
+ const picking = computed(() => command.value ? pickingOption.value || showChoices.value && choices.value.length > 0 : open.value && query.value.startsWith("/"));
56
+ const items = computed(() => pickingOption.value ? remainingOptions.value.map((o) => ({ name: o.name, value: o.name, description: o.description })) : command.value ? choices.value : matches.value);
57
+ const activeId = computed(() => picking.value && items.value[index.value] ? `${id}-${index.value}` : void 0);
58
+ watch([command, option, value], ([cmd, opt, search], _, cleanup) => {
59
+ remoteChoices.value = [];
60
+ index.value = 0;
61
+ if (!cmd || !opt?.hasAutocomplete || opt.choices?.length)
62
+ return;
63
+ if (props.suggest) {
64
+ remoteChoices.value = props.suggest(cmd.name, opt.name, search);
65
+ return;
66
+ }
67
+ const controller = new AbortController();
68
+ const timer = setTimeout(async () => {
69
+ try {
70
+ const result = await $fetch("/api/discord/slash-command/autocomplete", {
71
+ method: "POST",
72
+ body: { command: cmd.name, option: opt.name, value: search, options: values.value },
73
+ signal: controller.signal
74
+ });
75
+ if (!controller.signal.aborted)
76
+ remoteChoices.value = result;
77
+ } catch {
78
+ }
79
+ }, 150);
80
+ cleanup(() => {
81
+ clearTimeout(timer);
82
+ controller.abort();
83
+ });
84
+ });
85
+ function insertEmoji(emoji) {
86
+ emojis.value = false;
87
+ if (command.value && option.value) {
88
+ values.value[option.value.name] = (values.value[option.value.name] ?? "") + emoji;
89
+ focusField(focusIndex.value);
90
+ } else {
91
+ query.value += emoji;
92
+ nextTick(() => input.value?.focus({ preventScroll: true }));
93
+ }
94
+ }
95
+ function sendText() {
96
+ if (!query.value.trim() || query.value.startsWith("/"))
97
+ return;
98
+ entries.value.push({ id: ++sequence, at: /* @__PURE__ */ new Date(), messages: [query.value], state: "sent" });
99
+ cancel();
100
+ }
101
+ function focusField(i) {
102
+ nextTick(() => {
103
+ const opt = visibleOptions.value[i];
104
+ if (opt)
105
+ fields.get(opt.name)?.focus({ preventScroll: true });
106
+ else runButton.value?.focus({ preventScroll: true });
107
+ });
108
+ }
109
+ function choose(item) {
110
+ if (pickingOption.value) {
111
+ addedOptions.value.push(item.value);
112
+ pickingOption.value = false;
113
+ focusField(visibleOptions.value.findIndex((o) => o.name === item.value));
114
+ return;
115
+ }
116
+ if (command.value && option.value) {
117
+ values.value[option.value.name] = item.value;
118
+ showChoices.value = false;
119
+ focusField(focusIndex.value + 1);
120
+ return;
121
+ }
122
+ command.value = commands.value.find((c) => c.name === item.value);
123
+ query.value = "";
124
+ values.value = {};
125
+ addedOptions.value = [];
126
+ pickingOption.value = false;
127
+ focusIndex.value = 0;
128
+ open.value = false;
129
+ showChoices.value = true;
130
+ focusField(0);
131
+ }
132
+ function cancel() {
133
+ command.value = void 0;
134
+ pickingOption.value = false;
135
+ query.value = "";
136
+ open.value = false;
137
+ nextTick(() => input.value?.focus({ preventScroll: true }));
138
+ }
139
+ function browse() {
140
+ more.value = false;
141
+ cancel();
142
+ query.value = "/";
143
+ index.value = 0;
144
+ open.value = true;
145
+ }
146
+ async function send() {
147
+ const cmd = command.value;
148
+ if (!cmd)
149
+ return;
150
+ const missing = visibleOptions.value.findIndex((o) => o.required && !values.value[o.name]?.trim());
151
+ if (missing >= 0) {
152
+ focusField(missing);
153
+ fields.get(visibleOptions.value[missing].name)?.reportValidity();
154
+ return;
155
+ }
156
+ for (const [i, opt] of visibleOptions.value.entries()) {
157
+ const field = fields.get(opt.name);
158
+ const raw = values.value[opt.name]?.trim();
159
+ if (!field || !raw)
160
+ continue;
161
+ let error = "";
162
+ if (opt.choices?.length && !opt.choices.some((choice) => String(choice.value) === values.value[opt.name])) {
163
+ error = "Select one of the listed choices.";
164
+ } else if (opt.type === 4 || opt.type === 10) {
165
+ const n = Number(raw);
166
+ if (!Number.isFinite(n) || opt.type === 4 && !Number.isInteger(n))
167
+ error = opt.type === 4 ? "Enter an integer." : "Enter a number.";
168
+ else if (opt.min !== void 0 && n < opt.min)
169
+ error = `Enter a number greater than or equal to ${opt.min}.`;
170
+ else if (opt.max !== void 0 && n > opt.max)
171
+ error = `Enter a number less than or equal to ${opt.max}.`;
172
+ }
173
+ field.setCustomValidity(error);
174
+ if (!field.validity.valid) {
175
+ focusField(i);
176
+ field.reportValidity();
177
+ return;
178
+ }
179
+ }
180
+ const body = { name: cmd.name, options: Object.fromEntries(Object.entries(values.value).filter(([, v]) => v !== "")) };
181
+ const entry = reactive({ id: ++sequence, at: /* @__PURE__ */ new Date(), invocation: body, state: "pending", messages: [] });
182
+ entries.value.push(entry);
183
+ cancel();
184
+ try {
185
+ const result = props.execute ? await props.execute(body) : await $fetch("/api/discord/slash-command/test", { method: "POST", body });
186
+ if (!result.ok)
187
+ throw new Error(result.error || "The application did not respond");
188
+ const [initial, ...followUps] = result.replies ?? [];
189
+ entry.messages = initial ? [initial.content] : result.responses?.length ? result.responses : [result.response ?? "Command completed without a reply."];
190
+ entry.ephemeral = initial?.ephemeral ?? result.ephemeral;
191
+ entry.notices = result.notices;
192
+ entry.state = "sent";
193
+ const position = entries.value.findIndex((message) => message.id === entry.id);
194
+ if (position >= 0 && followUps.length) {
195
+ entries.value.splice(position + 1, 0, ...followUps.map((reply) => ({
196
+ id: ++sequence,
197
+ at: entry.at,
198
+ bot: true,
199
+ state: "sent",
200
+ messages: [reply.content],
201
+ ephemeral: reply.ephemeral
202
+ })));
203
+ }
204
+ } catch (error) {
205
+ entry.messages = [error instanceof Error ? error.message : String(error)];
206
+ entry.ephemeral = true;
207
+ entry.state = "error";
208
+ }
209
+ }
210
+ function keydown(e) {
211
+ if (e.isComposing)
212
+ return;
213
+ if (!command.value && picking.value && e.key === " ") {
214
+ const exact = matches.value.find((item) => item.name === query.value);
215
+ if (!exact)
216
+ return;
217
+ e.preventDefault();
218
+ choose(exact);
219
+ } else if (picking.value && ["ArrowDown", "ArrowUp"].includes(e.key)) {
220
+ e.preventDefault();
221
+ index.value = Math.max(0, Math.min(items.value.length - 1, index.value + (e.key === "ArrowDown" ? 1 : -1)));
222
+ } else if (picking.value && !e.shiftKey && (e.key === "Enter" || e.key === "Tab") && items.value[index.value]) {
223
+ e.preventDefault();
224
+ choose(items.value[index.value]);
225
+ } else if (e.key === "Escape") {
226
+ if (pickingOption.value)
227
+ pickingOption.value = false;
228
+ else if (command.value && picking.value)
229
+ showChoices.value = false;
230
+ else cancel();
231
+ } else if (e.key === "Enter" && command.value) {
232
+ e.preventDefault();
233
+ send();
234
+ } else if (e.key === "Enter" && !command.value) {
235
+ e.preventDefault();
236
+ sendText();
237
+ } else if (e.key === "Backspace" && command.value && !value.value) {
238
+ e.preventDefault();
239
+ if (focusIndex.value)
240
+ focusField(focusIndex.value - 1);
241
+ else cancel();
242
+ }
243
+ }
244
+ function focusOption(i) {
245
+ pickingOption.value = false;
246
+ focusIndex.value = i;
247
+ showChoices.value = true;
248
+ index.value = 0;
249
+ }
250
+ function setField(name, el) {
251
+ if (el instanceof HTMLInputElement)
252
+ fields.set(name, el);
253
+ else fields.delete(name);
254
+ }
255
+ </script>
256
+
257
+ <template>
258
+ <section aria-label="Command tester" class="flex min-w-0 flex-col font-chat text-base leading-[1.375] text-chat-text [font-size-adjust:0.478]" :class="channel ? 'channel-tester min-h-0 flex-1' : 'fixed inset-x-[max(12px,calc((100vw-72rem)/2+24px))] bottom-3 z-40'">
259
+ <CommandTranscript :entries="entries" :channel="!!channel" :search="search" :pinned="pinned" interactive @dismiss="(id2) => entries = entries.filter((entry) => entry.id !== id2)">
260
+ <slot />
261
+ </CommandTranscript>
262
+ <div class="relative shrink-0" :class="channel ? 'mx-2 mt-2 mb-[max(.5rem,env(safe-area-inset-bottom))]' : ''">
263
+ <CommandPicker v-if="picking" :id="id" :label="pickingOption ? 'Options' : option?.name ?? (query.length > 1 ? `Commands matching ${query}` : 'nuxt-discord')" :commands="!command" :searching="!command && query.length > 1" :index="index" :items="items" @choose="choose" @highlight="index = $event" />
264
+ <div class="rounded-lg border border-chat-line bg-chat-field">
265
+ <div v-if="command" class="flex min-h-9 items-center gap-2 rounded-t-lg border-b border-chat-line bg-chat-panel px-4 text-sm text-chat-muted">
266
+ <strong class="text-chat-text">{{ option?.name ?? `/${command.name}` }}</strong>{{ option?.description ?? command.description }}
267
+ <button type="button" aria-label="Cancel command" class="ml-auto grid size-7 cursor-pointer place-items-center rounded-full hover:text-chat-text" @click="cancel">
268
+ <UIcon name="i-lucide-circle-x" class="size-4" />
269
+ </button>
270
+ </div>
271
+ <div class="flex min-h-14 items-center gap-2 px-3 sm:gap-3 sm:px-4">
272
+ <UPopover v-if="!command" v-model:open="more" :content="{ side: 'top', align: 'start' }" :ui="{ content: 'rounded-lg bg-chat-panel p-1.5 text-chat-text font-chat ring-chat-line' }">
273
+ <button type="button" aria-label="More message options" class="mr-1.5 grid size-7 shrink-0 cursor-pointer place-items-center text-chat-muted hover:text-chat-text">
274
+ <UIcon name="i-lucide-plus" class="size-6" />
275
+ </button>
276
+ <template #content>
277
+ <button type="button" class="block w-full cursor-pointer rounded px-3 py-1 text-left hover:bg-chat-hover" @click="browse">
278
+ Browse commands
279
+ </button>
280
+ <button v-if="entries.length" type="button" class="block w-full cursor-pointer rounded px-3 py-1 text-left hover:bg-chat-hover" @click="entries = [];
281
+ more = false">
282
+ Clear local history
283
+ </button>
284
+ </template>
285
+ </UPopover>
286
+ <ChatAvatar v-else class="mr-2 size-[1.375rem] sm:mr-3" />
287
+ <input v-if="!command" ref="input" v-model="query" class="min-w-0 flex-1 bg-transparent py-3 outline-none placeholder:text-chat-faint" placeholder="Message #command-testing" aria-label="Message #command-testing" role="combobox" aria-autocomplete="list" :aria-controls="picking ? id : void 0" :aria-expanded="picking" :aria-activedescendant="activeId" autocomplete="off" @input="open = true;
288
+ index = 0" @focus="open = true" @blur="open = false" @keydown="keydown">
289
+ <div v-else class="flex min-w-0 flex-1 flex-wrap items-center gap-2 py-2">
290
+ <strong class="font-semibold">/{{ command.name }}</strong>
291
+ <label v-for="(opt, i) in visibleOptions" :key="opt.name" class="inline-flex max-w-full items-stretch overflow-hidden rounded-sm border border-chat-faint/60 text-base leading-[1.375] focus-within:border-chat-link">
292
+ <span class="bg-chat-field px-2">{{ opt.name }}</span>
293
+ <input :ref="(el) => setField(opt.name, el)" v-model="values[opt.name]" :required="opt.required" :minlength="opt.minLength" :maxlength="opt.maxLength" :aria-label="opt.name" role="combobox" aria-autocomplete="list" :aria-expanded="i === focusIndex && picking && !pickingOption" :aria-controls="picking && i === focusIndex ? id : void 0" :aria-activedescendant="i === focusIndex ? activeId : void 0" :style="{ width: `${Math.max(1, (values[opt.name]?.length ?? 0) + 1)}ch` }" class="box-content min-w-[.6rem] max-w-[45vw] bg-chat-hover px-1.5 outline-none" autocomplete="off" @focus="focusOption(i)" @input="showChoices = true;
294
+ fields.get(opt.name)?.setCustomValidity('')" @keydown="keydown">
295
+ </label>
296
+ <button v-if="remainingOptions.length" type="button" aria-haspopup="listbox" :aria-expanded="pickingOption" :aria-controls="pickingOption ? id : void 0" class="cursor-pointer rounded px-1 text-sm text-chat-muted hover:bg-chat-hover" @focus="showChoices = false" @click="pickingOption = !pickingOption;
297
+ index = 0" @keydown="pickingOption && keydown($event)">
298
+ +{{ remainingOptions.length }} optional
299
+ </button>
300
+ <button ref="runButton" type="button" aria-label="Run command" class="grid size-11 shrink-0 cursor-pointer place-items-center rounded text-chat-muted hover:text-chat-text lg:pointer-fine:h-5 lg:pointer-fine:w-px lg:pointer-fine:rounded-none lg:pointer-fine:px-0 lg:pointer-fine:focus-visible:bg-chat-text lg:pointer-fine:focus-visible:outline-none" @pointerdown.prevent @focus="focusIndex = -1;
301
+ showChoices = false" @click="send" @keydown.esc="cancel">
302
+ <UIcon name="i-lucide-send-horizontal" class="size-4 lg:pointer-fine:hidden" />
303
+ </button>
304
+ </div>
305
+ <div class="flex shrink-0 items-center gap-3 text-chat-muted sm:gap-4">
306
+ <UPopover v-if="!command || option" v-model:open="emojis" :content="{ side: 'top', align: 'end' }" :ui="{ content: 'grid grid-cols-4 gap-1 rounded-lg bg-chat-panel p-2 ring-chat-line' }">
307
+ <button type="button" aria-label="Add emoji" class="grid size-6 cursor-pointer place-items-center hover:text-chat-text">
308
+ <UIcon name="i-lucide-smile" class="size-5" />
309
+ </button>
310
+ <template #content>
311
+ <button v-for="emoji in emojiChoices" :key="emoji" type="button" class="size-9 cursor-pointer rounded text-xl hover:bg-chat-hover" @click="insertEmoji(emoji)">
312
+ {{ emoji }}
313
+ </button>
314
+ </template>
315
+ </UPopover>
316
+ <button v-if="!command" type="button" aria-label="Browse commands" class="grid size-6 cursor-pointer place-items-center hover:text-chat-text" @click="browse">
317
+ <UIcon name="i-lucide-shapes" class="size-5" />
318
+ </button>
319
+ </div>
320
+ </div>
321
+ </div>
322
+ </div>
323
+ </section>
324
+ </template>
325
+
326
+ <style scoped>
327
+ .channel-tester {
328
+ container-type: size;
329
+ /* The popup sits above its composer. Reserve its actual height and margins. */
330
+ --picker-space: calc(100cqh - 100% - 1.5rem);
331
+ }
332
+ </style>
@@ -0,0 +1,60 @@
1
+ interface Option {
2
+ name: string;
3
+ description: string;
4
+ required: boolean;
5
+ type: number;
6
+ choices?: {
7
+ name: string;
8
+ value: string | number;
9
+ }[];
10
+ minLength?: number;
11
+ maxLength?: number;
12
+ min?: number;
13
+ max?: number;
14
+ hasAutocomplete?: boolean;
15
+ }
16
+ interface Command {
17
+ name: string;
18
+ description: string;
19
+ options: Option[];
20
+ subcommands?: Command[];
21
+ }
22
+ interface TestResult {
23
+ ephemeral?: boolean;
24
+ ok: boolean;
25
+ response?: string;
26
+ responses?: string[];
27
+ replies?: {
28
+ content: string;
29
+ ephemeral: boolean;
30
+ }[];
31
+ notices?: string[];
32
+ error?: string;
33
+ }
34
+ interface TestRequest {
35
+ name: string;
36
+ options: Record<string, string>;
37
+ }
38
+ type __VLS_Props = {
39
+ commands: Command[];
40
+ channel?: boolean;
41
+ search?: string;
42
+ pinned?: boolean;
43
+ suggest?: (command: string, option: string, value: string) => NonNullable<Option['choices']>;
44
+ execute?: (body: TestRequest) => TestResult | Promise<TestResult>;
45
+ };
46
+ declare const __VLS_template: () => {
47
+ __VLS_Slots: {
48
+ default?: (props: {}) => any;
49
+ };
50
+ };
51
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
52
+ declare const __VLS_base: 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>;
53
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
54
+ declare const _default: typeof __VLS_export;
55
+ export default _default;
56
+ type __VLS_WithSlots<T, S> = T & {
57
+ new (): {
58
+ $slots: S;
59
+ };
60
+ };
@@ -0,0 +1,39 @@
1
+ export interface ChatEntry {
2
+ id: number;
3
+ at: Date;
4
+ ephemeral?: boolean;
5
+ bot?: boolean;
6
+ notices?: string[];
7
+ invocation?: {
8
+ name: string;
9
+ options: Record<string, string>;
10
+ };
11
+ messages: string[];
12
+ state: 'pending' | 'sent' | 'error';
13
+ }
14
+ type __VLS_Props = {
15
+ entries: ChatEntry[];
16
+ channel: boolean;
17
+ search?: string;
18
+ pinned?: boolean;
19
+ interactive?: boolean;
20
+ };
21
+ declare const __VLS_template: () => {
22
+ __VLS_Slots: {
23
+ default?: (props: {}) => any;
24
+ };
25
+ };
26
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
27
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
+ dismiss: (id: number) => any;
29
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
30
+ onDismiss?: ((id: number) => any) | undefined;
31
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
35
+ type __VLS_WithSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
@@ -0,0 +1,147 @@
1
+ <script setup>
2
+ import { useResizeObserver } from "@vueuse/core";
3
+ import { computed, nextTick, ref, watch } from "vue";
4
+ import ChatAvatar from "./ChatAvatar.vue";
5
+ const props = defineProps({
6
+ entries: { type: Array, required: true },
7
+ channel: { type: Boolean, required: true },
8
+ search: { type: String, required: false },
9
+ pinned: { type: Boolean, required: false },
10
+ interactive: { type: Boolean, required: false }
11
+ });
12
+ defineEmits(["dismiss"]);
13
+ const scroller = ref();
14
+ const follow = ref(true);
15
+ let lastHeight = 0;
16
+ const day = new Intl.DateTimeFormat(void 0, { month: "long", day: "numeric", year: "numeric" });
17
+ const pins = ref(/* @__PURE__ */ new Set());
18
+ const reactions = ref(/* @__PURE__ */ new Map());
19
+ const filtered = computed(() => {
20
+ const query = props.search?.trim().toLowerCase() ?? "";
21
+ return props.entries.filter((entry) => {
22
+ if (props.pinned && !pins.value.has(entry.id))
23
+ return false;
24
+ if (!query)
25
+ return true;
26
+ const invocation = entry.invocation;
27
+ const terms = invocation ? [`/${invocation.name}`, ...Object.values(invocation.options)] : [];
28
+ return terms.concat(entry.messages).some((s) => s.toLowerCase().includes(query));
29
+ });
30
+ });
31
+ function togglePin(id) {
32
+ if (pins.value.has(id))
33
+ pins.value.delete(id);
34
+ else pins.value.add(id);
35
+ }
36
+ function react(id, emoji) {
37
+ const selected = new Set(reactions.value.get(id));
38
+ if (selected.has(emoji))
39
+ selected.delete(emoji);
40
+ else selected.add(emoji);
41
+ reactions.value.set(id, selected);
42
+ }
43
+ function trackScroll() {
44
+ const el = scroller.value;
45
+ if (el && el.clientHeight === lastHeight)
46
+ follow.value = el.scrollHeight - el.scrollTop - el.clientHeight < 32;
47
+ }
48
+ function scrollToLatest() {
49
+ if (scroller.value) {
50
+ follow.value = true;
51
+ scroller.value.scrollTop = scroller.value.scrollHeight;
52
+ }
53
+ }
54
+ useResizeObserver(() => props.interactive ? scroller.value : void 0, () => {
55
+ lastHeight = scroller.value?.clientHeight ?? 0;
56
+ if (follow.value)
57
+ scrollToLatest();
58
+ });
59
+ watch(() => props.entries.map((e) => e.state), async (_, previous) => {
60
+ if (!props.entries.length) {
61
+ reactions.value.clear();
62
+ pins.value.clear();
63
+ }
64
+ const submitted = props.entries.length > previous.length;
65
+ if (!follow.value && !submitted)
66
+ return;
67
+ await nextTick();
68
+ scrollToLatest();
69
+ }, { flush: "pre" });
70
+ </script>
71
+
72
+ <template>
73
+ <div ref="scroller" :class="[channel && 'min-h-0 flex-1', interactive && 'overflow-y-auto overscroll-y-none', interactive && !channel && 'max-h-[40dvh] rounded-t-lg bg-chat-canvas']" @scroll.passive="trackScroll">
74
+ <div class="flex min-h-full flex-col justify-end">
75
+ <slot v-if="!search && !pinned" />
76
+ <p v-if="(search || pinned) && !filtered.length" class="px-5 py-6 text-sm text-chat-muted">
77
+ {{ pinned ? "No matching pinned messages" : "No matching messages" }}
78
+ </p>
79
+ <div :role="interactive ? 'log' : void 0" :aria-label="interactive ? 'Channel messages' : void 0" aria-relevant="additions text" class="shrink-0">
80
+ <template v-for="(entry, i) in filtered" :key="entry.id">
81
+ <div v-if="channel && (i === 0 || filtered[i - 1]?.at.toDateString() !== entry.at.toDateString())" class="mx-4 my-4 flex items-center gap-2 text-xs font-semibold text-chat-muted before:h-px before:flex-1 before:bg-chat-line after:h-px after:flex-1 after:bg-chat-line">
82
+ {{ day.format(entry.at) }}
83
+ </div>
84
+ <article
85
+ :tabindex="interactive ? -1 : void 0"
86
+ class="group/message relative mt-4 px-4 pb-0.5 pl-[4.5rem] text-base leading-[1.375]" :class="entry.ephemeral ? 'bg-chat-brand/5 before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-0.5 before:bg-chat-brand hover:bg-chat-brand/10' : 'hover:bg-chat-text/5'"
87
+ >
88
+ <div v-if="interactive && !entry.ephemeral && entry.state === 'sent'" role="group" aria-label="Message actions" class="pointer-events-none absolute -top-3 right-4 z-10 flex items-center gap-0.5 rounded-md border border-chat-line bg-chat-panel px-1 py-0.5 opacity-0 shadow group-focus-within/message:pointer-events-auto group-focus-within/message:opacity-100 group-hover/message:pointer-events-auto group-hover/message:opacity-100">
89
+ <button v-for="emoji in ['\u{1F4AF}', '\u{1F44D}', '\u{1F44E}']" :key="emoji" type="button" :aria-label="`React with ${emoji}`" :aria-pressed="reactions.get(entry.id)?.has(emoji) ?? false" class="grid size-7 cursor-pointer place-items-center rounded hover:bg-chat-hover" @click="react(entry.id, emoji)">
90
+ {{ emoji }}
91
+ </button>
92
+ <button type="button" :aria-label="pins.has(entry.id) ? 'Unpin message' : 'Pin message'" :aria-pressed="pins.has(entry.id)" class="grid size-7 cursor-pointer place-items-center rounded text-chat-muted hover:bg-chat-hover aria-pressed:text-chat-link" @click="togglePin(entry.id)">
93
+ <UIcon name="i-lucide-pin" class="size-4" />
94
+ </button>
95
+ </div>
96
+ <div v-if="entry.invocation" class="relative mb-1 flex min-h-5 items-center gap-1 text-sm leading-[1.3] text-chat-muted before:absolute before:top-1/2 before:right-[calc(100%+4px)] before:h-3 before:w-8 before:rounded-tl-md before:border-t-2 before:border-l-2 before:border-chat-faint/50">
97
+ <ChatAvatar user class="size-4" />
98
+ <span class="font-medium">You</span><span>used</span>
99
+ <UPopover :content="{ side: 'top', align: 'center', sideOffset: 8 }" :ui="{ content: 'max-w-[min(28rem,85vw)] rounded-[5px] bg-chat-panel px-3 py-2 font-chat text-base leading-5 text-chat-text shadow-lg ring-0' }">
100
+ <button type="button" :aria-label="`View sent command /${entry.invocation.name}`" class="inline-flex cursor-pointer items-center gap-0.5 rounded-sm bg-chat-brand/25 px-0.5 font-medium text-chat-link hover:underline focus-visible:outline-2">
101
+ <UIcon name="i-lucide-blocks" class="size-2.5" />{{ entry.invocation.name }}
102
+ </button>
103
+ <template #content>
104
+ <p class="break-words whitespace-pre-wrap">
105
+ <span>/{{ entry.invocation.name }}</span><template v-for="(value, key) in entry.invocation.options" :key="key">
106
+ <span>{{ ` ${key}: ` }}</span><span class="text-chat-text">{{ value }}</span>
107
+ </template>
108
+ </p>
109
+ </template>
110
+ </UPopover>
111
+ </div>
112
+ <div class="relative">
113
+ <ChatAvatar :user="!entry.invocation && !entry.bot" class="absolute top-0 -left-14 size-10" />
114
+ <div class="flex min-h-[1.375rem] flex-wrap items-center gap-x-1">
115
+ <b class="font-semibold">{{ entry.invocation || entry.bot ? "nuxt-discord" : "You" }}</b>
116
+ <span v-if="entry.invocation || entry.bot" class="inline-flex h-[.9375rem] items-center min-w-[2.125rem] justify-center rounded-[3px] bg-chat-brand px-1 text-[.8rem] leading-none font-semibold text-white">APP</span>
117
+ <NuxtTime :datetime="entry.at" hour="numeric" minute="2-digit" class="ml-1 text-xs font-medium text-chat-faint" />
118
+ </div>
119
+ <p v-if="entry.state === 'pending'" class="text-chat-muted italic">
120
+ Sending command...
121
+ </p>
122
+ <p v-for="(text, j) in entry.messages" :key="j" class="break-words whitespace-pre-wrap" :class="{ 'text-chat-error': entry.state === 'error', 'mt-1': j > 0 }">
123
+ {{ text }}
124
+ </p>
125
+ <p v-for="notice in entry.notices" :key="notice" class="mt-1 text-sm text-chat-muted">
126
+ {{ notice }}
127
+ </p>
128
+ <div v-if="entry.ephemeral" class="flex min-h-6 items-start gap-1 pt-1.5 text-xs leading-4 text-chat-muted">
129
+ <UIcon name="i-lucide-eye" class="size-4 shrink-0" /><span>Only you can see this</span>
130
+ <template v-if="interactive">
131
+ <span aria-hidden="true">•</span><button type="button" class="cursor-pointer text-chat-link hover:underline" @click="$emit('dismiss', entry.id)">
132
+ Dismiss message
133
+ </button>
134
+ </template>
135
+ </div>
136
+ <div v-if="reactions.get(entry.id)?.size" class="mt-1 flex gap-1">
137
+ <button v-for="emoji in reactions.get(entry.id)" :key="emoji" type="button" :aria-label="`Remove reaction ${emoji}`" class="flex cursor-pointer items-center gap-1 rounded-md border border-chat-brand bg-chat-brand/10 px-1.5 text-sm text-chat-link" @click="react(entry.id, emoji)">
138
+ {{ emoji }} 1
139
+ </button>
140
+ </div>
141
+ </div>
142
+ </article>
143
+ </template>
144
+ </div>
145
+ </div>
146
+ </div>
147
+ </template>
@@ -0,0 +1,39 @@
1
+ export interface ChatEntry {
2
+ id: number;
3
+ at: Date;
4
+ ephemeral?: boolean;
5
+ bot?: boolean;
6
+ notices?: string[];
7
+ invocation?: {
8
+ name: string;
9
+ options: Record<string, string>;
10
+ };
11
+ messages: string[];
12
+ state: 'pending' | 'sent' | 'error';
13
+ }
14
+ type __VLS_Props = {
15
+ entries: ChatEntry[];
16
+ channel: boolean;
17
+ search?: string;
18
+ pinned?: boolean;
19
+ interactive?: boolean;
20
+ };
21
+ declare const __VLS_template: () => {
22
+ __VLS_Slots: {
23
+ default?: (props: {}) => any;
24
+ };
25
+ };
26
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
27
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
+ dismiss: (id: number) => any;
29
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
30
+ onDismiss?: ((id: number) => any) | undefined;
31
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
35
+ type __VLS_WithSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,31 @@
1
+ <script setup>
2
+ import { useId } from "vue";
3
+ const seamMask = useId();
4
+ </script>
5
+
6
+ <template>
7
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="8 5.5 84 84" width="84" height="84">
8
+ <title>Nuxt Discord</title>
9
+ <defs>
10
+ <mask :id="seamMask" maskUnits="userSpaceOnUse" x="8" y="5.5" width="84" height="84">
11
+ <rect x="8" y="5.5" width="84" height="84" fill="white" />
12
+ <g transform="translate(1.3 -.65) scale(.97) translate(6.32 3.64) scale(.94155)" fill="black">
13
+ <path d="M10 45.4C25.8 37.9 39.4 36.4 47.7 39.7 52.1 41.5 55.5 45.1 57.8 48.1Q58.2 48.7 57.6 49 57.2 49.2 56.8 48.7C54.2 45.9 50.8 43 47 41.6 38.9 38.5 26 41.1 10 49.7Z" />
14
+ <path d="M57 19C62 23.4 66.6 30.5 67.05 37Q67.1 37.7 66.55 37.7 66.1 37.7 65.95 37.2C65.1 32.4 63.84 28.44 60.2 25.5Q56.8 22.75 53.9 19Z" />
15
+ </g>
16
+ </mask>
17
+ </defs>
18
+ <g :mask="`url(#${seamMask})`">
19
+ <path fill="#00dc82" style="fill: light-dark(#00b574, #00dc82)" d="M54.49 87.24C54.49 87.24 82.18 87.24 82.18 87.24 C83.06 87.24 83.91 86.93 84.67 86.49 C85.44 86.05 86.23 85.5 86.67 84.74 C87.11 83.98 87.42 83.12 87.42 82.25 C87.41 81.37 87.11 80.51 86.67 79.75 C86.67 79.75 67.96 47.58 67.96 47.58 C67.52 46.82 66.98 46.27 66.21 45.83 C65.45 45.39 64.35 45.08 63.47 45.08 C62.59 45.08 61.74 45.39 60.98 45.83 C60.21 46.27 59.67 46.82 59.23 47.58 C59.23 47.58 54.49 55.81 54.49 55.81 C54.49 55.81 45.01 39.84 45.01 39.84 C44.57 39.09 44.03 38.29 43.27 37.85 C42.5 37.41 41.65 37.35 40.77 37.35 C39.89 37.35 39.04 37.41 38.28 37.85 C37.51 38.29 36.72 39.09 36.28 39.84 C36.28 39.84 13.08 79.75 13.08 79.75 C12.64 80.51 12.59 81.37 12.58 82.25 C12.58 83.12 12.64 83.98 13.08 84.74 C13.53 85.5 14.31 86.05 15.08 86.49 C15.84 86.93 16.69 87.24 17.57 87.24 C17.57 87.24 35.03 87.24 35.03 87.24 C41.95 87.24 46.99 84.13 50.5 78.26 C50.5 78.26 58.98 63.54 58.98 63.54 C58.98 63.54 63.47 55.81 63.47 55.81 C63.47 55.81 77.19 79.26 77.19 79.26 C77.19 79.26 58.98 79.26 58.98 79.26 C58.98 79.26 54.49 87.24 54.49 87.24 C54.49 87.24 54.49 87.24 54.49 87.24 ZM34.78 79.26C34.78 79.26 22.56 79.26 22.56 79.26 C22.56 79.26 40.77 47.83 40.77 47.83 C40.77 47.83 50 63.54 50 63.54 C50 63.54 43.89 74.2 43.89 74.2 C41.56 78.01 38.9 79.26 34.78 79.26 C34.78 79.26 34.78 79.26 34.78 79.26 Z" />
20
+ <g transform="translate(1.3 -.65) scale(.97)" fill="#5865f2">
21
+ <g transform="translate(6.32 3.64) scale(.94155)">
22
+ <path d="M16.47 44.22C8 38.17 3.87 8.84 23.24 8.84 C40.6 8.84 53.4 20 60.2 25.5 C62.3 27.2 63.6 27.8 66.8 27.7 C74.1 27.7 79.7 28.4 81.5 32.4 C84.9 40 72.9 46.5 58.7 50C55.9 53.6 54.1 55.5 50.9 55.1 C40.6 53.1 30.4 46.2 12.4 54.1 Q10.2 55.1 10.9 52.9 Q12.3 48.3 16.47 44.22Z" />
23
+ </g>
24
+ <g fill="#fff">
25
+ <path d="M23.78 24.8C25.16 24.39 26.8 25.77 27.44 27.9 C28.09 30.02 27.49 32.08 26.12 32.5 C24.75 32.92 23.11 31.53 22.46 29.41 C21.82 27.29 22.41 25.22 23.78 24.8 Z" />
26
+ <path d="M31.25 26.36C30.22 24.37 30.53 22.17 31.93 21.45 C33.33 20.73 35.3 21.76 36.32 23.74 C37.35 25.73 37.04 27.93 35.64 28.65 C34.24 29.38 32.27 28.35 31.25 26.36 Z" />
27
+ </g>
28
+ </g>
29
+ </g>
30
+ </svg>
31
+ </template>