@8wave/ai-elements 0.125.0-beta.27 → 0.125.0-beta.29

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 (121) hide show
  1. package/dist/_chunks/{PkChatbotFilePreview-CFGqa-tX.js → PkChatbotFilePreview-CqxtVySb.js} +100 -59
  2. package/dist/_chunks/PkChatbotFilePreview-CqxtVySb.js.map +1 -0
  3. package/dist/_chunks/{PkFilePreview-BPsD2P7s.js → PkFilePreview-DiLMoL-6.js} +32 -32
  4. package/dist/_chunks/{PkFilePreview-BPsD2P7s.js.map → PkFilePreview-DiLMoL-6.js.map} +1 -1
  5. package/dist/_chunks/{PkFilePreviewDialog-BW-Rubk2.js → PkFilePreviewDialog-CHBtxpoB.js} +2 -2
  6. package/dist/_chunks/{PkFilePreviewDialog-BW-Rubk2.js.map → PkFilePreviewDialog-CHBtxpoB.js.map} +1 -1
  7. package/dist/_chunks/PkImageEditorDialog-Cq8y_PtC.js +555 -0
  8. package/dist/_chunks/PkImageEditorDialog-Cq8y_PtC.js.map +1 -0
  9. package/dist/_chunks/{PkSelectionActions-DkETXtSL.js → PkSelectionActions-DFyvcEyl.js} +2 -2
  10. package/dist/_chunks/{PkSelectionActions-DkETXtSL.js.map → PkSelectionActions-DFyvcEyl.js.map} +1 -1
  11. package/dist/_chunks/{PkStreamingMarkdown-CqLpNWQv.js → PkStreamingMarkdown-0hE_Cx4W.js} +2 -2
  12. package/dist/_chunks/{PkStreamingMarkdown-CqLpNWQv.js.map → PkStreamingMarkdown-0hE_Cx4W.js.map} +1 -1
  13. package/dist/_chunks/{PkToolChatFile-iE4ZokYD.js → PkToolChatFile-DtQ9xY4w.js} +3 -3
  14. package/dist/_chunks/{PkToolChatFile-iE4ZokYD.js.map → PkToolChatFile-DtQ9xY4w.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShareDocument-lTHNZodf.js → PkToolShareDocument-BvHklbzb.js} +2 -2
  16. package/dist/_chunks/{PkToolShareDocument-lTHNZodf.js.map → PkToolShareDocument-BvHklbzb.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowArtifact-BNQrM5fY.js → PkToolShowArtifact-BdkKU6P1.js} +2 -2
  18. package/dist/_chunks/{PkToolShowArtifact-BNQrM5fY.js.map → PkToolShowArtifact-BdkKU6P1.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowContactForm-CvQoLumn.js → PkToolShowContactForm-BmM2MbOK.js} +2 -2
  20. package/dist/_chunks/{PkToolShowContactForm-CvQoLumn.js.map → PkToolShowContactForm-BmM2MbOK.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowForm-DcPccCEU.js → PkToolShowForm-CoFlgA-I.js} +3 -3
  22. package/dist/_chunks/{PkToolShowForm-DcPccCEU.js.map → PkToolShowForm-CoFlgA-I.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowSources-B3VpJBVE.js → PkToolShowSources-DDBlLBt6.js} +2 -2
  24. package/dist/_chunks/{PkToolShowSources-B3VpJBVE.js.map → PkToolShowSources-DDBlLBt6.js.map} +1 -1
  25. package/dist/_chunks/{utils-BZuri2jT.js → utils-ChmRkK0t.js} +12 -5
  26. package/dist/_chunks/utils-ChmRkK0t.js.map +1 -0
  27. package/dist/ai-elements.es.js +3196 -3114
  28. package/dist/ai-elements.es.js.map +1 -1
  29. package/dist-vue/PkChatbot.js +1 -1
  30. package/dist-vue/PkChatbotEmptyState.js +1 -1
  31. package/dist-vue/PkChatbotFilePreview.js +1 -1
  32. package/dist-vue/PkChatbotInput.js +1 -1
  33. package/dist-vue/PkChatbotMessages.js +1 -1
  34. package/dist-vue/PkChatbotStepPayload.js +1 -1
  35. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  36. package/dist-vue/PkChatbotSteps.js +1 -1
  37. package/dist-vue/PkChatbotViewChat.js +1 -1
  38. package/dist-vue/PkChatbotViewConversations.js +1 -1
  39. package/dist-vue/PkChatbotViewFiles.js +1 -1
  40. package/dist-vue/PkChatbotViewProfile.js +1 -1
  41. package/dist-vue/_chunks/{PkChatbot-N5lgU3-k.js → PkChatbot-BjJzskl7.js} +8 -8
  42. package/dist-vue/_chunks/{PkChatbot-N5lgU3-k.js.map → PkChatbot-BjJzskl7.js.map} +1 -1
  43. package/dist-vue/_chunks/{PkChatbotEmptyState-COya3H3C.js → PkChatbotEmptyState-CZC2gP3I.js} +2 -2
  44. package/dist-vue/_chunks/{PkChatbotEmptyState-COya3H3C.js.map → PkChatbotEmptyState-CZC2gP3I.js.map} +1 -1
  45. package/dist-vue/_chunks/{PkChatbotFilePreview-BsvT6orx.js → PkChatbotFilePreview-j_8sDZUE.js} +112 -71
  46. package/dist-vue/_chunks/PkChatbotFilePreview-j_8sDZUE.js.map +1 -0
  47. package/dist-vue/_chunks/PkChatbotInput-BmTdIJZ9.js +509 -0
  48. package/dist-vue/_chunks/PkChatbotInput-BmTdIJZ9.js.map +1 -0
  49. package/dist-vue/_chunks/PkChatbotMessages-b2lupEv9.js +1049 -0
  50. package/dist-vue/_chunks/{PkChatbotMessages-BISaZu4z.js.map → PkChatbotMessages-b2lupEv9.js.map} +1 -1
  51. package/dist-vue/_chunks/{PkChatbotStepPayload-cuYclK_2.js → PkChatbotStepPayload-D4w1XlF2.js} +2 -2
  52. package/dist-vue/_chunks/{PkChatbotStepPayload-cuYclK_2.js.map → PkChatbotStepPayload-D4w1XlF2.js.map} +1 -1
  53. package/dist-vue/_chunks/{PkChatbotStepToolDetail-Yd8cUQJP.js → PkChatbotStepToolDetail-DFTcjzoX.js} +3 -3
  54. package/dist-vue/_chunks/{PkChatbotStepToolDetail-Yd8cUQJP.js.map → PkChatbotStepToolDetail-DFTcjzoX.js.map} +1 -1
  55. package/dist-vue/_chunks/{PkChatbotSteps-_Aqft0em.js → PkChatbotSteps-D3zLulMo.js} +5 -5
  56. package/dist-vue/_chunks/{PkChatbotSteps-_Aqft0em.js.map → PkChatbotSteps-D3zLulMo.js.map} +1 -1
  57. package/dist-vue/_chunks/{PkChatbotViewChat-B3Nr7-kY.js → PkChatbotViewChat-DawyiUjq.js} +322 -344
  58. package/dist-vue/_chunks/PkChatbotViewChat-DawyiUjq.js.map +1 -0
  59. package/dist-vue/_chunks/{PkChatbotViewConversations-DjhiHp8-.js → PkChatbotViewConversations-Bs246dtL.js} +3 -3
  60. package/dist-vue/_chunks/{PkChatbotViewConversations-DjhiHp8-.js.map → PkChatbotViewConversations-Bs246dtL.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkChatbotViewFiles-C4oGN4Xj.js → PkChatbotViewFiles-uzZ5H4Fd.js} +2 -2
  62. package/dist-vue/_chunks/{PkChatbotViewFiles-C4oGN4Xj.js.map → PkChatbotViewFiles-uzZ5H4Fd.js.map} +1 -1
  63. package/dist-vue/_chunks/{PkChatbotViewProfile-NfTamy9j.js → PkChatbotViewProfile-BhIvfT_n.js} +2 -2
  64. package/dist-vue/_chunks/{PkChatbotViewProfile-NfTamy9j.js.map → PkChatbotViewProfile-BhIvfT_n.js.map} +1 -1
  65. package/dist-vue/_chunks/{PkFilePreview-D-BGFp9C.js → PkFilePreview-DfD48QQ_.js} +48 -48
  66. package/dist-vue/_chunks/{PkFilePreview-D-BGFp9C.js.map → PkFilePreview-DfD48QQ_.js.map} +1 -1
  67. package/dist-vue/_chunks/{PkFilePreviewDialog-By2TQolA.js → PkFilePreviewDialog-DFCBpQf3.js} +2 -2
  68. package/dist-vue/_chunks/{PkFilePreviewDialog-By2TQolA.js.map → PkFilePreviewDialog-DFCBpQf3.js.map} +1 -1
  69. package/dist-vue/_chunks/PkImageEditorDialog-BLUyILVi.js +550 -0
  70. package/dist-vue/_chunks/PkImageEditorDialog-BLUyILVi.js.map +1 -0
  71. package/dist-vue/_chunks/{PkStreamingMarkdown-2FN4WMQD.js → PkStreamingMarkdown-ChMbSviw.js} +2 -2
  72. package/dist-vue/_chunks/{PkStreamingMarkdown-2FN4WMQD.js.map → PkStreamingMarkdown-ChMbSviw.js.map} +1 -1
  73. package/dist-vue/_chunks/{PkToolChatFile-DAT1tv52.js → PkToolChatFile-DQtABEaI.js} +3 -3
  74. package/dist-vue/_chunks/{PkToolChatFile-DAT1tv52.js.map → PkToolChatFile-DQtABEaI.js.map} +1 -1
  75. package/dist-vue/_chunks/{PkToolShareDocument-Qb2Lu5vh.js → PkToolShareDocument-cMUqik6v.js} +2 -2
  76. package/dist-vue/_chunks/{PkToolShareDocument-Qb2Lu5vh.js.map → PkToolShareDocument-cMUqik6v.js.map} +1 -1
  77. package/dist-vue/_chunks/{PkToolShowArtifact-Bskomw05.js → PkToolShowArtifact-w6SxjLPW.js} +2 -2
  78. package/dist-vue/_chunks/{PkToolShowArtifact-Bskomw05.js.map → PkToolShowArtifact-w6SxjLPW.js.map} +1 -1
  79. package/dist-vue/_chunks/{PkToolShowContactForm-iQrlqv7j.js → PkToolShowContactForm-BQ7bBTQU.js} +2 -2
  80. package/dist-vue/_chunks/{PkToolShowContactForm-iQrlqv7j.js.map → PkToolShowContactForm-BQ7bBTQU.js.map} +1 -1
  81. package/dist-vue/_chunks/{PkToolShowDiagram-C-43uUoh.js → PkToolShowDiagram-D-yQgdOL.js} +2 -2
  82. package/dist-vue/_chunks/{PkToolShowDiagram-C-43uUoh.js.map → PkToolShowDiagram-D-yQgdOL.js.map} +1 -1
  83. package/dist-vue/_chunks/{PkToolShowForm-CKXpqQxy.js → PkToolShowForm-CF00JLpa.js} +3 -3
  84. package/dist-vue/_chunks/{PkToolShowForm-CKXpqQxy.js.map → PkToolShowForm-CF00JLpa.js.map} +1 -1
  85. package/dist-vue/_chunks/{PkToolShowImageGallery-DLTn6JmU.js → PkToolShowImageGallery-ZJMWOWHq.js} +2 -2
  86. package/dist-vue/_chunks/{PkToolShowImageGallery-DLTn6JmU.js.map → PkToolShowImageGallery-ZJMWOWHq.js.map} +1 -1
  87. package/dist-vue/_chunks/{PkToolShowProductList-hhSBAQVC.js → PkToolShowProductList-CeKI9H36.js} +2 -2
  88. package/dist-vue/_chunks/{PkToolShowProductList-hhSBAQVC.js.map → PkToolShowProductList-CeKI9H36.js.map} +1 -1
  89. package/dist-vue/_chunks/{PkToolShowSources-BMo_i8sv.js → PkToolShowSources-CXZqanmw.js} +2 -2
  90. package/dist-vue/_chunks/{PkToolShowSources-BMo_i8sv.js.map → PkToolShowSources-CXZqanmw.js.map} +1 -1
  91. package/dist-vue/_chunks/{PkToolShowVideo-DJhsbDuX.js → PkToolShowVideo-BCs-i6xQ.js} +2 -2
  92. package/dist-vue/_chunks/{PkToolShowVideo-DJhsbDuX.js.map → PkToolShowVideo-BCs-i6xQ.js.map} +1 -1
  93. package/dist-vue/_chunks/{PkToolShowWebPages-BAv66f5H.js → PkToolShowWebPages-Bixa0CjQ.js} +2 -2
  94. package/dist-vue/_chunks/{PkToolShowWebPages-BAv66f5H.js.map → PkToolShowWebPages-Bixa0CjQ.js.map} +1 -1
  95. package/dist-vue/_chunks/{useChatbotStore-BZ1n3Hyx.js → useChatbotStore-BIjCGX0B.js} +858 -835
  96. package/dist-vue/_chunks/useChatbotStore-BIjCGX0B.js.map +1 -0
  97. package/dist-vue/_chunks/{utils-RwaXl9-x.js → utils-CaYEz-0A.js} +11 -4
  98. package/dist-vue/_chunks/utils-CaYEz-0A.js.map +1 -0
  99. package/dist-vue/composables.js +56 -4
  100. package/dist-vue/composables.js.map +1 -1
  101. package/dist-vue/index.js +49 -49
  102. package/dist-vue/index.js.map +1 -1
  103. package/dist-vue/locales.js +56 -0
  104. package/dist-vue/packages/components/src/chat/PkChatbotFilePreview.d.ts +14 -0
  105. package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +17 -3
  106. package/dist-vue/packages/components/src/chat/PkImageEditor.d.ts +37 -0
  107. package/dist-vue/packages/components/src/chat/PkImageEditorDialog.d.ts +19 -0
  108. package/dist-vue/packages/components/src/chat/imageEdits.d.ts +106 -0
  109. package/dist-vue/packages/components/src/chat/utils.d.ts +7 -0
  110. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +7 -1
  111. package/dist-vue/style.css +1 -1
  112. package/package.json +1 -1
  113. package/dist/_chunks/PkChatbotFilePreview-CFGqa-tX.js.map +0 -1
  114. package/dist/_chunks/utils-BZuri2jT.js.map +0 -1
  115. package/dist-vue/_chunks/PkChatbotFilePreview-BsvT6orx.js.map +0 -1
  116. package/dist-vue/_chunks/PkChatbotInput-D0KUEkAs.js +0 -478
  117. package/dist-vue/_chunks/PkChatbotInput-D0KUEkAs.js.map +0 -1
  118. package/dist-vue/_chunks/PkChatbotMessages-BISaZu4z.js +0 -1049
  119. package/dist-vue/_chunks/PkChatbotViewChat-B3Nr7-kY.js.map +0 -1
  120. package/dist-vue/_chunks/useChatbotStore-BZ1n3Hyx.js.map +0 -1
  121. package/dist-vue/_chunks/utils-RwaXl9-x.js.map +0 -1
