@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.
- package/dist/module.json +1 -1
- package/dist/runtime/components/ADocRenderer.vue +6 -3
- package/dist/runtime/components/ADocSubPageList.vue +1 -0
- package/dist/runtime/components/ADocumentTree.vue +1 -0
- package/dist/runtime/components/AEditor.d.vue.ts +10 -10
- package/dist/runtime/components/AEditor.vue +246 -235
- package/dist/runtime/components/AEditor.vue.d.ts +10 -10
- package/dist/runtime/components/ANodePanel.d.vue.ts +10 -0
- package/dist/runtime/components/ANodePanel.vue +40 -12
- package/dist/runtime/components/ANodePanel.vue.d.ts +10 -0
- package/dist/runtime/components/ANodeSettingsPanel.d.vue.ts +8 -0
- package/dist/runtime/components/ANodeSettingsPanel.vue +22 -8
- package/dist/runtime/components/ANodeSettingsPanel.vue.d.ts +8 -0
- package/dist/runtime/components/renderers/ACalendarRenderer.vue +1 -0
- package/dist/runtime/components/renderers/AChartRenderer.client.vue +1 -0
- package/dist/runtime/components/renderers/AChecklistRenderer.vue +1 -0
- package/dist/runtime/components/renderers/ADashboardRenderer.vue +1 -0
- package/dist/runtime/components/renderers/AGalleryRenderer.vue +1 -0
- package/dist/runtime/components/renderers/AGraphRenderer.vue +1 -0
- package/dist/runtime/components/renderers/AKanbanRenderer.vue +1 -0
- package/dist/runtime/components/renderers/AMapRenderer.vue +1 -0
- package/dist/runtime/components/renderers/AMediaRenderer.vue +1 -0
- package/dist/runtime/components/renderers/AOutlineRenderer.vue +1 -0
- package/dist/runtime/components/renderers/AOverviewRenderer.vue +1 -0
- package/dist/runtime/components/renderers/ASheetsRenderer.client.vue +1 -0
- package/dist/runtime/components/renderers/ASlidesRenderer.vue +1 -0
- package/dist/runtime/components/renderers/ATableRenderer.vue +1 -0
- package/dist/runtime/components/renderers/ATimelineRenderer.vue +1 -0
- package/dist/runtime/components/shell/ADocPanelSettings.d.vue.ts +8 -0
- package/dist/runtime/components/shell/ADocPanelSettings.vue +5 -2
- package/dist/runtime/components/shell/ADocPanelSettings.vue.d.ts +8 -0
- package/dist/runtime/composables/useNodePanel.d.ts +11 -4
- package/dist/runtime/composables/useNodePanel.js +2 -17
- package/dist/runtime/composables/useProviderRole.d.ts +17 -0
- package/dist/runtime/composables/useProviderRole.js +22 -0
- package/dist/runtime/extensions/views/DocLinkView.vue +5 -4
- package/dist/runtime/extensions/views/DocumentMetaView.vue +50 -0
- 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>
|