@mhmo91/schmancy 0.9.24 → 0.9.26

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 (366) hide show
  1. package/custom-elements.json +30 -15
  2. package/dist/agent/schmancy.agent.js +229 -10
  3. package/dist/agent/schmancy.agent.js.map +1 -1
  4. package/dist/agent/schmancy.manifest.json +264 -4
  5. package/dist/{area-CfozaCAZ.js → area-BGBCMC79.js} +1 -1
  6. package/dist/area-BGBCMC79.js.map +1 -0
  7. package/dist/{area-CFLFXu0Z.cjs → area-D7l9KR2N.cjs} +1 -1
  8. package/dist/area-D7l9KR2N.cjs.map +1 -0
  9. package/dist/area.cjs +1 -1
  10. package/dist/area.js +1 -1
  11. package/dist/{autocomplete-NDvRW_Xs.cjs → autocomplete-BPD5uraA.cjs} +1 -1
  12. package/dist/{autocomplete-NDvRW_Xs.cjs.map → autocomplete-BPD5uraA.cjs.map} +1 -1
  13. package/dist/{autocomplete-BNjcQ743.js → autocomplete-C2P0Soht.js} +2 -2
  14. package/dist/{autocomplete-BNjcQ743.js.map → autocomplete-C2P0Soht.js.map} +1 -1
  15. package/dist/autocomplete.cjs +1 -1
  16. package/dist/autocomplete.js +1 -1
  17. package/dist/badge.cjs +1 -1
  18. package/dist/badge.js +1 -1
  19. package/dist/{boat-ZA47HbKj.cjs → boat-BkIO-0No.cjs} +1 -1
  20. package/dist/{boat-ZA47HbKj.cjs.map → boat-BkIO-0No.cjs.map} +1 -1
  21. package/dist/{boat-DxplbTDW.js → boat-DXZ0k7oa.js} +1 -1
  22. package/dist/{boat-DxplbTDW.js.map → boat-DXZ0k7oa.js.map} +1 -1
  23. package/dist/boat.cjs +1 -1
  24. package/dist/boat.js +1 -1
  25. package/dist/breadcrumb.cjs +1 -1
  26. package/dist/breadcrumb.js +1 -1
  27. package/dist/{busy-BuHEz1uo.cjs → busy-DGYhpTnO.cjs} +1 -1
  28. package/dist/{busy-BuHEz1uo.cjs.map → busy-DGYhpTnO.cjs.map} +1 -1
  29. package/dist/{busy-QZxs4u8B.js → busy-iRjq6Nvd.js} +1 -1
  30. package/dist/{busy-QZxs4u8B.js.map → busy-iRjq6Nvd.js.map} +1 -1
  31. package/dist/busy.cjs +1 -1
  32. package/dist/busy.js +1 -1
  33. package/dist/button.cjs +1 -1
  34. package/dist/button.js +3 -3
  35. package/dist/{card-DtN6p1Jq.cjs → card-DjYnCckw.cjs} +1 -1
  36. package/dist/card-DjYnCckw.cjs.map +1 -0
  37. package/dist/{card-CTUaARLm.js → card-wUTjx0EC.js} +1 -1
  38. package/dist/card-wUTjx0EC.js.map +1 -0
  39. package/dist/card.cjs +1 -1
  40. package/dist/card.js +1 -1
  41. package/dist/charts.cjs +1 -1
  42. package/dist/charts.js +1 -1
  43. package/dist/{checkbox-DEKQLJYR.cjs → checkbox-CiYEtw9F.cjs} +1 -1
  44. package/dist/{checkbox-DEKQLJYR.cjs.map → checkbox-CiYEtw9F.cjs.map} +1 -1
  45. package/dist/{checkbox-D4cUb1T3.js → checkbox-VBSenxgb.js} +1 -1
  46. package/dist/{checkbox-D4cUb1T3.js.map → checkbox-VBSenxgb.js.map} +1 -1
  47. package/dist/checkbox.cjs +1 -1
  48. package/dist/checkbox.js +1 -1
  49. package/dist/{chips-DhAWrSgi.js → chips-BDS9lkPa.js} +3 -3
  50. package/dist/chips-BDS9lkPa.js.map +1 -0
  51. package/dist/{chips-B-27tj7O.cjs → chips-D6ptH5re.cjs} +1 -1
  52. package/dist/chips-D6ptH5re.cjs.map +1 -0
  53. package/dist/chips.cjs +1 -1
  54. package/dist/chips.js +2 -2
  55. package/dist/{code-highlight-DgZKqo4P.js → code-highlight-Bi91XHJN.js} +1 -1
  56. package/dist/{code-highlight-DgZKqo4P.js.map → code-highlight-Bi91XHJN.js.map} +1 -1
  57. package/dist/{code-highlight-_ZK6FEjF.cjs → code-highlight-BzRmBZzz.cjs} +1 -1
  58. package/dist/{code-highlight-_ZK6FEjF.cjs.map → code-highlight-BzRmBZzz.cjs.map} +1 -1
  59. package/dist/code-highlight.cjs +1 -1
  60. package/dist/code-highlight.js +1 -1
  61. package/dist/{components-JHIoVqFd.js → components-DZgJWHdZ.js} +1 -1
  62. package/dist/{components-JHIoVqFd.js.map → components-DZgJWHdZ.js.map} +1 -1
  63. package/dist/{components-DUiF-_Ul.cjs → components-DkmEgyAc.cjs} +1 -1
  64. package/dist/{components-DUiF-_Ul.cjs.map → components-DkmEgyAc.cjs.map} +1 -1
  65. package/dist/components.cjs +1 -1
  66. package/dist/components.js +1 -1
  67. package/dist/connectivity.cjs +1 -1
  68. package/dist/connectivity.js +1 -1
  69. package/dist/content-drawer.cjs +1 -1
  70. package/dist/content-drawer.js +1 -1
  71. package/dist/context-BerzpUhI.js +3 -0
  72. package/dist/{context-BCFNNkes.js.map → context-BerzpUhI.js.map} +1 -1
  73. package/dist/context-C6dHUHhi.cjs +1 -0
  74. package/dist/{context-6t-yayy3.cjs.map → context-C6dHUHhi.cjs.map} +1 -1
  75. package/dist/{date-range-CrAIk8dg.cjs → date-range-BmFxTXiU.cjs} +1 -1
  76. package/dist/{date-range-CrAIk8dg.cjs.map → date-range-BmFxTXiU.cjs.map} +1 -1
  77. package/dist/{date-range-B1FDRGRB.js → date-range-ClTMg1AB.js} +2 -2
  78. package/dist/{date-range-B1FDRGRB.js.map → date-range-ClTMg1AB.js.map} +1 -1
  79. package/dist/date-range.cjs +1 -1
  80. package/dist/date-range.js +1 -1
  81. package/dist/{delay-DCp_QEct.cjs → delay-BHODnTg-.cjs} +1 -1
  82. package/dist/{delay-DCp_QEct.cjs.map → delay-BHODnTg-.cjs.map} +1 -1
  83. package/dist/{delay-Cs0i_CpQ.js → delay-Dlk0A3he.js} +3 -3
  84. package/dist/{delay-Cs0i_CpQ.js.map → delay-Dlk0A3he.js.map} +1 -1
  85. package/dist/delay.cjs +1 -1
  86. package/dist/delay.js +1 -1
  87. package/dist/{details-CBoXUDlQ.js → details-CPjlqQD4.js} +1 -1
  88. package/dist/{details-CBoXUDlQ.js.map → details-CPjlqQD4.js.map} +1 -1
  89. package/dist/{details-BJTR16AV.cjs → details-Cz9ok9si.cjs} +1 -1
  90. package/dist/{details-BJTR16AV.cjs.map → details-Cz9ok9si.cjs.map} +1 -1
  91. package/dist/details.cjs +1 -1
  92. package/dist/details.js +1 -1
  93. package/dist/dialog.cjs +1 -1
  94. package/dist/dialog.js +1 -1
  95. package/dist/{divider-D6MRonTS.cjs → divider-CILo3_vi.cjs} +1 -1
  96. package/dist/{divider-D6MRonTS.cjs.map → divider-CILo3_vi.cjs.map} +1 -1
  97. package/dist/{divider-DivkYKa_.js → divider-ghgyw5CU.js} +1 -1
  98. package/dist/{divider-DivkYKa_.js.map → divider-ghgyw5CU.js.map} +1 -1
  99. package/dist/divider.cjs +1 -1
  100. package/dist/divider.js +1 -1
  101. package/dist/dropdown.cjs +1 -1
  102. package/dist/dropdown.js +2 -2
  103. package/dist/{expand-BvAVo29n.js → expand-CbjBr_Ds.js} +2 -2
  104. package/dist/{expand-BvAVo29n.js.map → expand-CbjBr_Ds.js.map} +1 -1
  105. package/dist/{expand-Dd0H6y8Z.cjs → expand-r3OrSoDk.cjs} +1 -1
  106. package/dist/{expand-Dd0H6y8Z.cjs.map → expand-r3OrSoDk.cjs.map} +1 -1
  107. package/dist/expand.cjs +1 -1
  108. package/dist/expand.js +1 -1
  109. package/dist/{extra-CdOUiB0K.cjs → extra-BZeZOMBI.cjs} +1 -1
  110. package/dist/{extra-CdOUiB0K.cjs.map → extra-BZeZOMBI.cjs.map} +1 -1
  111. package/dist/{extra-0MZSXbOH.js → extra-DK9MQtPJ.js} +1 -1
  112. package/dist/{extra-0MZSXbOH.js.map → extra-DK9MQtPJ.js.map} +1 -1
  113. package/dist/extra.cjs +1 -1
  114. package/dist/extra.js +1 -1
  115. package/dist/{float-D_u8mDNa.js → float-BfCvGeY9.js} +1 -1
  116. package/dist/{float-D_u8mDNa.js.map → float-BfCvGeY9.js.map} +1 -1
  117. package/dist/{float-ByW-Gth3.cjs → float-CuZ8LOgB.cjs} +1 -1
  118. package/dist/{float-ByW-Gth3.cjs.map → float-CuZ8LOgB.cjs.map} +1 -1
  119. package/dist/float.cjs +1 -1
  120. package/dist/float.js +1 -1
  121. package/dist/handover/agent-runtime-followups.md +1 -1
  122. package/dist/handover/agent-runtime-v1.md +3 -3
  123. package/dist/handover/agent-runtime-v2-loopback.md +5 -5
  124. package/dist/handover/schmancy-token-reference.md +198 -0
  125. package/dist/{icons-24zlLf1q.js → icons-Drq4kKy2.js} +2 -2
  126. package/dist/{icons-24zlLf1q.js.map → icons-Drq4kKy2.js.map} +1 -1
  127. package/dist/{icons-BpHN4Z8q.cjs → icons-DtdhaZdc.cjs} +1 -1
  128. package/dist/{icons-BpHN4Z8q.cjs.map → icons-DtdhaZdc.cjs.map} +1 -1
  129. package/dist/icons.cjs +1 -1
  130. package/dist/icons.js +1 -1
  131. package/dist/{iframe-BXzYZu9_.cjs → iframe-BkwwWIbQ.cjs} +1 -1
  132. package/dist/{iframe-BXzYZu9_.cjs.map → iframe-BkwwWIbQ.cjs.map} +1 -1
  133. package/dist/{iframe-B_QrvTmj.js → iframe-BmyHW8km.js} +1 -1
  134. package/dist/{iframe-B_QrvTmj.js.map → iframe-BmyHW8km.js.map} +1 -1
  135. package/dist/iframe.cjs +1 -1
  136. package/dist/iframe.js +1 -1
  137. package/dist/index.cjs +1 -1
  138. package/dist/index.js +30 -30
  139. package/dist/{input-chip-C09B0L1y.js → input-chip-BQrjpjaQ.js} +1 -1
  140. package/dist/{input-chip-C09B0L1y.js.map → input-chip-BQrjpjaQ.js.map} +1 -1
  141. package/dist/{input-chip-FZEpuSaX.cjs → input-chip-DN-cwf11.cjs} +1 -1
  142. package/dist/{input-chip-FZEpuSaX.cjs.map → input-chip-DN-cwf11.cjs.map} +1 -1
  143. package/dist/json.cjs +1 -1
  144. package/dist/json.js +2 -2
  145. package/dist/kbd.cjs +1 -1
  146. package/dist/kbd.js +1 -1
  147. package/dist/{layout-Bst19YG8.cjs → layout-7eyMBmZk.cjs} +1 -1
  148. package/dist/{layout-Bst19YG8.cjs.map → layout-7eyMBmZk.cjs.map} +1 -1
  149. package/dist/{layout-aTtUdGAi.js → layout-Ox6nJkzC.js} +2 -2
  150. package/dist/{layout-aTtUdGAi.js.map → layout-Ox6nJkzC.js.map} +1 -1
  151. package/dist/layout.cjs +1 -1
  152. package/dist/layout.js +2 -2
  153. package/dist/{lightbox-Cb5-XPWV.js → lightbox-CY52Z_ig.js} +2 -2
  154. package/dist/lightbox-CY52Z_ig.js.map +1 -0
  155. package/dist/{lightbox-Dk2ICCBB.cjs → lightbox-H8Uq3AXy.cjs} +1 -1
  156. package/dist/lightbox-H8Uq3AXy.cjs.map +1 -0
  157. package/dist/lightbox.cjs +1 -1
  158. package/dist/lightbox.js +1 -1
  159. package/dist/{list-DBiecR1i.cjs → list-BGjVo6zb.cjs} +1 -1
  160. package/dist/{list-DBiecR1i.cjs.map → list-BGjVo6zb.cjs.map} +1 -1
  161. package/dist/{list-DZWoCb3V.js → list-D7wUxu1C.js} +2 -2
  162. package/dist/{list-DZWoCb3V.js.map → list-D7wUxu1C.js.map} +1 -1
  163. package/dist/list.cjs +1 -1
  164. package/dist/list.js +1 -1
  165. package/dist/{litElement.mixin-BuZ28ZzP.js → litElement.mixin-CszkJuNl.js} +1 -1
  166. package/dist/{litElement.mixin-BuZ28ZzP.js.map → litElement.mixin-CszkJuNl.js.map} +1 -1
  167. package/dist/{litElement.mixin-lYlKxxjR.cjs → litElement.mixin-qh5-IIUq.cjs} +1 -1
  168. package/dist/{litElement.mixin-lYlKxxjR.cjs.map → litElement.mixin-qh5-IIUq.cjs.map} +1 -1
  169. package/dist/{mailbox-laG7nvXl.js → mailbox--EN-JhjV.js} +4 -4
  170. package/dist/{mailbox-laG7nvXl.js.map → mailbox--EN-JhjV.js.map} +1 -1
  171. package/dist/{mailbox-BYNmcNIM.cjs → mailbox-DLiBGJhY.cjs} +1 -1
  172. package/dist/{mailbox-BYNmcNIM.cjs.map → mailbox-DLiBGJhY.cjs.map} +1 -1
  173. package/dist/mailbox.cjs +1 -1
  174. package/dist/mailbox.js +1 -1
  175. package/dist/{map-YSAPFrH9.js → map-B0S_q3ma.js} +1 -1
  176. package/dist/{map-YSAPFrH9.js.map → map-B0S_q3ma.js.map} +1 -1
  177. package/dist/{map-7_cexh1e.cjs → map-EDQN0I6e.cjs} +1 -1
  178. package/dist/{map-7_cexh1e.cjs.map → map-EDQN0I6e.cjs.map} +1 -1
  179. package/dist/map.cjs +1 -1
  180. package/dist/map.js +1 -1
  181. package/dist/{menu-RaeiF4Ja.cjs → menu-3edZGQ1x.cjs} +1 -1
  182. package/dist/{menu-RaeiF4Ja.cjs.map → menu-3edZGQ1x.cjs.map} +1 -1
  183. package/dist/{menu-DeNdlsSV.js → menu-COeFpb6n.js} +1 -1
  184. package/dist/{menu-DeNdlsSV.js.map → menu-COeFpb6n.js.map} +1 -1
  185. package/dist/menu.cjs +1 -1
  186. package/dist/menu.js +1 -1
  187. package/dist/metric.cjs +1 -1
  188. package/dist/metric.js +1 -1
  189. package/dist/mixins.cjs +1 -1
  190. package/dist/mixins.js +2 -2
  191. package/dist/nav-drawer.cjs +1 -1
  192. package/dist/nav-drawer.js +1 -1
  193. package/dist/navigation-bar.cjs +1 -1
  194. package/dist/navigation-bar.js +1 -1
  195. package/dist/navigation-rail.cjs +1 -1
  196. package/dist/navigation-rail.js +1 -1
  197. package/dist/{notification-DRPjMDli.js → notification-CC-TFN5v.js} +2 -2
  198. package/dist/{notification-DRPjMDli.js.map → notification-CC-TFN5v.js.map} +1 -1
  199. package/dist/{notification-DqWW2oh9.cjs → notification-P4c-kFdH.cjs} +1 -1
  200. package/dist/{notification-DqWW2oh9.cjs.map → notification-P4c-kFdH.cjs.map} +1 -1
  201. package/dist/notification.cjs +1 -1
  202. package/dist/notification.js +1 -1
  203. package/dist/{option-N3wlHTc9.js → option-BwAF4nAw.js} +1 -1
  204. package/dist/{option-N3wlHTc9.js.map → option-BwAF4nAw.js.map} +1 -1
  205. package/dist/{option-1lYctKVI.cjs → option-Cu0ertuF.cjs} +1 -1
  206. package/dist/{option-1lYctKVI.cjs.map → option-Cu0ertuF.cjs.map} +1 -1
  207. package/dist/option.cjs +1 -1
  208. package/dist/option.js +1 -1
  209. package/dist/overlay.cjs +1 -1
  210. package/dist/overlay.js +1 -1
  211. package/dist/page.cjs +1 -1
  212. package/dist/page.js +2 -2
  213. package/dist/{progress-DhcXo8r-.js → progress-Bk_Q1Shy.js} +1 -1
  214. package/dist/{progress-DhcXo8r-.js.map → progress-Bk_Q1Shy.js.map} +1 -1
  215. package/dist/{progress-YOuASkdz.cjs → progress-Yz6EMNSu.cjs} +1 -1
  216. package/dist/{progress-YOuASkdz.cjs.map → progress-Yz6EMNSu.cjs.map} +1 -1
  217. package/dist/progress.cjs +1 -1
  218. package/dist/progress.js +1 -1
  219. package/dist/{provide-B7b5TOCD.cjs → provide-CYgj58u_.cjs} +1 -1
  220. package/dist/{provide-B7b5TOCD.cjs.map → provide-CYgj58u_.cjs.map} +1 -1
  221. package/dist/{provide-uCFRzgWs.js → provide-ydIskwf2.js} +1 -1
  222. package/dist/{provide-uCFRzgWs.js.map → provide-ydIskwf2.js.map} +1 -1
  223. package/dist/qr-scanner.cjs +1 -1
  224. package/dist/qr-scanner.js +1 -1
  225. package/dist/{radio-group-DchZApJl.js → radio-group-BcdcjLNC.js} +1 -1
  226. package/dist/{radio-group-DchZApJl.js.map → radio-group-BcdcjLNC.js.map} +1 -1
  227. package/dist/{radio-group-DYvIgv3P.cjs → radio-group-BpBz5tRA.cjs} +1 -1
  228. package/dist/{radio-group-DYvIgv3P.cjs.map → radio-group-BpBz5tRA.cjs.map} +1 -1
  229. package/dist/radio-group.cjs +1 -1
  230. package/dist/radio-group.js +1 -1
  231. package/dist/range.cjs +1 -1
  232. package/dist/range.js +1 -1
  233. package/dist/{scroll-G2YnteF9.js → scroll-DXQv0ejL.js} +1 -1
  234. package/dist/{scroll-G2YnteF9.js.map → scroll-DXQv0ejL.js.map} +1 -1
  235. package/dist/{scroll-BKn4essm.cjs → scroll-DbZMTv0K.cjs} +1 -1
  236. package/dist/{scroll-BKn4essm.cjs.map → scroll-DbZMTv0K.cjs.map} +1 -1
  237. package/dist/{select-CQGKkEZc.cjs → select-BV4lK2zy.cjs} +1 -1
  238. package/dist/{select-CQGKkEZc.cjs.map → select-BV4lK2zy.cjs.map} +1 -1
  239. package/dist/{select-Bydjuia9.js → select-DKyGWDsG.js} +1 -1
  240. package/dist/{select-Bydjuia9.js.map → select-DKyGWDsG.js.map} +1 -1
  241. package/dist/select.cjs +1 -1
  242. package/dist/select.js +1 -1
  243. package/dist/{sheet-BCxpHT62.cjs → sheet-BAI_jH1t.cjs} +1 -1
  244. package/dist/{sheet-BCxpHT62.cjs.map → sheet-BAI_jH1t.cjs.map} +1 -1
  245. package/dist/{sheet-DGfh9VSs.js → sheet-C3TLKItO.js} +3 -3
  246. package/dist/{sheet-DGfh9VSs.js.map → sheet-C3TLKItO.js.map} +1 -1
  247. package/dist/sheet.cjs +1 -1
  248. package/dist/sheet.js +2 -2
  249. package/dist/{sheet.service-Dy_fwQqQ.js → sheet.service-Dlv20Zfc.js} +1 -1
  250. package/dist/{sheet.service-Dy_fwQqQ.js.map → sheet.service-Dlv20Zfc.js.map} +1 -1
  251. package/dist/{sheet.service-B-RxqhpO.cjs → sheet.service-RcDBwHmv.cjs} +1 -1
  252. package/dist/{sheet.service-B-RxqhpO.cjs.map → sheet.service-RcDBwHmv.cjs.map} +1 -1
  253. package/dist/skeleton.cjs +1 -1
  254. package/dist/skeleton.js +1 -1
  255. package/dist/slider.cjs +1 -1
  256. package/dist/slider.js +1 -1
  257. package/dist/{splash-screen-Clv-5vsb.js → splash-screen-DbI5RgBf.js} +1 -1
  258. package/dist/{splash-screen-Clv-5vsb.js.map → splash-screen-DbI5RgBf.js.map} +1 -1
  259. package/dist/{splash-screen-C2xsOEdx.cjs → splash-screen-DoHRTHi8.cjs} +1 -1
  260. package/dist/{splash-screen-C2xsOEdx.cjs.map → splash-screen-DoHRTHi8.cjs.map} +1 -1
  261. package/dist/splash-screen.cjs +1 -1
  262. package/dist/splash-screen.js +1 -1
  263. package/dist/{src-DNuhxDig.js → src-00DfxCJq.js} +39 -39
  264. package/dist/{src-DNuhxDig.js.map → src-00DfxCJq.js.map} +1 -1
  265. package/dist/{src-Ci10_Iwf.cjs → src-C_JjQovE.cjs} +1 -1
  266. package/dist/{src-Ci10_Iwf.cjs.map → src-C_JjQovE.cjs.map} +1 -1
  267. package/dist/steps.cjs +1 -1
  268. package/dist/steps.js +3 -3
  269. package/dist/{surface-fEmoN08Y.cjs → surface-D-GWBcsh.cjs} +1 -1
  270. package/dist/{surface-fEmoN08Y.cjs.map → surface-D-GWBcsh.cjs.map} +1 -1
  271. package/dist/{surface-BWcq30OL.js → surface-D23JtxYP.js} +2 -2
  272. package/dist/{surface-BWcq30OL.js.map → surface-D23JtxYP.js.map} +1 -1
  273. package/dist/surface.cjs +1 -1
  274. package/dist/surface.js +1 -1
  275. package/dist/switch.cjs +1 -1
  276. package/dist/switch.js +1 -1
  277. package/dist/{table-ChHS4xby.cjs → table-C7b73kdg.cjs} +1 -1
  278. package/dist/{table-ChHS4xby.cjs.map → table-C7b73kdg.cjs.map} +1 -1
  279. package/dist/{table-B8H-zioX.js → table-CTrhV9-k.js} +1 -1
  280. package/dist/{table-B8H-zioX.js.map → table-CTrhV9-k.js.map} +1 -1
  281. package/dist/table.cjs +1 -1
  282. package/dist/table.js +1 -1
  283. package/dist/{tabs-DB5kSuGL.js → tabs-Ce55RbwF.js} +2 -2
  284. package/dist/{tabs-DB5kSuGL.js.map → tabs-Ce55RbwF.js.map} +1 -1
  285. package/dist/{tabs-DGmbqqBD.cjs → tabs-DAzB8O7w.cjs} +1 -1
  286. package/dist/{tabs-DGmbqqBD.cjs.map → tabs-DAzB8O7w.cjs.map} +1 -1
  287. package/dist/tabs.cjs +1 -1
  288. package/dist/tabs.js +1 -1
  289. package/dist/tailwind.mixin-DRI1oTYQ.cjs +2 -0
  290. package/dist/{tailwind.mixin-BHX99hgX.cjs.map → tailwind.mixin-DRI1oTYQ.cjs.map} +1 -1
  291. package/dist/tailwind.mixin-mdQR3BEO.js +219 -0
  292. package/dist/{tailwind.mixin-DIEGVcl3.js.map → tailwind.mixin-mdQR3BEO.js.map} +1 -1
  293. package/dist/teleport.cjs +1 -1
  294. package/dist/teleport.js +1 -1
  295. package/dist/{textarea-O9A58OZA.js → textarea-DjN1D9u0.js} +1 -1
  296. package/dist/{textarea-O9A58OZA.js.map → textarea-DjN1D9u0.js.map} +1 -1
  297. package/dist/{textarea-CfQnghhD.cjs → textarea-PuHxBvJA.cjs} +1 -1
  298. package/dist/{textarea-CfQnghhD.cjs.map → textarea-PuHxBvJA.cjs.map} +1 -1
  299. package/dist/textarea.cjs +1 -1
  300. package/dist/textarea.js +1 -1
  301. package/dist/{theme-BjnQjhR0.cjs → theme-B-IJ2r7Q.cjs} +1 -1
  302. package/dist/{theme-BjnQjhR0.cjs.map → theme-B-IJ2r7Q.cjs.map} +1 -1
  303. package/dist/{theme-button-CaxDEneM.cjs → theme-button-BSbYmS4p.cjs} +1 -1
  304. package/dist/{theme-button-CaxDEneM.cjs.map → theme-button-BSbYmS4p.cjs.map} +1 -1
  305. package/dist/{theme-button-ByImreDw.js → theme-button-CEMeAUOL.js} +1 -1
  306. package/dist/{theme-button-ByImreDw.js.map → theme-button-CEMeAUOL.js.map} +1 -1
  307. package/dist/theme-button.cjs +1 -1
  308. package/dist/theme-button.js +1 -1
  309. package/dist/{theme-DvCKLRkt.js → theme-pbxlt72h.js} +3 -3
  310. package/dist/{theme-DvCKLRkt.js.map → theme-pbxlt72h.js.map} +1 -1
  311. package/dist/theme.cjs +1 -1
  312. package/dist/theme.js +2 -2
  313. package/dist/tree.cjs +1 -1
  314. package/dist/tree.cjs.map +1 -1
  315. package/dist/tree.js +1 -1
  316. package/dist/tree.js.map +1 -1
  317. package/dist/typewriter.cjs +1 -1
  318. package/dist/typewriter.cjs.map +1 -1
  319. package/dist/typewriter.js +3 -3
  320. package/dist/typewriter.js.map +1 -1
  321. package/dist/typography.cjs +1 -1
  322. package/dist/typography.cjs.map +1 -1
  323. package/dist/typography.js +1 -1
  324. package/dist/typography.js.map +1 -1
  325. package/dist/visually-hidden.cjs +1 -1
  326. package/dist/visually-hidden.js +1 -1
  327. package/dist/{window-C8kImMiI.js → window-CrjZdf7Y.js} +1 -1
  328. package/dist/{window-C8kImMiI.js.map → window-CrjZdf7Y.js.map} +1 -1
  329. package/dist/{window-BhrSdbk2.cjs → window-DTUARSrU.cjs} +1 -1
  330. package/dist/{window-BhrSdbk2.cjs.map → window-DTUARSrU.cjs.map} +1 -1
  331. package/dist/window.cjs +1 -1
  332. package/dist/window.js +1 -1
  333. package/package.json +1 -1
  334. package/src/agent/virtual-manifest.d.ts +12 -1
  335. package/src/area/area.component.ts +14 -0
  336. package/src/card/card.ts +1 -0
  337. package/src/chips/assist-chip.ts +11 -2
  338. package/src/chips/suggestion-chip.ts +9 -6
  339. package/src/lightbox/lightbox.ts +11 -0
  340. package/src/radio-group/radio-button.ts +1 -0
  341. package/src/table/table.ts +8 -2
  342. package/src/tree/tree.ts +1 -0
  343. package/src/typewriter/typewriter.ts +12 -0
  344. package/src/typography/typography.ts +1 -0
  345. package/types/src/area/area.component.d.ts +14 -0
  346. package/types/src/card/card.d.ts +1 -0
  347. package/types/src/chips/assist-chip.d.ts +11 -2
  348. package/types/src/chips/suggestion-chip.d.ts +9 -6
  349. package/types/src/lightbox/lightbox.d.ts +11 -0
  350. package/types/src/radio-group/radio-button.d.ts +1 -0
  351. package/types/src/table/table.d.ts +8 -2
  352. package/types/src/tree/tree.d.ts +1 -0
  353. package/types/src/typewriter/typewriter.d.ts +12 -0
  354. package/types/src/typography/typography.d.ts +1 -0
  355. package/dist/area-CFLFXu0Z.cjs.map +0 -1
  356. package/dist/area-CfozaCAZ.js.map +0 -1
  357. package/dist/card-CTUaARLm.js.map +0 -1
  358. package/dist/card-DtN6p1Jq.cjs.map +0 -1
  359. package/dist/chips-B-27tj7O.cjs.map +0 -1
  360. package/dist/chips-DhAWrSgi.js.map +0 -1
  361. package/dist/context-6t-yayy3.cjs +0 -1
  362. package/dist/context-BCFNNkes.js +0 -3
  363. package/dist/lightbox-Cb5-XPWV.js.map +0 -1
  364. package/dist/lightbox-Dk2ICCBB.cjs.map +0 -1
  365. package/dist/tailwind.mixin-BHX99hgX.cjs +0 -2
  366. package/dist/tailwind.mixin-DIEGVcl3.js +0 -219
