web-to-print 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  3. package/dist/cjs/canvas-helpers-A6rp5rPD.js +765 -0
  4. package/dist/cjs/index-IFGFRm-i.js +1649 -0
  5. package/dist/cjs/index.cjs.js +232 -0
  6. package/dist/cjs/loader.cjs.js +13 -0
  7. package/dist/cjs/logo-BUX-b45R.js +18 -0
  8. package/dist/cjs/web-to-print.cjs.js +25 -0
  9. package/dist/cjs/wtp-editor_2.cjs.entry.js +12386 -0
  10. package/dist/cjs/wtp-logo-renderer.cjs.entry.js +353 -0
  11. package/dist/cjs/wtp-print-area-editor.cjs.entry.js +431 -0
  12. package/dist/collection/collection-manifest.json +16 -0
  13. package/dist/collection/components/wtp-editor/wtp-editor.css +124 -0
  14. package/dist/collection/components/wtp-editor/wtp-editor.js +1114 -0
  15. package/dist/collection/components/wtp-logo-renderer/wtp-logo-renderer.css +30 -0
  16. package/dist/collection/components/wtp-logo-renderer/wtp-logo-renderer.js +455 -0
  17. package/dist/collection/components/wtp-logo-upload/wtp-logo-upload.css +428 -0
  18. package/dist/collection/components/wtp-logo-upload/wtp-logo-upload.js +573 -0
  19. package/dist/collection/components/wtp-print-area-editor/wtp-print-area-editor.css +20 -0
  20. package/dist/collection/components/wtp-print-area-editor/wtp-print-area-editor.js +600 -0
  21. package/dist/collection/examples/schaeffler--big.svg +1 -0
  22. package/dist/collection/index.js +8 -0
  23. package/dist/collection/types/editor.js +1 -0
  24. package/dist/collection/types/index.js +2 -0
  25. package/dist/collection/types/labels.js +30 -0
  26. package/dist/collection/types/logo.js +13 -0
  27. package/dist/collection/utils/background-removal.js +717 -0
  28. package/dist/collection/utils/canvas-helpers.js +380 -0
  29. package/dist/collection/utils/format-detection.js +48 -0
  30. package/dist/collection/utils/html-render-helpers.js +106 -0
  31. package/dist/collection/utils/image-preview.js +54 -0
  32. package/dist/collection/utils/logo-validation.js +141 -0
  33. package/dist/collection/utils/pdf-export.js +224 -0
  34. package/dist/components/index.d.ts +35 -0
  35. package/dist/components/index.js +1 -0
  36. package/dist/components/p-5qCsRzlt.js +1 -0
  37. package/dist/components/p-Bn9gR_8e.js +1 -0
  38. package/dist/components/p-D8pVJRuX.js +1 -0
  39. package/dist/components/wtp-editor.d.ts +11 -0
  40. package/dist/components/wtp-editor.js +1 -0
  41. package/dist/components/wtp-logo-renderer.d.ts +11 -0
  42. package/dist/components/wtp-logo-renderer.js +1 -0
  43. package/dist/components/wtp-logo-upload.d.ts +11 -0
  44. package/dist/components/wtp-logo-upload.js +1 -0
  45. package/dist/components/wtp-print-area-editor.d.ts +11 -0
  46. package/dist/components/wtp-print-area-editor.js +1 -0
  47. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  48. package/dist/esm/canvas-helpers-CK8OAq2J.js +748 -0
  49. package/dist/esm/index-CUetmLbL.js +1641 -0
  50. package/dist/esm/index.js +228 -0
  51. package/dist/esm/loader.js +11 -0
  52. package/dist/esm/logo-D8pVJRuX.js +15 -0
  53. package/dist/esm/web-to-print.js +21 -0
  54. package/dist/esm/wtp-editor_2.entry.js +12383 -0
  55. package/dist/esm/wtp-logo-renderer.entry.js +351 -0
  56. package/dist/esm/wtp-print-area-editor.entry.js +429 -0
  57. package/dist/index.cjs.js +1 -0
  58. package/dist/index.js +1 -0
  59. package/dist/types/components/wtp-editor/wtp-editor.d.ts +101 -0
  60. package/dist/types/components/wtp-logo-renderer/wtp-logo-renderer.d.ts +55 -0
  61. package/dist/types/components/wtp-logo-upload/wtp-logo-upload.d.ts +76 -0
  62. package/dist/types/components/wtp-print-area-editor/wtp-print-area-editor.d.ts +43 -0
  63. package/dist/types/components.d.ts +507 -0
  64. package/dist/types/index.d.ts +11 -0
  65. package/dist/types/stencil-public-runtime.d.ts +1860 -0
  66. package/dist/types/types/editor.d.ts +79 -0
  67. package/dist/types/types/index.d.ts +5 -0
  68. package/dist/types/types/labels.d.ts +30 -0
  69. package/dist/types/types/logo.d.ts +47 -0
  70. package/dist/types/utils/background-removal.d.ts +95 -0
  71. package/dist/types/utils/canvas-helpers.d.ts +60 -0
  72. package/dist/types/utils/format-detection.d.ts +4 -0
  73. package/dist/types/utils/html-render-helpers.d.ts +44 -0
  74. package/dist/types/utils/image-preview.d.ts +13 -0
  75. package/dist/types/utils/logo-validation.d.ts +2 -0
  76. package/dist/types/utils/pdf-export.d.ts +32 -0
  77. package/dist/web-to-print/index.esm.js +1 -0
  78. package/dist/web-to-print/p-611ec561.entry.js +1 -0
  79. package/dist/web-to-print/p-703e4c52.entry.js +1 -0
  80. package/dist/web-to-print/p-CK8OAq2J.js +1 -0
  81. package/dist/web-to-print/p-CUetmLbL.js +2 -0
  82. package/dist/web-to-print/p-D8pVJRuX.js +1 -0
  83. package/dist/web-to-print/p-DQuL1Twl.js +1 -0
  84. package/dist/web-to-print/p-b532777b.entry.js +1 -0
  85. package/dist/web-to-print/web-to-print.esm.js +1 -0
  86. package/loader/cdn.js +1 -0
  87. package/loader/index.cjs.js +1 -0
  88. package/loader/index.d.ts +24 -0
  89. package/loader/index.es2017.js +1 -0
  90. package/loader/index.js +2 -0
  91. package/package.json +68 -0
  92. package/readme.md +490 -0
