@marktiderman/genesis-core 1.12.0 → 1.14.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.
Files changed (92) hide show
  1. package/README.md +77 -0
  2. package/dist/chunk-3B4IFDMK.js +117 -0
  3. package/dist/chunk-3B4IFDMK.js.map +1 -0
  4. package/dist/{chunk-S2ZXUNXB.js → chunk-3LZAZ5KB.js} +3 -3
  5. package/dist/{chunk-S2ZXUNXB.js.map → chunk-3LZAZ5KB.js.map} +1 -1
  6. package/dist/chunk-7FVTGKTX.js +8 -0
  7. package/dist/chunk-7FVTGKTX.js.map +1 -0
  8. package/dist/{chunk-NMFABW4Y.js → chunk-7YHGNPPO.js} +5 -5
  9. package/dist/{chunk-NMFABW4Y.js.map → chunk-7YHGNPPO.js.map} +1 -1
  10. package/dist/chunk-AUVKRXRC.js +81 -0
  11. package/dist/chunk-AUVKRXRC.js.map +1 -0
  12. package/dist/{chunk-TOU2CMDH.js → chunk-K7K6NY3C.js} +168 -168
  13. package/dist/chunk-K7K6NY3C.js.map +1 -0
  14. package/dist/chunk-LFWSTJWI.js +108 -0
  15. package/dist/chunk-LFWSTJWI.js.map +1 -0
  16. package/dist/{chunk-RCAP3Q4T.js → chunk-OYIUIW7C.js} +3 -2
  17. package/dist/chunk-OYIUIW7C.js.map +1 -0
  18. package/dist/chunk-OZYF55E3.js +6 -0
  19. package/dist/chunk-OZYF55E3.js.map +1 -0
  20. package/dist/chunk-PA6WJE5E.js +115 -0
  21. package/dist/chunk-PA6WJE5E.js.map +1 -0
  22. package/dist/chunk-PP3XFFQM.js +85 -0
  23. package/dist/chunk-PP3XFFQM.js.map +1 -0
  24. package/dist/{chunk-BGTXN2E6.js → chunk-RF6YVWHX.js} +4 -4
  25. package/dist/{chunk-BGTXN2E6.js.map → chunk-RF6YVWHX.js.map} +1 -1
  26. package/dist/{chunk-NZPJI7FC.js → chunk-UGGMJUFQ.js} +45 -13
  27. package/dist/chunk-UGGMJUFQ.js.map +1 -0
  28. package/dist/{chunk-KXVHDK3Q.js → chunk-UV3ROHQA.js} +27 -5
  29. package/dist/chunk-UV3ROHQA.js.map +1 -0
  30. package/dist/chunk-YDDPFSQ6.js +35 -0
  31. package/dist/chunk-YDDPFSQ6.js.map +1 -0
  32. package/dist/{chunk-OSPLIKSH.js → chunk-YFTGLQDQ.js} +18 -8
  33. package/dist/chunk-YFTGLQDQ.js.map +1 -0
  34. package/dist/chunk-ZIMQUFXD.js +154 -0
  35. package/dist/chunk-ZIMQUFXD.js.map +1 -0
  36. package/dist/csv.d.ts +41 -0
  37. package/dist/csv.js +77 -0
  38. package/dist/csv.js.map +1 -0
  39. package/dist/dates.js +1 -115
  40. package/dist/dates.js.map +1 -1
  41. package/dist/errors.d.ts +69 -0
  42. package/dist/errors.js +7 -0
  43. package/dist/errors.js.map +1 -0
  44. package/dist/hooks/index.d.ts +7 -43
  45. package/dist/hooks/index.js +14 -11
  46. package/dist/hooks/live-cache.d.ts +15 -0
  47. package/dist/hooks/live-cache.js +3 -0
  48. package/dist/hooks/live-cache.js.map +1 -0
  49. package/dist/hooks/mutation-mode.d.ts +2 -2
  50. package/dist/hooks/mutation-mode.js +2 -2
  51. package/dist/hooks/related-keys.d.ts +2 -2
  52. package/dist/hooks/use-capabilities.d.ts +1 -1
  53. package/dist/hooks/use-infinite-resource.d.ts +18 -2
  54. package/dist/hooks/use-infinite-resource.js +4 -3
  55. package/dist/hooks/use-live.d.ts +15 -3
  56. package/dist/hooks/use-live.js +2 -1
  57. package/dist/hooks/use-one.d.ts +2 -2
  58. package/dist/hooks/use-one.js +4 -3
  59. package/dist/hooks/use-resource-form.d.ts +9 -2
  60. package/dist/hooks/use-resource-form.js +6 -5
  61. package/dist/hooks/use-resource.d.ts +2 -2
  62. package/dist/hooks/use-resource.js +5 -4
  63. package/dist/hooks/use-write.d.ts +2 -2
  64. package/dist/index.d.ts +14 -6
  65. package/dist/index.js +21 -14
  66. package/dist/provider/index.d.ts +11 -6
  67. package/dist/provider/index.js +3 -2
  68. package/dist/resource/index.d.ts +39 -0
  69. package/dist/resource/index.js +3 -0
  70. package/dist/resource/index.js.map +1 -0
  71. package/dist/resource-view/index.d.ts +468 -0
  72. package/dist/resource-view/index.js +542 -0
  73. package/dist/resource-view/index.js.map +1 -0
  74. package/dist/schema/index.d.ts +4 -4
  75. package/dist/schema/index.js +1 -0
  76. package/dist/status-BXRokZD9.d.ts +50 -0
  77. package/dist/testing/index.d.ts +3 -3
  78. package/dist/{types-B9DDfvWa.d.ts → types-CXhqXPN1.d.ts} +21 -4
  79. package/dist/{types-C7FJtFXV.d.ts → types-o8j7g6O6.d.ts} +38 -1
  80. package/dist/urls.d.ts +18 -0
  81. package/dist/urls.js +3 -0
  82. package/dist/urls.js.map +1 -0
  83. package/dist/viewer-scope-77MqxvmZ.d.ts +125 -0
  84. package/dist/{write-outcome-B2fE29yZ.d.ts → write-outcome-CFnpciUI.d.ts} +1 -1
  85. package/package.json +21 -1
  86. package/dist/chunk-5ORRAXIV.js +0 -30
  87. package/dist/chunk-5ORRAXIV.js.map +0 -1
  88. package/dist/chunk-KXVHDK3Q.js.map +0 -1
  89. package/dist/chunk-NZPJI7FC.js.map +0 -1
  90. package/dist/chunk-OSPLIKSH.js.map +0 -1
  91. package/dist/chunk-RCAP3Q4T.js.map +0 -1
  92. package/dist/chunk-TOU2CMDH.js.map +0 -1
