phaser-wind 0.7.0 → 0.9.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 (62) hide show
  1. package/README.md +24 -0
  2. package/dist/components/column/column.d.ts +88 -0
  3. package/dist/components/column/column.d.ts.map +1 -0
  4. package/dist/components/column/column.js +143 -0
  5. package/dist/components/column/column.js.map +1 -0
  6. package/dist/components/column/column.spec.d.ts +2 -0
  7. package/dist/components/column/column.spec.d.ts.map +1 -0
  8. package/dist/components/column/column.spec.js +114 -0
  9. package/dist/components/column/column.spec.js.map +1 -0
  10. package/dist/components/column/index.d.ts +2 -0
  11. package/dist/components/column/index.d.ts.map +1 -0
  12. package/dist/components/column/index.js +2 -0
  13. package/dist/components/column/index.js.map +1 -0
  14. package/dist/components/index.d.ts +4 -0
  15. package/dist/components/index.d.ts.map +1 -0
  16. package/dist/components/index.js +4 -0
  17. package/dist/components/index.js.map +1 -0
  18. package/dist/components/layout/index.d.ts +2 -0
  19. package/dist/components/layout/index.d.ts.map +1 -0
  20. package/dist/components/layout/index.js +2 -0
  21. package/dist/components/layout/index.js.map +1 -0
  22. package/dist/components/layout/layout-utils.d.ts +13 -0
  23. package/dist/components/layout/layout-utils.d.ts.map +1 -0
  24. package/dist/components/layout/layout-utils.js +96 -0
  25. package/dist/components/layout/layout-utils.js.map +1 -0
  26. package/dist/components/layout/layout-utils.spec.d.ts +2 -0
  27. package/dist/components/layout/layout-utils.spec.d.ts.map +1 -0
  28. package/dist/components/layout/layout-utils.spec.js +70 -0
  29. package/dist/components/layout/layout-utils.spec.js.map +1 -0
  30. package/dist/components/row/index.d.ts +2 -0
  31. package/dist/components/row/index.d.ts.map +1 -0
  32. package/dist/components/row/index.js +2 -0
  33. package/dist/components/row/index.js.map +1 -0
  34. package/dist/components/row/row.d.ts +87 -0
  35. package/dist/components/row/row.d.ts.map +1 -0
  36. package/dist/components/row/row.js +146 -0
  37. package/dist/components/row/row.js.map +1 -0
  38. package/dist/components/row/row.spec.d.ts +2 -0
  39. package/dist/components/row/row.spec.d.ts.map +1 -0
  40. package/dist/components/row/row.spec.js +114 -0
  41. package/dist/components/row/row.spec.js.map +1 -0
  42. package/dist/core/color.d.ts +2 -0
  43. package/dist/core/color.d.ts.map +1 -1
  44. package/dist/core/color.js +15 -2
  45. package/dist/core/color.js.map +1 -1
  46. package/dist/core/color.spec.js +19 -2
  47. package/dist/core/color.spec.js.map +1 -1
  48. package/dist/index.d.ts +1 -0
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +1 -0
  51. package/dist/index.js.map +1 -1
  52. package/dist/phaser-wind.js +410 -6
  53. package/dist/phaser-wind.min.js +1 -1
  54. package/dist/test-setup.d.ts +2 -0
  55. package/dist/test-setup.d.ts.map +1 -0
  56. package/dist/test-setup.js +35 -0
  57. package/dist/test-setup.js.map +1 -0
  58. package/package.json +1 -1
  59. package/dist/components/column.d.ts +0 -2
  60. package/dist/components/column.d.ts.map +0 -1
  61. package/dist/components/column.js +0 -2
  62. package/dist/components/column.js.map +0 -1
