@abraca/nuxt 2.52.0 → 2.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/ADocRenderer.vue +6 -3
  3. package/dist/runtime/components/ADocSubPageList.vue +1 -0
  4. package/dist/runtime/components/ADocumentTree.vue +1 -0
  5. package/dist/runtime/components/AEditor.d.vue.ts +10 -10
  6. package/dist/runtime/components/AEditor.vue +246 -235
  7. package/dist/runtime/components/AEditor.vue.d.ts +10 -10
  8. package/dist/runtime/components/ANodePanel.d.vue.ts +10 -0
  9. package/dist/runtime/components/ANodePanel.vue +40 -12
  10. package/dist/runtime/components/ANodePanel.vue.d.ts +10 -0
  11. package/dist/runtime/components/ANodeSettingsPanel.d.vue.ts +8 -0
  12. package/dist/runtime/components/ANodeSettingsPanel.vue +22 -8
  13. package/dist/runtime/components/ANodeSettingsPanel.vue.d.ts +8 -0
  14. package/dist/runtime/components/renderers/ACalendarRenderer.vue +1 -0
  15. package/dist/runtime/components/renderers/AChartRenderer.client.vue +1 -0
  16. package/dist/runtime/components/renderers/AChecklistRenderer.vue +1 -0
  17. package/dist/runtime/components/renderers/ADashboardRenderer.vue +1 -0
  18. package/dist/runtime/components/renderers/AGalleryRenderer.vue +1 -0
  19. package/dist/runtime/components/renderers/AGraphRenderer.vue +1 -0
  20. package/dist/runtime/components/renderers/AKanbanRenderer.vue +1 -0
  21. package/dist/runtime/components/renderers/AMapRenderer.vue +1 -0
  22. package/dist/runtime/components/renderers/AMediaRenderer.vue +1 -0
  23. package/dist/runtime/components/renderers/AOutlineRenderer.vue +1 -0
  24. package/dist/runtime/components/renderers/AOverviewRenderer.vue +1 -0
  25. package/dist/runtime/components/renderers/ASheetsRenderer.client.vue +1 -0
  26. package/dist/runtime/components/renderers/ASlidesRenderer.vue +1 -0
  27. package/dist/runtime/components/renderers/ATableRenderer.vue +1 -0
  28. package/dist/runtime/components/renderers/ATimelineRenderer.vue +1 -0
  29. package/dist/runtime/components/shell/ADocPanelSettings.d.vue.ts +8 -0
  30. package/dist/runtime/components/shell/ADocPanelSettings.vue +5 -2
  31. package/dist/runtime/components/shell/ADocPanelSettings.vue.d.ts +8 -0
  32. package/dist/runtime/composables/useNodePanel.d.ts +11 -4
  33. package/dist/runtime/composables/useNodePanel.js +2 -17
  34. package/dist/runtime/composables/useProviderRole.d.ts +17 -0
  35. package/dist/runtime/composables/useProviderRole.js +22 -0
  36. package/dist/runtime/extensions/views/DocLinkView.vue +5 -4
  37. package/dist/runtime/extensions/views/DocumentMetaView.vue +50 -0
  38. package/package.json +1 -1
@@ -21,6 +21,35 @@ const items = computed(() => {
21
21
  void props.node.content.size;
22
22
  return buildMetaMenuItems(props.editor);
23
23
  });
24
+ const pageMeta = computed(
25
+ () => props.editor.storage?.metaField?.pageMeta ?? null
26
+ );
27
+ const fallbackChips = computed(() => {
28
+ if (editable.value || props.node.childCount > 0) return [];
29
+ const m = pageMeta.value;
30
+ if (!m) return [];
31
+ const chips = [];
32
+ if (m.status && m.status !== "none") chips.push({ icon: "i-lucide-circle-dot", label: String(m.status) });
33
+ if (typeof m.priority === "number" && m.priority > 0) chips.push({ icon: "i-lucide-flag", label: `P${m.priority}` });
34
+ if (typeof m.rating === "number" && m.rating > 0) chips.push({ icon: "i-lucide-star", label: `${m.rating}/5` });
35
+ if (m.dateStart || m.dateEnd) chips.push({ icon: "i-lucide-calendar", label: [m.dateStart, m.dateEnd].filter(Boolean).join(" \u2192 ") });
36
+ if (Array.isArray(m.members)) {
37
+ for (const mem of m.members) {
38
+ if (mem?.label) chips.push({ icon: "i-lucide-user", label: mem.label });
39
+ }
40
+ }
41
+ if (Array.isArray(m.tags)) {
42
+ for (const t of m.tags) chips.push({ icon: "i-lucide-tag", label: t });
43
+ }
44
+ if (m.url) chips.push({ icon: "i-lucide-link", label: String(m.url) });
45
+ if (m.email) chips.push({ icon: "i-lucide-mail", label: String(m.email) });
46
+ if (m.phone) chips.push({ icon: "i-lucide-phone", label: String(m.phone) });
47
+ if (typeof m.number === "number") chips.push({ icon: "i-lucide-hash", label: `${m.number}${m.unit ? ` ${m.unit}` : ""}` });
48
+ return chips;
49
+ });
50
+ const hiddenWhenEmpty = computed(
51
+ () => !editable.value && props.node.childCount === 0 && fallbackChips.value.length === 0
52
+ );
24
53
  function placeCursorInMeta(event) {
25
54
  const target = event.target;
26
55
  if (!target) return;
@@ -56,6 +85,7 @@ function placeCursorInMeta(event) {
56
85
  as="div"
57
86
  data-type="document-meta"
58
87
  class="group/meta"
88
+ :class="{ 'meta-hidden': hiddenWhenEmpty }"
59
89
  draggable="false"
60
90
  @mousedown="placeCursorInMeta"
61
91
  @dragstart.prevent.stop
@@ -68,6 +98,22 @@ function placeCursorInMeta(event) {
68
98
  class="meta-content"
69
99
  style="display: contents"
70
100
  />
101
+ <!-- Read-only fallback: static chips from the doc-tree meta when no
102
+ metaField chips were ever materialized in the content. -->
103
+ <template v-if="!editable && props.node.childCount === 0">
104
+ <UBadge
105
+ v-for="(chip, i) in fallbackChips"
106
+ :key="`${chip.icon}-${chip.label}-${i}`"
107
+ :icon="chip.icon"
108
+ color="neutral"
109
+ variant="soft"
110
+ size="sm"
111
+ class="rounded-full"
112
+ contenteditable="false"
113
+ >
114
+ {{ chip.label }}
115
+ </UBadge>
116
+ </template>
71
117
  <span
72
118
  v-show="editable"
73
119
  contenteditable="false"
@@ -89,3 +135,7 @@ function placeCursorInMeta(event) {
89
135
  </span>
90
136
  </NodeViewWrapper>
91
137
  </template>
138
+
139
+ <style scoped>
140
+ .meta-hidden{display:none!important}
141
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abraca/nuxt",
3
- "version": "2.52.0",
3
+ "version": "2.53.0",
4
4
  "description": "First-class Nuxt module for the Abracadabra CRDT collaboration platform",
5
5
  "repository": "abracadabra/abracadabra-nuxt",
6
6
  "license": "MIT",