@mhmo91/schmancy 0.2.118 → 0.2.121

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 (325) hide show
  1. package/dist/{animated-text-C2EvhDmf.cjs → animated-text-BH6DM-pF.cjs} +2 -2
  2. package/dist/{animated-text-C2EvhDmf.cjs.map → animated-text-BH6DM-pF.cjs.map} +1 -1
  3. package/dist/{animated-text-6DhYKKzt.js → animated-text-C92_eFNP.js} +3 -3
  4. package/dist/{animated-text-6DhYKKzt.js.map → animated-text-C92_eFNP.js.map} +1 -1
  5. package/dist/animated-text.cjs +1 -1
  6. package/dist/animated-text.js +1 -1
  7. package/dist/area.cjs +1 -1
  8. package/dist/{area.component-X-1ZwgJL.cjs → area.component-BDkmpYX3.cjs} +2 -2
  9. package/dist/{area.component-X-1ZwgJL.cjs.map → area.component-BDkmpYX3.cjs.map} +1 -1
  10. package/dist/{area.component-DAry93pl.js → area.component-Bh_XioGp.js} +10 -10
  11. package/dist/{area.component-DAry93pl.js.map → area.component-Bh_XioGp.js.map} +1 -1
  12. package/dist/area.js +1 -1
  13. package/dist/autocomplete-DMSMomJC.cjs +57 -0
  14. package/dist/{autocomplete-BIJ9G0y1.cjs.map → autocomplete-DMSMomJC.cjs.map} +1 -1
  15. package/dist/{autocomplete-C_QyhPJw.js → autocomplete-IOFBU8oc.js} +4 -5
  16. package/dist/{autocomplete-C_QyhPJw.js.map → autocomplete-IOFBU8oc.js.map} +1 -1
  17. package/dist/autocomplete.cjs +1 -1
  18. package/dist/autocomplete.js +1 -1
  19. package/dist/busy.cjs +1 -1
  20. package/dist/busy.js +1 -1
  21. package/dist/button.cjs +1 -1
  22. package/dist/button.js +1 -1
  23. package/dist/card.cjs +1 -1
  24. package/dist/card.js +1 -1
  25. package/dist/{checkbox-CTRhgYJB.js → checkbox-4y1DGu22.js} +8 -7
  26. package/dist/{checkbox-CTRhgYJB.js.map → checkbox-4y1DGu22.js.map} +1 -1
  27. package/dist/{checkbox-BkGLOzBe.cjs → checkbox-BfFsbs3h.cjs} +6 -6
  28. package/dist/{checkbox-BkGLOzBe.cjs.map → checkbox-BfFsbs3h.cjs.map} +1 -1
  29. package/dist/checkbox.cjs +1 -1
  30. package/dist/checkbox.js +1 -1
  31. package/dist/{chips-B4X5PxUQ.cjs → chips-C6a7NyzB.cjs} +16 -16
  32. package/dist/{chips-B4X5PxUQ.cjs.map → chips-C6a7NyzB.cjs.map} +1 -1
  33. package/dist/{chips-DjX_Zznh.js → chips-DqXt-vj6.js} +16 -15
  34. package/dist/{chips-DjX_Zznh.js.map → chips-DqXt-vj6.js.map} +1 -1
  35. package/dist/chips.cjs +1 -1
  36. package/dist/chips.js +1 -1
  37. package/dist/components.cjs +1 -1
  38. package/dist/components.js +1 -1
  39. package/dist/content-drawer.cjs +1 -1
  40. package/dist/content-drawer.js +1 -1
  41. package/dist/context-object-CVqtbNDv.js +303 -0
  42. package/dist/context-object-CVqtbNDv.js.map +1 -0
  43. package/dist/context-object-CgZ6F8E9.cjs +2 -0
  44. package/dist/context-object-CgZ6F8E9.cjs.map +1 -0
  45. package/dist/{date-range-CRJ7wYwK.js → date-range-BBY-tMEk.js} +3 -3
  46. package/dist/{date-range-CRJ7wYwK.js.map → date-range-BBY-tMEk.js.map} +1 -1
  47. package/dist/{date-range-CCsKoZUV.cjs → date-range-DC3sAepm.cjs} +2 -2
  48. package/dist/{date-range-CCsKoZUV.cjs.map → date-range-DC3sAepm.cjs.map} +1 -1
  49. package/dist/date-range.cjs +1 -1
  50. package/dist/date-range.js +1 -1
  51. package/dist/{delay-BkSIN-In.js → delay-DcwT5pHi.js} +2 -2
  52. package/dist/{delay-BkSIN-In.js.map → delay-DcwT5pHi.js.map} +1 -1
  53. package/dist/{delay-ttYmIqo7.cjs → delay-UhlOkp1Q.cjs} +2 -2
  54. package/dist/{delay-ttYmIqo7.cjs.map → delay-UhlOkp1Q.cjs.map} +1 -1
  55. package/dist/delay.cjs +1 -1
  56. package/dist/delay.js +1 -1
  57. package/dist/directives.cjs +1 -1
  58. package/dist/directives.js +4 -5
  59. package/dist/directives.js.map +1 -1
  60. package/dist/{divider-C3zQQjqq.js → divider-B-bxtxQ9.js} +3 -3
  61. package/dist/{divider-C3zQQjqq.js.map → divider-B-bxtxQ9.js.map} +1 -1
  62. package/dist/{divider-2AVp1yWB.cjs → divider-yLBrmrYU.cjs} +2 -2
  63. package/dist/{divider-2AVp1yWB.cjs.map → divider-yLBrmrYU.cjs.map} +1 -1
  64. package/dist/divider.cjs +1 -1
  65. package/dist/divider.js +1 -1
  66. package/dist/extra.cjs +1 -1
  67. package/dist/extra.js +1 -1
  68. package/dist/{flex-CfGGWirm.cjs → flex-CG8OOL02.cjs} +2 -2
  69. package/dist/{flex-CfGGWirm.cjs.map → flex-CG8OOL02.cjs.map} +1 -1
  70. package/dist/{flex-CfRUWQWK.js → flex-CofCUs7b.js} +4 -4
  71. package/dist/{flex-CfRUWQWK.js.map → flex-CofCUs7b.js.map} +1 -1
  72. package/dist/flow-B1wMqea2.js +342 -0
  73. package/dist/flow-B1wMqea2.js.map +1 -0
  74. package/dist/flow-CnJl1T1A.cjs +2 -0
  75. package/dist/flow-CnJl1T1A.cjs.map +1 -0
  76. package/dist/form-BqHD2BmW.cjs +14 -0
  77. package/dist/form-BqHD2BmW.cjs.map +1 -0
  78. package/dist/form-CbH5yVTc.js +161 -0
  79. package/dist/form-CbH5yVTc.js.map +1 -0
  80. package/dist/form.cjs +1 -1
  81. package/dist/form.js +1 -1
  82. package/dist/{icon-BLvikygg.js → icon-2u-dF77v.js} +3 -3
  83. package/dist/{icon-BLvikygg.js.map → icon-2u-dF77v.js.map} +1 -1
  84. package/dist/{icon-BfUZ5ZBV.cjs → icon-CqImPgUG.cjs} +2 -2
  85. package/dist/{icon-BfUZ5ZBV.cjs.map → icon-CqImPgUG.cjs.map} +1 -1
  86. package/dist/{icon-button-BefimCfp.cjs → icon-button-CZjaNotL.cjs} +2 -2
  87. package/dist/{icon-button-BefimCfp.cjs.map → icon-button-CZjaNotL.cjs.map} +1 -1
  88. package/dist/{icon-button-OidywZ1U.js → icon-button-xKDMAiJd.js} +3 -3
  89. package/dist/{icon-button-OidywZ1U.js.map → icon-button-xKDMAiJd.js.map} +1 -1
  90. package/dist/icons.cjs +1 -1
  91. package/dist/icons.js +1 -1
  92. package/dist/index.cjs +1 -1
  93. package/dist/index.js +128 -105
  94. package/dist/index.js.map +1 -1
  95. package/dist/input-BDXWcxNw.cjs +111 -0
  96. package/dist/input-BDXWcxNw.cjs.map +1 -0
  97. package/dist/input-fP8EqcLF.js +390 -0
  98. package/dist/input-fP8EqcLF.js.map +1 -0
  99. package/dist/input.cjs +1 -1
  100. package/dist/input.js +1 -1
  101. package/dist/layout.cjs +1 -1
  102. package/dist/layout.js +1 -1
  103. package/dist/{list-C78nnFIZ.cjs → list-C8pDC7As.cjs} +2 -2
  104. package/dist/{list-C78nnFIZ.cjs.map → list-C8pDC7As.cjs.map} +1 -1
  105. package/dist/{list-CQV0ecrY.js → list-O7kfL-NW.js} +2 -2
  106. package/dist/{list-CQV0ecrY.js.map → list-O7kfL-NW.js.map} +1 -1
  107. package/dist/list.cjs +1 -1
  108. package/dist/list.js +1 -1
  109. package/dist/{litElement.mixin-DGx3SrGX.cjs → litElement.mixin-Ct-snNwC.cjs} +2 -2
  110. package/dist/{litElement.mixin-DGx3SrGX.cjs.map → litElement.mixin-Ct-snNwC.cjs.map} +1 -1
  111. package/dist/{litElement.mixin-B1ZP2iG4.js → litElement.mixin-CtugwVVz.js} +2 -2
  112. package/dist/{litElement.mixin-B1ZP2iG4.js.map → litElement.mixin-CtugwVVz.js.map} +1 -1
  113. package/dist/{menu-15yMmtd2.js → menu-DoVBeCHb.js} +3 -3
  114. package/dist/{menu-15yMmtd2.js.map → menu-DoVBeCHb.js.map} +1 -1
  115. package/dist/{menu-DqLKbEXx.cjs → menu-bkGcaSru.cjs} +2 -2
  116. package/dist/{menu-DqLKbEXx.cjs.map → menu-bkGcaSru.cjs.map} +1 -1
  117. package/dist/menu.cjs +1 -1
  118. package/dist/menu.js +1 -1
  119. package/dist/nav-drawer.cjs +1 -1
  120. package/dist/nav-drawer.js +1 -1
  121. package/dist/notification.cjs +1 -1
  122. package/dist/notification.js +1 -1
  123. package/dist/{option-DleJMgj-.js → option-D_RxI1cV.js} +2 -2
  124. package/dist/{option-DleJMgj-.js.map → option-D_RxI1cV.js.map} +1 -1
  125. package/dist/{option-BaOmCXP8.cjs → option-DrizkeI1.cjs} +2 -2
  126. package/dist/{option-BaOmCXP8.cjs.map → option-DrizkeI1.cjs.map} +1 -1
  127. package/dist/option.cjs +1 -1
  128. package/dist/option.js +1 -1
  129. package/dist/{outlet-mNvq9oaA.cjs → outlet-BIwnmuNu.cjs} +2 -2
  130. package/dist/{outlet-mNvq9oaA.cjs.map → outlet-BIwnmuNu.cjs.map} +1 -1
  131. package/dist/{outlet-I1IE2wTK.js → outlet-U_CoKIxQ.js} +2 -2
  132. package/dist/{outlet-I1IE2wTK.js.map → outlet-U_CoKIxQ.js.map} +1 -1
  133. package/dist/{payment-card-form-Cm_-ul4G.cjs → payment-card-form-BPtQt3Xd.cjs} +2 -2
  134. package/dist/{payment-card-form-Cm_-ul4G.cjs.map → payment-card-form-BPtQt3Xd.cjs.map} +1 -1
  135. package/dist/{payment-card-form-DHmtfa_H.js → payment-card-form-CSboFL3Z.js} +3 -3
  136. package/dist/{payment-card-form-DHmtfa_H.js.map → payment-card-form-CSboFL3Z.js.map} +1 -1
  137. package/dist/{radio-group-CSKgiPxL.js → radio-group-BNyzzO-F.js} +2 -2
  138. package/dist/{radio-group-CSKgiPxL.js.map → radio-group-BNyzzO-F.js.map} +1 -1
  139. package/dist/{radio-group-RChAvIUM.cjs → radio-group-DiRAAiCy.cjs} +2 -2
  140. package/dist/{radio-group-RChAvIUM.cjs.map → radio-group-DiRAAiCy.cjs.map} +1 -1
  141. package/dist/radio-group.cjs +1 -1
  142. package/dist/radio-group.js +1 -1
  143. package/dist/{redispatch-event-vOGO-T8W.js → redispatch-event-CF5ekzwZ.js} +33 -39
  144. package/dist/redispatch-event-CF5ekzwZ.js.map +1 -0
  145. package/dist/redispatch-event-roczetCU.cjs +4 -0
  146. package/dist/redispatch-event-roczetCU.cjs.map +1 -0
  147. package/dist/ripple-BumgqsDT.js +78 -0
  148. package/dist/ripple-BumgqsDT.js.map +1 -0
  149. package/dist/ripple-C2BHbhcS.cjs +16 -0
  150. package/dist/ripple-C2BHbhcS.cjs.map +1 -0
  151. package/dist/rxjs-utils.js +4 -4
  152. package/dist/schmancy-steps-container-3Odvvi2u.cjs +64 -0
  153. package/dist/schmancy-steps-container-3Odvvi2u.cjs.map +1 -0
  154. package/dist/schmancy-steps-container-Ke5dskhS.js +147 -0
  155. package/dist/schmancy-steps-container-Ke5dskhS.js.map +1 -0
  156. package/dist/select-BYI_HL-h.js +234 -0
  157. package/dist/select-BYI_HL-h.js.map +1 -0
  158. package/dist/select-DiFknGpF.cjs +57 -0
  159. package/dist/select-DiFknGpF.cjs.map +1 -0
  160. package/dist/select.cjs +1 -1
  161. package/dist/select.js +1 -1
  162. package/dist/selector-hook-B5oIBdcJ.cjs +2 -0
  163. package/dist/selector-hook-B5oIBdcJ.cjs.map +1 -0
  164. package/dist/selector-hook-BdsJkaE2.js +185 -0
  165. package/dist/selector-hook-BdsJkaE2.js.map +1 -0
  166. package/dist/{sheet-DcDDkPRG.js → sheet-9d1u9s1_.js} +12 -12
  167. package/dist/{sheet-DcDDkPRG.js.map → sheet-9d1u9s1_.js.map} +1 -1
  168. package/dist/{sheet-OQg2AgBP.cjs → sheet-BKvr585i.cjs} +2 -2
  169. package/dist/{sheet-OQg2AgBP.cjs.map → sheet-BKvr585i.cjs.map} +1 -1
  170. package/dist/sheet.cjs +1 -1
  171. package/dist/sheet.js +1 -1
  172. package/dist/{slider-njrfDqrk.js → slider-DAawYwTF.js} +3 -3
  173. package/dist/{slider-njrfDqrk.js.map → slider-DAawYwTF.js.map} +1 -1
  174. package/dist/{slider-rumGp8Bz.cjs → slider-bPjwDSDc.cjs} +2 -2
  175. package/dist/{slider-rumGp8Bz.cjs.map → slider-bPjwDSDc.cjs.map} +1 -1
  176. package/dist/slider.cjs +1 -1
  177. package/dist/slider.js +1 -1
  178. package/dist/{spinner-DVEN9TFJ.cjs → spinner-BgkHeWML.cjs} +4 -4
  179. package/dist/{spinner-DVEN9TFJ.cjs.map → spinner-BgkHeWML.cjs.map} +1 -1
  180. package/dist/{spinner-C3JUT7Lx.js → spinner-CTrfi93b.js} +11 -12
  181. package/dist/{spinner-C3JUT7Lx.js.map → spinner-CTrfi93b.js.map} +1 -1
  182. package/dist/steps.cjs +2 -0
  183. package/dist/steps.cjs.map +1 -0
  184. package/dist/steps.js +8 -0
  185. package/dist/steps.js.map +1 -0
  186. package/dist/store.cjs +2 -0
  187. package/dist/store.cjs.map +1 -0
  188. package/dist/store.js +22 -0
  189. package/dist/store.js.map +1 -0
  190. package/dist/{surface-BpQasVOW.js → surface-CjUAkHMv.js} +2 -2
  191. package/dist/{surface-BpQasVOW.js.map → surface-CjUAkHMv.js.map} +1 -1
  192. package/dist/{surface-CZayNjQ8.cjs → surface-QtNAwY0v.cjs} +2 -2
  193. package/dist/{surface-CZayNjQ8.cjs.map → surface-QtNAwY0v.cjs.map} +1 -1
  194. package/dist/surface.cjs +1 -1
  195. package/dist/surface.js +1 -1
  196. package/dist/table-C8Lqlb9G.js +556 -0
  197. package/dist/table-C8Lqlb9G.js.map +1 -0
  198. package/dist/table-lUgP7-kl.cjs +80 -0
  199. package/dist/table-lUgP7-kl.cjs.map +1 -0
  200. package/dist/table.cjs +1 -1
  201. package/dist/table.js +5 -1
  202. package/dist/{tabs-group-BWmuXV1M.cjs → tabs-group-B4ZCjn7j.cjs} +2 -2
  203. package/dist/{tabs-group-BWmuXV1M.cjs.map → tabs-group-B4ZCjn7j.cjs.map} +1 -1
  204. package/dist/{tabs-group-Dsupy-TK.js → tabs-group-BhHCB2nJ.js} +2 -2
  205. package/dist/{tabs-group-Dsupy-TK.js.map → tabs-group-BhHCB2nJ.js.map} +1 -1
  206. package/dist/tabs.cjs +1 -1
  207. package/dist/tabs.js +1 -1
  208. package/dist/tailwind.mixin-Bn3Brhz1.js +43 -0
  209. package/dist/{tailwind.mixin-C2MUeArS.js.map → tailwind.mixin-Bn3Brhz1.js.map} +1 -1
  210. package/dist/tailwind.mixin-DqqGTjD_.cjs +2 -0
  211. package/dist/{tailwind.mixin-UzdLTEsN.cjs.map → tailwind.mixin-DqqGTjD_.cjs.map} +1 -1
  212. package/dist/teleport.cjs +1 -1
  213. package/dist/{teleport.component-Cf9BZUyf.js → teleport.component-BhLw5gCA.js} +52 -52
  214. package/dist/{teleport.component-Cf9BZUyf.js.map → teleport.component-BhLw5gCA.js.map} +1 -1
  215. package/dist/{teleport.component-DElxiimP.cjs → teleport.component-qYuoWGaE.cjs} +19 -19
  216. package/dist/{teleport.component-DElxiimP.cjs.map → teleport.component-qYuoWGaE.cjs.map} +1 -1
  217. package/dist/teleport.js +1 -1
  218. package/dist/textarea-8T5kXo2A.cjs +42 -0
  219. package/dist/{textarea-DtP4CN8S.cjs.map → textarea-8T5kXo2A.cjs.map} +1 -1
  220. package/dist/{textarea-DZhAzd2-.js → textarea-CqkmSvJg.js} +8 -9
  221. package/dist/{textarea-DZhAzd2-.js.map → textarea-CqkmSvJg.js.map} +1 -1
  222. package/dist/textarea.cjs +1 -1
  223. package/dist/textarea.js +1 -1
  224. package/dist/{theme-button-XUBpRyVd.cjs → theme-button-CZFLICY-.cjs} +2 -2
  225. package/dist/{theme-button-XUBpRyVd.cjs.map → theme-button-CZFLICY-.cjs.map} +1 -1
  226. package/dist/{theme-button-B7v53G35.js → theme-button-CyebufWg.js} +2 -2
  227. package/dist/{theme-button-B7v53G35.js.map → theme-button-CyebufWg.js.map} +1 -1
  228. package/dist/theme-button.cjs +1 -1
  229. package/dist/theme-button.js +1 -1
  230. package/dist/theme.cjs +1 -1
  231. package/dist/{theme.component-Df85q2pE.cjs → theme.component-DTaJ-jCs.cjs} +2 -2
  232. package/dist/{theme.component-Df85q2pE.cjs.map → theme.component-DTaJ-jCs.cjs.map} +1 -1
  233. package/dist/{theme.component-4tKB3U5D.js → theme.component-HyW-lfw_.js} +2 -2
  234. package/dist/{theme.component-4tKB3U5D.js.map → theme.component-HyW-lfw_.js.map} +1 -1
  235. package/dist/theme.js +1 -1
  236. package/dist/{timezone-FYjFkh4S.cjs → timezone-CgtDcgym.cjs} +2 -2
  237. package/dist/{timezone-FYjFkh4S.cjs.map → timezone-CgtDcgym.cjs.map} +1 -1
  238. package/dist/{timezone-C9zQrHBV.js → timezone-Cn0_OvVY.js} +3 -3
  239. package/dist/{timezone-C9zQrHBV.js.map → timezone-Cn0_OvVY.js.map} +1 -1
  240. package/dist/{tree-BEsQyzsP.js → tree-B0bZOfLC.js} +2 -2
  241. package/dist/{tree-BEsQyzsP.js.map → tree-B0bZOfLC.js.map} +1 -1
  242. package/dist/{tree-k_BipeY0.cjs → tree-Bg8L88Pd.cjs} +2 -2
  243. package/dist/{tree-k_BipeY0.cjs.map → tree-Bg8L88Pd.cjs.map} +1 -1
  244. package/dist/tree.cjs +1 -1
  245. package/dist/tree.js +1 -1
  246. package/dist/tslib.es6-DgOcxv4s.cjs +2 -0
  247. package/dist/tslib.es6-DgOcxv4s.cjs.map +1 -0
  248. package/dist/tslib.es6-ujVQHAQ4.js +10 -0
  249. package/dist/tslib.es6-ujVQHAQ4.js.map +1 -0
  250. package/dist/{typewriter-B3B8JBRl.cjs → typewriter-C-U4rB_m.cjs} +2 -2
  251. package/dist/{typewriter-B3B8JBRl.cjs.map → typewriter-C-U4rB_m.cjs.map} +1 -1
  252. package/dist/{typewriter-CjgsbmTc.js → typewriter-FTQ_LV70.js} +4 -4
  253. package/dist/{typewriter-CjgsbmTc.js.map → typewriter-FTQ_LV70.js.map} +1 -1
  254. package/dist/typewriter.cjs +1 -1
  255. package/dist/typewriter.js +1 -1
  256. package/dist/{typography-BzTRpIGt.js → typography-CdFf2sTC.js} +2 -2
  257. package/dist/{typography-BzTRpIGt.js.map → typography-CdFf2sTC.js.map} +1 -1
  258. package/dist/{typography-Cs7PQACq.cjs → typography-DvI9Wos_.cjs} +2 -2
  259. package/dist/{typography-Cs7PQACq.cjs.map → typography-DvI9Wos_.cjs.map} +1 -1
  260. package/dist/typography.cjs +1 -1
  261. package/dist/typography.js +1 -1
  262. package/package.json +1 -1
  263. package/types/src/form/form-v2.d.ts +72 -0
  264. package/types/src/form/index.d.ts +1 -0
  265. package/types/src/index.d.ts +2 -1
  266. package/types/src/input/index.d.ts +1 -0
  267. package/types/src/input/input-v2.d.ts +250 -0
  268. package/types/src/select/select.d.ts +10 -1
  269. package/types/src/steps/index.d.ts +3 -0
  270. package/types/src/steps/schmancy-step.d.ts +52 -0
  271. package/types/src/steps/schmancy-steps-container.d.ts +17 -0
  272. package/types/src/steps/steps.context.d.ts +12 -0
  273. package/types/src/store/action-creator.d.ts +8 -0
  274. package/types/src/store/clear.d.ts +1 -0
  275. package/types/src/store/context-collection.d.ts +74 -0
  276. package/types/src/store/context-create.d.ts +8 -0
  277. package/types/src/store/context-object.d.ts +69 -0
  278. package/types/src/store/filter-directive.d.ts +32 -0
  279. package/types/src/store/index.d.ts +8 -0
  280. package/types/src/store/selector-hook.d.ts +15 -0
  281. package/types/src/store/selectors.d.ts +50 -0
  282. package/types/src/store/storage-manager.d.ts +56 -0
  283. package/types/src/store/types.d.ts +84 -0
  284. package/types/src/table/index.d.ts +1 -0
  285. package/types/src/table/row.d.ts +19 -0
  286. package/types/src/table/table.d.ts +27 -4
  287. package/dist/autocomplete-BIJ9G0y1.cjs +0 -57
  288. package/dist/color-D8r6dpWm.cjs +0 -2
  289. package/dist/color-D8r6dpWm.cjs.map +0 -1
  290. package/dist/color-DrgmL7QT.js +0 -19
  291. package/dist/color-DrgmL7QT.js.map +0 -1
  292. package/dist/form-BTg8x5QO.js +0 -73
  293. package/dist/form-BTg8x5QO.js.map +0 -1
  294. package/dist/form-DPRTjp4Q.cjs +0 -8
  295. package/dist/form-DPRTjp4Q.cjs.map +0 -1
  296. package/dist/input-BNIa-xYu.js +0 -136
  297. package/dist/input-BNIa-xYu.js.map +0 -1
  298. package/dist/input-CqYkuOF4.cjs +0 -51
  299. package/dist/input-CqYkuOF4.cjs.map +0 -1
  300. package/dist/input-Dq3dT_7p.cjs +0 -98
  301. package/dist/input-Dq3dT_7p.cjs.map +0 -1
  302. package/dist/input-igN7Vis2.js +0 -205
  303. package/dist/input-igN7Vis2.js.map +0 -1
  304. package/dist/redispatch-event-vOGO-T8W.js.map +0 -1
  305. package/dist/redispatch-event-yBlefmeU.cjs +0 -4
  306. package/dist/redispatch-event-yBlefmeU.cjs.map +0 -1
  307. package/dist/ripple-3indJ14o.js +0 -64
  308. package/dist/ripple-3indJ14o.js.map +0 -1
  309. package/dist/ripple-B_wT0zgD.cjs +0 -16
  310. package/dist/ripple-B_wT0zgD.cjs.map +0 -1
  311. package/dist/select-CHXdCR-t.js +0 -206
  312. package/dist/select-CHXdCR-t.js.map +0 -1
  313. package/dist/select-Gbo-xjwq.cjs +0 -56
  314. package/dist/select-Gbo-xjwq.cjs.map +0 -1
  315. package/dist/table-BzJFv5qf.cjs +0 -6
  316. package/dist/table-BzJFv5qf.cjs.map +0 -1
  317. package/dist/table-CWRqwAtQ.js +0 -21
  318. package/dist/table-CWRqwAtQ.js.map +0 -1
  319. package/dist/tailwind.mixin-C2MUeArS.js +0 -43
  320. package/dist/tailwind.mixin-UzdLTEsN.cjs +0 -2
  321. package/dist/textarea-DtP4CN8S.cjs +0 -42
  322. package/dist/v2.cjs +0 -2
  323. package/dist/v2.cjs.map +0 -1
  324. package/dist/v2.js +0 -5
  325. package/dist/v2.js.map +0 -1