@@ -0,0 +1,2 @@
1
+ function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],s=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);s&&Object.defineProperty(e,o,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},s=(t,e)=>e in t,i=(t,e)=>(0,console.error)(t,e),r=new Map,c=new Map,u="undefined"!=typeof window?window:{},f={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},a=t=>Promise.resolve(t),d=(()=>{try{return!!u.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),p=!!d&&(()=>!!u.document&&Object.getOwnPropertyDescriptor(u.document.adoptedStyleSheets,"length").writable)(),h=!1,m=[],v=[],b=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&f.u?$(w):f.raf(w))},y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){i(t)}t.length=0},w=()=>{y(m),y(v),(h=m.length>0)&&f.raf(w)},$=t=>a().then(t),g=b(v,!0);function j(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(p?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}function O(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var S,k,E=new WeakMap,M=t=>"sc-"+t.h,C=t=>"object"==(t=typeof t)||"function"===t,x=(t,e,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!C(o))&&(o+=""),s&&i?r[r.length-1].m+=o:r.push(s?A(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=A(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},A=(t,e)=>({u:0,O:t,m:null!=e?e:null,S:null,$:null,v:null,j:null}),L={},N=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},P=(t,e)=>null==t||C(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,R=t=>{var e;return null==(e=o(t))?void 0:e.$hostElement$},D=(t,e)=>{const n=R(t);return{emit:t=>T(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},T=(t,e,n)=>{const o=f.ce(e,n);return t.dispatchEvent(o),o},H=(t,e,n,l,i,r)=>{if(n===l)return;let c=s(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,o=W(n);let s=W(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("style"===e){for(const e in n)l&&null!=l[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in l)n&&l[e]===n[e]||(e.includes("-")?t.style.setProperty(e,l[e]):t.style[e]=l[e])}else if("key"===e);else if("ref"===e)l&&tt(l,t);else if(c||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let s;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(s=t[1])}}return s||(s=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(s)||t.removeAttribute(s):t.setAttribute(s,!0===l?"":l))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=l}catch(t){}return}{const o=C(l);if((c||o&&null!==l)&&!i)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?c=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!c||4&r||i)&&!o&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}}else if(e="-"===e[2]?e.slice(3):s(u,a)?a.slice(2):a[2]+e.slice(3),n||l){const o=e.endsWith(z);e=e.replace(F,""),n&&f.rel(t,e,n,o),l&&f.ael(t,e,l,o)}},U=/\s/,W=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(U):[]),z="Capture",F=RegExp(z+"$"),V=(t,e,n)=>{const o=11===e.S.nodeType&&e.S.host?e.S.host:e.S,l=t&&t.v||{},s=e.v||{};for(const t of q(Object.keys(l)))t in s||H(o,t,l[t],void 0,n,e.u);for(const t of q(Object.keys(s)))H(o,t,l[t],s[t],n,e.u)};function q(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var G=!1,Y=!1,Z=[],_=[],B=(t,e,n)=>{const o=e.$[n];let l,s,i=0;if(null!=o.m)l=o.S=u.document.createTextNode(o.m);else{if(Y||(Y="svg"===o.O),!u.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.S=u.document.createElementNS(Y?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.O),Y&&"foreignObject"===o.O&&(Y=!1),V(null,o,Y),null!=S&&void 0!==S&&l["s-si"]!==S&&l.classList.add(l["s-si"]=S),o.$){const e="template"===o.O?l.content:l;for(i=0;i<o.$.length;++i)s=B(t,o,i),s&&e.appendChild(s)}"svg"===o.O?Y=!1:"foreignObject"===l.tagName&&(Y=!0)}return l["s-hn"]=k,l},I=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===k&&(r=r.shadowRoot),"template"===n.O&&(r=r.content);l<=s;++l)o[l]&&(i=B(null,n,l),i&&(o[l].S=i,et(r,i,e)))},J=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.S;X(e),t&&t.remove()}}},K=(t,e,n=!1)=>t.O===e.O&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),Q=(t,e,n=!1)=>{const o=e.S=t.S,l=t.$,s=e.$,i=e.O,r=e.m;null==r?(Y="svg"===i||"foreignObject"!==i&&Y,"slot"!==i||G||t.k!==e.k&&(e.S["s-sn"]=e.k||"",(t=>{f.u|=1;const e=t.closest(k.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(et(e,t,null!=n?n:null),t["s-sh"]=void 0)}f.u&=-2})(e.S.parentElement)),V(t,e,Y),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],p=e[a],h=o.length-1,m=o[0],v=o[h];const b="template"===n.O?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--h];else if(K(d,m,l))Q(d,m,l),d=e[++r],m=o[++c];else if(K(p,v,l))Q(p,v,l),p=e[--a],v=o[--h];else if(K(d,v,l))Q(d,v,l),et(b,d.S,p.S.nextSibling),d=e[++r],v=o[--h];else if(K(p,m,l))Q(p,m,l),et(b,p.S,d.S),p=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].j&&e[f].j===m.j){u=f;break}u>=0?(i=e[u],i.O!==m.O?s=B(e&&e[c],n,u):(Q(i,m,l),e[u]=void 0,s=i.S),m=o[++c]):(s=B(e&&e[c],n,c),m=o[++c]),s&&et(d.S.parentNode,s,d.S)}r>a?I(t,null==o[h+1]?null:o[h+1].S,n,o,c,h):c>h&&J(e,r,a)})(o,l,e,s,n):null!==s?(null!==t.m&&(o.textContent=""),I(o,null,e,s,0,s.length-1)):!n&&null!==l&&J(l,0,l.length-1),Y&&"svg"===i&&(Y=!1)):t.m!==r&&(o.data=r)},X=t=>{t.v&&t.v.ref&&Z.push((()=>t.v.ref(null))),t.$&&t.$.map(X)},tt=(t,e)=>{_.push((()=>t(e)))},et=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),nt=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},ot=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);nt(t,t.C);const n=()=>lt(t,e);if(!e)return g(n);queueMicrotask((()=>{n()}))},lt=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.A.length&&t.A.forEach((t=>t(n))),l=at(o,"componentWillLoad",void 0,n)):l=at(o,"componentWillUpdate",void 0,n),l=st(l,(()=>at(o,"componentWillRender",void 0,n))),st(l,(()=>rt(t,o,e)))},st=(t,e)=>it(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),it=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,rt=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const s=M(e),i=c.get(s);if(!u.document)return s;if(t=11===t.nodeType?t:u.document,i)if("string"==typeof i){let l,r=E.get(t=t.head||t);if(r||E.set(t,r=new Set),!r.has(s)){l=u.document.createElement("style"),l.textContent=i;const c=null!=(n=f.L)?n:O(u.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(i),p?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=i+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(s)}}else{let e=E.get(t);if(e||E.set(t,e=new Set),!e.has(s)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===n.CSSStyleSheet)o=i;else{o=new n.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}p?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ct(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>ut(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},ct=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.o,s=t.N||A(null,null),i=(t=>t&&t.O===L)(e)?e:x(null,null,e);if(k=o.tagName,n&&i.v)for(const t of Object.keys(i.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.v[t]=o[t]);i.O=null,i.u|=4,t.N=i,i.S=s.S=o.shadowRoot||o,S=o["s-sc"],G=!(!(1&l.u)||128&l.u),Q(s,i,n),Z.forEach((t=>t())),Z.length=0,_.forEach((t=>t())),_.length=0})(t,e,o)}catch(e){i(e,t.$hostElement$)}return null},ut=t=>{const e=t.$hostElement$,n=t.i,o=t.C;at(n,"componentDidRender",void 0,e),64&t.u?at(n,"componentDidUpdate",void 0,e):(t.u|=64,dt(e),at(n,"componentDidLoad",void 0,e),t.P(e),o||ft()),t.R(e),t.M&&(t.M(),t.M=void 0),512&t.u&&$((()=>ot(t,!1))),t.u&=-517},ft=()=>{$((()=>T(u,"appload",{detail:{namespace:"web-to-print"}})))},at=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){i(t,o)}},dt=t=>t.classList.add("hydrated"),pt=(t,e,n,l)=>{const s=o(t);if(!s)return;if(!s)throw Error(`Couldn't find host element for "${l.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=s.$hostElement$,c=s.l.get(e),u=s.u,f=s.i;if(n=P(n,l.t[e][0]),!(8&u&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n))){if(s.l.set(e,n),l.D){const t=l.D[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(f?f[o](n,c,e):s.A.push((()=>{s.i[o](n,c,e)})))}catch(t){i(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||ot(s,!1)}}},ht=(e,n,l)=>{var s,i;const r=e.prototype;{e.watchers&&!n.D&&(n.D=N(e.watchers)),e.deserializers&&!n.T&&(n.T=e.deserializers),e.serializers&&!n.H&&(n.H=e.serializers);const c=Object.entries(null!=(s=n.t)?s:{});if(c.map((([e,[s]])=>{if(31&s||2&l&&32&s){const{get:i,set:c}=t(r,e)||{};i&&(n.t[e][0]|=2048),c&&(n.t[e][0]|=4096),(1&l||!i)&&Object.defineProperty(r,e,{get(){{if(!(2048&n.t[e][0]))return((t,e)=>o(this).l.get(e))(0,e);const t=o(this),l=t?t.i:r;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const i=o(this);if(i){if(c)return void 0===(32&s?this[e]:i.$hostElement$[e])&&i.l.get(e)&&(t=i.l.get(e)),c.call(this,P(t,s)),void pt(this,e,t=32&s?this[e]:i.$hostElement$[e],n);{if(!(1&l&&4096&n.t[e][0]))return pt(this,e,t,n),void(1&l&&!i.i&&i.A.push((()=>{4096&n.t[e][0]&&i.i[e]!==i.l.get(e)&&(i.i[e]=t)})));const o=()=>{const o=i.i[e];!i.l.get(e)&&o&&i.l.set(e,o),i.i[e]=P(t,s),pt(this,e,i.i[e],n)};i.i?o():i.A.push((()=>{o()}))}}}})}else 1&l&&64&s&&Object.defineProperty(r,e,{value(...t){var n;const l=o(this);return null==(n=null==l?void 0:l.U)?void 0:n.then((()=>{var n;return null==(n=l.i)?void 0:n[e](...t)}))}})})),1&l){const t=new Map;r.attributeChangedCallback=function(e,l,s){f.jmp((()=>{var i;const u=t.get(e),f=o(this);if(this.hasOwnProperty(u)&&(s=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==f?void 0:f.u;if(f&&t&&!(8&t)&&s!==l){const o=f.i,r=null==(i=n.D)?void 0:i[e];null==r||r.forEach((n=>{const[[i,r]]=Object.entries(n);null!=o[i]&&(128&t||1&r)&&o[i].call(o,s,l,e)}))}return}const a=c.find((([t])=>t===u)),d=a&&4&a[1][0],p=d&&null===s&&void 0===this[u];d&&(s=null!==s&&"false"!==s);const h=Object.getOwnPropertyDescriptor(r,u);p||s==this[u]||h.get&&!h.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=n.D)?i:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},mt=(t,e)=>{at(t,"connectedCallback",void 0,e)},vt=(t,e)=>{at(t,"disconnectedCallback",void 0,e||t)},bt=(t,e={})=>{var n;if(!u.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],s=e.exclude||[],a=u.customElements,p=u.document.head,h=p.querySelector("meta[charset]"),m=u.document.createElement("style"),v=[];let b,y=!0;if(Object.assign(f,e),f.p=new URL(e.resourcesUrl||"./",u.document.baseURI).href,t.map((t=>{t[1].map((e=>{var n,u;const p={u:e[0],h:e[1],t:e[2],W:e[3]};p.t=e[2],p.D=N(e[4]),p.H=null!=(n=e[5])?n:{},p.T=null!=(u=e[6])?u:{};const h=p.h,m=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,F:new Map};n.U=new Promise((t=>n.R=t)),n.V=new Promise((t=>n.P=t)),t["s-p"]=[],t["s-rc"]=[],n.A=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,p),1&p.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${p.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(t,p)}connectedCallback(){o(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),y?v.push(this):f.jmp((()=>(t=>{if(!(1&f.u)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)?mt(e.i,t):(null==e?void 0:e.V)&&e.V.then((()=>mt(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){nt(e,e.C=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;try{if(!(32&e.u)){if(e.u|=32,n.q){const l=((t,e)=>{const n=t.h.replace(/-/g,"_"),o=t.q;if(!o)return;const l=r.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(r.set(o,t),t[n])),(t=>{i(t,e.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.h}#${e.G}" was not found`);o.isProxied||(n.D=N(o.watchers),n.H=o.serializers,n.T=o.deserializers,ht(o,n,2),o.isProxied=!0);const s=()=>{};e.u|=8;try{new o(e)}catch(e){i(e,t)}e.u&=-9,e.u|=128,s(),mt(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=M(n);if(!c.has(e)){const o=()=>{};((t,e,n)=>{let o=c.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,c.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.C,s=()=>ot(e,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()}catch(n){i(n,t),e.M&&(e.M(),e.M=void 0),e.P&&e.P(t)}})(t,e,n)}l()}})(this))))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.u)){const e=o(t);(null==e?void 0:e.i)?vt(e.i,t):(null==e?void 0:e.V)&&e.V.then((()=>vt(e.i,t)))}E.has(t)&&E.delete(t),t.shadowRoot&&E.has(t.shadowRoot)&&E.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const e=o(this);if(!e)return;const n=v.findIndex((t=>t===this));n>-1&&v.splice(n,1),(null==(t=null==e?void 0:e.N)?void 0:t.S)instanceof Node&&!e.N.S.isConnected&&delete e.N.S}))}componentOnReady(){var t;return null==(t=o(this))?void 0:t.V}};p.q=t[0],s.includes(h)||a.get(h)||(l.push(h),a.define(h,ht(m,p,1)))}))})),l.length>0&&(m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(n=f.L)?n:O(u.document);null!=t&&m.setAttribute("nonce",t),p.insertBefore(m,h?h.nextSibling:p.firstChild)}y=!1,v.length?v.map((t=>t.connectedCallback())):f.jmp((()=>b=setTimeout(ft,30)))},yt=t=>f.L=t;export{bt as b,D as c,R as g,x as h,a as p,l as r,yt as s}
@@ -0,0 +1 @@
1
+ const i={minDpi:300,maxFileSize:52428800,minWidth:100,minHeight:100,allowedFormats:["png","jpeg","svg","tiff","avif"]},a={tolerance:40,minEdgeRatio:.3,autoCrop:!0,autoCropPadding:2};export{i as D,a}
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,g as e,h as s}from"./p-CUetmLbL.js";import{h,s as a,c as r,N as n,p as o,e as c,J as d,q as f}from"./p-CK8OAq2J.js";class l extends d{constructor(t){super(t),this.cornerOffsets=t?.cornerOffsets??[new n(-50,-50),new n(50,-50),new n(50,50),new n(-50,50)],this.bulge=t?.bulge??0,this.objectCaching=!1}_render(t){const[i,e,s,h]=this.cornerOffsets;t.beginPath(),t.moveTo(i.x,i.y),0!==this.bulge?t.quadraticCurveTo((i.x+e.x)/2,(i.y+e.y)/2-this.bulge*(this.height??1),e.x,e.y):t.lineTo(e.x,e.y),t.lineTo(s.x,s.y),0!==this.bulge?t.quadraticCurveTo((s.x+h.x)/2,(s.y+h.y)/2-this.bulge*(this.height??1),h.x,h.y):t.lineTo(h.x,h.y),t.closePath(),this._renderPaintInOrder(t)}recalcBounds(){const t=this.getCenterPoint(),i=this.cornerOffsets.map((i=>new n(t.x+i.x,t.y+i.y))),e=i.map((t=>t.x)),s=i.map((t=>t.y)),h=Math.min(...e),a=Math.max(...e),r=Math.min(...s),o=Math.max(...s),c=(h+a)/2,d=(r+o)/2;this.cornerOffsets=i.map((t=>new n(t.x-c,t.y-d))),this.set({left:c,top:d,width:Math.max(a-h,1),height:Math.max(o-r,1)}),this.setCoords()}}function p(t){return new f({x:0,y:0,sizeX:14,sizeY:14,touchSizeX:28,touchSizeY:28,cursorStyleHandler:()=>"move",positionHandler:(i,e,s)=>new n(s.cornerOffsets[t].x,s.cornerOffsets[t].y).transform(e),actionHandler:(i,e,s,h)=>{const a=e.target,r=a.getCenterPoint();return a.cornerOffsets[t]=new n(s-r.x,h-r.y),a.recalcBounds(),!0},render:(t,i,e)=>{t.save(),t.fillStyle="#2563eb",t.strokeStyle="#ffffff",t.lineWidth=2,t.beginPath(),t.arc(i,e,7,0,2*Math.PI),t.fill(),t.stroke(),t.restore()}})}const w=class{constructor(e){t(this,e),this.wtpPrintAreaChange=i(this,"wtpPrintAreaChange")}get el(){return e(this)}productImage;width=800;height=600;printArea;wtpPrintAreaChange;canvas;canvasEl;areaQuad;bgLoadGen=0;componentDidLoad(){this.initCanvas()}disconnectedCallback(){++this.bgLoadGen,this.canvas?.dispose()}async onProductImageChange(){void 0!==this.canvas&&void 0!==this.productImage&&await this.reloadCanvas()}async onSizeChange(){void 0!==this.canvas&&await this.reloadCanvas()}onPrintAreaChange(){this.syncQuadFromPrintArea()}async getPrintArea(){return this.readQuadAsPrintArea()}async setPrintArea(t){this.printArea=t,this.syncQuadFromPrintArea()}async initCanvas(){void 0!==this.canvasEl&&(this.canvas=new h(this.canvasEl,{width:this.width,height:this.height,backgroundColor:"#ffffff",selection:!1}),this.canvas.on("object:modified",(t=>{t.target===this.areaQuad&&this.emitPrintArea()})),this.canvas.on("object:moving",(t=>{t.target===this.areaQuad&&this.clampQuadToBounds()})),await this.reloadCanvas())}async reloadCanvas(){if(void 0===this.canvas)return;const t=++this.bgLoadGen;this.areaQuad=void 0,this.canvas.discardActiveObject();for(const t of this.canvas.getObjects().slice())this.canvas.remove(t);this.canvas.viewportTransform=[1,0,0,1,0,0],this.canvas.setDimensions({width:this.width,height:this.height}),this.canvas.backgroundColor="#ffffff",this.canvas.requestRenderAll(),void 0!==this.productImage&&""!==this.productImage&&await a(this.canvas,this.productImage),t===this.bgLoadGen&&(this.createAreaQuad(),this.canvas.renderAll())}createAreaQuad(){if(void 0===this.canvas)return;const t=this.printArea??r(),i=this.canvas.getWidth(),e=this.canvas.getHeight(),[s,h,a,c]=o(t,i,e),d=(s.x+h.x+a.x+c.x)/4,w=(s.y+h.y+a.y+c.y)/4,g=[s.x,h.x,a.x,c.x],u=[s.y,h.y,a.y,c.y],b=Math.max(Math.max(...g)-Math.min(...g),1),M=Math.max(Math.max(...u)-Math.min(...u),1);this.areaQuad=new l({left:d,top:w,width:b,height:M,cornerOffsets:[new n(s.x-d,s.y-w),new n(h.x-d,h.y-w),new n(a.x-d,a.y-w),new n(c.x-d,c.y-w)],bulge:t.bulge??0,originX:"center",originY:"center",fill:"rgba(37, 99, 235, 0.15)",stroke:"#2563eb",strokeWidth:2,strokeDashArray:[6,4],lockScalingX:!0,lockScalingY:!0,lockRotation:!0,hasRotatingPoint:!1,borderColor:"#2563eb"}),this.areaQuad.controls={corner0:p(0),corner1:p(1),corner2:p(2),corner3:p(3),bulgeHandle:new f({x:.5,y:0,offsetX:24,sizeX:14,sizeY:14,touchSizeX:28,touchSizeY:28,cursorStyleHandler:()=>"ns-resize",positionHandler:(t,i,e)=>new n(.5*t.x+24,-e.bulge*t.y/2).transform(i),actionHandler:(t,i,e,s)=>{const h=i.target,a=h.getCenterPoint(),r=Math.max(-1,Math.min(1,(a.y-s)/Math.max((h.height??0)*(h.scaleY??1)/2,1)));return h.bulge=r,!0},render:(t,i,e,s,h)=>{const a=(h.height??0)*(h.scaleY??1)/2,r=(h.angle??0)*Math.PI/180,n=i+Math.sin(r)*a,o=e-Math.cos(r)*a,c=i-Math.sin(r)*a,d=e+Math.cos(r)*a;t.save(),t.strokeStyle="rgba(37, 99, 235, 0.3)",t.lineWidth=2,t.setLineDash([3,3]),t.beginPath(),t.moveTo(n,o-4),t.lineTo(c,d+4),t.stroke(),t.setLineDash([]),t.fillStyle="#2563eb",t.strokeStyle="#ffffff",t.lineWidth=2,t.beginPath(),t.arc(i,e,7,0,2*Math.PI),t.fill(),t.stroke(),t.fillStyle="rgba(37, 99, 235, 0.5)",t.beginPath(),t.moveTo(n,o-4),t.lineTo(n-4,o-4+6),t.lineTo(n+4,o-4+6),t.closePath(),t.fill(),t.font="bold 10px sans-serif",t.textAlign="center",t.fillText("+",n,o-4-4),t.beginPath(),t.moveTo(c,d+4),t.lineTo(c-4,d+4-6),t.lineTo(c+4,d+4-6),t.closePath(),t.fill(),t.fillText("−",c,d+4+12),t.restore()}})},this.canvas.add(this.areaQuad),this.canvas.renderAll()}syncQuadFromPrintArea(){if(void 0===this.areaQuad||void 0===this.canvas)return;const t=this.printArea??r(),i=this.canvas.getWidth(),e=this.canvas.getHeight(),[s,h,a,c]=o(t,i,e),d=(s.x+h.x+a.x+c.x)/4,f=(s.y+h.y+a.y+c.y)/4,l=[s.x,h.x,a.x,c.x],p=[s.y,h.y,a.y,c.y];this.areaQuad.cornerOffsets=[new n(s.x-d,s.y-f),new n(h.x-d,h.y-f),new n(a.x-d,a.y-f),new n(c.x-d,c.y-f)],this.areaQuad.bulge=t.bulge??0,this.areaQuad.set({left:d,top:f,width:Math.max(Math.max(...l)-Math.min(...l),1),height:Math.max(Math.max(...p)-Math.min(...p),1),scaleX:1,scaleY:1}),this.areaQuad.setCoords(),this.canvas.renderAll()}clampQuadToBounds(){if(void 0===this.areaQuad)return;const t=this.areaQuad.getCenterPoint(),i=this.areaQuad.cornerOffsets.map((i=>({x:t.x+i.x,y:t.y+i.y})));let e=0,s=0;for(const t of i)t.x<0&&(e=Math.max(e,-t.x)),t.x>this.canvas.getWidth()&&(e=Math.min(e,this.canvas.getWidth()-t.x)),t.y<0&&(s=Math.max(s,-t.y)),t.y>this.canvas.getHeight()&&(s=Math.min(s,this.canvas.getHeight()-t.y));0===e&&0===s||this.areaQuad.set({left:(this.areaQuad.left??0)+e,top:(this.areaQuad.top??0)+s})}readQuadAsPrintArea(){if(void 0===this.areaQuad)return this.printArea??r();const t=this.areaQuad.getCenterPoint(),i=[{x:t.x+this.areaQuad.cornerOffsets[0].x,y:t.y+this.areaQuad.cornerOffsets[0].y},{x:t.x+this.areaQuad.cornerOffsets[1].x,y:t.y+this.areaQuad.cornerOffsets[1].y},{x:t.x+this.areaQuad.cornerOffsets[2].x,y:t.y+this.areaQuad.cornerOffsets[2].y},{x:t.x+this.areaQuad.cornerOffsets[3].x,y:t.y+this.areaQuad.cornerOffsets[3].y}],e=this.canvas.getWidth(),s=this.canvas.getHeight();return c(i,e,s,this.areaQuad.bulge)}emitPrintArea(){const t=this.readQuadAsPrintArea();this.printArea=t,this.wtpPrintAreaChange.emit(t)}render(){return s("div",{key:"fbeaeb8ac49780440ceb1bffa38689a23aeef66a",class:"wtp-print-area-editor"},s("canvas",{key:"b7e97909efaa17c7ffb4b089cf31e508e20c094e",ref:t=>this.canvasEl=t}))}static get watchers(){return{productImage:[{onProductImageChange:0}],width:[{onSizeChange:0}],height:[{onSizeChange:0}],printArea:[{onPrintAreaChange:0}]}}};w.style='*.sc-wtp-print-area-editor,*.sc-wtp-print-area-editor::before,*.sc-wtp-print-area-editor::after{box-sizing:border-box}.sc-wtp-print-area-editor-h{font-family:var(--wtp-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--wtp-color-text, #1e293b);line-height:1.5}.wtp-print-area-editor.sc-wtp-print-area-editor{display:inline-block;line-height:0;border:1px solid var(--wtp-color-border, #e2e8f0);border-radius:8px;overflow:hidden;background:repeating-conic-gradient(#e5e7eb 0% 25%, transparent 0% 50%) 50%/20px 20px}';export{w as wtp_print_area_editor}
@@ -0,0 +1 @@
1
+ import{p as e,b as t}from"./p-CUetmLbL.js";export{s as setNonce}from"./p-CUetmLbL.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((async e=>(await o(),t([["p-703e4c52",[[514,"wtp-editor",{width:[2],height:[2],productImage:[1,"product-image"],initialState:[1,"initial-state"],fonts:[16],printArea:[16],debug:[4],labels:[16],selectedObjectId:[32],selectedObjectType:[32],selectedFont:[32],selectedTextColor:[32],addLogo:[64],addText:[64],removeObject:[64],exportState:[64],loadState:[64],resetCanvas:[64],exportImage:[64],exportImageHighRes:[64],getObjects:[64],updateText:[64]},null,{productImage:[{onProductImageChange:0}],width:[{onSizeChange:0}],height:[{onSizeChange:0}],debug:[{onDebugChange:0}],printArea:[{onPrintAreaChange:0}]}],[769,"wtp-logo-upload",{config:[16],accept:[1],multiple:[4],disabled:[4],enableBackgroundRemoval:[4,"enable-background-removal"],bgRemovalConfig:[16],labels:[16],isDragOver:[32],previews:[32],selectedIndex:[32],rejections:[32],isProcessing:[32],pendingChoices:[32],urlInput:[32],urlError:[32],isUrlFetching:[32]}]]],["p-611ec561",[[514,"wtp-logo-renderer",{productImage:[1,"product-image"],width:[2],height:[2],logos:[16],backgroundColor:[1,"background-color"],printArea:[1040],layers:[32],containerWidth:[32],containerHeight:[32],exportImage:[64]},null,{productImage:[{onProductImageChange:0}],logos:[{onLogosChange:0}],printArea:[{onPrintAreaChange:0}],width:[{onSizeChange:0}],height:[{onSizeChange:0}],backgroundColor:[{onBackgroundColorChange:0}]}]]],["p-b532777b",[[514,"wtp-print-area-editor",{productImage:[1,"product-image"],width:[2],height:[2],printArea:[1040],getPrintArea:[64],setPrintArea:[64]},null,{productImage:[{onProductImageChange:0}],width:[{onSizeChange:0}],height:[{onSizeChange:0}],printArea:[{onPrintAreaChange:0}]}]]]],e))));
package/loader/cdn.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('../dist/cjs/loader.cjs.js');
@@ -0,0 +1 @@
1
+ module.exports = require('../dist/cjs/loader.cjs.js');
@@ -0,0 +1,24 @@
1
+ export * from '../dist/types/components';
2
+ export interface CustomElementsDefineOptions {
3
+ exclude?: string[];
4
+ resourcesUrl?: string;
5
+ syncQueue?: boolean;
6
+ jmp?: (c: Function) => any;
7
+ raf?: (c: FrameRequestCallback) => number;
8
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
9
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
10
+ }
11
+ export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
12
+ /**
13
+ * @deprecated
14
+ */
15
+ export declare function applyPolyfills(): Promise<void>;
16
+
17
+ /**
18
+ * Used to specify a nonce value that corresponds with an application's CSP.
19
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
20
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
21
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
22
+ * will result in the same behavior.
23
+ */
24
+ export declare function setNonce(nonce: string): void;
@@ -0,0 +1 @@
1
+ export * from '../dist/esm/loader.js';
@@ -0,0 +1,2 @@
1
+ (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
2
+ export * from '../dist/esm/loader.js';
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "web-to-print",
3
+ "version": "0.1.0",
4
+ "description": "Web-to-print component library for logo upload, rendering, and editing",
5
+ "main": "dist/index.cjs.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/types/index.d.ts",
8
+ "collection": "dist/collection/collection-manifest.json",
9
+ "collection:main": "dist/collection/index.js",
10
+ "unpkg": "dist/web-to-print/web-to-print.esm.js",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/web-to-print/web-to-print.esm.js",
14
+ "require": "./dist/web-to-print/web-to-print.cjs.js"
15
+ },
16
+ "./wtp-logo-upload": {
17
+ "import": "./dist/components/wtp-logo-upload.js",
18
+ "types": "./dist/components/wtp-logo-upload.d.ts"
19
+ },
20
+ "./wtp-logo-renderer": {
21
+ "import": "./dist/components/wtp-logo-renderer.js",
22
+ "types": "./dist/components/wtp-logo-renderer.d.ts"
23
+ },
24
+ "./wtp-editor": {
25
+ "import": "./dist/components/wtp-editor.js",
26
+ "types": "./dist/components/wtp-editor.d.ts"
27
+ },
28
+ "./loader": {
29
+ "import": "./loader/index.js",
30
+ "require": "./loader/index.cjs",
31
+ "types": "./loader/index.d.ts"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist/",
36
+ "loader/"
37
+ ],
38
+ "scripts": {
39
+ "build": "stencil build",
40
+ "start": "node scripts/image-proxy.mjs & stencil build --dev --watch --serve",
41
+ "test": "stencil test --spec --e2e",
42
+ "test.spec": "stencil test --spec",
43
+ "test.e2e": "stencil test --e2e",
44
+ "test.watch": "stencil test --spec --e2e --watchAll",
45
+ "generate": "stencil generate",
46
+ "lint": "eslint src/",
47
+ "release:patch": "npm version patch -m \"chore(release): %s\" && git push --follow-tags",
48
+ "release:minor": "npm version minor -m \"chore(release): %s\" && git push --follow-tags",
49
+ "release:major": "npm version major -m \"chore(release): %s\" && git push --follow-tags"
50
+ },
51
+ "dependencies": {
52
+ "exifreader": "^4.36.0",
53
+ "fabric": "^7.1.0"
54
+ },
55
+ "devDependencies": {
56
+ "jspdf": "^4.1.0",
57
+ "@stencil/core": "^4.27.1",
58
+ "@stencil/eslint-plugin": "^1.1.0",
59
+ "@stencil/sass": "^3.0.12",
60
+ "@types/jest": "^29.5.14",
61
+ "@types/node": "^22.13.5",
62
+ "eslint": "^9.20.0",
63
+ "jest": "^29.7.0",
64
+ "jest-cli": "^29.7.0",
65
+ "puppeteer": "^24.3.0"
66
+ },
67
+ "license": "MIT"
68
+ }