Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wixc3/board-core

Package Overview
Dependencies
Maintainers
82
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wixc3/board-core - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

3

dist/setup-stage.d.ts

@@ -5,3 +5,2 @@ import type { BoardSetupStageFunction, CanvasStyles } from './types';

readonly height: 640;
readonly backgroundColor: "#fcfcfc";
};

@@ -12,8 +11,6 @@ export declare const defaultCanvasStyles: CanvasStyles;

windowHeight: 640;
windowBackgroundColor: "#fcfcfc";
canvasMargin: {};
canvasPadding: {};
canvasBackgroundColor: string;
};
export declare const setupBoardStage: BoardSetupStageFunction;
//# sourceMappingURL=setup-stage.d.ts.map

@@ -8,3 +8,2 @@ "use strict";

height: 640,
backgroundColor: '#fcfcfc',
};

@@ -22,3 +21,2 @@ exports.defaultCanvasStyles = {

paddingTop: '0px',
backgroundColor: '#fff',
};

@@ -28,6 +26,4 @@ exports.defaultEnvironmentProperties = {

windowHeight: exports.defaultWindowStyles.height,
windowBackgroundColor: exports.defaultWindowStyles.backgroundColor,
canvasMargin: {},
canvasPadding: {},
canvasBackgroundColor: exports.defaultCanvasStyles.backgroundColor,
};

@@ -38,7 +34,4 @@ const applyStylesToWindow = (windowStyles = {}, previousProps) => {

previousProps.windowWidth = previousProps.windowWidth ? window.outerWidth : exports.defaultWindowStyles.width;
previousProps.windowBackgroundColor = previousProps.windowBackgroundColor
? document.body.style.backgroundColor
: exports.defaultWindowStyles.backgroundColor;
window.resizeTo(windowStyles.windowWidth || previousProps.windowWidth, windowStyles.windowHeight || previousProps.windowHeight);
document.body.style.backgroundColor = windowStyles.windowBackgroundColor || previousProps.windowBackgroundColor;
document.body.style.backgroundColor = windowStyles.windowBackgroundColor || '';
};

@@ -74,3 +67,3 @@ const applyStylesToCanvas = (canvas, environmentProps = {}) => {

: exports.defaultCanvasStyles.paddingTop,
backgroundColor: environmentProps.canvasBackgroundColor || exports.defaultCanvasStyles.backgroundColor,
backgroundColor: environmentProps.canvasBackgroundColor || '',
};

@@ -108,5 +101,2 @@ // Canvas gets stretched horizontally/vertically

}
if (previousWindowEnvironmentProps.windowBackgroundColor) {
document.body.style.backgroundColor = previousWindowEnvironmentProps.windowBackgroundColor;
}
};

@@ -113,0 +103,0 @@ return { canvas, updateCanvas, updateWindow, cleanup };

2

dist/types.d.ts

@@ -104,3 +104,3 @@ export declare type LayoutSize = number | undefined | null;

};
export declare type CanvasStyles = Pick<CSSStyleDeclaration, 'backgroundColor' | 'height' | 'width' | 'paddingLeft' | 'paddingRight' | 'paddingBottom' | 'paddingTop' | 'marginLeft' | 'marginRight' | 'marginBottom' | 'marginTop'>;
export declare type CanvasStyles = Pick<CSSStyleDeclaration, 'height' | 'width' | 'paddingLeft' | 'paddingRight' | 'paddingBottom' | 'paddingTop' | 'marginLeft' | 'marginRight' | 'marginBottom' | 'marginTop'>;
//# sourceMappingURL=types.d.ts.map
{
"name": "@wixc3/board-core",
"description": "Types and helpers for component boards",
"version": "1.1.0",
"version": "1.2.0",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "files": [

@@ -166,3 +166,2 @@ export type LayoutSize = number | undefined | null;

CSSStyleDeclaration,
| 'backgroundColor'
| 'height'

@@ -169,0 +168,0 @@ | 'width'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc