@abraca/nuxt 2.88.0 → 2.91.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 +5 -0
- package/dist/runtime/components/shell/AUserMenu.d.vue.ts +2 -2
- package/dist/runtime/components/shell/AUserMenu.vue.d.ts +2 -2
- package/dist/runtime/composables/useDocTree.d.ts +0 -1
- package/dist/runtime/composables/useDocTree.js +0 -1
- package/dist/runtime/plugins/core.plugin.js +10 -6
- package/dist/runtime/utils/lowlightCommon.d.ts +22 -0
- package/dist/runtime/utils/lowlightCommon.js +5 -0
- package/package.json +5 -5
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -295,6 +295,11 @@ const module$1 = defineNuxtModule({
|
|
|
295
295
|
"@tiptap/extension-superscript",
|
|
296
296
|
"@tiptap/extension-subscript",
|
|
297
297
|
"@tiptap/extension-code-block-lowlight",
|
|
298
|
+
// Pre-bundled for DEV, and it stays. What changed in the weight round is
|
|
299
|
+
// WHERE it is imported: `runtime/utils/lowlightCommon.ts` imports it
|
|
300
|
+
// statically and is the only file that may, because a dynamic
|
|
301
|
+
// `import('lowlight')` retains the namespace and with it all 156
|
|
302
|
+
// grammars. Read that file's header before touching either.
|
|
298
303
|
"lowlight",
|
|
299
304
|
// `lowlight` does a `default` import from the CommonJS `highlight.js/lib/core`.
|
|
300
305
|
// It MUST be pre-bundled (CJS→ESM) or the browser can't read its default
|
|
@@ -14,13 +14,13 @@ type __VLS_Props = {
|
|
|
14
14
|
extraItems?: DropdownMenuItem[][];
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
-
logout: () => any;
|
|
18
17
|
"open-settings": () => any;
|
|
19
18
|
"open-account": () => any;
|
|
19
|
+
logout: () => any;
|
|
20
20
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
-
onLogout?: (() => any) | undefined;
|
|
22
21
|
"onOpen-settings"?: (() => any) | undefined;
|
|
23
22
|
"onOpen-account"?: (() => any) | undefined;
|
|
23
|
+
onLogout?: (() => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
25
|
color: string;
|
|
26
26
|
collapsed: boolean;
|
|
@@ -14,13 +14,13 @@ type __VLS_Props = {
|
|
|
14
14
|
extraItems?: DropdownMenuItem[][];
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
-
logout: () => any;
|
|
18
17
|
"open-settings": () => any;
|
|
19
18
|
"open-account": () => any;
|
|
19
|
+
logout: () => any;
|
|
20
20
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
-
onLogout?: (() => any) | undefined;
|
|
22
21
|
"onOpen-settings"?: (() => any) | undefined;
|
|
23
22
|
"onOpen-account"?: (() => any) | undefined;
|
|
23
|
+
onLogout?: (() => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
25
|
color: string;
|
|
26
26
|
collapsed: boolean;
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
import { type ComputedRef } from 'vue';
|
|
9
9
|
import type { TreeEntry } from '../types.js';
|
|
10
10
|
import { useSyncedMap } from './useYDoc.js';
|
|
11
|
-
export { useDocTreeSnapshot, ABRA_DOC_TREE_SNAPSHOT_STATE, type DocTreeSnapshot } from './useDocTreeSnapshot.js';
|
|
12
11
|
export interface DocTreeReturn {
|
|
13
12
|
/** All tree entries with `id` populated from map keys */
|
|
14
13
|
entries: ComputedRef<(TreeEntry & {
|
|
@@ -6,7 +6,6 @@ import { useDocTreeSnapshot } from "./useDocTreeSnapshot.js";
|
|
|
6
6
|
import { useAbracadabra } from "./useAbracadabra.js";
|
|
7
7
|
import { useSpaceConnections } from "./useSpaceConnections.js";
|
|
8
8
|
import { useSyncedMap } from "./useYDoc.js";
|
|
9
|
-
export { useDocTreeSnapshot, ABRA_DOC_TREE_SNAPSHOT_STATE } from "./useDocTreeSnapshot.js";
|
|
10
9
|
export function useDocTree(docId) {
|
|
11
10
|
const abra = useAbracadabra();
|
|
12
11
|
const { connections, getDocForDoc, findDocSpaceId } = useSpaceConnections();
|
|
@@ -45,7 +45,7 @@ async function loadClientExtensions() {
|
|
|
45
45
|
{ default: Superscript },
|
|
46
46
|
{ default: Subscript },
|
|
47
47
|
{ default: CodeBlockLowlight },
|
|
48
|
-
{
|
|
48
|
+
{ createCommonLowlight },
|
|
49
49
|
{ Document },
|
|
50
50
|
{ DocumentHeader },
|
|
51
51
|
{ DocumentMeta },
|
|
@@ -101,7 +101,9 @@ async function loadClientExtensions() {
|
|
|
101
101
|
import("@tiptap/extension-superscript"),
|
|
102
102
|
import("@tiptap/extension-subscript"),
|
|
103
103
|
import("@tiptap/extension-code-block-lowlight"),
|
|
104
|
-
import(
|
|
104
|
+
// NOT `import('lowlight')` — see the wrapper's header. A dynamic import
|
|
105
|
+
// of that namespace cannot be tree-shaken and drags in all 156 grammars.
|
|
106
|
+
import("../utils/lowlightCommon.js"),
|
|
105
107
|
tolerant(() => import("../extensions/document"), "document"),
|
|
106
108
|
tolerant(() => import("../extensions/document-header"), "document-header"),
|
|
107
109
|
tolerant(() => import("../extensions/document-meta"), "document-meta"),
|
|
@@ -145,7 +147,7 @@ async function loadClientExtensions() {
|
|
|
145
147
|
tolerant(() => import("../extensions/svg-embed"), "svg-embed"),
|
|
146
148
|
tolerant(() => import("../extensions/timeline"), "timeline")
|
|
147
149
|
]);
|
|
148
|
-
const lowlight =
|
|
150
|
+
const lowlight = createCommonLowlight();
|
|
149
151
|
const extensions = [
|
|
150
152
|
TaskList,
|
|
151
153
|
TaskItem.configure({ nested: true }),
|
|
@@ -236,7 +238,7 @@ async function loadServerExtensions() {
|
|
|
236
238
|
const [
|
|
237
239
|
{ default: StarterKit },
|
|
238
240
|
{ default: CodeBlockLowlight },
|
|
239
|
-
{
|
|
241
|
+
{ createCommonLowlight },
|
|
240
242
|
{ Document },
|
|
241
243
|
{ DocumentHeader },
|
|
242
244
|
{ DocumentMeta },
|
|
@@ -244,13 +246,15 @@ async function loadServerExtensions() {
|
|
|
244
246
|
] = await Promise.all([
|
|
245
247
|
import("@tiptap/starter-kit"),
|
|
246
248
|
import("@tiptap/extension-code-block-lowlight"),
|
|
247
|
-
import(
|
|
249
|
+
// NOT `import('lowlight')` — see the wrapper's header. A dynamic import
|
|
250
|
+
// of that namespace cannot be tree-shaken and drags in all 156 grammars.
|
|
251
|
+
import("../utils/lowlightCommon.js"),
|
|
248
252
|
import("../extensions/document.js"),
|
|
249
253
|
import("../extensions/document-header.js"),
|
|
250
254
|
import("../extensions/document-meta.js"),
|
|
251
255
|
import("../extensions/file-drop.js")
|
|
252
256
|
]);
|
|
253
|
-
const lowlight =
|
|
257
|
+
const lowlight = createCommonLowlight();
|
|
254
258
|
return [
|
|
255
259
|
StarterKit.configure({
|
|
256
260
|
// @ts-expect-error StarterKit accepts history option at runtime
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** The `common` grammar names, for tests and for anything reporting the set. */
|
|
2
|
+
export declare const LOWLIGHT_COMMON_LANGUAGES: string[];
|
|
3
|
+
/**
|
|
4
|
+
* A registry carrying the common languages.
|
|
5
|
+
*
|
|
6
|
+
* Called once per editor schema build — twice per process in practice, since
|
|
7
|
+
* the client and server extension lists are built separately.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createCommonLowlight(): {
|
|
10
|
+
highlight: (language: string, value: string, options?: Readonly<import("lowlight").Options> | null | undefined) => import("hast").Root;
|
|
11
|
+
highlightAuto: (value: string, options?: Readonly<import("lowlight").AutoOptions> | null | undefined) => import("hast").Root;
|
|
12
|
+
listLanguages: () => Array<string>;
|
|
13
|
+
register: {
|
|
14
|
+
(grammars: Readonly<Record<string, import("highlight.js").LanguageFn>>): undefined;
|
|
15
|
+
(name: string, grammar: import("highlight.js").LanguageFn): undefined;
|
|
16
|
+
};
|
|
17
|
+
registerAlias: {
|
|
18
|
+
(aliases: Readonly<Record<string, ReadonlyArray<string> | string>>): undefined;
|
|
19
|
+
(language: string, alias: ReadonlyArray<string> | string): undefined;
|
|
20
|
+
};
|
|
21
|
+
registered: (aliasOrName: string) => boolean;
|
|
22
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abraca/nuxt",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.91.0",
|
|
4
4
|
"description": "First-class Nuxt module for the Abracadabra CRDT collaboration platform",
|
|
5
5
|
"repository": "abracadabra/abracadabra-nuxt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@codemirror/view": "^6.42.0",
|
|
51
51
|
"@noble/ed25519": "^3.1.0",
|
|
52
52
|
"@noble/hashes": "^2.2.0",
|
|
53
|
-
"@nuxt/ui": "^3.0.0",
|
|
53
|
+
"@nuxt/ui": "^3.0.0 || ^4.0.0",
|
|
54
54
|
"@tanstack/vue-virtual": "^3.10.0",
|
|
55
55
|
"@tiptap/core": "^3.0.0",
|
|
56
56
|
"@tiptap/extension-character-count": "^3.0.0",
|
|
@@ -173,9 +173,9 @@
|
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
175
|
"devDependencies": {
|
|
176
|
-
"@abraca/convert": "^2.
|
|
177
|
-
"@abraca/dabra": "^2.
|
|
178
|
-
"@abraca/plugin": "^2.
|
|
176
|
+
"@abraca/convert": "^2.90.0",
|
|
177
|
+
"@abraca/dabra": "^2.90.0",
|
|
178
|
+
"@abraca/plugin": "^2.90.0",
|
|
179
179
|
"@codemirror/autocomplete": "^6.18.0",
|
|
180
180
|
"@codemirror/commands": "^6.7.0",
|
|
181
181
|
"@codemirror/lang-css": "^6.3.1",
|