@abraca/nuxt 2.29.0 → 2.31.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/module.mjs +8 -1
- package/dist/runtime/assets/identity-palettes.css +1 -0
- package/dist/runtime/components/ABacklinks.d.vue.ts +20 -0
- package/dist/runtime/components/ABacklinks.vue +53 -0
- package/dist/runtime/components/ABacklinks.vue.d.ts +20 -0
- package/dist/runtime/components/AEditor.d.vue.ts +2 -2
- package/dist/runtime/components/AEditor.vue.d.ts +2 -2
- package/dist/runtime/components/ANodePanel.vue +9 -0
- package/dist/runtime/components/chat/AChatInput.d.vue.ts +1 -1
- package/dist/runtime/components/chat/AChatInput.vue.d.ts +1 -1
- package/dist/runtime/components/chat/AChatMessages.d.vue.ts +1 -1
- package/dist/runtime/components/chat/AChatMessages.vue.d.ts +1 -1
- package/dist/runtime/components/chat/AChatPanel.d.vue.ts +1 -1
- package/dist/runtime/components/chat/AChatPanel.vue.d.ts +1 -1
- package/dist/runtime/components/chat/ANodeChatPanel.d.vue.ts +1 -1
- package/dist/runtime/components/chat/ANodeChatPanel.vue.d.ts +1 -1
- package/dist/runtime/components/docs/ADocsNavigation.d.vue.ts +1 -1
- package/dist/runtime/components/docs/ADocsNavigation.vue.d.ts +1 -1
- package/dist/runtime/components/docs/ADocsSearch.d.vue.ts +1 -1
- package/dist/runtime/components/docs/ADocsSearch.vue.d.ts +1 -1
- package/dist/runtime/components/docs/ADocsSearchButton.d.vue.ts +1 -1
- package/dist/runtime/components/docs/ADocsSearchButton.vue.d.ts +1 -1
- package/dist/runtime/components/editor/AMetaNumberStepper.d.vue.ts +1 -1
- package/dist/runtime/components/editor/AMetaNumberStepper.vue.d.ts +1 -1
- package/dist/runtime/components/renderers/AProseRenderer.d.vue.ts +2 -2
- package/dist/runtime/components/renderers/AProseRenderer.vue.d.ts +2 -2
- package/dist/runtime/components/shell/AWelcomeScreen.d.vue.ts +1 -1
- package/dist/runtime/components/shell/AWelcomeScreen.vue.d.ts +1 -1
- package/dist/runtime/composables/useBacklinks.d.ts +21 -0
- package/dist/runtime/composables/useBacklinks.js +36 -0
- package/dist/runtime/extensions/views/DocEmbedView.vue +3 -1
- package/dist/runtime/extensions/views/DocLinkView.vue +3 -1
- package/dist/runtime/utils/normalizeIconName.d.ts +10 -0
- package/dist/runtime/utils/normalizeIconName.js +6 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -372,6 +372,7 @@ const module$1 = defineNuxtModule({
|
|
|
372
372
|
"@scure/base"
|
|
373
373
|
])
|
|
374
374
|
];
|
|
375
|
+
nuxt.options.css.unshift(resolver.resolve("./runtime/assets/identity-palettes.css"));
|
|
375
376
|
nuxt.options.css.push(resolver.resolve("./runtime/assets/aware-tokens.css"));
|
|
376
377
|
if (options.features?.editor !== false) {
|
|
377
378
|
nuxt.options.css.push(resolver.resolve("./runtime/assets/editor.css"));
|
|
@@ -439,7 +440,13 @@ const module$1 = defineNuxtModule({
|
|
|
439
440
|
addImports([
|
|
440
441
|
{ name: "slugify", from: resolver.resolve("./runtime/utils/slugify") },
|
|
441
442
|
{ name: "buildSlugMap", from: resolver.resolve("./runtime/utils/slugify") },
|
|
442
|
-
{ name: "isUUID", from: resolver.resolve("./runtime/utils/slugify") }
|
|
443
|
+
{ name: "isUUID", from: resolver.resolve("./runtime/utils/slugify") },
|
|
444
|
+
// Doc-reference scanner — public API for backlinks + the graph page type.
|
|
445
|
+
// (useBacklinks wraps this; apps building custom reference UIs use it directly.)
|
|
446
|
+
{ name: "scanDocReferences", from: resolver.resolve("./runtime/utils/docReferenceEdges") },
|
|
447
|
+
{ name: "useDocReferenceEdges", from: resolver.resolve("./runtime/utils/docReferenceEdges") },
|
|
448
|
+
// Coerce legacy bare Lucide names ("map") to prefixed ("i-lucide-map").
|
|
449
|
+
{ name: "normalizeIconName", from: resolver.resolve("./runtime/utils/normalizeIconName") }
|
|
443
450
|
]);
|
|
444
451
|
addComponentsDir({
|
|
445
452
|
path: resolver.resolve("./runtime/components/aware"),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--color-bark-50:#faf8f6;--color-bark-100:#f3eee8;--color-bark-200:#e7dcd1;--color-bark-300:#d6c4b1;--color-bark-400:#bfa58a;--color-bark-500:#a68868;--color-bark-600:#8d7054;--color-bark-700:#745b44;--color-bark-800:#604c3a;--color-bark-900:#504031;--color-bark-950:#2d231b;--color-bedrock-50:#fafafa;--color-bedrock-100:#f4f4f5;--color-bedrock-200:#e4e4e7;--color-bedrock-300:#d4d4d8;--color-bedrock-400:#a1a1aa;--color-bedrock-500:#71717a;--color-bedrock-600:#52525b;--color-bedrock-700:#3f3f46;--color-bedrock-800:#27272a;--color-bedrock-900:#18181b;--color-bedrock-950:#09090b;--color-blush-50:#fef6f7;--color-blush-100:#fdeef0;--color-blush-200:#fce0e4;--color-blush-300:#f9c5cd;--color-blush-400:#f49ba9;--color-blush-500:#ea6d81;--color-blush-600:#d74b61;--color-blush-700:#b53847;--color-blush-800:#973242;--color-blush-900:#812f3e;--color-blush-950:#48151c;--color-chartreuse-50:#f8fee7;--color-chartreuse-100:#effbcc;--color-chartreuse-200:#ddf79e;--color-chartreuse-300:#c5ee64;--color-chartreuse-400:#aee035;--color-chartreuse-500:#90c318;--color-chartreuse-600:#6f9b0f;--color-chartreuse-700:#567611;--color-chartreuse-800:#455d14;--color-chartreuse-900:#3a4f16;--color-chartreuse-950:#1e2c07;--color-cobblestone-50:#f8fafc;--color-cobblestone-100:#f1f5f9;--color-cobblestone-200:#e2e8f0;--color-cobblestone-300:#cbd5e1;--color-cobblestone-400:#94a3b8;--color-cobblestone-500:#64748b;--color-cobblestone-600:#475569;--color-cobblestone-700:#334155;--color-cobblestone-800:#1e293b;--color-cobblestone-900:#0f172a;--color-cobblestone-950:#020617;--color-copper-50:#fdf8f6;--color-copper-100:#f3ebe5;--color-copper-200:#e8d5ca;--color-copper-300:#d9b8a5;--color-copper-400:#c89378;--color-copper-500:#b87356;--color-copper-600:#a45c45;--color-copper-700:#884b3a;--color-copper-800:#704035;--color-copper-900:#5c3730;--color-copper-950:#321c18;--color-coral-50:#fff5f1;--color-coral-100:#ffe8de;--color-coral-200:#ffd0bc;--color-coral-300:#ffb08f;--color-coral-400:#ff8657;--color-coral-500:#ff6630;--color-coral-600:#f04e18;--color-coral-700:#c73b12;--color-coral-800:#9e3215;--color-coral-900:#802e17;--color-coral-950:#45140a;--color-cream-50:#fefdfb;--color-cream-100:#fdf9f3;--color-cream-200:#faf3e8;--color-cream-300:#f5ead7;--color-cream-400:#eddfc5;--color-cream-500:#e0cba8;--color-cream-600:#c9ad86;--color-cream-700:#a88a65;--color-cream-800:#8a7154;--color-cream-900:#6d5a47;--color-cream-950:#3d3327;--color-dusk-50:#f8f7fb;--color-dusk-100:#f0eef6;--color-dusk-200:#e3dfee;--color-dusk-300:#cec7e0;--color-dusk-400:#b3a8cd;--color-dusk-500:#9688b8;--color-dusk-600:#7d6da0;--color-dusk-700:#685a85;--color-dusk-800:#564b6e;--color-dusk-900:#48405b;--color-dusk-950:#2d283a;--color-fog-50:#f7f8fa;--color-fog-100:#eef0f5;--color-fog-200:#dfe4ec;--color-fog-300:#c8cfdc;--color-fog-400:#a9b4c7;--color-fog-500:#8b97ae;--color-fog-600:#727e96;--color-fog-700:#5f687c;--color-fog-800:#505766;--color-fog-900:#434a55;--color-fog-950:#2a2e36;--color-jade-50:#effef6;--color-jade-100:#d8fce9;--color-jade-200:#b4f7d5;--color-jade-300:#7aefb8;--color-jade-400:#3bdf95;--color-jade-500:#18c677;--color-jade-600:#0da35f;--color-jade-700:#0e824e;--color-jade-800:#116740;--color-jade-900:#105436;--color-jade-950:#042f1e;--color-lavender-50:#faf9fc;--color-lavender-100:#f3f1f8;--color-lavender-200:#ebe6f3;--color-lavender-300:#dcd2ea;--color-lavender-400:#c5b4dd;--color-lavender-500:#ab93cc;--color-lavender-600:#9276b8;--color-lavender-700:#7d62a0;--color-lavender-800:#685285;--color-lavender-900:#56446d;--color-lavender-950:#372b4a;--color-magenta-50:#fdf3fd;--color-magenta-100:#fbe5fb;--color-magenta-200:#f6cef5;--color-magenta-300:#f0a8eb;--color-magenta-400:#e675dc;--color-magenta-500:#d549c7;--color-magenta-600:#b82da6;--color-magenta-700:#982387;--color-magenta-800:#7d206e;--color-magenta-900:#671d5b;--color-magenta-950:#420638;--color-mauve-50:#faf8fb;--color-mauve-100:#f3eff6;--color-mauve-200:#e9e2ee;--color-mauve-300:#d8cae0;--color-mauve-400:#c0a9ce;--color-mauve-500:#a687b8;--color-mauve-600:#8d6a9f;--color-mauve-700:#765786;--color-mauve-800:#62496f;--color-mauve-900:#523f5c;--color-mauve-950:#33253a;--color-mint-50:#f0fdf7;--color-mint-100:#dcfce9;--color-mint-200:#bbf7d5;--color-mint-300:#86efb3;--color-mint-400:#4ade89;--color-mint-500:#22c563;--color-mint-600:#16a34d;--color-mint-700:#15803f;--color-mint-800:#166535;--color-mint-900:#14532d;--color-mint-950:#052e16;--color-mist-50:#f4f7fb;--color-mist-100:#e8eff6;--color-mist-200:#d6e3f0;--color-mist-300:#b8cfe5;--color-mist-400:#94b4d8;--color-mist-500:#7598ca;--color-mist-600:#607fbc;--color-mist-700:#536baa;--color-mist-800:#48598b;--color-mist-900:#3e4c6f;--color-mist-950:#293044;--color-moss-50:#f7f8f5;--color-moss-100:#eef0e9;--color-moss-200:#dde2d4;--color-moss-300:#c5ccb6;--color-moss-400:#a7b093;--color-moss-500:#8b9673;--color-moss-600:#717b5c;--color-moss-700:#5c644b;--color-moss-800:#4c533f;--color-moss-900:#404536;--color-moss-950:#23261d;--color-oxidized-50:#f0fdf9;--color-oxidized-100:#ccfbef;--color-oxidized-200:#99f6e0;--color-oxidized-300:#5fe9ce;--color-oxidized-400:#2dd4b8;--color-oxidized-500:#14b8a0;--color-oxidized-600:#0d9384;--color-oxidized-700:#0f766c;--color-oxidized-800:#115e57;--color-oxidized-900:#134e48;--color-oxidized-950:#042f2c;--color-peach-50:#fef8f3;--color-peach-100:#fef0e6;--color-peach-200:#fcddc2;--color-peach-300:#fac59d;--color-peach-400:#f7a46f;--color-peach-500:#f38744;--color-peach-600:#e46d28;--color-peach-700:#bd561e;--color-peach-800:#97461f;--color-peach-900:#7a3c1d;--color-peach-950:#421c0d;--color-sage-50:#f6f7f6;--color-sage-100:#e8ebe8;--color-sage-200:#d6dcd6;--color-sage-300:#b8c3b8;--color-sage-400:#95a595;--color-sage-500:#758875;--color-sage-600:#5d6e5d;--color-sage-700:#4b584b;--color-sage-800:#3e493e;--color-sage-900:#353d35;--color-sage-950:#1c211c;--color-sand-50:#faf9f6;--color-sand-100:#f3f0e8;--color-sand-200:#e7e0d0;--color-sand-300:#d5c9b0;--color-sand-400:#beac8a;--color-sand-500:#a3906e;--color-sand-600:#8a7659;--color-sand-700:#716149;--color-sand-800:#5e513f;--color-sand-900:#4e4336;--color-sand-950:#2c251e;--color-sapphire-50:#eef3ff;--color-sapphire-100:#dfe8ff;--color-sapphire-200:#c6d4ff;--color-sapphire-300:#a3b8ff;--color-sapphire-400:#7e93fd;--color-sapphire-500:#5d6ef6;--color-sapphire-600:#4149ea;--color-sapphire-700:#353bcf;--color-sapphire-800:#2d33a7;--color-sapphire-900:#2b3184;--color-sapphire-950:#1a1c4e;--color-wine-50:#faf7f8;--color-wine-100:#f5edef;--color-wine-200:#ebdce0;--color-wine-300:#dcc4cb;--color-wine-400:#c6a3ae;--color-wine-500:#ad8391;--color-wine-600:#946b78;--color-wine-700:#7c5864;--color-wine-800:#674953;--color-wine-900:#563f46;--color-wine-950:#302227}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
docId: string | null | undefined;
|
|
3
|
+
/** Section heading. Hidden when `hideTitle` is set. */
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Render without the heading row (e.g. when the parent provides one). */
|
|
6
|
+
hideTitle?: boolean;
|
|
7
|
+
/** Copy shown when nothing links here yet. */
|
|
8
|
+
emptyText?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
open: (id: string, label: string) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onOpen?: ((id: string, label: string) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
title: string;
|
|
16
|
+
hideTitle: boolean;
|
|
17
|
+
emptyText: string;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useBacklinks } from "../composables/useBacklinks";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
docId: { type: null, required: true },
|
|
6
|
+
title: { type: String, required: false, default: "Backlinks" },
|
|
7
|
+
hideTitle: { type: Boolean, required: false, default: false },
|
|
8
|
+
emptyText: { type: String, required: false, default: "No docs link here yet." }
|
|
9
|
+
});
|
|
10
|
+
const emit = defineEmits(["open"]);
|
|
11
|
+
const backlinks = useBacklinks(computed(() => props.docId));
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="space-y-2">
|
|
16
|
+
<div
|
|
17
|
+
v-if="!hideTitle"
|
|
18
|
+
class="flex items-center justify-between"
|
|
19
|
+
>
|
|
20
|
+
<label class="text-xs font-medium text-muted">{{ title }}</label>
|
|
21
|
+
<span
|
|
22
|
+
v-if="backlinks.length"
|
|
23
|
+
class="text-[10px] text-dimmed tabular-nums"
|
|
24
|
+
>{{ backlinks.length }}</span>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<p
|
|
28
|
+
v-if="!backlinks.length"
|
|
29
|
+
class="text-xs text-dimmed"
|
|
30
|
+
>
|
|
31
|
+
{{ emptyText }}
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
<div
|
|
35
|
+
v-else
|
|
36
|
+
class="space-y-0.5"
|
|
37
|
+
>
|
|
38
|
+
<UButton
|
|
39
|
+
v-for="bl in backlinks"
|
|
40
|
+
:key="bl.id"
|
|
41
|
+
:icon="bl.icon"
|
|
42
|
+
:label="bl.label"
|
|
43
|
+
color="neutral"
|
|
44
|
+
variant="ghost"
|
|
45
|
+
size="sm"
|
|
46
|
+
block
|
|
47
|
+
class="justify-start"
|
|
48
|
+
:title="bl.label"
|
|
49
|
+
@click="emit('open', bl.id, bl.label)"
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
docId: string | null | undefined;
|
|
3
|
+
/** Section heading. Hidden when `hideTitle` is set. */
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Render without the heading row (e.g. when the parent provides one). */
|
|
6
|
+
hideTitle?: boolean;
|
|
7
|
+
/** Copy shown when nothing links here yet. */
|
|
8
|
+
emptyText?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
open: (id: string, label: string) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onOpen?: ((id: string, label: string) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
title: string;
|
|
16
|
+
hideTitle: boolean;
|
|
17
|
+
emptyText: string;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
@@ -80,15 +80,15 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
80
80
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
81
81
|
rename: (label: string) => any;
|
|
82
82
|
ready: () => any;
|
|
83
|
-
update: (content: any) => any;
|
|
84
83
|
"update:modelValue": (value: any) => any;
|
|
85
84
|
updateMeta: (patch: Partial<DocPageMeta>) => any;
|
|
85
|
+
update: (content: any) => any;
|
|
86
86
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
87
87
|
onRename?: ((label: string) => any) | undefined;
|
|
88
88
|
onReady?: (() => any) | undefined;
|
|
89
|
-
onUpdate?: ((content: any) => any) | undefined;
|
|
90
89
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
91
90
|
onUpdateMeta?: ((patch: Partial<DocPageMeta>) => any) | undefined;
|
|
91
|
+
onUpdate?: ((content: any) => any) | undefined;
|
|
92
92
|
}>, {
|
|
93
93
|
contentType: "json" | "html" | "markdown";
|
|
94
94
|
editable: boolean;
|
|
@@ -80,15 +80,15 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
80
80
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
81
81
|
rename: (label: string) => any;
|
|
82
82
|
ready: () => any;
|
|
83
|
-
update: (content: any) => any;
|
|
84
83
|
"update:modelValue": (value: any) => any;
|
|
85
84
|
updateMeta: (patch: Partial<DocPageMeta>) => any;
|
|
85
|
+
update: (content: any) => any;
|
|
86
86
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
87
87
|
onRename?: ((label: string) => any) | undefined;
|
|
88
88
|
onReady?: (() => any) | undefined;
|
|
89
|
-
onUpdate?: ((content: any) => any) | undefined;
|
|
90
89
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
91
90
|
onUpdateMeta?: ((patch: Partial<DocPageMeta>) => any) | undefined;
|
|
91
|
+
onUpdate?: ((content: any) => any) | undefined;
|
|
92
92
|
}>, {
|
|
93
93
|
contentType: "json" | "html" | "markdown";
|
|
94
94
|
editable: boolean;
|
|
@@ -784,6 +784,15 @@ const addFieldMenuItems = computed(
|
|
|
784
784
|
</template>
|
|
785
785
|
</div>
|
|
786
786
|
</div>
|
|
787
|
+
|
|
788
|
+
<!-- Backlinks — docs that link to this one. Mounted only while the
|
|
789
|
+
Properties tab is active so the workspace-wide scan doesn't run
|
|
790
|
+
in the background. -->
|
|
791
|
+
<ABacklinks
|
|
792
|
+
v-if="activeTab === 'properties'"
|
|
793
|
+
:doc-id="nodeId"
|
|
794
|
+
@open="(id) => navigateTo(hrefFor(id))"
|
|
795
|
+
/>
|
|
787
796
|
</div>
|
|
788
797
|
|
|
789
798
|
<!-- Plugin slots -->
|
|
@@ -40,9 +40,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
40
40
|
}) => any) | undefined;
|
|
41
41
|
"onCancel-reply"?: (() => any) | undefined;
|
|
42
42
|
}>, {
|
|
43
|
-
replyTo: ReplyTarget | null;
|
|
44
43
|
placeholder: string;
|
|
45
44
|
autofocus: boolean;
|
|
45
|
+
replyTo: ReplyTarget | null;
|
|
46
46
|
canSend: boolean;
|
|
47
47
|
mentionUsers: ChatMentionUser[];
|
|
48
48
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -40,9 +40,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
40
40
|
}) => any) | undefined;
|
|
41
41
|
"onCancel-reply"?: (() => any) | undefined;
|
|
42
42
|
}>, {
|
|
43
|
-
replyTo: ReplyTarget | null;
|
|
44
43
|
placeholder: string;
|
|
45
44
|
autofocus: boolean;
|
|
45
|
+
replyTo: ReplyTarget | null;
|
|
46
46
|
canSend: boolean;
|
|
47
47
|
mentionUsers: ChatMentionUser[];
|
|
48
48
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -26,9 +26,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
26
26
|
"onOpen-doc"?: ((docId: string) => any) | undefined;
|
|
27
27
|
"onJump-to-quote"?: ((docId: string, from: number, to: number) => any) | undefined;
|
|
28
28
|
}>, {
|
|
29
|
+
emptyText: string;
|
|
29
30
|
currentUserId: string;
|
|
30
31
|
emptyIcon: string;
|
|
31
|
-
emptyText: string;
|
|
32
32
|
emptySubtext: string;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const _default: typeof __VLS_export;
|
|
@@ -26,9 +26,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
26
26
|
"onOpen-doc"?: ((docId: string) => any) | undefined;
|
|
27
27
|
"onJump-to-quote"?: ((docId: string, from: number, to: number) => any) | undefined;
|
|
28
28
|
}>, {
|
|
29
|
+
emptyText: string;
|
|
29
30
|
currentUserId: string;
|
|
30
31
|
emptyIcon: string;
|
|
31
|
-
emptyText: string;
|
|
32
32
|
emptySubtext: string;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const _default: typeof __VLS_export;
|
|
@@ -69,9 +69,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
|
69
69
|
}>, {
|
|
70
70
|
placeholder: string;
|
|
71
71
|
autofocus: boolean;
|
|
72
|
+
emptyText: string;
|
|
72
73
|
currentUserId: string;
|
|
73
74
|
emptyIcon: string;
|
|
74
|
-
emptyText: string;
|
|
75
75
|
emptySubtext: string;
|
|
76
76
|
canSend: boolean;
|
|
77
77
|
mentionUsers: ChatMentionUser[];
|
|
@@ -69,9 +69,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
|
69
69
|
}>, {
|
|
70
70
|
placeholder: string;
|
|
71
71
|
autofocus: boolean;
|
|
72
|
+
emptyText: string;
|
|
72
73
|
currentUserId: string;
|
|
73
74
|
emptyIcon: string;
|
|
74
|
-
emptyText: string;
|
|
75
75
|
emptySubtext: string;
|
|
76
76
|
canSend: boolean;
|
|
77
77
|
mentionUsers: ChatMentionUser[];
|
|
@@ -28,8 +28,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
28
28
|
}>, {
|
|
29
29
|
placeholder: string;
|
|
30
30
|
autofocus: boolean;
|
|
31
|
-
emptyIcon: string;
|
|
32
31
|
emptyText: string;
|
|
32
|
+
emptyIcon: string;
|
|
33
33
|
emptySubtext: string;
|
|
34
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
35
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -28,8 +28,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
28
28
|
}>, {
|
|
29
29
|
placeholder: string;
|
|
30
30
|
autofocus: boolean;
|
|
31
|
-
emptyIcon: string;
|
|
32
31
|
emptyText: string;
|
|
32
|
+
emptyIcon: string;
|
|
33
33
|
emptySubtext: string;
|
|
34
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
35
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -142,8 +142,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
|
|
|
142
142
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
143
143
|
}>, {
|
|
144
144
|
type: string;
|
|
145
|
-
disabled: boolean;
|
|
146
145
|
as: any;
|
|
146
|
+
disabled: boolean;
|
|
147
147
|
level: number;
|
|
148
148
|
collapsible: boolean;
|
|
149
149
|
highlight: boolean;
|
|
@@ -142,8 +142,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
|
|
|
142
142
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
143
143
|
}>, {
|
|
144
144
|
type: string;
|
|
145
|
-
disabled: boolean;
|
|
146
145
|
as: any;
|
|
146
|
+
disabled: boolean;
|
|
147
147
|
level: number;
|
|
148
148
|
collapsible: boolean;
|
|
149
149
|
highlight: boolean;
|
|
@@ -234,10 +234,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
|
|
|
234
234
|
"onUpdate:searchTerm"?: ((value: string | undefined) => any) | undefined;
|
|
235
235
|
}>, {
|
|
236
236
|
close: boolean | Record<string, any>;
|
|
237
|
-
shortcut: string;
|
|
238
237
|
transition: boolean;
|
|
239
238
|
autofocus: boolean;
|
|
240
239
|
loading: boolean;
|
|
240
|
+
shortcut: string;
|
|
241
241
|
dismissible: boolean;
|
|
242
242
|
colorMode: boolean;
|
|
243
243
|
overlay: boolean;
|
|
@@ -234,10 +234,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
|
|
|
234
234
|
"onUpdate:searchTerm"?: ((value: string | undefined) => any) | undefined;
|
|
235
235
|
}>, {
|
|
236
236
|
close: boolean | Record<string, any>;
|
|
237
|
-
shortcut: string;
|
|
238
237
|
transition: boolean;
|
|
239
238
|
autofocus: boolean;
|
|
240
239
|
loading: boolean;
|
|
240
|
+
shortcut: string;
|
|
241
241
|
dismissible: boolean;
|
|
242
242
|
colorMode: boolean;
|
|
243
243
|
overlay: boolean;
|
|
@@ -236,9 +236,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
|
|
|
236
236
|
};
|
|
237
237
|
}>> & Readonly<{}>, {
|
|
238
238
|
color: any;
|
|
239
|
-
disabled: boolean;
|
|
240
239
|
block: boolean;
|
|
241
240
|
square: boolean;
|
|
241
|
+
disabled: boolean;
|
|
242
242
|
viewTransition: boolean;
|
|
243
243
|
loading: boolean;
|
|
244
244
|
collapsed: boolean;
|
|
@@ -236,9 +236,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
|
|
|
236
236
|
};
|
|
237
237
|
}>> & Readonly<{}>, {
|
|
238
238
|
color: any;
|
|
239
|
-
disabled: boolean;
|
|
240
239
|
block: boolean;
|
|
241
240
|
square: boolean;
|
|
241
|
+
disabled: boolean;
|
|
242
242
|
viewTransition: boolean;
|
|
243
243
|
loading: boolean;
|
|
244
244
|
collapsed: boolean;
|
|
@@ -24,11 +24,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
24
24
|
"onUpdate:modelValue"?: ((value: number | undefined) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
unit: string;
|
|
27
|
-
disabled: boolean;
|
|
28
27
|
modelValue: number | null;
|
|
29
28
|
min: number;
|
|
30
29
|
max: number;
|
|
31
30
|
step: number;
|
|
31
|
+
disabled: boolean;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
34
|
declare const _default: typeof __VLS_export;
|
|
@@ -24,11 +24,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
24
24
|
"onUpdate:modelValue"?: ((value: number | undefined) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
unit: string;
|
|
27
|
-
disabled: boolean;
|
|
28
27
|
modelValue: number | null;
|
|
29
28
|
min: number;
|
|
30
29
|
max: number;
|
|
31
30
|
step: number;
|
|
31
|
+
disabled: boolean;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
34
|
declare const _default: typeof __VLS_export;
|
|
@@ -11,13 +11,13 @@ type __VLS_Props = {
|
|
|
11
11
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, Record<PropertyKey, unknown>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
12
|
rename: (label: string) => any;
|
|
13
13
|
ready: () => any;
|
|
14
|
-
update: (content: any) => any;
|
|
15
14
|
updateMeta: (patch: Partial<DocPageMeta>) => any;
|
|
15
|
+
update: (content: any) => any;
|
|
16
16
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
17
|
onRename?: ((label: string) => any) | undefined;
|
|
18
18
|
onReady?: (() => any) | undefined;
|
|
19
|
-
onUpdate?: ((content: any) => any) | undefined;
|
|
20
19
|
onUpdateMeta?: ((patch: Partial<DocPageMeta>) => any) | undefined;
|
|
20
|
+
onUpdate?: ((content: any) => any) | undefined;
|
|
21
21
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
23
23
|
export default _default;
|
|
@@ -11,13 +11,13 @@ type __VLS_Props = {
|
|
|
11
11
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, Record<PropertyKey, unknown>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
12
|
rename: (label: string) => any;
|
|
13
13
|
ready: () => any;
|
|
14
|
-
update: (content: any) => any;
|
|
15
14
|
updateMeta: (patch: Partial<DocPageMeta>) => any;
|
|
15
|
+
update: (content: any) => any;
|
|
16
16
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
17
|
onRename?: ((label: string) => any) | undefined;
|
|
18
18
|
onReady?: (() => any) | undefined;
|
|
19
|
-
onUpdate?: ((content: any) => any) | undefined;
|
|
20
19
|
onUpdateMeta?: ((patch: Partial<DocPageMeta>) => any) | undefined;
|
|
20
|
+
onUpdate?: ((content: any) => any) | undefined;
|
|
21
21
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
23
23
|
export default _default;
|
|
@@ -74,8 +74,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
74
74
|
"onClaim-passkey"?: (() => any) | undefined;
|
|
75
75
|
}>, {
|
|
76
76
|
connecting: boolean;
|
|
77
|
-
userName: string;
|
|
78
77
|
currentColor: string;
|
|
78
|
+
userName: string;
|
|
79
79
|
isClaimed: boolean;
|
|
80
80
|
avatarStyle: string;
|
|
81
81
|
connectionError: string;
|
|
@@ -74,8 +74,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
74
74
|
"onClaim-passkey"?: (() => any) | undefined;
|
|
75
75
|
}>, {
|
|
76
76
|
connecting: boolean;
|
|
77
|
-
userName: string;
|
|
78
77
|
currentColor: string;
|
|
78
|
+
userName: string;
|
|
79
79
|
isClaimed: boolean;
|
|
80
80
|
avatarStyle: string;
|
|
81
81
|
connectionError: string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useBacklinks — reactive list of documents that link TO a given document.
|
|
3
|
+
*
|
|
4
|
+
* Scans every doc's body (doc-link hrefs + docEmbed/docLink nodes) via
|
|
5
|
+
* useDocReferenceEdges and returns the inbound edges for `docId`, resolved to
|
|
6
|
+
* label + type + icon for display. The scan lazily loads child docs in batches
|
|
7
|
+
* and observes them, so this is a workspace-wide operation — call it where a
|
|
8
|
+
* backlinks UI is actually shown (e.g. a doc's properties panel), not eagerly
|
|
9
|
+
* everywhere.
|
|
10
|
+
*
|
|
11
|
+
* Backlinks are a per-document property, not an app-level view. Pair with
|
|
12
|
+
* <ABacklinks> for a ready-made list.
|
|
13
|
+
*/
|
|
14
|
+
import { type ComputedRef, type MaybeRef } from 'vue';
|
|
15
|
+
export interface Backlink {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
type: string;
|
|
19
|
+
icon: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function useBacklinks(docId: MaybeRef<string | null | undefined>): ComputedRef<Backlink[]>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { computed, unref } from "vue";
|
|
2
|
+
import { useAbracadabra } from "./useAbracadabra.js";
|
|
3
|
+
import { useDocTree } from "./useDocTree.js";
|
|
4
|
+
import { useDocReferenceEdges } from "../utils/docReferenceEdges.js";
|
|
5
|
+
import { resolveDocType } from "../utils/docTypes.js";
|
|
6
|
+
export function useBacklinks(docId) {
|
|
7
|
+
const abra = useAbracadabra();
|
|
8
|
+
const { entries } = useDocTree();
|
|
9
|
+
const allEntries = computed(() => entries.value.map((e) => ({ id: e.id })));
|
|
10
|
+
const edges = useDocReferenceEdges(abra.provider, allEntries);
|
|
11
|
+
const entryById = computed(() => {
|
|
12
|
+
const m = /* @__PURE__ */ new Map();
|
|
13
|
+
for (const e of entries.value) m.set(e.id, e);
|
|
14
|
+
return m;
|
|
15
|
+
});
|
|
16
|
+
return computed(() => {
|
|
17
|
+
const id = unref(docId);
|
|
18
|
+
if (!id) return [];
|
|
19
|
+
const map = entryById.value;
|
|
20
|
+
const seen = /* @__PURE__ */ new Set();
|
|
21
|
+
const out = [];
|
|
22
|
+
for (const edge of edges.value) {
|
|
23
|
+
if (edge.target !== id || edge.source === id || seen.has(edge.source)) continue;
|
|
24
|
+
seen.add(edge.source);
|
|
25
|
+
const entry = map.get(edge.source);
|
|
26
|
+
if (!entry || entry.trashed) continue;
|
|
27
|
+
out.push({
|
|
28
|
+
id: edge.source,
|
|
29
|
+
label: entry.label || `${edge.source.slice(0, 8)}\u2026`,
|
|
30
|
+
type: entry.type ?? "doc",
|
|
31
|
+
icon: resolveDocType(entry.type).icon
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return out;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -4,6 +4,7 @@ import { computed, ref, shallowRef, watch } from "vue";
|
|
|
4
4
|
import { navigateTo } from "#imports";
|
|
5
5
|
import { useAbracadabra } from "../../composables/useAbracadabra";
|
|
6
6
|
import { useSyncedMap } from "../../composables/useYDoc";
|
|
7
|
+
import { useDocSlugs } from "../../composables/useDocSlugs";
|
|
7
8
|
import { resolveDocType } from "../../utils/docTypes";
|
|
8
9
|
const props = defineProps({
|
|
9
10
|
decorations: { type: Array, required: true },
|
|
@@ -19,6 +20,7 @@ const props = defineProps({
|
|
|
19
20
|
HTMLAttributes: { type: Object, required: true }
|
|
20
21
|
});
|
|
21
22
|
const { doc: rootDoc, provider } = useAbracadabra();
|
|
23
|
+
const { getDocUrl } = useDocSlugs();
|
|
22
24
|
const treeMap = useSyncedMap(
|
|
23
25
|
rootDoc,
|
|
24
26
|
"doc-tree"
|
|
@@ -53,7 +55,7 @@ watch(
|
|
|
53
55
|
{ immediate: true }
|
|
54
56
|
);
|
|
55
57
|
function navigate() {
|
|
56
|
-
navigateTo(
|
|
58
|
+
navigateTo(getDocUrl(docId.value));
|
|
57
59
|
}
|
|
58
60
|
const collapsed = computed(() => props.node.attrs.collapsed);
|
|
59
61
|
const tall = computed(() => props.node.attrs.tall);
|
|
@@ -4,6 +4,7 @@ import { computed } from "vue";
|
|
|
4
4
|
import { navigateTo } from "#imports";
|
|
5
5
|
import { useAbracadabra } from "../../composables/useAbracadabra";
|
|
6
6
|
import { useSyncedMap } from "../../composables/useYDoc";
|
|
7
|
+
import { useDocSlugs } from "../../composables/useDocSlugs";
|
|
7
8
|
import { resolveDocType } from "../../utils/docTypes";
|
|
8
9
|
const props = defineProps({
|
|
9
10
|
decorations: { type: Array, required: true },
|
|
@@ -19,6 +20,7 @@ const props = defineProps({
|
|
|
19
20
|
HTMLAttributes: { type: Object, required: true }
|
|
20
21
|
});
|
|
21
22
|
const { doc: rootDoc } = useAbracadabra();
|
|
23
|
+
const { getDocUrl } = useDocSlugs();
|
|
22
24
|
const treeMap = useSyncedMap(
|
|
23
25
|
rootDoc,
|
|
24
26
|
"doc-tree"
|
|
@@ -32,7 +34,7 @@ function navigate(e) {
|
|
|
32
34
|
e.preventDefault();
|
|
33
35
|
e.stopPropagation();
|
|
34
36
|
if (!docId.value) return;
|
|
35
|
-
navigateTo(
|
|
37
|
+
navigateTo(getDocUrl(docId.value));
|
|
36
38
|
}
|
|
37
39
|
</script>
|
|
38
40
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalize a doc/meta icon value into a Nuxt-Icon-loadable name.
|
|
3
|
+
*
|
|
4
|
+
* Legacy data and external sources sometimes store bare Lucide names
|
|
5
|
+
* (e.g. "clipboard-list", "map"); Nuxt Icon needs the prefixed form
|
|
6
|
+
* ("i-lucide-clipboard-list"). Values that already carry a prefix
|
|
7
|
+
* (`i-…`) or a collection (`set:name`) pass through unchanged. Empty /
|
|
8
|
+
* non-string input returns ''.
|
|
9
|
+
*/
|
|
10
|
+
export declare function normalizeIconName(raw: unknown): string;
|