@xleddyl/nuxt-cms 0.8.0 → 0.8.1

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xleddyl/nuxt-cms",
3
3
  "configKey": "cms",
4
- "version": "0.8.0",
4
+ "version": "0.8.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -2,8 +2,8 @@ import { spawn } from 'node:child_process';
2
2
  import { existsSync, readFileSync } from 'node:fs';
3
3
  import { createRequire } from 'node:module';
4
4
  import { extname, resolve, isAbsolute, join, relative, dirname } from 'node:path';
5
- import { fileURLToPath } from 'node:url';
6
- import { defineNuxtModule, createResolver, useLogger, addImports, addTemplate, addServerPlugin, addTypeTemplate, addComponentsDir, addRouteMiddleware, extendPages, addServerHandler, resolvePath, addComponent } from '@nuxt/kit';
5
+ import { pathToFileURL, fileURLToPath } from 'node:url';
6
+ import { defineNuxtModule, createResolver, useLogger, addImports, addTemplate, addServerPlugin, addTypeTemplate, addComponentsDir, tryResolveModule, addRouteMiddleware, extendPages, addServerHandler, resolvePath, addComponent } from '@nuxt/kit';
7
7
  import { introspectionFromSchema, buildSchema } from 'graphql';
8
8
  import { minifyIntrospection, outputIntrospectionFile } from 'gql.tada/internal';
9
9
  import { createJiti } from 'jiti';
@@ -1548,6 +1548,9 @@ const module$1 = defineNuxtModule({
1548
1548
  "nuxt-auth-utils": {},
1549
1549
  "@xleddyl/443-components-vue/nuxt": {
1550
1550
  defaults: {
1551
+ composables: false,
1552
+ css: false,
1553
+ fonts: false,
1551
1554
  editor: true,
1552
1555
  icons: {
1553
1556
  collections: [
@@ -1918,11 +1921,6 @@ const module$1 = defineNuxtModule({
1918
1921
  getContents: () => renderBrandFile(resolveBrand(resolved.admin, brandPaths).brand)
1919
1922
  });
1920
1923
  nuxt.options.alias["#cms-brand"] = brandTemplate.dst;
1921
- nuxt.options.css.push(
1922
- resolveImport("@fontsource-variable/geist/index.css"),
1923
- resolveImport("@fontsource-variable/geist-mono/index.css"),
1924
- resolver.resolve("./runtime/assets/cms.css")
1925
- );
1926
1924
  nuxt.hook("app:templates", (app) => {
1927
1925
  app.layouts["cms-admin"] = {
1928
1926
  name: "cms-admin",
@@ -1934,6 +1932,23 @@ const module$1 = defineNuxtModule({
1934
1932
  };
1935
1933
  });
1936
1934
  addComponentsDir({ path: resolver.resolve("./runtime/app/components") });
1935
+ nuxt.hook("app:resolve", (app) => {
1936
+ app.plugins = app.plugins.filter(
1937
+ (plugin) => !/[\\/]443-components-vue[\\/]dist[\\/]nuxt[\\/]runtime[\\/](theme|locale)(\.mjs)?$/.test(
1938
+ plugin.src
1939
+ )
1940
+ );
1941
+ });
1942
+ nuxt.hook("modules:done", async () => {
1943
+ const include = nuxt.options.vite.optimizeDeps?.include;
1944
+ if (!include) return;
1945
+ const rootUrl = pathToFileURL(`${nuxt.options.rootDir}/`).href;
1946
+ nuxt.options.vite.optimizeDeps.include = await Promise.all(
1947
+ include.map(
1948
+ async (entry) => entry.startsWith("@tiptap/") && !await tryResolveModule(entry, rootUrl) ? `@xleddyl/nuxt-cms > ${entry}` : entry
1949
+ )
1950
+ );
1951
+ });
1937
1952
  addRouteMiddleware({
1938
1953
  name: "cms-auth",
1939
1954
  path: resolver.resolve("./runtime/app/middleware/cms-auth")
@@ -223,3 +223,7 @@ async function logout() {
223
223
  await navigateTo("/cms/login");
224
224
  }
225
225
  </script>
226
+
227
+ <style src="../../assets/admin.css">
228
+
229
+ </style>
@@ -17,3 +17,7 @@ const theme = useCmsTheme();
17
17
  provideTheme(theme);
18
18
  await loadCmsSettings();
19
19
  </script>
20
+
21
+ <style src="../../assets/admin.css">
22
+
23
+ </style>
@@ -75,3 +75,7 @@ async function login(values) {
75
75
  }
76
76
  }
77
77
  </script>
78
+
79
+ <style src="../../assets/admin.css">
80
+
81
+ </style>
@@ -0,0 +1 @@
1
+ @layer theme, base, k, components, utilities;@import "@xleddyl/443-components-vue/style.css";@import "@xleddyl/443-components-vue/editor/style.css";@import "@fontsource-variable/geist/index.css";@import "@fontsource-variable/geist-mono/index.css";@import "./cms.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xleddyl/nuxt-cms",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Lightweight CMS that ships with your Nuxt app: runs on the Nitro server, content types defined in code, /cms admin panel, GraphQL API, SQLite or Postgres. No external CMS needed!",
5
5
  "license": "MIT",
6
6
  "author": "Edoardo Alberti (https://github.com/xleddyl)",