@mulmoclaude/collection-plugin 0.13.2 → 0.14.1

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.
package/dist/vue.js CHANGED
@@ -1,8 +1,10 @@
1
- import { COMPUTED_TYPES, MINUTES_PER_DAY, TOOL_DEFINITION, actionVisible, agentActionRunKey, assignLanes, backlinkRows, boolSortValue, bucketRecords, buildMonthGrid, buildUpdatedRecord, coerceInlineValue, dateOf, dateSortValue, daySlice, defangForPrompt, deriveAll, draftToRecord, embedTargetId, emptyRow, enumSortValue, errorMessage, executePresentCollection, fieldVisible, firstMissingRequiredField, isSortableField, itemIdOf, itemIsDone, itemLabelOf, labelFieldFor, nextSortDirection, numericSortValue, resolveEnumColor, rollupValue, rowFromItem, shortHexId, sortItems, stringSortValue, ymdKey } from "@mulmoclaude/core/collection";
1
+ import { COMPUTED_TYPES, MINUTES_PER_DAY, TOOL_DEFINITION, actionVisible, agentActionRunKey, assignLanes, backlinkRows, boolSortValue, bucketRecords, buildMonthGrid, buildOntologyGraph, buildUpdatedRecord, coerceInlineValue, dateOf, dateSortValue, daySlice, defangForPrompt, deriveAll, draftToRecord, embedTargetId, emptyRow, enumSortValue, errorMessage, executePresentCollection, fieldText, fieldVisible, firstMissingRequiredField, isSortableField, itemIdOf, itemIsDone, itemLabelOf, labelFieldFor, nextSortDirection, numericSortValue, resolveEnumColor, rollupValue, rowFromItem, shortHexId, sortItems, stringSortValue, ymdKey } from "@mulmoclaude/core/collection";
2
2
  import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, effectScope, mergeModels, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, reactive, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useModel, vModelCheckbox, vModelDynamic, vModelSelect, vModelText, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
3
3
  import { createI18n } from "vue-i18n";
4
4
  import draggable from "vuedraggable";
5
5
  import { REMOTE_VIEW_MAX_BYTES, handleRemoteViewMessage } from "@mulmoclaude/core/remote-view";
6
+ import * as echarts from "echarts";
7
+ import { escapeHtml } from "@mulmoclaude/core/wiki";
6
8
  import { createTranslationCache } from "@mulmoclaude/core/translation/client";
7
9
  //#region src/vue/uiContext.ts
8
10
  var current = null;