@@ -2,11 +2,11 @@ import { r as e } from "./rolldown-runtime-9rEmUaIe.js";
2
2
  import { A as t, B as n, Et as r, F as i, I as a, J as o, L as s, N as c, Ot as l, Q as u, S as d, Tt as f, V as p, X as m, _ as h, d as g, f as _, g as v, gt as y, h as b, j as ee, k as x, kt as S, ot as C, r as w, tt as te, v as T, vt as E, w as D, wt as O, x as ne, y as k, z as A } from "./vue.runtime.esm-bundler-C2U5uTqB.js";
3
3
  import { r as re } from "./vue-i18n-POtLvOl1.js";
4
4
  import { i as j, n as M, r as N } from "./excelNumberFormat-BhQjife9.js";
5
- import { B as P, G as F, H as ie, K as ae, U as I, V as oe, W as se, o as L, z as R } from "./utils-BZuri2jT.js";
5
+ import { B as P, G as ie, H as ae, K as F, U as I, V as oe, W as se, o as L, q as R } from "./utils-ChmRkK0t.js";
6
6
  import { d as ce, l as le } from "./dist-D6oUr4J_.js";
7
7
  import { t as ue } from "./index.es-D-aOuzzp.js";
8
8
  import { t as de } from "./VvButtonLocalized-B32dBwWJ.js";
