@wssto2/vue-core 0.19.0 → 0.20.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 (147) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +3 -0
  3. package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-Bg8JFAOT.js → AccessGate.vue_vue_type_script_setup_true_lang-Dw_pnsh9.js} +1 -1
  4. package/dist/{AccountMenuItem.vue_vue_type_script_setup_true_lang-BIYgaihv.js → AccountMenuItem.vue_vue_type_script_setup_true_lang-rmH1XbU9.js} +1 -1
  5. package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-B5IMNnTf.js → ActionRow.vue_vue_type_script_setup_true_lang-_TDoIg53.js} +2 -2
  6. package/dist/{Activity-CiYn5E6A.js → Activity-BDVYmNgy.js} +9 -9
  7. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-oXWQTfBs.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-DryXyklZ.js} +6 -6
  8. package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-WuGvAOrj.js → AlertDialog.vue_vue_type_script_setup_true_lang-QYvbly_-.js} +1 -1
  9. package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-CX8mpXRE.js → AsyncSection.vue_vue_type_script_setup_true_lang-DRP4BnMb.js} +4 -4
  10. package/dist/{Banner.vue_vue_type_script_setup_true_lang-sv0phngk.js → Banner.vue_vue_type_script_setup_true_lang-ukLpznql.js} +1 -1
  11. package/dist/{Button.vue_vue_type_script_setup_true_lang-JrqhO99l.js → Button.vue_vue_type_script_setup_true_lang-DkRuLqQK.js} +1 -1
  12. package/dist/{Changes-Cy8STpLX.js → Changes-DRij0rEQ.js} +5 -5
  13. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-Dr6nFNBB.js → CollectionPage.vue_vue_type_script_setup_true_lang-Aoof1prZ.js} +12 -12
  14. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-D372wlxR.js → DataTable.vue_vue_type_script_setup_true_lang-DGcNcRkO.js} +1 -1
  15. package/dist/{DateField.vue_vue_type_script_setup_true_lang-D0KcfW8R.js → DateField.vue_vue_type_script_setup_true_lang-J04KjxmR.js} +4 -4
  16. package/dist/{DeadLetters-DhJkMpd_.js → DeadLetters-Dpm4UY__.js} +4 -4
  17. package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-92szOrYd.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-CxNVKoYI.js} +1 -1
  18. package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js → EmptyState.vue_vue_type_script_setup_true_lang-ByKvrNSg.js} +1 -1
  19. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-lvAuBG-0.js → FormGroup.vue_vue_type_script_setup_true_lang-7bIssY9f.js} +4 -4
  20. package/dist/{FormRow.vue_vue_type_script_setup_true_lang-CpgNVQF4.js → FormRow.vue_vue_type_script_setup_true_lang-okuxbKyI.js} +1 -1
  21. package/dist/{FormView.vue_vue_type_script_setup_true_lang-D01Jr4UU.js → FormView.vue_vue_type_script_setup_true_lang-CiYprNRr.js} +2 -2
  22. package/dist/{General-CwTPC5UP.js → General-BmVEbYqv.js} +8 -8
  23. package/dist/{HeaderAction.vue_vue_type_script_setup_true_lang-Da59TLBh.js → HeaderAction.vue_vue_type_script_setup_true_lang-DVfkuOy-.js} +2 -2
  24. package/dist/{Icon.vue_vue_type_script_lang-BhhsFYwp.js → Icon.vue_vue_type_script_lang-0pW1XBaE.js} +35 -33
  25. package/dist/{IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js → IconTile.vue_vue_type_script_setup_true_lang-BWHQiA7d.js} +1 -1
  26. package/dist/{IncidentRecord-hXEGuLGg.js → IncidentRecord-DWY6Bws1.js} +17 -17
  27. package/dist/{IncidentsList-C41VyDwK.js → IncidentsList-C21UNIhT.js} +6 -6
  28. package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CrGrjrlO.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CpEd_Psg.js} +1 -1
  29. package/dist/{Menu.vue_vue_type_script_setup_true_lang-Cqu4Ebsb.js → Menu.vue_vue_type_script_setup_true_lang-DobycRxf.js} +1 -1
  30. package/dist/{MenuButton.vue_vue_type_script_setup_true_lang-C-XRr5f2.js → MenuButton.vue_vue_type_script_setup_true_lang-qDKt6gX9.js} +1 -1
  31. package/dist/{Modal.vue_vue_type_script_setup_true_lang-CZ7WrDwu.js → Modal.vue_vue_type_script_setup_true_lang-C0tQAYQ4.js} +2 -2
  32. package/dist/{NewRolePage-BYYZJkK7.js → NewRolePage-K5zts3e_.js} +4 -4
  33. package/dist/{NoAccess.vue_vue_type_script_setup_true_lang-BHzZtZ50.js → NoAccess.vue_vue_type_script_setup_true_lang-BYnTQCtW.js} +1 -1
  34. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-BhNZgEW6.js → NumberField.vue_vue_type_script_setup_true_lang-CxgVJrdv.js} +2 -2
  35. package/dist/{Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js → Panel.vue_vue_type_script_setup_true_lang-DTCmFSwg.js} +1 -1
  36. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-mYFuG-Y3.js → PersonAccess.vue_vue_type_script_setup_true_lang-Kp9g93wE.js} +12 -12
  37. package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-DmMg1T_V.js → PhotoViewer.vue_vue_type_script_setup_true_lang-D2-uQbSV.js} +1 -1
  38. package/dist/{ProfilePage-DGEsIycR.js → ProfilePage-C3mLBer6.js} +17 -17
  39. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-B3BnYg1x.js → RecordHeader.vue_vue_type_script_setup_true_lang-Dz5Qw8II.js} +2 -2
  40. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-1iZtj3rh.js → ResourcePage.vue_vue_type_script_setup_true_lang-R3eJKPq5.js} +4 -4
  41. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-BslSDDiM.js → RoleEditor.vue_vue_type_script_setup_true_lang-CGMpBpnK.js} +12 -12
  42. package/dist/{RolePage-C08ZUqw1.js → RolePage-C62_sGxx.js} +13 -13
  43. package/dist/{RolesPage-FOuY1VKg.js → RolesPage-CS8ryIQq.js} +9 -9
  44. package/dist/{SectionList.vue_vue_type_script_setup_true_lang-CodyVezo.js → SectionList.vue_vue_type_script_setup_true_lang-C6eOVjpa.js} +3 -3
  45. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-DCTFxfPB.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DqDcFvS0.js} +6 -6
  46. package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-CLR6EvzO.js → SegmentedField.vue_vue_type_script_setup_true_lang-Du4YUcw9.js} +2 -2
  47. package/dist/{SelectField.vue_vue_type_script_setup_true_lang-D5xYofdb.js → SelectField.vue_vue_type_script_setup_true_lang-BA5YMCXA.js} +6 -6
  48. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CDr4WNIb.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-BoeV2_MN.js} +8 -8
  49. package/dist/{ServiceAccountRecord-kWwIQGZb.js → ServiceAccountRecord-BDkaaOte.js} +18 -18
  50. package/dist/{ServiceAccountsList-CKy9_YHP.js → ServiceAccountsList-KaZwNlK5.js} +10 -10
  51. package/dist/{Sessions-BDc8gdYH.js → Sessions-DhOpUlRc.js} +7 -7
  52. package/dist/{SettingsPage-t-8kmFVT.js → SettingsPage-DPzg7zwX.js} +18 -18
  53. package/dist/Sheet.vue_vue_type_script_setup_true_lang-C1jpmLYN.js +163 -0
  54. package/dist/{SignIn-CqtkvtCZ.js → SignIn-4aUxE2LU.js} +8 -8
  55. package/dist/{SignInPage-DcdNKZIb.js → SignInPage-B80pQ8tG.js} +6 -6
  56. package/dist/{SignIns-D4-nGu0B.js → SignIns-CLX8Puf1.js} +5 -5
  57. package/dist/{StatusLine.vue_vue_type_script_setup_true_lang-DsdQmLq6.js → StatusLine.vue_vue_type_script_setup_true_lang-BN8nG1CW.js} +1 -1
  58. package/dist/{SwipeActions.vue_vue_type_script_setup_true_lang-D8SiC0G7.js → SwipeActions.vue_vue_type_script_setup_true_lang-BBqcW3MR.js} +1 -1
  59. package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-CLtcuofe.js → SwitchField.vue_vue_type_script_setup_true_lang-Dw7BbBU4.js} +2 -2
  60. package/dist/Tabs.vue_vue_type_script_setup_true_lang-Cma_ma6V.js +169 -0
  61. package/dist/{TextField.vue_vue_type_script_setup_true_lang-CVGh-p3J.js → TextField.vue_vue_type_script_setup_true_lang-DS6RPR-h.js} +4 -4
  62. package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-YxUlNHSk.js → TextareaField.vue_vue_type_script_setup_true_lang-BqpZt1Hv.js} +2 -2
  63. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DHNC_MLt.js → TimeField.vue_vue_type_script_setup_true_lang-BeS1cfqL.js} +4 -4
  64. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-d_KuxWjH.js → Timestamp.vue_vue_type_script_setup_true_lang-XbbupD9A.js} +1 -1
  65. package/dist/{UserRecord-CwZCr9Im.js → UserRecord-BFqw2Pi8.js} +10 -10
  66. package/dist/{UsersList-Cn19sFgv.js → UsersList-C52C1lN1.js} +3 -3
  67. package/dist/{ViewTabs.vue_vue_type_script_setup_true_lang-BjdDXE3T.js → ViewTabs.vue_vue_type_script_setup_true_lang-CBYrLPL4.js} +1 -1
  68. package/dist/access/index.js +7 -7
  69. package/dist/app/index.js +2 -2
  70. package/dist/{application-CDSweJb9.js → application-cTqMhmFf.js} +8 -8
  71. package/dist/{back-LcLlFodC.js → back-CeozxCgQ.js} +2 -2
  72. package/dist/button/index.js +1 -1
  73. package/dist/collection/index.js +9 -9
  74. package/dist/content/DiffView.vue.d.ts +22 -0
  75. package/dist/content/PreviewFrame.vue.d.ts +46 -0
  76. package/dist/content/diff.d.ts +27 -0
  77. package/dist/content/index.d.ts +4 -0
  78. package/dist/content/index.js +552 -218
  79. package/dist/content/previewFrame.d.ts +50 -0
  80. package/dist/{contributions-B0x5x5xD.js → contributions-BSmIRPg1.js} +1 -1
  81. package/dist/controls/SortableList.vue.d.ts +31 -0
  82. package/dist/controls/Tabs.vue.d.ts +2 -0
  83. package/dist/controls/index.d.ts +1 -0
  84. package/dist/controls/index.js +132 -33
  85. package/dist/form/CodeEditor.vue.d.ts +61 -0
  86. package/dist/form/I18nField.vue.d.ts +1 -1
  87. package/dist/form/MarkerList.vue.d.ts +20 -0
  88. package/dist/form/TextareaField.vue.d.ts +1 -1
  89. package/dist/form/index.d.ts +2 -0
  90. package/dist/form/index.js +1550 -1428
  91. package/dist/{guards-CNJ0ATVC.js → guards-BP9x7CLF.js} +1 -1
  92. package/dist/i18n/index.js +18 -18
  93. package/dist/icon/core.d.ts +2 -0
  94. package/dist/icon/index.js +1 -1
  95. package/dist/identity/index.js +3 -3
  96. package/dist/identity/profile/EmailChangeDialog.vue.d.ts +2 -2
  97. package/dist/incidents/index.js +1 -1
  98. package/dist/{index-BA2w8uwD.js → index-CMx77x5P.js} +27 -27
  99. package/dist/{index-1HS7O2-e.js → index-CxUfs3Xz.js} +10 -10
  100. package/dist/{index-SLJWm40T.js → index-DLkQwWt9.js} +9 -9
  101. package/dist/index.d.ts +1 -1
  102. package/dist/index.js +1 -1
  103. package/dist/modal/Sheet.vue.d.ts +13 -0
  104. package/dist/modal/TabbedSheet.vue.d.ts +46 -0
  105. package/dist/modal/index.d.ts +1 -0
  106. package/dist/modal/index.js +123 -41
  107. package/dist/navigation-C05vGEN8.js +55 -0
  108. package/dist/{neighbors-Dg_LU9ry.js → neighbors-BqfO6zf3.js} +2 -2
  109. package/dist/notifications/index.js +1 -1
  110. package/dist/onboarding/index.js +2 -2
  111. package/dist/{options-mOOX6JSS.js → options-DIp_lVAj.js} +2 -2
  112. package/dist/overlay/index.js +4 -4
  113. package/dist/page/SectionNavigator.vue.d.ts +1 -1
  114. package/dist/page/SplitPane.vue.d.ts +54 -0
  115. package/dist/page/WorkbenchPage.vue.d.ts +72 -0
  116. package/dist/page/index.d.ts +2 -0
  117. package/dist/page/index.js +343 -104
  118. package/dist/phone/index.js +3 -3
  119. package/dist/platform/index.js +3 -3
  120. package/dist/platform/navigation.d.ts +10 -0
  121. package/dist/{platform-DU9QFts8.js → platform-YWfOO7b2.js} +94 -88
  122. package/dist/pwa/index.js +3 -3
  123. package/dist/resource/index.js +1 -1
  124. package/dist/{resources-BZLlAtoS.js → resources-BAxfEEv1.js} +1 -1
  125. package/dist/router/index.js +4 -4
  126. package/dist/router/navigation.d.ts +2 -0
  127. package/dist/{rowLayout-PIuD7MGo.js → rowLayout-3W9TvFNt.js} +5 -5
  128. package/dist/{sectionIndex-BS0ic5W7.js → sectionIndex-CSr457Lb.js} +2 -2
  129. package/dist/{sections-BpiRLntE.js → sections-DXso1JSV.js} +2 -2
  130. package/dist/shell/NavigationList.vue.d.ts +1 -1
  131. package/dist/shell/index.js +522 -501
  132. package/dist/shell/navigationGroups.d.ts +4 -1
  133. package/dist/state/index.js +8 -8
  134. package/dist/{state-z1iPF1DT.js → state-DqCZdet7.js} +1 -1
  135. package/dist/styles.css +1 -1
  136. package/dist/{suggestions-DeMgs_ki.js → suggestions-D0-qmRFy.js} +1 -1
  137. package/dist/testing/index.js +2 -2
  138. package/dist/{useCommand-DQKvro1n.js → useCommand-D6K6o6dx.js} +4 -4
  139. package/dist/{useGroupSheet-CRw3MUmX.js → useGroupSheet-Daxi2mzi.js} +5 -5
  140. package/dist/{usePreferences-DB29UTFD.js → usePreferences-D38x73re.js} +1 -1
  141. package/dist/{useRecordDialog-0azHxxvm.js → useRecordDialog-CfBp0kuP.js} +1 -1
  142. package/dist/{useResourceForm-zVuWerSn.js → useResourceForm-Ddxk7mc0.js} +1 -1
  143. package/dist/{useTypedEntry-BsMV66Yc.js → useTypedEntry-r4AqWlV7.js} +2 -2
  144. package/package.json +1 -1
  145. package/dist/Sheet.vue_vue_type_script_setup_true_lang-BG8HUNfs.js +0 -145
  146. package/dist/Tabs.vue_vue_type_script_setup_true_lang-tpkGp98F.js +0 -155
  147. package/dist/navigation-d-JAPBGA.js +0 -53
