@wireweave/core 1.2.0 → 1.3.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/renderer.cjs CHANGED
@@ -49752,7 +49752,7 @@ function renderToSvg(document, options = {}) {
49752
49752
  }
49753
49753
  }
49754
49754
  const background = options.background ?? "#ffffff";
49755
- const { html, css } = render(document, { theme: "light" });
49755
+ const { html, css } = render(document, { theme: options.theme ?? "light" });
49756
49756
  const svg = `<?xml version="1.0" encoding="UTF-8"?>
49757
49757
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
49758
49758
  viewBox="0 0 ${width} ${height}" width="${width}" height="${height}">
@@ -36,6 +36,8 @@ interface SvgRenderOptions {
36
36
  background?: string;
37
37
  /** Font family */
38
38
  fontFamily?: string;
39
+ /** Theme variant */
40
+ theme?: 'light' | 'dark';
39
41
  }
40
42
  interface SvgRenderResult {
41
43
  /** Rendered SVG content */
@@ -36,6 +36,8 @@ interface SvgRenderOptions {
36
36
  background?: string;
37
37
  /** Font family */
38
38
  fontFamily?: string;
39
+ /** Theme variant */
40
+ theme?: 'light' | 'dark';
39
41
  }
40
42
  interface SvgRenderResult {
41
43
  /** Rendered SVG content */
package/dist/renderer.js CHANGED
@@ -49714,7 +49714,7 @@ function renderToSvg(document, options = {}) {
49714
49714
  }
49715
49715
  }
49716
49716
  const background = options.background ?? "#ffffff";
49717
- const { html, css } = render(document, { theme: "light" });
49717
+ const { html, css } = render(document, { theme: options.theme ?? "light" });
49718
49718
  const svg = `<?xml version="1.0" encoding="UTF-8"?>
49719
49719
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
49720
49720
  viewBox="0 0 ${width} ${height}" width="${width}" height="${height}">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireweave/core",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Core parser and renderer for wireweave",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",