@abraca/nuxt 2.39.0 → 2.40.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 CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=4.0.0"
6
6
  },
7
- "version": "2.39.0",
7
+ "version": "2.40.0",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -3,6 +3,12 @@ type __VLS_Props = {
3
3
  docId: string;
4
4
  /** Whether the document is editable. Default: true */
5
5
  editable?: boolean;
6
+ /**
7
+ * Attach the right-click node context menu to editor breadcrumb ancestors.
8
+ * Default: true. Set false for read-only viewers (e.g. marketing /docs) that
9
+ * don't want the node mutation menu. Only affects editor-type documents.
10
+ */
11
+ breadcrumbMenu?: boolean;
6
12
  /** CSS class applied to editor-type documents (doc, or hasEditor: true) */
7
13
  editorClass?: string;
8
14
  /** CSS class applied to structured renderers (kanban, table, etc.) */
@@ -18,6 +24,7 @@ type __VLS_Slots = {} & {
18
24
  };
19
25
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
26
  editable: boolean;
27
+ breadcrumbMenu: boolean;
21
28
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
29
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
30
  declare const _default: typeof __VLS_export;
@@ -8,6 +8,7 @@ import { resolveDocType } from "../utils/docTypes";
8
8
  const props = defineProps({
9
9
  docId: { type: String, required: true },
10
10
  editable: { type: Boolean, required: false, default: true },
11
+ breadcrumbMenu: { type: Boolean, required: false, default: true },
11
12
  editorClass: { type: String, required: false },
12
13
  rendererClass: { type: String, required: false }
13
14
  });
@@ -100,6 +101,7 @@ const resolvedClass = computed(
100
101
  :doc-meta="docMeta"
101
102
  :child-provider="childProvider"
102
103
  :editable="editable"
104
+ :breadcrumb-menu="breadcrumbMenu"
103
105
  :class="resolvedClass"
104
106
  />
105
107
  </template>
@@ -3,6 +3,12 @@ type __VLS_Props = {
3
3
  docId: string;
4
4
  /** Whether the document is editable. Default: true */
5
5
  editable?: boolean;
6
+ /**
7
+ * Attach the right-click node context menu to editor breadcrumb ancestors.
8
+ * Default: true. Set false for read-only viewers (e.g. marketing /docs) that
9
+ * don't want the node mutation menu. Only affects editor-type documents.
10
+ */
11
+ breadcrumbMenu?: boolean;
6
12
  /** CSS class applied to editor-type documents (doc, or hasEditor: true) */
7
13
  editorClass?: string;
8
14
  /** CSS class applied to structured renderers (kanban, table, etc.) */
@@ -18,6 +24,7 @@ type __VLS_Slots = {} & {
18
24
  };
19
25
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
26
  editable: boolean;
27
+ breadcrumbMenu: boolean;
21
28
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
29
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
30
  declare const _default: typeof __VLS_export;
@@ -41,6 +41,13 @@ type __VLS_Props = {
41
41
  * so root/space docs show nothing. Set false for embeds/previews.
42
42
  */
43
43
  showBreadcrumb?: boolean;
44
+ /**
45
+ * Attach the right-click node context menu (open / window / change type /
46
+ * favorite / trash, …) to each breadcrumb ancestor. On by default for cou-sh
47
+ * parity. Set false for read-only viewers (e.g. the marketing /docs site)
48
+ * where the mutation menu is noise.
49
+ */
50
+ breadcrumbMenu?: boolean;
44
51
  /**
45
52
  * Show the comprehensive sub-page list (<ADocSubPageList>) below the editor
46
53
  * body — the child-document browser cou-sh's DocRenderer renders under every
@@ -106,6 +113,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
106
113
  variant: "doc" | "prose";
107
114
  showSourceToggle: boolean;
108
115
  showBreadcrumb: boolean;
116
+ breadcrumbMenu: boolean;
109
117
  showSubPages: boolean;
110
118
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
111
119
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -44,6 +44,7 @@ const props = defineProps({
44
44
  variant: { type: String, required: false, default: "doc" },
45
45
  showSourceToggle: { type: Boolean, required: false, default: false },
46
46
  showBreadcrumb: { type: Boolean, required: false, default: true },
47
+ breadcrumbMenu: { type: Boolean, required: false, default: true },
47
48
  showSubPages: { type: Boolean, required: false, default: true }
48
49
  });
49
50
  const viewMode = ref("rich");
@@ -611,7 +612,10 @@ function onPlusClick(e, onClick) {
611
612
  />
612
613
  </li>
613
614
  <li class="flex min-w-0">
614
- <ANodeContextMenu :items="bcMenuItems(ancestor)">
615
+ <ANodeContextMenu
616
+ :items="bcMenuItems(ancestor)"
617
+ :disabled="!breadcrumbMenu"
618
+ >
615
619
  <button
616
620
  type="button"
617
621
  draggable="true"
@@ -41,6 +41,13 @@ type __VLS_Props = {
41
41
  * so root/space docs show nothing. Set false for embeds/previews.
42
42
  */
43
43
  showBreadcrumb?: boolean;
44
+ /**
45
+ * Attach the right-click node context menu (open / window / change type /
46
+ * favorite / trash, …) to each breadcrumb ancestor. On by default for cou-sh
47
+ * parity. Set false for read-only viewers (e.g. the marketing /docs site)
48
+ * where the mutation menu is noise.
49
+ */
50
+ breadcrumbMenu?: boolean;
44
51
  /**
45
52
  * Show the comprehensive sub-page list (<ADocSubPageList>) below the editor
46
53
  * body — the child-document browser cou-sh's DocRenderer renders under every
@@ -106,6 +113,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
106
113
  variant: "doc" | "prose";
107
114
  showSourceToggle: boolean;
108
115
  showBreadcrumb: boolean;
116
+ breadcrumbMenu: boolean;
109
117
  showSubPages: boolean;
110
118
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
111
119
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,10 +1,18 @@
1
1
  import type { DropdownMenuItem } from '@nuxt/ui';
2
2
  type __VLS_Props = {
3
3
  items: DropdownMenuItem[][];
4
+ /**
5
+ * When true, render the trigger content only — no right-click context menu
6
+ * is attached. Used by read-only surfaces (e.g. the marketing docs viewer)
7
+ * that want the element without the node mutation menu.
8
+ */
9
+ disabled?: boolean;
4
10
  };
5
- declare var __VLS_10: {};
11
+ declare var __VLS_1: {}, __VLS_12: {};
6
12
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_10) => any;
13
+ default?: (props: typeof __VLS_1) => any;
14
+ } & {
15
+ default?: (props: typeof __VLS_12) => any;
8
16
  };
9
17
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,11 +1,14 @@
1
1
  <script setup>
2
2
  defineProps({
3
- items: { type: Array, required: true }
3
+ items: { type: Array, required: true },
4
+ disabled: { type: Boolean, required: false }
4
5
  });
5
6
  </script>
6
7
 
7
8
  <template>
9
+ <slot v-if="disabled" />
8
10
  <UContextMenu
11
+ v-else
9
12
  :items="items"
10
13
  @contextmenu.stop
11
14
  >
@@ -1,10 +1,18 @@
1
1
  import type { DropdownMenuItem } from '@nuxt/ui';
2
2
  type __VLS_Props = {
3
3
  items: DropdownMenuItem[][];
4
+ /**
5
+ * When true, render the trigger content only — no right-click context menu
6
+ * is attached. Used by read-only surfaces (e.g. the marketing docs viewer)
7
+ * that want the element without the node mutation menu.
8
+ */
9
+ disabled?: boolean;
4
10
  };
5
- declare var __VLS_10: {};
11
+ declare var __VLS_1: {}, __VLS_12: {};
6
12
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_10) => any;
13
+ default?: (props: typeof __VLS_1) => any;
14
+ } & {
15
+ default?: (props: typeof __VLS_12) => any;
8
16
  };
9
17
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abraca/nuxt",
3
- "version": "2.39.0",
3
+ "version": "2.40.0",
4
4
  "description": "First-class Nuxt module for the Abracadabra CRDT collaboration platform",
5
5
  "repository": "abracadabra/abracadabra-nuxt",
6
6
  "license": "MIT",