@8wave/ai-elements 0.114.0-beta.15 → 0.114.0-beta.19

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 (116) hide show
  1. package/dist/_chunks/{Agent-D3ODaN3E.js → Agent-DK76k05_.js} +2 -2
  2. package/dist/_chunks/{Agent-D3ODaN3E.js.map → Agent-DK76k05_.js.map} +1 -1
  3. package/dist/_chunks/{PkStreamingMarkdown-CYOm47PX.js → PkStreamingMarkdown-DstWSlvS.js} +228 -219
  4. package/dist/_chunks/{PkStreamingMarkdown-CYOm47PX.js.map → PkStreamingMarkdown-DstWSlvS.js.map} +1 -1
  5. package/dist/_chunks/{PkToolRequestGeolocation-BY7nXImb.js → PkToolRequestGeolocation-OF1PWhMw.js} +2 -2
  6. package/{dist-vue/_chunks/PkToolRequestGeolocation-9vfYNaQo.js.map → dist/_chunks/PkToolRequestGeolocation-OF1PWhMw.js.map} +1 -1
  7. package/dist/_chunks/{PkToolRequestOAuthConnection-DFOTALFt.js → PkToolRequestOAuthConnection-ChGMAKV7.js} +2 -2
  8. package/dist/_chunks/{PkToolRequestOAuthConnection-DFOTALFt.js.map → PkToolRequestOAuthConnection-ChGMAKV7.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowArtifact-DzHRWoru.js → PkToolShowArtifact-DY9H0dxc.js} +2 -2
  10. package/dist/_chunks/{PkToolShowArtifact-DzHRWoru.js.map → PkToolShowArtifact-DY9H0dxc.js.map} +1 -1
  11. package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js +72 -0
  12. package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js.map +1 -0
  13. package/dist/_chunks/{PkToolShowContactForm-1J6_1AA2.js → PkToolShowContactForm-Cz44l-LN.js} +2 -2
  14. package/dist/_chunks/{PkToolShowContactForm-1J6_1AA2.js.map → PkToolShowContactForm-Cz44l-LN.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowForm-DmQYj3v1.js → PkToolShowForm-BMHhgLGo.js} +3 -3
  16. package/dist/_chunks/{PkToolShowForm-DmQYj3v1.js.map → PkToolShowForm-BMHhgLGo.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowSources-BO8V5rlS.js → PkToolShowSources-C2xLEg1m.js} +3 -3
  18. package/dist/_chunks/{PkToolShowSources-BO8V5rlS.js.map → PkToolShowSources-C2xLEg1m.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowSuggestedReply-CTWVG1Zk.js → PkToolShowSuggestedReply-Dl4x_nEJ.js} +2 -2
  20. package/dist/_chunks/{PkToolShowSuggestedReply-CTWVG1Zk.js.map → PkToolShowSuggestedReply-Dl4x_nEJ.js.map} +1 -1
  21. package/dist/_chunks/{markdown-JpLFzufn.js → markdown-BrvkrEUr.js} +12 -12
  22. package/dist/_chunks/{markdown-JpLFzufn.js.map → markdown-BrvkrEUr.js.map} +1 -1
  23. package/dist/ai-elements.es.js +1792 -1983
  24. package/dist/ai-elements.es.js.map +1 -1
  25. package/dist-vue/PkChatbot.js +1 -1
  26. package/dist-vue/PkChatbotEmptyState.js +1 -1
  27. package/dist-vue/PkChatbotInput.js +1 -1
  28. package/dist-vue/PkChatbotMessages.js +1 -1
  29. package/dist-vue/PkChatbotStepPayload.js +1 -1
  30. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  31. package/dist-vue/PkChatbotSteps.js +1 -1
  32. package/dist-vue/PkChatbotViewChat.js +1 -1
  33. package/dist-vue/PkChatbotViewConversations.js +1 -1
  34. package/dist-vue/PkChatbotViewFiles.js +1 -1
  35. package/dist-vue/PkChatbotViewProfile.js +1 -1
  36. package/dist-vue/_chunks/{Agent-BNlmK-uJ.js → Agent-tbKw8Mdt.js} +2 -2
  37. package/dist-vue/_chunks/{Agent-BNlmK-uJ.js.map → Agent-tbKw8Mdt.js.map} +1 -1
  38. package/dist-vue/_chunks/{Document-2X01-F4Z.js → Document-p2Y_4gk8.js} +9 -9
  39. package/dist-vue/_chunks/{Document-2X01-F4Z.js.map → Document-p2Y_4gk8.js.map} +1 -1
  40. package/dist-vue/_chunks/{PkChatbot-DZP40EZP.js → PkChatbot-D5kerrVY.js} +8 -8
  41. package/dist-vue/_chunks/{PkChatbot-DZP40EZP.js.map → PkChatbot-D5kerrVY.js.map} +1 -1
  42. package/dist-vue/_chunks/{PkChatbotEmptyState-DycCrfwz.js → PkChatbotEmptyState-_GJMmvPc.js} +2 -2
  43. package/dist-vue/_chunks/{PkChatbotEmptyState-DycCrfwz.js.map → PkChatbotEmptyState-_GJMmvPc.js.map} +1 -1
  44. package/dist-vue/_chunks/{PkChatbotInput-BCuqLdkT.js → PkChatbotInput-BHIYDooq.js} +2 -2
  45. package/dist-vue/_chunks/{PkChatbotInput-BCuqLdkT.js.map → PkChatbotInput-BHIYDooq.js.map} +1 -1
  46. package/dist-vue/_chunks/PkChatbotMessages-DcFGzK2p.js +778 -0
  47. package/dist-vue/_chunks/PkChatbotMessages-DcFGzK2p.js.map +1 -0
  48. package/dist-vue/_chunks/{PkChatbotStepPayload-CI98RiNv.js → PkChatbotStepPayload-C36nXLW7.js} +2 -2
  49. package/dist-vue/_chunks/{PkChatbotStepPayload-CI98RiNv.js.map → PkChatbotStepPayload-C36nXLW7.js.map} +1 -1
  50. package/dist-vue/_chunks/{PkChatbotStepToolDetail-B8zXJOdI.js → PkChatbotStepToolDetail-CBX-AQXv.js} +3 -3
  51. package/dist-vue/_chunks/{PkChatbotStepToolDetail-B8zXJOdI.js.map → PkChatbotStepToolDetail-CBX-AQXv.js.map} +1 -1
  52. package/dist-vue/_chunks/{PkChatbotSteps-CL27pMFS.js → PkChatbotSteps-5OCiyojA.js} +7 -6
  53. package/dist-vue/_chunks/PkChatbotSteps-5OCiyojA.js.map +1 -0
  54. package/dist-vue/_chunks/{PkChatbotViewChat-BZVcDXzL.js → PkChatbotViewChat-TYnSR4Qi.js} +7 -7
  55. package/dist-vue/_chunks/{PkChatbotViewChat-BZVcDXzL.js.map → PkChatbotViewChat-TYnSR4Qi.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkChatbotViewConversations-Cx-mLdUE.js → PkChatbotViewConversations-CHpN4vhm.js} +2 -2
  57. package/dist-vue/_chunks/{PkChatbotViewConversations-Cx-mLdUE.js.map → PkChatbotViewConversations-CHpN4vhm.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkChatbotViewFiles-DLIa-xG8.js → PkChatbotViewFiles-BBBO5hyd.js} +3 -3
  59. package/dist-vue/_chunks/{PkChatbotViewFiles-DLIa-xG8.js.map → PkChatbotViewFiles-BBBO5hyd.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotViewProfile-DEc9apXY.js → PkChatbotViewProfile-CosaHA-g.js} +2 -2
  61. package/dist-vue/_chunks/{PkChatbotViewProfile-DEc9apXY.js.map → PkChatbotViewProfile-CosaHA-g.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkStreamingMarkdown-B2iju0WK.js → PkStreamingMarkdown-BQPMUS_f.js} +214 -205
  63. package/dist-vue/_chunks/{PkStreamingMarkdown-B2iju0WK.js.map → PkStreamingMarkdown-BQPMUS_f.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkToolRequestGeolocation-9vfYNaQo.js → PkToolRequestGeolocation-BOVbaCzQ.js} +2 -2
  65. package/{dist/_chunks/PkToolRequestGeolocation-BY7nXImb.js.map → dist-vue/_chunks/PkToolRequestGeolocation-BOVbaCzQ.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BorR5NmZ.js → PkToolRequestOAuthConnection-DMvCGPuX.js} +2 -2
  67. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BorR5NmZ.js.map → PkToolRequestOAuthConnection-DMvCGPuX.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkToolShowArtifact-C0J71YF6.js → PkToolShowArtifact-ClKehEEG.js} +2 -2
  69. package/dist-vue/_chunks/{PkToolShowArtifact-C0J71YF6.js.map → PkToolShowArtifact-ClKehEEG.js.map} +1 -1
  70. package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js +72 -0
  71. package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js.map +1 -0
  72. package/dist-vue/_chunks/{PkToolShowContactForm-De3Od9mC.js → PkToolShowContactForm-stJ8WT_G.js} +2 -2
  73. package/dist-vue/_chunks/{PkToolShowContactForm-De3Od9mC.js.map → PkToolShowContactForm-stJ8WT_G.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkToolShowDiagram-DmY_hhAS.js → PkToolShowDiagram-Bokc-KWa.js} +2 -2
  75. package/dist-vue/_chunks/{PkToolShowDiagram-DmY_hhAS.js.map → PkToolShowDiagram-Bokc-KWa.js.map} +1 -1
  76. package/dist-vue/_chunks/{PkToolShowEmail-D_Z15wCS.js → PkToolShowEmail-CgeqOII0.js} +2 -2
  77. package/dist-vue/_chunks/{PkToolShowEmail-D_Z15wCS.js.map → PkToolShowEmail-CgeqOII0.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkToolShowForm-DUGysIxj.js → PkToolShowForm-DJterU51.js} +4 -4
  79. package/dist-vue/_chunks/{PkToolShowForm-DUGysIxj.js.map → PkToolShowForm-DJterU51.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkToolShowMessage-e5_EI5mV.js → PkToolShowMessage-Dc8ZWZb_.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowMessage-e5_EI5mV.js.map → PkToolShowMessage-Dc8ZWZb_.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowProductList-B3X7Svyc.js → PkToolShowProductList-BpPA_HW6.js} +2 -2
  83. package/dist-vue/_chunks/{PkToolShowProductList-B3X7Svyc.js.map → PkToolShowProductList-BpPA_HW6.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkToolShowSources-BUjBSGc5.js → PkToolShowSources-jdu9js3i.js} +4 -4
  85. package/dist-vue/_chunks/{PkToolShowSources-BUjBSGc5.js.map → PkToolShowSources-jdu9js3i.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DA4NEjHB.js → PkToolShowSuggestedReply-qAWdCUhr.js} +2 -2
  87. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DA4NEjHB.js.map → PkToolShowSuggestedReply-qAWdCUhr.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolShowWebPages-DEih8h5k.js → PkToolShowWebPages-BGpGLkoz.js} +2 -2
  89. package/dist-vue/_chunks/{PkToolShowWebPages-DEih8h5k.js.map → PkToolShowWebPages-BGpGLkoz.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkUrl-3NH9t-WA.js → PkUrl-D5eqGgXF.js} +2 -2
  91. package/dist-vue/_chunks/{PkUrl-3NH9t-WA.js.map → PkUrl-D5eqGgXF.js.map} +1 -1
  92. package/dist-vue/_chunks/{createChatbotApiClient-DohvHshj.js → createChatbotApiClient-BlWs282E.js} +99 -137
  93. package/dist-vue/_chunks/createChatbotApiClient-BlWs282E.js.map +1 -0
  94. package/dist-vue/_chunks/{useChatbotStore-_10Jaf4z.js → useChatbotStore-CMo47fnS.js} +3 -3
  95. package/dist-vue/_chunks/{useChatbotStore-_10Jaf4z.js.map → useChatbotStore-CMo47fnS.js.map} +1 -1
  96. package/dist-vue/_chunks/{utils-BL4Ppr2R.js → utils--8iNpBr_.js} +2 -2
  97. package/dist-vue/_chunks/{utils-BL4Ppr2R.js.map → utils--8iNpBr_.js.map} +1 -1
  98. package/dist-vue/api.js +1 -1
  99. package/dist-vue/composables.js +11 -9
  100. package/dist-vue/composables.js.map +1 -1
  101. package/dist-vue/index.js +197 -197
  102. package/dist-vue/index.js.map +1 -1
  103. package/dist-vue/locales.js +2 -0
  104. package/dist-vue/packages/ability/src/index.d.ts +10 -14
  105. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +8 -4
  106. package/dist-vue/packages/components/src/chat/PkChatbotSteps.d.ts +1 -0
  107. package/dist-vue/style.css +1 -1
  108. package/package.json +1 -1
  109. package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js +0 -60
  110. package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js.map +0 -1
  111. package/dist-vue/_chunks/PkChatbotMessages-PjKRDNYJ.js +0 -776
  112. package/dist-vue/_chunks/PkChatbotMessages-PjKRDNYJ.js.map +0 -1
  113. package/dist-vue/_chunks/PkChatbotSteps-CL27pMFS.js.map +0 -1
  114. package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js +0 -61
  115. package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js.map +0 -1
  116. package/dist-vue/_chunks/createChatbotApiClient-DohvHshj.js.map +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8wave/ai-elements",
