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.590 to 0.1.591

plugins/table/tableCellStylePlugin.ts

20

defaultStyleCompiler.ts

@@ -7,3 +7,3 @@ import * as Utils from "@paperbits/common/utils";

import { IPermalinkResolver } from "@paperbits/common/permalinks";
import { BreakpointValues } from "@paperbits/common/styles/breakpoints";
import { BreakpointValues, Breakpoints } from "@paperbits/common/styles/breakpoints";
import {

@@ -52,2 +52,4 @@ StylePlugin,

import { IconsFontFamilyName, IconsFontStyleName, IconsFontWeight } from "./constants";
import { TableCellStylePlugin } from "./plugins/table/tableCellStylePlugin";
import { TableStylePlugin } from "./plugins/table/tableStylePlugin";

@@ -125,2 +127,4 @@

this.plugins["grid-cell"] = new GridCellStylePlugin();
this.plugins["table"] = new TableStylePlugin();
this.plugins["table-cell"] = new TableCellStylePlugin();
this.plugins["container"] = new ContainerStylePlugin();

@@ -181,3 +185,3 @@ this.plugins["size"] = new SizeStylePlugin();

public async getStyleSheet(): Promise<StyleSheet> {
public async getStyleSheet(topBreakpoint?: string): Promise<StyleSheet> {
if (!this.initialized) {

@@ -211,3 +215,3 @@ await this.initializePlugins();

const variationStyle = await this.getVariationStyle(componentConfig[variationName], componentName, variationName);
const variationStyle = await this.getVariationStyle(componentConfig[variationName], componentName, variationName, false, false);
componentStyle.modifierStyles.push(variationStyle);

@@ -236,3 +240,3 @@ }

const defaultComponentStyle = await this.getVariationStyle(tagConfig["default"], tagName, "default", true);
const defaultComponentStyle = await this.getVariationStyle(tagConfig["default"], tagName, "default", true, false, topBreakpoint);
const variations = Object.keys(tagConfig);

@@ -251,3 +255,3 @@

const variationStyle = await this.getVariationStyle(tagConfig[variationName], componentName, variationName, false);
const variationStyle = await this.getVariationStyle(tagConfig[variationName], componentName, variationName, false, false, topBreakpoint);
styleSheet.styles.push(variationStyle);

@@ -302,3 +306,3 @@ }

public async getVariationStyle(variationConfig: VariationBagContract, componentName: string, variationName: string = null, isGlobal: boolean = false, useBreakpointInSelector: boolean = false): Promise<Style> {
public async getVariationStyle(variationConfig: VariationBagContract, componentName: string, variationName: string = null, isGlobal: boolean = false, useBreakpointInSelector: boolean = false, topBreakpoint?: string): Promise<Style> {
if (!variationConfig) {

@@ -363,2 +367,6 @@ throw new Error(`Parameter "variationConfig" not specified.`);

for (const breakpoint of Object.keys(BreakpointValues)) {
if (topBreakpoint && BreakpointValues[breakpoint] > BreakpointValues[topBreakpoint]) {
continue;
}
const breakpointConfig = pluginConfig[breakpoint];

@@ -365,0 +373,0 @@

import * as ko from "knockout";
import { EventManager } from "@paperbits/common/events";
import { EventManager, Events } from "@paperbits/common/events";
import { JssCompiler } from "../../jssCompiler";

@@ -42,4 +42,4 @@ import { StyleSheet } from "@paperbits/common/styles";

this.eventManager.addEventListener("onStyleChange", applyStyleSheet);
this.eventManager.addEventListener("onStyleRemove", removeStyleSheet);
this.eventManager.addEventListener(Events.StyleChange, applyStyleSheet);
this.eventManager.addEventListener(Events.StyleRemove, removeStyleSheet);
}

@@ -46,0 +46,0 @@ };

{
"name": "@paperbits/styles",
"version": "0.1.590",
"version": "0.1.591",
"description": "Paperbits style editors.",

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

"dependencies": {
"@paperbits/common": "0.1.590",
"@paperbits/common": "0.1.591",
"@simonwep/pickr": "^1.7.4",

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

@@ -0,0 +0,0 @@ import * as ko from "knockout";

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