@palbase/web 1.0.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 (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +292 -0
  3. package/dist/analytics-facade-DkOwkEpi.d.ts +454 -0
  4. package/dist/analytics-facade-t6UrFdn7.d.cts +454 -0
  5. package/dist/chunk-JVT65V4E.js +3384 -0
  6. package/dist/chunk-JVT65V4E.js.map +1 -0
  7. package/dist/chunk-VJXFABBW.js +94 -0
  8. package/dist/chunk-VJXFABBW.js.map +1 -0
  9. package/dist/errors-fDoNdTrJ.d.cts +35 -0
  10. package/dist/errors-fDoNdTrJ.d.ts +35 -0
  11. package/dist/index.cjs +2394 -0
  12. package/dist/index.cjs.map +1 -0
  13. package/dist/index.d.cts +11 -0
  14. package/dist/index.d.ts +11 -0
  15. package/dist/index.js +27 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/internal.cjs +3403 -0
  18. package/dist/internal.cjs.map +1 -0
  19. package/dist/internal.d.cts +49 -0
  20. package/dist/internal.d.ts +49 -0
  21. package/dist/internal.js +19 -0
  22. package/dist/internal.js.map +1 -0
  23. package/dist/next/client.cjs +3131 -0
  24. package/dist/next/client.cjs.map +1 -0
  25. package/dist/next/client.d.cts +19 -0
  26. package/dist/next/client.d.ts +19 -0
  27. package/dist/next/client.js +75 -0
  28. package/dist/next/client.js.map +1 -0
  29. package/dist/next/index.cjs +3680 -0
  30. package/dist/next/index.cjs.map +1 -0
  31. package/dist/next/index.d.cts +238 -0
  32. package/dist/next/index.d.ts +238 -0
  33. package/dist/next/index.js +301 -0
  34. package/dist/next/index.js.map +1 -0
  35. package/dist/pb-BmgkAe97.d.ts +54 -0
  36. package/dist/pb-Cudze7Kb.d.cts +54 -0
  37. package/dist/react/index.cjs +649 -0
  38. package/dist/react/index.cjs.map +1 -0
  39. package/dist/react/index.d.cts +86 -0
  40. package/dist/react/index.d.ts +86 -0
  41. package/dist/react/index.js +156 -0
  42. package/dist/react/index.js.map +1 -0
  43. package/dist/storage-BPaeSG8K.d.cts +21 -0
  44. package/dist/storage-BPaeSG8K.d.ts +21 -0
  45. package/package.json +123 -0
@@ -0,0 +1,49 @@
1
+ import { f as PalbeConfig, p as PalbeRuntime } from './analytics-facade-t6UrFdn7.cjs';
2
+ export { q as buildRuntime } from './analytics-facade-t6UrFdn7.cjs';
3
+ import { B as BackendError } from './errors-fDoNdTrJ.cjs';
4
+ export { P as PB, c as createBoundClient } from './pb-Cudze7Kb.cjs';
5
+ import '@palbase/core';
6
+ import '@palbase/auth';
7
+ import './storage-BPaeSG8K.cjs';
8
+ import '@palbase/flags';
9
+
10
+ interface EndpointDescriptor {
11
+ method: string;
12
+ path: string;
13
+ /** `{name}` segments consumed as leading call args, in order. */
14
+ pathParams?: string[];
15
+ /**
16
+ * 'body' (default for non-GET) | 'query' (serialize input into the URL) |
17
+ * 'none' (no input arg — options come straight after path params).
18
+ */
19
+ input?: 'body' | 'query' | 'none';
20
+ /** wire error code → lift fn; the materializer rethrows the lifted error. */
21
+ errors?: Record<string, (e: BackendError) => Error>;
22
+ }
23
+ type NamespaceTree = {
24
+ [key: string]: NamespaceTree | EndpointDescriptor;
25
+ };
26
+ declare function __registerNamespaces(tree: NamespaceTree): void;
27
+
28
+ /**
29
+ * Called by the generated palbe.gen.ts on import. REPLACES the runtime
30
+ * (re-runs storage hydration) — safe to call repeatedly, e.g. watch-mode
31
+ * regen. The namespace registry intentionally survives re-configure: the
32
+ * gen file re-registers its static descriptors right after.
33
+ */
34
+ declare function __configure(config: PalbeConfig): void;
35
+ /**
36
+ * Register a callback that fires synchronously after every successful
37
+ * `__configure` call (including re-configure / watch-mode regen).
38
+ *
39
+ * Returns an unsubscribe function. Safe to call before the first `__configure`.
40
+ *
41
+ * @internal — consumed by `palbe/react`; not part of the public `palbe` surface.
42
+ */
43
+ declare function onConfigured(cb: () => void): () => void;
44
+ /** @internal */
45
+ declare function getRuntime(): PalbeRuntime;
46
+ /** Test-only: drop runtime + registered namespaces. */
47
+ declare function __reset(): void;
48
+
49
+ export { type EndpointDescriptor, type NamespaceTree, PalbeConfig, PalbeRuntime, __configure, __registerNamespaces, __reset, getRuntime, onConfigured };
@@ -0,0 +1,49 @@
1
+ import { f as PalbeConfig, p as PalbeRuntime } from './analytics-facade-DkOwkEpi.js';
2
+ export { q as buildRuntime } from './analytics-facade-DkOwkEpi.js';
3
+ import { B as BackendError } from './errors-fDoNdTrJ.js';
4
+ export { P as PB, c as createBoundClient } from './pb-BmgkAe97.js';
5
+ import '@palbase/core';
6
+ import '@palbase/auth';
7
+ import './storage-BPaeSG8K.js';
8
+ import '@palbase/flags';
9
+
10
+ interface EndpointDescriptor {
11
+ method: string;
12
+ path: string;
13
+ /** `{name}` segments consumed as leading call args, in order. */
14
+ pathParams?: string[];
15
+ /**
16
+ * 'body' (default for non-GET) | 'query' (serialize input into the URL) |
17
+ * 'none' (no input arg — options come straight after path params).
18
+ */
19
+ input?: 'body' | 'query' | 'none';
20
+ /** wire error code → lift fn; the materializer rethrows the lifted error. */
21
+ errors?: Record<string, (e: BackendError) => Error>;
22
+ }
23
+ type NamespaceTree = {
24
+ [key: string]: NamespaceTree | EndpointDescriptor;
25
+ };
26
+ declare function __registerNamespaces(tree: NamespaceTree): void;
27
+
28
+ /**
29
+ * Called by the generated palbe.gen.ts on import. REPLACES the runtime
30
+ * (re-runs storage hydration) — safe to call repeatedly, e.g. watch-mode
31
+ * regen. The namespace registry intentionally survives re-configure: the
32
+ * gen file re-registers its static descriptors right after.
33
+ */
34
+ declare function __configure(config: PalbeConfig): void;
35
+ /**
36
+ * Register a callback that fires synchronously after every successful
37
+ * `__configure` call (including re-configure / watch-mode regen).
38
+ *
39
+ * Returns an unsubscribe function. Safe to call before the first `__configure`.
40
+ *
41
+ * @internal — consumed by `palbe/react`; not part of the public `palbe` surface.
42
+ */
43
+ declare function onConfigured(cb: () => void): () => void;
44
+ /** @internal */
45
+ declare function getRuntime(): PalbeRuntime;
46
+ /** Test-only: drop runtime + registered namespaces. */
47
+ declare function __reset(): void;
48
+
49
+ export { type EndpointDescriptor, type NamespaceTree, PalbeConfig, PalbeRuntime, __configure, __registerNamespaces, __reset, getRuntime, onConfigured };
@@ -0,0 +1,19 @@
1
+ import {
2
+ __configure,
3
+ __registerNamespaces,
4
+ __reset,
5
+ buildRuntime,
6
+ createBoundClient,
7
+ getRuntime,
8
+ onConfigured
9
+ } from "./chunk-JVT65V4E.js";
10
+ export {
11
+ __configure,
12
+ __registerNamespaces,
13
+ __reset,
14
+ buildRuntime,
15
+ createBoundClient,
16
+ getRuntime,
17
+ onConfigured
18
+ };
19
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}