@@ -75,6 +77,11 @@ var i18n = createI18n({
75
77
  editable: "Editable",
76
78
  data: "Data"
77
79
  },
80
+ mapTab: "Map",
81
+ mapEmpty: "Nothing to map yet — the map draws itself as collections and the links between them appear.",
82
+ mapRecordCount: "{count} records",
83
+ mapRecordCountUnknown: "record count unavailable",
84
+ mapMissingHint: "No collection with this slug — a relation points at it.",
78
85
  notFound: "Collection not found",
79
86
  loadFailed: "Failed to load",
80
87
  requiredField: "This field is required",
@@ -223,6 +230,11 @@ var i18n = createI18n({
223
230
  editable: "編集可能",
224
231
  data: "データ"
225
232
  },
233
+ mapTab: "マップ",
234
+ mapEmpty: "まだ表示するものがありません。コレクションとその間のリンクが増えると、マップが自動的に描かれます。",
235
+ mapRecordCount: "{count} 件のレコード",
236
+ mapRecordCountUnknown: "レコード数を取得できません",
237
+ mapMissingHint: "このスラッグのコレクションは存在しません。リレーションが参照しています。",
226
238
  notFound: "コレクションが見つかりません",
227
239
  loadFailed: "読み込みに失敗しました",
228
240
  requiredField: "この項目は必須です",
@@ -371,6 +383,11 @@ var i18n = createI18n({
371
383
  editable: "可编辑",
372
384
  data: "数据"
373
385
  },
386
+ mapTab: "地图",
387
+ mapEmpty: "暂无可显示的内容。随着集合及其之间的链接增多,地图会自动绘制。",
388
+ mapRecordCount: "{count} 条记录",
389
+ mapRecordCountUnknown: "无法获取记录数",
390
+ mapMissingHint: "不存在此 slug 的集合,但有关系指向它。",
374
391
  notFound: "未找到集合",
375
392
  loadFailed: "加载失败",
376
393
  requiredField: "此字段为必填项",
@@ -519,6 +536,11 @@ var i18n = createI18n({
519
536
  editable: "편집 가능",
520
537
  data: "데이터"
521
538
  },
539
+ mapTab: "맵",
540
+ mapEmpty: "아직 표시할 내용이 없습니다. 컬렉션과 그 사이의 링크가 생기면 맵이 자동으로 그려집니다.",
541
+ mapRecordCount: "레코드 {count}개",
542
+ mapRecordCountUnknown: "레코드 수를 가져올 수 없음",
543
+ mapMissingHint: "이 슬러그의 컬렉션이 없습니다. 관계가 이를 참조하고 있습니다.",
522
544
  notFound: "컬렉션을 찾을 수 없습니다",
523
545
  loadFailed: "불러오기에 실패했습니다",
524
546
  requiredField: "이 필드는 필수입니다",
@@ -667,6 +689,11 @@ var i18n = createI18n({
667
689
  editable: "Editables",
668
690
  data: "Datos"
669
691
  },
692
+ mapTab: "Mapa",
693
+ mapEmpty: "Nada que mostrar todavía: el mapa se dibuja solo a medida que aparecen colecciones y los enlaces entre ellas.",
694
+ mapRecordCount: "{count} registros",
695
+ mapRecordCountUnknown: "recuento de registros no disponible",
696
+ mapMissingHint: "No existe una colección con este slug; una relación apunta a ella.",
670
697
  notFound: "Colección no encontrada",
671
698
  loadFailed: "Error al cargar",
672
699
  requiredField: "Este campo es obligatorio",
@@ -815,6 +842,11 @@ var i18n = createI18n({
815
842
  editable: "Editáveis",
816
843
  data: "Dados"
817
844
  },
845
+ mapTab: "Mapa",
846
+ mapEmpty: "Nada para mostrar ainda — o mapa se desenha sozinho conforme coleções e os vínculos entre elas aparecem.",
847
+ mapRecordCount: "{count} registros",
848
+ mapRecordCountUnknown: "contagem de registros indisponível",
849
+ mapMissingHint: "Nenhuma coleção com este slug — uma relação aponta para ela.",
818
850
  notFound: "Coleção não encontrada",
819
851
  loadFailed: "Falha ao carregar",
820
852
  requiredField: "Este campo é obrigatório",
@@ -963,6 +995,11 @@ var i18n = createI18n({
963
995
  editable: "Modifiables",
964
996
  data: "Données"
965
997
  },
998
+ mapTab: "Carte",
999
+ mapEmpty: "Rien à afficher pour l'instant — la carte se dessine d'elle-même à mesure que les collections et leurs liens apparaissent.",
1000
+ mapRecordCount: "{count} enregistrements",
1001
+ mapRecordCountUnknown: "nombre d'enregistrements indisponible",
1002
+ mapMissingHint: "Aucune collection avec ce slug — une relation pointe vers elle.",
966
1003
  notFound: "Collection introuvable",
967
1004
  loadFailed: "Échec du chargement",
968
1005
  requiredField: "Ce champ est obligatoire",
@@ -1111,6 +1148,11 @@ var i18n = createI18n({
1111
1148
  editable: "Bearbeitbar",
1112
1149
  data: "Daten"
1113
1150
  },
1151
+ mapTab: "Karte",
1152
+ mapEmpty: "Noch nichts zu zeigen — die Karte entsteht von selbst, sobald Sammlungen und ihre Verknüpfungen entstehen.",
1153
+ mapRecordCount: "{count} Einträge",
1154
+ mapRecordCountUnknown: "Anzahl der Datensätze nicht verfügbar",
1155
+ mapMissingHint: "Keine Sammlung mit diesem Slug — eine Relation verweist darauf.",
1114
1156
  notFound: "Sammlung nicht gefunden",
1115
1157
  loadFailed: "Laden fehlgeschlagen",
1116
1158
  requiredField: "Dieses Feld ist erforderlich",
@@ -1325,8 +1367,8 @@ function isExternalUrl(value) {
1325
1367
  return typeof value === "string" && /^https?:\/\//i.test(value);
1326
1368
  }
1327
1369
  function detailText(value) {
1328
- if (value === void 0 || value === null || value === "") return EM_DASH;
1329
- return String(value);
1370
+ const text = fieldText(value, EM_DASH);
1371
+ return text === "" ? EM_DASH : text;
1330
1372
  }
1331
1373
  function formatCell(value, type) {
1332
1374
  if (value === void 0 || value === null || value === "") return EM_DASH;
@@ -1350,7 +1392,7 @@ function resolveCurrency(field, record) {
1350
1392
  function formatMoney(value, currency, displayLocale) {
1351
1393
  if (value === void 0 || value === "") return EM_DASH;
1352
1394
  const amount = typeof value === "number" ? value : Number(value);
1353
- if (!Number.isFinite(amount)) return String(value);
1395
+ if (!Number.isFinite(amount)) return fieldText(value, EM_DASH);
1354
1396
  const currencyCode = currency && currency.length > 0 ? currency : DEFAULT_CURRENCY;
1355
1397
  try {
1356
1398
  return new Intl.NumberFormat(displayLocale, {
@@ -1453,7 +1495,7 @@ function buildEmbedOptions(schema, items) {
1453
1495
  const { fields, primaryKey } = schema;
1454
1496
  const displayField = displayFieldFor(fields, primaryKey);
1455
1497
  return items.map((item) => {
1456
- const slug = String(item[primaryKey] ?? "");
1498
+ const slug = fieldText(item[primaryKey]);
1457
1499
  const labelRaw = item[displayField];
1458
1500
  return {
1459
1501
  slug,
@@ -1463,13 +1505,13 @@ function buildEmbedOptions(schema, items) {
1463
1505
  }
1464
1506
  //#endregion
1465
1507
  //#region src/vue/components/CollectionMutateParamsModal.vue?vue&type=script&setup=true&lang.ts
1466
- var _hoisted_1$16 = { class: "flex items-center justify-between px-6 pt-5 pb-3" };
1467
- var _hoisted_2$15 = { class: "text-sm font-bold text-slate-800 flex items-center gap-1.5" };
1468
- var _hoisted_3$15 = {
1508
+ var _hoisted_1$17 = { class: "flex items-center justify-between px-6 pt-5 pb-3" };
1509
+ var _hoisted_2$16 = { class: "text-sm font-bold text-slate-800 flex items-center gap-1.5" };
1510
+ var _hoisted_3$16 = {
1469
1511
  key: 0,
1470
1512
  class: "material-icons text-base text-indigo-600"
1471
1513
  };
1472
- var _hoisted_4$15 = ["aria-label"];
1514
+ var _hoisted_4$16 = ["aria-label"];
1473
1515
  var _hoisted_5$14 = { class: "flex flex-col gap-4 px-6 pb-2" };
1474
1516
  var _hoisted_6$13 = ["for"];
1475
1517
  var _hoisted_7$11 = {
@@ -1567,13 +1609,13 @@ var CollectionMutateParamsModal_default = /* @__PURE__ */ defineComponent({
1567
1609
  "data-testid": "collections-mutate-modal",
1568
1610
  onSubmit: withModifiers(submit, ["prevent"])
1569
1611
  }, [
1570
- createElementVNode("div", _hoisted_1$16, [createElementVNode("h2", _hoisted_2$15, [__props.action.icon ? (openBlock(), createElementBlock("span", _hoisted_3$15, toDisplayString(__props.action.icon), 1)) : createCommentVNode("", true), createElementVNode("span", null, toDisplayString(__props.action.label), 1)]), createElementVNode("button", {
1612
+ createElementVNode("div", _hoisted_1$17, [createElementVNode("h2", _hoisted_2$16, [__props.action.icon ? (openBlock(), createElementBlock("span", _hoisted_3$16, toDisplayString(__props.action.icon), 1)) : createCommentVNode("", true), createElementVNode("span", null, toDisplayString(__props.action.label), 1)]), createElementVNode("button", {
1571
1613
  type: "button",
1572
1614
  class: "h-8 w-8 flex items-center justify-center rounded text-slate-400 hover:bg-slate-100 hover:text-slate-600 transition-colors",
1573
1615
  "aria-label": unref(t)("common.close"),
1574
1616
  "data-testid": "collections-mutate-close",
1575
1617
  onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
1576
- }, [..._cache[3] || (_cache[3] = [createElementVNode("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_4$15)]),
1618
+ }, [..._cache[3] || (_cache[3] = [createElementVNode("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_4$16)]),
1577
1619
  createElementVNode("div", _hoisted_5$14, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.action.params, (spec, key) => {
1578
1620
  return openBlock(), createElementBlock("div", {
1579
1621
  key,
@@ -1638,13 +1680,13 @@ var CollectionMutateParamsModal_default = /* @__PURE__ */ defineComponent({
1638
1680
  });
1639
1681
  //#endregion
1640
1682
  //#region src/vue/components/CollectionCalendarView.vue?vue&type=script&setup=true&lang.ts
1641
- var _hoisted_1$15 = {
1683
+ var _hoisted_1$16 = {
1642
1684
  class: "flex flex-col gap-3",
1643
1685
  "data-testid": "collection-calendar"
1644
1686
  };
1645
- var _hoisted_2$14 = { class: "flex items-center gap-2" };
1646
- var _hoisted_3$14 = ["aria-label"];
1647
- var _hoisted_4$14 = ["aria-label"];
1687
+ var _hoisted_2$15 = { class: "flex items-center gap-2" };
1688
+ var _hoisted_3$15 = ["aria-label"];
1689
+ var _hoisted_4$15 = ["aria-label"];
1648
1690
  var _hoisted_5$13 = {
1649
1691
  class: "text-sm font-bold text-slate-800 flex-1",
1650
1692
  "data-testid": "collection-calendar-month"
@@ -1779,22 +1821,22 @@ var CollectionCalendarView_default = /* @__PURE__ */ defineComponent({
1779
1821
  viewMonth.value = now.getMonth() + 1;
1780
1822
  }
1781
1823
  return (_ctx, _cache) => {
1782
- return openBlock(), createElementBlock("div", _hoisted_1$15, [
1783
- createElementVNode("div", _hoisted_2$14, [
1824
+ return openBlock(), createElementBlock("div", _hoisted_1$16, [
1825
+ createElementVNode("div", _hoisted_2$15, [
1784
1826
  createElementVNode("button", {
1785
1827
  type: "button",
1786
1828
  class: "h-8 w-8 flex items-center justify-center rounded text-slate-500 hover:bg-slate-100 transition-colors",
1787
1829
  "aria-label": unref(t)("collectionsView.calendarPrevMonth"),
1788
1830
  "data-testid": "collection-calendar-prev",
1789
1831
  onClick: _cache[0] || (_cache[0] = ($event) => stepMonth(-1))
1790
- }, [..._cache[2] || (_cache[2] = [createElementVNode("span", { class: "material-icons text-lg" }, "chevron_left", -1)])], 8, _hoisted_3$14),
1832
+ }, [..._cache[2] || (_cache[2] = [createElementVNode("span", { class: "material-icons text-lg" }, "chevron_left", -1)])], 8, _hoisted_3$15),
1791
1833
  createElementVNode("button", {
1792
1834
  type: "button",
1793
1835
  class: "h-8 w-8 flex items-center justify-center rounded text-slate-500 hover:bg-slate-100 transition-colors",
1794
1836
  "aria-label": unref(t)("collectionsView.calendarNextMonth"),
1795
1837
  "data-testid": "collection-calendar-next",
1796
1838
  onClick: _cache[1] || (_cache[1] = ($event) => stepMonth(1))
1797
- }, [..._cache[3] || (_cache[3] = [createElementVNode("span", { class: "material-icons text-lg" }, "chevron_right", -1)])], 8, _hoisted_4$14),
1839
+ }, [..._cache[3] || (_cache[3] = [createElementVNode("span", { class: "material-icons text-lg" }, "chevron_right", -1)])], 8, _hoisted_4$15),
1798
1840
  createElementVNode("h3", _hoisted_5$13, toDisplayString(monthLabel.value), 1),
1799
1841
  createElementVNode("button", {
1800
1842
  type: "button",
@@ -1844,13 +1886,13 @@ var CollectionCalendarView_default = /* @__PURE__ */ defineComponent({
1844
1886
  });
1845
1887
  //#endregion
1846
1888
  //#region src/vue/components/CollectionDayView.vue?vue&type=script&setup=true&lang.ts
1847
- var _hoisted_1$14 = { class: "flex items-center gap-2 border-b border-slate-200 px-4 py-3" };
1848
- var _hoisted_2$13 = {
1889
+ var _hoisted_1$15 = { class: "flex items-center gap-2 border-b border-slate-200 px-4 py-3" };
1890
+ var _hoisted_2$14 = {
1849
1891
  class: "flex-1 text-sm font-bold text-slate-800",
1850
1892
  "data-testid": "collection-day-view-title"
1851
1893
  };
1852
- var _hoisted_3$13 = ["aria-label"];
1853
- var _hoisted_4$13 = ["aria-label"];
1894
+ var _hoisted_3$14 = ["aria-label"];
1895
+ var _hoisted_4$14 = ["aria-label"];
1854
1896
  var _hoisted_5$12 = {
1855
1897
  key: 0,
1856
1898
  class: "px-4 py-10 text-center text-sm text-slate-400"
@@ -2038,8 +2080,8 @@ var CollectionDayView_default = /* @__PURE__ */ defineComponent({
2038
2080
  role: "dialog",
2039
2081
  "aria-modal": "true"
2040
2082
  }, [createElementVNode("div", { class: normalizeClass(["flex min-h-0 flex-col", __props.showDetail ? "w-80 shrink-0 border-r border-slate-200" : "w-full"]) }, [
2041
- createElementVNode("div", _hoisted_1$14, [
2042
- createElementVNode("h3", _hoisted_2$13, toDisplayString(dayLabel.value), 1),
2083
+ createElementVNode("div", _hoisted_1$15, [
2084
+ createElementVNode("h3", _hoisted_2$14, toDisplayString(dayLabel.value), 1),
2043
2085
  __props.canCreate ? (openBlock(), createElementBlock("button", {
2044
2086
  key: 0,
2045
2087
  type: "button",
@@ -2047,14 +2089,14 @@ var CollectionDayView_default = /* @__PURE__ */ defineComponent({
2047
2089
  "aria-label": unref(t)("collectionsView.calendarCreateOn", { date: dayKey.value }),
2048
2090
  "data-testid": "collection-day-view-create",
2049
2091
  onClick: onCreate
2050
- }, [..._cache[3] || (_cache[3] = [createElementVNode("span", { class: "material-icons text-lg" }, "add", -1)])], 8, _hoisted_3$13)) : createCommentVNode("", true),
2092
+ }, [..._cache[3] || (_cache[3] = [createElementVNode("span", { class: "material-icons text-lg" }, "add", -1)])], 8, _hoisted_3$14)) : createCommentVNode("", true),
2051
2093
  createElementVNode("button", {
2052
2094
  type: "button",
2053
2095
  class: "h-8 w-8 flex items-center justify-center rounded text-slate-500 hover:bg-slate-100 transition-colors",
2054
2096
  "aria-label": unref(t)("collectionsView.dayViewClose"),
2055
2097
  "data-testid": "collection-day-view-close",
2056
2098
  onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
2057
- }, [..._cache[4] || (_cache[4] = [createElementVNode("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_4$13)
2099
+ }, [..._cache[4] || (_cache[4] = [createElementVNode("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_4$14)
2058
2100
  ]),
2059
2101
  timedEntries.value.length === 0 && allDayEntries.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_5$12, toDisplayString(unref(t)("collectionsView.dayViewEmpty")), 1)) : (openBlock(), createElementBlock("div", {
2060
2102
  key: 1,
@@ -2105,13 +2147,13 @@ var CollectionDayView_default = /* @__PURE__ */ defineComponent({
2105
2147
  });
2106
2148
  //#endregion
2107
2149
  //#region src/vue/components/CollectionKanbanView.vue?vue&type=script&setup=true&lang.ts
2108
- var _hoisted_1$13 = {
2150
+ var _hoisted_1$14 = {
2109
2151
  class: "h-full overflow-x-auto overflow-y-hidden",
2110
2152
  "data-testid": "collection-kanban"
2111
2153
  };
2112
- var _hoisted_2$12 = { class: "flex gap-3 h-full p-1 min-w-max" };
2113
- var _hoisted_3$12 = ["data-testid"];
2114
- var _hoisted_4$12 = { class: "flex items-center justify-between px-3 py-2 border-b border-slate-200" };
2154
+ var _hoisted_2$13 = { class: "flex gap-3 h-full p-1 min-w-max" };
2155
+ var _hoisted_3$13 = ["data-testid"];
2156
+ var _hoisted_4$13 = { class: "flex items-center justify-between px-3 py-2 border-b border-slate-200" };
2115
2157
  var _hoisted_5$11 = { class: "flex items-center gap-2 min-w-0" };
2116
2158
  var _hoisted_6$10 = ["title"];
2117
2159
  var _hoisted_7$8 = { class: "text-[11px] text-slate-400 shrink-0" };
@@ -2233,12 +2275,12 @@ var CollectionKanbanView_default = /* @__PURE__ */ defineComponent({
2233
2275
  emit("move", itemId(item), next);
2234
2276
  }
2235
2277
  return (_ctx, _cache) => {
2236
- return openBlock(), createElementBlock("div", _hoisted_1$13, [createElementVNode("div", _hoisted_2$12, [(openBlock(true), createElementBlock(Fragment, null, renderList(columns.value, (column) => {
2278
+ return openBlock(), createElementBlock("div", _hoisted_1$14, [createElementVNode("div", _hoisted_2$13, [(openBlock(true), createElementBlock(Fragment, null, renderList(columns.value, (column) => {
2237
2279
  return openBlock(), createElementBlock("div", {
2238
2280
  key: column.value,
2239
2281
  "data-testid": `collection-kanban-column-${column.value || "uncategorized"}`,
2240
2282
  class: "w-72 shrink-0 flex flex-col bg-slate-100 rounded-lg"
2241
- }, [createElementVNode("div", _hoisted_4$12, [createElementVNode("div", _hoisted_5$11, [createElementVNode("span", { class: normalizeClass(["w-2 h-2 rounded-full shrink-0", unref(resolveEnumColor)(__props.schema, __props.groupField, column.value).dot]) }, null, 2), createElementVNode("span", {
2283
+ }, [createElementVNode("div", _hoisted_4$13, [createElementVNode("div", _hoisted_5$11, [createElementVNode("span", { class: normalizeClass(["w-2 h-2 rounded-full shrink-0", unref(resolveEnumColor)(__props.schema, __props.groupField, column.value).dot]) }, null, 2), createElementVNode("span", {
2242
2284
  class: "font-semibold text-xs text-slate-600 truncate",
2243
2285
  title: column.label
2244
2286
  }, toDisplayString(column.label), 9, _hoisted_6$10)]), createElementVNode("span", _hoisted_7$8, toDisplayString(itemsByColumn(column.value).length), 1)]), createVNode(unref(draggable), {
@@ -2274,7 +2316,7 @@ var CollectionKanbanView_default = /* @__PURE__ */ defineComponent({
2274
2316
  "item-key",
2275
2317
  "disabled",
2276
2318
  "onChange"
2277
- ])], 8, _hoisted_3$12);
2319
+ ])], 8, _hoisted_3$13);
2278
2320
  }), 128))])]);
2279
2321
  };
2280
2322
  }
@@ -2304,10 +2346,10 @@ function activatePathLink(event, path, stop = false) {
2304
2346
  }
2305
2347
  //#endregion
2306
2348
  //#region src/vue/components/CollectionBacklinksView.vue?vue&type=script&setup=true&lang.ts
2307
- var _hoisted_1$12 = ["data-testid"];
2308
- var _hoisted_2$11 = { class: "w-full text-[11px] text-slate-600 bg-white" };
2309
- var _hoisted_3$11 = { class: "bg-slate-50 border-b border-slate-200 text-slate-500 font-bold uppercase tracking-wider" };
2310
- var _hoisted_4$11 = { class: "divide-y divide-slate-100" };
2349
+ var _hoisted_1$13 = ["data-testid"];
2350
+ var _hoisted_2$12 = { class: "w-full text-[11px] text-slate-600 bg-white" };
2351
+ var _hoisted_3$12 = { class: "bg-slate-50 border-b border-slate-200 text-slate-500 font-bold uppercase tracking-wider" };
2352
+ var _hoisted_4$12 = { class: "divide-y divide-slate-100" };
2311
2353
  var _hoisted_5$10 = [
2312
2354
  "data-testid",
2313
2355
  "onClick",
@@ -2329,12 +2371,12 @@ var CollectionBacklinksView_default = /* @__PURE__ */ defineComponent({
2329
2371
  key: 0,
2330
2372
  class: "border border-slate-200/80 rounded-xl overflow-hidden shadow-sm mt-1",
2331
2373
  "data-testid": `collections-backlinks-${__props.fieldKey}`
2332
- }, [createElementVNode("table", _hoisted_2$11, [createElementVNode("thead", _hoisted_3$11, [createElementVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.view.columns, (column) => {
2374
+ }, [createElementVNode("table", _hoisted_2$12, [createElementVNode("thead", _hoisted_3$12, [createElementVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.view.columns, (column) => {
2333
2375
  return openBlock(), createElementBlock("th", {
2334
2376
  key: column.key,
2335
2377
  class: "text-left px-4 py-2 font-bold"
2336
2378
  }, toDisplayString(column.label), 1);
2337
- }), 128))])]), createElementVNode("tbody", _hoisted_4$11, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.view.rows, (row) => {
2379
+ }), 128))])]), createElementVNode("tbody", _hoisted_4$12, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.view.rows, (row) => {
2338
2380
  return openBlock(), createElementBlock("tr", {
2339
2381
  key: row.id,
2340
2382
  class: "group hover:bg-indigo-50/30 cursor-pointer transition-colors",
@@ -2349,7 +2391,7 @@ var CollectionBacklinksView_default = /* @__PURE__ */ defineComponent({
2349
2391
  class: "px-4 py-2 align-middle font-medium"
2350
2392
  }, [createElementVNode("span", { class: normalizeClass(cellIdx === 0 ? "text-indigo-600 group-hover:text-indigo-800 font-bold" : "") }, toDisplayString(cell), 3)]);
2351
2393
  }), 128))], 40, _hoisted_5$10);
2352
- }), 128))])])], 8, _hoisted_1$12)) : (openBlock(), createElementBlock("span", {
2394
+ }), 128))])])], 8, _hoisted_1$13)) : (openBlock(), createElementBlock("span", {
2353
2395
  key: 1,
2354
2396
  class: "text-slate-400 italic",
2355
2397
  "data-testid": `collections-backlinks-${__props.fieldKey}`
@@ -2359,14 +2401,14 @@ var CollectionBacklinksView_default = /* @__PURE__ */ defineComponent({
2359
2401
  });
2360
2402
  //#endregion
2361
2403
  //#region src/vue/components/CollectionEmbedView.vue?vue&type=script&setup=true&lang.ts
2362
- var _hoisted_1$11 = [
2404
+ var _hoisted_1$12 = [
2363
2405
  "href",
2364
2406
  "tabindex",
2365
2407
  "data-testid"
2366
2408
  ];
2367
- var _hoisted_2$10 = { class: "flex items-center justify-between text-[10px] font-bold text-indigo-600/90 tracking-wider uppercase" };
2368
- var _hoisted_3$10 = { class: "flex items-center gap-1.5" };
2369
- var _hoisted_4$10 = { class: "bg-indigo-100/60 text-indigo-700 px-1.5 py-0.5 rounded font-mono font-medium lowercase" };
2409
+ var _hoisted_2$11 = { class: "flex items-center justify-between text-[10px] font-bold text-indigo-600/90 tracking-wider uppercase" };
2410
+ var _hoisted_3$11 = { class: "flex items-center gap-1.5" };
2411
+ var _hoisted_4$11 = { class: "bg-indigo-100/60 text-indigo-700 px-1.5 py-0.5 rounded font-mono font-medium lowercase" };
2370
2412
  var _hoisted_5$9 = { class: "grid gap-x-4 gap-y-3 grid-cols-2" };
2371
2413
  var _hoisted_6$8 = { class: "text-[10px] font-semibold text-slate-400 uppercase tracking-wide" };
2372
2414
  var _hoisted_7$7 = ["data-testid"];
@@ -2412,7 +2454,7 @@ var CollectionEmbedView_default = /* @__PURE__ */ defineComponent({
2412
2454
  onKeydown: [_cache[1] || (_cache[1] = withKeys(($event) => unref(activateRefLink)($event, __props.view.targetSlug, __props.view.recordId), ["enter"])), _cache[2] || (_cache[2] = withKeys(($event) => unref(activateRefLink)($event, __props.view.targetSlug, __props.view.recordId), ["space"]))]
2413
2455
  }, [
2414
2456
  _cache[7] || (_cache[7] = createElementVNode("div", { class: "absolute left-0 top-0 bottom-0 w-1 bg-indigo-500 rounded-l-xl transition-all duration-300 group-hover:w-1.5 group-hover:bg-indigo-600" }, null, -1)),
2415
- createElementVNode("div", _hoisted_2$10, [createElementVNode("div", _hoisted_3$10, [_cache[6] || (_cache[6] = createElementVNode("span", { class: "material-icons text-sm" }, "link", -1)), createElementVNode("span", null, toDisplayString(__props.view.targetSlug), 1)]), createElementVNode("span", _hoisted_4$10, toDisplayString(__props.view.recordId), 1)]),
2457
+ createElementVNode("div", _hoisted_2$11, [createElementVNode("div", _hoisted_3$11, [_cache[6] || (_cache[6] = createElementVNode("span", { class: "material-icons text-sm" }, "link", -1)), createElementVNode("span", null, toDisplayString(__props.view.targetSlug), 1)]), createElementVNode("span", _hoisted_4$11, toDisplayString(__props.view.recordId), 1)]),
2416
2458
  createElementVNode("div", _hoisted_5$9, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.view.rows, (row) => {
2417
2459
  return openBlock(), createElementBlock("div", {
2418
2460
  key: row.key,
@@ -2422,7 +2464,7 @@ var CollectionEmbedView_default = /* @__PURE__ */ defineComponent({
2422
2464
  "data-testid": `collections-embed-${__props.fieldKey}-${row.key}`
2423
2465
  }, [row.type === "boolean" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [row.value === true ? (openBlock(), createElementBlock("span", _hoisted_8$7, "check_circle")) : (openBlock(), createElementBlock("span", _hoisted_9$7, "—"))], 64)) : row.type === "markdown" ? (openBlock(), createElementBlock("p", _hoisted_10$7, toDisplayString(row.display), 1)) : (openBlock(), createElementBlock("span", _hoisted_11$7, toDisplayString(row.display), 1))], 8, _hoisted_7$7)]);
2424
2466
  }), 128))])
2425
- ], 40, _hoisted_1$11)) : (openBlock(), createElementBlock("div", {
2467
+ ], 40, _hoisted_1$12)) : (openBlock(), createElementBlock("div", {
2426
2468
  key: 1,
2427
2469
  class: "relative rounded-xl border border-red-100 bg-red-50/30 p-4 pl-5 shadow-sm",
2428
2470
  "data-testid": `collections-embed-${__props.fieldKey}`
@@ -2450,10 +2492,10 @@ var CollectionEmbedView_default = /* @__PURE__ */ defineComponent({
2450
2492
  });
2451
2493
  //#endregion
2452
2494
  //#region src/vue/components/CollectionRecordPanel.vue?vue&type=script&setup=true&lang.ts
2453
- var _hoisted_1$10 = { class: "flex items-center gap-2 mb-4" };
2454
- var _hoisted_2$9 = { class: "flex-1 min-w-0" };
2455
- var _hoisted_3$9 = { class: "block text-[9px] font-bold text-slate-400 uppercase tracking-wider" };
2456
- var _hoisted_4$9 = ["data-testid"];
2495
+ var _hoisted_1$11 = { class: "flex items-center gap-2 mb-4" };
2496
+ var _hoisted_2$10 = { class: "flex-1 min-w-0" };
2497
+ var _hoisted_3$10 = { class: "block text-[9px] font-bold text-slate-400 uppercase tracking-wider" };
2498
+ var _hoisted_4$10 = ["data-testid"];
2457
2499
  var _hoisted_5$8 = ["disabled"];
2458
2500
  var _hoisted_6$7 = {
2459
2501
  key: 1,
@@ -2831,10 +2873,10 @@ var CollectionRecordPanel_default = /* @__PURE__ */ defineComponent({
2831
2873
  onSubmit: _cache[5] || (_cache[5] = withModifiers(($event) => emit("submit"), ["prevent"]))
2832
2874
  }, {
2833
2875
  default: withCtx(() => [
2834
- createElementVNode("div", _hoisted_1$10, [createElementVNode("div", _hoisted_2$9, [createElementVNode("span", _hoisted_3$9, toDisplayString(__props.collection.title), 1), createElementVNode("h2", {
2876
+ createElementVNode("div", _hoisted_1$11, [createElementVNode("div", _hoisted_2$10, [createElementVNode("span", _hoisted_3$10, toDisplayString(__props.collection.title), 1), createElementVNode("h2", {
2835
2877
  class: "text-base font-bold text-slate-800 truncate",
2836
2878
  "data-testid": editing.value ? "collections-edit-title" : "collections-detail-title"
2837
- }, toDisplayString(headerTitle.value), 9, _hoisted_4$9)]), editing.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("button", {
2879
+ }, toDisplayString(headerTitle.value), 9, _hoisted_4$10)]), editing.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("button", {
2838
2880
  type: "button",
2839
2881
  class: "h-8 px-2.5 rounded text-xs font-bold text-slate-500 hover:bg-slate-200/50 transition-colors",
2840
2882
  "data-testid": "collections-editor-cancel",
@@ -3143,13 +3185,13 @@ var CollectionRecordPanel_default = /* @__PURE__ */ defineComponent({
3143
3185
  });
3144
3186
  //#endregion
3145
3187
  //#region src/vue/components/CollectionViewConfigModal.vue?vue&type=script&setup=true&lang.ts
3146
- var _hoisted_1$9 = {
3188
+ var _hoisted_1$10 = {
3147
3189
  "data-testid": "collection-config-modal",
3148
3190
  class: "flex flex-col overflow-hidden"
3149
3191
  };
3150
- var _hoisted_2$8 = { class: "flex items-center justify-between gap-2 border-b border-slate-100 px-5 py-3" };
3151
- var _hoisted_3$8 = { class: "text-sm font-bold text-slate-700" };
3152
- var _hoisted_4$8 = ["title", "aria-label"];
3192
+ var _hoisted_2$9 = { class: "flex items-center justify-between gap-2 border-b border-slate-100 px-5 py-3" };
3193
+ var _hoisted_3$9 = { class: "text-sm font-bold text-slate-700" };
3194
+ var _hoisted_4$9 = ["title", "aria-label"];
3153
3195
  var _hoisted_5$7 = { class: "overflow-y-auto px-5 py-4" };
3154
3196
  var _hoisted_6$6 = { class: "mb-2 text-[10px] font-bold uppercase tracking-wider text-slate-400" };
3155
3197
  var _hoisted_7$5 = {
@@ -3215,14 +3257,14 @@ var CollectionViewConfigModal_default = /* @__PURE__ */ defineComponent({
3215
3257
  }
3216
3258
  return (_ctx, _cache) => {
3217
3259
  return openBlock(), createBlock(CollectionRecordModal_default, { onClose: _cache[1] || (_cache[1] = ($event) => emit("close")) }, {
3218
- default: withCtx(() => [createElementVNode("div", _hoisted_1$9, [createElementVNode("header", _hoisted_2$8, [createElementVNode("h2", _hoisted_3$8, toDisplayString(unref(t)("collectionsView.config.title", { title: __props.title })), 1), createElementVNode("button", {
3260
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$10, [createElementVNode("header", _hoisted_2$9, [createElementVNode("h2", _hoisted_3$9, toDisplayString(unref(t)("collectionsView.config.title", { title: __props.title })), 1), createElementVNode("button", {
3219
3261
  type: "button",
3220
3262
  class: "h-8 w-8 flex items-center justify-center rounded text-slate-400 hover:bg-slate-50 hover:text-slate-600",
3221
3263
  title: unref(t)("common.close"),
3222
3264
  "aria-label": unref(t)("common.close"),
3223
3265
  "data-testid": "collection-config-close",
3224
3266
  onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
3225
- }, [..._cache[2] || (_cache[2] = [createElementVNode("span", { class: "material-icons text-sm" }, "close", -1)])], 8, _hoisted_4$8)]), createElementVNode("div", _hoisted_5$7, [
3267
+ }, [..._cache[2] || (_cache[2] = [createElementVNode("span", { class: "material-icons text-sm" }, "close", -1)])], 8, _hoisted_4$9)]), createElementVNode("div", _hoisted_5$7, [
3226
3268
  createElementVNode("h3", _hoisted_6$6, toDisplayString(unref(t)("collectionsView.config.viewsHeading")), 1),
3227
3269
  error.value ? (openBlock(), createElementBlock("p", _hoisted_7$5, toDisplayString(error.value), 1)) : createCommentVNode("", true),
3228
3270
  __props.views.length > 0 ? (openBlock(), createElementBlock("ul", _hoisted_8$5, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.views, (view) => {
@@ -3251,19 +3293,19 @@ var CollectionViewConfigModal_default = /* @__PURE__ */ defineComponent({
3251
3293
  });
3252
3294
  //#endregion
3253
3295
  //#region src/vue/components/CollectionCustomView.vue?vue&type=script&setup=true&lang.ts
3254
- var _hoisted_1$8 = { class: "custom-view-container" };
3255
- var _hoisted_2$7 = {
3296
+ var _hoisted_1$9 = { class: "custom-view-container" };
3297
+ var _hoisted_2$8 = {
3256
3298
  key: 0,
3257
3299
  class: "custom-view-message",
3258
3300
  role: "alert",
3259
3301
  "data-testid": "collection-custom-view-error"
3260
3302
  };
3261
- var _hoisted_3$7 = {
3303
+ var _hoisted_3$8 = {
3262
3304
  key: 1,
3263
3305
  class: "custom-view-message",
3264
3306
  "data-testid": "collection-custom-view-loading"
3265
3307
  };
3266
- var _hoisted_4$7 = ["title", "srcdoc"];
3308
+ var _hoisted_4$8 = ["title", "srcdoc"];
3267
3309
  var REMINT_LEAD_MS = 6e4;
3268
3310
  var MIN_REMINT_DELAY_MS = 1e4;
3269
3311
  var CollectionCustomView_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
@@ -3385,7 +3427,7 @@ var CollectionCustomView_vue_vue_type_script_setup_true_lang_default = /*@__PURE
3385
3427
  window.removeEventListener("message", onWindowMessage);
3386
3428
  });
3387
3429
  return (_ctx, _cache) => {
3388
- return openBlock(), createElementBlock("div", _hoisted_1$8, [error.value ? (openBlock(), createElementBlock("div", _hoisted_2$7, toDisplayString(unref(t)("collectionsView.customViewError", { error: error.value })), 1)) : loading.value ? (openBlock(), createElementBlock("div", _hoisted_3$7, toDisplayString(unref(t)("collectionsView.customViewLoading")), 1)) : srcdoc.value ? (openBlock(), createElementBlock("iframe", {
3430
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [error.value ? (openBlock(), createElementBlock("div", _hoisted_2$8, toDisplayString(unref(t)("collectionsView.customViewError", { error: error.value })), 1)) : loading.value ? (openBlock(), createElementBlock("div", _hoisted_3$8, toDisplayString(unref(t)("collectionsView.customViewLoading")), 1)) : srcdoc.value ? (openBlock(), createElementBlock("iframe", {
3389
3431
  ref_key: "iframeEl",
3390
3432
  ref: iframeEl,
3391
3433
  key: __props.view.id,
@@ -3394,7 +3436,7 @@ var CollectionCustomView_vue_vue_type_script_setup_true_lang_default = /*@__PURE
3394
3436
  srcdoc: srcdoc.value,
3395
3437
  sandbox: "allow-scripts allow-popups allow-popups-to-escape-sandbox allow-downloads",
3396
3438
  class: "w-full h-full border-0"
3397
- }, null, 8, _hoisted_4$7)) : createCommentVNode("", true)]);
3439
+ }, null, 8, _hoisted_4$8)) : createCommentVNode("", true)]);
3398
3440
  };
3399
3441
  }
3400
3442
  });
@@ -3410,22 +3452,22 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
3410
3452
  var CollectionCustomView_default = /*#__PURE__*/ _plugin_vue_export_helper_default(CollectionCustomView_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-02ff1e01"]]);
3411
3453
  //#endregion
3412
3454
  //#region src/vue/components/CollectionRemoteViewPreview.vue?vue&type=script&setup=true&lang.ts
3413
- var _hoisted_1$7 = {
3455
+ var _hoisted_1$8 = {
3414
3456
  class: "remote-preview-container",
3415
3457
  "data-testid": "collection-remote-view-preview"
3416
3458
  };
3417
- var _hoisted_2$6 = {
3459
+ var _hoisted_2$7 = {
3418
3460
  key: 0,
3419
3461
  class: "remote-preview-message",
3420
3462
  role: "alert",
3421
3463
  "data-testid": "collection-remote-view-error"
3422
3464
  };
3423
- var _hoisted_3$6 = {
3465
+ var _hoisted_3$7 = {
3424
3466
  key: 1,
3425
3467
  class: "remote-preview-message",
3426
3468
  "data-testid": "collection-remote-view-loading"
3427
3469
  };
3428
- var _hoisted_4$6 = { class: "phone-frame" };
3470
+ var _hoisted_4$7 = { class: "phone-frame" };
3429
3471
  var _hoisted_5$6 = ["title", "srcdoc"];
3430
3472
  var _hoisted_6$5 = {
3431
3473
  class: "remote-preview-caption",
@@ -3522,7 +3564,7 @@ var CollectionRemoteViewPreview_default = /*#__PURE__*/ _plugin_vue_export_helpe
3522
3564
  onMounted(() => window.addEventListener("message", onWindowMessage));
3523
3565
  onBeforeUnmount(() => window.removeEventListener("message", onWindowMessage));
3524
3566
  return (_ctx, _cache) => {
3525
- return openBlock(), createElementBlock("div", _hoisted_1$7, [error.value ? (openBlock(), createElementBlock("div", _hoisted_2$6, toDisplayString(unref(t)("collectionsView.customViewError", { error: error.value })), 1)) : loading.value ? (openBlock(), createElementBlock("div", _hoisted_3$6, toDisplayString(unref(t)("collectionsView.customViewLoading")), 1)) : srcdoc.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createElementVNode("div", _hoisted_4$6, [(openBlock(), createElementBlock("iframe", {
3567
+ return openBlock(), createElementBlock("div", _hoisted_1$8, [error.value ? (openBlock(), createElementBlock("div", _hoisted_2$7, toDisplayString(unref(t)("collectionsView.customViewError", { error: error.value })), 1)) : loading.value ? (openBlock(), createElementBlock("div", _hoisted_3$7, toDisplayString(unref(t)("collectionsView.customViewLoading")), 1)) : srcdoc.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createElementVNode("div", _hoisted_4$7, [(openBlock(), createElementBlock("iframe", {
3526
3568
  ref_key: "iframeEl",
3527
3569
  ref: iframeEl,
3528
3570
  key: __props.view.id,
@@ -3649,7 +3691,7 @@ function resolveEmbed(field, record, embedCache) {
3649
3691
  schema: null,
3650
3692
  item: null
3651
3693
  };
3652
- const item = data.items.find((entry) => String(entry[data.schema.primaryKey] ?? "") === targetId) ?? null;
3694
+ const item = data.items.find((entry) => fieldText(entry[data.schema.primaryKey]) === targetId) ?? null;
3653
3695
  return {
3654
3696
  schema: data.schema,
3655
3697
  item
@@ -3731,8 +3773,8 @@ function buildBacklinksViews(schema, embedCache, record, locale) {
3731
3773
  out[key] = {
3732
3774
  found: true,
3733
3775
  columns,
3734
- rows: backlinkRows(field, String(record?.[schema.primaryKey] ?? ""), derivedSourceItems(embedCache, field.from) ?? []).map((row) => ({
3735
- id: String(row[data.schema.primaryKey] ?? ""),
3776
+ rows: backlinkRows(field, fieldText(record?.[schema.primaryKey]), derivedSourceItems(embedCache, field.from) ?? []).map((row) => ({
3777
+ id: fieldText(row[data.schema.primaryKey]),
3736
3778
  cells: columns.map((column) => formatBacklinkCell(data.schema.fields[column.key], row[column.key], row, locale))
3737
3779
  })),
3738
3780
  fromSlug: field.from
@@ -3765,7 +3807,7 @@ function rollupValueFor(field, record, schema, embedCache) {
3765
3807
  if (field.type !== "rollup" || !schema || !record) return null;
3766
3808
  const items = derivedSourceItems(embedCache, field.from);
3767
3809
  if (items === null) return null;
3768
- return rollupValue(field, String(record[schema.primaryKey] ?? ""), items);
3810
+ return rollupValue(field, fieldText(record[schema.primaryKey]), items);
3769
3811
  }
3770
3812
  /** Display string for a rollup cell: the aggregate as a plain number,
3771
3813
  * em-dash when the source collection couldn't be resolved. */
@@ -3963,13 +4005,13 @@ function writeCollectionFlagFilters(slug, filters) {
3963
4005
  }
3964
4006
  //#endregion
3965
4007
  //#region src/vue/components/CollectionView.vue?vue&type=script&setup=true&lang.ts
3966
- var _hoisted_1$6 = { class: "h-full flex flex-col bg-slate-50/30" };
3967
- var _hoisted_2$5 = {
4008
+ var _hoisted_1$7 = { class: "h-full flex flex-col bg-slate-50/30" };
4009
+ var _hoisted_2$6 = {
3968
4010
  key: 0,
3969
4011
  class: "flex items-center gap-3 px-6 py-2 border-b border-slate-200 bg-white"
3970
4012
  };
3971
- var _hoisted_3$5 = ["title", "aria-label"];
3972
- var _hoisted_4$5 = {
4013
+ var _hoisted_3$6 = ["title", "aria-label"];
4014
+ var _hoisted_4$6 = {
3973
4015
  key: 1,
3974
4016
  class: "h-9 w-9 flex items-center justify-center rounded-xl bg-indigo-50 text-indigo-600 border border-indigo-100"
3975
4017
  };
@@ -5574,8 +5616,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
5574
5616
  openDay.value = viewing.value ? dayOfItem(viewing.value) : null;
5575
5617
  });
5576
5618
  return (_ctx, _cache) => {
5577
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
5578
- !__props.hideHeader ? (openBlock(), createElementBlock("header", _hoisted_2$5, [
5619
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [
5620
+ !__props.hideHeader ? (openBlock(), createElementBlock("header", _hoisted_2$6, [
5579
5621
  !embedded.value ? (openBlock(), createElementBlock("button", {
5580
5622
  key: 0,
5581
5623
  type: "button",
@@ -5584,8 +5626,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
5584
5626
  "aria-label": unref(t)("collectionsView.backToIndex"),
5585
5627
  "data-testid": "collections-back",
5586
5628
  onClick: goBack
5587
- }, [..._cache[28] || (_cache[28] = [createElementVNode("span", { class: "material-icons text-lg" }, "arrow_back", -1)])], 8, _hoisted_3$5)) : createCommentVNode("", true),
5588
- collection.value ? (openBlock(), createElementBlock("div", _hoisted_4$5, [createElementVNode("span", _hoisted_5$5, toDisplayString(collection.value.icon), 1)])) : createCommentVNode("", true),
5629
+ }, [..._cache[28] || (_cache[28] = [createElementVNode("span", { class: "material-icons text-lg" }, "arrow_back", -1)])], 8, _hoisted_3$6)) : createCommentVNode("", true),
5630
+ collection.value ? (openBlock(), createElementBlock("div", _hoisted_4$6, [createElementVNode("span", _hoisted_5$5, toDisplayString(collection.value.icon), 1)])) : createCommentVNode("", true),
5589
5631
  createElementVNode("div", _hoisted_6$4, [createElementVNode("h1", _hoisted_7$4, toDisplayString(collection.value?.title ?? unref(t)("collectionsView.title")), 1), collection.value ? (openBlock(), createElementBlock("span", _hoisted_8$4, [createTextVNode(toDisplayString(collection.value.slug) + " ", 1), isReadOnly.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("span", _hoisted_9$4, [_cache[29] || (_cache[29] = createElementVNode("span", { class: "material-icons text-[11px]" }, "lock", -1)), createTextVNode(" " + toDisplayString(unref(t)("collectionsView.readonlyChip")), 1)]), dataSourceRoute.value ? (openBlock(), createElementBlock("a", {
5590
5632
  key: 0,
5591
5633
  href: dataSourceRoute.value ?? void 0,
@@ -6202,7 +6244,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
6202
6244
  });
6203
6245
  //#endregion
6204
6246
  //#region src/vue/chat/View.vue?vue&type=script&setup=true&lang.ts
6205
- var _hoisted_1$5 = {
6247
+ var _hoisted_1$6 = {
6206
6248
  class: "w-full h-full",
6207
6249
  "data-testid": "present-collection"
6208
6250
  };
@@ -6254,7 +6296,7 @@ var View_default = /* @__PURE__ */ defineComponent({
6254
6296
  });
6255
6297
  }
6256
6298
  return (_ctx, _cache) => {
6257
- return openBlock(), createElementBlock("div", _hoisted_1$5, [slug.value ? (openBlock(), createBlock(CollectionView_default, {
6299
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [slug.value ? (openBlock(), createBlock(CollectionView_default, {
6258
6300
  key: 0,
6259
6301
  slug: slug.value,
6260
6302
  selected: selected.value,
@@ -6277,10 +6319,10 @@ var View_default = /* @__PURE__ */ defineComponent({
6277
6319
  });
6278
6320
  //#endregion
6279
6321
  //#region src/vue/chat/Preview.vue?vue&type=script&setup=true&lang.ts
6280
- var _hoisted_1$4 = { class: "w-full h-full flex flex-col items-center justify-center p-4 bg-gradient-to-br from-indigo-50 to-slate-50 rounded-lg border-2 border-gray-200" };
6281
- var _hoisted_2$4 = { class: "text-center" };
6282
- var _hoisted_3$4 = { class: "text-gray-900 font-bold text-lg mb-1 line-clamp-2" };
6283
- var _hoisted_4$4 = {
6322
+ var _hoisted_1$5 = { class: "w-full h-full flex flex-col items-center justify-center p-4 bg-gradient-to-br from-indigo-50 to-slate-50 rounded-lg border-2 border-gray-200" };
6323
+ var _hoisted_2$5 = { class: "text-center" };
6324
+ var _hoisted_3$5 = { class: "text-gray-900 font-bold text-lg mb-1 line-clamp-2" };
6325
+ var _hoisted_4$5 = {
6284
6326
  key: 0,
6285
6327
  class: "text-gray-600 text-sm"
6286
6328
  };
@@ -6300,26 +6342,26 @@ var Preview_default = /* @__PURE__ */ defineComponent({
6300
6342
  const collectionSlug = computed(() => data.value?.collectionSlug ?? "");
6301
6343
  const itemId = computed(() => data.value?.itemId);
6302
6344
  return (_ctx, _cache) => {
6303
- return openBlock(), createElementBlock("div", _hoisted_1$4, [createElementVNode("div", _hoisted_2$4, [
6345
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [createElementVNode("div", _hoisted_2$5, [
6304
6346
  _cache[0] || (_cache[0] = createElementVNode("span", { class: "material-icons text-4xl text-indigo-600 mb-2" }, "collections_bookmark", -1)),
6305
- createElementVNode("h3", _hoisted_3$4, toDisplayString(collectionSlug.value || unref(t)("pluginPresentCollection.fallbackTitle")), 1),
6306
- itemId.value ? (openBlock(), createElementBlock("p", _hoisted_4$4, toDisplayString(unref(t)("pluginPresentCollection.itemLabel", { id: itemId.value })), 1)) : (openBlock(), createElementBlock("p", _hoisted_5$4, toDisplayString(unref(t)("pluginPresentCollection.listLabel")), 1))
6347
+ createElementVNode("h3", _hoisted_3$5, toDisplayString(collectionSlug.value || unref(t)("pluginPresentCollection.fallbackTitle")), 1),
6348
+ itemId.value ? (openBlock(), createElementBlock("p", _hoisted_4$5, toDisplayString(unref(t)("pluginPresentCollection.itemLabel", { id: itemId.value })), 1)) : (openBlock(), createElementBlock("p", _hoisted_5$4, toDisplayString(unref(t)("pluginPresentCollection.listLabel")), 1))
6307
6349
  ])]);
6308
6350
  };
6309
6351
  }
6310
6352
  });
6311
6353
  //#endregion
6312
6354
  //#region src/vue/components/DiscoverPanel.vue?vue&type=script&setup=true&lang.ts
6313
- var _hoisted_1$3 = { "data-testid": "discover-panel" };
6314
- var _hoisted_2$3 = {
6355
+ var _hoisted_1$4 = { "data-testid": "discover-panel" };
6356
+ var _hoisted_2$4 = {
6315
6357
  key: 0,
6316
6358
  class: "flex flex-col items-center justify-center py-20 text-sm text-slate-500 gap-3"
6317
6359
  };
6318
- var _hoisted_3$3 = {
6360
+ var _hoisted_3$4 = {
6319
6361
  key: 1,
6320
6362
  class: "rounded-xl border border-red-200 bg-red-50/50 p-4 text-sm text-red-800 shadow-sm flex items-center gap-3"
6321
6363
  };
6322
- var _hoisted_4$3 = {
6364
+ var _hoisted_4$4 = {
6323
6365
  key: 2,
6324
6366
  class: "rounded-xl border border-slate-200 bg-white px-6 py-12 text-center text-sm text-slate-500 shadow-sm"
6325
6367
  };
@@ -6429,7 +6471,7 @@ var DiscoverPanel_default = /* @__PURE__ */ defineComponent({
6429
6471
  }
6430
6472
  onMounted(load);
6431
6473
  return (_ctx, _cache) => {
6432
- return openBlock(), createElementBlock("div", _hoisted_1$3, [loading.value ? (openBlock(), createElementBlock("div", _hoisted_2$3, [_cache[0] || (_cache[0] = createElementVNode("div", { class: "h-8 w-8 border-2 border-teal-600/20 border-t-teal-600 rounded-full animate-spin" }, null, -1)), createElementVNode("span", null, toDisplayString(unref(t)("common.loading")), 1)])) : loadError.value ? (openBlock(), createElementBlock("div", _hoisted_3$3, [_cache[1] || (_cache[1] = createElementVNode("span", { class: "material-icons text-red-600" }, "error", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.discover.loadFailed")) + ": " + toDisplayString(loadError.value), 1)])) : entries.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_4$3, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "material-icons text-4xl text-slate-300 mb-2" }, "travel_explore", -1)), createElementVNode("p", _hoisted_5$3, toDisplayString(unref(t)("collectionsView.discover.empty")), 1)])) : (openBlock(), createElementBlock("div", _hoisted_6$3, [(openBlock(true), createElementBlock(Fragment, null, renderList(entries.value, (entry) => {
6474
+ return openBlock(), createElementBlock("div", _hoisted_1$4, [loading.value ? (openBlock(), createElementBlock("div", _hoisted_2$4, [_cache[0] || (_cache[0] = createElementVNode("div", { class: "h-8 w-8 border-2 border-teal-600/20 border-t-teal-600 rounded-full animate-spin" }, null, -1)), createElementVNode("span", null, toDisplayString(unref(t)("common.loading")), 1)])) : loadError.value ? (openBlock(), createElementBlock("div", _hoisted_3$4, [_cache[1] || (_cache[1] = createElementVNode("span", { class: "material-icons text-red-600" }, "error", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.discover.loadFailed")) + ": " + toDisplayString(loadError.value), 1)])) : entries.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_4$4, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "material-icons text-4xl text-slate-300 mb-2" }, "travel_explore", -1)), createElementVNode("p", _hoisted_5$3, toDisplayString(unref(t)("collectionsView.discover.empty")), 1)])) : (openBlock(), createElementBlock("div", _hoisted_6$3, [(openBlock(true), createElementBlock(Fragment, null, renderList(entries.value, (entry) => {
6433
6475
  return openBlock(), createElementBlock("div", {
6434
6476
  key: entryKey(entry),
6435
6477
  class: "relative rounded-xl border border-slate-200 bg-white p-5 shadow-sm flex flex-col gap-3",
@@ -6476,6 +6518,165 @@ var DiscoverPanel_default = /* @__PURE__ */ defineComponent({
6476
6518
  }
6477
6519
  });
6478
6520
  //#endregion
6521
+ //#region src/vue/components/CollectionOntologyGraphView.vue?vue&type=script&setup=true&lang.ts
6522
+ var _hoisted_1$3 = {
6523
+ class: "rounded-xl border border-slate-200 bg-white shadow-sm overflow-hidden",
6524
+ "data-testid": "collections-map-panel"
6525
+ };
6526
+ var _hoisted_2$3 = {
6527
+ key: 0,
6528
+ class: "flex flex-col items-center justify-center py-20 text-sm text-slate-500 gap-3"
6529
+ };
6530
+ var _hoisted_3$3 = {
6531
+ key: 1,
6532
+ class: "flex items-center gap-3 p-4 text-sm text-red-800"
6533
+ };
6534
+ var _hoisted_4$3 = {
6535
+ key: 2,
6536
+ class: "px-6 py-12 text-center text-sm text-slate-500",
6537
+ "data-testid": "collections-map-empty"
6538
+ };
6539
+ //#endregion
6540
+ //#region src/vue/components/CollectionOntologyGraphView.vue
6541
+ var CollectionOntologyGraphView_default = /* @__PURE__ */ defineComponent({
6542
+ __name: "CollectionOntologyGraphView",
6543
+ emits: ["open"],
6544
+ setup(__props, { emit: __emit }) {
6545
+ const emit = __emit;
6546
+ const { t } = useCollectionI18n();
6547
+ const cui = collectionUi();
6548
+ const container = ref(null);
6549
+ const loading = ref(true);
6550
+ const loadError = ref(false);
6551
+ const graph = ref({
6552
+ nodes: [],
6553
+ edges: []
6554
+ });
6555
+ let instance = null;
6556
+ const nodeSize = (node) => node.missing ? 14 : Math.min(40, 20 + Math.round(Math.log2((node.recordCount ?? 0) + 1) * 4));
6557
+ const nodeItem = (node) => ({
6558
+ id: node.slug,
6559
+ name: node.title,
6560
+ symbolSize: nodeSize(node),
6561
+ itemStyle: node.missing ? {
6562
+ color: "#e2e8f0",
6563
+ borderColor: "#94a3b8",
6564
+ borderType: "dashed",
6565
+ borderWidth: 1
6566
+ } : { color: "#4f46e5" },
6567
+ label: node.missing ? { color: "#94a3b8" } : void 0,
6568
+ missing: node.missing === true,
6569
+ recordCount: node.recordCount
6570
+ });
6571
+ const edgeItem = (edge) => ({
6572
+ source: edge.from,
6573
+ target: edge.to,
6574
+ lineStyle: edge.kind === "ref" ? void 0 : { type: "dashed" },
6575
+ label: {
6576
+ show: true,
6577
+ formatter: edge.field,
6578
+ fontSize: 9,
6579
+ color: "#64748b"
6580
+ },
6581
+ field: edge.field,
6582
+ kind: edge.kind,
6583
+ reverseFields: edge.reverseFields
6584
+ });
6585
+ const nodeTooltip = (data) => {
6586
+ if (data.missing) return `<b>${escapeHtml(data.id)}</b><br>${escapeHtml(t("collectionsView.mapMissingHint"))}`;
6587
+ const count = data.recordCount === null ? t("collectionsView.mapRecordCountUnknown") : t("collectionsView.mapRecordCount", { count: data.recordCount });
6588
+ return `<b>${escapeHtml(data.name)}</b><br>${escapeHtml(data.id)} · ${escapeHtml(count)}`;
6589
+ };
6590
+ const edgeTooltip = (data) => {
6591
+ const reverse = data.reverseFields?.length ? ` ⇄ ${data.reverseFields.join(", ")}` : "";
6592
+ return `${escapeHtml(data.source)} —${escapeHtml(data.field)}→ ${escapeHtml(data.target)}<br><span style="color:#64748b">${escapeHtml(data.kind)}${escapeHtml(reverse)}</span>`;
6593
+ };
6594
+ const tooltipFormatter = (params) => {
6595
+ const { dataType, data } = params;
6596
+ return dataType === "edge" ? edgeTooltip(data) : nodeTooltip(data);
6597
+ };
6598
+ const buildOption = (value) => ({
6599
+ tooltip: {
6600
+ show: true,
6601
+ formatter: tooltipFormatter
6602
+ },
6603
+ series: [{
6604
+ type: "graph",
6605
+ layout: "force",
6606
+ roam: true,
6607
+ draggable: true,
6608
+ label: {
6609
+ show: true,
6610
+ position: "right",
6611
+ fontSize: 11
6612
+ },
6613
+ force: {
6614
+ repulsion: 180,
6615
+ edgeLength: 120,
6616
+ gravity: .08
6617
+ },
6618
+ emphasis: { focus: "adjacency" },
6619
+ lineStyle: {
6620
+ color: "#cbd5e1",
6621
+ width: 1.5,
6622
+ curveness: .1
6623
+ },
6624
+ edgeSymbol: ["none", "arrow"],
6625
+ edgeSymbolSize: 7,
6626
+ data: value.nodes.map(nodeItem),
6627
+ links: value.edges.map(edgeItem)
6628
+ }]
6629
+ });
6630
+ const render = () => {
6631
+ const element = container.value;
6632
+ if (!element) return;
6633
+ if (!instance) {
6634
+ instance = echarts.init(element);
6635
+ instance.on("click", (params) => {
6636
+ if (params.dataType !== "node") return;
6637
+ const data = params.data;
6638
+ if (typeof data?.id === "string" && data.missing !== true) emit("open", data.id);
6639
+ });
6640
+ }
6641
+ instance.setOption(buildOption(graph.value), true);
6642
+ };
6643
+ const load = async () => {
6644
+ loading.value = true;
6645
+ loadError.value = false;
6646
+ const result = await cui.fetchOntology?.();
6647
+ loading.value = false;
6648
+ if (!result?.ok) {
6649
+ loadError.value = true;
6650
+ return;
6651
+ }
6652
+ graph.value = buildOntologyGraph(result.data.entries);
6653
+ await nextTick();
6654
+ render();
6655
+ };
6656
+ const handleResize = () => {
6657
+ instance?.resize();
6658
+ };
6659
+ onMounted(() => {
6660
+ load();
6661
+ window.addEventListener("resize", handleResize);
6662
+ });
6663
+ onBeforeUnmount(() => {
6664
+ window.removeEventListener("resize", handleResize);
6665
+ instance?.dispose();
6666
+ instance = null;
6667
+ });
6668
+ return (_ctx, _cache) => {
6669
+ return openBlock(), createElementBlock("div", _hoisted_1$3, [loading.value ? (openBlock(), createElementBlock("div", _hoisted_2$3, [_cache[0] || (_cache[0] = createElementVNode("div", { class: "h-8 w-8 border-2 border-indigo-600/20 border-t-indigo-600 rounded-full animate-spin" }, null, -1)), createElementVNode("span", null, toDisplayString(unref(t)("common.loading")), 1)])) : loadError.value ? (openBlock(), createElementBlock("div", _hoisted_3$3, [_cache[1] || (_cache[1] = createElementVNode("span", { class: "material-icons text-red-600" }, "error", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.loadFailed")), 1)])) : graph.value.nodes.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_4$3, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "material-icons text-4xl text-slate-300 mb-2" }, "hub", -1)), createElementVNode("p", null, toDisplayString(unref(t)("collectionsView.mapEmpty")), 1)])) : (openBlock(), createElementBlock("div", {
6670
+ key: 3,
6671
+ ref_key: "container",
6672
+ ref: container,
6673
+ class: "w-full h-[32rem]",
6674
+ "data-testid": "collections-map-canvas"
6675
+ }, null, 512))]);
6676
+ };
6677
+ }
6678
+ });
6679
+ //#endregion
6479
6680
  //#region src/vue/starters.ts
6480
6681
  var COLLECTION_STARTERS = [
6481
6682
  {
@@ -6738,6 +6939,7 @@ var CollectionsIndexView_default = /* @__PURE__ */ defineComponent({
6738
6939
  const cui = collectionUi();
6739
6940
  const { pinToggle, reconcileShortcuts } = cui;
6740
6941
  const tab = ref("installed");
6942
+ const hasOntology = cui.fetchOntology !== void 0;
6741
6943
  const showNewCollectionModal = ref(false);
6742
6944
  const collections = ref([]);
6743
6945
  const loading = ref(true);
@@ -6792,31 +6994,44 @@ var CollectionsIndexView_default = /* @__PURE__ */ defineComponent({
6792
6994
  onMounted(loadCollections);
6793
6995
  return (_ctx, _cache) => {
6794
6996
  return openBlock(), createElementBlock("div", _hoisted_1$1, [createElementVNode("div", _hoisted_2$1, [
6795
- createElementVNode("div", _hoisted_3$1, [createElementVNode("div", _hoisted_4$1, [createElementVNode("h1", _hoisted_5$1, toDisplayString(unref(t)("collectionsView.title")), 1), createElementVNode("div", _hoisted_6$1, [createElementVNode("button", {
6796
- type: "button",
6797
- class: normalizeClass(["px-3 h-7 rounded-md text-xs font-semibold transition-colors", tab.value === "installed" ? "bg-white text-indigo-700 shadow-sm" : "text-slate-500 hover:text-slate-700"]),
6798
- "data-testid": "collections-tab-installed",
6799
- onClick: _cache[0] || (_cache[0] = ($event) => tab.value = "installed")
6800
- }, toDisplayString(unref(t)("collectionsView.discover.installedTab")), 3), createElementVNode("button", {
6801
- type: "button",
6802
- class: normalizeClass(["px-3 h-7 rounded-md text-xs font-semibold transition-colors", tab.value === "discover" ? "bg-white text-teal-700 shadow-sm" : "text-slate-500 hover:text-slate-700"]),
6803
- "data-testid": "collections-tab-discover",
6804
- onClick: _cache[1] || (_cache[1] = ($event) => tab.value = "discover")
6805
- }, toDisplayString(unref(t)("collectionsView.discover.tab")), 3)])]), tab.value === "installed" ? (openBlock(), createElementBlock("button", {
6997
+ createElementVNode("div", _hoisted_3$1, [createElementVNode("div", _hoisted_4$1, [createElementVNode("h1", _hoisted_5$1, toDisplayString(unref(t)("collectionsView.title")), 1), createElementVNode("div", _hoisted_6$1, [
6998
+ createElementVNode("button", {
6999
+ type: "button",
7000
+ class: normalizeClass(["px-3 h-7 rounded-md text-xs font-semibold transition-colors", tab.value === "installed" ? "bg-white text-indigo-700 shadow-sm" : "text-slate-500 hover:text-slate-700"]),
7001
+ "data-testid": "collections-tab-installed",
7002
+ onClick: _cache[0] || (_cache[0] = ($event) => tab.value = "installed")
7003
+ }, toDisplayString(unref(t)("collectionsView.discover.installedTab")), 3),
7004
+ createElementVNode("button", {
7005
+ type: "button",
7006
+ class: normalizeClass(["px-3 h-7 rounded-md text-xs font-semibold transition-colors", tab.value === "discover" ? "bg-white text-teal-700 shadow-sm" : "text-slate-500 hover:text-slate-700"]),
7007
+ "data-testid": "collections-tab-discover",
7008
+ onClick: _cache[1] || (_cache[1] = ($event) => tab.value = "discover")
7009
+ }, toDisplayString(unref(t)("collectionsView.discover.tab")), 3),
7010
+ hasOntology ? (openBlock(), createElementBlock("button", {
7011
+ key: 0,
7012
+ type: "button",
7013
+ class: normalizeClass(["px-3 h-7 rounded-md text-xs font-semibold transition-colors", tab.value === "map" ? "bg-white text-indigo-700 shadow-sm" : "text-slate-500 hover:text-slate-700"]),
7014
+ "data-testid": "collections-tab-map",
7015
+ onClick: _cache[2] || (_cache[2] = ($event) => tab.value = "map")
7016
+ }, toDisplayString(unref(t)("collectionsView.mapTab")), 3)) : createCommentVNode("", true)
7017
+ ])]), tab.value === "installed" ? (openBlock(), createElementBlock("button", {
6806
7018
  key: 0,
6807
7019
  type: "button",
6808
7020
  class: "h-8 px-2.5 flex items-center gap-1 rounded bg-indigo-600 hover:bg-indigo-700 text-white font-bold text-xs transition-colors shadow-sm",
6809
7021
  "data-testid": "collections-add-collection",
6810
- onClick: _cache[2] || (_cache[2] = ($event) => showNewCollectionModal.value = true)
6811
- }, [_cache[4] || (_cache[4] = createElementVNode("span", { class: "material-icons text-sm" }, "add", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.addCollectionLabel")), 1)])) : createCommentVNode("", true)]),
7022
+ onClick: _cache[3] || (_cache[3] = ($event) => showNewCollectionModal.value = true)
7023
+ }, [_cache[5] || (_cache[5] = createElementVNode("span", { class: "material-icons text-sm" }, "add", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.addCollectionLabel")), 1)])) : createCommentVNode("", true)]),
6812
7024
  showNewCollectionModal.value ? (openBlock(), createBlock(NewCollectionModal_default, {
6813
7025
  key: 0,
6814
- onClose: _cache[3] || (_cache[3] = ($event) => showNewCollectionModal.value = false)
7026
+ onClose: _cache[4] || (_cache[4] = ($event) => showNewCollectionModal.value = false)
6815
7027
  })) : createCommentVNode("", true),
6816
7028
  tab.value === "discover" ? (openBlock(), createBlock(DiscoverPanel_default, {
6817
7029
  key: 1,
6818
7030
  onImported: loadCollections
6819
- })) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [loading.value ? (openBlock(), createElementBlock("div", _hoisted_7$1, [_cache[5] || (_cache[5] = createElementVNode("div", { class: "h-8 w-8 border-2 border-indigo-600/20 border-t-indigo-600 rounded-full animate-spin" }, null, -1)), createElementVNode("span", null, toDisplayString(unref(t)("common.loading")), 1)])) : loadError.value ? (openBlock(), createElementBlock("div", _hoisted_8$1, [_cache[6] || (_cache[6] = createElementVNode("span", { class: "material-icons text-red-600" }, "error", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.loadFailed")) + ": " + toDisplayString(loadError.value), 1)])) : collections.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_9$1, [_cache[7] || (_cache[7] = createElementVNode("span", { class: "material-icons text-4xl text-slate-300 mb-2" }, "dashboard_customize", -1)), createElementVNode("p", _hoisted_10$1, toDisplayString(unref(t)("collectionsView.indexEmpty")), 1)])) : (openBlock(), createElementBlock("div", _hoisted_11$1, [hasReadonlyCollections.value ? (openBlock(), createElementBlock("div", _hoisted_12$1, [(openBlock(), createElementBlock(Fragment, null, renderList(FILTER_CHIPS, (chip) => {
7031
+ })) : tab.value === "map" ? (openBlock(), createBlock(CollectionOntologyGraphView_default, {
7032
+ key: 2,
7033
+ onOpen: openCollection
7034
+ })) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [loading.value ? (openBlock(), createElementBlock("div", _hoisted_7$1, [_cache[6] || (_cache[6] = createElementVNode("div", { class: "h-8 w-8 border-2 border-indigo-600/20 border-t-indigo-600 rounded-full animate-spin" }, null, -1)), createElementVNode("span", null, toDisplayString(unref(t)("common.loading")), 1)])) : loadError.value ? (openBlock(), createElementBlock("div", _hoisted_8$1, [_cache[7] || (_cache[7] = createElementVNode("span", { class: "material-icons text-red-600" }, "error", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.loadFailed")) + ": " + toDisplayString(loadError.value), 1)])) : collections.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_9$1, [_cache[8] || (_cache[8] = createElementVNode("span", { class: "material-icons text-4xl text-slate-300 mb-2" }, "dashboard_customize", -1)), createElementVNode("p", _hoisted_10$1, toDisplayString(unref(t)("collectionsView.indexEmpty")), 1)])) : (openBlock(), createElementBlock("div", _hoisted_11$1, [hasReadonlyCollections.value ? (openBlock(), createElementBlock("div", _hoisted_12$1, [(openBlock(), createElementBlock(Fragment, null, renderList(FILTER_CHIPS, (chip) => {
6820
7035
  return createElementVNode("button", {
6821
7036
  key: chip,
6822
7037
  type: "button",
@@ -6845,7 +7060,7 @@ var CollectionsIndexView_default = /* @__PURE__ */ defineComponent({
6845
7060
  key: 0,
6846
7061
  class: "inline-flex items-center gap-0.5 px-1.5 py-px rounded bg-amber-50 text-amber-700 border border-amber-200 normal-case tracking-normal",
6847
7062
  "data-testid": `collections-readonly-badge-${collection.slug}`
6848
- }, [_cache[8] || (_cache[8] = createElementVNode("span", { class: "material-icons text-[11px]" }, "lock", -1)), createTextVNode(" " + toDisplayString(unref(t)("collectionsView.readonlyChip")), 1)], 8, _hoisted_21$1)) : createCommentVNode("", true)
7063
+ }, [_cache[9] || (_cache[9] = createElementVNode("span", { class: "material-icons text-[11px]" }, "lock", -1)), createTextVNode(" " + toDisplayString(unref(t)("collectionsView.readonlyChip")), 1)], 8, _hoisted_21$1)) : createCommentVNode("", true)
6849
7064
  ])]),
6850
7065
  (openBlock(), createBlock(resolveDynamicComponent(unref(pinToggle)), {
6851
7066
  kind: "collection",
@@ -6865,8 +7080,8 @@ var CollectionsIndexView_default = /* @__PURE__ */ defineComponent({
6865
7080
  "aria-label": unref(t)("collectionsView.contribute"),
6866
7081
  "data-testid": `collections-contribute-${collection.slug}`,
6867
7082
  onClick: withModifiers(($event) => startContributeChat(collection), ["stop"])
6868
- }, [..._cache[9] || (_cache[9] = [createElementVNode("span", { class: "material-icons text-lg" }, "ios_share", -1)])], 8, _hoisted_22$1)) : createCommentVNode("", true),
6869
- _cache[10] || (_cache[10] = createElementVNode("div", { class: "h-8 w-8 flex items-center justify-center rounded-lg bg-slate-50 group-hover:bg-indigo-50 text-slate-400 group-hover:text-indigo-600 transition-all duration-300" }, [createElementVNode("span", { class: "material-icons text-lg transition-transform duration-300 group-hover:translate-x-0.5" }, "chevron_right")], -1))
7083
+ }, [..._cache[10] || (_cache[10] = [createElementVNode("span", { class: "material-icons text-lg" }, "ios_share", -1)])], 8, _hoisted_22$1)) : createCommentVNode("", true),
7084
+ _cache[11] || (_cache[11] = createElementVNode("div", { class: "h-8 w-8 flex items-center justify-center rounded-lg bg-slate-50 group-hover:bg-indigo-50 text-slate-400 group-hover:text-indigo-600 transition-all duration-300" }, [createElementVNode("span", { class: "material-icons text-lg transition-transform duration-300 group-hover:translate-x-0.5" }, "chevron_right")], -1))
6870
7085
  ], 40, _hoisted_15$1);
6871
7086
  }), 128))])]))], 64))
6872
7087
  ])]);