Socket
Socket
Sign inDemoInstall

@paperbits/styles

Package Overview
Dependencies
Maintainers
2
Versions
592
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paperbits/styles - npm Package Compare versions

Comparing version 0.1.593 to 0.1.594

4

package.json
{
"name": "@paperbits/styles",
"version": "0.1.593",
"version": "0.1.594",
"description": "Paperbits style editors.",

@@ -19,3 +19,3 @@ "author": "Paperbits",

"dependencies": {
"@paperbits/common": "0.1.593",
"@paperbits/common": "0.1.594",
"@simonwep/pickr": "^1.7.4",

@@ -22,0 +22,0 @@ "jss": "^10.4.0",

@@ -55,7 +55,9 @@ import { StyleRule } from "@paperbits/common/styles";

}
else if (pluginConfig.overflow.vertical) {
rules.push(new StyleRule("overflowY", "auto"));
}
else {
rules.push(new StyleRule("overflowX", "auto"));
if (pluginConfig.overflow.vertical) {
rules.push(new StyleRule("overflowY", "auto"));
}
if (pluginConfig.overflow.horizontal) {
rules.push(new StyleRule("overflowX", "auto"));
}
}

@@ -62,0 +64,0 @@ }

@@ -62,11 +62,15 @@ import { StylePlugin } from "../stylePlugin";

if (pluginConfig.overflow) {
if (pluginConfig.overflow.vertical && pluginConfig.overflow.horizontal) {
rules.push(new StyleRule("overflow", "auto"));
if (pluginConfig.overflow) {
if (pluginConfig.overflow.vertical && pluginConfig.overflow.horizontal) {
rules.push(new StyleRule("overflow", "auto"));
}
else {
if (pluginConfig.overflow.vertical) {
rules.push(new StyleRule("overflowY", "auto"));
}
if (pluginConfig.overflow.horizontal) {
rules.push(new StyleRule("overflowX", "auto"));
}
}
}
else if (pluginConfig.overflow.vertical) {
rules.push(new StyleRule("overflowY", "auto"));
}
else {
rules.push(new StyleRule("overflowX", "auto"));
}

@@ -73,0 +77,0 @@ rules.push(new StyleRule("position", "absolute"));

@@ -14,3 +14,4 @@ import * as ko from "knockout";

public readonly alignment: ko.Observable<string>;
public readonly scrollOnOverlow: ko.Observable<boolean>;
public readonly scrollOnOverlowV: ko.Observable<boolean>;
public readonly scrollOnOverlowH: ko.Observable<boolean>;
public readonly horizontalAlignmentTooltip: ko.Computed<string>;

@@ -22,3 +23,4 @@

this.horizontalAlignment = ko.observable<string>();
this.scrollOnOverlow = ko.observable<boolean>();
this.scrollOnOverlowV = ko.observable<boolean>();
this.scrollOnOverlowH = ko.observable<boolean>();
this.container = ko.observable<ContainerStylePluginConfig>();

@@ -56,3 +58,4 @@ this.overflowControls = ko.observable(false);

this.container.subscribe(this.updateObservables);
this.scrollOnOverlow.subscribe(this.onOverflowChange);
this.scrollOnOverlowV.subscribe(this.onOverflowChange);
this.scrollOnOverlowH.subscribe(this.onOverflowChange);
}

@@ -63,8 +66,4 @@

if (containerStyle?.overflow) {
this.scrollOnOverlow(true);
}
else {
this.scrollOnOverlow(false);
}
this.scrollOnOverlowV(containerStyle?.overflow?.vertical === "scroll");
this.scrollOnOverlowH(containerStyle?.overflow?.horizontal === "scroll");

@@ -81,6 +80,11 @@ this.verticalAlignment(containerStyle?.alignment?.vertical);

const overflow = this.scrollOnOverlow()
? { vertical: "scroll", horizontal: "scroll" }
: null;
let overflow = null
if (this.scrollOnOverlowV() || this.scrollOnOverlowH()) {
overflow = {
vertical: this.scrollOnOverlowV() ? "scroll" : null,
horizontal: this.scrollOnOverlowH() ? "scroll" : null,
};
}
this.onUpdate({

@@ -87,0 +91,0 @@ alignment: {

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc