@rebasepro/client-firebase 0.0.1-canary.eae7889 → 0.1.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.
@@ -1,5 +1,5 @@
1
1
  import { DocumentSnapshot } from "@firebase/firestore";
2
2
  import { EntityCollection } from "@rebasepro/types";
3
- export declare function buildCollectionId(idOrPath: string, parentCollectionIds?: string[]): string;
3
+ export declare function buildCollectionId(idOrPath: string, parentCollectionSlugs?: string[], parentEntityIds?: string[]): string;
4
4
  export declare const docsToCollectionTree: (docs: DocumentSnapshot[]) => EntityCollection[];
5
5
  export declare const docToCollection: (doc: DocumentSnapshot) => EntityCollection;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebasepro/client-firebase",
3
3
  "type": "module",
4
- "version": "0.0.1-canary.eae7889",
4
+ "version": "0.1.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -11,14 +11,13 @@
11
11
  "source": "src/index.ts",
12
12
  "dependencies": {
13
13
  "@firebase/auth": "*",
14
- "react-fast-compare": "3.2.2",
15
14
  "react-router-dom": "^7.13.1",
16
- "@rebasepro/admin": "0.0.1-canary.eae7889",
17
- "@rebasepro/common": "0.0.1-canary.eae7889",
18
- "@rebasepro/core": "0.0.1-canary.eae7889",
19
- "@rebasepro/types": "0.0.1-canary.eae7889",
20
- "@rebasepro/utils": "0.0.1-canary.eae7889",
21
- "@rebasepro/ui": "0.0.1-canary.eae7889"
15
+ "@rebasepro/common": "0.1.0",
16
+ "@rebasepro/types": "0.1.0",
17
+ "@rebasepro/core": "0.1.0",
18
+ "@rebasepro/admin": "0.1.0",
19
+ "@rebasepro/utils": "0.1.0",
20
+ "@rebasepro/ui": "0.1.0"
22
21
  },
23
22
  "peerDependencies": {
24
23
  "firebase": "^10.12.2 || ^11.0.0 || ^12.0.0",
@@ -282,7 +282,7 @@ export function FirebaseLoginView({
282
282
 
283
283
  {(!passwordLoginSelected && !phoneLoginSelected) && <div className={"my-4 w-full"}>
284
284
 
285
- {buildOauthLoginButtons(authController, resolvedSignInOptions, modeState.mode, disabled)}
285
+ {buildOauthLoginButtons(authController, resolvedSignInOptions, modeState.mode as "light" | "dark", disabled)}
286
286
 
287
287
  {resolvedSignInOptions.includes("password") &&
288
288
  <LoginButton
@@ -321,7 +321,7 @@ export function FirebaseLoginView({
321
321
  {passwordLoginSelected && <LoginForm
322
322
  authController={authController}
323
323
  onClose={() => setPasswordLoginSelected(false)}
324
- mode={modeState.mode}
324
+ mode={modeState.mode as "light" | "dark"}
325
325
  noUserComponent={noUserComponent}
326
326
  disableSignupScreen={disableSignupScreen}
327
327
  disableResetPassword={disableResetPassword}
@@ -234,7 +234,7 @@ export function RebaseFirebaseApp({
234
234
  {({
235
235
  context,
236
236
  loading
237
- }) => {
237
+ }: { context: any, loading: boolean }) => {
238
238
 
239
239
  let component;
240
240
  if (loading || authLoading) {
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useEffect } from "react";
2
- import equal from "react-fast-compare"
2
+ import { deepEqual as equal } from "fast-equals";
3
3
 
4
4
  import { removeUndefined } from "@rebasepro/utils";
5
5
  import {
@@ -2,10 +2,10 @@ import { deleteField, DocumentSnapshot } from "@firebase/firestore";
2
2
  import { EntityCollection, FirebaseCollection, Properties, Property } from "@rebasepro/types";
3
3
  import { COLLECTION_PATH_SEPARATOR, sortProperties, stripCollectionPath } from "@rebasepro/common";
4
4
 
5
- export function buildCollectionId(idOrPath: string, parentCollectionIds?: string[]): string {
6
- if (!parentCollectionIds)
5
+ export function buildCollectionId(idOrPath: string, parentCollectionSlugs?: string[], parentEntityIds?: string[]): string {
6
+ if (!parentCollectionSlugs)
7
7
  return stripCollectionPath(idOrPath);
8
- return [...parentCollectionIds.map(stripCollectionPath), stripCollectionPath(idOrPath)].join(COLLECTION_PATH_SEPARATOR);
8
+ return [...parentCollectionSlugs.map(stripCollectionPath), stripCollectionPath(idOrPath)].join(COLLECTION_PATH_SEPARATOR);
9
9
  }
10
10
 
11
11