package/dist/theme.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./tailwind.mixin-BHX99hgX.cjs`),t=require(`./theme.events-DakXxZeP.cjs`),n=require(`./theme.service-DxJPUGlu.cjs`),r=require(`./theme.interface-DTwkuAKJ.cjs`),i=require(`./theme-BjnQjhR0.cjs`);exports.SchmancyGenerateMoodAudioEvent=i.n,exports.SchmancyTheme=r.t,Object.defineProperty(exports,`SchmancyThemeAudioPlayer`,{enumerable:!0,get:function(){return i.r}}),Object.defineProperty(exports,`SchmancyThemeComponent`,{enumerable:!0,get:function(){return i.a}}),Object.defineProperty(exports,`SchmancyThemeController`,{enumerable:!0,get:function(){return i.i}}),Object.defineProperty(exports,`SchmancyThemeControllerBoat`,{enumerable:!0,get:function(){return i.t}}),exports.ThemeHereIAm=t.t,exports.ThemeWhereAreYou=t.n,exports.createDarkTonalPaletteFromBaseColor=i.s,exports.createLightTonalPaletteFromBaseColor=i.c,exports.formatTheme=i.l,exports.schmancyTheme=n.t,exports.tailwindStyles=i.o,exports.theme=n.n,exports.themeContext=e.i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./tailwind.mixin-DRI1oTYQ.cjs`),t=require(`./theme.events-DakXxZeP.cjs`),n=require(`./theme.service-DxJPUGlu.cjs`),r=require(`./theme.interface-DTwkuAKJ.cjs`),i=require(`./theme-B-IJ2r7Q.cjs`);exports.SchmancyGenerateMoodAudioEvent=i.n,exports.SchmancyTheme=r.t,Object.defineProperty(exports,`SchmancyThemeAudioPlayer`,{enumerable:!0,get:function(){return i.r}}),Object.defineProperty(exports,`SchmancyThemeComponent`,{enumerable:!0,get:function(){return i.a}}),Object.defineProperty(exports,`SchmancyThemeController`,{enumerable:!0,get:function(){return i.i}}),Object.defineProperty(exports,`SchmancyThemeControllerBoat`,{enumerable:!0,get:function(){return i.t}}),exports.ThemeHereIAm=t.t,exports.ThemeWhereAreYou=t.n,exports.createDarkTonalPaletteFromBaseColor=i.s,exports.createLightTonalPaletteFromBaseColor=i.c,exports.formatTheme=i.l,exports.schmancyTheme=n.t,exports.tailwindStyles=i.o,exports.theme=n.n,exports.themeContext=e.i;
package/dist/theme.js CHANGED
@@ -1,6 +1,6 @@
1
- import { i as e } from "./tailwind.mixin-DIEGVcl3.js";
1
+ import { i as e } from "./tailwind.mixin-mdQR3BEO.js";
2
2
  import { n as t, t as n } from "./theme.events-NuihzD_p.js";
3
3
  import { n as r, t as i } from "./theme.service-cOfPrtfe.js";
4
4
  import { t as a } from "./theme.interface-Buged9Cg.js";
5
- import { a as o, c as s, i as c, l, n as u, o as d, r as f, s as p, t as m } from "./theme-DvCKLRkt.js";
5
+ import { a as o, c as s, i as c, l, n as u, o as d, r as f, s as p, t as m } from "./theme-pbxlt72h.js";
6
6
  export { u as SchmancyGenerateMoodAudioEvent, a as SchmancyTheme, f as SchmancyThemeAudioPlayer, o as SchmancyThemeComponent, c as SchmancyThemeController, m as SchmancyThemeControllerBoat, n as ThemeHereIAm, t as ThemeWhereAreYou, p as createDarkTonalPaletteFromBaseColor, s as createLightTonalPaletteFromBaseColor, l as formatTheme, i as schmancyTheme, d as tailwindStyles, r as theme, e as themeContext };
