@wireweave/core 1.3.0 → 1.4.0-beta.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/index.cjs CHANGED
@@ -8043,9 +8043,20 @@ var BaseRenderer = class {
8043
8043
  }
8044
8044
  /**
8045
8045
  * Build theme configuration based on options
8046
+ * If background option is provided, it overrides the theme's default background
8046
8047
  */
8047
8048
  buildTheme(options) {
8048
- return options.theme === "dark" ? { ...darkTheme } : { ...defaultTheme };
8049
+ const baseTheme = options.theme === "dark" ? { ...darkTheme } : { ...defaultTheme };
8050
+ if (options.background !== void 0) {
8051
+ return {
8052
+ ...baseTheme,
8053
+ colors: {
8054
+ ...baseTheme.colors,
8055
+ background: options.background
8056
+ }
8057
+ };
8058
+ }
8059
+ return baseTheme;
8049
8060
  }
8050
8061
  /**
8051
8062
  * Render a wireframe document to HTML and CSS
package/dist/index.js CHANGED
@@ -7903,9 +7903,20 @@ var BaseRenderer = class {
7903
7903
  }
7904
7904
  /**
7905
7905
  * Build theme configuration based on options
7906
+ * If background option is provided, it overrides the theme's default background
7906
7907
  */
7907
7908
  buildTheme(options) {
7908
- return options.theme === "dark" ? { ...darkTheme } : { ...defaultTheme };
7909
+ const baseTheme = options.theme === "dark" ? { ...darkTheme } : { ...defaultTheme };
7910
+ if (options.background !== void 0) {
7911
+ return {
7912
+ ...baseTheme,
7913
+ colors: {
7914
+ ...baseTheme.colors,
7915
+ background: options.background
7916
+ }
7917
+ };
7918
+ }
7919
+ return baseTheme;
7909
7920
  }
7910
7921
  /**
7911
7922
  * Render a wireframe document to HTML and CSS
package/dist/renderer.cjs CHANGED
@@ -1723,9 +1723,20 @@ var BaseRenderer = class {
1723
1723
  }
1724
1724
  /**
1725
1725
  * Build theme configuration based on options
1726
+ * If background option is provided, it overrides the theme's default background
1726
1727
  */
1727
1728
  buildTheme(options) {
1728
- return options.theme === "dark" ? { ...darkTheme } : { ...defaultTheme };
1729
+ const baseTheme = options.theme === "dark" ? { ...darkTheme } : { ...defaultTheme };
1730
+ if (options.background !== void 0) {
1731
+ return {
1732
+ ...baseTheme,
1733
+ colors: {
1734
+ ...baseTheme.colors,
1735
+ background: options.background
1736
+ }
1737
+ };
1738
+ }
1739
+ return baseTheme;
1729
1740
  }
1730
1741
  /**
1731
1742
  * Render a wireframe document to HTML and CSS
@@ -16,6 +16,8 @@ interface RenderOptions {
16
16
  minify?: boolean;
17
17
  /** CSS class prefix for scoping */
18
18
  classPrefix?: string;
19
+ /** Background color (e.g., '#ffffff', 'transparent') */
20
+ background?: string;
19
21
  }
20
22
  interface RenderResult {
21
23
  /** Rendered HTML content */
@@ -121,8 +123,9 @@ declare abstract class BaseRenderer {
121
123
  constructor(options?: RenderOptions);
122
124
  /**
123
125
  * Build theme configuration based on options
126
+ * If background option is provided, it overrides the theme's default background
124
127
  */
125
- protected buildTheme(options: Required<RenderOptions>): ThemeConfig;
128
+ protected buildTheme(options: RenderOptions): ThemeConfig;
126
129
  /**
127
130
  * Render a wireframe document to HTML and CSS
128
131
  */
@@ -16,6 +16,8 @@ interface RenderOptions {
16
16
  minify?: boolean;
17
17
  /** CSS class prefix for scoping */
18
18
  classPrefix?: string;
19
+ /** Background color (e.g., '#ffffff', 'transparent') */
20
+ background?: string;
19
21
  }
20
22
  interface RenderResult {
21
23
  /** Rendered HTML content */
@@ -121,8 +123,9 @@ declare abstract class BaseRenderer {
121
123
  constructor(options?: RenderOptions);
122
124
  /**
123
125
  * Build theme configuration based on options
126
+ * If background option is provided, it overrides the theme's default background
124
127
  */
125
- protected buildTheme(options: Required<RenderOptions>): ThemeConfig;
128
+ protected buildTheme(options: RenderOptions): ThemeConfig;
126
129
  /**
127
130
  * Render a wireframe document to HTML and CSS
128
131
  */
package/dist/renderer.js CHANGED
@@ -1685,9 +1685,20 @@ var BaseRenderer = class {
1685
1685
  }
1686
1686
  /**
1687
1687
  * Build theme configuration based on options
1688
+ * If background option is provided, it overrides the theme's default background
1688
1689
  */
1689
1690
  buildTheme(options) {
1690
- return options.theme === "dark" ? { ...darkTheme } : { ...defaultTheme };
1691
+ const baseTheme = options.theme === "dark" ? { ...darkTheme } : { ...defaultTheme };
1692
+ if (options.background !== void 0) {
1693
+ return {
1694
+ ...baseTheme,
1695
+ colors: {
1696
+ ...baseTheme.colors,
1697
+ background: options.background
1698
+ }
1699
+ };
1700
+ }
1701
+ return baseTheme;
1691
1702
  }
1692
1703
  /**
1693
1704
  * Render a wireframe document to HTML and CSS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireweave/core",
3
- "version": "1.3.0",
3
+ "version": "1.4.0-beta.0",
4
4
  "description": "Core parser and renderer for wireweave",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",