pwa-auth 2.0.5 → 2.0.6

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/CHANGELOG.md CHANGED
@@ -6,9 +6,16 @@ All notable changes to pwa-auth.js will be documented in this file.
6
6
  - Social Login Flow
7
7
  - animated login and data
8
8
 
9
- # [2.0.4] - 2025-09-06
9
+ # [2.0.6] - 2025-09-07
10
10
 
11
- # Changed
11
+ ## Changed
12
+ - start.js: default no-image storage, default no-image hyperlink
13
+ - default image changed to svg
14
+ - user-icon, user-settings: Empty Artwork URL, Property
15
+
16
+ # [2.0.5] - 2025-09-06
17
+
18
+ ## Changed
12
19
  - user-icon: login button - line-height configuration
13
20
  - (Public) Folder to (Website) Project Folder
14
21
 
package/README.md CHANGED
@@ -31,7 +31,7 @@ Continue reading to start installing the bundle:
31
31
 
32
32
  Visit: [Live Demo](https://pwa-authentic.firebaseapp.com)
33
33
 
34
- ## pwa-auth.js Features:
34
+ ## Features:
35
35
  - Register through Email and Password
36
36
  - Log-in
37
37
  - Log-out
@@ -45,6 +45,7 @@ Visit: [Live Demo](https://pwa-authentic.firebaseapp.com)
45
45
  - copy the bundle
46
46
  - node_modules/pwa-auth/npm/pwa-auth.js
47
47
  - node_modules/pwa-auth/npm/pwa-styles.css
48
+ - node_modules/pwa-auth/npm/images/empty.jpg
48
49
 
49
50
  ## Modular JavaScript
50
51
  ```javascript
@@ -58,6 +59,7 @@ import 'pwa-auth';
58
59
  - user-settings
59
60
  - Cascading Style Sheets (CSS - Custom Properties)
60
61
  - ECMA Script (JavaScript)
62
+ - <base> tag consideration: Hyperlinks without base tag
61
63
 
62
64
  ## HTML Custom Elements
63
65
  ```html
@@ -75,7 +77,8 @@ import 'pwa-auth';
75
77
  <!-- Logged-out (State): txt: Login Button -->
76
78
  <!-- Logged-out (State): txt: Subscribe Button -->
77
79
  <!-- Logged-in (State): photo: Icon Button -->
78
- <user-icon subscribe></user-icon>
80
+ <!-- emptyArtwork property: location of empty image -->
81
+ <user-icon subscribe emptyArtwork="images/empty.jpg"></user-icon>
79
82
  </header>
80
83
 
81
84
  <!-- settingsURL property: location of <pwa-settings> Tag -->
@@ -94,7 +97,8 @@ import 'pwa-auth';
94
97
  <!-- Update Email / Verify -->
95
98
  <!-- Update Password -->
96
99
  <!-- Delete Account, Photos, Information -->
97
- <user-settings></user-settings>
100
+ <!-- emptyArtwork property: location of empty image -->
101
+ <user-settings emptyArtwork="images/empty.jpg"></user-settings>
98
102
  </main>
99
103
 
100
104
  <script>/* Firebase Instance Configuration */</script>
@@ -55,7 +55,7 @@
55
55
  --pwa_nav_select: black;
56
56
 
57
57
  /* Section Header */
58
- --pwa_section_header: black;
58
+ --pwa_section_header: black;
59
59
 
60
60
  /* Label */
61
61
  --pwa_label_text_color: black;
Binary file
package/demo/index.html CHANGED
@@ -8,15 +8,15 @@
8
8
 
9
9
  <!-- Preconnect -->
10
10
  <link rel="preconnect" href="https://firebasestorage.googleapis.com">
11
-
11
+
12
12
  <!-- Pre-Fetch -->
13
13
  <link rel="dns-prefetch" href="https://firebasestorage.googleapis.com">
14
14
 
15
15
  <!-- Cascading Style Sheets -->
16
- <link rel="stylesheet" href="styles.css">
16
+ <link rel="stylesheet" href="css/styles.css">
17
17
 
18
18
  <!-- pwa-auth.js - CSS Custom Variables -->
19
- <link rel="stylesheet" href="pwa-styles.css">
19
+ <link rel="stylesheet" href="css/pwa-styles.css">
20
20
 
21
21
  <!-- pwa-auth.js - Module Configuration Objects -->
22
22
  <script>
@@ -40,17 +40,17 @@
40
40
  <header>
41
41
 
42
42
  <!-- Icon Tag -->
43
- <user-icon subscribe></user-icon>
43
+ <user-icon subscribe emptyArtwork="images/empty.jpg"></user-icon>
44
44
 
45
45
  </header>
46
46
 
47
47
  <!-- Drawer Tag-->
48
- <user-drawer subscribe settingsURL="/demo/settings"></user-drawer>
48
+ <user-drawer subscribe settingsURL="settings"></user-drawer>
49
49
 
50
50
  <main>
51
51
 
52
52
  <!-- Settings Tag-->
53
- <user-settings></user-settings>
53
+ <user-settings emptyArtwork="images/empty.jpg"></user-settings>
54
54
 
55
55
  </main>
56
56
 
@@ -64,7 +64,7 @@
64
64
  </footer>
65
65
 
66
66
  <!-- Application Shell -->
67
- <script type="module" src="pwa-auth.js" async></script>
67
+ <script type="module" src="../pwa-auth.js" async></script>
68
68
 
69
69
  </body>
70
70
 
@@ -15,6 +15,7 @@ declare const UserIcon_base: (new (...args: any[]) => {
15
15
  }) & typeof LitElement;
16
16
  export declare class UserIcon extends UserIcon_base {
17
17
  subscribe: boolean;
18
+ emptyArtwork: string;
18
19
  private _user;
19
20
  private _photoURL;
20
21
  constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../source/custom-elements/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,MAAQ,KAAK,CAAC;AAGzD,OAAO,EAAS,QAAQ,EAAE,MAAyB,aAAa,CAAC;;;;;;;;;;;;;;AAKjE,qBACa,QAAS,SAAQ,aAA0B;IAGL,SAAS,UAAS;IAE1D,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,SAAS,CAAM;;IAKhC,SAAS,CAAC,YAAY;IAOtB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAM5B,MAAM,KAAK,MAAM,IAAG,cAAc,CAA0B;IAE5D,SAAS,CAAC,MAAM;CAyBjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,WAAW,EAAE,QAAQ,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../source/custom-elements/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,MAAQ,KAAK,CAAC;AAGzD,OAAO,EAAS,QAAQ,EAAE,MAAyB,aAAa,CAAC;;;;;;;;;;;;;;AAKjE,qBACa,QAAS,SAAQ,aAA0B;IAGL,SAAS,UAAS;IAGnB,YAAY,SAAM;IAEzD,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,SAAS,CAAM;;IAKhC,SAAS,CAAC,YAAY;IAOtB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAM5B,MAAM,KAAK,MAAM,IAAG,cAAc,CAA0B;IAE5D,SAAS,CAAC,MAAM;CAyBjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,WAAW,EAAE,QAAQ,CAAC;KACzB;CACF"}
@@ -14,6 +14,7 @@ let UserIcon = class UserIcon extends connect(store)(LitElement) {
14
14
  constructor() {
15
15
  super();
16
16
  this.subscribe = false;
17
+ this.emptyArtwork = '';
17
18
  this._user = false;
18
19
  this._photoURL = '';
19
20
  }
@@ -44,7 +45,7 @@ let UserIcon = class UserIcon extends connect(store)(LitElement) {
44
45
  alt = "Login"
45
46
  height = "38px"
46
47
  width = "38px"
47
- src = "${this._photoURL}">
48
+ src = "${this._photoURL ? this._photoURL : this.emptyArtwork}">
48
49
  <!-- </div> -->
49
50
  ` : this.subscribe ? 'Subscribe' : 'Login'}
50
51
 
@@ -56,6 +57,9 @@ let UserIcon = class UserIcon extends connect(store)(LitElement) {
56
57
  __decorate([
57
58
  property({ type: Boolean, reflect: true })
58
59
  ], UserIcon.prototype, "subscribe", void 0);
60
+ __decorate([
61
+ property({ type: String, reflect: true })
62
+ ], UserIcon.prototype, "emptyArtwork", void 0);
59
63
  __decorate([
60
64
  state()
61
65
  ], UserIcon.prototype, "_user", void 0);
@@ -15,6 +15,7 @@ declare const ContactPhoto_base: (new (...args: any[]) => {
15
15
  }) & typeof LitElement;
16
16
  export declare class ContactPhoto extends ContactPhoto_base {
17
17
  photo: string | void | any;
18
+ emptyArtwork: string;
18
19
  private user;
19
20
  private login;
20
21
  private progress;
@@ -1 +1 @@
1
- {"version":3,"file":"uploader.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/settings/input/uploader.ts"],"names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,MAAM;YA6FF,SAAS;IA0IvB,OAAO,CAAC,aAAa,CAYpB;CAEF;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,eAAe,EAAE,YAAY,CAAC;KACjC;CACF"}
@@ -17,6 +17,7 @@ export class ContactPhoto extends connect(store)(LitElement) {
17
17
  constructor() {
18
18
  super();
19
19
  this.photo = '';
20
+ this.emptyArtwork = '';
20
21
  this.user = '';
21
22
  this.login = false;
22
23
  this.progress = 0;
@@ -115,7 +116,7 @@ export class ContactPhoto extends connect(store)(LitElement) {
115
116
  margin: auto;
116
117
  height: 200px;
117
118
  width: 100%;
118
- background-image: url(${this.photo});
119
+ background-image: url(${this.photo ? this.photo : this.emptyArtwork});
119
120
  background-size: contain;
120
121
  background-repeat: no-repeat;
121
122
  background-position: center;
@@ -202,6 +203,9 @@ export class ContactPhoto extends connect(store)(LitElement) {
202
203
  __decorate([
203
204
  property()
204
205
  ], ContactPhoto.prototype, "photo", void 0);
206
+ __decorate([
207
+ property({ type: String, reflect: true })
208
+ ], ContactPhoto.prototype, "emptyArtwork", void 0);
205
209
  __decorate([
206
210
  state()
207
211
  ], ContactPhoto.prototype, "user", void 0);
@@ -19,6 +19,7 @@ declare const UserSettings_base: (new (...args: any[]) => {
19
19
  readonly isConnected: boolean;
20
20
  }) & typeof LitElement;
21
21
  export declare class UserSettings extends UserSettings_base {
22
+ emptyArtwork: string;
22
23
  private profileTopic;
23
24
  private name;
24
25
  constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../source/custom-elements/settings/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAe,KAAK,CAAC;AAGrD,OAAO,EAAS,QAAQ,EAAE,MAAqB,aAAa,CAAC;AAG7D,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC;;;;;;;;;;;;;;AAGxB,qBACa,YAAa,SAAQ,iBAA0B;IAEjD,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,IAAI,CAAM;;IAI3B,SAAS,CAAC,YAAY;IA8BtB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAK5B,MAAM,KAAK,MAAM,8BAyCX;IAEN,SAAS,CAAC,MAAM;CA6FjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,eAAe,EAAE,YAAY,CAAC;KACjC;CACF"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../source/custom-elements/settings/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAe,KAAK,CAAC;AAGrD,OAAO,EAAS,QAAQ,EAAE,MAAqB,aAAa,CAAC;AAG7D,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC;;;;;;;;;;;;;;AAGxB,qBACa,YAAa,SAAQ,iBAA0B;IAGV,YAAY,SAAM;IAEzD,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,IAAI,CAAM;;IAI3B,SAAS,CAAC,YAAY;IA8BtB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAK5B,MAAM,KAAK,MAAM,8BAyCX;IAEN,SAAS,CAAC,MAAM;CA6FjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,eAAe,EAAE,YAAY,CAAC;KACjC;CACF"}
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { css, html, LitElement } from 'lit';
8
- import { state, customElement } from 'lit/decorators.js';
8
+ import { state, customElement, property } from 'lit/decorators.js';
9
9
  import { connect } from 'pwa-helpers/connect-mixin.js';
10
10
  import { store } from '../../store';
11
11
  import { navigateAuth } from '../../redux/frontend';
@@ -19,6 +19,7 @@ import { listStyle } from '../../css/form/list';
19
19
  let UserSettings = class UserSettings extends connect(store)(LitElement) {
20
20
  constructor() {
21
21
  super();
22
+ this.emptyArtwork = '';
22
23
  this.profileTopic = '';
23
24
  this.name = '';
24
25
  }
@@ -135,7 +136,7 @@ let UserSettings = class UserSettings extends connect(store)(LitElement) {
135
136
  <h2>${this.name}</h2>
136
137
 
137
138
  <!-- Custom Image Element - Display / Upload -->
138
- <contact-photo></contact-photo>
139
+ <contact-photo emptyArtwork="${this.emptyArtwork}"></contact-photo>
139
140
 
140
141
  </section>
141
142
 
@@ -181,6 +182,9 @@ let UserSettings = class UserSettings extends connect(store)(LitElement) {
181
182
  `;
182
183
  }
183
184
  };
185
+ __decorate([
186
+ property({ type: String, reflect: true })
187
+ ], UserSettings.prototype, "emptyArtwork", void 0);
184
188
  __decorate([
185
189
  state()
186
190
  ], UserSettings.prototype, "profileTopic", void 0);
@@ -46,10 +46,10 @@ onAuthStateChanged(auth, (user) => {
46
46
  store.dispatch(closeSign());
47
47
  store.dispatch(accID(user.uid));
48
48
  store.dispatch(accName(user.displayName || 'John Doe'));
49
- store.dispatch(accEmail(user.email || 'Nothing'));
50
- store.dispatch(accImage(user.photoURL || 'images/empty.jpg'));
49
+ store.dispatch(accEmail(user.email || ''));
50
+ store.dispatch(accImage(user.photoURL || ''));
51
51
  store.dispatch(nameAuth(user.displayName || 'John Doe'));
52
- store.dispatch(iconAuth(user.photoURL || 'images/empty.jpg'));
52
+ store.dispatch(iconAuth(user.photoURL || ''));
53
53
  if (pendingEmailVerification && !user.emailVerified) {
54
54
  sendEmailVerification(user)
55
55
  .then(() => {
@@ -72,10 +72,10 @@ onAuthStateChanged(auth, (user) => {
72
72
  store.dispatch(userAuth(false));
73
73
  store.dispatch(accID(''));
74
74
  store.dispatch(accName('John Doe'));
75
- store.dispatch(accEmail('Nothing'));
76
- store.dispatch(accImage('images/empty.jpg'));
75
+ store.dispatch(accEmail(''));
76
+ store.dispatch(accImage(''));
77
77
  store.dispatch(nameAuth('John Doe'));
78
- store.dispatch(iconAuth('images/empty.jpg'));
78
+ store.dispatch(iconAuth(''));
79
79
  }
80
80
  });
81
81
  export const logOut = async () => { return signOut(auth); };
@@ -8,7 +8,7 @@ export const initialState = {
8
8
  customer: "John Doe",
9
9
  profileChoice: 'unChosen',
10
10
  name: 'Modern Business',
11
- photoURL: 'images/empty.jpg',
11
+ photoURL: '',
12
12
  phone: '(...) ... - ....',
13
13
  email: ''
14
14
  };
Binary file