@rebasepro/core 0.1.2 → 0.2.1

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 Rebase
3
+ Copyright (c) 2026 Rebase
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -61,11 +61,6 @@ export interface LoginViewProps {
61
61
  * Error message when user is not allowed access
62
62
  */
63
63
  notAllowedError?: string | Error;
64
- /**
65
- * Override: enable Google login button.
66
- * If not set, checks `authController.capabilities.googleLogin`.
67
- */
68
- googleEnabled?: boolean;
69
64
  /**
70
65
  * Google client ID for Google OAuth.
71
66
  * Required when Google login is enabled via ID token flow.
@@ -87,4 +82,4 @@ export interface LoginViewProps {
87
82
  * Feature-detects capabilities to show/hide login methods.
88
83
  * @group Core
89
84
  */
90
- export declare function LoginView({ logo, authController, noUserComponent, disableSignupScreen, disabled, notAllowedError, googleEnabled, googleClientId, needsSetup, registrationEnabled }: LoginViewProps): import("react/jsx-runtime").JSX.Element;
85
+ export declare function LoginView({ logo, authController, noUserComponent, disableSignupScreen, disabled, notAllowedError, googleClientId, needsSetup, registrationEnabled }: LoginViewProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import React, { PropsWithChildren } from "react";
2
- export declare const SnackbarProvider: React.FC<PropsWithChildren<{}>>;
2
+ export declare const SnackbarProvider: React.FC<PropsWithChildren>;
@@ -4,7 +4,7 @@ import { RebaseData } from "@rebasepro/types";
4
4
  /**
5
5
  * @group Hooks and utilities
6
6
  */
7
- export type SaveEntityWithCallbacksProps<M extends Record<string, any>> = SaveEntityProps<M> & {
7
+ export type SaveEntityWithCallbacksProps<M extends Record<string, unknown>> = SaveEntityProps<M> & {
8
8
  afterSave?: (updatedEntity: Entity<M>) => void;
9
9
  afterSaveError?: (e: Error) => void;
10
10
  };
@@ -27,7 +27,7 @@ export type SaveEntityWithCallbacksProps<M extends Record<string, any>> = SaveEn
27
27
  * @param afterSaveError
28
28
  * @group Hooks and utilities
29
29
  */
30
- export declare function saveEntityWithCallbacks<M extends Record<string, any>>({ collection, path, entityId, values, previousValues, status, data, context, afterSave, afterSaveError }: SaveEntityWithCallbacksProps<M> & {
30
+ export declare function saveEntityWithCallbacks<M extends Record<string, unknown>>({ collection, path, entityId, values, previousValues, status, data, context, afterSave, afterSaveError }: SaveEntityWithCallbacksProps<M> & {
31
31
  collection: EntityCollection;
32
32
  data: RebaseData;
33
33
  context: RebaseContext;
@@ -26,6 +26,11 @@ export interface EntityFetchResult<M extends Record<string, any>> {
26
26
  * @param entities - Array of entities to cache
27
27
  */
28
28
  export declare function populateEntityFetchCache<M extends Record<string, any>>(path: string, entities: Entity<M>[]): void;
29
+ /**
30
+ * Clear the entity fetch cache. Call this on auth state changes (e.g. logout)
31
+ * to prevent stale data from a previous session leaking into the next.
32
+ */
33
+ export declare function clearEntityFetchCache(): void;
29
34
  /**
30
35
  * This hook is used to fetch an entity.
31
36
  * It gives real time updates if the driver supports it.
@@ -35,7 +35,7 @@ import type { ComponentRef } from "@rebasepro/types";
35
35
  * </Suspense>
36
36
  * );
37
37
  * ```
38
- */
38
+ * */
39
39
  export declare function useResolvedComponent<P = unknown>(ref: ComponentRef<P> | undefined): React.ComponentType<P> | undefined;
40
40
  /**
41
41
  * Pure function version of the resolver, for use outside React components.