@@ -0,0 +1,69 @@
1
+ /** Where a reported error came from. */
2
+ interface ErrorReportContext {
3
+ /**
4
+ * Which part caught it, as `package:part` (`chat:attachment-action`,
5
+ * `forms-native:draft-save`). Low-cardinality: never an id or text.
6
+ */
7
+ source: string;
8
+ /** True when the app could not go on. Default false: a package that reports has handled it. */
9
+ fatal?: boolean;
10
+ /** Low-cardinality labels (`query.key: "tasks"`), never ids, emails or text someone typed. */
11
+ tags?: Readonly<Record<string, string>>;
12
+ }
13
+ /** Where `reportError` sends errors. A throw inside it is ignored. */
14
+ type ErrorReporter = (error: unknown, context: ErrorReportContext) => void;
15
+ /** The reporter used when the app registered none: `console.warn` in development, nothing in production. */
16
+ declare const defaultErrorReporter: ErrorReporter;
17
+ /** The reporter `reportError` uses now. */
18
+ declare function getErrorReporter(): ErrorReporter;
19
+ /**
20
+ * Send every `reportError` to `reporter` (`null` puts the default back).
21
+ * Returns a function that restores the reporter that was there before.
22
+ * The native observability block calls it when it is created.
23
+ */
24
+ declare function setErrorReporter(reporter: ErrorReporter | null): () => void;
25
+ /**
26
+ * Report an error a package caught and handled. Never throws: a failing
27
+ * reporter must not take the caller (an event handler, a render) down.
28
+ * `context` may be just the source.
29
+ */
30
+ declare function reportError(error: unknown, context: ErrorReportContext | string): void;
31
+ /**
32
+ * - `offline`: the request never reached the server (no network).
33
+ * - `unauthenticated`: nobody is signed in, or the session ended.
34
+ * - `forbidden`: the server refused this user.
35
+ * - `not-found`: the record doesn't exist, or this user can't see it.
36
+ * - `conflict`: someone else changed it first, or it already exists.
37
+ * - `invalid`: the request or a value in it was rejected.
38
+ * - `unexpected`: anything else (a bug, a server error).
39
+ */
40
+ type ErrorKind = "offline" | "unauthenticated" | "forbidden" | "not-found" | "conflict" | "invalid" | "unexpected";
41
+ /** The sentence shown for each kind. Override any of them with `classifyError(e, { messages })`. */
42
+ type ErrorMessages = Readonly<Record<ErrorKind, string>>;
43
+ /** The English catalogue. Plain words, never the store's text. */
44
+ declare const errorMessages: ErrorMessages;
45
+ interface ClassifiedError {
46
+ kind: ErrorKind;
47
+ /** Safe to show: from the messages catalogue, never the error's own text. */
48
+ message: string;
49
+ /** Worth reporting to a crash tracker: a bug or a server failure, not something the user or the network caused. */
50
+ report: boolean;
51
+ }
52
+ interface ClassifyErrorOptions {
53
+ /** Reworded or translated sentences; what you leave out stays English. */
54
+ messages?: Partial<ErrorMessages>;
55
+ /** True when the device knows it is offline (TanStack's `onlineManager`, NetInfo). */
56
+ isOffline?: () => boolean;
57
+ }
58
+ /**
59
+ * What kind of error this is, a sentence that is safe to show, and whether it
60
+ * is worth reporting. Understands the provider's `DataWriteError` and
61
+ * `DataReadError`, Postgres and PostgREST codes, HTTP statuses, Supabase's
62
+ * auth and fetch errors, and each runtime's "network request failed".
63
+ *
64
+ * Use it for a toast (`toast.error(classifyError(e).message)`) and to decide
65
+ * whether to report (`if (classifyError(e).report) reportError(e, …)`).
66
+ */
67
+ declare function classifyError(error: unknown, options?: ClassifyErrorOptions): ClassifiedError;
68
+
69
+ export { type ClassifiedError, type ClassifyErrorOptions, type ErrorKind, type ErrorMessages, type ErrorReportContext, type ErrorReporter, classifyError, defaultErrorReporter, errorMessages, getErrorReporter, reportError, setErrorReporter };
package/dist/errors.js ADDED
@@ -0,0 +1,7 @@
1
+ export { classifyError, defaultErrorReporter, errorMessages, getErrorReporter, reportError, setErrorReporter } from './chunk-ZIMQUFXD.js';
2
+ import './chunk-PA6WJE5E.js';
3
+ import './chunk-HUNGCTRA.js';
4
+ import './chunk-RYEXWQFD.js';
5
+ import './chunk-LG6TUBVM.js';
6
+ //# sourceMappingURL=errors.js.map
7
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"errors.js"}
@@ -5,52 +5,16 @@ export { useCapabilities } from './use-capabilities.js';
5
5
  export { UseWriteOptions, UseWriteReturn, WRITE_FAILED, useWrite } from './use-write.js';
6
6
  export { UseDraftReturn, useDraft } from './use-draft.js';
7
7
  export { DEFAULT_DRAFT_DELAY_MS, DRAFT_NOT_SAVED, DraftAdoption, DraftController, DraftOptions, DraftSeed, DraftState, DraftStatus, DraftValue, isNetworkFailure, stableJson } from './draft-controller.js';
8
- import * as react from 'react';
9
- import { ReactNode } from 'react';
10
- import { QueryClient } from '@tanstack/react-query';
11
- export { DEFAULT_LIVE_DEBOUNCE_MS, LiveOptions } from './use-live.js';
8
+ export { G as GenesisViewerRoles, N as NO_VIEWER, R as ResourceScope, V as Viewer, a as ViewerContext, b as ViewerScope, c as ViewerScopeProps, d as clearViewerCache, u as useOptionalViewerScope, e as useViewer, f as useViewerScope } from '../viewer-scope-77MqxvmZ.js';
9
+ export { DEFAULT_LIVE_DEBOUNCE_MS, DEFAULT_LIVE_RESYNC_MS, LiveOptions } from './use-live.js';
12
10
  export { UseResourceFormOptions, UseResourceFormReturn, buildArrayItemDefaults, useResourceForm } from './use-resource-form.js';
13
11
  export { UseWizardReturn, WizardStep, useWizard } from './use-wizard.js';
14
12
  export { DEFAULT_UNDO_DELAY_MS, MutationMode, MutationModeOptions, UndoableWrite, dropPendingWrites, flushPendingWrites, pendingWriteCount } from './mutation-mode.js';
15
13
  export { DEFAULT_UNSAVED_CHANGES_MESSAGE, UseUnsavedChangesGuardOptions, UseUnsavedChangesGuardReturn, useUnsavedChangesGuard } from './use-unsaved-changes-guard.js';
