@abraca/nuxt 2.6.0 → 2.8.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.6.0",
7
+ "version": "2.8.0",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -285,6 +285,11 @@ const module$1 = defineNuxtModule({
285
285
  prebundleDeps.push("jszip");
286
286
  } catch {
287
287
  }
288
+ try {
289
+ createRequire(`${nuxt.options.rootDir}/`).resolve("mapbox-gl");
290
+ prebundleDeps.push("mapbox-gl");
291
+ } catch {
292
+ }
288
293
  if (options.features?.code !== false) {
289
294
  const cmPeers = [
290
295
  "@codemirror/view",
@@ -73,16 +73,16 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
73
73
  editor: import("vue").ComputedRef<any>;
74
74
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
75
75
  rename: (label: string) => any;
76
- ready: () => any;
77
76
  update: (content: any) => any;
78
77
  "update:modelValue": (value: any) => any;
79
78
  updateMeta: (patch: Partial<DocPageMeta>) => any;
79
+ ready: () => any;
80
80
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
81
81
  onRename?: ((label: string) => any) | undefined;
82
- onReady?: (() => any) | undefined;
83
82
  onUpdate?: ((content: any) => any) | undefined;
84
83
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
85
84
  onUpdateMeta?: ((patch: Partial<DocPageMeta>) => any) | undefined;
85
+ onReady?: (() => any) | undefined;
86
86
  }>, {
87
87
  contentType: "json" | "html" | "markdown";
88
88
  editable: boolean;
@@ -73,16 +73,16 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
73
73
  editor: import("vue").ComputedRef<any>;
74
74
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
75
75
  rename: (label: string) => any;
76
- ready: () => any;
77
76
  update: (content: any) => any;
78
77
  "update:modelValue": (value: any) => any;
79
78
  updateMeta: (patch: Partial<DocPageMeta>) => any;
79
+ ready: () => any;
80
80
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
81
81
  onRename?: ((label: string) => any) | undefined;
82
- onReady?: (() => any) | undefined;
83
82
  onUpdate?: ((content: any) => any) | undefined;
84
83
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
85
84
  onUpdateMeta?: ((patch: Partial<DocPageMeta>) => any) | undefined;
85
+ onReady?: (() => any) | undefined;
86
86
  }>, {
87
87
  contentType: "json" | "html" | "markdown";
88
88
  editable: boolean;
@@ -10,14 +10,14 @@ type __VLS_Props = {
10
10
  };
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
- ready: () => any;
14
13
  update: (content: any) => any;
15
14
  updateMeta: (patch: Partial<DocPageMeta>) => any;
15
+ ready: () => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
17
  onRename?: ((label: string) => any) | undefined;
18
- onReady?: (() => any) | undefined;
19
18
  onUpdate?: ((content: any) => any) | undefined;
20
19
  onUpdateMeta?: ((patch: Partial<DocPageMeta>) => any) | undefined;
20
+ onReady?: (() => any) | undefined;
21
21
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
22
  declare const _default: typeof __VLS_export;
23
23
  export default _default;
@@ -10,14 +10,14 @@ type __VLS_Props = {
10
10
  };
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
- ready: () => any;
14
13
  update: (content: any) => any;
15
14
  updateMeta: (patch: Partial<DocPageMeta>) => any;
15
+ ready: () => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
17
  onRename?: ((label: string) => any) | undefined;
18
- onReady?: (() => any) | undefined;
19
18
  onUpdate?: ((content: any) => any) | undefined;
20
19
  onUpdateMeta?: ((patch: Partial<DocPageMeta>) => any) | undefined;
20
+ onReady?: (() => any) | undefined;
21
21
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
22
  declare const _default: typeof __VLS_export;
23
23
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("#app").RouteMiddleware;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
1
+ declare const _default: any;
2
2
  export default _default;
3
3
  declare module '#app' {
4
4
  interface NuxtApp {
@@ -1,2 +1,2 @@
1
- declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -256,16 +256,26 @@ async function loadServerExtensions() {
256
256
  }
257
257
  let _cachedClient = null;
258
258
  let _cachedServer = null;
259
- const _clientReady = loadClientExtensions().then((exts) => {
260
- _cachedClient = exts;
261
- }).catch((e) => console.warn("[abracadabra:core] Failed to preload client extensions:", e));
259
+ let _clientReady = null;
260
+ function ensureClientReady() {
261
+ if (_clientReady) return _clientReady;
262
+ _clientReady = loadClientExtensions().then((exts) => {
263
+ _cachedClient = exts;
264
+ }).catch((e) => console.warn("[abracadabra:core] Failed to preload client extensions:", e));
265
+ return _clientReady;
266
+ }
262
267
  export const corePlugin = {
263
268
  name: "core",
264
269
  label: "Core",
265
270
  version: "0.1.0",
266
271
  description: "Core TipTap extensions: rich text, tables, tasks, code blocks, document structure, and more.",
267
- // Expose the loading promise so PluginRegistry.waitForExtensions() can await it.
268
- extensionsReady: _clientReady,
272
+ // Lazy property: reading it the first time kicks off the dynamic import
273
+ // wave. PluginRegistry.waitForExtensions() reads `p.extensionsReady` on
274
+ // every aggregator call, so the editor still gets a warmed cache before
275
+ // construction — but apps that never mount an editor never pay the cost.
276
+ get extensionsReady() {
277
+ return ensureClientReady();
278
+ },
269
279
  pageTypes: Object.fromEntries(
270
280
  Object.entries(DOC_TYPES).map(([key, def]) => [
271
281
  key,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abraca/nuxt",
3
- "version": "2.6.0",
3
+ "version": "2.8.0",
4
4
  "description": "First-class Nuxt module for the Abracadabra CRDT collaboration platform",
5
5
  "repository": "abracadabra/abracadabra-nuxt",
6
6
  "license": "MIT",