pwa-auth 3.5.1 → 3.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/README.md +139 -491
- package/base/export/drawer.d.ts +2 -0
- package/base/export/drawer.d.ts.map +1 -0
- package/base/export/drawer.js +2 -0
- package/base/export/drawer.js.map +1 -0
- package/base/export/icon.d.ts +2 -0
- package/base/export/icon.d.ts.map +1 -0
- package/base/export/icon.js +2 -0
- package/base/export/icon.js.map +1 -0
- package/base/export/login.d.ts +2 -0
- package/base/export/login.d.ts.map +1 -0
- package/base/export/login.js +2 -0
- package/base/export/login.js.map +1 -0
- package/base/export/reset.d.ts +2 -0
- package/base/export/reset.d.ts.map +1 -0
- package/base/export/reset.js +2 -0
- package/base/export/reset.js.map +1 -0
- package/base/export/settings.d.ts +2 -0
- package/base/export/settings.d.ts.map +1 -0
- package/base/export/settings.js +2 -0
- package/base/export/settings.js.map +1 -0
- package/base/firebase/google.d.ts +9 -0
- package/base/firebase/google.d.ts.map +1 -0
- package/base/firebase/google.js +56 -0
- package/base/firebase/google.js.map +1 -0
- package/base/firebase/interface.d.ts.map +1 -1
- package/base/firebase/interface.js +2 -0
- package/base/firebase/interface.js.map +1 -1
- package/base/firebase/message.d.ts.map +1 -1
- package/base/firebase/message.js +1 -0
- package/base/firebase/message.js.map +1 -1
- package/base/webcomponents/css/animation.d.ts +2 -0
- package/base/webcomponents/css/animation.d.ts.map +1 -1
- package/base/webcomponents/css/animation.js +49 -11
- package/base/webcomponents/css/animation.js.map +1 -1
- package/base/webcomponents/drawer/css/drawer.d.ts.map +1 -1
- package/base/webcomponents/drawer/css/drawer.js +11 -55
- package/base/webcomponents/drawer/css/drawer.js.map +1 -1
- package/base/webcomponents/drawer/css/exit.js +1 -1
- package/base/webcomponents/drawer/css/paragraph.d.ts.map +1 -1
- package/base/webcomponents/drawer/css/paragraph.js +10 -3
- package/base/webcomponents/drawer/css/paragraph.js.map +1 -1
- package/base/webcomponents/drawer/drawer.d.ts +25 -0
- package/base/webcomponents/drawer/drawer.d.ts.map +1 -1
- package/base/webcomponents/drawer/drawer.js +276 -20
- package/base/webcomponents/drawer/drawer.js.map +1 -1
- package/base/webcomponents/form/css/button.d.ts.map +1 -1
- package/base/webcomponents/form/css/button.js +53 -15
- package/base/webcomponents/form/css/button.js.map +1 -1
- package/base/webcomponents/form/css/input.d.ts.map +1 -1
- package/base/webcomponents/form/css/input.js +10 -1
- package/base/webcomponents/form/css/input.js.map +1 -1
- package/base/webcomponents/form/css/label.d.ts.map +1 -1
- package/base/webcomponents/form/css/label.js +19 -1
- package/base/webcomponents/form/css/label.js.map +1 -1
- package/base/webcomponents/form/css/list.d.ts.map +1 -1
- package/base/webcomponents/form/css/list.js +2 -1
- package/base/webcomponents/form/css/list.js.map +1 -1
- package/base/webcomponents/form/css/notice.js +3 -3
- package/base/webcomponents/form/css/status.d.ts.map +1 -1
- package/base/webcomponents/form/css/status.js +18 -5
- package/base/webcomponents/form/css/status.js.map +1 -1
- package/base/webcomponents/form/css/toggle.d.ts.map +1 -1
- package/base/webcomponents/form/css/toggle.js +7 -0
- package/base/webcomponents/form/css/toggle.js.map +1 -1
- package/base/webcomponents/form/forgot.d.ts.map +1 -1
- package/base/webcomponents/form/forgot.js +5 -4
- package/base/webcomponents/form/forgot.js.map +1 -1
- package/base/webcomponents/form/google-button.d.ts +3 -0
- package/base/webcomponents/form/google-button.d.ts.map +1 -0
- package/base/webcomponents/form/google-button.js +23 -0
- package/base/webcomponents/form/google-button.js.map +1 -0
- package/base/webcomponents/form/login.d.ts +5 -0
- package/base/webcomponents/form/login.d.ts.map +1 -1
- package/base/webcomponents/form/login.js +41 -1
- package/base/webcomponents/form/login.js.map +1 -1
- package/base/webcomponents/form/signup.d.ts +5 -0
- package/base/webcomponents/form/signup.d.ts.map +1 -1
- package/base/webcomponents/form/signup.js +41 -1
- package/base/webcomponents/form/signup.js.map +1 -1
- package/base/webcomponents/icon/css/icon.d.ts.map +1 -1
- package/base/webcomponents/icon/css/icon.js +9 -0
- package/base/webcomponents/icon/css/icon.js.map +1 -1
- package/base/webcomponents/login/css/auth.d.ts +2 -2
- package/base/webcomponents/login/css/auth.d.ts.map +1 -1
- package/base/webcomponents/login/css/auth.js +12 -13
- package/base/webcomponents/login/css/auth.js.map +1 -1
- package/base/webcomponents/login/page.d.ts +21 -1
- package/base/webcomponents/login/page.d.ts.map +1 -1
- package/base/webcomponents/login/page.js +191 -8
- package/base/webcomponents/login/page.js.map +1 -1
- package/base/webcomponents/settings/css/navigation.js +3 -3
- package/base/webcomponents/settings/input/delete.d.ts.map +1 -1
- package/base/webcomponents/settings/input/delete.js +7 -1
- package/base/webcomponents/settings/input/delete.js.map +1 -1
- package/base/webcomponents/settings/input/uploader.d.ts.map +1 -1
- package/base/webcomponents/settings/input/uploader.js +8 -4
- package/base/webcomponents/settings/input/uploader.js.map +1 -1
- package/base/webcomponents/settings/input/verify.d.ts.map +1 -1
- package/base/webcomponents/settings/input/verify.js +24 -7
- package/base/webcomponents/settings/input/verify.js.map +1 -1
- package/base/webcomponents/settings/settings.d.ts +19 -1
- package/base/webcomponents/settings/settings.d.ts.map +1 -1
- package/base/webcomponents/settings/settings.js +177 -12
- package/base/webcomponents/settings/settings.js.map +1 -1
- package/docs/drawer-slide.md +206 -0
- package/docs/sliders.md +73 -0
- package/package.json +49 -10
- package/source/pwa-auth.js +510 -297
- package/source/pwa-styles.css +0 -7
- package/firebase.md +0 -107
- package/intro.md +0 -19
package/docs/sliders.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Slides
|
|
2
|
+
|
|
3
|
+
The drawer, the page login, and settings each slide on their own. Opening one does not move the others. Nothing moves on the first paint.
|
|
4
|
+
|
|
5
|
+
Three components slide, and each one owns its roll. `user-drawer` (`typescript/webcomponents/drawer/drawer.ts`), `user-login` (`typescript/webcomponents/login/page.ts`), and `user-settings` (`typescript/webcomponents/settings/settings.ts`) do not import a shared roll helper. There is no `css/roll.ts`.
|
|
6
|
+
|
|
7
|
+
`animation.ts` is the form swap only: `--pwa_slide`, `.opened` / `.closed`, and the drawer shell's closed backstop. Settings does not import it. The full roll write-up is [The roll](drawer-slide.md#the-roll).
|
|
8
|
+
|
|
9
|
+
The fields are flush with the element. Spacing belongs to the page: `--pwa_inset` defaults to `0`. The form column fills a narrow host and, once the host is wider than `--pwa_max_width` (`400px`), stays that wide and centers. The page login column centers under the full-width heading. Signed-in drawer links use that same column. Set either variable on `user-drawer`, `user-login`, `user-settings`, or `email-reset`. The drawer header and the settings tabs stay full width. Each host is `display: block` with `width: 100%` and `min-width: 0` (`user-icon` is `width: fit-content`, `max-width: 100%`). A resize while a roll is in motion remeasures that component and eases from the current clip height with the sheet bottom still on the clip.
|
|
10
|
+
|
|
11
|
+
Two motions, one duration, per component.
|
|
12
|
+
|
|
13
|
+
- The drawer rolls. `.drawer-clip` eases `height` and `max-height` from `0px` to the measured content height and back. `section.userDrawer` translates on that same clock, so the sheet's bottom stays on the clip's bottom.
|
|
14
|
+
- Closed forms share one grid cell. Class `closed` is `position: absolute` and translates `translate3d(0, -100%, 0)`. Once `.inner` has class `motion`, `visibility` waits out `--pwa_slide`, then hides. Settings panels do not use these classes.
|
|
15
|
+
|
|
16
|
+
## How it works
|
|
17
|
+
|
|
18
|
+
The clip is an element in that component's template (`overflow: hidden`, `display: block`). The sheet is the block that should ride the bottom edge. `styleMap` binds `height`, `max-height`, `transform`, and `transition` from that component's state. `classMap` binds `opened` and `closed`.
|
|
19
|
+
|
|
20
|
+
The first render is the resting state and `transition: none`. The drawer binds shut (`0px`, sheet `-100%`). The page login binds the card at `height: auto` with the signup form already `closed`. Settings binds the active tab at `auto`, or the signed-out line when nobody is logged in. Nothing eases on that paint. Class `motion` is added on that component's `.inner` afterwards, and it only arms the form swap. The roll's transition is written later, inside that component's own ease, when the user actually changes something.
|
|
21
|
+
|
|
22
|
+
JS measures the height in px and the binding eases from the current px to the next px. The range is the real height, so the ease is not crushed into the start of a huge range. At progress `p`, open from 0, the clip is `p` times the height and the sheet is shifted `(p - 1)` times its height. A height change that is not from 0 uses clip `A + (B - A) * p` and `translateY = clip − sheetHeight`.
|
|
23
|
+
|
|
24
|
+
After the clip's own `max-height` `transitionend`, the binding becomes `height: auto` and `max-height: none`. The listener requires `event.target` to be that clip. Closing measures again, locks that px, and eases both heights to `0` and the transform back to `-100%`. A drawer form swap, a page-login switch, and a settings tab each run only their own ease.
|
|
25
|
+
|
|
26
|
+
`sliding` on the drawer turns on as the open starts. It turns off when the drawer's clip reaches 0. That same moment drops `visibility`, `pointer-events`, and `inert`. The host's `max-height: 0` backstop has no transition, so it cannot play an open-to-closed ease at load.
|
|
27
|
+
|
|
28
|
+
The drawer and the page login still swap login and sign-up inside `.inner`. That pair shares one grid cell: the open form is `position: relative` and sets the height, the closed form is absolute and translated up. `.inner` clips it. Settings tabs do not use that pair. Their panel area is their own roll. The nav stays outside it.
|
|
29
|
+
|
|
30
|
+
`@keyframes slide-out` only changes `max-height`. It is not the form swap. Playing it on `.closed`, or leaving `.closed` in flow with `position: relative`, moves the row while the transform runs and the forms snap instead of sliding past each other.
|
|
31
|
+
|
|
32
|
+
## Elements
|
|
33
|
+
|
|
34
|
+
On the drawer, inside `.userDrawer`:
|
|
35
|
+
|
|
36
|
+
`spec` → `wrapper` → `inner` → `content`
|
|
37
|
+
|
|
38
|
+
`wrapper` does not transition. `inner` clips the form swap. `.drawer-clip` clips the roll.
|
|
39
|
+
|
|
40
|
+
| Piece | Element | What moves |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| Drawer clip | `.drawer-clip` | `0px` ↔ measured px, this host's `--pwa_slide` |
|
|
43
|
+
| Drawer sheet | `section.userDrawer` | lockstep `translateY`, same clock |
|
|
44
|
+
| Drawer and page forms | `.content` with `opened` / `closed` | `transform` `--pwa_slide` after `motion`, then `visibility` |
|
|
45
|
+
| Settings panels | `.settings-clip` / `.settings-sheet` | that component's own roll |
|
|
46
|
+
| Page login card | `.login-clip` / `section.service` | that component's own roll, on `registerTwo` |
|
|
47
|
+
|
|
48
|
+
Page login uses `spec` / `wrapper` / `inner` / `content` for the form swap, and rolls `section.service` when that swap changes the card height. The four settings panels (`profile`, `verification`, `password`, `delete`) sit in `.settings-sheet`. The inactive ones are `hidden`. The nav is outside the roll.
|
|
49
|
+
|
|
50
|
+
## Triggers
|
|
51
|
+
|
|
52
|
+
- Attribute `drawer` on `user-drawer`, after the first update, rolls `.drawer-clip`. Attribute `sliding` holds `visibility`, `pointer-events`, and `inert` until that clip's `max-height` `transitionend`. The `[drawer]` attribute does not set a transform.
|
|
53
|
+
- Class `motion` on `.inner` arms `.content` transitions. It is absent on the first paint. The drawer and the page login each set their own.
|
|
54
|
+
- Classes `opened` and `closed` on `.content`, bound with `classMap`. Drawer forms follow `registerOne`. Page forms follow `registerTwo`. Settings panels follow the tab by rolling `.settings-clip`, not by those classes.
|
|
55
|
+
- Attribute `on` on `.spec` is `display`. It is not a slide.
|
|
56
|
+
|
|
57
|
+
## Timings
|
|
58
|
+
|
|
59
|
+
`--pwa_slide` is `2s` on each component's `:host`. The drawer and the page login set it in `animation.ts`. Settings sets it in `settings.ts`. Every transform duration and every close delay in that component reads its own variable. Do not add a second number, and do not put the variable on `:root`.
|
|
60
|
+
|
|
61
|
+
| Piece | Duration | Easing |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| Clip `height` / `max-height` and sheet transform | `--pwa_slide` (`2s`) | `ease-in-out` |
|
|
64
|
+
| Form-swap height glide | `--pwa_slide` (`2s`) | `ease-in-out` |
|
|
65
|
+
| `sliding` drop (`visibility`, `pointer-events`, `inert`) | on the clip's `transitionend` | n/a |
|
|
66
|
+
| `.content` transform, after `motion` | `--pwa_slide` (`2s`) | `ease-in-out` |
|
|
67
|
+
| `.content` visibility delay when closing | `--pwa_slide` (`2s`) | `linear` |
|
|
68
|
+
|
|
69
|
+
Open and close are the same duration. The first paint uses neither.
|
|
70
|
+
|
|
71
|
+
## Reduced motion
|
|
72
|
+
|
|
73
|
+
`prefers-reduced-motion: reduce` sets that host's `--pwa_slide` to `0s`. The roll also skips the ease and writes the resting binding with `transition: none`. Only inside that media query, and only on that host.
|
package/package.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://www.jackspublishing.com",
|
|
7
7
|
"email": "jack.solutionbox@gmail.com"
|
|
8
8
|
},
|
|
9
|
-
"version": "3.
|
|
9
|
+
"version": "3.7.0",
|
|
10
10
|
"description": "Five elements: user-icon, user-drawer, user-login, user-settings, and email-reset. pwa- events, a small API, and --pwa_ theme variables.",
|
|
11
11
|
"homepage": "https://pwa-authentic.firebaseapp.com",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/busynest/user"
|
|
14
|
+
"url": "git+https://github.com/busynest/user.git"
|
|
15
15
|
},
|
|
16
16
|
"bugs": {
|
|
17
17
|
"url": "https://github.com/busynest/user/issues"
|
|
@@ -31,9 +31,11 @@
|
|
|
31
31
|
"user-login",
|
|
32
32
|
"user-settings",
|
|
33
33
|
"email-reset",
|
|
34
|
-
"web components"
|
|
34
|
+
"web components",
|
|
35
|
+
"custom elements"
|
|
35
36
|
],
|
|
36
37
|
"main": "./base/export/pwa-auth.js",
|
|
38
|
+
"module": "./base/export/pwa-auth.js",
|
|
37
39
|
"types": "./base/export/pwa-auth.d.ts",
|
|
38
40
|
"exports": {
|
|
39
41
|
".": {
|
|
@@ -41,32 +43,69 @@
|
|
|
41
43
|
"import": "./base/export/pwa-auth.js",
|
|
42
44
|
"default": "./base/export/pwa-auth.js"
|
|
43
45
|
},
|
|
46
|
+
"./drawer": {
|
|
47
|
+
"types": "./base/export/drawer.d.ts",
|
|
48
|
+
"import": "./base/export/drawer.js",
|
|
49
|
+
"default": "./base/export/drawer.js"
|
|
50
|
+
},
|
|
51
|
+
"./login": {
|
|
52
|
+
"types": "./base/export/login.d.ts",
|
|
53
|
+
"import": "./base/export/login.js",
|
|
54
|
+
"default": "./base/export/login.js"
|
|
55
|
+
},
|
|
56
|
+
"./settings": {
|
|
57
|
+
"types": "./base/export/settings.d.ts",
|
|
58
|
+
"import": "./base/export/settings.js",
|
|
59
|
+
"default": "./base/export/settings.js"
|
|
60
|
+
},
|
|
61
|
+
"./icon": {
|
|
62
|
+
"types": "./base/export/icon.d.ts",
|
|
63
|
+
"import": "./base/export/icon.js",
|
|
64
|
+
"default": "./base/export/icon.js"
|
|
65
|
+
},
|
|
66
|
+
"./reset": {
|
|
67
|
+
"types": "./base/export/reset.d.ts",
|
|
68
|
+
"import": "./base/export/reset.js",
|
|
69
|
+
"default": "./base/export/reset.js"
|
|
70
|
+
},
|
|
44
71
|
"./production": {
|
|
45
72
|
"types": "./base/export/pwa-auth.d.ts",
|
|
46
73
|
"import": "./source/pwa-auth.js",
|
|
47
74
|
"default": "./source/pwa-auth.js"
|
|
48
75
|
}
|
|
49
76
|
},
|
|
50
|
-
"sideEffects":
|
|
77
|
+
"sideEffects": [
|
|
78
|
+
"./base/export/pwa-auth.js",
|
|
79
|
+
"./base/export/drawer.js",
|
|
80
|
+
"./base/export/login.js",
|
|
81
|
+
"./base/export/settings.js",
|
|
82
|
+
"./base/export/icon.js",
|
|
83
|
+
"./base/export/reset.js",
|
|
84
|
+
"./base/webcomponents/**/*.js",
|
|
85
|
+
"./source/pwa-auth.js"
|
|
86
|
+
],
|
|
51
87
|
"files": [
|
|
52
88
|
"base",
|
|
53
89
|
"source/pwa-auth.js",
|
|
54
90
|
"source/pwa-styles.css",
|
|
55
91
|
"source/empty.jpg",
|
|
56
92
|
"README.md",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
93
|
+
"docs/drawer-slide.md",
|
|
94
|
+
"docs/sliders.md",
|
|
59
95
|
"license",
|
|
60
96
|
"LICENSES.txt"
|
|
61
97
|
],
|
|
62
98
|
"typesVersions": {
|
|
63
99
|
"*": {
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
]
|
|
100
|
+
"drawer": ["./base/export/drawer.d.ts"],
|
|
101
|
+
"login": ["./base/export/login.d.ts"],
|
|
102
|
+
"settings": ["./base/export/settings.d.ts"],
|
|
103
|
+
"icon": ["./base/export/icon.d.ts"],
|
|
104
|
+
"reset": ["./base/export/reset.d.ts"],
|
|
105
|
+
"production": ["./base/export/pwa-auth.d.ts"]
|
|
67
106
|
}
|
|
68
107
|
},
|
|
69
|
-
"license": "
|
|
108
|
+
"license": "MIT",
|
|
70
109
|
"scripts": {
|
|
71
110
|
"server": "web-dev-server --node-resolve --watch --open",
|
|
72
111
|
"demo": "web-dev-server --node-resolve --watch --open --app-index demonstration/index.html",
|