@@ -0,0 +1,185 @@
1
+ import { d as w, S as j } from "./context-object-CVqtbNDv.js";
2
+ import { property as C } from "lit/decorators.js";
3
+ import { combineLatest as L, Subject as x } from "rxjs";
4
+ import { map as A, distinctUntilChanged as S, shareReplay as O, takeUntil as v } from "rxjs/operators";
5
+ function z(i, e, t) {
6
+ if (function(s) {
7
+ if (s == null || typeof s != "object") return !1;
8
+ const p = Object.getPrototypeOf(s);
9
+ return p !== Object.prototype && p !== null && typeof s[Symbol.iterator] == "function";
10
+ }(i)) {
11
+ const s = w.getInstance(e, t, i);
12
+ return s.value.size || s.$.next(i), s;
13
+ }
14
+ if (typeof i == "object" && i !== null) {
15
+ if (e === "indexeddb") throw new Error("IndexedDB storage is not supported for plain objects.");
16
+ const s = j.getInstance(e, t, i);
17
+ return typeof (n = s.value) == "object" && n !== null && Object.keys(n).length === 0 && s.$.next(i), s;
18
+ }
19
+ throw new Error("Initial data must be an object or a Map.");
20
+ var n;
21
+ }
22
+ const J = (i, e) => e.split(".").reduce((t, n) => t == null ? void 0 : t[n], i), k = (i) => {
23
+ const e = [];
24
+ for (let t = 0; t < i.length - 1; t++) e.push(i.substring(t, t + 2));
25
+ return e;
26
+ }, N = (i, e) => {
27
+ const t = i.toLowerCase().trim(), n = e.toLowerCase().trim(), s = t.includes(n) ? 1 : 0, p = ((a, u) => {
28
+ let o = 0, r = 0;
29
+ for (; o < a.length && r < u.length; ) a[o] === u[r] && o++, r++;
30
+ return o === a.length;
31
+ })(n, t) ? 0.8 : 0, g = ((a, u) => {
32
+ const o = (h) => h.split("").reduce((b, y) => (b[y] = (b[y] || 0) + 1, b), {}), r = o(a), l = o(u);
33
+ return Object.keys(r).every((h) => (l[h] || 0) >= r[h]);
34
+ })(n, t) ? 0.7 : 0, d = ((a, u) => {
35
+ if (a.length < 2 || u.length < 2) return 0;
36
+ const o = k(a), r = k(u);
37
+ let l = 0;
38
+ const h = new Array(r.length).fill(!1);
39
+ for (const b of o) for (let y = 0; y < r.length; y++) if (!h[y] && r[y] === b) {
40
+ l++, h[y] = !0;
41
+ break;
42
+ }
43
+ return 2 * l / (o.length + r.length);
44
+ })(t, n), c = Math.max(t.length, n.length), f = c ? 1 - ((a, u) => {
45
+ const o = [];
46
+ for (let r = 0; r <= u.length; r++) o[r] = [r];
47
+ for (let r = 0; r <= a.length; r++) o[0][r] = r;
48
+ for (let r = 1; r <= u.length; r++) for (let l = 1; l <= a.length; l++) u.charAt(r - 1) === a.charAt(l - 1) ? o[r][l] = o[r - 1][l - 1] : o[r][l] = Math.min(o[r - 1][l] + 1, o[r][l - 1] + 1, o[r - 1][l - 1] + 1);
49
+ return o[u.length][a.length];
50
+ })(t, n) / c : 1;
51
+ return Math.max(s, p, g, d, f);
52
+ }, M = (i, e, t) => {
53
+ switch (i) {
54
+ case "==":
55
+ return e === t;
56
+ case "!=":
57
+ return e !== t;
58
+ case ">":
59
+ return e > t;
60
+ case "<":
61
+ return e < t;
62
+ case ">=":
63
+ return e >= t;
64
+ case "<=":
65
+ return e <= t;
66
+ case "includes":
67
+ return typeof e == "string" ? e.toLowerCase().includes(String(t).toLowerCase()) : !!Array.isArray(e) && e.includes(t);
68
+ case "notIncludes":
69
+ return typeof e == "string" ? !e.toLowerCase().includes(String(t).toLowerCase()) : !!Array.isArray(e) && !e.includes(t);
70
+ case "startsWith":
71
+ return typeof e == "string" && e.startsWith(String(t));
72
+ case "endsWith":
73
+ return typeof e == "string" && e.endsWith(String(t));
74
+ case "in":
75
+ return !!Array.isArray(t) && t.includes(e);
76
+ case "notIn":
77
+ return !!Array.isArray(t) && !t.includes(e);
78
+ default:
79
+ return !1;
80
+ }
81
+ }, I = (i, e = []) => {
82
+ const t = Array.from(i.values()).map((n) => {
83
+ let s = 0, p = 0, g = !0;
84
+ for (const d of e) {
85
+ let c, f, a, u = !1;
86
+ if (Array.isArray(d) ? ([c, f, a, u = !1] = d, u = !!u) : (c = d.key, f = d.operator, a = d.value, u = d.strict || !1), !u && (a === "" || a == null || Array.isArray(a) && a.length === 0)) continue;
87
+ const o = J(n, c);
88
+ if (u) {
89
+ if (o !== a) {
90
+ g = !1;
91
+ break;
92
+ }
93
+ s += 1, p++;
94
+ } else if (f === "any") {
95
+ if (typeof o != "string" || typeof a != "string") {
96
+ g = !1;
97
+ break;
98
+ }
99
+ const r = N(o, a);
100
+ if (r < 0.3) {
101
+ g = !1;
102
+ break;
103
+ }
104
+ s += r, p++;
105
+ } else {
106
+ if (!M(f, o, a)) {
107
+ g = !1;
108
+ break;
109
+ }
110
+ s += 1, p++;
111
+ }
112
+ }
113
+ return g ? { item: n, score: p > 0 ? s / p : 1 } : null;
114
+ }).filter((n) => n !== null);
115
+ return t.sort((n, s) => s.score - n.score), t.map((n) => n.item);
116
+ }, B = I;
117
+ function E(i, e) {
118
+ return i.$.pipe(A(e), S((t, n) => JSON.stringify(t) === JSON.stringify(n)), O(1));
119
+ }
120
+ function m(i, e) {
121
+ return i.$.pipe(A(e), S((t, n) => t instanceof Map && n instanceof Map ? JSON.stringify(Array.from(t.entries())) === JSON.stringify(Array.from(n.entries())) : JSON.stringify(t) === JSON.stringify(n)), O(1));
122
+ }
123
+ function D(i, e) {
124
+ return m(i, (t) => {
125
+ const n = [];
126
+ return t.forEach((s, p) => {
127
+ e(s, p) && n.push(s);
128
+ }), n;
129
+ });
130
+ }
131
+ function P(i, e) {
132
+ return m(i, (t) => t.get(e));
133
+ }
134
+ function R(i, e) {
135
+ return m(i, (t) => {
136
+ if (!e) return t.size;
137
+ let n = 0;
138
+ return t.forEach((s, p) => {
139
+ e(s, p) && n++;
140
+ }), n;
141
+ });
142
+ }
143
+ function F(i, e) {
144
+ return L(i).pipe(A((t) => e(...t)), S((t, n) => JSON.stringify(t) === JSON.stringify(n)), O(1));
145
+ }
146
+ function G(i, e = (n) => n, t = {}) {
147
+ return function(n, s, p) {
148
+ C({ attribute: !1, type: Object })(n, s);
149
+ const g = n.connectedCallback, d = n.disconnectedCallback;
150
+ n.connectedCallback = function() {
151
+ var u;
152
+ const c = this;
153
+ c.t || (c.t = {}), c.t[s] || (c.t[s] = { subscription: null, initialLoad: !1 });
154
+ const f = c.t[s];
155
+ !((u = c.disconnecting) != null && u.closed) && c.disconnecting || (c.disconnecting = new x());
156
+ const a = function(o) {
157
+ return "set" in o && typeof o.set == "function" && o.value instanceof Map;
158
+ }(i) ? m(i, e) : E(i, e);
159
+ t.required || f.initialLoad || (g == null || g.call(c), f.initialLoad = !0), f.subscription || (f.subscription = a.pipe(v(c.disconnecting)).subscribe({ next: (o) => {
160
+ var l;
161
+ const r = structuredClone(o);
162
+ c[s] = r, (l = c.requestUpdate) == null || l.call(c), t.required && !f.initialLoad && r && (g == null || g.call(c), f.initialLoad = !0);
163
+ }, error: (o) => {
164
+ } }));
165
+ }, n.disconnectedCallback = function() {
166
+ var f;
167
+ d == null || d.call(this);
168
+ const c = (f = this.t) == null ? void 0 : f[s];
169
+ c != null && c.subscription && (c.subscription.unsubscribe(), c.subscription = null), this.disconnecting && (this.disconnecting.next(), this.disconnecting.complete());
170
+ };
171
+ };
172
+ }
173
+ export {
174
+ B as a,
175
+ E as b,
176
+ z as c,
177
+ m as d,
178
+ D as e,
179
+ I as f,
180
+ P as g,
181
+ R as h,
182
+ F as i,
183
+ G as s
184
+ };
185
+ //# sourceMappingURL=selector-hook-BdsJkaE2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selector-hook-BdsJkaE2.js","sources":["../src/store/context-create.ts","../src/store/filter-directive.ts","../src/store/selectors.ts","../src/store/selector-hook.ts"],"sourcesContent":["import { ICollectionStore, IStore, StorageType } from './types'\nimport { SchmancyStoreObject } from './context-object'\nimport SchmancyCollectionStore from './context-collection'\n\n/**\n * Checks if an object is empty\n */\nfunction isEmptyObject(obj: object): boolean {\n\tif (typeof obj !== 'object' || obj === null) {\n\t\treturn false\n\t}\n\treturn Object.keys(obj).length === 0\n}\n\n/**\n * Returns true if obj is an iterable collection\n */\nfunction isCollection(obj: any): obj is Iterable<any> {\n\t// Must be non-null and of type 'object'\n\tif (obj == null || typeof obj !== 'object') {\n\t\treturn false\n\t}\n\n\t// Exclude plain objects.\n\tconst proto = Object.getPrototypeOf(obj)\n\tif (proto === Object.prototype || proto === null) {\n\t\treturn false\n\t}\n\n\t// Check for Symbol.iterator method\n\treturn typeof obj[Symbol.iterator] === 'function'\n}\n\n/**\n * Creates a context for managing state with better type safety\n */\nexport function createContext<T extends Record<string, any>>(\n\tinitialData: T,\n\tstorage: StorageType,\n\tkey: string,\n): IStore<T> & SchmancyStoreObject<T>\n\nexport function createContext<V>(\n\tinitialData: Map<string, V>,\n\tstorage: StorageType,\n\tkey: string,\n): ICollectionStore<V> & SchmancyCollectionStore<V>\n\nexport function createContext<T extends Record<string, any> | Map<string, any>>(\n\tinitialData: T | Map<string, any>,\n\tstorage: StorageType,\n\tkey: string,\n): (IStore<T> & SchmancyStoreObject<T>) | (ICollectionStore<any> & SchmancyCollectionStore<any>) {\n\tif (isCollection(initialData)) {\n\t\t// Create a collection store\n\t\tconst store = SchmancyCollectionStore.getInstance(storage, key, initialData as Map<string, any>)\n\n\t\t// Initialize with provided data if store is empty\n\t\tif (!store.value.size) {\n\t\t\tstore.$.next(initialData as Map<string, any>)\n\t\t}\n\t\treturn store as ICollectionStore<any> & SchmancyCollectionStore<any>\n\t} else if (typeof initialData === 'object' && initialData !== null) {\n\t\t// Validate storage type for object stores\n\t\tif (storage === 'indexeddb') {\n\t\t\tthrow new Error('IndexedDB storage is not supported for plain objects.')\n\t\t}\n\n\t\t// Create an object store\n\t\tconst store = SchmancyStoreObject.getInstance<T>(storage, key, initialData as T)\n\n\t\t// Initialize with provided data if store is empty\n\t\tif (isEmptyObject(store.value)) {\n\t\t\tstore.$.next(initialData as T)\n\t\t}\n\t\treturn store as IStore<T> & SchmancyStoreObject<T>\n\t} else {\n\t\tthrow new Error('Initial data must be an object or a Map.')\n\t}\n}\n","/** Supported comparison operators. */\ntype ComparisonOperator =\n\t| '=='\n\t| '!='\n\t| '>'\n\t| '<'\n\t| '>='\n\t| '<='\n\t| 'includes'\n\t| 'notIncludes'\n\t| 'startsWith'\n\t| 'endsWith'\n\t| 'in'\n\t| 'notIn'\n\t| 'any' // fuzzy search operator\n\n/**\n * Query condition which can be either a tuple:\n * [field, operator, expected]\n * or an object:\n * { key, operator, value }\n */\nexport type QueryCondition =\n\t| [field: string, op: ComparisonOperator, expected: unknown, strict?: boolean]\n\t| { key: string; operator: ComparisonOperator; value: unknown; strict?: boolean }\n\n/**\n * Get a nested value from an object using a dot-separated path.\n * Checks explicitly for null/undefined so falsy values like 0 or false are preserved.\n */\nconst getFieldValue = (item: Record<string, any>, path: string): any =>\n\tpath.split('.').reduce((obj, key) => (obj == null ? undefined : obj[key]), item)\n\n/**\n * Compute the Levenshtein distance between two strings.\n */\nconst levenshtein = (a: string, b: string): number => {\n\tconst matrix: number[][] = []\n\n\t// initialize the first column\n\tfor (let i = 0; i <= b.length; i++) {\n\t\tmatrix[i] = [i]\n\t}\n\t// initialize the first row\n\tfor (let j = 0; j <= a.length; j++) {\n\t\tmatrix[0][j] = j\n\t}\n\n\tfor (let i = 1; i <= b.length; i++) {\n\t\tfor (let j = 1; j <= a.length; j++) {\n\t\t\tif (b.charAt(i - 1) === a.charAt(j - 1)) {\n\t\t\t\tmatrix[i][j] = matrix[i - 1][j - 1]\n\t\t\t} else {\n\t\t\t\tmatrix[i][j] = Math.min(\n\t\t\t\t\tmatrix[i - 1][j] + 1, // deletion\n\t\t\t\t\tmatrix[i][j - 1] + 1, // insertion\n\t\t\t\t\tmatrix[i - 1][j - 1] + 1, // substitution\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\treturn matrix[b.length][a.length]\n}\n\n/**\n * Check if string `sub` is a subsequence of string `str`.\n * All characters in `sub` must appear in order in `str` (they need not be contiguous).\n */\nconst isSubsequence = (sub: string, str: string): boolean => {\n\tlet i = 0,\n\t\tj = 0\n\twhile (i < sub.length && j < str.length) {\n\t\tif (sub[i] === str[j]) i++\n\t\tj++\n\t}\n\treturn i === sub.length\n}\n\n/**\n * Check if every character (with frequency) in the query exists in the target.\n * For example, \"aovc\" matches \"avocados\".\n */\nconst anagramMatch = (query: string, target: string): boolean => {\n\tconst countChars = (s: string): Record<string, number> =>\n\t\ts.split('').reduce((acc, char) => {\n\t\t\tacc[char] = (acc[char] || 0) + 1\n\t\t\treturn acc\n\t\t}, {} as Record<string, number>)\n\n\tconst queryCount = countChars(query)\n\tconst targetCount = countChars(target)\n\treturn Object.keys(queryCount).every(char => (targetCount[char] || 0) >= queryCount[char])\n}\n\n/**\n * Generate bigrams for a string.\n */\nconst getBigrams = (s: string): string[] => {\n\tconst bigrams = []\n\tfor (let i = 0; i < s.length - 1; i++) {\n\t\tbigrams.push(s.substring(i, i + 2))\n\t}\n\treturn bigrams\n}\n\n/**\n * Compute Dice's coefficient for two strings based on bigrams.\n * Returns a value between 0 (no similarity) and 1 (perfect match).\n */\nconst diceCoefficient = (s1: string, s2: string): number => {\n\tif (s1.length < 2 || s2.length < 2) return 0\n\tconst bigrams1 = getBigrams(s1)\n\tconst bigrams2 = getBigrams(s2)\n\tlet intersection = 0\n\tconst used = new Array(bigrams2.length).fill(false)\n\tfor (const bigram of bigrams1) {\n\t\tfor (let i = 0; i < bigrams2.length; i++) {\n\t\t\tif (!used[i] && bigrams2[i] === bigram) {\n\t\t\t\tintersection++\n\t\t\t\tused[i] = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\treturn (2 * intersection) / (bigrams1.length + bigrams2.length)\n}\n\n/**\n * Compute a fuzzy similarity score between two strings.\n * The score is computed by taking the maximum of several methods:\n * - Direct substring match (score 1)\n * - Subsequence check (score 0.8)\n * - Anagram subset match (score 0.7)\n * - Dice coefficient\n * - Normalized Levenshtein similarity\n */\nconst computeFuzzyScore = (actual: string, expected: string): number => {\n\tconst a = actual.toLowerCase().trim()\n\tconst b = expected.toLowerCase().trim()\n\n\tconst substringScore = a.includes(b) ? 1 : 0\n\tconst subsequenceScore = isSubsequence(b, a) ? 0.8 : 0\n\tconst anagramScore = anagramMatch(b, a) ? 0.7 : 0\n\tconst diceScore = diceCoefficient(a, b)\n\tconst maxLen = Math.max(a.length, b.length)\n\tconst levenshteinScore = maxLen ? 1 - levenshtein(a, b) / maxLen : 1\n\n\treturn Math.max(substringScore, subsequenceScore, anagramScore, diceScore, levenshteinScore)\n}\n\n/**\n * Compare two values based on a simple operator.\n * For non-fuzzy operators, this returns a boolean.\n */\nconst compareValues = (op: ComparisonOperator, actual: any, expected: any): boolean => {\n\tswitch (op) {\n\t\tcase '==':\n\t\t\treturn actual === expected\n\t\tcase '!=':\n\t\t\treturn actual !== expected\n\t\tcase '>':\n\t\t\treturn actual > expected\n\t\tcase '<':\n\t\t\treturn actual < expected\n\t\tcase '>=':\n\t\t\treturn actual >= expected\n\t\tcase '<=':\n\t\t\treturn actual <= expected\n\t\tcase 'includes': {\n\t\t\tif (typeof actual === 'string') return actual.toLowerCase().includes(String(expected).toLowerCase())\n\t\t\telse if (Array.isArray(actual)) return actual.includes(expected)\n\t\t\treturn false\n\t\t}\n\t\tcase 'notIncludes': {\n\t\t\tif (typeof actual === 'string') return !actual.toLowerCase().includes(String(expected).toLowerCase())\n\t\t\telse if (Array.isArray(actual)) return !actual.includes(expected)\n\t\t\treturn false\n\t\t}\n\t\tcase 'startsWith': {\n\t\t\tif (typeof actual === 'string') return actual.startsWith(String(expected))\n\t\t\treturn false\n\t\t}\n\t\tcase 'endsWith': {\n\t\t\tif (typeof actual === 'string') return actual.endsWith(String(expected))\n\t\t\treturn false\n\t\t}\n\t\tcase 'in': {\n\t\t\tif (Array.isArray(expected)) return expected.includes(actual)\n\t\t\treturn false\n\t\t}\n\t\tcase 'notIn': {\n\t\t\tif (Array.isArray(expected)) return !expected.includes(actual)\n\t\t\treturn false\n\t\t}\n\t\tdefault: {\n\t\t\tconsole.warn(`Operator \"${op}\" is not supported in strict comparison.`)\n\t\t\treturn false\n\t\t}\n\t}\n}\n\n/**\n * Filter a Map of items given an array of query conditions.\n * For each query condition:\n * - If the expected value is empty/null/undefined, it is treated as a match.\n * - For non-fuzzy operators, the condition must strictly match.\n * - For the \"any\" operator, a fuzzy similarity score is computed.\n * Items with a fuzzy score below a given threshold (e.g., 0.3) are excluded.\n *\n * The overall item score is the average of the scores from all conditions.\n * The results are sorted in descending order of relevance.\n *\n * @param items - A Map containing items to filter.\n * @param queries - An array of query conditions to apply.\n * @returns An array of items that match all query conditions, sorted by relevance.\n */\nexport const filterMapItems = <T extends Record<string, any>>(\n\titems: Map<string, T>,\n\tqueries: QueryCondition[] = [],\n): T[] => {\n\t// Fuzzy threshold (adjust as needed)\n\tconst fuzzyThreshold = 0.3\n\n\t// Score and filter each item.\n\tconst scoredItems = Array.from(items.values())\n\t\t.map(item => {\n\t\t\tlet totalScore = 0\n\t\t\tlet count = 0\n\t\t\t// If any query fails, mark the item as invalid.\n\t\t\tlet valid = true\n\n\t\t\tfor (const query of queries) {\n\t\t\t\tlet field: string,\n\t\t\t\t\top: ComparisonOperator,\n\t\t\t\t\texpected: unknown,\n\t\t\t\t\tstrict = false\n\t\t\t\tif (Array.isArray(query)) {\n\t\t\t\t\t// Extract optional strict flag from tuple if provided.\n\t\t\t\t\t;[field, op, expected, strict = false] = query\n\t\t\t\t\tstrict = !!strict // default to false if undefined\n\t\t\t\t} else {\n\t\t\t\t\tfield = query.key\n\t\t\t\t\top = query.operator\n\t\t\t\t\texpected = query.value\n\t\t\t\t\tstrict = query.strict || false\n\t\t\t\t}\n\n\t\t\t\t// If the expected value is empty/null/undefined, or an empty array, skip filtering.\n\t\t\t\t// If the expected value is empty/null/undefined, or an empty array, and strict is false, skip filtering\n\t\t\t\tif (!strict && (expected === '' || expected == null || (Array.isArray(expected) && expected.length === 0))) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tconst actual = getFieldValue(item, field)\n\n\t\t\t\t// If strict mode is enabled, enforce exact equality.\n\t\t\t\tif (strict) {\n\t\t\t\t\tif (actual !== expected) {\n\t\t\t\t\t\tvalid = false\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\ttotalScore += 1 // exact match yields a perfect score\n\t\t\t\t\tcount++\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tif (op === 'any') {\n\t\t\t\t\t// Fuzzy search requires both values to be strings.\n\t\t\t\t\tif (typeof actual !== 'string' || typeof expected !== 'string') {\n\t\t\t\t\t\tvalid = false\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tconst score = computeFuzzyScore(actual, expected)\n\t\t\t\t\tif (score < fuzzyThreshold) {\n\t\t\t\t\t\tvalid = false\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\ttotalScore += score\n\t\t\t\t\tcount++\n\t\t\t\t} else {\n\t\t\t\t\t// For non-fuzzy operators, if the condition fails, exclude the item.\n\t\t\t\t\tif (!compareValues(op, actual, expected)) {\n\t\t\t\t\t\tvalid = false\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\ttotalScore += 1 // strict match yields a perfect score.\n\t\t\t\t\tcount++\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!valid) return null\n\n\t\t\t// Use the average score if at least one condition contributed.\n\t\t\tconst overallScore = count > 0 ? totalScore / count : 1\n\t\t\treturn { item, score: overallScore }\n\t\t})\n\t\t.filter(x => x !== null) as { item: T; score: number }[]\n\n\t// Sort by descending overall score.\n\tscoredItems.sort((a, b) => b.score - a.score)\n\treturn scoredItems.map(x => x.item)\n}\n\n// /**\n// * A typed directive function interface.\n// * Ensures that using the directive returns a filtered (and ranked) array of items.\n// */\n// export type FilterMapDirectiveFn = <T extends Record<string, any>>(\n// \titems: Map<string, T>,\n// \tqueries?: QueryCondition[],\n// ) => T[]\n\n// /**\n// * Lit directive to filter a Map based on an array of query conditions.\n// *\n// * Usage in your Lit template:\n// *\n// * ```ts\n// * html`\n// * <div .items=${filterMap(this.items, [\n// * { key: 'category', operator: '==', value: itemsFilterContext.value.category },\n// * ['name', 'any', 'avo'], // will match \"avocados\" even if typed as \"avo\" or \"aovc\"\n// * ])}></div>\n// * `\n// * ```\n// */\n// class FilterMapDirective extends Directive {\n// \tconstructor(partInfo: PartInfo) {\n// \t\tsuper(partInfo)\n// \t}\n\n// \trender<T extends Record<string, any>>(items: Map<string, T>, queries: QueryCondition[] = []): T[] {\n// \t\treturn filterMapItems(items, queries) as T[]\n// \t}\n// }\n\n// Cast the directive to our typed directive function interface.\nexport const filterMap = filterMapItems\n","// src/store/selectors.ts\nimport { Observable, combineLatest } from 'rxjs'\nimport { map, distinctUntilChanged, shareReplay } from 'rxjs/operators'\nimport { IStore, ICollectionStore } from './types'\n\n/**\n * Creates a selector that derives a value from store state\n *\n * @param store The store to observe\n * @param selectorFn Function that transforms the state\n * @returns An observable of the selected state that only emits when the derived value changes\n */\nexport function createSelector<T, R>(store: IStore<T>, selectorFn: (state: T) => R): Observable<R> {\n\treturn store.$.pipe(\n\t\tmap(selectorFn),\n\t\tdistinctUntilChanged(\n\t\t\t(a, b) =>\n\t\t\t\t// Compare the two objects deep to see if they are equal\n\t\t\t\tJSON.stringify(a) === JSON.stringify(b),\n\t\t),\n\t\tshareReplay(1),\n\t)\n}\n\n/**\n * Creates a selector for collection stores that derives a value from the collection\n *\n * @param store The collection store to observe\n * @param selectorFn Function that transforms the collection\n * @returns An observable of the selected state that only emits when the derived value changes\n */\nexport function createCollectionSelector<T, R>(\n\tstore: ICollectionStore<T>,\n\tselectorFn: (state: Map<string, T>) => R,\n): Observable<R> {\n\treturn store.$.pipe(\n\t\tmap(selectorFn),\n\t\tdistinctUntilChanged((a, b) => {\n\t\t\tif (a instanceof Map && b instanceof Map) {\n\t\t\t\treturn JSON.stringify(Array.from(a.entries())) === JSON.stringify(Array.from(b.entries()))\n\t\t\t}\n\t\t\treturn JSON.stringify(a) === JSON.stringify(b)\n\t\t}),\n\t\tshareReplay(1),\n\t)\n}\n\n/**\n * Creates a selector that filters items from a collection\n *\n * @param store The collection store\n * @param filterFn Function that returns true for items to include\n * @returns An observable of filtered items as an array\n */\nexport function createFilterSelector<T>(\n\tstore: ICollectionStore<T>,\n\tfilterFn: (item: T, key: string) => boolean,\n): Observable<T[]> {\n\treturn createCollectionSelector(store, collection => {\n\t\tconst result: T[] = []\n\t\tcollection.forEach((item, key) => {\n\t\t\tif (filterFn(item, key)) {\n\t\t\t\tresult.push(item)\n\t\t\t}\n\t\t})\n\t\treturn result\n\t})\n}\n\n/**\n * Creates a selector that retrieves a single item from a collection\n *\n * @param store The collection store\n * @param itemKey The key of the item to select\n * @returns An observable of the selected item that emits when the item changes\n */\nexport function createItemSelector<T>(store: ICollectionStore<T>, itemKey: string): Observable<T | undefined> {\n\treturn createCollectionSelector(store, collection => collection.get(itemKey))\n}\n\n/**\n * Creates a selector that counts items in a collection, optionally filtered\n *\n * @param store The collection store\n * @param filterFn Optional function to filter which items to count\n * @returns An observable of the count\n */\nexport function createCountSelector<T>(\n\tstore: ICollectionStore<T>,\n\tfilterFn?: (item: T, key: string) => boolean,\n): Observable<number> {\n\treturn createCollectionSelector(store, collection => {\n\t\tif (!filterFn) return collection.size\n\n\t\tlet count = 0\n\t\tcollection.forEach((item, key) => {\n\t\t\tif (filterFn(item, key)) count++\n\t\t})\n\t\treturn count\n\t})\n}\n\n/**\n * Creates a compound selector that depends on multiple other selectors\n *\n * @param selectors Array of source selectors\n * @param combinerFn Function that combines all selector results\n * @returns An observable of the combined result\n */\nexport function createCompoundSelector<R, T extends any[]>(\n\tselectors: Observable<any>[],\n\tcombinerFn: (...values: T) => R,\n): Observable<R> {\n\treturn combineLatest(selectors).pipe(\n\t\tmap(values => combinerFn(...(values as T))),\n\t\tdistinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)),\n\t\tshareReplay(1),\n\t)\n}\n","// src/store/selector-hook.ts\nimport { property as litProperty } from 'lit/decorators.js'\nimport { Subject, Subscription } from 'rxjs'\nimport { takeUntil } from 'rxjs/operators'\nimport { createCollectionSelector, createSelector } from './selectors'\nimport { ICollectionStore, IStore } from './types'\n\ninterface ComponentWithDisconnection {\n\tdisconnecting?: Subject<void>\n\trequestUpdate?: () => void\n\tisConnected: boolean\n\t__selectorProps?: Record<string, SelectorPropState<unknown>>\n\t[key: string]: any\n}\n\ninterface SelectorPropState<_T> {\n\tsubscription: Subscription | null\n\tinitialLoad: boolean\n}\n\ntype PropertyDescriptor<T> = {\n\tget?: () => T\n\tset?: (value: T) => void\n\tvalue?: T\n\tconfigurable?: boolean\n\tenumerable?: boolean\n\twritable?: boolean\n}\n\ninterface SelectOptions {\n\trequired?: boolean\n\tupdateOnly?: boolean\n}\n\nfunction isCollectionStore(store: any): store is ICollectionStore<unknown> {\n\treturn 'set' in store && typeof store.set === 'function' && store.value instanceof Map\n}\n\nexport function select<T, R>(\n\tstore: IStore<T> | ICollectionStore<T>,\n\tselectorFn: (state: any) => R = (state: R) => state,\n\toptions: SelectOptions = {},\n) {\n\treturn function (proto: Record<string, any>, propName: string, _descriptor?: PropertyDescriptor<R>) {\n\t\tlitProperty({ attribute: false, type: Object })(proto, propName)\n\n\t\tconst originalConnectedCallback = proto.connectedCallback\n\t\tconst originalDisconnectedCallback = proto.disconnectedCallback\n\n\t\tproto.connectedCallback = function (this: ComponentWithDisconnection) {\n\t\t\tconst instance = this\n\n\t\t\tif (!instance.__selectorProps) {\n\t\t\t\tinstance.__selectorProps = {}\n\t\t\t}\n\n\t\t\tif (!instance.__selectorProps[propName]) {\n\t\t\t\tinstance.__selectorProps[propName] = {\n\t\t\t\t\tsubscription: null,\n\t\t\t\t\tinitialLoad: false,\n\t\t\t\t} as SelectorPropState<R>\n\t\t\t}\n\n\t\t\tconst props = instance.__selectorProps[propName] as SelectorPropState<R>\n\n\t\t\t// Reset disconnecting Subject if it's closed or doesn't exist\n\t\t\tif (instance.disconnecting?.closed || !instance.disconnecting) {\n\t\t\t\tinstance.disconnecting = new Subject<void>()\n\t\t\t}\n\n\t\t\tconst selector = isCollectionStore(store)\n\t\t\t\t? createCollectionSelector(store, selectorFn)\n\t\t\t\t: createSelector(store as IStore<T>, selectorFn)\n\n\t\t\t// Call original connectedCallback immediately if not required\n\t\t\tif (!options.required && !props.initialLoad) {\n\t\t\t\toriginalConnectedCallback?.call(instance)\n\t\t\t\tprops.initialLoad = true\n\t\t\t}\n\n\t\t\tif (!props.subscription) {\n\t\t\t\tprops.subscription = selector.pipe(takeUntil(instance.disconnecting)).subscribe({\n\t\t\t\t\tnext: (value: R) => {\n\t\t\t\t\t\tconst newValue = structuredClone(value)\n\t\t\t\t\t\tinstance[propName] = newValue\n\t\t\t\t\t\tinstance.requestUpdate?.()\n\t\t\t\t\t\tif (options.required && !props.initialLoad && newValue) {\n\t\t\t\t\t\t\toriginalConnectedCallback?.call(instance)\n\t\t\t\t\t\t\tprops.initialLoad = true\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror: (err: Error) => {\n\t\t\t\t\t\tconsole.error(`Error in selector subscription for ${propName}:`, err)\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tproto.disconnectedCallback = function (this: ComponentWithDisconnection) {\n\t\t\toriginalDisconnectedCallback?.call(this)\n\n\t\t\tconst props = this.__selectorProps?.[propName] as SelectorPropState<R> | undefined\n\t\t\tif (props?.subscription) {\n\t\t\t\tprops.subscription.unsubscribe()\n\t\t\t\tprops.subscription = null\n\t\t\t}\n\n\t\t\tif (this.disconnecting) {\n\t\t\t\tthis.disconnecting.next()\n\t\t\t\tthis.disconnecting.complete()\n\t\t\t\t// Allow reinitialization by not deleting the disconnecting subject\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["createContext","initialData","storage","key","obj","proto","Object","getPrototypeOf","prototype","Symbol","iterator","store","SchmancyCollectionStore","getInstance","value","size","$","next","Error","SchmancyStoreObject","keys","length","getFieldValue","item","path","split","reduce","getBigrams","s","bigrams","i","push","substring","computeFuzzyScore","actual","expected","a","toLowerCase","trim","b","substringScore","includes","subsequenceScore","sub","str","j","anagramScore","query","target","countChars","acc","char","queryCount","targetCount","every","diceScore","s1","s2","bigrams1","bigrams2","intersection","used","Array","fill","bigram","maxLen","Math","max","levenshteinScore","matrix","charAt","min","compareValues","op","String","isArray","startsWith","endsWith","filterMapItems","items","queries","scoredItems","from","values","map","totalScore","count","valid","field","strict","operator","score","filter","x","sort","filterMap","createSelector","selectorFn","pipe","distinctUntilChanged","JSON","stringify","shareReplay","createCollectionSelector","Map","entries","createFilterSelector","filterFn","collection","result","forEach","createItemSelector","itemKey","get","createCountSelector","createCompoundSelector","selectors","combinerFn","combineLatest","select","state","options","propName","_descriptor","litProperty","attribute","type","originalConnectedCallback","connectedCallback","originalDisconnectedCallback","disconnectedCallback","instance","this","__selectorProps","subscription","initialLoad","props","disconnecting","closed","Subject","selector","set","required","call","takeUntil","subscribe","newValue","structuredClone","requestUpdate","error","err","unsubscribe","complete"],"mappings":";;;;AAgDgB,SAAAA,EACfC,GACAC,GACAC,GAEI;AAAA,MApCL,SAAsBC,GAAAA;AAErB,QAAIA,KAAO,QAAuB,OAARA,KAAQ,SAC1B,QAAA;AAIF,UAAAC,IAAQC,OAAOC,eAAeH,CAAAA;AACpC,WAAIC,MAAUC,OAAOE,aAAaH,MAAU,QAK9BD,OAAAA,EAAIK,OAAOC,QAAAA,KAAc;AAAA,EACxC,EAsBkBT,CAAc,GAAA;AAE9B,UAAMU,IAAQC,EAAwBC,YAAYX,GAASC,GAAKF,CAMzD;AAAA,WAHFU,EAAMG,MAAMC,QACVJ,EAAAK,EAAEC,KAAKhB,IAEPU;AAAAA,EACG;AAAA,MAAuB,OAAhBV,KAAgB,YAAYA,MAAgB,MAAM;AAEnE,QAAIC,MAAY,YACT,OAAA,IAAIgB,MAAM,uDAIjB;AAAA,UAAMP,IAAQQ,EAAoBN,YAAeX,GAASC,GAAKF,CAAAA;AAMxD,WAnEW,QADGG,IAiEHO,EAAMG,UAhEN,YAAYV,MAAQ,QAGhCE,OAAOc,KAAKhB,CAAKiB,EAAAA,WAAW,KA8D3BV,EAAAK,EAAEC,KAAKhB,CAAAA,GAEPU;AAAAA,EAAA;AAED,QAAA,IAAIO,MAAM,0CAAA;AAtElB,MAAuBd;AAwEvB;ACjDA,M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1,13 +1,13 @@
1
1
  import { Subject as E, switchMap as O, forkJoin as x, fromEvent as p, of as b, takeUntil as f, timer as k, map as m, defaultIfEmpty as A, tap as c, delay as y, filter as P, take as F, mergeMap as j, merge as B } from "rxjs";