@@ -1 +1 @@
1
- !function(r,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("phaser")):"function"==typeof define&&define.amd?define(["exports","phaser"],n):n((r="undefined"!=typeof globalThis?globalThis:r||self).PhaserWind={},r.Phaser)}(this,function(r,n){"use strict";var t=function(r,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])},t(r,n)};function e(r,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=r}t(r,n),r.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var o=function(){return o=Object.assign||function(r){for(var n,t=1,e=arguments.length;t<e;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o]);return r},o.apply(this,arguments)};function a(r,n,t){if(t||2===arguments.length)for(var e,o=0,a=n.length;o<a;o++)!e&&o in n||(e||(e=Array.prototype.slice.call(n,0,o)),e[o]=n[o]);return r.concat(e||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var i=function(r){return null!==r&&"object"==typeof r&&!Array.isArray(r)&&"[object Object]"===Object.prototype.toString.call(r)},c=function(r){if(null===r||"object"!=typeof r)return r;if(Array.isArray(r))return r.map(function(r){return c(r)});if(i(r)){var n={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(n[t]=c(r[t]));return n}return r},g=function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];if(!i(r))return r;for(var e=c(r),o=0,a=n;o<a.length;o++){var b=a[o];if(i(b)){var u=c(b);for(var s in u)if(Object.prototype.hasOwnProperty.call(u,s)){var f=u[s],l=e[s];i(f)&&i(l)?e[s]=g(l,f):void 0!==f&&(e[s]=f)}}}return e},b=function(r){if("string"!=typeof r)return!1;var n=r.trim();return!!/^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/.test(n)||(!!/^rgb\(\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*\)$/.test(n)||(!!/^rgba\(\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*,\s*([01]|0?\.\d+)\s*\)$/.test(n)||!!/^oklch\(\s*(\d*\.?\d+%?)\s+(\d*\.?\d+)\s+(\d*\.?\d+)(?:\s*\/\s*([01]|0?\.\d+))?\s*\)$/.test(n)))},u={black:"#000",white:"#fff",slate:{50:"rgb(248, 250, 252)",100:"rgb(241, 245, 249)",200:"rgb(226, 232, 240)",300:"rgb(203, 213, 225)",400:"rgb(148, 163, 184)",500:"rgb(100, 116, 139)",600:"rgb(71, 85, 105)",700:"rgb(51, 65, 85)",800:"rgb(30, 41, 59)",900:"rgb(15, 23, 42)",950:"rgb(2, 6, 23)"},gray:{50:"rgb(249, 250, 251)",100:"rgb(243, 244, 246)",200:"rgb(229, 231, 235)",300:"rgb(209, 213, 219)",400:"rgb(156, 163, 175)",500:"rgb(107, 114, 128)",600:"rgb(75, 85, 99)",700:"rgb(55, 65, 81)",800:"rgb(31, 41, 55)",900:"rgb(17, 24, 39)",950:"rgb(3, 7, 18)"},zinc:{50:"rgb(250, 250, 250)",100:"rgb(244, 244, 245)",200:"rgb(228, 228, 231)",300:"rgb(212, 212, 216)",400:"rgb(161, 161, 170)",500:"rgb(113, 113, 122)",600:"rgb(82, 82, 91)",700:"rgb(63, 63, 70)",800:"rgb(39, 39, 42)",900:"rgb(24, 24, 27)",950:"rgb(9, 9, 11)"},neutral:{50:"rgb(250, 250, 250)",100:"rgb(245, 245, 245)",200:"rgb(229, 229, 229)",300:"rgb(212, 212, 212)",400:"rgb(163, 163, 163)",500:"rgb(115, 115, 115)",600:"rgb(82, 82, 82)",700:"rgb(64, 64, 64)",800:"rgb(38, 38, 38)",900:"rgb(23, 23, 23)",950:"rgb(10, 10, 10)"},stone:{50:"rgb(250, 250, 249)",100:"rgb(245, 245, 244)",200:"rgb(231, 229, 228)",300:"rgb(214, 211, 209)",400:"rgb(168, 162, 158)",500:"rgb(120, 113, 108)",600:"rgb(87, 83, 78)",700:"rgb(68, 64, 60)",800:"rgb(41, 37, 36)",900:"rgb(28, 25, 23)",950:"rgb(12, 10, 9)"},red:{50:"rgb(254, 242, 242)",100:"rgb(254, 226, 226)",200:"rgb(254, 202, 202)",300:"rgb(252, 165, 165)",400:"rgb(248, 113, 113)",500:"rgb(239, 68, 68)",600:"rgb(220, 38, 38)",700:"rgb(185, 28, 28)",800:"rgb(153, 27, 27)",900:"rgb(127, 29, 29)",950:"rgb(69, 10, 10)"},orange:{50:"rgb(255, 247, 237)",100:"rgb(255, 237, 213)",200:"rgb(254, 215, 170)",300:"rgb(253, 186, 116)",400:"rgb(251, 146, 60)",500:"rgb(249, 115, 22)",600:"rgb(234, 88, 12)",700:"rgb(194, 65, 12)",800:"rgb(154, 52, 18)",900:"rgb(124, 45, 18)",950:"rgb(67, 20, 7)"},amber:{50:"rgb(255, 251, 235)",100:"rgb(254, 243, 199)",200:"rgb(253, 230, 138)",300:"rgb(252, 211, 77)",400:"rgb(251, 191, 36)",500:"rgb(245, 158, 11)",600:"rgb(217, 119, 6)",700:"rgb(180, 83, 9)",800:"rgb(146, 64, 14)",900:"rgb(120, 53, 15)",950:"rgb(69, 26, 3)"},yellow:{50:"rgb(254, 252, 232)",100:"rgb(254, 249, 195)",200:"rgb(254, 240, 138)",300:"rgb(253, 224, 71)",400:"rgb(250, 204, 21)",500:"rgb(234, 179, 8)",600:"rgb(202, 138, 4)",700:"rgb(161, 98, 7)",800:"rgb(133, 77, 14)",900:"rgb(113, 63, 18)",950:"rgb(66, 32, 6)"},lime:{50:"rgb(247, 254, 231)",100:"rgb(236, 252, 203)",200:"rgb(217, 249, 157)",300:"rgb(190, 242, 100)",400:"rgb(163, 230, 53)",500:"rgb(132, 204, 22)",600:"rgb(101, 163, 13)",700:"rgb(77, 124, 15)",800:"rgb(63, 98, 18)",900:"rgb(54, 83, 20)",950:"rgb(26, 46, 5)"},green:{50:"rgb(240, 253, 244)",100:"rgb(220, 252, 231)",200:"rgb(187, 247, 208)",300:"rgb(134, 239, 172)",400:"rgb(74, 222, 128)",500:"rgb(34, 197, 94)",600:"rgb(22, 163, 74)",700:"rgb(21, 128, 61)",800:"rgb(22, 101, 52)",900:"rgb(20, 83, 45)",950:"rgb(5, 46, 22)"},emerald:{50:"rgb(236, 253, 245)",100:"rgb(209, 250, 229)",200:"rgb(167, 243, 208)",300:"rgb(110, 231, 183)",400:"rgb(52, 211, 153)",500:"rgb(16, 185, 129)",600:"rgb(5, 150, 105)",700:"rgb(4, 120, 87)",800:"rgb(6, 95, 70)",900:"rgb(6, 78, 59)",950:"rgb(2, 44, 34)"},teal:{50:"rgb(240, 253, 250)",100:"rgb(204, 251, 241)",200:"rgb(153, 246, 228)",300:"rgb(94, 234, 212)",400:"rgb(45, 212, 191)",500:"rgb(20, 184, 166)",600:"rgb(13, 148, 136)",700:"rgb(15, 118, 110)",800:"rgb(17, 94, 89)",900:"rgb(19, 78, 74)",950:"rgb(4, 47, 46)"},cyan:{50:"rgb(236, 254, 255)",100:"rgb(207, 250, 254)",200:"rgb(165, 243, 252)",300:"rgb(103, 232, 249)",400:"rgb(34, 211, 238)",500:"rgb(6, 182, 212)",600:"rgb(8, 145, 178)",700:"rgb(14, 116, 144)",800:"rgb(21, 94, 117)",900:"rgb(22, 78, 99)",950:"rgb(8, 51, 68)"},sky:{50:"rgb(240, 249, 255)",100:"rgb(224, 242, 254)",200:"rgb(186, 230, 253)",300:"rgb(125, 211, 252)",400:"rgb(56, 189, 248)",500:"rgb(14, 165, 233)",600:"rgb(2, 132, 199)",700:"rgb(3, 105, 161)",800:"rgb(7, 89, 133)",900:"rgb(12, 74, 110)",950:"rgb(8, 47, 73)"},blue:{50:"rgb(239, 246, 255)",100:"rgb(219, 234, 254)",200:"rgb(191, 219, 254)",300:"rgb(147, 197, 253)",400:"rgb(96, 165, 250)",500:"rgb(59, 130, 246)",600:"rgb(37, 99, 235)",700:"rgb(29, 78, 216)",800:"rgb(30, 64, 175)",900:"rgb(30, 58, 138)",950:"rgb(23, 37, 84)"},indigo:{50:"rgb(238, 242, 255)",100:"rgb(224, 231, 255)",200:"rgb(199, 210, 254)",300:"rgb(165, 180, 252)",400:"rgb(129, 140, 248)",500:"rgb(99, 102, 241)",600:"rgb(79, 70, 229)",700:"rgb(67, 56, 202)",800:"rgb(55, 48, 163)",900:"rgb(49, 46, 129)",950:"rgb(30, 27, 75)"},violet:{50:"rgb(245, 243, 255)",100:"rgb(237, 233, 254)",200:"rgb(221, 214, 254)",300:"rgb(196, 181, 253)",400:"rgb(167, 139, 250)",500:"rgb(139, 92, 246)",600:"rgb(124, 58, 237)",700:"rgb(109, 40, 217)",800:"rgb(91, 33, 182)",900:"rgb(76, 29, 149)",950:"rgb(46, 16, 101)"},purple:{50:"rgb(250, 245, 255)",100:"rgb(243, 232, 255)",200:"rgb(233, 213, 255)",300:"rgb(216, 180, 254)",400:"rgb(192, 132, 252)",500:"rgb(168, 85, 247)",600:"rgb(147, 51, 234)",700:"rgb(126, 34, 206)",800:"rgb(107, 33, 168)",900:"rgb(88, 28, 135)",950:"rgb(59, 7, 100)"},fuchsia:{50:"rgb(253, 244, 255)",100:"rgb(250, 232, 255)",200:"rgb(245, 208, 254)",300:"rgb(240, 171, 252)",400:"rgb(232, 121, 249)",500:"rgb(217, 70, 239)",600:"rgb(192, 38, 211)",700:"rgb(162, 28, 175)",800:"rgb(134, 25, 143)",900:"rgb(112, 26, 117)",950:"rgb(74, 4, 78)"},pink:{50:"rgb(253, 242, 248)",100:"rgb(252, 231, 243)",200:"rgb(251, 207, 232)",300:"rgb(249, 168, 212)",400:"rgb(244, 114, 182)",500:"rgb(236, 72, 153)",600:"rgb(219, 39, 119)",700:"rgb(190, 24, 93)",800:"rgb(157, 23, 77)",900:"rgb(131, 24, 67)",950:"rgb(80, 7, 36)"},rose:{50:"rgb(255, 241, 242)",100:"rgb(255, 228, 230)",200:"rgb(254, 205, 211)",300:"rgb(253, 164, 175)",400:"rgb(251, 113, 133)",500:"rgb(244, 63, 94)",600:"rgb(225, 29, 72)",700:"rgb(190, 18, 60)",800:"rgb(159, 18, 57)",900:"rgb(136, 19, 55)",950:"rgb(76, 5, 25)"}},s=/rgb\((\d+),\s*(\d+),\s*(\d+)\)/,f=function(r){return r.startsWith("#")?3===(n=r.slice(1)).length?(parseInt(n[0]+n[0],16)<<16)+(parseInt(n[1]+n[1],16)<<8)+parseInt(n[2]+n[2],16):parseInt(n,16):function(r){var n=r.match(s);if(!n)throw new Error("Invalid RGB format: ".concat(r));return(parseInt(n[1])<<16)+(parseInt(n[2])<<8)+parseInt(n[3])}(r);var n},l=function(r){var n=function(n){return r&&n in r?r[n]:null},t=function(r){var e;if("string"==typeof r&&b(r))return r;var o=n(r);if(o)return t(o);var a=r.split("-");if(2===a.length){var i=a[0],c=a[1],g=null===(e=u[i])||void 0===e?void 0:e[c];if(!g){if(b(r))return r;throw new Error('Color token "'.concat(i,"-").concat(c,'" not found'))}return g}var s=u[r];if(!s){if(b(r))return r;throw new Error('Color token "'.concat(r,'" not found'))}return s},e=function(r){var t;if("string"==typeof r&&b(r))return f(r);var o=n(r);if(o)return e(o);var a=r.split("-");if(2===a.length){var i=a[0],c=a[1],g=null===(t=u[i])||void 0===t?void 0:t[c];if(!g){if(b(r))return f(r);throw new Error('Color token "'.concat(i,"-").concat(c,'" not found'))}return f(g)}var s=u[r];if(b(s))return f(s);throw new Error('Color token "'.concat(r,'" not found'))};return{rgb:t,hex:e,black:function(){return t("black")},white:function(){return t("white")},slate:function(r){return t("slate-".concat(r))},gray:function(r){return t("gray-".concat(r))},zinc:function(r){return t("zinc-".concat(r))},neutral:function(r){return t("neutral-".concat(r))},stone:function(r){return t("stone-".concat(r))},red:function(r){return t("red-".concat(r))},orange:function(r){return t("orange-".concat(r))},amber:function(r){return t("amber-".concat(r))},yellow:function(r){return t("yellow-".concat(r))},lime:function(r){return t("lime-".concat(r))},green:function(r){return t("green-".concat(r))},emerald:function(r){return t("emerald-".concat(r))},teal:function(r){return t("teal-".concat(r))},cyan:function(r){return t("cyan-".concat(r))},sky:function(r){return t("sky-".concat(r))},blue:function(r){return t("blue-".concat(r))},indigo:function(r){return t("indigo-".concat(r))},violet:function(r){return t("violet-".concat(r))},purple:function(r){return t("purple-".concat(r))},fuchsia:function(r){return t("fuchsia-".concat(r))},pink:function(r){return t("pink-".concat(r))},rose:function(r){return t("rose-".concat(r))},blackHex:function(){return e("black")},whiteHex:function(){return e("white")},slateHex:function(r){return e("slate-".concat(r))},grayHex:function(r){return e("gray-".concat(r))},zincHex:function(r){return e("zinc-".concat(r))},neutralHex:function(r){return e("neutral-".concat(r))},stoneHex:function(r){return e("stone-".concat(r))},redHex:function(r){return e("red-".concat(r))},orangeHex:function(r){return e("orange-".concat(r))},amberHex:function(r){return e("amber-".concat(r))},yellowHex:function(r){return e("yellow-".concat(r))},limeHex:function(r){return e("lime-".concat(r))},greenHex:function(r){return e("green-".concat(r))},emeraldHex:function(r){return e("emerald-".concat(r))},tealHex:function(r){return e("teal-".concat(r))},cyanHex:function(r){return e("cyan-".concat(r))},skyHex:function(r){return e("sky-".concat(r))},blueHex:function(r){return e("blue-".concat(r))},indigoHex:function(r){return e("indigo-".concat(r))},violetHex:function(r){return e("violet-".concat(r))},purpleHex:function(r){return e("purple-".concat(r))},fuchsiaHex:function(r){return e("fuchsia-".concat(r))},pinkHex:function(r){return e("pink-".concat(r))},roseHex:function(r){return e("rose-".concat(r))}}},p=l({}),h={xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36,"5xl":48,"6xl":60,"7xl":72,"8xl":96,"9xl":128},d=function(r){var n=o(o({},h),r);return{px:function(r){var t=n[r];return"number"==typeof t?t:0},rem:function(r){var t=n[r];return"number"==typeof t?t/16:0},css:function(r){var t=n[r];return"number"==typeof t?"".concat(t,"px"):"0px"}}},y=d(void 0),m={primary:"Inter, system-ui, sans-serif",secondary:"Roboto, Arial, sans-serif",monospace:"Fira Code, Consolas, monospace",display:"Poppins, Inter, sans-serif"},v=function(r,n){var t=o(o({},m),r),e=d(n),i=function(r){if(r.includes(".")){var n=r.split(".")[1];if(n&&"string"==typeof t[n])return t[n]}return"string"==typeof t[r]?t[r]:r};return{size:function(r){var n;return null!==(n=e.px(r))&&void 0!==n?n:0},format:function(r){var n,t=r.size,o=r.family,a=null!==(n=e.px(t))&&void 0!==n?n:0;return"".concat(a,"px '").concat(i(o),"'")},family:function(r){return i(r)},getAvailableFonts:function(){return Array.from(new Set(a(a([],Object.keys(m),!0),Object.keys(t),!0)))}}},x={none:0,sm:2,default:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999},w=function(r){var n=o(o({},x),r),t=function(r){return"number"==typeof n[r]?n[r]:0};return{px:function(r){return t(r)},rem:function(r){return t(r)/16},css:function(r){return"".concat(t(r),"px")}}},H=w(void 0),I={sm:{blur:2,offsetX:1,offsetY:1,alpha:.15},md:{blur:4,offsetX:2,offsetY:2,alpha:.2},lg:{blur:6,offsetX:4,offsetY:4,alpha:.25},xl:{blur:8,offsetX:6,offsetY:6,alpha:.3},"2xl":{blur:12,offsetX:8,offsetY:8,alpha:.35},inner:{blur:4,offsetX:-2,offsetY:-2,alpha:.2}},S=function(r){var n=o(o({},I),r);return{get:function(r){return function(r){var t=n[r];return t&&"object"==typeof t?t:I.md}(r)}}},k=S(void 0),z={0:0,px:1,.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},P=function(r){var n=o(o({},z),r),t=function(r){return"number"==typeof n[r]?n[r]:0};return{px:function(r){return t(r)},rem:function(r){return t(r)/16},css:function(r){return"".concat(t(r),"px")}}},j=P(void 0),O={fonts:{primary:"Inter, system-ui, sans-serif",secondary:"Roboto, Arial, sans-serif",monospace:"Fira Code, Consolas, monospace",display:"Poppins, Inter, sans-serif"},fontSizes:o({},h),colors:{primary:"blue-600",secondary:"gray-600",success:"green-500",warning:"yellow-500",error:"red-500",info:"blue-400",background:"white",text:"gray-900",shadow:"black",overlay:"black"},spacing:o({},z),typography:{heading:{fontSize:"2xl",fontFamily:"fonts.display",fontWeight:600,lineHeight:1.2},"heading-large":{fontSize:"4xl",fontFamily:"fonts.display",fontWeight:700,lineHeight:1.1},body:{fontSize:"base",fontFamily:"fonts.primary",fontWeight:400,lineHeight:1.5},caption:{fontSize:"sm",fontFamily:"fonts.primary",fontWeight:400,lineHeight:1.4}},effects:{"shadow-sm":{blur:2,offsetY:1,color:"colors.shadow",alpha:.05},"shadow-md":{blur:4,offsetY:2,color:"colors.shadow",alpha:.1},"shadow-lg":{blur:8,offsetY:4,color:"colors.shadow",alpha:.1}},custom:{}},F={fonts:{primary:"Inter, system-ui, sans-serif",secondary:"Roboto, Arial, sans-serif",monospace:"Fira Code, Consolas, monospace",display:"Poppins, Inter, sans-serif"},fontSizes:o({},h),radius:o({},x),colors:{primary:"blue-400",secondary:"gray-400",success:"green-400",warning:"yellow-400",error:"red-400",info:"blue-300",background:"gray-900",text:"white",shadow:"black",overlay:"black"},spacing:o({},z),typography:{heading:{fontSize:"2xl",fontFamily:"fonts.display",fontWeight:600,lineHeight:1.2},"heading-large":{fontSize:"4xl",fontFamily:"fonts.display",fontWeight:700,lineHeight:1.1},body:{fontSize:"base",fontFamily:"fonts.primary",fontWeight:400,lineHeight:1.5},caption:{fontSize:"sm",fontFamily:"fonts.primary",fontWeight:400,lineHeight:1.4}},effects:{"shadow-sm":{blur:2,offsetY:1,color:"colors.shadow",alpha:.1},"shadow-md":{blur:4,offsetY:2,color:"colors.shadow",alpha:.15},"shadow-lg":{blur:8,offsetY:4,color:"colors.shadow",alpha:.2}},custom:{}},A=function(r){function n(n){var t=r.call(this,n)||this;return t.colorInstance=null,t.fontSizeInstance=null,t.spacingInstance=null,t.radiusInstance=null,t.fontInstance=null,t.shadowInstance=null,t.theme=O,t}return e(n,r),n.prototype.init=function(r){var n=r.theme,t=r.darkMode,e=void 0!==t&&t;n?(this.theme=n,this.colorInstance=l(this.theme.colors),this.fontSizeInstance=d(this.theme.fontSizes),this.spacingInstance=P(this.theme.spacing),this.radiusInstance=w(this.theme.radius),this.fontInstance=v(this.theme.fonts,this.theme.fontSizes),this.shadowInstance=S(this.theme.effects)):this.theme=e?F:O},n.prototype.getTheme=function(){return this.theme},Object.defineProperty(n.prototype,"color",{get:function(){return this.colorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"fontSize",{get:function(){return this.fontSizeInstance},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"spacing",{get:function(){return this.spacingInstance},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"radius",{get:function(){return this.radiusInstance},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"font",{get:function(){return this.fontInstance},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shadow",{get:function(){return this.shadowInstance},enumerable:!1,configurable:!0}),n}(n.Plugins.BasePlugin),C=function(r){function n(n){return r.call(this,n)||this}return e(n,r),n}(Phaser.Scene);r.Color=p,r.FontSize=y,r.PHASER_WIND_KEY="pw",r.PhaserWindPlugin=A,r.Radius=H,r.SceneWithPhaserWind=C,r.Shadow=k,r.Spacing=j,r.createColor=l,r.createFont=v,r.createFontSize=d,r.createRadius=w,r.createShadow=S,r.createSpacing=P,r.createTheme=function(r){return g({},O,r)},r.defaultDarkTheme=F,r.defaultLightTheme=O,r.defaultShadowMap=I,r.fontMap=m,r.fontSizeMap=h,r.isValidColor=b,r.merge=g,r.mergeDeep=function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return g.apply(void 0,a([{},r],n,!1))},r.palette=u,r.radiusMap=x,r.spacingMap=z});
1
+ !function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("phaser")):"function"==typeof define&&define.amd?define(["exports","phaser"],t):t((r="undefined"!=typeof globalThis?globalThis:r||self).PhaserWind={},r.Phaser)}(this,function(r,t){"use strict";var n=function(r,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])},n(r,t)};function e(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=r}n(r,t),r.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}var i=function(){return i=Object.assign||function(r){for(var t,n=1,e=arguments.length;n<e;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i]);return r},i.apply(this,arguments)};function o(r,t,n){if(n||2===arguments.length)for(var e,i=0,o=t.length;i<o;i++)!e&&i in t||(e||(e=Array.prototype.slice.call(t,0,i)),e[i]=t[i]);return r.concat(e||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var a=function(r){var t,n=r;if(r&&"object"==typeof r&&"list"in r&&Array.isArray(r.list)){if("number"==typeof n.displayWidth&&n.displayWidth>0)return n.displayWidth;if("number"==typeof n.width&&n.width>0)return n.width;var e=r;if("number"==typeof e.displayWidth&&e.displayWidth>0)return e.displayWidth;if("number"==typeof e.width&&e.width>0)return"number"==typeof e.scale&&e.scale>0?e.width/e.scale:e.width;for(var i=0,o=0,g=e.list;o<g.length;o++){var u=g[o],c=a(u);i=Math.max(i,c)}return i}if("number"==typeof n.displayWidth)return n.displayWidth;if("number"==typeof n.width)return n.width;var s=null===(t=n.getBounds)||void 0===t?void 0:t.call(n);return s?s.width:0},g=function(r){var t,n=r;if(r&&"object"==typeof r&&"list"in r&&Array.isArray(r.list)){if("number"==typeof n.displayHeight&&n.displayHeight>0)return n.displayHeight;if("number"==typeof n.height&&n.height>0)return n.height;var e=r;if("number"==typeof e.displayHeight&&e.displayHeight>0)return e.displayHeight;if("number"==typeof e.height&&e.height>0)return"number"==typeof e.scale&&e.scale>0?e.height/e.scale:e.height;for(var i=0,o=0,a=e.list;o<a.length;o++){var u=a[o],c=g(u);i=Math.max(i,c)}return i}if("number"==typeof n.displayHeight)return n.displayHeight;if("number"==typeof n.height)return n.height;var s=null===(t=n.getBounds)||void 0===t?void 0:t.call(n);return s?s.height:0},u=function(r){var t=a(r),n=g(r),e=r,i="number"==typeof e.originX?e.originX:void 0,o="number"==typeof e.originY?e.originY:void 0;return void 0===i&&"number"==typeof e.displayOriginX&&t>0&&(i=e.displayOriginX/t),void 0===o&&"number"==typeof e.displayOriginY&&n>0&&(o=e.displayOriginY/n),{x:null!=i?i:.5,y:null!=o?o:.5}},c=function(r){function t(t){var n=t.scene,e=t.x,i=t.y,o=t.gap,a=void 0===o?8:o,g=t.align,u=void 0===g?"center":g,c=t.children,s=void 0===c?[]:c,l=t.verticalOrigin,f=void 0===l?"center":l,b=r.call(this,n,e,i)||this;return b.gap=a,b.align=u,b.verticalOrigin=f,s.length>0&&b.add(s),b.layout(),b}return e(t,r),t.prototype.setGap=function(r){this.gap=r,this.layout()},t.prototype.setAlign=function(r){this.align=r,this.layout()},t.prototype.addChild=function(r,t){return void 0===t&&(t=!0),this.add(r),t&&this.layout(),this},t.prototype.addChildren=function(r,t){return void 0===t&&(t=!0),r.length>0&&this.add(r),t&&this.layout(),this},t.prototype.layout=function(){var r=this,t=this.list;if(0!==t.length){for(var n=t.map(function(t){return{child:t,width:r.getDisplayWidth(t),height:r.getDisplayHeight(t),origin:r.getNormalizedOrigin(t)}}),e=n.reduce(function(r,t){return Math.max(r,t.width)},0),i=n.reduce(function(r,t){return r+t.height},0)+this.gap*(n.length-1),o="top"===this.verticalOrigin?0:"center"===this.verticalOrigin?-i/2:-i,a=0,g=n;a<g.length;a++){var u=g[a],c=u.child,s=u.width,l=u.height,f=u.origin,b=0;b="left"===this.align?-e/2+f.x*s:"right"===this.align?e/2-(1-f.x)*s:(f.x-.5)*s;var h=o+f.y*l;c.setPosition(b,h),o+=l+this.gap}this.setSize(e,i)}else this.setSize(0,0)},t.prototype.getDisplayWidth=function(r){return a(r)},t.prototype.getDisplayHeight=function(r){return g(r)},t.prototype.getNormalizedOrigin=function(r){return u(r)},t}(t.GameObjects.Container),s=function(r){function t(t){var n=t.scene,e=t.x,i=t.y,o=t.gap,a=void 0===o?8:o,g=t.align,u=void 0===g?"center":g,c=t.children,s=void 0===c?[]:c,l=t.horizontalOrigin,f=void 0===l?"center":l,b=r.call(this,n,e,i)||this;return b.gap=a,b.align=u,b.horizontalOrigin=f,s.length>0&&b.add(s),b.layout(),b}return e(t,r),t.prototype.setGap=function(r){this.gap=r,this.layout()},t.prototype.setAlign=function(r){this.align=r,this.layout()},t.prototype.addChild=function(r,t){return void 0===t&&(t=!0),this.add(r),t&&this.layout(),this},t.prototype.addChildren=function(r,t){return void 0===t&&(t=!0),r.length>0&&this.add(r),t&&this.layout(),this},t.prototype.layout=function(){var r=this,t=this.list;if(0!==t.length){for(var n=t.map(function(t){return{child:t,width:r.getDisplayWidth(t),height:r.getDisplayHeight(t),origin:r.getNormalizedOrigin(t)}}),e=n.reduce(function(r,t){return Math.max(r,t.height)},0),i=n.reduce(function(r,t){return r+t.width},0)+this.gap*(n.length-1),o="left"===this.horizontalOrigin?0:"center"===this.horizontalOrigin?-i/2:-i,a=0,g=n;a<g.length;a++){var u=g[a],c=u.child,s=u.width,l=u.height,f=u.origin,b=0;b="top"===this.align?-e/2+f.y*l:"bottom"===this.align?e/2-(1-f.y)*l:(f.y-.5)*l;var h=o+f.x*s;c.setPosition(h,b),o+=s+this.gap}this.setSize(i,e)}else this.setSize(0,0)},t.prototype.getDisplayWidth=function(r){return a(r)},t.prototype.getDisplayHeight=function(r){return g(r)},t.prototype.getNormalizedOrigin=function(r){return u(r)},t}(t.GameObjects.Container),l=function(r){return null!==r&&"object"==typeof r&&!Array.isArray(r)&&"[object Object]"===Object.prototype.toString.call(r)},f=function(r){if(null===r||"object"!=typeof r)return r;if(Array.isArray(r))return r.map(function(r){return f(r)});if(l(r)){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=f(r[n]));return t}return r},b=function(r){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!l(r))return r;for(var e=f(r),i=0,o=t;i<o.length;i++){var a=o[i];if(l(a)){var g=f(a);for(var u in g)if(Object.prototype.hasOwnProperty.call(g,u)){var c=g[u],s=e[u];l(c)&&l(s)?e[u]=b(s,c):void 0!==c&&(e[u]=c)}}}return e},h=function(r){if("string"!=typeof r)return!1;var t=r.trim();return!!/^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/.test(t)||(!!/^rgb\(\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*\)$/.test(t)||(!!/^rgba\(\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*,\s*([01]|0?\.\d+)\s*\)$/.test(t)||!!/^oklch\(\s*(\d*\.?\d+%?)\s+(\d*\.?\d+)\s+(\d*\.?\d+)(?:\s*\/\s*([01]|0?\.\d+))?\s*\)$/.test(t)))},p={black:"#000",white:"#fff",slate:{50:"rgb(248, 250, 252)",100:"rgb(241, 245, 249)",200:"rgb(226, 232, 240)",300:"rgb(203, 213, 225)",400:"rgb(148, 163, 184)",500:"rgb(100, 116, 139)",600:"rgb(71, 85, 105)",700:"rgb(51, 65, 85)",800:"rgb(30, 41, 59)",900:"rgb(15, 23, 42)",950:"rgb(2, 6, 23)"},gray:{50:"rgb(249, 250, 251)",100:"rgb(243, 244, 246)",200:"rgb(229, 231, 235)",300:"rgb(209, 213, 219)",400:"rgb(156, 163, 175)",500:"rgb(107, 114, 128)",600:"rgb(75, 85, 99)",700:"rgb(55, 65, 81)",800:"rgb(31, 41, 55)",900:"rgb(17, 24, 39)",950:"rgb(3, 7, 18)"},zinc:{50:"rgb(250, 250, 250)",100:"rgb(244, 244, 245)",200:"rgb(228, 228, 231)",300:"rgb(212, 212, 216)",400:"rgb(161, 161, 170)",500:"rgb(113, 113, 122)",600:"rgb(82, 82, 91)",700:"rgb(63, 63, 70)",800:"rgb(39, 39, 42)",900:"rgb(24, 24, 27)",950:"rgb(9, 9, 11)"},neutral:{50:"rgb(250, 250, 250)",100:"rgb(245, 245, 245)",200:"rgb(229, 229, 229)",300:"rgb(212, 212, 212)",400:"rgb(163, 163, 163)",500:"rgb(115, 115, 115)",600:"rgb(82, 82, 82)",700:"rgb(64, 64, 64)",800:"rgb(38, 38, 38)",900:"rgb(23, 23, 23)",950:"rgb(10, 10, 10)"},stone:{50:"rgb(250, 250, 249)",100:"rgb(245, 245, 244)",200:"rgb(231, 229, 228)",300:"rgb(214, 211, 209)",400:"rgb(168, 162, 158)",500:"rgb(120, 113, 108)",600:"rgb(87, 83, 78)",700:"rgb(68, 64, 60)",800:"rgb(41, 37, 36)",900:"rgb(28, 25, 23)",950:"rgb(12, 10, 9)"},red:{50:"rgb(254, 242, 242)",100:"rgb(254, 226, 226)",200:"rgb(254, 202, 202)",300:"rgb(252, 165, 165)",400:"rgb(248, 113, 113)",500:"rgb(239, 68, 68)",600:"rgb(220, 38, 38)",700:"rgb(185, 28, 28)",800:"rgb(153, 27, 27)",900:"rgb(127, 29, 29)",950:"rgb(69, 10, 10)"},orange:{50:"rgb(255, 247, 237)",100:"rgb(255, 237, 213)",200:"rgb(254, 215, 170)",300:"rgb(253, 186, 116)",400:"rgb(251, 146, 60)",500:"rgb(249, 115, 22)",600:"rgb(234, 88, 12)",700:"rgb(194, 65, 12)",800:"rgb(154, 52, 18)",900:"rgb(124, 45, 18)",950:"rgb(67, 20, 7)"},amber:{50:"rgb(255, 251, 235)",100:"rgb(254, 243, 199)",200:"rgb(253, 230, 138)",300:"rgb(252, 211, 77)",400:"rgb(251, 191, 36)",500:"rgb(245, 158, 11)",600:"rgb(217, 119, 6)",700:"rgb(180, 83, 9)",800:"rgb(146, 64, 14)",900:"rgb(120, 53, 15)",950:"rgb(69, 26, 3)"},yellow:{50:"rgb(254, 252, 232)",100:"rgb(254, 249, 195)",200:"rgb(254, 240, 138)",300:"rgb(253, 224, 71)",400:"rgb(250, 204, 21)",500:"rgb(234, 179, 8)",600:"rgb(202, 138, 4)",700:"rgb(161, 98, 7)",800:"rgb(133, 77, 14)",900:"rgb(113, 63, 18)",950:"rgb(66, 32, 6)"},lime:{50:"rgb(247, 254, 231)",100:"rgb(236, 252, 203)",200:"rgb(217, 249, 157)",300:"rgb(190, 242, 100)",400:"rgb(163, 230, 53)",500:"rgb(132, 204, 22)",600:"rgb(101, 163, 13)",700:"rgb(77, 124, 15)",800:"rgb(63, 98, 18)",900:"rgb(54, 83, 20)",950:"rgb(26, 46, 5)"},green:{50:"rgb(240, 253, 244)",100:"rgb(220, 252, 231)",200:"rgb(187, 247, 208)",300:"rgb(134, 239, 172)",400:"rgb(74, 222, 128)",500:"rgb(34, 197, 94)",600:"rgb(22, 163, 74)",700:"rgb(21, 128, 61)",800:"rgb(22, 101, 52)",900:"rgb(20, 83, 45)",950:"rgb(5, 46, 22)"},emerald:{50:"rgb(236, 253, 245)",100:"rgb(209, 250, 229)",200:"rgb(167, 243, 208)",300:"rgb(110, 231, 183)",400:"rgb(52, 211, 153)",500:"rgb(16, 185, 129)",600:"rgb(5, 150, 105)",700:"rgb(4, 120, 87)",800:"rgb(6, 95, 70)",900:"rgb(6, 78, 59)",950:"rgb(2, 44, 34)"},teal:{50:"rgb(240, 253, 250)",100:"rgb(204, 251, 241)",200:"rgb(153, 246, 228)",300:"rgb(94, 234, 212)",400:"rgb(45, 212, 191)",500:"rgb(20, 184, 166)",600:"rgb(13, 148, 136)",700:"rgb(15, 118, 110)",800:"rgb(17, 94, 89)",900:"rgb(19, 78, 74)",950:"rgb(4, 47, 46)"},cyan:{50:"rgb(236, 254, 255)",100:"rgb(207, 250, 254)",200:"rgb(165, 243, 252)",300:"rgb(103, 232, 249)",400:"rgb(34, 211, 238)",500:"rgb(6, 182, 212)",600:"rgb(8, 145, 178)",700:"rgb(14, 116, 144)",800:"rgb(21, 94, 117)",900:"rgb(22, 78, 99)",950:"rgb(8, 51, 68)"},sky:{50:"rgb(240, 249, 255)",100:"rgb(224, 242, 254)",200:"rgb(186, 230, 253)",300:"rgb(125, 211, 252)",400:"rgb(56, 189, 248)",500:"rgb(14, 165, 233)",600:"rgb(2, 132, 199)",700:"rgb(3, 105, 161)",800:"rgb(7, 89, 133)",900:"rgb(12, 74, 110)",950:"rgb(8, 47, 73)"},blue:{50:"rgb(239, 246, 255)",100:"rgb(219, 234, 254)",200:"rgb(191, 219, 254)",300:"rgb(147, 197, 253)",400:"rgb(96, 165, 250)",500:"rgb(59, 130, 246)",600:"rgb(37, 99, 235)",700:"rgb(29, 78, 216)",800:"rgb(30, 64, 175)",900:"rgb(30, 58, 138)",950:"rgb(23, 37, 84)"},indigo:{50:"rgb(238, 242, 255)",100:"rgb(224, 231, 255)",200:"rgb(199, 210, 254)",300:"rgb(165, 180, 252)",400:"rgb(129, 140, 248)",500:"rgb(99, 102, 241)",600:"rgb(79, 70, 229)",700:"rgb(67, 56, 202)",800:"rgb(55, 48, 163)",900:"rgb(49, 46, 129)",950:"rgb(30, 27, 75)"},violet:{50:"rgb(245, 243, 255)",100:"rgb(237, 233, 254)",200:"rgb(221, 214, 254)",300:"rgb(196, 181, 253)",400:"rgb(167, 139, 250)",500:"rgb(139, 92, 246)",600:"rgb(124, 58, 237)",700:"rgb(109, 40, 217)",800:"rgb(91, 33, 182)",900:"rgb(76, 29, 149)",950:"rgb(46, 16, 101)"},purple:{50:"rgb(250, 245, 255)",100:"rgb(243, 232, 255)",200:"rgb(233, 213, 255)",300:"rgb(216, 180, 254)",400:"rgb(192, 132, 252)",500:"rgb(168, 85, 247)",600:"rgb(147, 51, 234)",700:"rgb(126, 34, 206)",800:"rgb(107, 33, 168)",900:"rgb(88, 28, 135)",950:"rgb(59, 7, 100)"},fuchsia:{50:"rgb(253, 244, 255)",100:"rgb(250, 232, 255)",200:"rgb(245, 208, 254)",300:"rgb(240, 171, 252)",400:"rgb(232, 121, 249)",500:"rgb(217, 70, 239)",600:"rgb(192, 38, 211)",700:"rgb(162, 28, 175)",800:"rgb(134, 25, 143)",900:"rgb(112, 26, 117)",950:"rgb(74, 4, 78)"},pink:{50:"rgb(253, 242, 248)",100:"rgb(252, 231, 243)",200:"rgb(251, 207, 232)",300:"rgb(249, 168, 212)",400:"rgb(244, 114, 182)",500:"rgb(236, 72, 153)",600:"rgb(219, 39, 119)",700:"rgb(190, 24, 93)",800:"rgb(157, 23, 77)",900:"rgb(131, 24, 67)",950:"rgb(80, 7, 36)"},rose:{50:"rgb(255, 241, 242)",100:"rgb(255, 228, 230)",200:"rgb(254, 205, 211)",300:"rgb(253, 164, 175)",400:"rgb(251, 113, 133)",500:"rgb(244, 63, 94)",600:"rgb(225, 29, 72)",700:"rgb(190, 18, 60)",800:"rgb(159, 18, 57)",900:"rgb(136, 19, 55)",950:"rgb(76, 5, 25)"}},d=/rgb\((\d+),\s*(\d+),\s*(\d+)\)/,y=function(r){return r.startsWith("#")?3===(t=r.slice(1)).length?(parseInt(t[0]+t[0],16)<<16)+(parseInt(t[1]+t[1],16)<<8)+parseInt(t[2]+t[2],16):parseInt(t,16):function(r){var t=r.match(d);if(!t)throw new Error("Invalid RGB format: ".concat(r));return(parseInt(t[1])<<16)+(parseInt(t[2])<<8)+parseInt(t[3])}(r);var t},m=function(r){var t=function(t){return r&&t in r?r[t]:null},n=function(r){var e,i;if("string"==typeof r&&h(r))return r;var o=t(r);if(o)return n(o);var a=null!==(e=null==r?void 0:r.split("-"))&&void 0!==e?e:[];if(2===a.length){var g=a[0],u=a[1],c=null===(i=p[g])||void 0===i?void 0:i[u];if(!c){if(h(r))return r;throw new Error('Color token "'.concat(g,"-").concat(u,'" not found'))}return c}var s=p[r];if(!s){if(h(r))return r;throw new Error('Color token "'.concat(r,'" not found'))}return s},e=function(r){var n,i;if("string"==typeof r&&h(r))return y(r);var o=t(r);if(o)return e(o);var a=null!==(n=null==r?void 0:r.split("-"))&&void 0!==n?n:[];if(2===a.length){var g=a[0],u=a[1],c=null===(i=p[g])||void 0===i?void 0:i[u];if(!c){if(h(r))return y(r);throw new Error('Color token "'.concat(g,"-").concat(u,'" not found'))}return y(c)}var s=p[r];if(h(s))return y(s);throw new Error('Color token "'.concat(r,'" not found'))};return{rgb:n,hex:e,isValidColorToken:function(r){if("black"===r||"white"===r)return!0;var t=r.split("-");if(2===t.length){var n=t[0],e=t[1];return n in p&&e in p[n]}return!1},black:function(){return n("black")},white:function(){return n("white")},slate:function(r){return n("slate-".concat(r))},gray:function(r){return n("gray-".concat(r))},zinc:function(r){return n("zinc-".concat(r))},neutral:function(r){return n("neutral-".concat(r))},stone:function(r){return n("stone-".concat(r))},red:function(r){return n("red-".concat(r))},orange:function(r){return n("orange-".concat(r))},amber:function(r){return n("amber-".concat(r))},yellow:function(r){return n("yellow-".concat(r))},lime:function(r){return n("lime-".concat(r))},green:function(r){return n("green-".concat(r))},emerald:function(r){return n("emerald-".concat(r))},teal:function(r){return n("teal-".concat(r))},cyan:function(r){return n("cyan-".concat(r))},sky:function(r){return n("sky-".concat(r))},blue:function(r){return n("blue-".concat(r))},indigo:function(r){return n("indigo-".concat(r))},violet:function(r){return n("violet-".concat(r))},purple:function(r){return n("purple-".concat(r))},fuchsia:function(r){return n("fuchsia-".concat(r))},pink:function(r){return n("pink-".concat(r))},rose:function(r){return n("rose-".concat(r))},blackHex:function(){return e("black")},whiteHex:function(){return e("white")},slateHex:function(r){return e("slate-".concat(r))},grayHex:function(r){return e("gray-".concat(r))},zincHex:function(r){return e("zinc-".concat(r))},neutralHex:function(r){return e("neutral-".concat(r))},stoneHex:function(r){return e("stone-".concat(r))},redHex:function(r){return e("red-".concat(r))},orangeHex:function(r){return e("orange-".concat(r))},amberHex:function(r){return e("amber-".concat(r))},yellowHex:function(r){return e("yellow-".concat(r))},limeHex:function(r){return e("lime-".concat(r))},greenHex:function(r){return e("green-".concat(r))},emeraldHex:function(r){return e("emerald-".concat(r))},tealHex:function(r){return e("teal-".concat(r))},cyanHex:function(r){return e("cyan-".concat(r))},skyHex:function(r){return e("sky-".concat(r))},blueHex:function(r){return e("blue-".concat(r))},indigoHex:function(r){return e("indigo-".concat(r))},violetHex:function(r){return e("violet-".concat(r))},purpleHex:function(r){return e("purple-".concat(r))},fuchsiaHex:function(r){return e("fuchsia-".concat(r))},pinkHex:function(r){return e("pink-".concat(r))},roseHex:function(r){return e("rose-".concat(r))}}},v=m({}),w={xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36,"5xl":48,"6xl":60,"7xl":72,"8xl":96,"9xl":128},x=function(r){var t=i(i({},w),r);return{px:function(r){var n=t[r];return"number"==typeof n?n:0},rem:function(r){var n=t[r];return"number"==typeof n?n/16:0},css:function(r){var n=t[r];return"number"==typeof n?"".concat(n,"px"):"0px"}}},H=x(void 0),O={primary:"Inter, system-ui, sans-serif",secondary:"Roboto, Arial, sans-serif",monospace:"Fira Code, Consolas, monospace",display:"Poppins, Inter, sans-serif"},z=function(r,t){var n=i(i({},O),r),e=x(t),a=function(r){if(r.includes(".")){var t=r.split(".")[1];if(t&&"string"==typeof n[t])return n[t]}return"string"==typeof n[r]?n[r]:r};return{size:function(r){var t;return null!==(t=e.px(r))&&void 0!==t?t:0},format:function(r){var t,n=r.size,i=r.family,o=null!==(t=e.px(n))&&void 0!==t?t:0;return"".concat(o,"px '").concat(a(i),"'")},family:function(r){return a(r)},getAvailableFonts:function(){return Array.from(new Set(o(o([],Object.keys(O),!0),Object.keys(n),!0)))}}},S={none:0,sm:2,default:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999},I=function(r){var t=i(i({},S),r),n=function(r){return"number"==typeof t[r]?t[r]:0};return{px:function(r){return n(r)},rem:function(r){return n(r)/16},css:function(r){return"".concat(n(r),"px")}}},k=I(void 0),W={sm:{blur:2,offsetX:1,offsetY:1,alpha:.15},md:{blur:4,offsetX:2,offsetY:2,alpha:.2},lg:{blur:6,offsetX:4,offsetY:4,alpha:.25},xl:{blur:8,offsetX:6,offsetY:6,alpha:.3},"2xl":{blur:12,offsetX:8,offsetY:8,alpha:.35},inner:{blur:4,offsetX:-2,offsetY:-2,alpha:.2}},j=function(r){var t=i(i({},W),r);return{get:function(r){return function(r){var n=t[r];return n&&"object"==typeof n?n:W.md}(r)}}},P=j(void 0),A={0:0,px:1,.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},C=function(r){var t=i(i({},A),r),n=function(r){return"number"==typeof t[r]?t[r]:0};return{px:function(r){return n(r)},rem:function(r){return n(r)/16},css:function(r){return"".concat(n(r),"px")}}},F=C(void 0),Y={fonts:{primary:"Inter, system-ui, sans-serif",secondary:"Roboto, Arial, sans-serif",monospace:"Fira Code, Consolas, monospace",display:"Poppins, Inter, sans-serif"},fontSizes:i({},w),colors:{primary:"blue-600",secondary:"gray-600",success:"green-500",warning:"yellow-500",error:"red-500",info:"blue-400",background:"white",text:"gray-900",shadow:"black",overlay:"black"},spacing:i({},A),typography:{heading:{fontSize:"2xl",fontFamily:"fonts.display",fontWeight:600,lineHeight:1.2},"heading-large":{fontSize:"4xl",fontFamily:"fonts.display",fontWeight:700,lineHeight:1.1},body:{fontSize:"base",fontFamily:"fonts.primary",fontWeight:400,lineHeight:1.5},caption:{fontSize:"sm",fontFamily:"fonts.primary",fontWeight:400,lineHeight:1.4}},effects:{"shadow-sm":{blur:2,offsetY:1,color:"colors.shadow",alpha:.05},"shadow-md":{blur:4,offsetY:2,color:"colors.shadow",alpha:.1},"shadow-lg":{blur:8,offsetY:4,color:"colors.shadow",alpha:.1}},custom:{}},D={fonts:{primary:"Inter, system-ui, sans-serif",secondary:"Roboto, Arial, sans-serif",monospace:"Fira Code, Consolas, monospace",display:"Poppins, Inter, sans-serif"},fontSizes:i({},w),radius:i({},S),colors:{primary:"blue-400",secondary:"gray-400",success:"green-400",warning:"yellow-400",error:"red-400",info:"blue-300",background:"gray-900",text:"white",shadow:"black",overlay:"black"},spacing:i({},A),typography:{heading:{fontSize:"2xl",fontFamily:"fonts.display",fontWeight:600,lineHeight:1.2},"heading-large":{fontSize:"4xl",fontFamily:"fonts.display",fontWeight:700,lineHeight:1.1},body:{fontSize:"base",fontFamily:"fonts.primary",fontWeight:400,lineHeight:1.5},caption:{fontSize:"sm",fontFamily:"fonts.primary",fontWeight:400,lineHeight:1.4}},effects:{"shadow-sm":{blur:2,offsetY:1,color:"colors.shadow",alpha:.1},"shadow-md":{blur:4,offsetY:2,color:"colors.shadow",alpha:.15},"shadow-lg":{blur:8,offsetY:4,color:"colors.shadow",alpha:.2}},custom:{}},E=function(r){function t(t){var n=r.call(this,t)||this;return n.colorInstance=null,n.fontSizeInstance=null,n.spacingInstance=null,n.radiusInstance=null,n.fontInstance=null,n.shadowInstance=null,n.theme=Y,n}return e(t,r),t.prototype.init=function(r){var t=r.theme,n=r.darkMode,e=void 0!==n&&n;t?(this.theme=t,this.colorInstance=m(this.theme.colors),this.fontSizeInstance=x(this.theme.fontSizes),this.spacingInstance=C(this.theme.spacing),this.radiusInstance=I(this.theme.radius),this.fontInstance=z(this.theme.fonts,this.theme.fontSizes),this.shadowInstance=j(this.theme.effects)):this.theme=e?D:Y},t.prototype.getTheme=function(){return this.theme},Object.defineProperty(t.prototype,"color",{get:function(){return this.colorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontSize",{get:function(){return this.fontSizeInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){return this.spacingInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this.radiusInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"font",{get:function(){return this.fontInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadow",{get:function(){return this.shadowInstance},enumerable:!1,configurable:!0}),t}(t.Plugins.BasePlugin),_=function(r){function t(t){return r.call(this,t)||this}return e(t,r),t}(Phaser.Scene);r.Color=v,r.Column=c,r.DEFAULT_GAP=8,r.FontSize=H,r.PHASER_WIND_KEY="pw",r.PhaserWindPlugin=E,r.Radius=k,r.Row=s,r.SceneWithPhaserWind=_,r.Shadow=P,r.Spacing=F,r.createColor=m,r.createFont=z,r.createFontSize=x,r.createRadius=I,r.createShadow=j,r.createSpacing=C,r.createTheme=function(r){return b({},Y,r)},r.defaultDarkTheme=D,r.defaultLightTheme=Y,r.defaultShadowMap=W,r.fontMap=O,r.fontSizeMap=w,r.getDisplayHeightOf=g,r.getDisplayWidthOf=a,r.getNormalizedOriginOf=u,r.isValidColor=h,r.merge=b,r.mergeDeep=function(r){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return b.apply(void 0,o([{},r],t,!1))},r.palette=p,r.radiusMap=S,r.spacingMap=A});
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=test-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-setup.d.ts","sourceRoot":"","sources":["../src/test-setup.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
1
+ // Global mock for Phaser in tests
2
+ import { vi } from 'vitest';
3
+ // Mock Phaser globally
4
+ vi.mock('phaser', () => {
5
+ class Scene {
6
+ }
7
+ class Container {
8
+ list = [];
9
+ x;
10
+ y;
11
+ width = 0;
12
+ height = 0;
13
+ constructor(_scene, x, y) {
14
+ this.x = x;
15
+ this.y = y;
16
+ }
17
+ add(child) {
18
+ if (Array.isArray(child)) {
19
+ this.list.push(...child);
20
+ }
21
+ else {
22
+ this.list.push(child);
23
+ }
24
+ return this;
25
+ }
26
+ setSize(width, height) {
27
+ this.width = width;
28
+ this.height = height;
29
+ return this;
30
+ }
31
+ }
32
+ const GameObjects = { Container };
33
+ return { GameObjects, Scene };
34
+ });
35
+ //# sourceMappingURL=test-setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-setup.js","sourceRoot":"","sources":["../src/test-setup.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE5B,uBAAuB;AACvB,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;IACrB,MAAM,KAAK;KAAI;IAIf,MAAM,SAAS;QACN,IAAI,GAAc,EAAE,CAAC;QACrB,CAAC,CAAS;QACV,CAAC,CAAS;QACV,KAAK,GAAG,CAAC,CAAC;QACV,MAAM,GAAG,CAAC,CAAC;QAElB,YAAY,MAAa,EAAE,CAAS,EAAE,CAAS;YAC7C,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;YACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACb,CAAC;QAED,GAAG,CAAC,KAAoC;YACtC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;YAC3B,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACxB,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,CAAC,KAAa,EAAE,MAAc;YACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,OAAO,IAAI,CAAC;QACd,CAAC;KACF;IAED,MAAM,WAAW,GAAG,EAAE,SAAS,EAAW,CAAC;IAC3C,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;AAChC,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phaser-wind",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Wind theme like Tailwind CSS for Phaser games",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=column.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../src/components/column.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=column.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"column.js","sourceRoot":"","sources":["../../src/components/column.ts"],"names":[],"mappings":""}