package/dist/tree.cjs CHANGED
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-BHX99hgX.cjs`),t=require(`./decorate-F9CuyeHg.cjs`);require(`./mixins.cjs`);let n=require(`rxjs`),r=require(`lit/decorators.js`),i=require(`lit`);var a=class extends e.t(i.css`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-DRI1oTYQ.cjs`),t=require(`./decorate-F9CuyeHg.cjs`);require(`./mixins.cjs`);let n=require(`rxjs`),r=require(`lit/decorators.js`),i=require(`lit`);var a=class extends e.t(i.css`
2
2
  :host {
3
3
  display: block;
4
4
  position: relative;
package/dist/tree.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tree.cjs","names":[],"sources":["../src/tree/tree.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { fromEvent, merge, switchMap, takeUntil, tap, zip } from 'rxjs'\n\n/**\n * Expandable tree node — a recursive disclosure widget. One root slot, one default slot for child nodes. Each node can itself contain schmancy-tree children.\n *\n * @element schmancy-tree\n * @summary Use for hierarchical navigation / file-explorer layouts. Each level is a schmancy-tree with a `root` slot (the parent label) and default slot (the children, which may be more schmancy-trees).\n * @example\n * <schmancy-tree>\n * <schmancy-list-item slot=\"root\">src/</schmancy-list-item>\n * <schmancy-tree>\n * <schmancy-list-item slot=\"root\">components/</schmancy-list-item>\n * <schmancy-list-item>button.ts</schmancy-list-item>\n * </schmancy-tree>\n * </schmancy-tree>\n * @platform details toggle - Recursive `<details>`-like disclosure. Degrades to a plain nested list if the tag never registers — loses expand/collapse but stays navigable.\n * @slot root - The root element of the tree\n * @slot - The children of the tree\n */\n@customElement('schmancy-tree')\nexport class SchmancyTree extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tbackground-color: initial;\n\t}\n\t::slotted([slot='root']) {\n\t\twidth: 100%;\n\t\ttext-align: left;\n\t}\n\t::slotted([slot='root'] + *) {\n\t\tmargin-top: 0.5rem;\n\t}\n`) {\n\t/**\n\t * Whether the tree’s children are visible\n\t */\n\t@property({ type: Boolean }) open = false\n\n\t@query('#toggler') toggler!: HTMLSlotElement\n\t@query('slot:not([name=\"root\"])') defaultSlot!: HTMLSlotElement\n\n\t// Since it's actually a <schmancy-button>, use HTMLElement or a custom type\n\t@query('#chevron') chevron!: HTMLElement\n\n\tprivate readonly _a11yId = `schmancy-tree-${Math.random().toString(36).slice(2, 10)}`\n\tprivate get _contentId() { return `${this._a11yId}-content` }\n\n\t/** ElementInternals — broadcasts `:state(open)` for consumer CSS. */\n\tprivate readonly _internals: ElementInternals | undefined = (() => {\n\t\ttry { return this.attachInternals() } catch { return undefined }\n\t})()\n\n\tupdated(changed: Map<string, unknown>) {\n\t\tsuper.updated?.(changed)\n\t\tif (changed.has('open')) {\n\t\t\tif (this.open) this._internals?.states.add('open')\n\t\t\telse this._internals?.states.delete('open')\n\t\t}\n\t}\n\n\tfirstUpdated() {\n\t\t// Hide or show the slot initially based on `open`\n\t\tif (!this.open) {\n\t\t\tthis.defaultSlot.hidden = true\n\t\t}\n\n\t\t// Root toggler\n\t\tconst toggleClick$ = fromEvent<MouseEvent>(this.toggler, 'click').pipe(\n\t\t\ttakeUntil(this.disconnecting),\n\t\t\ttap(e => {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.dispatchEvent(new CustomEvent('toggle', { bubbles: false, composed: true }))\n\t\t\t}),\n\t\t)\n\n\t\t// Chevron (the schmancy-button) click\n\t\tconst chevronClick$ = fromEvent<MouseEvent>(this.chevron, 'click')\n\n\t\tmerge(toggleClick$, chevronClick$)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(() => {\n\t\t\t\t\t// 1. Animate the chevron rotation\n\t\t\t\t\t// If `open` is true, rotate from 180 -> 0; if false, from 0 -> 180\n\t\t\t\t\tconst fromDeg = this.open ? 180 : 0\n\t\t\t\t\tconst toDeg = this.open ? 0 : 180\n\t\t\t\t\tconst chevronAnimation = this.chevron.animate(\n\t\t\t\t\t\t[{ transform: `rotate(${fromDeg}deg)` }, { transform: `rotate(${toDeg}deg)` }],\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: 150,\n\t\t\t\t\t\t\teasing: 'ease-in',\n\t\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t\t},\n\t\t\t\t\t)\n\n\t\t\t\t\t// 2. Animate the slot’s height + opacity\n\t\t\t\t\tif (!this.open) {\n\t\t\t\t\t\t// We are about to open, so remove `hidden` to measure scrollHeight\n\t\t\t\t\t\tthis.defaultSlot.hidden = false\n\t\t\t\t\t}\n\n\t\t\t\t\tconst fromOpacity = this.open ? 1 : 0\n\t\t\t\t\tconst toOpacity = this.open ? 0 : 1\n\n\t\t\t\t\tconst slotAnimation = this.defaultSlot.animate([{ opacity: fromOpacity }, { opacity: toOpacity }], {\n\t\t\t\t\t\tduration: 150,\n\t\t\t\t\t\teasing: 'ease-out',\n\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t})\n\n\t\t\t\t\t// Hide the slot if we just closed it\n\t\t\t\t\tslotAnimation.onfinish = () => {\n\t\t\t\t\t\tif (this.open) {\n\t\t\t\t\t\t\tthis.defaultSlot.hidden = true\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.defaultSlot.style.height = 'auto'\n\t\t\t\t\t\t\tthis.defaultSlot.style.opacity = '1'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Return an Observable that completes when both animations finish\n\t\t\t\t\treturn zip(fromEvent(chevronAnimation, 'finish'), fromEvent(slotAnimation, 'finish')).pipe(\n\t\t\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\ttap(() => {\n\t\t\t\t\t// Flip the open state\n\t\t\t\t\tthis.open = !this.open\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"flex content-center items-center justify-between\">\n\t\t\t\t<!-- Root toggler content -->\n\t\t\t\t<slot id=\"toggler\" name=\"root\"></slot>\n\n\t\t\t\t<!-- The chevron or arrow symbol -->\n\t\t\t\t<!-- Stop propagation on the schmancy-button itself just to avoid double triggers -->\n\t\t\t\t<schmancy-button\n\t\t\t\t\tslot=\"trailing\"\n\t\t\t\t\tid=\"chevron\"\n\t\t\t\t\taria-expanded=${this.open ? 'true' : 'false'}\n\t\t\t\t\taria-controls=${this._contentId}\n\t\t\t\t\taria-label=${this.open ? 'Collapse' : 'Expand'}\n\t\t\t\t\t@click=${(e: Event) => e.stopPropagation()}\n\t\t\t\t>\n\t\t\t\t\t⌅\n\t\t\t\t</schmancy-button>\n\t\t\t</div>\n\n\t\t\t<!-- The default slot: tree children -->\n\t\t\t<slot id=${this._contentId}></slot>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-tree': SchmancyTree\n\t}\n}\n"],"mappings":"uRAuBO,IAAA,EAAA,cAA2B,EAAA,EAAgB,EAAA,GAAG;;;;;;;;;;;;;4CAiBhB,EAAA,KAAA,QAQT,iBAAiB,KAAK,QAAA,CAAS,SAAS,GAAA,CAAI,MAAM,EAAG,GAAA,GAAA,KAAA,gBAAA,CAK/E,GAAA,CAAM,OAAO,KAAK,iBAAA,MAAA,CAA4B,WAAA,CAJ/C,IAAA,YAAY,CAAe,MAAO,GAAG,KAAK,QAAA,UAO1C,QAAQ,EAAA,CACP,MAAM,UAAU,EAAA,CACZ,EAAQ,IAAI,OAAA,GACX,KAAK,KAAM,KAAK,YAAY,OAAO,IAAI,OAAA,CACtC,KAAK,YAAY,OAAO,OAAO,OAAA,EAItC,cAAA,CAEM,KAAK,OACT,KAAK,YAAY,OAAA,CAAS,IAgB3B,EAAA,EAAA,QAAA,EAAA,EAAA,WAZ2C,KAAK,QAAS,QAAA,CAAS,MAAA,E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R,KAAK,KAAO,WAAa,SAAA;cAC5B,GAAa,EAAE,iBAAA,CAAA;;;;;;;cAOhB,KAAK,WAAA;0BAvHR,CAAE,KAAM,QAAA,CAAA,CAAA,CAAU,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAErB,WAAA,CAAA,CAAW,EAAA,UAAA,UAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OACX,0BAAA,CAAA,CAA0B,EAAA,UAAA,cAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAG1B,WAAA,CAAA,CAAW,EAAA,UAAA,UAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAxBJ,gBAAA,CAAA,CAAgB,EAAA,CAAA,OAAA,eAAA,QAAA,eAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"tree.cjs","names":[],"sources":["../src/tree/tree.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { fromEvent, merge, switchMap, takeUntil, tap, zip } from 'rxjs'\n\n/**\n * Expandable tree node — a recursive disclosure widget. One root slot, one default slot for child nodes. Each node can itself contain schmancy-tree children.\n *\n * @element schmancy-tree\n * @summary Use for hierarchical navigation / file-explorer layouts. Each level is a schmancy-tree with a `root` slot (the parent label) and default slot (the children, which may be more schmancy-trees).\n * @example\n * <schmancy-tree>\n * <schmancy-list-item slot=\"root\">src/</schmancy-list-item>\n * <schmancy-tree>\n * <schmancy-list-item slot=\"root\">components/</schmancy-list-item>\n * <schmancy-list-item>button.ts</schmancy-list-item>\n * </schmancy-tree>\n * </schmancy-tree>\n * @platform details toggle - Recursive `<details>`-like disclosure. Degrades to a plain nested list if the tag never registers — loses expand/collapse but stays navigable.\n * @slot root - The root element of the tree\n * @slot - The children of the tree\n * @fires toggle - When the root toggler or chevron is clicked. Fires before the open state flips; the host's `open` property reflects the new state on the next animation frame.\n */\n@customElement('schmancy-tree')\nexport class SchmancyTree extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tbackground-color: initial;\n\t}\n\t::slotted([slot='root']) {\n\t\twidth: 100%;\n\t\ttext-align: left;\n\t}\n\t::slotted([slot='root'] + *) {\n\t\tmargin-top: 0.5rem;\n\t}\n`) {\n\t/**\n\t * Whether the tree’s children are visible\n\t */\n\t@property({ type: Boolean }) open = false\n\n\t@query('#toggler') toggler!: HTMLSlotElement\n\t@query('slot:not([name=\"root\"])') defaultSlot!: HTMLSlotElement\n\n\t// Since it's actually a <schmancy-button>, use HTMLElement or a custom type\n\t@query('#chevron') chevron!: HTMLElement\n\n\tprivate readonly _a11yId = `schmancy-tree-${Math.random().toString(36).slice(2, 10)}`\n\tprivate get _contentId() { return `${this._a11yId}-content` }\n\n\t/** ElementInternals — broadcasts `:state(open)` for consumer CSS. */\n\tprivate readonly _internals: ElementInternals | undefined = (() => {\n\t\ttry { return this.attachInternals() } catch { return undefined }\n\t})()\n\n\tupdated(changed: Map<string, unknown>) {\n\t\tsuper.updated?.(changed)\n\t\tif (changed.has('open')) {\n\t\t\tif (this.open) this._internals?.states.add('open')\n\t\t\telse this._internals?.states.delete('open')\n\t\t}\n\t}\n\n\tfirstUpdated() {\n\t\t// Hide or show the slot initially based on `open`\n\t\tif (!this.open) {\n\t\t\tthis.defaultSlot.hidden = true\n\t\t}\n\n\t\t// Root toggler\n\t\tconst toggleClick$ = fromEvent<MouseEvent>(this.toggler, 'click').pipe(\n\t\t\ttakeUntil(this.disconnecting),\n\t\t\ttap(e => {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.dispatchEvent(new CustomEvent('toggle', { bubbles: false, composed: true }))\n\t\t\t}),\n\t\t)\n\n\t\t// Chevron (the schmancy-button) click\n\t\tconst chevronClick$ = fromEvent<MouseEvent>(this.chevron, 'click')\n\n\t\tmerge(toggleClick$, chevronClick$)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(() => {\n\t\t\t\t\t// 1. Animate the chevron rotation\n\t\t\t\t\t// If `open` is true, rotate from 180 -> 0; if false, from 0 -> 180\n\t\t\t\t\tconst fromDeg = this.open ? 180 : 0\n\t\t\t\t\tconst toDeg = this.open ? 0 : 180\n\t\t\t\t\tconst chevronAnimation = this.chevron.animate(\n\t\t\t\t\t\t[{ transform: `rotate(${fromDeg}deg)` }, { transform: `rotate(${toDeg}deg)` }],\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: 150,\n\t\t\t\t\t\t\teasing: 'ease-in',\n\t\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t\t},\n\t\t\t\t\t)\n\n\t\t\t\t\t// 2. Animate the slot’s height + opacity\n\t\t\t\t\tif (!this.open) {\n\t\t\t\t\t\t// We are about to open, so remove `hidden` to measure scrollHeight\n\t\t\t\t\t\tthis.defaultSlot.hidden = false\n\t\t\t\t\t}\n\n\t\t\t\t\tconst fromOpacity = this.open ? 1 : 0\n\t\t\t\t\tconst toOpacity = this.open ? 0 : 1\n\n\t\t\t\t\tconst slotAnimation = this.defaultSlot.animate([{ opacity: fromOpacity }, { opacity: toOpacity }], {\n\t\t\t\t\t\tduration: 150,\n\t\t\t\t\t\teasing: 'ease-out',\n\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t})\n\n\t\t\t\t\t// Hide the slot if we just closed it\n\t\t\t\t\tslotAnimation.onfinish = () => {\n\t\t\t\t\t\tif (this.open) {\n\t\t\t\t\t\t\tthis.defaultSlot.hidden = true\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.defaultSlot.style.height = 'auto'\n\t\t\t\t\t\t\tthis.defaultSlot.style.opacity = '1'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Return an Observable that completes when both animations finish\n\t\t\t\t\treturn zip(fromEvent(chevronAnimation, 'finish'), fromEvent(slotAnimation, 'finish')).pipe(\n\t\t\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\ttap(() => {\n\t\t\t\t\t// Flip the open state\n\t\t\t\t\tthis.open = !this.open\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"flex content-center items-center justify-between\">\n\t\t\t\t<!-- Root toggler content -->\n\t\t\t\t<slot id=\"toggler\" name=\"root\"></slot>\n\n\t\t\t\t<!-- The chevron or arrow symbol -->\n\t\t\t\t<!-- Stop propagation on the schmancy-button itself just to avoid double triggers -->\n\t\t\t\t<schmancy-button\n\t\t\t\t\tslot=\"trailing\"\n\t\t\t\t\tid=\"chevron\"\n\t\t\t\t\taria-expanded=${this.open ? 'true' : 'false'}\n\t\t\t\t\taria-controls=${this._contentId}\n\t\t\t\t\taria-label=${this.open ? 'Collapse' : 'Expand'}\n\t\t\t\t\t@click=${(e: Event) => e.stopPropagation()}\n\t\t\t\t>\n\t\t\t\t\t⌅\n\t\t\t\t</schmancy-button>\n\t\t\t</div>\n\n\t\t\t<!-- The default slot: tree children -->\n\t\t\t<slot id=${this._contentId}></slot>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-tree': SchmancyTree\n\t}\n}\n"],"mappings":"uRAwBO,IAAA,EAAA,cAA2B,EAAA,EAAgB,EAAA,GAAG;;;;;;;;;;;;;4CAiBhB,EAAA,KAAA,QAQT,iBAAiB,KAAK,QAAA,CAAS,SAAS,GAAA,CAAI,MAAM,EAAG,GAAA,GAAA,KAAA,gBAAA,CAK/E,GAAA,CAAM,OAAO,KAAK,iBAAA,MAAA,CAA4B,WAAA,CAJ/C,IAAA,YAAY,CAAe,MAAO,GAAG,KAAK,QAAA,UAO1C,QAAQ,EAAA,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A,EAAA,EAAA,WAC3E,KAAK,cAAA,CAAA,EAAA,EAEf,EAAA,EAAA,SAAA,CAGD,KAAK,KAAA,CAAQ,KAAK,MAAA,EACjB,EAAA,EAAA,WACQ,KAAK,cAAA,CAAA,CAEf,WAAA,CAGH,QAAA,CACC,MAAO,GAAA,IAAI;;;;;;;;;;qBAUQ,KAAK,KAAO,OAAS,QAAA;qBACrB,KAAK,WAAA;kBACR,KAAK,KAAO,WAAa,SAAA;cAC5B,GAAa,EAAE,iBAAA,CAAA;;;;;;;cAOhB,KAAK,WAAA;0BAvHR,CAAE,KAAM,QAAA,CAAA,CAAA,CAAU,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAErB,WAAA,CAAA,CAAW,EAAA,UAAA,UAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OACX,0BAAA,CAAA,CAA0B,EAAA,UAAA,cAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAG1B,WAAA,CAAA,CAAW,EAAA,UAAA,UAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAxBJ,gBAAA,CAAA,CAAgB,EAAA,CAAA,OAAA,eAAA,QAAA,eAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
package/dist/tree.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./tailwind.mixin-DIEGVcl3.js";
1
+ import { t as e } from "./tailwind.mixin-mdQR3BEO.js";
2
2
  import { t } from "./decorate-D_utPUsC.js";
3
3
  import "./mixins.js";
4
4
  import { fromEvent as n, merge as r, switchMap as i, takeUntil as a, tap as o, zip as s } from "rxjs";
package/dist/tree.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tree.js","names":[],"sources":["../src/tree/tree.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { fromEvent, merge, switchMap, takeUntil, tap, zip } from 'rxjs'\n\n/**\n * Expandable tree node — a recursive disclosure widget. One root slot, one default slot for child nodes. Each node can itself contain schmancy-tree children.\n *\n * @element schmancy-tree\n * @summary Use for hierarchical navigation / file-explorer layouts. Each level is a schmancy-tree with a `root` slot (the parent label) and default slot (the children, which may be more schmancy-trees).\n * @example\n * <schmancy-tree>\n * <schmancy-list-item slot=\"root\">src/</schmancy-list-item>\n * <schmancy-tree>\n * <schmancy-list-item slot=\"root\">components/</schmancy-list-item>\n * <schmancy-list-item>button.ts</schmancy-list-item>\n * </schmancy-tree>\n * </schmancy-tree>\n * @platform details toggle - Recursive `<details>`-like disclosure. Degrades to a plain nested list if the tag never registers — loses expand/collapse but stays navigable.\n * @slot root - The root element of the tree\n * @slot - The children of the tree\n */\n@customElement('schmancy-tree')\nexport class SchmancyTree extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tbackground-color: initial;\n\t}\n\t::slotted([slot='root']) {\n\t\twidth: 100%;\n\t\ttext-align: left;\n\t}\n\t::slotted([slot='root'] + *) {\n\t\tmargin-top: 0.5rem;\n\t}\n`) {\n\t/**\n\t * Whether the tree’s children are visible\n\t */\n\t@property({ type: Boolean }) open = false\n\n\t@query('#toggler') toggler!: HTMLSlotElement\n\t@query('slot:not([name=\"root\"])') defaultSlot!: HTMLSlotElement\n\n\t// Since it's actually a <schmancy-button>, use HTMLElement or a custom type\n\t@query('#chevron') chevron!: HTMLElement\n\n\tprivate readonly _a11yId = `schmancy-tree-${Math.random().toString(36).slice(2, 10)}`\n\tprivate get _contentId() { return `${this._a11yId}-content` }\n\n\t/** ElementInternals — broadcasts `:state(open)` for consumer CSS. */\n\tprivate readonly _internals: ElementInternals | undefined = (() => {\n\t\ttry { return this.attachInternals() } catch { return undefined }\n\t})()\n\n\tupdated(changed: Map<string, unknown>) {\n\t\tsuper.updated?.(changed)\n\t\tif (changed.has('open')) {\n\t\t\tif (this.open) this._internals?.states.add('open')\n\t\t\telse this._internals?.states.delete('open')\n\t\t}\n\t}\n\n\tfirstUpdated() {\n\t\t// Hide or show the slot initially based on `open`\n\t\tif (!this.open) {\n\t\t\tthis.defaultSlot.hidden = true\n\t\t}\n\n\t\t// Root toggler\n\t\tconst toggleClick$ = fromEvent<MouseEvent>(this.toggler, 'click').pipe(\n\t\t\ttakeUntil(this.disconnecting),\n\t\t\ttap(e => {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.dispatchEvent(new CustomEvent('toggle', { bubbles: false, composed: true }))\n\t\t\t}),\n\t\t)\n\n\t\t// Chevron (the schmancy-button) click\n\t\tconst chevronClick$ = fromEvent<MouseEvent>(this.chevron, 'click')\n\n\t\tmerge(toggleClick$, chevronClick$)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(() => {\n\t\t\t\t\t// 1. Animate the chevron rotation\n\t\t\t\t\t// If `open` is true, rotate from 180 -> 0; if false, from 0 -> 180\n\t\t\t\t\tconst fromDeg = this.open ? 180 : 0\n\t\t\t\t\tconst toDeg = this.open ? 0 : 180\n\t\t\t\t\tconst chevronAnimation = this.chevron.animate(\n\t\t\t\t\t\t[{ transform: `rotate(${fromDeg}deg)` }, { transform: `rotate(${toDeg}deg)` }],\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: 150,\n\t\t\t\t\t\t\teasing: 'ease-in',\n\t\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t\t},\n\t\t\t\t\t)\n\n\t\t\t\t\t// 2. Animate the slot’s height + opacity\n\t\t\t\t\tif (!this.open) {\n\t\t\t\t\t\t// We are about to open, so remove `hidden` to measure scrollHeight\n\t\t\t\t\t\tthis.defaultSlot.hidden = false\n\t\t\t\t\t}\n\n\t\t\t\t\tconst fromOpacity = this.open ? 1 : 0\n\t\t\t\t\tconst toOpacity = this.open ? 0 : 1\n\n\t\t\t\t\tconst slotAnimation = this.defaultSlot.animate([{ opacity: fromOpacity }, { opacity: toOpacity }], {\n\t\t\t\t\t\tduration: 150,\n\t\t\t\t\t\teasing: 'ease-out',\n\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t})\n\n\t\t\t\t\t// Hide the slot if we just closed it\n\t\t\t\t\tslotAnimation.onfinish = () => {\n\t\t\t\t\t\tif (this.open) {\n\t\t\t\t\t\t\tthis.defaultSlot.hidden = true\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.defaultSlot.style.height = 'auto'\n\t\t\t\t\t\t\tthis.defaultSlot.style.opacity = '1'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Return an Observable that completes when both animations finish\n\t\t\t\t\treturn zip(fromEvent(chevronAnimation, 'finish'), fromEvent(slotAnimation, 'finish')).pipe(\n\t\t\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\ttap(() => {\n\t\t\t\t\t// Flip the open state\n\t\t\t\t\tthis.open = !this.open\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"flex content-center items-center justify-between\">\n\t\t\t\t<!-- Root toggler content -->\n\t\t\t\t<slot id=\"toggler\" name=\"root\"></slot>\n\n\t\t\t\t<!-- The chevron or arrow symbol -->\n\t\t\t\t<!-- Stop propagation on the schmancy-button itself just to avoid double triggers -->\n\t\t\t\t<schmancy-button\n\t\t\t\t\tslot=\"trailing\"\n\t\t\t\t\tid=\"chevron\"\n\t\t\t\t\taria-expanded=${this.open ? 'true' : 'false'}\n\t\t\t\t\taria-controls=${this._contentId}\n\t\t\t\t\taria-label=${this.open ? 'Collapse' : 'Expand'}\n\t\t\t\t\t@click=${(e: Event) => e.stopPropagation()}\n\t\t\t\t>\n\t\t\t\t\t⌅\n\t\t\t\t</schmancy-button>\n\t\t\t</div>\n\n\t\t\t<!-- The default slot: tree children -->\n\t\t\t<slot id=${this._contentId}></slot>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-tree': SchmancyTree\n\t}\n}\n"],"mappings":";;;;;;AAuBO,IAAA,IAAA,cAA2B,EAAgB,CAAG;;;;;;;;;;;;;;;4BAiBhB,GAAA,KAAA,UAQT,iBAAiB,KAAK,QAAA,CAAS,SAAS,GAAA,CAAI,MAAM,GAAG,GAAA,IAAA,KAAA,oBAAA;AAK/E,OAAA;AAAM,WAAO,KAAK,iBAAA;WAAA;AAA4B;;MAAA;;CAJ/C,IAAA,aAAY;AAAe,SAAO,GAAG,KAAK,QAAA;;CAO1C,QAAQ,GAAA;AACP,QAAM,UAAU,EAAA,EACZ,EAAQ,IAAI,OAAA,KACX,KAAK,OAAM,KAAK,YAAY,OAAO,IAAI,OAAA,GACtC,KAAK,YAAY,OAAO,OAAO,OAAA;;CAItC,eAAA;AAEM,OAAK,SACT,KAAK,YAAY,SAAA,CAAS,IAgB3B,EAZqB,EAAsB,KAAK,SAAS,QAAA,CAAS,KACjE,EAAU,KAAK,cAAA,EACf,GAAI,MAAA;AACH,KAAE,gBAAA,EACF,EAAE,iBAAA,EACF,KAAK,cAAc,IAAI,YAAY,UAAU;IAAE,SAAA,CAAS;IAAO,UAAA,CAAU;IAAA,CAAA,CAAA;IAAA,CAAA,EAKrD,EAAsB,KAAK,SAAS,QAAA,CAAA,CAGxD,KACA,QAAA;GAGC,IAAM,IAAU,KAAK,OAAO,MAAM,GAC5B,IAAQ,KAAK,OAAO,IAAI,KACxB,IAAmB,KAAK,QAAQ,QACrC,CAAC,EAAE,WAAW,UAAU,EAAA,OAAA,EAAiB,EAAE,WAAW,UAAU,EAAA,OAAA,CAAA,EAChE;IACC,UAAU;IACV,QAAQ;IACR,MAAM;IAAA,CAAA;AAKH,QAAK,SAET,KAAK,YAAY,SAAA,CAAS;GAG3B,IAAM,IAAc,QAAK,MACnB,IAAY,OAAK,MAEjB,IAAgB,KAAK,YAAY,QAAQ,CAAC,EAAE,SAAS,GAAA,EAAe,EAAE,SAAS,GAAA,CAAA,EAAc;IAClG,UAAU;IACV,QAAQ;IACR,MAAM;IAAA,CAAA;AAcP,UAVA,EAAc,iBAAA;AACT,SAAK,OACR,KAAK,YAAY,SAAA,CAAS,KAE1B,KAAK,YAAY,MAAM,SAAS,QAChC,KAAK,YAAY,MAAM,UAAU;MAK5B,EAAI,EAAU,GAAkB,SAAA,EAAW,EAAU,GAAe,SAAA,CAAA,CAAW,KACrF,EAAU,KAAK,cAAA,CAAA;IAAA,EAGjB,QAAA;AAEC,QAAK,OAAA,CAAQ,KAAK;IAAA,EAEnB,EAAU,KAAK,cAAA,CAAA,CAEf,WAAA;;CAGH,SAAA;AACC,SAAO,CAAI;;;;;;;;;;qBAUQ,KAAK,OAAO,SAAS,QAAA;qBACrB,KAAK,WAAA;kBACR,KAAK,OAAO,aAAa,SAAA;eAC5B,MAAa,EAAE,iBAAA,CAAA;;;;;;;cAOhB,KAAK,WAAA;;;;GAvHjB,EAAS,EAAE,MAAM,SAAA,CAAA,CAAA,EAAU,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAE3B,EAAM,WAAA,CAAA,EAAW,EAAA,WAAA,WAAA,KAAA,EAAA,EAAA,EAAA,CACjB,EAAM,4BAAA,CAAA,EAA0B,EAAA,WAAA,eAAA,KAAA,EAAA,EAAA,EAAA,CAGhC,EAAM,WAAA,CAAA,EAAW,EAAA,WAAA,WAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CAxBlB,EAAc,gBAAA,CAAA,EAAgB,EAAA;AAAA,SAAA,KAAA"}
1
+ {"version":3,"file":"tree.js","names":[],"sources":["../src/tree/tree.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { fromEvent, merge, switchMap, takeUntil, tap, zip } from 'rxjs'\n\n/**\n * Expandable tree node — a recursive disclosure widget. One root slot, one default slot for child nodes. Each node can itself contain schmancy-tree children.\n *\n * @element schmancy-tree\n * @summary Use for hierarchical navigation / file-explorer layouts. Each level is a schmancy-tree with a `root` slot (the parent label) and default slot (the children, which may be more schmancy-trees).\n * @example\n * <schmancy-tree>\n * <schmancy-list-item slot=\"root\">src/</schmancy-list-item>\n * <schmancy-tree>\n * <schmancy-list-item slot=\"root\">components/</schmancy-list-item>\n * <schmancy-list-item>button.ts</schmancy-list-item>\n * </schmancy-tree>\n * </schmancy-tree>\n * @platform details toggle - Recursive `<details>`-like disclosure. Degrades to a plain nested list if the tag never registers — loses expand/collapse but stays navigable.\n * @slot root - The root element of the tree\n * @slot - The children of the tree\n * @fires toggle - When the root toggler or chevron is clicked. Fires before the open state flips; the host's `open` property reflects the new state on the next animation frame.\n */\n@customElement('schmancy-tree')\nexport class SchmancyTree extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tbackground-color: initial;\n\t}\n\t::slotted([slot='root']) {\n\t\twidth: 100%;\n\t\ttext-align: left;\n\t}\n\t::slotted([slot='root'] + *) {\n\t\tmargin-top: 0.5rem;\n\t}\n`) {\n\t/**\n\t * Whether the tree’s children are visible\n\t */\n\t@property({ type: Boolean }) open = false\n\n\t@query('#toggler') toggler!: HTMLSlotElement\n\t@query('slot:not([name=\"root\"])') defaultSlot!: HTMLSlotElement\n\n\t// Since it's actually a <schmancy-button>, use HTMLElement or a custom type\n\t@query('#chevron') chevron!: HTMLElement\n\n\tprivate readonly _a11yId = `schmancy-tree-${Math.random().toString(36).slice(2, 10)}`\n\tprivate get _contentId() { return `${this._a11yId}-content` }\n\n\t/** ElementInternals — broadcasts `:state(open)` for consumer CSS. */\n\tprivate readonly _internals: ElementInternals | undefined = (() => {\n\t\ttry { return this.attachInternals() } catch { return undefined }\n\t})()\n\n\tupdated(changed: Map<string, unknown>) {\n\t\tsuper.updated?.(changed)\n\t\tif (changed.has('open')) {\n\t\t\tif (this.open) this._internals?.states.add('open')\n\t\t\telse this._internals?.states.delete('open')\n\t\t}\n\t}\n\n\tfirstUpdated() {\n\t\t// Hide or show the slot initially based on `open`\n\t\tif (!this.open) {\n\t\t\tthis.defaultSlot.hidden = true\n\t\t}\n\n\t\t// Root toggler\n\t\tconst toggleClick$ = fromEvent<MouseEvent>(this.toggler, 'click').pipe(\n\t\t\ttakeUntil(this.disconnecting),\n\t\t\ttap(e => {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.dispatchEvent(new CustomEvent('toggle', { bubbles: false, composed: true }))\n\t\t\t}),\n\t\t)\n\n\t\t// Chevron (the schmancy-button) click\n\t\tconst chevronClick$ = fromEvent<MouseEvent>(this.chevron, 'click')\n\n\t\tmerge(toggleClick$, chevronClick$)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(() => {\n\t\t\t\t\t// 1. Animate the chevron rotation\n\t\t\t\t\t// If `open` is true, rotate from 180 -> 0; if false, from 0 -> 180\n\t\t\t\t\tconst fromDeg = this.open ? 180 : 0\n\t\t\t\t\tconst toDeg = this.open ? 0 : 180\n\t\t\t\t\tconst chevronAnimation = this.chevron.animate(\n\t\t\t\t\t\t[{ transform: `rotate(${fromDeg}deg)` }, { transform: `rotate(${toDeg}deg)` }],\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduration: 150,\n\t\t\t\t\t\t\teasing: 'ease-in',\n\t\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t\t},\n\t\t\t\t\t)\n\n\t\t\t\t\t// 2. Animate the slot’s height + opacity\n\t\t\t\t\tif (!this.open) {\n\t\t\t\t\t\t// We are about to open, so remove `hidden` to measure scrollHeight\n\t\t\t\t\t\tthis.defaultSlot.hidden = false\n\t\t\t\t\t}\n\n\t\t\t\t\tconst fromOpacity = this.open ? 1 : 0\n\t\t\t\t\tconst toOpacity = this.open ? 0 : 1\n\n\t\t\t\t\tconst slotAnimation = this.defaultSlot.animate([{ opacity: fromOpacity }, { opacity: toOpacity }], {\n\t\t\t\t\t\tduration: 150,\n\t\t\t\t\t\teasing: 'ease-out',\n\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t})\n\n\t\t\t\t\t// Hide the slot if we just closed it\n\t\t\t\t\tslotAnimation.onfinish = () => {\n\t\t\t\t\t\tif (this.open) {\n\t\t\t\t\t\t\tthis.defaultSlot.hidden = true\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.defaultSlot.style.height = 'auto'\n\t\t\t\t\t\t\tthis.defaultSlot.style.opacity = '1'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Return an Observable that completes when both animations finish\n\t\t\t\t\treturn zip(fromEvent(chevronAnimation, 'finish'), fromEvent(slotAnimation, 'finish')).pipe(\n\t\t\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\ttap(() => {\n\t\t\t\t\t// Flip the open state\n\t\t\t\t\tthis.open = !this.open\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"flex content-center items-center justify-between\">\n\t\t\t\t<!-- Root toggler content -->\n\t\t\t\t<slot id=\"toggler\" name=\"root\"></slot>\n\n\t\t\t\t<!-- The chevron or arrow symbol -->\n\t\t\t\t<!-- Stop propagation on the schmancy-button itself just to avoid double triggers -->\n\t\t\t\t<schmancy-button\n\t\t\t\t\tslot=\"trailing\"\n\t\t\t\t\tid=\"chevron\"\n\t\t\t\t\taria-expanded=${this.open ? 'true' : 'false'}\n\t\t\t\t\taria-controls=${this._contentId}\n\t\t\t\t\taria-label=${this.open ? 'Collapse' : 'Expand'}\n\t\t\t\t\t@click=${(e: Event) => e.stopPropagation()}\n\t\t\t\t>\n\t\t\t\t\t⌅\n\t\t\t\t</schmancy-button>\n\t\t\t</div>\n\n\t\t\t<!-- The default slot: tree children -->\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KAAK,YAAY,QAAQ,CAAC,EAAE,SAAS,GAAA,EAAe,EAAE,SAAS,GAAA,CAAA,EAAc;IAClG,UAAU;IACV,QAAQ;IACR,MAAM;IAAA,CAAA;AAcP,UAVA,EAAc,iBAAA;AACT,SAAK,OACR,KAAK,YAAY,SAAA,CAAS,KAE1B,KAAK,YAAY,MAAM,SAAS,QAChC,KAAK,YAAY,MAAM,UAAU;MAK5B,EAAI,EAAU,GAAkB,SAAA,EAAW,EAAU,GAAe,SAAA,CAAA,CAAW,KACrF,EAAU,KAAK,cAAA,CAAA;IAAA,EAGjB,QAAA;AAEC,QAAK,OAAA,CAAQ,KAAK;IAAA,EAEnB,EAAU,KAAK,cAAA,CAAA,CAEf,WAAA;;CAGH,SAAA;AACC,SAAO,CAAI;;;;;;;;;;qBAUQ,KAAK,OAAO,SAAS,QAAA;qBACrB,KAAK,WAAA;kBACR,KAAK,OAAO,aAAa,SAAA;eAC5B,MAAa,EAAE,iBAAA,CAAA;;;;;;;cAOhB,KAAK,WAAA;;;;GAvHjB,EAAS,EAAE,MAAM,SAAA,CAAA,CAAA,EAAU,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAE3B,EAAM,WAAA,CAAA,EAAW,EAAA,WAAA,WAAA,KAAA,EAAA,EAAA,EAAA,CACjB,EAAM,4BAAA,CAAA,EAA0B,EAAA,WAAA,eAAA,KAAA,EAAA,EAAA,EAAA,CAGhC,EAAM,WAAA,CAAA,EAAW,EAAA,WAAA,WAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CAxBlB,EAAc,gBAAA,CAAA,EAAgB,EAAA;AAAA,SAAA,KAAA"}
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-BHX99hgX.cjs`),t=require(`./decorate-F9CuyeHg.cjs`),n=require(`./litElement.mixin-lYlKxxjR.cjs`);require(`./mixins.cjs`);const r=require(`./delay-DCp_QEct.cjs`),i=require(`./hashContent-CahnEuut.cjs`),a=require(`./intersection-DqBqnpgh.cjs`);let o=require(`lit/decorators.js`),s=require(`lit`);var c=null,l=class extends n.t(s.css`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-DRI1oTYQ.cjs`),t=require(`./decorate-F9CuyeHg.cjs`),n=require(`./litElement.mixin-qh5-IIUq.cjs`);require(`./mixins.cjs`);const r=require(`./delay-BHODnTg-.cjs`),i=require(`./hashContent-CahnEuut.cjs`),a=require(`./intersection-DqBqnpgh.cjs`);let o=require(`lit/decorators.js`),s=require(`lit`);var c=null,l=class extends n.t(s.css`
2
2
  :host {
3
3
  display: inline-block;
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"typewriter.cjs","names":[],"sources":["../src/typewriter/typewriter.ts"],"sourcesContent":["import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { delayContext } from '@schmancy/delay'\nimport hashContent from '@schmancy/utils/hashContent'\nimport { intersection$ } from '@schmancy/utils/intersection'\nimport { css, html, TemplateResult } from 'lit'\nimport { customElement, property, query, queryAssignedElements, queryAssignedNodes } from 'lit/decorators.js'\n// TypeIt is loaded lazily on first render — see ADR 0014 in the parent\n// monorepo. The static import was replaced with a type-only import plus a\n// memoised dynamic loader so the ~15 KB gzipped vendor chunk stays out of\n// the agent bundle's first paint for pages that don't render a typewriter.\nimport type { Options as TypeItOptions } from 'typeit'\ntype TypeItCtor = typeof import('typeit').default\ntype TypeItInstance = InstanceType<TypeItCtor>\n\nlet typeItPromise: Promise<TypeItCtor> | null = null\nfunction loadTypeIt(): Promise<TypeItCtor> {\n\tif (typeItPromise) return typeItPromise\n\ttypeItPromise = import('typeit').then(m => m.default)\n\treturn typeItPromise\n}\n\n@customElement('schmancy-typewriter')\nexport class TypewriterElement extends $LitElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\n\t#typewriter {\n\t\tposition: relative;\n\t}\n\n\t/* Enhanced cursor with glow effect */\n\t#typewriter :global(.ti-cursor) {\n\t\tanimation: cursor-pulse 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tcolor: currentColor;\n\t\tfilter: drop-shadow(0 0 8px currentColor);\n\t}\n\n\t@keyframes cursor-pulse {\n\t\t0%, 100% {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1);\n\t\t}\n\t\t50% {\n\t\t\topacity: 0.3;\n\t\t\ttransform: scale(0.95);\n\t\t}\n\t}\n\n\t/* Character entrance animation */\n\t#typewriter :global(.ti-container *) {\n\t\tanimation: char-entrance 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;\n\t}\n\n\t@keyframes char-entrance {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.3) translateY(10px);\n\t\t\tfilter: blur(4px);\n\t\t}\n\t\t50% {\n\t\t\topacity: 0.8;\n\t\t\ttransform: scale(1.1) translateY(-2px);\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1) translateY(0);\n\t\t\tfilter: blur(0);\n\t\t}\n\t}\n\n\t/* Subtle character wobble on appear */\n\t#typewriter :global(.ti-container *:nth-child(odd)) {\n\t\tanimation: char-entrance 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards,\n\t\t char-wobble 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s backwards;\n\t}\n\n\t@keyframes char-wobble {\n\t\t0%, 100% {\n\t\t\ttransform: rotate(0deg);\n\t\t}\n\t\t25% {\n\t\t\ttransform: rotate(2deg);\n\t\t}\n\t\t75% {\n\t\t\ttransform: rotate(-2deg);\n\t\t}\n\t}\n\n\t/* Deletion animation - fade out and scale down */\n\t#typewriter :global(.ti-container .deleting) {\n\t\tanimation: char-delete 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;\n\t}\n\n\t@keyframes char-delete {\n\t\t0% {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1);\n\t\t\tfilter: blur(0);\n\t\t}\n\t\t50% {\n\t\t\topacity: 0.5;\n\t\t\ttransform: scale(0.8) translateY(-3px);\n\t\t}\n\t\t100% {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.4) translateY(-8px);\n\t\t\tfilter: blur(3px);\n\t\t}\n\t}\n\n\t/* Gradient text effect on typed text */\n\t#typewriter :global(.ti-container) {\n\t\tbackground: linear-gradient(\n\t\t\t90deg,\n\t\t\tcurrentColor 0%,\n\t\t\tcurrentColor 70%,\n\t\t\ttransparent 100%\n\t\t);\n\t\t-webkit-background-clip: text;\n\t\tbackground-clip: text;\n\t\tanimation: gradient-shift 3s ease-in-out infinite;\n\t}\n\n\t@keyframes gradient-shift {\n\t\t0%, 100% {\n\t\t\tfilter: brightness(1) saturate(1);\n\t\t}\n\t\t50% {\n\t\t\tfilter: brightness(1.15) saturate(1.2);\n\t\t}\n\t}\n\n\t/* Smooth transitions for all text */\n\t#typewriter * {\n\t\ttransition: opacity 0.15s ease-out, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);\n\t}\n`) {\n\t/**\n\t * Typing speed in milliseconds per character.\n\t */\n\t@property({ type: Number })\n\tspeed: number = 35\n\n\t/**\n\t * Delay before typing starts (ms).\n\t */\n\t@consume({ context: delayContext, subscribe: true })\n\t@property({ type: Number })\n\tdelay: number = 0\n\n\t/**\n\t * Automatically start typing on initialization.\n\t */\n\t@property({ type: Boolean })\n\tautoStart: boolean = true\n\n\t/**\n\t * The cursor character.\n\t */\n\t@property({ type: String })\n\tcursorChar: string = ''\n\n\t/**\n\t * Typing speed for deletions (ms per character).\n\t */\n\t@property({ type: Number })\n\tdeleteSpeed: number = 20\n\n\t/**\n\t * Only animate once per session.\n\t */\n\t@property({ type: Boolean }) once = true\n\n\t/**\n\t * Loop the animation infinitely (overrides once).\n\t */\n\t@property({ type: Boolean }) loop = false\n\n\t/**\n\t * Default pause duration for cycling (ms).\n\t */\n\t@property({ type: Number }) cyclePause = 1500\n\t/**\n\t * TypeIt instance. Populated after `loadTypeIt()` resolves inside\n\t * `_startTyping()` — null until then, which is correct for a cold start\n\t * where the vendor chunk hasn't loaded yet.\n\t */\n\tprivate typeItInstance: TypeItInstance | null = null\n\n\t/**\n\t * Reference to the typewriter container.\n\t */\n\t@query('#typewriter')\n\tprivate typewriterContainer!: HTMLElement\n\n\t@queryAssignedNodes({\n\t\tflatten: true,\n\t})\n\tprivate _getSlottedNodes!: Node[]\n\n\t@queryAssignedElements({\n\t\tflatten: true,\n\t})\n\tprivate _getSlottedElements!: HTMLElement[]\n\t/**\n\t * Lifecycle method called when the component is disconnected from the DOM.\n\t * Ensures that TypeIt instances are properly cleaned up.\n\t */\n\n\tprivate sessionKey = ''\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._destroyTypeIt()\n\t}\n\n\t/**\n\t * Initializes the TypeIt instance with the provided slotted content.\n\t * Async because TypeIt itself is lazy-loaded on first render.\n\t */\n\tprivate async _startTyping() {\n\t\t// Destroy any existing TypeIt instance\n\t\tthis._destroyTypeIt()\n\n\t\tthis.sessionKey = this.generateSessionKey()\n\n\t\tif (this.once && sessionStorage.getItem(this.sessionKey) === 'true') {\n\t\t\t// Skip delay and render immediately if once is set and already rendered\n\t\t\tthis.shadowRoot?.querySelector('slot')?.removeAttribute('hidden')\n\t\t\treturn\n\t\t}\n\n\t\tif (!this.typewriterContainer) {\n\t\t\tconsole.warn('Typewriter container not found.')\n\t\t\treturn\n\t\t}\n\n\t\t// Configure TypeIt options\n\t\tconst typeItOptions: TypeItOptions = {\n\t\t\tspeed: this.speed,\n\t\t\tstartDelay: this.delay,\n\t\t\tcursor: !!this.cursorChar,\n\t\t\tcursorChar: this.cursorChar,\n\t\t\tdeleteSpeed: this.deleteSpeed,\n\t\t\tloop: this.loop,\n\t\t\tafterComplete: () => {\n\t\t\t\tif (this.once && !this.loop) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsessionStorage.setItem(this.sessionKey, 'true')\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error('Error saving to session storage:', error)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Dispatch the custom event\n\t\t\t\tthis.dispatchEvent(new CustomEvent('typeit-complete', { bubbles: true, composed: true }))\n\n\t\t\t\t// Hide the cursor (unless looping)\n\t\t\t\tif (!this.loop) {\n\t\t\t\t\tthis.typewriterContainer.style.setProperty('--ti-cursor-display', 'none')\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\n\t\t// Load TypeIt lazily on first call (module-scope memoised promise).\n\t\tconst TypeIt = await loadTypeIt()\n\t\t// Bail if we were disconnected during the load — avoids attaching to\n\t\t// a detached host.\n\t\tif (!this.isConnected) return\n\n\t\t// Initialize TypeIt\n\t\tthis.typeItInstance = new TypeIt(this.typewriterContainer, typeItOptions)\n\n\t\t// Process slotted content as actions\n\t\tconst slottedNodes = this._getSlottedNodes\n\t\tslottedNodes.forEach(node => {\n\t\t\tif (node.nodeType === Node.TEXT_NODE) {\n\t\t\t\t// Handle plain text - skip whitespace-only text nodes\n\t\t\t\tconst textContent = node.textContent || ''\n\t\t\t\tif (textContent.trim()) {\n\t\t\t\t\tthis.typeItInstance?.type(textContent)\n\t\t\t\t}\n\t\t\t} else if (node instanceof HTMLElement) {\n\t\t\t\t// Handle custom element\n\t\t\t\tthis._processCustomElement(node)\n\t\t\t}\n\t\t})\n\n\t\t// Start the typing animation if autoStart is enabled\n\t\t// use rxjs to detect once we are in the view port\n\t\tintersection$(this.shadowRoot?.host as Element).subscribe(() => {\n\t\t\t// alert('in view')\n\t\t\tthis.typeItInstance?.go()\n\t\t})\n\t\t// Start the typing animation if autoStart is enabled\n\t}\n\n\tprivate generateSessionKey(): string {\n\t\tconst slotContent = this._getSlottedElements.map(el => el.outerHTML).join('')\n\t\treturn this.once ? hashContent(slotContent) : ''\n\t}\n\t/**\n\t * Destroys the current TypeIt instance if it exists.\n\t */\n\tprivate _destroyTypeIt() {\n\t\tif (this.typeItInstance) {\n\t\t\ttry {\n\t\t\t\tthis.typeItInstance.destroy()\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('Error destroying TypeIt instance:', error)\n\t\t\t}\n\t\t\tthis.typeItInstance = null\n\t\t}\n\t}\n\n\t/**\n\t * Processes a custom element for its typing behavior.\n\t */\n\tprivate _processCustomElement(element: HTMLElement) {\n\t\tconst action = element.getAttribute('action')\n\t\tconst value = element.getAttribute('value')\n\t\tconst cycle = element.getAttribute('cycle')\n\n\t\t// Handle cycle attribute - simple pipe-separated list\n\t\tif (cycle) {\n\t\t\tconst items = cycle.split('|').map(item => item.trim())\n\t\t\tthis._processCycle(items, element)\n\t\t\treturn\n\t\t}\n\n\t\tswitch (action) {\n\t\t\tcase 'pause':\n\t\t\t\tthis.typeItInstance?.pause(parseInt(value || '0', 10))\n\t\t\t\tbreak\n\t\t\tcase 'delete':\n\t\t\t\tthis.typeItInstance?.delete(parseInt(value || '0', 10))\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tif (element.tagName === 'P') {\n\t\t\t\t\tthis.typeItInstance?.break()\n\t\t\t\t}\n\t\t\t\t// Treat as text if no action is defined\n\t\t\t\tthis.typeItInstance?.type(element.textContent || '')\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\t/**\n\t * Processes cycling text with auto-calculated delete counts.\n\t */\n\tprivate _processCycle(items: string[], element: HTMLElement) {\n\t\tif (items.length === 0) return\n\n\t\tconst customPause = element.getAttribute('pause')\n\t\tconst pauseDuration = customPause ? parseInt(customPause, 10) : this.cyclePause\n\n\t\t// Type each item with automatic deletion\n\t\titems.forEach((item, index) => {\n\t\t\t// Type the item\n\t\t\tthis.typeItInstance?.type(item)\n\n\t\t\t// Pause after typing (except after last item when not looping)\n\t\t\tif (index < items.length - 1 || this.loop) {\n\t\t\t\tthis.typeItInstance?.pause(pauseDuration)\n\t\t\t}\n\n\t\t\t// Delete back to start (except for last item when not looping)\n\t\t\tif (index < items.length - 1) {\n\t\t\t\tthis.typeItInstance?.delete(item.length)\n\t\t\t} else if (this.loop) {\n\t\t\t\t// For looping, delete and start over\n\t\t\t\tthis.typeItInstance?.delete(item.length)\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Renders the component's HTML.\n\t */\n\trender(): TemplateResult {\n\t\treturn html`<div id=\"typewriter\" aria-live=\"polite\"></div>\n\n\t\t\t<div class=\"typewriter\">\n\t\t\t\t<slot\n\t\t\t\t\thidden\n\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\tthis._startTyping()\n\t\t\t\t\t}}\n\t\t\t\t></slot>\n\t\t\t</div> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-typewriter': TypewriterElement\n\t}\n}\n"],"mappings":"2aAeA,IAAI,EAA4C,KAQzC,EAAA,cAAgC,EAAA,EAAY,EAAA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAwHrC,GAAA,KAAA,MAOA,EAAA,KAAA,UAAA,CAMK,EAAA,KAAA,WAMA,GAAA,KAAA,YAMC,GAAA,KAAA,KAAA,CAKc,EAAA,KAAA,KAAA,CAKA,EAAA,KAAA,WAKK,KAAA,KAAA,eAMO,KAAA,KAAA,WAsB3B,GACrB,sBAAA,CACC,MAAM,sBAAA,CACN,KAAK,gBAAA,CAON,MAAA,cAAc,CAMb,GAJA,KAAK,gBAAA,CAEL,KAAK,WAAa,KAAK,oBAAA,CAEnB,KAAK,MAAQ,eAAe,QAAQ,KAAK,WAAA,GAAgB,OAG5D,OAAA,KADA,KAAK,YAAY,cAAc,OAAA,EAAS,gBAAgB,SAAA,CAIzD,GAAA,CAAK,KAAK,oBAET,OAID,IAAM,EAA+B,CACpC,MAAO,KAAK,MACZ,WAAY,KAAK,MACjB,OAAA,CAAA,CAAU,KAA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MjB,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,cAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAMjB,CAAE,KAAM,QAAA,CAAA,CAAA,CAAU,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAKlB,CAAE,KAAM,QAAA,CAAA,CAAA,CAAU,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAKlB,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,aAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAWpB,cAAA,CAAA,CAAc,EAAA,UAAA,sBAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,oBAGD,CACnB,QAAA,CAAS,EAAA,CAAA,CAAA,CACR,EAAA,UAAA,mBAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,uBAGqB,CACtB,QAAA,CAAS,EAAA,CAAA,CAAA,CACR,EAAA,UAAA,sBAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAtLY,sBAAA,CAAA,CAAsB,EAAA,CAAA,OAAA,eAAA,QAAA,oBAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"typewriter.cjs","names":[],"sources":["../src/typewriter/typewriter.ts"],"sourcesContent":["import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { delayContext } from '@schmancy/delay'\nimport hashContent from '@schmancy/utils/hashContent'\nimport { intersection$ } from '@schmancy/utils/intersection'\nimport { css, html, TemplateResult } from 'lit'\nimport { customElement, property, query, queryAssignedElements, queryAssignedNodes } from 'lit/decorators.js'\n// TypeIt is loaded lazily on first render — see ADR 0014 in the parent\n// monorepo. The static import was replaced with a type-only import plus a\n// memoised dynamic loader so the ~15 KB gzipped vendor chunk stays out of\n// the agent bundle's first paint for pages that don't render a typewriter.\nimport type { Options as TypeItOptions } from 'typeit'\ntype TypeItCtor = typeof import('typeit').default\ntype TypeItInstance = InstanceType<TypeItCtor>\n\nlet typeItPromise: Promise<TypeItCtor> | null = null\nfunction loadTypeIt(): Promise<TypeItCtor> {\n\tif (typeItPromise) return typeItPromise\n\ttypeItPromise = import('typeit').then(m => m.default)\n\treturn typeItPromise\n}\n\n/**\n * Typewriter effect — animates text typing/deletion with a cursor. Wraps the TypeIt library, lazy-loaded on first render.\n *\n * @element schmancy-typewriter\n * @summary Drop string content as the default slot or use `<p>` / `<span>` with `cycle=\"A|B|C\"` attribute children for cycling phrases. Set `loop` for infinite cycling, `once` to remember completion across sessions via sessionStorage.\n * @example\n * <schmancy-typewriter speed=\"35\" cursor-char=\"|\">\n * Hello, world.\n * </schmancy-typewriter>\n * @platform span - Animated text container. Degrades to its raw text content if the tag never registers — animation is lost but content stays visible.\n * @fires typeit-complete - When the animation finishes typing all content. Fires after the final `afterComplete` callback in the underlying TypeIt instance.\n */\n@customElement('schmancy-typewriter')\nexport class TypewriterElement extends $LitElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\n\t#typewriter {\n\t\tposition: relative;\n\t}\n\n\t/* Enhanced cursor with glow effect */\n\t#typewriter :global(.ti-cursor) {\n\t\tanimation: cursor-pulse 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tcolor: currentColor;\n\t\tfilter: drop-shadow(0 0 8px currentColor);\n\t}\n\n\t@keyframes cursor-pulse {\n\t\t0%, 100% {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1);\n\t\t}\n\t\t50% {\n\t\t\topacity: 0.3;\n\t\t\ttransform: scale(0.95);\n\t\t}\n\t}\n\n\t/* Character entrance animation */\n\t#typewriter :global(.ti-container *) {\n\t\tanimation: char-entrance 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;\n\t}\n\n\t@keyframes char-entrance {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.3) translateY(10px);\n\t\t\tfilter: blur(4px);\n\t\t}\n\t\t50% {\n\t\t\topacity: 0.8;\n\t\t\ttransform: scale(1.1) translateY(-2px);\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1) translateY(0);\n\t\t\tfilter: blur(0);\n\t\t}\n\t}\n\n\t/* Subtle character wobble on appear */\n\t#typewriter :global(.ti-container *:nth-child(odd)) {\n\t\tanimation: char-entrance 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards,\n\t\t char-wobble 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s backwards;\n\t}\n\n\t@keyframes char-wobble {\n\t\t0%, 100% {\n\t\t\ttransform: rotate(0deg);\n\t\t}\n\t\t25% {\n\t\t\ttransform: rotate(2deg);\n\t\t}\n\t\t75% {\n\t\t\ttransform: rotate(-2deg);\n\t\t}\n\t}\n\n\t/* Deletion animation - fade out and scale down */\n\t#typewriter :global(.ti-container .deleting) {\n\t\tanimation: char-delete 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;\n\t}\n\n\t@keyframes char-delete {\n\t\t0% {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1);\n\t\t\tfilter: blur(0);\n\t\t}\n\t\t50% {\n\t\t\topacity: 0.5;\n\t\t\ttransform: scale(0.8) translateY(-3px);\n\t\t}\n\t\t100% {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.4) translateY(-8px);\n\t\t\tfilter: blur(3px);\n\t\t}\n\t}\n\n\t/* Gradient text effect on typed text */\n\t#typewriter :global(.ti-container) {\n\t\tbackground: linear-gradient(\n\t\t\t90deg,\n\t\t\tcurrentColor 0%,\n\t\t\tcurrentColor 70%,\n\t\t\ttransparent 100%\n\t\t);\n\t\t-webkit-background-clip: text;\n\t\tbackground-clip: text;\n\t\tanimation: gradient-shift 3s ease-in-out infinite;\n\t}\n\n\t@keyframes gradient-shift {\n\t\t0%, 100% {\n\t\t\tfilter: brightness(1) saturate(1);\n\t\t}\n\t\t50% {\n\t\t\tfilter: brightness(1.15) saturate(1.2);\n\t\t}\n\t}\n\n\t/* Smooth transitions for all text */\n\t#typewriter * {\n\t\ttransition: opacity 0.15s ease-out, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);\n\t}\n`) {\n\t/**\n\t * Typing speed in milliseconds per character.\n\t */\n\t@property({ type: Number })\n\tspeed: number = 35\n\n\t/**\n\t * Delay before typing starts (ms).\n\t */\n\t@consume({ context: delayContext, subscribe: true })\n\t@property({ type: Number })\n\tdelay: number = 0\n\n\t/**\n\t * Automatically start typing on initialization.\n\t */\n\t@property({ type: Boolean })\n\tautoStart: boolean = true\n\n\t/**\n\t * The cursor character.\n\t */\n\t@property({ type: String })\n\tcursorChar: string = ''\n\n\t/**\n\t * Typing speed for deletions (ms per character).\n\t */\n\t@property({ type: Number })\n\tdeleteSpeed: number = 20\n\n\t/**\n\t * Only animate once per session.\n\t */\n\t@property({ type: Boolean }) once = true\n\n\t/**\n\t * Loop the animation infinitely (overrides once).\n\t */\n\t@property({ type: Boolean }) loop = false\n\n\t/**\n\t * Default pause duration for cycling (ms).\n\t */\n\t@property({ type: Number }) cyclePause = 1500\n\t/**\n\t * TypeIt instance. Populated after `loadTypeIt()` resolves inside\n\t * `_startTyping()` — null until then, which is correct for a cold start\n\t * where the vendor chunk hasn't loaded yet.\n\t */\n\tprivate typeItInstance: TypeItInstance | null = null\n\n\t/**\n\t * Reference to the typewriter container.\n\t */\n\t@query('#typewriter')\n\tprivate typewriterContainer!: HTMLElement\n\n\t@queryAssignedNodes({\n\t\tflatten: true,\n\t})\n\tprivate _getSlottedNodes!: Node[]\n\n\t@queryAssignedElements({\n\t\tflatten: true,\n\t})\n\tprivate _getSlottedElements!: HTMLElement[]\n\t/**\n\t * Lifecycle method called when the component is disconnected from the DOM.\n\t * Ensures that TypeIt instances are properly cleaned up.\n\t */\n\n\tprivate sessionKey = ''\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._destroyTypeIt()\n\t}\n\n\t/**\n\t * Initializes the TypeIt instance with the provided slotted content.\n\t * Async because TypeIt itself is lazy-loaded on first render.\n\t */\n\tprivate async _startTyping() {\n\t\t// Destroy any existing TypeIt instance\n\t\tthis._destroyTypeIt()\n\n\t\tthis.sessionKey = this.generateSessionKey()\n\n\t\tif (this.once && sessionStorage.getItem(this.sessionKey) === 'true') {\n\t\t\t// Skip delay and render immediately if once is set and already rendered\n\t\t\tthis.shadowRoot?.querySelector('slot')?.removeAttribute('hidden')\n\t\t\treturn\n\t\t}\n\n\t\tif (!this.typewriterContainer) {\n\t\t\tconsole.warn('Typewriter container not found.')\n\t\t\treturn\n\t\t}\n\n\t\t// Configure TypeIt options\n\t\tconst typeItOptions: TypeItOptions = {\n\t\t\tspeed: this.speed,\n\t\t\tstartDelay: this.delay,\n\t\t\tcursor: !!this.cursorChar,\n\t\t\tcursorChar: this.cursorChar,\n\t\t\tdeleteSpeed: this.deleteSpeed,\n\t\t\tloop: this.loop,\n\t\t\tafterComplete: () => {\n\t\t\t\tif (this.once && !this.loop) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsessionStorage.setItem(this.sessionKey, 'true')\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error('Error saving to session storage:', error)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Dispatch the custom event\n\t\t\t\tthis.dispatchEvent(new CustomEvent('typeit-complete', { bubbles: true, composed: true }))\n\n\t\t\t\t// Hide the cursor (unless looping)\n\t\t\t\tif (!this.loop) {\n\t\t\t\t\tthis.typewriterContainer.style.setProperty('--ti-cursor-display', 'none')\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\n\t\t// Load TypeIt lazily on first call (module-scope memoised promise).\n\t\tconst TypeIt = await loadTypeIt()\n\t\t// Bail if we were disconnected during the load — avoids attaching to\n\t\t// a detached host.\n\t\tif (!this.isConnected) return\n\n\t\t// Initialize TypeIt\n\t\tthis.typeItInstance = new TypeIt(this.typewriterContainer, typeItOptions)\n\n\t\t// Process slotted content as actions\n\t\tconst slottedNodes = this._getSlottedNodes\n\t\tslottedNodes.forEach(node => {\n\t\t\tif (node.nodeType === Node.TEXT_NODE) {\n\t\t\t\t// Handle plain text - skip whitespace-only text nodes\n\t\t\t\tconst textContent = node.textContent || ''\n\t\t\t\tif (textContent.trim()) {\n\t\t\t\t\tthis.typeItInstance?.type(textContent)\n\t\t\t\t}\n\t\t\t} else if (node instanceof HTMLElement) {\n\t\t\t\t// Handle custom element\n\t\t\t\tthis._processCustomElement(node)\n\t\t\t}\n\t\t})\n\n\t\t// Start the typing animation if autoStart is enabled\n\t\t// use rxjs to detect once we are in the view port\n\t\tintersection$(this.shadowRoot?.host as Element).subscribe(() => {\n\t\t\t// alert('in view')\n\t\t\tthis.typeItInstance?.go()\n\t\t})\n\t\t// Start the typing animation if autoStart is enabled\n\t}\n\n\tprivate generateSessionKey(): string {\n\t\tconst slotContent = this._getSlottedElements.map(el => el.outerHTML).join('')\n\t\treturn this.once ? hashContent(slotContent) : ''\n\t}\n\t/**\n\t * Destroys the current TypeIt instance if it exists.\n\t */\n\tprivate _destroyTypeIt() {\n\t\tif (this.typeItInstance) {\n\t\t\ttry {\n\t\t\t\tthis.typeItInstance.destroy()\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('Error destroying TypeIt instance:', error)\n\t\t\t}\n\t\t\tthis.typeItInstance = null\n\t\t}\n\t}\n\n\t/**\n\t * Processes a custom element for its typing behavior.\n\t */\n\tprivate _processCustomElement(element: HTMLElement) {\n\t\tconst action = element.getAttribute('action')\n\t\tconst value = element.getAttribute('value')\n\t\tconst cycle = element.getAttribute('cycle')\n\n\t\t// Handle cycle attribute - simple pipe-separated list\n\t\tif (cycle) {\n\t\t\tconst items = cycle.split('|').map(item => item.trim())\n\t\t\tthis._processCycle(items, element)\n\t\t\treturn\n\t\t}\n\n\t\tswitch (action) {\n\t\t\tcase 'pause':\n\t\t\t\tthis.typeItInstance?.pause(parseInt(value || '0', 10))\n\t\t\t\tbreak\n\t\t\tcase 'delete':\n\t\t\t\tthis.typeItInstance?.delete(parseInt(value || '0', 10))\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tif (element.tagName === 'P') {\n\t\t\t\t\tthis.typeItInstance?.break()\n\t\t\t\t}\n\t\t\t\t// Treat as text if no action is defined\n\t\t\t\tthis.typeItInstance?.type(element.textContent || '')\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\t/**\n\t * Processes cycling text with auto-calculated delete counts.\n\t */\n\tprivate _processCycle(items: string[], element: HTMLElement) {\n\t\tif (items.length === 0) return\n\n\t\tconst customPause = element.getAttribute('pause')\n\t\tconst pauseDuration = customPause ? parseInt(customPause, 10) : this.cyclePause\n\n\t\t// Type each item with automatic deletion\n\t\titems.forEach((item, index) => {\n\t\t\t// Type the item\n\t\t\tthis.typeItInstance?.type(item)\n\n\t\t\t// Pause after typing (except after last item when not looping)\n\t\t\tif (index < items.length - 1 || this.loop) {\n\t\t\t\tthis.typeItInstance?.pause(pauseDuration)\n\t\t\t}\n\n\t\t\t// Delete back to start (except for last item when not looping)\n\t\t\tif (index < items.length - 1) {\n\t\t\t\tthis.typeItInstance?.delete(item.length)\n\t\t\t} else if (this.loop) {\n\t\t\t\t// For looping, delete and start over\n\t\t\t\tthis.typeItInstance?.delete(item.length)\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Renders the component's HTML.\n\t */\n\trender(): TemplateResult {\n\t\treturn html`<div id=\"typewriter\" aria-live=\"polite\"></div>\n\n\t\t\t<div class=\"typewriter\">\n\t\t\t\t<slot\n\t\t\t\t\thidden\n\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\tthis._startTyping()\n\t\t\t\t\t}}\n\t\t\t\t></slot>\n\t\t\t</div> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'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AAA,CAAA,CAAc,EAAA,UAAA,sBAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,oBAGD,CACnB,QAAA,CAAS,EAAA,CAAA,CAAA,CACR,EAAA,UAAA,mBAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,uBAGqB,CACtB,QAAA,CAAS,EAAA,CAAA,CAAA,CACR,EAAA,UAAA,sBAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAtLY,sBAAA,CAAA,CAAsB,EAAA,CAAA,OAAA,eAAA,QAAA,oBAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
@@ -1,8 +1,8 @@
1
- import { a as e } from "./tailwind.mixin-DIEGVcl3.js";
1
+ import { a as e } from "./tailwind.mixin-mdQR3BEO.js";
2
2
  import { t } from "./decorate-D_utPUsC.js";
3
- import { t as n } from "./litElement.mixin-BuZ28ZzP.js";
3
+ import { t as n } from "./litElement.mixin-CszkJuNl.js";
4
4
  import "./mixins.js";
5
- import { n as r } from "./delay-Cs0i_CpQ.js";
5
+ import { n as r } from "./delay-Dlk0A3he.js";
6
6
  import { t as i } from "./hashContent-B2IntJQf.js";
7
7
  import { t as a } from "./intersection-BrXp4YTO.js";
8
8
  import { customElement as o, property as s, query as c, queryAssignedElements as l, queryAssignedNodes as u } from "lit/decorators.js";
@@ -1 +1 @@
1
- {"version":3,"file":"typewriter.js","names":[],"sources":["../src/typewriter/typewriter.ts"],"sourcesContent":["import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { delayContext } from '@schmancy/delay'\nimport hashContent from '@schmancy/utils/hashContent'\nimport { intersection$ } from '@schmancy/utils/intersection'\nimport { css, html, TemplateResult } from 'lit'\nimport { customElement, property, query, queryAssignedElements, queryAssignedNodes } from 'lit/decorators.js'\n// TypeIt is loaded lazily on first render — see ADR 0014 in the parent\n// monorepo. The static import was replaced with a type-only import plus a\n// memoised dynamic loader so the ~15 KB gzipped vendor chunk stays out of\n// the agent bundle's first paint for pages that don't render a typewriter.\nimport type { Options as TypeItOptions } from 'typeit'\ntype TypeItCtor = typeof import('typeit').default\ntype TypeItInstance = InstanceType<TypeItCtor>\n\nlet typeItPromise: Promise<TypeItCtor> | null = null\nfunction loadTypeIt(): Promise<TypeItCtor> {\n\tif (typeItPromise) return typeItPromise\n\ttypeItPromise = import('typeit').then(m => m.default)\n\treturn typeItPromise\n}\n\n@customElement('schmancy-typewriter')\nexport class TypewriterElement extends $LitElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\n\t#typewriter {\n\t\tposition: relative;\n\t}\n\n\t/* Enhanced cursor with glow effect */\n\t#typewriter :global(.ti-cursor) {\n\t\tanimation: cursor-pulse 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tcolor: currentColor;\n\t\tfilter: drop-shadow(0 0 8px currentColor);\n\t}\n\n\t@keyframes cursor-pulse {\n\t\t0%, 100% {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1);\n\t\t}\n\t\t50% {\n\t\t\topacity: 0.3;\n\t\t\ttransform: scale(0.95);\n\t\t}\n\t}\n\n\t/* Character entrance animation */\n\t#typewriter :global(.ti-container *) {\n\t\tanimation: char-entrance 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;\n\t}\n\n\t@keyframes char-entrance {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.3) translateY(10px);\n\t\t\tfilter: blur(4px);\n\t\t}\n\t\t50% {\n\t\t\topacity: 0.8;\n\t\t\ttransform: scale(1.1) translateY(-2px);\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1) translateY(0);\n\t\t\tfilter: blur(0);\n\t\t}\n\t}\n\n\t/* Subtle character wobble on appear */\n\t#typewriter :global(.ti-container *:nth-child(odd)) {\n\t\tanimation: char-entrance 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards,\n\t\t char-wobble 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s backwards;\n\t}\n\n\t@keyframes char-wobble {\n\t\t0%, 100% {\n\t\t\ttransform: rotate(0deg);\n\t\t}\n\t\t25% {\n\t\t\ttransform: rotate(2deg);\n\t\t}\n\t\t75% {\n\t\t\ttransform: rotate(-2deg);\n\t\t}\n\t}\n\n\t/* Deletion animation - fade out and scale down */\n\t#typewriter :global(.ti-container .deleting) {\n\t\tanimation: char-delete 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;\n\t}\n\n\t@keyframes char-delete {\n\t\t0% {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1);\n\t\t\tfilter: blur(0);\n\t\t}\n\t\t50% {\n\t\t\topacity: 0.5;\n\t\t\ttransform: scale(0.8) translateY(-3px);\n\t\t}\n\t\t100% {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.4) translateY(-8px);\n\t\t\tfilter: blur(3px);\n\t\t}\n\t}\n\n\t/* Gradient text effect on typed text */\n\t#typewriter :global(.ti-container) {\n\t\tbackground: linear-gradient(\n\t\t\t90deg,\n\t\t\tcurrentColor 0%,\n\t\t\tcurrentColor 70%,\n\t\t\ttransparent 100%\n\t\t);\n\t\t-webkit-background-clip: text;\n\t\tbackground-clip: text;\n\t\tanimation: gradient-shift 3s ease-in-out infinite;\n\t}\n\n\t@keyframes gradient-shift {\n\t\t0%, 100% {\n\t\t\tfilter: brightness(1) saturate(1);\n\t\t}\n\t\t50% {\n\t\t\tfilter: brightness(1.15) saturate(1.2);\n\t\t}\n\t}\n\n\t/* Smooth transitions for all text */\n\t#typewriter * {\n\t\ttransition: opacity 0.15s ease-out, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);\n\t}\n`) {\n\t/**\n\t * Typing speed in milliseconds per character.\n\t */\n\t@property({ type: Number })\n\tspeed: number = 35\n\n\t/**\n\t * Delay before typing starts (ms).\n\t */\n\t@consume({ context: delayContext, subscribe: true })\n\t@property({ type: Number })\n\tdelay: number = 0\n\n\t/**\n\t * Automatically start typing on initialization.\n\t */\n\t@property({ type: Boolean })\n\tautoStart: boolean = true\n\n\t/**\n\t * The cursor character.\n\t */\n\t@property({ type: String })\n\tcursorChar: string = ''\n\n\t/**\n\t * Typing speed for deletions (ms per character).\n\t */\n\t@property({ type: Number })\n\tdeleteSpeed: number = 20\n\n\t/**\n\t * Only animate once per session.\n\t */\n\t@property({ type: Boolean }) once = true\n\n\t/**\n\t * Loop the animation infinitely (overrides once).\n\t */\n\t@property({ type: Boolean }) loop = false\n\n\t/**\n\t * Default pause duration for cycling (ms).\n\t */\n\t@property({ type: Number }) cyclePause = 1500\n\t/**\n\t * TypeIt instance. Populated after `loadTypeIt()` resolves inside\n\t * `_startTyping()` — null until then, which is correct for a cold start\n\t * where the vendor chunk hasn't loaded yet.\n\t */\n\tprivate typeItInstance: TypeItInstance | null = null\n\n\t/**\n\t * Reference to the typewriter container.\n\t */\n\t@query('#typewriter')\n\tprivate typewriterContainer!: HTMLElement\n\n\t@queryAssignedNodes({\n\t\tflatten: true,\n\t})\n\tprivate _getSlottedNodes!: Node[]\n\n\t@queryAssignedElements({\n\t\tflatten: true,\n\t})\n\tprivate _getSlottedElements!: HTMLElement[]\n\t/**\n\t * Lifecycle method called when the component is disconnected from the DOM.\n\t * Ensures that TypeIt instances are properly cleaned up.\n\t */\n\n\tprivate sessionKey = ''\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._destroyTypeIt()\n\t}\n\n\t/**\n\t * Initializes the TypeIt instance with the provided slotted content.\n\t * Async because TypeIt itself is lazy-loaded on first render.\n\t */\n\tprivate async _startTyping() {\n\t\t// Destroy any existing TypeIt instance\n\t\tthis._destroyTypeIt()\n\n\t\tthis.sessionKey = this.generateSessionKey()\n\n\t\tif (this.once && sessionStorage.getItem(this.sessionKey) === 'true') {\n\t\t\t// Skip delay and render immediately if once is set and already rendered\n\t\t\tthis.shadowRoot?.querySelector('slot')?.removeAttribute('hidden')\n\t\t\treturn\n\t\t}\n\n\t\tif (!this.typewriterContainer) {\n\t\t\tconsole.warn('Typewriter container not found.')\n\t\t\treturn\n\t\t}\n\n\t\t// Configure TypeIt options\n\t\tconst typeItOptions: TypeItOptions = {\n\t\t\tspeed: this.speed,\n\t\t\tstartDelay: this.delay,\n\t\t\tcursor: !!this.cursorChar,\n\t\t\tcursorChar: this.cursorChar,\n\t\t\tdeleteSpeed: this.deleteSpeed,\n\t\t\tloop: this.loop,\n\t\t\tafterComplete: () => {\n\t\t\t\tif (this.once && !this.loop) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsessionStorage.setItem(this.sessionKey, 'true')\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error('Error saving to session storage:', error)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Dispatch the custom event\n\t\t\t\tthis.dispatchEvent(new CustomEvent('typeit-complete', { bubbles: true, composed: true }))\n\n\t\t\t\t// Hide the cursor (unless looping)\n\t\t\t\tif (!this.loop) {\n\t\t\t\t\tthis.typewriterContainer.style.setProperty('--ti-cursor-display', 'none')\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\n\t\t// Load TypeIt lazily on first call (module-scope memoised promise).\n\t\tconst TypeIt = await loadTypeIt()\n\t\t// Bail if we were disconnected during the load — avoids attaching to\n\t\t// a detached host.\n\t\tif (!this.isConnected) return\n\n\t\t// Initialize TypeIt\n\t\tthis.typeItInstance = new TypeIt(this.typewriterContainer, typeItOptions)\n\n\t\t// Process slotted content as actions\n\t\tconst slottedNodes = this._getSlottedNodes\n\t\tslottedNodes.forEach(node => {\n\t\t\tif (node.nodeType === Node.TEXT_NODE) {\n\t\t\t\t// Handle plain text - skip whitespace-only text nodes\n\t\t\t\tconst textContent = node.textContent || ''\n\t\t\t\tif (textContent.trim()) {\n\t\t\t\t\tthis.typeItInstance?.type(textContent)\n\t\t\t\t}\n\t\t\t} else if (node instanceof HTMLElement) {\n\t\t\t\t// Handle custom element\n\t\t\t\tthis._processCustomElement(node)\n\t\t\t}\n\t\t})\n\n\t\t// Start the typing animation if autoStart is enabled\n\t\t// use rxjs to detect once we are in the view port\n\t\tintersection$(this.shadowRoot?.host as Element).subscribe(() => {\n\t\t\t// alert('in view')\n\t\t\tthis.typeItInstance?.go()\n\t\t})\n\t\t// Start the typing animation if autoStart is enabled\n\t}\n\n\tprivate generateSessionKey(): string {\n\t\tconst slotContent = this._getSlottedElements.map(el => el.outerHTML).join('')\n\t\treturn this.once ? hashContent(slotContent) : ''\n\t}\n\t/**\n\t * Destroys the current TypeIt instance if it exists.\n\t */\n\tprivate _destroyTypeIt() {\n\t\tif (this.typeItInstance) {\n\t\t\ttry {\n\t\t\t\tthis.typeItInstance.destroy()\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('Error destroying TypeIt instance:', error)\n\t\t\t}\n\t\t\tthis.typeItInstance = null\n\t\t}\n\t}\n\n\t/**\n\t * Processes a custom element for its typing behavior.\n\t */\n\tprivate _processCustomElement(element: HTMLElement) {\n\t\tconst action = element.getAttribute('action')\n\t\tconst value = element.getAttribute('value')\n\t\tconst cycle = element.getAttribute('cycle')\n\n\t\t// Handle cycle attribute - simple pipe-separated list\n\t\tif (cycle) {\n\t\t\tconst items = cycle.split('|').map(item => item.trim())\n\t\t\tthis._processCycle(items, element)\n\t\t\treturn\n\t\t}\n\n\t\tswitch (action) {\n\t\t\tcase 'pause':\n\t\t\t\tthis.typeItInstance?.pause(parseInt(value || '0', 10))\n\t\t\t\tbreak\n\t\t\tcase 'delete':\n\t\t\t\tthis.typeItInstance?.delete(parseInt(value || '0', 10))\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tif (element.tagName === 'P') {\n\t\t\t\t\tthis.typeItInstance?.break()\n\t\t\t\t}\n\t\t\t\t// Treat as text if no action is defined\n\t\t\t\tthis.typeItInstance?.type(element.textContent || '')\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\t/**\n\t * Processes cycling text with auto-calculated delete counts.\n\t */\n\tprivate _processCycle(items: string[], element: HTMLElement) {\n\t\tif (items.length === 0) return\n\n\t\tconst customPause = element.getAttribute('pause')\n\t\tconst pauseDuration = customPause ? parseInt(customPause, 10) : this.cyclePause\n\n\t\t// Type each item with automatic deletion\n\t\titems.forEach((item, index) => {\n\t\t\t// Type the item\n\t\t\tthis.typeItInstance?.type(item)\n\n\t\t\t// Pause after typing (except after last item when not looping)\n\t\t\tif (index < items.length - 1 || this.loop) {\n\t\t\t\tthis.typeItInstance?.pause(pauseDuration)\n\t\t\t}\n\n\t\t\t// Delete back to start (except for last item when not looping)\n\t\t\tif (index < items.length - 1) {\n\t\t\t\tthis.typeItInstance?.delete(item.length)\n\t\t\t} else if (this.loop) {\n\t\t\t\t// For looping, delete and start over\n\t\t\t\tthis.typeItInstance?.delete(item.length)\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Renders the component's HTML.\n\t */\n\trender(): TemplateResult {\n\t\treturn html`<div id=\"typewriter\" aria-live=\"polite\"></div>\n\n\t\t\t<div class=\"typewriter\">\n\t\t\t\t<slot\n\t\t\t\t\thidden\n\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\tthis._startTyping()\n\t\t\t\t\t}}\n\t\t\t\t></slot>\n\t\t\t</div> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-typewriter': TypewriterElement\n\t}\n}\n"],"mappings":";;;;;;;;;AAeA,IAAI,IAA4C,MAQzC,IAAA,cAAgC,EAAY,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAwHrC,IAAA,KAAA,QAOA,GAAA,KAAA,YAAA,CAMK,GAAA,KAAA,aAMA,IAAA,KAAA,cAMC,IAAA,KAAA,OAAA,CAKc,GAAA,KAAA,OAAA,CAKA,GAA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,WAAA,CAAW;CAAA,CAAA,EAC5C,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,SAAA,KAAA,EAAA,EAAA,EAAA,CAM1B,EAAS,EAAE,MAAM,SAAA,CAAA,CAAA,EAAU,EAAA,WAAA,aAAA,KAAA,EAAA,EAAA,EAAA,CAM3B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,cAAA,KAAA,EAAA,EAAA,EAAA,CAM1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,eAAA,KAAA,EAAA,EAAA,EAAA,CAM1B,EAAS,EAAE,MAAM,SAAA,CAAA,CAAA,EAAU,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAK3B,EAAS,EAAE,MAAM,SAAA,CAAA,CAAA,EAAU,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAK3B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,cAAA,KAAA,EAAA,EAAA,EAAA,CAW1B,EAAM,cAAA,CAAA,EAAc,EAAA,WAAA,uBAAA,KAAA,EAAA,EAAA,EAAA,CAGpB,EAAmB,EACnB,SAAA,CAAS,GAAA,CAAA,CAAA,EACR,EAAA,WAAA,oBAAA,KAAA,EAAA,EAAA,EAAA,CAGD,EAAsB,EACtB,SAAA,CAAS,GAAA,CAAA,CAAA,EACR,EAAA,WAAA,uBAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CAtLF,EAAc,sBAAA,CAAA,EAAsB,EAAA;AAAA,SAAA,KAAA"}
1
+ {"version":3,"file":"typewriter.js","names":[],"sources":["../src/typewriter/typewriter.ts"],"sourcesContent":["import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { delayContext } from '@schmancy/delay'\nimport hashContent from '@schmancy/utils/hashContent'\nimport { intersection$ } from '@schmancy/utils/intersection'\nimport { css, html, TemplateResult } from 'lit'\nimport { customElement, property, query, queryAssignedElements, queryAssignedNodes } from 'lit/decorators.js'\n// TypeIt is loaded lazily on first render — see ADR 0014 in the parent\n// monorepo. The static import was replaced with a type-only import plus a\n// memoised dynamic loader so the ~15 KB gzipped vendor chunk stays out of\n// the agent bundle's first paint for pages that don't render a typewriter.\nimport type { Options as TypeItOptions } from 'typeit'\ntype TypeItCtor = typeof import('typeit').default\ntype TypeItInstance = InstanceType<TypeItCtor>\n\nlet typeItPromise: Promise<TypeItCtor> | null = null\nfunction loadTypeIt(): Promise<TypeItCtor> {\n\tif (typeItPromise) return typeItPromise\n\ttypeItPromise = import('typeit').then(m => m.default)\n\treturn typeItPromise\n}\n\n/**\n * Typewriter effect — animates text typing/deletion with a cursor. Wraps the TypeIt library, lazy-loaded on first render.\n *\n * @element schmancy-typewriter\n * @summary Drop string content as the default slot or use `<p>` / `<span>` with `cycle=\"A|B|C\"` attribute children for cycling phrases. Set `loop` for infinite cycling, `once` to remember completion across sessions via sessionStorage.\n * @example\n * <schmancy-typewriter speed=\"35\" cursor-char=\"|\">\n * Hello, world.\n * </schmancy-typewriter>\n * @platform span - Animated text container. Degrades to its raw text content if the tag never registers — animation is lost but content stays visible.\n * @fires typeit-complete - When the animation finishes typing all content. Fires after the final `afterComplete` callback in the underlying TypeIt instance.\n */\n@customElement('schmancy-typewriter')\nexport class TypewriterElement extends $LitElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\n\t#typewriter {\n\t\tposition: relative;\n\t}\n\n\t/* Enhanced cursor with glow effect */\n\t#typewriter :global(.ti-cursor) {\n\t\tanimation: cursor-pulse 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tcolor: currentColor;\n\t\tfilter: drop-shadow(0 0 8px currentColor);\n\t}\n\n\t@keyframes cursor-pulse {\n\t\t0%, 100% {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1);\n\t\t}\n\t\t50% {\n\t\t\topacity: 0.3;\n\t\t\ttransform: scale(0.95);\n\t\t}\n\t}\n\n\t/* Character entrance animation */\n\t#typewriter :global(.ti-container *) {\n\t\tanimation: char-entrance 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;\n\t}\n\n\t@keyframes char-entrance {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.3) translateY(10px);\n\t\t\tfilter: blur(4px);\n\t\t}\n\t\t50% {\n\t\t\topacity: 0.8;\n\t\t\ttransform: scale(1.1) translateY(-2px);\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1) translateY(0);\n\t\t\tfilter: blur(0);\n\t\t}\n\t}\n\n\t/* Subtle character wobble on appear */\n\t#typewriter :global(.ti-container *:nth-child(odd)) {\n\t\tanimation: char-entrance 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards,\n\t\t char-wobble 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s backwards;\n\t}\n\n\t@keyframes char-wobble {\n\t\t0%, 100% {\n\t\t\ttransform: rotate(0deg);\n\t\t}\n\t\t25% {\n\t\t\ttransform: rotate(2deg);\n\t\t}\n\t\t75% {\n\t\t\ttransform: rotate(-2deg);\n\t\t}\n\t}\n\n\t/* Deletion animation - fade out and scale down */\n\t#typewriter :global(.ti-container .deleting) {\n\t\tanimation: char-delete 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;\n\t}\n\n\t@keyframes char-delete {\n\t\t0% {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1);\n\t\t\tfilter: blur(0);\n\t\t}\n\t\t50% {\n\t\t\topacity: 0.5;\n\t\t\ttransform: scale(0.8) translateY(-3px);\n\t\t}\n\t\t100% {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.4) translateY(-8px);\n\t\t\tfilter: blur(3px);\n\t\t}\n\t}\n\n\t/* Gradient text effect on typed text */\n\t#typewriter :global(.ti-container) {\n\t\tbackground: linear-gradient(\n\t\t\t90deg,\n\t\t\tcurrentColor 0%,\n\t\t\tcurrentColor 70%,\n\t\t\ttransparent 100%\n\t\t);\n\t\t-webkit-background-clip: text;\n\t\tbackground-clip: text;\n\t\tanimation: gradient-shift 3s ease-in-out infinite;\n\t}\n\n\t@keyframes gradient-shift {\n\t\t0%, 100% {\n\t\t\tfilter: brightness(1) saturate(1);\n\t\t}\n\t\t50% {\n\t\t\tfilter: brightness(1.15) saturate(1.2);\n\t\t}\n\t}\n\n\t/* Smooth transitions for all text */\n\t#typewriter * {\n\t\ttransition: opacity 0.15s ease-out, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);\n\t}\n`) {\n\t/**\n\t * Typing speed in milliseconds per character.\n\t */\n\t@property({ type: Number })\n\tspeed: number = 35\n\n\t/**\n\t * Delay before typing starts (ms).\n\t */\n\t@consume({ context: delayContext, subscribe: true })\n\t@property({ type: Number })\n\tdelay: number = 0\n\n\t/**\n\t * Automatically start typing on initialization.\n\t */\n\t@property({ type: Boolean })\n\tautoStart: boolean = true\n\n\t/**\n\t * The cursor character.\n\t */\n\t@property({ type: String })\n\tcursorChar: string = ''\n\n\t/**\n\t * Typing speed for deletions (ms per character).\n\t */\n\t@property({ type: Number })\n\tdeleteSpeed: number = 20\n\n\t/**\n\t * Only animate once per session.\n\t */\n\t@property({ type: Boolean }) once = true\n\n\t/**\n\t * Loop the animation infinitely (overrides once).\n\t */\n\t@property({ type: Boolean }) loop = false\n\n\t/**\n\t * Default pause duration for cycling (ms).\n\t */\n\t@property({ type: Number }) cyclePause = 1500\n\t/**\n\t * TypeIt instance. Populated after `loadTypeIt()` resolves inside\n\t * `_startTyping()` — null until then, which is correct for a cold start\n\t * where the vendor chunk hasn't loaded yet.\n\t */\n\tprivate typeItInstance: TypeItInstance | null = null\n\n\t/**\n\t * Reference to the typewriter container.\n\t */\n\t@query('#typewriter')\n\tprivate typewriterContainer!: HTMLElement\n\n\t@queryAssignedNodes({\n\t\tflatten: true,\n\t})\n\tprivate _getSlottedNodes!: Node[]\n\n\t@queryAssignedElements({\n\t\tflatten: true,\n\t})\n\tprivate _getSlottedElements!: HTMLElement[]\n\t/**\n\t * Lifecycle method called when the component is disconnected from the DOM.\n\t * Ensures that TypeIt instances are properly cleaned up.\n\t */\n\n\tprivate sessionKey = ''\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._destroyTypeIt()\n\t}\n\n\t/**\n\t * Initializes the TypeIt instance with the provided slotted content.\n\t * Async because TypeIt itself is lazy-loaded on first render.\n\t */\n\tprivate async _startTyping() {\n\t\t// Destroy any existing TypeIt instance\n\t\tthis._destroyTypeIt()\n\n\t\tthis.sessionKey = this.generateSessionKey()\n\n\t\tif (this.once && sessionStorage.getItem(this.sessionKey) === 'true') {\n\t\t\t// Skip delay and render immediately if once is set and already rendered\n\t\t\tthis.shadowRoot?.querySelector('slot')?.removeAttribute('hidden')\n\t\t\treturn\n\t\t}\n\n\t\tif (!this.typewriterContainer) {\n\t\t\tconsole.warn('Typewriter container not found.')\n\t\t\treturn\n\t\t}\n\n\t\t// Configure TypeIt options\n\t\tconst typeItOptions: TypeItOptions = {\n\t\t\tspeed: this.speed,\n\t\t\tstartDelay: this.delay,\n\t\t\tcursor: !!this.cursorChar,\n\t\t\tcursorChar: this.cursorChar,\n\t\t\tdeleteSpeed: this.deleteSpeed,\n\t\t\tloop: this.loop,\n\t\t\tafterComplete: () => {\n\t\t\t\tif (this.once && !this.loop) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsessionStorage.setItem(this.sessionKey, 'true')\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error('Error saving to session storage:', error)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Dispatch the custom event\n\t\t\t\tthis.dispatchEvent(new CustomEvent('typeit-complete', { bubbles: true, composed: true }))\n\n\t\t\t\t// Hide the cursor (unless looping)\n\t\t\t\tif (!this.loop) {\n\t\t\t\t\tthis.typewriterContainer.style.setProperty('--ti-cursor-display', 'none')\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\n\t\t// Load TypeIt lazily on first call (module-scope memoised promise).\n\t\tconst TypeIt = await loadTypeIt()\n\t\t// Bail if we were disconnected during the load — avoids attaching to\n\t\t// a detached host.\n\t\tif (!this.isConnected) return\n\n\t\t// Initialize TypeIt\n\t\tthis.typeItInstance = new TypeIt(this.typewriterContainer, typeItOptions)\n\n\t\t// Process slotted content as actions\n\t\tconst slottedNodes = this._getSlottedNodes\n\t\tslottedNodes.forEach(node => {\n\t\t\tif (node.nodeType === Node.TEXT_NODE) {\n\t\t\t\t// Handle plain text - skip whitespace-only text nodes\n\t\t\t\tconst textContent = node.textContent || ''\n\t\t\t\tif (textContent.trim()) {\n\t\t\t\t\tthis.typeItInstance?.type(textContent)\n\t\t\t\t}\n\t\t\t} else if (node instanceof HTMLElement) {\n\t\t\t\t// Handle custom element\n\t\t\t\tthis._processCustomElement(node)\n\t\t\t}\n\t\t})\n\n\t\t// Start the typing animation if autoStart is enabled\n\t\t// use rxjs to detect once we are in the view port\n\t\tintersection$(this.shadowRoot?.host as Element).subscribe(() => {\n\t\t\t// alert('in view')\n\t\t\tthis.typeItInstance?.go()\n\t\t})\n\t\t// Start the typing animation if autoStart is enabled\n\t}\n\n\tprivate generateSessionKey(): string {\n\t\tconst slotContent = this._getSlottedElements.map(el => el.outerHTML).join('')\n\t\treturn this.once ? hashContent(slotContent) : ''\n\t}\n\t/**\n\t * Destroys the current TypeIt instance if it exists.\n\t */\n\tprivate _destroyTypeIt() {\n\t\tif (this.typeItInstance) {\n\t\t\ttry {\n\t\t\t\tthis.typeItInstance.destroy()\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('Error destroying TypeIt instance:', error)\n\t\t\t}\n\t\t\tthis.typeItInstance = null\n\t\t}\n\t}\n\n\t/**\n\t * Processes a custom element for its typing behavior.\n\t */\n\tprivate _processCustomElement(element: HTMLElement) {\n\t\tconst action = element.getAttribute('action')\n\t\tconst value = element.getAttribute('value')\n\t\tconst cycle = element.getAttribute('cycle')\n\n\t\t// Handle cycle attribute - simple pipe-separated list\n\t\tif (cycle) {\n\t\t\tconst items = cycle.split('|').map(item => item.trim())\n\t\t\tthis._processCycle(items, element)\n\t\t\treturn\n\t\t}\n\n\t\tswitch (action) {\n\t\t\tcase 'pause':\n\t\t\t\tthis.typeItInstance?.pause(parseInt(value || '0', 10))\n\t\t\t\tbreak\n\t\t\tcase 'delete':\n\t\t\t\tthis.typeItInstance?.delete(parseInt(value || '0', 10))\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tif (element.tagName === 'P') {\n\t\t\t\t\tthis.typeItInstance?.break()\n\t\t\t\t}\n\t\t\t\t// Treat as text if no action is defined\n\t\t\t\tthis.typeItInstance?.type(element.textContent || '')\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\t/**\n\t * Processes cycling text with auto-calculated delete counts.\n\t */\n\tprivate _processCycle(items: string[], element: HTMLElement) {\n\t\tif (items.length === 0) return\n\n\t\tconst customPause = element.getAttribute('pause')\n\t\tconst pauseDuration = customPause ? parseInt(customPause, 10) : this.cyclePause\n\n\t\t// Type each item with automatic deletion\n\t\titems.forEach((item, index) => {\n\t\t\t// Type the item\n\t\t\tthis.typeItInstance?.type(item)\n\n\t\t\t// Pause after typing (except after last item when not looping)\n\t\t\tif (index < items.length - 1 || this.loop) {\n\t\t\t\tthis.typeItInstance?.pause(pauseDuration)\n\t\t\t}\n\n\t\t\t// Delete back to start (except for last item when not looping)\n\t\t\tif (index < items.length - 1) {\n\t\t\t\tthis.typeItInstance?.delete(item.length)\n\t\t\t} else if (this.loop) {\n\t\t\t\t// For looping, delete and start over\n\t\t\t\tthis.typeItInstance?.delete(item.length)\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Renders the component's HTML.\n\t */\n\trender(): TemplateResult {\n\t\treturn html`<div id=\"typewriter\" aria-live=\"polite\"></div>\n\n\t\t\t<div class=\"typewriter\">\n\t\t\t\t<slot\n\t\t\t\t\thidden\n\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\tthis._startT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pB,EAAmB,EACnB,SAAA,CAAS,GAAA,CAAA,CAAA,EACR,EAAA,WAAA,oBAAA,KAAA,EAAA,EAAA,EAAA,CAGD,EAAsB,EACtB,SAAA,CAAS,GAAA,CAAA,CAAA,EACR,EAAA,WAAA,uBAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CAtLF,EAAc,sBAAA,CAAA,EAAsB,EAAA;AAAA,SAAA,KAAA"}
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-BHX99hgX.cjs`),t=require(`./decorate-F9CuyeHg.cjs`);let n=require(`rxjs`),r=require(`rxjs/operators`),i=require(`lit/decorators.js`),a=require(`lit`),o=require(`lit/directives/ref.js`),s=require(`lit/static-html.js`);var c={display:{type:`display`,token:`lg`},"display-lg":{type:`display`,token:`lg`},"display-md":{type:`display`,token:`md`},"display-sm":{type:`display`,token:`sm`},"heading-lg":{type:`headline`,token:`lg`},"heading-md":{type:`headline`,token:`md`},"heading-sm":{type:`headline`,token:`sm`},"title-lg":{type:`title`,token:`lg`},"title-md":{type:`title`,token:`md`},"title-sm":{type:`title`,token:`sm`},"body-lg":{type:`body`,token:`lg`},"body-md":{type:`body`,token:`md`},"body-sm":{type:`body`,token:`sm`},"label-lg":{type:`label`,token:`lg`},"label-md":{type:`label`,token:`md`},"label-sm":{type:`label`,token:`sm`},caption:{type:`label`,token:`sm`}},l={h1:s.literal`h1`,h2:s.literal`h2`,h3:s.literal`h3`,h4:s.literal`h4`,h5:s.literal`h5`,h6:s.literal`h6`,p:s.literal`p`,span:s.literal`span`,div:s.literal`div`},u=class extends e.t(a.css`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-DRI1oTYQ.cjs`),t=require(`./decorate-F9CuyeHg.cjs`);let n=require(`rxjs`),r=require(`rxjs/operators`),i=require(`lit/decorators.js`),a=require(`lit`),o=require(`lit/directives/ref.js`),s=require(`lit/static-html.js`);var c={display:{type:`display`,token:`lg`},"display-lg":{type:`display`,token:`lg`},"display-md":{type:`display`,token:`md`},"display-sm":{type:`display`,token:`sm`},"heading-lg":{type:`headline`,token:`lg`},"heading-md":{type:`headline`,token:`md`},"heading-sm":{type:`headline`,token:`sm`},"title-lg":{type:`title`,token:`lg`},"title-md":{type:`title`,token:`md`},"title-sm":{type:`title`,token:`sm`},"body-lg":{type:`body`,token:`lg`},"body-md":{type:`body`,token:`md`},"body-sm":{type:`body`,token:`sm`},"label-lg":{type:`label`,token:`lg`},"label-md":{type:`label`,token:`md`},"label-sm":{type:`label`,token:`sm`},caption:{type:`label`,token:`sm`}},l={h1:s.literal`h1`,h2:s.literal`h2`,h3:s.literal`h3`,h4:s.literal`h4`,h5:s.literal`h5`,h6:s.literal`h6`,p:s.literal`p`,span:s.literal`span`,div:s.literal`div`},u=class extends e.t(a.css`
2
2
  :host {
3
3
  display: block;
4
4
  font-family: inherit;
@@ -1 +1 @@
1
- {"version":3,"file":"typography.cjs","names":[],"sources":["../src/typography/typography.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/tailwind.mixin'\nimport { css, html, type PropertyValues } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { html as staticHtml, literal } from 'lit/static-html.js'\nimport { fromEvent } from 'rxjs'\nimport { filter, tap, takeUntil } from 'rxjs/operators'\n\n/**\n * Preset → (type, token) shorthand. Saves the two-decision-per-text-node\n * fatigue that 50+ typography nodes in a single page cause.\n */\nexport type TypographyPreset =\n\t| 'display' | 'display-lg' | 'display-md' | 'display-sm'\n\t| 'heading-lg' | 'heading-md' | 'heading-sm'\n\t| 'title-lg' | 'title-md' | 'title-sm'\n\t| 'body-lg' | 'body-md' | 'body-sm'\n\t| 'label-lg' | 'label-md' | 'label-sm'\n\t| 'caption'\n\nconst PRESET_MAP: Record<TypographyPreset, { type: string; token: string }> = {\n\t'display': { type: 'display', token: 'lg' },\n\t'display-lg': { type: 'display', token: 'lg' },\n\t'display-md': { type: 'display', token: 'md' },\n\t'display-sm': { type: 'display', token: 'sm' },\n\t'heading-lg': { type: 'headline', token: 'lg' },\n\t'heading-md': { type: 'headline', token: 'md' },\n\t'heading-sm': { type: 'headline', token: 'sm' },\n\t'title-lg': { type: 'title', token: 'lg' },\n\t'title-md': { type: 'title', token: 'md' },\n\t'title-sm': { type: 'title', token: 'sm' },\n\t'body-lg': { type: 'body', token: 'lg' },\n\t'body-md': { type: 'body', token: 'md' },\n\t'body-sm': { type: 'body', token: 'sm' },\n\t'label-lg': { type: 'label', token: 'lg' },\n\t'label-md': { type: 'label', token: 'md' },\n\t'label-sm': { type: 'label', token: 'sm' },\n\t'caption': { type: 'label', token: 'sm' },\n}\n\n/**\n * Allowed semantic tag names for the `as` prop. Closed enum so we can\n * use `literal` template parts safely with `lit/static-html`.\n */\nexport type TypographyTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div'\n\nconst TAG_LITERALS: Record<TypographyTag, ReturnType<typeof literal>> = {\n\th1: literal`h1`,\n\th2: literal`h2`,\n\th3: literal`h3`,\n\th4: literal`h4`,\n\th5: literal`h5`,\n\th6: literal`h6`,\n\tp: literal`p`,\n\tspan: literal`span`,\n\tdiv: literal`div`,\n}\n\n// Material Design 3 typography - https://m3.material.io/styles/typography/type-scale-tokens\n\n/**\n * @element schmancy-typography\n * @slot - The text for the typography.\n */\n@customElement('schmancy-typography')\nexport class SchmancyTypography extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\thyphens: none;\n\t}\n\n\t/* Text alignment */\n\t:host([align='center']) {\n\t\ttext-align: center;\n\t}\n\n\t:host([align='left']) {\n\t\ttext-align: start;\n\t}\n\n\t:host([align='right']) {\n\t\ttext-align: right;\n\t}\n\n\t:host([align='justify']) {\n\t\ttext-align: justify;\n\t}\n\n\t/* Font weight */\n\t:host([weight='bold']) {\n\t\tfont-weight: 700;\n\t}\n\n\t:host([weight='medium']) {\n\t\tfont-weight: 500;\n\t}\n\n\t:host([weight='normal']) {\n\t\tfont-weight: 400;\n\t}\n\n\t/* Text transform */\n\t:host([transform='uppercase']) {\n\t\ttext-transform: uppercase;\n\t}\n\n\t:host([transform='lowercase']) {\n\t\ttext-transform: lowercase;\n\t}\n\n\t:host([transform='capitalize']) {\n\t\ttext-transform: capitalize;\n\t}\n\n\t:host([transform='normal']) {\n\t\ttext-transform: none;\n\t}\n\n\t/* Type-based weight defaults (when using Tailwind classes without token) */\n\t:host([type='display']),\n\t:host([type='headline']),\n\t:host([type='body']) {\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='label']),\n\t:host([type='subtitle']),\n\t:host([type='title']) {\n\t\tfont-weight: 500;\n\t}\n\n\t/* Display typography variants - Material Design 3 + Extended */\n\t:host([type='display'][token='xl']) {\n\t\tfont-size: 72px;\n\t\tline-height: 80px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='lg']) {\n\t\tfont-size: 57px;\n\t\tline-height: 64px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='md']) {\n\t\tfont-size: 45px;\n\t\tline-height: 52px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='sm']) {\n\t\tfont-size: 36px;\n\t\tline-height: 44px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='xs']) {\n\t\tfont-size: 28px;\n\t\tline-height: 36px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Headline typography variants - Material Design 3 + Extended */\n\t:host([type='headline'][token='xl']) {\n\t\tfont-size: 36px;\n\t\tline-height: 44px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='lg']) {\n\t\tfont-size: 32px;\n\t\tline-height: 40px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='md']) {\n\t\tfont-size: 28px;\n\t\tline-height: 36px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='sm']) {\n\t\tfont-size: 24px;\n\t\tline-height: 32px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='xs']) {\n\t\tfont-size: 20px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Title typography variants - Material Design 3 + Extended */\n\t:host([type='title'][token='xl']) {\n\t\tfont-size: 24px;\n\t\tline-height: 32px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='title'][token='lg']) {\n\t\tfont-size: 22px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='title'][token='md']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='title'][token='sm']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='title'][token='xs']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Subtitle typography variants - Extended from Material Design 3 */\n\t:host([type='subtitle'][token='xl']) {\n\t\tfont-size: 20px;\n\t\tline-height: 28px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='lg']) {\n\t\tfont-size: 18px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='md']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='sm']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='xs']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Body typography variants - Material Design 3 + Extended */\n\t:host([type='body'][token='xl']) {\n\t\tfont-size: 18px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='lg']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='md']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='sm']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='xs']) {\n\t\tfont-size: 10px;\n\t\tline-height: 14px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Label typography variants - Material Design 3 + Extended */\n\t:host([type='label'][token='xl']) {\n\t\tfont-size: 16px;\n\t\tline-height: 22px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='lg']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='md']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='sm']) {\n\t\tfont-size: 11px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='xs']) {\n\t\tfont-size: 10px;\n\t\tline-height: 14px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Note: Custom letter-spacing, font-size, and line-height should be applied via inline styles or Tailwind classes */\n\n\t:host([editable]) {\n\t\tcursor: text;\n\t\tborder-radius: 4px;\n\t\ttransition: background 150ms;\n\t\tmin-height: 1em;\n\t}\n\t/* Editable div lives in shadow DOM so light DOM (Lit markers) is untouched */\n\t.edit {\n\t\toutline: none;\n\t\tmin-height: 1em;\n\t\tfont: inherit;\n\t\tcolor: inherit;\n\t\tletter-spacing: inherit;\n\t\tline-height: inherit;\n\t}\n\t.edit:empty::before {\n\t\tcontent: attr(data-placeholder);\n\t\tpointer-events: none;\n\t\tdisplay: block;\n\t\topacity: 0.35;\n\t}\n`) {\n\tstatic shadowRootOptions: ShadowRootInit = {\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * @attr type - The type of the typography.\n\t * @default 'body'\n\t * @type {'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label'}\n\t */\n\t@property({ type: String, reflect: true })\n\ttype: 'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label' = 'body'\n\n\t/**\n\t * Shorthand for picking a (type, token) pair in one go. When set, derives\n\t * `type` and `token` automatically — saves the two-decisions-per-text-node\n\t * fatigue that hits when a single page has 50+ typography nodes.\n\t *\n\t * @attr preset\n\t * @type {TypographyPreset}\n\t * @example <schmancy-typography preset=\"heading-md\">Title</schmancy-typography>\n\t */\n\t@property({ type: String, reflect: true })\n\tpreset?: TypographyPreset\n\n\t/**\n\t * Render the slot wrapped in the requested semantic HTML element so screen\n\t * readers expose the right role / heading level. Without `as`, the slot\n\t * sits directly in the shadow root and the host is a generic element.\n\t *\n\t * @attr as\n\t * @type {TypographyTag}\n\t * @example <schmancy-typography preset=\"heading-md\" as=\"h2\">Section</schmancy-typography>\n\t */\n\t@property({ type: String, reflect: true })\n\tas?: TypographyTag\n\n\t/**\n\t * @attr token - The size token.\n\t * @deprecated Prefer using Tailwind responsive text classes for better responsive design.\n\t * Set token=\"\" and use class=\"text-sm md:text-base lg:text-lg\" instead.\n\t * Example: <schmancy-typography type=\"display\" token=\"\" class=\"text-2xl sm:text-3xl md:text-4xl\">\n\t * @default 'md'\n\t * @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | ''}\n\t */\n\t@property({ type: String, reflect: true })\n\ttoken: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '' = 'md'\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'left' |'center' |'right'}\n\t */\n\t@property({ type: String, reflect: true })\n\talign: 'left' | 'center' | 'justify' | 'right' | undefined\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'normal' | 'medium' |'bold'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true })\n\tweight: 'normal' | 'medium' | 'bold' | undefined\n\t\n\t/**\n\t *\n\t * @attr\n\t * @default inherit\n\t * @type {'uppercase' |'lowercase' |'capitalize' |'normal'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true }) \n\ttransform: 'uppercase' | 'lowercase' | 'capitalize' | 'normal' | undefined\n\n\t@property({ type: Number })\n\tmaxLines: 1 | 2 | 3 | 4 | 5 | 6 | undefined\n\n\t/** When true, the element becomes contenteditable and dispatches 'change' events on blur/Enter */\n\t@property({ type: Boolean, reflect: true }) editable = false\n\t/** The text value when in editable mode. Set via property binding: .value=${...} */\n\t@property({ type: String }) value = ''\n\t/** Placeholder shown when editable and empty */\n\t@property({ type: String }) placeholder = ''\n\n\tprivate _editRef = createRef<HTMLDivElement>()\n\n\tprotected override willUpdate(changed: PropertyValues): void {\n\t\tsuper.willUpdate?.(changed)\n\t\t// `preset` shorthand expands to (type, token) so the existing CSS\n\t\t// selectors keep matching without duplicating the size scale.\n\t\tif (changed.has('preset') && this.preset && PRESET_MAP[this.preset]) {\n\t\t\tconst { type, token } = PRESET_MAP[this.preset]\n\t\t\tthis.type = type as typeof this.type\n\t\t\tthis.token = token as typeof this.token\n\t\t}\n\t}\n\n\t/** Focus and select all text in editable mode */\n\tselectAll() {\n\t\tconst el = this._editRef.value\n\t\tif (!el) return\n\t\tel.focus()\n\t\tconst sel = window.getSelection()\n\t\tif (sel && el.textContent) {\n\t\t\tconst range = document.createRange()\n\t\t\trange.selectNodeContents(el)\n\t\t\tsel.removeAllRanges()\n\t\t\tsel.addRange(range)\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent<FocusEvent>(this, 'focusout').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\ttap(() => {\n\t\t\t\tconst el = this._editRef.value\n\t\t\t\tif (!el) return\n\t\t\t\tconst newValue = el.innerText.trim()\n\t\t\t\tif (newValue !== this.value) {\n\t\t\t\t\tthis.dispatchEvent(new CustomEvent('change', {\n\t\t\t\t\t\tdetail: { value: newValue },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t\t// Ensure truly empty so :empty CSS placeholder works\n\t\t\t\tif (!newValue) el.textContent = ''\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\t// Clean stray <br> / whitespace nodes so :empty CSS matches\n\t\tfromEvent(this, 'input').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\ttap(() => {\n\t\t\t\tconst el = this._editRef.value\n\t\t\t\tif (el && !el.innerText.trim()) el.textContent = ''\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\tfilter(e => e.key === 'Enter'),\n\t\t\ttap(e => { e.preventDefault(); (this._editRef.value ?? this).blur() }),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tprotected updated(changedProperties: Map<string, unknown>): void {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('maxLines')) {\n\t\t\t// Remove all line-clamp classes\n\t\t\tthis.classList.remove('line-clamp-1', 'line-clamp-2', 'line-clamp-3', 'line-clamp-4', 'line-clamp-5', 'line-clamp-6')\n\t\t\t// Add the appropriate one\n\t\t\tif (this.maxLines) {\n\t\t\t\tthis.classList.add(`line-clamp-${this.maxLines}`)\n\t\t\t}\n\t\t}\n\t\tif ((changedProperties.has('value') || changedProperties.has('editable')) && this.editable) {\n\t\t\tconst el = this._editRef.value\n\t\t\tif (el && document.activeElement !== el) {\n\t\t\t\tif (this.value) {\n\t\t\t\t\tel.innerText = this.value\n\t\t\t\t} else {\n\t\t\t\t\tel.textContent = ''\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected render(): unknown {\n\t\tif (this.editable) {\n\t\t\treturn html`<div\n\t\t\t\t${ref(this._editRef)}\n\t\t\t\tclass=\"edit\"\n\t\t\t\tcontenteditable=\"true\"\n\t\t\t\tdata-placeholder=${this.placeholder ?? ''}\n\t\t\t></div>`\n\t\t}\n\t\t// `as` wraps the slot in the requested semantic tag so heading levels\n\t\t// land in the accessibility tree. Without `as` the slot is bare and\n\t\t// the host element carries the visual styling only.\n\t\tif (this.as && TAG_LITERALS[this.as]) {\n\t\t\tconst tag = TAG_LITERALS[this.as]\n\t\t\treturn staticHtml`<${tag}><slot></slot></${tag}>`\n\t\t}\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-typography': SchmancyTypography\n\t}\n}"],"mappings":"8VAoBA,IAAM,EAAwE,CAC7E,QAAc,CAAE,KAAM,UAAY,MAAO,KAAA,CACzC,aAAc,CAAE,KAAM,UAAY,MAAO,KAAA,CACzC,aAAc,CAAE,KAAM,UAAY,MAAO,KAAA,CACzC,aAAc,CAAE,KAAM,UAAY,MAAO,KAAA,CACzC,aAAc,CAAE,KAAM,WAAY,MAAO,KAAA,CACzC,aAAc,CAAE,KAAM,WAAY,MAAO,KAAA,CACzC,aAAc,CAAE,KAAM,WAAY,MAAO,KAAA,CACzC,WAAc,CAAE,KAAM,QAAY,MAAO,KAAA,CACzC,WAAc,CAAE,KAAM,QAAY,MAAO,KAAA,CACzC,WAAc,CAAE,KAAM,QAAY,MAAO,KAAA,CACzC,UAAc,CAAE,KAAM,OAAY,MAAO,KAAA,CACzC,UAAc,CAAE,KAAM,OAAY,MAAO,KAAA,CACzC,UAAc,CAAE,KAAM,OAAY,MAAO,KAAA,CACzC,WAAc,CAAE,KAAM,QAAY,MAAO,KAAA,CACzC,WAAc,CAAE,KAAM,QAAY,MAAO,KAAA,CACzC,WAAc,CAAE,KAAM,QAAY,MAAO,KAAA,CACzC,QAAc,CAAE,KAAM,QAAY,MAAO,KAAA,CAAA,CASpC,EAAkE,CAC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,CAAA,CAAO,EAAA,UAAA,YAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAGhC,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,WAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAIjB,CAAE,KAAM,QAAS,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,WAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEjC,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,QAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEjB,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,cAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAzWb,sBAAA,CAAA,CAAsB,EAAA,CAAA,OAAA,eAAA,QAAA,qBAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"typography.cjs","names":[],"sources":["../src/typography/typography.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/tailwind.mixin'\nimport { css, html, type PropertyValues } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { html as staticHtml, literal } from 'lit/static-html.js'\nimport { fromEvent } from 'rxjs'\nimport { filter, tap, takeUntil } from 'rxjs/operators'\n\n/**\n * Preset → (type, token) shorthand. Saves the two-decision-per-text-node\n * fatigue that 50+ typography nodes in a single page cause.\n */\nexport type TypographyPreset =\n\t| 'display' | 'display-lg' | 'display-md' | 'display-sm'\n\t| 'heading-lg' | 'heading-md' | 'heading-sm'\n\t| 'title-lg' | 'title-md' | 'title-sm'\n\t| 'body-lg' | 'body-md' | 'body-sm'\n\t| 'label-lg' | 'label-md' | 'label-sm'\n\t| 'caption'\n\nconst PRESET_MAP: Record<TypographyPreset, { type: string; token: string }> = {\n\t'display': { type: 'display', token: 'lg' },\n\t'display-lg': { type: 'display', token: 'lg' },\n\t'display-md': { type: 'display', token: 'md' },\n\t'display-sm': { type: 'display', token: 'sm' },\n\t'heading-lg': { type: 'headline', token: 'lg' },\n\t'heading-md': { type: 'headline', token: 'md' },\n\t'heading-sm': { type: 'headline', token: 'sm' },\n\t'title-lg': { type: 'title', token: 'lg' },\n\t'title-md': { type: 'title', token: 'md' },\n\t'title-sm': { type: 'title', token: 'sm' },\n\t'body-lg': { type: 'body', token: 'lg' },\n\t'body-md': { type: 'body', token: 'md' },\n\t'body-sm': { type: 'body', token: 'sm' },\n\t'label-lg': { type: 'label', token: 'lg' },\n\t'label-md': { type: 'label', token: 'md' },\n\t'label-sm': { type: 'label', token: 'sm' },\n\t'caption': { type: 'label', token: 'sm' },\n}\n\n/**\n * Allowed semantic tag names for the `as` prop. Closed enum so we can\n * use `literal` template parts safely with `lit/static-html`.\n */\nexport type TypographyTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div'\n\nconst TAG_LITERALS: Record<TypographyTag, ReturnType<typeof literal>> = {\n\th1: literal`h1`,\n\th2: literal`h2`,\n\th3: literal`h3`,\n\th4: literal`h4`,\n\th5: literal`h5`,\n\th6: literal`h6`,\n\tp: literal`p`,\n\tspan: literal`span`,\n\tdiv: literal`div`,\n}\n\n// Material Design 3 typography - https://m3.material.io/styles/typography/type-scale-tokens\n\n/**\n * @element schmancy-typography\n * @slot - The text for the typography.\n * @fires change - When `editable` is true, fires on blur or Enter with `detail.value` set to the new text content. Not fired when `editable` is unset (the default).\n */\n@customElement('schmancy-typography')\nexport class SchmancyTypography extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\thyphens: none;\n\t}\n\n\t/* Text alignment */\n\t:host([align='center']) {\n\t\ttext-align: center;\n\t}\n\n\t:host([align='left']) {\n\t\ttext-align: start;\n\t}\n\n\t:host([align='right']) {\n\t\ttext-align: right;\n\t}\n\n\t:host([align='justify']) {\n\t\ttext-align: justify;\n\t}\n\n\t/* Font weight */\n\t:host([weight='bold']) {\n\t\tfont-weight: 700;\n\t}\n\n\t:host([weight='medium']) {\n\t\tfont-weight: 500;\n\t}\n\n\t:host([weight='normal']) {\n\t\tfont-weight: 400;\n\t}\n\n\t/* Text transform */\n\t:host([transform='uppercase']) {\n\t\ttext-transform: uppercase;\n\t}\n\n\t:host([transform='lowercase']) {\n\t\ttext-transform: lowercase;\n\t}\n\n\t:host([transform='capitalize']) {\n\t\ttext-transform: capitalize;\n\t}\n\n\t:host([transform='normal']) {\n\t\ttext-transform: none;\n\t}\n\n\t/* Type-based weight defaults (when using Tailwind classes without token) */\n\t:host([type='display']),\n\t:host([type='headline']),\n\t:host([type='body']) {\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='label']),\n\t:host([type='subtitle']),\n\t:host([type='title']) {\n\t\tfont-weight: 500;\n\t}\n\n\t/* Display typography variants - Material Design 3 + Extended */\n\t:host([type='display'][token='xl']) {\n\t\tfont-size: 72px;\n\t\tline-height: 80px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='lg']) {\n\t\tfont-size: 57px;\n\t\tline-height: 64px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='md']) {\n\t\tfont-size: 45px;\n\t\tline-height: 52px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='sm']) {\n\t\tfont-size: 36px;\n\t\tline-height: 44px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='xs']) {\n\t\tfont-size: 28px;\n\t\tline-height: 36px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Headline typography variants - Material Design 3 + Extended */\n\t:host([type='headline'][token='xl']) {\n\t\tfont-size: 36px;\n\t\tline-height: 44px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='lg']) {\n\t\tfont-size: 32px;\n\t\tline-height: 40px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='md']) {\n\t\tfont-size: 28px;\n\t\tline-height: 36px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='sm']) {\n\t\tfont-size: 24px;\n\t\tline-height: 32px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='xs']) {\n\t\tfont-size: 20px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Title typography variants - Material Design 3 + Extended */\n\t:host([type='title'][token='xl']) {\n\t\tfont-size: 24px;\n\t\tline-height: 32px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='title'][token='lg']) {\n\t\tfont-size: 22px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='title'][token='md']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='title'][token='sm']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='title'][token='xs']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Subtitle typography variants - Extended from Material Design 3 */\n\t:host([type='subtitle'][token='xl']) {\n\t\tfont-size: 20px;\n\t\tline-height: 28px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='lg']) {\n\t\tfont-size: 18px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='md']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='sm']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='xs']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Body typography variants - Material Design 3 + Extended */\n\t:host([type='body'][token='xl']) {\n\t\tfont-size: 18px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='lg']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='md']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='sm']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='xs']) {\n\t\tfont-size: 10px;\n\t\tline-height: 14px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Label typography variants - Material Design 3 + Extended */\n\t:host([type='label'][token='xl']) {\n\t\tfont-size: 16px;\n\t\tline-height: 22px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='lg']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='md']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='sm']) {\n\t\tfont-size: 11px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='xs']) {\n\t\tfont-size: 10px;\n\t\tline-height: 14px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Note: Custom letter-spacing, font-size, and line-height should be applied via inline styles or Tailwind classes */\n\n\t:host([editable]) {\n\t\tcursor: text;\n\t\tborder-radius: 4px;\n\t\ttransition: background 150ms;\n\t\tmin-height: 1em;\n\t}\n\t/* Editable div lives in shadow DOM so light DOM (Lit markers) is untouched */\n\t.edit {\n\t\toutline: none;\n\t\tmin-height: 1em;\n\t\tfont: inherit;\n\t\tcolor: inherit;\n\t\tletter-spacing: inherit;\n\t\tline-height: inherit;\n\t}\n\t.edit:empty::before {\n\t\tcontent: attr(data-placeholder);\n\t\tpointer-events: none;\n\t\tdisplay: block;\n\t\topacity: 0.35;\n\t}\n`) {\n\tstatic shadowRootOptions: ShadowRootInit = {\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * @attr type - The type of the typography.\n\t * @default 'body'\n\t * @type {'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label'}\n\t */\n\t@property({ type: String, reflect: true })\n\ttype: 'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label' = 'body'\n\n\t/**\n\t * Shorthand for picking a (type, token) pair in one go. When set, derives\n\t * `type` and `token` automatically — saves the two-decisions-per-text-node\n\t * fatigue that hits when a single page has 50+ typography nodes.\n\t *\n\t * @attr preset\n\t * @type {TypographyPreset}\n\t * @example <schmancy-typography preset=\"heading-md\">Title</schmancy-typography>\n\t */\n\t@property({ type: String, reflect: true })\n\tpreset?: TypographyPreset\n\n\t/**\n\t * Render the slot wrapped in the requested semantic HTML element so screen\n\t * readers expose the right role / heading level. Without `as`, the slot\n\t * sits directly in the shadow root and the host is a generic element.\n\t *\n\t * @attr as\n\t * @type {TypographyTag}\n\t * @example <schmancy-typography preset=\"heading-md\" as=\"h2\">Section</schmancy-typography>\n\t */\n\t@property({ type: String, reflect: true })\n\tas?: TypographyTag\n\n\t/**\n\t * @attr token - The size token.\n\t * @deprecated Prefer using Tailwind responsive text classes for better responsive design.\n\t * Set token=\"\" and use class=\"text-sm md:text-base lg:text-lg\" instead.\n\t * Example: <schmancy-typography type=\"display\" token=\"\" class=\"text-2xl sm:text-3xl md:text-4xl\">\n\t * @default 'md'\n\t * @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | ''}\n\t */\n\t@property({ type: String, reflect: true })\n\ttoken: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '' = 'md'\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'left' |'center' |'right'}\n\t */\n\t@property({ type: String, reflect: true })\n\talign: 'left' | 'center' | 'justify' | 'right' | undefined\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'normal' | 'medium' |'bold'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true })\n\tweight: 'normal' | 'medium' | 'bold' | undefined\n\t\n\t/**\n\t *\n\t * @attr\n\t * @default inherit\n\t * @type {'uppercase' |'lowercase' |'capitalize' |'normal'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true }) \n\ttransform: 'uppercase' | 'lowercase' | 'capitalize' | 'normal' | undefined\n\n\t@property({ type: Number })\n\tmaxLines: 1 | 2 | 3 | 4 | 5 | 6 | undefined\n\n\t/** When true, the element becomes contenteditable and dispatches 'change' events on blur/Enter */\n\t@property({ type: Boolean, reflect: true }) editable = false\n\t/** The text value when in editable mode. Set via property binding: .value=${...} */\n\t@property({ type: String }) value = ''\n\t/** Placeholder shown when editable and empty */\n\t@property({ type: String }) placeholder = ''\n\n\tprivate _editRef = createRef<HTMLDivElement>()\n\n\tprotected override willUpdate(changed: PropertyValues): void {\n\t\tsuper.willUpdate?.(changed)\n\t\t// `preset` shorthand expands to (type, token) so the existing CSS\n\t\t// selectors keep matching without duplicating the size scale.\n\t\tif (changed.has('preset') && this.preset && PRESET_MAP[this.preset]) {\n\t\t\tconst { type, token } = PRESET_MAP[this.preset]\n\t\t\tthis.type = type as typeof this.type\n\t\t\tthis.token = token as typeof this.token\n\t\t}\n\t}\n\n\t/** Focus and select all text in editable mode */\n\tselectAll() {\n\t\tconst el = this._editRef.value\n\t\tif (!el) return\n\t\tel.focus()\n\t\tconst sel = window.getSelection()\n\t\tif (sel && el.textContent) {\n\t\t\tconst range = document.createRange()\n\t\t\trange.selectNodeContents(el)\n\t\t\tsel.removeAllRanges()\n\t\t\tsel.addRange(range)\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent<FocusEvent>(this, 'focusout').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\ttap(() => {\n\t\t\t\tconst el = this._editRef.value\n\t\t\t\tif (!el) return\n\t\t\t\tconst newValue = el.innerText.trim()\n\t\t\t\tif (newValue !== this.value) {\n\t\t\t\t\tthis.dispatchEvent(new CustomEvent('change', {\n\t\t\t\t\t\tdetail: { value: newValue },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t\t// Ensure truly empty so :empty CSS placeholder works\n\t\t\t\tif (!newValue) el.textContent = ''\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\t// Clean stray <br> / whitespace nodes so :empty CSS matches\n\t\tfromEvent(this, 'input').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\ttap(() => {\n\t\t\t\tconst el = this._editRef.value\n\t\t\t\tif (el && !el.innerText.trim()) el.textContent = ''\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\tfilter(e => e.key === 'Enter'),\n\t\t\ttap(e => { e.preventDefault(); (this._editRef.value ?? this).blur() }),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tprotected updated(changedProperties: Map<string, unknown>): void {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('maxLines')) {\n\t\t\t// Remove all line-clamp classes\n\t\t\tthis.classList.remove('line-clamp-1', 'line-clamp-2', 'line-clamp-3', 'line-clamp-4', 'line-clamp-5', 'line-clamp-6')\n\t\t\t// Add the appropriate one\n\t\t\tif (this.maxLines) {\n\t\t\t\tthis.classList.add(`line-clamp-${this.maxLines}`)\n\t\t\t}\n\t\t}\n\t\tif ((changedProperties.has('value') || changedProperties.has('editable')) && this.editable) {\n\t\t\tconst el = this._editRef.value\n\t\t\tif (el && document.activeElement !== el) {\n\t\t\t\tif (this.value) {\n\t\t\t\t\tel.innerText = this.value\n\t\t\t\t} else {\n\t\t\t\t\tel.textContent = ''\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected render(): unknown {\n\t\tif (this.editable) {\n\t\t\treturn html`<div\n\t\t\t\t${ref(this._editRef)}\n\t\t\t\tclass=\"edit\"\n\t\t\t\tcontenteditable=\"true\"\n\t\t\t\tdata-placeholder=${this.placeholder ?? ''}\n\t\t\t></div>`\n\t\t}\n\t\t// `as` wraps the slot in the requested semantic tag so heading levels\n\t\t// land in the accessibility tree. Without `as` the slot is bare and\n\t\t// the host element carries the visual styling only.\n\t\tif (this.as && TAG_LITERALS[this.as]) {\n\t\t\tconst tag = TAG_LITERALS[this.as]\n\t\t\treturn staticHtml`<${tag}><slot></slot></${tag}>`\n\t\t}\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-typography': SchmancyTypography\n\t}\n}"],"mappings":"8VAoBA,IAAM,EAAwE,CAC7E,QAAc,CAAE,KAAM,UAAY,MAAO,KAAA,CACzC,aAAc,CAAE,KAAM,UAAY,MAAO,KAAA,CACzC,aAAc,CAAE,KAAM,UAAY,MAAO,KAAA,CACzC,aAAc,CAAE,KAAM,UAAY,MAAO,KAAA,CACzC,aAAc,CAAE,KAAM,WAAY,MAAO,KAAA,CACzC,aAAc,CAAE,KAAM,WAAY,MAAO,KAAA,CACzC,aAAc,CAAE,KAAM,WAAY,MAAO,KAAA,CACzC,WAAc,CAAE,KAAM,QAAY,MAAO,KAAA,CACzC,WAAc,CAAE,KAAM,QAAY,MAAO,KAAA,CACzC,WAAc,CAAE,KAAM,QAAY,MAAO,KAAA,CACzC,UAAc,CAAE,KAAM,OAAY,MAAO,KAAA,CACzC,UAAc,CAAE,KAAM,OAAY,MAAO,KAAA,CACzC,UAAc,CAAE,KAAM,OAAY,MAAO,KAAA,CACzC,WAAc,CAAE,KAAM,QAAY,MAAO,KAAA,CACzC,WAAc,CAAE,KAAM,QAAY,MAAO,KAAA,CACzC,WAAc,CAAE,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A,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAUhC,CAAE,KAAM,OAAQ,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,YAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAGhC,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,WAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAIjB,CAAE,KAAM,QAAS,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,WAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEjC,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,QAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEjB,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,cAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAzWb,sBAAA,CAAA,CAAsB,EAAA,CAAA,OAAA,eAAA,QAAA,qBAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import { t as e } from "./tailwind.mixin-DIEGVcl3.js";
1
+ import { t as e } from "./tailwind.mixin-mdQR3BEO.js";
2
2
  import { t } from "./decorate-D_utPUsC.js";
3
3
  import { fromEvent as n } from "rxjs";
4
4
  import { filter as r, takeUntil as i, tap as a } from "rxjs/operators";
@@ -1 +1 @@
1
- {"version":3,"file":"typography.js","names":[],"sources":["../src/typography/typography.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/tailwind.mixin'\nimport { css, html, type PropertyValues } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { html as staticHtml, literal } from 'lit/static-html.js'\nimport { fromEvent } from 'rxjs'\nimport { filter, tap, takeUntil } from 'rxjs/operators'\n\n/**\n * Preset → (type, token) shorthand. Saves the two-decision-per-text-node\n * fatigue that 50+ typography nodes in a single page cause.\n */\nexport type TypographyPreset =\n\t| 'display' | 'display-lg' | 'display-md' | 'display-sm'\n\t| 'heading-lg' | 'heading-md' | 'heading-sm'\n\t| 'title-lg' | 'title-md' | 'title-sm'\n\t| 'body-lg' | 'body-md' | 'body-sm'\n\t| 'label-lg' | 'label-md' | 'label-sm'\n\t| 'caption'\n\nconst PRESET_MAP: Record<TypographyPreset, { type: string; token: string }> = {\n\t'display': { type: 'display', token: 'lg' },\n\t'display-lg': { type: 'display', token: 'lg' },\n\t'display-md': { type: 'display', token: 'md' },\n\t'display-sm': { type: 'display', token: 'sm' },\n\t'heading-lg': { type: 'headline', token: 'lg' },\n\t'heading-md': { type: 'headline', token: 'md' },\n\t'heading-sm': { type: 'headline', token: 'sm' },\n\t'title-lg': { type: 'title', token: 'lg' },\n\t'title-md': { type: 'title', token: 'md' },\n\t'title-sm': { type: 'title', token: 'sm' },\n\t'body-lg': { type: 'body', token: 'lg' },\n\t'body-md': { type: 'body', token: 'md' },\n\t'body-sm': { type: 'body', token: 'sm' },\n\t'label-lg': { type: 'label', token: 'lg' },\n\t'label-md': { type: 'label', token: 'md' },\n\t'label-sm': { type: 'label', token: 'sm' },\n\t'caption': { type: 'label', token: 'sm' },\n}\n\n/**\n * Allowed semantic tag names for the `as` prop. Closed enum so we can\n * use `literal` template parts safely with `lit/static-html`.\n */\nexport type TypographyTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div'\n\nconst TAG_LITERALS: Record<TypographyTag, ReturnType<typeof literal>> = {\n\th1: literal`h1`,\n\th2: literal`h2`,\n\th3: literal`h3`,\n\th4: literal`h4`,\n\th5: literal`h5`,\n\th6: literal`h6`,\n\tp: literal`p`,\n\tspan: literal`span`,\n\tdiv: literal`div`,\n}\n\n// Material Design 3 typography - https://m3.material.io/styles/typography/type-scale-tokens\n\n/**\n * @element schmancy-typography\n * @slot - The text for the typography.\n */\n@customElement('schmancy-typography')\nexport class SchmancyTypography extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\thyphens: none;\n\t}\n\n\t/* Text alignment */\n\t:host([align='center']) {\n\t\ttext-align: center;\n\t}\n\n\t:host([align='left']) {\n\t\ttext-align: start;\n\t}\n\n\t:host([align='right']) {\n\t\ttext-align: right;\n\t}\n\n\t:host([align='justify']) {\n\t\ttext-align: justify;\n\t}\n\n\t/* Font weight */\n\t:host([weight='bold']) {\n\t\tfont-weight: 700;\n\t}\n\n\t:host([weight='medium']) {\n\t\tfont-weight: 500;\n\t}\n\n\t:host([weight='normal']) {\n\t\tfont-weight: 400;\n\t}\n\n\t/* Text transform */\n\t:host([transform='uppercase']) {\n\t\ttext-transform: uppercase;\n\t}\n\n\t:host([transform='lowercase']) {\n\t\ttext-transform: lowercase;\n\t}\n\n\t:host([transform='capitalize']) {\n\t\ttext-transform: capitalize;\n\t}\n\n\t:host([transform='normal']) {\n\t\ttext-transform: none;\n\t}\n\n\t/* Type-based weight defaults (when using Tailwind classes without token) */\n\t:host([type='display']),\n\t:host([type='headline']),\n\t:host([type='body']) {\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='label']),\n\t:host([type='subtitle']),\n\t:host([type='title']) {\n\t\tfont-weight: 500;\n\t}\n\n\t/* Display typography variants - Material Design 3 + Extended */\n\t:host([type='display'][token='xl']) {\n\t\tfont-size: 72px;\n\t\tline-height: 80px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='lg']) {\n\t\tfont-size: 57px;\n\t\tline-height: 64px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='md']) {\n\t\tfont-size: 45px;\n\t\tline-height: 52px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='sm']) {\n\t\tfont-size: 36px;\n\t\tline-height: 44px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='xs']) {\n\t\tfont-size: 28px;\n\t\tline-height: 36px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Headline typography variants - Material Design 3 + Extended */\n\t:host([type='headline'][token='xl']) {\n\t\tfont-size: 36px;\n\t\tline-height: 44px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='lg']) {\n\t\tfont-size: 32px;\n\t\tline-height: 40px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='md']) {\n\t\tfont-size: 28px;\n\t\tline-height: 36px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='sm']) {\n\t\tfont-size: 24px;\n\t\tline-height: 32px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='xs']) {\n\t\tfont-size: 20px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Title typography variants - Material Design 3 + Extended */\n\t:host([type='title'][token='xl']) {\n\t\tfont-size: 24px;\n\t\tline-height: 32px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='title'][token='lg']) {\n\t\tfont-size: 22px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='title'][token='md']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='title'][token='sm']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='title'][token='xs']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Subtitle typography variants - Extended from Material Design 3 */\n\t:host([type='subtitle'][token='xl']) {\n\t\tfont-size: 20px;\n\t\tline-height: 28px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='lg']) {\n\t\tfont-size: 18px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='md']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='sm']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='xs']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Body typography variants - Material Design 3 + Extended */\n\t:host([type='body'][token='xl']) {\n\t\tfont-size: 18px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='lg']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='md']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='sm']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='xs']) {\n\t\tfont-size: 10px;\n\t\tline-height: 14px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Label typography variants - Material Design 3 + Extended */\n\t:host([type='label'][token='xl']) {\n\t\tfont-size: 16px;\n\t\tline-height: 22px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='lg']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='md']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='sm']) {\n\t\tfont-size: 11px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='xs']) {\n\t\tfont-size: 10px;\n\t\tline-height: 14px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Note: Custom letter-spacing, font-size, and line-height should be applied via inline styles or Tailwind classes */\n\n\t:host([editable]) {\n\t\tcursor: text;\n\t\tborder-radius: 4px;\n\t\ttransition: background 150ms;\n\t\tmin-height: 1em;\n\t}\n\t/* Editable div lives in shadow DOM so light DOM (Lit markers) is untouched */\n\t.edit {\n\t\toutline: none;\n\t\tmin-height: 1em;\n\t\tfont: inherit;\n\t\tcolor: inherit;\n\t\tletter-spacing: inherit;\n\t\tline-height: inherit;\n\t}\n\t.edit:empty::before {\n\t\tcontent: attr(data-placeholder);\n\t\tpointer-events: none;\n\t\tdisplay: block;\n\t\topacity: 0.35;\n\t}\n`) {\n\tstatic shadowRootOptions: ShadowRootInit = {\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * @attr type - The type of the typography.\n\t * @default 'body'\n\t * @type {'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label'}\n\t */\n\t@property({ type: String, reflect: true })\n\ttype: 'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label' = 'body'\n\n\t/**\n\t * Shorthand for picking a (type, token) pair in one go. When set, derives\n\t * `type` and `token` automatically — saves the two-decisions-per-text-node\n\t * fatigue that hits when a single page has 50+ typography nodes.\n\t *\n\t * @attr preset\n\t * @type {TypographyPreset}\n\t * @example <schmancy-typography preset=\"heading-md\">Title</schmancy-typography>\n\t */\n\t@property({ type: String, reflect: true })\n\tpreset?: TypographyPreset\n\n\t/**\n\t * Render the slot wrapped in the requested semantic HTML element so screen\n\t * readers expose the right role / heading level. Without `as`, the slot\n\t * sits directly in the shadow root and the host is a generic element.\n\t *\n\t * @attr as\n\t * @type {TypographyTag}\n\t * @example <schmancy-typography preset=\"heading-md\" as=\"h2\">Section</schmancy-typography>\n\t */\n\t@property({ type: String, reflect: true })\n\tas?: TypographyTag\n\n\t/**\n\t * @attr token - The size token.\n\t * @deprecated Prefer using Tailwind responsive text classes for better responsive design.\n\t * Set token=\"\" and use class=\"text-sm md:text-base lg:text-lg\" instead.\n\t * Example: <schmancy-typography type=\"display\" token=\"\" class=\"text-2xl sm:text-3xl md:text-4xl\">\n\t * @default 'md'\n\t * @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | ''}\n\t */\n\t@property({ type: String, reflect: true })\n\ttoken: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '' = 'md'\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'left' |'center' |'right'}\n\t */\n\t@property({ type: String, reflect: true })\n\talign: 'left' | 'center' | 'justify' | 'right' | undefined\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'normal' | 'medium' |'bold'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true })\n\tweight: 'normal' | 'medium' | 'bold' | undefined\n\t\n\t/**\n\t *\n\t * @attr\n\t * @default inherit\n\t * @type {'uppercase' |'lowercase' |'capitalize' |'normal'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true }) \n\ttransform: 'uppercase' | 'lowercase' | 'capitalize' | 'normal' | undefined\n\n\t@property({ type: Number })\n\tmaxLines: 1 | 2 | 3 | 4 | 5 | 6 | undefined\n\n\t/** When true, the element becomes contenteditable and dispatches 'change' events on blur/Enter */\n\t@property({ type: Boolean, reflect: true }) editable = false\n\t/** The text value when in editable mode. Set via property binding: .value=${...} */\n\t@property({ type: String }) value = ''\n\t/** Placeholder shown when editable and empty */\n\t@property({ type: String }) placeholder = ''\n\n\tprivate _editRef = createRef<HTMLDivElement>()\n\n\tprotected override willUpdate(changed: PropertyValues): void {\n\t\tsuper.willUpdate?.(changed)\n\t\t// `preset` shorthand expands to (type, token) so the existing CSS\n\t\t// selectors keep matching without duplicating the size scale.\n\t\tif (changed.has('preset') && this.preset && PRESET_MAP[this.preset]) {\n\t\t\tconst { type, token } = PRESET_MAP[this.preset]\n\t\t\tthis.type = type as typeof this.type\n\t\t\tthis.token = token as typeof this.token\n\t\t}\n\t}\n\n\t/** Focus and select all text in editable mode */\n\tselectAll() {\n\t\tconst el = this._editRef.value\n\t\tif (!el) return\n\t\tel.focus()\n\t\tconst sel = window.getSelection()\n\t\tif (sel && el.textContent) {\n\t\t\tconst range = document.createRange()\n\t\t\trange.selectNodeContents(el)\n\t\t\tsel.removeAllRanges()\n\t\t\tsel.addRange(range)\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent<FocusEvent>(this, 'focusout').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\ttap(() => {\n\t\t\t\tconst el = this._editRef.value\n\t\t\t\tif (!el) return\n\t\t\t\tconst newValue = el.innerText.trim()\n\t\t\t\tif (newValue !== this.value) {\n\t\t\t\t\tthis.dispatchEvent(new CustomEvent('change', {\n\t\t\t\t\t\tdetail: { value: newValue },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t\t// Ensure truly empty so :empty CSS placeholder works\n\t\t\t\tif (!newValue) el.textContent = ''\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\t// Clean stray <br> / whitespace nodes so :empty CSS matches\n\t\tfromEvent(this, 'input').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\ttap(() => {\n\t\t\t\tconst el = this._editRef.value\n\t\t\t\tif (el && !el.innerText.trim()) el.textContent = ''\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\tfilter(e => e.key === 'Enter'),\n\t\t\ttap(e => { e.preventDefault(); (this._editRef.value ?? this).blur() }),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tprotected updated(changedProperties: Map<string, unknown>): void {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('maxLines')) {\n\t\t\t// Remove all line-clamp classes\n\t\t\tthis.classList.remove('line-clamp-1', 'line-clamp-2', 'line-clamp-3', 'line-clamp-4', 'line-clamp-5', 'line-clamp-6')\n\t\t\t// Add the appropriate one\n\t\t\tif (this.maxLines) {\n\t\t\t\tthis.classList.add(`line-clamp-${this.maxLines}`)\n\t\t\t}\n\t\t}\n\t\tif ((changedProperties.has('value') || changedProperties.has('editable')) && this.editable) {\n\t\t\tconst el = this._editRef.value\n\t\t\tif (el && document.activeElement !== el) {\n\t\t\t\tif (this.value) {\n\t\t\t\t\tel.innerText = this.value\n\t\t\t\t} else {\n\t\t\t\t\tel.textContent = ''\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected render(): unknown {\n\t\tif (this.editable) {\n\t\t\treturn html`<div\n\t\t\t\t${ref(this._editRef)}\n\t\t\t\tclass=\"edit\"\n\t\t\t\tcontenteditable=\"true\"\n\t\t\t\tdata-placeholder=${this.placeholder ?? ''}\n\t\t\t></div>`\n\t\t}\n\t\t// `as` wraps the slot in the requested semantic tag so heading levels\n\t\t// land in the accessibility tree. Without `as` the slot is bare and\n\t\t// the host element carries the visual styling only.\n\t\tif (this.as && TAG_LITERALS[this.as]) {\n\t\t\tconst tag = TAG_LITERALS[this.as]\n\t\t\treturn staticHtml`<${tag}><slot></slot></${tag}>`\n\t\t}\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-typography': SchmancyTypography\n\t}\n}"],"mappings":";;;;;;;;AAoBA,IAAM,IAAwE;CAC7E,SAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,cAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,cAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,cAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,cAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,cAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,cAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,YAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,YAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,YAAc;EAAE,MAAM;EAA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A,KAAA,EAAA,EAAA,EAAA,CAGzC,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAI1B,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAE1C,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,SAAA,KAAA,EAAA,EAAA,EAAA,CAE1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,eAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CAzW3B,EAAc,sBAAA,CAAA,EAAsB,EAAA;AAAA,SAAA,KAAA"}
1
+ {"version":3,"file":"typography.js","names":[],"sources":["../src/typography/typography.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/tailwind.mixin'\nimport { css, html, type PropertyValues } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { html as staticHtml, literal } from 'lit/static-html.js'\nimport { fromEvent } from 'rxjs'\nimport { filter, tap, takeUntil } from 'rxjs/operators'\n\n/**\n * Preset → (type, token) shorthand. Saves the two-decision-per-text-node\n * fatigue that 50+ typography nodes in a single page cause.\n */\nexport type TypographyPreset =\n\t| 'display' | 'display-lg' | 'display-md' | 'display-sm'\n\t| 'heading-lg' | 'heading-md' | 'heading-sm'\n\t| 'title-lg' | 'title-md' | 'title-sm'\n\t| 'body-lg' | 'body-md' | 'body-sm'\n\t| 'label-lg' | 'label-md' | 'label-sm'\n\t| 'caption'\n\nconst PRESET_MAP: Record<TypographyPreset, { type: string; token: string }> = {\n\t'display': { type: 'display', token: 'lg' },\n\t'display-lg': { type: 'display', token: 'lg' },\n\t'display-md': { type: 'display', token: 'md' },\n\t'display-sm': { type: 'display', token: 'sm' },\n\t'heading-lg': { type: 'headline', token: 'lg' },\n\t'heading-md': { type: 'headline', token: 'md' },\n\t'heading-sm': { type: 'headline', token: 'sm' },\n\t'title-lg': { type: 'title', token: 'lg' },\n\t'title-md': { type: 'title', token: 'md' },\n\t'title-sm': { type: 'title', token: 'sm' },\n\t'body-lg': { type: 'body', token: 'lg' },\n\t'body-md': { type: 'body', token: 'md' },\n\t'body-sm': { type: 'body', token: 'sm' },\n\t'label-lg': { type: 'label', token: 'lg' },\n\t'label-md': { type: 'label', token: 'md' },\n\t'label-sm': { type: 'label', token: 'sm' },\n\t'caption': { type: 'label', token: 'sm' },\n}\n\n/**\n * Allowed semantic tag names for the `as` prop. Closed enum so we can\n * use `literal` template parts safely with `lit/static-html`.\n */\nexport type TypographyTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div'\n\nconst TAG_LITERALS: Record<TypographyTag, ReturnType<typeof literal>> = {\n\th1: literal`h1`,\n\th2: literal`h2`,\n\th3: literal`h3`,\n\th4: literal`h4`,\n\th5: literal`h5`,\n\th6: literal`h6`,\n\tp: literal`p`,\n\tspan: literal`span`,\n\tdiv: literal`div`,\n}\n\n// Material Design 3 typography - https://m3.material.io/styles/typography/type-scale-tokens\n\n/**\n * @element schmancy-typography\n * @slot - The text for the typography.\n * @fires change - When `editable` is true, fires on blur or Enter with `detail.value` set to the new text content. Not fired when `editable` is unset (the default).\n */\n@customElement('schmancy-typography')\nexport class SchmancyTypography extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\thyphens: none;\n\t}\n\n\t/* Text alignment */\n\t:host([align='center']) {\n\t\ttext-align: center;\n\t}\n\n\t:host([align='left']) {\n\t\ttext-align: start;\n\t}\n\n\t:host([align='right']) {\n\t\ttext-align: right;\n\t}\n\n\t:host([align='justify']) {\n\t\ttext-align: justify;\n\t}\n\n\t/* Font weight */\n\t:host([weight='bold']) {\n\t\tfont-weight: 700;\n\t}\n\n\t:host([weight='medium']) {\n\t\tfont-weight: 500;\n\t}\n\n\t:host([weight='normal']) {\n\t\tfont-weight: 400;\n\t}\n\n\t/* Text transform */\n\t:host([transform='uppercase']) {\n\t\ttext-transform: uppercase;\n\t}\n\n\t:host([transform='lowercase']) {\n\t\ttext-transform: lowercase;\n\t}\n\n\t:host([transform='capitalize']) {\n\t\ttext-transform: capitalize;\n\t}\n\n\t:host([transform='normal']) {\n\t\ttext-transform: none;\n\t}\n\n\t/* Type-based weight defaults (when using Tailwind classes without token) */\n\t:host([type='display']),\n\t:host([type='headline']),\n\t:host([type='body']) {\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='label']),\n\t:host([type='subtitle']),\n\t:host([type='title']) {\n\t\tfont-weight: 500;\n\t}\n\n\t/* Display typography variants - Material Design 3 + Extended */\n\t:host([type='display'][token='xl']) {\n\t\tfont-size: 72px;\n\t\tline-height: 80px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='lg']) {\n\t\tfont-size: 57px;\n\t\tline-height: 64px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='md']) {\n\t\tfont-size: 45px;\n\t\tline-height: 52px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='sm']) {\n\t\tfont-size: 36px;\n\t\tline-height: 44px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='xs']) {\n\t\tfont-size: 28px;\n\t\tline-height: 36px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Headline typography variants - Material Design 3 + Extended */\n\t:host([type='headline'][token='xl']) {\n\t\tfont-size: 36px;\n\t\tline-height: 44px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='lg']) {\n\t\tfont-size: 32px;\n\t\tline-height: 40px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='md']) {\n\t\tfont-size: 28px;\n\t\tline-height: 36px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='sm']) {\n\t\tfont-size: 24px;\n\t\tline-height: 32px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='xs']) {\n\t\tfont-size: 20px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Title typography variants - Material Design 3 + Extended */\n\t:host([type='title'][token='xl']) {\n\t\tfont-size: 24px;\n\t\tline-height: 32px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='title'][token='lg']) {\n\t\tfont-size: 22px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='title'][token='md']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='title'][token='sm']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='title'][token='xs']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Subtitle typography variants - Extended from Material Design 3 */\n\t:host([type='subtitle'][token='xl']) {\n\t\tfont-size: 20px;\n\t\tline-height: 28px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='lg']) {\n\t\tfont-size: 18px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='md']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='sm']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='xs']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Body typography variants - Material Design 3 + Extended */\n\t:host([type='body'][token='xl']) {\n\t\tfont-size: 18px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='lg']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='md']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='sm']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='xs']) {\n\t\tfont-size: 10px;\n\t\tline-height: 14px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Label typography variants - Material Design 3 + Extended */\n\t:host([type='label'][token='xl']) {\n\t\tfont-size: 16px;\n\t\tline-height: 22px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='lg']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='md']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='sm']) {\n\t\tfont-size: 11px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='xs']) {\n\t\tfont-size: 10px;\n\t\tline-height: 14px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Note: Custom letter-spacing, font-size, and line-height should be applied via inline styles or Tailwind classes */\n\n\t:host([editable]) {\n\t\tcursor: text;\n\t\tborder-radius: 4px;\n\t\ttransition: background 150ms;\n\t\tmin-height: 1em;\n\t}\n\t/* Editable div lives in shadow DOM so light DOM (Lit markers) is untouched */\n\t.edit {\n\t\toutline: none;\n\t\tmin-height: 1em;\n\t\tfont: inherit;\n\t\tcolor: inherit;\n\t\tletter-spacing: inherit;\n\t\tline-height: inherit;\n\t}\n\t.edit:empty::before {\n\t\tcontent: attr(data-placeholder);\n\t\tpointer-events: none;\n\t\tdisplay: block;\n\t\topacity: 0.35;\n\t}\n`) {\n\tstatic shadowRootOptions: ShadowRootInit = {\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * @attr type - The type of the typography.\n\t * @default 'body'\n\t * @type {'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label'}\n\t */\n\t@property({ type: String, reflect: true })\n\ttype: 'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label' = 'body'\n\n\t/**\n\t * Shorthand for picking a (type, token) pair in one go. When set, derives\n\t * `type` and `token` automatically — saves the two-decisions-per-text-node\n\t * fatigue that hits when a single page has 50+ typography nodes.\n\t *\n\t * @attr preset\n\t * @type {TypographyPreset}\n\t * @example <schmancy-typography preset=\"heading-md\">Title</schmancy-typography>\n\t */\n\t@property({ type: String, reflect: true })\n\tpreset?: TypographyPreset\n\n\t/**\n\t * Render the slot wrapped in the requested semantic HTML element so screen\n\t * readers expose the right role / heading level. Without `as`, the slot\n\t * sits directly in the shadow root and the host is a generic element.\n\t *\n\t * @attr as\n\t * @type {TypographyTag}\n\t * @example <schmancy-typography preset=\"heading-md\" as=\"h2\">Section</schmancy-typography>\n\t */\n\t@property({ type: String, reflect: true })\n\tas?: TypographyTag\n\n\t/**\n\t * @attr token - The size token.\n\t * @deprecated Prefer using Tailwind responsive text classes for better responsive design.\n\t * Set token=\"\" and use class=\"text-sm md:text-base lg:text-lg\" instead.\n\t * Example: <schmancy-typography type=\"display\" token=\"\" class=\"text-2xl sm:text-3xl md:text-4xl\">\n\t * @default 'md'\n\t * @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | ''}\n\t */\n\t@property({ type: String, reflect: true })\n\ttoken: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '' = 'md'\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'left' |'center' |'right'}\n\t */\n\t@property({ type: String, reflect: true })\n\talign: 'left' | 'center' | 'justify' | 'right' | undefined\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'normal' | 'medium' |'bold'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true })\n\tweight: 'normal' | 'medium' | 'bold' | undefined\n\t\n\t/**\n\t *\n\t * @attr\n\t * @default inherit\n\t * @type {'uppercase' |'lowercase' |'capitalize' |'normal'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true }) \n\ttransform: 'uppercase' | 'lowercase' | 'capitalize' | 'normal' | undefined\n\n\t@property({ type: Number })\n\tmaxLines: 1 | 2 | 3 | 4 | 5 | 6 | undefined\n\n\t/** When true, the element becomes contenteditable and dispatches 'change' events on blur/Enter */\n\t@property({ type: Boolean, reflect: true }) editable = false\n\t/** The text value when in editable mode. Set via property binding: .value=${...} */\n\t@property({ type: String }) value = ''\n\t/** Placeholder shown when editable and empty */\n\t@property({ type: String }) placeholder = ''\n\n\tprivate _editRef = createRef<HTMLDivElement>()\n\n\tprotected override willUpdate(changed: PropertyValues): void {\n\t\tsuper.willUpdate?.(changed)\n\t\t// `preset` shorthand expands to (type, token) so the existing CSS\n\t\t// selectors keep matching without duplicating the size scale.\n\t\tif (changed.has('preset') && this.preset && PRESET_MAP[this.preset]) {\n\t\t\tconst { type, token } = PRESET_MAP[this.preset]\n\t\t\tthis.type = type as typeof this.type\n\t\t\tthis.token = token as typeof this.token\n\t\t}\n\t}\n\n\t/** Focus and select all text in editable mode */\n\tselectAll() {\n\t\tconst el = this._editRef.value\n\t\tif (!el) return\n\t\tel.focus()\n\t\tconst sel = window.getSelection()\n\t\tif (sel && el.textContent) {\n\t\t\tconst range = document.createRange()\n\t\t\trange.selectNodeContents(el)\n\t\t\tsel.removeAllRanges()\n\t\t\tsel.addRange(range)\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent<FocusEvent>(this, 'focusout').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\ttap(() => {\n\t\t\t\tconst el = this._editRef.value\n\t\t\t\tif (!el) return\n\t\t\t\tconst newValue = el.innerText.trim()\n\t\t\t\tif (newValue !== this.value) {\n\t\t\t\t\tthis.dispatchEvent(new CustomEvent('change', {\n\t\t\t\t\t\tdetail: { value: newValue },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t\t// Ensure truly empty so :empty CSS placeholder works\n\t\t\t\tif (!newValue) el.textContent = ''\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\t// Clean stray <br> / whitespace nodes so :empty CSS matches\n\t\tfromEvent(this, 'input').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\ttap(() => {\n\t\t\t\tconst el = this._editRef.value\n\t\t\t\tif (el && !el.innerText.trim()) el.textContent = ''\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\tfilter(e => e.key === 'Enter'),\n\t\t\ttap(e => { e.preventDefault(); (this._editRef.value ?? this).blur() }),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tprotected updated(changedProperties: Map<string, unknown>): void {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('maxLines')) {\n\t\t\t// Remove all line-clamp classes\n\t\t\tthis.classList.remove('line-clamp-1', 'line-clamp-2', 'line-clamp-3', 'line-clamp-4', 'line-clamp-5', 'line-clamp-6')\n\t\t\t// Add the appropriate one\n\t\t\tif (this.maxLines) {\n\t\t\t\tthis.classList.add(`line-clamp-${this.maxLines}`)\n\t\t\t}\n\t\t}\n\t\tif ((changedProperties.has('value') || changedProperties.has('editable')) && this.editable) {\n\t\t\tconst el = this._editRef.value\n\t\t\tif (el && document.activeElement !== el) {\n\t\t\t\tif (this.value) {\n\t\t\t\t\tel.innerText = this.value\n\t\t\t\t} else {\n\t\t\t\t\tel.textContent = ''\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected render(): unknown {\n\t\tif (this.editable) {\n\t\t\treturn html`<div\n\t\t\t\t${ref(this._editRef)}\n\t\t\t\tclass=\"edit\"\n\t\t\t\tcontenteditable=\"true\"\n\t\t\t\tdata-placeholder=${this.placeholder ?? ''}\n\t\t\t></div>`\n\t\t}\n\t\t// `as` wraps the slot in the requested semantic tag so heading levels\n\t\t// land in the accessibility tree. Without `as` the slot is bare and\n\t\t// the host element carries the visual styling only.\n\t\tif (this.as && TAG_LITERALS[this.as]) {\n\t\t\tconst tag = TAG_LITERALS[this.as]\n\t\t\treturn staticHtml`<${tag}><slot></slot></${tag}>`\n\t\t}\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-typography': SchmancyTypography\n\t}\n}"],"mappings":";;;;;;;;AAoBA,IAAM,IAAwE;CAC7E,SAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,cAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,cAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,cAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,cAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,cAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,cAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,YAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,YAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,YAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,WAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,WAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,WAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,YAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,YAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,YAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CACzC,SAAc;EAAE,MAAM;EAAY,OAAO;EAAA;CAAA,EASpC,IAAkE;CACvE,IAAM,CAAO;CACb,IAAM,CAAO;CACb,IAAM,CAAO;CACb,IAAM,CAAO;CACb,IAAM,CAAO;CACb,IAAM,CAAO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,sBAAA,CAAA,EAAsB,EAAA;AAAA,SAAA,KAAA"}
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-BHX99hgX.cjs`),t=require(`./decorate-F9CuyeHg.cjs`);require(`./mixins.cjs`);let n=require(`lit/decorators.js`),r=require(`lit`);var i=class extends e.t(r.css`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-DRI1oTYQ.cjs`),t=require(`./decorate-F9CuyeHg.cjs`);require(`./mixins.cjs`);let n=require(`lit/decorators.js`),r=require(`lit`);var i=class extends e.t(r.css`
2
2
  :host {
3
3
  position: absolute;
4
4
  width: 1px;
@@ -1,4 +1,4 @@
1
- import { t as e } from "./tailwind.mixin-DIEGVcl3.js";
1
+ import { t as e } from "./tailwind.mixin-mdQR3BEO.js";
2
2
  import { t } from "./decorate-D_utPUsC.js";
3
3
  import "./mixins.js";
4
4
  import { customElement as n } from "lit/decorators.js";
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./decorate-D_utPUsC.js";
2
- import { t } from "./litElement.mixin-BuZ28ZzP.js";
2
+ import { t } from "./litElement.mixin-CszkJuNl.js";
3
3
  import "./mixins.js";
4
4
  import { d as n, f as r } from "./animation-hXFClrIn.js";
5
5
  import { t as i } from "./reduced-motion-BZTLqAyl.js";