nebula-cms 0.1.5 → 0.1.7

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/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  A streamlined, Git-based Content Management System built specifically for [Astro](https://astro.build/). Nebula CMS provides a beautiful, unified editing interface for your Markdown, MDX, JSON, YAML, TOML, and Markdoc files, driven directly by your existing Astro [Content Collections](https://docs.astro.build/en/guides/content-collections/).
6
6
 
7
+ ![Screnshot of NebulaCMS using the author's blog as an example](https://github.com/user-attachments/assets/8ca305e9-4f26-4719-aae5-b70a5f1958e1)
8
+
7
9
  ## Features
8
10
 
9
11
  - **Painless Integration**: Plugs perfectly into Astro as a standard integration.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/astro/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAmDnD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,MAAM,GAAE,eAAoB,GAC3B,gBAAgB,CA6ElB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,sBAAsB,EAC9B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC;;IAK/B;;;;;OAKG;4BACqB;QAAE,WAAW,EAAE;YAAE,GAAG,EAAE,QAAQ,CAAA;SAAE,CAAA;KAAE;IA0E1D;;;;OAIG;kBACW,MAAM;IAKpB;;;;OAIG;aACM,MAAM;EA6BlB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/astro/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAmDnD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,MAAM,GAAE,eAAoB,GAC3B,gBAAgB,CA8ElB;AA6BD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,sBAAsB,EAC9B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC;;IAK/B;;;;;OAKG;4BACqB;QAAE,WAAW,EAAE;YAAE,GAAG,EAAE,QAAQ,CAAA;SAAE,CAAA;KAAE;IA0E1D;;;;OAIG;kBACW,MAAM;IAKpB;;;;OAIG;aACM,MAAM;EA6BlB"}
@@ -76,6 +76,7 @@ export default function NebulaCMS(config = {}) {
76
76
  vite: {
77
77
  plugins: [
78
78
  nebulaVitePlugin(logger, process.cwd(), normalizedConfig),
79
+ nebulaCSSFixPlugin(),
79
80
  ],
80
81
  /*
81
82
  * Workers use dynamic imports (e.g. storage worker lazy-loads
@@ -114,6 +115,32 @@ export default function NebulaCMS(config = {}) {
114
115
  },
115
116
  };
116
117
  }
118
+ /*
119
+ * Regex matching Svelte CSS virtual module IDs from nebula-cms.
120
+ * These IDs look like: .../nebula-cms/dist/client/Foo.svelte?svelte&type=style&lang.css
121
+ */
122
+ const NEBULA_CSS_RE = /nebula-cms\/dist\/client\/.*\.svelte\?svelte&type=style/;
123
+ /**
124
+ * Vite plugin that strips cssScopeTo metadata from nebula-cms CSS
125
+ * virtual modules. Without this, Astro's production build pipeline
126
+ * tree-shakes CSS for conditionally-rendered Svelte components
127
+ * (those behind {#if} blocks that don't execute during SSR),
128
+ * resulting in missing scoped styles in the production output.
129
+ * Removing cssScopeTo ensures the SSR build retains all component
130
+ * CSS regardless of which branches execute during prerendering.
131
+ * @return {object} Vite plugin
132
+ */
133
+ function nebulaCSSFixPlugin() {
134
+ return {
135
+ name: 'vite-plugin-nebula-css-fix',
136
+ transform(code, id) {
137
+ if (!NEBULA_CSS_RE.test(id))
138
+ return null;
139
+ // Return the CSS unchanged but replace vite meta to strip cssScopeTo
140
+ return { code, meta: { vite: {} } };
141
+ },
142
+ };
143
+ }
117
144
  /**
118
145
  * Vite plugin that serves collection schemas and CMS config via virtual modules.
119
146
  * @internal Not part of the public API — exported for testing only
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nebula-cms",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "A native CMS for Astro",
5
5
  "type": "module",
6
6
  "repository": {