UNPKG

scriptable-testlab

Version:

A lightweight, efficient tool designed to manage and update scripts for Scriptable.

63 lines 1.92 kB
var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var gradient_exports = {}; __export(gradient_exports, { MockLinearGradient: () => MockLinearGradient }); module.exports = __toCommonJS(gradient_exports); var import_scriptable_abstract = require("scriptable-abstract"); const DEFAULT_STATE = { colors: [], locations: [], startPoint: { x: 0, y: 0 }, endPoint: { x: 1, y: 1 } }; class MockLinearGradient extends import_scriptable_abstract.AbsLinearGradient { constructor() { super(DEFAULT_STATE); } get colors() { return [...this.state.colors]; } set colors(value) { this.setState({ colors: value }); } get locations() { return [...this.state.locations]; } set locations(value) { this.setState({ locations: value }); } get startPoint() { return { ...this.state.startPoint }; } set startPoint(value) { this.setState({ startPoint: value }); } get endPoint() { return { ...this.state.endPoint }; } set endPoint(value) { this.setState({ endPoint: value }); } } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { MockLinearGradient }); //# sourceMappingURL=gradient.js.map