@mhmo91/schmancy 0.9.25 → 0.9.27
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/agent/schmancy.agent.js +186 -17
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/schmancy.manifest.json +136 -1
- package/dist/{area-CfozaCAZ.js → area-BGBCMC79.js} +1 -1
- package/dist/{area-CfozaCAZ.js.map → area-BGBCMC79.js.map} +1 -1
- package/dist/{area-CFLFXu0Z.cjs → area-D7l9KR2N.cjs} +1 -1
- package/dist/{area-CFLFXu0Z.cjs.map → area-D7l9KR2N.cjs.map} +1 -1
- package/dist/area.cjs +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-NDvRW_Xs.cjs → autocomplete-BPD5uraA.cjs} +1 -1
- package/dist/{autocomplete-NDvRW_Xs.cjs.map → autocomplete-BPD5uraA.cjs.map} +1 -1
- package/dist/{autocomplete-BNjcQ743.js → autocomplete-C2P0Soht.js} +2 -2
- package/dist/{autocomplete-BNjcQ743.js.map → autocomplete-C2P0Soht.js.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-ZA47HbKj.cjs → boat-BkIO-0No.cjs} +1 -1
- package/dist/{boat-ZA47HbKj.cjs.map → boat-BkIO-0No.cjs.map} +1 -1
- package/dist/{boat-DxplbTDW.js → boat-DXZ0k7oa.js} +1 -1
- package/dist/{boat-DxplbTDW.js.map → boat-DXZ0k7oa.js.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/{busy-BuHEz1uo.cjs → busy-DGYhpTnO.cjs} +1 -1
- package/dist/{busy-BuHEz1uo.cjs.map → busy-DGYhpTnO.cjs.map} +1 -1
- package/dist/{busy-QZxs4u8B.js → busy-iRjq6Nvd.js} +1 -1
- package/dist/{busy-QZxs4u8B.js.map → busy-iRjq6Nvd.js.map} +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +3 -3
- package/dist/{card-DtN6p1Jq.cjs → card-DjYnCckw.cjs} +1 -1
- package/dist/{card-DtN6p1Jq.cjs.map → card-DjYnCckw.cjs.map} +1 -1
- package/dist/{card-CTUaARLm.js → card-wUTjx0EC.js} +1 -1
- package/dist/{card-CTUaARLm.js.map → card-wUTjx0EC.js.map} +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/charts.cjs +1 -1
- package/dist/charts.js +1 -1
- package/dist/{checkbox-DEKQLJYR.cjs → checkbox-CiYEtw9F.cjs} +1 -1
- package/dist/{checkbox-DEKQLJYR.cjs.map → checkbox-CiYEtw9F.cjs.map} +1 -1
- package/dist/{checkbox-D4cUb1T3.js → checkbox-VBSenxgb.js} +1 -1
- package/dist/{checkbox-D4cUb1T3.js.map → checkbox-VBSenxgb.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-DhAWrSgi.js → chips-BDS9lkPa.js} +3 -3
- package/dist/{chips-DhAWrSgi.js.map → chips-BDS9lkPa.js.map} +1 -1
- package/dist/{chips-B-27tj7O.cjs → chips-D6ptH5re.cjs} +1 -1
- package/dist/{chips-B-27tj7O.cjs.map → chips-D6ptH5re.cjs.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/{code-highlight-DgZKqo4P.js → code-highlight-Bi91XHJN.js} +1 -1
- package/dist/{code-highlight-DgZKqo4P.js.map → code-highlight-Bi91XHJN.js.map} +1 -1
- package/dist/{code-highlight-_ZK6FEjF.cjs → code-highlight-BzRmBZzz.cjs} +1 -1
- package/dist/{code-highlight-_ZK6FEjF.cjs.map → code-highlight-BzRmBZzz.cjs.map} +1 -1
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{components-JHIoVqFd.js → components-DZgJWHdZ.js} +1 -1
- package/dist/{components-JHIoVqFd.js.map → components-DZgJWHdZ.js.map} +1 -1
- package/dist/{components-DUiF-_Ul.cjs → components-DkmEgyAc.cjs} +1 -1
- package/dist/{components-DUiF-_Ul.cjs.map → components-DkmEgyAc.cjs.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/connectivity.cjs +1 -1
- package/dist/connectivity.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/context-BerzpUhI.js +3 -0
- package/dist/{context-BCFNNkes.js.map → context-BerzpUhI.js.map} +1 -1
- package/dist/context-C6dHUHhi.cjs +1 -0
- package/dist/{context-6t-yayy3.cjs.map → context-C6dHUHhi.cjs.map} +1 -1
- package/dist/{date-range-CrAIk8dg.cjs → date-range-BmFxTXiU.cjs} +1 -1
- package/dist/{date-range-CrAIk8dg.cjs.map → date-range-BmFxTXiU.cjs.map} +1 -1
- package/dist/{date-range-B1FDRGRB.js → date-range-ClTMg1AB.js} +2 -2
- package/dist/{date-range-B1FDRGRB.js.map → date-range-ClTMg1AB.js.map} +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-DCp_QEct.cjs → delay-BHODnTg-.cjs} +1 -1
- package/dist/{delay-DCp_QEct.cjs.map → delay-BHODnTg-.cjs.map} +1 -1
- package/dist/{delay-Cs0i_CpQ.js → delay-Dlk0A3he.js} +3 -3
- package/dist/{delay-Cs0i_CpQ.js.map → delay-Dlk0A3he.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-CBoXUDlQ.js → details-CPjlqQD4.js} +1 -1
- package/dist/{details-CBoXUDlQ.js.map → details-CPjlqQD4.js.map} +1 -1
- package/dist/{details-BJTR16AV.cjs → details-Cz9ok9si.cjs} +1 -1
- package/dist/{details-BJTR16AV.cjs.map → details-Cz9ok9si.cjs.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{divider-D6MRonTS.cjs → divider-CILo3_vi.cjs} +1 -1
- package/dist/{divider-D6MRonTS.cjs.map → divider-CILo3_vi.cjs.map} +1 -1
- package/dist/{divider-DivkYKa_.js → divider-ghgyw5CU.js} +1 -1
- package/dist/{divider-DivkYKa_.js.map → divider-ghgyw5CU.js.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +2 -2
- package/dist/{expand-BvAVo29n.js → expand-CbjBr_Ds.js} +2 -2
- package/dist/{expand-BvAVo29n.js.map → expand-CbjBr_Ds.js.map} +1 -1
- package/dist/{expand-Dd0H6y8Z.cjs → expand-r3OrSoDk.cjs} +1 -1
- package/dist/{expand-Dd0H6y8Z.cjs.map → expand-r3OrSoDk.cjs.map} +1 -1
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/{extra-CdOUiB0K.cjs → extra-BZeZOMBI.cjs} +1 -1
- package/dist/{extra-CdOUiB0K.cjs.map → extra-BZeZOMBI.cjs.map} +1 -1
- package/dist/{extra-0MZSXbOH.js → extra-DK9MQtPJ.js} +1 -1
- package/dist/{extra-0MZSXbOH.js.map → extra-DK9MQtPJ.js.map} +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{float-D_u8mDNa.js → float-BfCvGeY9.js} +1 -1
- package/dist/{float-D_u8mDNa.js.map → float-BfCvGeY9.js.map} +1 -1
- package/dist/{float-ByW-Gth3.cjs → float-CuZ8LOgB.cjs} +1 -1
- package/dist/{float-ByW-Gth3.cjs.map → float-CuZ8LOgB.cjs.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/handover/agent-runtime-v2-loopback.md +5 -5
- package/dist/handover/schmancy-token-reference.md +198 -0
- package/dist/{icons-24zlLf1q.js → icons-Drq4kKy2.js} +2 -2
- package/dist/{icons-24zlLf1q.js.map → icons-Drq4kKy2.js.map} +1 -1
- package/dist/{icons-BpHN4Z8q.cjs → icons-DtdhaZdc.cjs} +1 -1
- package/dist/{icons-BpHN4Z8q.cjs.map → icons-DtdhaZdc.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-BXzYZu9_.cjs → iframe-BkwwWIbQ.cjs} +1 -1
- package/dist/{iframe-BXzYZu9_.cjs.map → iframe-BkwwWIbQ.cjs.map} +1 -1
- package/dist/{iframe-B_QrvTmj.js → iframe-BmyHW8km.js} +1 -1
- package/dist/{iframe-B_QrvTmj.js.map → iframe-BmyHW8km.js.map} +1 -1
- package/dist/iframe.cjs +1 -1
- package/dist/iframe.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +30 -30
- package/dist/{input-chip-C09B0L1y.js → input-chip-BQrjpjaQ.js} +1 -1
- package/dist/{input-chip-C09B0L1y.js.map → input-chip-BQrjpjaQ.js.map} +1 -1
- package/dist/{input-chip-FZEpuSaX.cjs → input-chip-DN-cwf11.cjs} +1 -1
- package/dist/{input-chip-FZEpuSaX.cjs.map → input-chip-DN-cwf11.cjs.map} +1 -1
- package/dist/json.cjs +1 -1
- package/dist/json.js +2 -2
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.js +1 -1
- package/dist/{layout-Bst19YG8.cjs → layout-7eyMBmZk.cjs} +1 -1
- package/dist/{layout-Bst19YG8.cjs.map → layout-7eyMBmZk.cjs.map} +1 -1
- package/dist/{layout-aTtUdGAi.js → layout-Ox6nJkzC.js} +2 -2
- package/dist/{layout-aTtUdGAi.js.map → layout-Ox6nJkzC.js.map} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +2 -2
- package/dist/{lightbox-Cb5-XPWV.js → lightbox-CY52Z_ig.js} +2 -2
- package/dist/{lightbox-Cb5-XPWV.js.map → lightbox-CY52Z_ig.js.map} +1 -1
- package/dist/{lightbox-Dk2ICCBB.cjs → lightbox-H8Uq3AXy.cjs} +1 -1
- package/dist/{lightbox-Dk2ICCBB.cjs.map → lightbox-H8Uq3AXy.cjs.map} +1 -1
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/{list-DBiecR1i.cjs → list-BGjVo6zb.cjs} +1 -1
- package/dist/{list-DBiecR1i.cjs.map → list-BGjVo6zb.cjs.map} +1 -1
- package/dist/{list-DZWoCb3V.js → list-D7wUxu1C.js} +2 -2
- package/dist/{list-DZWoCb3V.js.map → list-D7wUxu1C.js.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-BuZ28ZzP.js → litElement.mixin-CszkJuNl.js} +1 -1
- package/dist/{litElement.mixin-BuZ28ZzP.js.map → litElement.mixin-CszkJuNl.js.map} +1 -1
- package/dist/{litElement.mixin-lYlKxxjR.cjs → litElement.mixin-qh5-IIUq.cjs} +1 -1
- package/dist/{litElement.mixin-lYlKxxjR.cjs.map → litElement.mixin-qh5-IIUq.cjs.map} +1 -1
- package/dist/{mailbox-laG7nvXl.js → mailbox--EN-JhjV.js} +4 -4
- package/dist/{mailbox-laG7nvXl.js.map → mailbox--EN-JhjV.js.map} +1 -1
- package/dist/{mailbox-BYNmcNIM.cjs → mailbox-DLiBGJhY.cjs} +1 -1
- package/dist/{mailbox-BYNmcNIM.cjs.map → mailbox-DLiBGJhY.cjs.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-YSAPFrH9.js → map-B0S_q3ma.js} +1 -1
- package/dist/{map-YSAPFrH9.js.map → map-B0S_q3ma.js.map} +1 -1
- package/dist/{map-7_cexh1e.cjs → map-EDQN0I6e.cjs} +1 -1
- package/dist/{map-7_cexh1e.cjs.map → map-EDQN0I6e.cjs.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{menu-RaeiF4Ja.cjs → menu-3edZGQ1x.cjs} +1 -1
- package/dist/{menu-RaeiF4Ja.cjs.map → menu-3edZGQ1x.cjs.map} +1 -1
- package/dist/{menu-DeNdlsSV.js → menu-COeFpb6n.js} +1 -1
- package/dist/{menu-DeNdlsSV.js.map → menu-COeFpb6n.js.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/metric.cjs +1 -1
- package/dist/metric.js +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +2 -2
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/navigation-rail.cjs +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/{notification-DRPjMDli.js → notification-CC-TFN5v.js} +2 -2
- package/dist/{notification-DRPjMDli.js.map → notification-CC-TFN5v.js.map} +1 -1
- package/dist/{notification-DqWW2oh9.cjs → notification-P4c-kFdH.cjs} +1 -1
- package/dist/{notification-DqWW2oh9.cjs.map → notification-P4c-kFdH.cjs.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-N3wlHTc9.js → option-BwAF4nAw.js} +1 -1
- package/dist/{option-N3wlHTc9.js.map → option-BwAF4nAw.js.map} +1 -1
- package/dist/{option-1lYctKVI.cjs → option-Cu0ertuF.cjs} +1 -1
- package/dist/{option-1lYctKVI.cjs.map → option-Cu0ertuF.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/overlay.cjs +1 -1
- package/dist/overlay.js +1 -1
- package/dist/page.cjs +1 -1
- package/dist/page.js +2 -2
- package/dist/{progress-DhcXo8r-.js → progress-Bk_Q1Shy.js} +1 -1
- package/dist/{progress-DhcXo8r-.js.map → progress-Bk_Q1Shy.js.map} +1 -1
- package/dist/{progress-YOuASkdz.cjs → progress-Yz6EMNSu.cjs} +1 -1
- package/dist/{progress-YOuASkdz.cjs.map → progress-Yz6EMNSu.cjs.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{provide-B7b5TOCD.cjs → provide-CYgj58u_.cjs} +1 -1
- package/dist/{provide-B7b5TOCD.cjs.map → provide-CYgj58u_.cjs.map} +1 -1
- package/dist/{provide-uCFRzgWs.js → provide-ydIskwf2.js} +1 -1
- package/dist/{provide-uCFRzgWs.js.map → provide-ydIskwf2.js.map} +1 -1
- package/dist/qr-scanner.cjs +1 -1
- package/dist/qr-scanner.js +1 -1
- package/dist/{radio-group-DchZApJl.js → radio-group-BcdcjLNC.js} +1 -1
- package/dist/{radio-group-DchZApJl.js.map → radio-group-BcdcjLNC.js.map} +1 -1
- package/dist/{radio-group-DYvIgv3P.cjs → radio-group-BpBz5tRA.cjs} +1 -1
- package/dist/{radio-group-DYvIgv3P.cjs.map → radio-group-BpBz5tRA.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/range.cjs +1 -1
- package/dist/range.js +1 -1
- package/dist/{scroll-G2YnteF9.js → scroll-DXQv0ejL.js} +1 -1
- package/dist/{scroll-G2YnteF9.js.map → scroll-DXQv0ejL.js.map} +1 -1
- package/dist/{scroll-BKn4essm.cjs → scroll-DbZMTv0K.cjs} +1 -1
- package/dist/{scroll-BKn4essm.cjs.map → scroll-DbZMTv0K.cjs.map} +1 -1
- package/dist/{select-CQGKkEZc.cjs → select-BV4lK2zy.cjs} +1 -1
- package/dist/{select-CQGKkEZc.cjs.map → select-BV4lK2zy.cjs.map} +1 -1
- package/dist/{select-Bydjuia9.js → select-DKyGWDsG.js} +1 -1
- package/dist/{select-Bydjuia9.js.map → select-DKyGWDsG.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-BCxpHT62.cjs → sheet-BAI_jH1t.cjs} +1 -1
- package/dist/{sheet-BCxpHT62.cjs.map → sheet-BAI_jH1t.cjs.map} +1 -1
- package/dist/{sheet-DGfh9VSs.js → sheet-C3TLKItO.js} +3 -3
- package/dist/{sheet-DGfh9VSs.js.map → sheet-C3TLKItO.js.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{sheet.service-Dy_fwQqQ.js → sheet.service-Dlv20Zfc.js} +1 -1
- package/dist/{sheet.service-Dy_fwQqQ.js.map → sheet.service-Dlv20Zfc.js.map} +1 -1
- package/dist/{sheet.service-B-RxqhpO.cjs → sheet.service-RcDBwHmv.cjs} +1 -1
- package/dist/{sheet.service-B-RxqhpO.cjs.map → sheet.service-RcDBwHmv.cjs.map} +1 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{splash-screen-Clv-5vsb.js → splash-screen-DbI5RgBf.js} +1 -1
- package/dist/{splash-screen-Clv-5vsb.js.map → splash-screen-DbI5RgBf.js.map} +1 -1
- package/dist/{splash-screen-C2xsOEdx.cjs → splash-screen-DoHRTHi8.cjs} +1 -1
- package/dist/{splash-screen-C2xsOEdx.cjs.map → splash-screen-DoHRTHi8.cjs.map} +1 -1
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/{src-DNuhxDig.js → src-00DfxCJq.js} +39 -39
- package/dist/{src-DNuhxDig.js.map → src-00DfxCJq.js.map} +1 -1
- package/dist/{src-Ci10_Iwf.cjs → src-C_JjQovE.cjs} +1 -1
- package/dist/{src-Ci10_Iwf.cjs.map → src-C_JjQovE.cjs.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +3 -3
- package/dist/{surface-fEmoN08Y.cjs → surface-D-GWBcsh.cjs} +1 -1
- package/dist/{surface-fEmoN08Y.cjs.map → surface-D-GWBcsh.cjs.map} +1 -1
- package/dist/{surface-BWcq30OL.js → surface-D23JtxYP.js} +2 -2
- package/dist/{surface-BWcq30OL.js.map → surface-D23JtxYP.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +1 -1
- package/dist/{table-ChHS4xby.cjs → table-C7b73kdg.cjs} +1 -1
- package/dist/{table-ChHS4xby.cjs.map → table-C7b73kdg.cjs.map} +1 -1
- package/dist/{table-B8H-zioX.js → table-CTrhV9-k.js} +1 -1
- package/dist/{table-B8H-zioX.js.map → table-CTrhV9-k.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-DB5kSuGL.js → tabs-Ce55RbwF.js} +2 -2
- package/dist/{tabs-DB5kSuGL.js.map → tabs-Ce55RbwF.js.map} +1 -1
- package/dist/{tabs-DGmbqqBD.cjs → tabs-DAzB8O7w.cjs} +1 -1
- package/dist/{tabs-DGmbqqBD.cjs.map → tabs-DAzB8O7w.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-DRI1oTYQ.cjs +2 -0
- package/dist/{tailwind.mixin-BHX99hgX.cjs.map → tailwind.mixin-DRI1oTYQ.cjs.map} +1 -1
- package/dist/tailwind.mixin-mdQR3BEO.js +219 -0
- package/dist/{tailwind.mixin-DIEGVcl3.js.map → tailwind.mixin-mdQR3BEO.js.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-O9A58OZA.js → textarea-DjN1D9u0.js} +1 -1
- package/dist/{textarea-O9A58OZA.js.map → textarea-DjN1D9u0.js.map} +1 -1
- package/dist/{textarea-CfQnghhD.cjs → textarea-PuHxBvJA.cjs} +1 -1
- package/dist/{textarea-CfQnghhD.cjs.map → textarea-PuHxBvJA.cjs.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-BjnQjhR0.cjs → theme-B-IJ2r7Q.cjs} +1 -1
- package/dist/{theme-BjnQjhR0.cjs.map → theme-B-IJ2r7Q.cjs.map} +1 -1
- package/dist/{theme-button-CaxDEneM.cjs → theme-button-BSbYmS4p.cjs} +1 -1
- package/dist/{theme-button-CaxDEneM.cjs.map → theme-button-BSbYmS4p.cjs.map} +1 -1
- package/dist/{theme-button-ByImreDw.js → theme-button-CEMeAUOL.js} +1 -1
- package/dist/{theme-button-ByImreDw.js.map → theme-button-CEMeAUOL.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/{theme-DvCKLRkt.js → theme-pbxlt72h.js} +3 -3
- package/dist/{theme-DvCKLRkt.js.map → theme-pbxlt72h.js.map} +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +3 -3
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/dist/visually-hidden.cjs +1 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/{window-C8kImMiI.js → window-CrjZdf7Y.js} +1 -1
- package/dist/{window-C8kImMiI.js.map → window-CrjZdf7Y.js.map} +1 -1
- package/dist/{window-BhrSdbk2.cjs → window-DTUARSrU.cjs} +1 -1
- package/dist/{window-BhrSdbk2.cjs.map → window-DTUARSrU.cjs.map} +1 -1
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +1 -1
- package/src/agent/agent-bundle.test.ts +49 -0
- package/src/agent/helpers.ts +94 -0
- package/src/agent/schmancy-skill.ts +3 -0
- package/src/agent/virtual-manifest.d.ts +12 -1
- package/types/src/agent/helpers.d.ts +26 -0
- package/types/src/agent/schmancy-skill.d.ts +2 -1
- package/dist/context-6t-yayy3.cjs +0 -1
- package/dist/context-BCFNNkes.js +0 -3
- package/dist/tailwind.mixin-BHX99hgX.cjs +0 -2
- package/dist/tailwind.mixin-DIEGVcl3.js +0 -219
package/dist/extra.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./extra-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./extra-BZeZOMBI.cjs`);Object.defineProperty(exports,`SchmancyCountriesSelect`,{enumerable:!0,get:function(){return e.n}}),Object.defineProperty(exports,`SchmancyTimezonesSelect`,{enumerable:!0,get:function(){return e.t}});
|
package/dist/extra.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./extra-
|
|
1
|
+
import { n as e, t } from "./extra-DK9MQtPJ.js";
|
|
2
2
|
export { e as SchmancyCountriesSelect, t as SchmancyTimezonesSelect };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./decorate-D_utPUsC.js";
|
|
2
|
-
import { t } from "./window-
|
|
2
|
+
import { t } from "./window-CrjZdf7Y.js";
|
|
3
3
|
import { customElement as n } from "lit/decorators.js";
|
|
4
4
|
var r = class extends t {}, i = r = e([n("schmancy-float")], r);
|
|
5
5
|
export { i as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"float-
|
|
1
|
+
{"version":3,"file":"float-BfCvGeY9.js","names":[],"sources":["../src/float/float.ts"],"sourcesContent":["/**\n * Backward compatibility alias — schmancy-float is now schmancy-window.\n *\n * Existing consumers using <schmancy-float> continue to work.\n * New code should use <schmancy-window> directly.\n */\n\nimport { customElement } from 'lit/decorators.js'\nimport SchmancyWindow from '../window/window.js'\n\n@customElement('schmancy-float')\nexport default class SchmancyFloat extends SchmancyWindow {}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-float': SchmancyFloat\n\t}\n}\n"],"mappings":";;;AAWe,IAAA,IAAA,cAA4B,EAAA,IAAA,IAAA,IAAA,EAAA,CAD1C,EAAc,iBAAA,CAAA,EAAiB,EAAA;AAAA,SAAA,KAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-CncqDLb2.cjs`);const e=require(`./decorate-F9CuyeHg.cjs`),t=require(`./window-
|
|
1
|
+
require(`./chunk-CncqDLb2.cjs`);const e=require(`./decorate-F9CuyeHg.cjs`),t=require(`./window-DTUARSrU.cjs`);let n=require(`lit/decorators.js`);var r=class extends t.t{},i=r=e.t([(0,n.customElement)(`schmancy-float`)],r);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"float-
|
|
1
|
+
{"version":3,"file":"float-CuZ8LOgB.cjs","names":[],"sources":["../src/float/float.ts"],"sourcesContent":["/**\n * Backward compatibility alias — schmancy-float is now schmancy-window.\n *\n * Existing consumers using <schmancy-float> continue to work.\n * New code should use <schmancy-window> directly.\n */\n\nimport { customElement } from 'lit/decorators.js'\nimport SchmancyWindow from '../window/window.js'\n\n@customElement('schmancy-float')\nexport default class SchmancyFloat extends SchmancyWindow {}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-float': SchmancyFloat\n\t}\n}\n"],"mappings":"iJAWe,IAAA,EAAA,cAA4B,EAAA,CAAA,GAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAD5B,iBAAA,CAAA,CAAiB,EAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
|
package/dist/float.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./float-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./float-CuZ8LOgB.cjs`);exports.SchmancyFloat=e.t;
|
package/dist/float.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./float-
|
|
1
|
+
import { t as e } from "./float-BfCvGeY9.js";
|
|
2
2
|
export { e as SchmancyFloat };
|
|
@@ -203,7 +203,7 @@ The manifest already has everything needed; the package is just the JSON-RPC wra
|
|
|
203
203
|
|
|
204
204
|
**Problem.** `handover/agent-runtime-v1.md` had `<PENDING>` placeholders that we manually replaced with `0.9.13` after the first publish. Future handover docs will have the same issue.
|
|
205
205
|
|
|
206
|
-
**Fix.** A build step that substitutes `0.9.
|
|
206
|
+
**Fix.** A build step that substitutes `0.9.27` in `handover/**/*.md` against `package.json`'s `version` field on every build. `dist/handover/**/*.md` gets the rendered version; the source stays templated.
|
|
207
207
|
|
|
208
208
|
**Effort:** ~30 min (one sed step or a tiny script).
|
|
209
209
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
## The URLs you asked for
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
https://esm.sh/@mhmo91/schmancy/agent@0.9.
|
|
11
|
-
https://esm.sh/@mhmo91/schmancy/agent/manifest@0.9.
|
|
10
|
+
https://esm.sh/@mhmo91/schmancy/agent@0.9.27
|
|
11
|
+
https://esm.sh/@mhmo91/schmancy/agent/manifest@0.9.27
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
`0.9.13` is the first release containing `/agent`; every subsequent publish serves the same subpath. `npm view @mhmo91/schmancy version` always returns the current pin if you want to float forward.
|
|
@@ -20,7 +20,7 @@ One script tag. No bundler, no bare specifiers, no npm install.
|
|
|
20
20
|
```html
|
|
21
21
|
<!doctype html>
|
|
22
22
|
<script type="module">
|
|
23
|
-
import { $dialog, theme } from 'https://esm.sh/@mhmo91/schmancy/agent@0.9.
|
|
23
|
+
import { $dialog, theme } from 'https://esm.sh/@mhmo91/schmancy/agent@0.9.27';
|
|
24
24
|
</script>
|
|
25
25
|
<schmancy-theme root scheme="dark">
|
|
26
26
|
<schmancy-surface type="solid" fill="all">
|
|
@@ -12,7 +12,7 @@ Four separable PRs, each shippable on its own:
|
|
|
12
12
|
| # | Title | Branch | Impact on your probe |
|
|
13
13
|
|---|---|---|---|
|
|
14
14
|
| 2 | CI smoke-test gate | `feat/ci-gate-and-version-templating` | None user-facing. `window.schmancy.help()` regressions now fail-closed at publish time instead of shipping silently. |
|
|
15
|
-
| 9 | `0.9.
|
|
15
|
+
| 9 | `0.9.27` templating for handover docs | same branch as #2 | None user-facing. Future handover docs will have live esm.sh URLs instead of `<PENDING>` placeholders. |
|
|
16
16
|
| 3 | JSDoc backfill (46 components) | `feat/jsdoc-batch-{1,2,3}-*` | **This is what you'll notice.** Every form-control, container, and overlay/nav component now ships `@summary`, `@example`, and `@platform` tags in its manifest entry. `window.schmancy.help('schmancy-button')` returns a non-empty `summary`, a copy-pastable `examples[]`, and a `platformPrimitive` hint for graceful degradation. |
|
|
17
17
|
| 1 | Lazy vendor chunks | `feat/lazy-{typewriter,code-highlight,qr-scanner}` | Pages that don't render `<schmancy-code>`, `<schmancy-qr-scanner>`, or `<schmancy-typewriter>` no longer fetch `vendor-highlight`, `vendor-jsqr`, or the typewriter chunk on first paint. ~68 KB gzipped saved on cold starts for typical prototypes. |
|
|
18
18
|
|
|
@@ -21,18 +21,18 @@ The only one that changes the shape of `window.schmancy` is **#3**. The others a
|
|
|
21
21
|
## Pinned URLs (live once the PRs merge)
|
|
22
22
|
|
|
23
23
|
```
|
|
24
|
-
https://esm.sh/@mhmo91/schmancy/agent@0.9.
|
|
25
|
-
https://esm.sh/@mhmo91/schmancy/agent/manifest@0.9.
|
|
24
|
+
https://esm.sh/@mhmo91/schmancy/agent@0.9.27
|
|
25
|
+
https://esm.sh/@mhmo91/schmancy/agent/manifest@0.9.27
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
`0.9.
|
|
28
|
+
`0.9.27` is substituted at publish time — see [`agent-runtime-followups.md`](./agent-runtime-followups.md) #9. Until the PRs land, continue pinning `@0.9.14` (the last published version at time of writing).
|
|
29
29
|
|
|
30
30
|
## Minimum loop-back test
|
|
31
31
|
|
|
32
32
|
```html
|
|
33
33
|
<!doctype html>
|
|
34
34
|
<script type="module">
|
|
35
|
-
import 'https://esm.sh/@mhmo91/schmancy/agent@0.9.
|
|
35
|
+
import 'https://esm.sh/@mhmo91/schmancy/agent@0.9.27';
|
|
36
36
|
</script>
|
|
37
37
|
|
|
38
38
|
<schmancy-theme root scheme="dark">
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# schmancy token reference
|
|
2
|
+
|
|
3
|
+
Every token your design can lean on, grouped by what it's for. Use the **Tailwind class** column when styling — every system token is exposed as a Tailwind utility, so reach for `bg-primary-default` or `text-surface-on` before the raw CSS variable. The CSS variable column is the fallback for properties Tailwind doesn't cover (e.g. `box-shadow`, `transition-duration`).
|
|
4
|
+
|
|
5
|
+
Source of truth: `src/theme/theme.interface.ts` in this repo. Live introspection: `window.schmancy.tokens()` returns the full flat list of CSS custom property names.
|
|
6
|
+
|
|
7
|
+
> **Never use raw hex** (`#6200ee`) **or arbitrary values** (`bg-[#ff0000]`). Both defeat theming — the whole palette is regenerated from `<schmancy-theme color="…">` and your hardcoded color won't follow scheme switches.
|
|
8
|
+
|
|
9
|
+
## Color tokens
|
|
10
|
+
|
|
11
|
+
### Primary, secondary, tertiary
|
|
12
|
+
|
|
13
|
+
The brand-color family + two complement families. Each has four roles: the default fill, an "on" color for text on top of that fill, a softer container variant, and an "on-container" color for text on the container.
|
|
14
|
+
|
|
15
|
+
| CSS variable | Tailwind class | Use for |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| `--schmancy-sys-color-primary-default` | `bg-primary-default` / `text-primary-default` / `border-primary-default` | Primary action button fills, active-state highlights |
|
|
18
|
+
| `--schmancy-sys-color-primary-on` | `bg-primary-on` / `text-primary-on` | Text/icons sitting on `primary-default` |
|
|
19
|
+
| `--schmancy-sys-color-primary-container` | `bg-primary-container` / `text-primary-container` | Softer primary surfaces — selected chips, info banners |
|
|
20
|
+
| `--schmancy-sys-color-primary-onContainer` | `text-primary-onContainer` | Text/icons on `primary-container` |
|
|
21
|
+
| `--schmancy-sys-color-primary-fixed` | `bg-primary-fixed` | Primary fill that stays the same in light/dark schemes |
|
|
22
|
+
| `--schmancy-sys-color-primary-fixedDim` | `bg-primary-fixedDim` | Subdued variant of `primary-fixed` |
|
|
23
|
+
| `--schmancy-sys-color-primary-onFixed` | `text-primary-onFixed` | Text on `primary-fixed` |
|
|
24
|
+
| `--schmancy-sys-color-primary-onFixedVariant` | `text-primary-onFixedVariant` | Secondary text on `primary-fixed` |
|
|
25
|
+
|
|
26
|
+
Same eight roles exist for `secondary-*` and `tertiary-*`. Replace `primary` with `secondary` / `tertiary` in any token name above.
|
|
27
|
+
|
|
28
|
+
### Surface
|
|
29
|
+
|
|
30
|
+
The neutral background family — what everything else sits on. Schmancy uses Material 3's surface tonal levels.
|
|
31
|
+
|
|
32
|
+
| CSS variable | Tailwind class | Use for |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `--schmancy-sys-color-surface-default` | `bg-surface-default` | Default page background |
|
|
35
|
+
| `--schmancy-sys-color-surface-bright` | `bg-surface-bright` | Brighter than default — emphasis surface |
|
|
36
|
+
| `--schmancy-sys-color-surface-dim` | `bg-surface-dim` | Dimmer than default — recessed surface |
|
|
37
|
+
| `--schmancy-sys-color-surface-container` | `bg-surface-container` | Cards, sheets, base "lifted" surface |
|
|
38
|
+
| `--schmancy-sys-color-surface-containerLowest` | `bg-surface-containerLowest` | Most-recessed container tier |
|
|
39
|
+
| `--schmancy-sys-color-surface-containerLow` | `bg-surface-containerLow` | App bar, low-emphasis surfaces |
|
|
40
|
+
| `--schmancy-sys-color-surface-containerHigh` | `bg-surface-containerHigh` | Prominent cards, hover state |
|
|
41
|
+
| `--schmancy-sys-color-surface-containerHighest` | `bg-surface-containerHighest` | Top of the elevation stack |
|
|
42
|
+
| `--schmancy-sys-color-surface-on` | `text-surface-on` | Default text color on any surface |
|
|
43
|
+
| `--schmancy-sys-color-surface-onVariant` | `text-surface-onVariant` | Secondary / muted text |
|
|
44
|
+
| `--schmancy-sys-color-surface-tint` | — | Tint applied to elevated surfaces |
|
|
45
|
+
|
|
46
|
+
### Inverse
|
|
47
|
+
|
|
48
|
+
For "this is the opposite scheme from the rest of the page" surfaces — typically used in toasts, snackbars, contrast-mode tooltips.
|
|
49
|
+
|
|
50
|
+
| CSS variable | Tailwind class | Use for |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| `--schmancy-sys-color-inverse-surface` | `bg-inverse-surface` | Snackbar / toast background |
|
|
53
|
+
| `--schmancy-sys-color-inverse-onSurface` | `text-inverse-onSurface` | Text on `inverse-surface` |
|
|
54
|
+
| `--schmancy-sys-color-inverse-primary` | `text-inverse-primary` | Primary-coloured text on `inverse-surface` |
|
|
55
|
+
|
|
56
|
+
### Outline
|
|
57
|
+
|
|
58
|
+
Borders, dividers, and form-control strokes.
|
|
59
|
+
|
|
60
|
+
| CSS variable | Tailwind class | Use for |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| `--schmancy-sys-color-outline` | `border-outline` | Default 1px border |
|
|
63
|
+
| `--schmancy-sys-color-outlineVariant` | `border-outline-variant` | Quieter dividers (between list rows, table cells) |
|
|
64
|
+
|
|
65
|
+
### Status
|
|
66
|
+
|
|
67
|
+
Error, success, warning, info — each has the same four-role structure as primary/secondary/tertiary.
|
|
68
|
+
|
|
69
|
+
| Family | Default | On | Container | OnContainer |
|
|
70
|
+
|---|---|---|---|---|
|
|
71
|
+
| **Error** | `bg-error-default` | `text-error-on` | `bg-error-container` | `text-error-onContainer` |
|
|
72
|
+
| **Success** | `bg-success-default` | `text-success-on` | `bg-success-container` | `text-success-onContainer` |
|
|
73
|
+
| **Warning** | `bg-warning-default` | `text-warning-on` | `bg-warning-container` | `text-warning-onContainer` |
|
|
74
|
+
| **Info** | `bg-info-default` | `text-info-on` | `bg-info-container` | `text-info-onContainer` |
|
|
75
|
+
|
|
76
|
+
### Utility
|
|
77
|
+
|
|
78
|
+
| CSS variable | Tailwind class | Use for |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| `--schmancy-sys-color-scrim` | `bg-scrim` | Modal/sheet backdrop overlay |
|
|
81
|
+
| `--schmancy-sys-color-shadow` | — | Drop-shadow color (use via `--schmancy-sys-elevation-*` instead of directly) |
|
|
82
|
+
|
|
83
|
+
## Typography tokens
|
|
84
|
+
|
|
85
|
+
15 typescale slots — each combines font-size, line-height, weight, letter-spacing.
|
|
86
|
+
|
|
87
|
+
| CSS variable | Use via `<schmancy-typography>` |
|
|
88
|
+
|---|---|
|
|
89
|
+
| `--schmancy-sys-typescale-display-large` | `preset="display-lg"` or `type="display" token="lg"` |
|
|
90
|
+
| `--schmancy-sys-typescale-display-medium` | `preset="display-md"` |
|
|
91
|
+
| `--schmancy-sys-typescale-display-small` | `preset="display-sm"` |
|
|
92
|
+
| `--schmancy-sys-typescale-headline-large` | `preset="heading-lg"` |
|
|
93
|
+
| `--schmancy-sys-typescale-headline-medium` | `preset="heading-md"` |
|
|
94
|
+
| `--schmancy-sys-typescale-headline-small` | `preset="heading-sm"` |
|
|
95
|
+
| `--schmancy-sys-typescale-title-large` | `preset="title-lg"` |
|
|
96
|
+
| `--schmancy-sys-typescale-title-medium` | `preset="title-md"` |
|
|
97
|
+
| `--schmancy-sys-typescale-title-small` | `preset="title-sm"` |
|
|
98
|
+
| `--schmancy-sys-typescale-body-large` | `preset="body-lg"` |
|
|
99
|
+
| `--schmancy-sys-typescale-body-medium` | `preset="body-md"` |
|
|
100
|
+
| `--schmancy-sys-typescale-body-small` | `preset="body-sm"` |
|
|
101
|
+
| `--schmancy-sys-typescale-label-large` | `preset="label-lg"` |
|
|
102
|
+
| `--schmancy-sys-typescale-label-medium` | `preset="label-md"` |
|
|
103
|
+
| `--schmancy-sys-typescale-label-small` | `preset="label-sm"` or `preset="caption"` |
|
|
104
|
+
|
|
105
|
+
For semantic HTML (heading levels in the accessibility tree) add `as="h1".."h6" | "p" | "span" | "div"`:
|
|
106
|
+
|
|
107
|
+
```html
|
|
108
|
+
<schmancy-typography preset="heading-md" as="h2">Section title</schmancy-typography>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Shape tokens
|
|
112
|
+
|
|
113
|
+
Border-radius scale.
|
|
114
|
+
|
|
115
|
+
| CSS variable | Tailwind class | Default value |
|
|
116
|
+
|---|---|---|
|
|
117
|
+
| `--schmancy-sys-shape-corner-none` | `rounded-none` | 0 |
|
|
118
|
+
| `--schmancy-sys-shape-corner-extraSmall` | `rounded` | 4px |
|
|
119
|
+
| `--schmancy-sys-shape-corner-small` | `rounded-md` | 8px |
|
|
120
|
+
| `--schmancy-sys-shape-corner-medium` | `rounded-lg` | 12px |
|
|
121
|
+
| `--schmancy-sys-shape-corner-large` | `rounded-xl` | 16px |
|
|
122
|
+
| `--schmancy-sys-shape-corner-extraLarge` | `rounded-2xl` | 28px |
|
|
123
|
+
| `--schmancy-sys-shape-corner-full` | `rounded-full` | 9999px |
|
|
124
|
+
|
|
125
|
+
## Spacing tokens
|
|
126
|
+
|
|
127
|
+
12-step spacing scale. Use Tailwind utilities directly (`p-4`, `gap-6`, `mt-2`) — they map to these tokens.
|
|
128
|
+
|
|
129
|
+
| CSS variable | Tailwind |
|
|
130
|
+
|---|---|
|
|
131
|
+
| `--schmancy-sys-spacing-0`..`12` | `p-0` / `p-1` / … / `p-12`, also `m-*`, `gap-*`, `space-y-*` |
|
|
132
|
+
|
|
133
|
+
## Elevation tokens
|
|
134
|
+
|
|
135
|
+
Six elevation tiers (Material 3). Use as a `box-shadow` value.
|
|
136
|
+
|
|
137
|
+
| CSS variable | Tier | Typical use |
|
|
138
|
+
|---|---|---|
|
|
139
|
+
| `--schmancy-sys-elevation-0` | Flat | Default — no shadow |
|
|
140
|
+
| `--schmancy-sys-elevation-1` | +1dp | Outlined cards, raised buttons |
|
|
141
|
+
| `--schmancy-sys-elevation-2` | +3dp | Default cards, app bar |
|
|
142
|
+
| `--schmancy-sys-elevation-3` | +6dp | Default dialog, FAB |
|
|
143
|
+
| `--schmancy-sys-elevation-4` | +8dp | Modal nav drawer |
|
|
144
|
+
| `--schmancy-sys-elevation-5` | +12dp | Lifted dialog, menu hover |
|
|
145
|
+
|
|
146
|
+
## Motion tokens
|
|
147
|
+
|
|
148
|
+
### Durations
|
|
149
|
+
|
|
150
|
+
| CSS variable | Default | Use for |
|
|
151
|
+
|---|---|---|
|
|
152
|
+
| `--schmancy-sys-motion-duration-short1`..`short4` | 50–200ms | Hover states, ripple, tooltip |
|
|
153
|
+
| `--schmancy-sys-motion-duration-medium1`..`medium4` | 250–400ms | Card flip, sheet slide, dialog |
|
|
154
|
+
| `--schmancy-sys-motion-duration-long1`..`long4` | 450–600ms | Full-screen transitions |
|
|
155
|
+
| `--schmancy-sys-motion-duration-extraLong1`..`extraLong4` | 700–1000ms | Hero transitions, splash |
|
|
156
|
+
|
|
157
|
+
### Easings
|
|
158
|
+
|
|
159
|
+
| CSS variable | Use for |
|
|
160
|
+
|---|---|
|
|
161
|
+
| `--schmancy-sys-motion-easing-standard` | Default — most UI transitions |
|
|
162
|
+
| `--schmancy-sys-motion-easing-standard-accelerate` | Element exiting / leaving viewport |
|
|
163
|
+
| `--schmancy-sys-motion-easing-standard-decelerate` | Element entering / arriving |
|
|
164
|
+
| `--schmancy-sys-motion-easing-emphasized` | Emphasized motion (hero) — start slow, end fast then slow |
|
|
165
|
+
| `--schmancy-sys-motion-easing-emphasized-accelerate` | Emphasized exit |
|
|
166
|
+
| `--schmancy-sys-motion-easing-emphasized-decelerate` | Emphasized enter |
|
|
167
|
+
| `--schmancy-sys-motion-easing-linear` | Progress indicators, loading rails |
|
|
168
|
+
| `--schmancy-sys-motion-easing-legacy` | Material 2 cubic-bezier — backwards compatibility only |
|
|
169
|
+
|
|
170
|
+
## State tokens
|
|
171
|
+
|
|
172
|
+
Opacity multipliers for interactive states.
|
|
173
|
+
|
|
174
|
+
| CSS variable | Default | Use for |
|
|
175
|
+
|---|---|---|
|
|
176
|
+
| `--schmancy-sys-state-hover-opacity` | 0.08 | Hover overlay |
|
|
177
|
+
| `--schmancy-sys-state-focus-opacity` | 0.10 | Focus-visible outline / overlay |
|
|
178
|
+
| `--schmancy-sys-state-pressed-opacity` | 0.12 | Active / pressed overlay |
|
|
179
|
+
| `--schmancy-sys-state-dragged-opacity` | 0.16 | Drag handle |
|
|
180
|
+
| `--schmancy-sys-state-disabled-opacity` | 0.38 | Disabled foreground |
|
|
181
|
+
| `--schmancy-sys-state-disabled-container-opacity` | 0.12 | Disabled background |
|
|
182
|
+
|
|
183
|
+
## What to avoid
|
|
184
|
+
|
|
185
|
+
- **`--schmancy-ref-palette-*` tokens.** These are the raw tonal palette (52 tokens — primary-0 through primary-100, etc.) used internally to derive the system tokens above. Never reference them directly; reference the system tokens that wrap them.
|
|
186
|
+
- **Hardcoded hex** anywhere (`#6200ee`, `#ff0000`).
|
|
187
|
+
- **Tailwind arbitrary values** (`bg-[#ff0000]`, `text-[#000]`).
|
|
188
|
+
|
|
189
|
+
Both bypass theming and break when `<schmancy-theme color="…" scheme="…">` regenerates the palette.
|
|
190
|
+
|
|
191
|
+
## Live introspection
|
|
192
|
+
|
|
193
|
+
```js
|
|
194
|
+
window.schmancy.tokens()
|
|
195
|
+
// → string[] — every --schmancy-sys-* property name available at runtime,
|
|
196
|
+
// in the order they were registered. Use this to verify a token exists
|
|
197
|
+
// before referencing it in CSS.
|
|
198
|
+
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as e, t } from "./tailwind.mixin-
|
|
1
|
+
import { a as e, t } from "./tailwind.mixin-mdQR3BEO.js";
|
|
2
2
|
import { t as n } from "./decorate-D_utPUsC.js";
|
|
3
3
|
import "./mixins.js";
|
|
4
|
-
import { t as r } from "./context-
|
|
4
|
+
import { t as r } from "./context-BerzpUhI.js";
|
|
5
5
|
import { BehaviorSubject as i, combineLatest as a, takeUntil as o } from "rxjs";
|
|
6
6
|
import { tap as s } from "rxjs/operators";
|
|
7
7
|
import { customElement as c, property as l, state as u } from "lit/decorators.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons-24zlLf1q.js","names":[],"sources":["../src/icons/icon.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { consume } from '@lit/context'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { BehaviorSubject, combineLatest, takeUntil } from 'rxjs'\nimport { tap } from 'rxjs/operators'\nimport { SchmancyButtonSizeContext, type SchmancyButtonSize } from '../button/context'\n\n/**\n * Icon size tokens - M3 aligned with optical size optimization\n * - xxs: 12px (opsz: 20) - fits in 24px buttons (ultra-compact)\n * - xs: 16px (opsz: 20) - fits in 32px buttons\n * - sm: 20px (opsz: 20) - fits in 40px buttons\n * - md: 24px (opsz: 24) - fits in 48px buttons (default)\n * - lg: 32px (opsz: 40) - fits in 56px buttons\n * - Or custom string like '48px'\n */\nexport type IconSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | string\n\n/**\n * @element schmancy-icon\n * Material Symbols icon component with flexible font variation properties\n *\n * @cssprop --schmancy-icon-size - The size of the icon (default: 24px)\n * @cssprop --schmancy-icon-fill - Fill value for icon (0-1)\n * @cssprop --schmancy-icon-weight - Weight value for icon (100-700)\n * @cssprop --schmancy-icon-grade - Grade value for icon (-50-200)\n * @cssprop --schmancy-icon-opsz - Optical size (default: 24)\n * @csspart icon - The inner `<span>` carrying the Material Symbols glyph.\n */\n@customElement('schmancy-icon')\nexport default class SchmancyIcon extends TailwindElement(css`\n\t:host {\n\t\t--schmancy-icon-size: 24px;\n\t\t--schmancy-icon-fill: 0;\n\t\t--schmancy-icon-weight: 400;\n\t\t--schmancy-icon-grade: 0;\n\t\t--schmancy-icon-opsz: 24;\n\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: var(--schmancy-icon-size);\n\t\theight: var(--schmancy-icon-size);\n\t\tfont-size: var(--schmancy-icon-size);\n\t\tcolor: inherit;\n\t\ttransition: font-variation-settings 0.2s ease;\n\t}\n\n\t.material-symbols {\n\t\tfont-family: var(--schmancy-icon-font, 'Material Symbols Outlined');\n\t\tfont-weight: normal;\n\t\tfont-style: normal;\n\t\tline-height: 1;\n\t\tletter-spacing: normal;\n\t\ttext-transform: none;\n\t\tdisplay: inline-block;\n\t\twhite-space: nowrap;\n\t\tword-wrap: normal;\n\t\tdirection: ltr;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-webkit-font-feature-settings: 'liga';\n\t\tfont-feature-settings: 'liga';\n\t\tfont-variation-settings:\n\t\t\t'FILL' var(--schmancy-icon-fill),\n\t\t\t'wght' var(--schmancy-icon-weight),\n\t\t\t'GRAD' var(--schmancy-icon-grade),\n\t\t\t'opsz' var(--schmancy-icon-opsz);\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t}\n\n\t/* CSS-generated content is NOT translated by Google Translate */\n\t.material-symbols[data-icon]::before {\n\t\tcontent: attr(data-icon);\n\t}\n`) {\n\t// Static flag to track if Google Fonts have been loaded\n\tprivate static fontsLoaded = false\n\n\t/**\n\t * Load Material Symbols fonts from Google Fonts CDN\n\t */\n\tprivate static loadFonts(): void {\n\t\tif (SchmancyIcon.fontsLoaded) {\n\t\t\treturn\n\t\t}\n\n\t\tconst link = document.createElement('link')\n\t\tlink.rel = 'stylesheet'\n\t\tlink.href = 'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&family=Material+Symbols+Sharp:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap'\n\t\tdocument.head.appendChild(link)\n\n\t\tSchmancyIcon.fontsLoaded = true\n\t}\n\n\t/**\n\t * Fill value for the icon (0-1)\n\t * 0 = outlined, 1 = filled\n\t */\n\t@property({ type: Number, reflect: true })\n\tfill = 0\n\n\t/**\n\t * Weight value for the icon (100-700)\n\t * Controls the thickness of the icon strokes\n\t */\n\t@property({ type: Number, reflect: true })\n\tweight = 400\n\n\t/**\n\t * Grade value for the icon (-50-200)\n\t * Adjusts the visual weight/grade\n\t */\n\t@property({ type: Number, reflect: true })\n\tgrade = 0\n\n\t/**\n\t * Icon variant style\n\t * @values outlined | rounded | sharp\n\t */\n\t@property({ type: String, reflect: true })\n\tvariant: 'outlined' | 'rounded' | 'sharp' = 'outlined'\n\n\t/**\n\t * Size of the icon - M3 aligned tokens or custom string\n\t * Tokens: 'xxs' (12px), 'xs' (16px), 'sm' (20px), 'md' (24px), 'lg' (32px)\n\t * Custom: any CSS size string like '48px', '2rem'\n\t *\n\t * When this icon is a descendant of `<schmancy-button>`, the button's\n\t * `size` wins (via `SchmancyButtonSizeContext`). The local `size` only\n\t * applies when there is no ancestor button.\n\t */\n\t@property({ type: String, reflect: true })\n\tsize: IconSize = 'md'\n\n\t/**\n\t * Size inherited from an ancestor `<schmancy-button>` via context.\n\t * Undefined when the icon is not nested in a button.\n\t */\n\t@consume({ context: SchmancyButtonSizeContext, subscribe: true })\n\t@state()\n\tprivate _buttonSize?: SchmancyButtonSize\n\n\t/**\n\t * Icon name - use this instead of slot content to prevent translation breaking icons.\n\t * When set, this takes precedence over slot content.\n\t * Example: <schmancy-icon icon=\"delete\"></schmancy-icon>\n\t */\n\t@property({ type: String })\n\ticon?: string\n\n\t// M3 aligned token sizes with optimal optical sizes\n\tprivate static readonly tokenSizes: Record<string, { size: string; opsz: number }> = {\n\t\txxs: { size: '12px', opsz: 20 }, // fits in 24px buttons (ultra-compact)\n\t\txs: { size: '16px', opsz: 20 }, // fits in 32px buttons\n\t\tsm: { size: '20px', opsz: 20 }, // fits in 40px buttons\n\t\tmd: { size: '24px', opsz: 24 }, // fits in 48px buttons (default)\n\t\tlg: { size: '32px', opsz: 40 }, // fits in 56px buttons\n\t}\n\n\t/** Extract pixel value from a custom size string for optical size */\n\tprivate static computeOpticalSize(size: string): number {\n\t\tconst px = parseFloat(size)\n\t\treturn isNaN(px) ? 24 : Math.max(20, Math.min(48, Math.round(px)))\n\t}\n\n\t// RxJS subjects for reactive property updates\n\tprivate fill$ = new BehaviorSubject(this.fill)\n\tprivate weight$ = new BehaviorSubject(this.weight)\n\tprivate grade$ = new BehaviorSubject(this.grade)\n\tprivate variant$ = new BehaviorSubject(this.variant)\n\n\t// Captured icon name from slot content (translation-proof)\n\t@state()\n\tprivate _capturedIcon?: string\n\n\t// Observer for text content changes (ternaries update text nodes, not DOM structure)\n\tprivate _observer?: MutationObserver\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\n\t\t// Capture initial icon name\n\t\tthis._updateCapturedIcon()\n\n\t\t// Watch for text content changes (characterData) for dynamic icon updates\n\t\tthis._observer = new MutationObserver(() => this._updateCapturedIcon())\n\t\tthis._observer.observe(this, { childList: true, characterData: true, subtree: true })\n\n\t\t// Load Google Fonts if not already loaded\n\t\tSchmancyIcon.loadFonts()\n\n\t\t// Prevent browser translation from breaking icon ligatures\n\t\t// Using multiple methods for maximum compatibility:\n\t\t// - translate=\"no\" (HTML5 standard)\n\t\t// - class=\"notranslate\" (Google Translate specific)\n\t\tthis.setAttribute('translate', 'no')\n\t\tthis.classList.add('notranslate')\n\n\t\t// Set accessibility attributes for decorative icons\n\t\tif (!this.hasAttribute('aria-label') &&\n\t\t !this.hasAttribute('aria-labelledby') &&\n\t\t !this.hasAttribute('aria-hidden') &&\n\t\t !this.hasAttribute('role')) {\n\t\t\tthis.setAttribute('aria-hidden', 'true')\n\t\t}\n\n\t\t// Setup reactive CSS variable updates\n\t\tcombineLatest([\n\t\t\tthis.fill$,\n\t\t\tthis.weight$,\n\t\t\tthis.grade$,\n\t\t\tthis.variant$\n\t\t]).pipe(\n\t\t\ttap(([fill, weight, grade, variant]) => {\n\t\t\t\t// Update CSS custom properties for smooth transitions\n\t\t\t\tthis.style.setProperty('--schmancy-icon-fill', String(fill))\n\t\t\t\tthis.style.setProperty('--schmancy-icon-weight', String(weight))\n\t\t\t\tthis.style.setProperty('--schmancy-icon-grade', String(grade))\n\n\t\t\t\t// Update font family based on variant\n\t\t\t\tconst fontFamily = {\n\t\t\t\t\t'outlined': 'Material Symbols Outlined',\n\t\t\t\t\t'rounded': 'Material Symbols Rounded',\n\t\t\t\t\t'sharp': 'Material Symbols Sharp'\n\t\t\t\t}[variant] || 'Material Symbols Outlined'\n\n\t\t\t\tthis.style.setProperty('--schmancy-icon-font', fontFamily)\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\n\t}\n\n\t/**\n\t * Update captured icon from current text content\n\t */\n\tprivate _updateCapturedIcon(): void {\n\t\tif (!this.icon) {\n\t\t\tconst textContent = this.textContent?.trim()\n\t\t\tif (textContent && textContent !== this._capturedIcon) {\n\t\t\t\tthis._capturedIcon = textContent\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected updated(changedProperties: Map<string | number | symbol, unknown>): void {\n\t\tsuper.updated(changedProperties)\n\n\t\t// Update BehaviorSubjects when properties change\n\t\tif (changedProperties.has('fill')) {\n\t\t\tthis.fill$.next(this.fill)\n\t\t}\n\t\tif (changedProperties.has('weight')) {\n\t\t\tthis.weight$.next(this.weight)\n\t\t}\n\t\tif (changedProperties.has('grade')) {\n\t\t\tthis.grade$.next(this.grade)\n\t\t}\n\t\tif (changedProperties.has('variant')) {\n\t\t\tthis.variant$.next(this.variant)\n\t\t}\n\t}\n\n\tprotected render(): unknown {\n\t\tconst fontFamily = {\n\t\t\t'outlined': 'Material Symbols Outlined',\n\t\t\t'rounded': 'Material Symbols Rounded',\n\t\t\t'sharp': 'Material Symbols Sharp'\n\t\t}[this.variant] || 'Material Symbols Outlined'\n\n\t\t// Effective size: ancestor `<schmancy-button>` wins via context, else local `size`.\n\t\tconst effectiveSize: IconSize = this._buttonSize ?? this.size\n\t\t// Resolve size: token → px, bare number → px, or pass through as-is\n\t\tconst sizeConfig = SchmancyIcon.tokenSizes[effectiveSize]\n\t\tconst isNumeric = !sizeConfig && /^\\d+(\\.\\d+)?$/.test(effectiveSize)\n\t\tconst iconSize = sizeConfig?.size || (isNumeric ? `${effectiveSize}px` : effectiveSize)\n\t\tconst opticalSize = sizeConfig?.opsz || SchmancyIcon.computeOpticalSize(iconSize)\n\n\t\t// Set size on HOST so :host CSS picks it up\n\t\tthis.style.setProperty('--schmancy-icon-size', iconSize)\n\t\tthis.style.setProperty('--schmancy-icon-opsz', String(opticalSize))\n\n\t\tconst style = {\n\t\t\t'--schmancy-icon-fill': this.fill,\n\t\t\t'--schmancy-icon-weight': this.weight,\n\t\t\t'--schmancy-icon-grade': this.grade,\n\t\t\t'--schmancy-icon-font': fontFamily,\n\t\t}\n\n\t\t// Priority: icon property > captured icon (for dynamic content)\n\t\tconst iconName = this.icon || this._capturedIcon\n\n\t\t// Always render slot (hidden) to observe content changes, display via data-icon\n\t\treturn html`\n\t\t\t<span class=\"material-symbols notranslate\" part=\"icon\" translate=\"no\" data-icon=${iconName || ''} style=${this.styleMap(style)}></span>\n\t\t\t<slot style=\"display:none\"></slot>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-icon': SchmancyIcon\n\t}\n}"],"mappings":";;;;;;;;OA+Be,IAAA,cAA2B,EAAgB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAyErD,GAAA,KAAA,SAOE,KAAA,KAAA,QAOD,GAAA,KAAA,UAOoC,YAAA,KAAA,OAY3B,MAAA,KAAA,QAkCD,IAAI,EAAgB,KAAK,KAAA,EAAA,KAAA,UACvB,IAAI,EAAgB,KAAK,OAAA,EAAA,KAAA,SAC1B,IAAI,EAAgB,KAAK,MAAA,EAAA,KAAA,WACvB,IAAI,EAAgB,KAAK,QAAA;;CAAA;AAAA,OAAA,cAAA,CA7Ff;;CAK7B,OAAA,YAAe;AACd,MAAA,EAAiB,YAChB;EAGD,IAAM,IAAO,SAAS,cAAc,OAAA;AACpC,I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AAE,MAAM;CAAQ,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,UAAA,KAAA,EAAA,EAAA,EAAA,CAOzC,EAAS;CAAE,MAAM;CAAQ,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,SAAA,KAAA,EAAA,EAAA,EAAA,CAOzC,EAAS;CAAE,MAAM;CAAQ,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,WAAA,KAAA,EAAA,EAAA,EAAA,CAYzC,EAAS;CAAE,MAAM;CAAQ,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAOzC,EAAQ;CAAE,SAAS;CAA2B,WAAA,CAAW;CAAA,CAAA,EACzD,GAAA,CAAA,EAAO,EAAA,WAAA,eAAA,KAAA,EAAA,EAAA,EAAA,CAQP,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAyB1B,GAAA,CAAA,EAAO,EAAA,WAAA,iBAAA,KAAA,EAAA,EAAA,IAAA,IAAA,EAAA,CAnJR,EAAc,gBAAA,CAAA,EAAgB,EAAA"}
|
|
1
|
+
{"version":3,"file":"icons-Drq4kKy2.js","names":[],"sources":["../src/icons/icon.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { consume } from '@lit/context'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { BehaviorSubject, combineLatest, takeUntil } from 'rxjs'\nimport { tap } from 'rxjs/operators'\nimport { SchmancyButtonSizeContext, type SchmancyButtonSize } from '../button/context'\n\n/**\n * Icon size tokens - M3 aligned with optical size optimization\n * - xxs: 12px (opsz: 20) - fits in 24px buttons (ultra-compact)\n * - xs: 16px (opsz: 20) - fits in 32px buttons\n * - sm: 20px (opsz: 20) - fits in 40px buttons\n * - md: 24px (opsz: 24) - fits in 48px buttons (default)\n * - lg: 32px (opsz: 40) - fits in 56px buttons\n * - Or custom string like '48px'\n */\nexport type IconSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | string\n\n/**\n * @element schmancy-icon\n * Material Symbols icon component with flexible font variation properties\n *\n * @cssprop --schmancy-icon-size - The size of the icon (default: 24px)\n * @cssprop --schmancy-icon-fill - Fill value for icon (0-1)\n * @cssprop --schmancy-icon-weight - Weight value for icon (100-700)\n * @cssprop --schmancy-icon-grade - Grade value for icon (-50-200)\n * @cssprop --schmancy-icon-opsz - Optical size (default: 24)\n * @csspart icon - The inner `<span>` carrying the Material Symbols glyph.\n */\n@customElement('schmancy-icon')\nexport default class SchmancyIcon extends TailwindElement(css`\n\t:host {\n\t\t--schmancy-icon-size: 24px;\n\t\t--schmancy-icon-fill: 0;\n\t\t--schmancy-icon-weight: 400;\n\t\t--schmancy-icon-grade: 0;\n\t\t--schmancy-icon-opsz: 24;\n\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: var(--schmancy-icon-size);\n\t\theight: var(--schmancy-icon-size);\n\t\tfont-size: var(--schmancy-icon-size);\n\t\tcolor: inherit;\n\t\ttransition: font-variation-settings 0.2s ease;\n\t}\n\n\t.material-symbols {\n\t\tfont-family: var(--schmancy-icon-font, 'Material Symbols Outlined');\n\t\tfont-weight: normal;\n\t\tfont-style: normal;\n\t\tline-height: 1;\n\t\tletter-spacing: normal;\n\t\ttext-transform: none;\n\t\tdisplay: inline-block;\n\t\twhite-space: nowrap;\n\t\tword-wrap: normal;\n\t\tdirection: ltr;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-webkit-font-feature-settings: 'liga';\n\t\tfont-feature-settings: 'liga';\n\t\tfont-variation-settings:\n\t\t\t'FILL' var(--schmancy-icon-fill),\n\t\t\t'wght' var(--schmancy-icon-weight),\n\t\t\t'GRAD' var(--schmancy-icon-grade),\n\t\t\t'opsz' var(--schmancy-icon-opsz);\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t}\n\n\t/* CSS-generated content is NOT translated by Google Translate */\n\t.material-symbols[data-icon]::before {\n\t\tcontent: attr(data-icon);\n\t}\n`) {\n\t// Static flag to track if Google Fonts have been loaded\n\tprivate static fontsLoaded = false\n\n\t/**\n\t * Load Material Symbols fonts from Google Fonts CDN\n\t */\n\tprivate static loadFonts(): void {\n\t\tif (SchmancyIcon.fontsLoaded) {\n\t\t\treturn\n\t\t}\n\n\t\tconst link = document.createElement('link')\n\t\tlink.rel = 'stylesheet'\n\t\tlink.href = 'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&family=Material+Symbols+Sharp:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap'\n\t\tdocument.head.appendChild(link)\n\n\t\tSchmancyIcon.fontsLoaded = true\n\t}\n\n\t/**\n\t * Fill value for the icon (0-1)\n\t * 0 = outlined, 1 = filled\n\t */\n\t@property({ type: Number, reflect: true })\n\tfill = 0\n\n\t/**\n\t * Weight value for the icon (100-700)\n\t * Controls the thickness of the icon strokes\n\t */\n\t@property({ type: Number, reflect: true })\n\tweight = 400\n\n\t/**\n\t * Grade value for the icon (-50-200)\n\t * Adjusts the visual weight/grade\n\t */\n\t@property({ type: Number, reflect: true })\n\tgrade = 0\n\n\t/**\n\t * Icon variant style\n\t * @values outlined | rounded | sharp\n\t */\n\t@property({ type: String, reflect: true })\n\tvariant: 'outlined' | 'rounded' | 'sharp' = 'outlined'\n\n\t/**\n\t * Size of the icon - M3 aligned tokens or custom string\n\t * Tokens: 'xxs' (12px), 'xs' (16px), 'sm' (20px), 'md' (24px), 'lg' (32px)\n\t * Custom: any CSS size string like '48px', '2rem'\n\t *\n\t * When this icon is a descendant of `<schmancy-button>`, the button's\n\t * `size` wins (via `SchmancyButtonSizeContext`). The local `size` only\n\t * applies when there is no ancestor button.\n\t */\n\t@property({ type: String, reflect: true })\n\tsize: IconSize = 'md'\n\n\t/**\n\t * Size inherited from an ancestor `<schmancy-button>` via context.\n\t * Undefined when the icon is not nested in a button.\n\t */\n\t@consume({ context: SchmancyButtonSizeContext, subscribe: true })\n\t@state()\n\tprivate _buttonSize?: SchmancyButtonSize\n\n\t/**\n\t * Icon name - use this instead of slot content to prevent translation breaking icons.\n\t * When set, this takes precedence over slot content.\n\t * Example: <schmancy-icon icon=\"delete\"></schmancy-icon>\n\t */\n\t@property({ type: String })\n\ticon?: string\n\n\t// M3 aligned token sizes with optimal optical sizes\n\tprivate static readonly tokenSizes: Record<string, { size: string; opsz: number }> = {\n\t\txxs: { size: '12px', opsz: 20 }, // fits in 24px buttons (ultra-compact)\n\t\txs: { size: '16px', opsz: 20 }, // fits in 32px buttons\n\t\tsm: { size: '20px', opsz: 20 }, // fits in 40px buttons\n\t\tmd: { size: '24px', opsz: 24 }, // fits in 48px buttons (default)\n\t\tlg: { size: '32px', opsz: 40 }, // fits in 56px buttons\n\t}\n\n\t/** Extract pixel value from a custom size string for optical size */\n\tprivate static computeOpticalSize(size: string): number {\n\t\tconst px = parseFloat(size)\n\t\treturn isNaN(px) ? 24 : Math.max(20, Math.min(48, Math.round(px)))\n\t}\n\n\t// RxJS subjects for reactive property updates\n\tprivate fill$ = new BehaviorSubject(this.fill)\n\tprivate weight$ = new BehaviorSubject(this.weight)\n\tprivate grade$ = new BehaviorSubject(this.grade)\n\tprivate variant$ = new BehaviorSubject(this.variant)\n\n\t// Captured icon name from slot content (translation-proof)\n\t@state()\n\tprivate _capturedIcon?: string\n\n\t// Observer for text content changes (ternaries update text nodes, not DOM structure)\n\tprivate _observer?: MutationObserver\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\n\t\t// Capture initial icon name\n\t\tthis._updateCapturedIcon()\n\n\t\t// Watch for text content changes (characterData) for dynamic icon updates\n\t\tthis._observer = new MutationObserver(() => this._updateCapturedIcon())\n\t\tthis._observer.observe(this, { childList: true, characterData: true, subtree: true })\n\n\t\t// Load Google Fonts if not already loaded\n\t\tSchmancyIcon.loadFonts()\n\n\t\t// Prevent browser translation from breaking icon ligatures\n\t\t// Using multiple methods for maximum compatibility:\n\t\t// - translate=\"no\" (HTML5 standard)\n\t\t// - class=\"notranslate\" (Google Translate specific)\n\t\tthis.setAttribute('translate', 'no')\n\t\tthis.classList.add('notranslate')\n\n\t\t// Set accessibility attributes for decorative icons\n\t\tif (!this.hasAttribute('aria-label') &&\n\t\t !this.hasAttribute('aria-labelledby') &&\n\t\t !this.hasAttribute('aria-hidden') &&\n\t\t !this.hasAttribute('role')) {\n\t\t\tthis.setAttribute('aria-hidden', 'true')\n\t\t}\n\n\t\t// Setup reactive CSS variable updates\n\t\tcombineLatest([\n\t\t\tthis.fill$,\n\t\t\tthis.weight$,\n\t\t\tthis.grade$,\n\t\t\tthis.variant$\n\t\t]).pipe(\n\t\t\ttap(([fill, weight, grade, variant]) => {\n\t\t\t\t// Update CSS custom properties for smooth transitions\n\t\t\t\tthis.style.setProperty('--schmancy-icon-fill', String(fill))\n\t\t\t\tthis.style.setProperty('--schmancy-icon-weight', String(weight))\n\t\t\t\tthis.style.setProperty('--schmancy-icon-grade', String(grade))\n\n\t\t\t\t// Update font family based on variant\n\t\t\t\tconst fontFamily = {\n\t\t\t\t\t'outlined': 'Material Symbols Outlined',\n\t\t\t\t\t'rounded': 'Material Symbols Rounded',\n\t\t\t\t\t'sharp': 'Material Symbols Sharp'\n\t\t\t\t}[variant] || 'Material Symbols Outlined'\n\n\t\t\t\tthis.style.setProperty('--schmancy-icon-font', fontFamily)\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\n\t}\n\n\t/**\n\t * Update captured icon from current text content\n\t */\n\tprivate _updateCapturedIcon(): void {\n\t\tif (!this.icon) {\n\t\t\tconst textContent = this.textContent?.trim()\n\t\t\tif (textContent && textContent !== this._capturedIcon) {\n\t\t\t\tthis._capturedIcon = textContent\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected updated(changedProperties: Map<string | number | symbol, unknown>): void {\n\t\tsuper.updated(changedProperties)\n\n\t\t// Update BehaviorSubjects when properties change\n\t\tif (changedProperties.has('fill')) {\n\t\t\tthis.fill$.next(this.fill)\n\t\t}\n\t\tif (changedProperties.has('weight')) {\n\t\t\tthis.weight$.next(this.weight)\n\t\t}\n\t\tif (changedProperties.has('grade')) {\n\t\t\tthis.grade$.next(this.grade)\n\t\t}\n\t\tif (changedProperties.has('variant')) {\n\t\t\tthis.variant$.next(this.variant)\n\t\t}\n\t}\n\n\tprotected render(): unknown {\n\t\tconst fontFamily = {\n\t\t\t'outlined': 'Material Symbols Outlined',\n\t\t\t'rounded': 'Material Symbols Rounded',\n\t\t\t'sharp': 'Material Symbols Sharp'\n\t\t}[this.variant] || 'Material Symbols Outlined'\n\n\t\t// Effective size: ancestor `<schmancy-button>` wins via context, else local `size`.\n\t\tconst effectiveSize: IconSize = this._buttonSize ?? this.size\n\t\t// Resolve size: token → px, bare number → px, or pass through as-is\n\t\tconst sizeConfig = SchmancyIcon.tokenSizes[effectiveSize]\n\t\tconst isNumeric = !sizeConfig && /^\\d+(\\.\\d+)?$/.test(effectiveSize)\n\t\tconst iconSize = sizeConfig?.size || (isNumeric ? `${effectiveSize}px` : effectiveSize)\n\t\tconst opticalSize = sizeConfig?.opsz || SchmancyIcon.computeOpticalSize(iconSize)\n\n\t\t// Set size on HOST so :host CSS picks it up\n\t\tthis.style.setProperty('--schmancy-icon-size', iconSize)\n\t\tthis.style.setProperty('--schmancy-icon-opsz', String(opticalSize))\n\n\t\tconst style = {\n\t\t\t'--schmancy-icon-fill': this.fill,\n\t\t\t'--schmancy-icon-weight': this.weight,\n\t\t\t'--schmancy-icon-grade': this.grade,\n\t\t\t'--schmancy-icon-font': fontFamily,\n\t\t}\n\n\t\t// Priority: icon property > captured icon (for dynamic content)\n\t\tconst iconName = this.icon || this._capturedIcon\n\n\t\t// Always render slot (hidden) to observe content changes, display via data-icon\n\t\treturn html`\n\t\t\t<span class=\"material-symbols notranslate\" part=\"icon\" translate=\"no\" data-icon=${iconName || ''} style=${this.styleMap(style)}></span>\n\t\t\t<slot style=\"display:none\"></slot>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-icon': SchmancyIcon\n\t}\n}"],"mappings":";;;;;;;;OA+Be,IAAA,cAA2B,EAAgB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAyErD,GAAA,KAAA,SAOE,KAAA,KAAA,QAOD,GAAA,KAAA,UAOoC,YAAA,KAAA,OAY3B,MAAA,KAAA,QAkCD,IAAI,EAAgB,KAAK,KAAA,EAAA,KAAA,UACvB,IAAI,EAAgB,KAAK,OAAA,EAAA,KAAA,SAC1B,IAAI,EAAgB,KAAK,MAAA,EAAA,KAAA,WACvB,IAAI,EAAgB,KAAK,QAAA;;CAAA;AAAA,OAAA,cAAA,CA7Ff;;CAK7B,OAAA,YAAe;AACd,MAAA,EAAiB,YAChB;EAGD,IAAM,IAAO,SAAS,cAAc,OAAA;AACpC,IAAK,MAAM,cACX,EAAK,OAAO,uSACZ,SAAS,KAAK,YAAY,EAAA,EAE1B,EAAa,cAAA,CAAc;;CAAA;AAAA,OAAA,aA4DyD;GACpF,KAAK;IAAE,MAAM;IAAQ,MAAM;IAAA;GAC3B,IAAI;IAAE,MAAM;IAAQ,MAAM;IAAA;GAC1B,IAAI;IAAE,MAAM;IAAQ,MAAM;IAAA;GAC1B,IAAI;IAAE,MAAM;IAAQ,MAAM;IAAA;GAC1B,IAAI;IAAE,MAAM;IAAQ,MAAM;IAAA;GAAA;;CAI3B,OAAA,mBAAkC,GAAA;EACjC,IAAM,IAAK,WAAW,EAAA;AACtB,SAAO,MAAM,EAAA,GAAM,KAAK,KAAK,IAAI,IAAI,KAAK,IAA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WAAA,CAAW;CAAA,CAAA,EACzD,GAAA,CAAA,EAAO,EAAA,WAAA,eAAA,KAAA,EAAA,EAAA,EAAA,CAQP,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAyB1B,GAAA,CAAA,EAAO,EAAA,WAAA,iBAAA,KAAA,EAAA,EAAA,IAAA,IAAA,EAAA,CAnJR,EAAc,gBAAA,CAAA,EAAgB,EAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-
|
|
1
|
+
require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-DRI1oTYQ.cjs`),t=require(`./decorate-F9CuyeHg.cjs`);require(`./mixins.cjs`);const n=require(`./context-C6dHUHhi.cjs`);let r=require(`rxjs`),i=require(`rxjs/operators`),a=require(`lit/decorators.js`),o=require(`lit`);var s,c=class extends e.t(o.css`
|
|
2
2
|
:host {
|
|
3
3
|
--schmancy-icon-size: 24px;
|
|
4
4
|
--schmancy-icon-fill: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons-BpHN4Z8q.cjs","names":[],"sources":["../src/icons/icon.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { consume } from '@lit/context'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { BehaviorSubject, combineLatest, takeUntil } from 'rxjs'\nimport { tap } from 'rxjs/operators'\nimport { SchmancyButtonSizeContext, type SchmancyButtonSize } from '../button/context'\n\n/**\n * Icon size tokens - M3 aligned with optical size optimization\n * - xxs: 12px (opsz: 20) - fits in 24px buttons (ultra-compact)\n * - xs: 16px (opsz: 20) - fits in 32px buttons\n * - sm: 20px (opsz: 20) - fits in 40px buttons\n * - md: 24px (opsz: 24) - fits in 48px buttons (default)\n * - lg: 32px (opsz: 40) - fits in 56px buttons\n * - Or custom string like '48px'\n */\nexport type IconSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | string\n\n/**\n * @element schmancy-icon\n * Material Symbols icon component with flexible font variation properties\n *\n * @cssprop --schmancy-icon-size - The size of the icon (default: 24px)\n * @cssprop --schmancy-icon-fill - Fill value for icon (0-1)\n * @cssprop --schmancy-icon-weight - Weight value for icon (100-700)\n * @cssprop --schmancy-icon-grade - Grade value for icon (-50-200)\n * @cssprop --schmancy-icon-opsz - Optical size (default: 24)\n * @csspart icon - The inner `<span>` carrying the Material Symbols glyph.\n */\n@customElement('schmancy-icon')\nexport default class SchmancyIcon extends TailwindElement(css`\n\t:host {\n\t\t--schmancy-icon-size: 24px;\n\t\t--schmancy-icon-fill: 0;\n\t\t--schmancy-icon-weight: 400;\n\t\t--schmancy-icon-grade: 0;\n\t\t--schmancy-icon-opsz: 24;\n\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: var(--schmancy-icon-size);\n\t\theight: var(--schmancy-icon-size);\n\t\tfont-size: var(--schmancy-icon-size);\n\t\tcolor: inherit;\n\t\ttransition: font-variation-settings 0.2s ease;\n\t}\n\n\t.material-symbols {\n\t\tfont-family: var(--schmancy-icon-font, 'Material Symbols Outlined');\n\t\tfont-weight: normal;\n\t\tfont-style: normal;\n\t\tline-height: 1;\n\t\tletter-spacing: normal;\n\t\ttext-transform: none;\n\t\tdisplay: inline-block;\n\t\twhite-space: nowrap;\n\t\tword-wrap: normal;\n\t\tdirection: ltr;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-webkit-font-feature-settings: 'liga';\n\t\tfont-feature-settings: 'liga';\n\t\tfont-variation-settings:\n\t\t\t'FILL' var(--schmancy-icon-fill),\n\t\t\t'wght' var(--schmancy-icon-weight),\n\t\t\t'GRAD' var(--schmancy-icon-grade),\n\t\t\t'opsz' var(--schmancy-icon-opsz);\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t}\n\n\t/* CSS-generated content is NOT translated by Google Translate */\n\t.material-symbols[data-icon]::before {\n\t\tcontent: attr(data-icon);\n\t}\n`) {\n\t// Static flag to track if Google Fonts have been loaded\n\tprivate static fontsLoaded = false\n\n\t/**\n\t * Load Material Symbols fonts from Google Fonts CDN\n\t */\n\tprivate static loadFonts(): void {\n\t\tif (SchmancyIcon.fontsLoaded) {\n\t\t\treturn\n\t\t}\n\n\t\tconst link = document.createElement('link')\n\t\tlink.rel = 'stylesheet'\n\t\tlink.href = 'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&family=Material+Symbols+Sharp:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap'\n\t\tdocument.head.appendChild(link)\n\n\t\tSchmancyIcon.fontsLoaded = true\n\t}\n\n\t/**\n\t * Fill value for the icon (0-1)\n\t * 0 = outlined, 1 = filled\n\t */\n\t@property({ type: Number, reflect: true })\n\tfill = 0\n\n\t/**\n\t * Weight value for the icon (100-700)\n\t * Controls the thickness of the icon strokes\n\t */\n\t@property({ type: Number, reflect: true })\n\tweight = 400\n\n\t/**\n\t * Grade value for the icon (-50-200)\n\t * Adjusts the visual weight/grade\n\t */\n\t@property({ type: Number, reflect: true })\n\tgrade = 0\n\n\t/**\n\t * Icon variant style\n\t * @values outlined | rounded | sharp\n\t */\n\t@property({ type: String, reflect: true })\n\tvariant: 'outlined' | 'rounded' | 'sharp' = 'outlined'\n\n\t/**\n\t * Size of the icon - M3 aligned tokens or custom string\n\t * Tokens: 'xxs' (12px), 'xs' (16px), 'sm' (20px), 'md' (24px), 'lg' (32px)\n\t * Custom: any CSS size string like '48px', '2rem'\n\t *\n\t * When this icon is a descendant of `<schmancy-button>`, the button's\n\t * `size` wins (via `SchmancyButtonSizeContext`). The local `size` only\n\t * applies when there is no ancestor button.\n\t */\n\t@property({ type: String, reflect: true })\n\tsize: IconSize = 'md'\n\n\t/**\n\t * Size inherited from an ancestor `<schmancy-button>` via context.\n\t * Undefined when the icon is not nested in a button.\n\t */\n\t@consume({ context: SchmancyButtonSizeContext, subscribe: true })\n\t@state()\n\tprivate _buttonSize?: SchmancyButtonSize\n\n\t/**\n\t * Icon name - use this instead of slot content to prevent translation breaking icons.\n\t * When set, this takes precedence over slot content.\n\t * Example: <schmancy-icon icon=\"delete\"></schmancy-icon>\n\t */\n\t@property({ type: String })\n\ticon?: string\n\n\t// M3 aligned token sizes with optimal optical sizes\n\tprivate static readonly tokenSizes: Record<string, { size: string; opsz: number }> = {\n\t\txxs: { size: '12px', opsz: 20 }, // fits in 24px buttons (ultra-compact)\n\t\txs: { size: '16px', opsz: 20 }, // fits in 32px buttons\n\t\tsm: { size: '20px', opsz: 20 }, // fits in 40px buttons\n\t\tmd: { size: '24px', opsz: 24 }, // fits in 48px buttons (default)\n\t\tlg: { size: '32px', opsz: 40 }, // fits in 56px buttons\n\t}\n\n\t/** Extract pixel value from a custom size string for optical size */\n\tprivate static computeOpticalSize(size: string): number {\n\t\tconst px = parseFloat(size)\n\t\treturn isNaN(px) ? 24 : Math.max(20, Math.min(48, Math.round(px)))\n\t}\n\n\t// RxJS subjects for reactive property updates\n\tprivate fill$ = new BehaviorSubject(this.fill)\n\tprivate weight$ = new BehaviorSubject(this.weight)\n\tprivate grade$ = new BehaviorSubject(this.grade)\n\tprivate variant$ = new BehaviorSubject(this.variant)\n\n\t// Captured icon name from slot content (translation-proof)\n\t@state()\n\tprivate _capturedIcon?: string\n\n\t// Observer for text content changes (ternaries update text nodes, not DOM structure)\n\tprivate _observer?: MutationObserver\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\n\t\t// Capture initial icon name\n\t\tthis._updateCapturedIcon()\n\n\t\t// Watch for text content changes (characterData) for dynamic icon updates\n\t\tthis._observer = new MutationObserver(() => this._updateCapturedIcon())\n\t\tthis._observer.observe(this, { childList: true, characterData: true, subtree: true })\n\n\t\t// Load Google Fonts if not already loaded\n\t\tSchmancyIcon.loadFonts()\n\n\t\t// Prevent browser translation from breaking icon ligatures\n\t\t// Using multiple methods for maximum compatibility:\n\t\t// - translate=\"no\" (HTML5 standard)\n\t\t// - class=\"notranslate\" (Google Translate specific)\n\t\tthis.setAttribute('translate', 'no')\n\t\tthis.classList.add('notranslate')\n\n\t\t// Set accessibility attributes for decorative icons\n\t\tif (!this.hasAttribute('aria-label') &&\n\t\t !this.hasAttribute('aria-labelledby') &&\n\t\t !this.hasAttribute('aria-hidden') &&\n\t\t !this.hasAttribute('role')) {\n\t\t\tthis.setAttribute('aria-hidden', 'true')\n\t\t}\n\n\t\t// Setup reactive CSS variable updates\n\t\tcombineLatest([\n\t\t\tthis.fill$,\n\t\t\tthis.weight$,\n\t\t\tthis.grade$,\n\t\t\tthis.variant$\n\t\t]).pipe(\n\t\t\ttap(([fill, weight, grade, variant]) => {\n\t\t\t\t// Update CSS custom properties for smooth transitions\n\t\t\t\tthis.style.setProperty('--schmancy-icon-fill', String(fill))\n\t\t\t\tthis.style.setProperty('--schmancy-icon-weight', String(weight))\n\t\t\t\tthis.style.setProperty('--schmancy-icon-grade', String(grade))\n\n\t\t\t\t// Update font family based on variant\n\t\t\t\tconst fontFamily = {\n\t\t\t\t\t'outlined': 'Material Symbols Outlined',\n\t\t\t\t\t'rounded': 'Material Symbols Rounded',\n\t\t\t\t\t'sharp': 'Material Symbols Sharp'\n\t\t\t\t}[variant] || 'Material Symbols Outlined'\n\n\t\t\t\tthis.style.setProperty('--schmancy-icon-font', fontFamily)\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\n\t}\n\n\t/**\n\t * Update captured icon from current text content\n\t */\n\tprivate _updateCapturedIcon(): void {\n\t\tif (!this.icon) {\n\t\t\tconst textContent = this.textContent?.trim()\n\t\t\tif (textContent && textContent !== this._capturedIcon) {\n\t\t\t\tthis._capturedIcon = textContent\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected updated(changedProperties: Map<string | number | symbol, unknown>): void {\n\t\tsuper.updated(changedProperties)\n\n\t\t// Update BehaviorSubjects when properties change\n\t\tif (changedProperties.has('fill')) {\n\t\t\tthis.fill$.next(this.fill)\n\t\t}\n\t\tif (changedProperties.has('weight')) {\n\t\t\tthis.weight$.next(this.weight)\n\t\t}\n\t\tif (changedProperties.has('grade')) {\n\t\t\tthis.grade$.next(this.grade)\n\t\t}\n\t\tif (changedProperties.has('variant')) {\n\t\t\tthis.variant$.next(this.variant)\n\t\t}\n\t}\n\n\tprotected render(): unknown {\n\t\tconst fontFamily = {\n\t\t\t'outlined': 'Material Symbols Outlined',\n\t\t\t'rounded': 'Material Symbols Rounded',\n\t\t\t'sharp': 'Material Symbols Sharp'\n\t\t}[this.variant] || 'Material Symbols Outlined'\n\n\t\t// Effective size: ancestor `<schmancy-button>` wins via context, else local `size`.\n\t\tconst effectiveSize: IconSize = this._buttonSize ?? this.size\n\t\t// Resolve size: token → px, bare number → px, or pass through as-is\n\t\tconst sizeConfig = SchmancyIcon.tokenSizes[effectiveSize]\n\t\tconst isNumeric = !sizeConfig && /^\\d+(\\.\\d+)?$/.test(effectiveSize)\n\t\tconst iconSize = sizeConfig?.size || (isNumeric ? `${effectiveSize}px` : effectiveSize)\n\t\tconst opticalSize = sizeConfig?.opsz || SchmancyIcon.computeOpticalSize(iconSize)\n\n\t\t// Set size on HOST so :host CSS picks it up\n\t\tthis.style.setProperty('--schmancy-icon-size', iconSize)\n\t\tthis.style.setProperty('--schmancy-icon-opsz', String(opticalSize))\n\n\t\tconst style = {\n\t\t\t'--schmancy-icon-fill': this.fill,\n\t\t\t'--schmancy-icon-weight': this.weight,\n\t\t\t'--schmancy-icon-grade': this.grade,\n\t\t\t'--schmancy-icon-font': fontFamily,\n\t\t}\n\n\t\t// Priority: icon property > captured icon (for dynamic content)\n\t\tconst iconName = this.icon || this._capturedIcon\n\n\t\t// Always render slot (hidden) to observe content changes, display via data-icon\n\t\treturn html`\n\t\t\t<span class=\"material-symbols notranslate\" part=\"icon\" translate=\"no\" data-icon=${iconName || ''} style=${this.styleMap(style)}></span>\n\t\t\t<slot style=\"display:none\"></slot>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-icon': SchmancyIcon\n\t}\n}"],"mappings":"gSA+Be,EAAA,cAA2B,EAAA,EAAgB,EAAA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yDAyErD,EAAA,KAAA,OAOE,IAAA,KAAA,MAOD,EAAA,KAAA,QAOoC,WAAA,KAAA,KAY3B,KAAA,KAAA,MAkCD,IAAI,EAAA,gBAAgB,KAAK,KAAA,CAAA,KAAA,QACvB,IAAI,EAAA,gBAAgB,KAAK,OAAA,CAAA,KAAA,OAC1B,IAAI,EAAA,gBAAgB,KAAK,MAAA,CAAA,KAAA,SACvB,IAAI,EAAA,gBAAgB,KAAK,QAAA,CAAA,OAAA,KAAA,YAAA,CA7Ff,EAK7B,OAAA,WAAe,CACd,GAAA,EAAiB,YAChB,OAGD,IAAM,EAAO,SAAS,cAAc,OAAA,CACpC,EAAK,IAAM,aACX,EAAK,KAAO,sSACZ,SAAS,KAAK,YAAY,EAAA,CAE1B,EAAa,YAAA,CAAc,EAAA,OAAA,KAAA,WA4DyD,CACpF,IAAK,CAAE,KAAM,OAAQ,KAAM,GAAA,CAC3B,GAAI,CAAE,KAAM,OAAQ,KAAM,GAAA,CAC1B,GAAI,CAAE,KAAM,OAAQ,KAAM,GAAA,CAC1B,GAAI,CAAE,KAAM,OAAQ,KAAM,GAAA,CAC1B,GAAI,CAAE,KAAM,OAAQ,KAAM,GAAA,CAAA,CAI3B,OAAA,mBAAkC,EAAA,CACjC,IAAM,EAAK,WAAW,EAAA,CACtB,OAAO,MAAM,EAAA,CAAM,GAAK,KAAK,IAAI,GAAI,KAAK,IAAI,GAAI,KAAK,MAAM,EA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,CAAO,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,CAOzC,EAAA,EAAQ,CAAE,QAAS,EAAA,EAA2B,UAAA,CAAW,EAAA,CAAA,EAAO,EAAA,EAAA,QAAA,CAAA,CACzD,EAAA,UAAA,cAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAQE,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,QAAA,CAAA,CAyBnB,EAAA,UAAA,gBAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAnJM,gBAAA,CAAA,CAAgB,EAAA"}
|
|
1
|
+
{"version":3,"file":"icons-DtdhaZdc.cjs","names":[],"sources":["../src/icons/icon.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { consume } from '@lit/context'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { BehaviorSubject, combineLatest, takeUntil } from 'rxjs'\nimport { tap } from 'rxjs/operators'\nimport { SchmancyButtonSizeContext, type SchmancyButtonSize } from '../button/context'\n\n/**\n * Icon size tokens - M3 aligned with optical size optimization\n * - xxs: 12px (opsz: 20) - fits in 24px buttons (ultra-compact)\n * - xs: 16px (opsz: 20) - fits in 32px buttons\n * - sm: 20px (opsz: 20) - fits in 40px buttons\n * - md: 24px (opsz: 24) - fits in 48px buttons (default)\n * - lg: 32px (opsz: 40) - fits in 56px buttons\n * - Or custom string like '48px'\n */\nexport type IconSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | string\n\n/**\n * @element schmancy-icon\n * Material Symbols icon component with flexible font variation properties\n *\n * @cssprop --schmancy-icon-size - The size of the icon (default: 24px)\n * @cssprop --schmancy-icon-fill - Fill value for icon (0-1)\n * @cssprop --schmancy-icon-weight - Weight value for icon (100-700)\n * @cssprop --schmancy-icon-grade - Grade value for icon (-50-200)\n * @cssprop --schmancy-icon-opsz - Optical size (default: 24)\n * @csspart icon - The inner `<span>` carrying the Material Symbols glyph.\n */\n@customElement('schmancy-icon')\nexport default class SchmancyIcon extends TailwindElement(css`\n\t:host {\n\t\t--schmancy-icon-size: 24px;\n\t\t--schmancy-icon-fill: 0;\n\t\t--schmancy-icon-weight: 400;\n\t\t--schmancy-icon-grade: 0;\n\t\t--schmancy-icon-opsz: 24;\n\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: var(--schmancy-icon-size);\n\t\theight: var(--schmancy-icon-size);\n\t\tfont-size: var(--schmancy-icon-size);\n\t\tcolor: inherit;\n\t\ttransition: font-variation-settings 0.2s ease;\n\t}\n\n\t.material-symbols {\n\t\tfont-family: var(--schmancy-icon-font, 'Material Symbols Outlined');\n\t\tfont-weight: normal;\n\t\tfont-style: normal;\n\t\tline-height: 1;\n\t\tletter-spacing: normal;\n\t\ttext-transform: none;\n\t\tdisplay: inline-block;\n\t\twhite-space: nowrap;\n\t\tword-wrap: normal;\n\t\tdirection: ltr;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-webkit-font-feature-settings: 'liga';\n\t\tfont-feature-settings: 'liga';\n\t\tfont-variation-settings:\n\t\t\t'FILL' var(--schmancy-icon-fill),\n\t\t\t'wght' var(--schmancy-icon-weight),\n\t\t\t'GRAD' var(--schmancy-icon-grade),\n\t\t\t'opsz' var(--schmancy-icon-opsz);\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t}\n\n\t/* CSS-generated content is NOT translated by Google Translate */\n\t.material-symbols[data-icon]::before {\n\t\tcontent: attr(data-icon);\n\t}\n`) {\n\t// Static flag to track if Google Fonts have been loaded\n\tprivate static fontsLoaded = false\n\n\t/**\n\t * Load Material Symbols fonts from Google Fonts CDN\n\t */\n\tprivate static loadFonts(): void {\n\t\tif (SchmancyIcon.fontsLoaded) {\n\t\t\treturn\n\t\t}\n\n\t\tconst link = document.createElement('link')\n\t\tlink.rel = 'stylesheet'\n\t\tlink.href = 'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&family=Material+Symbols+Sharp:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap'\n\t\tdocument.head.appendChild(link)\n\n\t\tSchmancyIcon.fontsLoaded = true\n\t}\n\n\t/**\n\t * Fill value for the icon (0-1)\n\t * 0 = outlined, 1 = filled\n\t */\n\t@property({ type: Number, reflect: true })\n\tfill = 0\n\n\t/**\n\t * Weight value for the icon (100-700)\n\t * Controls the thickness of the icon strokes\n\t */\n\t@property({ type: Number, reflect: true })\n\tweight = 400\n\n\t/**\n\t * Grade value for the icon (-50-200)\n\t * Adjusts the visual weight/grade\n\t */\n\t@property({ type: Number, reflect: true })\n\tgrade = 0\n\n\t/**\n\t * Icon variant style\n\t * @values outlined | rounded | sharp\n\t */\n\t@property({ type: String, reflect: true })\n\tvariant: 'outlined' | 'rounded' | 'sharp' = 'outlined'\n\n\t/**\n\t * Size of the icon - M3 aligned tokens or custom string\n\t * Tokens: 'xxs' (12px), 'xs' (16px), 'sm' (20px), 'md' (24px), 'lg' (32px)\n\t * Custom: any CSS size string like '48px', '2rem'\n\t *\n\t * When this icon is a descendant of `<schmancy-button>`, the button's\n\t * `size` wins (via `SchmancyButtonSizeContext`). The local `size` only\n\t * applies when there is no ancestor button.\n\t */\n\t@property({ type: String, reflect: true })\n\tsize: IconSize = 'md'\n\n\t/**\n\t * Size inherited from an ancestor `<schmancy-button>` via context.\n\t * Undefined when the icon is not nested in a button.\n\t */\n\t@consume({ context: SchmancyButtonSizeContext, subscribe: true })\n\t@state()\n\tprivate _buttonSize?: SchmancyButtonSize\n\n\t/**\n\t * Icon name - use this instead of slot content to prevent translation breaking icons.\n\t * When set, this takes precedence over slot content.\n\t * Example: <schmancy-icon icon=\"delete\"></schmancy-icon>\n\t */\n\t@property({ type: String })\n\ticon?: string\n\n\t// M3 aligned token sizes with optimal optical sizes\n\tprivate static readonly tokenSizes: Record<string, { size: string; opsz: number }> = {\n\t\txxs: { size: '12px', opsz: 20 }, // fits in 24px buttons (ultra-compact)\n\t\txs: { size: '16px', opsz: 20 }, // fits in 32px buttons\n\t\tsm: { size: '20px', opsz: 20 }, // fits in 40px buttons\n\t\tmd: { size: '24px', opsz: 24 }, // fits in 48px buttons (default)\n\t\tlg: { size: '32px', opsz: 40 }, // fits in 56px buttons\n\t}\n\n\t/** Extract pixel value from a custom size string for optical size */\n\tprivate static computeOpticalSize(size: string): number {\n\t\tconst px = parseFloat(size)\n\t\treturn isNaN(px) ? 24 : Math.max(20, Math.min(48, Math.round(px)))\n\t}\n\n\t// RxJS subjects for reactive property updates\n\tprivate fill$ = new BehaviorSubject(this.fill)\n\tprivate weight$ = new BehaviorSubject(this.weight)\n\tprivate grade$ = new BehaviorSubject(this.grade)\n\tprivate variant$ = new BehaviorSubject(this.variant)\n\n\t// Captured icon name from slot content (translation-proof)\n\t@state()\n\tprivate _capturedIcon?: string\n\n\t// Observer for text content changes (ternaries update text nodes, not DOM structure)\n\tprivate _observer?: MutationObserver\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\n\t\t// Capture initial icon name\n\t\tthis._updateCapturedIcon()\n\n\t\t// Watch for text content changes (characterData) for dynamic icon updates\n\t\tthis._observer = new MutationObserver(() => this._updateCapturedIcon())\n\t\tthis._observer.observe(this, { childList: true, characterData: true, subtree: true })\n\n\t\t// Load Google Fonts if not already loaded\n\t\tSchmancyIcon.loadFonts()\n\n\t\t// Prevent browser translation from breaking icon ligatures\n\t\t// Using multiple methods for maximum compatibility:\n\t\t// - translate=\"no\" (HTML5 standard)\n\t\t// - class=\"notranslate\" (Google Translate specific)\n\t\tthis.setAttribute('translate', 'no')\n\t\tthis.classList.add('notranslate')\n\n\t\t// Set accessibility attributes for decorative icons\n\t\tif (!this.hasAttribute('aria-label') &&\n\t\t !this.hasAttribute('aria-labelledby') &&\n\t\t !this.hasAttribute('aria-hidden') &&\n\t\t !this.hasAttribute('role')) {\n\t\t\tthis.setAttribute('aria-hidden', 'true')\n\t\t}\n\n\t\t// Setup reactive CSS variable updates\n\t\tcombineLatest([\n\t\t\tthis.fill$,\n\t\t\tthis.weight$,\n\t\t\tthis.grade$,\n\t\t\tthis.variant$\n\t\t]).pipe(\n\t\t\ttap(([fill, weight, grade, variant]) => {\n\t\t\t\t// Update CSS custom properties for smooth transitions\n\t\t\t\tthis.style.setProperty('--schmancy-icon-fill', String(fill))\n\t\t\t\tthis.style.setProperty('--schmancy-icon-weight', String(weight))\n\t\t\t\tthis.style.setProperty('--schmancy-icon-grade', String(grade))\n\n\t\t\t\t// Update font family based on variant\n\t\t\t\tconst fontFamily = {\n\t\t\t\t\t'outlined': 'Material Symbols Outlined',\n\t\t\t\t\t'rounded': 'Material Symbols Rounded',\n\t\t\t\t\t'sharp': 'Material Symbols Sharp'\n\t\t\t\t}[variant] || 'Material Symbols Outlined'\n\n\t\t\t\tthis.style.setProperty('--schmancy-icon-font', fontFamily)\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\n\t}\n\n\t/**\n\t * Update captured icon from current text content\n\t */\n\tprivate _updateCapturedIcon(): void {\n\t\tif (!this.icon) {\n\t\t\tconst textContent = this.textContent?.trim()\n\t\t\tif (textContent && textContent !== this._capturedIcon) {\n\t\t\t\tthis._capturedIcon = textContent\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected updated(changedProperties: Map<string | number | symbol, unknown>): void {\n\t\tsuper.updated(changedProperties)\n\n\t\t// Update BehaviorSubjects when properties change\n\t\tif (changedProperties.has('fill')) {\n\t\t\tthis.fill$.next(this.fill)\n\t\t}\n\t\tif (changedProperties.has('weight')) {\n\t\t\tthis.weight$.next(this.weight)\n\t\t}\n\t\tif (changedProperties.has('grade')) {\n\t\t\tthis.grade$.next(this.grade)\n\t\t}\n\t\tif (changedProperties.has('variant')) {\n\t\t\tthis.variant$.next(this.variant)\n\t\t}\n\t}\n\n\tprotected render(): unknown {\n\t\tconst fontFamily = {\n\t\t\t'outlined': 'Material Symbols Outlined',\n\t\t\t'rounded': 'Material Symbols Rounded',\n\t\t\t'sharp': 'Material Symbols Sharp'\n\t\t}[this.variant] || 'Material Symbols Outlined'\n\n\t\t// Effective size: ancestor `<schmancy-button>` wins via context, else local `size`.\n\t\tconst effectiveSize: IconSize = this._buttonSize ?? this.size\n\t\t// Resolve size: token → px, bare number → px, or pass through as-is\n\t\tconst sizeConfig = SchmancyIcon.tokenSizes[effectiveSize]\n\t\tconst isNumeric = !sizeConfig && /^\\d+(\\.\\d+)?$/.test(effectiveSize)\n\t\tconst iconSize = sizeConfig?.size || (isNumeric ? `${effectiveSize}px` : effectiveSize)\n\t\tconst opticalSize = sizeConfig?.opsz || SchmancyIcon.computeOpticalSize(iconSize)\n\n\t\t// Set size on HOST so :host CSS picks it up\n\t\tthis.style.setProperty('--schmancy-icon-size', iconSize)\n\t\tthis.style.setProperty('--schmancy-icon-opsz', String(opticalSize))\n\n\t\tconst style = {\n\t\t\t'--schmancy-icon-fill': this.fill,\n\t\t\t'--schmancy-icon-weight': this.weight,\n\t\t\t'--schmancy-icon-grade': this.grade,\n\t\t\t'--schmancy-icon-font': fontFamily,\n\t\t}\n\n\t\t// Priority: icon property > captured icon (for dynamic content)\n\t\tconst iconName = this.icon || this._capturedIcon\n\n\t\t// Always render slot (hidden) to observe content changes, display via data-icon\n\t\treturn html`\n\t\t\t<span class=\"material-symbols notranslate\" part=\"icon\" translate=\"no\" data-icon=${iconName || ''} style=${this.styleMap(style)}></span>\n\t\t\t<slot style=\"display:none\"></slot>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-icon': SchmancyIcon\n\t}\n}"],"mappings":"gSA+Be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AAA,CAAA,CAAA,CAAS,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,QAAA,CAAA,CAyBnB,EAAA,UAAA,gBAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAnJM,gBAAA,CAAA,CAAgB,EAAA"}
|
package/dist/icons.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./icons-
|
|
1
|
+
require(`./icons-DtdhaZdc.cjs`);
|
package/dist/icons.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "./icons-
|
|
1
|
+
import "./icons-Drq4kKy2.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-
|
|
1
|
+
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
|
display: block;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iframe-
|
|
1
|
+
{"version":3,"file":"iframe-BkwwWIbQ.cjs","names":[],"sources":["../src/iframe/iframe.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\n/** Sensible document reset for iframe content — font, spacing, word-wrap */\nconst DEFAULT_BASE_CSS = `html,body{margin:0;padding:0;overflow:hidden;background:#fff;color:#1a1a1a;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;font-size:14px;line-height:1.6;word-wrap:break-word;overflow-wrap:break-word}\nbody{padding:16px}\np{margin:0 0 1em}p:last-child{margin-bottom:0}\nul,ol{margin:0 0 1em;padding-left:1.5em}li{margin-bottom:.25em}\nh1,h2,h3,h4{margin:0 0 .5em;line-height:1.3}h1{font-size:1.5em}h2{font-size:1.25em}h3{font-size:1.1em}h4{font-size:1em}\nhr{border:none;border-top:1px solid #dadce0;margin:1em 0}\nimg{max-width:100%;height:auto}\ntable{border-collapse:collapse;max-width:100%}td,th{padding:4px 8px;border:1px solid #dadce0}\nblockquote{margin:0 0 1em;padding:.5em 0 .5em 1em;border-left:3px solid #dadce0;color:#5f6368}\npre{background:#f5f5f5;padding:.75em;border-radius:4px;overflow-x:auto;font-size:.9em}\ncode{background:#f5f5f5;padding:.1em .3em;border-radius:3px;font-size:.9em}`\n\n/**\n * Renders an HTML fragment inside a sandboxed, auto-sizing iframe.\n *\n * @slot - (none)\n * @fires load — native iframe load event\n *\n * @example\n * ```html\n * <schmancy-iframe .html=${bodyHtml} .css=${extraStyles}></schmancy-iframe>\n * ```\n */\n@customElement('schmancy-iframe')\nexport default class SchmancyIframe extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n\tiframe {\n\t\tborder: 0;\n\t\twidth: 100%;\n\t}\n`) {\n\t/** HTML body fragment to render inside the iframe */\n\t@property({ type: String }) html = ''\n\n\t/** Additional CSS injected after the base styles (consumer-specific) */\n\t@property({ type: String }) css = ''\n\n\t/** Base document CSS (font, spacing, resets). Override for fully custom styling */\n\t@property({ type: String }) baseCss = DEFAULT_BASE_CSS\n\n\t/** iframe sandbox attribute */\n\t@property({ type: String }) sandbox = 'allow-same-origin allow-popups'\n\n\t/** Minimum height in pixels */\n\t@property({ type: Number }) minHeight = 60\n\n\t@state() private _height = 60\n\tprivate _srcdoc = ''\n\n\tprotected willUpdate(changed: PropertyValues) {\n\t\tif (changed.has('html') || changed.has('css') || changed.has('baseCss')) {\n\t\t\tthis._srcdoc = this.html ? this.buildSrcdoc() : ''\n\t\t\tthis._height = this.minHeight\n\t\t}\n\t}\n\n\tprivate buildSrcdoc(): string {\n\t\tconst styles = this.css ? `${this.baseCss}\\n${this.css}` : this.baseCss\n\t\treturn `<!DOCTYPE html><html><head>\n<meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n<base target=\"_blank\">\n<style>${styles}</style></head><body>${this.html}</body></html>`\n\t}\n\n\tprivate onLoad(e: Event) {\n\t\tconst iframe = e.target as HTMLIFrameElement\n\t\ttry {\n\t\t\tconst doc = iframe.contentDocument\n\t\t\tif (!doc) return\n\t\t\tthis._height = Math.max(doc.documentElement.scrollHeight, this.minHeight)\n\t\t} catch {\n\t\t\tthis._height = Math.max(200, this.minHeight)\n\t\t}\n\t}\n\n\tprotected render() {\n\t\tif (!this.html) return html``\n\t\treturn html`<iframe\n\t\t\t.srcdoc=${this._srcdoc}\n\t\t\tsandbox=${this.sandbox}\n\t\t\tstyle=\"height:${this._height}px;min-height:${this.minHeight}px;overflow:hidden\"\n\t\t\t@load=${this.onLoad}\n\t\t></iframe>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-iframe': SchmancyIframe\n\t}\n}\n"],"mappings":"kMAKA,IAwBe,EAAA,cAA6B,EAAA,EAAgB,EAAA,GAAG;;;;;;;;2CAU3B,GAAA,KAAA,IAGD,GAAA,KAAA,QArCV;;;;;;;;;;6EAAA,KAAA,QA2Cc,iCAAA,KAAA,UAGE,GAAA,KAAA,QAEb,GAAA,KAAA,QACT,GAElB,WAAqB,EAAA,EAChB,EAAQ,IAAI,OAAA,EAAW,EAAQ,IAAI,MAAA,EAAU,EAAQ,IAAI,UAAA,IAC5D,KAAK,QAAU,KAAK,KAAO,KAAK,aAAA,CAAgB,GAChD,KAAK,QAAU,KAAK,WAItB,aAAA,CAEC,MAAO,0JADQ,KAAK,IAAM,GAAG,KAAK,QAAA,IAAY,KAAK,MAAQ,KAAK,QAAA,uBAI3B,KAAK,KAAA,gBAG3C,OAAe,EAAA,CACd,IAAM,EAAS,EAAE,OACjB,GAAA,CACC,IAAM,EAAM,EAAO,gBACnB,GAA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["import { TailwindElement } from '@mixins/index'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\n/** Sensible document reset for iframe content — font, spacing, word-wrap */\nconst DEFAULT_BASE_CSS = `html,body{margin:0;padding:0;overflow:hidden;background:#fff;color:#1a1a1a;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;font-size:14px;line-height:1.6;word-wrap:break-word;overflow-wrap:break-word}\nbody{padding:16px}\np{margin:0 0 1em}p:last-child{margin-bottom:0}\nul,ol{margin:0 0 1em;padding-left:1.5em}li{margin-bottom:.25em}\nh1,h2,h3,h4{margin:0 0 .5em;line-height:1.3}h1{font-size:1.5em}h2{font-size:1.25em}h3{font-size:1.1em}h4{font-size:1em}\nhr{border:none;border-top:1px solid #dadce0;margin:1em 0}\nimg{max-width:100%;height:auto}\ntable{border-collapse:collapse;max-width:100%}td,th{padding:4px 8px;border:1px solid #dadce0}\nblockquote{margin:0 0 1em;padding:.5em 0 .5em 1em;border-left:3px solid #dadce0;color:#5f6368}\npre{background:#f5f5f5;padding:.75em;border-radius:4px;overflow-x:auto;font-size:.9em}\ncode{background:#f5f5f5;padding:.1em .3em;border-radius:3px;font-size:.9em}`\n\n/**\n * Renders an HTML fragment inside a sandboxed, auto-sizing iframe.\n *\n * @slot - (none)\n * @fires load — native iframe load event\n *\n * @example\n * ```html\n * <schmancy-iframe .html=${bodyHtml} .css=${extraStyles}></schmancy-iframe>\n * ```\n */\n@customElement('schmancy-iframe')\nexport default class SchmancyIframe extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n\tiframe {\n\t\tborder: 0;\n\t\twidth: 100%;\n\t}\n`) {\n\t/** HTML body fragment to render inside the iframe */\n\t@property({ type: String }) html = ''\n\n\t/** Additional CSS injected after the base styles (consumer-specific) */\n\t@property({ type: String }) css = ''\n\n\t/** Base document CSS (font, spacing, resets). Override for fully custom styling */\n\t@property({ type: String }) baseCss = DEFAULT_BASE_CSS\n\n\t/** iframe sandbox attribute */\n\t@property({ type: String }) sandbox = 'allow-same-origin allow-popups'\n\n\t/** Minimum height in pixels */\n\t@property({ type: Number }) minHeight = 60\n\n\t@state() private _height = 60\n\tprivate _srcdoc = ''\n\n\tprotected willUpdate(changed: PropertyValues) {\n\t\tif (changed.has('html') || changed.has('css') || changed.has('baseCss')) {\n\t\t\tthis._srcdoc = this.html ? this.buildSrcdoc() : ''\n\t\t\tthis._height = this.minHeight\n\t\t}\n\t}\n\n\tprivate buildSrcdoc(): string {\n\t\tconst styles = this.css ? `${this.baseCss}\\n${this.css}` : this.baseCss\n\t\treturn `<!DOCTYPE html><html><head>\n<meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n<base target=\"_blank\">\n<style>${styles}</style></head><body>${this.html}</body></html>`\n\t}\n\n\tprivate onLoad(e: Event) {\n\t\tconst iframe = e.target as HTMLIFrameElement\n\t\ttry {\n\t\t\tconst doc = iframe.contentDocument\n\t\t\tif (!doc) return\n\t\t\tthis._height = Math.max(doc.documentElement.scrollHeight, this.minHeight)\n\t\t} catch {\n\t\t\tthis._height = Math.max(200, this.minHeight)\n\t\t}\n\t}\n\n\tprotected render() {\n\t\tif (!this.html) return html``\n\t\treturn html`<iframe\n\t\t\t.srcdoc=${this._srcdoc}\n\t\t\tsandbox=${this.sandbox}\n\t\t\tstyle=\"height:${this._height}px;min-height:${this.minHeight}px;overflow:hidden\"\n\t\t\t@load=${this.onLoad}\n\t\t></iframe>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-iframe': SchmancyIframe\n\t}\n}\n"],"mappings":";;;;;AAKA,IAwBe,IAAA,cAA6B,EAAgB,CAAG;;;;;;;;;;2BAU3B,IAAA,KAAA,MAGD,IAAA,KAAA,UArCV,27BAAA,KAAA,UA2Cc,kCAAA,KAAA,YAGE,IAAA,KAAA,UAEb,IAAA,KAAA,UACT;;CAElB,WAAqB,GA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EAAA;AAAA,SAAA,KAAA"}
|
package/dist/iframe.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./iframe-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./iframe-BkwwWIbQ.cjs`);exports.SchmancyIframe=e.t;
|
package/dist/iframe.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./iframe-
|
|
1
|
+
import { t as e } from "./iframe-BmyHW8km.js";
|
|
2
2
|
export { e as SchmancyIframe };
|