@mhmo91/schmancy 0.3.8 → 0.4.2
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.
- package/dist/{animated-text-DBk95qoX.cjs → animated-text-C_ISIdDY.cjs} +2 -2
- package/dist/{animated-text-DBk95qoX.cjs.map → animated-text-C_ISIdDY.cjs.map} +1 -1
- package/dist/{animated-text-BhACpxZL.js → animated-text-DE4jCzlq.js} +3 -3
- package/dist/{animated-text-BhACpxZL.js.map → animated-text-DE4jCzlq.js.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/area.component-Bvd_wwUW.cjs +8 -0
- package/dist/{area.component-CbT_WCUv.cjs.map → area.component-Bvd_wwUW.cjs.map} +1 -1
- package/dist/{area.component-DX2Y6cAp.js → area.component-DQKc0WXK.js} +85 -90
- package/dist/{area.component-DX2Y6cAp.js.map → area.component-DQKc0WXK.js.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/autocomplete-D_XhT92l.cjs +73 -0
- package/dist/{autocomplete-ByVC8MLH.cjs.map → autocomplete-D_XhT92l.cjs.map} +1 -1
- package/dist/autocomplete-ytqc1f_C.js +315 -0
- package/dist/{autocomplete-Qr_SNWus.js.map → autocomplete-ytqc1f_C.js.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-Bp8zC0T5.cjs → avatar-DkBLxCT2.cjs} +2 -2
- package/dist/{avatar-Bp8zC0T5.cjs.map → avatar-DkBLxCT2.cjs.map} +1 -1
- package/dist/{avatar-1tMDKnZc.js → avatar-m6kOcWq2.js} +47 -47
- package/dist/{avatar-1tMDKnZc.js.map → avatar-m6kOcWq2.js.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-ZKuOCC1g.js → boat-BeW5NYdz.js} +2 -2
- package/dist/{boat-ZKuOCC1g.js.map → boat-BeW5NYdz.js.map} +1 -1
- package/dist/{boat-RaIwtGNW.cjs → boat-DigCNXsd.cjs} +2 -2
- package/dist/{boat-RaIwtGNW.cjs.map → boat-DigCNXsd.cjs.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-BZvRSKLj.cjs → checkbox-CFqvhybv.cjs} +4 -4
- package/dist/{checkbox-BZvRSKLj.cjs.map → checkbox-CFqvhybv.cjs.map} +1 -1
- package/dist/{checkbox-Cy3X3PGY.js → checkbox-DSEvvPj1.js} +31 -32
- package/dist/{checkbox-Cy3X3PGY.js.map → checkbox-DSEvvPj1.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-Y1qvw2Wa.js → chips-DCKLuDxP.js} +59 -61
- package/dist/{chips-Y1qvw2Wa.js.map → chips-DCKLuDxP.js.map} +1 -1
- package/dist/{chips-5IKm7m8x.cjs → chips-MCF53PoG.cjs} +25 -25
- package/dist/{chips-5IKm7m8x.cjs.map → chips-MCF53PoG.cjs.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/{circular-progress-BZwI11v0.cjs → circular-progress-CF0ow_gn.cjs} +2 -2
- package/dist/{circular-progress-BZwI11v0.cjs.map → circular-progress-CF0ow_gn.cjs.map} +1 -1
- package/dist/{circular-progress-utG8iIPV.js → circular-progress-CKlT4zjF.js} +3 -3
- package/dist/{circular-progress-utG8iIPV.js.map → circular-progress-CKlT4zjF.js.map} +1 -1
- package/dist/circular-progress.cjs +1 -1
- package/dist/circular-progress.js +1 -1
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-CN4mbrHE.cjs → code-preview-Cj_qRKC9.cjs} +9 -9
- package/dist/{code-preview-CN4mbrHE.cjs.map → code-preview-Cj_qRKC9.cjs.map} +1 -1
- package/dist/{code-preview-C_W44LD7.js → code-preview-CuDOLS91.js} +166 -168
- package/dist/{code-preview-C_W44LD7.js.map → code-preview-CuDOLS91.js.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/{consume-B05Dd6qy.js → consume-5D1qfVWM.js} +2 -2
- package/dist/{consume-B05Dd6qy.js.map → consume-5D1qfVWM.js.map} +1 -1
- package/dist/{consume-uKrSupzs.cjs → consume-edta5ng5.cjs} +2 -2
- package/dist/{consume-uKrSupzs.cjs.map → consume-edta5ng5.cjs.map} +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{context-object-CISes2bD.js → context-object-CDDP4bTk.js} +6 -8
- package/dist/{context-object-CISes2bD.js.map → context-object-CDDP4bTk.js.map} +1 -1
- package/dist/context-object-K_1gDFu-.cjs +2 -0
- package/dist/{context-object-CP7HbDFQ.cjs.map → context-object-K_1gDFu-.cjs.map} +1 -1
- package/dist/date-range-B2f1eXz0.cjs +139 -0
- package/dist/{date-range-BAKeMiFS.cjs.map → date-range-B2f1eXz0.cjs.map} +1 -1
- package/dist/{date-range-dO1-f42P.js → date-range-CmeAQ5QS.js} +107 -109
- package/dist/{date-range-dO1-f42P.js.map → date-range-CmeAQ5QS.js.map} +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/delay-40MKpcZU.cjs +10 -0
- package/dist/{delay-CLGKeX0n.cjs.map → delay-40MKpcZU.cjs.map} +1 -1
- package/dist/{delay-Cd-N6nxZ.js → delay-pKHFTza9.js} +57 -70
- package/dist/{delay-Cd-N6nxZ.js.map → delay-pKHFTza9.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{dialog-content-C835zQHB.js → dialog-content-B_fVl8nu.js} +9 -11
- package/dist/{dialog-content-C835zQHB.js.map → dialog-content-B_fVl8nu.js.map} +1 -1
- package/dist/{dialog-content-DWITDRHy.cjs → dialog-content-CkjibvSc.cjs} +4 -4
- package/dist/{dialog-content-DWITDRHy.cjs.map → dialog-content-CkjibvSc.cjs.map} +1 -1
- package/dist/dialog-service-BgqAlT7T.cjs +2 -0
- package/dist/{dialog-service-Di9NiBao.cjs.map → dialog-service-BgqAlT7T.cjs.map} +1 -1
- package/dist/dialog-service-CnjZCTMj.js +127 -0
- package/dist/{dialog-service-noGCuxg1.js.map → dialog-service-CnjZCTMj.js.map} +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +2 -2
- package/dist/{divider-C7UzzgIj.cjs → divider-BDgmQ4VQ.cjs} +2 -2
- package/dist/{divider-C7UzzgIj.cjs.map → divider-BDgmQ4VQ.cjs.map} +1 -1
- package/dist/{divider-D7pxxtTI.js → divider-njFvOEz7.js} +3 -3
- package/dist/{divider-D7pxxtTI.js.map → divider-njFvOEz7.js.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-DJFDnoKm.js → dropdown-content-C4o6Y70E.js} +16 -20
- package/dist/{dropdown-content-DJFDnoKm.js.map → dropdown-content-C4o6Y70E.js.map} +1 -1
- package/dist/{dropdown-content-RMyyjS7G.cjs → dropdown-content-CwEBCQTd.cjs} +4 -4
- package/dist/{dropdown-content-RMyyjS7G.cjs.map → dropdown-content-CwEBCQTd.cjs.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-Bu7OqH-d.js → flex-CbKzMNEV.js} +63 -64
- package/dist/{flex-Bu7OqH-d.js.map → flex-CbKzMNEV.js.map} +1 -1
- package/dist/{flex-Cg_UtAIG.cjs → flex-_h7Zh750.cjs} +10 -10
- package/dist/{flex-Cg_UtAIG.cjs.map → flex-_h7Zh750.cjs.map} +1 -1
- package/dist/flow-D0e7hGXO.cjs +2 -0
- package/dist/{flow-CnJl1T1A.cjs.map → flow-D0e7hGXO.cjs.map} +1 -1
- package/dist/{flow-B1wMqea2.js → flow-DXYqC9OA.js} +50 -52
- package/dist/{flow-B1wMqea2.js.map → flow-DXYqC9OA.js.map} +1 -1
- package/dist/{form-WeCrsPmp.js → form-eXTuXutS.js} +19 -28
- package/dist/{form-WeCrsPmp.js.map → form-eXTuXutS.js.map} +1 -1
- package/dist/form-gg5B6Dla.cjs +14 -0
- package/dist/{form-DzfdidJO.cjs.map → form-gg5B6Dla.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{icon-Be8aUtz9.js → icon-as6C4b0_.js} +8 -9
- package/dist/{icon-Be8aUtz9.js.map → icon-as6C4b0_.js.map} +1 -1
- package/dist/icon-button-D5te6MSD.cjs +69 -0
- package/dist/{icon-button-DNvGlOPI.cjs.map → icon-button-D5te6MSD.cjs.map} +1 -1
- package/dist/{icon-button-Mfs7C_ol.js → icon-button-eM7fkcaa.js} +40 -41
- package/dist/{icon-button-Mfs7C_ol.js.map → icon-button-eM7fkcaa.js.map} +1 -1
- package/dist/{icon-4c4f-QXa.cjs → icon-lc9iKCzt.cjs} +4 -4
- package/dist/{icon-4c4f-QXa.cjs.map → icon-lc9iKCzt.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +44 -44
- package/dist/{input-CpYu_aUV.js → input-C1JcUy_t.js} +86 -113
- package/dist/{input-CpYu_aUV.js.map → input-C1JcUy_t.js.map} +1 -1
- package/dist/input-KfFWcQk8.cjs +111 -0
- package/dist/{input-CD59n3y-.cjs.map → input-KfFWcQk8.cjs.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{list-kvjz9d5N.cjs → list-CZlCptFt.cjs} +4 -4
- package/dist/{list-kvjz9d5N.cjs.map → list-CZlCptFt.cjs.map} +1 -1
- package/dist/{list-DNZhjJ-s.js → list-Cn2oKOHN.js} +20 -21
- package/dist/{list-DNZhjJ-s.js.map → list-Cn2oKOHN.js.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-CrXwM_fu.cjs → litElement.mixin-BFfWKABY.cjs} +2 -2
- package/dist/{litElement.mixin-CrXwM_fu.cjs.map → litElement.mixin-BFfWKABY.cjs.map} +1 -1
- package/dist/{litElement.mixin-DMTxmbnz.js → litElement.mixin-CUhEpTgZ.js} +2 -2
- package/dist/{litElement.mixin-DMTxmbnz.js.map → litElement.mixin-CUhEpTgZ.js.map} +1 -1
- package/dist/{menu-CzoGF0Jg.js → menu--0VMi_rl.js} +3 -3
- package/dist/{menu-CzoGF0Jg.js.map → menu--0VMi_rl.js.map} +1 -1
- package/dist/{menu-DSJGu_Le.cjs → menu-ChUQMNtl.cjs} +2 -2
- package/dist/{menu-DSJGu_Le.cjs.map → menu-ChUQMNtl.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/{notification-service-BUZQ2nOZ.js → notification-service-BSp9bz1i.js} +4 -4
- package/dist/{notification-service-BUZQ2nOZ.js.map → notification-service-BSp9bz1i.js.map} +1 -1
- package/dist/{notification-service-dKoZweFH.cjs → notification-service-Bick5tKQ.cjs} +6 -6
- package/dist/{notification-service-dKoZweFH.cjs.map → notification-service-Bick5tKQ.cjs.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-dBiLTB_w.js → option-BBH03Xsg.js} +3 -4
- package/dist/{option-dBiLTB_w.js.map → option-BBH03Xsg.js.map} +1 -1
- package/dist/{option-BXU6HGLZ.cjs → option-C_1a_vzI.cjs} +3 -3
- package/dist/{option-BXU6HGLZ.cjs.map → option-C_1a_vzI.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-HSho3d5z.cjs → payment-card-form-DDhg71fA.cjs} +2 -2
- package/dist/{payment-card-form-HSho3d5z.cjs.map → payment-card-form-DDhg71fA.cjs.map} +1 -1
- package/dist/{payment-card-form-Bhy7PHzr.js → payment-card-form-DgkNJsE1.js} +3 -3
- package/dist/{payment-card-form-Bhy7PHzr.js.map → payment-card-form-DgkNJsE1.js.map} +1 -1
- package/dist/provide-BxZ2kn_p.cjs +2 -0
- package/dist/{provide-BGGp1Iks.cjs.map → provide-BxZ2kn_p.cjs.map} +1 -1
- package/dist/{provide-hwQSumt-.js → provide-tcktw8xB.js} +41 -42
- package/dist/{provide-hwQSumt-.js.map → provide-tcktw8xB.js.map} +1 -1
- package/dist/radio-button-CCsCtUkU.cjs +41 -0
- package/dist/{radio-button-dwmtJ2ef.cjs.map → radio-button-CCsCtUkU.cjs.map} +1 -1
- package/dist/radio-button-Cuo-ybx9.js +151 -0
- package/dist/{radio-button-DDbyvXw1.js.map → radio-button-Cuo-ybx9.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{redispatch-event-CF5ekzwZ.js → redispatch-event-BLom7yp4.js} +65 -68
- package/dist/{redispatch-event-CF5ekzwZ.js.map → redispatch-event-BLom7yp4.js.map} +1 -1
- package/dist/redispatch-event-DHcobAl6.cjs +4 -0
- package/dist/{redispatch-event-roczetCU.cjs.map → redispatch-event-DHcobAl6.cjs.map} +1 -1
- package/dist/{schmancy-steps-container-BrfKRYkI.js → schmancy-steps-container-CmGuY9sB.js} +5 -6
- package/dist/{schmancy-steps-container-BrfKRYkI.js.map → schmancy-steps-container-CmGuY9sB.js.map} +1 -1
- package/dist/{schmancy-steps-container-COL9P7PV.cjs → schmancy-steps-container-CqsMA2he.cjs} +3 -3
- package/dist/{schmancy-steps-container-COL9P7PV.cjs.map → schmancy-steps-container-CqsMA2he.cjs.map} +1 -1
- package/dist/{select-C6O6NRea.js → select-ChxNr4a9.js} +46 -56
- package/dist/{select-C6O6NRea.js.map → select-ChxNr4a9.js.map} +1 -1
- package/dist/select-fZ2PlQ_3.cjs +56 -0
- package/dist/{select-PrgXr6zf.cjs.map → select-fZ2PlQ_3.cjs.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{selector-hook-B6uqLA-J.js → selector-hook-BvXML7_4.js} +61 -64
- package/dist/{selector-hook-B6uqLA-J.js.map → selector-hook-BvXML7_4.js.map} +1 -1
- package/dist/selector-hook-CYMLsOvh.cjs +2 -0
- package/dist/{selector-hook-CyvD9WN9.cjs.map → selector-hook-CYMLsOvh.cjs.map} +1 -1
- package/dist/sheet-2FAz4r9B.js +141 -0
- package/dist/{sheet-lcz-71nv.js.map → sheet-2FAz4r9B.js.map} +1 -1
- package/dist/sheet-CaUlNTdn.cjs +47 -0
- package/dist/{sheet-CNvW8vrn.cjs.map → sheet-CaUlNTdn.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{slider-BNXI3Yj7.cjs → slider-CHlXZvPb.cjs} +8 -8
- package/dist/{slider-BNXI3Yj7.cjs.map → slider-CHlXZvPb.cjs.map} +1 -1
- package/dist/{slider-i-AZp4UF.js → slider-DU3_sk4c.js} +36 -40
- package/dist/{slider-i-AZp4UF.js.map → slider-DU3_sk4c.js.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-DItpvohq.cjs → spinner-D064VAQ0.cjs} +2 -2
- package/dist/{spinner-DItpvohq.cjs.map → spinner-D064VAQ0.cjs.map} +1 -1
- package/dist/{spinner-Df6JHzWX.js → spinner-RvzzGIF-.js} +3 -3
- package/dist/{spinner-Df6JHzWX.js.map → spinner-RvzzGIF-.js.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.js +2 -2
- package/dist/{surface-DiP3y6CA.cjs → surface-B3UkH65j.cjs} +2 -2
- package/dist/{surface-DiP3y6CA.cjs.map → surface-B3UkH65j.cjs.map} +1 -1
- package/dist/{surface-BaatMeqX.js → surface-s7dL8dsr.js} +3 -3
- package/dist/{surface-BaatMeqX.js.map → surface-s7dL8dsr.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/table-BrbO5sO5.cjs +65 -0
- package/dist/{table-BRQDbCA8.cjs.map → table-BrbO5sO5.cjs.map} +1 -1
- package/dist/{table-BY56H-_F.js → table-DzYvbr4k.js} +58 -68
- package/dist/{table-BY56H-_F.js.map → table-DzYvbr4k.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-pq--kZ3e.cjs → tabs-compatibility-CGG-7f7V.cjs} +5 -5
- package/dist/{tabs-compatibility-pq--kZ3e.cjs.map → tabs-compatibility-CGG-7f7V.cjs.map} +1 -1
- package/dist/{tabs-compatibility-qFYA1HDl.js → tabs-compatibility-vhn4Kp7N.js} +20 -21
- package/dist/{tabs-compatibility-qFYA1HDl.js.map → tabs-compatibility-vhn4Kp7N.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-CgPd8dM4.cjs +2 -0
- package/dist/{tailwind.mixin-CPvz1Npj.cjs.map → tailwind.mixin-CgPd8dM4.cjs.map} +1 -1
- package/dist/tailwind.mixin-t3Yj_Xbu.js +43 -0
- package/dist/{tailwind.mixin-DbsxfE0U.js.map → tailwind.mixin-t3Yj_Xbu.js.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-DPD_F-N6.cjs → textarea-BqzHPEaR.cjs} +12 -12
- package/dist/{textarea-DPD_F-N6.cjs.map → textarea-BqzHPEaR.cjs.map} +1 -1
- package/dist/{textarea-D2m3usht.js → textarea-DB4ma3Yk.js} +31 -45
- package/dist/{textarea-D2m3usht.js.map → textarea-DB4ma3Yk.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-ucq2VrW0.js → theme-button-DiugvNq0.js} +2 -2
- package/dist/{theme-button-ucq2VrW0.js.map → theme-button-DiugvNq0.js.map} +1 -1
- package/dist/{theme-button-0dEQlWtO.cjs → theme-button-X1T0K-rT.cjs} +2 -2
- package/dist/{theme-button-0dEQlWtO.cjs.map → theme-button-X1T0K-rT.cjs.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.component-DOSuAou9.js → theme.component-DGfwQDsP.js} +7 -8
- package/dist/{theme.component-DOSuAou9.js.map → theme.component-DGfwQDsP.js.map} +1 -1
- package/dist/{theme.component-E4gA7t5r.cjs → theme.component-GbvYp0sg.cjs} +2 -2
- package/dist/{theme.component-E4gA7t5r.cjs.map → theme.component-GbvYp0sg.cjs.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-Bf4J_3By.cjs → timezone-Bp8z4kRR.cjs} +6 -6
- package/dist/{timezone-Bf4J_3By.cjs.map → timezone-Bp8z4kRR.cjs.map} +1 -1
- package/dist/{timezone-xOWMbSDV.js → timezone-pKGsUkVR.js} +22 -28
- package/dist/{timezone-xOWMbSDV.js.map → timezone-pKGsUkVR.js.map} +1 -1
- package/dist/tooltip-DO_tqLiU.cjs +7 -0
- package/dist/{tooltip-6a1_bSeD.cjs.map → tooltip-DO_tqLiU.cjs.map} +1 -1
- package/dist/{tooltip-zsp-xmPP.js → tooltip-OGPdu-15.js} +29 -31
- package/dist/{tooltip-zsp-xmPP.js.map → tooltip-OGPdu-15.js.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-D0FCXUWg.js → tree-BLnyRUxk.js} +2 -2
- package/dist/{tree-D0FCXUWg.js.map → tree-BLnyRUxk.js.map} +1 -1
- package/dist/{tree-DRa2127p.cjs → tree-Cj9dq4FW.cjs} +2 -2
- package/dist/{tree-DRa2127p.cjs.map → tree-Cj9dq4FW.cjs.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/typewriter-CLh00Uvc.cjs +21 -0
- package/dist/{typewriter-XTltzkLy.cjs.map → typewriter-CLh00Uvc.cjs.map} +1 -1
- package/dist/typewriter-P4fs9-rU.js +437 -0
- package/dist/{typewriter-BNTzu9jY.js.map → typewriter-P4fs9-rU.js.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-nVG55_Y6.cjs → typography-BOogKO97.cjs} +2 -2
- package/dist/{typography-nVG55_Y6.cjs.map → typography-BOogKO97.cjs.map} +1 -1
- package/dist/{typography-DCP0jC-m.js → typography-BouLjmvn.js} +2 -2
- package/dist/{typography-DCP0jC-m.js.map → typography-BouLjmvn.js.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +14 -17
- package/dist/area.component-CbT_WCUv.cjs +0 -8
- package/dist/autocomplete-ByVC8MLH.cjs +0 -73
- package/dist/autocomplete-Qr_SNWus.js +0 -324
- package/dist/context-object-CP7HbDFQ.cjs +0 -2
- package/dist/date-range-BAKeMiFS.cjs +0 -140
- package/dist/delay-CLGKeX0n.cjs +0 -10
- package/dist/dialog-service-Di9NiBao.cjs +0 -2
- package/dist/dialog-service-noGCuxg1.js +0 -127
- package/dist/flow-CnJl1T1A.cjs +0 -2
- package/dist/form-DzfdidJO.cjs +0 -14
- package/dist/icon-button-DNvGlOPI.cjs +0 -69
- package/dist/input-CD59n3y-.cjs +0 -111
- package/dist/provide-BGGp1Iks.cjs +0 -2
- package/dist/radio-button-DDbyvXw1.js +0 -157
- package/dist/radio-button-dwmtJ2ef.cjs +0 -41
- package/dist/redispatch-event-roczetCU.cjs +0 -4
- package/dist/select-PrgXr6zf.cjs +0 -56
- package/dist/selector-hook-CyvD9WN9.cjs +0 -2
- package/dist/sheet-CNvW8vrn.cjs +0 -47
- package/dist/sheet-lcz-71nv.js +0 -146
- package/dist/table-BRQDbCA8.cjs +0 -65
- package/dist/tailwind.mixin-CPvz1Npj.cjs +0 -2
- package/dist/tailwind.mixin-DbsxfE0U.js +0 -43
- package/dist/tooltip-6a1_bSeD.cjs +0 -7
- package/dist/typewriter-BNTzu9jY.js +0 -436
- package/dist/typewriter-XTltzkLy.cjs +0 -21
|
@@ -1,436 +0,0 @@
|
|
|
1
|
-
var Et = Object.defineProperty;
|
|
2
|
-
var it = (s) => {
|
|
3
|
-
throw TypeError(s);
|
|
4
|
-
};
|
|
5
|
-
var Nt = (s, t, e) => t in s ? Et(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
6
|
-
var m = (s, t, e) => Nt(s, typeof t != "symbol" ? t + "" : t, e), rt = (s, t, e) => t.has(s) || it("Cannot " + e);
|
|
7
|
-
var p = (s, t, e) => (rt(s, t, "read from private field"), e ? e.call(s) : t.get(s)), K = (s, t, e) => t.has(s) ? it("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
8
|
-
var a = (s, t, e) => (rt(s, t, "access private method"), e);
|
|
9
|
-
import { c as qt } from "./consume-B05Dd6qy.js";
|
|
10
|
-
import "rxjs";
|
|
11
|
-
import "lit/directives/class-map.js";
|
|
12
|
-
import "lit/directives/style-map.js";
|
|
13
|
-
import { $ as Lt } from "./litElement.mixin-DMTxmbnz.js";
|
|
14
|
-
import "./tailwind.mixin-DbsxfE0U.js";
|
|
15
|
-
import { h as xt, d as Dt } from "./delay-Cd-N6nxZ.js";
|
|
16
|
-
import { i as Mt } from "./intersection-CJxzz8c-.js";
|
|
17
|
-
import { css as kt, html as At } from "lit";
|
|
18
|
-
import { property as T, query as _t, queryAssignedNodes as $t, queryAssignedElements as Ot, customElement as Ht } from "lit/decorators.js";
|
|
19
|
-
const pt = (s) => Array.isArray(s), nt = (s) => pt(s) ? s : [s], yt = "data-typeit-id", v = "ti-cursor", Rt = { started: !1, completed: !1, frozen: !1, destroyed: !1 }, P = { breakLines: !0, cursor: { autoPause: !0, autoPauseDelay: 500, animation: { frames: [0, 0, 1].map((s) => ({ opacity: s })), options: { iterations: 1 / 0, easing: "steps(2, start)", fill: "forwards" } } }, cursorChar: "|", cursorSpeed: 1e3, deleteSpeed: null, html: !0, lifeLike: !0, loop: !1, loopDelay: 750, nextStringDelay: 750, speed: 100, startDelay: 250, startDelete: !1, strings: [], waitUntilVisible: !1, beforeString: () => {
|
|
20
|
-
}, afterString: () => {
|
|
21
|
-
}, beforeStep: () => {
|
|
22
|
-
}, afterStep: () => {
|
|
23
|
-
}, afterComplete: () => {
|
|
24
|
-
} }, zt = `[${yt}]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}`, O = (s) => document.createElement(s), Y = (s) => document.createTextNode(s), ot = (s, t = "") => {
|
|
25
|
-
let e = O("style");
|
|
26
|
-
e.id = t, e.appendChild(Y(s)), document.head.appendChild(e);
|
|
27
|
-
}, at = (s) => (pt(s) || (s = [s / 2, s / 2]), s), ht = (s, t) => Math.abs(Math.random() * (s + t - (s - t)) + (s - t));
|
|
28
|
-
let lt = (s) => s / 2;
|
|
29
|
-
const mt = (s) => Array.from(s);
|
|
30
|
-
let Z = (s) => ([...s.childNodes].forEach((t) => {
|
|
31
|
-
if (t.nodeValue) return [...t.nodeValue].forEach((e) => {
|
|
32
|
-
t.parentNode.insertBefore(Y(e), t);
|
|
33
|
-
}), void t.remove();
|
|
34
|
-
Z(t);
|
|
35
|
-
}), s);
|
|
36
|
-
const ft = (s) => {
|
|
37
|
-
let t = document.implementation.createHTMLDocument();
|
|
38
|
-
return t.body.innerHTML = s, Z(t.body);
|
|
39
|
-
};
|
|
40
|
-
function gt(s, t = !1, e = !1) {
|
|
41
|
-
let r, n = s.querySelector(`.${v}`), o = document.createTreeWalker(s, NodeFilter.SHOW_ALL, { acceptNode: (l) => {
|
|
42
|
-
var u, d;
|
|
43
|
-
if (n && e) {
|
|
44
|
-
if ((u = l.classList) != null && u.contains(v)) return NodeFilter.FILTER_ACCEPT;
|
|
45
|
-
if (n.contains(l)) return NodeFilter.FILTER_REJECT;
|
|
46
|
-
}
|
|
47
|
-
return (d = l.classList) != null && d.contains(v) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
48
|
-
} }), h = [];
|
|
49
|
-
for (; r = o.nextNode(); ) r.originalParent || (r.originalParent = r.parentNode), h.push(r);
|
|
50
|
-
return t ? h.reverse() : h;
|
|
51
|
-
}
|
|
52
|
-
function Ft(s, t = !0) {
|
|
53
|
-
return t ? gt(ft(s)) : mt(s).map(Y);
|
|
54
|
-
}
|
|
55
|
-
const Bt = ({ index: s, newIndex: t, queueItems: e, cleanUp: r }) => {
|
|
56
|
-
for (let n = s + 1; n < t + 1; n++) r(e[n][0]);
|
|
57
|
-
}, bt = (s) => Number.isInteger(s), ut = ({ queueItems: s, selector: t, cursorPosition: e, to: r }) => {
|
|
58
|
-
if (bt(t)) return -1 * t;
|
|
59
|
-
let n = new RegExp("END", "i").test(r), o = t ? [...s].reverse().findIndex(({ char: h }) => {
|
|
60
|
-
let l = h.parentElement, u = l.matches(t);
|
|
61
|
-
return !(!n || !u) || u && l.firstChild.isSameNode(h);
|
|
62
|
-
}) : -1;
|
|
63
|
-
return o < 0 && (o = n ? 0 : s.length - 1), o - e + (n ? 0 : 1);
|
|
64
|
-
}, _ = (s, t) => new Array(t).fill(s);
|
|
65
|
-
let F = (s) => new Promise((t) => {
|
|
66
|
-
requestAnimationFrame(async () => {
|
|
67
|
-
t(await s());
|
|
68
|
-
});
|
|
69
|
-
}), ct = (s) => s == null ? void 0 : s.getAnimations().find((t) => t.id === s.dataset.tiAnimationId), wt = ({ cursor: s, frames: t, options: e }) => {
|
|
70
|
-
let r = s.animate(t, e);
|
|
71
|
-
return r.pause(), r.id = s.dataset.tiAnimationId, F(() => {
|
|
72
|
-
F(() => {
|
|
73
|
-
r.play();
|
|
74
|
-
});
|
|
75
|
-
}), r;
|
|
76
|
-
}, dt = (s) => {
|
|
77
|
-
var t;
|
|
78
|
-
return (t = s.func) == null ? void 0 : t.call(null);
|
|
79
|
-
}, jt = async ({ index: s, queueItems: t, wait: e, cursor: r, cursorOptions: n }) => {
|
|
80
|
-
let o = t[s][1], h = [], l = s, u = o, d = () => u && !u.delay, c = o.shouldPauseCursor() && n.autoPause;
|
|
81
|
-
for (; d(); ) h.push(u), d() && l++, u = t[l] ? t[l][1] : null;
|
|
82
|
-
if (h.length) return await F(async () => {
|
|
83
|
-
for (let E of h) await dt(E);
|
|
84
|
-
}), l - 1;
|
|
85
|
-
let y, b = ct(r);
|
|
86
|
-
return b && (y = { ...b.effect.getComputedTiming(), delay: c ? n.autoPauseDelay : 0 }), await e(async () => {
|
|
87
|
-
b && c && b.cancel(), await F(() => {
|
|
88
|
-
dt(o);
|
|
89
|
-
});
|
|
90
|
-
}, o.delay), await (({ cursor: E, options: tt, cursorOptions: et }) => {
|
|
91
|
-
if (!E || !et) return;
|
|
92
|
-
let j, A = ct(E);
|
|
93
|
-
A && (tt.delay = A.effect.getComputedTiming().delay, j = A.currentTime, A.cancel());
|
|
94
|
-
let st = wt({ cursor: E, frames: et.animation.frames, options: tt });
|
|
95
|
-
return j && (st.currentTime = j), st;
|
|
96
|
-
})({ cursor: r, options: y, cursorOptions: n }), s;
|
|
97
|
-
};
|
|
98
|
-
const $ = (s) => "value" in s;
|
|
99
|
-
let S = (s) => typeof s == "function" ? s() : s, Q = (s, t = document, e = !1) => t["querySelector" + (e ? "All" : "")](s);
|
|
100
|
-
const N = (s, t) => Object.assign({}, s, t);
|
|
101
|
-
let Kt = { "font-family": "", "font-weight": "", "font-size": "", "font-style": "", "line-height": "", color: "", transform: "translateX(-.125em)" };
|
|
102
|
-
var i, It, q, U, Ct, V, W, X, H, w, vt, L, x, Tt, B, Pt, St, J, R, D, z, C, M, k, G, I;
|
|
103
|
-
class Qt {
|
|
104
|
-
constructor(t, e = {}) {
|
|
105
|
-
K(this, i);
|
|
106
|
-
m(this, "element");
|
|
107
|
-
m(this, "timeouts");
|
|
108
|
-
m(this, "cursorPosition");
|
|
109
|
-
m(this, "predictedCursorPosition");
|
|
110
|
-
m(this, "statuses", { started: !1, completed: !1, frozen: !1, destroyed: !1, firing: !1 });
|
|
111
|
-
m(this, "opts");
|
|
112
|
-
m(this, "id");
|
|
113
|
-
m(this, "queue");
|
|
114
|
-
m(this, "cursor");
|
|
115
|
-
m(this, "flushCallback", null);
|
|
116
|
-
m(this, "unfreeze", () => {
|
|
117
|
-
});
|
|
118
|
-
m(this, "is", function(t) {
|
|
119
|
-
return this.statuses[t];
|
|
120
|
-
});
|
|
121
|
-
K(this, B, (t) => {
|
|
122
|
-
this.opts.cursor = ((e) => {
|
|
123
|
-
var r, n;
|
|
124
|
-
if (typeof e == "object") {
|
|
125
|
-
let o = {}, { frames: h, options: l } = P.cursor.animation;
|
|
126
|
-
return o.animation = e.animation || {}, o.animation.frames = ((r = e.animation) == null ? void 0 : r.frames) || h, o.animation.options = N(l, ((n = e.animation) == null ? void 0 : n.options) || {}), o.autoPause = e.autoPause ?? P.cursor.autoPause, o.autoPauseDelay = e.autoPauseDelay || P.cursor.autoPauseDelay, o;
|
|
127
|
-
}
|
|
128
|
-
return e === !0 ? P.cursor : e;
|
|
129
|
-
})(t.cursor ?? P.cursor), this.opts.strings = a(this, i, Pt).call(this, nt(this.opts.strings)), this.opts = N(this.opts, { html: !p(this, i, k) && this.opts.html, nextStringDelay: at(this.opts.nextStringDelay), loopDelay: at(this.opts.loopDelay) });
|
|
130
|
-
});
|
|
131
|
-
var r;
|
|
132
|
-
this.opts = N(P, e), this.element = typeof (r = t) == "string" ? Q(r) : r, this.timeouts = [], this.cursorPosition = 0, this.unfreeze = () => {
|
|
133
|
-
}, this.predictedCursorPosition = null, this.statuses = N({}, Rt), this.id = Math.random().toString().substring(2, 9), this.queue = function(n) {
|
|
134
|
-
let o = function(c) {
|
|
135
|
-
return nt(c).forEach((y) => {
|
|
136
|
-
var b;
|
|
137
|
-
return d.set(Symbol((b = y.char) == null ? void 0 : b.innerText), h({ ...y }));
|
|
138
|
-
}), this;
|
|
139
|
-
}, h = (c) => (c.shouldPauseCursor = function() {
|
|
140
|
-
return !!(this.typeable || this.cursorable || this.deletable);
|
|
141
|
-
}, c), l = () => d, u = () => Array.from(d.values()), d = /* @__PURE__ */ new Map();
|
|
142
|
-
return o(n), { add: o, set: function(c, y) {
|
|
143
|
-
let b = [...d.keys()];
|
|
144
|
-
d.set(b[c], h(y));
|
|
145
|
-
}, wipe: function() {
|
|
146
|
-
d = /* @__PURE__ */ new Map(), o(n);
|
|
147
|
-
}, done: (c, y = !1) => y ? d.delete(c) : d.get(c).done = !0, reset: function() {
|
|
148
|
-
d.forEach((c) => delete c.done);
|
|
149
|
-
}, destroy: (c) => d.delete(c), getItems: (c = !1) => c ? u() : u().filter((y) => !y.done), getQueue: l, getTypeable: () => u().filter((c) => c.typeable), getPendingQueueItems: () => {
|
|
150
|
-
const c = [];
|
|
151
|
-
for (let [, y] of l()) y.done || c.push(y);
|
|
152
|
-
return c;
|
|
153
|
-
} };
|
|
154
|
-
}([{ delay: this.opts.startDelay }]), p(this, B).call(this, e), this.cursor = a(this, i, St).call(this), this.element.dataset.typeitId = this.id, ot(zt), this.opts.strings.length && a(this, i, Tt).call(this);
|
|
155
|
-
}
|
|
156
|
-
go() {
|
|
157
|
-
return this.statuses.started ? this : (a(this, i, X).call(this), this.opts.waitUntilVisible ? (t = this.element, e = a(this, i, q).bind(this), new IntersectionObserver((r, n) => {
|
|
158
|
-
r.forEach((o) => {
|
|
159
|
-
o.isIntersecting && (e(), n.unobserve(t));
|
|
160
|
-
});
|
|
161
|
-
}, { threshold: 1 }).observe(t), this) : (a(this, i, q).call(this), this));
|
|
162
|
-
var t, e;
|
|
163
|
-
}
|
|
164
|
-
destroy(t = !0) {
|
|
165
|
-
this.timeouts = (this.timeouts.forEach(clearTimeout), []), S(t) && this.cursor && a(this, i, z).call(this, this.cursor), this.statuses.destroyed = !0;
|
|
166
|
-
}
|
|
167
|
-
reset(t) {
|
|
168
|
-
!this.is("destroyed") && this.destroy(), t ? (this.queue.wipe(), t(this)) : this.queue.reset(), this.cursorPosition = 0;
|
|
169
|
-
for (let e in this.statuses) this.statuses[e] = !1;
|
|
170
|
-
return this.element[a(this, i, H).call(this) ? "value" : "innerHTML"] = "", this;
|
|
171
|
-
}
|
|
172
|
-
type(t, e = {}) {
|
|
173
|
-
t = S(t);
|
|
174
|
-
let { instant: r } = e, n = a(this, i, L).call(this, e), o = Ft(t, this.opts.html).map((l) => {
|
|
175
|
-
return { func: () => a(this, i, R).call(this, l), char: l, delay: r || (u = l, /<(.+)>(.*?)<\/(.+)>/.test(u.outerHTML)) ? 0 : a(this, i, C).call(this), typeable: l.nodeType === Node.TEXT_NODE };
|
|
176
|
-
var u;
|
|
177
|
-
}), h = [n[0], { func: async () => await this.opts.beforeString(t, this) }, ...o, { func: async () => await this.opts.afterString(t, this) }, n[1]];
|
|
178
|
-
return a(this, i, w).call(this, h, e);
|
|
179
|
-
}
|
|
180
|
-
break(t = {}) {
|
|
181
|
-
return a(this, i, w).call(this, { func: () => a(this, i, R).call(this, O("BR")), typeable: !0 }, t);
|
|
182
|
-
}
|
|
183
|
-
move(t, e = {}) {
|
|
184
|
-
t = S(t);
|
|
185
|
-
let r = a(this, i, L).call(this, e), { instant: n, to: o } = e, h = ut({ queueItems: this.queue.getTypeable(), selector: t === null ? "" : t, to: o, cursorPosition: p(this, i, M) }), l = h < 0 ? -1 : 1;
|
|
186
|
-
return this.predictedCursorPosition = p(this, i, M) + h, a(this, i, w).call(this, [r[0], ..._({ func: () => a(this, i, U).call(this, l), delay: n ? 0 : a(this, i, C).call(this), cursorable: !0 }, Math.abs(h)), r[1]], e);
|
|
187
|
-
}
|
|
188
|
-
exec(t, e = {}) {
|
|
189
|
-
let r = a(this, i, L).call(this, e);
|
|
190
|
-
return a(this, i, w).call(this, [r[0], { func: () => t(this) }, r[1]], e);
|
|
191
|
-
}
|
|
192
|
-
options(t, e = {}) {
|
|
193
|
-
return t = S(t), a(this, i, x).call(this, t), a(this, i, w).call(this, {}, e);
|
|
194
|
-
}
|
|
195
|
-
pause(t, e = {}) {
|
|
196
|
-
return a(this, i, w).call(this, { delay: S(t) }, e);
|
|
197
|
-
}
|
|
198
|
-
delete(t = null, e = {}) {
|
|
199
|
-
t = S(t);
|
|
200
|
-
let r = a(this, i, L).call(this, e), n = t, { instant: o, to: h } = e, l = this.queue.getTypeable(), u = n === null ? l.length : bt(n) ? n : ut({ queueItems: l, selector: n, cursorPosition: p(this, i, M), to: h });
|
|
201
|
-
return a(this, i, w).call(this, [r[0], ..._({ func: a(this, i, D).bind(this), delay: o ? 0 : a(this, i, C).call(this, 1), deletable: !0 }, u), r[1]], e);
|
|
202
|
-
}
|
|
203
|
-
freeze() {
|
|
204
|
-
this.statuses.frozen = !0;
|
|
205
|
-
}
|
|
206
|
-
flush(t = null) {
|
|
207
|
-
return this.flushCallback = t || this.flushCallback, this.statuses.firing || (a(this, i, X).call(this), a(this, i, q).call(this, !1).then(() => {
|
|
208
|
-
if (this.queue.getPendingQueueItems().length > 0) return this.flush();
|
|
209
|
-
this.flushCallback(), this.flushCallback = null;
|
|
210
|
-
})), this;
|
|
211
|
-
}
|
|
212
|
-
getQueue() {
|
|
213
|
-
return this.queue;
|
|
214
|
-
}
|
|
215
|
-
getOptions() {
|
|
216
|
-
return this.opts;
|
|
217
|
-
}
|
|
218
|
-
updateOptions(t) {
|
|
219
|
-
return a(this, i, x).call(this, t);
|
|
220
|
-
}
|
|
221
|
-
getElement() {
|
|
222
|
-
return this.element;
|
|
223
|
-
}
|
|
224
|
-
empty(t = {}) {
|
|
225
|
-
return a(this, i, w).call(this, { func: a(this, i, It).bind(this) }, t);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
i = new WeakSet(), It = async function() {
|
|
229
|
-
a(this, i, H).call(this) ? this.element.value = "" : p(this, i, I).forEach(a(this, i, z).bind(this));
|
|
230
|
-
}, q = async function(t = !0) {
|
|
231
|
-
this.statuses.started = !0, this.statuses.firing = !0;
|
|
232
|
-
let e = (r) => {
|
|
233
|
-
this.queue.done(r, !t);
|
|
234
|
-
};
|
|
235
|
-
try {
|
|
236
|
-
let r = [...this.queue.getQueue()];
|
|
237
|
-
for (let o = 0; o < r.length; o++) {
|
|
238
|
-
let [h, l] = r[o];
|
|
239
|
-
if (!l.done) {
|
|
240
|
-
if (!l.deletable || l.deletable && p(this, i, I).length) {
|
|
241
|
-
let u = await a(this, i, V).call(this, o, r);
|
|
242
|
-
Bt({ index: o, newIndex: u, queueItems: r, cleanUp: e }), o = u;
|
|
243
|
-
}
|
|
244
|
-
e(h);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
if (!t) return this.statuses.firing = !1, this;
|
|
248
|
-
if (this.statuses.completed = !0, this.statuses.firing = !1, await this.opts.afterComplete(this), !this.opts.loop) throw "";
|
|
249
|
-
let n = this.opts.loopDelay;
|
|
250
|
-
a(this, i, W).call(this, async () => {
|
|
251
|
-
await a(this, i, Ct).call(this, n[0]), a(this, i, q).call(this);
|
|
252
|
-
}, n[1]);
|
|
253
|
-
} catch {
|
|
254
|
-
}
|
|
255
|
-
return this.statuses.firing = !1, this;
|
|
256
|
-
}, U = async function(t) {
|
|
257
|
-
var e, r, n;
|
|
258
|
-
this.cursorPosition = (e = t, r = this.cursorPosition, n = p(this, i, I), Math.min(Math.max(r + e, 0), n.length)), ((o, h, l) => {
|
|
259
|
-
let u = h[l - 1], d = Q(`.${v}`, o);
|
|
260
|
-
(o = (u == null ? void 0 : u.parentNode) || o).insertBefore(d, u || null);
|
|
261
|
-
})(this.element, p(this, i, I), this.cursorPosition);
|
|
262
|
-
}, Ct = async function(t) {
|
|
263
|
-
let e = p(this, i, M);
|
|
264
|
-
e && await a(this, i, U).call(this, { value: e });
|
|
265
|
-
let r = p(this, i, I).map((n) => [Symbol(), { func: a(this, i, D).bind(this), delay: a(this, i, C).call(this, 1), deletable: !0, shouldPauseCursor: () => !0 }]);
|
|
266
|
-
for (let n = 0; n < r.length; n++) await a(this, i, V).call(this, n, r);
|
|
267
|
-
this.queue.reset(), this.queue.set(0, { delay: t });
|
|
268
|
-
}, V = function(t, e) {
|
|
269
|
-
return jt({ index: t, queueItems: e, wait: a(this, i, W).bind(this), cursor: this.cursor, cursorOptions: this.opts.cursor });
|
|
270
|
-
}, W = async function(t, e, r = !1) {
|
|
271
|
-
this.statuses.frozen && await new Promise((n) => {
|
|
272
|
-
this.unfreeze = () => {
|
|
273
|
-
this.statuses.frozen = !1, n();
|
|
274
|
-
};
|
|
275
|
-
}), r || await this.opts.beforeStep(this), await ((n, o, h) => new Promise((l) => {
|
|
276
|
-
h.push(setTimeout(async () => {
|
|
277
|
-
await n(), l();
|
|
278
|
-
}, o || 0));
|
|
279
|
-
}))(t, e, this.timeouts), r || await this.opts.afterStep(this);
|
|
280
|
-
}, X = async function() {
|
|
281
|
-
if (!a(this, i, H).call(this) && this.cursor && this.element.appendChild(this.cursor), p(this, i, G)) {
|
|
282
|
-
((n, o) => {
|
|
283
|
-
let h = `[${yt}='${n}'] .${v}`, l = getComputedStyle(o), u = Object.entries(Kt).reduce((d, [c, y]) => `${d} ${c}: var(--ti-cursor-${c}, ${y || l[c]});`, "");
|
|
284
|
-
ot(`${h} { display: inline-block; width: 0; ${u} }`, n);
|
|
285
|
-
})(this.id, this.element), this.cursor.dataset.tiAnimationId = this.id;
|
|
286
|
-
let { animation: t } = this.opts.cursor, { frames: e, options: r } = t;
|
|
287
|
-
wt({ frames: e, cursor: this.cursor, options: { duration: this.opts.cursorSpeed, ...r } });
|
|
288
|
-
}
|
|
289
|
-
}, H = function() {
|
|
290
|
-
return $(this.element);
|
|
291
|
-
}, w = function(t, e) {
|
|
292
|
-
return this.queue.add(t), a(this, i, vt).call(this, e), this;
|
|
293
|
-
}, vt = function(t = {}) {
|
|
294
|
-
let e = t.delay;
|
|
295
|
-
e && this.queue.add({ delay: e });
|
|
296
|
-
}, L = function(t = {}) {
|
|
297
|
-
return [{ func: () => a(this, i, x).call(this, t) }, { func: () => a(this, i, x).call(this, this.opts) }];
|
|
298
|
-
}, x = async function(t) {
|
|
299
|
-
this.opts = N(this.opts, t);
|
|
300
|
-
}, Tt = function() {
|
|
301
|
-
let t = this.opts.strings.filter((e) => !!e);
|
|
302
|
-
t.forEach((e, r) => {
|
|
303
|
-
if (this.type(e), r + 1 === t.length) return;
|
|
304
|
-
let n = this.opts.breakLines ? [{ func: () => a(this, i, R).call(this, O("BR")), typeable: !0 }] : _({ func: a(this, i, D).bind(this), delay: a(this, i, C).call(this, 1) }, this.queue.getTypeable().length);
|
|
305
|
-
a(this, i, J).call(this, n);
|
|
306
|
-
});
|
|
307
|
-
}, B = new WeakMap(), Pt = function(t) {
|
|
308
|
-
let e = this.element.innerHTML;
|
|
309
|
-
return e ? (this.element.innerHTML = "", this.opts.startDelete ? (this.element.innerHTML = e, Z(this.element), a(this, i, J).call(this, _({ func: a(this, i, D).bind(this), delay: a(this, i, C).call(this, 1), deletable: !0 }, p(this, i, I).length)), t) : (r = e, r.replace(/<!--(.+?)-->/g, "").trim().split(/<br(?:\s*?)(?:\/)?>/)).concat(t)) : t;
|
|
310
|
-
var r;
|
|
311
|
-
}, St = function() {
|
|
312
|
-
if (p(this, i, k)) return null;
|
|
313
|
-
let t = O("span");
|
|
314
|
-
return t.className = v, p(this, i, G) ? (t.innerHTML = ft(this.opts.cursorChar).innerHTML, t) : (t.style.visibility = "hidden", t);
|
|
315
|
-
}, J = function(t) {
|
|
316
|
-
let e = this.opts.nextStringDelay;
|
|
317
|
-
this.queue.add([{ delay: e[0] }, ...t, { delay: e[1] }]);
|
|
318
|
-
}, R = function(t) {
|
|
319
|
-
((e, r) => {
|
|
320
|
-
if ($(e)) return void (e.value = `${e.value}${r.textContent}`);
|
|
321
|
-
r.innerHTML = "";
|
|
322
|
-
let n = (o = r.originalParent, /body/i.test(o == null ? void 0 : o.tagName) ? e : r.originalParent || e);
|
|
323
|
-
var o;
|
|
324
|
-
let h = Q("." + v, n) || null;
|
|
325
|
-
h && h.parentElement !== n && (n = h.parentElement), n.insertBefore(r, h);
|
|
326
|
-
})(this.element, t);
|
|
327
|
-
}, D = function() {
|
|
328
|
-
p(this, i, I).length && (p(this, i, k) ? this.element.value = this.element.value.slice(0, -1) : a(this, i, z).call(this, p(this, i, I)[this.cursorPosition]));
|
|
329
|
-
}, z = function(t) {
|
|
330
|
-
((e, r) => {
|
|
331
|
-
if (!e) return;
|
|
332
|
-
let n = e.parentNode;
|
|
333
|
-
(n.childNodes.length > 1 || n.isSameNode(r) ? e : n).remove();
|
|
334
|
-
})(t, this.element);
|
|
335
|
-
}, C = function(t = 0) {
|
|
336
|
-
return function(e) {
|
|
337
|
-
let { speed: r, deleteSpeed: n, lifeLike: o } = e;
|
|
338
|
-
return n = n !== null ? n : r / 3, o ? [ht(r, lt(r)), ht(n, lt(n))] : [r, n];
|
|
339
|
-
}(this.opts)[t];
|
|
340
|
-
}, M = function() {
|
|
341
|
-
return this.predictedCursorPosition ?? this.cursorPosition;
|
|
342
|
-
}, k = function() {
|
|
343
|
-
return $(this.element);
|
|
344
|
-
}, G = function() {
|
|
345
|
-
return !!this.opts.cursor && !p(this, i, k);
|
|
346
|
-
}, I = function() {
|
|
347
|
-
return t = this.element, $(t) ? mt(t.value) : gt(t, !0).filter((e) => !(e.childNodes.length > 0));
|
|
348
|
-
var t;
|
|
349
|
-
};
|
|
350
|
-
var Ut = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, g = (s, t, e, r) => {
|
|
351
|
-
for (var n, o = r > 1 ? void 0 : r ? Vt(t, e) : t, h = s.length - 1; h >= 0; h--) (n = s[h]) && (o = (r ? n(t, e, o) : n(o)) || o);
|
|
352
|
-
return r && o && Ut(t, e, o), o;
|
|
353
|
-
};
|
|
354
|
-
let f = class extends Lt(kt`
|
|
355
|
-
:host {
|
|
356
|
-
display: inherit;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
#typewriter {
|
|
360
|
-
--ti-cursor-display: initial;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
#typewriter .ti-cursor {
|
|
364
|
-
display: var(--ti-cursor-display);
|
|
365
|
-
}
|
|
366
|
-
`) {
|
|
367
|
-
constructor() {
|
|
368
|
-
super(...arguments), this.speed = 50, this.delay = 0, this.autoStart = !0, this.cursorChar = "", this.deleteSpeed = 25, this.once = !0, this.typeItInstance = null, this.sessionKey = "";
|
|
369
|
-
}
|
|
370
|
-
disconnectedCallback() {
|
|
371
|
-
super.disconnectedCallback(), this._destroyTypeIt();
|
|
372
|
-
}
|
|
373
|
-
_startTyping() {
|
|
374
|
-
var t, e, r;
|
|
375
|
-
if (this._destroyTypeIt(), this.sessionKey = this.generateSessionKey(), this.once && sessionStorage.getItem(this.sessionKey) === "true") return void ((e = (t = this.shadowRoot) == null ? void 0 : t.querySelector("slot")) == null ? void 0 : e.removeAttribute("hidden"));
|
|
376
|
-
if (!this.typewriterContainer) return;
|
|
377
|
-
const s = { speed: this.speed, startDelay: this.delay, cursor: !!this.cursorChar, cursorChar: this.cursorChar, deleteSpeed: this.deleteSpeed, afterComplete: () => {
|
|
378
|
-
if (this.once) try {
|
|
379
|
-
sessionStorage.setItem(this.sessionKey, "true");
|
|
380
|
-
} catch {
|
|
381
|
-
}
|
|
382
|
-
this.dispatchEvent(new CustomEvent("typeit-complete", { bubbles: !0, composed: !0 })), this.typewriterContainer.style.setProperty("--ti-cursor-display", "none");
|
|
383
|
-
} };
|
|
384
|
-
this.typeItInstance = new Qt(this.typewriterContainer, s), this._getSlottedNodes.forEach((n) => {
|
|
385
|
-
var o;
|
|
386
|
-
n.nodeType === Node.TEXT_NODE ? (o = this.typeItInstance) == null || o.type(n.textContent || "") : n instanceof HTMLElement && this._processCustomElement(n);
|
|
387
|
-
}), Mt((r = this.shadowRoot) == null ? void 0 : r.host).subscribe(() => {
|
|
388
|
-
var n;
|
|
389
|
-
(n = this.typeItInstance) == null || n.go();
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
generateSessionKey() {
|
|
393
|
-
const s = this._getSlottedElements.map((t) => t.outerHTML).join("");
|
|
394
|
-
return this.once ? xt(s) : "";
|
|
395
|
-
}
|
|
396
|
-
_destroyTypeIt() {
|
|
397
|
-
if (this.typeItInstance) {
|
|
398
|
-
try {
|
|
399
|
-
this.typeItInstance.destroy();
|
|
400
|
-
} catch {
|
|
401
|
-
}
|
|
402
|
-
this.typeItInstance = null;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
_processCustomElement(s) {
|
|
406
|
-
var r, n, o;
|
|
407
|
-
const t = s.getAttribute("action"), e = s.getAttribute("value");
|
|
408
|
-
switch (t) {
|
|
409
|
-
case "pause":
|
|
410
|
-
(r = this.typeItInstance) == null || r.pause(parseInt(e || "0", 10));
|
|
411
|
-
break;
|
|
412
|
-
case "delete":
|
|
413
|
-
(n = this.typeItInstance) == null || n.delete(parseInt(e || "0", 10));
|
|
414
|
-
break;
|
|
415
|
-
default:
|
|
416
|
-
s.tagName === "P" && this.typeItInstance.break(), (o = this.typeItInstance) == null || o.type(s.textContent || "");
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
render() {
|
|
420
|
-
return At`<div id="typewriter" aria-live="polite"></div>
|
|
421
|
-
|
|
422
|
-
<div class="typewriter">
|
|
423
|
-
<slot
|
|
424
|
-
hidden
|
|
425
|
-
@slotchange=${() => {
|
|
426
|
-
this._startTyping();
|
|
427
|
-
}}
|
|
428
|
-
></slot>
|
|
429
|
-
</div> `;
|
|
430
|
-
}
|
|
431
|
-
};
|
|
432
|
-
g([T({ type: Number })], f.prototype, "speed", 2), g([qt({ context: Dt, subscribe: !0 }), T({ type: Number })], f.prototype, "delay", 2), g([T({ type: Boolean })], f.prototype, "autoStart", 2), g([T({ type: String })], f.prototype, "cursorChar", 2), g([T({ type: Number })], f.prototype, "deleteSpeed", 2), g([T({ type: Boolean })], f.prototype, "once", 2), g([_t("#typewriter")], f.prototype, "typewriterContainer", 2), g([$t({ flatten: !0 })], f.prototype, "_getSlottedNodes", 2), g([Ot({ flatten: !0 })], f.prototype, "_getSlottedElements", 2), f = g([Ht("schmancy-typewriter")], f);
|
|
433
|
-
export {
|
|
434
|
-
f as T
|
|
435
|
-
};
|
|
436
|
-
//# sourceMappingURL=typewriter-BNTzu9jY.js.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";var qe=Object.defineProperty;var se=s=>{throw TypeError(s)};var Ne=(s,e,t)=>e in s?qe(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var m=(s,e,t)=>Ne(s,typeof e!="symbol"?e+"":e,t),ie=(s,e,t)=>e.has(s)||se("Cannot "+t);var d=(s,e,t)=>(ie(s,e,"read from private field"),t?t.call(s):e.get(s)),j=(s,e,t)=>e.has(s)?se("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,t);var a=(s,e,t)=>(ie(s,e,"access private method"),t);const Le=require("./consume-uKrSupzs.cjs");require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const xe=require("./litElement.mixin-CrXwM_fu.cjs");require("./tailwind.mixin-CPvz1Npj.cjs");const re=require("./delay-CLGKeX0n.cjs"),De=require("./intersection-CVvaDv96.cjs"),ne=require("lit"),f=require("lit/decorators.js"),ye=s=>Array.isArray(s),oe=s=>ye(s)?s:[s],me="data-typeit-id",E="ti-cursor",Me={started:!1,completed:!1,frozen:!1,destroyed:!1},C={breakLines:!0,cursor:{autoPause:!0,autoPauseDelay:500,animation:{frames:[0,0,1].map(s=>({opacity:s})),options:{iterations:1/0,easing:"steps(2, start)",fill:"forwards"}}},cursorChar:"|",cursorSpeed:1e3,deleteSpeed:null,html:!0,lifeLike:!0,loop:!1,loopDelay:750,nextStringDelay:750,speed:100,startDelay:250,startDelete:!1,strings:[],waitUntilVisible:!1,beforeString:()=>{},afterString:()=>{},beforeStep:()=>{},afterStep:()=>{},afterComplete:()=>{}},ke=`[${me}]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}`,$=s=>document.createElement(s),G=s=>document.createTextNode(s),ae=(s,e="")=>{let t=$("style");t.id=e,t.appendChild(G(s)),document.head.appendChild(t)},le=s=>(ye(s)||(s=[s/2,s/2]),s),ue=(s,e)=>Math.abs(Math.random()*(s+e-(s-e))+(s-e));let he=s=>s/2;const fe=s=>Array.from(s);let Y=s=>([...s.childNodes].forEach(e=>{if(e.nodeValue)return[...e.nodeValue].forEach(t=>{e.parentNode.insertBefore(G(t),e)}),void e.remove();Y(e)}),s);const ge=s=>{let e=document.implementation.createHTMLDocument();return e.body.innerHTML=s,Y(e.body)};function be(s,e=!1,t=!1){let r,n=s.querySelector(`.${E}`),o=document.createTreeWalker(s,NodeFilter.SHOW_ALL,{acceptNode:u=>{var h,p;if(n&&t){if((h=u.classList)!=null&&h.contains(E))return NodeFilter.FILTER_ACCEPT;if(n.contains(u))return NodeFilter.FILTER_REJECT}return(p=u.classList)!=null&&p.contains(E)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),l=[];for(;r=o.nextNode();)r.originalParent||(r.originalParent=r.parentNode),l.push(r);return e?l.reverse():l}function Ae(s,e=!0){return e?be(ge(s)):fe(s).map(G)}const _e=({index:s,newIndex:e,queueItems:t,cleanUp:r})=>{for(let n=s+1;n<e+1;n++)r(t[n][0])},we=s=>Number.isInteger(s),ce=({queueItems:s,selector:e,cursorPosition:t,to:r})=>{if(we(e))return-1*e;let n=new RegExp("END","i").test(r),o=e?[...s].reverse().findIndex(({char:l})=>{let u=l.parentElement,h=u.matches(e);return!(!n||!h)||h&&u.firstChild.isSameNode(l)}):-1;return o<0&&(o=n?0:s.length-1),o-t+(n?0:1)},A=(s,e)=>new Array(e).fill(s);let F=s=>new Promise(e=>{requestAnimationFrame(async()=>{e(await s())})}),pe=s=>s==null?void 0:s.getAnimations().find(e=>e.id===s.dataset.tiAnimationId),Te=({cursor:s,frames:e,options:t})=>{let r=s.animate(e,t);return r.pause(),r.id=s.dataset.tiAnimationId,F(()=>{F(()=>{r.play()})}),r},de=s=>{var e;return(e=s.func)==null?void 0:e.call(null)},$e=async({index:s,queueItems:e,wait:t,cursor:r,cursorOptions:n})=>{let o=e[s][1],l=[],u=s,h=o,p=()=>h&&!h.delay,c=o.shouldPauseCursor()&&n.autoPause;for(;p();)l.push(h),p()&&u++,h=e[u]?e[u][1]:null;if(l.length)return await F(async()=>{for(let P of l)await de(P)}),u-1;let y,b=pe(r);return b&&(y={...b.effect.getComputedTiming(),delay:c?n.autoPauseDelay:0}),await t(async()=>{b&&c&&b.cancel(),await F(()=>{de(o)})},o.delay),await(({cursor:P,options:Z,cursorOptions:ee})=>{if(!P||!ee)return;let B,k=pe(P);k&&(Z.delay=k.effect.getComputedTiming().delay,B=k.currentTime,k.cancel());let te=Te({cursor:P,frames:ee.animation.frames,options:Z});return B&&(te.currentTime=B),te})({cursor:r,options:y,cursorOptions:n}),s};const _=s=>"value"in s;let v=s=>typeof s=="function"?s():s,K=(s,e=document,t=!1)=>e["querySelector"+(t?"All":"")](s);const S=(s,e)=>Object.assign({},s,e);let Oe={"font-family":"","font-weight":"","font-size":"","font-style":"","line-height":"",color:"",transform:"translateX(-.125em)"};var i,Ie,q,Q,Ee,U,V,X,O,w,Ce,N,L,ve,R,Pe,Se,J,H,x,z,I,D,M,W,T;class He{constructor(e,t={}){j(this,i);m(this,"element");m(this,"timeouts");m(this,"cursorPosition");m(this,"predictedCursorPosition");m(this,"statuses",{started:!1,completed:!1,frozen:!1,destroyed:!1,firing:!1});m(this,"opts");m(this,"id");m(this,"queue");m(this,"cursor");m(this,"flushCallback",null);m(this,"unfreeze",()=>{});m(this,"is",function(e){return this.statuses[e]});j(this,R,e=>{this.opts.cursor=(t=>{var r,n;if(typeof t=="object"){let o={},{frames:l,options:u}=C.cursor.animation;return o.animation=t.animation||{},o.animation.frames=((r=t.animation)==null?void 0:r.frames)||l,o.animation.options=S(u,((n=t.animation)==null?void 0:n.options)||{}),o.autoPause=t.autoPause??C.cursor.autoPause,o.autoPauseDelay=t.autoPauseDelay||C.cursor.autoPauseDelay,o}return t===!0?C.cursor:t})(e.cursor??C.cursor),this.opts.strings=a(this,i,Pe).call(this,oe(this.opts.strings)),this.opts=S(this.opts,{html:!d(this,i,M)&&this.opts.html,nextStringDelay:le(this.opts.nextStringDelay),loopDelay:le(this.opts.loopDelay)})});var r;this.opts=S(C,t),this.element=typeof(r=e)=="string"?K(r):r,this.timeouts=[],this.cursorPosition=0,this.unfreeze=()=>{},this.predictedCursorPosition=null,this.statuses=S({},Me),this.id=Math.random().toString().substring(2,9),this.queue=function(n){let o=function(c){return oe(c).forEach(y=>{var b;return p.set(Symbol((b=y.char)==null?void 0:b.innerText),l({...y}))}),this},l=c=>(c.shouldPauseCursor=function(){return!!(this.typeable||this.cursorable||this.deletable)},c),u=()=>p,h=()=>Array.from(p.values()),p=new Map;return o(n),{add:o,set:function(c,y){let b=[...p.keys()];p.set(b[c],l(y))},wipe:function(){p=new Map,o(n)},done:(c,y=!1)=>y?p.delete(c):p.get(c).done=!0,reset:function(){p.forEach(c=>delete c.done)},destroy:c=>p.delete(c),getItems:(c=!1)=>c?h():h().filter(y=>!y.done),getQueue:u,getTypeable:()=>h().filter(c=>c.typeable),getPendingQueueItems:()=>{const c=[];for(let[,y]of u())y.done||c.push(y);return c}}}([{delay:this.opts.startDelay}]),d(this,R).call(this,t),this.cursor=a(this,i,Se).call(this),this.element.dataset.typeitId=this.id,ae(ke),this.opts.strings.length&&a(this,i,ve).call(this)}go(){return this.statuses.started?this:(a(this,i,X).call(this),this.opts.waitUntilVisible?(e=this.element,t=a(this,i,q).bind(this),new IntersectionObserver((r,n)=>{r.forEach(o=>{o.isIntersecting&&(t(),n.unobserve(e))})},{threshold:1}).observe(e),this):(a(this,i,q).call(this),this));var e,t}destroy(e=!0){this.timeouts=(this.timeouts.forEach(clearTimeout),[]),v(e)&&this.cursor&&a(this,i,z).call(this,this.cursor),this.statuses.destroyed=!0}reset(e){!this.is("destroyed")&&this.destroy(),e?(this.queue.wipe(),e(this)):this.queue.reset(),this.cursorPosition=0;for(let t in this.statuses)this.statuses[t]=!1;return this.element[a(this,i,O).call(this)?"value":"innerHTML"]="",this}type(e,t={}){e=v(e);let{instant:r}=t,n=a(this,i,N).call(this,t),o=Ae(e,this.opts.html).map(u=>{return{func:()=>a(this,i,H).call(this,u),char:u,delay:r||(h=u,/<(.+)>(.*?)<\/(.+)>/.test(h.outerHTML))?0:a(this,i,I).call(this),typeable:u.nodeType===Node.TEXT_NODE};var h}),l=[n[0],{func:async()=>await this.opts.beforeString(e,this)},...o,{func:async()=>await this.opts.afterString(e,this)},n[1]];return a(this,i,w).call(this,l,t)}break(e={}){return a(this,i,w).call(this,{func:()=>a(this,i,H).call(this,$("BR")),typeable:!0},e)}move(e,t={}){e=v(e);let r=a(this,i,N).call(this,t),{instant:n,to:o}=t,l=ce({queueItems:this.queue.getTypeable(),selector:e===null?"":e,to:o,cursorPosition:d(this,i,D)}),u=l<0?-1:1;return this.predictedCursorPosition=d(this,i,D)+l,a(this,i,w).call(this,[r[0],...A({func:()=>a(this,i,Q).call(this,u),delay:n?0:a(this,i,I).call(this),cursorable:!0},Math.abs(l)),r[1]],t)}exec(e,t={}){let r=a(this,i,N).call(this,t);return a(this,i,w).call(this,[r[0],{func:()=>e(this)},r[1]],t)}options(e,t={}){return e=v(e),a(this,i,L).call(this,e),a(this,i,w).call(this,{},t)}pause(e,t={}){return a(this,i,w).call(this,{delay:v(e)},t)}delete(e=null,t={}){e=v(e);let r=a(this,i,N).call(this,t),n=e,{instant:o,to:l}=t,u=this.queue.getTypeable(),h=n===null?u.length:we(n)?n:ce({queueItems:u,selector:n,cursorPosition:d(this,i,D),to:l});return a(this,i,w).call(this,[r[0],...A({func:a(this,i,x).bind(this),delay:o?0:a(this,i,I).call(this,1),deletable:!0},h),r[1]],t)}freeze(){this.statuses.frozen=!0}flush(e=null){return this.flushCallback=e||this.flushCallback,this.statuses.firing||(a(this,i,X).call(this),a(this,i,q).call(this,!1).then(()=>{if(this.queue.getPendingQueueItems().length>0)return this.flush();this.flushCallback(),this.flushCallback=null})),this}getQueue(){return this.queue}getOptions(){return this.opts}updateOptions(e){return a(this,i,L).call(this,e)}getElement(){return this.element}empty(e={}){return a(this,i,w).call(this,{func:a(this,i,Ie).bind(this)},e)}}i=new WeakSet,Ie=async function(){a(this,i,O).call(this)?this.element.value="":d(this,i,T).forEach(a(this,i,z).bind(this))},q=async function(e=!0){this.statuses.started=!0,this.statuses.firing=!0;let t=r=>{this.queue.done(r,!e)};try{let r=[...this.queue.getQueue()];for(let o=0;o<r.length;o++){let[l,u]=r[o];if(!u.done){if(!u.deletable||u.deletable&&d(this,i,T).length){let h=await a(this,i,U).call(this,o,r);_e({index:o,newIndex:h,queueItems:r,cleanUp:t}),o=h}t(l)}}if(!e)return this.statuses.firing=!1,this;if(this.statuses.completed=!0,this.statuses.firing=!1,await this.opts.afterComplete(this),!this.opts.loop)throw"";let n=this.opts.loopDelay;a(this,i,V).call(this,async()=>{await a(this,i,Ee).call(this,n[0]),a(this,i,q).call(this)},n[1])}catch{}return this.statuses.firing=!1,this},Q=async function(e){var t,r,n;this.cursorPosition=(t=e,r=this.cursorPosition,n=d(this,i,T),Math.min(Math.max(r+t,0),n.length)),((o,l,u)=>{let h=l[u-1],p=K(`.${E}`,o);(o=(h==null?void 0:h.parentNode)||o).insertBefore(p,h||null)})(this.element,d(this,i,T),this.cursorPosition)},Ee=async function(e){let t=d(this,i,D);t&&await a(this,i,Q).call(this,{value:t});let r=d(this,i,T).map(n=>[Symbol(),{func:a(this,i,x).bind(this),delay:a(this,i,I).call(this,1),deletable:!0,shouldPauseCursor:()=>!0}]);for(let n=0;n<r.length;n++)await a(this,i,U).call(this,n,r);this.queue.reset(),this.queue.set(0,{delay:e})},U=function(e,t){return $e({index:e,queueItems:t,wait:a(this,i,V).bind(this),cursor:this.cursor,cursorOptions:this.opts.cursor})},V=async function(e,t,r=!1){this.statuses.frozen&&await new Promise(n=>{this.unfreeze=()=>{this.statuses.frozen=!1,n()}}),r||await this.opts.beforeStep(this),await((n,o,l)=>new Promise(u=>{l.push(setTimeout(async()=>{await n(),u()},o||0))}))(e,t,this.timeouts),r||await this.opts.afterStep(this)},X=async function(){if(!a(this,i,O).call(this)&&this.cursor&&this.element.appendChild(this.cursor),d(this,i,W)){((n,o)=>{let l=`[${me}='${n}'] .${E}`,u=getComputedStyle(o),h=Object.entries(Oe).reduce((p,[c,y])=>`${p} ${c}: var(--ti-cursor-${c}, ${y||u[c]});`,"");ae(`${l} { display: inline-block; width: 0; ${h} }`,n)})(this.id,this.element),this.cursor.dataset.tiAnimationId=this.id;let{animation:e}=this.opts.cursor,{frames:t,options:r}=e;Te({frames:t,cursor:this.cursor,options:{duration:this.opts.cursorSpeed,...r}})}},O=function(){return _(this.element)},w=function(e,t){return this.queue.add(e),a(this,i,Ce).call(this,t),this},Ce=function(e={}){let t=e.delay;t&&this.queue.add({delay:t})},N=function(e={}){return[{func:()=>a(this,i,L).call(this,e)},{func:()=>a(this,i,L).call(this,this.opts)}]},L=async function(e){this.opts=S(this.opts,e)},ve=function(){let e=this.opts.strings.filter(t=>!!t);e.forEach((t,r)=>{if(this.type(t),r+1===e.length)return;let n=this.opts.breakLines?[{func:()=>a(this,i,H).call(this,$("BR")),typeable:!0}]:A({func:a(this,i,x).bind(this),delay:a(this,i,I).call(this,1)},this.queue.getTypeable().length);a(this,i,J).call(this,n)})},R=new WeakMap,Pe=function(e){let t=this.element.innerHTML;return t?(this.element.innerHTML="",this.opts.startDelete?(this.element.innerHTML=t,Y(this.element),a(this,i,J).call(this,A({func:a(this,i,x).bind(this),delay:a(this,i,I).call(this,1),deletable:!0},d(this,i,T).length)),e):(r=t,r.replace(/<!--(.+?)-->/g,"").trim().split(/<br(?:\s*?)(?:\/)?>/)).concat(e)):e;var r},Se=function(){if(d(this,i,M))return null;let e=$("span");return e.className=E,d(this,i,W)?(e.innerHTML=ge(this.opts.cursorChar).innerHTML,e):(e.style.visibility="hidden",e)},J=function(e){let t=this.opts.nextStringDelay;this.queue.add([{delay:t[0]},...e,{delay:t[1]}])},H=function(e){((t,r)=>{if(_(t))return void(t.value=`${t.value}${r.textContent}`);r.innerHTML="";let n=(o=r.originalParent,/body/i.test(o==null?void 0:o.tagName)?t:r.originalParent||t);var o;let l=K("."+E,n)||null;l&&l.parentElement!==n&&(n=l.parentElement),n.insertBefore(r,l)})(this.element,e)},x=function(){d(this,i,T).length&&(d(this,i,M)?this.element.value=this.element.value.slice(0,-1):a(this,i,z).call(this,d(this,i,T)[this.cursorPosition]))},z=function(e){((t,r)=>{if(!t)return;let n=t.parentNode;(n.childNodes.length>1||n.isSameNode(r)?t:n).remove()})(e,this.element)},I=function(e=0){return function(t){let{speed:r,deleteSpeed:n,lifeLike:o}=t;return n=n!==null?n:r/3,o?[ue(r,he(r)),ue(n,he(n))]:[r,n]}(this.opts)[e]},D=function(){return this.predictedCursorPosition??this.cursorPosition},M=function(){return _(this.element)},W=function(){return!!this.opts.cursor&&!d(this,i,M)},T=function(){return e=this.element,_(e)?fe(e.value):be(e,!0).filter(t=>!(t.childNodes.length>0));var e};var ze=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,g=(s,e,t,r)=>{for(var n,o=r>1?void 0:r?Fe(e,t):e,l=s.length-1;l>=0;l--)(n=s[l])&&(o=(r?n(e,t,o):n(o))||o);return r&&o&&ze(e,t,o),o};exports.TypewriterElement=class extends xe.$LitElement(ne.css`
|
|
2
|
-
:host {
|
|
3
|
-
display: inherit;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
#typewriter {
|
|
7
|
-
--ti-cursor-display: initial;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
#typewriter .ti-cursor {
|
|
11
|
-
display: var(--ti-cursor-display);
|
|
12
|
-
}
|
|
13
|
-
`){constructor(){super(...arguments),this.speed=50,this.delay=0,this.autoStart=!0,this.cursorChar="",this.deleteSpeed=25,this.once=!0,this.typeItInstance=null,this.sessionKey=""}disconnectedCallback(){super.disconnectedCallback(),this._destroyTypeIt()}_startTyping(){var e,t,r;if(this._destroyTypeIt(),this.sessionKey=this.generateSessionKey(),this.once&&sessionStorage.getItem(this.sessionKey)==="true")return void((t=(e=this.shadowRoot)==null?void 0:e.querySelector("slot"))==null?void 0:t.removeAttribute("hidden"));if(!this.typewriterContainer)return;const s={speed:this.speed,startDelay:this.delay,cursor:!!this.cursorChar,cursorChar:this.cursorChar,deleteSpeed:this.deleteSpeed,afterComplete:()=>{if(this.once)try{sessionStorage.setItem(this.sessionKey,"true")}catch{}this.dispatchEvent(new CustomEvent("typeit-complete",{bubbles:!0,composed:!0})),this.typewriterContainer.style.setProperty("--ti-cursor-display","none")}};this.typeItInstance=new He(this.typewriterContainer,s),this._getSlottedNodes.forEach(n=>{var o;n.nodeType===Node.TEXT_NODE?(o=this.typeItInstance)==null||o.type(n.textContent||""):n instanceof HTMLElement&&this._processCustomElement(n)}),De.intersection$((r=this.shadowRoot)==null?void 0:r.host).subscribe(()=>{var n;(n=this.typeItInstance)==null||n.go()})}generateSessionKey(){const s=this._getSlottedElements.map(e=>e.outerHTML).join("");return this.once?re.hashContent(s):""}_destroyTypeIt(){if(this.typeItInstance){try{this.typeItInstance.destroy()}catch{}this.typeItInstance=null}}_processCustomElement(s){var r,n,o;const e=s.getAttribute("action"),t=s.getAttribute("value");switch(e){case"pause":(r=this.typeItInstance)==null||r.pause(parseInt(t||"0",10));break;case"delete":(n=this.typeItInstance)==null||n.delete(parseInt(t||"0",10));break;default:s.tagName==="P"&&this.typeItInstance.break(),(o=this.typeItInstance)==null||o.type(s.textContent||"")}}render(){return ne.html`<div id="typewriter" aria-live="polite"></div>
|
|
14
|
-
|
|
15
|
-
<div class="typewriter">
|
|
16
|
-
<slot
|
|
17
|
-
hidden
|
|
18
|
-
@slotchange=${()=>{this._startTyping()}}
|
|
19
|
-
></slot>
|
|
20
|
-
</div> `}},g([f.property({type:Number})],exports.TypewriterElement.prototype,"speed",2),g([Le.c({context:re.delayContext,subscribe:!0}),f.property({type:Number})],exports.TypewriterElement.prototype,"delay",2),g([f.property({type:Boolean})],exports.TypewriterElement.prototype,"autoStart",2),g([f.property({type:String})],exports.TypewriterElement.prototype,"cursorChar",2),g([f.property({type:Number})],exports.TypewriterElement.prototype,"deleteSpeed",2),g([f.property({type:Boolean})],exports.TypewriterElement.prototype,"once",2),g([f.query("#typewriter")],exports.TypewriterElement.prototype,"typewriterContainer",2),g([f.queryAssignedNodes({flatten:!0})],exports.TypewriterElement.prototype,"_getSlottedNodes",2),g([f.queryAssignedElements({flatten:!0})],exports.TypewriterElement.prototype,"_getSlottedElements",2),exports.TypewriterElement=g([f.customElement("schmancy-typewriter")],exports.TypewriterElement);
|
|
21
|
-
//# sourceMappingURL=typewriter-XTltzkLy.cjs.map
|