16
- import '../types-B9DDfvWa.js';
17
- import '../types-C7FJtFXV.js';
14
+ import '@tanstack/react-query';
15
+ import '../types-CXhqXPN1.js';
16
+ import '../types-o8j7g6O6.js';
18
17
  import '../form-types.js';
18
+ import 'react';
19
+ import '../dates.js';
19
20
  import 'react-hook-form';
20
-
21
- /**
22
- * Empties the query cache for a new viewer: sends the old viewer's waiting
23
- * undoable writes (the session is still theirs), cancels reads in flight,
24
- * then removes every query. Call it in the sign-in and sign-out actions,
25
- * before the session changes.
26
- */
27
- declare function clearViewerCache(queryClient: QueryClient): Promise<void>;
28
- interface ViewerScopeProps {
29
- /** The signed-in viewer's id, null when signed out, undefined while the session loads. */
30
- viewer: string | null | undefined;
31
- /**
32
- * The viewer a persisted cache was saved for. When the first known viewer
33
- * is this one, the restored cache is kept; otherwise it's emptied.
34
- */
35
- persistedViewer?: string | null;
36
- /** Shown while the session loads (and for the one render a change takes). */
37
- fallback?: ReactNode;
38
- children: ReactNode;
39
- }
40
- /**
41
- * Keeps one viewer's cached data from ever showing to the next. Children
42
- * render only once the viewer is known, under a key of that viewer, so a
43
- * sign-out or a new person signing in unmounts every screen and its queries
44
- * before the cache is emptied and the new viewer's screens mount fresh. The
45
- * first known viewer empties a restored cache too, unless it's the
46
- * `persistedViewer` it was saved for.
47
- *
48
- * ```tsx
49
- * <ViewerScope viewer={session === undefined ? undefined : (session?.user.id ?? null)}>
50
- * <App />
51
- * </ViewerScope>
52
- * ```
53
- */
54
- declare function ViewerScope({ viewer, persistedViewer, fallback, children }: ViewerScopeProps): react.JSX.Element;
55
-
56
- export { ViewerScope, type ViewerScopeProps, clearViewerCache };
@@ -1,21 +1,24 @@
1
- export { ViewerScope, clearViewerCache } from '../chunk-5ORRAXIV.js';
2
- export { useResource } from '../chunk-NMFABW4Y.js';
1
+ export { ViewerScope, clearViewerCache, useOptionalViewerScope, useViewer, useViewerScope } from '../chunk-LFWSTJWI.js';
2
+ export { NO_VIEWER } from '../chunk-OZYF55E3.js';
3
+ export { useInfiniteResource } from '../chunk-UGGMJUFQ.js';
4
+ export { buildArrayItemDefaults, useResourceForm } from '../chunk-YFTGLQDQ.js';
5
+ export { useOne } from '../chunk-RF6YVWHX.js';
6
+ export { useResource } from '../chunk-7YHGNPPO.js';
7
+ export { DEFAULT_LIVE_DEBOUNCE_MS, DEFAULT_LIVE_RESYNC_MS } from '../chunk-UV3ROHQA.js';
8
+ export { DEFAULT_UNSAVED_CHANGES_MESSAGE, useUnsavedChangesGuard } from '../chunk-XQO4OH2N.js';
3
9
  export { useWizard } from '../chunk-7KOLYF27.js';
4
10
  export { WRITE_FAILED, useWrite } from '../chunk-52T2EYXH.js';
5
- export { useDraft } from '../chunk-DF2UWEEB.js';
6
- export { useInfiniteResource } from '../chunk-NZPJI7FC.js';
7
- export { buildArrayItemDefaults, useResourceForm } from '../chunk-OSPLIKSH.js';
8
- export { DEFAULT_UNSAVED_CHANGES_MESSAGE, useUnsavedChangesGuard } from '../chunk-XQO4OH2N.js';
9
- export { DEFAULT_UNDO_DELAY_MS, dropPendingWrites, flushPendingWrites, pendingWriteCount } from '../chunk-S2ZXUNXB.js';
11
+ import '../chunk-AUVKRXRC.js';
12
+ export { DEFAULT_UNDO_DELAY_MS, dropPendingWrites, flushPendingWrites, pendingWriteCount } from '../chunk-3LZAZ5KB.js';
13
+ import '../chunk-OYIUIW7C.js';
10
14
  import '../chunk-7NUL32W7.js';
11
15
  export { useCapabilities } from '../chunk-BQOJX67X.js';
12
- export { useOne } from '../chunk-BGTXN2E6.js';
13
- import '../chunk-RCAP3Q4T.js';
14
- export { DEFAULT_LIVE_DEBOUNCE_MS } from '../chunk-KXVHDK3Q.js';
15
16
  import '../chunk-GGSXSI6Z.js';
16
17
  import '../chunk-ZYJUEJ4Z.js';
17
- import '../chunk-RYEXWQFD.js';
18
+ export { useDraft } from '../chunk-DF2UWEEB.js';
18
19
  export { DEFAULT_DRAFT_DELAY_MS, DRAFT_NOT_SAVED, DraftController, isNetworkFailure, stableJson } from '../chunk-HBAPYA5K.js';
20
+ import '../chunk-3B4IFDMK.js';
21
+ import '../chunk-RYEXWQFD.js';
19
22
  import '../chunk-LG6TUBVM.js';
20
23
  //# sourceMappingURL=index.js.map
21
24
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,15 @@
1
+ import { Query, QueryClient } from '@tanstack/react-query';
2
+
3
+ type Row = Record<string, unknown>;
4
+ /**
5
+ * Patches a changed row into every cached read of `resource`: records read whole (no `select`),
6
+ * and the rows of lists and infinite lists. Fields a cached row lacks are left out.
7
+ */
8
+ declare function patchCachedRow(queryClient: QueryClient, resource: string, record: Row): void;
9
+ /**
10
+ * Whether a cached list could be changed by these rows: one of them matches its filters, or is in
11
+ * it now (it may have left). Any read that isn't a list could always change.
12
+ */
13
+ declare function listCouldChange(query: Query, records: readonly Row[]): boolean;
14
+
15
+ export { listCouldChange, patchCachedRow };
@@ -0,0 +1,3 @@
1
+ export { listCouldChange, patchCachedRow } from '../chunk-AUVKRXRC.js';
2
+ //# sourceMappingURL=live-cache.js.map
3
+ //# sourceMappingURL=live-cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"live-cache.js"}
@@ -1,6 +1,6 @@
1
1
  import { QueryClient } from '@tanstack/react-query';
2
- import { a as Identifier, B as BaseRecord, D as DataProvider } from '../types-B9DDfvWa.js';
3
- import { A as AuditEntry } from '../types-C7FJtFXV.js';
2
+ import { a as Identifier, B as BaseRecord, D as DataProvider } from '../types-CXhqXPN1.js';
3
+ import { A as AuditEntry } from '../types-o8j7g6O6.js';
4
4
  import '../form-types.js';
