@mulmoclaude/collection-plugin 0.14.0 → 0.15.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.
package/dist/vue.cjs CHANGED
@@ -105,6 +105,7 @@ var i18n = (0, vue_i18n.createI18n)({
105
105
  mapTab: "Map",
106
106
  mapEmpty: "Nothing to map yet — the map draws itself as collections and the links between them appear.",
107
107
  mapRecordCount: "{count} records",
108
+ mapRecordCountUnknown: "record count unavailable",
108
109
  mapMissingHint: "No collection with this slug — a relation points at it.",
109
110
  notFound: "Collection not found",
110
111
  loadFailed: "Failed to load",
@@ -132,6 +133,11 @@ var i18n = (0, vue_i18n.createI18n)({
132
133
  derivedLabel: "Derived",
133
134
  embedMissingTitle: "Embedded reference missing",
134
135
  chat: "Chat",
136
+ related: "Related",
137
+ relatedEmpty: "No related collections",
138
+ relatedOut: "This collection links to it",
139
+ relatedIn: "It links to this collection",
140
+ relatedBoth: "Linked both ways",
135
141
  refreshFeed: "Refresh",
136
142
  refreshFailed: "Refresh failed: {error}",
137
143
  refreshDispatched: "Refresh started in the background.",
@@ -257,6 +263,7 @@ var i18n = (0, vue_i18n.createI18n)({
257
263
  mapTab: "マップ",
258
264
  mapEmpty: "まだ表示するものがありません。コレクションとその間のリンクが増えると、マップが自動的に描かれます。",
259
265
  mapRecordCount: "{count} 件のレコード",
266
+ mapRecordCountUnknown: "レコード数を取得できません",
260
267
  mapMissingHint: "このスラッグのコレクションは存在しません。リレーションが参照しています。",
261
268
  notFound: "コレクションが見つかりません",
262
269
  loadFailed: "読み込みに失敗しました",
@@ -284,6 +291,11 @@ var i18n = (0, vue_i18n.createI18n)({
284
291
  derivedLabel: "計算値",
285
292
  embedMissingTitle: "埋め込み参照が見つかりません",
286
293
  chat: "チャット",
294
+ related: "関連",
295
+ relatedEmpty: "関連するコレクションはありません",
296
+ relatedOut: "このコレクションからのリンク",
297
+ relatedIn: "このコレクションへのリンク",
298
+ relatedBoth: "相互にリンク",
287
299
  refreshFeed: "更新",
288
300
  refreshFailed: "更新に失敗しました: {error}",
289
301
  refreshDispatched: "バックグラウンドで更新を開始しました。",
@@ -409,6 +421,7 @@ var i18n = (0, vue_i18n.createI18n)({
409
421
  mapTab: "地图",
410
422
  mapEmpty: "暂无可显示的内容。随着集合及其之间的链接增多,地图会自动绘制。",
411
423
  mapRecordCount: "{count} 条记录",
424
+ mapRecordCountUnknown: "无法获取记录数",
412
425
  mapMissingHint: "不存在此 slug 的集合,但有关系指向它。",
413
426
  notFound: "未找到集合",
414
427
  loadFailed: "加载失败",
@@ -436,6 +449,11 @@ var i18n = (0, vue_i18n.createI18n)({
436
449
  derivedLabel: "派生",
437
450
  embedMissingTitle: "缺少嵌入引用",
438
451
  chat: "对话",
452
+ related: "关联",
453
+ relatedEmpty: "没有关联的集合",
454
+ relatedOut: "此集合链接到它",
455
+ relatedIn: "它链接到此集合",
456
+ relatedBoth: "双向关联",
439
457
  refreshFeed: "刷新",
440
458
  refreshFailed: "刷新失败:{error}",
441
459
  refreshDispatched: "已在后台开始刷新。",
@@ -561,6 +579,7 @@ var i18n = (0, vue_i18n.createI18n)({
561
579
  mapTab: "맵",
562
580
  mapEmpty: "아직 표시할 내용이 없습니다. 컬렉션과 그 사이의 링크가 생기면 맵이 자동으로 그려집니다.",
563
581
  mapRecordCount: "레코드 {count}개",
582
+ mapRecordCountUnknown: "레코드 수를 가져올 수 없음",
564
583
  mapMissingHint: "이 슬러그의 컬렉션이 없습니다. 관계가 이를 참조하고 있습니다.",
565
584
  notFound: "컬렉션을 찾을 수 없습니다",
566
585
  loadFailed: "불러오기에 실패했습니다",
@@ -588,6 +607,11 @@ var i18n = (0, vue_i18n.createI18n)({
588
607
  derivedLabel: "파생",
589
608
  embedMissingTitle: "임베드된 참조 없음",
590
609
  chat: "채팅",
610
+ related: "관련",
611
+ relatedEmpty: "관련 컬렉션이 없습니다",
612
+ relatedOut: "이 컬렉션이 링크함",
613
+ relatedIn: "이 컬렉션으로 링크함",
614
+ relatedBoth: "양방향 링크",
591
615
  refreshFeed: "새로고침",
592
616
  refreshFailed: "새로고침 실패: {error}",
593
617
  refreshDispatched: "백그라운드에서 새로고침을 시작했습니다.",
@@ -713,6 +737,7 @@ var i18n = (0, vue_i18n.createI18n)({
713
737
  mapTab: "Mapa",
714
738
  mapEmpty: "Nada que mostrar todavía: el mapa se dibuja solo a medida que aparecen colecciones y los enlaces entre ellas.",
715
739
  mapRecordCount: "{count} registros",
740
+ mapRecordCountUnknown: "recuento de registros no disponible",
716
741
  mapMissingHint: "No existe una colección con este slug; una relación apunta a ella.",
717
742
  notFound: "Colección no encontrada",
718
743
  loadFailed: "Error al cargar",
@@ -740,6 +765,11 @@ var i18n = (0, vue_i18n.createI18n)({
740
765
  derivedLabel: "Derivado",
741
766
  embedMissingTitle: "Falta la referencia incrustada",
742
767
  chat: "Chat",
768
+ related: "Relacionadas",
769
+ relatedEmpty: "No hay colecciones relacionadas",
770
+ relatedOut: "Esta colección enlaza con ella",
771
+ relatedIn: "Enlaza con esta colección",
772
+ relatedBoth: "Enlazadas en ambos sentidos",
743
773
  refreshFeed: "Actualizar",
744
774
  refreshFailed: "Error al actualizar: {error}",
745
775
  refreshDispatched: "Actualización iniciada en segundo plano.",
@@ -865,6 +895,7 @@ var i18n = (0, vue_i18n.createI18n)({
865
895
  mapTab: "Mapa",
866
896
  mapEmpty: "Nada para mostrar ainda — o mapa se desenha sozinho conforme coleções e os vínculos entre elas aparecem.",
867
897
  mapRecordCount: "{count} registros",
898
+ mapRecordCountUnknown: "contagem de registros indisponível",
868
899
  mapMissingHint: "Nenhuma coleção com este slug — uma relação aponta para ela.",
869
900
  notFound: "Coleção não encontrada",
870
901
  loadFailed: "Falha ao carregar",
@@ -892,6 +923,11 @@ var i18n = (0, vue_i18n.createI18n)({
892
923
  derivedLabel: "Derivado",
893
924
  embedMissingTitle: "Referência incorporada ausente",
894
925
  chat: "Chat",
926
+ related: "Relacionadas",
927
+ relatedEmpty: "Nenhuma coleção relacionada",
928
+ relatedOut: "Esta coleção faz referência a ela",
929
+ relatedIn: "Faz referência a esta coleção",
930
+ relatedBoth: "Vinculadas nos dois sentidos",
895
931
  refreshFeed: "Atualizar",
896
932
  refreshFailed: "Falha ao atualizar: {error}",
897
933
  refreshDispatched: "Atualização iniciada em segundo plano.",
@@ -1017,6 +1053,7 @@ var i18n = (0, vue_i18n.createI18n)({
1017
1053
  mapTab: "Carte",
1018
1054
  mapEmpty: "Rien à afficher pour l'instant — la carte se dessine d'elle-même à mesure que les collections et leurs liens apparaissent.",
1019
1055
  mapRecordCount: "{count} enregistrements",
1056
+ mapRecordCountUnknown: "nombre d'enregistrements indisponible",
1020
1057
  mapMissingHint: "Aucune collection avec ce slug — une relation pointe vers elle.",
1021
1058
  notFound: "Collection introuvable",
1022
1059
  loadFailed: "Échec du chargement",
@@ -1044,6 +1081,11 @@ var i18n = (0, vue_i18n.createI18n)({
1044
1081
  derivedLabel: "Calculé",
1045
1082
  embedMissingTitle: "Référence intégrée manquante",
1046
1083
  chat: "Discussion",
1084
+ related: "Associées",
1085
+ relatedEmpty: "Aucune collection associée",
1086
+ relatedOut: "Cette collection y renvoie",
1087
+ relatedIn: "Renvoie à cette collection",
1088
+ relatedBoth: "Liées dans les deux sens",
1047
1089
  refreshFeed: "Actualiser",
1048
1090
  refreshFailed: "Échec de l'actualisation : {error}",
1049
1091
  refreshDispatched: "Actualisation lancée en arrière-plan.",
@@ -1169,6 +1211,7 @@ var i18n = (0, vue_i18n.createI18n)({
1169
1211
  mapTab: "Karte",
1170
1212
  mapEmpty: "Noch nichts zu zeigen — die Karte entsteht von selbst, sobald Sammlungen und ihre Verknüpfungen entstehen.",
1171
1213
  mapRecordCount: "{count} Einträge",
1214
+ mapRecordCountUnknown: "Anzahl der Datensätze nicht verfügbar",
1172
1215
  mapMissingHint: "Keine Sammlung mit diesem Slug — eine Relation verweist darauf.",
1173
1216
  notFound: "Sammlung nicht gefunden",
1174
1217
  loadFailed: "Laden fehlgeschlagen",
@@ -1196,6 +1239,11 @@ var i18n = (0, vue_i18n.createI18n)({
1196
1239
  derivedLabel: "Abgeleitet",
1197
1240
  embedMissingTitle: "Eingebettete Referenz fehlt",
1198
1241
  chat: "Chat",
1242
+ related: "Verwandt",
1243
+ relatedEmpty: "Keine verwandten Sammlungen",
1244
+ relatedOut: "Diese Sammlung verweist darauf",
1245
+ relatedIn: "Verweist auf diese Sammlung",
1246
+ relatedBoth: "In beide Richtungen verknüpft",
1199
1247
  refreshFeed: "Aktualisieren",
1200
1248
  refreshFailed: "Aktualisierung fehlgeschlagen: {error}",
1201
1249
  refreshDispatched: "Aktualisierung im Hintergrund gestartet.",
@@ -4021,6 +4069,55 @@ function writeCollectionFlagFilters(slug, filters) {
4021
4069
  } catch {}
4022
4070
  }
4023
4071
  //#endregion
4072
+ //#region src/vue/relatedCollections.ts
4073
+ /** Fold a new direction observation into the one already recorded for a
4074
+ * neighbor: same direction is idempotent, opposing directions become `both`. */
4075
+ var mergeDirection = (prev, next) => prev === void 0 || prev === next ? next : "both";
4076
+ /** Walk the graph edges touching `slug` and record each neighbor's direction.
4077
+ * Skips self-edges (a collection ref-ing itself) and ghost nodes (a relation
4078
+ * target no discovered collection backs — nothing to navigate to). An edge
4079
+ * carrying `reverseFields` is a bidirectional pair collapsed to one edge, so
4080
+ * it contributes BOTH directions to its neighbor. */
4081
+ function collectDirections(graph, slug) {
4082
+ const nodeBySlug = new Map(graph.nodes.map((node) => [node.slug, node]));
4083
+ const directions = /* @__PURE__ */ new Map();
4084
+ const add = (neighbor, direction) => {
4085
+ if (neighbor === slug) return;
4086
+ const node = nodeBySlug.get(neighbor);
4087
+ if (!node || node.missing) return;
4088
+ directions.set(neighbor, mergeDirection(directions.get(neighbor), direction));
4089
+ };
4090
+ for (const edge of graph.edges) {
4091
+ const bidirectional = (edge.reverseFields?.length ?? 0) > 0;
4092
+ if (edge.from === slug) {
4093
+ add(edge.to, "out");
4094
+ if (bidirectional) add(edge.to, "in");
4095
+ }
4096
+ if (edge.to === slug) {
4097
+ add(edge.from, "in");
4098
+ if (bidirectional) add(edge.from, "out");
4099
+ }
4100
+ }
4101
+ return directions;
4102
+ }
4103
+ /** Collections related to `slug`, in graph node order (title/icon from the
4104
+ * node), empty when it has no navigable relations. */
4105
+ function relatedCollections(entries, slug) {
4106
+ const graph = (0, _mulmoclaude_core_collection.buildOntologyGraph)(entries);
4107
+ const directions = collectDirections(graph, slug);
4108
+ const related = [];
4109
+ for (const node of graph.nodes) {
4110
+ const direction = directions.get(node.slug);
4111
+ if (direction !== void 0) related.push({
4112
+ slug: node.slug,
4113
+ title: node.title,
4114
+ icon: node.icon,
4115
+ direction
4116
+ });
4117
+ }
4118
+ return related;
4119
+ }
4120
+ //#endregion
4024
4121
  //#region src/vue/components/CollectionView.vue?vue&type=script&setup=true&lang.ts
4025
4122
  var _hoisted_1$7 = { class: "h-full flex flex-col bg-slate-50/30" };
4026
4123
  var _hoisted_2$6 = {
@@ -4046,233 +4143,253 @@ var _hoisted_9$4 = {
4046
4143
  var _hoisted_10$4 = ["href"];
4047
4144
  var _hoisted_11$4 = ["disabled"];
4048
4145
  var _hoisted_12$4 = { class: "material-icons text-sm" };
4049
- var _hoisted_13$4 = [
4146
+ var _hoisted_13$4 = ["aria-expanded"];
4147
+ var _hoisted_14$4 = {
4148
+ key: 0,
4149
+ class: "absolute right-0 top-full mt-1 z-20 min-w-max rounded border border-slate-200 bg-white shadow-lg py-1",
4150
+ "data-testid": "collections-related-menu-panel"
4151
+ };
4152
+ var _hoisted_15$4 = {
4153
+ key: 0,
4154
+ class: "w-full h-8 px-3 flex items-center gap-2 text-xs text-slate-400",
4155
+ "data-testid": "collections-related-loading"
4156
+ };
4157
+ var _hoisted_16$4 = {
4158
+ key: 1,
4159
+ class: "w-full h-8 px-3 flex items-center text-xs text-slate-400",
4160
+ "data-testid": "collections-related-empty"
4161
+ };
4162
+ var _hoisted_17$4 = ["data-testid", "onClick"];
4163
+ var _hoisted_18$4 = { class: "material-symbols-outlined text-base" };
4164
+ var _hoisted_19$3 = { class: "flex-1 text-left" };
4165
+ var _hoisted_20$3 = ["title", "aria-label"];
4166
+ var _hoisted_21$3 = [
4050
4167
  "disabled",
4051
4168
  "data-testid",
4052
4169
  "onClick"
4053
4170
  ];
4054
- var _hoisted_14$4 = {
4171
+ var _hoisted_22$3 = {
4055
4172
  key: 0,
4056
4173
  class: "material-icons text-sm animate-spin"
4057
4174
  };
4058
- var _hoisted_15$4 = {
4175
+ var _hoisted_23$2 = {
4059
4176
  key: 1,
4060
4177
  class: "material-icons text-sm"
4061
4178
  };
4062
- var _hoisted_16$4 = ["title", "aria-label"];
4063
- var _hoisted_17$4 = ["title", "aria-label"];
4064
- var _hoisted_18$4 = {
4179
+ var _hoisted_24$1 = ["title", "aria-label"];
4180
+ var _hoisted_25$1 = ["title", "aria-label"];
4181
+ var _hoisted_26$1 = {
4065
4182
  key: 1,
4066
4183
  class: "mx-6 mt-2 rounded-lg border border-indigo-200 bg-indigo-50/60 px-4 py-2 text-sm text-indigo-800 flex items-center gap-2",
4067
4184
  "data-testid": "collections-refresh-note"
4068
4185
  };
4069
- var _hoisted_19$3 = { class: "flex-1" };
4070
- var _hoisted_20$3 = {
4186
+ var _hoisted_27$1 = { class: "flex-1" };
4187
+ var _hoisted_28 = {
4071
4188
  key: 2,
4072
4189
  class: "px-6 py-3 bg-white border-b border-slate-100 flex items-center justify-between gap-4"
4073
4190
  };
4074
- var _hoisted_21$3 = {
4191
+ var _hoisted_29 = {
4075
4192
  key: 0,
4076
4193
  class: "relative flex-1 max-w-md"
4077
4194
  };
4078
- var _hoisted_22$3 = ["placeholder", "aria-label"];
4079
- var _hoisted_23$2 = ["aria-label"];
4080
- var _hoisted_24$1 = { class: "flex items-center gap-2" };
4081
- var _hoisted_25$1 = ["aria-label", "aria-expanded"];
4082
- var _hoisted_26$1 = {
4195
+ var _hoisted_30 = ["placeholder", "aria-label"];
4196
+ var _hoisted_31 = ["aria-label"];
4197
+ var _hoisted_32 = { class: "flex items-center gap-2" };
4198
+ var _hoisted_33 = ["aria-label", "aria-expanded"];
4199
+ var _hoisted_34 = {
4083
4200
  key: 0,
4084
4201
  class: "min-w-4 h-4 px-1 flex items-center justify-center rounded-full bg-indigo-600 text-white text-[10px] font-bold"
4085
4202
  };
4086
- var _hoisted_27$1 = ["aria-label"];
4087
- var _hoisted_28 = [
4203
+ var _hoisted_35 = ["aria-label"];
4204
+ var _hoisted_36 = [
4088
4205
  "title",
4089
4206
  "aria-label",
4090
4207
  "aria-pressed",
4091
4208
  "data-testid",
4092
4209
  "onClick"
4093
4210
  ];
4094
- var _hoisted_29 = { class: "flex-1 text-left" };
4095
- var _hoisted_30 = ["aria-label"];
4096
- var _hoisted_31 = ["aria-pressed"];
4097
- var _hoisted_32 = ["aria-pressed"];
4098
- var _hoisted_33 = ["aria-pressed"];
4099
- var _hoisted_34 = [
4211
+ var _hoisted_37 = { class: "flex-1 text-left" };
4212
+ var _hoisted_38 = ["aria-label"];
4213
+ var _hoisted_39 = ["aria-pressed"];
4214
+ var _hoisted_40 = ["aria-pressed"];
4215
+ var _hoisted_41 = ["aria-pressed"];
4216
+ var _hoisted_42 = [
4100
4217
  "aria-pressed",
4101
4218
  "data-testid",
4102
4219
  "onClick"
4103
4220
  ];
4104
- var _hoisted_35 = { class: "material-icons text-sm" };
4105
- var _hoisted_36 = [
4221
+ var _hoisted_43 = { class: "material-icons text-sm" };
4222
+ var _hoisted_44 = [
4106
4223
  "title",
4107
4224
  "aria-label",
4108
4225
  "aria-expanded"
4109
4226
  ];
4110
- var _hoisted_37 = {
4227
+ var _hoisted_45 = {
4111
4228
  key: 0,
4112
4229
  class: "absolute left-0 top-full mt-1 z-20 min-w-max rounded border border-slate-200 bg-white shadow-lg py-1",
4113
4230
  "data-testid": "collection-view-add-menu"
4114
4231
  };
4115
- var _hoisted_38 = ["title", "aria-label"];
4116
- var _hoisted_39 = ["value", "aria-label"];
4117
- var _hoisted_40 = ["value"];
4118
- var _hoisted_41 = ["value", "aria-label"];
4119
- var _hoisted_42 = ["value"];
4120
- var _hoisted_43 = {
4232
+ var _hoisted_46 = ["title", "aria-label"];
4233
+ var _hoisted_47 = ["value", "aria-label"];
4234
+ var _hoisted_48 = ["value"];
4235
+ var _hoisted_49 = ["value", "aria-label"];
4236
+ var _hoisted_50 = ["value"];
4237
+ var _hoisted_51 = {
4121
4238
  key: 4,
4122
4239
  class: "text-[10px] text-slate-400 font-bold uppercase tracking-wider select-none"
4123
4240
  };
4124
- var _hoisted_44 = {
4241
+ var _hoisted_52 = {
4125
4242
  key: 3,
4126
4243
  class: "mx-6 mt-4 rounded-xl border border-amber-200 bg-amber-50/60 p-4 text-sm text-amber-900 shadow-sm flex items-center gap-3",
4127
4244
  "data-testid": "collections-data-issues"
4128
4245
  };
4129
- var _hoisted_45 = { class: "flex-1" };
4130
- var _hoisted_46 = { class: "flex-1 overflow-auto" };
4131
- var _hoisted_47 = {
4246
+ var _hoisted_53 = { class: "flex-1" };
4247
+ var _hoisted_54 = { class: "flex-1 overflow-auto" };
4248
+ var _hoisted_55 = {
4132
4249
  key: 0,
4133
4250
  class: "flex flex-col items-center justify-center py-20 text-sm text-slate-500 gap-3"
4134
4251
  };
4135
- var _hoisted_48 = {
4252
+ var _hoisted_56 = {
4136
4253
  key: 1,
4137
4254
  class: "m-6 rounded-xl border border-red-200 bg-red-50/50 p-4 text-sm text-red-800 shadow-sm flex items-center gap-3"
4138
4255
  };
4139
- var _hoisted_49 = { key: 2 };
4140
- var _hoisted_50 = {
4256
+ var _hoisted_57 = { key: 2 };
4257
+ var _hoisted_58 = {
4141
4258
  key: 3,
4142
4259
  class: "p-4"
4143
4260
  };
4144
- var _hoisted_51 = {
4261
+ var _hoisted_59 = {
4145
4262
  key: 4,
4146
4263
  class: "h-full flex flex-col"
4147
4264
  };
4148
- var _hoisted_52 = {
4265
+ var _hoisted_60 = {
4149
4266
  key: 0,
4150
4267
  class: "m-3 mb-0 rounded-xl border border-red-200 bg-red-50/50 p-4 text-sm text-red-800 shadow-sm flex items-center gap-3",
4151
4268
  "data-testid": "collections-inline-error"
4152
4269
  };
4153
- var _hoisted_53 = { class: "flex-1" };
4154
- var _hoisted_54 = ["aria-label"];
4155
- var _hoisted_55 = { class: "flex-1 min-h-0 px-3 py-2" };
4156
- var _hoisted_56 = {
4270
+ var _hoisted_61 = { class: "flex-1" };
4271
+ var _hoisted_62 = ["aria-label"];
4272
+ var _hoisted_63 = { class: "flex-1 min-h-0 px-3 py-2" };
4273
+ var _hoisted_64 = {
4157
4274
  key: 5,
4158
4275
  class: "h-full",
4159
4276
  "data-testid": "collection-custom-view-body"
4160
4277
  };
4161
- var _hoisted_57 = {
4278
+ var _hoisted_65 = {
4162
4279
  key: 6,
4163
4280
  class: "flex flex-col items-center justify-center py-20 text-sm text-slate-400 gap-2"
4164
4281
  };
4165
- var _hoisted_58 = { class: "font-semibold text-slate-600" };
4166
- var _hoisted_59 = {
4282
+ var _hoisted_66 = { class: "font-semibold text-slate-600" };
4283
+ var _hoisted_67 = {
4167
4284
  key: 7,
4168
4285
  class: "flex flex-col items-center justify-center py-20 text-sm text-slate-400 gap-2"
4169
4286
  };
4170
- var _hoisted_60 = { class: "font-semibold text-slate-600" };
4171
- var _hoisted_61 = {
4287
+ var _hoisted_68 = { class: "font-semibold text-slate-600" };
4288
+ var _hoisted_69 = {
4172
4289
  key: 8,
4173
4290
  class: "overflow-x-auto [container-type:inline-size]"
4174
4291
  };
4175
- var _hoisted_62 = {
4292
+ var _hoisted_70 = {
4176
4293
  key: 0,
4177
4294
  class: "m-4 rounded-xl border border-red-200 bg-red-50/50 p-4 text-sm text-red-800 shadow-sm flex items-center gap-3",
4178
4295
  "data-testid": "collections-inline-error"
4179
4296
  };
4180
- var _hoisted_63 = { class: "flex-1" };
4181
- var _hoisted_64 = ["aria-label"];
4182
- var _hoisted_65 = { class: "min-w-full text-xs" };
4183
- var _hoisted_66 = { class: "bg-slate-50 border-b border-slate-200" };
4184
- var _hoisted_67 = ["aria-sort"];
4185
- var _hoisted_68 = { class: "flex items-center gap-1" };
4186
- var _hoisted_69 = ["title"];
4187
- var _hoisted_70 = [
4297
+ var _hoisted_71 = { class: "flex-1" };
4298
+ var _hoisted_72 = ["aria-label"];
4299
+ var _hoisted_73 = { class: "min-w-full text-xs" };
4300
+ var _hoisted_74 = { class: "bg-slate-50 border-b border-slate-200" };
4301
+ var _hoisted_75 = ["aria-sort"];
4302
+ var _hoisted_76 = { class: "flex items-center gap-1" };
4303
+ var _hoisted_77 = ["title"];
4304
+ var _hoisted_78 = [
4188
4305
  "data-testid",
4189
4306
  "aria-label",
4190
4307
  "onClick",
4191
4308
  "onPointerenter"
4192
4309
  ];
4193
- var _hoisted_71 = { class: "material-icons text-base align-middle" };
4194
- var _hoisted_72 = { class: "divide-y divide-slate-100 bg-white" };
4195
- var _hoisted_73 = [
4310
+ var _hoisted_79 = { class: "material-icons text-base align-middle" };
4311
+ var _hoisted_80 = { class: "divide-y divide-slate-100 bg-white" };
4312
+ var _hoisted_81 = [
4196
4313
  "aria-label",
4197
4314
  "data-testid",
4198
4315
  "onClick",
4199
4316
  "onKeydown"
4200
4317
  ];
4201
- var _hoisted_74 = [
4318
+ var _hoisted_82 = [
4202
4319
  "checked",
4203
4320
  "disabled",
4204
4321
  "data-testid",
4205
4322
  "aria-label",
4206
4323
  "onChange"
4207
4324
  ];
4208
- var _hoisted_75 = [
4325
+ var _hoisted_83 = [
4209
4326
  "checked",
4210
4327
  "disabled",
4211
4328
  "data-testid",
4212
4329
  "aria-label",
4213
4330
  "onChange"
4214
4331
  ];
4215
- var _hoisted_76 = ["data-testid", "aria-label"];
4216
- var _hoisted_77 = {
4332
+ var _hoisted_84 = ["data-testid", "aria-label"];
4333
+ var _hoisted_85 = {
4217
4334
  key: 3,
4218
4335
  class: "block truncate"
4219
4336
  };
4220
- var _hoisted_78 = [
4337
+ var _hoisted_86 = [
4221
4338
  "href",
4222
4339
  "tabindex",
4223
4340
  "data-testid",
4224
4341
  "onClick",
4225
4342
  "onKeydown"
4226
4343
  ];
4227
- var _hoisted_79 = [
4344
+ var _hoisted_87 = [
4228
4345
  "value",
4229
4346
  "disabled",
4230
4347
  "data-testid",
4231
4348
  "aria-label",
4232
4349
  "onChange"
4233
4350
  ];
4234
- var _hoisted_80 = {
4351
+ var _hoisted_88 = {
4235
4352
  key: 0,
4236
4353
  value: ""
4237
4354
  };
4238
- var _hoisted_81 = ["value"];
4239
- var _hoisted_82 = {
4355
+ var _hoisted_89 = ["value"];
4356
+ var _hoisted_90 = {
4240
4357
  key: 5,
4241
4358
  class: "block truncate tabular-nums font-semibold text-slate-900"
4242
4359
  };
4243
- var _hoisted_83 = {
4360
+ var _hoisted_91 = {
4244
4361
  key: 6,
4245
4362
  class: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg text-[10px] font-bold bg-slate-100 text-slate-600 border border-slate-200/40"
4246
4363
  };
4247
- var _hoisted_84 = {
4364
+ var _hoisted_92 = {
4248
4365
  key: 7,
4249
4366
  class: "inline-block truncate tabular-nums font-bold text-indigo-900 bg-indigo-50/50 px-1.5 py-0.5 rounded border border-indigo-100/50"
4250
4367
  };
4251
- var _hoisted_85 = ["data-testid"];
4252
- var _hoisted_86 = ["href", "data-testid"];
4253
- var _hoisted_87 = ["href", "data-testid"];
4254
- var _hoisted_88 = [
4368
+ var _hoisted_93 = ["data-testid"];
4369
+ var _hoisted_94 = ["href", "data-testid"];
4370
+ var _hoisted_95 = ["href", "data-testid"];
4371
+ var _hoisted_96 = [
4255
4372
  "href",
4256
4373
  "data-testid",
4257
4374
  "onClick"
4258
4375
  ];
4259
- var _hoisted_89 = {
4376
+ var _hoisted_97 = {
4260
4377
  key: 12,
4261
4378
  class: "block truncate text-slate-600"
4262
4379
  };
4263
- var _hoisted_90 = { class: "bg-white rounded-2xl shadow-2xl w-full max-w-xl flex flex-col border border-slate-200 overflow-hidden" };
4264
- var _hoisted_91 = { class: "px-6 py-4 border-b border-slate-100 flex items-center gap-3 bg-slate-50/50" };
4265
- var _hoisted_92 = { class: "flex-1" };
4266
- var _hoisted_93 = {
4380
+ var _hoisted_98 = { class: "bg-white rounded-2xl shadow-2xl w-full max-w-xl flex flex-col border border-slate-200 overflow-hidden" };
4381
+ var _hoisted_99 = { class: "px-6 py-4 border-b border-slate-100 flex items-center gap-3 bg-slate-50/50" };
4382
+ var _hoisted_100 = { class: "flex-1" };
4383
+ var _hoisted_101 = {
4267
4384
  id: "collections-chat-title",
4268
4385
  class: "text-sm font-bold text-slate-800 uppercase tracking-wide"
4269
4386
  };
4270
- var _hoisted_94 = { class: "text-xs text-slate-400 font-semibold" };
4271
- var _hoisted_95 = ["aria-label"];
4272
- var _hoisted_96 = { class: "px-6 py-5" };
4273
- var _hoisted_97 = ["placeholder", "onKeydown"];
4274
- var _hoisted_98 = { class: "px-6 py-3.5 border-t border-slate-100 flex items-center justify-end gap-2 bg-slate-50/50" };
4275
- var _hoisted_99 = ["disabled"];
4387
+ var _hoisted_102 = { class: "text-xs text-slate-400 font-semibold" };
4388
+ var _hoisted_103 = ["aria-label"];
4389
+ var _hoisted_104 = { class: "px-6 py-5" };
4390
+ var _hoisted_105 = ["placeholder", "onKeydown"];
4391
+ var _hoisted_106 = { class: "px-6 py-3.5 border-t border-slate-100 flex items-center justify-end gap-2 bg-slate-50/50" };
4392
+ var _hoisted_107 = ["disabled"];
4276
4393
  /** `slug` / `selected` are supplied only in EMBEDDED mode (the
4277
4394
  * `presentCollection` chat card mounts this component and drives both
4278
4395
  * from the tool result). In standalone route mode (the
@@ -4842,6 +4959,60 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
4842
4959
  function closeChat() {
4843
4960
  chatOpen.value = false;
4844
4961
  }
4962
+ const relatedMenuOpen = (0, vue.ref)(false);
4963
+ const relatedMenuRef = (0, vue.ref)(null);
4964
+ const relatedLoading = (0, vue.ref)(false);
4965
+ /** Derived neighbors for `relatedFetchedSlug` (null until first fetched). */
4966
+ const relatedList = (0, vue.ref)(null);
4967
+ /** Slug the cached `relatedList` was built for — a mismatch on open forces
4968
+ * a re-fetch (e.g. after navigating to a different collection). */
4969
+ const relatedFetchedSlug = (0, vue.ref)(null);
4970
+ const showRelatedMenu = (0, vue.computed)(() => Boolean(collection.value) && !embedded.value && cui.fetchOntology !== void 0);
4971
+ const relatedItems = (0, vue.computed)(() => relatedList.value ?? []);
4972
+ function relatedDirectionIcon(direction) {
4973
+ if (direction === "out") return "arrow_outward";
4974
+ if (direction === "in") return "arrow_back";
4975
+ return "sync_alt";
4976
+ }
4977
+ function relatedDirectionLabel(direction) {
4978
+ if (direction === "out") return t("collectionsView.relatedOut");
4979
+ if (direction === "in") return t("collectionsView.relatedIn");
4980
+ return t("collectionsView.relatedBoth");
4981
+ }
4982
+ /** Fetch the ontology and derive this slug's neighbors. Fail-soft: a
4983
+ * non-ok result (the `apiGet` wrapper already caught the network/HTTP
4984
+ * error) leaves an empty list, which the panel shows as its empty row.
4985
+ *
4986
+ * Sets `relatedFetchedSlug` synchronously (before the await) so a rapid
4987
+ * re-open can't kick a duplicate fetch, and DROPS a stale response whose
4988
+ * slug no longer matches the active collection — otherwise a slower fetch
4989
+ * for a since-abandoned slug, resolving after a fast switch, would apply
4990
+ * the wrong collection's neighbors (Codex / CodeRabbit on PR #2251). */
4991
+ async function loadRelated(slug) {
4992
+ relatedFetchedSlug.value = slug;
4993
+ relatedLoading.value = true;
4994
+ const result = await cui.fetchOntology?.();
4995
+ if (collection.value?.slug !== slug) return;
4996
+ relatedLoading.value = false;
4997
+ relatedList.value = result?.ok ? relatedCollections(result.data.entries, slug) : [];
4998
+ }
4999
+ function toggleRelatedMenu() {
5000
+ relatedMenuOpen.value = !relatedMenuOpen.value;
5001
+ const slug = collection.value?.slug;
5002
+ if (relatedMenuOpen.value && slug && relatedFetchedSlug.value !== slug) loadRelated(slug);
5003
+ }
5004
+ function closeRelatedMenuOnOutsideClick(event) {
5005
+ if (!eventInsideElement(event, relatedMenuRef.value)) relatedMenuOpen.value = false;
5006
+ }
5007
+ (0, vue.watch)(relatedMenuOpen, (open) => {
5008
+ if (open) document.addEventListener("mousedown", closeRelatedMenuOnOutsideClick);
5009
+ else document.removeEventListener("mousedown", closeRelatedMenuOnOutsideClick);
5010
+ });
5011
+ /** Hop to a related collection's detail page (same nav as the index cards). */
5012
+ function gotoRelated(slug) {
5013
+ relatedMenuOpen.value = false;
5014
+ cui.gotoDetail("collection", slug);
5015
+ }
4845
5016
  /** Build the chat seed text for the current view.
4846
5017
  *
4847
5018
  * A collection IS a skill, so its slug doubles as a slash command:
@@ -5556,6 +5727,10 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5556
5727
  kanbanOverride.value = null;
5557
5728
  addMenuOpen.value = false;
5558
5729
  filterMenuOpen.value = false;
5730
+ relatedMenuOpen.value = false;
5731
+ relatedList.value = null;
5732
+ relatedFetchedSlug.value = null;
5733
+ relatedLoading.value = false;
5559
5734
  sortState.value = storedSortFor(slug);
5560
5735
  flagFilters.value = storedFlagFiltersFor(slug);
5561
5736
  }
@@ -5607,6 +5782,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5607
5782
  if (refreshNoteTimer !== void 0) clearTimeout(refreshNoteTimer);
5608
5783
  document.removeEventListener("mousedown", closeAddMenuOnOutsideClick);
5609
5784
  document.removeEventListener("mousedown", closeFilterMenuOnOutsideClick);
5785
+ document.removeEventListener("mousedown", closeRelatedMenuOnOutsideClick);
5610
5786
  });
5611
5787
  (0, vue.watch)([
5612
5788
  activeView,
@@ -5679,6 +5855,35 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5679
5855
  "data-testid": "collections-chat",
5680
5856
  onClick: openChat
5681
5857
  }, [_cache[30] || (_cache[30] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "forum", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.chat")), 1)])) : (0, vue.createCommentVNode)("", true),
5858
+ showRelatedMenu.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
5859
+ key: 5,
5860
+ ref_key: "relatedMenuRef",
5861
+ ref: relatedMenuRef,
5862
+ class: "relative"
5863
+ }, [(0, vue.createElementVNode)("button", {
5864
+ type: "button",
5865
+ class: "h-8 px-2.5 flex items-center gap-1 rounded border border-indigo-200 bg-white hover:bg-indigo-50 text-indigo-600 font-bold text-xs transition-colors",
5866
+ "aria-expanded": relatedMenuOpen.value,
5867
+ "data-testid": "collections-related-menu",
5868
+ onClick: toggleRelatedMenu
5869
+ }, [_cache[31] || (_cache[31] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "hub", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.related")), 1)], 8, _hoisted_13$4), relatedMenuOpen.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_14$4, [relatedLoading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_15$4, [_cache[32] || (_cache[32] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm animate-spin" }, "hourglass_empty", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("common.loading")), 1)])) : relatedItems.value.length === 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_16$4, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.relatedEmpty")), 1)) : (0, vue.createCommentVNode)("", true), ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(relatedItems.value, (related) => {
5870
+ return (0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
5871
+ key: related.slug,
5872
+ type: "button",
5873
+ class: "w-full h-8 px-3 flex items-center gap-2 text-xs text-slate-600 hover:bg-slate-50 transition-colors",
5874
+ "data-testid": `collections-related-item-${related.slug}`,
5875
+ onClick: ($event) => gotoRelated(related.slug)
5876
+ }, [
5877
+ (0, vue.createElementVNode)("span", _hoisted_18$4, (0, vue.toDisplayString)(related.icon), 1),
5878
+ (0, vue.createElementVNode)("span", _hoisted_19$3, (0, vue.toDisplayString)(related.title), 1),
5879
+ (0, vue.createElementVNode)("span", {
5880
+ class: "material-icons text-sm text-slate-400",
5881
+ title: relatedDirectionLabel(related.direction),
5882
+ "aria-label": relatedDirectionLabel(related.direction),
5883
+ role: "img"
5884
+ }, (0, vue.toDisplayString)(relatedDirectionIcon(related.direction)), 9, _hoisted_20$3)
5885
+ ], 8, _hoisted_17$4);
5886
+ }), 128))])) : (0, vue.createCommentVNode)("", true)], 512)) : (0, vue.createCommentVNode)("", true),
5682
5887
  ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(collectionActions.value, (action) => {
5683
5888
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
5684
5889
  key: action.id,
@@ -5687,52 +5892,52 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5687
5892
  disabled: collectionActionPending.value || isActionRunning(action.id),
5688
5893
  "data-testid": `collections-action-${action.id}`,
5689
5894
  onClick: ($event) => runCollectionAction(action)
5690
- }, [isActionRunning(action.id) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_14$4, "progress_activity")) : action.icon ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_15$4, (0, vue.toDisplayString)(action.icon), 1)) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(action.label), 1)], 8, _hoisted_13$4);
5895
+ }, [isActionRunning(action.id) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_22$3, "progress_activity")) : action.icon ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_23$2, (0, vue.toDisplayString)(action.icon), 1)) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(action.label), 1)], 8, _hoisted_21$3);
5691
5896
  }), 128)),
5692
5897
  canCreate.value && !calendarActive.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
5693
- key: 5,
5898
+ key: 6,
5694
5899
  type: "button",
5695
5900
  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",
5696
5901
  "data-testid": "collections-add-item",
5697
5902
  onClick: openCreate
5698
- }, [_cache[31] || (_cache[31] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "add", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("common.add")), 1)])) : (0, vue.createCommentVNode)("", true),
5903
+ }, [_cache[33] || (_cache[33] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "add", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("common.add")), 1)])) : (0, vue.createCommentVNode)("", true),
5699
5904
  canDeleteCollection.value && !embedded.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
5700
- key: 6,
5905
+ key: 7,
5701
5906
  type: "button",
5702
5907
  class: "h-8 w-8 flex items-center justify-center rounded border border-rose-200 bg-white text-rose-600 hover:bg-rose-50 transition-colors",
5703
5908
  title: (0, vue.unref)(t)("collectionsView.deleteCollection"),
5704
5909
  "aria-label": (0, vue.unref)(t)("collectionsView.deleteCollection"),
5705
5910
  "data-testid": "collections-delete",
5706
5911
  onClick: confirmCollectionDelete
5707
- }, [..._cache[32] || (_cache[32] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "delete_forever", -1)])], 8, _hoisted_16$4)) : (0, vue.createCommentVNode)("", true),
5912
+ }, [..._cache[34] || (_cache[34] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "delete_forever", -1)])], 8, _hoisted_24$1)) : (0, vue.createCommentVNode)("", true),
5708
5913
  canDeleteFeed.value && !embedded.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
5709
- key: 7,
5914
+ key: 8,
5710
5915
  type: "button",
5711
5916
  class: "h-8 w-8 flex items-center justify-center rounded border border-rose-200 bg-white text-rose-600 hover:bg-rose-50 transition-colors",
5712
5917
  title: (0, vue.unref)(t)("collectionsView.deleteFeed"),
5713
5918
  "aria-label": (0, vue.unref)(t)("collectionsView.deleteFeed"),
5714
5919
  "data-testid": "feeds-delete",
5715
5920
  onClick: confirmFeedDelete
5716
- }, [..._cache[33] || (_cache[33] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "delete_forever", -1)])], 8, _hoisted_17$4)) : (0, vue.createCommentVNode)("", true)
5921
+ }, [..._cache[35] || (_cache[35] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "delete_forever", -1)])], 8, _hoisted_25$1)) : (0, vue.createCommentVNode)("", true)
5717
5922
  ])) : (0, vue.createCommentVNode)("", true),
5718
- refreshNote.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_18$4, [_cache[34] || (_cache[34] = (0, vue.createElementVNode)("span", { class: "material-icons text-base text-indigo-600" }, "hourglass_top", -1)), (0, vue.createElementVNode)("span", _hoisted_19$3, (0, vue.toDisplayString)(refreshNote.value), 1)])) : (0, vue.createCommentVNode)("", true),
5719
- collection.value && (!__props.hideSearch && items.value.length > 0 || !__props.hideViewToggle && (hasCalendar.value || hasKanban.value || hasCustomViews.value || canAddCustomView.value)) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_20$3, [!__props.hideSearch && items.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_21$3, [
5720
- _cache[36] || (_cache[36] = (0, vue.createElementVNode)("span", { class: "absolute inset-y-0 left-0 flex items-center pl-3 text-slate-400 pointer-events-none" }, [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "search")], -1)),
5923
+ refreshNote.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_26$1, [_cache[36] || (_cache[36] = (0, vue.createElementVNode)("span", { class: "material-icons text-base text-indigo-600" }, "hourglass_top", -1)), (0, vue.createElementVNode)("span", _hoisted_27$1, (0, vue.toDisplayString)(refreshNote.value), 1)])) : (0, vue.createCommentVNode)("", true),
5924
+ collection.value && (!__props.hideSearch && items.value.length > 0 || !__props.hideViewToggle && (hasCalendar.value || hasKanban.value || hasCustomViews.value || canAddCustomView.value)) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_28, [!__props.hideSearch && items.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_29, [
5925
+ _cache[38] || (_cache[38] = (0, vue.createElementVNode)("span", { class: "absolute inset-y-0 left-0 flex items-center pl-3 text-slate-400 pointer-events-none" }, [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "search")], -1)),
5721
5926
  (0, vue.withDirectives)((0, vue.createElementVNode)("input", {
5722
5927
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchQuery.value = $event),
5723
5928
  type: "text",
5724
5929
  placeholder: (0, vue.unref)(t)("collectionsView.searchPlaceholder"),
5725
5930
  "aria-label": (0, vue.unref)(t)("collectionsView.searchPlaceholder"),
5726
5931
  class: "w-full bg-slate-50 border border-slate-200/80 rounded-xl pl-9 pr-8 py-1.5 text-xs placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 focus:bg-white transition-all font-medium"
5727
- }, null, 8, _hoisted_22$3), [[vue.vModelText, searchQuery.value]]),
5932
+ }, null, 8, _hoisted_30), [[vue.vModelText, searchQuery.value]]),
5728
5933
  searchQuery.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
5729
5934
  key: 0,
5730
5935
  type: "button",
5731
5936
  "aria-label": (0, vue.unref)(t)("collectionsView.clearSearch"),
5732
5937
  class: "absolute inset-y-0 right-0 flex items-center pr-2.5 text-slate-400 hover:text-slate-600",
5733
5938
  onClick: _cache[2] || (_cache[2] = ($event) => searchQuery.value = "")
5734
- }, [..._cache[35] || (_cache[35] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "close", -1)])], 8, _hoisted_23$2)) : (0, vue.createCommentVNode)("", true)
5735
- ])) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div", _hoisted_24$1, [
5939
+ }, [..._cache[37] || (_cache[37] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "close", -1)])], 8, _hoisted_31)) : (0, vue.createCommentVNode)("", true)
5940
+ ])) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div", _hoisted_32, [
5736
5941
  activeView.value === "table" && flagChips.value.length > 0 && items.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
5737
5942
  key: 0,
5738
5943
  ref_key: "filterMenuRef",
@@ -5746,13 +5951,13 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5746
5951
  "data-testid": "collections-filter-menu",
5747
5952
  onClick: _cache[3] || (_cache[3] = ($event) => filterMenuOpen.value = !filterMenuOpen.value)
5748
5953
  }, [
5749
- _cache[37] || (_cache[37] = (0, vue.createElementVNode)("span", {
5954
+ _cache[39] || (_cache[39] = (0, vue.createElementVNode)("span", {
5750
5955
  class: "material-icons text-sm",
5751
5956
  "aria-hidden": "true"
5752
5957
  }, "filter_alt", -1)),
5753
5958
  (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.flagFilterButton")), 1),
5754
- activeFlagFilterCount.value > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_26$1, (0, vue.toDisplayString)(activeFlagFilterCount.value), 1)) : (0, vue.createCommentVNode)("", true)
5755
- ], 10, _hoisted_25$1), filterMenuOpen.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
5959
+ activeFlagFilterCount.value > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_34, (0, vue.toDisplayString)(activeFlagFilterCount.value), 1)) : (0, vue.createCommentVNode)("", true)
5960
+ ], 10, _hoisted_33), filterMenuOpen.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
5756
5961
  key: 0,
5757
5962
  class: "absolute left-0 top-full mt-1 z-20 min-w-max rounded border border-slate-200 bg-white shadow-lg py-1",
5758
5963
  role: "group",
@@ -5771,8 +5976,8 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5771
5976
  }, [(0, vue.createElementVNode)("span", {
5772
5977
  class: (0, vue.normalizeClass)(["material-icons text-sm", flagChipIconClass(chip.key)]),
5773
5978
  "aria-hidden": "true"
5774
- }, (0, vue.toDisplayString)(flagChipIcon(chip.key)), 3), (0, vue.createElementVNode)("span", _hoisted_29, (0, vue.toDisplayString)(chip.label), 1)], 10, _hoisted_28);
5775
- }), 128))], 8, _hoisted_27$1)) : (0, vue.createCommentVNode)("", true)], 512)) : (0, vue.createCommentVNode)("", true),
5979
+ }, (0, vue.toDisplayString)(flagChipIcon(chip.key)), 3), (0, vue.createElementVNode)("span", _hoisted_37, (0, vue.toDisplayString)(chip.label), 1)], 10, _hoisted_36);
5980
+ }), 128))], 8, _hoisted_35)) : (0, vue.createCommentVNode)("", true)], 512)) : (0, vue.createCommentVNode)("", true),
5776
5981
  !__props.hideViewToggle && (hasCalendar.value || hasKanban.value || hasCustomViews.value || canAddCustomView.value) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
5777
5982
  key: 1,
5778
5983
  class: "flex gap-0.5",
@@ -5785,7 +5990,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5785
5990
  "aria-pressed": activeView.value === "table",
5786
5991
  "data-testid": "collection-view-toggle-table",
5787
5992
  onClick: _cache[4] || (_cache[4] = ($event) => setView("table"))
5788
- }, [_cache[38] || (_cache[38] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "table_rows", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.viewTable")), 1)], 10, _hoisted_31),
5993
+ }, [_cache[40] || (_cache[40] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "table_rows", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.viewTable")), 1)], 10, _hoisted_39),
5789
5994
  hasCalendar.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
5790
5995
  key: 0,
5791
5996
  type: "button",
@@ -5793,7 +5998,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5793
5998
  "aria-pressed": activeView.value === "calendar",
5794
5999
  "data-testid": "collection-view-toggle-calendar",
5795
6000
  onClick: _cache[5] || (_cache[5] = ($event) => setView("calendar"))
5796
- }, [_cache[39] || (_cache[39] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "calendar_month", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.viewCalendar")), 1)], 10, _hoisted_32)) : (0, vue.createCommentVNode)("", true),
6001
+ }, [_cache[41] || (_cache[41] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "calendar_month", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.viewCalendar")), 1)], 10, _hoisted_40)) : (0, vue.createCommentVNode)("", true),
5797
6002
  hasKanban.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
5798
6003
  key: 1,
5799
6004
  type: "button",
@@ -5801,7 +6006,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5801
6006
  "aria-pressed": activeView.value === "kanban",
5802
6007
  "data-testid": "collection-view-toggle-kanban",
5803
6008
  onClick: _cache[6] || (_cache[6] = ($event) => setView("kanban"))
5804
- }, [_cache[40] || (_cache[40] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "view_kanban", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.viewKanban")), 1)], 10, _hoisted_33)) : (0, vue.createCommentVNode)("", true),
6009
+ }, [_cache[42] || (_cache[42] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "view_kanban", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.viewKanban")), 1)], 10, _hoisted_41)) : (0, vue.createCommentVNode)("", true),
5805
6010
  ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(customViews.value, (cv) => {
5806
6011
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
5807
6012
  key: cv.id,
@@ -5810,7 +6015,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5810
6015
  "aria-pressed": activeView.value === (0, vue.unref)(customViewKey)(cv.id),
5811
6016
  "data-testid": `collection-view-custom-${cv.id}`,
5812
6017
  onClick: ($event) => setCustomView(cv.id)
5813
- }, [(0, vue.createElementVNode)("span", _hoisted_35, (0, vue.toDisplayString)(cv.icon || (cv.target === "mobile" ? "smartphone" : "dashboard_customize")), 1), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(cv.label), 1)], 10, _hoisted_34);
6018
+ }, [(0, vue.createElementVNode)("span", _hoisted_43, (0, vue.toDisplayString)(cv.icon || (cv.target === "mobile" ? "smartphone" : "dashboard_customize")), 1), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(cv.label), 1)], 10, _hoisted_42);
5814
6019
  }), 128)),
5815
6020
  canAddCustomView.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
5816
6021
  key: 2,
@@ -5825,17 +6030,17 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5825
6030
  "aria-expanded": addMenuOpen.value,
5826
6031
  "data-testid": "collection-view-add",
5827
6032
  onClick: onAddViewClick
5828
- }, [..._cache[41] || (_cache[41] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "add", -1)])], 8, _hoisted_36), addMenuOpen.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_37, [(0, vue.createElementVNode)("button", {
6033
+ }, [..._cache[43] || (_cache[43] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "add", -1)])], 8, _hoisted_44), addMenuOpen.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_45, [(0, vue.createElementVNode)("button", {
5829
6034
  type: "button",
5830
6035
  class: "w-full h-8 px-3 flex items-center gap-2 text-xs font-bold text-slate-600 hover:bg-slate-50",
5831
6036
  "data-testid": "collection-view-add-desktop",
5832
6037
  onClick: _cache[7] || (_cache[7] = ($event) => addCustomView("desktop"))
5833
- }, [_cache[42] || (_cache[42] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "dashboard_customize", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.addViewDesktop")), 1)]), (0, vue.createElementVNode)("button", {
6038
+ }, [_cache[44] || (_cache[44] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "dashboard_customize", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.addViewDesktop")), 1)]), (0, vue.createElementVNode)("button", {
5834
6039
  type: "button",
5835
6040
  class: "w-full h-8 px-3 flex items-center gap-2 text-xs font-bold text-slate-600 hover:bg-slate-50",
5836
6041
  "data-testid": "collection-view-add-mobile",
5837
6042
  onClick: _cache[8] || (_cache[8] = ($event) => addCustomView("mobile"))
5838
- }, [_cache[43] || (_cache[43] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "smartphone", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.addViewMobile")), 1)])])) : (0, vue.createCommentVNode)("", true)], 512)) : (0, vue.createCommentVNode)("", true),
6043
+ }, [_cache[45] || (_cache[45] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "smartphone", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.addViewMobile")), 1)])])) : (0, vue.createCommentVNode)("", true)], 512)) : (0, vue.createCommentVNode)("", true),
5839
6044
  canConfigureViews.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
5840
6045
  key: 3,
5841
6046
  type: "button",
@@ -5844,8 +6049,8 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5844
6049
  "aria-label": (0, vue.unref)(t)("collectionsView.config.open"),
5845
6050
  "data-testid": "collection-config-open",
5846
6051
  onClick: _cache[9] || (_cache[9] = ($event) => configOpen.value = true)
5847
- }, [..._cache[44] || (_cache[44] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "settings", -1)])], 8, _hoisted_38)) : (0, vue.createCommentVNode)("", true)
5848
- ], 8, _hoisted_30)) : (0, vue.createCommentVNode)("", true),
6052
+ }, [..._cache[46] || (_cache[46] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "settings", -1)])], 8, _hoisted_46)) : (0, vue.createCommentVNode)("", true)
6053
+ ], 8, _hoisted_38)) : (0, vue.createCommentVNode)("", true),
5849
6054
  calendarActive.value && dateFields.value.length > 1 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("select", {
5850
6055
  key: 2,
5851
6056
  value: calendarAnchorField.value,
@@ -5857,8 +6062,8 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5857
6062
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("option", {
5858
6063
  key,
5859
6064
  value: key
5860
- }, (0, vue.toDisplayString)(collection.value?.schema.fields[key]?.label ?? key), 9, _hoisted_40);
5861
- }), 128))], 40, _hoisted_39)) : (0, vue.createCommentVNode)("", true),
6065
+ }, (0, vue.toDisplayString)(collection.value?.schema.fields[key]?.label ?? key), 9, _hoisted_48);
6066
+ }), 128))], 40, _hoisted_47)) : (0, vue.createCommentVNode)("", true),
5862
6067
  kanbanActive.value && enumFields.value.length > 1 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("select", {
5863
6068
  key: 3,
5864
6069
  value: kanbanGroupField.value,
@@ -5870,24 +6075,24 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5870
6075
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("option", {
5871
6076
  key,
5872
6077
  value: key
5873
- }, (0, vue.toDisplayString)(collection.value?.schema.fields[key]?.label ?? key), 9, _hoisted_42);
5874
- }), 128))], 40, _hoisted_41)) : (0, vue.createCommentVNode)("", true),
5875
- items.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_43, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.searchSummary", {
6078
+ }, (0, vue.toDisplayString)(collection.value?.schema.fields[key]?.label ?? key), 9, _hoisted_50);
6079
+ }), 128))], 40, _hoisted_49)) : (0, vue.createCommentVNode)("", true),
6080
+ items.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_51, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.searchSummary", {
5876
6081
  shown: activeView.value === "table" ? tableFilteredItems.value.length : filteredItems.value.length,
5877
6082
  total: items.value.length
5878
6083
  })), 1)) : (0, vue.createCommentVNode)("", true)
5879
6084
  ])])) : (0, vue.createCommentVNode)("", true),
5880
- collection.value && dataIssues.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_44, [
5881
- _cache[46] || (_cache[46] = (0, vue.createElementVNode)("span", { class: "material-icons text-amber-600" }, "warning", -1)),
5882
- (0, vue.createElementVNode)("span", _hoisted_45, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.dataIssuesDetected", { count: dataIssues.value.length })), 1),
6085
+ collection.value && dataIssues.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_52, [
6086
+ _cache[48] || (_cache[48] = (0, vue.createElementVNode)("span", { class: "material-icons text-amber-600" }, "warning", -1)),
6087
+ (0, vue.createElementVNode)("span", _hoisted_53, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.dataIssuesDetected", { count: dataIssues.value.length })), 1),
5883
6088
  (0, vue.createElementVNode)("button", {
5884
6089
  type: "button",
5885
6090
  class: "h-8 px-2.5 flex items-center gap-1 rounded border border-amber-300 bg-white hover:bg-amber-100 text-amber-700 font-bold text-xs transition-colors",
5886
6091
  "data-testid": "collections-repair",
5887
6092
  onClick: repairCollection
5888
- }, [_cache[45] || (_cache[45] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "build", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.repair")), 1)])
6093
+ }, [_cache[47] || (_cache[47] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "build", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.repair")), 1)])
5889
6094
  ])) : (0, vue.createCommentVNode)("", true),
5890
- (0, vue.createElementVNode)("div", _hoisted_46, [loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_47, [_cache[47] || (_cache[47] = (0, vue.createElementVNode)("div", { class: "h-8 w-8 border-2 border-indigo-600/20 border-t-indigo-600 rounded-full animate-spin" }, null, -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("common.loading")), 1)])) : loadError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_48, [_cache[48] || (_cache[48] = (0, vue.createElementVNode)("span", { class: "material-icons text-red-600" }, "error", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(loadError.value === "not-found" ? (0, vue.unref)(t)("collectionsView.notFound") : `${(0, vue.unref)(t)("collectionsView.loadFailed")}: ${loadError.value}`), 1)])) : !collection.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_49)) : calendarActive.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_50, [(0, vue.createVNode)(CollectionCalendarView_default, {
6095
+ (0, vue.createElementVNode)("div", _hoisted_54, [loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_55, [_cache[49] || (_cache[49] = (0, vue.createElementVNode)("div", { class: "h-8 w-8 border-2 border-indigo-600/20 border-t-indigo-600 rounded-full animate-spin" }, null, -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("common.loading")), 1)])) : loadError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_56, [_cache[50] || (_cache[50] = (0, vue.createElementVNode)("span", { class: "material-icons text-red-600" }, "error", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(loadError.value === "not-found" ? (0, vue.unref)(t)("collectionsView.notFound") : `${(0, vue.unref)(t)("collectionsView.loadFailed")}: ${loadError.value}`), 1)])) : !collection.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_57)) : calendarActive.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_58, [(0, vue.createVNode)(CollectionCalendarView_default, {
5891
6096
  schema: collection.value.schema,
5892
6097
  items: filteredItems.value,
5893
6098
  "anchor-field": calendarAnchorField.value,
@@ -5976,16 +6181,16 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5976
6181
  "selected",
5977
6182
  "can-create",
5978
6183
  "show-detail"
5979
- ])) : (0, vue.createCommentVNode)("", true)])) : kanbanActive.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_51, [inlineError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_52, [
5980
- _cache[50] || (_cache[50] = (0, vue.createElementVNode)("span", { class: "material-icons text-red-600" }, "error", -1)),
5981
- (0, vue.createElementVNode)("span", _hoisted_53, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.inlineSaveFailed", { error: inlineError.value })), 1),
6184
+ ])) : (0, vue.createCommentVNode)("", true)])) : kanbanActive.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_59, [inlineError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_60, [
6185
+ _cache[52] || (_cache[52] = (0, vue.createElementVNode)("span", { class: "material-icons text-red-600" }, "error", -1)),
6186
+ (0, vue.createElementVNode)("span", _hoisted_61, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.inlineSaveFailed", { error: inlineError.value })), 1),
5982
6187
  (0, vue.createElementVNode)("button", {
5983
6188
  type: "button",
5984
6189
  class: "h-8 w-8 flex items-center justify-center rounded text-red-600 hover:bg-red-100",
5985
6190
  "aria-label": (0, vue.unref)(t)("common.close"),
5986
6191
  onClick: _cache[14] || (_cache[14] = ($event) => inlineError.value = null)
5987
- }, [..._cache[49] || (_cache[49] = [(0, vue.createElementVNode)("span", { class: "material-icons text-base" }, "close", -1)])], 8, _hoisted_54)
5988
- ])) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div", _hoisted_55, [(0, vue.createVNode)(CollectionKanbanView_default, {
6192
+ }, [..._cache[51] || (_cache[51] = [(0, vue.createElementVNode)("span", { class: "material-icons text-base" }, "close", -1)])], 8, _hoisted_62)
6193
+ ])) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div", _hoisted_63, [(0, vue.createVNode)(CollectionKanbanView_default, {
5989
6194
  schema: collection.value.schema,
5990
6195
  items: filteredItems.value,
5991
6196
  "group-field": kanbanGroupField.value,
@@ -6001,7 +6206,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6001
6206
  "selected",
6002
6207
  "notified",
6003
6208
  "readonly"
6004
- ])])])) : activeCustomView.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_56, [activeCustomView.value.target === "mobile" ? ((0, vue.openBlock)(), (0, vue.createBlock)(CollectionRemoteViewPreview_default, {
6209
+ ])])])) : activeCustomView.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_64, [activeCustomView.value.target === "mobile" ? ((0, vue.openBlock)(), (0, vue.createBlock)(CollectionRemoteViewPreview_default, {
6005
6210
  key: 0,
6006
6211
  slug: collection.value.slug,
6007
6212
  view: activeCustomView.value,
@@ -6012,32 +6217,32 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6012
6217
  view: activeCustomView.value,
6013
6218
  onOpenItem: onCustomViewOpenItem,
6014
6219
  onStartChat: onCustomViewStartChat
6015
- }, null, 8, ["slug", "view"]))])) : items.value.length === 0 && editing.value?.mode !== "create" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_57, [_cache[51] || (_cache[51] = (0, vue.createElementVNode)("span", { class: "material-icons text-4xl text-slate-300" }, "folder_open", -1)), (0, vue.createElementVNode)("p", _hoisted_58, (0, vue.toDisplayString)((0, vue.unref)(t)(isReadOnly.value ? "collectionsView.itemsEmptyReadonly" : "collectionsView.itemsEmpty")), 1)])) : tableFilteredItems.value.length === 0 && editing.value?.mode !== "create" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_59, [
6016
- _cache[52] || (_cache[52] = (0, vue.createElementVNode)("span", { class: "material-icons text-4xl text-slate-300" }, "search_off", -1)),
6017
- (0, vue.createElementVNode)("p", _hoisted_60, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.noMatchingItems")), 1),
6220
+ }, null, 8, ["slug", "view"]))])) : items.value.length === 0 && editing.value?.mode !== "create" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_65, [_cache[53] || (_cache[53] = (0, vue.createElementVNode)("span", { class: "material-icons text-4xl text-slate-300" }, "folder_open", -1)), (0, vue.createElementVNode)("p", _hoisted_66, (0, vue.toDisplayString)((0, vue.unref)(t)(isReadOnly.value ? "collectionsView.itemsEmptyReadonly" : "collectionsView.itemsEmpty")), 1)])) : tableFilteredItems.value.length === 0 && editing.value?.mode !== "create" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_67, [
6221
+ _cache[54] || (_cache[54] = (0, vue.createElementVNode)("span", { class: "material-icons text-4xl text-slate-300" }, "search_off", -1)),
6222
+ (0, vue.createElementVNode)("p", _hoisted_68, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.noMatchingItems")), 1),
6018
6223
  (0, vue.createElementVNode)("button", {
6019
6224
  type: "button",
6020
6225
  class: "text-xs text-indigo-600 font-semibold hover:underline",
6021
6226
  onClick: _cache[15] || (_cache[15] = ($event) => (searchQuery.value = "", flagFilters.value = {}))
6022
6227
  }, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.clearSearch")), 1)
6023
- ])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_61, [inlineError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_62, [
6024
- _cache[54] || (_cache[54] = (0, vue.createElementVNode)("span", { class: "material-icons text-red-600" }, "error", -1)),
6025
- (0, vue.createElementVNode)("span", _hoisted_63, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.inlineSaveFailed", { error: inlineError.value })), 1),
6228
+ ])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_69, [inlineError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_70, [
6229
+ _cache[56] || (_cache[56] = (0, vue.createElementVNode)("span", { class: "material-icons text-red-600" }, "error", -1)),
6230
+ (0, vue.createElementVNode)("span", _hoisted_71, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.inlineSaveFailed", { error: inlineError.value })), 1),
6026
6231
  (0, vue.createElementVNode)("button", {
6027
6232
  type: "button",
6028
6233
  class: "h-8 w-8 flex items-center justify-center rounded text-red-600 hover:bg-red-100",
6029
6234
  "aria-label": (0, vue.unref)(t)("common.close"),
6030
6235
  onClick: _cache[16] || (_cache[16] = ($event) => inlineError.value = null)
6031
- }, [..._cache[53] || (_cache[53] = [(0, vue.createElementVNode)("span", { class: "material-icons text-base" }, "close", -1)])], 8, _hoisted_64)
6032
- ])) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("table", _hoisted_65, [(0, vue.createElementVNode)("thead", null, [(0, vue.createElementVNode)("tr", _hoisted_66, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(listColumnFields.value, ([key, field]) => {
6236
+ }, [..._cache[55] || (_cache[55] = [(0, vue.createElementVNode)("span", { class: "material-icons text-base" }, "close", -1)])], 8, _hoisted_72)
6237
+ ])) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("table", _hoisted_73, [(0, vue.createElementVNode)("thead", null, [(0, vue.createElementVNode)("tr", _hoisted_74, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(listColumnFields.value, ([key, field]) => {
6033
6238
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("th", {
6034
6239
  key,
6035
6240
  "aria-sort": (0, vue.unref)(_mulmoclaude_core_collection.isSortableField)(field) ? sortAriaValue(key) : void 0,
6036
6241
  class: "px-5 py-3 font-bold text-slate-500 text-left uppercase tracking-wider whitespace-nowrap"
6037
- }, [(0, vue.createElementVNode)("div", _hoisted_68, [(0, vue.createElementVNode)("span", {
6242
+ }, [(0, vue.createElementVNode)("div", _hoisted_76, [(0, vue.createElementVNode)("span", {
6038
6243
  class: "truncate max-w-[14rem]",
6039
6244
  title: field.label
6040
- }, (0, vue.toDisplayString)(field.label), 9, _hoisted_69), (0, vue.unref)(_mulmoclaude_core_collection.isSortableField)(field) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
6245
+ }, (0, vue.toDisplayString)(field.label), 9, _hoisted_77), (0, vue.unref)(_mulmoclaude_core_collection.isSortableField)(field) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
6041
6246
  key: 0,
6042
6247
  type: "button",
6043
6248
  class: (0, vue.normalizeClass)(["inline-flex items-center justify-center rounded p-0.5 -my-1 leading-none transition-colors", sortButtonClass(key)]),
@@ -6046,8 +6251,8 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6046
6251
  onClick: (0, vue.withModifiers)(($event) => cycleSort(key), ["stop"]),
6047
6252
  onPointerenter: ($event) => hoveredSortKey.value = key,
6048
6253
  onPointerleave: _cache[17] || (_cache[17] = ($event) => hoveredSortKey.value = null)
6049
- }, [(0, vue.createElementVNode)("span", _hoisted_71, (0, vue.toDisplayString)(sortIconName(key)), 1)], 42, _hoisted_70)) : (0, vue.createCommentVNode)("", true)])], 8, _hoisted_67);
6050
- }), 128))])]), (0, vue.createElementVNode)("tbody", _hoisted_72, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(sortedItems.value, (item) => {
6254
+ }, [(0, vue.createElementVNode)("span", _hoisted_79, (0, vue.toDisplayString)(sortIconName(key)), 1)], 42, _hoisted_78)) : (0, vue.createCommentVNode)("", true)])], 8, _hoisted_75);
6255
+ }), 128))])]), (0, vue.createElementVNode)("tbody", _hoisted_80, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(sortedItems.value, (item) => {
6051
6256
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("tr", {
6052
6257
  key: String(item[collection.value.schema.primaryKey] ?? ""),
6053
6258
  class: (0, vue.normalizeClass)(["hover:bg-slate-50/70 cursor-pointer transition-colors focus:outline-none focus:bg-indigo-50/30", isRowOpen(item) || isEditingRow(item) ? "bg-indigo-50/40" : ""]),
@@ -6071,7 +6276,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6071
6276
  "aria-label": field.label,
6072
6277
  onClick: _cache[18] || (_cache[18] = (0, vue.withModifiers)(() => {}, ["stop"])),
6073
6278
  onChange: ($event) => commitToggle(item, field)
6074
- }, null, 40, _hoisted_74)) : field.type === "boolean" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("input", {
6279
+ }, null, 40, _hoisted_82)) : field.type === "boolean" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("input", {
6075
6280
  key: 1,
6076
6281
  type: "checkbox",
6077
6282
  checked: item[key] === true,
@@ -6081,13 +6286,13 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6081
6286
  "aria-label": field.label,
6082
6287
  onClick: _cache[19] || (_cache[19] = (0, vue.withModifiers)(() => {}, ["stop"])),
6083
6288
  onChange: ($event) => commitInlineEdit(item, String(key), field, $event.target.checked)
6084
- }, null, 40, _hoisted_75)) : field.type === "flag" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
6289
+ }, null, 40, _hoisted_83)) : field.type === "flag" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
6085
6290
  key: 2,
6086
6291
  class: (0, vue.normalizeClass)(["material-icons text-lg align-middle", flagValueOf(String(key), item) ? "text-emerald-600" : "text-slate-300"]),
6087
6292
  "data-testid": `collections-flag-${key}-${item[collection.value.schema.primaryKey]}`,
6088
6293
  "aria-label": `${field.label}: ${(0, vue.unref)(t)(flagValueOf(String(key), item) ? "common.yes" : "common.no")}`,
6089
6294
  role: "img"
6090
- }, (0, vue.toDisplayString)(flagValueOf(String(key), item) ? "check_circle" : "radio_button_unchecked"), 11, _hoisted_76)) : field.type === "ref" && field.to && typeof item[key] === "string" && item[key] ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_77, [(0, vue.createElementVNode)("a", {
6295
+ }, (0, vue.toDisplayString)(flagValueOf(String(key), item) ? "check_circle" : "radio_button_unchecked"), 11, _hoisted_84)) : field.type === "ref" && field.to && typeof item[key] === "string" && item[key] ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_85, [(0, vue.createElementVNode)("a", {
6091
6296
  href: (0, vue.unref)(cui).recordHref?.(field.to, String(item[key])),
6092
6297
  tabindex: (0, vue.unref)(cui).recordHref?.(field.to, String(item[key])) ? void 0 : 0,
6093
6298
  role: "link",
@@ -6095,7 +6300,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6095
6300
  "data-testid": `collections-ref-link-${key}-${item[key]}`,
6096
6301
  onClick: ($event) => (0, vue.unref)(activateRefLink)($event, field.to, String(item[key]), true),
6097
6302
  onKeydown: [(0, vue.withKeys)(($event) => (0, vue.unref)(activateRefLink)($event, field.to, String(item[key]), true), ["enter"]), (0, vue.withKeys)(($event) => (0, vue.unref)(activateRefLink)($event, field.to, String(item[key]), true), ["space"])]
6098
- }, (0, vue.toDisplayString)((0, vue.unref)(refDisplay)(field.to, String(item[key]))), 41, _hoisted_78)])) : field.type === "enum" && Array.isArray(field.values) && field.values.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("select", {
6303
+ }, (0, vue.toDisplayString)((0, vue.unref)(refDisplay)(field.to, String(item[key]))), 41, _hoisted_86)])) : field.type === "enum" && Array.isArray(field.values) && field.values.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("select", {
6099
6304
  key: 4,
6100
6305
  value: item[key] == null ? "" : String(item[key]),
6101
6306
  disabled: isReadOnly.value || isRowInlineSaving(item),
@@ -6104,16 +6309,16 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6104
6309
  "aria-label": field.label,
6105
6310
  onClick: _cache[20] || (_cache[20] = (0, vue.withModifiers)(() => {}, ["stop"])),
6106
6311
  onChange: ($event) => commitInlineEdit(item, String(key), field, $event.target.value)
6107
- }, [showEnumPlaceholder(item, String(key)) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("option", _hoisted_80, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.selectPlaceholder")), 1)) : (0, vue.createCommentVNode)("", true), ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(field.values, (value) => {
6312
+ }, [showEnumPlaceholder(item, String(key)) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("option", _hoisted_88, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.selectPlaceholder")), 1)) : (0, vue.createCommentVNode)("", true), ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(field.values, (value) => {
6108
6313
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("option", {
6109
6314
  key: value,
6110
6315
  value
6111
- }, (0, vue.toDisplayString)(value), 9, _hoisted_81);
6112
- }), 128))], 42, _hoisted_79)) : field.type === "money" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_82, (0, vue.toDisplayString)((0, vue.unref)(formatMoney)(item[key], (0, vue.unref)(resolveCurrency)(field, item), (0, vue.unref)(locale))), 1)) : field.type === "table" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_83, [_cache[55] || (_cache[55] = (0, vue.createElementVNode)("span", { class: "material-icons text-[11px]" }, "list", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(tableSummary(item[key])), 1)])) : field.type === "derived" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_84, (0, vue.toDisplayString)((0, vue.unref)(derivedDisplay)(field, (0, vue.unref)(evaluateDerivedAgainstItem)(field, String(key), item), item)), 1)) : field.type === "rollup" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
6316
+ }, (0, vue.toDisplayString)(value), 9, _hoisted_89);
6317
+ }), 128))], 42, _hoisted_87)) : field.type === "money" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_90, (0, vue.toDisplayString)((0, vue.unref)(formatMoney)(item[key], (0, vue.unref)(resolveCurrency)(field, item), (0, vue.unref)(locale))), 1)) : field.type === "table" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_91, [_cache[57] || (_cache[57] = (0, vue.createElementVNode)("span", { class: "material-icons text-[11px]" }, "list", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(tableSummary(item[key])), 1)])) : field.type === "derived" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_92, (0, vue.toDisplayString)((0, vue.unref)(derivedDisplay)(field, (0, vue.unref)(evaluateDerivedAgainstItem)(field, String(key), item), item)), 1)) : field.type === "rollup" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
6113
6318
  key: 8,
6114
6319
  class: "inline-block truncate tabular-nums font-bold text-indigo-900 bg-indigo-50/50 px-1.5 py-0.5 rounded border border-indigo-100/50",
6115
6320
  "data-testid": `collections-rollup-${key}-${item[collection.value.schema.primaryKey]}`
6116
- }, (0, vue.toDisplayString)((0, vue.unref)(render).rollupDisplay(field, item)), 9, _hoisted_85)) : field.type !== "file" && (0, vue.unref)(isExternalUrl)(item[key]) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
6321
+ }, (0, vue.toDisplayString)((0, vue.unref)(render).rollupDisplay(field, item)), 9, _hoisted_93)) : field.type !== "file" && (0, vue.unref)(isExternalUrl)(item[key]) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
6117
6322
  key: 9,
6118
6323
  href: String(item[key]),
6119
6324
  target: "_blank",
@@ -6121,7 +6326,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6121
6326
  class: "block truncate text-blue-600 hover:text-blue-800 hover:underline font-semibold",
6122
6327
  "data-testid": `collections-url-link-${key}-${item[collection.value.schema.primaryKey]}`,
6123
6328
  onClick: _cache[21] || (_cache[21] = (0, vue.withModifiers)(() => {}, ["stop"]))
6124
- }, (0, vue.toDisplayString)(String(item[key])), 9, _hoisted_86)) : field.type === "file" && (0, vue.unref)(artifactUrl)(item[key]) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
6329
+ }, (0, vue.toDisplayString)(String(item[key])), 9, _hoisted_94)) : field.type === "file" && (0, vue.unref)(artifactUrl)(item[key]) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
6125
6330
  key: 10,
6126
6331
  href: (0, vue.unref)(artifactUrl)(item[key]) ?? void 0,
6127
6332
  target: "_blank",
@@ -6129,14 +6334,14 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6129
6334
  class: "block truncate text-blue-600 hover:text-blue-800 hover:underline font-semibold",
6130
6335
  "data-testid": `collections-file-link-${key}-${item[collection.value.schema.primaryKey]}`,
6131
6336
  onClick: _cache[22] || (_cache[22] = (0, vue.withModifiers)(() => {}, ["stop"]))
6132
- }, (0, vue.toDisplayString)(String(item[key])), 9, _hoisted_87)) : field.type === "file" && (0, vue.unref)(fileRoutePath)(item[key]) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
6337
+ }, (0, vue.toDisplayString)(String(item[key])), 9, _hoisted_95)) : field.type === "file" && (0, vue.unref)(fileRoutePath)(item[key]) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
6133
6338
  key: 11,
6134
6339
  href: (0, vue.unref)(fileRoutePath)(item[key]) ?? void 0,
6135
6340
  class: "block truncate text-blue-600 hover:text-blue-800 hover:underline font-semibold",
6136
6341
  "data-testid": `collections-file-link-${key}-${item[collection.value.schema.primaryKey]}`,
6137
6342
  onClick: ($event) => (0, vue.unref)(activatePathLink)($event, (0, vue.unref)(fileRoutePath)(item[key]) ?? "", true)
6138
- }, (0, vue.toDisplayString)(String(item[key])), 9, _hoisted_88)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_89, (0, vue.toDisplayString)((0, vue.unref)(formatCell)(item[key], field.type)), 1))], 64)) : (0, vue.createCommentVNode)("", true)]);
6139
- }), 128))], 42, _hoisted_73);
6343
+ }, (0, vue.toDisplayString)(String(item[key])), 9, _hoisted_96)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_97, (0, vue.toDisplayString)((0, vue.unref)(formatCell)(item[key], field.type)), 1))], 64)) : (0, vue.createCommentVNode)("", true)]);
6344
+ }), 128))], 42, _hoisted_81);
6140
6345
  }), 128))])])]))]),
6141
6346
  collection.value && (viewing.value || editing.value) && !(calendarActive.value && openDay.value) ? ((0, vue.openBlock)(), (0, vue.createBlock)(CollectionRecordModal_default, {
6142
6347
  key: 4,
@@ -6220,19 +6425,19 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6220
6425
  "data-testid": "collections-chat-modal",
6221
6426
  onClick: (0, vue.withModifiers)(closeChat, ["self"]),
6222
6427
  onKeydown: (0, vue.withKeys)(closeChat, ["esc"])
6223
- }, [(0, vue.createElementVNode)("div", _hoisted_90, [
6224
- (0, vue.createElementVNode)("header", _hoisted_91, [
6225
- _cache[57] || (_cache[57] = (0, vue.createElementVNode)("div", { class: "h-9 w-9 flex items-center justify-center rounded-xl bg-indigo-50 text-indigo-600 border border-indigo-100/50" }, [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "forum")], -1)),
6226
- (0, vue.createElementVNode)("div", _hoisted_92, [(0, vue.createElementVNode)("h2", _hoisted_93, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.chatTitle")), 1), (0, vue.createElementVNode)("span", _hoisted_94, (0, vue.toDisplayString)(collection.value.title), 1)]),
6428
+ }, [(0, vue.createElementVNode)("div", _hoisted_98, [
6429
+ (0, vue.createElementVNode)("header", _hoisted_99, [
6430
+ _cache[59] || (_cache[59] = (0, vue.createElementVNode)("div", { class: "h-9 w-9 flex items-center justify-center rounded-xl bg-indigo-50 text-indigo-600 border border-indigo-100/50" }, [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "forum")], -1)),
6431
+ (0, vue.createElementVNode)("div", _hoisted_100, [(0, vue.createElementVNode)("h2", _hoisted_101, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.chatTitle")), 1), (0, vue.createElementVNode)("span", _hoisted_102, (0, vue.toDisplayString)(collection.value.title), 1)]),
6227
6432
  (0, vue.createElementVNode)("button", {
6228
6433
  type: "button",
6229
6434
  class: "h-8 w-8 flex items-center justify-center rounded text-slate-400 hover:bg-slate-200/50 hover:text-slate-600 transition-colors",
6230
6435
  "aria-label": (0, vue.unref)(t)("common.close"),
6231
6436
  "data-testid": "collections-chat-close",
6232
6437
  onClick: closeChat
6233
- }, [..._cache[56] || (_cache[56] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_95)
6438
+ }, [..._cache[58] || (_cache[58] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_103)
6234
6439
  ]),
6235
- (0, vue.createElementVNode)("div", _hoisted_96, [(0, vue.withDirectives)((0, vue.createElementVNode)("textarea", {
6440
+ (0, vue.createElementVNode)("div", _hoisted_104, [(0, vue.withDirectives)((0, vue.createElementVNode)("textarea", {
6236
6441
  ref_key: "chatInputEl",
6237
6442
  ref: chatInputEl,
6238
6443
  "onUpdate:modelValue": _cache[27] || (_cache[27] = ($event) => chatMessage.value = $event),
@@ -6241,8 +6446,8 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6241
6446
  class: "w-full bg-slate-50 border border-slate-200/80 rounded-xl px-3 py-2.5 text-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 focus:bg-white transition-all resize-none",
6242
6447
  "data-testid": "collections-chat-input",
6243
6448
  onKeydown: [(0, vue.withKeys)((0, vue.withModifiers)(submitChat, ["meta"]), ["enter"]), (0, vue.withKeys)((0, vue.withModifiers)(submitChat, ["ctrl"]), ["enter"])]
6244
- }, null, 40, _hoisted_97), [[vue.vModelText, chatMessage.value]])]),
6245
- (0, vue.createElementVNode)("footer", _hoisted_98, [(0, vue.createElementVNode)("button", {
6449
+ }, null, 40, _hoisted_105), [[vue.vModelText, chatMessage.value]])]),
6450
+ (0, vue.createElementVNode)("footer", _hoisted_106, [(0, vue.createElementVNode)("button", {
6246
6451
  type: "button",
6247
6452
  class: "h-8 px-2.5 rounded text-xs font-bold text-slate-500 hover:bg-slate-200/50 transition-colors",
6248
6453
  "data-testid": "collections-chat-cancel",
@@ -6253,7 +6458,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6253
6458
  disabled: !chatMessage.value.trim(),
6254
6459
  "data-testid": "collections-chat-send",
6255
6460
  onClick: submitChat
6256
- }, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.chatStart")), 9, _hoisted_99)])
6461
+ }, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.chatStart")), 9, _hoisted_107)])
6257
6462
  ])], 32)) : (0, vue.createCommentVNode)("", true)
6258
6463
  ]);
6259
6464
  };
@@ -6570,7 +6775,7 @@ var CollectionOntologyGraphView_default = /* @__PURE__ */ (0, vue.defineComponen
6570
6775
  edges: []
6571
6776
  });
6572
6777
  let instance = null;
6573
- const nodeSize = (node) => node.missing ? 14 : Math.min(40, 20 + Math.round(Math.log2(node.recordCount + 1) * 4));
6778
+ const nodeSize = (node) => node.missing ? 14 : Math.min(40, 20 + Math.round(Math.log2((node.recordCount ?? 0) + 1) * 4));
6574
6779
  const nodeItem = (node) => ({
6575
6780
  id: node.slug,
6576
6781
  name: node.title,
@@ -6601,7 +6806,8 @@ var CollectionOntologyGraphView_default = /* @__PURE__ */ (0, vue.defineComponen
6601
6806
  });
6602
6807
  const nodeTooltip = (data) => {
6603
6808
  if (data.missing) return `<b>${(0, _mulmoclaude_core_wiki.escapeHtml)(data.id)}</b><br>${(0, _mulmoclaude_core_wiki.escapeHtml)(t("collectionsView.mapMissingHint"))}`;
6604
- return `<b>${(0, _mulmoclaude_core_wiki.escapeHtml)(data.name)}</b><br>${(0, _mulmoclaude_core_wiki.escapeHtml)(data.id)} · ${(0, _mulmoclaude_core_wiki.escapeHtml)(t("collectionsView.mapRecordCount", { count: data.recordCount }))}`;
6809
+ const count = data.recordCount === null ? t("collectionsView.mapRecordCountUnknown") : t("collectionsView.mapRecordCount", { count: data.recordCount });
6810
+ return `<b>${(0, _mulmoclaude_core_wiki.escapeHtml)(data.name)}</b><br>${(0, _mulmoclaude_core_wiki.escapeHtml)(data.id)} · ${(0, _mulmoclaude_core_wiki.escapeHtml)(count)}`;
6605
6811
  };
6606
6812
  const edgeTooltip = (data) => {
6607
6813
  const reverse = data.reverseFields?.length ? ` ⇄ ${data.reverseFields.join(", ")}` : "";