@wireweave/core 1.3.0 → 1.4.0-beta.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/index.cjs +7 -1
- package/dist/index.js +7 -1
- package/dist/renderer.cjs +7 -1
- package/dist/renderer.d.cts +6 -1
- package/dist/renderer.d.ts +6 -1
- package/dist/renderer.js +7 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8043,6 +8043,9 @@ var BaseRenderer = class {
|
|
|
8043
8043
|
}
|
|
8044
8044
|
/**
|
|
8045
8045
|
* Build theme configuration based on options
|
|
8046
|
+
* Note: background option is NOT applied to theme.colors.background
|
|
8047
|
+
* It's only used for page background in renderPage() to avoid affecting
|
|
8048
|
+
* component colors that use var(--wf-bg)
|
|
8046
8049
|
*/
|
|
8047
8050
|
buildTheme(options) {
|
|
8048
8051
|
return options.theme === "dark" ? { ...darkTheme } : { ...defaultTheme };
|
|
@@ -55671,7 +55674,10 @@ var HtmlRenderer = class extends BaseRenderer {
|
|
|
55671
55674
|
const title = node.title ? `<title>${this.escapeHtml(node.title)}</title>
|
|
55672
55675
|
` : "";
|
|
55673
55676
|
const commonStyles = this.buildCommonStyles(node);
|
|
55674
|
-
|
|
55677
|
+
let viewportStyle = `position: relative; width: ${viewport.width}px; height: ${viewport.height}px; overflow: hidden`;
|
|
55678
|
+
if (this.context.options.background) {
|
|
55679
|
+
viewportStyle += `; background: ${this.context.options.background}`;
|
|
55680
|
+
}
|
|
55675
55681
|
const combinedStyle = commonStyles ? `${viewportStyle}; ${commonStyles}` : viewportStyle;
|
|
55676
55682
|
const dataAttrs = `data-viewport-width="${viewport.width}" data-viewport-height="${viewport.height}" data-viewport-label="${viewport.label}"`;
|
|
55677
55683
|
return `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>
|
package/dist/index.js
CHANGED
|
@@ -7903,6 +7903,9 @@ var BaseRenderer = class {
|
|
|
7903
7903
|
}
|
|
7904
7904
|
/**
|
|
7905
7905
|
* Build theme configuration based on options
|
|
7906
|
+
* Note: background option is NOT applied to theme.colors.background
|
|
7907
|
+
* It's only used for page background in renderPage() to avoid affecting
|
|
7908
|
+
* component colors that use var(--wf-bg)
|
|
7906
7909
|
*/
|
|
7907
7910
|
buildTheme(options) {
|
|
7908
7911
|
return options.theme === "dark" ? { ...darkTheme } : { ...defaultTheme };
|
|
@@ -55531,7 +55534,10 @@ var HtmlRenderer = class extends BaseRenderer {
|
|
|
55531
55534
|
const title = node.title ? `<title>${this.escapeHtml(node.title)}</title>
|
|
55532
55535
|
` : "";
|
|
55533
55536
|
const commonStyles = this.buildCommonStyles(node);
|
|
55534
|
-
|
|
55537
|
+
let viewportStyle = `position: relative; width: ${viewport.width}px; height: ${viewport.height}px; overflow: hidden`;
|
|
55538
|
+
if (this.context.options.background) {
|
|
55539
|
+
viewportStyle += `; background: ${this.context.options.background}`;
|
|
55540
|
+
}
|
|
55535
55541
|
const combinedStyle = commonStyles ? `${viewportStyle}; ${commonStyles}` : viewportStyle;
|
|
55536
55542
|
const dataAttrs = `data-viewport-width="${viewport.width}" data-viewport-height="${viewport.height}" data-viewport-label="${viewport.label}"`;
|
|
55537
55543
|
return `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>
|
package/dist/renderer.cjs
CHANGED
|
@@ -1723,6 +1723,9 @@ var BaseRenderer = class {
|
|
|
1723
1723
|
}
|
|
1724
1724
|
/**
|
|
1725
1725
|
* Build theme configuration based on options
|
|
1726
|
+
* Note: background option is NOT applied to theme.colors.background
|
|
1727
|
+
* It's only used for page background in renderPage() to avoid affecting
|
|
1728
|
+
* component colors that use var(--wf-bg)
|
|
1726
1729
|
*/
|
|
1727
1730
|
buildTheme(options) {
|
|
1728
1731
|
return options.theme === "dark" ? { ...darkTheme } : { ...defaultTheme };
|
|
@@ -49322,7 +49325,10 @@ var HtmlRenderer = class extends BaseRenderer {
|
|
|
49322
49325
|
const title = node.title ? `<title>${this.escapeHtml(node.title)}</title>
|
|
49323
49326
|
` : "";
|
|
49324
49327
|
const commonStyles = this.buildCommonStyles(node);
|
|
49325
|
-
|
|
49328
|
+
let viewportStyle = `position: relative; width: ${viewport.width}px; height: ${viewport.height}px; overflow: hidden`;
|
|
49329
|
+
if (this.context.options.background) {
|
|
49330
|
+
viewportStyle += `; background: ${this.context.options.background}`;
|
|
49331
|
+
}
|
|
49326
49332
|
const combinedStyle = commonStyles ? `${viewportStyle}; ${commonStyles}` : viewportStyle;
|
|
49327
49333
|
const dataAttrs = `data-viewport-width="${viewport.width}" data-viewport-height="${viewport.height}" data-viewport-label="${viewport.label}"`;
|
|
49328
49334
|
return `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>
|
package/dist/renderer.d.cts
CHANGED
|
@@ -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,11 @@ declare abstract class BaseRenderer {
|
|
|
121
123
|
constructor(options?: RenderOptions);
|
|
122
124
|
/**
|
|
123
125
|
* Build theme configuration based on options
|
|
126
|
+
* Note: background option is NOT applied to theme.colors.background
|
|
127
|
+
* It's only used for page background in renderPage() to avoid affecting
|
|
128
|
+
* component colors that use var(--wf-bg)
|
|
124
129
|
*/
|
|
125
|
-
protected buildTheme(options:
|
|
130
|
+
protected buildTheme(options: RenderOptions): ThemeConfig;
|
|
126
131
|
/**
|
|
127
132
|
* Render a wireframe document to HTML and CSS
|
|
128
133
|
*/
|
package/dist/renderer.d.ts
CHANGED
|
@@ -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,11 @@ declare abstract class BaseRenderer {
|
|
|
121
123
|
constructor(options?: RenderOptions);
|
|
122
124
|
/**
|
|
123
125
|
* Build theme configuration based on options
|
|
126
|
+
* Note: background option is NOT applied to theme.colors.background
|
|
127
|
+
* It's only used for page background in renderPage() to avoid affecting
|
|
128
|
+
* component colors that use var(--wf-bg)
|
|
124
129
|
*/
|
|
125
|
-
protected buildTheme(options:
|
|
130
|
+
protected buildTheme(options: RenderOptions): ThemeConfig;
|
|
126
131
|
/**
|
|
127
132
|
* Render a wireframe document to HTML and CSS
|
|
128
133
|
*/
|
package/dist/renderer.js
CHANGED
|
@@ -1685,6 +1685,9 @@ var BaseRenderer = class {
|
|
|
1685
1685
|
}
|
|
1686
1686
|
/**
|
|
1687
1687
|
* Build theme configuration based on options
|
|
1688
|
+
* Note: background option is NOT applied to theme.colors.background
|
|
1689
|
+
* It's only used for page background in renderPage() to avoid affecting
|
|
1690
|
+
* component colors that use var(--wf-bg)
|
|
1688
1691
|
*/
|
|
1689
1692
|
buildTheme(options) {
|
|
1690
1693
|
return options.theme === "dark" ? { ...darkTheme } : { ...defaultTheme };
|
|
@@ -49284,7 +49287,10 @@ var HtmlRenderer = class extends BaseRenderer {
|
|
|
49284
49287
|
const title = node.title ? `<title>${this.escapeHtml(node.title)}</title>
|
|
49285
49288
|
` : "";
|
|
49286
49289
|
const commonStyles = this.buildCommonStyles(node);
|
|
49287
|
-
|
|
49290
|
+
let viewportStyle = `position: relative; width: ${viewport.width}px; height: ${viewport.height}px; overflow: hidden`;
|
|
49291
|
+
if (this.context.options.background) {
|
|
49292
|
+
viewportStyle += `; background: ${this.context.options.background}`;
|
|
49293
|
+
}
|
|
49288
49294
|
const combinedStyle = commonStyles ? `${viewportStyle}; ${commonStyles}` : viewportStyle;
|
|
49289
49295
|
const dataAttrs = `data-viewport-width="${viewport.width}" data-viewport-height="${viewport.height}" data-viewport-label="${viewport.label}"`;
|
|
49290
49296
|
return `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>
|