9
- import { i as z, r as fe, t as pe } from "./PkSelectionActions-DkETXtSL.js";
9
+ import { i as z, r as fe, t as pe } from "./PkSelectionActions-DFyvcEyl.js";
10
10
  import { t as B } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
11
11
  import { t as me } from "./PkEditorRadioButtons-ClUWPayk.js";
12
12
  // ../../packages/components/src/chat/fileSelection.ts
@@ -148,15 +148,15 @@ var Ce = { class: "pk-spreadsheet-preview" }, we = { class: "pk-spreadsheet-prev
148
148
  e.set(Number(n), i ? `${i},${r}` : r);
149
149
  }
150
150
  return e;
151
- }), F = (e, t) => !!D.value?.has(`${e}:${t}`);
151
+ }), ie = (e, t) => !!D.value?.has(`${e}:${t}`);
152
152
  u(() => n.marked, (e) => {
153
153
  if (!e || D.value) return;
154
154
  let t = n.preview.sheets.findIndex((t) => e.has(t.name));
155
155
  t >= 0 && (h.value = t);
156
156
  }, { immediate: !0 });
157
- let ie = () => fe(C.value, ".pk-spreadsheet-preview__cell--marked");
158
- u(D, ie, { flush: "post" }), s(ie);
159
- let ae = (e) => {
157
+ let ae = () => fe(C.value, ".pk-spreadsheet-preview__cell--marked");
158
+ u(D, ae, { flush: "post" }), s(ae);
159
+ let F = (e) => {
160
160
  let t = "";
161
161
  for (let n = e; n > 0; n = Math.floor((n - 1) / 26)) t = String.fromCharCode(65 + (n - 1) % 26) + t;
162
162
  return t;
@@ -421,7 +421,7 @@ var Ce = { class: "pk-spreadsheet-preview" }, we = { class: "pk-spreadsheet-prev
421
421
  v("span", {
422
422
  class: "pk-spreadsheet-preview__ref",
423
423
  "aria-label": O(c)("chatFilePreview.cell")
424
- }, S(ae(Z.value.col)) + S(Z.value.row), 9, Te),
424
+ }, S(F(Z.value.col)) + S(Z.value.row), 9, Te),
425
425
  n[6] ||= v("span", {
426
426
  class: "pk-spreadsheet-preview__fx",
427
427
  "aria-hidden": "true"
@@ -463,7 +463,7 @@ var Ce = { class: "pk-spreadsheet-preview" }, we = { class: "pk-spreadsheet-prev
463
463
  left: `${qe(e.col)}px`,
464
464
  zIndex: 2
465
465
  } : void 0)
466
- }, S(ae(e.col)), 7))), 128))], 4)]),
466
+ }, S(F(e.col)), 7))), 128))], 4)]),
467
467
  v("tbody", null, [(A(!0), k(_, null, p(R.value, (e, t, n, i) => {
468
468
  let a = [
469
469
  e,
@@ -492,7 +492,7 @@ var Ce = { class: "pk-spreadsheet-preview" }, we = { class: "pk-spreadsheet-prev
492
492
  class: r(["pk-spreadsheet-preview__cell", {
493
493
  "pk-spreadsheet-preview__cell--range": Xe(e.row, t.col) && !Ze(e.row, t.col),
494
494
  "pk-spreadsheet-preview__cell--missing": z(e.row, t.col)?.missing,
495
- "pk-spreadsheet-preview__cell--marked": F(e.row, t.col)
495
+ "pk-spreadsheet-preview__cell--marked": ie(e.row, t.col)
496
496
  }]),
497
497
  style: l(U(z(e.row, t.col), e.row, t.col)),
498
498
  "data-focus": Ze(e.row, t.col) ? "" : void 0,
@@ -562,7 +562,7 @@ var We = ["src"], Ge = {
562
562
  numbers: { type: Object }
563
563
  },
564
564
  setup(e) {
565
- let n = e, { t: i } = re({ useScope: "global" }), a = t(L, void 0), o = (e) => e.picture ? ae(a?.value, e.picture.ref) : void 0, s = (e) => n.page ? F(e) : "inline", c = (e) => {
565
+ let n = e, { t: i } = re({ useScope: "global" }), a = t(L, void 0), o = (e) => e.picture ? R(a?.value, e.picture.ref) : void 0, s = (e) => n.page ? F(e) : "inline", c = (e) => {
566
566
  let t = {
567
567
  width: `${e.width}pt`,
568
568
  aspectRatio: `${e.width} / ${e.height}`
@@ -590,11 +590,11 @@ var We = ["src"], Ge = {
590
590
  zIndex: r.wrap === "behind" ? -1 : 1
591
591
  };
592
592
  }, u = (e) => e.field && n.numbers ? String(n.numbers[e.field]) : e.text, d = b(() => {
593
- let e = oe(n.runs, n.mode ?? "markup"), t = (e) => !!e.picture && !!n.page && ["around", "block"].includes(F(e.picture));
593
+ let e = ae(n.runs, n.mode ?? "markup"), t = (e) => !!e.picture && !!n.page && ["around", "block"].includes(F(e.picture));
594
594
  return [...e.filter(t), ...e.filter((e) => !t(e))];
595
595
  }), f = b(() => !n.mode || n.mode === "markup"), m = (e) => {
596
596
  let t = {};
597
- e.font && (t.fontFamily = P(e.font)), t.fontSize = e.size ? `${e.size}pt` : "var(--pk-word-size)", e.color && (t.color = e.color), e.highlight && (t.backgroundColor = e.highlight), e.bold && (t.fontWeight = 700), e.italic && (t.fontStyle = "italic");
597
+ e.font && (t.fontFamily = oe(e.font)), t.fontSize = e.size ? `${e.size}pt` : "var(--pk-word-size)", e.color && (t.color = e.color), e.highlight && (t.backgroundColor = e.highlight), e.bold && (t.fontWeight = 700), e.italic && (t.fontStyle = "italic");
598
598
  let n = [e.underline ? "underline" : "", e.strike ? "line-through" : ""].filter(Boolean).join(" ");
599
599
  return n && (t.textDecoration = n), e.caps && (t.textTransform = "uppercase"), e.vertAlign && (t.verticalAlign = e.vertAlign, t.fontSize = `${(e.size ?? 11) * .65}pt`), t;
600
600
  }, h = (e) => {
@@ -740,11 +740,11 @@ var Qe = { class: "pk-word-preview__part" }, $e = ["src"], $ = /* @__PURE__ */ D
740
740
  numbers: { type: Object }
741
741
  },
742
742
  setup(e) {
743
- let n = e, r = t(L, void 0), i = b(() => R(n.blocks, n.mode)), a = b(() => se(n.blocks, n.mode).flatMap((e) => {
744
- let t = ae(r?.value, e.ref);
743
+ let n = e, r = t(L, void 0), i = b(() => P(n.blocks, n.mode)), a = b(() => ie(n.blocks, n.mode).flatMap((e) => {
744
+ let t = R(r?.value, e.ref);
745
745
  return t ? [{
746
746
  src: t,
747
- css: I(e, n.section.page)
747
+ css: se(e, n.section.page)
748
748
  }] : [];
749
749
  })), o = b(() => {
750
750
  let { margins: e } = n.section.page;
@@ -830,17 +830,17 @@ var et = ["aria-label"], tt = {
830
830
  setup(e, { emit: t }) {
831
831
  let c = e, f = t, { t: g } = re({ useScope: "global" });
832
832
  n(L, b(() => c.preview.images));
833
- let ee = (e) => oe(e, c.mode), x = b(() => R(c.preview.blocks, c.mode)), C = m("rootEl"), w = m("scrollEl"), te = m("measureEl"), { width: E } = le(C), { width: D } = le(w), ne = b(() => E.value >= 1e3), j = b(() => c.preview.sections?.length ? c.preview.sections : [{
833
+ let ee = (e) => ae(e, c.mode), x = b(() => P(c.preview.blocks, c.mode)), C = m("rootEl"), w = m("scrollEl"), te = m("measureEl"), { width: E } = le(C), { width: D } = le(w), ne = b(() => E.value >= 1e3), j = b(() => c.preview.sections?.length ? c.preview.sections : [{
834
834
  page: c.preview.page,
835
835
  headerDistance: 0,
836
836
  footerDistance: 0,
837
837
  headers: {},
838
838
  footers: {}
839
839
  }]), M = b(() => j.value[0].page), N = b(() => (D.value - 48) / (M.value.width * Et)), F = b(() => E.value === 0 || D.value === 0 || N.value >= Dt), ce = b(() => ({
840
- fontFamily: P(c.preview.defaults.font),
840
+ fontFamily: oe(c.preview.defaults.font),
841
841
  fontSize: `${c.preview.defaults.size}pt`,
842
842
  color: c.preview.defaults.color ?? "#000000",
843
- "--pk-word-line": ie(c.preview.defaults.font),
843
+ "--pk-word-line": I(c.preview.defaults.font),
844
844
  "--pk-word-size": `${c.preview.defaults.size}pt`
845
845
  })), ue = b(() => M.value.width - M.value.margins.left - M.value.margins.right), pe = b(() => ({
846
846
  ...ce.value,
@@ -931,11 +931,11 @@ var et = ["aria-label"], tt = {
931
931
  };
932
932
  }, ye = (e) => {
933
933
  let t = [...new Set(e.items.map((e) => x.value[e].block))];
934
- return se(t.map((e) => c.preview.blocks[e]), c.mode).flatMap((t) => {
935
- let n = ae(c.preview.images, t.ref);
934
+ return ie(t.map((e) => c.preview.blocks[e]), c.mode).flatMap((t) => {
935
+ let n = R(c.preview.images, t.ref);
936
936
  return n ? [{
937
937
  src: n,
938
- css: I(t, j.value[e.section].page)
938
+ css: se(t, j.value[e.section].page)
939
939
  }] : [];
940
940
  });
941
941
  }, G = o(e, "fit"), K = o(e, "zoom"), q = b(() => G.value ? Math.min(1.25, Math.max(.3, N.value)) : K.value), xe = (e) => {
@@ -1208,7 +1208,7 @@ var et = ["aria-label"], tt = {
1208
1208
  ])]))), 128)), (A(!0), k(_, null, p(e.preview.parts, (t, n) => (A(), k("div", {
1209
1209
  key: n,
1210
1210
  "data-part": n
1211
- }, [(A(!0), k(_, null, p(O(R)(t, e.mode), (n) => (A(), h(Ze, {
1211
+ }, [(A(!0), k(_, null, p(O(P)(t, e.mode), (n) => (A(), h(Ze, {
1212
1212
  key: n.key,
1213
1213
  block: t[n.block],
1214
1214
  row: n.row,
@@ -1298,7 +1298,7 @@ var kt = ["aria-label"], At = { class: "pk-file-preview__head" }, jt = { class:
1298
1298
  u(() => n.version, () => {
1299
1299
  x.value = "markup";
1300
1300
  });
1301
- let M = m("rootEl"), N = E(), P = y(!1), F = () => {
1301
+ let M = m("rootEl"), N = E(), P = y(!1), ie = () => {
1302
1302
  N.value = void 0, P.value = !1;
1303
1303
  };
1304
1304
  u(() => [
@@ -1306,15 +1306,15 @@ var kt = ["aria-label"], At = { class: "pk-file-preview__head" }, jt = { class:
1306
1306
  n.preview,
1307
1307
  x.value,
1308
1308
  C.value
1309
- ], F);
1310
- let ie = (e) => {
1309
+ ], ie);
1310
+ let ae = (e) => {
1311
1311
  P.value || (N.value = e);
1312
1312
  };
1313
1313
  u(P, async (e, t) => {
1314
1314
  let n = N.value;
1315
1315
  t && !e && n?.format === "docx" && (await i(), n.restore());
1316
1316
  });
1317
- let ae = b(() => !n.version || n.version === l.value[l.value.length - 1]), I = () => {
1317
+ let F = b(() => !n.version || n.version === l.value[l.value.length - 1]), I = () => {
1318
1318
  let e = l.value[l.value.length - 1];
1319
1319
  e && a("version", e);
1320
1320
  }, oe = b(() => {
@@ -1376,7 +1376,7 @@ var kt = ["aria-label"], At = { class: "pk-file-preview__head" }, jt = { class:
1376
1376
  r && (a("selectionSend", e, r, {
1377
1377
  id: t,
1378
1378
  size: n.format === "docx" ? n.paragraphCount : n.cells
1379
- }), F(), document.getSelection()?.removeAllRanges());
1379
+ }), ie(), document.getSelection()?.removeAllRanges());
1380
1380
  }, _e = (e, t) => {
1381
1381
  let n = fe.value.find((t) => t.id === e);
1382
1382
  n && V(n.prompt(t), e);
@@ -1513,7 +1513,7 @@ var kt = ["aria-label"], At = { class: "pk-file-preview__head" }, jt = { class:
1513
1513
  preview: e.preview,
1514
1514
  mode: j.value ? x.value : "markup",
1515
1515
  marked: e.changes?.kind === "word" ? e.changes.paragraphs : void 0,
1516
- onSelect: ie
1516
+ onSelect: ae
1517
1517
  }, null, 8, [
1518
1518
  "zoom",
1519
1519
  "fit",
@@ -1528,7 +1528,7 @@ var kt = ["aria-label"], At = { class: "pk-file-preview__head" }, jt = { class:
1528
1528
  "onUpdate:zoom": n[10] ||= (e) => w.value = e,
1529
1529
  preview: e.preview,
1530
1530
  marked: e.changes?.kind === "spreadsheet" ? e.changes.cells : void 0,
1531
- onSelect: ie
1531
+ onSelect: ae
1532
1532
  }, null, 8, [
1533
1533
  "sheet",
1534
1534
  "zoom",
@@ -1543,12 +1543,12 @@ var kt = ["aria-label"], At = { class: "pk-file-preview__head" }, jt = { class:
1543
1543
  anchor: U.value,
1544
1544
  actions: fe.value,
1545
1545
  hint: R.value,
1546
- note: ae.value ? void 0 : O(s)("selectionActions.notLatest", { version: e.version }),
1546
+ note: F.value ? void 0 : O(s)("selectionActions.notLatest", { version: e.version }),
1547
1547
  "note-action": O(s)("selectionActions.openLatest"),
1548
1548
  onAction: _e,
1549
1549
  onAsk: n[12] ||= (e) => V(e, "ask"),
1550
1550
  onNote: I,
1551
- onClose: F
1551
+ onClose: ie
1552
1552
  }, null, 8, [
1553
1553
  "asking",
1554
1554
  "anchor",
@@ -1563,4 +1563,4 @@ var kt = ["aria-label"], At = { class: "pk-file-preview__head" }, jt = { class:
1563
1563
  }), Kt = ".pk-file-preview{background-color:var(--color-surface);height:100%;min-height:0;color:var(--color-word-1);outline:none;flex-direction:column;display:flex;position:relative;container-type:inline-size}.pk-file-preview__head{align-items:center;gap:var(--spacing-8) var(--spacing-12);padding:var(--spacing-12) var(--spacing-12) var(--spacing-12) var(--spacing-md);border-bottom:var(--border) solid var(--color-surface-3);flex-wrap:wrap;display:flex}.pk-file-preview__file{align-items:center;gap:var(--spacing-12);flex:12rem;min-width:0;display:flex}.pk-file-preview__tile{width:var(--spacing-32);height:var(--spacing-32);border:var(--border) solid var(--color-surface-3);border-radius:var(--rounded);flex-shrink:0;justify-content:center;align-items:center;display:flex}.pk-file-preview__tile .vv-icon{width:var(--spacing-18);height:var(--spacing-18)}.pk-file-preview__icon--word{color:#2b7de9}.pk-file-preview__icon--sheet{color:#1f9d57}.pk-file-preview__name{flex-direction:column;min-width:0;display:flex}.pk-file-preview__title{font-size:var(--text-14);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.pk-file-preview__note{color:var(--color-word-3);font-size:var(--text-12)}.pk-file-preview__tools{align-items:center;gap:var(--spacing-8) var(--spacing-12);flex-wrap:wrap;display:flex}.pk-file-preview__versions{align-items:center;gap:var(--spacing-2);display:flex}.pk-file-preview__version{font-size:var(--text-14);font-weight:var(--font-semibold);font-variant-numeric:tabular-nums;white-space:nowrap}.pk-file-preview__actions{align-items:center;gap:var(--spacing-8);margin-left:auto;display:flex}@container (width<52rem){.pk-file-preview__file{order:1}.pk-file-preview__actions{order:2}.pk-file-preview__tools{flex-basis:100%;order:3}.pk-file-preview__tools .pk-file-preview__modes{flex:auto}}.pk-file-preview__mode-short{display:none}@container (width<38rem){.pk-file-preview__mode-long{display:none}.pk-file-preview__mode-short{display:inline}}@container (width<30rem){.pk-file-preview__tools .pk-file-preview__modes{flex:100%}.pk-file-preview__tools .pk-file-preview__modes .vv-radio{padding-inline:var(--spacing-4)}}.pk-file-preview__body{background-color:var(--color-surface-1);flex-direction:column;flex:1;min-height:0;display:flex}.pk-file-preview__skeleton{width:min(42rem, 100% - 2 * var(--spacing-md));margin:var(--spacing-md) auto;padding:var(--spacing-lg);box-sizing:border-box;border:var(--border) solid var(--color-surface-3);border-radius:var(--rounded);background-color:var(--color-surface)}.pk-file-preview__skeleton-line{height:var(--spacing-12);margin-bottom:var(--spacing-12);border-radius:var(--rounded)}.pk-file-preview__empty{margin:var(--spacing-lg) var(--spacing-md);color:var(--color-word-3);font-size:var(--text-14);text-align:center}", qt = /* @__PURE__ */ e({ default: () => Jt }), Jt = /*#__PURE__*/ B(Gt, [["styles", [Kt]]]);
1564
1564
  export { qt as n, Jt as t };
1565
1565
 
1566
- //# sourceMappingURL=PkFilePreview-BPsD2P7s.js.map
1566
+ //# sourceMappingURL=PkFilePreview-DiLMoL-6.js.map