3
3
  "private": false,
4
- "version": "0.114.0-beta.15",
4
+ "version": "0.114.0-beta.19",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite --port 8082 --open --host",
@@ -1,60 +0,0 @@
1
- import { $ as e, C as t, L as n, O as r, St as i, Tt as a, _ as o, bt as s, d as c, h as l, it as u, m as d, v as f, x as p, xt as m, z as h } from "./vue.runtime.esm-bundler-CIT_Sbqw.js";
2
- import { i as g } from "./dist-QdjZA6MJ.js";
3
- import { a as _, r as v, t as y } from "./index.es-C2U5wcOx.js";
4
- r(), m(), u();
5
- var b = {
6
- key: 0,
7
- class: "border border-surface-3 rounded-xl w-full overflow-hidden"
8
- }, x = { class: "px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8" }, S = { class: "font-bold" }, C = { class: "overflow-x-auto" }, w = { class: "w-full text-12 border-collapse bg-surface" }, T = /* @__PURE__ */ t({
9
- __name: "PkToolShowComparison",
10
- props: { part: { type: null } },
11
- setup(t) {
12
- let r = t, { copy: u, copied: m } = g(), T = d(() => r.part), E = d(() => {
13
- let e = T.value.input?.items;
14
- return !e || e.length === 0 ? [] : Object.keys(e[0].values);
15
- }), D = (e) => e === "✓" ? "text-success" : e === "✗" ? "text-danger" : "text-word-2", O = () => {
16
- let e = T.value.input?.items;
17
- if (!e) return;
18
- let t = ["", ...e.map((e) => e.name)].join(" "), n = E.value.map((t) => [t.replace(/_/g, " "), ...e.map((e) => e.values[t] ?? "")].join(" "));
19
- u([t, ...n].join("\n"));
20
- };
21
- return (t, r) => {
22
- let u = y, d = v, g = _;
23
- return T.value?.input?.items?.length ? (n(), f("div", b, [l("div", x, [
24
- p(u, {
25
- name: "ri:scales-line",
26
- class: "text-16"
27
- }),
28
- l("strong", S, a(T.value.input.title ?? t.$t("label.comparison")), 1),
29
- p(g, {
30
- modifiers: "compact",
31
- class: "ml-auto shrink-0"
32
- }, {
33
- default: e(() => [p(d, {
34
- modifiers: "action-quiet-small",
35
- icon: s(m) ? "ri:check-line" : "ri:file-copy-line",
36
- label: s(m) ? t.$t("action.copied") : t.$t("action.copy"),
37
- onClick: O
38
- }, null, 8, ["icon", "label"])]),
39
- _: 1
40
- })
41
- ]), l("div", C, [l("table", w, [l("thead", null, [l("tr", null, [r[0] ||= l("th", { class: "text-left text-word-3 font-medium p-8 border-b border-surface-3 min-w-32" }, null, -1), (n(!0), f(c, null, h(T.value.input.items, (e) => (n(), f("th", {
42
- key: e.name,
43
- class: i(["text-center text-word-1 p-8 border-b border-surface-3 min-w-24", e.highlighted ? "font-semibold bg-surface-1" : "font-medium"])
44
- }, a(e.name), 3))), 128))])]), l("tbody", null, [(n(!0), f(c, null, h(E.value, (e, t) => (n(), f("tr", {
45
- key: e,
46
- class: i({ "bg-surface-1": t % 2 != 0 })
47
- }, [l("td", { class: i(["text-word-3 font-medium p-8 whitespace-nowrap", { "border-b border-surface-3": t !== E.value.length - 1 }]) }, a(e.replace(/_/g, " ")), 3), (n(!0), f(c, null, h(T.value.input.items, (r) => (n(), f("td", {
48
- key: r.name,
49
- class: i(["text-center p-8", [D(r.values[e]), {
50
- "border-b border-surface-3": t !== E.value.length - 1,
51
- "bg-surface-1": r.highlighted
52
- }]])
53
- }, a(r.values[e] ?? "-"), 3))), 128))], 2))), 128))])])])])) : o("", !0);
54
- };
55
- }
56
- });
57
- //#endregion
58
- export { T as default };
59
-
60
- //# sourceMappingURL=PkToolShowComparison-BJ7QBXtf.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PkToolShowComparison-BJ7QBXtf.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowComparison.vue","../../../../packages/components/src/chat/PkToolShowComparison.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title?: string\n items: Array<{\n name: string\n values: Record<string, string>\n highlighted?: boolean\n }>\n }\n }\n return part\n })\n\n const features = computed(() => {\n const items = toolPart.value.input?.items\n if (!items || items.length === 0) {\n return []\n }\n return Object.keys(items[0].values)\n })\n\n // The tool contract asks for \"✓\" and \"✗\" on boolean features: the pair is\n // a verdict, so it wears one and the table reads by eye (DESIGN.md).\n const valueColorClass = (value?: string) => {\n if (value === '✓') {\n return 'text-success'\n }\n if (value === '✗') {\n return 'text-danger'\n }\n return 'text-word-2'\n }\n\n const copyTable = () => {\n const items = toolPart.value.input?.items\n if (!items) {\n return\n }\n const header = ['', ...items.map((i) => i.name)].join('\\t')\n const rows = features.value.map((f) =>\n [f.replace(/_/g, ' '), ...items.map((i) => i.values[f] ?? '')].join(\n '\\t',\n ),\n )\n copy([header, ...rows].join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.items?.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:scales-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{\n toolPart.input.title ?? $t('label.comparison')\n }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyTable\" />\n </VvButtonGroup>\n </div>\n <div class=\"overflow-x-auto\">\n <table class=\"w-full text-12 border-collapse bg-surface\">\n <thead>\n <tr>\n <th\n class=\"text-left text-word-3 font-medium p-8 border-b border-surface-3 min-w-32\"></th>\n <th\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center text-word-1 p-8 border-b border-surface-3 min-w-24\"\n :class=\"\n item.highlighted\n ? 'font-semibold bg-surface-1'\n : 'font-medium'\n \">\n {{ item.name }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(feature, fIdx) in features\"\n :key=\"feature\"\n :class=\"{ 'bg-surface-1': fIdx % 2 !== 0 }\">\n <td\n class=\"text-word-3 font-medium p-8 whitespace-nowrap\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n }\">\n {{ feature.replace(/_/g, ' ') }}\n </td>\n <td\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center p-8\"\n :class=\"[\n valueColorClass(item.values[feature]),\n {\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n 'bg-surface-1': item.highlighted,\n },\n ]\">\n {{ item.values[feature] ?? '-' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title?: string\n items: Array<{\n name: string\n values: Record<string, string>\n highlighted?: boolean\n }>\n }\n }\n return part\n })\n\n const features = computed(() => {\n const items = toolPart.value.input?.items\n if (!items || items.length === 0) {\n return []\n }\n return Object.keys(items[0].values)\n })\n\n // The tool contract asks for \"✓\" and \"✗\" on boolean features: the pair is\n // a verdict, so it wears one and the table reads by eye (DESIGN.md).\n const valueColorClass = (value?: string) => {\n if (value === '✓') {\n return 'text-success'\n }\n if (value === '✗') {\n return 'text-danger'\n }\n return 'text-word-2'\n }\n\n const copyTable = () => {\n const items = toolPart.value.input?.items\n if (!items) {\n return\n }\n const header = ['', ...items.map((i) => i.name)].join('\\t')\n const rows = features.value.map((f) =>\n [f.replace(/_/g, ' '), ...items.map((i) => i.values[f] ?? '')].join(\n '\\t',\n ),\n )\n copy([header, ...rows].join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.items?.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:scales-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{\n toolPart.input.title ?? $t('label.comparison')\n }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyTable\" />\n </VvButtonGroup>\n </div>\n <div class=\"overflow-x-auto\">\n <table class=\"w-full text-12 border-collapse bg-surface\">\n <thead>\n <tr>\n <th\n class=\"text-left text-word-3 font-medium p-8 border-b border-surface-3 min-w-32\"></th>\n <th\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center text-word-1 p-8 border-b border-surface-3 min-w-24\"\n :class=\"\n item.highlighted\n ? 'font-semibold bg-surface-1'\n : 'font-medium'\n \">\n {{ item.name }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(feature, fIdx) in features\"\n :key=\"feature\"\n :class=\"{ 'bg-surface-1': fIdx % 2 !== 0 }\">\n <td\n class=\"text-word-3 font-medium p-8 whitespace-nowrap\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n }\">\n {{ feature.replace(/_/g, ' ') }}\n </td>\n <td\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center p-8\"\n :class=\"[\n valueColorClass(item.values[feature]),\n {\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n 'bg-surface-1': item.highlighted,\n },\n ]\">\n {{ item.values[feature] ?? '-' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;EAII,IAAM,IAAQ,GAIR,EAAE,SAAM,cAAW,EAAa,GAEhC,IAAW,QACA,EAAM,IAWtB,GAEK,IAAW,QAAe;GAC5B,IAAM,IAAQ,EAAS,MAAM,OAAO;GAIpC,OAHI,CAAC,KAAS,EAAM,WAAW,IACpB,CAAC,IAEL,OAAO,KAAK,EAAM,EAAE,CAAC,MAAM;EACtC,CAAC,GAIK,KAAmB,MACjB,MAAU,MACH,iBAEP,MAAU,MACH,gBAEJ,eAGL,UAAkB;GACpB,IAAM,IAAQ,EAAS,MAAM,OAAO;GACpC,IAAI,CAAC,GACD;GAEJ,IAAM,IAAS,CAAC,IAAI,GAAG,EAAM,KAAK,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,GAAI,GACpD,IAAO,EAAS,MAAM,KAAK,MAC7B,CAAC,EAAE,QAAQ,MAAM,GAAG,GAAG,GAAG,EAAM,KAAK,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC,CAAC,CAAC,KAC3D,GACJ,CACJ;GACA,EAAK,CAAC,GAAQ,GAAG,CAAI,CAAC,CAAC,KAAK,IAAI,CAAC;EACrC;;;GAKU,OAAA,EAAA,OAAU,OAAO,OAAO,UADlC,EAAA,GAAA,EAmEM,OAnEN,GAmEM,CAhEF,EAaM,OAbN,GAaM;IAXF,EAAgD,GAAA;KAAxC,MAAK;KAAiB,OAAM;;IACpC,EAEW,UAFX,GAEW,EADP,EAAA,MAAS,MAAM,SAASA,EAAAA,GAAE,kBAAA,CAAA,GAAA,CAAA;IAE9B,EAMgB,GAAA;KAND,WAAU;KAAU,OAAM;;KACrC,SAAA,QAIyB,CAJzB,EAIyB,GAAA;MAHrB,WAAU;MACT,MAAM,EAAA,CAAA,IAAM,kBAAA;MACZ,OAAO,EAAA,CAAA,IAASA,EAAAA,GAAE,eAAA,IAAoBA,EAAAA,GAAE,aAAA;MACxC,SAAO;;;;GAGpB,CAAA,GAAA,EAiDM,OAjDN,GAiDM,CAhDF,EA+CQ,SA/CR,GA+CQ,CA9CJ,EAgBQ,SAAA,MAAA,CAfJ,EAcK,MAAA,MAAA,CAbD,AAAA,EAAA,OAAA,EAC0F,MAAA,EAAtF,OAAM,2EAA0E,GAAA,MAAA,EAAA,IACpF,EAAA,EAAA,GAAA,EAUK,GAAA,MAAA,EATc,EAAA,MAAS,MAAM,QAAvB,OADX,EAAA,GAAA,EAUK,MAAA;IARA,KAAK,EAAK;IACX,OAAK,EAAA,CAAC,kEACmC,EAAK,cAAA,+BAAA,aAAA,CAAA;GAK3C,GAAA,EAAA,EAAK,IAAI,GAAA,CAAA,EAIxB,GAAA,GAAA,EAAA,CAAA,CAAA,CAAA,GAAA,EA4BQ,SAAA,MAAA,EA3BJ,EAAA,EAAA,GAAA,EA0BK,GAAA,MAAA,EAzByB,EAAA,QAAlB,GAAS,OADrB,EAAA,GAAA,EA0BK,MAAA;IAxBA,KAAK;IACL,OAAK,EAAA,EAAA,gBAAoB,IAAI,KAAA,EAAA,CAAA;GAC9B,GAAA,CAAA,EAOK,MAAA,EAND,OAAK,EAAA,CAAC,iDAA+C,EAAA,6BACsD,MAAS,EAAA,MAAS,SAAM,EAAA,CAAA,CAAA,EAIhI,GAAA,EAAA,EAAQ,QAAO,MAAA,GAAA,CAAA,GAAA,CAAA,IAEtB,EAAA,EAAA,GAAA,EAaK,GAAA,MAAA,EAZc,EAAA,MAAS,MAAM,QAAvB,OADX,EAAA,GAAA,EAaK,MAAA;IAXA,KAAK,EAAK;IACX,OAAK,EAAA,CAAC,mBAAiB,CACmB,EAAgB,EAAK,OAAO,EAAO,GAAA;KAA+I,6BAAA,MAAS,EAAA,MAAS,SAAM;KAA0D,gBAAA,EAAK;;GAQhT,GAAA,EAAA,EAAK,OAAO,MAAO,GAAA,GAAA,CAAA"}