UNPKG

@toreda/strong-types

Version:

Better TypeScript code in fewer lines.

79 lines (77 loc) 2.95 kB
"use strict"; /** * MIT License * * Copyright (c) 2019 - 2021 Toreda, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Styles = void 0; const font_1 = require("./css/font"); const text_1 = require("./css/text"); const map_1 = require("./map"); const make_1 = require("./float/make"); const make_2 = require("./int/make"); const make_3 = require("./strong/make"); const make_4 = require("./text/make"); /** * @category Styles */ class Styles extends map_1.StrongMap { constructor() { super(); this.background = (0, make_4.textMake)(''); this.bottom = (0, make_3.strongMake)(''); this.boxShadow = (0, make_3.strongMake)(''); this.clip = (0, make_3.strongMake)(''); this.display = (0, make_3.strongMake)(''); this.font = new font_1.CSSFont(); this.height = (0, make_1.floatMake)(1); this.left = (0, make_3.strongMake)(''); this.lineHeight = (0, make_4.textMake)(''); this.opacity = (0, make_1.floatMake)(1); this.right = (0, make_3.strongMake)(''); this.text = new text_1.CSSText(); this.top = (0, make_3.strongMake)(''); this.userSelect = (0, make_3.strongMake)(''); this.width = (0, make_1.floatMake)(1); this.zIndex = (0, make_2.intMake)(0); this.typeId = 'Styles'; } reset() { this.background.reset(); this.bottom.reset(); this.boxShadow.reset(); this.clip.reset(); this.display.reset(); this.font.reset(); this.height.reset(); this.left.reset(); this.lineHeight.reset(); this.opacity.reset(); this.right.reset(); this.text.reset(); this.top.reset(); this.userSelect.reset(); this.width.reset(); this.zIndex.reset(); } } exports.Styles = Styles;