Socket
Socket
Sign inDemoInstall

@betty-blocks/option-helpers

Package Overview
Dependencies
Maintainers
23
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@betty-blocks/option-helpers - npm Package Compare versions

Comparing version 26.31.0 to 26.35.0

22

CHANGELOG.md

@@ -6,2 +6,24 @@ # Change Log

# [26.35.0](https://gitlab.betty.services/code/js-mono/compare/v26.34.0...v26.35.0) (2020-05-12)
### Bug Fixes
* update deprecated font types ([c86128b](https://gitlab.betty.services/code/js-mono/commit/c86128b))
* update keyword types ([61c52b7](https://gitlab.betty.services/code/js-mono/commit/61c52b7))
* update option helper types ([addcd3c](https://gitlab.betty.services/code/js-mono/commit/addcd3c))
* update option helpers types ([2b88590](https://gitlab.betty.services/code/js-mono/commit/2b88590))
* update option types ([13a26ed](https://gitlab.betty.services/code/js-mono/commit/13a26ed))
* update value ([99a0f92](https://gitlab.betty.services/code/js-mono/commit/99a0f92))
### Features
* add unit type ([ee9a885](https://gitlab.betty.services/code/js-mono/commit/ee9a885))
* added sizes type ([8347791](https://gitlab.betty.services/code/js-mono/commit/8347791))
# [26.31.0](https://gitlab.betty.services/code/js-mono/compare/v26.30.0...v26.31.0) (2020-04-30)

@@ -8,0 +30,0 @@

6

dist/constants.d.ts

@@ -7,5 +7,5 @@ export declare const None = "None";

export declare const XL = "XL";
export declare const PixelUnit = "px";
export declare const RemUnit = "rem";
export declare const PercentageUnit = "%";
export declare const Pixel = "px";
export declare const Rem = "rem";
export declare const Percentage = "%";
export declare const InheritKeyword = "Inherit";

@@ -12,0 +12,0 @@ export declare const TransparentKeyword = "Transparent";

@@ -9,5 +9,5 @@ "use strict";

exports.XL = 'XL';
exports.PixelUnit = 'px';
exports.RemUnit = 'rem';
exports.PercentageUnit = '%';
exports.Pixel = 'px';
exports.Rem = 'rem';
exports.Percentage = '%';
exports.InheritKeyword = 'Inherit';

@@ -14,0 +14,0 @@ exports.TransparentKeyword = 'Transparent';

@@ -1,5 +0,5 @@

import { Magnitude, Style, Viewport } from './types';
import { Magnitude, Keyword, Style, Viewport } from './types';
export declare const isMagnitude: (size: string) => size is Magnitude;
export declare const isKeyword: (keyword: string) => keyword is string;
export declare const isColorKeyword: (color: string) => color is string;
export declare const isKeyword: (keyword: string) => keyword is Keyword;
export declare const isColorKeyword: (color: string) => color is Keyword;
export declare const isStyle: (color: string) => color is Style;

@@ -6,0 +6,0 @@ export declare const isDeprecatedFont: (font: never) => font is never;

@@ -1,2 +0,2 @@

import { Unit, Value, Size, Color, Font, DeprecatedFont, Viewport, Theme, ConvertedTheme, FontObject, BorderObject } from './types';
import { SizeValue, ColorValue, Size, Color, Font, DeprecatedFont, Viewport, Theme, ConvertedTheme, FontObject, BorderObject } from './types';
export default class Styling {

@@ -6,6 +6,6 @@ theme: ConvertedTheme;

setTheme(theme: Theme): void;
getColor(color: Color): Value;
getColor(color: Color): ColorValue;
getFont(font: Font & DeprecatedFont): FontObject;
getFontSize(font: Font & DeprecatedFont, viewport?: Viewport): Unit;
getFontColor(font: Font & DeprecatedFont): Value;
getFontSize(font: Font & DeprecatedFont, viewport?: Viewport): SizeValue;
getFontColor(font: Font & DeprecatedFont): ColorValue;
getFontFamily(font: Font & DeprecatedFont): string;

@@ -16,6 +16,6 @@ getFontWeight(font: Font & DeprecatedFont): string;

getBorder(size: Size): BorderObject;
getBorderSize(size: Size): Unit;
getBorderRadius(size: Size): Unit;
getIconSize(size: Size): Unit;
getSpacing(size: Size, viewport?: Viewport): Unit;
getBorderSize(size: Size): SizeValue;
getBorderRadius(size: Size): SizeValue;
getIconSize(size: Size): SizeValue;
getSpacing(size: Size, viewport?: Viewport): SizeValue;
}

@@ -6,5 +6,2 @@ export declare type Uuid = string;

export declare type Toggle = boolean;
export declare type Rem = string;
export declare type Pixel = string;
export declare type Percentage = string;
export declare enum Magnitude {

@@ -17,4 +14,12 @@ XS = "XS",

}
export declare type Unit = Rem | Percentage | Pixel;
export declare type Size = Magnitude | Unit;
export declare type RemValue = string;
export declare type PixelValue = string;
export declare type PercentageValue = string;
export declare type PercentageUnit = '%';
export declare type RemUnit = 'rem';
export declare type PixelUnit = 'px';
export declare type SizeUnit = PercentageUnit | RemUnit | PixelUnit;
export declare type SizeValue = RemValue | PercentageValue | PixelValue;
export declare type Size = Magnitude | SizeValue;
export declare type Sizes = [Size, Size, Size, Size];
export declare enum Style {

@@ -37,34 +42,37 @@ White = "White",

}
export declare type Initial = string;
export declare type Inherit = string;
export declare type Unset = string;
export declare type Revert = string;
export declare type All = string;
export declare type Transparent = string;
export declare type CurrentColor = string;
export declare type Hex = string;
export declare type RGB = string;
export declare type HSL = string;
export interface RGBA {
export declare type Initial = 'Initial';
export declare type Inherit = 'Inherit';
export declare type Unset = 'Unset';
export declare type Revert = 'Revert';
export declare type All = 'All';
export declare type Transparent = 'Transparent';
export declare type CurrentColor = 'CurrentColor';
export declare type HexValue = string;
export declare type RGBValue = string;
export declare type HSLValue = string;
export interface RGB {
red: number;
green: number;
blue: number;
alpha?: number;
}
export interface HSLA {
export interface HSL {
hue: number;
saturation: string;
lightness: string;
alpha?: number;
}
export interface Alpha {
alpha: number;
}
export declare type HSLA = HSL & Alpha;
export declare type RGBA = RGB & Alpha;
export declare type Keyword = Initial | Inherit | Unset | Revert | All;
export declare type ColorKeyword = Transparent | CurrentColor;
export declare type Value = Hex | RGB | HSL;
export declare type Color = Keyword | ColorKeyword | Style | Value;
export declare type ColorValue = HexValue | RGBValue | HSLValue;
export declare type Color = Keyword | ColorKeyword | Style | ColorValue;
export declare enum DeprecatedFont {
Subtitle1 = "subtitle1",
Subtitle2 = "subtitle2",
Caption1 = "caption1",
Caption2 = "caption2",
Button = "button"
Subtitle1 = "Subtitle1",
Subtitle2 = "Subtitle2",
Caption1 = "Caption1",
Caption2 = "Caption2",
Button = "Button"
}

@@ -87,2 +95,6 @@ export declare enum Font {

}
export interface Value<T extends string> {
quantity: number;
unit: T;
}
export interface Option<T extends string> {

@@ -89,0 +101,0 @@ name: string;

@@ -31,7 +31,7 @@ "use strict";

(function (DeprecatedFont) {
DeprecatedFont["Subtitle1"] = "subtitle1";
DeprecatedFont["Subtitle2"] = "subtitle2";
DeprecatedFont["Caption1"] = "caption1";
DeprecatedFont["Caption2"] = "caption2";
DeprecatedFont["Button"] = "button";
DeprecatedFont["Subtitle1"] = "Subtitle1";
DeprecatedFont["Subtitle2"] = "Subtitle2";
DeprecatedFont["Caption1"] = "Caption1";
DeprecatedFont["Caption2"] = "Caption2";
DeprecatedFont["Button"] = "Button";
})(DeprecatedFont = exports.DeprecatedFont || (exports.DeprecatedFont = {}));

@@ -38,0 +38,0 @@ var Font;

@@ -1,3 +0,3 @@

import { Font, Viewport, Size, Unit, Color, Option } from './types';
export declare const units: Option<Unit>[];
import { Font, Viewport, Size, Color, Option, SizeUnit } from './types';
export declare const units: Option<SizeUnit>[];
export declare const sizes: Option<Size>[];

@@ -4,0 +4,0 @@ export declare const colors: Option<Color>[];

@@ -5,5 +5,5 @@ "use strict";

exports.units = [
{ name: 'Percentage', value: '%' },
{ name: 'Rem', value: 'rem' },
{ name: 'Pixel', value: 'px' },
{ name: 'Rem', value: 'rem' },
{ name: 'Percentage', value: '%' },
];

@@ -10,0 +10,0 @@ exports.sizes = [

{
"name": "@betty-blocks/option-helpers",
"description": "Betty Blocks option helpers",
"version": "26.31.0",
"version": "26.35.0",
"main": "dist/index.js",

@@ -48,3 +48,3 @@ "license": "UNLICENSED",

},
"gitHead": "81c0165f3affd05be2cc6674b949507a31de0a42"
"gitHead": "d560f36596186ca8c5d86f3179994df6299a043f"
}

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