5
5
 
6
6
  type MutationMode = "pessimistic" | "optimistic" | "undoable";
@@ -1,6 +1,6 @@
1
- export { DEFAULT_UNDO_DELAY_MS, DROPPED_WRITE_MESSAGE, cachedRecord, dropPendingWrites, executeWrite, flushPendingWrites, invalidateResource, pendingWriteCount, providerServesUndo, sameValue } from '../chunk-S2ZXUNXB.js';
1
+ export { DEFAULT_UNDO_DELAY_MS, DROPPED_WRITE_MESSAGE, cachedRecord, dropPendingWrites, executeWrite, flushPendingWrites, invalidateResource, pendingWriteCount, providerServesUndo, sameValue } from '../chunk-3LZAZ5KB.js';
2
+ import '../chunk-OYIUIW7C.js';
2
3
  import '../chunk-BQOJX67X.js';
3
- import '../chunk-RCAP3Q4T.js';
4
4
  import '../chunk-GGSXSI6Z.js';
5
5
  import '../chunk-ZYJUEJ4Z.js';
6
6
  //# sourceMappingURL=mutation-mode.js.map
@@ -1,5 +1,5 @@
1
- import { D as DataProvider, W as WriteEvent, I as InvalidationKey } from '../types-B9DDfvWa.js';
2
- import '../types-C7FJtFXV.js';
1
+ import { D as DataProvider, W as WriteEvent, I as InvalidationKey } from '../types-CXhqXPN1.js';
2
+ import '../types-o8j7g6O6.js';
3
3
  import '../form-types.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { UseQueryResult } from '@tanstack/react-query';
2
- import { P as ProviderCapabilities } from '../types-C7FJtFXV.js';
2
+ import { P as ProviderCapabilities } from '../types-o8j7g6O6.js';
3
3
  import '../form-types.js';
4
4
 
5
5
  /**
@@ -1,7 +1,7 @@
1
1
  import { UseInfiniteQueryResult, InfiniteData } from '@tanstack/react-query';
2
- import { n as SortParam, F as FilterParam, k as ListResult, L as ListParams, B as BaseRecord } from '../types-B9DDfvWa.js';
2
+ import { S as SortParam, F as FilterParam, l as ListResult, L as ListParams, B as BaseRecord } from '../types-CXhqXPN1.js';
3
3
  import { LiveOptions } from './use-live.js';
4
- import '../types-C7FJtFXV.js';
4
+ import '../types-o8j7g6O6.js';
5
5
  import '../form-types.js';
6
6
 
7
7
  interface UseInfiniteResourceOptions {
@@ -20,6 +20,17 @@ interface UseInfiniteResourceOptions {
20
20
  enabled?: boolean;
21
21
  /** Refetch the loaded pages when the provider reports a change. See `UseResourceOptions.live`. */
22
22
  live?: boolean | LiveOptions;
23
+ /**
24
+ * Keep at most this many pages loaded (TanStack Query's `maxPages`): scrolling far drops pages
25
+ * from the front, and scrolling back loads them again, so a long feed and a live refetch stay
26
+ * cheap. Needs a provider that pages by cursor both ways (`prevCursor`); offset paging ignores it.
27
+ */
28
+ maxPages?: number;
29
+ /**
30
+ * Keep the current rows on screen while a new search, sort or filter loads, instead of a
31
+ * loading state for each change. Default false.
32
+ */
33
+ keepPreviousData?: boolean;
23
34
  }
24
35
  /** Where one page starts: its offset page, and its cursor (`null` for the first). */