2
2
  import "lit/directives/class-map.js";
3
3
  import "lit/directives/style-map.js";
4
- import { T as H } from "./tailwind.mixin-C2MUeArS.js";
5
- import { css as T, html as g } from "lit";
6
- import { customElement as $, property as h, query as U, queryAssignedElements as z } from "lit/decorators.js";
7
- import { $ as D } from "./litElement.mixin-B1ZP2iG4.js";
8
- import { when as I } from "lit/directives/when.js";
9
- var N = Object.getOwnPropertyDescriptor;
10
- let C = class extends H(T``) {
4
+ import { T as H } from "./tailwind.mixin-Bn3Brhz1.js";
5
+ import { css as U, html as g } from "lit";
6
+ import { customElement as $, property as h, query as z, queryAssignedElements as D } from "lit/decorators.js";
7
+ import { $ as I } from "./litElement.mixin-CtugwVVz.js";
8
+ import { when as N } from "lit/directives/when.js";
9
+ var T = Object.getOwnPropertyDescriptor;
10
+ let C = class extends H(U``) {
11
11
  render() {
12
12
  return g`
13
13
  <sch-flex class="absolute top-0 left-0 md:left-[unset] md:right-0">
@@ -39,7 +39,7 @@ let C = class extends H(T``) {
39
39
  }
40
40
  };
41
41
  C = ((t, e, s, i) => {
42
- for (var r, o = i > 1 ? void 0 : i ? N(e, s) : e, d = t.length - 1; d >= 0; d--) (r = t[d]) && (o = r(o) || o);
42
+ for (var r, o = i > 1 ? void 0 : i ? T(e, s) : e, d = t.length - 1; d >= 0; d--) (r = t[d]) && (o = r(o) || o);
43
43
  return o;
44
44
  })([$("schmancy-sheet-header")], C);
45
45
  var L = ((t) => (t.Side = "side", t.Bottom = "bottom", t.BottomCenter = "bottom-center", t.TopRight = "top-right", t.BottomRight = "bottom-right", t))(L || {});
@@ -107,7 +107,7 @@ var q = Object.defineProperty, R = Object.getOwnPropertyDescriptor, a = (t, e, s
107
107
  for (var r, o = i > 1 ? void 0 : i ? R(e, s) : e, d = t.length - 1; d >= 0; d--) (r = t[d]) && (o = (i ? r(e, s, o) : r(o)) || o);
108
108
  return i && o && q(e, s, o), o;
109
109
  };
110
- let n = class extends D(":host{--overlay-color: var(--schmancy-sys-color-surface-dim);--transition-timing: cubic-bezier(.16, 1, .3, 1);--transition-duration: .25s;--sheet-radius: 0;--max-height: 100vh}.sheet{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;visibility:visible;transition:visibility var(--transition-duration) var(--transition-timing)}.sheet[aria-hidden=true]{visibility:hidden;pointer-events:none}.sheet[aria-hidden=true] .content{transform:translateY(100%)}.sheet[aria-hidden=true] .content[data-position=side]{transform:translate(100%)}.sheet[aria-hidden=true] .overlay{opacity:0}.overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--overlay-color);opacity:.8;transition:opacity var(--transition-duration) var(--transition-timing)}.content{z-index:1;transition:transform var(--transition-duration) var(--transition-timing);overflow:hidden}.content[data-position=side]{height:100vh;height:100%;min-width:320px;max-width:90vw;width:fit-content;margin-left:auto}.content[data-position=side] #body{max-height:100vh}.content[data-position=bottom]{width:100%;margin-top:auto;border-radius:16px 16px 0 0;max-height:90vh}.content[data-position=bottom] #body{max-height:90vh}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}") {
110
+ let n = class extends I(":host{--overlay-color: var(--schmancy-sys-color-surface-dim);--transition-timing: cubic-bezier(.16, 1, .3, 1);--transition-duration: .25s;--sheet-radius: 0;--max-height: 100vh}.sheet{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;visibility:visible;transition:visibility var(--transition-duration) var(--transition-timing)}.sheet[aria-hidden=true]{visibility:hidden;pointer-events:none}.sheet[aria-hidden=true] .content{transform:translateY(100%)}.sheet[aria-hidden=true] .content[data-position=side]{transform:translate(100%)}.sheet[aria-hidden=true] .overlay{opacity:0}.overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--overlay-color);opacity:.8;transition:opacity var(--transition-duration) var(--transition-timing)}.content{z-index:1;transition:transform var(--transition-duration) var(--transition-timing);overflow:hidden}.content[data-position=side]{height:100vh;height:100%;min-width:320px;max-width:90vw;width:fit-content;margin-left:auto}.content[data-position=side] #body{max-height:100vh}.content[data-position=bottom]{width:100%;margin-top:auto;border-radius:16px 16px 0 0;max-height:90vh}.content[data-position=bottom] #body{max-height:90vh}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}") {
111
111
  constructor() {
112
112
  super(...arguments), this.open = !1, this.header = "visible", this.position = L.Side, this.persist = !1, this.lock = !1, this.handleHistory = !0, this.title = "", this.focusAttribute = "autofocus", this.lastFocusedElement = null, this.handleFocusIn = (t) => {
113
113
  var e;
@@ -176,7 +176,7 @@ let n = class extends D(":host{--overlay-color: var(--schmancy-sys-color-surface
176
176
  class="content w-full"
177
177
  data-position=${this.position}
178
178
  >
179
- ${I(this.header !== "hidden", () => g`<schmancy-sheet-header
179
+ ${N(this.header !== "hidden", () => g`<schmancy-sheet-header
180
180
  class="sticky top-0 z-50 w-full"
181
181
  @dismiss=${(t) => {
182
182
  t.stopPropagation(), v.dismiss(this.uid);
@@ -194,7 +194,7 @@ let n = class extends D(":host{--overlay-color: var(--schmancy-sys-color-surface
194
194
  }
195
195
  };
196
196
  var u, l;
197
- a([h({ type: String, reflect: !0 })], n.prototype, "uid", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "open", 2), a([h({ type: String, reflect: !0 })], n.prototype, "header", 2), a([h({ type: String, reflect: !0 })], n.prototype, "position", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "persist", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "lock", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "handleHistory", 2), a([h({ type: String, reflect: !0 })], n.prototype, "title", 2), a([U(".sheet")], n.prototype, "sheet", 2), a([z({ flatten: !0 })], n.prototype, "assignedElements", 2), a([h()], n.prototype, "focusAttribute", 2), a([(u = "open", (t, e) => {
197
+ a([h({ type: String, reflect: !0 })], n.prototype, "uid", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "open", 2), a([h({ type: String, reflect: !0 })], n.prototype, "header", 2), a([h({ type: String, reflect: !0 })], n.prototype, "position", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "persist", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "lock", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "handleHistory", 2), a([h({ type: String, reflect: !0 })], n.prototype, "title", 2), a([z(".sheet")], n.prototype, "sheet", 2), a([D({ flatten: !0 })], n.prototype, "assignedElements", 2), a([h()], n.prototype, "focusAttribute", 2), a([(u = "open", (t, e) => {
198
198
  const { willUpdate: s } = t;
199
199
  l = Object.assign({ waitUntilFirstUpdate: !1 }, l), t.willUpdate = function(i) {
200
200
  if (s.call(this, i), i.has(u)) {
@@ -209,4 +209,4 @@ export {
209
209
  S as b,
210
210
  v as s
211
211
  };
212
- //# sourceMappingURL=sheet-DcDDkPRG.js.map
212
+ //# sourceMappingURL=sheet-9d1u9s1_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sheet-DcDDkPRG.js","sources":["../src/sheet/header.ts","../src/sheet/sheet.service.ts","../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css``) {\n\trender() {\n\t\treturn html`\n\t\t\t<sch-flex class=\"absolute top-0 left-0 md:left-[unset] md:right-0\">\n\t\t\t\t<div class=\"block md:hidden flex-1 justify-start items-start\">\n\t\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"text-[24px]\">&#8592; </span>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"hidden md:block flex-1 justify-end items-end\">\n\t\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</sch-flex>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","import {\n\tdefaultIfEmpty,\n\tdelay,\n\tfilter,\n\tforkJoin,\n\tfromEvent,\n\tmap,\n\tmergeMap,\n\tof,\n\tSubject,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n\ttimer,\n} from 'rxjs'\nimport SchmancySheet from './sheet'\n\nexport enum SchmancySheetPosition {\n\tSide = 'side',\n\tBottom = 'bottom',\n\t/**\n\t * @deprecated use bottom instead\n\t */\n\tBottomCenter = 'bottom-center',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tTopRight = 'top-right',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tBottomRight = 'bottom-right',\n}\n\ntype BottomSheeetTarget = {\n\tcomponent: HTMLElement\n\tuid?: string\n\tposition?: SchmancySheetPosition\n\tpersist?: boolean\n\tclose?: () => void\n\tlock?: boolean // Controls both ESC and overlay click dismissal\n\thandleHistory?: boolean // Controls browser back button behavior\n\ttitle?: string\n\theader?: 'hidden' | 'visible'\n}\n\n// Events for communication between bottom-sheet component and bottom-sheet.service\nexport type SheetWhereAreYouRickyEvent = CustomEvent<{\n\tuid: string\n}>\nexport const SheetWhereAreYouRicky = 'are-you-there-sheet'\n\nexport type SheetHereMortyEvent = CustomEvent<{\n\tsheet: SchmancySheet\n}>\nexport const SheetHereMorty = 'yes-here'\n\n// Function to determine the position based on screen size\nconst getPosition = (): SchmancySheetPosition => {\n\treturn window.innerWidth >= 768 ? SchmancySheetPosition.Side : SchmancySheetPosition.Bottom // Adjust 768 as needed for your breakpoint\n}\n\nclass BottomSheetService {\n\tbottomSheet = new Subject<BottomSheeetTarget>()\n\t$dismiss = new Subject<string>()\n\t// Track currently open sheets by uid\n\tprivate activeSheets = new Set<string>()\n\t// To track if we've set up the popstate listener\n\tprivate popStateListenerActive = false\n\n\tconstructor() {\n\t\tthis.setupSheetOpeningLogic()\n\t\tthis.setupSheetDismissLogic()\n\t\tthis.setupPopStateListener()\n\t}\n\n\t/**\n\t * Sets up the main sheet opening logic\n\t */\n\tprivate setupSheetOpeningLogic() {\n\t\tthis.bottomSheet\n\t\t\t.pipe(\n\t\t\t\tswitchMap(target =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)),\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(target).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(SheetWhereAreYouRicky, {\n\t\t\t\t\t\t\t\t\t\tdetail: { uid: target.uid ?? target.component.tagName },\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\n\t\t\t\tmap(([sheet, target]) => {\n\t\t\t\t\tconsole.log(sheet, target)\n\t\t\t\t\tif (!sheet) {\n\t\t\t\t\t\t// if sheet is not found, create it\n\t\t\t\t\t\tsheet = document.createElement('schmancy-sheet')\n\t\t\t\t\t\tdocument.body.appendChild(sheet)\n\t\t\t\t\t}\n\t\t\t\t\tsheet.setAttribute('uid', target.uid ?? target.component.tagName)\n\n\t\t\t\t\ttarget.lock && sheet.setAttribute('lock', 'true')\n\n\t\t\t\t\t// Use the dynamic position function here\n\t\t\t\t\tconst position = target.position || getPosition()\n\t\t\t\t\tsheet.setAttribute('position', position)\n\n\t\t\t\t\ttarget.title && sheet.setAttribute('title', target.title)\n\t\t\t\t\ttarget.persist && sheet.setAttribute('persist', target.persist ?? false)\n\t\t\t\t\ttarget.header && sheet.setAttribute('header', target.header)\n\n\t\t\t\t\t// Handle history logic if the property exists\n\t\t\t\t\tif (target.handleHistory !== undefined) {\n\t\t\t\t\t\tsheet.setAttribute('handleHistory', String(target.handleHistory))\n\t\t\t\t\t}\n\n\t\t\t\t\tdocument.body.style.overflow = 'hidden' // lock the scroll of the host\n\t\t\t\t\treturn { target, sheet }\n\t\t\t\t}),\n\t\t\t\tdelay(20),\n\t\t\t\tfilter(({ target, sheet }) => {\n\t\t\t\t\t// if the sheet has already the component, just show it\n\t\t\t\t\tif (\n\t\t\t\t\t\ttarget.persist &&\n\t\t\t\t\t\tsheet?.shadowRoot\n\t\t\t\t\t\t\t?.querySelector('slot')\n\t\t\t\t\t\t\t?.assignedElements()\n\t\t\t\t\t\t\t.find(e => e.tagName === target.component.tagName)\n\t\t\t\t\t) {\n\t\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t\t\treturn false\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true // if the sheet does not have the component, continue to the next step\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\tsheet?.appendChild(target.component)\n\t\t\t\t}),\n\t\t\t\tdelay(1),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\n\t\t\t\t\t// Add to active sheets tracking\n\t\t\t\t\tconst uid = target.uid ?? target.component.tagName\n\t\t\t\t\tthis.activeSheets.add(uid)\n\n\t\t\t\t\t// Handle history integration - default to true if not specified\n\t\t\t\t\tconst shouldHandleHistory = target.handleHistory !== false\n\n\t\t\t\t\tif (shouldHandleHistory) {\n\t\t\t\t\t\t// Use history state to track this specific sheet\n\t\t\t\t\t\tconst historyState = {\n\t\t\t\t\t\t\tschmancySheet: true,\n\t\t\t\t\t\t\tuid: uid,\n\t\t\t\t\t\t\ttimestamp: Date.now(),\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Push a new history state\n\t\t\t\t\t\thistory.pushState(historyState, '', window.location.href)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tfromEvent<CustomEvent>(sheet, 'close')\n\t\t\t\t\t\t.pipe(take(1))\n\t\t\t\t\t\t.pipe(delay(300))\n\t\t\t\t\t\t.subscribe(e => {\n\t\t\t\t\t\t\tconst target = e.target as SchmancySheet\n\t\t\t\t\t\t\tconsole.log(target)\n\n\t\t\t\t\t\t\t// Remove from active sheets tracking\n\t\t\t\t\t\t\tconst uid = target.getAttribute('uid')\n\t\t\t\t\t\t\tif (uid) {\n\t\t\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!target?.persist) target?.remove()\n\t\t\t\t\t\t\tdocument.body.style.overflow = 'auto' // unlock the scroll of the host\n\t\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/**\n\t * Sets up the sheet closing/dismissal logic\n\t */\n\tprivate setupSheetDismissLogic() {\n\t\tthis.$dismiss\n\t\t\t.pipe(\n\t\t\t\tmergeMap(uid =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)),\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(uid).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(new CustomEvent(SheetWhereAreYouRicky, { detail: { uid } }))\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\ttap(([sheet, uid]) => {\n\t\t\t\t\tif (sheet) {\n\t\t\t\t\t\tsheet.closeSheet()\n\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/**\n\t * Sets up the popstate listener to handle browser back button\n\t */\n\tprivate setupPopStateListener() {\n\t\tif (this.popStateListenerActive) return\n\n\t\tfromEvent<PopStateEvent>(window, 'popstate').subscribe(event => {\n\t\t\t// If we have active sheets, close the most recently opened one\n\t\t\tif (this.activeSheets.size > 0) {\n\t\t\t\tconst lastSheet = Array.from(this.activeSheets).pop()\n\t\t\t\tif (lastSheet) {\n\t\t\t\t\tthis.dismiss(lastSheet)\n\n\t\t\t\t\t// Prevent default navigation behavior by pushing a new state\n\t\t\t\t\t// This effectively cancels out the back navigation\n\t\t\t\t\tif (event.state && event.state.schmancySheet) {\n\t\t\t\t\t\thistory.pushState({}, '', window.location.href)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tthis.popStateListenerActive = true\n\t}\n\n\t/**\n\t * Dismiss a sheet by uid\n\t */\n\tdismiss(uid: string) {\n\t\tthis.$dismiss.next(uid)\n\t}\n\n\t/**\n\t * Open a sheet with the given target configuration\n\t */\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n\n\t/**\n\t * Check if a sheet is currently open by uid\n\t */\n\tisOpen(uid: string): boolean {\n\t\treturn this.activeSheets.has(uid)\n\t}\n\n\t/**\n\t * Close all open sheets\n\t */\n\tcloseAll() {\n\t\tArray.from(this.activeSheets).forEach(uid => {\n\t\t\tthis.dismiss(uid)\n\t\t})\n\t}\n}\nexport const sheet = new BottomSheetService()\n","import { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\nimport { fromEvent, merge, of, take, takeUntil, tap } from 'rxjs'\nimport { on } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) lock = false\n\t@property({ type: Boolean, reflect: true }) handleHistory = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t@query('.sheet') private sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@on('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\tthis.addFocusTrap()\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.removeFocusTrap()\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button - only if handleHistory is true\n\t\tconst popState$ = this.handleHistory\n\t\t\t? fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\t\ttap(e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.closeSheet()\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t: of(null).pipe(take(0)) // Empty observable if handleHistory is false\n\n\t\t// Handle ESC key - respect allowOverlayDismiss\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(window, 'keyup').pipe(\n\t\t\ttap(event => {\n\t\t\t\t// Only handle ESC key dismissal if allowOverlayDismiss is true\n\t\t\t\tif (event.key === 'Escape' && !this.sheetContainsFocus() && !this.lock) {\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid) this.announcePresence()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate sheetContainsFocus(): boolean {\n\t\treturn this.sheet?.contains(document.activeElement) ?? false\n\t}\n\n\tprivate announcePresence() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\tdetail: { sheet: this },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate addFocusTrap() {\n\t\tdocument.addEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate removeFocusTrap() {\n\t\tdocument.removeEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate handleFocusIn = (e: Event) => {\n\t\tif (!this.sheet?.contains(e.target as Node)) {\n\t\t\tthis.focus()\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheet?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheet?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"sheet\" role=\"dialog\" aria-labelledby=\"sheet-title\" aria-hidden=${!this.open} aria-modal=${this.open}>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"overlay\"\n\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\tif (!this.lock) sheet.dismiss(this.uid)\n\t\t\t\t\t}}\n\t\t\t\t></div>\n\t\t\t\t<schmancy-grid\n\t\t\t\t\trows=${this.header === 'hidden' ? '1fr' : 'auto 1fr'}\n\t\t\t\t\tclass=\"content w-full\"\n\t\t\t\t\tdata-position=${this.position}\n\t\t\t\t>\n\t\t\t\t\t${when(\n\t\t\t\t\t\tthis.header !== 'hidden',\n\t\t\t\t\t\t() =>\n\t\t\t\t\t\t\thtml`<schmancy-sheet-header\n\t\t\t\t\t\t\t\tclass=\"sticky top-0 z-50 w-full\"\n\t\t\t\t\t\t\t\t@dismiss=${(e: CustomEvent) => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t\ttitle=${this.title}\n\t\t\t\t\t\t\t></schmancy-sheet-header>`,\n\t\t\t\t\t)}\n\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll> <slot></slot></schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-grid>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n\twaitUntilFirstUpdate?: boolean\n}\n\nexport function on(propName: string, options?: WatchOptions) {\n\treturn (protoOrDescriptor: any, name: string): any => {\n\t\tconst { willUpdate } = protoOrDescriptor\n\n\t\toptions = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n\t\tprotoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n\t\t\twillUpdate.call(this, changedProps)\n\n\t\t\tif (changedProps.has(propName)) {\n\t\t\t\tconst oldValue = changedProps.get(propName)\n\t\t\t\tconst newValue = this[propName]\n\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tif (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n\t\t\t\t\t\tthis[name].call(this, oldValue, newValue)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","render","html","this","dispatchEvent","CustomEvent","bubbles","composed","customElement","SchmancySheetPosition","SheetWhereAreYouRicky","SheetHereMorty","sheet","bottomSheet","Subject","$dismiss","activeSheets","Set","popStateListenerActive","setupSheetOpeningLogic","setupSheetDismissLogic","setupPopStateListener","pipe","switchMap","forkJoin","fromEvent","window","takeUntil","timer","map","e","detail","defaultIfEmpty","of","target","tap","uid","component","tagName","document","createElement","body","appendChild","setAttribute","lock","position","innerWidth","title","persist","header","handleHistory","String","style","overflow","delay","filter","shadowRoot","querySelector","assignedElements","find","add","historyState","schmancySheet","timestamp","Date","now","history","pushState","location","href","take","subscribe","getAttribute","delete","remove","mergeMap","closeSheet","event","size","lastSheet","Array","from","pop","dismiss","state","next","has","forEach","SchmancySheet","$LitElement","super","arguments","open","Side","focusAttribute","lastFocusedElement","handleFocusIn","contains","focus","_oldValue","newValue","activeElement","addFocusTrap","removeFocusTrap","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","popState$","preventDefault","keyUp$","key","sheetContainsFocus","rickyComm$","announcePresence","merge","addEventListener","removeEventListener","isShown","getFocusElement","selector","el","matches","stopPropagation","when","propName","options","__decorateClass","property","type","reflect","prototype","Boolean","query","queryAssignedElements","flatten","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","oldValue","get","hasUpdated"],"mappings":";;;;;;;;;AAKA,IAAqBA,IAArB,cAAiDC,EAAgBC;EAChE,SAAAC;AACQ,WAAAC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKO,MACHC;AAAAA,WAAAC,cACJ,IAAIC,YAAY,WAAW,EAC1BC,SAAAA,IACAC,UAAAA,GAEF,CAAA,CAAA;AAA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a,OAAOC,OAAO,EAAEC,sBAAAA,MAA+Bf,CAEvCU,GAAAA,EAAAE,aAAa,SAAUI,GAAAA;AAGpC,QAFOJ,EAAAK,KAAK5I,MAAM2I,CAElBA,GAAAA,EAAaxD,IAAIuC,CAAW,GAAA;AACzB,YAAAmB,IAAWF,EAAaG,IAAIpB,CAC5BzB,GAAAA,IAAWjG,KAAK0H,CAElBmB;AAAAA,MAAAA,MAAa5C,MACX0B,KAAAA,QAAAA,EAASe,wBAAAA,CAAwB1I,KAAK+I,cAC1C/I,KAAKsI,GAAMM,KAAK5I,MAAM6I,GAAU5C,CAElC;AAAA,IAAA;AAAA,EAEF;AAAA,EDrBmBZ,GAAAA,EAiBpB2C,WAAA,gBAAA,CAAA,GAjBoB3C,IAArBuC,EAAA,CADCvH,EAAc,gBACMgF,CAAAA,GAAAA,CAAAA;"}
1
+ {"version":3,"file":"sheet-9d1u9s1_.js","sources":["../src/sheet/header.ts","../src/sheet/sheet.service.ts","../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css``) {\n\trender() {\n\t\treturn html`\n\t\t\t<sch-flex class=\"absolute top-0 left-0 md:left-[unset] md:right-0\">\n\t\t\t\t<div class=\"block md:hidden flex-1 justify-start items-start\">\n\t\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"text-[24px]\">&#8592; </span>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"hidden md:block flex-1 justify-end items-end\">\n\t\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</sch-flex>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","import {\n\tdefaultIfEmpty,\n\tdelay,\n\tfilter,\n\tforkJoin,\n\tfromEvent,\n\tmap,\n\tmergeMap,\n\tof,\n\tSubject,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n\ttimer,\n} from 'rxjs'\nimport SchmancySheet from './sheet'\n\nexport enum SchmancySheetPosition {\n\tSide = 'side',\n\tBottom = 'bottom',\n\t/**\n\t * @deprecated use bottom instead\n\t */\n\tBottomCenter = 'bottom-center',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tTopRight = 'top-right',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tBottomRight = 'bottom-right',\n}\n\ntype BottomSheeetTarget = {\n\tcomponent: HTMLElement\n\tuid?: string\n\tposition?: SchmancySheetPosition\n\tpersist?: boolean\n\tclose?: () => void\n\tlock?: boolean // Controls both ESC and overlay click dismissal\n\thandleHistory?: boolean // Controls browser back button behavior\n\ttitle?: string\n\theader?: 'hidden' | 'visible'\n}\n\n// Events for communication between bottom-sheet component and bottom-sheet.service\nexport type SheetWhereAreYouRickyEvent = CustomEvent<{\n\tuid: string\n}>\nexport const SheetWhereAreYouRicky = 'are-you-there-sheet'\n\nexport type SheetHereMortyEvent = CustomEvent<{\n\tsheet: SchmancySheet\n}>\nexport const SheetHereMorty = 'yes-here'\n\n// Function to determine the position based on screen size\nconst getPosition = (): SchmancySheetPosition => {\n\treturn window.innerWidth >= 768 ? SchmancySheetPosition.Side : SchmancySheetPosition.Bottom // Adjust 768 as needed for your breakpoint\n}\n\nclass BottomSheetService {\n\tbottomSheet = new Subject<BottomSheeetTarget>()\n\t$dismiss = new Subject<string>()\n\t// Track currently open sheets by uid\n\tprivate activeSheets = new Set<string>()\n\t// To track if we've set up the popstate listener\n\tprivate popStateListenerActive = false\n\n\tconstructor() {\n\t\tthis.setupSheetOpeningLogic()\n\t\tthis.setupSheetDismissLogic()\n\t\tthis.setupPopStateListener()\n\t}\n\n\t/**\n\t * Sets up the main sheet opening logic\n\t */\n\tprivate setupSheetOpeningLogic() {\n\t\tthis.bottomSheet\n\t\t\t.pipe(\n\t\t\t\tswitchMap(target =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)),\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(target).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(SheetWhereAreYouRicky, {\n\t\t\t\t\t\t\t\t\t\tdetail: { uid: target.uid ?? target.component.tagName },\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\n\t\t\t\tmap(([sheet, target]) => {\n\t\t\t\t\tconsole.log(sheet, target)\n\t\t\t\t\tif (!sheet) {\n\t\t\t\t\t\t// if sheet is not found, create it\n\t\t\t\t\t\tsheet = document.createElement('schmancy-sheet')\n\t\t\t\t\t\tdocument.body.appendChild(sheet)\n\t\t\t\t\t}\n\t\t\t\t\tsheet.setAttribute('uid', target.uid ?? target.component.tagName)\n\n\t\t\t\t\ttarget.lock && sheet.setAttribute('lock', 'true')\n\n\t\t\t\t\t// Use the dynamic position function here\n\t\t\t\t\tconst position = target.position || getPosition()\n\t\t\t\t\tsheet.setAttribute('position', position)\n\n\t\t\t\t\ttarget.title && sheet.setAttribute('title', target.title)\n\t\t\t\t\ttarget.persist && sheet.setAttribute('persist', target.persist ?? false)\n\t\t\t\t\ttarget.header && sheet.setAttribute('header', target.header)\n\n\t\t\t\t\t// Handle history logic if the property exists\n\t\t\t\t\tif (target.handleHistory !== undefined) {\n\t\t\t\t\t\tsheet.setAttribute('handleHistory', String(target.handleHistory))\n\t\t\t\t\t}\n\n\t\t\t\t\tdocument.body.style.overflow = 'hidden' // lock the scroll of the host\n\t\t\t\t\treturn { target, sheet }\n\t\t\t\t}),\n\t\t\t\tdelay(20),\n\t\t\t\tfilter(({ target, sheet }) => {\n\t\t\t\t\t// if the sheet has already the component, just show it\n\t\t\t\t\tif (\n\t\t\t\t\t\ttarget.persist &&\n\t\t\t\t\t\tsheet?.shadowRoot\n\t\t\t\t\t\t\t?.querySelector('slot')\n\t\t\t\t\t\t\t?.assignedElements()\n\t\t\t\t\t\t\t.find(e => e.tagName === target.component.tagName)\n\t\t\t\t\t) {\n\t\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t\t\treturn false\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true // if the sheet does not have the component, continue to the next step\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\tsheet?.appendChild(target.component)\n\t\t\t\t}),\n\t\t\t\tdelay(1),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\n\t\t\t\t\t// Add to active sheets tracking\n\t\t\t\t\tconst uid = target.uid ?? target.component.tagName\n\t\t\t\t\tthis.activeSheets.add(uid)\n\n\t\t\t\t\t// Handle history integration - default to true if not specified\n\t\t\t\t\tconst shouldHandleHistory = target.handleHistory !== false\n\n\t\t\t\t\tif (shouldHandleHistory) {\n\t\t\t\t\t\t// Use history state to track this specific sheet\n\t\t\t\t\t\tconst historyState = {\n\t\t\t\t\t\t\tschmancySheet: true,\n\t\t\t\t\t\t\tuid: uid,\n\t\t\t\t\t\t\ttimestamp: Date.now(),\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Push a new history state\n\t\t\t\t\t\thistory.pushState(historyState, '', window.location.href)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tfromEvent<CustomEvent>(sheet, 'close')\n\t\t\t\t\t\t.pipe(take(1))\n\t\t\t\t\t\t.pipe(delay(300))\n\t\t\t\t\t\t.subscribe(e => {\n\t\t\t\t\t\t\tconst target = e.target as SchmancySheet\n\t\t\t\t\t\t\tconsole.log(target)\n\n\t\t\t\t\t\t\t// Remove from active sheets tracking\n\t\t\t\t\t\t\tconst uid = target.getAttribute('uid')\n\t\t\t\t\t\t\tif (uid) {\n\t\t\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!target?.persist) target?.remove()\n\t\t\t\t\t\t\tdocument.body.style.overflow = 'auto' // unlock the scroll of the host\n\t\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/**\n\t * Sets up the sheet closing/dismissal logic\n\t */\n\tprivate setupSheetDismissLogic() {\n\t\tthis.$dismiss\n\t\t\t.pipe(\n\t\t\t\tmergeMap(uid =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)),\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(uid).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(new CustomEvent(SheetWhereAreYouRicky, { detail: { uid } }))\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\ttap(([sheet, uid]) => {\n\t\t\t\t\tif (sheet) {\n\t\t\t\t\t\tsheet.closeSheet()\n\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/**\n\t * Sets up the popstate listener to handle browser back button\n\t */\n\tprivate setupPopStateListener() {\n\t\tif (this.popStateListenerActive) return\n\n\t\tfromEvent<PopStateEvent>(window, 'popstate').subscribe(event => {\n\t\t\t// If we have active sheets, close the most recently opened one\n\t\t\tif (this.activeSheets.size > 0) {\n\t\t\t\tconst lastSheet = Array.from(this.activeSheets).pop()\n\t\t\t\tif (lastSheet) {\n\t\t\t\t\tthis.dismiss(lastSheet)\n\n\t\t\t\t\t// Prevent default navigation behavior by pushing a new state\n\t\t\t\t\t// This effectively cancels out the back navigation\n\t\t\t\t\tif (event.state && event.state.schmancySheet) {\n\t\t\t\t\t\thistory.pushState({}, '', window.location.href)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tthis.popStateListenerActive = true\n\t}\n\n\t/**\n\t * Dismiss a sheet by uid\n\t */\n\tdismiss(uid: string) {\n\t\tthis.$dismiss.next(uid)\n\t}\n\n\t/**\n\t * Open a sheet with the given target configuration\n\t */\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n\n\t/**\n\t * Check if a sheet is currently open by uid\n\t */\n\tisOpen(uid: string): boolean {\n\t\treturn this.activeSheets.has(uid)\n\t}\n\n\t/**\n\t * Close all open sheets\n\t */\n\tcloseAll() {\n\t\tArray.from(this.activeSheets).forEach(uid => {\n\t\t\tthis.dismiss(uid)\n\t\t})\n\t}\n}\nexport const sheet = new BottomSheetService()\n","import { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\nimport { fromEvent, merge, of, take, takeUntil, tap } from 'rxjs'\nimport { on } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) lock = false\n\t@property({ type: Boolean, reflect: true }) handleHistory = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t@query('.sheet') private sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@on('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\tthis.addFocusTrap()\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.removeFocusTrap()\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button - only if handleHistory is true\n\t\tconst popState$ = this.handleHistory\n\t\t\t? fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\t\ttap(e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.closeSheet()\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t: of(null).pipe(take(0)) // Empty observable if handleHistory is false\n\n\t\t// Handle ESC key - respect allowOverlayDismiss\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(window, 'keyup').pipe(\n\t\t\ttap(event => {\n\t\t\t\t// Only handle ESC key dismissal if allowOverlayDismiss is true\n\t\t\t\tif (event.key === 'Escape' && !this.sheetContainsFocus() && !this.lock) {\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid) this.announcePresence()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate sheetContainsFocus(): boolean {\n\t\treturn this.sheet?.contains(document.activeElement) ?? false\n\t}\n\n\tprivate announcePresence() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\tdetail: { sheet: this },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate addFocusTrap() {\n\t\tdocument.addEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate removeFocusTrap() {\n\t\tdocument.removeEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate handleFocusIn = (e: Event) => {\n\t\tif (!this.sheet?.contains(e.target as Node)) {\n\t\t\tthis.focus()\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheet?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheet?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"sheet\" role=\"dialog\" aria-labelledby=\"sheet-title\" aria-hidden=${!this.open} aria-modal=${this.open}>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"overlay\"\n\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\tif (!this.lock) sheet.dismiss(this.uid)\n\t\t\t\t\t}}\n\t\t\t\t></div>\n\t\t\t\t<schmancy-grid\n\t\t\t\t\trows=${this.header === 'hidden' ? '1fr' : 'auto 1fr'}\n\t\t\t\t\tclass=\"content w-full\"\n\t\t\t\t\tdata-position=${this.position}\n\t\t\t\t>\n\t\t\t\t\t${when(\n\t\t\t\t\t\tthis.header !== 'hidden',\n\t\t\t\t\t\t() =>\n\t\t\t\t\t\t\thtml`<schmancy-sheet-header\n\t\t\t\t\t\t\t\tclass=\"sticky top-0 z-50 w-full\"\n\t\t\t\t\t\t\t\t@dismiss=${(e: CustomEvent) => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t\ttitle=${this.title}\n\t\t\t\t\t\t\t></schmancy-sheet-header>`,\n\t\t\t\t\t)}\n\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll> <slot></slot></schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-grid>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n\twaitUntilFirstUpdate?: boolean\n}\n\nexport function on(propName: string, options?: WatchOptions) {\n\treturn (protoOrDescriptor: any, name: string): any => {\n\t\tconst { willUpdate } = protoOrDescriptor\n\n\t\toptions = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n\t\tprotoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n\t\t\twillUpdate.call(this, changedProps)\n\n\t\t\tif (changedProps.has(propName)) {\n\t\t\t\tconst oldValue = changedProps.get(propName)\n\t\t\t\tconst newValue = this[propName]\n\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tif (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n\t\t\t\t\t\tthis[name].call(this, oldValue, newValue)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","render","html","this","dispatchEvent","CustomEvent","bubbles","composed","customElement","SchmancySheetPosition","SheetWhereAreYouRicky","SheetHereMorty","sheet","bottomSheet","Subject","$dismiss","activeSheets","Set","popStateListenerActive","setupSheetOpeningLogic","setupSheetDismissLogic","setupPopStateListener","pipe","switchMap","forkJoin","fromEvent","window","takeUntil","timer","map","e","detail","defaultIfEmpty","of","target","tap","uid","component","tagName","document","createElement","body","appendChild","setAttribute","lock","position","innerWidth","title","persist","header","handleHistory","String","style","overflow","delay","filter","shadowRoot","querySelector","assignedElements","find","add","historyState","schmancySheet","timestamp","Date","now","history","pushState","location","href","take","subscribe","getAttribute","delete","remove","mergeMap","closeSheet","event","size","lastSheet","Array","from","pop","dismiss","state","next","has","forEach","SchmancySheet","$LitElement","super","arguments","open","Side","focusAttribute","lastFocusedElement","handleFocusIn","contains","focus","_oldValue","newValue","activeElement","addFocusTrap","removeFocusTrap","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","popState$","preventDefault","keyUp$","key","sheetContainsFocus","rickyComm$","announcePresence","merge","addEventListener","removeEventListener","isShown","getFocusElement","selector","el","matches","stopPropagation","when","propName","options","__decorateClass","property","type","reflect","prototype","Boolean","query","queryAssignedElements","flatten","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","oldValue","get","hasUpdated"],"mappings":";;;;;;;;;AAKA,IAAqBA,IAArB,cAAiDC,EAAgBC;EAChE,SAAAC;AACQ,WAAAC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKO,MACHC;AAAAA,WAAAC,cACJ,IAAIC,YAAY,WAAW,EAC1BC,SAAAA,IACAC,UAAAA,GAEF,CAAA,CAAA;AAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAWQ,MACHJ;AAAAA,WAAAC,cACJ,IAAIC,YAAY,WAAW,EAC1BC,SAAAA,IACAC,UAAAA,GAEF,CAAA,CAAA;AAAA,IAAA,CAAA;AAAA;AAAA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AC5BzB,GAAAA,IAAWjG,KAAK0H,CAElBmB;AAAAA,MAAAA,MAAa5C,MACX0B,KAAAA,QAAAA,EAASe,wBAAAA,CAAwB1I,KAAK+I,cAC1C/I,KAAKsI,GAAMM,KAAK5I,MAAM6I,GAAU5C,CAElC;AAAA,IAAA;AAAA,EAEF;AAAA,EDrBmBZ,GAAAA,EAiBpB2C,WAAA,gBAAA,CAAA,GAjBoB3C,IAArBuC,EAAA,CADCvH,EAAc,gBACMgF,CAAAA,GAAAA,CAAAA;"}
@@ -1,4 +1,4 @@
1
- "use strict";const i=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const g=require("./tailwind.mixin-UzdLTEsN.cjs"),m=require("lit"),h=require("lit/decorators.js"),w=require("./litElement.mixin-DGx3SrGX.cjs"),S=require("lit/directives/when.js");var E=Object.getOwnPropertyDescriptor;let b=class extends g.TailwindElement(m.css``){render(){return m.html`
1
+ "use strict";const i=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const g=require("./tailwind.mixin-DqqGTjD_.cjs"),m=require("lit"),h=require("lit/decorators.js"),w=require("./litElement.mixin-Ct-snNwC.cjs"),S=require("lit/directives/when.js");var E=Object.getOwnPropertyDescriptor;let b=class extends g.TailwindElement(m.css``){render(){return m.html`
2
2
  <sch-flex class="absolute top-0 left-0 md:left-[unset] md:right-0">
3
3
  <div class="block md:hidden flex-1 justify-start items-start">
4
4
  <slot name="back">
@@ -44,4 +44,4 @@
44
44
  </schmancy-grid>
45
45
  </div>
46
46
  `}};var l,p;a([h.property({type:String,reflect:!0})],r.prototype,"uid",2),a([h.property({type:Boolean,reflect:!0})],r.prototype,"open",2),a([h.property({type:String,reflect:!0})],r.prototype,"header",2),a([h.property({type:String,reflect:!0})],r.prototype,"position",2),a([h.property({type:Boolean,reflect:!0})],r.prototype,"persist",2),a([h.property({type:Boolean,reflect:!0})],r.prototype,"lock",2),a([h.property({type:Boolean,reflect:!0})],r.prototype,"handleHistory",2),a([h.property({type:String,reflect:!0})],r.prototype,"title",2),a([h.query(".sheet")],r.prototype,"sheet",2),a([h.queryAssignedElements({flatten:!0})],r.prototype,"assignedElements",2),a([h.property()],r.prototype,"focusAttribute",2),a([(l="open",(t,e)=>{const{willUpdate:s}=t;p=Object.assign({waitUntilFirstUpdate:!1},p),t.willUpdate=function(o){if(s.call(this,o),o.has(l)){const c=o.get(l),n=this[l];c!==n&&(p!=null&&p.waitUntilFirstUpdate&&!this.hasUpdated||this[e].call(this,c,n))}}})],r.prototype,"onOpenChange",1),r=a([h.customElement("schmancy-sheet")],r),exports.SchmancySheetPosition=f,exports.SheetHereMorty=v,exports.SheetWhereAreYouRicky=y,exports.sheet=u;
47
- //# sourceMappingURL=sheet-OQg2AgBP.cjs.map
47
+ //# sourceMappingURL=sheet-BKvr585i.cjs.map