@@ -1,116 +1,117 @@
1
- import { defineComponent as w, computed as h, openBlock as t, createElementBlock as o, Fragment as S, renderList as M, toDisplayString as b, createCommentVNode as v, createElementVNode as u, normalizeClass as y, createVNode as U, unref as g, renderSlot as k, createTextVNode as V, createBlock as $, useModel as K, useId as N, useTemplateRef as R, watch as I, nextTick as Z, withModifiers as G, withDirectives as H, vModelText as O, mergeModels as D, ref as A, withCtx as z, createSlots as P, resolveDynamicComponent as q, normalizeStyle as E } from "vue";
2
- import { u as L, t as J } from "../format-C_HXlOYQ.js";
3
- import { _ as C } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
4
- import { _ as Q } from "../Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
5
- import { i as Ne } from "../Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
6
- import { useI18n as j } from "vue-i18n";
7
- import { _ as W } from "../KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js";
8
- import { _ as Ie } from "../Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js";
9
- import { _ as Ge } from "../Timestamp.vue_vue_type_script_setup_true_lang-d_KuxWjH.js";
10
- const X = ["aria-label"], Y = {
1
+ import { defineComponent as M, computed as _, openBlock as s, createElementBlock as n, Fragment as S, renderList as B, toDisplayString as b, createCommentVNode as w, createElementVNode as i, normalizeClass as $, createVNode as E, unref as p, renderSlot as C, createTextVNode as A, createBlock as D, useModel as se, useId as ne, useTemplateRef as P, watch as Q, nextTick as ae, withModifiers as le, withDirectives as re, vModelText as ie, mergeModels as q, ref as T, withCtx as W, createSlots as ce, resolveDynamicComponent as de, onMounted as ue, onBeforeUnmount as me, normalizeStyle as U } from "vue";
2
+ import { u as G, t as pe } from "../format-C_HXlOYQ.js";
3
+ import { _ as N } from "../Icon.vue_vue_type_script_lang-0pW1XBaE.js";
4
+ import { _ as fe } from "../Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
5
+ import { i as Wt } from "../Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
6
+ import { useI18n as F } from "vue-i18n";
7
+ import { _ as be } from "../KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js";
8
+ import { _ as Ht } from "../Panel.vue_vue_type_script_setup_true_lang-DTCmFSwg.js";
9
+ import { _ as he } from "../Tabs.vue_vue_type_script_setup_true_lang-Cma_ma6V.js";
10
+ import { _ as qt } from "../Timestamp.vue_vue_type_script_setup_true_lang-XbbupD9A.js";
11
+ const ve = ["aria-label"], ge = {
11
12
  key: 0,
12
13
  class: "py-1.5 text-center text-caption font-semibold text-content-muted",
13
14
  "data-test": "activity-day"
14
- }, ee = { class: "flex min-w-0 flex-col gap-3.5 compact:gap-3" }, te = {
15
+ }, xe = { class: "flex min-w-0 flex-col gap-3.5 compact:gap-3" }, ye = {
15
16
  key: 0,
16
17
  "data-test": "activity-event",
17
18
  class: "flex min-w-0 items-center gap-2.5 py-0.5 compact:items-start"
18
- }, se = { class: "flex min-w-0 flex-1 items-center gap-3 compact:flex-col compact:items-start compact:gap-1" }, ae = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-x-1.5 gap-y-1 text-subheadline text-content-strong" }, oe = { class: "shrink-0 text-footnote text-content-muted" }, ne = ["data-mine"], le = /* @__PURE__ */ w({
19
+ }, _e = { class: "flex min-w-0 flex-1 items-center gap-3 compact:flex-col compact:items-start compact:gap-1" }, we = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-x-1.5 gap-y-1 text-subheadline text-content-strong" }, ke = { class: "shrink-0 text-footnote text-content-muted" }, $e = ["data-mine"], Se = /* @__PURE__ */ M({
19
20
  __name: "ActivityStream",
