UNPKG

@freesewing/plugin-buttons

Version:

A FreeSewing plugin that provides button, buttonhole, and snap snippets

8 lines (7 loc) 3.69 kB
{ "version": 3, "sources": ["../src/button.js", "../src/buttonhole.js", "../src/snaps.js", "../src/index.js"], "sourcesContent": ["export default `\n<g id=\"button\">\n <circle\n cx=\"0\" cy=\"0\" r=\"3.4\"\n style=\"stroke:var(--pattern-mark);fill:none;stroke-width:var(--pattern-stroke);\"\n />\n <circle cx=\"-1\" cy=\"-1\" r=\"0.5\" style=\"stroke:none;fill:var(--pattern-mark)\"/>\n <circle cx=\"1\" cy=\"-1\" r=\"0.5\" style=\"stroke:none;fill:var(--pattern-mark)\" />\n <circle cx=\"1\" cy=\"1\" r=\"0.5\" style=\"stroke:none;fill:var(--pattern-mark)\" />\n <circle cx=\"-1\" cy=\"1\" r=\"0.5\" style=\"stroke:none;fill:var(--pattern-mark)\" />\n</g>`\n\n", "export default `\n<g id=\"buttonhole\">\n <path\n style=\"fill:none;stroke:var(--pattern-mark);stroke-width:var(--pattern-stroke);\"\n d=\"M -1,-5 L 1,-5 L 1,5 L -1,5 z\"\n />\n</g>\n<g id=\"buttonhole-start\">\n <path\n style=\"fill:none;stroke:var(--pattern-mark);stroke-width:var(--pattern-stroke);\"\n d=\"M -1,-10 L 1,-10 L 1,0 L -1,0 z\"\n />\n</g>\n<g id=\"buttonhole-end\">\n <path\n style=\"fill:none;stroke:var(--pattern-mark);stroke-width:var(--pattern-stroke);\"\n d=\"M -1,0 L 1,0 L 1,10 L -1,10 z\"\n />\n</g>`\n\n", "export default `\n<radialGradient id=\"snap-stud-grad\" cx=\"50%\" cy=\"50%\" r=\"50%\" fx=\"50%\" fy=\"50%\">\n <stop offset=\"30%\" style=\"stop-color:rgb(235,235,235); stop-opacity:1\"/>\n <stop offset=\"80%\" style=\"stop-color:rgb(100,100,100);stop-opacity:1\" />\n</radialGradient>\n<g id=\"snap-stud\">\n <circle id=\"snap-stud-circle-edge\" cx=\"0\" cy=\"0\" r=\"3.4\"\n style=\"stroke:#666;fill:#dddddd;stroke-width:0.3;\"\n />\n <circle id=\"snap-stud-circle-middle\" cx=\"0\" cy=\"0\" r=\"1.8\"\n style=\"stroke:none;fill:url(#snap-stud-grad);\"\n />\n <path\n id=\"snap-stud-lines\" style=\"fill:none;stroke:#666; stroke-width:0.2;\"\n d=\"M -2,0 L -3,0 M 2,0 L 3,0 M 0,2 L 0,3 M 0,-2 L 0,-3 M 1.5,1.5 L 2.1,2.1 M -1.5,1.5 L -2.1,2.1 M -1.5,-1.5 L -2.1,-2.1 M 1.5,-1.5 L 2.1,-2.1\"\n />\n</g>\n<g id=\"snap-socket\">\n <circle id=\"snap-socket-circle-edge\" cx=\"0\" cy=\"0\" r=\"3.4\"\n style=\"stroke:#666;fill:#bbbbbb;stroke-width:0.3;\"\n />\n <circle id=\"snap-socket-circle-middle\" cx=\"0\" cy=\"0\" r=\"2\"\n style=\"stroke:#666;fill:#dddddd; stroke-width:0.4;\"\n />\n <path\n style=\"fill:none;stroke:#666; stroke-width:0.5;\"\n d=\"M -1.7,-1 L -1.7,1 M 1.7,-1 L 1.7,1\" id=\"snap-socket-lines\"\n />\n</g>`\n", "import button from './button'\nimport buttonhole from './buttonhole'\nimport snaps from './snaps'\nimport pkg from '../package.json'\n\nexport default {\n name: pkg.name,\n version: pkg.version,\n hooks: {\n preRender: function (svg) {\n if (svg.attributes.get('freesewing:plugin-buttons') === false) {\n svg.attributes.set('freesewing:plugin-buttons', pkg.version)\n svg.defs += button + buttonhole + snaps\n }\n },\n },\n}\n"], "mappings": ";;;;;;AAAA,IAAOA,EAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;MCAf,IAAOC,EAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;MCAf,IAAOC,EAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;4zCCKf,IAAOC,EAAQ,CACb,KAAMC,EAAI,KACV,QAASA,EAAI,QACb,MAAO,CACL,UAAW,SAAUC,EAAK,CACpBA,EAAI,WAAW,IAAI,2BAA2B,IAAM,KACtDA,EAAI,WAAW,IAAI,4BAA6BD,EAAI,OAAO,EAC3DC,EAAI,MAAQC,EAASC,EAAaC,EAEtC,CACF,CACF", "names": ["button_default", "buttonhole_default", "snaps_default", "src_default", "package_default", "svg", "button_default", "buttonhole_default", "snaps_default"] }