@rdlabo/ionic-angular-kit 0.0.22 → 0.0.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rdlabo/ionic-angular-kit",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0",
@@ -9,6 +9,7 @@
9
9
  "@ionic/angular": "^8.0.0",
10
10
  "@ionic/storage-angular": "^4.0.0",
11
11
  "@capacitor/core": ">=6.0.0 <9.0.0",
12
+ "@capawesome/capacitor-live-update": ">=6.0.0 <9.0.0",
12
13
  "@capacitor/haptics": ">=6.0.0 <9.0.0",
13
14
  "@capacitor/keyboard": ">=6.0.0 <9.0.0",
14
15
  "@capacitor/network": ">=6.0.0 <9.0.0",
@@ -19,9 +20,16 @@
19
20
  "@capacitor-community/apple-sign-in": "*",
20
21
  "@rdlabo/capacitor-brotherprint": ">=6.0.0 <9.0.0",
21
22
  "dom-to-image-more": "^3.0.0",
23
+ "firebase": ">=11 <13",
22
24
  "rxjs": "^7.8.0"
23
25
  },
24
26
  "peerDependenciesMeta": {
27
+ "firebase": {
28
+ "optional": true
29
+ },
30
+ "@capawesome/capacitor-live-update": {
31
+ "optional": true
32
+ },
25
33
  "@capacitor/preferences": {
26
34
  "optional": true
27
35
  },
@@ -45,7 +53,6 @@
45
53
  }
46
54
  },
47
55
  "dependencies": {
48
- "@angular/fire": "21.0.0-rc.0",
49
56
  "tslib": "^2.3.0"
50
57
  },
51
58
  "sideEffects": false,
@@ -67,6 +74,10 @@
67
74
  "types": "./types/rdlabo-ionic-angular-kit-auth-firebase-social.d.ts",
68
75
  "default": "./fesm2022/rdlabo-ionic-angular-kit-auth-firebase-social.mjs"
69
76
  },
