@abraca/nuxt 2.17.0 → 2.17.2
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 +37 -2
- package/dist/runtime/components/aware/AMedia.d.vue.ts +1 -1
- package/dist/runtime/components/aware/AMedia.vue.d.ts +1 -1
- 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/components/shell/AUserProfilePopover.d.vue.ts +1 -1
- package/dist/runtime/components/shell/AUserProfilePopover.vue.d.ts +1 -1
- package/dist/runtime/plugins/core.plugin.js +18 -2
- package/package.json +29 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';
|
|
2
|
-
import { defineNuxtModule, createResolver, addPlugin, addImportsDir, addImports, addComponentsDir, addServerHandler, addRouteMiddleware, addServerPlugin, addServerImportsDir } from '@nuxt/kit';
|
|
2
|
+
import { defineNuxtModule, createResolver, addPlugin, addPluginTemplate, addImportsDir, addImports, addComponentsDir, addServerHandler, addRouteMiddleware, addServerPlugin, addServerImportsDir } from '@nuxt/kit';
|
|
3
3
|
import { defu } from 'defu';
|
|
4
4
|
export { buildSlugMap, isUUID, slugify } from '../dist/runtime/utils/slugify.js';
|
|
5
5
|
export { avatarBorderStyle, avatarGradient, avatarStyleFromName } from '../dist/runtime/utils/avatarStyle.js';
|
|
@@ -196,7 +196,13 @@ const module$1 = defineNuxtModule({
|
|
|
196
196
|
"@codemirror/state",
|
|
197
197
|
"@codemirror/view",
|
|
198
198
|
"@codemirror/language",
|
|
199
|
-
"y-codemirror.next"
|
|
199
|
+
"y-codemirror.next",
|
|
200
|
+
// Code-block highlighting. pnpm can nest a second copy of highlight.js
|
|
201
|
+
// (a transitive of lowlight) under this module; dedupe collapses both
|
|
202
|
+
// lowlight + highlight.js to one root copy so the runtime dynamic
|
|
203
|
+
// `import("lowlight")` and the optimizer agree on a single instance.
|
|
204
|
+
"lowlight",
|
|
205
|
+
"highlight.js"
|
|
200
206
|
];
|
|
201
207
|
nuxt.options.vite = defu(nuxt.options.vite, { resolve: { dedupe: [] } });
|
|
202
208
|
const existing = nuxt.options.vite.resolve?.dedupe ?? [];
|
|
@@ -269,6 +275,13 @@ const module$1 = defineNuxtModule({
|
|
|
269
275
|
"@tiptap/extension-subscript",
|
|
270
276
|
"@tiptap/extension-code-block-lowlight",
|
|
271
277
|
"lowlight",
|
|
278
|
+
// `lowlight` does a `default` import from the CommonJS `highlight.js/lib/core`.
|
|
279
|
+
// It MUST be pre-bundled (CJS→ESM) or the browser can't read its default
|
|
280
|
+
// export and the whole editor-extension load wave rejects. (Belt-and-
|
|
281
|
+
// suspenders: the editor-prebundle client plugin force-feeds these to the
|
|
282
|
+
// dev scanner too, since `optimizeDeps.include` is not always honoured.)
|
|
283
|
+
"highlight.js",
|
|
284
|
+
"highlight.js/lib/core",
|
|
272
285
|
// Yjs + provider deps (shared globals + client plugin)
|
|
273
286
|
"yjs",
|
|
274
287
|
// NOTE: `@abraca/dabra` deliberately NOT pre-bundled. esbuild treeshakes
|
|
@@ -386,6 +399,28 @@ const module$1 = defineNuxtModule({
|
|
|
386
399
|
src: resolver.resolve("./runtime/plugin-shared-globals.client"),
|
|
387
400
|
mode: "client"
|
|
388
401
|
});
|
|
402
|
+
if (options.features?.editor !== false) {
|
|
403
|
+
addPluginTemplate({
|
|
404
|
+
filename: "abracadabra-editor-prebundle.client.mjs",
|
|
405
|
+
mode: "client",
|
|
406
|
+
getContents: () => [
|
|
407
|
+
"// AUTO-GENERATED by @abraca/nuxt \u2014 editor dep pre-bundle hint.",
|
|
408
|
+
"// Static side-effect imports so Vite's dev scanner pre-bundles the",
|
|
409
|
+
"// editor's CJS / singleton deps as single shared instances. Must live",
|
|
410
|
+
"// in .nuxt/ (crawled) \u2014 the module's runtime dir is optimize-excluded.",
|
|
411
|
+
"import 'highlight.js/lib/core'",
|
|
412
|
+
"import 'lowlight'",
|
|
413
|
+
"import 'prosemirror-state'",
|
|
414
|
+
"import 'prosemirror-view'",
|
|
415
|
+
"import 'prosemirror-model'",
|
|
416
|
+
"import 'prosemirror-transform'",
|
|
417
|
+
"import 'prosemirror-keymap'",
|
|
418
|
+
"import { defineNuxtPlugin } from '#app'",
|
|
419
|
+
"export default defineNuxtPlugin(() => {})",
|
|
420
|
+
""
|
|
421
|
+
].join("\n")
|
|
422
|
+
});
|
|
423
|
+
}
|
|
389
424
|
addPlugin({
|
|
390
425
|
src: resolver.resolve("./runtime/plugin-abracadabra.client"),
|
|
391
426
|
mode: "client"
|
|
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
12
12
|
awareness: boolean;
|
|
13
13
|
tag: "video" | "audio";
|
|
14
14
|
live: boolean;
|
|
15
|
-
controls: boolean;
|
|
16
15
|
total: boolean;
|
|
16
|
+
controls: boolean;
|
|
17
17
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const _default: typeof __VLS_export;
|
|
19
19
|
export default _default;
|
|
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
12
12
|
awareness: boolean;
|
|
13
13
|
tag: "video" | "audio";
|
|
14
14
|
live: boolean;
|
|
15
|
-
controls: boolean;
|
|
16
15
|
total: boolean;
|
|
16
|
+
controls: boolean;
|
|
17
17
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const _default: typeof __VLS_export;
|
|
19
19
|
export default _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;
|
|
17
18
|
"open-settings": () => any;
|
|
18
19
|
"open-account": () => any;
|
|
19
|
-
logout: () => any;
|
|
20
20
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
+
onLogout?: (() => any) | undefined;
|
|
21
22
|
"onOpen-settings"?: (() => any) | undefined;
|
|
22
23
|
"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;
|
|
17
18
|
"open-settings": () => any;
|
|
18
19
|
"open-account": () => any;
|
|
19
|
-
logout: () => any;
|
|
20
20
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
+
onLogout?: (() => any) | undefined;
|
|
21
22
|
"onOpen-settings"?: (() => any) | undefined;
|
|
22
23
|
"onOpen-account"?: (() => any) | undefined;
|
|
23
|
-
onLogout?: (() => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
25
|
color: string;
|
|
26
26
|
collapsed: boolean;
|
|
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
39
39
|
currentDocId: string | null;
|
|
40
40
|
isSelf: boolean;
|
|
41
41
|
avatarStyle: string;
|
|
42
|
-
showFollow: boolean;
|
|
43
42
|
isFollowing: boolean;
|
|
43
|
+
showFollow: boolean;
|
|
44
44
|
currentDocLabel: string | null;
|
|
45
45
|
currentDocIcon: string;
|
|
46
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
39
39
|
currentDocId: string | null;
|
|
40
40
|
isSelf: boolean;
|
|
41
41
|
avatarStyle: string;
|
|
42
|
-
showFollow: boolean;
|
|
43
42
|
isFollowing: boolean;
|
|
43
|
+
showFollow: boolean;
|
|
44
44
|
currentDocLabel: string | null;
|
|
45
45
|
currentDocIcon: string;
|
|
46
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -257,11 +257,19 @@ async function loadServerExtensions() {
|
|
|
257
257
|
let _cachedClient = null;
|
|
258
258
|
let _cachedServer = null;
|
|
259
259
|
let _clientReady = null;
|
|
260
|
+
let _clientLoadError = null;
|
|
261
|
+
let _warnedEmptySchema = false;
|
|
260
262
|
function ensureClientReady() {
|
|
261
263
|
if (_clientReady) return _clientReady;
|
|
262
264
|
_clientReady = loadClientExtensions().then((exts) => {
|
|
263
265
|
_cachedClient = exts;
|
|
264
|
-
}).catch((e) =>
|
|
266
|
+
}).catch((e) => {
|
|
267
|
+
_clientLoadError = e;
|
|
268
|
+
console.error(
|
|
269
|
+
`[abracadabra:core] Failed to load editor extensions \u2014 the editor will fail to mount with "Schema is missing its top node type ('doc')". This is almost always a CJS/duplicate editor dep that Vite did not pre-bundle (highlight.js/lowlight, prosemirror-*). Underlying error:`,
|
|
270
|
+
e
|
|
271
|
+
);
|
|
272
|
+
});
|
|
265
273
|
return _clientReady;
|
|
266
274
|
}
|
|
267
275
|
export const corePlugin = {
|
|
@@ -288,7 +296,15 @@ export const corePlugin = {
|
|
|
288
296
|
])
|
|
289
297
|
),
|
|
290
298
|
extensions() {
|
|
291
|
-
if (!_cachedClient)
|
|
299
|
+
if (!_cachedClient) {
|
|
300
|
+
if (!_warnedEmptySchema) {
|
|
301
|
+
_warnedEmptySchema = true;
|
|
302
|
+
console.error(
|
|
303
|
+
_clientLoadError ? "[abracadabra:core] Editor extensions failed to load (see error above) \u2014 building the editor with an EMPTY extension set." : "[abracadabra:core] Editor extensions are not ready yet \u2014 building with an EMPTY extension set. Ensure waitForExtensions() resolves before constructing the Editor."
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
return [];
|
|
307
|
+
}
|
|
292
308
|
let disabled = [];
|
|
293
309
|
try {
|
|
294
310
|
disabled = useRuntimeConfig().public?.abracadabra?.disabledBuiltins ?? [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abraca/nuxt",
|
|
3
|
-
"version": "2.17.
|
|
3
|
+
"version": "2.17.2",
|
|
4
4
|
"description": "First-class Nuxt module for the Abracadabra CRDT collaboration platform",
|
|
5
5
|
"repository": "abracadabra/abracadabra-nuxt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -68,16 +68,23 @@
|
|
|
68
68
|
"@tiptap/extension-task-list": "^3.0.0",
|
|
69
69
|
"@tiptap/extension-text-align": "^3.0.0",
|
|
70
70
|
"@tiptap/extension-text-style": "^3.0.0",
|
|
71
|
+
"@tiptap/pm": "^3.0.0",
|
|
71
72
|
"@tiptap/starter-kit": "^3.0.0",
|
|
72
73
|
"@tiptap/suggestion": "^3.0.0",
|
|
73
74
|
"@tiptap/vue-3": "^3.0.0",
|
|
74
75
|
"@unovis/ts": "^1.6.5",
|
|
75
76
|
"@unovis/vue": "^1.6.5",
|
|
76
77
|
"d3-force": "^3.0.0",
|
|
78
|
+
"highlight.js": "^11.0.0",
|
|
77
79
|
"jszip": "^3.0.0",
|
|
78
80
|
"lowlight": "^3.0.0",
|
|
79
81
|
"mapbox-gl": "^3.0.0",
|
|
80
82
|
"nuxt": "^4.0.0",
|
|
83
|
+
"prosemirror-keymap": "^1.0.0",
|
|
84
|
+
"prosemirror-model": "^1.0.0",
|
|
85
|
+
"prosemirror-state": "^1.0.0",
|
|
86
|
+
"prosemirror-transform": "^1.0.0",
|
|
87
|
+
"prosemirror-view": "^1.0.0",
|
|
81
88
|
"three": "^0.184.0",
|
|
82
89
|
"vue": "^3.4.0",
|
|
83
90
|
"y-codemirror.next": "^0.3.5",
|
|
@@ -140,6 +147,27 @@
|
|
|
140
147
|
},
|
|
141
148
|
"@unovis/ts": {
|
|
142
149
|
"optional": true
|
|
150
|
+
},
|
|
151
|
+
"@tiptap/pm": {
|
|
152
|
+
"optional": true
|
|
153
|
+
},
|
|
154
|
+
"highlight.js": {
|
|
155
|
+
"optional": true
|
|
156
|
+
},
|
|
157
|
+
"prosemirror-keymap": {
|
|
158
|
+
"optional": true
|
|
159
|
+
},
|
|
160
|
+
"prosemirror-model": {
|
|
161
|
+
"optional": true
|
|
162
|
+
},
|
|
163
|
+
"prosemirror-state": {
|
|
164
|
+
"optional": true
|
|
165
|
+
},
|
|
166
|
+
"prosemirror-transform": {
|
|
167
|
+
"optional": true
|
|
168
|
+
},
|
|
169
|
+
"prosemirror-view": {
|
|
170
|
+
"optional": true
|
|
143
171
|
}
|
|
144
172
|
},
|
|
145
173
|
"devDependencies": {
|