godown 2.5.1 → 2.6.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/README.md +1 -1
- package/alert-item.d.ts +2 -0
- package/alert-item.d.ts.map +1 -0
- package/alert-item.js +2 -0
- package/alert-item.js.map +1 -0
- package/avatar-a.d.ts +2 -0
- package/avatar-a.d.ts.map +1 -0
- package/avatar-a.js +2 -0
- package/avatar-a.js.map +1 -0
- package/avatar-group.d.ts +2 -0
- package/avatar-group.d.ts.map +1 -0
- package/avatar-group.js +2 -0
- package/avatar-group.js.map +1 -0
- package/base-button.d.ts +2 -0
- package/base-button.d.ts.map +1 -0
- package/base-button.js +2 -0
- package/base-button.js.map +1 -0
- package/base-form.d.ts +2 -0
- package/base-form.d.ts.map +1 -0
- package/base-form.js +2 -0
- package/base-form.js.map +1 -0
- package/base-input.d.ts +2 -0
- package/base-input.d.ts.map +1 -0
- package/base-input.js +2 -0
- package/base-input.js.map +1 -0
- package/card-item.d.ts +2 -0
- package/card-item.d.ts.map +1 -0
- package/card-item.js +2 -0
- package/card-item.js.map +1 -0
- package/carousel-slider.d.ts +2 -0
- package/carousel-slider.d.ts.map +1 -0
- package/carousel-slider.js +2 -0
- package/carousel-slider.js.map +1 -0
- package/clip-text.d.ts +2 -0
- package/clip-text.d.ts.map +1 -0
- package/clip-text.js +2 -0
- package/clip-text.js.map +1 -0
- package/conf.d.ts.map +1 -1
- package/conf.js.map +1 -1
- package/deps.d.ts +4 -3
- package/deps.d.ts.map +1 -1
- package/deps.js +4 -3
- package/deps.js.map +1 -1
- package/details-group.d.ts +2 -0
- package/details-group.d.ts.map +1 -0
- package/details-group.js +2 -0
- package/details-group.js.map +1 -0
- package/divider-line.d.ts +2 -0
- package/divider-line.d.ts.map +1 -0
- package/divider-line.js +2 -0
- package/divider-line.js.map +1 -0
- package/drag-box.d.ts +2 -0
- package/drag-box.d.ts.map +1 -0
- package/drag-box.js +2 -0
- package/drag-box.js.map +1 -0
- package/flex-flow.d.ts +2 -0
- package/flex-flow.d.ts.map +1 -0
- package/flex-flow.js +2 -0
- package/flex-flow.js.map +1 -0
- package/godown-element.d.ts +2 -2
- package/godown-element.d.ts.map +1 -1
- package/godown-element.js +1 -1
- package/godown-element.js.map +1 -1
- package/index.d.ts +2 -6
- package/index.d.ts.map +1 -1
- package/index.js +2 -6
- package/index.js.map +1 -1
- package/label-input.d.ts +2 -0
- package/label-input.d.ts.map +1 -0
- package/label-input.js +2 -0
- package/label-input.js.map +1 -0
- 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/event-collection.js.map +1 -1
- package/lib/route-tree.d.ts.map +1 -1
- package/lib/route-tree.js.map +1 -1
- package/lib/templates.d.ts.map +1 -1
- package/lib/templates.js.map +1 -1
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js.map +1 -1
- package/link-a.d.ts +2 -0
- package/link-a.d.ts.map +1 -0
- package/link-a.js +2 -0
- package/link-a.js.map +1 -0
- package/loading-progress.d.ts +2 -0
- package/loading-progress.d.ts.map +1 -0
- package/loading-progress.js +2 -0
- package/loading-progress.js.map +1 -0
- package/nav-aside.d.ts +2 -0
- package/nav-aside.d.ts.map +1 -0
- package/nav-aside.js +2 -0
- package/nav-aside.js.map +1 -0
- package/nav-layout.d.ts +2 -0
- package/nav-layout.d.ts.map +1 -0
- package/nav-layout.js +2 -0
- package/nav-layout.js.map +1 -0
- package/open-details.d.ts +2 -0
- package/open-details.d.ts.map +1 -0
- package/open-details.js +2 -0
- package/open-details.js.map +1 -0
- package/open-dialog.d.ts +2 -0
- package/open-dialog.d.ts.map +1 -0
- package/open-dialog.js +2 -0
- package/open-dialog.js.map +1 -0
- package/open-list.d.ts +2 -0
- package/open-list.d.ts.map +1 -0
- package/open-list.js +2 -0
- package/open-list.js.map +1 -0
- package/open-offset.d.ts +2 -0
- package/open-offset.d.ts.map +1 -0
- package/open-offset.js +2 -0
- package/open-offset.js.map +1 -0
- package/open-tooltip.d.ts +2 -0
- package/open-tooltip.d.ts.map +1 -0
- package/open-tooltip.js +2 -0
- package/open-tooltip.js.map +1 -0
- package/overbreath-text.d.ts +2 -0
- package/overbreath-text.d.ts.map +1 -0
- package/overbreath-text.js +2 -0
- package/overbreath-text.js.map +1 -0
- package/package.json +57 -10
- package/react/create.d.ts.map +1 -1
- package/react/create.js.map +1 -1
- package/react/index.d.ts +37 -7
- package/react/index.d.ts.map +1 -1
- package/react/index.js +114 -7
- package/react/index.js.map +1 -1
- package/root.d.ts.map +1 -1
- package/root.js +3 -2
- package/root.js.map +1 -1
- package/route-view.d.ts +2 -0
- package/route-view.d.ts.map +1 -0
- package/route-view.js +2 -0
- package/route-view.js.map +1 -0
- package/scroll-x.d.ts +2 -0
- package/scroll-x.d.ts.map +1 -0
- package/scroll-x.js +2 -0
- package/scroll-x.js.map +1 -0
- package/search-input.d.ts +2 -0
- package/search-input.d.ts.map +1 -0
- package/search-input.js +2 -0
- package/search-input.js.map +1 -0
- package/select-input.d.ts +2 -0
- package/select-input.d.ts.map +1 -0
- package/select-input.js +2 -0
- package/select-input.js.map +1 -0
- package/sign-form.d.ts +2 -0
- package/sign-form.d.ts.map +1 -0
- package/sign-form.js +2 -0
- package/sign-form.js.map +1 -0
- package/skeleton-screen.d.ts +2 -0
- package/skeleton-screen.d.ts.map +1 -0
- package/skeleton-screen.js +2 -0
- package/skeleton-screen.js.map +1 -0
- package/split-input.d.ts +2 -0
- package/split-input.d.ts.map +1 -0
- package/split-input.js +2 -0
- package/split-input.js.map +1 -0
- package/super-a.d.ts +2 -0
- package/super-a.d.ts.map +1 -0
- package/super-a.js +2 -0
- package/super-a.js.map +1 -0
- package/switch-input.d.ts +2 -0
- package/switch-input.d.ts.map +1 -0
- package/switch-input.js +2 -0
- package/switch-input.js.map +1 -0
- package/tab-group.d.ts +2 -0
- package/tab-group.d.ts.map +1 -0
- package/tab-group.js +2 -0
- package/tab-group.js.map +1 -0
- package/time-bar.d.ts +2 -0
- package/time-bar.d.ts.map +1 -0
- package/time-bar.js +2 -0
- package/time-bar.js.map +1 -0
- package/typewriter-text.d.ts +2 -0
- package/typewriter-text.d.ts.map +1 -0
- package/typewriter-text.js +2 -0
- package/typewriter-text.js.map +1 -0
- package/{items → web-components/a}/avatar-a.d.ts +7 -7
- package/web-components/a/avatar-a.d.ts.map +1 -0
- package/{items → web-components/a}/avatar-a.js +57 -62
- package/web-components/a/avatar-a.js.map +1 -0
- package/{items → web-components/a}/link-a.d.ts +6 -6
- package/web-components/a/link-a.d.ts.map +1 -0
- package/{items → web-components/a}/link-a.js +16 -21
- package/web-components/a/link-a.js.map +1 -0
- package/{items → web-components/a}/super-a.d.ts +5 -5
- package/web-components/a/super-a.d.ts.map +1 -0
- package/{items → web-components/a}/super-a.js +34 -40
- package/web-components/a/super-a.js.map +1 -0
- package/{items → web-components/button}/base-button.d.ts +3 -3
- package/web-components/button/base-button.d.ts.map +1 -0
- package/{items → web-components/button}/base-button.js +99 -105
- package/web-components/button/base-button.js.map +1 -0
- package/{view/rotation-pool.d.ts → web-components/carousel/carousel-slider.d.ts} +7 -7
- package/web-components/carousel/carousel-slider.d.ts.map +1 -0
- package/{view/rotation-pool.js → web-components/carousel/carousel-slider.js} +87 -92
- package/web-components/carousel/carousel-slider.js.map +1 -0
- package/{input-form/sign-form.d.ts → web-components/form/base-form.d.ts} +9 -18
- package/web-components/form/base-form.d.ts.map +1 -0
- package/{input-form/sign-form.js → web-components/form/base-form.js} +32 -40
- package/web-components/form/base-form.js.map +1 -0
- package/web-components/form/sign-form.d.ts +19 -0
- package/web-components/form/sign-form.d.ts.map +1 -0
- package/web-components/form/sign-form.js +16 -0
- package/web-components/form/sign-form.js.map +1 -0
- package/{group → web-components/group}/avatar-group.d.ts +6 -6
- package/web-components/group/avatar-group.d.ts.map +1 -0
- package/{group → web-components/group}/avatar-group.js +24 -30
- package/web-components/group/avatar-group.js.map +1 -0
- package/{group → web-components/group}/details-group.d.ts +3 -3
- package/web-components/group/details-group.d.ts.map +1 -0
- package/{group → web-components/group}/details-group.js +12 -18
- package/web-components/group/details-group.js.map +1 -0
- package/{group → web-components/group}/tab-group.d.ts +4 -4
- package/web-components/group/tab-group.d.ts.map +1 -0
- package/{group → web-components/group}/tab-group.js +50 -56
- package/web-components/group/tab-group.js.map +1 -0
- package/web-components/index.d.ts +38 -0
- package/web-components/index.d.ts.map +1 -0
- package/web-components/index.js +39 -0
- package/web-components/index.js.map +1 -0
- package/{input-form → web-components/input}/base-input.d.ts +4 -4
- package/web-components/input/base-input.d.ts.map +1 -0
- package/{input-form → web-components/input}/base-input.js +79 -84
- package/web-components/input/base-input.js.map +1 -0
- package/{input-form/std.d.ts → web-components/input/input.d.ts} +4 -16
- package/web-components/input/input.d.ts.map +1 -0
- package/{input-form/std.js → web-components/input/input.js} +27 -54
- package/web-components/input/input.js.map +1 -0
- package/{input-form → web-components/input}/label-input.d.ts +4 -4
- package/web-components/input/label-input.d.ts.map +1 -0
- package/{input-form → web-components/input}/label-input.js +55 -60
- package/web-components/input/label-input.js.map +1 -0
- package/{input-form → web-components/input}/search-input.d.ts +4 -4
- package/web-components/input/search-input.d.ts.map +1 -0
- package/{input-form → web-components/input}/search-input.js +59 -64
- package/web-components/input/search-input.js.map +1 -0
- package/{input-form → web-components/input}/select-input.d.ts +4 -4
- package/web-components/input/select-input.d.ts.map +1 -0
- package/{input-form → web-components/input}/select-input.js +95 -100
- package/web-components/input/select-input.js.map +1 -0
- package/{input-form → web-components/input}/split-input.d.ts +4 -4
- package/web-components/input/split-input.d.ts.map +1 -0
- package/{input-form → web-components/input}/split-input.js +56 -61
- package/web-components/input/split-input.js.map +1 -0
- package/{input-form → web-components/input}/switch-input.d.ts +4 -4
- package/web-components/input/switch-input.d.ts.map +1 -0
- package/{input-form → web-components/input}/switch-input.js +42 -47
- package/web-components/input/switch-input.js.map +1 -0
- package/{items → web-components/items}/alert-item.d.ts +3 -3
- package/web-components/items/alert-item.d.ts.map +1 -0
- package/{items → web-components/items}/alert-item.js +38 -43
- package/web-components/items/alert-item.js.map +1 -0
- package/{items → web-components/items}/card-item.d.ts +4 -4
- package/web-components/items/card-item.d.ts.map +1 -0
- package/{items → web-components/items}/card-item.js +57 -63
- package/web-components/items/card-item.js.map +1 -0
- package/{layout → web-components/items}/drag-box.d.ts +3 -3
- package/web-components/items/drag-box.d.ts.map +1 -0
- package/{layout → web-components/items}/drag-box.js +13 -19
- package/web-components/items/drag-box.js.map +1 -0
- package/web-components/items/index.d.ts +5 -0
- package/web-components/items/index.d.ts.map +1 -0
- package/web-components/items/index.js +6 -0
- package/web-components/items/index.js.map +1 -0
- package/{items → web-components/items}/time-bar.d.ts +3 -3
- package/web-components/items/time-bar.d.ts.map +1 -0
- package/{items → web-components/items}/time-bar.js +12 -17
- package/web-components/items/time-bar.js.map +1 -0
- package/web-components/layout/divider-line.d.ts +20 -0
- package/web-components/layout/divider-line.d.ts.map +1 -0
- package/{layout/div-line.js → web-components/layout/divider-line.js} +24 -30
- package/web-components/layout/divider-line.js.map +1 -0
- package/{layout → web-components/layout}/flex-flow.d.ts +3 -3
- package/web-components/layout/flex-flow.d.ts.map +1 -0
- package/{layout → web-components/layout}/flex-flow.js +12 -18
- package/web-components/layout/flex-flow.js.map +1 -0
- package/web-components/layout/index.d.ts +5 -0
- package/web-components/layout/index.d.ts.map +1 -0
- package/web-components/layout/index.js +6 -0
- package/web-components/layout/index.js.map +1 -0
- package/{layout → web-components/layout}/nav-aside.d.ts +4 -4
- package/web-components/layout/nav-aside.d.ts.map +1 -0
- package/{layout → web-components/layout}/nav-aside.js +19 -25
- package/web-components/layout/nav-aside.js.map +1 -0
- package/{layout → web-components/layout}/nav-layout.d.ts +4 -4
- package/web-components/layout/nav-layout.d.ts.map +1 -0
- package/{layout → web-components/layout}/nav-layout.js +31 -37
- package/web-components/layout/nav-layout.js.map +1 -0
- package/{items/load-progress.d.ts → web-components/loading/loading-progress.d.ts} +7 -7
- package/web-components/loading/loading-progress.d.ts.map +1 -0
- package/{items/load-progress.js → web-components/loading/loading-progress.js} +41 -47
- package/web-components/loading/loading-progress.js.map +1 -0
- package/{layout → web-components/loading}/skeleton-screen.d.ts +4 -4
- package/web-components/loading/skeleton-screen.d.ts.map +1 -0
- package/{layout → web-components/loading}/skeleton-screen.js +24 -30
- package/web-components/loading/skeleton-screen.js.map +1 -0
- package/{view/details-expand.d.ts → web-components/open/open-details.d.ts} +8 -8
- package/web-components/open/open-details.d.ts.map +1 -0
- package/{view/details-expand.js → web-components/open/open-details.js} +35 -40
- package/web-components/open/open-details.js.map +1 -0
- package/{items/dialog-item.d.ts → web-components/open/open-dialog.d.ts} +8 -8
- package/web-components/open/open-dialog.d.ts.map +1 -0
- package/{items/dialog-item.js → web-components/open/open-dialog.js} +83 -89
- package/web-components/open/open-dialog.js.map +1 -0
- package/web-components/open/open-list.d.ts +20 -0
- package/web-components/open/open-list.d.ts.map +1 -0
- package/web-components/open/open-list.js +71 -0
- package/web-components/open/open-list.js.map +1 -0
- package/{view/offset-expand.d.ts → web-components/open/open-offset.d.ts} +8 -8
- package/web-components/open/open-offset.d.ts.map +1 -0
- package/{view/offset-expand.js → web-components/open/open-offset.js} +66 -71
- package/web-components/open/open-offset.js.map +1 -0
- package/web-components/open/open-tooltip.d.ts +24 -0
- package/web-components/open/open-tooltip.d.ts.map +1 -0
- package/{view/tool-tip.js → web-components/open/open-tooltip.js} +28 -33
- package/web-components/open/open-tooltip.js.map +1 -0
- package/{view/std.d.ts → web-components/open/open.d.ts} +6 -6
- package/web-components/open/open.d.ts.map +1 -0
- package/{view/std.js → web-components/open/open.js} +35 -40
- package/web-components/open/open.js.map +1 -0
- package/{effect → web-components/text}/clip-text.d.ts +4 -4
- package/web-components/text/clip-text.d.ts.map +1 -0
- package/web-components/text/clip-text.js +44 -0
- package/web-components/text/clip-text.js.map +1 -0
- package/{effect → web-components/text}/overbreath-text.d.ts +4 -4
- package/web-components/text/overbreath-text.d.ts.map +1 -0
- package/{effect → web-components/text}/overbreath-text.js +21 -27
- package/web-components/text/overbreath-text.js.map +1 -0
- package/{effect → web-components/text}/typewriter-text.d.ts +4 -4
- package/web-components/text/typewriter-text.d.ts.map +1 -0
- package/{effect → web-components/text}/typewriter-text.js +38 -44
- package/web-components/text/typewriter-text.js.map +1 -0
- package/{view → web-components/view}/route-view.d.ts +4 -4
- package/web-components/view/route-view.d.ts.map +1 -0
- package/{view → web-components/view}/route-view.js +15 -20
- package/web-components/view/route-view.js.map +1 -0
- package/{view → web-components/view}/scroll-x.d.ts +2 -2
- package/web-components/view/scroll-x.d.ts.map +1 -0
- package/{view → web-components/view}/scroll-x.js +35 -40
- package/web-components/view/scroll-x.js.map +1 -0
- package/{view/with-wrap.d.ts → web-components/view/wrap-view.d.ts} +7 -7
- package/web-components/view/wrap-view.d.ts.map +1 -0
- package/{view/with-wrap.js → web-components/view/wrap-view.js} +29 -34
- package/web-components/view/wrap-view.js.map +1 -0
- package/wrap-view.d.ts +2 -0
- package/wrap-view.d.ts.map +1 -0
- package/wrap-view.js +2 -0
- package/wrap-view.js.map +1 -0
- package/effect/clip-text.d.ts.map +0 -1
- package/effect/clip-text.js +0 -50
- package/effect/clip-text.js.map +0 -1
- package/effect/index.d.ts +0 -4
- package/effect/index.d.ts.map +0 -1
- package/effect/index.js +0 -4
- package/effect/index.js.map +0 -1
- package/effect/overbreath-text.d.ts.map +0 -1
- package/effect/overbreath-text.js.map +0 -1
- package/effect/std.d.ts +0 -4
- package/effect/std.d.ts.map +0 -1
- package/effect/std.js +0 -4
- package/effect/std.js.map +0 -1
- package/effect/typewriter-text.d.ts.map +0 -1
- package/effect/typewriter-text.js.map +0 -1
- package/group/avatar-group.d.ts.map +0 -1
- package/group/avatar-group.js.map +0 -1
- package/group/details-group.d.ts.map +0 -1
- package/group/details-group.js.map +0 -1
- package/group/index.d.ts +0 -4
- package/group/index.d.ts.map +0 -1
- package/group/index.js +0 -4
- package/group/index.js.map +0 -1
- package/group/std.d.ts +0 -4
- package/group/std.d.ts.map +0 -1
- package/group/std.js +0 -4
- package/group/std.js.map +0 -1
- package/group/tab-group.d.ts.map +0 -1
- package/group/tab-group.js.map +0 -1
- package/input-form/base-input.d.ts.map +0 -1
- package/input-form/base-input.js.map +0 -1
- package/input-form/index.d.ts +0 -8
- package/input-form/index.d.ts.map +0 -1
- package/input-form/index.js +0 -8
- package/input-form/index.js.map +0 -1
- package/input-form/label-input.d.ts.map +0 -1
- package/input-form/label-input.js.map +0 -1
- package/input-form/search-input.d.ts.map +0 -1
- package/input-form/search-input.js.map +0 -1
- package/input-form/select-input.d.ts.map +0 -1
- package/input-form/select-input.js.map +0 -1
- package/input-form/sign-form.d.ts.map +0 -1
- package/input-form/sign-form.js.map +0 -1
- package/input-form/split-input.d.ts.map +0 -1
- package/input-form/split-input.js.map +0 -1
- package/input-form/std.d.ts.map +0 -1
- package/input-form/std.js.map +0 -1
- package/input-form/switch-input.d.ts.map +0 -1
- package/input-form/switch-input.js.map +0 -1
- package/items/alert-item.d.ts.map +0 -1
- package/items/alert-item.js.map +0 -1
- package/items/avatar-a.d.ts.map +0 -1
- package/items/avatar-a.js.map +0 -1
- package/items/base-button.d.ts.map +0 -1
- package/items/base-button.js.map +0 -1
- package/items/card-item.d.ts.map +0 -1
- package/items/card-item.js.map +0 -1
- package/items/dialog-item.d.ts.map +0 -1
- package/items/dialog-item.js.map +0 -1
- package/items/index.d.ts +0 -10
- package/items/index.d.ts.map +0 -1
- package/items/index.js +0 -10
- package/items/index.js.map +0 -1
- package/items/link-a.d.ts.map +0 -1
- package/items/link-a.js.map +0 -1
- package/items/load-progress.d.ts.map +0 -1
- package/items/load-progress.js.map +0 -1
- package/items/std.d.ts +0 -4
- package/items/std.d.ts.map +0 -1
- package/items/std.js +0 -4
- package/items/std.js.map +0 -1
- package/items/super-a.d.ts.map +0 -1
- package/items/super-a.js.map +0 -1
- package/items/time-bar.d.ts.map +0 -1
- package/items/time-bar.js.map +0 -1
- package/layout/div-line.d.ts +0 -20
- package/layout/div-line.d.ts.map +0 -1
- package/layout/div-line.js.map +0 -1
- package/layout/drag-box.d.ts.map +0 -1
- package/layout/drag-box.js.map +0 -1
- package/layout/flex-flow.d.ts.map +0 -1
- package/layout/flex-flow.js.map +0 -1
- package/layout/index.d.ts +0 -7
- package/layout/index.d.ts.map +0 -1
- package/layout/index.js +0 -7
- package/layout/index.js.map +0 -1
- package/layout/nav-aside.d.ts.map +0 -1
- package/layout/nav-aside.js.map +0 -1
- package/layout/nav-layout.d.ts.map +0 -1
- package/layout/nav-layout.js.map +0 -1
- package/layout/skeleton-screen.d.ts.map +0 -1
- package/layout/skeleton-screen.js.map +0 -1
- package/layout/std.d.ts +0 -4
- package/layout/std.d.ts.map +0 -1
- package/layout/std.js +0 -4
- package/layout/std.js.map +0 -1
- package/react/effect.d.ts +0 -5
- package/react/effect.d.ts.map +0 -1
- package/react/effect.js +0 -13
- package/react/effect.js.map +0 -1
- package/react/group.d.ts +0 -5
- package/react/group.d.ts.map +0 -1
- package/react/group.js +0 -13
- package/react/group.js.map +0 -1
- package/react/input-form.d.ts +0 -28
- package/react/input-form.d.ts.map +0 -1
- package/react/input-form.js +0 -38
- package/react/input-form.js.map +0 -1
- package/react/items.d.ts +0 -11
- package/react/items.d.ts.map +0 -1
- package/react/items.js +0 -31
- package/react/items.js.map +0 -1
- package/react/layout.d.ts +0 -8
- package/react/layout.d.ts.map +0 -1
- package/react/layout.js +0 -22
- package/react/layout.js.map +0 -1
- package/react/view.d.ts +0 -10
- package/react/view.d.ts.map +0 -1
- package/react/view.js +0 -28
- package/react/view.js.map +0 -1
- package/view/details-expand.d.ts.map +0 -1
- package/view/details-expand.js.map +0 -1
- package/view/index.d.ts +0 -9
- package/view/index.d.ts.map +0 -1
- package/view/index.js +0 -9
- package/view/index.js.map +0 -1
- package/view/menu-list.d.ts +0 -20
- package/view/menu-list.d.ts.map +0 -1
- package/view/menu-list.js +0 -76
- package/view/menu-list.js.map +0 -1
- package/view/offset-expand.d.ts.map +0 -1
- package/view/offset-expand.js.map +0 -1
- package/view/rotation-pool.d.ts.map +0 -1
- package/view/rotation-pool.js.map +0 -1
- package/view/route-view.d.ts.map +0 -1
- package/view/route-view.js.map +0 -1
- package/view/scroll-x.d.ts.map +0 -1
- package/view/scroll-x.js.map +0 -1
- package/view/std.d.ts.map +0 -1
- package/view/std.js.map +0 -1
- package/view/tool-tip.d.ts +0 -24
- package/view/tool-tip.d.ts.map +0 -1
- package/view/tool-tip.js.map +0 -1
- package/view/with-wrap.d.ts.map +0 -1
- package/view/with-wrap.js.map +0 -1
@@ -1,11 +1,11 @@
|
|
1
|
-
import { type CSSResultGroup, type PropertyValueMap } from "
|
2
|
-
import { EventsNames } from "
|
3
|
-
import { GodownElement } from "
|
1
|
+
import { type CSSResultGroup, type PropertyValueMap } from "../../deps.js";
|
2
|
+
import { EventsNames } from "../../lib/event-collection.js";
|
3
|
+
import { GodownElement } from "../../root.js";
|
4
4
|
export type Direction4 = "left" | "right" | "top" | "bottom";
|
5
5
|
export type Direction5 = Direction4 | "center";
|
6
6
|
export type Direction8 = Direction4 | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
7
7
|
export type OnEvents = EventsNames | "";
|
8
|
-
export declare class
|
8
|
+
export declare class OpenableElement extends GodownElement {
|
9
9
|
/**
|
10
10
|
* Summary text.
|
11
11
|
*/
|
@@ -33,5 +33,5 @@ export declare class OpenAble extends GodownElement {
|
|
33
33
|
protected updated(changedProperties: PropertyValueMap<this>): void;
|
34
34
|
protected _handelClick(_: MouseEvent): void;
|
35
35
|
}
|
36
|
-
export default
|
37
|
-
//# sourceMappingURL=
|
36
|
+
export default OpenableElement;
|
37
|
+
//# sourceMappingURL=open.d.ts.map
|
@@ -0,0 +1 @@
|
|
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,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,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,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,UAAU,GAAG,UAAU,GAAG,EAAE,CAAM;IAEtE,MAAM,CAAC,MAAM,iBA0DO;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,12 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
import { css, property } from "../deps.js";
|
8
|
-
import { GodownElement } from "../root.js";
|
9
|
-
export class OpenAble extends GodownElement {
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, property } from "../../deps.js";
|
3
|
+
import { GodownElement } from "../../root.js";
|
4
|
+
export class OpenableElement extends GodownElement {
|
10
5
|
constructor() {
|
11
6
|
super(...arguments);
|
12
7
|
/**
|
@@ -30,29 +25,9 @@ export class OpenAble extends GodownElement {
|
|
30
25
|
*/
|
31
26
|
this.direction = "";
|
32
27
|
}
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
close() {
|
37
|
-
this.open = false;
|
38
|
-
}
|
39
|
-
show() {
|
40
|
-
this.open = true;
|
41
|
-
}
|
42
|
-
updated(changedProperties) {
|
43
|
-
const open = changedProperties.get("open");
|
44
|
-
if (typeof open === typeof !0) {
|
45
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.open }));
|
46
|
-
}
|
47
|
-
}
|
48
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
49
|
-
_handelClick(_) {
|
50
|
-
this.toggle();
|
51
|
-
}
|
52
|
-
}
|
53
|
-
OpenAble.styles = [
|
54
|
-
GodownElement.styles,
|
55
|
-
css `
|
28
|
+
static { this.styles = [
|
29
|
+
GodownElement.styles,
|
30
|
+
css `
|
56
31
|
:host {
|
57
32
|
display: block;
|
58
33
|
transition:
|
@@ -108,21 +83,41 @@ OpenAble.styles = [
|
|
108
83
|
position: absolute;
|
109
84
|
}
|
110
85
|
`,
|
111
|
-
];
|
86
|
+
]; }
|
87
|
+
toggle(to = !this.open) {
|
88
|
+
this.open = to;
|
89
|
+
}
|
90
|
+
close() {
|
91
|
+
this.open = false;
|
92
|
+
}
|
93
|
+
show() {
|
94
|
+
this.open = true;
|
95
|
+
}
|
96
|
+
updated(changedProperties) {
|
97
|
+
const open = changedProperties.get("open");
|
98
|
+
if (typeof open === typeof !0) {
|
99
|
+
this.dispatchEvent(new CustomEvent("change", { detail: this.open }));
|
100
|
+
}
|
101
|
+
}
|
102
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
103
|
+
_handelClick(_) {
|
104
|
+
this.toggle();
|
105
|
+
}
|
106
|
+
}
|
112
107
|
__decorate([
|
113
108
|
property()
|
114
|
-
],
|
109
|
+
], OpenableElement.prototype, "summary", void 0);
|
115
110
|
__decorate([
|
116
111
|
property({ type: Boolean, reflect: true })
|
117
|
-
],
|
112
|
+
], OpenableElement.prototype, "float", void 0);
|
118
113
|
__decorate([
|
119
114
|
property({ type: Boolean, reflect: true })
|
120
|
-
],
|
115
|
+
], OpenableElement.prototype, "open", void 0);
|
121
116
|
__decorate([
|
122
117
|
property()
|
123
|
-
],
|
118
|
+
], OpenableElement.prototype, "on", void 0);
|
124
119
|
__decorate([
|
125
120
|
property()
|
126
|
-
],
|
127
|
-
export default
|
128
|
-
//# sourceMappingURL=
|
121
|
+
], OpenableElement.prototype, "direction", void 0);
|
122
|
+
export default OpenableElement;
|
123
|
+
//# sourceMappingURL=open.js.map
|
@@ -0,0 +1 @@
|
|
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;AAU9C,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,GAA8C,EAAE,CAAC;IAqFxE,CAAC;aAnFQ,WAAM,GAAG;QACd,aAAa,CAAC,MAAM;QACpB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuDF;KACgB,AA1DN,CA0DO;IAEpB,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;;AApGW;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;kDAA2D;AAuFxE,eAAe,eAAe,CAAC","sourcesContent":["import { css, type CSSResultGroup, property, type PropertyValueMap } from \"../../deps.js\";\nimport { 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 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: Direction4 | Direction8 | Direction5 | \"\" = \"\";\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 span {\n display: inline-flex;\n align-items: center;\n flex: 1;\n white-space: nowrap;\n }\n\n dl {\n height: 100%;\n position: relative;\n overflow: hidden;\n }\n\n dt {\n display: flex;\n flex-wrap: nowrap;\n justify-content: space-between;\n background: inherit;\n align-items: center;\n height: 100%;\n }\n\n * {\n transition: inherit;\n }\n\n dd {\n overflow: hidden;\n display: grid;\n grid-template-rows: 0fr;\n }\n\n section {\n min-height: 0;\n overflow: hidden;\n }\n\n :host([open]) dd {\n grid-template-rows: 1fr;\n }\n\n :host([float]) dd {\n top: 100%;\n position: absolute;\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,10 +1,10 @@
|
|
1
|
-
import { type CSSResultGroup } from "
|
2
|
-
import { type HTMLTemplate } from "
|
3
|
-
import
|
1
|
+
import { type CSSResultGroup } from "../../deps.js";
|
2
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
+
import { GodownElement } from "../../root.js";
|
4
4
|
/**
|
5
5
|
* ClipText renders a gradient text.
|
6
6
|
*/
|
7
|
-
export declare class ClipText extends
|
7
|
+
export declare class ClipText extends GodownElement {
|
8
8
|
/**
|
9
9
|
* The text to be clipped.
|
10
10
|
*/
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, property } from "../../deps.js";
|
3
|
+
import { htmlSlot } from "../../lib/templates.js";
|
4
|
+
import { createScope, cssvar, define, GodownElement } from "../../root.js";
|
5
|
+
const defineName = "clip-text";
|
6
|
+
const cssvarScope = createScope(defineName);
|
7
|
+
/**
|
8
|
+
* ClipText renders a gradient text.
|
9
|
+
*/
|
10
|
+
let ClipText = class ClipText extends GodownElement {
|
11
|
+
constructor() {
|
12
|
+
super(...arguments);
|
13
|
+
/**
|
14
|
+
* The text to be clipped.
|
15
|
+
*/
|
16
|
+
this.text = "";
|
17
|
+
}
|
18
|
+
static { this.styles = [
|
19
|
+
GodownElement.styles,
|
20
|
+
css `
|
21
|
+
:host {
|
22
|
+
${cssvarScope}--clip-background: var(${cssvar}--clip-background);
|
23
|
+
background: var(${cssvarScope}--clip-background);
|
24
|
+
color: transparent;
|
25
|
+
-webkit-text-fill-color: transparent;
|
26
|
+
background-clip: text !important;
|
27
|
+
-webkit-background-clip: text !important;
|
28
|
+
display: inline-flex;
|
29
|
+
}
|
30
|
+
`,
|
31
|
+
]; }
|
32
|
+
render() {
|
33
|
+
return this.text || htmlSlot();
|
34
|
+
}
|
35
|
+
};
|
36
|
+
__decorate([
|
37
|
+
property()
|
38
|
+
], ClipText.prototype, "text", void 0);
|
39
|
+
ClipText = __decorate([
|
40
|
+
define(defineName)
|
41
|
+
], ClipText);
|
42
|
+
export { ClipText };
|
43
|
+
export default ClipText;
|
44
|
+
//# sourceMappingURL=clip-text.js.map
|
@@ -0,0 +1 @@
|
|
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;aAlBQ,WAAM,GAAG;QACd,aAAa,CAAC,MAAM;QACpB,GAAG,CAAA;;UAEG,WAAW,0BAA0B,MAAM;0BAC3B,WAAW;;;;;;;KAOhC;KACgB,AAbN,CAaO;IAEV,MAAM;QACd,OAAO,IAAI,CAAC,IAAI,IAAI,QAAQ,EAAE,CAAC;IACjC,CAAC;;AAnBW;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,12 +1,12 @@
|
|
1
|
-
import { type CSSResultGroup } from "
|
2
|
-
import
|
3
|
-
import {
|
1
|
+
import { type CSSResultGroup } from "../../deps.js";
|
2
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
+
import { GodownElement } from "../../root.js";
|
4
4
|
/**
|
5
5
|
* OverbreathText renders three animated pieces of text.
|
6
6
|
*
|
7
7
|
* Inspired by Vercel homepage (2022? - 2023).
|
8
8
|
*/
|
9
|
-
export declare class OverbreathText extends
|
9
|
+
export declare class OverbreathText extends GodownElement {
|
10
10
|
/**
|
11
11
|
* One of the texts.
|
12
12
|
*/
|
@@ -0,0 +1 @@
|
|
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,12 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
import { createScope, cssvar, define } from "../root.js";
|
8
|
-
import { css, html, property } from "../deps.js";
|
9
|
-
import EffectSTD from "./std.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property } from "../../deps.js";
|
3
|
+
import { createScope, cssvar, define, GodownElement } from "../../root.js";
|
10
4
|
const defineName = "overbreath-text";
|
11
5
|
const cssvarScope = createScope(defineName);
|
12
6
|
/**
|
@@ -14,7 +8,7 @@ const cssvarScope = createScope(defineName);
|
|
14
8
|
*
|
15
9
|
* Inspired by Vercel homepage (2022? - 2023).
|
16
10
|
*/
|
17
|
-
let OverbreathText = class OverbreathText extends
|
11
|
+
let OverbreathText = class OverbreathText extends GodownElement {
|
18
12
|
constructor() {
|
19
13
|
super(...arguments);
|
20
14
|
/**
|
@@ -26,19 +20,9 @@ let OverbreathText = class OverbreathText extends EffectSTD {
|
|
26
20
|
// As t2.
|
27
21
|
this.t3 = "";
|
28
22
|
}
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
renderText(text) {
|
33
|
-
return html `<span class="rel">
|
34
|
-
<span class="bg">${text}</span>
|
35
|
-
<span class="fg">${text}</span>
|
36
|
-
</span>`;
|
37
|
-
}
|
38
|
-
};
|
39
|
-
OverbreathText.styles = [
|
40
|
-
EffectSTD.styles,
|
41
|
-
css `
|
23
|
+
static { this.styles = [
|
24
|
+
GodownElement.styles,
|
25
|
+
css `
|
42
26
|
:host {
|
43
27
|
${cssvarScope}--1-1: #ae0ca5;
|
44
28
|
${cssvarScope}--1-2: #ffd802;
|
@@ -52,7 +36,7 @@ OverbreathText.styles = [
|
|
52
36
|
${cssvarScope}--3: linear-gradient(var(${cssvarScope}--deg), var(${cssvarScope}--3-1), var(${cssvarScope}--3-2));
|
53
37
|
}
|
54
38
|
`,
|
55
|
-
|
39
|
+
css `
|
56
40
|
:host {
|
57
41
|
display: flex;
|
58
42
|
margin: auto;
|
@@ -120,7 +104,7 @@ OverbreathText.styles = [
|
|
120
104
|
animation: text3 8s infinite;
|
121
105
|
}
|
122
106
|
`,
|
123
|
-
|
107
|
+
css `
|
124
108
|
@keyframes lg1 {
|
125
109
|
0%,
|
126
110
|
16.667%,
|
@@ -200,7 +184,7 @@ OverbreathText.styles = [
|
|
200
184
|
}
|
201
185
|
}
|
202
186
|
`,
|
203
|
-
|
187
|
+
css `
|
204
188
|
span.bg {
|
205
189
|
${cssvarScope}--clip-background: var(${cssvar}--clip-background);
|
206
190
|
background: var(${cssvarScope}--clip-background);
|
@@ -213,7 +197,17 @@ OverbreathText.styles = [
|
|
213
197
|
display: inline-flex;
|
214
198
|
}
|
215
199
|
`,
|
216
|
-
];
|
200
|
+
]; }
|
201
|
+
render() {
|
202
|
+
return [this.t1, this.t2, this.t3].map(this.renderText);
|
203
|
+
}
|
204
|
+
renderText(text) {
|
205
|
+
return html `<span class="rel">
|
206
|
+
<span class="bg">${text}</span>
|
207
|
+
<span class="fg">${text}</span>
|
208
|
+
</span>`;
|
209
|
+
}
|
210
|
+
};
|
217
211
|
__decorate([
|
218
212
|
property()
|
219
213
|
], OverbreathText.prototype, "t1", void 0);
|
@@ -0,0 +1 @@
|
|
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;aA7LQ,WAAM,GAAG;QACd,aAAa,CAAC,MAAM;QACpB,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;QACD,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA2CyB,WAAW;;;;;gCAKX,WAAW;;;;;gCAKX,WAAW;;;;;;;;;;;;;;KActC;QACD,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+EF;QACD,GAAG,CAAA;;UAEG,WAAW,0BAA0B,MAAM;0BAC3B,WAAW;;;;;;;;;KAShC;KACgB,AAjLN,CAiLO;IAEV,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;;AAlMW;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,10 +1,10 @@
|
|
1
|
-
import { type PropertyValueMap } from "
|
2
|
-
import { type HTMLTemplate } from "
|
3
|
-
import
|
1
|
+
import { type PropertyValueMap } from "../../deps.js";
|
2
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
+
import { GodownElement } from "../../root.js";
|
4
4
|
/**
|
5
5
|
* TypewriterText renders a typewriter effect to text.
|
6
6
|
*/
|
7
|
-
export declare class TypewriterText extends
|
7
|
+
export declare class TypewriterText extends GodownElement {
|
8
8
|
/**
|
9
9
|
* Raw text.
|
10
10
|
*/
|
@@ -0,0 +1 @@
|
|
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,20 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
import { createScope, define } from "../root.js";
|
8
|
-
import { css, html, property, query, state } from "../deps.js";
|
9
|
-
import { htmlSlot } from "../lib/templates.js";
|
10
|
-
import EffectSTD from "./std.js";
|
11
|
-
import { random } from "../lib/utils.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property, query, state } from "../../deps.js";
|
3
|
+
import { htmlSlot } from "../../lib/templates.js";
|
4
|
+
import { random } from "../../lib/utils.js";
|
5
|
+
import { createScope, define, GodownElement } from "../../root.js";
|
12
6
|
const defineName = "typewriter-text";
|
13
7
|
const cssvarScope = createScope(defineName);
|
14
8
|
/**
|
15
9
|
* TypewriterText renders a typewriter effect to text.
|
16
10
|
*/
|
17
|
-
let TypewriterText = class TypewriterText extends
|
11
|
+
let TypewriterText = class TypewriterText extends GodownElement {
|
18
12
|
constructor() {
|
19
13
|
super(...arguments);
|
20
14
|
/**
|
@@ -56,6 +50,38 @@ let TypewriterText = class TypewriterText extends EffectSTD {
|
|
56
50
|
get len() {
|
57
51
|
return this.text.length;
|
58
52
|
}
|
53
|
+
static { this.styles = [
|
54
|
+
css `
|
55
|
+
:host {
|
56
|
+
${cssvarScope}--cursor-width: .05em;
|
57
|
+
font-family: monospace;
|
58
|
+
white-space: nowrap;
|
59
|
+
}
|
60
|
+
|
61
|
+
i {
|
62
|
+
border-right: var(${cssvarScope}--cursor-width) solid;
|
63
|
+
margin-left: 0.02em;
|
64
|
+
animation: s 1.5s steps(1) infinite;
|
65
|
+
}
|
66
|
+
|
67
|
+
@keyframes s {
|
68
|
+
0% {
|
69
|
+
border-color: currentColor;
|
70
|
+
}
|
71
|
+
50% {
|
72
|
+
border-color: transparent;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
slot {
|
77
|
+
display: none;
|
78
|
+
}
|
79
|
+
|
80
|
+
.hidden {
|
81
|
+
visibility: hidden;
|
82
|
+
}
|
83
|
+
`,
|
84
|
+
]; }
|
59
85
|
render() {
|
60
86
|
return html `${htmlSlot()}${this.content}<i class="${(this.ended && "hidden") || ""}"></i>`;
|
61
87
|
}
|
@@ -90,38 +116,6 @@ let TypewriterText = class TypewriterText extends EffectSTD {
|
|
90
116
|
this.ended = true;
|
91
117
|
}
|
92
118
|
};
|
93
|
-
TypewriterText.styles = [
|
94
|
-
css `
|
95
|
-
:host {
|
96
|
-
${cssvarScope}--cursor-width: .05em;
|
97
|
-
font-family: monospace;
|
98
|
-
white-space: nowrap;
|
99
|
-
}
|
100
|
-
|
101
|
-
i {
|
102
|
-
border-right: var(${cssvarScope}--cursor-width) solid;
|
103
|
-
margin-left: 0.02em;
|
104
|
-
animation: s 1.5s steps(1) infinite;
|
105
|
-
}
|
106
|
-
|
107
|
-
@keyframes s {
|
108
|
-
0% {
|
109
|
-
border-color: currentColor;
|
110
|
-
}
|
111
|
-
50% {
|
112
|
-
border-color: transparent;
|
113
|
-
}
|
114
|
-
}
|
115
|
-
|
116
|
-
slot {
|
117
|
-
display: none;
|
118
|
-
}
|
119
|
-
|
120
|
-
.hidden {
|
121
|
-
visibility: hidden;
|
122
|
-
}
|
123
|
-
`,
|
124
|
-
];
|
125
119
|
__decorate([
|
126
120
|
property()
|
127
121
|
], TypewriterText.prototype, "text", void 0);
|
@@ -0,0 +1 @@
|
|
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,UAAK,GAAG,CAAC,CAAC;QACtC;;WAEG;QACM,YAAO,GAA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AAK,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACzD,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;YAC/B,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;YAClB,IAAI,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;gBACnB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBAChB,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;QACH,CAAC,EAAE,OAAO,CAAC,CAAC;IACd,CAAC;IAED,IAAI;QACF,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;IAED,GAAG;QACD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;;AA9GW;IAAX,QAAQ,EAAE;4CAAW;AAIO;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CAAiB;AAIhB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CAAe;AAIf;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAW;AAIV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAU;AAIT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAW;AAIV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAW;AAI7B;IAAR,KAAK,EAAE;+CAAc;AAGV;IAAX,KAAK,CAAC,GAAG,CAAC;0CAAiB;AAnCjB,cAAc;IAD1B,MAAM,CAAC,UAAU,CAAC;GACN,cAAc,CAmH1B;;AAED,eAAe,cAAc,CAAC","sourcesContent":["import { css, html, property, type PropertyValueMap, query, state } from \"../../deps.js\";\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,7 +1,7 @@
|
|
1
|
-
import { type PropertyValueMap } from "
|
2
|
-
import
|
3
|
-
import {
|
4
|
-
import
|
1
|
+
import { type PropertyValueMap } from "../../deps.js";
|
2
|
+
import RouteTree from "../../lib/route-tree.js";
|
3
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
4
|
+
import { GodownElement } from "../../root.js";
|
5
5
|
/**
|
6
6
|
* RouteView has basic routing control.
|
7
7
|
*/
|
@@ -0,0 +1 @@
|
|
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,O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|
6
|
-
};
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import { conf } from "../conf.js";
|
10
|
-
import { deepQuerySelectorAll } from "../lib/utils.js";
|
11
|
-
import { define } from "../root.js";
|
12
|
-
import { GodownElement } from "../root.js";
|
13
|
-
import RouteTree from "../lib/route-tree.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { conf } from "../../conf.js";
|
3
|
+
import { css, property, state } from "../../deps.js";
|
4
|
+
import RouteTree from "../../lib/route-tree.js";
|
5
|
+
import { htmlSlot } from "../../lib/templates.js";
|
6
|
+
import { deepQuerySelectorAll } from "../../lib/utils.js";
|
7
|
+
import { define } from "../../root.js";
|
8
|
+
import { GodownElement } from "../../root.js";
|
14
9
|
const defineName = "route-view";
|
15
10
|
/**
|
16
11
|
* RouteView has basic routing control.
|
@@ -81,6 +76,13 @@ let RouteView = class RouteView extends GodownElement {
|
|
81
76
|
get routes() {
|
82
77
|
return this._routes;
|
83
78
|
}
|
79
|
+
static { this.styles = [
|
80
|
+
css `
|
81
|
+
:host {
|
82
|
+
display: contents;
|
83
|
+
}
|
84
|
+
`,
|
85
|
+
]; }
|
84
86
|
reset() {
|
85
87
|
this._routeTree = new RouteTree();
|
86
88
|
this.record.clear();
|
@@ -211,13 +213,6 @@ let RouteView = class RouteView extends GodownElement {
|
|
211
213
|
});
|
212
214
|
}
|
213
215
|
};
|
214
|
-
RouteView.styles = [
|
215
|
-
css `
|
216
|
-
:host {
|
217
|
-
display: contents;
|
218
|
-
}
|
219
|
-
`,
|
220
|
-
];
|
221
216
|
__decorate([
|
222
217
|
state()
|
223
218
|
], RouteView.prototype, "component", void 0);
|
@@ -0,0 +1 @@
|
|
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,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OAAkB,IAAI,CAAC,UAAU;QAC5F,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,CAAC,SAAS;QACd,MAAM,gBAAgB,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;;AA/MQ;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,5 +1,5 @@
|
|
1
|
-
import { type HTMLTemplate } from "
|
2
|
-
import { GodownElement } from "
|
1
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
2
|
+
import { GodownElement } from "../../root.js";
|
3
3
|
/**
|
4
4
|
* ScrollX changes the scroll direction to horizontal.
|
5
5
|
*/
|
@@ -0,0 +1 @@
|
|
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"}
|