@studiocms/ui 0.4.6 → 0.4.8

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.
@@ -71,6 +71,8 @@ for (const attr in attributes) {
71
71
  renderAttribsHTML += ` ${attr}="${attributes[attr]}"`;
72
72
  }
73
73
 
74
- const svg = `<svg style="min-width: ${attributes.height || 24}px" xmlns="http://www.w3.org/2000/svg"${renderAttribsHTML}>${body}</svg>`;
74
+ const viewBox = renderData.attributes.viewBox;
75
+
76
+ const svg = `<svg style="min-width: ${attributes.height || 24}px" xmlns="http://www.w3.org/2000/svg"${renderAttribsHTML}${viewBox && ` viewbox="${viewBox}"`}>${body}</svg>`;
75
77
  ---
76
78
  <Fragment set:html={svg} />
package/dist/index.d.ts CHANGED
@@ -7,6 +7,15 @@ type Options = {
7
7
  * @link https://ui.studiocms.dev/docs/guides/customization/
8
8
  */
9
9
  customCss?: string;
10
+ /**
11
+ * Disable CSS Generation and require manual addition of the global CSS
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * import 'studiocms:ui/global-css';
16
+ * ```
17
+ */
18
+ noInjectCSS?: boolean;
10
19
  };
11
20
  export default function integration(options?: Options): AstroIntegration;
12
21
  export {};
package/dist/index.js CHANGED
@@ -80,7 +80,9 @@ function integration(options = {}) {
80
80
  `
81
81
  }
82
82
  });
83
- injectScript("page-ssr", `import 'studiocms:ui/global-css';`);
83
+ if (!options.noInjectCSS) {
84
+ injectScript("page-ssr", `import 'studiocms:ui/global-css';`);
85
+ }
84
86
  if (options.customCss) {
85
87
  injectScript("page-ssr", `import 'studiocms:ui/custom-css';`);
86
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studiocms/ui",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "The UI library for StudioCMS. Includes the layouts & components we use to build StudioCMS.",
5
5
  "repository": {
6
6
  "type": "git",