25
36
  interface InfinitePageParam {
@@ -33,9 +44,14 @@ interface UseInfiniteResourceReturn<T> {
33
44
  rows: T[];
34
45
  /** Rows matching the filters and search, from the first page's count. */
35
46
  total: number | undefined;
47
+ /** True when `total` is the database's estimate, so a screen says "about". */
48
+ totalIsEstimate: boolean;
36
49
  /** Loads the next page. Does nothing while one is loading or none is left. */
37
50
  fetchNextPage: () => void;
38
51
  hasNextPage: boolean;
52
+ /** Load the page before the first loaded one (after `maxPages` dropped it). No-op when there is none. */
53
+ fetchPreviousPage: () => void;
54
+ hasPreviousPage: boolean;
39
55
  isFetchingNextPage: boolean;
40
56
  /** The params every page is asked with (without its page and cursor). */
41
57
  params: Omit<ListParams, "pagination"> & {
@@ -1,6 +1,7 @@
1
- export { useInfiniteResource } from '../chunk-NZPJI7FC.js';
2
- import '../chunk-RCAP3Q4T.js';
3
- import '../chunk-KXVHDK3Q.js';
1
+ export { useInfiniteResource } from '../chunk-UGGMJUFQ.js';
2
+ import '../chunk-UV3ROHQA.js';
3
+ import '../chunk-AUVKRXRC.js';
4
+ import '../chunk-OYIUIW7C.js';
4
5
  import '../chunk-GGSXSI6Z.js';
5
6
  import '../chunk-ZYJUEJ4Z.js';
6
7
  //# sourceMappingURL=use-infinite-resource.js.map
@@ -1,10 +1,16 @@
1
1
  import { QueryKey } from '@tanstack/react-query';
2
- import { o as SubscribeParams, l as ResourceChangeEvent } from '../types-B9DDfvWa.js';
3
- import '../types-C7FJtFXV.js';
2
+ import { p as SubscribeParams, m as ResourceChangeEvent } from '../types-CXhqXPN1.js';
3
+ import '../types-o8j7g6O6.js';
4
4
  import '../form-types.js';
5
5
 
6
6
  /** How long a burst of change events is gathered into one refetch. */
7
7
  declare const DEFAULT_LIVE_DEBOUNCE_MS = 250;
8
+ /**
9
+ * How often a live read refetches anyway while the page is visible. Realtime checks each change
10
+ * against the row's new state, so a row the viewer stops being allowed to see (binned, made a
11
+ * draft, moved to another practice) sends them nothing and would stay on screen.
12
+ */
13
+ declare const DEFAULT_LIVE_RESYNC_MS = 60000;
8
14
  /** `live` as an object, to tune it. `live: true` takes the defaults. */
9
15
  interface LiveOptions {
10
16
  /**
@@ -13,6 +19,12 @@ interface LiveOptions {
13
19
  * steady stream still refetches at least every `4 × debounceMs`.
14
20
  */
15
21
  debounceMs?: number;
22
+ /**
23
+ * Refetch at least this often while the page is visible, for the changes realtime can't
24
+ * deliver (a row the viewer may no longer read). Default {@link DEFAULT_LIVE_RESYNC_MS}; 0 turns
25
+ * it off.
26
+ */
27
+ resyncMs?: number;
16
28
  }
17
29
  /**
18
30
  * Subscribes while mounted and `enabled`, and invalidates `queryKey` (a
@@ -24,4 +36,4 @@ interface LiveOptions {
24
36
  */
25
37
  declare function useLiveInvalidation(resource: string, live: boolean | LiveOptions | undefined, enabled: boolean, params: SubscribeParams, queryKey: QueryKey, accept?: (event: ResourceChangeEvent) => boolean): void;
26
38
 
27
- export { DEFAULT_LIVE_DEBOUNCE_MS, type LiveOptions, useLiveInvalidation };
39
+ export { DEFAULT_LIVE_DEBOUNCE_MS, DEFAULT_LIVE_RESYNC_MS, type LiveOptions, useLiveInvalidation };
@@ -1,4 +1,5 @@
1
- export { DEFAULT_LIVE_DEBOUNCE_MS, useLiveInvalidation } from '../chunk-KXVHDK3Q.js';
1
+ export { DEFAULT_LIVE_DEBOUNCE_MS, DEFAULT_LIVE_RESYNC_MS, useLiveInvalidation } from '../chunk-UV3ROHQA.js';
2
+ import '../chunk-AUVKRXRC.js';
2
3
  import '../chunk-GGSXSI6Z.js';
3
4
  import '../chunk-ZYJUEJ4Z.js';
4
5
  //# sourceMappingURL=use-live.js.map
@@ -1,7 +1,7 @@
1
1
  import { UseQueryResult } from '@tanstack/react-query';
2
- import { B as BaseRecord, a as Identifier } from '../types-B9DDfvWa.js';
2
+ import { B as BaseRecord, a as Identifier } from '../types-CXhqXPN1.js';
3
3
  import { LiveOptions } from './use-live.js';
4
- import '../types-C7FJtFXV.js';
4
+ import '../types-o8j7g6O6.js';
5
5
  import '../form-types.js';
6
6
 
7
7
  interface UseOneOptions {
@@ -1,6 +1,7 @@
1
- export { useOne } from '../chunk-BGTXN2E6.js';
2
- import '../chunk-RCAP3Q4T.js';
3
- import '../chunk-KXVHDK3Q.js';
1
+ export { useOne } from '../chunk-RF6YVWHX.js';
2
+ import '../chunk-UV3ROHQA.js';
3
+ import '../chunk-AUVKRXRC.js';
4
+ import '../chunk-OYIUIW7C.js';
4
5
  import '../chunk-GGSXSI6Z.js';
5
6
  import '../chunk-ZYJUEJ4Z.js';
6
7
  //# sourceMappingURL=use-one.js.map
@@ -1,8 +1,8 @@
1
1
  import { UseFormReturn } from 'react-hook-form';
2
2
  import { ResourceFormFieldDef } from '../form-types.js';
3
- import { I as InvalidationKey } from '../types-B9DDfvWa.js';
3
+ import { I as InvalidationKey } from '../types-CXhqXPN1.js';
4
4
  import { MutationModeOptions } from './mutation-mode.js';
5
- import '../types-C7FJtFXV.js';
5
+ import '../types-o8j7g6O6.js';
6
6
  import '@tanstack/react-query';
7
7
 
8
8
  interface UseResourceFormOptions extends MutationModeOptions {
@@ -67,6 +67,13 @@ interface UseResourceFormOptions extends MutationModeOptions {
67
67
  * the provider's own `invalidates`.
68
68
  */
69
69
  invalidates?: InvalidationKey[];
70
+ /**
71
+ * What an edit sends. `"loaded"` (default): every field of the record the form opened with,
72
+ * plus any field the person changed, but never a field the record didn't carry and nobody
73
+ * touched. So a list that didn't load a column (or a value the server left out) can't be
74
+ * overwritten with an empty one. `"all"`: every form field, as before.
75
+ */
76
+ updates?: "loaded" | "all";
70
77
  }
71
78
  interface UseResourceFormReturn {
72
79
  form: UseFormReturn<Record<string, unknown>>;
@@ -1,11 +1,12 @@
1
- export { buildArrayItemDefaults, useResourceForm } from '../chunk-OSPLIKSH.js';
1
+ export { buildArrayItemDefaults, useResourceForm } from '../chunk-YFTGLQDQ.js';
2
+ import '../chunk-RF6YVWHX.js';
3
+ import '../chunk-UV3ROHQA.js';
2
4
  import '../chunk-XQO4OH2N.js';
3
- import '../chunk-S2ZXUNXB.js';
5
+ import '../chunk-AUVKRXRC.js';
6
+ import '../chunk-3LZAZ5KB.js';
7
+ import '../chunk-OYIUIW7C.js';
4
8
  import '../chunk-7NUL32W7.js';
5
9
  import '../chunk-BQOJX67X.js';
6
- import '../chunk-BGTXN2E6.js';
7
- import '../chunk-RCAP3Q4T.js';
8
- import '../chunk-KXVHDK3Q.js';
9
10
  import '../chunk-GGSXSI6Z.js';
10
11
  import '../chunk-ZYJUEJ4Z.js';
11
12
  import '../chunk-RYEXWQFD.js';
@@ -1,8 +1,8 @@
1
1
  import { UseQueryResult, UseMutationResult } from '@tanstack/react-query';
2
- import { n as SortParam, F as FilterParam, I as InvalidationKey, k as ListResult, L as ListParams, a as Identifier, B as BaseRecord } from '../types-B9DDfvWa.js';
2
+ import { S as SortParam, F as FilterParam, I as InvalidationKey, l as ListResult, L as ListParams, a as Identifier, B as BaseRecord } from '../types-CXhqXPN1.js';
3
3
  import { MutationModeOptions } from './mutation-mode.js';
4
4
  import { LiveOptions } from './use-live.js';
5
- import '../types-C7FJtFXV.js';
5
+ import '../types-o8j7g6O6.js';
6
6
  import '../form-types.js';
7
7
 
8
8
  interface UseResourceOptions<T> extends MutationModeOptions {
@@ -1,9 +1,10 @@
1
- export { useResource } from '../chunk-NMFABW4Y.js';
2
- import '../chunk-S2ZXUNXB.js';
1
+ export { useResource } from '../chunk-7YHGNPPO.js';
2
+ import '../chunk-UV3ROHQA.js';
3
+ import '../chunk-AUVKRXRC.js';
4
+ import '../chunk-3LZAZ5KB.js';
5
+ import '../chunk-OYIUIW7C.js';
3
6
  import '../chunk-7NUL32W7.js';
4
7
  import '../chunk-BQOJX67X.js';
5
- import '../chunk-RCAP3Q4T.js';
6
- import '../chunk-KXVHDK3Q.js';
7
8
  import '../chunk-GGSXSI6Z.js';
8
9
  import '../chunk-ZYJUEJ4Z.js';
9
10
  //# sourceMappingURL=use-resource.js.map
@@ -1,6 +1,6 @@
1
1
  import { QueryClient, MutationOptions } from '@tanstack/react-query';
2
- import { I as InvalidationKey } from '../types-B9DDfvWa.js';
3
- import '../types-C7FJtFXV.js';
2
+ import { I as InvalidationKey } from '../types-CXhqXPN1.js';
3
+ import '../types-o8j7g6O6.js';
4
4
  import '../form-types.js';
5
5
 
6
6
  declare const WRITE_FAILED = "That didn't work. Try again.";
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { L as ListParams, a as Identifier } from './types-B9DDfvWa.js';
2
- export { A as ArrayFilter, B as BaseRecord, b as BulkChange, c as BulkResult, C as CreateParams, d as CreateResult, D as DataProvider, e as DeleteParams, f as DeleteResult, F as FilterParam, G as GetManyParams, g as GetManyResult, h as GetOneParams, i as GetOneResult, H as HistoryParams, j as ImportParams, I as InvalidationKey, k as ListResult, N as NullFilter, P as PaginationParam, R as RangeFilter, l as ResourceChangeEvent, m as RowFailure, S as ScalarFilter, n as SortParam, o as SubscribeParams, U as UpdateParams, p as UpdateResult, W as WriteEvent } from './types-B9DDfvWa.js';
3
- export { D as DataWriteError, a as DataWriteErrorOptions, W as WriteOutcome, i as isDataWriteError } from './write-outcome-B2fE29yZ.js';
1
+ import { L as ListParams, a as Identifier } from './types-CXhqXPN1.js';
2
+ export { A as ArrayFilter, B as BaseRecord, b as BulkChange, c as BulkResult, C as CountMode, d as CreateParams, e as CreateResult, D as DataProvider, f as DeleteParams, g as DeleteResult, F as FilterParam, G as GetManyParams, h as GetManyResult, i as GetOneParams, j as GetOneResult, H as HistoryParams, k as ImportParams, I as InvalidationKey, l as ListResult, N as NullFilter, P as PaginationParam, R as RangeFilter, m as ResourceChangeEvent, n as RowFailure, o as ScalarFilter, S as SortParam, p as SubscribeParams, U as UpdateParams, q as UpdateResult, W as WriteEvent } from './types-CXhqXPN1.js';
3
+ export { D as DataWriteError, a as DataWriteErrorOptions, W as WriteOutcome, i as isDataWriteError } from './write-outcome-CFnpciUI.js';
4
4
  export { CallRpcOptions, CreateOrAdoptOptions, CreateOrAdoptResult, DEFAULT_RPC_MESSAGES, DataProviderRoot, DataProviderRootProps, GenesisProvider, GenesisProviderProps, MockProviderOptions, PostgrestFieldErrors, RPC_FAILED, RpcClient, SupabaseClient, SupabaseClientInput, SupabaseProviderOptions, SupabaseRealtimeChannel, SupabaseRealtimePayload, SupabaseResourceConfig, SupabaseWriteContext, callRpc, createMockProvider, createOrAdopt, createSupabaseProvider, fieldErrorsFromPostgrest, readOutcomeFromCode, toDataWriteError, useDataProvider, useStorage, writeOutcomeFromCode } from './provider/index.js';
5
5
  export { D as DataReadError, a as DataReadErrorOptions, R as ReadOutcome, i as isDataReadError, r as readFailureMessage } from './read-outcome-BnboMYOV.js';
6
6
  export { S as StorageAdapter } from './types-DKcxHXxq.js';
@@ -12,18 +12,21 @@ export { useCapabilities } from './hooks/use-capabilities.js';
12
12
  export { UseWriteOptions, UseWriteReturn, WRITE_FAILED, useWrite } from './hooks/use-write.js';
13
13
  export { UseDraftReturn, useDraft } from './hooks/use-draft.js';
14
14
  export { DEFAULT_DRAFT_DELAY_MS, DRAFT_NOT_SAVED, DraftAdoption, DraftController, DraftOptions, DraftSeed, DraftState, DraftStatus, DraftValue, isNetworkFailure, stableJson } from './hooks/draft-controller.js';
15
- export { ViewerScope, ViewerScopeProps, clearViewerCache } from './hooks/index.js';
16
- export { DEFAULT_LIVE_DEBOUNCE_MS, LiveOptions } from './hooks/use-live.js';
15
+ export { G as GenesisViewerRoles, N as NO_VIEWER, R as ResourceScope, V as Viewer, a as ViewerContext, b as ViewerScope, c as ViewerScopeProps, d as clearViewerCache, u as useOptionalViewerScope, e as useViewer, f as useViewerScope } from './viewer-scope-77MqxvmZ.js';
16
+ export { DEFAULT_LIVE_DEBOUNCE_MS, DEFAULT_LIVE_RESYNC_MS, LiveOptions } from './hooks/use-live.js';
17
17
  export { UseResourceFormOptions, UseResourceFormReturn, buildArrayItemDefaults, useResourceForm } from './hooks/use-resource-form.js';
18
18
  export { UseWizardReturn, WizardStep, useWizard } from './hooks/use-wizard.js';
19
19
  export { DEFAULT_UNDO_DELAY_MS, MutationMode, MutationModeOptions, UndoableWrite, dropPendingWrites, flushPendingWrites, pendingWriteCount } from './hooks/mutation-mode.js';
20
20
  export { DEFAULT_UNSAVED_CHANGES_MESSAGE, UseUnsavedChangesGuardOptions, UseUnsavedChangesGuardReturn, useUnsavedChangesGuard } from './hooks/use-unsaved-changes-guard.js';
21
21
  export { FieldType, ResourceFormFieldDef, SelectOption, FieldType as WidgetHint } from './form-types.js';
22
- export { A as AuditEntry, D as DataRow, F as FieldPermissions, a as FieldReference, b as FieldSchema, c as FilterOperator, P as ProviderCapabilities, R as RecordComment, d as ResourceAccess, e as ResourceContract, f as ResourceRelation, g as ResourceSchema, h as ResourceSummary, i as RowAction, S as StorageType, V as VersionField } from './types-C7FJtFXV.js';
22
+ export { A as AuditEntry, D as DataRow, a as FieldPermissions, b as FieldReference, F as FieldSchema, c as FilterOperator, P as ProviderCapabilities, R as RecordComment, d as ResourceAccess, e as ResourceContract, f as ResourceRelation, g as ResourceSchema, h as ResourceSummary, i as RowAction, j as RowOf, S as StorageType, V as VersionField, k as defineResource } from './types-o8j7g6O6.js';
23
23
  export { decodeRecordKey, encodeRecordKey, keyFields } from './schema/index.js';
24
24
  import { Query } from '@tanstack/react-query';
25
+ export { isSafeUrl, normalizeLinkUrl } from './urls.js';
26
+ export { ClassifiedError, ClassifyErrorOptions, ErrorKind, ErrorMessages, ErrorReportContext, ErrorReporter, classifyError, defaultErrorReporter, errorMessages, getErrorReporter, reportError, setErrorReporter } from './errors.js';
25
27
  export { titleCase } from './utils.js';
26
28
  import 'react';
29
+ import './dates.js';
27
30
  import 'react-hook-form';
28
31
 
29
32
  /** Who and when a key is for. `viewer` is required; null means signed out. */
@@ -33,6 +36,11 @@ interface KeyScope {
33
36
  group?: string | null;
34
37
  /** The person-day (YYYY-MM-DD) a "today" read is for. */
35
38
  day?: string | null;
39
+ /**
40
+ * Where the viewer is working (ViewerScope's `scope`: practice, person, space…). Part of every
41
+ * key, so the same query for two practices never shares a cache entry.
42
+ */
43
+ scope?: Readonly<Record<string, unknown>>;
36
44
  }
37
45
  type Fields = Record<string, unknown>;
38
46
  type QueryDefs = Record<string, (...args: never[]) => Fields>;
package/dist/index.js CHANGED
@@ -1,26 +1,33 @@
1
- export { DEFAULT_RPC_MESSAGES, RPC_FAILED, callRpc, createOrAdopt, createSupabaseProvider, fieldErrorsFromPostgrest, readOutcomeFromCode, toDataWriteError, writeOutcomeFromCode } from './chunk-TOU2CMDH.js';
1
+ export { DEFAULT_RPC_MESSAGES, RPC_FAILED, callRpc, createOrAdopt, createSupabaseProvider } from './chunk-K7K6NY3C.js';
2
+ export { defineResource } from './chunk-7FVTGKTX.js';
2
3
  export { decodeRecordKey, encodeRecordKey, keyFields } from './chunk-KV2HW4G4.js';
3
4
  import './chunk-XCX2TRBL.js';
4
- export { DataReadError, isDataReadError, readFailureMessage } from './chunk-HUNGCTRA.js';
5
- import './chunk-65SXNHWE.js';
6
- export { ViewerScope, clearViewerCache } from './chunk-5ORRAXIV.js';
7
- export { useResource } from './chunk-NMFABW4Y.js';
5
+ export { ViewerScope, clearViewerCache, useOptionalViewerScope, useViewer, useViewerScope } from './chunk-LFWSTJWI.js';
6
+ export { NO_VIEWER } from './chunk-OZYF55E3.js';
7
+ export { useInfiniteResource } from './chunk-UGGMJUFQ.js';
8
+ export { buildArrayItemDefaults, useResourceForm } from './chunk-YFTGLQDQ.js';
9
+ export { useOne } from './chunk-RF6YVWHX.js';
10
+ export { useResource } from './chunk-7YHGNPPO.js';
11
+ export { DEFAULT_LIVE_DEBOUNCE_MS, DEFAULT_LIVE_RESYNC_MS } from './chunk-UV3ROHQA.js';
12
+ export { DEFAULT_UNSAVED_CHANGES_MESSAGE, useUnsavedChangesGuard } from './chunk-XQO4OH2N.js';
8
13
  export { useWizard } from './chunk-7KOLYF27.js';
9
14
  export { WRITE_FAILED, useWrite } from './chunk-52T2EYXH.js';
10
- export { useDraft } from './chunk-DF2UWEEB.js';
11
- export { useInfiniteResource } from './chunk-NZPJI7FC.js';
12
- export { buildArrayItemDefaults, useResourceForm } from './chunk-OSPLIKSH.js';
13
- export { DEFAULT_UNSAVED_CHANGES_MESSAGE, useUnsavedChangesGuard } from './chunk-XQO4OH2N.js';
14
- export { DEFAULT_UNDO_DELAY_MS, dropPendingWrites, flushPendingWrites, pendingWriteCount } from './chunk-S2ZXUNXB.js';
15
+ import './chunk-AUVKRXRC.js';
16
+ export { DEFAULT_UNDO_DELAY_MS, dropPendingWrites, flushPendingWrites, pendingWriteCount } from './chunk-3LZAZ5KB.js';
17
+ export { defineQueryKeys, resourceKeys } from './chunk-OYIUIW7C.js';
15
18
  import './chunk-7NUL32W7.js';
16
19
  export { useCapabilities } from './chunk-BQOJX67X.js';
17
- export { useOne } from './chunk-BGTXN2E6.js';
18
- export { defineQueryKeys, resourceKeys } from './chunk-RCAP3Q4T.js';
19
- export { DEFAULT_LIVE_DEBOUNCE_MS } from './chunk-KXVHDK3Q.js';
20
20
  export { DataProviderRoot, GenesisProvider, createMockProvider, useDataProvider, useStorage } from './chunk-GGSXSI6Z.js';
21
21
  export { createLocalStorageAdapter, createMemoryStorageAdapter, createNoopStorageAdapter } from './chunk-ZYJUEJ4Z.js';
22
- export { titleCase } from './chunk-RYEXWQFD.js';
22
+ export { useDraft } from './chunk-DF2UWEEB.js';
23
23
  export { DEFAULT_DRAFT_DELAY_MS, DRAFT_NOT_SAVED, DraftController, isNetworkFailure, stableJson } from './chunk-HBAPYA5K.js';
24
+ import './chunk-3B4IFDMK.js';
25
+ export { classifyError, defaultErrorReporter, errorMessages, getErrorReporter, reportError, setErrorReporter } from './chunk-ZIMQUFXD.js';
26
+ export { fieldErrorsFromPostgrest, readOutcomeFromCode, toDataWriteError, writeOutcomeFromCode } from './chunk-PA6WJE5E.js';
27
+ export { DataReadError, isDataReadError, readFailureMessage } from './chunk-HUNGCTRA.js';
28
+ export { titleCase } from './chunk-RYEXWQFD.js';
24
29
  export { DataWriteError, isDataWriteError } from './chunk-LG6TUBVM.js';
30
+ import './chunk-65SXNHWE.js';
31
+ export { isSafeUrl, normalizeLinkUrl } from './chunk-YDDPFSQ6.js';
25
32
  //# sourceMappingURL=index.js.map
26
33
  //# sourceMappingURL=index.js.map
@@ -1,14 +1,14 @@
1
- import { D as DataProvider, a as Identifier, B as BaseRecord, I as InvalidationKey, W as WriteEvent, F as FilterParam } from '../types-B9DDfvWa.js';
2
- export { A as ArrayFilter, b as BulkChange, c as BulkResult, C as CreateParams, d as CreateResult, e as DeleteParams, f as DeleteResult, G as GetManyParams, g as GetManyResult, h as GetOneParams, i as GetOneResult, H as HistoryParams, j as ImportParams, L as ListParams, k as ListResult, N as NullFilter, P as PaginationParam, R as RangeFilter, l as ResourceChangeEvent, m as RowFailure, S as ScalarFilter, n as SortParam, o as SubscribeParams, U as UpdateParams, p as UpdateResult } from '../types-B9DDfvWa.js';
3
- import { D as DataWriteError, W as WriteOutcome } from '../write-outcome-B2fE29yZ.js';
4
- export { a as DataWriteErrorOptions, i as isDataWriteError } from '../write-outcome-B2fE29yZ.js';
1
+ import { D as DataProvider, a as Identifier, B as BaseRecord, I as InvalidationKey, W as WriteEvent, C as CountMode, F as FilterParam } from '../types-CXhqXPN1.js';
2
+ export { A as ArrayFilter, b as BulkChange, c as BulkResult, d as CreateParams, e as CreateResult, f as DeleteParams, g as DeleteResult, G as GetManyParams, h as GetManyResult, i as GetOneParams, j as GetOneResult, H as HistoryParams, k as ImportParams, L as ListParams, l as ListResult, N as NullFilter, P as PaginationParam, R as RangeFilter, m as ResourceChangeEvent, n as RowFailure, o as ScalarFilter, S as SortParam, p as SubscribeParams, U as UpdateParams, q as UpdateResult } from '../types-CXhqXPN1.js';
3
+ import { D as DataWriteError, W as WriteOutcome } from '../write-outcome-CFnpciUI.js';
4
+ export { a as DataWriteErrorOptions, i as isDataWriteError } from '../write-outcome-CFnpciUI.js';
5
5
  import { D as DataReadError, R as ReadOutcome } from '../read-outcome-BnboMYOV.js';
6
6
  export { a as DataReadErrorOptions, i as isDataReadError, r as readFailureMessage } from '../read-outcome-BnboMYOV.js';
7
7
  import * as react from 'react';
8
8
  import { ReactNode } from 'react';
9
9
  import { QueryClient } from '@tanstack/react-query';
10
10
  import { S as StorageAdapter } from '../types-DKcxHXxq.js';
11
- import '../types-C7FJtFXV.js';
11
+ import '../types-o8j7g6O6.js';
12
12
  import '../form-types.js';
13
13
 
14
14
  interface MockProviderOptions {
@@ -208,6 +208,11 @@ interface SupabaseResourceConfig {
208
208
  rpc: string;
209
209
  args?: () => Record<string, unknown>;
210
210
  };
211
+ /**
212
+ * How lists of this resource count their total (default `exact`). Use
213
+ * `estimated` for large tables, or `none` when no screen shows a count.
214
+ */
215
+ count?: CountMode;
211
216
  /** The columns read when the caller names none, e.g. embedded joins: `"*, person:people(full_name)"`. Default `"*"`. */
212
217
  select?: string;
213
218
  /**
@@ -456,4 +461,4 @@ type GenesisProviderProps = {
456
461
  */
457
462
  declare function GenesisProvider({ children, provider, mock, storage, queryClient: queryClientProp, }: GenesisProviderProps): react.JSX.Element;
458
463
 
459
- export { BaseRecord, type CallRpcOptions, type CreateOrAdoptOptions, type CreateOrAdoptResult, DEFAULT_RPC_MESSAGES, DataProvider, DataProviderRoot, type DataProviderRootProps, DataReadError, DataWriteError, FilterParam, GenesisProvider, type GenesisProviderProps, Identifier, InvalidationKey, type MockProviderOptions, type PostgrestFieldErrors, RPC_FAILED, ReadOutcome, type RpcClient, type SupabaseClient, type SupabaseClientInput, type SupabaseProviderOptions, type SupabaseRealtimeChannel, type SupabaseRealtimePayload, type SupabaseResourceConfig, type SupabaseWriteContext, WriteEvent, WriteOutcome, callRpc, createMockProvider, createOrAdopt, createSupabaseProvider, fieldErrorsFromPostgrest, readOutcomeFromCode, toDataWriteError, useDataProvider, useStorage, writeOutcomeFromCode };
464
+ export { BaseRecord, type CallRpcOptions, CountMode, type CreateOrAdoptOptions, type CreateOrAdoptResult, DEFAULT_RPC_MESSAGES, DataProvider, DataProviderRoot, type DataProviderRootProps, DataReadError, DataWriteError, FilterParam, GenesisProvider, type GenesisProviderProps, Identifier, InvalidationKey, type MockProviderOptions, type PostgrestFieldErrors, RPC_FAILED, ReadOutcome, type RpcClient, type SupabaseClient, type SupabaseClientInput, type SupabaseProviderOptions, type SupabaseRealtimeChannel, type SupabaseRealtimePayload, type SupabaseResourceConfig, type SupabaseWriteContext, WriteEvent, WriteOutcome, callRpc, createMockProvider, createOrAdopt, createSupabaseProvider, fieldErrorsFromPostgrest, readOutcomeFromCode, toDataWriteError, useDataProvider, useStorage, writeOutcomeFromCode };
@@ -1,7 +1,8 @@
1
- export { DEFAULT_RPC_MESSAGES, RPC_FAILED, callRpc, createOrAdopt, createSupabaseProvider, fieldErrorsFromPostgrest, readOutcomeFromCode, toDataWriteError, writeOutcomeFromCode } from '../chunk-TOU2CMDH.js';
2
- export { DataReadError, isDataReadError, readFailureMessage } from '../chunk-HUNGCTRA.js';
1
+ export { DEFAULT_RPC_MESSAGES, RPC_FAILED, callRpc, createOrAdopt, createSupabaseProvider } from '../chunk-K7K6NY3C.js';
3
2
  export { DataProviderRoot, GenesisProvider, createMockProvider, useDataProvider, useStorage } from '../chunk-GGSXSI6Z.js';
4
3
  import '../chunk-ZYJUEJ4Z.js';
4
+ export { fieldErrorsFromPostgrest, readOutcomeFromCode, toDataWriteError, writeOutcomeFromCode } from '../chunk-PA6WJE5E.js';
5
+ export { DataReadError, isDataReadError, readFailureMessage } from '../chunk-HUNGCTRA.js';
5
6
  import '../chunk-RYEXWQFD.js';
6
7
  export { DataWriteError, isDataWriteError } from '../chunk-LG6TUBVM.js';
7
8
  //# sourceMappingURL=index.js.map