77
+ "./live-update": {
78
+ "types": "./types/rdlabo-ionic-angular-kit-live-update.d.ts",
79
+ "default": "./fesm2022/rdlabo-ionic-angular-kit-live-update.mjs"
80
+ },
70
81
  "./printer": {
71
82
  "types": "./types/rdlabo-ionic-angular-kit-printer.d.ts",
72
83
  "default": "./fesm2022/rdlabo-ionic-angular-kit-printer.mjs"
@@ -1,5 +1,5 @@
1
1
  import { InjectionToken, EnvironmentProviders } from '@angular/core';
2
- import { FirebaseOptions } from '@angular/fire/app';
2
+ import { FirebaseOptions } from 'firebase/app';
3
3
  import { Auth, User, UserCredential } from 'firebase/auth';
4
4
  export { User, UserCredential } from 'firebase/auth';
5
5
  import { Observable } from 'rxjs';
@@ -8,13 +8,11 @@ import { Observable } from 'rxjs';
8
8
  * DI token for the Firebase `Auth` instance.
9
9
  *
10
10
  * @remarks
11
- * Inject this (`inject(KIT_FIREBASE_AUTH)`) instead of `@angular/fire`'s `Auth`, so the
12
- * `@angular/fire` dependency stays isolated inside the kit. This is the seam that makes the planned
13
- * `@angular/fire` → `firebase/auth` migration a kit-internal change: only {@link provideKitFirebase}
14
- * (which binds this token) has to change; every consumer keeps injecting `KIT_FIREBASE_AUTH`.
11
+ * Inject this (`inject(KIT_FIREBASE_AUTH)`) instead of importing `getAuth()` in the app, so the
12
+ * Firebase SDK wiring stays isolated inside the kit: only {@link provideKitFirebase} (which binds
13
+ * this token) touches initialization; every consumer keeps injecting `KIT_FIREBASE_AUTH`.
15
14
  *
16
- * The value is a `firebase/auth` `Auth` (the SDK type is exposed directly, not re-abstracted —
17
- * Firebase Auth itself is not being dropped, only the `@angular/fire` wrapper).
15
+ * The value is a `firebase/auth` `Auth` — the SDK type is exposed directly, not re-abstracted.
18
16
  */
19
17
  declare const KIT_FIREBASE_AUTH: InjectionToken<Auth>;
20
18
  /** Configuration for {@link provideKitFirebase}. */
@@ -26,11 +24,12 @@ interface KitFirebaseConfig {
26
24
  * Wire Firebase App + Auth into the application and bind {@link KIT_FIREBASE_AUTH}.
27
25
  *
28
26
  * @remarks
29
- * Replaces each app's hand-rolled `provideFirebaseApp(...)` + `provideAuth(...)` (with its
30
- * native/web persistence branch) with one call, and — crucially — keeps `@angular/fire` out of the
31
- * application: apps inject {@link KIT_FIREBASE_AUTH} and import auth operations/types straight from
32
- * `firebase/auth`. On a native platform the persistence uses `indexedDBLocalPersistence`; on the web
33
- * it uses the default (`getAuth`).
27
+ * Replaces each app's hand-rolled `provideFirebaseApp(...)` + `provideAuth(...)` with one call.
28
+ * Firebase is initialized eagerly with the vanilla `firebase/app` + `firebase/auth` SDK (no
29
+ * `@angular/fire`), and the resulting `Auth` is bound to {@link KIT_FIREBASE_AUTH}. On a native
30
+ * platform the persistence uses `indexedDBLocalPersistence`; on the web it uses the default
31
+ * (`getAuth`). Apps inject {@link KIT_FIREBASE_AUTH} and call the kit's flow functions, keeping the
32
+ * Firebase SDK isolated inside the kit.
34
33
  *
35
34
  * @example
36
35
  * ```ts
@@ -42,6 +41,10 @@ interface KitFirebaseConfig {
42
41
  declare const provideKitFirebase: (config: KitFirebaseConfig) => EnvironmentProviders;
43
42
  /**
44
43
  * Wire Firebase Analytics into the application (optional; only the apps that use it call this).
44
+ *
45
+ * @remarks
46
+ * Analytics is initialized eagerly against the already-initialized Firebase app, so this must be
47
+ * called after (or alongside) {@link provideKitFirebase}.
45
48
  */
46
49
  declare const provideKitFirebaseAnalytics: () => EnvironmentProviders;
47
50
 
@@ -153,8 +156,8 @@ declare const kitSendEmailVerification: (auth: Auth, hooks?: KitAuthHooks) => Pr
153
156
  *
154
157
  * @remarks
155
158
  * For use inside {@link kitReauthWithRetry}'s `mutate` callback (after re-authentication). Uses the
156
- * same `@angular/fire/auth` module as {@link KIT_FIREBASE_AUTH} so the dual-firebase-sdk mismatch
157
- * cannot silently no-op.
159
+ * same `firebase/auth` copy as {@link KIT_FIREBASE_AUTH} so the dual-firebase-sdk mismatch cannot
160
+ * silently no-op.
158
161
  */
159
162
  declare const kitUpdateEmail: (user: User, newEmail: string) => Promise<void>;
160
163
  /**
@@ -183,9 +186,8 @@ declare const kitLinkEmailPassword: (auth: Auth, email: string, password: string
183
186
  * The current Firebase user as an Observable (emits on every auth-state change; `null` when signed out).
184
187
  *
185
188
  * @remarks
186
- * Wraps `onAuthStateChanged` so consumers get an rxjs stream without pulling in `@angular/fire`'s
187
- * `authState` (or `rxfire`). Emits the current value on subscribe and completes its listener on
188
- * teardown.
189
+ * Wraps `firebase/auth`'s `onAuthStateChanged` so consumers get an rxjs stream without pulling in
190
+ * `rxfire`. Emits the current value on subscribe and completes its listener on teardown.
189
191
  *
190
192
  * @param auth - the Firebase `Auth` instance (inject `KIT_FIREBASE_AUTH`)
191
193
  */
@@ -0,0 +1,9 @@
1
+ import { EnvironmentProviders } from '@angular/core';
2
+
3
+ /**
4
+ * Marks a native Live Update bundle healthy after Angular is stable and the
5
+ * first route has rendered. Web builds are unaffected.
6
+ */
7
+ declare function provideLiveUpdateReadiness(): EnvironmentProviders;
8
+
9
+ export { provideLiveUpdateReadiness };