godown 2.7.7 → 3.0.0-canary.1
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/README.md +44 -80
- package/alert.d.ts +2 -3
- package/alert.d.ts.map +1 -1
- package/alert.js +5 -4
- package/alert.js.map +1 -1
- package/avatar.d.ts +2 -3
- package/avatar.d.ts.map +1 -1
- package/avatar.js +5 -4
- package/avatar.js.map +1 -1
- package/breath.d.ts +9 -0
- package/breath.d.ts.map +1 -0
- package/breath.js +6 -0
- package/breath.js.map +1 -0
- package/button.d.ts +2 -3
- package/button.d.ts.map +1 -1
- package/button.js +5 -4
- package/button.js.map +1 -1
- package/card.d.ts +2 -3
- package/card.d.ts.map +1 -1
- package/card.js +5 -4
- package/card.js.map +1 -1
- package/carousel.d.ts +2 -3
- package/carousel.d.ts.map +1 -1
- package/carousel.js +5 -4
- package/carousel.js.map +1 -1
- package/components/alert.d.ts +50 -0
- package/components/alert.d.ts.map +1 -0
- package/components/alert.js +167 -0
- package/components/alert.js.map +1 -0
- package/components/avatar.d.ts +26 -0
- package/components/avatar.d.ts.map +1 -0
- package/components/avatar.js +62 -0
- package/components/avatar.js.map +1 -0
- package/components/breath.d.ts +34 -0
- package/components/breath.d.ts.map +1 -0
- package/components/breath.js +80 -0
- package/components/breath.js.map +1 -0
- package/{web-components/button → components}/button.d.ts +6 -5
- package/components/button.d.ts.map +1 -0
- package/components/button.js +167 -0
- package/components/button.js.map +1 -0
- package/components/card.d.ts +20 -0
- package/components/card.d.ts.map +1 -0
- package/components/card.js +55 -0
- package/components/card.js.map +1 -0
- package/components/carousel.d.ts +40 -0
- package/components/carousel.d.ts.map +1 -0
- package/components/carousel.js +113 -0
- package/components/carousel.js.map +1 -0
- package/{web-components/details → components}/details.d.ts +5 -3
- package/components/details.d.ts.map +1 -0
- package/components/details.js +50 -0
- package/components/details.js.map +1 -0
- package/components/dialog.d.ts +33 -0
- package/components/dialog.d.ts.map +1 -0
- package/components/dialog.js +92 -0
- package/components/dialog.js.map +1 -0
- package/components/divider.d.ts +17 -0
- package/components/divider.d.ts.map +1 -0
- package/components/divider.js +37 -0
- package/components/divider.js.map +1 -0
- package/{web-components/wrapper → components}/dragbox.d.ts +15 -5
- package/components/dragbox.d.ts.map +1 -0
- package/components/dragbox.js +110 -0
- package/components/dragbox.js.map +1 -0
- package/components/flex.d.ts +31 -0
- package/components/flex.d.ts.map +1 -0
- package/components/flex.js +55 -0
- package/components/flex.js.map +1 -0
- package/{web-components/form → components}/form.d.ts +4 -2
- package/components/form.d.ts.map +1 -0
- package/components/form.js +78 -0
- package/components/form.js.map +1 -0
- package/components/grid.d.ts +31 -0
- package/components/grid.d.ts.map +1 -0
- package/components/grid.js +56 -0
- package/components/grid.js.map +1 -0
- package/components/input.d.ts +20 -0
- package/components/input.d.ts.map +1 -0
- package/components/input.js +54 -0
- package/components/input.js.map +1 -0
- package/components/layout.d.ts +29 -0
- package/components/layout.d.ts.map +1 -0
- package/components/layout.js +48 -0
- package/components/layout.js.map +1 -0
- package/components/link.d.ts +20 -0
- package/components/link.d.ts.map +1 -0
- package/components/link.js +43 -0
- package/components/link.js.map +1 -0
- package/{web-components/progress → components}/progress.d.ts +5 -3
- package/components/progress.d.ts.map +1 -0
- package/components/progress.js +68 -0
- package/components/progress.js.map +1 -0
- package/components/range.d.ts +60 -0
- package/components/range.d.ts.map +1 -0
- package/components/range.js +193 -0
- package/components/range.js.map +1 -0
- package/{web-components/wrapper → components}/rotate.d.ts +4 -8
- package/components/rotate.d.ts.map +1 -0
- package/components/rotate.js +57 -0
- package/components/rotate.js.map +1 -0
- package/components/router.d.ts +121 -0
- package/components/router.d.ts.map +1 -0
- package/components/router.js +251 -0
- package/components/router.js.map +1 -0
- package/components/select.d.ts +50 -0
- package/components/select.d.ts.map +1 -0
- package/components/select.js +211 -0
- package/components/select.js.map +1 -0
- package/{web-components/skeleton → components}/skeleton.d.ts +6 -6
- package/components/skeleton.d.ts.map +1 -0
- package/components/skeleton.js +56 -0
- package/components/skeleton.js.map +1 -0
- package/components/split.d.ts +32 -0
- package/components/split.d.ts.map +1 -0
- package/components/split.js +121 -0
- package/components/split.js.map +1 -0
- package/{web-components/input/switch-input.d.ts → components/switch.d.ts} +9 -10
- package/components/switch.d.ts.map +1 -0
- package/components/switch.js +93 -0
- package/components/switch.js.map +1 -0
- package/{web-components/text → components}/text.d.ts +5 -3
- package/components/text.d.ts.map +1 -0
- package/components/text.js +44 -0
- package/components/text.js.map +1 -0
- package/{web-components/text → components}/time.d.ts +5 -3
- package/components/time.d.ts.map +1 -0
- package/components/time.js +139 -0
- package/components/time.js.map +1 -0
- package/components/tooltip.d.ts +38 -0
- package/components/tooltip.d.ts.map +1 -0
- package/components/tooltip.js +67 -0
- package/components/tooltip.js.map +1 -0
- package/{web-components/text → components}/typewriter.d.ts +5 -3
- package/components/typewriter.d.ts.map +1 -0
- package/components/typewriter.js +130 -0
- package/components/typewriter.js.map +1 -0
- package/core/global-style.d.ts +21 -0
- package/core/global-style.d.ts.map +1 -0
- package/core/global-style.js +46 -0
- package/core/global-style.js.map +1 -0
- package/core/super-anchor.d.ts +15 -0
- package/core/super-anchor.d.ts.map +1 -0
- package/core/super-anchor.js +39 -0
- package/core/super-anchor.js.map +1 -0
- package/core/super-input.d.ts +39 -0
- package/core/super-input.d.ts.map +1 -0
- package/core/super-input.js +115 -0
- package/core/super-input.js.map +1 -0
- package/{proto → core}/super-openable.d.ts +4 -8
- package/core/super-openable.d.ts.map +1 -0
- package/core/super-openable.js +38 -0
- package/core/super-openable.js.map +1 -0
- package/custom-elements.json +1 -0
- package/details.d.ts +2 -3
- package/details.d.ts.map +1 -1
- package/details.js +5 -4
- package/details.js.map +1 -1
- package/dev/alert.d.ts +8 -0
- package/dev/alert.d.ts.map +1 -0
- package/dev/alert.js +4 -0
- package/dev/alert.js.map +1 -0
- package/dev/avatar.d.ts +8 -0
- package/dev/avatar.d.ts.map +1 -0
- package/dev/avatar.js +4 -0
- package/dev/avatar.js.map +1 -0
- package/dev/breath.d.ts +9 -0
- package/dev/breath.d.ts.map +1 -0
- package/dev/breath.js +5 -0
- package/dev/breath.js.map +1 -0
- package/dev/button.d.ts +8 -0
- package/dev/button.d.ts.map +1 -0
- package/dev/button.js +4 -0
- package/dev/button.js.map +1 -0
- package/dev/card.d.ts +8 -0
- package/dev/card.d.ts.map +1 -0
- package/dev/card.js +4 -0
- package/dev/card.js.map +1 -0
- package/dev/carousel.d.ts +8 -0
- package/dev/carousel.d.ts.map +1 -0
- package/dev/carousel.js +4 -0
- package/dev/carousel.js.map +1 -0
- package/dev/components/alert.d.ts +50 -0
- package/dev/components/alert.d.ts.map +1 -0
- package/dev/components/alert.js +234 -0
- package/dev/components/alert.js.map +1 -0
- package/dev/components/avatar.d.ts +26 -0
- package/dev/components/avatar.d.ts.map +1 -0
- package/dev/components/avatar.js +91 -0
- package/dev/components/avatar.js.map +1 -0
- package/dev/components/breath.d.ts +34 -0
- package/dev/components/breath.d.ts.map +1 -0
- package/dev/components/breath.js +133 -0
- package/dev/components/breath.js.map +1 -0
- package/dev/components/button.d.ts +45 -0
- package/dev/components/button.d.ts.map +1 -0
- package/{web-components/button → dev/components}/button.js +76 -76
- package/dev/components/button.js.map +1 -0
- package/dev/components/card.d.ts +20 -0
- package/dev/components/card.d.ts.map +1 -0
- package/dev/components/card.js +89 -0
- package/dev/components/card.js.map +1 -0
- package/dev/components/carousel.d.ts +40 -0
- package/dev/components/carousel.d.ts.map +1 -0
- package/dev/components/carousel.js +155 -0
- package/dev/components/carousel.js.map +1 -0
- package/dev/components/details.d.ts +20 -0
- package/dev/components/details.d.ts.map +1 -0
- package/dev/components/details.js +115 -0
- package/dev/components/details.js.map +1 -0
- package/dev/components/dialog.d.ts +33 -0
- package/dev/components/dialog.d.ts.map +1 -0
- package/dev/components/dialog.js +154 -0
- package/dev/components/dialog.js.map +1 -0
- package/dev/components/divider.d.ts +17 -0
- package/dev/components/divider.d.ts.map +1 -0
- package/dev/components/divider.js +46 -0
- package/dev/components/divider.js.map +1 -0
- package/dev/components/dragbox.d.ts +40 -0
- package/dev/components/dragbox.d.ts.map +1 -0
- package/{web-components/wrapper → dev/components}/dragbox.js +27 -15
- package/dev/components/dragbox.js.map +1 -0
- package/dev/components/flex.d.ts +31 -0
- package/dev/components/flex.d.ts.map +1 -0
- package/dev/components/flex.js +52 -0
- package/dev/components/flex.js.map +1 -0
- package/dev/components/form.d.ts +24 -0
- package/dev/components/form.d.ts.map +1 -0
- package/{web-components/form → dev/components}/form.js +11 -11
- package/dev/components/form.js.map +1 -0
- package/dev/components/grid.d.ts +31 -0
- package/dev/components/grid.d.ts.map +1 -0
- package/dev/components/grid.js +53 -0
- package/dev/components/grid.js.map +1 -0
- package/dev/components/input.d.ts +20 -0
- package/dev/components/input.d.ts.map +1 -0
- package/dev/components/input.js +89 -0
- package/dev/components/input.js.map +1 -0
- package/dev/components/layout.d.ts +29 -0
- package/dev/components/layout.d.ts.map +1 -0
- package/dev/components/layout.js +69 -0
- package/dev/components/layout.js.map +1 -0
- package/dev/components/link.d.ts +20 -0
- package/dev/components/link.d.ts.map +1 -0
- package/dev/components/link.js +40 -0
- package/dev/components/link.js.map +1 -0
- package/dev/components/progress.d.ts +30 -0
- package/dev/components/progress.d.ts.map +1 -0
- package/{web-components/progress → dev/components}/progress.js +12 -11
- package/dev/components/progress.js.map +1 -0
- package/dev/components/range.d.ts +60 -0
- package/dev/components/range.d.ts.map +1 -0
- package/{web-components/input/range-input.js → dev/components/range.js} +82 -92
- package/dev/components/range.js.map +1 -0
- package/dev/components/rotate.d.ts +26 -0
- package/dev/components/rotate.d.ts.map +1 -0
- package/{web-components/wrapper → dev/components}/rotate.js +14 -20
- package/dev/components/rotate.js.map +1 -0
- package/dev/components/router.d.ts +121 -0
- package/dev/components/router.d.ts.map +1 -0
- package/dev/components/router.js +248 -0
- package/dev/components/router.js.map +1 -0
- package/dev/components/select.d.ts +50 -0
- package/dev/components/select.d.ts.map +1 -0
- package/dev/components/select.js +243 -0
- package/dev/components/select.js.map +1 -0
- package/dev/components/skeleton.d.ts +26 -0
- package/dev/components/skeleton.d.ts.map +1 -0
- package/dev/components/skeleton.js +119 -0
- package/dev/components/skeleton.js.map +1 -0
- package/dev/components/split.d.ts +32 -0
- package/dev/components/split.d.ts.map +1 -0
- package/dev/components/split.js +173 -0
- package/dev/components/split.js.map +1 -0
- package/dev/components/switch.d.ts +39 -0
- package/dev/components/switch.d.ts.map +1 -0
- package/{web-components/input/switch-input.js → dev/components/switch.js} +53 -59
- package/dev/components/switch.js.map +1 -0
- package/dev/components/text.d.ts +19 -0
- package/dev/components/text.d.ts.map +1 -0
- package/{web-components/text → dev/components}/text.js +22 -23
- package/dev/components/text.js.map +1 -0
- package/dev/components/time.d.ts +53 -0
- package/dev/components/time.d.ts.map +1 -0
- package/{web-components/text → dev/components}/time.js +12 -18
- package/dev/components/time.js.map +1 -0
- package/dev/components/tooltip.d.ts +38 -0
- package/dev/components/tooltip.d.ts.map +1 -0
- package/dev/components/tooltip.js +114 -0
- package/dev/components/tooltip.js.map +1 -0
- package/dev/components/typewriter.d.ts +55 -0
- package/dev/components/typewriter.d.ts.map +1 -0
- package/{web-components/text → dev/components}/typewriter.js +21 -19
- package/dev/components/typewriter.js.map +1 -0
- package/dev/core/global-style.d.ts +21 -0
- package/dev/core/global-style.d.ts.map +1 -0
- package/dev/core/global-style.js +77 -0
- package/dev/core/global-style.js.map +1 -0
- package/dev/core/super-anchor.d.ts +15 -0
- package/dev/core/super-anchor.d.ts.map +1 -0
- package/dev/core/super-anchor.js +58 -0
- package/dev/core/super-anchor.js.map +1 -0
- package/dev/core/super-input.d.ts +39 -0
- package/dev/core/super-input.d.ts.map +1 -0
- package/dev/core/super-input.js +181 -0
- package/dev/core/super-input.js.map +1 -0
- package/dev/core/super-openable.d.ts +19 -0
- package/dev/core/super-openable.d.ts.map +1 -0
- package/{proto → dev/core}/super-openable.js +6 -13
- package/dev/core/super-openable.js.map +1 -0
- package/dev/details.d.ts +8 -0
- package/dev/details.d.ts.map +1 -0
- package/dev/details.js +4 -0
- package/dev/details.js.map +1 -0
- package/dev/dialog.d.ts +8 -0
- package/dev/dialog.d.ts.map +1 -0
- package/dev/dialog.js +4 -0
- package/dev/dialog.js.map +1 -0
- package/dev/divider.d.ts +8 -0
- package/dev/divider.d.ts.map +1 -0
- package/dev/divider.js +4 -0
- package/dev/divider.js.map +1 -0
- package/dev/dragbox.d.ts +8 -0
- package/dev/dragbox.d.ts.map +1 -0
- package/dev/dragbox.js +4 -0
- package/dev/dragbox.js.map +1 -0
- package/dev/flex.d.ts +8 -0
- package/dev/flex.d.ts.map +1 -0
- package/dev/flex.js +4 -0
- package/dev/flex.js.map +1 -0
- package/dev/form.d.ts +8 -0
- package/dev/form.d.ts.map +1 -0
- package/dev/form.js +4 -0
- package/dev/form.js.map +1 -0
- package/dev/grid.d.ts +8 -0
- package/dev/grid.d.ts.map +1 -0
- package/dev/grid.js +4 -0
- package/dev/grid.js.map +1 -0
- package/dev/index.d.ts +29 -0
- package/dev/index.d.ts.map +1 -0
- package/dev/index.js +29 -0
- package/dev/index.js.map +1 -0
- package/dev/input.d.ts +9 -0
- package/dev/input.d.ts.map +1 -0
- package/dev/input.js +5 -0
- package/dev/input.js.map +1 -0
- package/dev/layout.d.ts +9 -0
- package/dev/layout.d.ts.map +1 -0
- package/dev/layout.js +5 -0
- package/dev/layout.js.map +1 -0
- package/dev/link.d.ts +9 -0
- package/dev/link.d.ts.map +1 -0
- package/dev/link.js +5 -0
- package/dev/link.js.map +1 -0
- package/dev/progress.d.ts +9 -0
- package/dev/progress.d.ts.map +1 -0
- package/dev/progress.js +5 -0
- package/dev/progress.js.map +1 -0
- package/dev/range.d.ts +9 -0
- package/dev/range.d.ts.map +1 -0
- package/dev/range.js +5 -0
- package/dev/range.js.map +1 -0
- package/dev/rotate.d.ts +9 -0
- package/dev/rotate.d.ts.map +1 -0
- package/dev/rotate.js +5 -0
- package/dev/rotate.js.map +1 -0
- package/dev/router.d.ts +9 -0
- package/dev/router.d.ts.map +1 -0
- package/dev/router.js +5 -0
- package/dev/router.js.map +1 -0
- package/dev/select.d.ts +9 -0
- package/dev/select.d.ts.map +1 -0
- package/dev/select.js +5 -0
- package/dev/select.js.map +1 -0
- package/dev/skeleton.d.ts +9 -0
- package/dev/skeleton.d.ts.map +1 -0
- package/dev/skeleton.js +5 -0
- package/dev/skeleton.js.map +1 -0
- package/dev/split.d.ts +9 -0
- package/dev/split.d.ts.map +1 -0
- package/dev/split.js +5 -0
- package/dev/split.js.map +1 -0
- package/dev/switch.d.ts +9 -0
- package/dev/switch.d.ts.map +1 -0
- package/dev/switch.js +5 -0
- package/dev/switch.js.map +1 -0
- package/dev/text.d.ts +9 -0
- package/dev/text.d.ts.map +1 -0
- package/dev/text.js +5 -0
- package/dev/text.js.map +1 -0
- package/dev/time.d.ts +9 -0
- package/dev/time.d.ts.map +1 -0
- package/dev/time.js +5 -0
- package/dev/time.js.map +1 -0
- package/dev/tooltip.d.ts +9 -0
- package/dev/tooltip.d.ts.map +1 -0
- package/dev/tooltip.js +5 -0
- package/dev/tooltip.js.map +1 -0
- package/dev/typewriter.d.ts +8 -0
- package/dev/typewriter.d.ts.map +1 -0
- package/dev/typewriter.js +4 -0
- package/dev/typewriter.js.map +1 -0
- package/dialog.d.ts +2 -3
- package/dialog.d.ts.map +1 -1
- package/dialog.js +5 -4
- package/dialog.js.map +1 -1
- package/divider.d.ts +2 -3
- package/divider.d.ts.map +1 -1
- package/divider.js +5 -4
- package/divider.js.map +1 -1
- package/dragbox.d.ts +2 -3
- package/dragbox.d.ts.map +1 -1
- package/dragbox.js +5 -4
- package/dragbox.js.map +1 -1
- package/flex.d.ts +8 -0
- package/flex.d.ts.map +1 -0
- package/flex.js +6 -0
- package/flex.js.map +1 -0
- package/form.d.ts +2 -3
- package/form.d.ts.map +1 -1
- package/form.js +5 -4
- package/form.js.map +1 -1
- package/grid.d.ts +8 -0
- package/grid.d.ts.map +1 -0
- package/grid.js +6 -0
- package/grid.js.map +1 -0
- package/index.d.ts +28 -32
- package/index.d.ts.map +1 -1
- package/index.js +57 -33
- package/index.js.map +1 -1
- package/input.d.ts +3 -3
- package/input.d.ts.map +1 -1
- package/input.js +5 -4
- package/input.js.map +1 -1
- package/layout.d.ts +3 -3
- package/layout.d.ts.map +1 -1
- package/layout.js +5 -4
- package/layout.js.map +1 -1
- package/link.d.ts +3 -3
- package/link.d.ts.map +1 -1
- package/link.js +5 -4
- package/link.js.map +1 -1
- package/package.json +42 -81
- package/progress.d.ts +3 -3
- package/progress.d.ts.map +1 -1
- package/progress.js +5 -4
- package/progress.js.map +1 -1
- package/range.d.ts +9 -0
- package/range.d.ts.map +1 -0
- package/range.js +6 -0
- package/range.js.map +1 -0
- package/rotate.d.ts +3 -3
- package/rotate.d.ts.map +1 -1
- package/rotate.js +5 -4
- package/rotate.js.map +1 -1
- package/router.d.ts +3 -3
- package/router.d.ts.map +1 -1
- package/router.js +5 -4
- package/router.js.map +1 -1
- package/select.d.ts +9 -0
- package/select.d.ts.map +1 -0
- package/select.js +6 -0
- package/select.js.map +1 -0
- package/skeleton.d.ts +3 -3
- package/skeleton.d.ts.map +1 -1
- package/skeleton.js +5 -4
- package/skeleton.js.map +1 -1
- package/split.d.ts +9 -0
- package/split.d.ts.map +1 -0
- package/split.js +6 -0
- package/split.js.map +1 -0
- package/switch.d.ts +9 -0
- package/switch.d.ts.map +1 -0
- package/switch.js +6 -0
- package/switch.js.map +1 -0
- package/text.d.ts +3 -3
- package/text.d.ts.map +1 -1
- package/text.js +5 -4
- package/text.js.map +1 -1
- package/time.d.ts +3 -3
- package/time.d.ts.map +1 -1
- package/time.js +5 -4
- package/time.js.map +1 -1
- package/tooltip.d.ts +3 -3
- package/tooltip.d.ts.map +1 -1
- package/tooltip.js +5 -4
- package/tooltip.js.map +1 -1
- package/typewriter.d.ts +2 -3
- package/typewriter.d.ts.map +1 -1
- package/typewriter.js +5 -4
- package/typewriter.js.map +1 -1
- package/vscode.css-custom-data.json +1 -0
- package/vscode.html-custom-data.json +1 -0
- package/web-types.json +1 -0
- package/_deps.d.ts +0 -4
- package/_deps.d.ts.map +0 -1
- package/_deps.js +0 -4
- package/_deps.js.map +0 -1
- package/avatar-group.d.ts +0 -9
- package/avatar-group.d.ts.map +0 -1
- package/avatar-group.js +0 -5
- package/avatar-group.js.map +0 -1
- package/components.json +0 -194
- package/conf.d.ts +0 -12
- package/conf.d.ts.map +0 -1
- package/conf.js +0 -24
- package/conf.js.map +0 -1
- package/decorators/godown.d.ts +0 -4
- package/decorators/godown.d.ts.map +0 -1
- package/decorators/godown.js +0 -9
- package/decorators/godown.js.map +0 -1
- package/decorators/part.d.ts +0 -7
- package/decorators/part.d.ts.map +0 -1
- package/decorators/part.js +0 -8
- package/decorators/part.js.map +0 -1
- package/decorators/styles.d.ts +0 -3
- package/decorators/styles.d.ts.map +0 -1
- package/decorators/styles.js +0 -8
- package/decorators/styles.js.map +0 -1
- package/flex-flow.d.ts +0 -9
- package/flex-flow.d.ts.map +0 -1
- package/flex-flow.js +0 -5
- package/flex-flow.js.map +0 -1
- package/grid-flow.d.ts +0 -9
- package/grid-flow.d.ts.map +0 -1
- package/grid-flow.js +0 -5
- package/grid-flow.js.map +0 -1
- package/label-input.d.ts +0 -9
- package/label-input.d.ts.map +0 -1
- package/label-input.js +0 -5
- package/label-input.js.map +0 -1
- package/lib/css.d.ts +0 -13
- package/lib/css.d.ts.map +0 -1
- package/lib/css.js +0 -29
- package/lib/css.js.map +0 -1
- package/lib/directives.d.ts +0 -25
- package/lib/directives.d.ts.map +0 -1
- package/lib/directives.js +0 -40
- package/lib/directives.js.map +0 -1
- package/lib/event-coll.d.ts +0 -13
- package/lib/event-coll.d.ts.map +0 -1
- package/lib/event-coll.js +0 -45
- package/lib/event-coll.js.map +0 -1
- package/lib/icons.d.ts +0 -25
- package/lib/icons.d.ts.map +0 -1
- package/lib/icons.js +0 -73
- package/lib/icons.js.map +0 -1
- package/lib/jsx.d.ts +0 -4
- package/lib/jsx.d.ts.map +0 -1
- package/lib/jsx.js +0 -52
- package/lib/jsx.js.map +0 -1
- package/lib/route-tree.d.ts +0 -28
- package/lib/route-tree.d.ts.map +0 -1
- package/lib/route-tree.js +0 -141
- package/lib/route-tree.js.map +0 -1
- package/lib/utils.d.ts +0 -10
- package/lib/utils.d.ts.map +0 -1
- package/lib/utils.js +0 -71
- package/lib/utils.js.map +0 -1
- package/overbreath.d.ts +0 -9
- package/overbreath.d.ts.map +0 -1
- package/overbreath.js +0 -5
- package/overbreath.js.map +0 -1
- package/proto/godown-config.d.ts +0 -41
- package/proto/godown-config.d.ts.map +0 -1
- package/proto/godown-config.js +0 -27
- package/proto/godown-config.js.map +0 -1
- package/proto/godown-element.d.ts +0 -125
- package/proto/godown-element.d.ts.map +0 -1
- package/proto/godown-element.js +0 -204
- package/proto/godown-element.js.map +0 -1
- package/proto/super-a.d.ts +0 -30
- package/proto/super-a.d.ts.map +0 -1
- package/proto/super-a.js +0 -141
- package/proto/super-a.js.map +0 -1
- package/proto/super-input.d.ts +0 -44
- package/proto/super-input.d.ts.map +0 -1
- package/proto/super-input.js +0 -119
- package/proto/super-input.js.map +0 -1
- package/proto/super-openable.d.ts.map +0 -1
- package/proto/super-openable.js.map +0 -1
- package/range-input.d.ts +0 -9
- package/range-input.d.ts.map +0 -1
- package/range-input.js +0 -5
- package/range-input.js.map +0 -1
- package/react/create.d.ts +0 -5
- package/react/create.d.ts.map +0 -1
- package/react/create.js +0 -16
- package/react/create.js.map +0 -1
- package/react/index.d.ts +0 -65
- package/react/index.d.ts.map +0 -1
- package/react/index.js +0 -132
- package/react/index.js.map +0 -1
- package/router-link.d.ts +0 -9
- package/router-link.d.ts.map +0 -1
- package/router-link.js +0 -5
- package/router-link.js.map +0 -1
- package/search-input.d.ts +0 -9
- package/search-input.d.ts.map +0 -1
- package/search-input.js +0 -5
- package/search-input.js.map +0 -1
- package/select-input.d.ts +0 -9
- package/select-input.d.ts.map +0 -1
- package/select-input.js +0 -5
- package/select-input.js.map +0 -1
- package/split-input.d.ts +0 -9
- package/split-input.d.ts.map +0 -1
- package/split-input.js +0 -5
- package/split-input.js.map +0 -1
- package/styles/colors/presets.d.ts +0 -13
- package/styles/colors/presets.d.ts.map +0 -1
- package/styles/colors/presets.js +0 -6
- package/styles/colors/presets.js.map +0 -1
- package/styles/colors/presetsRGB.d.ts +0 -16
- package/styles/colors/presetsRGB.d.ts.map +0 -1
- package/styles/colors/presetsRGB.js +0 -134
- package/styles/colors/presetsRGB.js.map +0 -1
- package/styles/global.d.ts +0 -18
- package/styles/global.d.ts.map +0 -1
- package/styles/global.js +0 -78
- package/styles/global.js.map +0 -1
- package/styles/inputStyle.d.ts +0 -3
- package/styles/inputStyle.d.ts.map +0 -1
- package/styles/inputStyle.js +0 -59
- package/styles/inputStyle.js.map +0 -1
- package/switch-input.d.ts +0 -9
- package/switch-input.d.ts.map +0 -1
- package/switch-input.js +0 -5
- package/switch-input.js.map +0 -1
- package/web-components/alert/alert.d.ts +0 -36
- package/web-components/alert/alert.d.ts.map +0 -1
- package/web-components/alert/alert.js +0 -161
- package/web-components/alert/alert.js.map +0 -1
- package/web-components/avatar/avatar-group.d.ts +0 -21
- package/web-components/avatar/avatar-group.d.ts.map +0 -1
- package/web-components/avatar/avatar-group.js +0 -86
- package/web-components/avatar/avatar-group.js.map +0 -1
- package/web-components/avatar/avatar.d.ts +0 -28
- package/web-components/avatar/avatar.d.ts.map +0 -1
- package/web-components/avatar/avatar.js +0 -120
- package/web-components/avatar/avatar.js.map +0 -1
- package/web-components/button/button.d.ts.map +0 -1
- package/web-components/button/button.js.map +0 -1
- package/web-components/card/card.d.ts +0 -9
- package/web-components/card/card.d.ts.map +0 -1
- package/web-components/card/card.js +0 -75
- package/web-components/card/card.js.map +0 -1
- package/web-components/carousel/carousel.d.ts +0 -29
- package/web-components/carousel/carousel.d.ts.map +0 -1
- package/web-components/carousel/carousel.js +0 -185
- package/web-components/carousel/carousel.js.map +0 -1
- package/web-components/details/details.d.ts.map +0 -1
- package/web-components/details/details.js +0 -124
- package/web-components/details/details.js.map +0 -1
- package/web-components/dialog/dialog.d.ts +0 -31
- package/web-components/dialog/dialog.d.ts.map +0 -1
- package/web-components/dialog/dialog.js +0 -143
- package/web-components/dialog/dialog.js.map +0 -1
- package/web-components/divider/divider.d.ts +0 -13
- package/web-components/divider/divider.d.ts.map +0 -1
- package/web-components/divider/divider.js +0 -95
- package/web-components/divider/divider.js.map +0 -1
- package/web-components/form/form.d.ts.map +0 -1
- package/web-components/form/form.js.map +0 -1
- package/web-components/input/input.d.ts +0 -37
- package/web-components/input/input.d.ts.map +0 -1
- package/web-components/input/input.js +0 -152
- package/web-components/input/input.js.map +0 -1
- package/web-components/input/label-input.d.ts +0 -15
- package/web-components/input/label-input.d.ts.map +0 -1
- package/web-components/input/label-input.js +0 -96
- package/web-components/input/label-input.js.map +0 -1
- package/web-components/input/range-input.d.ts +0 -53
- package/web-components/input/range-input.d.ts.map +0 -1
- package/web-components/input/range-input.js.map +0 -1
- package/web-components/input/search-input.d.ts +0 -42
- package/web-components/input/search-input.d.ts.map +0 -1
- package/web-components/input/search-input.js +0 -214
- package/web-components/input/search-input.js.map +0 -1
- package/web-components/input/select-input.d.ts +0 -36
- package/web-components/input/select-input.d.ts.map +0 -1
- package/web-components/input/select-input.js +0 -210
- package/web-components/input/select-input.js.map +0 -1
- package/web-components/input/split-input.d.ts +0 -29
- package/web-components/input/split-input.d.ts.map +0 -1
- package/web-components/input/split-input.js +0 -184
- package/web-components/input/split-input.js.map +0 -1
- package/web-components/input/switch-input.d.ts.map +0 -1
- package/web-components/input/switch-input.js.map +0 -1
- package/web-components/layout/flex-flow.d.ts +0 -17
- package/web-components/layout/flex-flow.d.ts.map +0 -1
- package/web-components/layout/flex-flow.js +0 -73
- package/web-components/layout/flex-flow.js.map +0 -1
- package/web-components/layout/grid-flow.d.ts +0 -14
- package/web-components/layout/grid-flow.d.ts.map +0 -1
- package/web-components/layout/grid-flow.js +0 -56
- package/web-components/layout/grid-flow.js.map +0 -1
- package/web-components/layout/layout.d.ts +0 -18
- package/web-components/layout/layout.d.ts.map +0 -1
- package/web-components/layout/layout.js +0 -76
- package/web-components/layout/layout.js.map +0 -1
- package/web-components/link/link.d.ts +0 -10
- package/web-components/link/link.d.ts.map +0 -1
- package/web-components/link/link.js +0 -17
- package/web-components/link/link.js.map +0 -1
- package/web-components/link/router-link.d.ts +0 -19
- package/web-components/link/router-link.d.ts.map +0 -1
- package/web-components/link/router-link.js +0 -60
- package/web-components/link/router-link.js.map +0 -1
- package/web-components/progress/progress.d.ts.map +0 -1
- package/web-components/progress/progress.js.map +0 -1
- package/web-components/router/router.d.ts +0 -86
- package/web-components/router/router.d.ts.map +0 -1
- package/web-components/router/router.js +0 -246
- package/web-components/router/router.js.map +0 -1
- package/web-components/skeleton/skeleton.d.ts.map +0 -1
- package/web-components/skeleton/skeleton.js +0 -130
- package/web-components/skeleton/skeleton.js.map +0 -1
- package/web-components/text/overbreath.d.ts +0 -22
- package/web-components/text/overbreath.d.ts.map +0 -1
- package/web-components/text/overbreath.js +0 -132
- package/web-components/text/overbreath.js.map +0 -1
- package/web-components/text/text.d.ts.map +0 -1
- package/web-components/text/text.js.map +0 -1
- package/web-components/text/time.d.ts.map +0 -1
- package/web-components/text/time.js.map +0 -1
- package/web-components/text/typewriter.d.ts.map +0 -1
- package/web-components/text/typewriter.js.map +0 -1
- package/web-components/tooltip/tooltip.d.ts +0 -30
- package/web-components/tooltip/tooltip.d.ts.map +0 -1
- package/web-components/tooltip/tooltip.js +0 -123
- package/web-components/tooltip/tooltip.js.map +0 -1
- package/web-components/wrapper/dragbox.d.ts.map +0 -1
- package/web-components/wrapper/dragbox.js.map +0 -1
- package/web-components/wrapper/rotate.d.ts.map +0 -1
- package/web-components/wrapper/rotate.js.map +0 -1
@@ -1,56 +0,0 @@
|
|
1
|
-
import { __decorate } from "tslib";
|
2
|
-
import { css, property } from "../../_deps.js";
|
3
|
-
import { godown } from "../../decorators/godown.js";
|
4
|
-
import { styles } from "../../decorators/styles.js";
|
5
|
-
import { htmlSlot } from "../../lib/directives.js";
|
6
|
-
import { htmlStyle } from "../../lib/directives.js";
|
7
|
-
import { joinRules, numerical } from "../../lib/utils.js";
|
8
|
-
import { GodownElement } from "../../proto/godown-element.js";
|
9
|
-
const protoName = "grid-flow";
|
10
|
-
/**
|
11
|
-
* {@linkcode GridFlow} provides gird layout.
|
12
|
-
*/
|
13
|
-
let GridFlow = class GridFlow extends GodownElement {
|
14
|
-
render() {
|
15
|
-
return [
|
16
|
-
htmlSlot(),
|
17
|
-
htmlStyle(joinRules({
|
18
|
-
":host": {
|
19
|
-
gap: this.gap,
|
20
|
-
"grid-template-columns": numerical(this.columns) ? `repeat(${this.columns},1fr)` : this.columns,
|
21
|
-
"grid-template-rows": numerical(this.rows) ? `repeat(${this.rows},1fr)` : this.rows,
|
22
|
-
"place-content": this.content,
|
23
|
-
"place-items": this.items,
|
24
|
-
},
|
25
|
-
})),
|
26
|
-
];
|
27
|
-
}
|
28
|
-
};
|
29
|
-
__decorate([
|
30
|
-
property()
|
31
|
-
], GridFlow.prototype, "gap", void 0);
|
32
|
-
__decorate([
|
33
|
-
property()
|
34
|
-
], GridFlow.prototype, "columns", void 0);
|
35
|
-
__decorate([
|
36
|
-
property()
|
37
|
-
], GridFlow.prototype, "rows", void 0);
|
38
|
-
__decorate([
|
39
|
-
property()
|
40
|
-
], GridFlow.prototype, "content", void 0);
|
41
|
-
__decorate([
|
42
|
-
property()
|
43
|
-
], GridFlow.prototype, "items", void 0);
|
44
|
-
GridFlow = __decorate([
|
45
|
-
godown(protoName),
|
46
|
-
styles([
|
47
|
-
css `
|
48
|
-
:host {
|
49
|
-
display: grid;
|
50
|
-
}
|
51
|
-
`,
|
52
|
-
])
|
53
|
-
], GridFlow);
|
54
|
-
export { GridFlow };
|
55
|
-
export default GridFlow;
|
56
|
-
//# sourceMappingURL=grid-flow.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"grid-flow.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/layout/grid-flow.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,SAAS,GAAG,WAAW,CAAC;AAE9B;;GAEG;AASI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,aAAa;IAO/B,MAAM;QACd,OAAO;YACL,QAAQ,EAAE;YACV,SAAS,CACP,SAAS,CAAC;gBACR,OAAO,EAAE;oBACP,GAAG,EAAE,IAAI,CAAC,GAAG;oBACb,uBAAuB,EAAE,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO;oBAC/F,oBAAoB,EAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI;oBACnF,eAAe,EAAE,IAAI,CAAC,OAAO;oBAC7B,aAAa,EAAE,IAAI,CAAC,KAAK;iBAC1B;aACF,CAAC,CACH;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAtBa;IAAX,QAAQ,EAAE;qCAAa;AACZ;IAAX,QAAQ,EAAE;yCAA0B;AACzB;IAAX,QAAQ,EAAE;sCAAuB;AACtB;IAAX,QAAQ,EAAE;yCAAiB;AAChB;IAAX,QAAQ,EAAE;uCAAe;AALf,QAAQ;IARpB,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CAAC;QACN,GAAG,CAAA;;;;GAIF;KACF,CAAC;GACW,QAAQ,CAuBpB;;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import { css, property } from \"../../_deps.js\";\nimport { godown } from \"../../decorators/godown.js\";\nimport { styles } from \"../../decorators/styles.js\";\nimport { htmlSlot } from \"../../lib/directives.js\";\nimport { htmlStyle } from \"../../lib/directives.js\";\nimport { joinRules, numerical } from \"../../lib/utils.js\";\nimport { GodownElement } from \"../../proto/godown-element.js\";\n\nconst protoName = \"grid-flow\";\n\n/**\n * {@linkcode GridFlow} provides gird layout.\n */\n@godown(protoName)\n@styles([\n css`\n :host {\n display: grid;\n }\n `,\n])\nexport class GridFlow extends GodownElement {\n @property() gap: string;\n @property() columns: string | number;\n @property() rows: string | number;\n @property() content: string;\n @property() items: string;\n\n protected render() {\n return [\n htmlSlot(),\n htmlStyle(\n joinRules({\n \":host\": {\n gap: this.gap,\n \"grid-template-columns\": numerical(this.columns) ? `repeat(${this.columns},1fr)` : this.columns,\n \"grid-template-rows\": numerical(this.rows) ? `repeat(${this.rows},1fr)` : this.rows,\n \"place-content\": this.content,\n \"place-items\": this.items,\n },\n }),\n ),\n ];\n }\n}\n\nexport default GridFlow;\n"]}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { GodownElement } from "../../proto/godown-element.js";
|
2
|
-
/**
|
3
|
-
* {@linkcode NavLayout} renders a navigation, an optional top header, an optional bottom footer.
|
4
|
-
*
|
5
|
-
* @slot - The main content of the layout.
|
6
|
-
*
|
7
|
-
* @slot header - The header of the layout.
|
8
|
-
*
|
9
|
-
* @slot footer - The footer of the layout.
|
10
|
-
*/
|
11
|
-
export declare class NavLayout extends GodownElement {
|
12
|
-
noHeader: boolean;
|
13
|
-
noFooter: boolean;
|
14
|
-
sticky: boolean;
|
15
|
-
protected render(): import("lit").TemplateResult<1>;
|
16
|
-
}
|
17
|
-
export default NavLayout;
|
18
|
-
//# sourceMappingURL=layout.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/layout/layout.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D;;;;;;;;GAQG;AACH,qBA0Ba,SAAU,SAAQ,aAAa;IAI1C,QAAQ,EAAE,OAAO,CAAC;IAIlB,QAAQ,EAAE,OAAO,CAAC;IAKlB,MAAM,EAAE,OAAO,CAAC;IAEhB,SAAS,CAAC,MAAM;CAejB;AAED,eAAe,SAAS,CAAC"}
|
@@ -1,76 +0,0 @@
|
|
1
|
-
import { __decorate } from "tslib";
|
2
|
-
import { css, html, property } from "../../_deps.js";
|
3
|
-
import { godown } from "../../decorators/godown.js";
|
4
|
-
import { styles } from "../../decorators/styles.js";
|
5
|
-
import { combine, htmlSlot, ifValue } from "../../lib/directives.js";
|
6
|
-
import { GodownElement } from "../../proto/godown-element.js";
|
7
|
-
const protoName = "layout";
|
8
|
-
/**
|
9
|
-
* {@linkcode NavLayout} renders a navigation, an optional top header, an optional bottom footer.
|
10
|
-
*
|
11
|
-
* @slot - The main content of the layout.
|
12
|
-
*
|
13
|
-
* @slot header - The header of the layout.
|
14
|
-
*
|
15
|
-
* @slot footer - The footer of the layout.
|
16
|
-
*/
|
17
|
-
let NavLayout = class NavLayout extends GodownElement {
|
18
|
-
render() {
|
19
|
-
return html `${ifValue(!this.noHeader, html `<header
|
20
|
-
part="header"
|
21
|
-
class="${combine({
|
22
|
-
sticky: this.sticky,
|
23
|
-
})}"
|
24
|
-
>
|
25
|
-
${htmlSlot("header")}
|
26
|
-
</header>`)}
|
27
|
-
<main part="main">${htmlSlot()}</main>
|
28
|
-
${ifValue(!this.noFooter, html `<footer part="footer">${htmlSlot("footer")}</footer> `)}`;
|
29
|
-
}
|
30
|
-
};
|
31
|
-
__decorate([
|
32
|
-
property({
|
33
|
-
type: Boolean,
|
34
|
-
})
|
35
|
-
], NavLayout.prototype, "noHeader", void 0);
|
36
|
-
__decorate([
|
37
|
-
property({
|
38
|
-
type: Boolean,
|
39
|
-
})
|
40
|
-
], NavLayout.prototype, "noFooter", void 0);
|
41
|
-
__decorate([
|
42
|
-
property({
|
43
|
-
type: Boolean,
|
44
|
-
})
|
45
|
-
], NavLayout.prototype, "sticky", void 0);
|
46
|
-
NavLayout = __decorate([
|
47
|
-
godown(protoName),
|
48
|
-
styles([
|
49
|
-
css `
|
50
|
-
:host {
|
51
|
-
min-height: 100%;
|
52
|
-
display: flex;
|
53
|
-
flex-direction: column;
|
54
|
-
}
|
55
|
-
|
56
|
-
.sticky {
|
57
|
-
position: sticky;
|
58
|
-
top: 0;
|
59
|
-
z-index: 1;
|
60
|
-
}
|
61
|
-
|
62
|
-
[part="main"] {
|
63
|
-
position: relative;
|
64
|
-
flex: 1;
|
65
|
-
width: 100%;
|
66
|
-
}
|
67
|
-
|
68
|
-
[part] {
|
69
|
-
width: 100%;
|
70
|
-
}
|
71
|
-
`,
|
72
|
-
])
|
73
|
-
], NavLayout);
|
74
|
-
export { NavLayout };
|
75
|
-
export default NavLayout;
|
76
|
-
//# sourceMappingURL=layout.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/layout/layout.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,SAAS,GAAG,QAAQ,CAAC;AAC3B;;;;;;;;GAQG;AA2BI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,aAAa;IAehC,MAAM;QACd,OAAO,IAAI,CAAA,GAAG,OAAO,CACjB,CAAC,IAAI,CAAC,QAAQ,EACd,IAAI,CAAA;;mBAEO,OAAO,CAAC;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC;;YAEA,QAAQ,CAAC,QAAQ,CAAC;kBACZ,CACX;0BACmB,QAAQ,EAAE;QAC5B,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAA,yBAAyB,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;IAC7F,CAAC;CACF,CAAA;AA1BC;IAHC,QAAQ,CAAC;QACR,IAAI,EAAE,OAAO;KACd,CAAC;2CACgB;AAIlB;IAHC,QAAQ,CAAC;QACR,IAAI,EAAE,OAAO;KACd,CAAC;2CACgB;AAKlB;IAHC,QAAQ,CAAC;QACR,IAAI,EAAE,OAAO;KACd,CAAC;yCACc;AAbL,SAAS;IA1BrB,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CAAC;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;GAsBF;KACF,CAAC;GACW,SAAS,CA8BrB;;AAED,eAAe,SAAS,CAAC","sourcesContent":["import { css, html, property } from \"../../_deps.js\";\nimport { godown } from \"../../decorators/godown.js\";\nimport { styles } from \"../../decorators/styles.js\";\nimport { combine, htmlSlot, ifValue } from \"../../lib/directives.js\";\nimport { GodownElement } from \"../../proto/godown-element.js\";\n\nconst protoName = \"layout\";\n/**\n * {@linkcode NavLayout} renders a navigation, an optional top header, an optional bottom footer.\n *\n * @slot - The main content of the layout.\n *\n * @slot header - The header of the layout.\n *\n * @slot footer - The footer of the layout.\n */\n@godown(protoName)\n@styles([\n css`\n :host {\n min-height: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .sticky {\n position: sticky;\n top: 0;\n z-index: 1;\n }\n\n [part=\"main\"] {\n position: relative;\n flex: 1;\n width: 100%;\n }\n\n [part] {\n width: 100%;\n }\n `,\n])\nexport class NavLayout extends GodownElement {\n @property({\n type: Boolean,\n })\n noHeader: boolean;\n @property({\n type: Boolean,\n })\n noFooter: boolean;\n\n @property({\n type: Boolean,\n })\n sticky: boolean;\n\n protected render() {\n return html`${ifValue(\n !this.noHeader,\n html`<header\n part=\"header\"\n class=\"${combine({\n sticky: this.sticky,\n })}\"\n >\n ${htmlSlot(\"header\")}\n </header>`,\n )}\n <main part=\"main\">${htmlSlot()}</main>\n ${ifValue(!this.noFooter, html`<footer part=\"footer\">${htmlSlot(\"footer\")}</footer> `)}`;\n }\n}\n\nexport default NavLayout;\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/link/link.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAIlD;;;;GAIG;AACH,qBACa,CAAE,SAAQ,YAAY;CAAG;AAEtC,eAAe,CAAC,CAAC"}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { __decorate } from "tslib";
|
2
|
-
import { godown } from "../../decorators/godown.js";
|
3
|
-
import GodownSuperA from "../../proto/super-a.js";
|
4
|
-
const protoName = "link";
|
5
|
-
/**
|
6
|
-
* {@linkcode A} similar to a.
|
7
|
-
*
|
8
|
-
* Has an optional arrow.
|
9
|
-
*/
|
10
|
-
let A = class A extends GodownSuperA {
|
11
|
-
};
|
12
|
-
A = __decorate([
|
13
|
-
godown(protoName)
|
14
|
-
], A);
|
15
|
-
export { A };
|
16
|
-
export default A;
|
17
|
-
//# sourceMappingURL=link.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/link/link.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,MAAM,SAAS,GAAG,MAAM,CAAC;AAEzB;;;;GAIG;AAEI,IAAM,CAAC,GAAP,MAAM,CAAE,SAAQ,YAAY;CAAG,CAAA;AAAzB,CAAC;IADb,MAAM,CAAC,SAAS,CAAC;GACL,CAAC,CAAwB;;AAEtC,eAAe,CAAC,CAAC","sourcesContent":["import { godown } from \"../../decorators/godown.js\";\nimport GodownSuperA from \"../../proto/super-a.js\";\n\nconst protoName = \"link\";\n\n/**\n * {@linkcode A} similar to a.\n *\n * Has an optional arrow.\n */\n@godown(protoName)\nexport class A extends GodownSuperA {}\n\nexport default A;\n"]}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import GodownSuperA from "../../proto/super-a.js";
|
2
|
-
/**
|
3
|
-
* {@linkcode RouterLink} works with {@linkcode Router}.
|
4
|
-
*
|
5
|
-
* @extends A
|
6
|
-
*/
|
7
|
-
export declare class RouterLink extends GodownSuperA {
|
8
|
-
/**
|
9
|
-
* If true, replaceState, or pushState.
|
10
|
-
*/
|
11
|
-
replace: boolean;
|
12
|
-
connectedCallback(): void;
|
13
|
-
protected _handleClick(e: MouseEvent): void;
|
14
|
-
pushState(url?: string, data?: any): void;
|
15
|
-
replaceState(url?: string, data?: any): void;
|
16
|
-
updateRouter(): void;
|
17
|
-
}
|
18
|
-
export default RouterLink;
|
19
|
-
//# sourceMappingURL=router-link.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"router-link.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/link/router-link.ts"],"names":[],"mappings":"AAEA,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAKlD;;;;GAIG;AACH,qBACa,UAAW,SAAQ,YAAY;IAC1C;;OAEG;IAC0B,OAAO,UAAS;IAE7C,iBAAiB;IAMjB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;IAYpC,SAAS,CAAC,GAAG,SAAY,EAAE,IAAI,MAAO;IAItC,YAAY,CAAC,GAAG,SAAY,EAAE,IAAI,MAAO;IAIzC,YAAY;CAQb;AAED,eAAe,UAAU,CAAC"}
|
@@ -1,60 +0,0 @@
|
|
1
|
-
import { __decorate } from "tslib";
|
2
|
-
import { property } from "../../_deps.js";
|
3
|
-
import { godown } from "../../decorators/godown.js";
|
4
|
-
import GodownSuperA from "../../proto/super-a.js";
|
5
|
-
import { Router } from "../router/router.js";
|
6
|
-
const protoName = "router-link";
|
7
|
-
/**
|
8
|
-
* {@linkcode RouterLink} works with {@linkcode Router}.
|
9
|
-
*
|
10
|
-
* @extends A
|
11
|
-
*/
|
12
|
-
let RouterLink = class RouterLink extends GodownSuperA {
|
13
|
-
constructor() {
|
14
|
-
super(...arguments);
|
15
|
-
/**
|
16
|
-
* If true, replaceState, or pushState.
|
17
|
-
*/
|
18
|
-
this.replace = false;
|
19
|
-
}
|
20
|
-
connectedCallback() {
|
21
|
-
super.connectedCallback();
|
22
|
-
this.addEvent(window, "popstate", this.useActive.bind(this));
|
23
|
-
this.useActive();
|
24
|
-
}
|
25
|
-
_handleClick(e) {
|
26
|
-
const { sameOrigin } = this.useActive();
|
27
|
-
if (sameOrigin) {
|
28
|
-
e.preventDefault();
|
29
|
-
if (this.replace) {
|
30
|
-
this.replaceState(this.href);
|
31
|
-
}
|
32
|
-
else {
|
33
|
-
this.pushState(this.href);
|
34
|
-
}
|
35
|
-
}
|
36
|
-
}
|
37
|
-
pushState(url = this.href, data = null) {
|
38
|
-
history.pushState(data, "", url);
|
39
|
-
}
|
40
|
-
replaceState(url = this.href, data = null) {
|
41
|
-
history.replaceState(data, "", url);
|
42
|
-
}
|
43
|
-
updateRouter() {
|
44
|
-
const routers = this.deepQuerySelectorAll(Router.elementTagName, document.body);
|
45
|
-
routers.forEach((router) => {
|
46
|
-
if (!router.override) {
|
47
|
-
router.pathname = window.location.pathname;
|
48
|
-
}
|
49
|
-
});
|
50
|
-
}
|
51
|
-
};
|
52
|
-
__decorate([
|
53
|
-
property({ type: Boolean })
|
54
|
-
], RouterLink.prototype, "replace", void 0);
|
55
|
-
RouterLink = __decorate([
|
56
|
-
godown(protoName)
|
57
|
-
], RouterLink);
|
58
|
-
export { RouterLink };
|
59
|
-
export default RouterLink;
|
60
|
-
//# sourceMappingURL=router-link.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"router-link.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/link/router-link.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,MAAM,SAAS,GAAG,aAAa,CAAC;AAEhC;;;;GAIG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,YAAY;IAArC;;QACL;;WAEG;QAC0B,YAAO,GAAG,KAAK,CAAC;IAoC/C,CAAC;IAlCC,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7D,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAES,YAAY,CAAC,CAAa;QAClC,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QACxC,IAAI,UAAU,EAAE,CAAC;YACf,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBACjB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;IACH,CAAC;IAED,SAAS,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;QACpC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;IACnC,CAAC;IAED,YAAY,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;QACvC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;IACtC,CAAC;IAED,YAAY;QACV,MAAM,OAAO,GAAG,IAAI,CAAC,oBAAoB,CAAS,MAAM,CAAC,cAAc,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxF,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACzB,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACrB,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;YAC7C,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AApC8B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2CAAiB;AAJlC,UAAU;IADtB,MAAM,CAAC,SAAS,CAAC;GACL,UAAU,CAwCtB;;AAED,eAAe,UAAU,CAAC","sourcesContent":["import { property } from \"../../_deps.js\";\nimport { godown } from \"../../decorators/godown.js\";\nimport GodownSuperA from \"../../proto/super-a.js\";\nimport { Router } from \"../router/router.js\";\n\nconst protoName = \"router-link\";\n\n/**\n * {@linkcode RouterLink} works with {@linkcode Router}.\n *\n * @extends A\n */\n@godown(protoName)\nexport class RouterLink extends GodownSuperA {\n /**\n * If true, replaceState, or pushState.\n */\n @property({ type: Boolean }) replace = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.addEvent(window, \"popstate\", this.useActive.bind(this));\n this.useActive();\n }\n\n protected _handleClick(e: MouseEvent) {\n const { sameOrigin } = this.useActive();\n if (sameOrigin) {\n e.preventDefault();\n if (this.replace) {\n this.replaceState(this.href);\n } else {\n this.pushState(this.href);\n }\n }\n }\n\n pushState(url = this.href, data = null) {\n history.pushState(data, \"\", url);\n }\n\n replaceState(url = this.href, data = null) {\n history.replaceState(data, \"\", url);\n }\n\n updateRouter() {\n const routers = this.deepQuerySelectorAll<Router>(Router.elementTagName, document.body);\n routers.forEach((router) => {\n if (!router.override) {\n router.pathname = window.location.pathname;\n }\n });\n }\n}\n\nexport default RouterLink;\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/progress/progress.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAK9D;;GAEG;AACH,qBA2Ca,QAAS,SAAQ,aAAa;IACzC;;OAEG;IACyB,GAAG,SAAK;IACpC;;OAEG;IACyB,GAAG,SAAK;IACpC;;OAEG;IACwC,KAAK,MAAQ;IAExD,SAAS,CAAC,MAAM;IAYhB;;;;;OAKG;IACH,YAAY,CAAC,CAAC,GAAE,MAAM,GAAG,MAAY,GAAG,MAAM;CAM/C;AAED,eAAe,QAAQ,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"progress.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/progress/progress.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B;;GAEG;AA4CI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,aAAa;IAApC;;QACL;;WAEG;QACyB,QAAG,GAAG,CAAC,CAAC;QACpC;;WAEG;QACyB,QAAG,GAAG,CAAC,CAAC;QACpC;;WAEG;QACwC,UAAK,GAAG,IAAI,CAAC;IA0B1D,CAAC;IAxBW,MAAM;QACd,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,IAAI,SAAiB,CAAC;QACtB,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;YACxB,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtC,SAAS,GAAG,QAAQ,CAAC;QACvB,CAAC;QACD,OAAO,IAAI,CAAA,2BAA2B,SAAS;qCACd,KAAK;WAC/B,CAAC;IACV,CAAC;IAED;;;;;OAKG;IACH,YAAY,CAAC,IAAqB,GAAG;QACnC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,CAAC;QACD,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;IAC/D,CAAC;CACF,CAAA;AAlC6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCAAS;AAIR;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCAAS;AAIO;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCAAc;AAZ7C,QAAQ;IA3CpB,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CAAC,GAAG,CAAA;;;;;;wBAMa,aAAa,CAAC,OAAO;mBAC1B,aAAa,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCtC,CAAC;GACW,QAAQ,CAsCpB;;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import { css, html, property } from \"../../_deps.js\";\nimport { godown } from \"../../decorators/godown.js\";\nimport { styles } from \"../../decorators/styles.js\";\nimport { GodownElement } from \"../../proto/godown-element.js\";\nimport { cssGlobalVars } from \"../../styles/global.js\";\n\nconst protoName = \"progress\";\n\n/**\n * {@linkcode Progress} similar to progress.\n */\n@godown(protoName)\n@styles(css`\n :host {\n width: 100%;\n height: 0.5em;\n display: inline-block;\n border-radius: 0.25em;\n background: var(--${cssGlobalVars.passive});\n color: var(--${cssGlobalVars.active});\n }\n\n [part=\"root\"] {\n height: inherit;\n z-index: 1;\n position: relative;\n border-radius: inherit;\n }\n\n [part=\"value\"] {\n position: absolute;\n z-index: 2;\n top: 0;\n left: 0;\n height: 100%;\n border-radius: inherit;\n transition: all 0.3s;\n animation: progress 1.5s ease-in-out infinite alternate;\n background: currentColor;\n }\n\n @keyframes progress {\n from {\n left: 0;\n }\n to {\n left: 80%;\n }\n }\n\n .static [part=\"value\"] {\n animation: none;\n }\n`)\nexport class Progress extends GodownElement {\n /**\n * Maximum.\n */\n @property({ type: Number }) max = 1;\n /**\n * Minimum.\n */\n @property({ type: Number }) min = 0;\n /**\n * Input value.\n */\n @property({ type: Number, reflect: true }) value = null;\n\n protected render() {\n let width = 20;\n let className: string;\n if (this.value !== null) {\n width = this.parsePercent(this.value);\n className = \"static\";\n }\n return html`<div part=\"root\" class=\"${className}\">\n <i part=\"value\" style=\"width:${width}%;\"></i>\n </div>`;\n }\n\n /**\n * Convert s to a percentage without a percent sign.\n *\n * @param s String or number to convert.\n * @returns Percentage without a percent sign.\n */\n parsePercent(s: string | number = \"0\"): number {\n if (String(s).includes(\"%\")) {\n return parseFloat(String(s));\n }\n return (parseFloat(String(s)) / (this.max - this.min)) * 100;\n }\n}\n\nexport default Progress;\n"]}
|
@@ -1,86 +0,0 @@
|
|
1
|
-
import { type PropertyValueMap } from "../../_deps.js";
|
2
|
-
import { type HTMLTemplate } from "../../lib/directives.js";
|
3
|
-
import { GodownElement } from "../../proto/godown-element.js";
|
4
|
-
/**
|
5
|
-
* {@linkcode Router} has basic routing control.
|
6
|
-
*
|
7
|
-
* To switch routes, use history api or router-link.
|
8
|
-
*/
|
9
|
-
export declare class Router<T = unknown> extends GodownElement {
|
10
|
-
private _routes;
|
11
|
-
private _routeTree;
|
12
|
-
/**
|
13
|
-
* Component will render.
|
14
|
-
*/
|
15
|
-
component: T | HTMLTemplate;
|
16
|
-
/**
|
17
|
-
* Dynamic parameters record.
|
18
|
-
*/
|
19
|
-
params: Record<string, string>;
|
20
|
-
/**
|
21
|
-
* Value of matched path in routes, or null.
|
22
|
-
*/
|
23
|
-
path: string;
|
24
|
-
/**
|
25
|
-
* Current pathname (location.pathname).
|
26
|
-
*/
|
27
|
-
pathname: string;
|
28
|
-
/**
|
29
|
-
* Path prefix.
|
30
|
-
*/
|
31
|
-
baseURL: string;
|
32
|
-
/**
|
33
|
-
* Rendered content when there is no match.
|
34
|
-
*/
|
35
|
-
default: HTMLTemplate;
|
36
|
-
/**
|
37
|
-
* The type of routing query.
|
38
|
-
*/
|
39
|
-
type: "united" | "slotted" | "field";
|
40
|
-
/**
|
41
|
-
* Rewrite history.
|
42
|
-
*/
|
43
|
-
override: boolean;
|
44
|
-
/**
|
45
|
-
* Cache accessed.
|
46
|
-
*/
|
47
|
-
cache: boolean;
|
48
|
-
/**
|
49
|
-
* Cache record.
|
50
|
-
*/
|
51
|
-
record: Map<string, {
|
52
|
-
path: string;
|
53
|
-
component: HTMLTemplate | T;
|
54
|
-
params: Record<string, string>;
|
55
|
-
pathname: string;
|
56
|
-
}>;
|
57
|
-
set routes(v: (Record<string, any> & Record<"path", string> & {
|
58
|
-
component?: T;
|
59
|
-
})[]);
|
60
|
-
get routes(): (Record<string, any> & Record<"path", string> & {
|
61
|
-
component?: T;
|
62
|
-
})[];
|
63
|
-
reset(): void;
|
64
|
-
protected render(): T | HTMLTemplate;
|
65
|
-
useRouter(): {
|
66
|
-
path: string;
|
67
|
-
component: HTMLTemplate | T;
|
68
|
-
params: Record<string, string>;
|
69
|
-
pathname: string;
|
70
|
-
};
|
71
|
-
connectedCallback(): void;
|
72
|
-
/**
|
73
|
-
*
|
74
|
-
* @param ur value of useRouter()
|
75
|
-
* @param first whether this path is loaded for the first time
|
76
|
-
*/
|
77
|
-
routeChangeCallback: (ur: ReturnType<typeof this.useRouter>, first: boolean) => void;
|
78
|
-
protected updated(changedProperties: PropertyValueMap<this>): void;
|
79
|
-
fieldComponent(usedRouteTemplate?: string): null | T;
|
80
|
-
slottedComponent(usedRouteTemplate?: string): null | HTMLTemplate;
|
81
|
-
useWhichRoute(path: string): string | null;
|
82
|
-
parseRouterParams(routeTemplate: string, path: string): Record<string, string>;
|
83
|
-
static updateAll(): void;
|
84
|
-
}
|
85
|
-
export default Router;
|
86
|
-
//# sourceMappingURL=router.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/router/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,gBAAgB,EAAS,MAAM,gBAAgB,CAAC;AAI7E,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGtE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAM9D;;;;GAIG;AACH,qBAMa,MAAM,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,aAAa;IACpD,OAAO,CAAC,OAAO,CAAkD;IACjE,OAAO,CAAC,UAAU,CAA8B;IAEhD;;OAEG;IACM,SAAS,EAAE,CAAC,GAAG,YAAY,CAAQ;IAC5C;;OAEG;IACM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IAC7C;;OAEG;IACM,IAAI,EAAE,MAAM,CAAQ;IAC7B;;OAEG;IACS,QAAQ,SAAM;IAC1B;;OAEG;IACS,OAAO,SAAM;IACzB;;OAEG;IACM,OAAO,EAAE,YAAY,CAAc;IAC5C;;OAEG;IACS,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAY;IAC5D;;OAEG;IACM,QAAQ,UAAQ;IACzB;;OAEG;IAC0B,KAAK,UAAS;IAE3C;;OAEG;IACH,MAAM;cA2Ce,MAAM;mBAAa,YAAY,GAAG,CAAC;gBAAU,OAAO,MAAM,EAAE,MAAM,CAAC;kBAAY,MAAM;OA3C5C;IAE9D,IAAI,MAAM,CAAC,CAAC;;QAAA,EAOX;IAED,IAAI,MAAM;;SAET;IAED,KAAK;IAKL,SAAS,CAAC,MAAM,IAAI,CAAC,GAAG,YAAY;IAuBpC,SAAS,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,YAAY,GAAG,CAAC,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE;IAS5G,iBAAiB;IA2BjB;;;;OAIG;IACH,mBAAmB,EAAE,CAAC,EAAE,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAQ;IAE5F,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAa3D,cAAc,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,CAAC;IAgBpD,gBAAgB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,YAAY;IA6BjE,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAI1C,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAI9E,MAAM,CAAC,SAAS;CAQjB;AAED,eAAe,MAAM,CAAC"}
|
@@ -1,246 +0,0 @@
|
|
1
|
-
var Router_1;
|
2
|
-
import { __decorate } from "tslib";
|
3
|
-
import { css, property, state } from "../../_deps.js";
|
4
|
-
import conf from "../../conf.js";
|
5
|
-
import { godown } from "../../decorators/godown.js";
|
6
|
-
import { styles } from "../../decorators/styles.js";
|
7
|
-
import { htmlSlot } from "../../lib/directives.js";
|
8
|
-
import RouteTree from "../../lib/route-tree.js";
|
9
|
-
import { deepQuerySelectorAll } from "../../lib/utils.js";
|
10
|
-
import { GodownElement } from "../../proto/godown-element.js";
|
11
|
-
const protoName = "router";
|
12
|
-
/**
|
13
|
-
* {@linkcode Router} has basic routing control.
|
14
|
-
*
|
15
|
-
* To switch routes, use history api or router-link.
|
16
|
-
*/
|
17
|
-
let Router = Router_1 = class Router extends GodownElement {
|
18
|
-
constructor() {
|
19
|
-
super(...arguments);
|
20
|
-
this._routes = [];
|
21
|
-
this._routeTree = new RouteTree();
|
22
|
-
/**
|
23
|
-
* Component will render.
|
24
|
-
*/
|
25
|
-
this.component = null;
|
26
|
-
/**
|
27
|
-
* Dynamic parameters record.
|
28
|
-
*/
|
29
|
-
this.params = {};
|
30
|
-
/**
|
31
|
-
* Value of matched path in routes, or null.
|
32
|
-
*/
|
33
|
-
this.path = null;
|
34
|
-
/**
|
35
|
-
* Current pathname (location.pathname).
|
36
|
-
*/
|
37
|
-
this.pathname = "";
|
38
|
-
/**
|
39
|
-
* Path prefix.
|
40
|
-
*/
|
41
|
-
this.baseURL = "";
|
42
|
-
/**
|
43
|
-
* Rendered content when there is no match.
|
44
|
-
*/
|
45
|
-
this.default = htmlSlot();
|
46
|
-
/**
|
47
|
-
* The type of routing query.
|
48
|
-
*/
|
49
|
-
this.type = "united";
|
50
|
-
/**
|
51
|
-
* Rewrite history.
|
52
|
-
*/
|
53
|
-
this.override = true;
|
54
|
-
/**
|
55
|
-
* Cache accessed.
|
56
|
-
*/
|
57
|
-
this.cache = false;
|
58
|
-
/**
|
59
|
-
* Cache record.
|
60
|
-
*/
|
61
|
-
this.record = new Map();
|
62
|
-
/**
|
63
|
-
*
|
64
|
-
* @param ur value of useRouter()
|
65
|
-
* @param first whether this path is loaded for the first time
|
66
|
-
*/
|
67
|
-
this.routeChangeCallback = null;
|
68
|
-
}
|
69
|
-
set routes(v) {
|
70
|
-
this._routes = v;
|
71
|
-
this.reset();
|
72
|
-
for (const route of v) {
|
73
|
-
this._routeTree.insert(route.path);
|
74
|
-
}
|
75
|
-
this.requestUpdate();
|
76
|
-
}
|
77
|
-
get routes() {
|
78
|
-
return this._routes;
|
79
|
-
}
|
80
|
-
reset() {
|
81
|
-
this._routeTree = new RouteTree();
|
82
|
-
this.record.clear();
|
83
|
-
}
|
84
|
-
render() {
|
85
|
-
this.params = {};
|
86
|
-
if (this.cache) {
|
87
|
-
const cached = this.record.get(this.pathname);
|
88
|
-
if (cached) {
|
89
|
-
Object.assign(this, cached);
|
90
|
-
return this.component;
|
91
|
-
}
|
92
|
-
}
|
93
|
-
switch (this.type) {
|
94
|
-
case "field":
|
95
|
-
this.component = this.fieldComponent();
|
96
|
-
break;
|
97
|
-
case "slotted":
|
98
|
-
this.component = this.slottedComponent();
|
99
|
-
break;
|
100
|
-
case "united":
|
101
|
-
this.component = this.fieldComponent() ?? this.slottedComponent();
|
102
|
-
break;
|
103
|
-
}
|
104
|
-
return this.component ?? this.default;
|
105
|
-
}
|
106
|
-
useRouter() {
|
107
|
-
return {
|
108
|
-
pathname: this.pathname,
|
109
|
-
params: this.params,
|
110
|
-
path: this.path,
|
111
|
-
component: this.component,
|
112
|
-
};
|
113
|
-
}
|
114
|
-
connectedCallback() {
|
115
|
-
super.connectedCallback();
|
116
|
-
this.pathname = window.location.pathname;
|
117
|
-
if (!this.override) {
|
118
|
-
return;
|
119
|
-
}
|
120
|
-
this.addEvent(window, "popstate", () => {
|
121
|
-
this.pathname = window.location.pathname;
|
122
|
-
});
|
123
|
-
const self = this;
|
124
|
-
const pushHistory = history.pushState;
|
125
|
-
const { override } = conf;
|
126
|
-
if (!override.pushState) {
|
127
|
-
override.pushState = pushHistory;
|
128
|
-
}
|
129
|
-
history.pushState = function () {
|
130
|
-
pushHistory.apply(this, arguments);
|
131
|
-
self.pathname = window.location.pathname;
|
132
|
-
};
|
133
|
-
const replaceHistory = history.replaceState;
|
134
|
-
history.replaceState = function () {
|
135
|
-
replaceHistory.apply(this, arguments);
|
136
|
-
self.pathname = window.location.pathname;
|
137
|
-
};
|
138
|
-
}
|
139
|
-
updated(changedProperties) {
|
140
|
-
const shouldDispatch = changedProperties.has("pathname") || changedProperties.has("path");
|
141
|
-
if (shouldDispatch) {
|
142
|
-
const ur = this.useRouter();
|
143
|
-
const noRecord = !this.record.has(this.pathname);
|
144
|
-
if (noRecord) {
|
145
|
-
this.record.set(this.pathname, ur);
|
146
|
-
}
|
147
|
-
this.routeChangeCallback?.(ur, noRecord);
|
148
|
-
this.dispatchEvent(new CustomEvent("change", { detail: ur }));
|
149
|
-
}
|
150
|
-
}
|
151
|
-
fieldComponent(usedRouteTemplate) {
|
152
|
-
if (!usedRouteTemplate) {
|
153
|
-
usedRouteTemplate = this.useWhichRoute(this.pathname);
|
154
|
-
}
|
155
|
-
this.path = usedRouteTemplate;
|
156
|
-
if (!usedRouteTemplate) {
|
157
|
-
return null;
|
158
|
-
}
|
159
|
-
this.params = this.parseRouterParams(this.path, this.pathname);
|
160
|
-
const route = this.routes.find((r) => r.path === usedRouteTemplate);
|
161
|
-
if (!route) {
|
162
|
-
return null;
|
163
|
-
}
|
164
|
-
return route.component;
|
165
|
-
}
|
166
|
-
slottedComponent(usedRouteTemplate) {
|
167
|
-
const childNodes = this.slottedChildren;
|
168
|
-
if (!childNodes.length) {
|
169
|
-
return null;
|
170
|
-
}
|
171
|
-
const slottedPaths = Array.from(childNodes).map((node) => {
|
172
|
-
const slotName = node.getAttribute("slot");
|
173
|
-
return {
|
174
|
-
path: slotName,
|
175
|
-
};
|
176
|
-
});
|
177
|
-
const tempRouteTree = new RouteTree();
|
178
|
-
for (const withPath of slottedPaths) {
|
179
|
-
tempRouteTree.insert(withPath.path);
|
180
|
-
}
|
181
|
-
if (!usedRouteTemplate) {
|
182
|
-
usedRouteTemplate = tempRouteTree.useWhich(this.pathname);
|
183
|
-
if (!usedRouteTemplate) {
|
184
|
-
return null;
|
185
|
-
}
|
186
|
-
}
|
187
|
-
const slotElement = slottedPaths.find((s) => s.path === usedRouteTemplate);
|
188
|
-
if (!slotElement) {
|
189
|
-
return null;
|
190
|
-
}
|
191
|
-
this.params = this.parseRouterParams(usedRouteTemplate, this.pathname);
|
192
|
-
return htmlSlot(slotElement.path);
|
193
|
-
}
|
194
|
-
useWhichRoute(path) {
|
195
|
-
return this._routeTree.useWhich(this.baseURL + path);
|
196
|
-
}
|
197
|
-
parseRouterParams(routeTemplate, path) {
|
198
|
-
return this._routeTree.parseParams(path, routeTemplate);
|
199
|
-
}
|
200
|
-
static updateAll() {
|
201
|
-
const routeViewArray = deepQuerySelectorAll(Router_1.elementTagName, document.body);
|
202
|
-
routeViewArray.forEach((ArrayItem) => {
|
203
|
-
if (!ArrayItem.override) {
|
204
|
-
ArrayItem.pathname = window.location.pathname;
|
205
|
-
}
|
206
|
-
});
|
207
|
-
}
|
208
|
-
};
|
209
|
-
__decorate([
|
210
|
-
state()
|
211
|
-
], Router.prototype, "component", void 0);
|
212
|
-
__decorate([
|
213
|
-
state()
|
214
|
-
], Router.prototype, "params", void 0);
|
215
|
-
__decorate([
|
216
|
-
state()
|
217
|
-
], Router.prototype, "path", void 0);
|
218
|
-
__decorate([
|
219
|
-
property()
|
220
|
-
], Router.prototype, "pathname", void 0);
|
221
|
-
__decorate([
|
222
|
-
property()
|
223
|
-
], Router.prototype, "baseURL", void 0);
|
224
|
-
__decorate([
|
225
|
-
state()
|
226
|
-
], Router.prototype, "default", void 0);
|
227
|
-
__decorate([
|
228
|
-
property()
|
229
|
-
], Router.prototype, "type", void 0);
|
230
|
-
__decorate([
|
231
|
-
state()
|
232
|
-
], Router.prototype, "override", void 0);
|
233
|
-
__decorate([
|
234
|
-
property({ type: Boolean })
|
235
|
-
], Router.prototype, "cache", void 0);
|
236
|
-
Router = Router_1 = __decorate([
|
237
|
-
godown(protoName),
|
238
|
-
styles(css `
|
239
|
-
:host {
|
240
|
-
display: contents;
|
241
|
-
}
|
242
|
-
`)
|
243
|
-
], Router);
|
244
|
-
export { Router };
|
245
|
-
export default Router;
|
246
|
-
//# sourceMappingURL=router.js.map
|