UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 5.16 kB
"use strict"; // THIS FILE WAS AUTO-GENERATED FOR PACKAGING, DO NOT MODIFY Object.defineProperty(exports, "__esModule", { value: true }); const types_1 = require("../../../types"); // tslint:disable-next-line const SVG_PROPS = { "xmlns": "http://www.w3.org/2000/svg", "width": "64", "height": "64", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd", "viewBox": "0 0 640 640" }; class Ship { constructor() { this.defaults = { height: "1em", width: "1em", fill: "black", }; } view(vnode) { return m("svg", Object.assign({}, this.genAttrs(vnode)), // tslint:disable-next-line m.trust('<path fill-rule="nonzero" d="M185.329 152.4h18.756v-17.079h.083a22.81 22.81 0 0 1 6.661-16.122l-.035-.036c4.075-4.074 9.744-6.59 16.075-6.626h.07v-.082h35.127V57.084h.083c0-8.386 3.425-15.98 8.917-21.473 5.445-5.445 13.004-8.823 21.378-8.834v-.083h53.162v.083c8.386 0 15.993 3.413 21.485 8.917 5.433 5.445 8.811 13.004 8.835 21.378h.07v55.383h35.127v.082a22.847 22.847 0 0 1 16.158 6.697 22.821 22.821 0 0 1 6.626 16.004v.071h.07V152.4h18.769v-.083.083a24.671 24.671 0 0 1 17.433 7.205l.035-.036c4.406 4.406 7.146 10.583 7.17 17.457h.082v98.34h-.082c0 2.41-.355 4.748-1.004 6.957l70.95 34.465-72.474 73.678v73.548c11.079-5.551 19.843-13.843 28.087-21.662 16.607-15.744 31.772-30.118 57.957-30.402 29.493-.318 39.025 14.87 59.34 30.544 3.307 2.551 6.661 5.138 11.185 8.422l.52.377c8.716 6.308 10.653 18.497 4.346 27.213-6.319 8.729-18.508 10.666-27.225 4.359l-.52-.378c-3.377-2.445-7.747-5.823-12.094-9.178-14.905-11.492-19.181-22.63-35.244-22.464-10.737.118-20.61 9.472-31.43 19.724-20.374 19.323-43.028 40.796-87.532 38.776-37.643 1.701-59.659-13.405-77.883-29.787h-94.631c-19.075 14.338-39.816 27.354-69.946 26.976-34.477.437-56.658-16.677-78.12-33.224-14.905-11.505-29.338-22.63-45.401-22.465-10.748.118-20.622 9.472-31.43 19.724-4.015 3.804-8.114 7.701-12.697 11.623-8.173 6.992-20.468 6.035-27.46-2.138-6.993-8.162-6.036-20.457 2.137-27.45 3.768-3.224 7.512-6.779 11.174-10.251 16.606-15.745 31.772-30.119 57.969-30.402 29.492-.32 49.181 14.87 69.497 30.543 9.153 7.063 18.472 14.245 28.63 19.123v-73.572l-61.595-72.462 51.58-27.732c-2.139-3.65-3.367-7.914-3.39-12.473h-.072V177.038h.071c.012-6.886 2.764-13.063 7.17-17.48a20.369 20.369 0 0 1 2.468-2.079c4.122-3.165 9.32-5.067 14.989-5.079v-.082h.023v.082zm14.457 419.06h.224c21.095.319 37.867-12.626 54.096-25.146 20.315-15.673 39.992-30.863 69.485-30.544 26.197.284 41.362 14.658 57.969 30.402 14.752 13.996 31.158 29.552 59.67 28.052.342-.012.673-.024 1.016-.024.342 0 .685.012 1.027.024 28.5 1.488 44.918-14.067 59.67-28.052 16.607-15.744 31.772-30.118 57.958-30.402 29.504-.319 39.024 14.87 59.339 30.544 3.307 2.563 6.65 5.138 11.173 8.421l-.023.024.472.354c8.717 6.272 10.701 18.426 4.43 27.142-6.284 8.717-18.438 10.701-27.155 4.418l-.52-.378-.047-.036-.035.036c-3.366-2.433-7.736-5.811-12.083-9.166-14.906-11.492-19.181-22.63-35.244-22.464-10.737.118-20.61 9.472-31.43 19.724-20.374 19.323-43.028 40.796-87.532 38.776-44.505 2.02-67.159-19.453-87.533-38.776-10.819-10.252-20.681-19.606-31.43-19.724-16.063-.166-30.484 10.972-45.39 22.464-21.46 16.548-43.642 33.662-78.107 33.225-34.477.437-56.658-16.677-78.12-33.225-14.905-11.492-29.338-22.63-45.401-22.464-10.749.118-20.623 9.472-31.43 19.724-4.016 3.803-8.114 7.701-12.697 11.622-8.173 6.993-20.469 6.036-27.46-2.126-6.993-8.173-6.036-20.468 2.137-27.46 3.768-3.225 7.512-6.78 11.173-10.253 16.607-15.744 31.772-30.118 57.97-30.402 29.492-.318 49.181 14.87 69.497 30.544 16.228 12.52 33 25.465 54.095 25.146h.236zm14.173-310.433l103.773-55.796 114.828 55.796h5.859v-69.733h-22.217c-.579.047-1.158.07-1.748.07-10.784 0-19.524-8.74-19.524-19.523v-20.339h-38.457c-10.784 0-19.524-8.74-19.524-19.524V65.741h-35.847v66.237c0 10.784-8.729 19.524-19.512 19.524h-38.457v20.339h-.071c0 10.736-8.705 19.453-19.453 19.453h-23.953v69.733h14.303z"/>')); } genAttrs(vnode) { const overrides = Object.values(types_1.GeneralIconAttrName) .reduce((acc, name) => { if (!name) { return acc; } if (vnode && vnode && vnode.attrs[name]) { acc[name] = vnode.attrs[name]; return acc; } if (name in this.defaults) { acc[name] = this.defaults[name]; } return acc; }, {}); const attrs = Object.assign({}, SVG_PROPS, overrides); if (!("style" in attrs) || !attrs.style) { attrs.style = {}; } if (attrs.style && typeof attrs.style !== "object") { throw new Error("attr.style must be an object for icons"); } attrs.style["vertical-align"] = "middle"; attrs.style["min-width"] = "1.25em"; const additionalClasses = "maille maille-uxwing-icon ship"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = Ship;