godown 2.6.1 → 2.7.0
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/{deps.d.ts → .deps.d.ts} +1 -1
- package/.deps.d.ts.map +1 -0
- package/{deps.js → .deps.js} +1 -1
- package/.deps.js.map +1 -0
- package/README.md +166 -43
- package/a.d.ts +2 -0
- package/a.d.ts.map +1 -0
- package/a.js +2 -0
- package/a.js.map +1 -0
- package/alert.d.ts +2 -0
- package/alert.d.ts.map +1 -0
- package/alert.js +2 -0
- package/alert.js.map +1 -0
- package/avatar-group.js.map +1 -1
- package/avatar.d.ts +2 -0
- package/avatar.d.ts.map +1 -0
- package/avatar.js +2 -0
- package/avatar.js.map +1 -0
- package/button.d.ts +2 -0
- package/button.d.ts.map +1 -0
- package/button.js +2 -0
- package/button.js.map +1 -0
- package/card.d.ts +2 -0
- package/card.d.ts.map +1 -0
- package/card.js +2 -0
- package/card.js.map +1 -0
- package/carousel.d.ts +2 -0
- package/carousel.d.ts.map +1 -0
- package/carousel.js +2 -0
- package/carousel.js.map +1 -0
- package/clip.d.ts +2 -0
- package/clip.d.ts.map +1 -0
- package/clip.js +2 -0
- package/clip.js.map +1 -0
- package/conf.d.ts +23 -3
- package/conf.d.ts.map +1 -1
- package/conf.js +19 -16
- package/conf.js.map +1 -1
- package/decorators/define.d.ts +7 -0
- package/decorators/define.d.ts.map +1 -0
- package/decorators/define.js +11 -0
- package/decorators/define.js.map +1 -0
- package/details-group.js.map +1 -1
- package/details.d.ts +2 -0
- package/details.d.ts.map +1 -0
- package/details.js +2 -0
- package/details.js.map +1 -0
- package/dialog.d.ts +2 -0
- package/dialog.d.ts.map +1 -0
- package/dialog.js +2 -0
- package/dialog.js.map +1 -0
- package/divider.d.ts +2 -0
- package/divider.d.ts.map +1 -0
- package/divider.js +2 -0
- package/divider.js.map +1 -0
- package/dragbox.d.ts +2 -0
- package/dragbox.d.ts.map +1 -0
- package/dragbox.js +2 -0
- package/dragbox.js.map +1 -0
- package/flex-flow.js.map +1 -1
- package/form.d.ts +2 -0
- package/form.d.ts.map +1 -0
- package/form.js +2 -0
- package/form.js.map +1 -0
- package/godown-element.d.ts +1 -1
- package/godown-element.d.ts.map +1 -1
- package/godown-element.js +12 -4
- package/godown-element.js.map +1 -1
- package/input.d.ts +2 -0
- package/input.d.ts.map +1 -0
- package/input.js +2 -0
- package/input.js.map +1 -0
- package/label-input.js.map +1 -1
- package/lib/directives.d.ts +2 -4
- package/lib/directives.d.ts.map +1 -1
- package/lib/directives.js.map +1 -1
- package/lib/event-collection.d.ts +1 -1
- package/lib/event-collection.d.ts.map +1 -1
- package/lib/utils.d.ts +2 -1
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +11 -7
- package/lib/utils.js.map +1 -1
- package/naming.d.ts +91 -0
- package/naming.d.ts.map +1 -0
- package/naming.js +67 -0
- package/naming.js.map +1 -0
- package/nav-layout.js.map +1 -1
- package/open-offset.d.ts +1 -1
- package/open-offset.d.ts.map +1 -1
- package/open-offset.js +1 -1
- package/open-offset.js.map +1 -1
- package/overbreath.d.ts +2 -0
- package/overbreath.d.ts.map +1 -0
- package/overbreath.js +2 -0
- package/overbreath.js.map +1 -0
- package/package.json +29 -35
- package/progress.d.ts +2 -0
- package/progress.d.ts.map +1 -0
- package/progress.js +2 -0
- package/progress.js.map +1 -0
- package/react/index.d.ts +24 -27
- package/react/index.d.ts.map +1 -1
- package/react/index.js +51 -61
- package/react/index.js.map +1 -1
- package/router-a.d.ts +2 -0
- package/router-a.d.ts.map +1 -0
- package/router-a.js +2 -0
- package/router-a.js.map +1 -0
- package/router.d.ts +2 -0
- package/router.d.ts.map +1 -0
- package/router.js +2 -0
- package/router.js.map +1 -0
- package/search-input.js.map +1 -1
- package/select-input.js.map +1 -1
- package/skeleton.d.ts +2 -0
- package/skeleton.d.ts.map +1 -0
- package/skeleton.js +2 -0
- package/skeleton.js.map +1 -0
- package/split-input.js.map +1 -1
- package/supers/anchor.d.ts +21 -0
- package/supers/anchor.d.ts.map +1 -0
- package/{web-components/a/super-a.js → supers/anchor.js} +11 -21
- package/supers/anchor.js.map +1 -0
- package/supers/input.d.ts +28 -0
- package/supers/input.d.ts.map +1 -0
- package/supers/input.js +117 -0
- package/supers/input.js.map +1 -0
- package/{web-components/open/open.d.ts → supers/openable.d.ts} +6 -6
- package/supers/openable.d.ts.map +1 -0
- package/{web-components/open/open.js → supers/openable.js} +11 -11
- package/supers/openable.js.map +1 -0
- package/supers/root.d.ts +18 -0
- package/supers/root.d.ts.map +1 -0
- package/{root.js → supers/root.js} +4 -11
- package/supers/root.js.map +1 -0
- package/switch-input.js.map +1 -1
- package/tabs.d.ts +2 -0
- package/tabs.d.ts.map +1 -0
- package/tabs.js +2 -0
- package/tabs.js.map +1 -0
- package/time.d.ts +2 -0
- package/time.d.ts.map +1 -0
- package/time.js +2 -0
- package/time.js.map +1 -0
- package/tooltip.d.ts +2 -0
- package/tooltip.d.ts.map +1 -0
- package/tooltip.js +2 -0
- package/tooltip.js.map +1 -0
- package/typewriter.d.ts +2 -0
- package/typewriter.d.ts.map +1 -0
- package/typewriter.js +2 -0
- package/typewriter.js.map +1 -0
- package/web-components/a/a.d.ts +16 -0
- package/web-components/a/a.d.ts.map +1 -0
- package/web-components/a/a.js +17 -0
- package/web-components/a/a.js.map +1 -0
- package/web-components/{items/alert-item.d.ts → alert/alert.d.ts} +8 -7
- package/web-components/alert/alert.d.ts.map +1 -0
- package/web-components/{items/alert-item.js → alert/alert.js} +18 -17
- package/web-components/alert/alert.js.map +1 -0
- package/web-components/{a/avatar-a.d.ts → avatar/avatar.d.ts} +9 -8
- package/web-components/avatar/avatar.d.ts.map +1 -0
- package/web-components/{a/avatar-a.js → avatar/avatar.js} +20 -19
- package/web-components/avatar/avatar.js.map +1 -0
- package/web-components/button/{base-button.d.ts → button.d.ts} +7 -6
- package/web-components/button/button.d.ts.map +1 -0
- package/web-components/button/{base-button.js → button.js} +21 -20
- package/web-components/button/button.js.map +1 -0
- package/web-components/{items/card-item.d.ts → card/card.d.ts} +8 -7
- package/web-components/card/card.d.ts.map +1 -0
- package/web-components/{items/card-item.js → card/card.js} +15 -14
- package/web-components/card/card.js.map +1 -0
- package/web-components/carousel/{carousel-slider.d.ts → carousel.d.ts} +7 -6
- package/web-components/carousel/carousel.d.ts.map +1 -0
- package/web-components/carousel/{carousel-slider.js → carousel.js} +16 -16
- package/web-components/carousel/carousel.js.map +1 -0
- package/web-components/{open/open-details.d.ts → details/details.d.ts} +8 -7
- package/web-components/details/details.d.ts.map +1 -0
- package/web-components/{open/open-details.js → details/details.js} +17 -16
- package/web-components/details/details.js.map +1 -0
- package/web-components/{open/open-dialog.d.ts → dialog/dialog.d.ts} +8 -7
- package/web-components/dialog/dialog.d.ts.map +1 -0
- package/web-components/{open/open-dialog.js → dialog/dialog.js} +19 -18
- package/web-components/dialog/dialog.js.map +1 -0
- package/web-components/form/{base-form.d.ts → form.d.ts} +8 -7
- package/web-components/form/form.d.ts.map +1 -0
- package/web-components/form/{base-form.js → form.js} +16 -15
- package/web-components/form/form.js.map +1 -0
- package/web-components/group/avatar-group.d.ts +6 -5
- package/web-components/group/avatar-group.d.ts.map +1 -1
- package/web-components/group/avatar-group.js +8 -7
- package/web-components/group/avatar-group.js.map +1 -1
- package/web-components/group/details-group.d.ts +3 -2
- package/web-components/group/details-group.d.ts.map +1 -1
- package/web-components/group/details-group.js +4 -3
- package/web-components/group/details-group.js.map +1 -1
- package/web-components/index.d.ts +24 -27
- package/web-components/index.d.ts.map +1 -1
- package/web-components/index.js +24 -28
- package/web-components/index.js.map +1 -1
- package/web-components/input/input.d.ts +44 -22
- package/web-components/input/input.d.ts.map +1 -1
- package/web-components/input/input.js +210 -80
- package/web-components/input/input.js.map +1 -1
- package/web-components/input/label-input.d.ts +5 -4
- package/web-components/input/label-input.d.ts.map +1 -1
- package/web-components/input/label-input.js +7 -6
- package/web-components/input/label-input.js.map +1 -1
- package/web-components/input/search-input.d.ts +5 -4
- package/web-components/input/search-input.d.ts.map +1 -1
- package/web-components/input/search-input.js +7 -6
- package/web-components/input/search-input.js.map +1 -1
- package/web-components/input/select-input.d.ts +5 -4
- package/web-components/input/select-input.d.ts.map +1 -1
- package/web-components/input/select-input.js +7 -6
- package/web-components/input/select-input.js.map +1 -1
- package/web-components/input/split-input.d.ts +5 -4
- package/web-components/input/split-input.d.ts.map +1 -1
- package/web-components/input/split-input.js +7 -6
- package/web-components/input/split-input.js.map +1 -1
- package/web-components/input/switch-input.d.ts +5 -4
- package/web-components/input/switch-input.d.ts.map +1 -1
- package/web-components/input/switch-input.js +7 -6
- package/web-components/input/switch-input.js.map +1 -1
- package/web-components/layout/{divider-line.d.ts → divider.d.ts} +7 -6
- package/web-components/layout/divider.d.ts.map +1 -0
- package/web-components/layout/{divider-line.js → divider.js} +13 -12
- package/web-components/layout/divider.js.map +1 -0
- package/web-components/layout/flex-flow.d.ts +3 -2
- package/web-components/layout/flex-flow.d.ts.map +1 -1
- package/web-components/layout/flex-flow.js +4 -3
- package/web-components/layout/flex-flow.js.map +1 -1
- package/web-components/layout/nav-layout.d.ts +14 -6
- package/web-components/layout/nav-layout.d.ts.map +1 -1
- package/web-components/layout/nav-layout.js +26 -95
- package/web-components/layout/nav-layout.js.map +1 -1
- package/web-components/{open → offset}/open-offset.d.ts +5 -4
- package/web-components/offset/open-offset.d.ts.map +1 -0
- package/web-components/{open → offset}/open-offset.js +5 -5
- package/web-components/offset/open-offset.js.map +1 -0
- package/web-components/{loading/loading-progress.d.ts → progress/progress.d.ts} +8 -7
- package/web-components/progress/progress.d.ts.map +1 -0
- package/web-components/{loading/loading-progress.js → progress/progress.js} +15 -14
- package/web-components/progress/progress.js.map +1 -0
- package/web-components/{a/link-a.d.ts → router/router-a.d.ts} +9 -8
- package/web-components/router/router-a.d.ts.map +1 -0
- package/web-components/{a/link-a.js → router/router-a.js} +21 -21
- package/web-components/router/router-a.js.map +1 -0
- package/web-components/{view/route-view.d.ts → router/router.d.ts} +10 -9
- package/web-components/router/router.d.ts.map +1 -0
- package/web-components/{view/route-view.js → router/router.js} +21 -21
- package/web-components/router/router.js.map +1 -0
- package/web-components/{loading/skeleton-screen.d.ts → skeleton/skeleton.d.ts} +8 -7
- package/web-components/skeleton/skeleton.d.ts.map +1 -0
- package/web-components/{loading/skeleton-screen.js → skeleton/skeleton.js} +15 -14
- package/web-components/skeleton/skeleton.js.map +1 -0
- package/web-components/{group/tab-group.d.ts → tabs/tabs.d.ts} +9 -8
- package/web-components/tabs/tabs.d.ts.map +1 -0
- package/web-components/{group/tab-group.js → tabs/tabs.js} +17 -16
- package/web-components/tabs/tabs.js.map +1 -0
- package/web-components/text/clip.d.ts +21 -0
- package/web-components/text/clip.d.ts.map +1 -0
- package/web-components/text/{clip-text.js → clip.js} +13 -12
- package/web-components/text/clip.js.map +1 -0
- package/web-components/text/{overbreath-text.d.ts → overbreath.d.ts} +6 -6
- package/web-components/text/overbreath.d.ts.map +1 -0
- package/web-components/text/{overbreath-text.js → overbreath.js} +14 -13
- package/web-components/text/overbreath.js.map +1 -0
- package/web-components/{items/time-bar.d.ts → text/time.d.ts} +7 -7
- package/web-components/text/time.d.ts.map +1 -0
- package/web-components/{items/time-bar.js → text/time.js} +19 -18
- package/web-components/text/time.js.map +1 -0
- package/web-components/text/{typewriter-text.d.ts → typewriter.d.ts} +8 -8
- package/web-components/text/typewriter.d.ts.map +1 -0
- package/web-components/text/{typewriter-text.js → typewriter.js} +22 -21
- package/web-components/text/typewriter.js.map +1 -0
- package/web-components/tooltip/tooltip.d.ts +25 -0
- package/web-components/tooltip/tooltip.d.ts.map +1 -0
- package/web-components/{open/open-tooltip.js → tooltip/tooltip.js} +15 -14
- package/web-components/tooltip/tooltip.js.map +1 -0
- package/web-components/{items/drag-box.d.ts → wrapper/dragbox.d.ts} +7 -6
- package/web-components/wrapper/dragbox.d.ts.map +1 -0
- package/web-components/{items/drag-box.js → wrapper/dragbox.js} +14 -13
- package/web-components/wrapper/dragbox.js.map +1 -0
- package/web-components/{view/wrap-view.d.ts → wrapper/wrapper.d.ts} +6 -5
- package/web-components/wrapper/wrapper.d.ts.map +1 -0
- package/web-components/{view/wrap-view.js → wrapper/wrapper.js} +13 -12
- package/web-components/wrapper/wrapper.js.map +1 -0
- package/wrapper.d.ts +2 -0
- package/wrapper.d.ts.map +1 -0
- package/wrapper.js +2 -0
- package/wrapper.js.map +1 -0
- package/alert-item.d.ts +0 -2
- package/alert-item.d.ts.map +0 -1
- package/alert-item.js +0 -2
- package/alert-item.js.map +0 -1
- package/avatar-a.d.ts +0 -2
- package/avatar-a.d.ts.map +0 -1
- package/avatar-a.js +0 -2
- package/avatar-a.js.map +0 -1
- package/base-button.d.ts +0 -2
- package/base-button.d.ts.map +0 -1
- package/base-button.js +0 -2
- package/base-button.js.map +0 -1
- package/base-form.d.ts +0 -2
- package/base-form.d.ts.map +0 -1
- package/base-form.js +0 -2
- package/base-form.js.map +0 -1
- package/base-input.d.ts +0 -2
- package/base-input.d.ts.map +0 -1
- package/base-input.js +0 -2
- package/base-input.js.map +0 -1
- package/card-item.d.ts +0 -2
- package/card-item.d.ts.map +0 -1
- package/card-item.js +0 -2
- package/card-item.js.map +0 -1
- package/carousel-slider.d.ts +0 -2
- package/carousel-slider.d.ts.map +0 -1
- package/carousel-slider.js +0 -2
- package/carousel-slider.js.map +0 -1
- package/clip-text.d.ts +0 -2
- package/clip-text.d.ts.map +0 -1
- package/clip-text.js +0 -2
- package/clip-text.js.map +0 -1
- package/deps.d.ts.map +0 -1
- package/deps.js.map +0 -1
- package/divider-line.d.ts +0 -2
- package/divider-line.d.ts.map +0 -1
- package/divider-line.js +0 -2
- package/divider-line.js.map +0 -1
- package/drag-box.d.ts +0 -2
- package/drag-box.d.ts.map +0 -1
- package/drag-box.js +0 -2
- package/drag-box.js.map +0 -1
- package/link-a.d.ts +0 -2
- package/link-a.d.ts.map +0 -1
- package/link-a.js +0 -2
- package/link-a.js.map +0 -1
- package/loading-progress.d.ts +0 -2
- package/loading-progress.d.ts.map +0 -1
- package/loading-progress.js +0 -2
- package/loading-progress.js.map +0 -1
- package/nav-aside.d.ts +0 -2
- package/nav-aside.d.ts.map +0 -1
- package/nav-aside.js +0 -2
- package/nav-aside.js.map +0 -1
- package/open-details.d.ts +0 -2
- package/open-details.d.ts.map +0 -1
- package/open-details.js +0 -2
- package/open-details.js.map +0 -1
- package/open-dialog.d.ts +0 -2
- package/open-dialog.d.ts.map +0 -1
- package/open-dialog.js +0 -2
- package/open-dialog.js.map +0 -1
- package/open-tooltip.d.ts +0 -2
- package/open-tooltip.d.ts.map +0 -1
- package/open-tooltip.js +0 -2
- package/open-tooltip.js.map +0 -1
- package/overbreath-text.d.ts +0 -2
- package/overbreath-text.d.ts.map +0 -1
- package/overbreath-text.js +0 -2
- package/overbreath-text.js.map +0 -1
- package/root.d.ts +0 -23
- package/root.d.ts.map +0 -1
- package/root.js.map +0 -1
- package/route-view.d.ts +0 -2
- package/route-view.d.ts.map +0 -1
- package/route-view.js +0 -2
- package/route-view.js.map +0 -1
- package/scroll-x.d.ts +0 -2
- package/scroll-x.d.ts.map +0 -1
- package/scroll-x.js +0 -2
- package/scroll-x.js.map +0 -1
- package/sign-form.d.ts +0 -2
- package/sign-form.d.ts.map +0 -1
- package/sign-form.js +0 -2
- package/sign-form.js.map +0 -1
- package/skeleton-screen.d.ts +0 -2
- package/skeleton-screen.d.ts.map +0 -1
- package/skeleton-screen.js +0 -2
- package/skeleton-screen.js.map +0 -1
- package/super-a.d.ts +0 -2
- package/super-a.d.ts.map +0 -1
- package/super-a.js +0 -2
- package/super-a.js.map +0 -1
- package/tab-group.d.ts +0 -2
- package/tab-group.d.ts.map +0 -1
- package/tab-group.js +0 -2
- package/tab-group.js.map +0 -1
- package/time-bar.d.ts +0 -2
- package/time-bar.d.ts.map +0 -1
- package/time-bar.js +0 -2
- package/time-bar.js.map +0 -1
- package/typewriter-text.d.ts +0 -2
- package/typewriter-text.d.ts.map +0 -1
- package/typewriter-text.js +0 -2
- package/typewriter-text.js.map +0 -1
- package/web-components/a/avatar-a.d.ts.map +0 -1
- package/web-components/a/avatar-a.js.map +0 -1
- package/web-components/a/link-a.d.ts.map +0 -1
- package/web-components/a/link-a.js.map +0 -1
- package/web-components/a/super-a.d.ts +0 -31
- package/web-components/a/super-a.d.ts.map +0 -1
- package/web-components/a/super-a.js.map +0 -1
- package/web-components/button/base-button.d.ts.map +0 -1
- package/web-components/button/base-button.js.map +0 -1
- package/web-components/carousel/carousel-slider.d.ts.map +0 -1
- package/web-components/carousel/carousel-slider.js.map +0 -1
- package/web-components/form/base-form.d.ts.map +0 -1
- package/web-components/form/base-form.js.map +0 -1
- package/web-components/form/sign-form.d.ts +0 -19
- package/web-components/form/sign-form.d.ts.map +0 -1
- package/web-components/form/sign-form.js +0 -16
- package/web-components/form/sign-form.js.map +0 -1
- package/web-components/group/tab-group.d.ts.map +0 -1
- package/web-components/group/tab-group.js.map +0 -1
- package/web-components/input/base-input.d.ts +0 -49
- package/web-components/input/base-input.d.ts.map +0 -1
- package/web-components/input/base-input.js +0 -246
- package/web-components/input/base-input.js.map +0 -1
- package/web-components/items/alert-item.d.ts.map +0 -1
- package/web-components/items/alert-item.js.map +0 -1
- package/web-components/items/card-item.d.ts.map +0 -1
- package/web-components/items/card-item.js.map +0 -1
- package/web-components/items/drag-box.d.ts.map +0 -1
- package/web-components/items/drag-box.js.map +0 -1
- package/web-components/items/index.d.ts +0 -5
- package/web-components/items/index.d.ts.map +0 -1
- package/web-components/items/index.js +0 -6
- package/web-components/items/index.js.map +0 -1
- package/web-components/items/time-bar.d.ts.map +0 -1
- package/web-components/items/time-bar.js.map +0 -1
- package/web-components/layout/divider-line.d.ts.map +0 -1
- package/web-components/layout/divider-line.js.map +0 -1
- package/web-components/layout/nav-aside.d.ts +0 -25
- package/web-components/layout/nav-aside.d.ts.map +0 -1
- package/web-components/layout/nav-aside.js +0 -70
- package/web-components/layout/nav-aside.js.map +0 -1
- package/web-components/loading/loading-progress.d.ts.map +0 -1
- package/web-components/loading/loading-progress.js.map +0 -1
- package/web-components/loading/skeleton-screen.d.ts.map +0 -1
- package/web-components/loading/skeleton-screen.js.map +0 -1
- package/web-components/open/open-details.d.ts.map +0 -1
- package/web-components/open/open-details.js.map +0 -1
- package/web-components/open/open-dialog.d.ts.map +0 -1
- package/web-components/open/open-dialog.js.map +0 -1
- package/web-components/open/open-offset.d.ts.map +0 -1
- package/web-components/open/open-offset.js.map +0 -1
- package/web-components/open/open-tooltip.d.ts +0 -24
- package/web-components/open/open-tooltip.d.ts.map +0 -1
- package/web-components/open/open-tooltip.js.map +0 -1
- package/web-components/open/open.d.ts.map +0 -1
- package/web-components/open/open.js.map +0 -1
- package/web-components/text/clip-text.d.ts +0 -21
- package/web-components/text/clip-text.d.ts.map +0 -1
- package/web-components/text/clip-text.js.map +0 -1
- package/web-components/text/overbreath-text.d.ts.map +0 -1
- package/web-components/text/overbreath-text.js.map +0 -1
- package/web-components/text/typewriter-text.d.ts.map +0 -1
- package/web-components/text/typewriter-text.js.map +0 -1
- package/web-components/view/route-view.d.ts.map +0 -1
- package/web-components/view/route-view.js.map +0 -1
- package/web-components/view/scroll-x.d.ts +0 -25
- package/web-components/view/scroll-x.d.ts.map +0 -1
- package/web-components/view/scroll-x.js +0 -97
- package/web-components/view/scroll-x.js.map +0 -1
- package/web-components/view/wrap-view.d.ts.map +0 -1
- package/web-components/view/wrap-view.js.map +0 -1
- package/wrap-view.d.ts +0 -2
- package/wrap-view.d.ts.map +0 -1
- package/wrap-view.js +0 -2
- package/wrap-view.js.map +0 -1
@@ -1,24 +0,0 @@
|
|
1
|
-
import { CSSResultGroup } from "../../deps.js";
|
2
|
-
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
-
import { type Direction8, OpenableElement } from "./open.js";
|
4
|
-
/**
|
5
|
-
* OpenTooltip provide tooltip for slot elements, summary as the tips content.
|
6
|
-
*
|
7
|
-
* Content can be opened in 8 directions.
|
8
|
-
*/
|
9
|
-
export declare class OpenTooltip extends OpenableElement {
|
10
|
-
direction: Direction8 | "";
|
11
|
-
/**
|
12
|
-
* Tip content align.
|
13
|
-
*/
|
14
|
-
align: "center" | "flex-star" | "flex-end" | "";
|
15
|
-
static styles: CSSResultGroup;
|
16
|
-
protected render(): HTMLTemplate;
|
17
|
-
}
|
18
|
-
export default OpenTooltip;
|
19
|
-
declare global {
|
20
|
-
interface HTMLElementTagNameMap {
|
21
|
-
"open-tooltip": OpenTooltip;
|
22
|
-
}
|
23
|
-
}
|
24
|
-
//# sourceMappingURL=open-tooltip.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"open-tooltip.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/open/open-tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAkB,MAAM,eAAe,CAAC;AACpE,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,KAAK,UAAU,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAI7D;;;;GAIG;AACH,qBACa,WAAY,SAAQ,eAAe;IAC9C,SAAS,EAAE,UAAU,GAAG,EAAE,CAAC;IAC3B;;OAEG;IACS,KAAK,EAAE,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,EAAE,CAAM;IAEjE,MAAM,CAAC,MAAM,EAAE,cAAc,CAgD3B;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;CAMjC;AAED,eAAe,WAAW,CAAC;AAE3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"open-tooltip.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/open/open-tooltip.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAkB,IAAI,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAmB,eAAe,EAAE,MAAM,WAAW,CAAC;AAE7D,MAAM,UAAU,GAAG,cAAc,CAAC;AAElC;;;;GAIG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,eAAe;IAAzC;;QAEL;;WAEG;QACS,UAAK,GAA6C,EAAE,CAAC;IA0DnE,CAAC;IANW,MAAM;QACd,OAAO,IAAI,CAAA,gCAAgC,IAAI,CAAC,KAAK,IAAI,SAAS;QAC9D,QAAQ,EAAE;sBACI,IAAI,CAAC,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,SAAS,CAAC;YACzE,CAAC;IACX,CAAC;;AAvDM,kBAAM,GAAmB;IAC9B,eAAe,CAAC,MAAM;IACtB,GAAG,CAAA;;qBAEc,YAAY,CAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6BjC;IACD,GAAG,CAAA;;;;;;;;;;;;;KAaF;CACF,AAhDY,CAgDX;AAlDU;IAAX,QAAQ,EAAE;0CAAsD;AALtD,WAAW;IADvB,MAAM,CAAC,UAAU,CAAC;GACN,WAAW,CA+DvB;;AAED,eAAe,WAAW,CAAC","sourcesContent":["import { css, CSSResultGroup, html, property } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { cssvarValues, define } from \"../../root.js\";\nimport { type Direction8, OpenableElement } from \"./open.js\";\n\nconst defineName = \"open-tooltip\";\n\n/**\n * OpenTooltip provide tooltip for slot elements, summary as the tips content.\n *\n * Content can be opened in 8 directions.\n */\n@define(defineName)\nexport class OpenTooltip extends OpenableElement {\n direction: Direction8 | \"\";\n /**\n * Tip content align.\n */\n @property() align: \"center\" | \"flex-star\" | \"flex-end\" | \"\" = \"\";\n\n static styles: CSSResultGroup = [\n OpenableElement.styles,\n css`\n :host {\n color: var(${cssvarValues.text});\n display: inline-flex;\n transition: 0.3s ease-in-out;\n justify-content: center;\n }\n\n main {\n display: inline-flex;\n align-items: center;\n position: relative;\n transition: inherit;\n }\n\n main,\n aside {\n transition: inherit;\n white-space: nowrap;\n }\n\n aside {\n opacity: 0;\n position: absolute;\n transition-property: opacity;\n }\n\n :host(:hover) aside,\n :host([open]) aside {\n opacity: 1;\n }\n `,\n css`\n aside[class^=\"top\"] {\n bottom: 100%;\n }\n aside[class^=\"bottom\"] {\n top: 100%;\n }\n aside[class$=\"right\"] {\n left: 100%;\n }\n aside[class$=\"left\"] {\n right: 100%;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return html`<main style=\"justify-content:${this.align || \"inherit\"}\">\n ${htmlSlot()}\n <aside class=\"${this.direction || \"top\"}\">${this.summary || htmlSlot(\"summary\")}</aside>\n </main>`;\n }\n}\n\nexport default OpenTooltip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"open-tooltip\": OpenTooltip;\n }\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"open.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/open/open.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAY,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE7D,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE/C,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAEhG,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE/C,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,EAAE,CAAC;AAExC,qBAAa,eAAgB,SAAQ,aAAa;IAChD;;OAEG;IACS,OAAO,SAAM;IACzB;;OAEG;IACyC,KAAK,UAAS;IAC1D;;OAEG;IACyC,IAAI,UAAS;IACzD;;OAEG;IACS,EAAE,EAAE,QAAQ,CAAM;IAC9B;;OAEG;IACS,SAAS,EAAE,UAAU,GAAG,EAAE,CAAM;IAE5C,MAAM,CAAC,MAAM,iBAYO;IAEpB,MAAM,CAAC,EAAE,UAAa;IAItB,KAAK;IAIL,IAAI;IAIJ,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAQ3D,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;CAGrC;AAED,eAAe,eAAe,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"open.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/open/open.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,QAAQ,EAAyB,MAAM,eAAe,CAAC;AAE1F,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAY9C,MAAM,OAAO,eAAgB,SAAQ,aAAa;IAAlD;;QACE;;WAEG;QACS,YAAO,GAAG,EAAE,CAAC;QACzB;;WAEG;QACyC,UAAK,GAAG,KAAK,CAAC;QAC1D;;WAEG;QACyC,SAAI,GAAG,KAAK,CAAC;QACzD;;WAEG;QACS,OAAE,GAAa,EAAE,CAAC;QAC9B;;WAEG;QACS,cAAS,GAAoB,EAAE,CAAC;IAuC9C,CAAC;IAvBC,MAAM,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI;QACpB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;IACjB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,CAAC;IAED,IAAI;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAES,OAAO,CAAC,iBAAyC;QACzD,MAAM,IAAI,GAAG,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,OAAO,IAAI,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC;YAC9B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IAED,6DAA6D;IACnD,YAAY,CAAC,CAAa;QAClC,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;;AApCM,sBAAM,GAAG;IACd,aAAa,CAAC,MAAM;IACpB,GAAG,CAAA;;;;;;;;;KASF;CACgB,AAZN,CAYO;AA9BR;IAAX,QAAQ,EAAE;gDAAc;AAImB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAe;AAId;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAc;AAI7C;IAAX,QAAQ,EAAE;2CAAmB;AAIlB;IAAX,QAAQ,EAAE;kDAAiC;AAyC9C,eAAe,eAAe,CAAC","sourcesContent":["import { css, type CSSResultGroup, property, type PropertyValueMap } from \"../../deps.js\";\nimport { type EventsNames } from \"../../lib/event-collection.js\";\nimport { GodownElement } from \"../../root.js\";\n\nexport type Direction4 = \"left\" | \"right\" | \"top\" | \"bottom\";\n\nexport type Direction5 = Direction4 | \"center\";\n\nexport type Direction8 = Direction4 | \"top-left\" | \"top-right\" | \"bottom-left\" | \"bottom-right\";\n\nexport type Direction9 = Direction8 | \"center\";\n\nexport type OnEvents = EventsNames | \"\";\n\nexport class OpenableElement extends GodownElement {\n /**\n * Summary text.\n */\n @property() summary = \"\";\n /**\n * Make the content float.\n */\n @property({ type: Boolean, reflect: true }) float = false;\n /**\n * Open the content.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n /**\n * Enable event mode.\n */\n @property() on: OnEvents = \"\";\n /**\n * Direction of appearance.\n */\n @property() direction: Direction9 | \"\" = \"\";\n\n static styles = [\n GodownElement.styles,\n css`\n :host {\n display: block;\n transition:\n all 0.3s ease-in-out,\n color 0s,\n background 0s;\n height: fit-content;\n }\n `,\n ] as CSSResultGroup;\n\n toggle(to = !this.open) {\n this.open = to;\n }\n\n close() {\n this.open = false;\n }\n\n show() {\n this.open = true;\n }\n\n protected updated(changedProperties: PropertyValueMap<this>) {\n const open = changedProperties.get(\"open\");\n if (typeof open === typeof !0) {\n this.dispatchEvent(new CustomEvent(\"change\", { detail: this.open }));\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected _handelClick(_: MouseEvent) {\n this.toggle();\n }\n}\n\nexport default OpenableElement;\n"]}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { type CSSResultGroup } from "../../deps.js";
|
2
|
-
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
-
import { GodownElement } from "../../root.js";
|
4
|
-
/**
|
5
|
-
* ClipText renders a gradient text.
|
6
|
-
*/
|
7
|
-
export declare class ClipText extends GodownElement {
|
8
|
-
/**
|
9
|
-
* The text to be clipped.
|
10
|
-
*/
|
11
|
-
text: string;
|
12
|
-
static styles: CSSResultGroup;
|
13
|
-
protected render(): HTMLTemplate | string;
|
14
|
-
}
|
15
|
-
export default ClipText;
|
16
|
-
declare global {
|
17
|
-
interface HTMLElementTagNameMap {
|
18
|
-
"clip-text": ClipText;
|
19
|
-
}
|
20
|
-
}
|
21
|
-
//# sourceMappingURL=clip-text.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"clip-text.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/text/clip-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAY,MAAM,eAAe,CAAC;AACnE,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAA+B,aAAa,EAAE,MAAM,eAAe,CAAC;AAK3E;;GAEG;AACH,qBACa,QAAS,SAAQ,aAAa;IACzC;;OAEG;IACS,IAAI,SAAM;IAEtB,MAAM,CAAC,MAAM,iBAaO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY,GAAG,MAAM;CAG1C;AAED,eAAe,QAAQ,CAAC;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"clip-text.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/text/clip-text.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE3E,MAAM,UAAU,GAAG,WAAW,CAAC;AAC/B,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C;;GAEG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,aAAa;IAApC;;QACL;;WAEG;QACS,SAAI,GAAG,EAAE,CAAC;IAoBxB,CAAC;IAHW,MAAM;QACd,OAAO,IAAI,CAAC,IAAI,IAAI,QAAQ,EAAE,CAAC;IACjC,CAAC;;AAjBM,eAAM,GAAG;IACd,aAAa,CAAC,MAAM;IACpB,GAAG,CAAA;;UAEG,WAAW,0BAA0B,MAAM;0BAC3B,WAAW;;;;;;;KAOhC;CACgB,AAbN,CAaO;AAfR;IAAX,QAAQ,EAAE;sCAAW;AAJX,QAAQ;IADpB,MAAM,CAAC,UAAU,CAAC;GACN,QAAQ,CAwBpB;;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import { css, type CSSResultGroup, property } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { createScope, cssvar, define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"clip-text\";\nconst cssvarScope = createScope(defineName);\n\n/**\n * ClipText renders a gradient text.\n */\n@define(defineName)\nexport class ClipText extends GodownElement {\n /**\n * The text to be clipped.\n */\n @property() text = \"\";\n\n static styles = [\n GodownElement.styles,\n css`\n :host {\n ${cssvarScope}--clip-background: var(${cssvar}--clip-background);\n background: var(${cssvarScope}--clip-background);\n color: transparent;\n -webkit-text-fill-color: transparent;\n background-clip: text !important;\n -webkit-background-clip: text !important;\n display: inline-flex;\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate | string {\n return this.text || htmlSlot();\n }\n}\n\nexport default ClipText;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"clip-text\": ClipText;\n }\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"overbreath-text.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/text/overbreath-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAkB,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAA+B,aAAa,EAAE,MAAM,eAAe,CAAC;AAK3E;;;;GAIG;AACH,qBACa,cAAe,SAAQ,aAAa;IAC/C;;OAEG;IACS,EAAE,SAAM;IAER,EAAE,SAAM;IAER,EAAE,SAAM;IAEpB,MAAM,CAAC,MAAM,iBAiLO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY,EAAE;IAIlC,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY;CAMjD;AAED,eAAe,cAAc,CAAC;AAE9B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,cAAc,CAAC;KACnC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"overbreath-text.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/text/overbreath-text.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE3E,MAAM,UAAU,GAAG,iBAAiB,CAAC;AACrC,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C;;;;GAIG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,aAAa;IAA1C;;QACL;;WAEG;QACS,OAAE,GAAG,EAAE,CAAC;QACpB,SAAS;QACG,OAAE,GAAG,EAAE,CAAC;QACpB,SAAS;QACG,OAAE,GAAG,EAAE,CAAC;IA+LtB,CAAC;IAVW,MAAM;QACd,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC1D,CAAC;IAES,UAAU,CAAC,IAAY;QAC/B,OAAO,IAAI,CAAA;yBACU,IAAI;yBACJ,IAAI;YACjB,CAAC;IACX,CAAC;;AA5LM,qBAAM,GAAG;IACd,aAAa,CAAC,MAAM;IACpB,GAAG,CAAA;;UAEG,WAAW;UACX,WAAW;UACX,WAAW;UACX,WAAW;UACX,WAAW;UACX,WAAW;UACX,WAAW;UACX,WAAW,4BAA4B,WAAW,eAAe,WAAW,eAAe,WAAW;UACtG,WAAW,4BAA4B,WAAW,eAAe,WAAW,eAAe,WAAW;UACtG,WAAW,4BAA4B,WAAW,eAAe,WAAW,eAAe,WAAW;;KAE3G;IACD,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA2CyB,WAAW;;;;;gCAKX,WAAW;;;;;gCAKX,WAAW;;;;;;;;;;;;;;KActC;IACD,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+EF;IACD,GAAG,CAAA;;UAEG,WAAW,0BAA0B,MAAM;0BAC3B,WAAW;;;;;;;;;KAShC;CACgB,AAjLN,CAiLO;AAvLR;IAAX,QAAQ,EAAE;0CAAS;AAER;IAAX,QAAQ,EAAE;0CAAS;AAER;IAAX,QAAQ,EAAE;0CAAS;AART,cAAc;IAD1B,MAAM,CAAC,UAAU,CAAC;GACN,cAAc,CAuM1B;;AAED,eAAe,cAAc,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, property } from \"../../deps.js\";\nimport { type HTMLTemplate } from \"../../lib/templates.js\";\nimport { createScope, cssvar, define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"overbreath-text\";\nconst cssvarScope = createScope(defineName);\n\n/**\n * OverbreathText renders three animated pieces of text.\n *\n * Inspired by Vercel homepage (2022? - 2023).\n */\n@define(defineName)\nexport class OverbreathText extends GodownElement {\n /**\n * One of the texts.\n */\n @property() t1 = \"\";\n // As t1.\n @property() t2 = \"\";\n // As t2.\n @property() t3 = \"\";\n\n static styles = [\n GodownElement.styles,\n css`\n :host {\n ${cssvarScope}--1-1: #ae0ca5;\n ${cssvarScope}--1-2: #ffd802;\n ${cssvarScope}--2-1: #1fe173;\n ${cssvarScope}--2-2: #582bca;\n ${cssvarScope}--3-1: #00b4f0;\n ${cssvarScope}--3-2: #e614e6;\n ${cssvarScope}--deg: 60deg;\n ${cssvarScope}--1: linear-gradient(var(${cssvarScope}--deg), var(${cssvarScope}--1-1), var(${cssvarScope}--1-2));\n ${cssvarScope}--2: linear-gradient(var(${cssvarScope}--deg), var(${cssvarScope}--2-1), var(${cssvarScope}--2-2));\n ${cssvarScope}--3: linear-gradient(var(${cssvarScope}--deg), var(${cssvarScope}--3-1), var(${cssvarScope}--3-2));\n }\n `,\n css`\n :host {\n display: flex;\n margin: auto;\n width: fit-content;\n font-size: clamp(3.5rem, 10vw, 5.5rem);\n align-items: center;\n }\n\n @media (max-width: 1280px) {\n :host {\n flex-direction: column;\n }\n }\n\n *::selection {\n background: none;\n }\n\n .fg,\n .bg {\n padding: 0 0.05em;\n box-sizing: border-box;\n }\n\n .bg {\n position: absolute;\n top: 0;\n }\n\n span {\n display: block;\n }\n\n .rel {\n position: relative;\n font-weight: 800;\n font-size: inherit;\n letter-spacing: -0.05em;\n }\n\n .rel:nth-child(1) .fg {\n animation: lg1 8s infinite;\n background-image: var(${cssvarScope}--1);\n }\n\n .rel:nth-child(2) .fg {\n animation: 8s infinite lg2;\n background-image: var(${cssvarScope}--2);\n }\n\n .rel:nth-child(3) .fg {\n animation: 8s infinite lg3;\n background-image: var(${cssvarScope}--3);\n }\n\n .rel:nth-child(1) .bg {\n animation: text1 8s infinite;\n }\n\n .rel:nth-child(2) .bg {\n animation: text2 8s infinite;\n }\n\n .rel:nth-child(3) .bg {\n animation: text3 8s infinite;\n }\n `,\n css`\n @keyframes lg1 {\n 0%,\n 16.667%,\n to {\n opacity: 1;\n }\n 33.333%,\n 83.333% {\n opacity: 0;\n }\n }\n\n @keyframes lg2 {\n 0%,\n to {\n opacity: 0;\n }\n 33.333%,\n 50% {\n opacity: 1;\n }\n 16.667%,\n 66.667% {\n opacity: 0;\n }\n }\n\n @keyframes lg3 {\n 0%,\n 50%,\n to {\n opacity: 0;\n }\n 66.667%,\n 83.333% {\n opacity: 1;\n }\n }\n\n @keyframes text1 {\n 0%,\n 16.667%,\n to {\n opacity: 0;\n }\n 25%,\n 91.667% {\n opacity: 1;\n }\n }\n\n @keyframes text2 {\n 0%,\n to {\n opacity: 1;\n }\n 33.333%,\n 50% {\n opacity: 0;\n }\n 25%,\n 58.333% {\n opacity: 1;\n }\n }\n\n @keyframes text3 {\n 0%,\n 58.333%,\n 91.667%,\n to {\n opacity: 1;\n }\n 66.667%,\n 83.333% {\n opacity: 0;\n }\n }\n `,\n css`\n span.bg {\n ${cssvarScope}--clip-background: var(${cssvar}--clip-background);\n background: var(${cssvarScope}--clip-background);\n }\n span {\n color: transparent;\n -webkit-text-fill-color: transparent;\n background-clip: text !important;\n -webkit-background-clip: text !important;\n display: inline-flex;\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate[] {\n return [this.t1, this.t2, this.t3].map(this.renderText);\n }\n\n protected renderText(text: string): HTMLTemplate {\n return html`<span class=\"rel\">\n <span class=\"bg\">${text}</span>\n <span class=\"fg\">${text}</span>\n </span>`;\n }\n}\n\nexport default OverbreathText;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"overbreath-text\": OverbreathText;\n }\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"typewriter-text.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/text/typewriter-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,gBAAgB,EAAgB,MAAM,eAAe,CAAC;AACzF,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAuB,aAAa,EAAE,MAAM,eAAe,CAAC;AAKnE;;GAEG;AACH,qBACa,cAAe,SAAQ,aAAa;IAC/C;;OAEG;IACS,IAAI,SAAM;IACtB;;OAEG;IAC0B,OAAO,UAAS;IAC7C;;OAEG;IAC0B,KAAK,UAAS;IAC3C;;OAEG;IACyB,GAAG,SAAO;IACtC;;OAEG;IACyB,GAAG,SAAM;IACrC;;OAEG;IACyB,KAAK,SAAK;IACtC;;OAEG;IACyB,KAAK,SAAK;IACtC;;OAEG;IACM,OAAO,SAAM;IAEtB,SAAS,EAAE,MAAM,CAAC;IACN,EAAE,EAAE,WAAW,CAAC;IAE5B;;OAEG;IACH,IAAI,GAAG,WAEN;IAED,MAAM,CAAC,MAAM,4BA+BX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAIhC,SAAS,CAAC,YAAY;IAStB,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAM3D,KAAK,CAAC,EAAE,SAAa;IAYrB,IAAI;IAIJ,GAAG;CAGJ;AAED,eAAe,cAAc,CAAC;AAE9B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,cAAc,CAAC;KACnC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"typewriter-text.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/text/typewriter-text.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAyB,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnE,MAAM,UAAU,GAAG,iBAAiB,CAAC;AACrC,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C;;GAEG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,aAAa;IAA1C;;QACL;;WAEG;QACS,SAAI,GAAG,EAAE,CAAC;QACtB;;WAEG;QAC0B,YAAO,GAAG,KAAK,CAAC;QAC7C;;WAEG;QAC0B,UAAK,GAAG,KAAK,CAAC;QAC3C;;WAEG;QACyB,QAAG,GAAG,GAAG,CAAC;QACtC;;WAEG;QACyB,QAAG,GAAG,EAAE,CAAC;QACrC;;WAEG;QACyB,UAAK,GAAG,CAAC,CAAC;QACtC;;WAEG;QACyB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";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { random } from \"../../lib/utils.js\";\nimport { createScope, define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"typewriter-text\";\nconst cssvarScope = createScope(defineName);\n\n/**\n * TypewriterText renders a typewriter effect to text.\n */\n@define(defineName)\nexport class TypewriterText extends GodownElement {\n /**\n * Raw text.\n */\n @property() text = \"\";\n /**\n * Start immediately after {@linkcode TypewriterText.firstUpdated}.\n */\n @property({ type: Boolean }) stopped = false;\n /**\n * If true, hide the cursor\n */\n @property({ type: Boolean }) ended = false;\n /**\n * Maximum random time.\n */\n @property({ type: Number }) max = 100;\n /**\n * Minimum random time.\n */\n @property({ type: Number }) min = 50;\n /**\n * Fixed time.\n */\n @property({ type: Number }) delay = 0;\n /**\n * The index at the beginning.\n */\n @property({ type: Number }) index = 0;\n /**\n * Internal text.\n */\n @state() content = \"\";\n\n timeoutID: number;\n @query(\"i\") _i: HTMLElement;\n\n /**\n * {@linkcode TypewriterText.text} length.\n */\n get len() {\n return this.text.length;\n }\n\n static styles = [\n css`\n :host {\n ${cssvarScope}--cursor-width: .05em;\n font-family: monospace;\n white-space: nowrap;\n }\n\n i {\n border-right: var(${cssvarScope}--cursor-width) solid;\n margin-left: 0.02em;\n animation: s 1.5s steps(1) infinite;\n }\n\n @keyframes s {\n 0% {\n border-color: currentColor;\n }\n 50% {\n border-color: transparent;\n }\n }\n\n slot {\n display: none;\n }\n\n .hidden {\n visibility: hidden;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return html`${htmlSlot()}${this.content}<i class=\"${(this.ended && \"hidden\") || \"\"}\"></i>`;\n }\n\n protected firstUpdated() {\n if (!this.text) {\n this.text = this.assignedNodes[0]?.textContent.trim() || \"\";\n }\n if (!this.stopped && this.len) {\n this.write();\n }\n }\n\n protected updated(changedProperties: PropertyValueMap<this>) {\n if (changedProperties.has(\"index\")) {\n this.dispatchEvent(new CustomEvent(this.index === this.len ? \"done\" : \"write\", { detail: this.content }));\n }\n }\n\n write(at = this.index) {\n this.content = this.text.slice(0, at + 1);\n const timeout = this.delay || random(this.max, this.min);\n this.timeoutID = setTimeout(() => {\n const nx = at + 1;\n if (nx <= this.len) {\n this.index = nx;\n this.write();\n }\n }, timeout);\n }\n\n stop() {\n clearTimeout(this.timeoutID);\n }\n\n end() {\n this.ended = true;\n }\n}\n\nexport default TypewriterText;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"typewriter-text\": TypewriterText;\n }\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"route-view.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/view/route-view.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,gBAAgB,EAAS,MAAM,eAAe,CAAC;AAC5E,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGrE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAM9C;;GAEG;AACH,qBACa,SAAS,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,aAAa;IACvD,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,GAAG,kCAAc;IAC1B;;OAEG;IACS,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAY;IACtE;;OAEG;IACM,QAAQ,UAAQ;IACzB;;OAEG;IAC0B,KAAK,UAAS;IAE3C;;OAEG;IACH,MAAM;;;;;OAAwD;IAE9D,IAAI,MAAM,CAAC,CAAC;;QAAA,EAUX;IAED,IAAI,MAAM;;SAET;IAED,MAAM,CAAC,MAAM,4BAMX;IAEF,KAAK;IAKL,SAAS,CAAC,MAAM,IAAI,CAAC,GAAG,YAAY;IAwBpC,SAAS;;;;;;IAST,iBAAiB;IAsBjB;;;;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,EAAE,OAAO,SAAe,EAAE,IAAI,GAAE,SAA2B,GAAG,MAAM,GAAG,IAAI;IAIrG,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,GAAE,SAA2B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIvH,MAAM,CAAC,SAAS;CAYjB;AAED,eAAe,SAAS,CAAC;AAEzB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"route-view.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/view/route-view.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAyB,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAA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,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACxD,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,OAAO;QACT,CAAC;QACD,MAAM,cAAc,GAAG,oBAAoB,CAAY,gBAAgB,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxF,cAAc,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YACnC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;gBACxB,SAAS,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;YAChD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AAxJM,gBAAM,GAAG;IACd,GAAG,CAAA;;;;KAIF;CACF,AANY,CAMX;AA7DO;IAAR,KAAK,EAAE;4CAAoC;AAInC;IAAR,KAAK,EAAE;yCAAqC;AAIpC;IAAR,KAAK,EAAE;uCAAqB;AAIjB;IAAX,QAAQ,EAAE;2CAAe;AAId;IAAX,QAAQ,EAAE;0CAAc;AAIhB;IAAR,KAAK,EAAE;sCAAkB;AAId;IAAX,QAAQ,EAAE;uCAA2D;AAI7D;IAAR,KAAK,EAAE;2CAAiB;AAII;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCAAe;AAvChC,SAAS;IADrB,MAAM,CAAC,UAAU,CAAC;GACN,SAAS,CAuNrB;;AAED,eAAe,SAAS,CAAC","sourcesContent":["import { conf } from \"../../conf.js\";\nimport { css, property, type PropertyValueMap, state } from \"../../deps.js\";\nimport RouteTree from \"../../lib/route-tree.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { deepQuerySelectorAll } from \"../../lib/utils.js\";\nimport { define } from \"../../root.js\";\nimport { GodownElement } from \"../../root.js\";\n\ntype WithRecord<T extends string> = Record<string, any> & Record<T, string>;\n\nconst defineName = \"route-view\";\n\n/**\n * RouteView has basic routing control.\n */\n@define(defineName)\nexport class RouteView<T = unknown> extends GodownElement {\n private _routes: (WithRecord<\"path\"> & { component?: T })[] = [];\n private _routeTree: RouteTree = new RouteTree();\n\n /**\n * Component will render.\n */\n @state() component: T | HTMLTemplate = null;\n /**\n * Dynamic parameters record.\n */\n @state() params: Record<string, string> = {};\n /**\n * Value of matched path in routes, or null.\n */\n @state() path: string = null;\n /**\n * Current pathname (location.pathname).\n */\n @property() pathname = \"\";\n /**\n * Path prefix.\n */\n @property() baseURL = \"\";\n /**\n * Rendered content when there is no match.\n */\n @state() def = htmlSlot();\n /**\n * The type of routing query.\n */\n @property() type: \"united\" | \"child\" | \"slotted\" | \"field\" = \"united\";\n /**\n * Rewrite history.\n */\n @state() override = true;\n /**\n * Cache accessed.\n */\n @property({ type: Boolean }) cache = false;\n\n /**\n * Cache record.\n */\n record = new Map<string, ReturnType<typeof this.useRouter>>();\n\n set routes(v) {\n if (Object.prototype.toString.call(v) !== \"[object Array]\") {\n return;\n }\n this._routes = v;\n this.reset();\n for (const route of v) {\n this._routeTree.insert(route.path);\n }\n this.requestUpdate();\n }\n\n get routes() {\n return this._routes;\n }\n\n static styles = [\n css`\n :host {\n display: contents;\n }\n `,\n ];\n\n reset() {\n this._routeTree = new RouteTree();\n this.record.clear();\n }\n\n protected render(): T | HTMLTemplate {\n if (this.cache) {\n const cached = this.record.get(this.pathname);\n if (cached) {\n Object.assign(this, cached);\n return this.component;\n }\n }\n this.params = {};\n switch (this.type) {\n case \"field\":\n this.component = this.fieldComponent();\n break;\n case \"child\":\n case \"slotted\":\n this.component = this.slottedComponent();\n break;\n case \"united\":\n this.component = this.fieldComponent() ?? this.slottedComponent();\n break;\n }\n return this.component ?? this.def;\n }\n\n useRouter() {\n return {\n pathname: this.pathname,\n params: this.params,\n path: this.path,\n component: this.component,\n };\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.pathname = window.location.pathname;\n if (!this.override) {\n return;\n }\n this.addEvent(window, \"popstate\", () => {\n this.pathname = window.location.pathname;\n });\n const self = this;\n const pushHistory = history.pushState;\n history.pushState = function () {\n pushHistory.apply(this, arguments);\n self.pathname = window.location.pathname;\n };\n const replaceHistory = history.replaceState;\n history.replaceState = function () {\n replaceHistory.apply(this, arguments);\n self.pathname = window.location.pathname;\n };\n }\n\n /**\n *\n * @param ur value of useRouter()\n * @param first whether this path is loaded for the first time\n */\n routeChangeCallback: (ur: ReturnType<typeof this.useRouter>, first: boolean) => void = null;\n\n protected updated(changedProperties: PropertyValueMap<this>) {\n const shouldDispatch = changedProperties.has(\"pathname\") || changedProperties.has(\"path\");\n if (shouldDispatch) {\n const ur = this.useRouter();\n const noRecord = !this.record.has(this.pathname);\n if (noRecord) {\n this.record.set(this.pathname, ur);\n }\n this.routeChangeCallback?.(ur, noRecord);\n this.dispatchEvent(new CustomEvent(\"change\", { detail: ur }));\n }\n }\n\n fieldComponent(usedRouteTemplate?: string): null | T {\n if (!usedRouteTemplate) {\n usedRouteTemplate = this.useWhichRoute(this.pathname);\n }\n this.path = usedRouteTemplate;\n if (!usedRouteTemplate) {\n return null;\n }\n this.params = this.parseRouterParams(this.path, this.pathname);\n const route = this.routes.find((r) => r.path === usedRouteTemplate);\n if (!route) {\n return null;\n }\n return route.component;\n }\n\n slottedComponent(usedRouteTemplate?: string): null | HTMLTemplate {\n const childNodes = this.querySelectorAll(\":scope > *[slot]\");\n if (!childNodes.length) {\n return null;\n }\n const slottedPaths = Array.from(childNodes).map((node) => {\n const slotname = node.getAttribute(\"slot\");\n return {\n path: slotname,\n };\n });\n const tempRouteTree = new RouteTree();\n for (const withPath of slottedPaths) {\n tempRouteTree.insert(withPath.path);\n }\n if (!usedRouteTemplate) {\n usedRouteTemplate = this.useWhichRoute(this.pathname, undefined, tempRouteTree);\n if (!usedRouteTemplate) {\n return null;\n }\n }\n const slotElement = slottedPaths.find((s) => s.path === usedRouteTemplate);\n if (!slotElement) {\n return null;\n }\n this.params = this.parseRouterParams(usedRouteTemplate, this.pathname);\n return htmlSlot(slotElement.path);\n }\n\n useWhichRoute(path: string, baseURL = this.baseURL, appl: RouteTree = this._routeTree): string | null {\n return appl.useWhich(baseURL + path);\n }\n\n parseRouterParams(routeTemplate: string, originpath: string, appl: RouteTree = this._routeTree): Record<string, string> {\n return appl.parseParams(originpath, routeTemplate);\n }\n\n static updateAll() {\n const routeViewTagName = conf.nameMap.get(\"route-view\");\n if (!routeViewTagName) {\n return;\n }\n const routeViewArray = deepQuerySelectorAll<RouteView>(routeViewTagName, document.body);\n routeViewArray.forEach((ArrayItem) => {\n if (!ArrayItem.override) {\n ArrayItem.pathname = window.location.pathname;\n }\n });\n }\n}\n\nexport default RouteView;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"route-view\": RouteView;\n }\n}\n"]}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { type HTMLTemplate } from "../../lib/templates.js";
|
2
|
-
import { GodownElement } from "../../root.js";
|
3
|
-
/**
|
4
|
-
* ScrollX changes the scroll direction to horizontal.
|
5
|
-
*/
|
6
|
-
export declare class ScrollX extends GodownElement {
|
7
|
-
/**
|
8
|
-
* Element height.
|
9
|
-
*/
|
10
|
-
height: string;
|
11
|
-
_section: HTMLElement;
|
12
|
-
static styles: import("lit").CSSResult;
|
13
|
-
protected render(): HTMLTemplate;
|
14
|
-
protected _handelScroll(e: any): void;
|
15
|
-
protected firstUpdated(): void;
|
16
|
-
protected _handelResize(): void;
|
17
|
-
resize(): void;
|
18
|
-
}
|
19
|
-
export default ScrollX;
|
20
|
-
declare global {
|
21
|
-
interface HTMLElementTagNameMap {
|
22
|
-
"scroll-x": ScrollX;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
//# sourceMappingURL=scroll-x.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"scroll-x.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/view/scroll-x.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGhF,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI9C;;GAEG;AACH,qBACa,OAAQ,SAAQ,aAAa;IACxC;;OAEG;IACS,MAAM,SAAM;IAEN,QAAQ,EAAE,WAAW,CAAC;IAExC,MAAM,CAAC,MAAM,0BA4BX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAUhC,SAAS,CAAC,aAAa,CAAC,CAAC,EAAE,GAAG;IAI9B,SAAS,CAAC,YAAY;IAKtB,SAAS,CAAC,aAAa;IAIvB,MAAM;CAiBP;AAED,eAAe,OAAO,CAAC;AAEvB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
@@ -1,97 +0,0 @@
|
|
1
|
-
import { __decorate } from "tslib";
|
2
|
-
import { css, html, property, query } from "../../deps.js";
|
3
|
-
import { htmlSlot, htmlStyle } from "../../lib/templates.js";
|
4
|
-
import { debounce } from "../../lib/utils.js";
|
5
|
-
import { define } from "../../root.js";
|
6
|
-
import { GodownElement } from "../../root.js";
|
7
|
-
const defineName = "scroll-x";
|
8
|
-
/**
|
9
|
-
* ScrollX changes the scroll direction to horizontal.
|
10
|
-
*/
|
11
|
-
let ScrollX = class ScrollX extends GodownElement {
|
12
|
-
constructor() {
|
13
|
-
super(...arguments);
|
14
|
-
/**
|
15
|
-
* Element height.
|
16
|
-
*/
|
17
|
-
this.height = "";
|
18
|
-
}
|
19
|
-
render() {
|
20
|
-
const style = this.height && `:host{height:${this.height}}`;
|
21
|
-
return html `<section @scroll="${this._handelScroll}">
|
22
|
-
<main>
|
23
|
-
<span>${htmlSlot()}</span>
|
24
|
-
</main>
|
25
|
-
${htmlStyle(style)}
|
26
|
-
</section>`;
|
27
|
-
}
|
28
|
-
_handelScroll(e) {
|
29
|
-
this.dispatchEvent(new CustomEvent("scroll", { detail: e.target.scrollTop }));
|
30
|
-
}
|
31
|
-
firstUpdated() {
|
32
|
-
this.resize();
|
33
|
-
this.addEvent(window, "resize", debounce(this._handelResize.bind(this), 500));
|
34
|
-
}
|
35
|
-
_handelResize() {
|
36
|
-
this.resize();
|
37
|
-
}
|
38
|
-
resize() {
|
39
|
-
const child = this.firstElementChild;
|
40
|
-
if (!child) {
|
41
|
-
return;
|
42
|
-
}
|
43
|
-
const height = child.clientHeight || 0;
|
44
|
-
if (height) {
|
45
|
-
this._section.style.width = height + "px";
|
46
|
-
this._section.style.height = getComputedStyle(this).width;
|
47
|
-
}
|
48
|
-
else {
|
49
|
-
const ComputedHeight = getComputedStyle(child).height;
|
50
|
-
this.style.height = ComputedHeight;
|
51
|
-
this._section.style.width = ComputedHeight;
|
52
|
-
this._section.style.height = getComputedStyle(this).width;
|
53
|
-
}
|
54
|
-
this.height = this._section.style.width;
|
55
|
-
}
|
56
|
-
};
|
57
|
-
ScrollX.styles = css `
|
58
|
-
:host {
|
59
|
-
display: block;
|
60
|
-
width: 100%;
|
61
|
-
}
|
62
|
-
|
63
|
-
section {
|
64
|
-
overflow: auto;
|
65
|
-
position: relative;
|
66
|
-
transform-origin: 0 0;
|
67
|
-
transform: rotate(-90deg) translateX(-100%);
|
68
|
-
}
|
69
|
-
|
70
|
-
section::-webkit-scrollbar {
|
71
|
-
display: none;
|
72
|
-
}
|
73
|
-
|
74
|
-
span {
|
75
|
-
display: flex;
|
76
|
-
}
|
77
|
-
|
78
|
-
main {
|
79
|
-
width: auto;
|
80
|
-
position: absolute;
|
81
|
-
left: 100%;
|
82
|
-
transform-origin: 0 0;
|
83
|
-
transform: rotate(90deg);
|
84
|
-
}
|
85
|
-
`;
|
86
|
-
__decorate([
|
87
|
-
property()
|
88
|
-
], ScrollX.prototype, "height", void 0);
|
89
|
-
__decorate([
|
90
|
-
query("section")
|
91
|
-
], ScrollX.prototype, "_section", void 0);
|
92
|
-
ScrollX = __decorate([
|
93
|
-
define(defineName)
|
94
|
-
], ScrollX);
|
95
|
-
export { ScrollX };
|
96
|
-
export default ScrollX;
|
97
|
-
//# sourceMappingURL=scroll-x.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"scroll-x.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/view/scroll-x.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAqB,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,UAAU,GAAG,UAAU,CAAC;AAE9B;;GAEG;AAEI,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,aAAa;IAAnC;;QACL;;WAEG;QACS,WAAM,GAAG,EAAE,CAAC;IA0E1B,CAAC;IAxCW,MAAM;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,IAAI,gBAAgB,IAAI,CAAC,MAAM,GAAG,CAAC;QAC5D,OAAO,IAAI,CAAA,qBAAqB,IAAI,CAAC,aAAa;;gBAEtC,QAAQ,EAAE;;QAElB,SAAS,CAAC,KAAK,CAAC;eACT,CAAC;IACd,CAAC;IAES,aAAa,CAAC,CAAM;QAC5B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAChF,CAAC;IAES,YAAY;QACpB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAChF,CAAC;IAES,aAAa;QACrB,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAED,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC;QACrC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO;QACT,CAAC;QACD,MAAM,MAAM,GAAG,KAAK,CAAC,YAAY,IAAI,CAAC,CAAC;QACvC,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;YAC1C,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;QAC5D,CAAC;aAAM,CAAC;YACN,MAAM,cAAc,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;YACtD,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,cAAc,CAAC;YACnC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,GAAG,cAAc,CAAC;YAC3C,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;QAC5D,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;IAC1C,CAAC;;AArEM,cAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BlB,AA5BY,CA4BX;AAhCU;IAAX,QAAQ,EAAE;uCAAa;AAEN;IAAjB,KAAK,CAAC,SAAS,CAAC;yCAAuB;AAN7B,OAAO;IADnB,MAAM,CAAC,UAAU,CAAC;GACN,OAAO,CA8EnB;;AAED,eAAe,OAAO,CAAC","sourcesContent":["import { css, html, property, query } from \"../../deps.js\";\nimport { htmlSlot, htmlStyle, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { debounce } from \"../../lib/utils.js\";\nimport { define } from \"../../root.js\";\nimport { GodownElement } from \"../../root.js\";\n\nconst defineName = \"scroll-x\";\n\n/**\n * ScrollX changes the scroll direction to horizontal.\n */\n@define(defineName)\nexport class ScrollX extends GodownElement {\n /**\n * Element height.\n */\n @property() height = \"\";\n\n @query(\"section\") _section: HTMLElement;\n\n static styles = css`\n :host {\n display: block;\n width: 100%;\n }\n\n section {\n overflow: auto;\n position: relative;\n transform-origin: 0 0;\n transform: rotate(-90deg) translateX(-100%);\n }\n\n section::-webkit-scrollbar {\n display: none;\n }\n\n span {\n display: flex;\n }\n\n main {\n width: auto;\n position: absolute;\n left: 100%;\n transform-origin: 0 0;\n transform: rotate(90deg);\n }\n `;\n\n protected render(): HTMLTemplate {\n const style = this.height && `:host{height:${this.height}}`;\n return html`<section @scroll=\"${this._handelScroll}\">\n <main>\n <span>${htmlSlot()}</span>\n </main>\n ${htmlStyle(style)}\n </section>`;\n }\n\n protected _handelScroll(e: any) {\n this.dispatchEvent(new CustomEvent(\"scroll\", { detail: e.target.scrollTop }));\n }\n\n protected firstUpdated() {\n this.resize();\n this.addEvent(window, \"resize\", debounce(this._handelResize.bind(this), 500));\n }\n\n protected _handelResize() {\n this.resize();\n }\n\n resize() {\n const child = this.firstElementChild;\n if (!child) {\n return;\n }\n const height = child.clientHeight || 0;\n if (height) {\n this._section.style.width = height + \"px\";\n this._section.style.height = getComputedStyle(this).width;\n } else {\n const ComputedHeight = getComputedStyle(child).height;\n this.style.height = ComputedHeight;\n this._section.style.width = ComputedHeight;\n this._section.style.height = getComputedStyle(this).width;\n }\n this.height = this._section.style.width;\n }\n}\n\nexport default ScrollX;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"scroll-x\": ScrollX;\n }\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"wrap-view.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/view/wrap-view.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AAItD;;GAEG;AACH,qBACa,QAAS,SAAQ,aAAa;IACzC;;OAEG;IACS,IAAI,EAAE,MAAM,GAAG,MAAM,OAAO,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAM;IACvE;;OAEG;IACS,IAAI,EAAE,MAAM,GAAG,MAAM,OAAO,KAAK,CAAM;IAEnD,MAAM,CAAC,MAAM,4BAiDX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;CAUjC;AAED,eAAe,QAAQ,CAAC;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"wrap-view.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/view/wrap-view.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,UAAU,GAAG,WAAW,CAAC;AAE/B;;GAEG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,aAAa;IAApC;;QACL;;WAEG;QACS,SAAI,GAAoD,EAAE,CAAC;QACvE;;WAEG;QACS,SAAI,GAAgC,EAAE,CAAC;IA+DrD,CAAC;IAVW,MAAM;QACd,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,KAAK,QAAQ;gBACX,OAAO,IAAI,CAAA,aAAa,IAAI,CAAC,IAAI,IAAI,OAAO,QAAQ,CAAC;YACvD,KAAK,MAAM;gBACT,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YAC9B;gBACE,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;;AA5DM,eAAM,GAAG;IACd,GAAG,CAAA;;;;;;KAMF;IACD,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwCF;CACF,AAjDY,CAiDX;AAvDU;IAAX,QAAQ,EAAE;sCAA4D;AAI3D;IAAX,QAAQ,EAAE;sCAAwC;AARxC,QAAQ;IADpB,MAAM,CAAC,UAAU,CAAC;GACN,QAAQ,CAuEpB;;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import { css, html, property } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { icons } from \"../../lib/templates.js\";\nimport { define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"wrap-view\";\n\n/**\n * WithWrap is used for wrap content.\n */\n@define(defineName)\nexport class WrapView extends GodownElement {\n /**\n * Behavioral basis.\n */\n @property() with: string | keyof typeof icons | \"expand\" | \"icon\" = \"\";\n /**\n * Rendered content or slot name.\n */\n @property() wrap: string | keyof typeof icons = \"\";\n\n static styles = [\n css`\n :host {\n display: flex;\n width: 1em;\n height: 1em;\n }\n `,\n css`\n i {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n --e: 0.05em;\n }\n\n i::before,\n i::after {\n content: \"\";\n display: block;\n width: 100%;\n height: 0.05em;\n background: currentColor;\n transition: 0.3s;\n }\n\n i::after {\n transform: translate(0, calc(var(--e) / -2)) rotate(-45deg);\n }\n\n i::before {\n transform: translate(0, calc(var(--e) / 2)) rotate(45deg);\n }\n\n .close::after {\n transform: translate(0, var(--e));\n }\n\n .close::before {\n transform: translate(0, calc(var(--e) * -1));\n }\n\n .close {\n --e: 0.15em;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n switch (this.with) {\n case \"expand\":\n return html`<i class=\"${this.wrap || \"close\"}\"></i>`;\n case \"icon\":\n return icons[this.wrap]?.();\n default:\n return htmlSlot(this.with || this.wrap);\n }\n }\n}\n\nexport default WrapView;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"wrap-view\": WrapView;\n }\n}\n"]}
|
package/wrap-view.d.ts
DELETED
package/wrap-view.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"wrap-view.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["wrap-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC"}
|
package/wrap-view.js
DELETED
package/wrap-view.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"wrap-view.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["wrap-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC","sourcesContent":["export { default } from \"./web-components/view/wrap-view.js\";"]}
|