@mhmo91/schmancy 0.9.3 → 0.9.5
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/.claude-plugin/plugin.json +13 -0
- package/README.md +14 -4
- package/dist/.claude-plugin/plugin.json +13 -0
- package/dist/{area-CC8fUnra.js → area-CRoGqD_u.js} +2 -2
- package/dist/area-CRoGqD_u.js.map +1 -0
- package/dist/{area-wnWUAHEn.cjs → area-JPykB7A9.cjs} +1 -1
- package/dist/area-JPykB7A9.cjs.map +1 -0
- package/dist/area.cjs +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-B2Z3WK_7.cjs → autocomplete-5rVhbieU.cjs} +1 -1
- package/dist/{autocomplete-B2Z3WK_7.cjs.map → autocomplete-5rVhbieU.cjs.map} +1 -1
- package/dist/{autocomplete-CJ7YgtKN.js → autocomplete-BllPQwr8.js} +3 -3
- package/dist/{autocomplete-CJ7YgtKN.js.map → autocomplete-BllPQwr8.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-C9eU6NO-.js → boat-BDTQ-du9.js} +2 -2
- package/dist/{boat-C9eU6NO-.js.map → boat-BDTQ-du9.js.map} +1 -1
- package/dist/{boat-B57_4TzJ.cjs → boat-DYEAZ8Qj.cjs} +1 -1
- package/dist/{boat-B57_4TzJ.cjs.map → boat-DYEAZ8Qj.cjs.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/{busy-CGZXy0h-.js → busy-ChDAeaKF.js} +1 -1
- package/dist/{busy-CGZXy0h-.js.map → busy-ChDAeaKF.js.map} +1 -1
- package/dist/{busy--6oimtop.cjs → busy-Dj7Xn0Z0.cjs} +1 -1
- package/dist/{busy--6oimtop.cjs.map → busy-Dj7Xn0Z0.cjs.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 +2 -2
- package/dist/{card-BGJ0Hb1O.cjs → card-BvPWVEJX.cjs} +1 -1
- package/dist/{card-BGJ0Hb1O.cjs.map → card-BvPWVEJX.cjs.map} +1 -1
- package/dist/{card-C-ee-l5O.js → card-DZFPRPqs.js} +1 -1
- package/dist/{card-C-ee-l5O.js.map → card-DZFPRPqs.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 +2 -2
- package/dist/{checkbox-DuYaKoDZ.cjs → checkbox-BC_37rsG.cjs} +1 -1
- package/dist/{checkbox-DuYaKoDZ.cjs.map → checkbox-BC_37rsG.cjs.map} +1 -1
- package/dist/{checkbox-FRcorDrD.js → checkbox-GSSjqo6w.js} +1 -1
- package/dist/{checkbox-FRcorDrD.js.map → checkbox-GSSjqo6w.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-BpA0A-qr.cjs → chips-B19XS8Xc.cjs} +1 -1
- package/dist/{chips-BpA0A-qr.cjs.map → chips-B19XS8Xc.cjs.map} +1 -1
- package/dist/{chips-CyzNbKJD.js → chips-B9oAEfE_.js} +3 -3
- package/dist/{chips-CyzNbKJD.js.map → chips-B9oAEfE_.js.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/{code-highlight-C7O9ltXm.js → code-highlight-DCk5lJY-.js} +1 -1
- package/dist/{code-highlight-C7O9ltXm.js.map → code-highlight-DCk5lJY-.js.map} +1 -1
- package/dist/{code-highlight-DsBdSQBG.cjs → code-highlight-fSLrlgOb.cjs} +1 -1
- package/dist/{code-highlight-DsBdSQBG.cjs.map → code-highlight-fSLrlgOb.cjs.map} +1 -1
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{components-CkMvOiTR.js → components-COsM6sJZ.js} +2 -2
- package/dist/{components-CkMvOiTR.js.map → components-COsM6sJZ.js.map} +1 -1
- package/dist/{components-dDI3xeIf.cjs → components-CyD6a7gQ.cjs} +1 -1
- package/dist/{components-dDI3xeIf.cjs.map → components-CyD6a7gQ.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/{date-range-BrN_Bs6_.js → date-range-Sfyco9-n.js} +3 -3
- package/dist/{date-range-BrN_Bs6_.js.map → date-range-Sfyco9-n.js.map} +1 -1
- package/dist/{date-range-70zhLUKE.cjs → date-range-ZAaQB22I.cjs} +1 -1
- package/dist/{date-range-70zhLUKE.cjs.map → date-range-ZAaQB22I.cjs.map} +1 -1
- package/dist/{date-range-inline-Cp294DxR.js → date-range-inline-Bl8qbiQF.js} +1 -1
- package/dist/{date-range-inline-Cp294DxR.js.map → date-range-inline-Bl8qbiQF.js.map} +1 -1
- package/dist/{date-range-inline-CPzD-tIv.cjs → date-range-inline-m7nLjOMI.cjs} +1 -1
- package/dist/{date-range-inline-CPzD-tIv.cjs.map → date-range-inline-m7nLjOMI.cjs.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-COcAkBqB.cjs → delay-7boauN6N.cjs} +1 -1
- package/dist/{delay-COcAkBqB.cjs.map → delay-7boauN6N.cjs.map} +1 -1
- package/dist/{delay-IV0Swce2.js → delay-CgX6m0HN.js} +3 -3
- package/dist/{delay-IV0Swce2.js.map → delay-CgX6m0HN.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-DgWkPqmt.cjs → details-BHnk8l4q.cjs} +1 -1
- package/dist/{details-DgWkPqmt.cjs.map → details-BHnk8l4q.cjs.map} +1 -1
- package/dist/{details-CuKmr3Qw.js → details-BPkUg8Cq.js} +2 -2
- package/dist/{details-CuKmr3Qw.js.map → details-BPkUg8Cq.js.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 +2 -2
- package/dist/directives.cjs.map +1 -1
- package/dist/directives.js.map +1 -1
- package/dist/discovery.cjs.map +1 -1
- package/dist/discovery.js.map +1 -1
- package/dist/{divider-BWoUbfgZ.js → divider-CW9a7MMj.js} +2 -2
- package/dist/{divider-BWoUbfgZ.js.map → divider-CW9a7MMj.js.map} +1 -1
- package/dist/{divider-BghtrMbn.cjs → divider-_khrhrZo.cjs} +1 -1
- package/dist/{divider-BghtrMbn.cjs.map → divider-_khrhrZo.cjs.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-XyDE5SsO.cjs → expand-Cp7-PH8b.cjs} +1 -1
- package/dist/{expand-XyDE5SsO.cjs.map → expand-Cp7-PH8b.cjs.map} +1 -1
- package/dist/{expand-CJU9m4ga.js → expand-iQ7EOMP7.js} +3 -3
- package/dist/{expand-CJU9m4ga.js.map → expand-iQ7EOMP7.js.map} +1 -1
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/{extra-CsrRKKqE.cjs → extra-IKAiJJhv.cjs} +1 -1
- package/dist/{extra-CsrRKKqE.cjs.map → extra-IKAiJJhv.cjs.map} +1 -1
- package/dist/{extra-BxXFmW1w.js → extra-wEpvEFbK.js} +2 -2
- package/dist/{extra-BxXFmW1w.js.map → extra-wEpvEFbK.js.map} +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{float-BD86t_NU.js → float-BQ_urmMs.js} +2 -2
- package/dist/{float-BD86t_NU.js.map → float-BQ_urmMs.js.map} +1 -1
- package/dist/{float-DBv1FINW.cjs → float-D5rNC82i.cjs} +1 -1
- package/dist/{float-DBv1FINW.cjs.map → float-D5rNC82i.cjs.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/{form-D0bIeDWT.cjs → form-BqN1AGFj.cjs} +1 -1
- package/dist/{form-D0bIeDWT.cjs.map → form-BqN1AGFj.cjs.map} +1 -1
- package/dist/{form-Cp5-I_ZV.js → form-CajC5HnO.js} +1 -1
- package/dist/{form-Cp5-I_ZV.js.map → form-CajC5HnO.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{icons-D8w_20mO.cjs → icons-B57_93VV.cjs} +1 -1
- package/dist/{icons-D8w_20mO.cjs.map → icons-B57_93VV.cjs.map} +1 -1
- package/dist/{icons-BpU0_l92.js → icons-BDqiGXrO.js} +1 -1
- package/dist/{icons-BpU0_l92.js.map → icons-BDqiGXrO.js.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-BjwxA2Pg.cjs → iframe-DNHL3GIk.cjs} +1 -1
- package/dist/{iframe-BjwxA2Pg.cjs.map → iframe-DNHL3GIk.cjs.map} +1 -1
- package/dist/{iframe-tY1GY5g1.js → iframe-WnWPIrBG.js} +1 -1
- package/dist/{iframe-tY1GY5g1.js.map → iframe-WnWPIrBG.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 +33 -33
- package/dist/{input-BwxwognS.cjs → input-BiSrTcrR.cjs} +1 -1
- package/dist/{input-BwxwognS.cjs.map → input-BiSrTcrR.cjs.map} +1 -1
- package/dist/{input-BnfTpRN9.js → input-VaXHFrRn.js} +1 -1
- package/dist/{input-BnfTpRN9.js.map → input-VaXHFrRn.js.map} +1 -1
- package/dist/{input-chip-MjOwX5EY.cjs → input-chip-Dy-AiP55.cjs} +1 -1
- package/dist/{input-chip-MjOwX5EY.cjs.map → input-chip-Dy-AiP55.cjs.map} +1 -1
- package/dist/{input-chip-CkM2aYmO.js → input-chip-QejNcRnS.js} +1 -1
- package/dist/{input-chip-CkM2aYmO.js.map → input-chip-QejNcRnS.js.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/json.cjs +1 -1
- package/dist/json.js +2 -2
- package/dist/{layout-CJSlZlFL.js → layout-CnsXeCAy.js} +2 -2
- package/dist/{layout-CJSlZlFL.js.map → layout-CnsXeCAy.js.map} +1 -1
- package/dist/{layout-BV0EeyUS.cjs → layout-DNYG3phx.cjs} +1 -1
- package/dist/{layout-BV0EeyUS.cjs.map → layout-DNYG3phx.cjs.map} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +2 -2
- package/dist/{lightbox-groqGmJH.js → lightbox-BrI1Z31s.js} +2 -2
- package/dist/{lightbox-groqGmJH.js.map → lightbox-BrI1Z31s.js.map} +1 -1
- package/dist/{lightbox-CpNMZHZW.cjs → lightbox-CmACf0t5.cjs} +1 -1
- package/dist/{lightbox-CpNMZHZW.cjs.map → lightbox-CmACf0t5.cjs.map} +1 -1
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/{list-DzkqT_r-.js → list-Cm-jjXxM.js} +2 -2
- package/dist/{list-DzkqT_r-.js.map → list-Cm-jjXxM.js.map} +1 -1
- package/dist/{list-CyHd0Zc2.cjs → list-swIL9VDv.cjs} +1 -1
- package/dist/{list-CyHd0Zc2.cjs.map → list-swIL9VDv.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-BG6_-nYX.cjs → litElement.mixin-3llHwB-8.cjs} +1 -1
- package/dist/{litElement.mixin-BG6_-nYX.cjs.map → litElement.mixin-3llHwB-8.cjs.map} +1 -1
- package/dist/{litElement.mixin-Dm-4L8zL.js → litElement.mixin-6jJYHCrZ.js} +1 -1
- package/dist/{litElement.mixin-Dm-4L8zL.js.map → litElement.mixin-6jJYHCrZ.js.map} +1 -1
- package/dist/{mailbox-BcqnXYVP.js → mailbox-BuvsVaAQ.js} +4 -4
- package/dist/{mailbox-BcqnXYVP.js.map → mailbox-BuvsVaAQ.js.map} +1 -1
- package/dist/{mailbox-C5eYTd7p.cjs → mailbox-D6LkQcN5.cjs} +1 -1
- package/dist/{mailbox-C5eYTd7p.cjs.map → mailbox-D6LkQcN5.cjs.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-C0o1PgLE.js → map-CQiKAxC3.js} +1 -1
- package/dist/{map-C0o1PgLE.js.map → map-CQiKAxC3.js.map} +1 -1
- package/dist/{map-BncheFt5.cjs → map-D5NN4VET.cjs} +1 -1
- package/dist/{map-BncheFt5.cjs.map → map-D5NN4VET.cjs.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{menu-uwqlQbLd.js → menu-C1x04YZw.js} +2 -2
- package/dist/{menu-uwqlQbLd.js.map → menu-C1x04YZw.js.map} +1 -1
- package/dist/{menu-yXzwJZFf.cjs → menu-CkgMO9K5.cjs} +1 -1
- package/dist/{menu-yXzwJZFf.cjs.map → menu-CkgMO9K5.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +3 -3
- 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 +2 -2
- package/dist/{notification-DzYT4deA.js → notification-BnBgxjF-.js} +3 -3
- package/dist/{notification-DzYT4deA.js.map → notification-BnBgxjF-.js.map} +1 -1
- package/dist/{notification-BjwTfLAl.cjs → notification-CZFEhWxc.cjs} +1 -1
- package/dist/{notification-BjwTfLAl.cjs.map → notification-CZFEhWxc.cjs.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-BJsD3u2D.cjs → option-BrxCVwSx.cjs} +1 -1
- package/dist/{option-BJsD3u2D.cjs.map → option-BrxCVwSx.cjs.map} +1 -1
- package/dist/{option-JFHxgiYl.js → option-DBO8xZwd.js} +1 -1
- package/dist/{option-JFHxgiYl.js.map → option-DBO8xZwd.js.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/page.cjs +1 -1
- package/dist/page.js +3 -3
- package/dist/{progress-BoRmyGAa.cjs → progress-Db2e4_Zd.cjs} +1 -1
- package/dist/{progress-BoRmyGAa.cjs.map → progress-Db2e4_Zd.cjs.map} +1 -1
- package/dist/{progress-BUh5WBqx.js → progress-DeiHxXo7.js} +2 -2
- package/dist/{progress-BUh5WBqx.js.map → progress-DeiHxXo7.js.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{provide-8MrDz_qX.js → provide-C1aQhxYo.js} +1 -1
- package/dist/{provide-8MrDz_qX.js.map → provide-C1aQhxYo.js.map} +1 -1
- package/dist/{provide-CDkxgjHb.cjs → provide-DHnhQtCH.cjs} +1 -1
- package/dist/{provide-CDkxgjHb.cjs.map → provide-DHnhQtCH.cjs.map} +1 -1
- package/dist/qr-scanner.cjs +1 -1
- package/dist/qr-scanner.js +2 -2
- package/dist/{radio-group-rhrvhB5X.cjs → radio-group-Cspwd-Vw.cjs} +1 -1
- package/dist/{radio-group-rhrvhB5X.cjs.map → radio-group-Cspwd-Vw.cjs.map} +1 -1
- package/dist/{radio-group-DbOWUPhi.js → radio-group-zSO0AkJf.js} +1 -1
- package/dist/{radio-group-DbOWUPhi.js.map → radio-group-zSO0AkJf.js.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-BE9W9PF2.cjs → scroll-QMCmbbDv.cjs} +1 -1
- package/dist/{scroll-BE9W9PF2.cjs.map → scroll-QMCmbbDv.cjs.map} +1 -1
- package/dist/{scroll-qGks1R0k.js → scroll-cBDzye64.js} +1 -1
- package/dist/{scroll-qGks1R0k.js.map → scroll-cBDzye64.js.map} +1 -1
- package/dist/{select-DXU2kzg4.cjs → select-Ct37l3lg.cjs} +1 -1
- package/dist/{select-DXU2kzg4.cjs.map → select-Ct37l3lg.cjs.map} +1 -1
- package/dist/{select-D9sgBRjU.js → select-c6HbWvKP.js} +2 -2
- package/dist/{select-D9sgBRjU.js.map → select-c6HbWvKP.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-CIxCCJ3H.js → sheet-BMXcUiIm.js} +4 -4
- package/dist/{sheet-CIxCCJ3H.js.map → sheet-BMXcUiIm.js.map} +1 -1
- package/dist/{sheet-CeX6BbNp.cjs → sheet-CQec-bCV.cjs} +1 -1
- package/dist/{sheet-CeX6BbNp.cjs.map → sheet-CQec-bCV.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{sheet.service-CAB7weBc.js → sheet.service-BcPV3Du4.js} +1 -1
- package/dist/{sheet.service-CAB7weBc.js.map → sheet.service-BcPV3Du4.js.map} +1 -1
- package/dist/{sheet.service-DPAp7E3x.cjs → sheet.service-Dumvr1HT.cjs} +1 -1
- package/dist/{sheet.service-DPAp7E3x.cjs.map → sheet.service-Dumvr1HT.cjs.map} +1 -1
- package/dist/skills/INDEX.md +72 -0
- package/dist/skills/SKILL.md +120 -0
- package/dist/skills/area.md +141 -0
- package/{ai → dist/skills}/mailbox.md +1 -1
- package/dist/skills/mixins.md +99 -0
- package/dist/skills/schmancy/INDEX.md +72 -0
- package/dist/skills/schmancy/SKILL.md +120 -0
- package/dist/skills/schmancy/area.md +141 -0
- package/dist/{ai → skills/schmancy}/mailbox.md +1 -1
- package/dist/skills/schmancy/mixins.md +99 -0
- package/dist/skills/schmancy/store.md +126 -0
- package/dist/skills/store.md +126 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +2 -2
- package/dist/{src-CbO5kJ2O.js → src-BLngW2bl.js} +42 -42
- package/dist/{src-CbO5kJ2O.js.map → src-BLngW2bl.js.map} +1 -1
- package/dist/{src-SraDxEeg.cjs → src-BtQVyqMy.cjs} +1 -1
- package/dist/{src-SraDxEeg.cjs.map → src-BtQVyqMy.cjs.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +3 -3
- package/dist/{surface-DuH0pm2v.cjs → surface-BjKZoJxK.cjs} +1 -1
- package/dist/{surface-DuH0pm2v.cjs.map → surface-BjKZoJxK.cjs.map} +1 -1
- package/dist/{surface-eN_Jy2MJ.js → surface-pK8hME5c.js} +3 -3
- package/dist/{surface-eN_Jy2MJ.js.map → surface-pK8hME5c.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{surface.mixin-CIXgN6iw.cjs → surface.mixin-C5sDI1-_.cjs} +1 -1
- package/dist/{surface.mixin-CIXgN6iw.cjs.map → surface.mixin-C5sDI1-_.cjs.map} +1 -1
- package/dist/{surface.mixin-D9jv1sKG.js → surface.mixin-CBNRpJum.js} +1 -1
- package/dist/{surface.mixin-D9jv1sKG.js.map → surface.mixin-CBNRpJum.js.map} +1 -1
- package/dist/{table-Dg_tUGB_.js → table-BXIHX9h4.js} +2 -2
- package/dist/{table-Dg_tUGB_.js.map → table-BXIHX9h4.js.map} +1 -1
- package/dist/{table-C9rRQJEB.cjs → table-CiqgZzSd.cjs} +1 -1
- package/dist/{table-C9rRQJEB.cjs.map → table-CiqgZzSd.cjs.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-soTL-x4G.cjs → tabs-CKa-W4qA.cjs} +1 -1
- package/dist/{tabs-soTL-x4G.cjs.map → tabs-CKa-W4qA.cjs.map} +1 -1
- package/dist/{tabs-BbFC9omR.js → tabs-nbV5eblZ.js} +2 -2
- package/dist/{tabs-BbFC9omR.js.map → tabs-nbV5eblZ.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-BCJOOX1_.js +225 -0
- package/dist/tailwind.mixin-BCJOOX1_.js.map +1 -0
- package/dist/tailwind.mixin-BF1Huas7.cjs +2 -0
- package/dist/tailwind.mixin-BF1Huas7.cjs.map +1 -0
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-DaRUJ0ri.cjs → textarea-Cp1ZE60O.cjs} +1 -1
- package/dist/{textarea-DaRUJ0ri.cjs.map → textarea-Cp1ZE60O.cjs.map} +1 -1
- package/dist/{textarea-hChvHbNM.js → textarea-D7q8exMg.js} +1 -1
- package/dist/{textarea-hChvHbNM.js.map → textarea-D7q8exMg.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-ZYH2MqX9.cjs → theme-Da4SPq9X.cjs} +1 -1
- package/dist/{theme-ZYH2MqX9.cjs.map → theme-Da4SPq9X.cjs.map} +1 -1
- package/dist/{theme-B0M8Hlyo.js → theme-_VPV6Bxh.js} +3 -3
- package/dist/{theme-B0M8Hlyo.js.map → theme-_VPV6Bxh.js.map} +1 -1
- package/dist/{theme-button-BtlX_Zgd.js → theme-button--sX8A-m1.js} +1 -1
- package/dist/{theme-button-BtlX_Zgd.js.map → theme-button--sX8A-m1.js.map} +1 -1
- package/dist/{theme-button-Dvqg-rE_.cjs → theme-button-Ci8VQ7KW.cjs} +1 -1
- package/dist/{theme-button-Dvqg-rE_.cjs.map → theme-button-Ci8VQ7KW.cjs.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +2 -2
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-Cf9f2bdx.cjs → typewriter-B2TnHPjw.cjs} +1 -1
- package/dist/{typewriter-Cf9f2bdx.cjs.map → typewriter-B2TnHPjw.cjs.map} +1 -1
- package/dist/{typewriter-CCel8Nta.js → typewriter-BrZNa8T-.js} +3 -3
- package/dist/{typewriter-CCel8Nta.js.map → typewriter-BrZNa8T-.js.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/dist/{window-CbgdwOZD.js → window-CM1ycigo.js} +2 -2
- package/dist/{window-CbgdwOZD.js.map → window-CM1ycigo.js.map} +1 -1
- package/dist/{window-B9_14c12.cjs → window-Uii13x_r.cjs} +1 -1
- package/dist/{window-B9_14c12.cjs.map → window-Uii13x_r.cjs.map} +1 -1
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/mixins/baseElement.ts +1 -1
- package/mixins/discovery.service.ts +1 -1
- package/package.json +3 -4
- package/skills/schmancy/INDEX.md +72 -0
- package/skills/schmancy/SKILL.md +120 -0
- package/skills/schmancy/animation.md +64 -0
- package/skills/schmancy/area.md +141 -0
- package/skills/schmancy/audio.md +69 -0
- package/skills/schmancy/autocomplete.md +53 -0
- package/skills/schmancy/avatar.md +47 -0
- package/skills/schmancy/badge.md +41 -0
- package/skills/schmancy/boat.md +47 -0
- package/skills/schmancy/busy.md +36 -0
- package/skills/schmancy/button.md +59 -0
- package/skills/schmancy/card.md +53 -0
- package/skills/schmancy/charts.md +93 -0
- package/skills/schmancy/checkbox.md +36 -0
- package/skills/schmancy/chips.md +87 -0
- package/skills/schmancy/code-highlight.md +47 -0
- package/skills/schmancy/connectivity.md +36 -0
- package/skills/schmancy/content-drawer.md +65 -0
- package/skills/schmancy/date-range-inline.md +44 -0
- package/skills/schmancy/date-range.md +50 -0
- package/skills/schmancy/delay.md +50 -0
- package/skills/schmancy/details.md +66 -0
- package/skills/schmancy/dialog.md +69 -0
- package/skills/schmancy/directives.md +298 -0
- package/skills/schmancy/discovery.md +67 -0
- package/skills/schmancy/divider.md +31 -0
- package/skills/schmancy/dropdown.md +47 -0
- package/skills/schmancy/expand.md +63 -0
- package/skills/schmancy/extra.md +59 -0
- package/skills/schmancy/float.md +14 -0
- package/skills/schmancy/form.md +49 -0
- package/skills/schmancy/icons.md +44 -0
- package/skills/schmancy/iframe.md +44 -0
- package/skills/schmancy/input.md +56 -0
- package/skills/schmancy/json.md +33 -0
- package/skills/schmancy/layout.md +63 -0
- package/skills/schmancy/lightbox.md +36 -0
- package/skills/schmancy/list.md +67 -0
- package/skills/schmancy/mailbox.md +102 -0
- package/skills/schmancy/map.md +55 -0
- package/skills/schmancy/menu.md +39 -0
- package/skills/schmancy/mixins.md +99 -0
- package/skills/schmancy/nav-drawer.md +52 -0
- package/skills/schmancy/navigation-bar.md +48 -0
- package/skills/schmancy/navigation-rail.md +62 -0
- package/skills/schmancy/notification.md +60 -0
- package/skills/schmancy/option.md +43 -0
- package/skills/schmancy/page.md +42 -0
- package/skills/schmancy/progress.md +30 -0
- package/skills/schmancy/qr-scanner.md +51 -0
- package/skills/schmancy/radio-group.md +50 -0
- package/skills/schmancy/range.md +47 -0
- package/skills/schmancy/rxjs-utils.md +60 -0
- package/skills/schmancy/select.md +49 -0
- package/skills/schmancy/sheet.md +76 -0
- package/skills/schmancy/slider.md +43 -0
- package/skills/schmancy/steps.md +53 -0
- package/skills/schmancy/store.md +126 -0
- package/skills/schmancy/surface.md +86 -0
- package/skills/schmancy/table.md +60 -0
- package/skills/schmancy/tabs.md +49 -0
- package/skills/schmancy/teleport.md +55 -0
- package/skills/schmancy/textarea.md +48 -0
- package/skills/schmancy/theme-button.md +26 -0
- package/skills/schmancy/theme.md +58 -0
- package/skills/schmancy/tooltip.md +38 -0
- package/skills/schmancy/tree.md +53 -0
- package/skills/schmancy/typewriter.md +46 -0
- package/skills/schmancy/typography.md +53 -0
- package/skills/schmancy/utils.md +95 -0
- package/skills/schmancy/window.md +67 -0
- package/src/area/area.service.ts +1 -1
- package/src/area/router.types.ts +1 -1
- package/src/directives/animate-text.ts +1 -1
- package/src/discovery/discovery.service.ts +1 -1
- package/src/input/input.ts +1 -1
- package/src/mailbox/README.md +7 -10
- package/src/mailbox/types.ts +0 -1
- package/types/mixins/discovery.service.d.ts +1 -1
- package/types/src/discovery/discovery.service.d.ts +1 -1
- package/types/src/mailbox/types.d.ts +0 -1
- package/ai/INDEX.md +0 -321
- package/ai/area.md +0 -215
- package/ai/mixins.md +0 -201
- package/ai/store.md +0 -192
- package/dist/ai/INDEX.md +0 -321
- package/dist/ai/area.md +0 -215
- package/dist/ai/mixins.md +0 -201
- package/dist/ai/store.md +0 -192
- package/dist/area-CC8fUnra.js.map +0 -1
- package/dist/area-wnWUAHEn.cjs.map +0 -1
- package/dist/tailwind.mixin-BIVhjNvD.js +0 -225
- package/dist/tailwind.mixin-BIVhjNvD.js.map +0 -1
- package/dist/tailwind.mixin-DSuEu-y3.cjs +0 -2
- package/dist/tailwind.mixin-DSuEu-y3.cjs.map +0 -1
- package/src/area/readme.md +0 -338
- package/src/area/router-guide.md +0 -360
- package/src/autocomplete/README.md +0 -485
- package/src/content-drawer/readme.md +0 -709
- package/src/icons/readme.md +0 -37
- package/src/list/readme.md +0 -62
- package/src/radio-group/readme.md +0 -315
- package/src/select/README.md +0 -405
- package/src/tabs/Readme.md +0 -397
- package/src/teleport/readme.md +0 -91
- package/src/tree/README.md +0 -59
- package/src/typewriter/IMPROVEMENTS.md +0 -174
- package/src/typewriter/QUICK_REFERENCE.md +0 -166
- package/src/typewriter/test-typewriter.html +0 -97
- /package/{ai → dist/skills}/animation.md +0 -0
- /package/{ai → dist/skills}/audio.md +0 -0
- /package/{ai → dist/skills}/autocomplete.md +0 -0
- /package/{ai → dist/skills}/avatar.md +0 -0
- /package/{ai → dist/skills}/badge.md +0 -0
- /package/{ai → dist/skills}/boat.md +0 -0
- /package/{ai → dist/skills}/busy.md +0 -0
- /package/{ai → dist/skills}/button.md +0 -0
- /package/{ai → dist/skills}/card.md +0 -0
- /package/{ai → dist/skills}/charts.md +0 -0
- /package/{ai → dist/skills}/checkbox.md +0 -0
- /package/{ai → dist/skills}/chips.md +0 -0
- /package/{ai → dist/skills}/code-highlight.md +0 -0
- /package/{ai → dist/skills}/connectivity.md +0 -0
- /package/{ai → dist/skills}/content-drawer.md +0 -0
- /package/{ai → dist/skills}/date-range-inline.md +0 -0
- /package/{ai → dist/skills}/date-range.md +0 -0
- /package/{ai → dist/skills}/delay.md +0 -0
- /package/{ai → dist/skills}/details.md +0 -0
- /package/{ai → dist/skills}/dialog.md +0 -0
- /package/{ai → dist/skills}/directives.md +0 -0
- /package/{ai → dist/skills}/discovery.md +0 -0
- /package/{ai → dist/skills}/divider.md +0 -0
- /package/{ai → dist/skills}/dropdown.md +0 -0
- /package/{ai → dist/skills}/expand.md +0 -0
- /package/{ai → dist/skills}/extra.md +0 -0
- /package/{ai → dist/skills}/float.md +0 -0
- /package/{ai → dist/skills}/form.md +0 -0
- /package/{ai → dist/skills}/icons.md +0 -0
- /package/{ai → dist/skills}/iframe.md +0 -0
- /package/{ai → dist/skills}/input.md +0 -0
- /package/{ai → dist/skills}/json.md +0 -0
- /package/{ai → dist/skills}/layout.md +0 -0
- /package/{ai → dist/skills}/lightbox.md +0 -0
- /package/{ai → dist/skills}/list.md +0 -0
- /package/{ai → dist/skills}/map.md +0 -0
- /package/{ai → dist/skills}/menu.md +0 -0
- /package/{ai → dist/skills}/nav-drawer.md +0 -0
- /package/{ai → dist/skills}/navigation-bar.md +0 -0
- /package/{ai → dist/skills}/navigation-rail.md +0 -0
- /package/{ai → dist/skills}/notification.md +0 -0
- /package/{ai → dist/skills}/option.md +0 -0
- /package/{ai → dist/skills}/page.md +0 -0
- /package/{ai → dist/skills}/progress.md +0 -0
- /package/{ai → dist/skills}/qr-scanner.md +0 -0
- /package/{ai → dist/skills}/radio-group.md +0 -0
- /package/{ai → dist/skills}/range.md +0 -0
- /package/{ai → dist/skills}/rxjs-utils.md +0 -0
- /package/dist/{ai → skills/schmancy}/animation.md +0 -0
- /package/dist/{ai → skills/schmancy}/audio.md +0 -0
- /package/dist/{ai → skills/schmancy}/autocomplete.md +0 -0
- /package/dist/{ai → skills/schmancy}/avatar.md +0 -0
- /package/dist/{ai → skills/schmancy}/badge.md +0 -0
- /package/dist/{ai → skills/schmancy}/boat.md +0 -0
- /package/dist/{ai → skills/schmancy}/busy.md +0 -0
- /package/dist/{ai → skills/schmancy}/button.md +0 -0
- /package/dist/{ai → skills/schmancy}/card.md +0 -0
- /package/dist/{ai → skills/schmancy}/charts.md +0 -0
- /package/dist/{ai → skills/schmancy}/checkbox.md +0 -0
- /package/dist/{ai → skills/schmancy}/chips.md +0 -0
- /package/dist/{ai → skills/schmancy}/code-highlight.md +0 -0
- /package/dist/{ai → skills/schmancy}/connectivity.md +0 -0
- /package/dist/{ai → skills/schmancy}/content-drawer.md +0 -0
- /package/dist/{ai → skills/schmancy}/date-range-inline.md +0 -0
- /package/dist/{ai → skills/schmancy}/date-range.md +0 -0
- /package/dist/{ai → skills/schmancy}/delay.md +0 -0
- /package/dist/{ai → skills/schmancy}/details.md +0 -0
- /package/dist/{ai → skills/schmancy}/dialog.md +0 -0
- /package/dist/{ai → skills/schmancy}/directives.md +0 -0
- /package/dist/{ai → skills/schmancy}/discovery.md +0 -0
- /package/dist/{ai → skills/schmancy}/divider.md +0 -0
- /package/dist/{ai → skills/schmancy}/dropdown.md +0 -0
- /package/dist/{ai → skills/schmancy}/expand.md +0 -0
- /package/dist/{ai → skills/schmancy}/extra.md +0 -0
- /package/dist/{ai → skills/schmancy}/float.md +0 -0
- /package/dist/{ai → skills/schmancy}/form.md +0 -0
- /package/dist/{ai → skills/schmancy}/icons.md +0 -0
- /package/dist/{ai → skills/schmancy}/iframe.md +0 -0
- /package/dist/{ai → skills/schmancy}/input.md +0 -0
- /package/dist/{ai → skills/schmancy}/json.md +0 -0
- /package/dist/{ai → skills/schmancy}/layout.md +0 -0
- /package/dist/{ai → skills/schmancy}/lightbox.md +0 -0
- /package/dist/{ai → skills/schmancy}/list.md +0 -0
- /package/dist/{ai → skills/schmancy}/map.md +0 -0
- /package/dist/{ai → skills/schmancy}/menu.md +0 -0
- /package/dist/{ai → skills/schmancy}/nav-drawer.md +0 -0
- /package/dist/{ai → skills/schmancy}/navigation-bar.md +0 -0
- /package/dist/{ai → skills/schmancy}/navigation-rail.md +0 -0
- /package/dist/{ai → skills/schmancy}/notification.md +0 -0
- /package/dist/{ai → skills/schmancy}/option.md +0 -0
- /package/dist/{ai → skills/schmancy}/page.md +0 -0
- /package/dist/{ai → skills/schmancy}/progress.md +0 -0
- /package/dist/{ai → skills/schmancy}/qr-scanner.md +0 -0
- /package/dist/{ai → skills/schmancy}/radio-group.md +0 -0
- /package/dist/{ai → skills/schmancy}/range.md +0 -0
- /package/dist/{ai → skills/schmancy}/rxjs-utils.md +0 -0
- /package/{ai → dist/skills/schmancy}/select.md +0 -0
- /package/{ai → dist/skills/schmancy}/sheet.md +0 -0
- /package/{ai → dist/skills/schmancy}/slider.md +0 -0
- /package/{ai → dist/skills/schmancy}/steps.md +0 -0
- /package/{ai → dist/skills/schmancy}/surface.md +0 -0
- /package/{ai → dist/skills/schmancy}/table.md +0 -0
- /package/{ai → dist/skills/schmancy}/tabs.md +0 -0
- /package/{ai → dist/skills/schmancy}/teleport.md +0 -0
- /package/{ai → dist/skills/schmancy}/textarea.md +0 -0
- /package/{ai → dist/skills/schmancy}/theme-button.md +0 -0
- /package/{ai → dist/skills/schmancy}/theme.md +0 -0
- /package/{ai → dist/skills/schmancy}/tooltip.md +0 -0
- /package/{ai → dist/skills/schmancy}/tree.md +0 -0
- /package/{ai → dist/skills/schmancy}/typewriter.md +0 -0
- /package/{ai → dist/skills/schmancy}/typography.md +0 -0
- /package/{ai → dist/skills/schmancy}/utils.md +0 -0
- /package/{ai → dist/skills/schmancy}/window.md +0 -0
- /package/dist/{ai → skills}/select.md +0 -0
- /package/dist/{ai → skills}/sheet.md +0 -0
- /package/dist/{ai → skills}/slider.md +0 -0
- /package/dist/{ai → skills}/steps.md +0 -0
- /package/dist/{ai → skills}/surface.md +0 -0
- /package/dist/{ai → skills}/table.md +0 -0
- /package/dist/{ai → skills}/tabs.md +0 -0
- /package/dist/{ai → skills}/teleport.md +0 -0
- /package/dist/{ai → skills}/textarea.md +0 -0
- /package/dist/{ai → skills}/theme-button.md +0 -0
- /package/dist/{ai → skills}/theme.md +0 -0
- /package/dist/{ai → skills}/tooltip.md +0 -0
- /package/dist/{ai → skills}/tree.md +0 -0
- /package/dist/{ai → skills}/typewriter.md +0 -0
- /package/dist/{ai → skills}/typography.md +0 -0
- /package/dist/{ai → skills}/utils.md +0 -0
- /package/dist/{ai → skills}/window.md +0 -0
package/dist/ai/INDEX.md
DELETED
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
# Schmancy AI Index
|
|
2
|
-
|
|
3
|
-
> Single-file navigation for AI agents. Foundations first, then components sorted by **what job they do**.
|
|
4
|
-
|
|
5
|
-
Schmancy is not just a component library. It's four concentric layers:
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
┌─ FOUNDATIONS ──────────────────────────────────────┐
|
|
9
|
-
│ Routing · State · Base class · Theme · Directives │
|
|
10
|
-
│ (Not components. The framework your app runs on.) │
|
|
11
|
-
├─ ATOMS ────────────────────────────────────────────┤
|
|
12
|
-
│ Typography · Icons · Surfaces · Buttons · Scroll │
|
|
13
|
-
│ (The vocabulary every screen repeats.) │
|
|
14
|
-
├─ COMPOSITES ───────────────────────────────────────┤
|
|
15
|
-
│ Forms · Navigation · Overlays · Feedback · Data │
|
|
16
|
-
│ (Job-specific components.) │
|
|
17
|
-
└─ UTILITIES ────────────────────────────────────────┘
|
|
18
|
-
Discovery · RxJS helpers · Search · Numbers · etc.
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
**Most of a Schmancy app is foundations + atoms + services.** Composites are reached for when a real user-facing job needs them. Start in that order.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
# Layer 1 — Foundations
|
|
26
|
-
|
|
27
|
-
These are the load-bearing pieces. Touch them wrong and everything above breaks.
|
|
28
|
-
|
|
29
|
-
## 1.1 Routing — `area` + `schmancy-area` + `schmancy-route`
|
|
30
|
-
**Job:** Control which component occupies a region of the screen, with browser history, guards, params, and lazy loading.
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
import { area, lazy } from '@mhmo91/schmancy'
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
```html
|
|
37
|
-
<schmancy-area name="root" .default=${lazy(() => import('./home.page'))}>
|
|
38
|
-
<schmancy-route when="home-page" .component=${lazy(() => import('./home.page'))} />
|
|
39
|
-
<schmancy-route when="dashboard"
|
|
40
|
-
.component=${lazy(() => import('./dashboard.page'))}
|
|
41
|
-
.guard=${firebaseAuth$.pipe(map(u => !!u), takeUntil(this.disconnecting))}
|
|
42
|
-
@redirect=${() => area.push({ area: 'root', component: 'home-page', historyStrategy: 'replace' })}
|
|
43
|
-
/>
|
|
44
|
-
</schmancy-area>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
- **Named areas**: multiple independent regions, 2-level nesting common (`name="root"` + `name="aria"` inside the outer shell).
|
|
48
|
-
- **Guards are Observables**: subscribe, emit `boolean`; when `false` a `redirect` event fires.
|
|
49
|
-
- **Lazy is mandatory** for route components — `lazy(() => import('...'))` returns a preloadable reference.
|
|
50
|
-
- **`when="tag-name"` must exactly match** `@customElement('tag-name')`.
|
|
51
|
-
- **Programmatic navigation**: `area.push({ area, component, params?, historyStrategy? })`.
|
|
52
|
-
- **Subscribe to route state**: `area.on('root').pipe(takeUntil(this.disconnecting)).subscribe(...)`.
|
|
53
|
-
|
|
54
|
-
→ Full doc: [area.md](./area.md)
|
|
55
|
-
|
|
56
|
-
## 1.2 State — `createContext` + `@select`
|
|
57
|
-
**Job:** App-wide reactive state with storage, without Redux boilerplate.
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
import { createContext, select } from '@mhmo91/schmancy'
|
|
61
|
-
|
|
62
|
-
// Declare once at module scope
|
|
63
|
-
export const userContext = createContext<User>(new User(), 'local', 'user')
|
|
64
|
-
export const sessionContext = createContext<Session>({}, 'session', 'session')
|
|
65
|
-
export const cacheContext = createContext<Map<string, Item>>(new Map(), 'memory', 'cache')
|
|
66
|
-
|
|
67
|
-
// Consume in a component — auto-subscribes and re-renders
|
|
68
|
-
@customElement('my-component')
|
|
69
|
-
class MyComponent extends $LitElement() {
|
|
70
|
-
@select(userContext) user!: User
|
|
71
|
-
|
|
72
|
-
firstUpdated() {
|
|
73
|
-
// Gate on readiness; chain with RxJS; clean up on disconnect
|
|
74
|
-
userContext.$.pipe(
|
|
75
|
-
filter(() => userContext.ready),
|
|
76
|
-
distinctUntilChanged((a, b) => a.id === b.id),
|
|
77
|
-
switchMap(u => this.loadForUser(u)),
|
|
78
|
-
takeUntil(this.disconnecting),
|
|
79
|
-
).subscribe()
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
- **Storage modes**: `'memory'` · `'local'` · `'session'` · `'indexeddb'`.
|
|
85
|
-
- **Collection-aware**: `Map` and `Array` contexts get `.set(k,v)`, `.delete(k)`, `.push(v)`, `.replace(...)` helpers.
|
|
86
|
-
- **`.ready`** is a boolean — gate async work behind `filter(() => ctx.ready)`.
|
|
87
|
-
- **`.$`** is a BehaviorSubject — compose with RxJS.
|
|
88
|
-
- **`.value`** is the synchronous snapshot.
|
|
89
|
-
- **`@selectItem`** for picking one entry from a collection context.
|
|
90
|
-
|
|
91
|
-
**Real architectures use many small contexts** (aria runs 9: user, organization, app state, templates, contacts, agents, compose, draft, strict) — not one monolith.
|
|
92
|
-
|
|
93
|
-
→ Full doc: [store.md](./store.md)
|
|
94
|
-
|
|
95
|
-
## 1.3 Base class — `$LitElement`
|
|
96
|
-
**Job:** Every Schmancy component extends this. It wires RxJS cleanup, Tailwind, and cross-shadow discovery into every element.
|
|
97
|
-
|
|
98
|
-
```typescript
|
|
99
|
-
import { $LitElement } from '@mhmo91/schmancy/mixins'
|
|
100
|
-
|
|
101
|
-
@customElement('my-component')
|
|
102
|
-
class MyComponent extends $LitElement(css`:host { display: block }`) {
|
|
103
|
-
connectedCallback() {
|
|
104
|
-
super.connectedCallback()
|
|
105
|
-
// The `disconnecting` Subject emits once on disconnect
|
|
106
|
-
myObservable$.pipe(takeUntil(this.disconnecting)).subscribe()
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
Provides: `disconnecting` (RxJS Subject) · `classMap()` (space-splitting) · `styleMap()` · `discover<T>(tag)` · Tailwind support · auto-response to discovery events.
|
|
112
|
-
|
|
113
|
-
**Rule of thumb:** if you're writing a Lit component inside a Schmancy app, extend `$LitElement`. No exceptions.
|
|
114
|
-
|
|
115
|
-
→ Full doc: [mixins.md](./mixins.md)
|
|
116
|
-
|
|
117
|
-
## 1.4 Theme — `schmancy-theme` + `theme` service
|
|
118
|
-
**Job:** Provide color scheme (dark/light), brand color, and CSS custom properties to everything below it.
|
|
119
|
-
|
|
120
|
-
```html
|
|
121
|
-
<schmancy-theme root scheme="dark" color="#6366F1">
|
|
122
|
-
<!-- entire app -->
|
|
123
|
-
</schmancy-theme>
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
- One `root` theme per app, typically wrapping `schmancy-surface type="solid" fill="all"`.
|
|
127
|
-
- Nested `<schmancy-theme>` can re-scope color/scheme for a subtree.
|
|
128
|
-
- CSS vars auto-generated: `--schmancy-sys-color-{role}-{variant}`.
|
|
129
|
-
- `theme.fullscreen$` — observable of viewport fullscreen state.
|
|
130
|
-
|
|
131
|
-
→ Full doc: [theme.md](./theme.md)
|
|
132
|
-
|
|
133
|
-
## 1.5 Directives — behavior without components
|
|
134
|
-
**Job:** Attach physics, effects, visibility, and interactions to *any* element via Lit directive syntax. 19 directives, modular imports.
|
|
135
|
-
|
|
136
|
-
```typescript
|
|
137
|
-
import { magnetic, cursorGlow, gravity, reveal, animateText, tooltip, drag, drop } from '@mhmo91/schmancy/directives'
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
```html
|
|
141
|
-
<schmancy-card ${cursorGlow()} ${gravity({ stagger: 100 })}>...</schmancy-card>
|
|
142
|
-
<div ${reveal(this.expanded, { preset: 'smooth' })}>expandable content</div>
|
|
143
|
-
<span ${animateText({ animation: 'blur-reveal' })}>Hello</span>
|
|
144
|
-
<button ${tooltip('Save your changes')}>Save</button>
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
Categories:
|
|
148
|
-
- **Physics**: `magnetic`, `cursorGlow`, `livingBorder`, `gravity`, `depthOfField`, `longPress`
|
|
149
|
-
- **Effects**: `nebula`, `liquid`, `ripple`
|
|
150
|
-
- **Text**: `animateText`, `cycleText`, `typewriter`
|
|
151
|
-
- **Visibility**: `reveal`, `intersect`
|
|
152
|
-
- **Interaction**: `drag`, `drop`, `color`, `tooltip`
|
|
153
|
-
|
|
154
|
-
→ Full doc: [directives.md](./directives.md)
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
# Layer 2 — Atoms
|
|
159
|
-
|
|
160
|
-
The display vocabulary. You'll use these on nearly every screen.
|
|
161
|
-
|
|
162
|
-
| Job | Tag | Doc |
|
|
163
|
-
|-----|-----|-----|
|
|
164
|
-
| **Text** | `schmancy-typography` | [typography](./typography.md) |
|
|
165
|
-
| **Iconography** | `schmancy-icon`, `schmancy-icon-button` | [icons](./icons.md), [button](./button.md) |
|
|
166
|
-
| **Primary actions** | `schmancy-button` | [button](./button.md) |
|
|
167
|
-
| **Glass depth container** | `schmancy-surface` | [surface](./surface.md) |
|
|
168
|
-
| **Scroll region** | `schmancy-scroll` | [layout](./layout.md) |
|
|
169
|
-
| **Visual separation** | `schmancy-divider` | [divider](./divider.md) |
|
|
170
|
-
| **Profile image** | `schmancy-avatar` | [avatar](./avatar.md) |
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
# Layer 3 — Composites (sorted by job)
|
|
175
|
-
|
|
176
|
-
## Forms — collect input
|
|
177
|
-
| Job | Tag | Doc |
|
|
178
|
-
|-----|-----|-----|
|
|
179
|
-
| Validation container | `schmancy-form` | [form](./form.md) |
|
|
180
|
-
| Single-line text | `schmancy-input` | [input](./input.md) |
|
|
181
|
-
| Multi-line text | `schmancy-textarea` | [textarea](./textarea.md) |
|
|
182
|
-
| Single-choice dropdown | `schmancy-select` + `schmancy-option` | [select](./select.md), [option](./option.md) |
|
|
183
|
-
| Searchable dropdown | `schmancy-autocomplete` | [autocomplete](./autocomplete.md) |
|
|
184
|
-
| Boolean | `schmancy-checkbox` | [checkbox](./checkbox.md) |
|
|
185
|
-
| One-of-many | `schmancy-radio-group` | [radio-group](./radio-group.md) |
|
|
186
|
-
| Multi-select tags / filters | `schmancy-chips` | [chips](./chips.md) |
|
|
187
|
-
| Date / date range | `schmancy-date-range`, `schmancy-date-range-inline` | [date-range](./date-range.md), [date-range-inline](./date-range-inline.md) |
|
|
188
|
-
| Numeric slider | `schmancy-range` | [range](./range.md) |
|
|
189
|
-
| Country / timezone | `schmancy-select-countries`, `schmancy-select-timezones` | [extra](./extra.md) |
|
|
190
|
-
|
|
191
|
-
## Navigation — structural layout
|
|
192
|
-
| Job | Tag | Doc |
|
|
193
|
-
|-----|-----|-----|
|
|
194
|
-
| App shell with side drawer | `schmancy-nav-drawer` (+ navbar, content) | [nav-drawer](./nav-drawer.md) |
|
|
195
|
-
| Tabbed sub-views | `schmancy-tabs` | [tabs](./tabs.md) |
|
|
196
|
-
| Mobile bottom nav | `schmancy-navigation-bar` | [navigation-bar](./navigation-bar.md) |
|
|
197
|
-
| Desktop side rail | `schmancy-navigation-rail` | [navigation-rail](./navigation-rail.md) |
|
|
198
|
-
| Multi-step flow | `schmancy-steps` | [steps](./steps.md) |
|
|
199
|
-
| Master-detail split | `schmancy-content-drawer` | [content-drawer](./content-drawer.md) |
|
|
200
|
-
| Viewport-aware page root | `schmancy-page` | [page](./page.md) |
|
|
201
|
-
| Floating draggable panel | `schmancy-window`, `schmancy-boat`, `schmancy-float` | [window](./window.md), [boat](./boat.md), [float](./float.md) |
|
|
202
|
-
| FLIP transition between views | `schmancy-teleport` | [teleport](./teleport.md) |
|
|
203
|
-
|
|
204
|
-
## Overlays — temporarily above everything (services preferred)
|
|
205
|
-
| Job | API | Fallback tag | Doc |
|
|
206
|
-
|-----|-----|--------------|-----|
|
|
207
|
-
| Modal / confirm | **`$dialog()` service** | `schmancy-dialog` | [dialog](./dialog.md) |
|
|
208
|
-
| Toast / banner | **`$notify()` service** | `schmancy-notification` | [notification](./notification.md) |
|
|
209
|
-
| Side/bottom panel | **`schmancyContentDrawer.open()`** | `schmancy-sheet` | [sheet](./sheet.md) |
|
|
210
|
-
| Context menu | `schmancy-menu` | — | [menu](./menu.md) |
|
|
211
|
-
| Floating panel | `schmancy-dropdown` | — | [dropdown](./dropdown.md) |
|
|
212
|
-
| Hover hint | `tooltip` directive | `schmancy-tooltip` | [tooltip](./tooltip.md), [directives](./directives.md) |
|
|
213
|
-
| Image gallery | `schmancy-lightbox` | — | [lightbox](./lightbox.md) |
|
|
214
|
-
| Accordion | `schmancy-expand` | `schmancy-details` | [expand](./expand.md), [details](./details.md) |
|
|
215
|
-
|
|
216
|
-
**Service > component for overlays.** Real apps call `$dialog()` / `$notify()` / `schmancyContentDrawer.open()` hundreds of times — managing overlay lifecycle imperatively keeps templates clean.
|
|
217
|
-
|
|
218
|
-
## Interaction — actionable content
|
|
219
|
-
| Job | Tag | Doc |
|
|
220
|
-
|-----|-----|-----|
|
|
221
|
-
| Clickable container | `schmancy-card` | [card](./card.md) |
|
|
222
|
-
| Selectable list | `schmancy-list` + `schmancy-list-item` | [list](./list.md) |
|
|
223
|
-
| Expandable row | `schmancy-details` | [details](./details.md) |
|
|
224
|
-
| Tabular data | `schmancy-table` | [table](./table.md) |
|
|
225
|
-
| Hierarchical data | `schmancy-tree` | [tree](./tree.md) |
|
|
226
|
-
| Carousel | `schmancy-slider` + `schmancy-slide` | [slider](./slider.md) |
|
|
227
|
-
| Camera QR scan | `schmancy-qr-scanner` | [qr-scanner](./qr-scanner.md) |
|
|
228
|
-
|
|
229
|
-
## Feedback — status / progress
|
|
230
|
-
| Job | Tag | Doc |
|
|
231
|
-
|-----|-----|-----|
|
|
232
|
-
| Linear progress | `schmancy-progress` | [progress](./progress.md) |
|
|
233
|
-
| Spinner / skeleton overlay | `schmancy-busy` | [busy](./busy.md) |
|
|
234
|
-
| Status indicator | `schmancy-badge` | [badge](./badge.md) |
|
|
235
|
-
| Online/offline banner | `schmancy-connectivity-status` | [connectivity](./connectivity.md) |
|
|
236
|
-
| Deferred render with stagger | `schmancy-delay` | [delay](./delay.md) |
|
|
237
|
-
|
|
238
|
-
## Rich display — specialized rendering
|
|
239
|
-
| Job | Tag | Doc |
|
|
240
|
-
|-----|-----|-----|
|
|
241
|
-
| Syntax-highlighted code | `schmancy-code-highlight` | [code-highlight](./code-highlight.md) |
|
|
242
|
-
| Typewriter reveal | `schmancy-typewriter` | [typewriter](./typewriter.md) |
|
|
243
|
-
| JSON viewer (debug) | `schmancy-json` | [json](./json.md) |
|
|
244
|
-
| Sandboxed iframe | `schmancy-iframe` | [iframe](./iframe.md) |
|
|
245
|
-
| Google Maps | `schmancy-map` | [map](./map.md) |
|
|
246
|
-
| Area chart | `schmancy-area-chart` | [charts](./charts.md) |
|
|
247
|
-
| Horizontal pills chart | `schmancy-pills` | [charts](./charts.md) |
|
|
248
|
-
| Theme toggle button | `schmancy-theme-button` | [theme-button](./theme-button.md) |
|
|
249
|
-
|
|
250
|
-
## Domain — specific to a workflow
|
|
251
|
-
| Job | Tag | Doc |
|
|
252
|
-
|-----|-----|-----|
|
|
253
|
-
| Email composition | `schmancy-mailbox` (+ 5 sub-tags) | [mailbox](./mailbox.md) |
|
|
254
|
-
|
|
255
|
-
## Layout primitives (prefer Tailwind for new code)
|
|
256
|
-
| Job | Tag | Doc |
|
|
257
|
-
|-----|-----|-----|
|
|
258
|
-
| Grid / flex / scroll | `schmancy-grid`, `schmancy-flex`, `schmancy-scroll`, `sch-grid`, `sch-flex` | [layout](./layout.md) |
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
# Layer 4 — Utilities (non-component)
|
|
263
|
-
|
|
264
|
-
| Module | Purpose | Doc |
|
|
265
|
-
|--------|---------|-----|
|
|
266
|
-
| Audio | Synthesized emotional sounds (`sound.play('joyful')`) | [audio](./audio.md) |
|
|
267
|
-
| Discovery | Cross-shadow-DOM component lookup | [discovery](./discovery.md) |
|
|
268
|
-
| RxJS utils | `waitForElement`, `waitUntil`, `mutationObserver` | [rxjs-utils](./rxjs-utils.md) |
|
|
269
|
-
| Utils | `similarity`, `numbers`, `overlayStack`, `intersection$`, `hashContent` | [utils](./utils.md) |
|
|
270
|
-
| Animation | Spring presets, `createAnimation`, Tailwind integration | [animation](./animation.md) |
|
|
271
|
-
|
|
272
|
-
---
|
|
273
|
-
|
|
274
|
-
# The 80/20 cheat sheet
|
|
275
|
-
|
|
276
|
-
If you're new to Schmancy and shipping a screen today, reach for these in this order:
|
|
277
|
-
|
|
278
|
-
1. **Wrap the app** in `<schmancy-theme root>` + `<schmancy-surface type="solid" fill="all">` + `<schmancy-scroll>`.
|
|
279
|
-
2. **Route** with `<schmancy-area name="root">` + `<schmancy-route>` + `lazy()`.
|
|
280
|
-
3. **Store** state in `createContext(..., 'local')` + `@select` in components.
|
|
281
|
-
4. **Extend** `$LitElement` in every component. Use `takeUntil(this.disconnecting)` for every subscription.
|
|
282
|
-
5. **Compose screens** from atoms: `schmancy-typography`, `schmancy-icon`, `schmancy-button`, `schmancy-surface`, `schmancy-divider`.
|
|
283
|
-
6. **Forms**: `schmancy-input` + `schmancy-chips` + `schmancy-checkbox` + `schmancy-form`. Reach for `schmancy-select` / `schmancy-autocomplete` only when needed.
|
|
284
|
-
7. **Overlays**: `$dialog()` + `$notify()` + `schmancyContentDrawer.open()` — service APIs, not template tags.
|
|
285
|
-
8. **Effects**: reach for `cursorGlow`, `magnetic`, `reveal`, `animateText` directives before writing CSS animations.
|
|
286
|
-
|
|
287
|
-
Everything else is demand-driven.
|
|
288
|
-
|
|
289
|
-
---
|
|
290
|
-
|
|
291
|
-
# Conventions (enforce these)
|
|
292
|
-
|
|
293
|
-
- **Lists use `repeat(items, item => item.id, tpl)`** — never `.map()` in templates.
|
|
294
|
-
- **View switching uses `cache(...)`** — preserves DOM and state.
|
|
295
|
-
- **Expensive work uses `guard([deps], fn)`** — memoizes against identity changes.
|
|
296
|
-
- **DOM access uses `ref(createRef())`** — never `querySelector` for own shadow tree if a ref will do.
|
|
297
|
-
- **Conditionals use `when(...)` / `choose(...)` / `ifDefined(...)`** — cleaner than ternaries.
|
|
298
|
-
- **All subscriptions use `.pipe(takeUntil(this.disconnecting))`** — no manual unsubscribe.
|
|
299
|
-
- **No `setTimeout` / `setInterval` / `addEventListener`** — use RxJS (`timer`, `interval`, `fromEvent`).
|
|
300
|
-
- **No hardcoded colors** — use `--schmancy-sys-color-*` CSS vars or Tailwind theme classes.
|
|
301
|
-
- **No mixing `classMap` with string interpolation** — it must be the sole expression in `class=`.
|
|
302
|
-
- **ARIA wiring on combobox forms**: `role="combobox"` + `aria-haspopup="listbox"` + `aria-expanded` + `aria-controls` + a `#live-status` live region.
|
|
303
|
-
- **Overlay z-index**: always go through `overlayStack` (dialogs/sheets/windows already do).
|
|
304
|
-
|
|
305
|
-
---
|
|
306
|
-
|
|
307
|
-
# Services reference (import these by name)
|
|
308
|
-
|
|
309
|
-
| Service | From | Purpose |
|
|
310
|
-
|---------|------|---------|
|
|
311
|
-
| `area` | `@mhmo91/schmancy` | Router imperative API |
|
|
312
|
-
| `$dialog` | `@mhmo91/schmancy` | Modal/confirm dialogs |
|
|
313
|
-
| `$notify` | `@mhmo91/schmancy` | Toast notifications |
|
|
314
|
-
| `schmancyContentDrawer` | `@mhmo91/schmancy` | Side panel |
|
|
315
|
-
| `theme` | `@mhmo91/schmancy` | Theme state + fullscreen$ |
|
|
316
|
-
| `sound` | `@mhmo91/schmancy` | Emotional sounds |
|
|
317
|
-
| `overlayStack` | `@mhmo91/schmancy` | Z-index coordinator |
|
|
318
|
-
| `windowManager` | `@mhmo91/schmancy/window` | Window registry |
|
|
319
|
-
| `teleportationService` | `@mhmo91/schmancy/teleport` | Teleport coordination |
|
|
320
|
-
| `reducedMotion$` | `@mhmo91/schmancy/directives` | Reactive reduced-motion preference |
|
|
321
|
-
| `fromResizeObserver` | `@mhmo91/schmancy/directives` | RxJS ResizeObserver |
|
package/dist/ai/area.md
DELETED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
# Area — Routing Foundation
|
|
2
|
-
|
|
3
|
-
> **Not just a component. The routing framework your app runs on.**
|
|
4
|
-
> `area` is the imperative API. `schmancy-area` is the region where a component lives. `schmancy-route` declares the options.
|
|
5
|
-
|
|
6
|
-
Routing in Schmancy is four things working together:
|
|
7
|
-
|
|
8
|
-
| Piece | Role |
|
|
9
|
-
|-------|------|
|
|
10
|
-
| `<schmancy-area name="...">` | Declares a named region of the screen |
|
|
11
|
-
| `<schmancy-route when="tag">` | Declares which component can occupy it |
|
|
12
|
-
| `area.push(...)` | Imperative navigation (click handlers, guards, effects) |
|
|
13
|
-
| `lazy(() => import('...'))` | Code-split route components |
|
|
14
|
-
|
|
15
|
-
## The Shape of a Real App
|
|
16
|
-
|
|
17
|
-
Real apps nest areas. Outer `name="root"` handles public vs. authenticated. Inner `name="aria"` handles sub-views inside the authenticated shell.
|
|
18
|
-
|
|
19
|
-
```typescript
|
|
20
|
-
// app root — handles sign-in / public / authenticated
|
|
21
|
-
@customElement('my-app')
|
|
22
|
-
class MyApp extends $LitElement() {
|
|
23
|
-
render() {
|
|
24
|
-
return html`
|
|
25
|
-
<schmancy-theme root scheme="dark">
|
|
26
|
-
<schmancy-surface type="solid" fill="all">
|
|
27
|
-
<schmancy-scroll>
|
|
28
|
-
<schmancy-area
|
|
29
|
-
name="root"
|
|
30
|
-
.default=${lazy(() => import('./pages/landing.page'))}
|
|
31
|
-
>
|
|
32
|
-
<schmancy-route when="landing-page"
|
|
33
|
-
.component=${lazy(() => import('./pages/landing.page'))}
|
|
34
|
-
></schmancy-route>
|
|
35
|
-
|
|
36
|
-
<schmancy-route when="methodology-page"
|
|
37
|
-
.component=${lazy(() => import('./pages/methodology.page'))}
|
|
38
|
-
></schmancy-route>
|
|
39
|
-
|
|
40
|
-
<!-- Guarded route -->
|
|
41
|
-
<schmancy-route when="app-index"
|
|
42
|
-
.component=${lazy(() => import('./app/app.page'))}
|
|
43
|
-
.guard=${firebaseAuthState$.pipe(
|
|
44
|
-
map(u => !!u && !u.isAnonymous),
|
|
45
|
-
takeUntil(this.disconnecting),
|
|
46
|
-
)}
|
|
47
|
-
@redirect=${() => area.push({
|
|
48
|
-
component: 'landing-page',
|
|
49
|
-
area: 'root',
|
|
50
|
-
historyStrategy: 'replace',
|
|
51
|
-
})}
|
|
52
|
-
></schmancy-route>
|
|
53
|
-
</schmancy-area>
|
|
54
|
-
</schmancy-scroll>
|
|
55
|
-
</schmancy-surface>
|
|
56
|
-
</schmancy-theme>
|
|
57
|
-
`
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
```typescript
|
|
63
|
-
// nested area — inside the app shell
|
|
64
|
-
render() {
|
|
65
|
-
return html`
|
|
66
|
-
<schmancy-nav-drawer>
|
|
67
|
-
<schmancy-nav-drawer-navbar width="180px">
|
|
68
|
-
<schmancy-list-item @click=${() => area.push({ area: 'aria', component: 'aria-agents-page' })}>
|
|
69
|
-
Agents
|
|
70
|
-
</schmancy-list-item>
|
|
71
|
-
<schmancy-list-item @click=${() => area.push({ area: 'aria', component: 'aria-knowledge-page' })}>
|
|
72
|
-
Knowledge
|
|
73
|
-
</schmancy-list-item>
|
|
74
|
-
</schmancy-nav-drawer-navbar>
|
|
75
|
-
|
|
76
|
-
<schmancy-nav-drawer-content>
|
|
77
|
-
<schmancy-area name="aria" default="aria-knowledge-page">
|
|
78
|
-
<schmancy-route when="aria-agents-page" .component=${lazy(() => import('./pages/agents'))}></schmancy-route>
|
|
79
|
-
<schmancy-route when="aria-knowledge-page" .component=${lazy(() => import('./pages/knowledge'))}></schmancy-route>
|
|
80
|
-
<schmancy-route when="aria-templates-page" .component=${lazy(() => import('./pages/templates'))}></schmancy-route>
|
|
81
|
-
</schmancy-area>
|
|
82
|
-
</schmancy-nav-drawer-content>
|
|
83
|
-
</schmancy-nav-drawer>
|
|
84
|
-
`
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## `schmancy-area` Properties
|
|
89
|
-
|
|
90
|
-
| Property | Type | Required | Description |
|
|
91
|
-
|----------|------|----------|-------------|
|
|
92
|
-
| `name` | string | ✅ | Unique area identifier referenced in `area.push({ area: name })` |
|
|
93
|
-
| `default` | `RouteComponent \| string` | — | Fallback when no route matches — prefer `lazy()` |
|
|
94
|
-
|
|
95
|
-
## `schmancy-route` Properties
|
|
96
|
-
|
|
97
|
-
| Property | Type | Required | Description |
|
|
98
|
-
|----------|------|----------|-------------|
|
|
99
|
-
| `when` | string | ✅ | **Must exactly match** a `@customElement('tag')` tag name |
|
|
100
|
-
| `component` | `RouteComponent` | ✅ | Class, tag name, or `lazy()` wrapper |
|
|
101
|
-
| `guard` | `Observable<boolean>` | — | When emits `false`, route blocks and fires `@redirect` |
|
|
102
|
-
| `exact` | boolean | — | Strict-equality matching |
|
|
103
|
-
|
|
104
|
-
## `area` service (imperative API)
|
|
105
|
-
|
|
106
|
-
```typescript
|
|
107
|
-
import { area } from '@mhmo91/schmancy'
|
|
108
|
-
|
|
109
|
-
area.push({
|
|
110
|
-
area: 'root', // target area name
|
|
111
|
-
component: 'app-index', // tag name (or class reference)
|
|
112
|
-
params?: { id: '123' }, // pushed onto area.params()
|
|
113
|
-
historyStrategy?: 'push' | 'replace' | 'silent',
|
|
114
|
-
})
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
`historyStrategy`:
|
|
118
|
-
- `'push'` (default) — browser back button returns to previous route
|
|
119
|
-
- `'replace'` — overwrites current history entry (use after guards / redirects)
|
|
120
|
-
- `'silent'` — changes the area without adding any history (transient state)
|
|
121
|
-
|
|
122
|
-
### Subscribe to route state
|
|
123
|
-
```typescript
|
|
124
|
-
connectedCallback() {
|
|
125
|
-
super.connectedCallback()
|
|
126
|
-
|
|
127
|
-
area.on('root').pipe(
|
|
128
|
-
takeUntil(this.disconnecting),
|
|
129
|
-
).subscribe(route => {
|
|
130
|
-
console.log('root area is now:', route.component)
|
|
131
|
-
})
|
|
132
|
-
|
|
133
|
-
area.params<{ id: string }>('detail').pipe(
|
|
134
|
-
takeUntil(this.disconnecting),
|
|
135
|
-
).subscribe(params => this.loadItem(params.id))
|
|
136
|
-
}
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Lazy Loading
|
|
140
|
-
|
|
141
|
-
Code-split your routes. `lazy()` returns a preloadable reference.
|
|
142
|
-
|
|
143
|
-
```typescript
|
|
144
|
-
import { lazy } from '@mhmo91/schmancy'
|
|
145
|
-
|
|
146
|
-
const HomePage = lazy(() => import('./home.page'))
|
|
147
|
-
|
|
148
|
-
// Optional: preload on hover
|
|
149
|
-
<schmancy-button
|
|
150
|
-
@mouseenter=${() => HomePage.preload()}
|
|
151
|
-
@click=${() => area.push({ area: 'root', component: 'home-page' })}
|
|
152
|
-
>
|
|
153
|
-
Home
|
|
154
|
-
</schmancy-button>
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
## Guards — the production pattern
|
|
158
|
-
|
|
159
|
-
Guards are **RxJS Observables**, not booleans. This lets auth state flow through naturally.
|
|
160
|
-
|
|
161
|
-
```typescript
|
|
162
|
-
import { firebaseAuthState$ } from './contexts/user.context'
|
|
163
|
-
|
|
164
|
-
<schmancy-route when="app-index"
|
|
165
|
-
.component=${lazy(() => import('./app/app.page'))}
|
|
166
|
-
.guard=${firebaseAuthState$.pipe(
|
|
167
|
-
map(user => !!user && !user.isAnonymous),
|
|
168
|
-
takeUntil(this.disconnecting),
|
|
169
|
-
)}
|
|
170
|
-
@redirect=${() => area.push({
|
|
171
|
-
component: 'landing-page',
|
|
172
|
-
area: 'root',
|
|
173
|
-
historyStrategy: 'replace',
|
|
174
|
-
})}
|
|
175
|
-
></schmancy-route>
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
- `guard` emits `true` → route renders.
|
|
179
|
-
- `guard` emits `false` → Schmancy fires a `redirect` event on the route; handle it with `area.push(...)` using `historyStrategy: 'replace'` so the blocked route doesn't stay in history.
|
|
180
|
-
|
|
181
|
-
## Rules
|
|
182
|
-
|
|
183
|
-
1. `when="tag-name"` **must exactly match** `@customElement('tag-name')` on the component's class.
|
|
184
|
-
2. Every route component should extend `$LitElement` and use `takeUntil(this.disconnecting)` in subscriptions.
|
|
185
|
-
3. Route components are responsible for their own scroll/focus handling on mount.
|
|
186
|
-
4. When calling `area.push` after auth guards or side-effectful redirects, use `historyStrategy: 'replace'`.
|
|
187
|
-
5. Nested areas are not just allowed — they're the default for any app with a shell + sub-views.
|
|
188
|
-
|
|
189
|
-
## Common recipes
|
|
190
|
-
|
|
191
|
-
### Redirect after sign-in
|
|
192
|
-
```typescript
|
|
193
|
-
await signIn(email, password)
|
|
194
|
-
area.push({ component: 'app-index', area: 'root', historyStrategy: 'replace' })
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
### Silent state swap (no history pollution)
|
|
198
|
-
```typescript
|
|
199
|
-
// e.g. swapping between auth screens without adding history
|
|
200
|
-
area.push({ component: 'signup-form', area: 'sign', historyStrategy: 'silent' })
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
### Click-driven sub-nav
|
|
204
|
-
```typescript
|
|
205
|
-
<schmancy-list-item @click=${() => area.push({ area: 'aria', component: 'aria-agents-page' })}>
|
|
206
|
-
Agents
|
|
207
|
-
</schmancy-list-item>
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
### Preload routes on hover
|
|
211
|
-
```typescript
|
|
212
|
-
const DashboardPage = lazy(() => import('./dashboard.page'))
|
|
213
|
-
|
|
214
|
-
html`<a @mouseenter=${() => DashboardPage.preload()} @click=${() => area.push({ area: 'root', component: 'dashboard-page' })}>Dashboard</a>`
|
|
215
|
-
```
|