20
21
  props: {
21
22
  items: {},
22
23
  label: { default: void 0 }
23
24
  },
24
- setup(m) {
25
- const n = m, a = L(), r = {
25
+ setup(u) {
26
+ const t = u, l = G(), a = {
26
27
  neutral: "bg-status-neutral-surface text-status-neutral-content",
27
28
  info: "bg-status-info-surface text-status-info-content",
28
29
  warning: "bg-status-warning-surface text-status-warning-content",
29
30
  critical: "bg-status-danger-surface text-status-danger-content",
30
31
  positive: "bg-status-success-surface text-status-success-content"
31
- }, p = (e) => J(e.at)?.getTime() ?? 0, l = h(() => {
32
- const e = n.items.map((c, s) => ({ item: c, index: s })).sort((c, s) => p(c.item) - p(s.item) || c.index - s.index).map(({ item: c }) => c), f = [];
33
- for (const c of e) {
34
- const s = p(c) > 0 ? new Date(c.at).toDateString() : "", B = f[f.length - 1];
35
- B && B.key === s ? B.items.push(c) : f.push({ key: s, label: a.day(c.at), items: [c] });
32
+ }, h = (o) => pe(o.at)?.getTime() ?? 0, e = _(() => {
33
+ const o = t.items.map((c, d) => ({ item: c, index: d })).sort((c, d) => h(c.item) - h(d.item) || c.index - d.index).map(({ item: c }) => c), v = [];
34
+ for (const c of o) {
35
+ const d = h(c) > 0 ? new Date(c.at).toDateString() : "", m = v[v.length - 1];
36
+ m && m.key === d ? m.items.push(c) : v.push({ key: d, label: l.day(c.at), items: [c] });
36
37
  }
37
- return f;
38
- }), x = (e, f) => [e, a.time(f)].filter(Boolean).join(" · "), d = (e) => e, i = (e) => e;
39
- return (e, f) => (t(), o("div", {
38
+ return v;
39
+ }), x = (o, v) => [o, l.time(v)].filter(Boolean).join(" · "), f = (o) => o, r = (o) => o;
40
+ return (o, v) => (s(), n("div", {
40
41
  "data-test": "activity-stream",
41
42
  class: "flex min-w-0 flex-col gap-3.5 compact:gap-3",
42
- "aria-label": n.label,
43
+ "aria-label": t.label,
43
44
  role: "group"
44
45
  }, [
45
- (t(!0), o(S, null, M(l.value, (c) => (t(), o("section", {
46
+ (s(!0), n(S, null, B(e.value, (c) => (s(), n("section", {
46
47
  key: c.key,
47
48
  class: "flex min-w-0 flex-col gap-3.5 compact:gap-3"
48
49
  }, [
49
- c.label ? (t(), o("h4", Y, b(c.label), 1)) : v("", !0),
50
- u("ol", ee, [
51
- (t(!0), o(S, null, M(c.items, (s) => (t(), o("li", {
52
- key: `${s.kind}-${s.id}`,
50
+ c.label ? (s(), n("h4", ge, b(c.label), 1)) : w("", !0),
51
+ i("ol", xe, [
52
+ (s(!0), n(S, null, B(c.items, (d) => (s(), n("li", {
53
+ key: `${d.kind}-${d.id}`,
53
54
  class: "min-w-0"
54
55
  }, [
55
- s.kind === "event" ? (t(), o("div", te, [
56
- u("span", {
56
+ d.kind === "event" ? (s(), n("div", ye, [
57
+ i("span", {
57
58
  "aria-hidden": "true",
58
- class: y(["flex size-7 shrink-0 items-center justify-center rounded-full", r[d(s).tone ?? "neutral"]])
59
+ class: $(["flex size-7 shrink-0 items-center justify-center rounded-full", a[f(d).tone ?? "neutral"]])
59
60
  }, [
60
- U(g(C), {
61
- name: d(s).icon,
61
+ E(p(N), {
62
+ name: f(d).icon,
62
63
  size: 14
63
64
  }, null, 8, ["name"])
64
65
  ], 2),
65
- u("div", se, [
66
- u("div", ae, [
67
- k(e.$slots, "event", {
68
- item: d(s)
66
+ i("div", _e, [
67
+ i("div", we, [
68
+ C(o.$slots, "event", {
69
+ item: f(d)
69
70
  }, () => [
70
- V(b(d(s).text), 1)
71
+ A(b(f(d).text), 1)
71
72
  ])
72
73
  ]),
73
- u("span", oe, b(x(d(s).actor, s.at)), 1)
74
+ i("span", ke, b(x(f(d).actor, d.at)), 1)
74
75
  ])
75
- ])) : (t(), o("div", {
76
+ ])) : (s(), n("div", {
76
77
  key: 1,
77
78
  "data-test": "activity-comment",
78
- "data-mine": i(s).mine ? "true" : void 0,
79
- class: y(["flex min-w-0 items-end gap-2", i(s).mine ? "justify-end" : ""])
79
+ "data-mine": r(d).mine ? "true" : void 0,
80
+ class: $(["flex min-w-0 items-end gap-2", r(d).mine ? "justify-end" : ""])
80
81
  }, [
81
- i(s).mine ? v("", !0) : (t(), $(Q, {
82
+ r(d).mine ? w("", !0) : (s(), D(fe, {
82
83
  key: 0,
83
- src: i(s).avatarUrl,
84
- name: i(s).author,
84
+ src: r(d).avatarUrl,
85
+ name: r(d).author,
85
86
  size: "md"
86
87
  }, null, 8, ["src", "name"])),
87
- u("div", {
88
- class: y(["flex max-w-[78%] min-w-0 flex-col gap-1", i(s).mine ? "items-end" : "items-start"])
88
+ i("div", {
89
+ class: $(["flex max-w-[78%] min-w-0 flex-col gap-1", r(d).mine ? "items-end" : "items-start"])
89
90
  }, [
90
- u("p", {
91
- class: y(["rounded-2xl px-3.5 py-2 text-body break-words whitespace-pre-line text-content-strong", i(s).mine ? "rounded-br-md bg-surface-selected" : "rounded-bl-md bg-surface-cell shadow-group"])
92
- }, b(i(s).body), 3),
93
- u("span", {
94
- class: y(["flex flex-wrap items-center gap-1.5 px-1 text-caption text-content-muted", i(s).mine ? "justify-end" : ""])
91
+ i("p", {
92
+ class: $(["rounded-2xl px-3.5 py-2 text-body break-words whitespace-pre-line text-content-strong", r(d).mine ? "rounded-br-md bg-surface-selected" : "rounded-bl-md bg-surface-cell shadow-group"])
93
+ }, b(r(d).body), 3),
94
+ i("span", {
95
+ class: $(["flex flex-wrap items-center gap-1.5 px-1 text-caption text-content-muted", r(d).mine ? "justify-end" : ""])
95
96
  }, [
96
- V(b(x(i(s).author, s.at)) + " ", 1),
97
- k(e.$slots, "comment-meta", {
98
- item: i(s)
97
+ A(b(x(r(d).author, d.at)) + " ", 1),
98
+ C(o.$slots, "comment-meta", {
99
+ item: r(d)
99
100
  }),
100
- k(e.$slots, "comment-actions", {
101
- item: i(s)
101
+ C(o.$slots, "comment-actions", {
102
+ item: r(d)
102
103
  })
103
104
  ], 2)
104
105
  ], 2)
105
- ], 10, ne))
106
+ ], 10, $e))
106
107
  ]))), 128))
107
108
  ])
108
109
  ]))), 128))
109
- ], 8, X));
110
+ ], 8, ve));
110
111
  }
111
- }), re = ["for"], ce = ["id", "maxlength", "placeholder", "disabled"], ie = ["disabled", "aria-label"], de = /* @__PURE__ */ w({
112
+ }), Me = ["for"], ze = ["id", "maxlength", "placeholder", "disabled"], Ce = ["disabled", "aria-label"], Le = /* @__PURE__ */ M({
112
113
  __name: "Composer",
113
- props: /* @__PURE__ */ D({
114
+ props: /* @__PURE__ */ q({
114
115
  placeholder: { default: void 0 },
115
116
  label: { default: void 0 },
116
117
  maxLength: { default: 2e3 },
@@ -120,75 +121,75 @@ const X = ["aria-label"], Y = {
120
121
  modelValue: { default: "" },
121
122
  modelModifiers: {}
122
123
  }),
123
- emits: /* @__PURE__ */ D(["submit"], ["update:modelValue"]),
124
- setup(m, { expose: n, emit: a }) {
125
- const r = m, p = a, l = K(m, "modelValue"), { t: x } = j(), d = N(), i = R("field"), e = h(() => r.placeholder ?? x("core.comments.placeholder")), f = h(() => !r.disabled && !r.processing && l.value.trim().length > 0);
124
+ emits: /* @__PURE__ */ q(["submit"], ["update:modelValue"]),
125
+ setup(u, { expose: t, emit: l }) {
126
+ const a = u, h = l, e = se(u, "modelValue"), { t: x } = F(), f = ne(), r = P("field"), o = _(() => a.placeholder ?? x("core.comments.placeholder")), v = _(() => !a.disabled && !a.processing && e.value.trim().length > 0);
126
127
  function c() {
127
- const _ = i.value;
128
- _ && (_.style.height = "auto", _.style.height = `${Math.min(_.scrollHeight, 192)}px`);
128
+ const y = r.value;
129
+ y && (y.style.height = "auto", y.style.height = `${Math.min(y.scrollHeight, 192)}px`);
129
130
  }
130
- I(l, () => Z(c));
131
- function s() {
132
- f.value && p("submit", l.value.trim());
131
+ Q(e, () => ae(c));
132
+ function d() {
133
+ v.value && h("submit", e.value.trim());
133
134
  }
134
- function B(_) {
135
- _.key === "Enter" && (_.metaKey || _.ctrlKey) && (_.preventDefault(), s());
135
+ function m(y) {
136
+ y.key === "Enter" && (y.metaKey || y.ctrlKey) && (y.preventDefault(), d());
136
137
  }
137
- return n({ focus: () => i.value?.focus() }), (_, T) => (t(), o("form", {
138
+ return t({ focus: () => r.value?.focus() }), (y, g) => (s(), n("form", {
138
139
  "data-test": "composer",
139
140
  class: "flex items-end gap-2",
140
- onSubmit: G(s, ["prevent"])
141
+ onSubmit: le(d, ["prevent"])
141
142
  }, [
142
- u("label", {
143
- for: g(d),
143
+ i("label", {
144
+ for: p(f),
144
145
  class: "sr-only"
145
- }, b(r.label ?? e.value), 9, re),
146
- H(u("textarea", {
147
- id: g(d),
146
+ }, b(a.label ?? o.value), 9, Me),
147
+ re(i("textarea", {
148
+ id: p(f),
148
149
  ref_key: "field",
149
- ref: i,
150
- "onUpdate:modelValue": T[0] || (T[0] = (F) => l.value = F),
150
+ ref: r,
151
+ "onUpdate:modelValue": g[0] || (g[0] = (z) => e.value = z),
151
152
  rows: "1",
152
- maxlength: r.maxLength,
153
- placeholder: e.value,
154
- disabled: r.disabled,
153
+ maxlength: a.maxLength,
154
+ placeholder: o.value,
155
+ disabled: a.disabled,
155
156
  "data-test": "composer-input",
156
157
  class: "block max-h-48 min-h-10 min-w-0 flex-1 resize-none rounded-3xl border-0 bg-surface-cell px-3.5 py-2.5 text-body text-content-strong ring-1 ring-border-separator ring-inset placeholder:text-content-disabled focus:outline-2 focus:outline-offset-0 focus:outline-border-focus focus:ring-0 disabled:cursor-not-allowed disabled:bg-fill compact:min-h-[2.375rem] compact:py-2",
157
- onKeydown: B
158
- }, null, 40, ce), [
159
- [O, l.value]
158
+ onKeydown: m
159
+ }, null, 40, ze), [
160
+ [ie, e.value]
160
161
  ]),
161
- u("button", {
162
+ i("button", {
162
163
  type: "submit",
163
164
  "data-test": "composer-send",
164
- disabled: !f.value,
165
- "aria-label": g(x)("core.comments.send"),
166
- class: y(["hit-target relative mb-0.5 flex size-9 shrink-0 items-center justify-center rounded-full transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus compact:size-[2.125rem]", f.value ? "cursor-pointer bg-tint text-content-on-tint hover:bg-tint/90" : "cursor-not-allowed bg-fill-strong text-surface-cell"])
165
+ disabled: !v.value,
166
+ "aria-label": p(x)("core.comments.send"),
167
+ class: $(["hit-target relative mb-0.5 flex size-9 shrink-0 items-center justify-center rounded-full transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus compact:size-[2.125rem]", v.value ? "cursor-pointer bg-tint text-content-on-tint hover:bg-tint/90" : "cursor-not-allowed bg-fill-strong text-surface-cell"])
167
168
  }, [
168
- r.processing ? (t(), $(g(C), {
169
+ a.processing ? (s(), D(p(N), {
169
170
  key: 0,
170
171
  name: "loader4Line",
171
172
  size: 18,
172
173
  class: "animate-spin"
173
- })) : (t(), $(g(C), {
174
+ })) : (s(), D(p(N), {
174
175
  key: 1,
175
176
  name: "arrowUpSLine",
176
177
  size: 20
177
178
  }))
178
- ], 10, ie)
179
+ ], 10, Ce)
179
180
  ], 32));
180
181
  }
181
- }), ue = {
182
+ }), Te = {
182
183
  class: "flex min-w-0 flex-col gap-3",
183
184
  "data-test": "comment-thread"
184
- }, me = {
185
+ }, Ve = {
185
186
  key: 0,
186
187
  class: "px-1 text-subheadline font-semibold text-content-strong compact:text-footnote compact:font-normal compact:uppercase compact:tracking-wide compact:text-content-muted"
187
- }, pe = {
188
+ }, Be = {
188
189
  key: 1,
189
190
  class: "px-1 text-body text-content-muted",
190
191
  "data-test": "comment-thread-empty"
191
- }, fe = ["disabled", "aria-label", "title", "onClick"], Te = /* @__PURE__ */ w({
192
+ }, Ne = ["disabled", "aria-label", "title", "onClick"], Dt = /* @__PURE__ */ M({
192
193
  __name: "CommentThread",
193
194
  props: {
194
195
  comments: {},
@@ -201,130 +202,276 @@ const X = ["aria-label"], Y = {
201
202
  onAdd: { type: Function, default: void 0 }
202
203
  },
203
204
  emits: ["remove"],
204
- setup(m, { emit: n }) {
205
- const a = m, r = n, { t: p } = j(), l = A(""), x = A(!1), d = h(
206
- () => a.comments.map((e) => ({
205
+ setup(u, { emit: t }) {
206
+ const l = u, a = t, { t: h } = F(), e = T(""), x = T(!1), f = _(
207
+ () => l.comments.map((o) => ({
207
208
  kind: "comment",
208
- id: e.id,
209
- at: e.createdAt ?? null,
210
- body: e.body,
211
- author: e.author,
212
- avatarUrl: e.avatarUrl,
213
- mine: e.mine,
214
- source: e
209
+ id: o.id,
210
+ at: o.createdAt ?? null,
211
+ body: o.body,
212
+ author: o.author,
213
+ avatarUrl: o.avatarUrl,
214
+ mine: o.mine,
215
+ source: o
215
216
  }))
216
217
  );
217
- async function i(e) {
218
+ async function r(o) {
218
219
  x.value = !0;
219
220
  try {
220
- await a.onAdd?.(e) !== !1 && (l.value = "");
221
+ await l.onAdd?.(o) !== !1 && (e.value = "");
221
222
  } finally {
222
223
  x.value = !1;
223
224
  }
224
225
  }
225
- return (e, f) => (t(), o("section", ue, [
226
- a.hideTitle ? v("", !0) : (t(), o("h3", me, b(a.title ?? g(p)("core.comments.title")), 1)),
227
- a.comments.length === 0 ? (t(), o("p", pe, b(g(p)("core.comments.none")), 1)) : (t(), $(le, {
226
+ return (o, v) => (s(), n("section", Te, [
227
+ l.hideTitle ? w("", !0) : (s(), n("h3", Ve, b(l.title ?? p(h)("core.comments.title")), 1)),
228
+ l.comments.length === 0 ? (s(), n("p", Be, b(p(h)("core.comments.none")), 1)) : (s(), D(Se, {
228
229
  key: 2,
229
- items: d.value,
230
- label: a.title ?? g(p)("core.comments.title")
230
+ items: f.value,
231
+ label: l.title ?? p(h)("core.comments.title")
231
232
  }, {
232
- "comment-actions": z(({ item: c }) => [
233
- a.canRemove ? (t(), o("button", {
233
+ "comment-actions": W(({ item: c }) => [
234
+ l.canRemove ? (s(), n("button", {
234
235
  key: 0,
235
236
  type: "button",
236
237
  "data-test": "comment-remove",
237
238
  class: "hit-target relative inline-flex size-5 cursor-pointer items-center justify-center rounded-full text-content-muted transition-colors duration-motion-fast hover:text-content-destructive focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-not-allowed disabled:opacity-40",
238
- disabled: a.disabled,
239
- "aria-label": g(p)("core.comments.remove"),
240
- title: g(p)("core.comments.remove"),
241
- onClick: (s) => r("remove", c.source)
239
+ disabled: l.disabled,
240
+ "aria-label": p(h)("core.comments.remove"),
241
+ title: p(h)("core.comments.remove"),
242
+ onClick: (d) => a("remove", c.source)
242
243
  }, [
243
- U(g(C), {
244
+ E(p(N), {
244
245
  name: "deleteBin2Line",
245
246
  size: 14
246
247
  })
247
- ], 8, fe)) : v("", !0)
248
+ ], 8, Ne)) : w("", !0)
248
249
  ]),
249
250
  _: 1
250
251
  }, 8, ["items", "label"])),
251
- a.canAdd ? (t(), $(de, {
252
+ l.canAdd ? (s(), D(Le, {
252
253
  key: 3,
253
- modelValue: l.value,
254
- "onUpdate:modelValue": f[0] || (f[0] = (c) => l.value = c),
255
- "max-length": a.maxLength,
256
- disabled: a.disabled,
254
+ modelValue: e.value,
255
+ "onUpdate:modelValue": v[0] || (v[0] = (c) => e.value = c),
256
+ "max-length": l.maxLength,
257
+ disabled: l.disabled,
257
258
  processing: x.value,
258
- onSubmit: i
259
- }, null, 8, ["modelValue", "max-length", "disabled", "processing"])) : v("", !0)
259
+ onSubmit: r
260
+ }, null, 8, ["modelValue", "max-length", "disabled", "processing"])) : w("", !0)
260
261
  ]));
261
262
  }
262
- }), be = {
263
+ }), V = (u) => "gap" in u;
264
+ function Ae(u, t, l = /* @__PURE__ */ new Set()) {
265
+ let a = 0, h = 0;
266
+ const e = u.map((o) => ({
267
+ ...o,
268
+ oldNo: o.op === "+" ? null : ++a,
269
+ newNo: o.op === "-" ? null : ++h
270
+ }));
271
+ if (t === null) return e;
272
+ const x = new Array(e.length).fill(!1);
273
+ e.forEach((o, v) => {
274
+ if (o.op !== " ")
275
+ for (let c = Math.max(0, v - t); c <= Math.min(e.length - 1, v + t); c++) x[c] = !0;
276
+ });
277
+ const f = [];
278
+ let r = 0;
279
+ for (; r < e.length; ) {
280
+ if (x[r]) {
281
+ f.push(e[r++]);
282
+ continue;
283
+ }
284
+ const o = r;
285
+ for (; r < e.length && !x[r]; ) r++;
286
+ const v = e.slice(o, r);
287
+ v.length < 2 || l.has(o) ? f.push(...v) : f.push({ gap: !0, key: o, lines: v });
288
+ }
289
+ return f;
290
+ }
291
+ function De(u) {
292
+ const t = [];
293
+ let l = [], a = [];
294
+ const h = () => {
295
+ for (let e = 0; e < Math.max(l.length, a.length); e++) t.push({ left: l[e] ?? null, right: a[e] ?? null });
296
+ l = [], a = [];
297
+ };
298
+ for (const e of u)
299
+ !V(e) && e.op === "-" ? l.push(e) : !V(e) && e.op === "+" ? a.push(e) : (h(), t.push(V(e) ? e : { left: e, right: e }));
300
+ return h(), t;
301
+ }
302
+ const Ee = {
303
+ key: 0,
304
+ role: "status",
305
+ class: "text-footnote text-content-muted"
306
+ }, Re = ["data-mode"], je = ["aria-label"], Ue = { key: 0 }, Fe = {
307
+ key: 0,
308
+ "data-diff-gap": ""
309
+ }, Ie = {
310
+ colspan: "4",
311
+ class: "border-y border-border-separator bg-fill px-2 py-0.5 text-center"
312
+ }, Ke = ["onClick"], Oe = ["data-op"], Pe = { class: "w-10 select-none px-2 text-right tabular-nums text-content-muted" }, We = { class: "w-10 select-none px-2 text-right tabular-nums text-content-muted" }, Ge = {
313
+ class: "w-5 select-none text-center",
314
+ "aria-hidden": "true"
315
+ }, He = { class: "whitespace-pre pr-3" }, Ze = {
316
+ key: 0,
317
+ class: "sr-only"
318
+ }, qe = { key: 1 }, Je = {
319
+ key: 0,
320
+ "data-diff-gap": ""
321
+ }, Qe = {
322
+ colspan: "6",
323
+ class: "border-y border-border-separator bg-fill px-2 py-0.5 text-center"
324
+ }, Xe = ["onClick"], Ye = { key: 1 }, et = ["data-op"], tt = {
325
+ key: 0,
326
+ class: "sr-only"
327
+ }, Et = /* @__PURE__ */ M({
328
+ __name: "DiffView",
329
+ props: {
330
+ lines: {},
331
+ mode: { default: "unified" },
332
+ context: { default: 3 }
333
+ },
334
+ setup(u) {
335
+ const t = u, { t: l } = F(), a = T(/* @__PURE__ */ new Set()), h = _(() => Ae(t.lines, t.context, a.value)), e = _(() => t.mode === "split" ? De(h.value) : []), x = _(() => t.lines.some((c) => c.op !== " ")), f = { " ": " ", "-": "−", "+": "+" }, r = { " ": "", "-": "bg-status-danger-surface text-status-danger-content", "+": "bg-status-success-surface text-status-success-content" }, o = (c) => c === "+" ? l("core.diff.added") : c === "-" ? l("core.diff.removed") : "", v = (c) => a.value = /* @__PURE__ */ new Set([...a.value, c]);
336
+ return (c, d) => x.value ? (s(), n("div", {
337
+ key: 1,
338
+ class: "overflow-x-auto rounded-md border border-border-separator bg-surface-cell font-mono text-xs leading-5",
339
+ "data-mode": t.mode,
340
+ "data-diff-view": ""
341
+ }, [
342
+ i("table", {
343
+ class: "w-full border-collapse",
344
+ "aria-label": p(l)("core.diff.label")
345
+ }, [
346
+ t.mode === "unified" ? (s(), n("tbody", Ue, [
347
+ (s(!0), n(S, null, B(h.value, (m, y) => (s(), n(S, {
348
+ key: p(V)(m) ? `gap-${m.key}` : y
349
+ }, [
350
+ p(V)(m) ? (s(), n("tr", Fe, [
351
+ i("td", Ie, [
352
+ i("button", {
353
+ type: "button",
354
+ class: "cursor-pointer rounded-sm px-2 text-content-muted hover:text-content-strong focus-visible:outline-2 focus-visible:outline-border-focus",
355
+ onClick: (g) => v(m.key)
356
+ }, b(p(l)("core.diff.collapsed", { count: m.lines.length }, m.lines.length)), 9, Ke)
357
+ ])
358
+ ])) : (s(), n("tr", {
359
+ key: 1,
360
+ class: $(r[m.op]),
361
+ "data-op": m.op
362
+ }, [
363
+ i("td", Pe, b(m.oldNo), 1),
364
+ i("td", We, b(m.newNo), 1),
365
+ i("td", Ge, b(f[m.op]), 1),
366
+ i("td", He, [
367
+ m.op !== " " ? (s(), n("span", Ze, b(o(m.op)) + ": ", 1)) : w("", !0),
368
+ A(b(m.text), 1)
369
+ ])
370
+ ], 10, Oe))
371
+ ], 64))), 128))
372
+ ])) : (s(), n("tbody", qe, [
373
+ (s(!0), n(S, null, B(e.value, (m, y) => (s(), n(S, {
374
+ key: p(V)(m) ? `gap-${m.key}` : y
375
+ }, [
376
+ p(V)(m) ? (s(), n("tr", Je, [
377
+ i("td", Qe, [
378
+ i("button", {
379
+ type: "button",
380
+ class: "cursor-pointer rounded-sm px-2 text-content-muted hover:text-content-strong focus-visible:outline-2 focus-visible:outline-border-focus",
381
+ onClick: (g) => v(m.key)
382
+ }, b(p(l)("core.diff.collapsed", { count: m.lines.length }, m.lines.length)), 9, Xe)
383
+ ])
384
+ ])) : (s(), n("tr", Ye, [
385
+ (s(!0), n(S, null, B([m.left, m.right], (g, z) => (s(), n(S, { key: z }, [
386
+ i("td", {
387
+ class: $(["w-10 select-none px-2 text-right tabular-nums text-content-muted", [g ? r[g.op] : "bg-fill", z === 1 ? "border-l border-border-separator" : ""]])
388
+ }, b(z === 0 ? g?.oldNo : g?.newNo), 3),
389
+ i("td", {
390
+ class: $(["w-5 select-none text-center", g ? r[g.op] : "bg-fill"]),
391
+ "aria-hidden": "true"
392
+ }, b(g ? f[g.op] : ""), 3),
393
+ i("td", {
394
+ class: $(["w-1/2 whitespace-pre pr-3", g ? r[g.op] : "bg-fill"]),
395
+ "data-op": g?.op
396
+ }, [
397
+ g ? (s(), n(S, { key: 0 }, [
398
+ g.op !== " " ? (s(), n("span", tt, b(o(g.op)) + ": ", 1)) : w("", !0),
399
+ A(b(g.text), 1)
400
+ ], 64)) : w("", !0)
401
+ ], 10, et)
402
+ ], 64))), 128))
403
+ ]))
404
+ ], 64))), 128))
405
+ ]))
406
+ ], 8, je)
407
+ ], 8, Re)) : (s(), n("p", Ee, b(p(l)("core.diff.identical")), 1));
408
+ }
409
+ }), ot = {
263
410
  role: "separator",
264
411
  class: "my-2 flex items-center gap-4"
265
- }, xe = {
412
+ }, st = {
266
413
  key: 0,
267
414
  class: "select-none whitespace-nowrap font-mono text-2xs uppercase tracking-widest text-content-muted"
268
- }, De = /* @__PURE__ */ w({
415
+ }, Rt = /* @__PURE__ */ M({
269
416
  __name: "Divider",
270
417
  props: {
271
418
  label: {}
272
419
  },
273
- setup(m) {
274
- return (n, a) => (t(), o("div", be, [
275
- a[0] || (a[0] = u("span", { class: "h-px flex-1 bg-border-separator" }, null, -1)),
276
- m.label ? (t(), o("span", xe, b(m.label), 1)) : v("", !0),
277
- a[1] || (a[1] = u("span", { class: "h-px flex-1 bg-border-separator" }, null, -1))
420
+ setup(u) {
421
+ return (t, l) => (s(), n("div", ot, [
422
+ l[0] || (l[0] = i("span", { class: "h-px flex-1 bg-border-separator" }, null, -1)),
423
+ u.label ? (s(), n("span", st, b(u.label), 1)) : w("", !0),
424
+ l[1] || (l[1] = i("span", { class: "h-px flex-1 bg-border-separator" }, null, -1))
278
425
  ]));
279
426
  }
280
- }), Ae = /* @__PURE__ */ w({
427
+ }), jt = /* @__PURE__ */ M({
281
428
  __name: "KeyValueList",
282
429
  props: {
283
430
  items: {},
284
431
  columns: { default: 1 }
285
432
  },
286
- setup(m) {
287
- const n = m, a = {
433
+ setup(u) {
434
+ const t = u, l = {
288
435
  1: "grid-cols-1",
289
436
  2: "grid-cols-1 sm:grid-cols-2",
290
437
  3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"
291
438
  };
292
- return (r, p) => (t(), o("dl", {
293
- class: y(["grid gap-x-6 gap-y-3", a[n.columns]])
439
+ return (a, h) => (s(), n("dl", {
440
+ class: $(["grid gap-x-6 gap-y-3", l[t.columns]])
294
441
  }, [
295
- (t(!0), o(S, null, M(n.items, (l) => (t(), $(W, {
296
- key: l.key,
297
- label: l.label,
298
- value: l.value,
299
- "data-key": l.key
300
- }, P({ _: 2 }, [
301
- r.$slots.value ? {
442
+ (s(!0), n(S, null, B(t.items, (e) => (s(), D(be, {
443
+ key: e.key,
444
+ label: e.label,
445
+ value: e.value,
446
+ "data-key": e.key
447
+ }, ce({ _: 2 }, [
448
+ a.$slots.value ? {
302
449
  name: "default",
303
- fn: z(() => [
304
- k(r.$slots, "value", { item: l })
450
+ fn: W(() => [
451
+ C(a.$slots, "value", { item: e })
305
452
  ]),
306
453
  key: "0"
307
454
  } : void 0
308
455
  ]), 1032, ["label", "value", "data-key"]))), 128))
309
456
  ], 2));
310
457
  }
311
- }), Ee = /* @__PURE__ */ w({
458
+ }), Ut = /* @__PURE__ */ M({
312
459
  __name: "MicroLabel",
313
460
  props: {
314
461
  as: { default: "span" }
315
462
  },
316
- setup(m) {
317
- return (n, a) => (t(), $(q(m.as), { class: "text-2xs font-semibold uppercase tracking-[0.06em] text-content-muted" }, {
318
- default: z(() => [
319
- k(n.$slots, "default")
463
+ setup(u) {
464
+ return (t, l) => (s(), D(de(u.as), { class: "text-2xs font-semibold uppercase tracking-[0.06em] text-content-muted" }, {
465
+ default: W(() => [
466
+ C(t.$slots, "default")
320
467
  ]),
321
468
  _: 3
322
469
  }));
323
470
  }
324
- }), ge = {
471
+ }), nt = {
325
472
  key: 0,
326
473
  class: "mr-0.5"
327
- }, Ue = /* @__PURE__ */ w({
474
+ }, Ft = /* @__PURE__ */ M({
328
475
  __name: "Money",
329
476
  props: {
330
477
  amount: {},
@@ -334,104 +481,291 @@ const X = ["aria-label"], Y = {
334
481
  emptyZero: { type: Boolean, default: !1 },
335
482
  signed: { type: Boolean, default: !1 }
336
483
  },
337
- setup(m) {
338
- const n = m, a = L(), r = h(() => typeof n.amount == "number" && Number.isFinite(n.amount) ? n.amount : 0), p = h(() => n.emptyZero && !r.value), l = h(() => !n.signed || !r.value || !Math.round(Math.abs(r.value) * 10 ** n.decimals) ? "" : r.value > 0 ? "+" : "−"), x = h(() => a.money(n.signed ? Math.abs(r.value) : r.value, { decimals: n.decimals, whole: n.whole, symbol: !1 })), d = h(() => l.value === "+" ? "font-medium text-status-success-content" : l.value === "−" ? "font-medium text-status-danger-content" : ""), i = h(() => n.symbol ? a.currencySymbol : "");
339
- return (e, f) => (t(), o("span", {
340
- class: y(["whitespace-nowrap tabular-nums", d.value])
484
+ setup(u) {
485
+ const t = u, l = G(), a = _(() => typeof t.amount == "number" && Number.isFinite(t.amount) ? t.amount : 0), h = _(() => t.emptyZero && !a.value), e = _(() => !t.signed || !a.value || !Math.round(Math.abs(a.value) * 10 ** t.decimals) ? "" : a.value > 0 ? "+" : "−"), x = _(() => l.money(t.signed ? Math.abs(a.value) : a.value, { decimals: t.decimals, whole: t.whole, symbol: !1 })), f = _(() => e.value === "+" ? "font-medium text-status-success-content" : e.value === "−" ? "font-medium text-status-danger-content" : ""), r = _(() => t.symbol ? l.currencySymbol : "");
486
+ return (o, v) => (s(), n("span", {
487
+ class: $(["whitespace-nowrap tabular-nums", f.value])
341
488
  }, [
342
- p.value ? (t(), o(S, { key: 0 }, [
343
- V("—")
344
- ], 64)) : (t(), o(S, { key: 1 }, [
345
- l.value ? (t(), o("span", ge, b(l.value), 1)) : v("", !0),
346
- V(b(x.value), 1),
347
- i.value ? (t(), o("span", {
489
+ h.value ? (s(), n(S, { key: 0 }, [
490
+ A("—")
491
+ ], 64)) : (s(), n(S, { key: 1 }, [
492
+ e.value ? (s(), n("span", nt, b(e.value), 1)) : w("", !0),
493
+ A(b(x.value), 1),
494
+ r.value ? (s(), n("span", {
348
495
  key: 1,
349
- class: y(["ml-1 font-normal", d.value ? "opacity-75" : "text-content-muted"])
350
- }, b(i.value), 3)) : v("", !0)
496
+ class: $(["ml-1 font-normal", f.value ? "opacity-75" : "text-content-muted"])
497
+ }, b(r.value), 3)) : w("", !0)
351
498
  ], 64))
352
499
  ], 2));
353
500
  }
354
- }), ye = {
501
+ }), J = { desktop: 1280, tablet: 768, mobile: 375 };
502
+ function at(u, t) {
503
+ return !(u > 0) || !(t > 0) ? 1 : Math.min(1, u / t);
504
+ }
505
+ const lt = /* @__PURE__ */ new Set(["edit", "delete", "duplicate", "add", "reorder", "copy-locale"]), L = (u) => typeof u == "string";
506
+ function rt(u) {
507
+ if (typeof u != "object" || u === null) return null;
508
+ const t = u;
509
+ if (!L(t.type) || !lt.has(t.type)) return null;
510
+ switch (t.type) {
511
+ case "add":
512
+ return t.after === void 0 || L(t.after) ? { type: "add", ...L(t.after) && { after: t.after } } : null;
513
+ case "reorder":
514
+ return L(t.id) && typeof t.to == "number" ? { type: "reorder", id: t.id, to: t.to } : null;
515
+ case "copy-locale":
516
+ return L(t.id) && L(t.from) ? { type: "copy-locale", id: t.id, from: t.from } : null;
517
+ default:
518
+ return L(t.id) ? { type: t.type, id: t.id } : null;
519
+ }
520
+ }
521
+ const it = ["data-state"], ct = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-border-separator px-4 py-2" }, dt = { class: "ml-auto flex items-center gap-2" }, ut = ["aria-label", "title"], mt = ["href", "aria-label", "title"], pt = { class: "relative min-h-0 flex-1 bg-surface-page p-4" }, ft = ["src", "title", "sandbox"], bt = {
522
+ key: 0,
523
+ role: "status",
524
+ class: "pointer-events-none absolute inset-0 flex items-center justify-center gap-2 text-footnote text-content-muted",
525
+ "data-preview-loading": ""
526
+ }, ht = {
527
+ key: 1,
528
+ role: "alert",
529
+ class: "absolute inset-0 flex flex-col items-center justify-center gap-2 bg-surface-cell text-center",
530
+ "data-preview-failed": ""
531
+ }, vt = { class: "text-body text-status-danger-content" }, gt = {
532
+ class: "flex shrink-0 flex-wrap items-center gap-x-4 gap-y-1 border-t border-border-separator px-4 py-1.5 text-footnote text-content-muted",
533
+ "data-preview-footer": ""
534
+ }, xt = {
535
+ key: 0,
536
+ class: "tabular-nums"
537
+ }, It = /* @__PURE__ */ M({
538
+ __name: "PreviewFrame",
539
+ props: {
540
+ src: {},
541
+ title: {},
542
+ device: { default: "desktop" },
543
+ sandbox: { default: "allow-scripts allow-same-origin allow-forms" },
544
+ origin: { default: void 0 },
545
+ parse: { type: Function, default: void 0 },
546
+ timeout: { default: 15e3 }
547
+ },
548
+ emits: ["message", "load", "error", "update:device"],
549
+ setup(u, { expose: t, emit: l }) {
550
+ const a = u, h = l, { t: e } = F(), x = P("frame"), f = P("fit"), r = T("loading"), o = T(null), v = T(0), c = T({ width: 0, height: 0 });
551
+ let d = 0, m;
552
+ const y = _(() => J[a.device]), g = _(() => at(c.value.width, y.value)), z = _(() => a.origin ?? new URL(a.src, window.location.href).origin), X = _(() => Object.keys(J).map((k) => ({ value: k, label: e(`core.preview.${k}`) }))), Y = _(() => ({
553
+ width: `${y.value}px`,
554
+ height: c.value.height > 0 ? `${c.value.height / g.value}px` : "100%",
555
+ transform: g.value < 1 ? `scale(${g.value})` : void 0,
556
+ transformOrigin: "0 0"
557
+ })), ee = _(() => `${y.value * g.value}px`);
558
+ function I() {
559
+ r.value = "loading", o.value = null, d = performance.now(), clearTimeout(m), m = setTimeout(H, a.timeout);
560
+ }
561
+ function H() {
562
+ clearTimeout(m), r.value !== "loaded" && (r.value = "failed", h("error"));
563
+ }
564
+ function te() {
565
+ clearTimeout(m), r.value = "loaded", o.value = Math.round(performance.now() - d), h("load", o.value);
566
+ }
567
+ function K() {
568
+ v.value++, I();
569
+ }
570
+ function Z(k) {
571
+ const R = x.value?.contentWindow;
572
+ if (!R || k.source !== R || k.origin !== z.value) return;
573
+ const j = a.parse ? a.parse(k.data) : rt(k.data);
574
+ j && h("message", j);
575
+ }
576
+ function oe(k) {
577
+ x.value?.contentWindow?.postMessage(k, z.value === "null" ? "*" : z.value);
578
+ }
579
+ let O;
580
+ return ue(() => {
581
+ I(), window.addEventListener("message", Z), typeof ResizeObserver < "u" && f.value && (O = new ResizeObserver(([k]) => {
582
+ k && (c.value = { width: k.contentRect.width, height: k.contentRect.height });
583
+ }), O.observe(f.value));
584
+ }), me(() => {
585
+ window.removeEventListener("message", Z), O?.disconnect(), clearTimeout(m);
586
+ }), Q(() => a.src, I), t({ reload: K, post: oe }), (k, R) => (s(), n("div", {
587
+ class: "flex h-full min-h-0 min-w-0 flex-col",
588
+ "data-preview-frame": "",
589
+ "data-state": r.value
590
+ }, [
591
+ i("div", ct, [
592
+ C(k.$slots, "toolbar"),
593
+ i("div", dt, [
594
+ E(he, {
595
+ "model-value": a.device,
596
+ tabs: X.value,
597
+ label: p(e)("core.preview.device"),
598
+ "onUpdate:modelValue": R[0] || (R[0] = (j) => j && h("update:device", j))
599
+ }, null, 8, ["model-value", "tabs", "label"]),
600
+ i("button", {
601
+ type: "button",
602
+ "data-preview-reload": "",
603
+ "aria-label": p(e)("core.preview.reload"),
604
+ title: p(e)("core.preview.reload"),
605
+ class: "hit-target flex size-8 cursor-pointer items-center justify-center rounded-button text-content-muted hover:bg-fill hover:text-content-strong focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
606
+ onClick: K
607
+ }, [
608
+ E(p(N), {
609
+ name: "refreshLine",
610
+ size: 16
611
+ })
612
+ ], 8, ut),
613
+ i("a", {
614
+ href: a.src,
615
+ target: "_blank",
616
+ rel: "noopener",
617
+ "data-preview-open": "",
618
+ "aria-label": p(e)("core.preview.open"),
619
+ title: p(e)("core.preview.open"),
620
+ class: "hit-target flex size-8 items-center justify-center rounded-button text-content-muted hover:bg-fill hover:text-content-strong focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus"
621
+ }, [
622
+ E(p(N), {
623
+ name: "externalLink",
624
+ size: 16
625
+ })
626
+ ], 8, mt)
627
+ ])
628
+ ]),
629
+ i("div", pt, [
630
+ i("div", {
631
+ ref_key: "fit",
632
+ ref: f,
633
+ class: "relative size-full"
634
+ }, [
635
+ i("div", {
636
+ class: "mx-auto h-full overflow-hidden rounded-md border border-border-separator bg-surface-cell shadow-sm",
637
+ style: U({ width: ee.value })
638
+ }, [
639
+ (s(), n("iframe", {
640
+ key: v.value,
641
+ ref_key: "frame",
642
+ ref: x,
643
+ src: a.src,
644
+ title: a.title,
645
+ sandbox: a.sandbox,
646
+ style: U(Y.value),
647
+ class: "block border-0 bg-white",
648
+ onLoad: te,
649
+ onError: H
650
+ }, null, 44, ft))
651
+ ], 4),
652
+ r.value === "loading" ? (s(), n("div", bt, [
653
+ E(p(N), {
654
+ name: "loader4Line",
655
+ size: 16,
656
+ class: "animate-spin motion-reduce:animate-none"
657
+ }),
658
+ A(b(p(e)("core.preview.loading")), 1)
659
+ ])) : w("", !0),
660
+ r.value === "failed" ? (s(), n("div", ht, [
661
+ i("p", vt, b(p(e)("core.preview.failed")), 1),
662
+ i("button", {
663
+ type: "button",
664
+ class: "cursor-pointer rounded-button bg-fill px-3 py-1.5 text-footnote font-medium text-content-strong hover:bg-fill-strong focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
665
+ onClick: K
666
+ }, b(p(e)("core.preview.retry")), 1)
667
+ ])) : w("", !0)
668
+ ], 512)
669
+ ]),
670
+ i("div", gt, [
671
+ C(k.$slots, "footer", {
672
+ width: y.value,
673
+ scale: g.value,
674
+ device: a.device,
675
+ loadMs: o.value
676
+ }, () => [
677
+ o.value !== null ? (s(), n("span", xt, b(p(e)("core.preview.loaded_in", { ms: o.value })), 1)) : w("", !0),
678
+ i("span", null, b(g.value < 1 ? p(e)("core.preview.size_scaled", { width: y.value, percent: Math.round(g.value * 100) }) : p(e)("core.preview.size", { width: y.value })), 1)
679
+ ])
680
+ ])
681
+ ], 8, it));
682
+ }
683
+ }), yt = {
355
684
  key: 0,
356
685
  class: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 border-b border-border-separator px-row-inset py-2.5 text-subheadline"
357
- }, he = { class: "-mt-px -ml-px grid grid-cols-[repeat(var(--stat-columns),minmax(0,1fr))] compact:grid-cols-[repeat(var(--stat-compact-columns),minmax(0,1fr))]" }, ve = ["data-stat"], _e = { class: "truncate text-footnote text-content-muted" }, we = {
686
+ }, _t = { class: "-mt-px -ml-px grid grid-cols-[repeat(var(--stat-columns),minmax(0,1fr))] compact:grid-cols-[repeat(var(--stat-compact-columns),minmax(0,1fr))]" }, wt = ["data-stat"], kt = { class: "truncate text-footnote text-content-muted" }, $t = {
358
687
  key: 0,
359
688
  class: "flex items-center gap-2"
360
- }, ke = { class: "h-1 flex-1 overflow-hidden rounded-full bg-fill" }, $e = { class: "text-caption tabular-nums text-content-muted" }, Se = {
689
+ }, St = { class: "h-1 flex-1 overflow-hidden rounded-full bg-fill" }, Mt = { class: "text-caption tabular-nums text-content-muted" }, zt = {
361
690
  key: 1,
362
691
  class: "flex min-w-0 items-center gap-3 border-t border-border-separator px-row-inset py-2.5 text-subheadline"
363
- }, je = /* @__PURE__ */ w({
692
+ }, Kt = /* @__PURE__ */ M({
364
693
  __name: "StatSummary",
365
694
  props: {
366
695
  items: {},
367
696
  compactColumns: { default: 2 }
368
697
  },
369
- setup(m) {
370
- const n = L(), a = m, r = {
698
+ setup(u) {
699
+ const t = G(), l = u, a = {
371
700
  neutral: "text-content-strong",
372
701
  muted: "text-content-muted",
373
702
  info: "text-status-info-content",
374
703
  success: "text-status-success-content",
375
704
  warning: "text-status-warning-content",
376
705
  danger: "text-status-danger-content"
377
- }, p = {
706
+ }, h = {
378
707
  neutral: "bg-content-muted",
379
708
  muted: "bg-content-disabled",
380
709
  info: "bg-status-info-content",
381
710
  success: "bg-status-success-content",
382
711
  warning: "bg-status-warning-content",
383
712
  danger: "bg-status-danger-content"
384
- }, l = (d) => Math.min(100, Math.max(0, d)), x = h(() => ({
385
- "--stat-columns": String(a.items.length),
386
- "--stat-compact-columns": String(a.compactColumns)
713
+ }, e = (f) => Math.min(100, Math.max(0, f)), x = _(() => ({
714
+ "--stat-columns": String(l.items.length),
715
+ "--stat-compact-columns": String(l.compactColumns)
387
716
  }));
388
- return (d, i) => (t(), o("section", {
717
+ return (f, r) => (s(), n("section", {
389
718
  "data-test": "stat-summary",
390
719
  class: "overflow-hidden rounded-group bg-surface-cell shadow-group",
391
- style: E(x.value)
720
+ style: U(x.value)
392
721
  }, [
393
- d.$slots.header ? (t(), o("div", ye, [
394
- k(d.$slots, "header")
395
- ])) : v("", !0),
396
- u("dl", he, [
397
- (t(!0), o(S, null, M(a.items, (e) => (t(), o("div", {
398
- key: e.key,
399
- "data-stat": e.key,
400
- class: y(["flex min-w-0 flex-col gap-1.5 border-t border-l border-border-separator px-row-inset py-3", e.compact === !1 ? "compact:hidden" : ""])
722
+ f.$slots.header ? (s(), n("div", yt, [
723
+ C(f.$slots, "header")
724
+ ])) : w("", !0),
725
+ i("dl", _t, [
726
+ (s(!0), n(S, null, B(l.items, (o) => (s(), n("div", {
727
+ key: o.key,
728
+ "data-stat": o.key,
729
+ class: $(["flex min-w-0 flex-col gap-1.5 border-t border-l border-border-separator px-row-inset py-3", o.compact === !1 ? "compact:hidden" : ""])
401
730
  }, [
402
- u("dt", _e, b(e.label), 1),
403
- u("dd", {
404
- class: y(["text-title leading-none font-semibold tracking-tight tabular-nums", r[e.tone ?? "neutral"]])
405
- }, b(g(n).number(e.value, { maximumFractionDigits: 0 })), 3),
406
- e.share != null ? (t(), o("dd", we, [
407
- u("span", ke, [
408
- u("span", {
409
- class: y(["block h-full rounded-full", p[e.tone ?? "neutral"]]),
410
- style: E({ width: `${l(e.share)}%` })
731
+ i("dt", kt, b(o.label), 1),
732
+ i("dd", {
733
+ class: $(["text-title leading-none font-semibold tracking-tight tabular-nums", a[o.tone ?? "neutral"]])
734
+ }, b(p(t).number(o.value, { maximumFractionDigits: 0 })), 3),
735
+ o.share != null ? (s(), n("dd", $t, [
736
+ i("span", St, [
737
+ i("span", {
738
+ class: $(["block h-full rounded-full", h[o.tone ?? "neutral"]]),
739
+ style: U({ width: `${e(o.share)}%` })
411
740
  }, null, 6)
412
741
  ]),
413
- u("span", $e, b(Math.round(l(e.share))) + " %", 1)
414
- ])) : v("", !0)
415
- ], 10, ve))), 128))
742
+ i("span", Mt, b(Math.round(e(o.share))) + " %", 1)
743
+ ])) : w("", !0)
744
+ ], 10, wt))), 128))
416
745
  ]),
417
- d.$slots.footer ? (t(), o("div", Se, [
418
- k(d.$slots, "footer")
419
- ])) : v("", !0)
746
+ f.$slots.footer ? (s(), n("div", zt, [
747
+ C(f.$slots, "footer")
748
+ ])) : w("", !0)
420
749
  ], 4));
421
750
  }
422
751
  });
423
752
  export {
424
- le as ActivityStream,
425
- Q as Avatar,
426
- Te as CommentThread,
427
- de as Composer,
428
- De as Divider,
429
- W as KeyValue,
430
- Ae as KeyValueList,
431
- Ee as MicroLabel,
432
- Ue as Money,
433
- Ie as Panel,
434
- je as StatSummary,
435
- Ge as Timestamp,
436
- Ne as initialsFor
753
+ Se as ActivityStream,
754
+ fe as Avatar,
755
+ Dt as CommentThread,
756
+ Le as Composer,
757
+ Et as DiffView,
758
+ Rt as Divider,
759
+ be as KeyValue,
760
+ jt as KeyValueList,
761
+ Ut as MicroLabel,
762
+ Ft as Money,
763
+ J as PREVIEW_WIDTHS,
764
+ Ht as Panel,
765
+ It as PreviewFrame,
766
+ Kt as StatSummary,
767
+ qt as Timestamp,
768
+ Wt as initialsFor,
769
+ rt as parsePreviewAction,
770
+ at as previewScale
437
771
  };