@voltro/client 0.86.0 → 0.88.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.
- package/CHANGELOG.md +5484 -0
- package/THIRD-PARTY-NOTICES.md +6 -230
- package/dist/analyticsCatalog.js +1 -2
- package/dist/apiConnectivity.js +1 -2
- package/dist/apiRoleTransports.js +47 -0
- package/dist/apiRuntime.js +76 -67
- package/dist/apiSocketTracker.js +20 -0
- package/dist/apiSupervisor.js +17 -7
- package/dist/authRefresh.js +1 -2
- package/dist/awaitResolvedApi.js +5 -6
- package/dist/bootstrap.d.ts +9 -0
- package/dist/bootstrap.js +3 -3
- package/dist/cellMerger.js +1 -2
- package/dist/clientDiagnostics.js +1 -2
- package/dist/clientErrorBus.js +1 -2
- package/dist/clientScheduler.js +1 -2
- package/dist/connectionPrerequisite.js +1 -2
- package/dist/connectionScope.js +15 -4
- package/dist/connectionSetupController.js +1 -2
- package/dist/createHooks.js +1 -2
- package/dist/deepLink.js +1 -2
- package/dist/filters.js +1 -2
- package/dist/form.d.ts +37 -4
- package/dist/form.js +4 -2
- package/dist/formBinding.js +1 -2
- package/dist/formData.js +73 -12
- package/dist/formFlashId.js +1 -2
- package/dist/formRejection.js +22 -0
- package/dist/formSource.js +12 -0
- package/dist/frameworkRuntimesContext.js +1 -2
- package/dist/globalContext.js +1 -2
- package/dist/index.d.ts +99 -20
- package/dist/index.js +57 -54
- package/dist/liveRowSort.js +1 -2
- package/dist/mutationConnectionSetup.js +1 -2
- package/dist/mutationIdentity.js +1 -2
- package/dist/mutationSerialExecution.js +1 -2
- package/dist/mutationsBus.js +1 -2
- package/dist/onlineSource.js +1 -2
- package/dist/outbox.js +1 -2
- package/dist/outboxHttp.js +1 -2
- package/dist/outboxState.js +1 -2
- package/dist/permissions.js +1 -2
- package/dist/platform.js +1 -2
- package/dist/preloadSeed.js +1 -2
- package/dist/provider.js +1 -2
- package/dist/query.js +1 -2
- package/dist/recoveryCoordinator.js +1 -2
- package/dist/recoveryRetry.js +1 -2
- package/dist/richText.js +1 -2
- package/dist/rpcErrorBus.js +1 -2
- package/dist/rpcErrorKind.js +1 -2
- package/dist/runRpc.js +1 -2
- package/dist/runtime.d.ts +17 -2
- package/dist/runtimeCapabilities.js +1 -2
- package/dist/runtimeContext.js +1 -2
- package/dist/schemaFields.js +1 -2
- package/dist/scopeMembership.js +1 -2
- package/dist/seedResolvers.js +1 -2
- package/dist/sequence.js +1 -2
- package/dist/serverRequest.js +12 -9
- package/dist/serviceClient.js +50 -50
- package/dist/squashRpcCause.js +1 -2
- package/dist/stableKey.js +1 -2
- package/dist/store.js +1 -2
- package/dist/storeStorage.js +1 -2
- package/dist/subscriptionCache.js +5 -6
- package/dist/tagWalk.js +1 -2
- package/dist/traceBus.js +1 -2
- package/dist/tracking.js +1 -2
- package/dist/uploadProgress.js +1 -2
- package/dist/useAction.js +1 -2
- package/dist/useAgent.js +1 -2
- package/dist/useAgentChat.js +1 -2
- package/dist/useAgentStream.js +1 -2
- package/dist/useApiOnline.js +1 -2
- package/dist/useCapabilityManifest.js +28 -25
- package/dist/useConnectionSetup.js +1 -2
- package/dist/useConnectionStatus.js +1 -2
- package/dist/useConnections.js +1 -2
- package/dist/useDataCopilot.js +1 -2
- package/dist/useDataTable.js +1 -2
- package/dist/useDerived.js +1 -2
- package/dist/useEvent.js +78 -69
- package/dist/useFormBinding.js +227 -226
- package/dist/useLocalQuery.js +1 -2
- package/dist/useMutation.js +1 -2
- package/dist/useOnRpcError.js +1 -2
- package/dist/usePreloadedSubscription.js +1 -2
- package/dist/usePreview.js +1 -2
- package/dist/useProvenance.js +1 -2
- package/dist/useQueryField.js +1 -2
- package/dist/useRecord.js +1 -2
- package/dist/useRefreshSubscriptions.js +1 -2
- package/dist/useResourceCan.js +1 -2
- package/dist/useResumableAgentStream.js +1 -2
- package/dist/useRpcCaller.js +16 -0
- package/dist/useSequence.js +1 -2
- package/dist/useSkeleton.js +1 -2
- package/dist/useSubscription.js +56 -48
- package/dist/useSubscriptionHealth.js +1 -2
- package/dist/useTranscription.js +1 -2
- package/dist/useUndo.js +1 -2
- package/dist/useUndoLog.js +1 -2
- package/dist/useUpload.js +1 -2
- package/dist/useWindowedSubscription.js +1 -2
- package/dist/useWorkflow.js +1 -2
- package/dist/useWorkflowRunState.js +1 -2
- package/dist/validation.js +1 -2
- package/dist/validationMessages.js +1 -2
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -8,10 +8,14 @@ import { DEV_ACTIVITY_EVENT } from '@voltro/protocol';
|
|
|
8
8
|
import { DevActivityMessage } from '@voltro/protocol';
|
|
9
9
|
import { DragEvent as DragEvent_2 } from 'react';
|
|
10
10
|
import { Effect } from 'effect';
|
|
11
|
+
import { encodeNativeFormCapture } from '@voltro/protocol';
|
|
11
12
|
import { errorMessage } from '@voltro/protocol';
|
|
12
13
|
import { errorTag } from '@voltro/protocol';
|
|
13
14
|
import { EventDescriptor as EventDescriptor_2 } from '@voltro/protocol';
|
|
14
15
|
import { Fiber } from 'effect';
|
|
16
|
+
import { FORM_CAPTURE_FIELD } from '@voltro/protocol';
|
|
17
|
+
import { FORM_CAPTURE_META_NAME } from '@voltro/protocol';
|
|
18
|
+
import { formCaptureSource } from '@voltro/protocol';
|
|
15
19
|
import { JsonSchemaDocument } from '@voltro/protocol';
|
|
16
20
|
import { jsonSchemaDocumentOf } from '@voltro/protocol';
|
|
17
21
|
import { jsonSchemaOf } from '@voltro/protocol';
|
|
@@ -26,6 +30,7 @@ import { PairingStorage } from '@voltro/protocol';
|
|
|
26
30
|
import { parsePairingLink } from '@voltro/protocol';
|
|
27
31
|
import { ReactElement } from 'react';
|
|
28
32
|
import { ReactNode } from 'react';
|
|
33
|
+
import { readFormCaptureSource } from '@voltro/protocol';
|
|
29
34
|
import { readPairing } from '@voltro/protocol';
|
|
30
35
|
import { Rpc } from 'effect/rpc';
|
|
31
36
|
import { RpcClient } from 'effect/rpc';
|
|
@@ -233,6 +238,8 @@ export declare interface ApiHandle {
|
|
|
233
238
|
readonly errorBus: RpcErrorBus;
|
|
234
239
|
/** Stable UI/raw transport recovery state for this logical api. */
|
|
235
240
|
readonly recovery?: RecoveryCoordinator;
|
|
241
|
+
/** Identity lifetime captured when this transport was built. */
|
|
242
|
+
readonly subjectSignal?: AbortSignal;
|
|
236
243
|
}
|
|
237
244
|
|
|
238
245
|
/**
|
|
@@ -287,6 +294,8 @@ export declare interface ApiHooks<P extends ProcedureTypeMap> {
|
|
|
287
294
|
readonly useAction: <Tag extends ActionTag<P>>(tag: Tag) => ActionState<ProcedureInput<P[Tag]>, ProcedureOutput<P[Tag]>>;
|
|
288
295
|
}
|
|
289
296
|
|
|
297
|
+
export declare type ApiSocketIssue = 'close' | 'error' | 'connect-timeout';
|
|
298
|
+
|
|
290
299
|
export { applyPairing }
|
|
291
300
|
|
|
292
301
|
/**
|
|
@@ -419,6 +428,8 @@ export declare interface BuildApiRuntimeOptions {
|
|
|
419
428
|
readonly generation?: number;
|
|
420
429
|
/** WebSocket URL of the api (`ws(s)://host:port/ws`). */
|
|
421
430
|
readonly wsUrl: string;
|
|
431
|
+
/** Captured deployment role endpoint manifest; partition this group's transports by tag/workload. */
|
|
432
|
+
readonly roleEndpoints?: unknown;
|
|
422
433
|
/**
|
|
423
434
|
* The api's rpc group, as the ERASED `RpcGroup.Any`.
|
|
424
435
|
*
|
|
@@ -477,6 +488,8 @@ export declare interface BuiltApiRuntime {
|
|
|
477
488
|
readonly client: RpcClient.RpcClient<Rpc.Any, RpcClientError.RpcClientError>;
|
|
478
489
|
readonly errorBus: RpcErrorBus;
|
|
479
490
|
readonly recovery: RecoveryCoordinator;
|
|
491
|
+
/** Identity lifetime captured when this transport was built. */
|
|
492
|
+
readonly subjectSignal?: AbortSignal;
|
|
480
493
|
}
|
|
481
494
|
|
|
482
495
|
declare interface CacheEntry {
|
|
@@ -1014,7 +1027,8 @@ export declare interface DataTableState<Row> {
|
|
|
1014
1027
|
* Decide, from the DECLARED access and the subject's global scopes, whether the
|
|
1015
1028
|
* caller may invoke a procedure. Pure — the matcher core, mirroring the
|
|
1016
1029
|
* server's `checkGuards`: entries are ANDed, `mode` controls AND/OR within one
|
|
1017
|
-
* entry
|
|
1030
|
+
* entry. `admin:full` satisfies scope and relationship checks, but cannot
|
|
1031
|
+
* establish registered-account identity from scopes alone.
|
|
1018
1032
|
*
|
|
1019
1033
|
* `guards === undefined` (neither `guards:` nor `openAccess:`) is `unknown`,
|
|
1020
1034
|
* not `allowed`: an undeclared procedure is refused outright under
|
|
@@ -1220,6 +1234,13 @@ export declare const emptyRichTextDocument: RichTextDocument;
|
|
|
1220
1234
|
*/
|
|
1221
1235
|
export declare const enableClientDiagnosticsPersistence: (storage: ClientDiagnosticsStorage) => void;
|
|
1222
1236
|
|
|
1237
|
+
/** Encode only a declared public tagged error. Run in the schema's own module graph,
|
|
1238
|
+
* including a production SSR bundle. Defects, invalid values, service-dependent
|
|
1239
|
+
* codecs and oversized errors contribute no structured form state. */
|
|
1240
|
+
export declare const encodeFormRejection: (schema: Schema.Top | undefined, error: unknown) => unknown;
|
|
1241
|
+
|
|
1242
|
+
export { encodeNativeFormCapture }
|
|
1243
|
+
|
|
1223
1244
|
export declare const enqueueEntry: (queue: Outbox, id: string, tag: string, input: unknown, stamp?: string) => Outbox;
|
|
1224
1245
|
|
|
1225
1246
|
/**
|
|
@@ -1452,20 +1473,23 @@ export declare type FilterKind = 'text' | 'select' | 'multi-select' | 'number-ra
|
|
|
1452
1473
|
* input field → one FilterDescriptor. Pure. */
|
|
1453
1474
|
export declare const filtersFromSchema: (schema: Schema.Top) => ReadonlyArray<FilterDescriptor>;
|
|
1454
1475
|
|
|
1476
|
+
export { FORM_CAPTURE_FIELD }
|
|
1477
|
+
|
|
1478
|
+
export { FORM_CAPTURE_META_NAME }
|
|
1479
|
+
|
|
1455
1480
|
/** DOM id of the JSON script the 422 re-render embeds (survives the
|
|
1456
1481
|
* `interactive:'none'` strip — it is neither `type="module"` nor `src`). */
|
|
1457
1482
|
export declare const FORM_FLASH_SCRIPT_ID = "__voltro_form_flash__";
|
|
1458
1483
|
|
|
1459
|
-
/** Hidden field carrying the form's instance key (multi-form pages). */
|
|
1460
1484
|
export declare const FORM_KEY_FIELD = "__voltro_form";
|
|
1461
1485
|
|
|
1462
|
-
/** URL prefix the web listener mounts the no-JS endpoint under. */
|
|
1463
1486
|
export declare const FORM_PATH_PREFIX = "/form/";
|
|
1464
1487
|
|
|
1465
|
-
/** Hidden field carrying the declared success-redirect path. */
|
|
1466
1488
|
export declare const FORM_REDIRECT_FIELD = "__voltro_redirect";
|
|
1467
1489
|
|
|
1468
|
-
/** The
|
|
1490
|
+
/** The original page, distinct from an optional success redirect. */
|
|
1491
|
+
export declare const FORM_SOURCE_FIELD = "__voltro_source";
|
|
1492
|
+
|
|
1469
1493
|
export declare const formActionPath: (mutationTag: string) => string;
|
|
1470
1494
|
|
|
1471
1495
|
/** A field ARRAY (`entries[]`): items + structural operations + per-item
|
|
@@ -1545,6 +1569,8 @@ export declare const FormBindingProvider: <Input extends Record<string, unknown>
|
|
|
1545
1569
|
readonly children?: ReactNode;
|
|
1546
1570
|
}) => ReactElement;
|
|
1547
1571
|
|
|
1572
|
+
export { formCaptureSource }
|
|
1573
|
+
|
|
1548
1574
|
/**
|
|
1549
1575
|
* Convert posted form entries into the input object the mutation's schema
|
|
1550
1576
|
* decodes — the shape `validateFields` (and the RPC payload) expects.
|
|
@@ -1636,6 +1662,11 @@ export declare interface FormFlashPayload {
|
|
|
1636
1662
|
readonly errors: Readonly<Record<string, string>>;
|
|
1637
1663
|
/** A non-field error (the RPC refused after valid input: guard, server). */
|
|
1638
1664
|
readonly formError?: string;
|
|
1665
|
+
/** JSON encoded through the procedure's declared error schema. Private to
|
|
1666
|
+
* this failed submit; never a publication or permission proof. */
|
|
1667
|
+
readonly rejection?: unknown;
|
|
1668
|
+
/** Admitted original page for repeated native errors and late hydration. */
|
|
1669
|
+
readonly sourcePath?: string;
|
|
1639
1670
|
}
|
|
1640
1671
|
|
|
1641
1672
|
/** A mutation's input as the form binding's value shape. A struct input is its
|
|
@@ -1651,6 +1682,9 @@ declare type FormInput<P extends ProcedureTypeMap, Tag extends keyof P> = Proced
|
|
|
1651
1682
|
*/
|
|
1652
1683
|
export declare const formSections: (fields: ReadonlyArray<FieldDescriptor>) => ReadonlyArray<FieldSection>;
|
|
1653
1684
|
|
|
1685
|
+
/** Admit a local source page; native form endpoints cannot be their own source. */
|
|
1686
|
+
export declare const formSourcePath: (raw: unknown) => string | undefined;
|
|
1687
|
+
|
|
1654
1688
|
/** The full form state, engine + mutation, in ONE place — a save button reads
|
|
1655
1689
|
* `canSubmit`/`pending`, a dialog closes on `isSubmitSuccessful`, a banner
|
|
1656
1690
|
* listens to `submitError`. */
|
|
@@ -1951,6 +1985,22 @@ export declare interface LocalQueryOptions<Row> {
|
|
|
1951
1985
|
readonly limit?: number;
|
|
1952
1986
|
}
|
|
1953
1987
|
|
|
1988
|
+
export declare const makeApiRoleSocketTracker: (group: RpcGroup.Any, wsUrl: string, endpoints: unknown, onOpen: () => void, onIssue: (kind: ApiSocketIssue) => void) => {
|
|
1989
|
+
begin: (url: string) => {
|
|
1990
|
+
open: () => void;
|
|
1991
|
+
issue: (kind: ApiSocketIssue) => void;
|
|
1992
|
+
};
|
|
1993
|
+
};
|
|
1994
|
+
|
|
1995
|
+
/** One supervisor edge for a logical API, latest physical attempt per endpoint.
|
|
1996
|
+
* Raw open is supervisor/backstop evidence only; protocol leases stay separate. */
|
|
1997
|
+
export declare const makeApiSocketTracker: (urls: ReadonlyArray<string>, onOpen: () => void, onIssue: (kind: ApiSocketIssue) => void) => {
|
|
1998
|
+
begin: (url: string) => {
|
|
1999
|
+
open: () => void;
|
|
2000
|
+
issue: (kind: ApiSocketIssue) => void;
|
|
2001
|
+
};
|
|
2002
|
+
};
|
|
2003
|
+
|
|
1954
2004
|
export declare const makePreloadSeedBag: () => PreloadSeedBag;
|
|
1955
2005
|
|
|
1956
2006
|
/* Excluded from this release type: makeProtocolOpenRecovery */
|
|
@@ -1961,11 +2011,13 @@ export declare const makeStoreSeedBag: () => StoreSeedBag;
|
|
|
1961
2011
|
* The access a procedure DECLARES, as data — the same declaration the server
|
|
1962
2012
|
* enforces, mirrored from @voltro/cli's `SerialisedGuard`.
|
|
1963
2013
|
*
|
|
1964
|
-
*
|
|
2014
|
+
* The variants describe the three states an access decision has. `open` is the
|
|
1965
2015
|
* erased form of `openAccess: '<why>'`; it is a DECISION, and distinguishing it
|
|
1966
2016
|
* from "nobody declared anything" is the whole reason it travels.
|
|
1967
2017
|
*/
|
|
1968
2018
|
export declare type ManifestGuard = {
|
|
2019
|
+
readonly kind: 'upgraded';
|
|
2020
|
+
} | {
|
|
1969
2021
|
readonly kind: 'scope';
|
|
1970
2022
|
readonly scope: ReadonlyArray<string>;
|
|
1971
2023
|
/** `all` — every scope; `any` — at least one. */
|
|
@@ -2040,6 +2092,7 @@ export declare interface MountedApi {
|
|
|
2040
2092
|
readonly group: RpcGroup.Any;
|
|
2041
2093
|
readonly descriptors: ClientDescriptorMap;
|
|
2042
2094
|
readonly wsUrl: string;
|
|
2095
|
+
readonly roleEndpoints?: unknown;
|
|
2043
2096
|
readonly headers?: ResolvableHeaders | undefined;
|
|
2044
2097
|
readonly recovery?: RecoveryOptions | undefined;
|
|
2045
2098
|
/** Durable local mirror, resolved per transport generation — see
|
|
@@ -2609,6 +2662,8 @@ export declare type RawTransportStatus = 'connected' | 'disconnected';
|
|
|
2609
2662
|
/** The current answer, outside React. */
|
|
2610
2663
|
export declare const readApiOnline: (apiName?: string) => boolean;
|
|
2611
2664
|
|
|
2665
|
+
export { readFormCaptureSource }
|
|
2666
|
+
|
|
2612
2667
|
export { readPairing }
|
|
2613
2668
|
|
|
2614
2669
|
/**
|
|
@@ -2642,6 +2697,12 @@ export declare interface RecordState<R> {
|
|
|
2642
2697
|
readonly error: unknown | undefined;
|
|
2643
2698
|
}
|
|
2644
2699
|
|
|
2700
|
+
/** Recover edits made to one native form before its JavaScript booted.
|
|
2701
|
+
* Uses the ordinary native schema mapper; only changed, editable controls
|
|
2702
|
+
* replace initial values. Hidden metadata and unrelated forms stay intact.
|
|
2703
|
+
* Call once when initializing state, never as a submission or authority check. */
|
|
2704
|
+
export declare const recoverNativeFormValues: (schema: Schema.Top, formKey: string, values: Readonly<Record<string, unknown>>) => Readonly<Record<string, unknown>>;
|
|
2705
|
+
|
|
2645
2706
|
/**
|
|
2646
2707
|
* State owned by one logical API, not by one socket or one React hook.
|
|
2647
2708
|
*
|
|
@@ -2833,6 +2894,8 @@ export declare interface ResolvedClient {
|
|
|
2833
2894
|
readonly client: RpcClient.RpcClient<Rpc.Any, RpcClientError.RpcClientError>;
|
|
2834
2895
|
readonly errorBus?: RpcErrorBus;
|
|
2835
2896
|
readonly recovery?: RecoveryCoordinator;
|
|
2897
|
+
/** Identity lifetime captured when this transport was built. */
|
|
2898
|
+
readonly subjectSignal?: AbortSignal;
|
|
2836
2899
|
}
|
|
2837
2900
|
|
|
2838
2901
|
export declare interface ResolvedRecoveryOptions {
|
|
@@ -2995,9 +3058,9 @@ export declare const RICH_TEXT_MARKS: readonly ["bold", "italic", "code", "strik
|
|
|
2995
3058
|
* unbounded tree is a decode bomb on a server thread. */
|
|
2996
3059
|
export declare const RICH_TEXT_MAX_NODES = 5000;
|
|
2997
3060
|
|
|
2998
|
-
export declare type RichTextBlock = typeof
|
|
3061
|
+
export declare type RichTextBlock = typeof RichTextBlockSchema.Type;
|
|
2999
3062
|
|
|
3000
|
-
declare const
|
|
3063
|
+
declare const RichTextBlockSchema: Schema.Union<readonly [Schema.Struct<{
|
|
3001
3064
|
readonly type: Schema.Literal<"paragraph">;
|
|
3002
3065
|
readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
3003
3066
|
readonly type: Schema.Literal<"text">;
|
|
@@ -3084,8 +3147,6 @@ declare const RichTextBlock_2: Schema.Union<readonly [Schema.Struct<{
|
|
|
3084
3147
|
readonly text: Schema.String;
|
|
3085
3148
|
}>]>;
|
|
3086
3149
|
|
|
3087
|
-
declare type RichTextBlock = typeof RichTextBlock_2.Type;
|
|
3088
|
-
|
|
3089
3150
|
/**
|
|
3090
3151
|
* The rich-text field's value. Use it directly in a mutation input:
|
|
3091
3152
|
*
|
|
@@ -3187,9 +3248,9 @@ export declare const RichTextDocument: Schema.Struct<{
|
|
|
3187
3248
|
|
|
3188
3249
|
export declare type RichTextDocument = typeof RichTextDocument.Type;
|
|
3189
3250
|
|
|
3190
|
-
export declare type RichTextInline = typeof
|
|
3251
|
+
export declare type RichTextInline = typeof RichTextInlineSchema.Type;
|
|
3191
3252
|
|
|
3192
|
-
declare const
|
|
3253
|
+
declare const RichTextInlineSchema: Schema.Union<readonly [Schema.Struct<{
|
|
3193
3254
|
readonly type: Schema.Literal<"text">;
|
|
3194
3255
|
readonly text: Schema.String;
|
|
3195
3256
|
readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
|
|
@@ -3203,11 +3264,9 @@ declare const RichTextInline_2: Schema.Union<readonly [Schema.Struct<{
|
|
|
3203
3264
|
}>>;
|
|
3204
3265
|
}>]>;
|
|
3205
3266
|
|
|
3206
|
-
declare type
|
|
3267
|
+
export declare type RichTextListItem = typeof RichTextListItemSchema.Type;
|
|
3207
3268
|
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
declare const RichTextListItem_2: Schema.Struct<{
|
|
3269
|
+
declare const RichTextListItemSchema: Schema.Struct<{
|
|
3211
3270
|
readonly type: Schema.Literal<"listItem">;
|
|
3212
3271
|
readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
3213
3272
|
readonly type: Schema.Literal<"text">;
|
|
@@ -3224,8 +3283,6 @@ declare const RichTextListItem_2: Schema.Struct<{
|
|
|
3224
3283
|
}>]>>;
|
|
3225
3284
|
}>;
|
|
3226
3285
|
|
|
3227
|
-
declare type RichTextListItem = typeof RichTextListItem_2.Type;
|
|
3228
|
-
|
|
3229
3286
|
export declare type RichTextMark = (typeof RICH_TEXT_MARKS)[number];
|
|
3230
3287
|
|
|
3231
3288
|
/** The document's text, with no markers — for search indexing, excerpts and
|
|
@@ -3236,6 +3293,13 @@ export declare const richTextToPlainText: (value: unknown) => string;
|
|
|
3236
3293
|
* when the label field is absent. Exported for direct testing + reuse. */
|
|
3237
3294
|
export declare const rowsToOptions: (rows: ReadonlyArray<Record<string, unknown>>, labelField: string, valueField: string) => ReadonlyArray<FieldOption>;
|
|
3238
3295
|
|
|
3296
|
+
export declare interface RpcCaller {
|
|
3297
|
+
/** Call one rpc by tag. Rejects with the server's typed error; `signal` interrupts the call. */
|
|
3298
|
+
call(tag: string, input: unknown, options?: {
|
|
3299
|
+
readonly signal?: AbortSignal | undefined;
|
|
3300
|
+
}): Promise<unknown>;
|
|
3301
|
+
}
|
|
3302
|
+
|
|
3239
3303
|
/** What the client can prove about a unary call's server-side result. */
|
|
3240
3304
|
export declare type RpcCallOutcome = 'not-applicable' | 'not-started' | 'known' | 'unknown';
|
|
3241
3305
|
|
|
@@ -3483,6 +3547,8 @@ export declare interface ServerRequestContextValue {
|
|
|
3483
3547
|
* would add a fiber fork the client boot does not have, and every
|
|
3484
3548
|
* ancestor arity difference shifts every useId in the app. */
|
|
3485
3549
|
readonly formFlash?: FormFlashPayload;
|
|
3550
|
+
/** Public captured build/class selection, never a credential or write permit. */
|
|
3551
|
+
readonly formSource?: string;
|
|
3486
3552
|
}
|
|
3487
3553
|
|
|
3488
3554
|
export declare const ServerRequestProvider: ({ value, children, }: {
|
|
@@ -4445,8 +4511,12 @@ export declare interface SupervisorHandle {
|
|
|
4445
4511
|
readonly dispose: () => void;
|
|
4446
4512
|
/** Force a fresh ws connect for every api (carrying the browser's current
|
|
4447
4513
|
* cookies) so a cookie-based login re-resolves the authenticated Subject
|
|
4448
|
-
* in place, without a page reload.
|
|
4449
|
-
|
|
4514
|
+
* in place, without a page reload. Resolves once every api runs on a
|
|
4515
|
+
* runtime built after this call (or the supervisor is gone): a call made
|
|
4516
|
+
* after that goes out as the next Subject. Never rejects; a failing build
|
|
4517
|
+
* keeps retrying and the promise waits for the one that lands. Resolves
|
|
4518
|
+
* at once for UI-only (no-api) apps. */
|
|
4519
|
+
readonly reconnect: () => Promise<void>;
|
|
4450
4520
|
/** Re-resolve `authHeaders` and rebuild the transport, SAME subject — for a
|
|
4451
4521
|
* rotated token on a long-lived tab. Unlike `reconnect()` this seeds the new
|
|
4452
4522
|
* cache from the old one, because nobody's entitlement changed. */
|
|
@@ -4979,6 +5049,9 @@ export declare interface UseFormBindingOptions<Input> {
|
|
|
4979
5049
|
readonly schema?: Schema.Top;
|
|
4980
5050
|
/** Initial field values. */
|
|
4981
5051
|
readonly defaults?: Partial<Input>;
|
|
5052
|
+
/** Native form identity for recovering browser edits before bootstrap.
|
|
5053
|
+
* Defaults to the failed POST's key, then the mutation tag. */
|
|
5054
|
+
readonly formKey?: string;
|
|
4982
5055
|
/** The failed no-JS POST's payload for THIS form (`useFormFlash` from
|
|
4983
5056
|
* @voltro/web resolves it, SSR and client alike). When present it seeds
|
|
4984
5057
|
* the initial values + field errors, so the 422 re-render shows the
|
|
@@ -5063,6 +5136,9 @@ export declare interface UseFormBindingOptions<Input> {
|
|
|
5063
5136
|
readonly subscribe?: 'all' | 'fields';
|
|
5064
5137
|
}
|
|
5065
5138
|
|
|
5139
|
+
/** Relay the server-rendered public source pin for native POST and hydration. */
|
|
5140
|
+
export declare const useFormCapture: () => string | undefined;
|
|
5141
|
+
|
|
5066
5142
|
/**
|
|
5067
5143
|
* Narrow per-field subscription — the render-performance half of the engine.
|
|
5068
5144
|
*
|
|
@@ -5247,6 +5323,9 @@ export declare interface UseResourceCanState {
|
|
|
5247
5323
|
|
|
5248
5324
|
export declare const useResumableAgentStream: <E = unknown>(apiName: string, rpcTag: string, options?: ResumableAgentStreamOptions<E>) => ResumableAgentStreamControls<E>;
|
|
5249
5325
|
|
|
5326
|
+
/** A stable `RpcCaller` for one api. The same object across renders; each call reads the latest handle. */
|
|
5327
|
+
export declare const useRpcCaller: (apiName: string) => RpcCaller;
|
|
5328
|
+
|
|
5250
5329
|
/** A schema-owned form for actions, parent plans, and local saves. It uses the
|
|
5251
5330
|
* same validation/field engine without connecting to an API or inventing a tag. */
|
|
5252
5331
|
export declare const useSchemaFormBinding: <Input extends Record<string, unknown>, Encoded, Output>(options: Omit<UseFormBindingOptions<Input>, "schema" | "onSubmit"> & {
|
package/dist/index.js
CHANGED
|
@@ -28,57 +28,60 @@ import { useAction as Ne } from "./useAction.js";
|
|
|
28
28
|
import { formField as Pe, formSections as Fe, schemaToColumns as Ie, schemaToFields as Le } from "./schemaFields.js";
|
|
29
29
|
import { decodeFieldIssues as Re, documentLocale as ze, resolveValidationMessage as Be, restrictToSchema as Ve, validateFields as He } from "./formBinding.js";
|
|
30
30
|
import { ValidationMessagesProvider as Ue, useValidationMessages as We } from "./validationMessages.js";
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
31
|
+
import { RICH_TEXT_MARKS as Ge, RICH_TEXT_MAX_NODES as Ke, RichTextDocument as qe, emptyRichTextDocument as Je, isRichTextDocument as Ye, isSafeHref as Xe, parseRichText as Ze, richTextToPlainText as Qe, serializeRichText as $e } from "./richText.js";
|
|
32
|
+
import { FORM_FLASH_SCRIPT_ID as et } from "./formFlashId.js";
|
|
33
|
+
import { FORM_CAPTURE_FIELD as tt, FORM_CAPTURE_META_NAME as nt, FORM_KEY_FIELD as rt, FORM_PATH_PREFIX as it, FORM_REDIRECT_FIELD as at, FORM_SOURCE_FIELD as ot, encodeNativeFormCapture as st, formActionPath as ct, formCaptureSource as lt, formSourcePath as ut, readFormCaptureSource as dt } from "./formSource.js";
|
|
34
|
+
import { formDataToInput as ft, recoverNativeFormValues as pt } from "./formData.js";
|
|
35
|
+
import { ServerRequestContext as mt, ServerRequestProvider as ht, useFormCapture as gt, useFormFlash as _t, useServerRequest as vt } from "./serverRequest.js";
|
|
36
|
+
import { FormBindingProvider as yt, useFormBinding as bt, useFormBindingContext as xt, useFormField as St, useSchemaFormBinding as Ct } from "./useFormBinding.js";
|
|
37
|
+
import { useConnectionSetup as wt } from "./useConnectionSetup.js";
|
|
38
|
+
import { createHooks as Tt } from "./createHooks.js";
|
|
39
|
+
import { applyPreloadSeeds as Et, makePreloadSeedBag as Dt, readPreloadedSeedOutcome as Ot, readPreloadedSnapshot as kt, resetPreloadSeeds as At, seedPreloadedSubscription as jt, seedPreloadedSubscriptionFailure as Mt, setPreloadSeedResolver as Nt } from "./preloadSeed.js";
|
|
40
|
+
import { usePreloadedSubscription as Pt } from "./usePreloadedSubscription.js";
|
|
41
|
+
import { useEvent as Ft } from "./useEvent.js";
|
|
42
|
+
import { runSequence as It, sequence as Lt } from "./sequence.js";
|
|
43
|
+
import { useSequence as Rt } from "./useSequence.js";
|
|
44
|
+
import { useRpcCaller as zt } from "./useRpcCaller.js";
|
|
45
|
+
import { useUpload as Bt } from "./useUpload.js";
|
|
46
|
+
import { useTranscription as Vt } from "./useTranscription.js";
|
|
47
|
+
import { useWorkflow as Ht, useWorkflowDomainEvents as Ut, useWorkflowEventDeliveries as Wt, useWorkflowEvents as Gt, useWorkflowRun as Kt, useWorkflowRunEvents as qt, useWorkflowRunSteps as Jt, useWorkflowRuns as Yt, useWorkflowSignal as Xt, useWorkflowUpdate as Zt } from "./useWorkflow.js";
|
|
48
|
+
import { useWorkflowRunState as Qt } from "./useWorkflowRunState.js";
|
|
49
|
+
import { useAgentStream as $t } from "./useAgentStream.js";
|
|
50
|
+
import { resumableConsumeProgram as en, useResumableAgentStream as tn } from "./useResumableAgentStream.js";
|
|
51
|
+
import { useAgentChat as nn } from "./useAgentChat.js";
|
|
52
|
+
import { useAgent as rn } from "./useAgent.js";
|
|
53
|
+
import { useDataCopilot as an } from "./useDataCopilot.js";
|
|
54
|
+
import { useRefreshSubscription as on, useRefreshSubscriptions as sn } from "./useRefreshSubscriptions.js";
|
|
55
|
+
import { queryOnce as cn } from "./query.js";
|
|
56
|
+
import { isUnauthenticated as ln, wireAuthRefresh as un } from "./authRefresh.js";
|
|
57
|
+
import { useOnRawRpcError as dn, useOnRpcError as fn } from "./useOnRpcError.js";
|
|
58
|
+
import { useSubscriptionHealth as pn } from "./useSubscriptionHealth.js";
|
|
59
|
+
import { encodeFormRejection as mn } from "./formRejection.js";
|
|
60
|
+
import { rowsToOptions as hn, useQueryField as gn } from "./useQueryField.js";
|
|
61
|
+
import { useDataTable as _n } from "./useDataTable.js";
|
|
62
|
+
import { provenanceUrl as vn, useProvenance as yn } from "./useProvenance.js";
|
|
63
|
+
import { ADMIN_SCOPE as bn, PermissionProvider as xn, canCall as Sn, canCallAny as Cn, useCan as wn, useCanAny as Tn, usePermissions as En } from "./permissions.js";
|
|
64
|
+
import { decideAccess as Dn, deriveEntityAdmins as On, manifestUrl as kn, openAccessReason as An, requiredScopes as jn, useAccessDecision as Mn, useCapabilityManifest as Nn } from "./useCapabilityManifest.js";
|
|
65
|
+
import { useUndo as Pn } from "./useUndo.js";
|
|
66
|
+
import { UNDO_APPLY_TAG as Fn, UNDO_LOG_TAG as In, UNDO_REDO_TAG as Ln, useUndoLog as Rn } from "./useUndoLog.js";
|
|
67
|
+
import { defineTracking as zn, resolveTrackingEvent as Bn, useTracking as Vn, wrapTrackedCallbacks as Hn } from "./tracking.js";
|
|
68
|
+
import { useFormSkeleton as Un, useTableSkeleton as Wn } from "./useSkeleton.js";
|
|
69
|
+
import { shallowArrayEqual as Gn, sourceValues as Kn, useDerived as qn } from "./useDerived.js";
|
|
70
|
+
import { useResourceCan as Jn, useResourceCans as Yn } from "./useResourceCan.js";
|
|
71
|
+
import { filtersFromSchema as Xn, useQueryFilters as Zn } from "./filters.js";
|
|
72
|
+
import { useRecord as Qn } from "./useRecord.js";
|
|
73
|
+
import { useAsyncValidation as $n, useDebounced as er, validationStatus as tr } from "./validation.js";
|
|
74
|
+
import { createAnalytics as nr, defineEvent as rr, eventCatalog as ir, validateEventPayload as ar } from "./analyticsCatalog.js";
|
|
75
|
+
import { usePreview as or } from "./usePreview.js";
|
|
76
|
+
import { readApiOnline as sr, subscribeApiOnline as cr, useApiOnline as lr } from "./useApiOnline.js";
|
|
77
|
+
import { clearSent as ur, defaultOutboxRetryDelay as dr, enqueueEntry as fr, markConflict as pr, markFailed as mr, markSent as hr, replayable as gr, resolveConflictEntry as _r, useOutbox as vr } from "./outbox.js";
|
|
78
|
+
import { OUTBOX_DB_NAME as yr, OUTBOX_SYNC_TAG as br, drainOutboxInWorker as xr, drainOutboxOverHttp as Sr, indexedDbOutboxPersistence as Cr, rpcHttpOutcome as wr } from "./outboxHttp.js";
|
|
79
|
+
import { computeWindow as Tr, useWindowedSubscription as Er } from "./useWindowedSubscription.js";
|
|
80
|
+
import { useConnectionStatus as Dr } from "./useConnectionStatus.js";
|
|
81
|
+
import { runLocalQuery as Or, useLocalQuery as kr } from "./useLocalQuery.js";
|
|
82
|
+
import { CONNECTIONS_LIST_TAG as Ar, CONNECTION_DISCONNECT_TAG as jr, CONNECTION_START_TAG as Mr, CONNECTION_SUBMIT_TOKEN_TAG as Nr, useConnection as Pr, useConnections as Fr } from "./useConnections.js";
|
|
83
|
+
import { makeApiRoleSocketTracker as Ir, makeApiSocketTracker as Lr } from "./apiSocketTracker.js";
|
|
84
|
+
import { DEV_ACTIVITY_EVENT as Rr, PAIRING_HOST as zr, PAIRING_SCHEME as Br, PAIRING_STORAGE_KEY as Vr, applyPairing as Hr, clearPairing as Ur, errorMessage as Wr, errorTag as Gr, jsonSchemaDocumentOf as Kr, jsonSchemaOf as qr, pairingLink as Jr, parsePairingLink as Yr, readPairing as Xr } from "@voltro/protocol";
|
|
85
|
+
// src/index.ts
|
|
86
|
+
var Zr = "framework-client";
|
|
87
|
+
export { bn as ADMIN_SCOPE, Zr as CLIENT_NAME, Ar as CONNECTIONS_LIST_TAG, jr as CONNECTION_DISCONNECT_TAG, Mr as CONNECTION_START_TAG, Nr as CONNECTION_SUBMIT_TOKEN_TAG, Rr as DEV_ACTIVITY_EVENT, tt as FORM_CAPTURE_FIELD, nt as FORM_CAPTURE_META_NAME, et as FORM_FLASH_SCRIPT_ID, rt as FORM_KEY_FIELD, it as FORM_PATH_PREFIX, at as FORM_REDIRECT_FIELD, ot as FORM_SOURCE_FIELD, yt as FormBindingProvider, w as FrameworkRuntimesContext, z as FrameworkRuntimesProvider, y as INITIAL_RECOVERY_SNAPSHOT, d as LoadingSubscriptionCache, ke as MutationSerialExecutionError, yr as OUTBOX_DB_NAME, br as OUTBOX_SYNC_TAG, zr as PAIRING_HOST, Br as PAIRING_SCHEME, Vr as PAIRING_STORAGE_KEY, xn as PermissionProvider, Ge as RICH_TEXT_MARKS, Ke as RICH_TEXT_MAX_NODES, b as RecoveryCoordinator, qe as RichTextDocument, _ as RpcErrorBus, mt as ServerRequestContext, ht as ServerRequestProvider, f as SubscriptionCache, Fn as UNDO_APPLY_TAG, In as UNDO_LOG_TAG, Ln as UNDO_REDO_TAG, Ue as ValidationMessagesProvider, D as _resetFrameworkRuntimesWarning, O as _resetSsrDescriptors, v as apiConnectivity, Hr as applyPairing, Et as applyPreloadSeeds, W as applyStoreSeeds, ne as browserOnlineSource, re as browserPlatform, B as browserStoreStorage, I as buildApiRuntime, Sn as canCall, Cn as canCallAny, ie as capabilitiesOf, i as clearClientDiagnostics, Se as clearMutations, Ur as clearPairing, ur as clearSent, G as clearStoreHistory, a as clientDiagnosticsSnapshot, Tr as computeWindow, nr as createAnalytics, Tt as createHooks, ae as currentPlatform, Dn as decideAccess, Re as decodeFieldIssues, he as deepLinkHref, dr as defaultOutboxRetryDelay, ge as defineDeepLink, rr as defineEvent, oe as definePlatform, K as defineStore, zn as defineTracking, q as definedStores, On as deriveEntityAdmins, o as disableClientDiagnosticsPersistence, _e as dispatchDeepLink, ze as documentLocale, xr as drainOutboxInWorker, Sr as drainOutboxOverHttp, Je as emptyRichTextDocument, s as enableClientDiagnosticsPersistence, mn as encodeFormRejection, st as encodeNativeFormCapture, fr as enqueueEntry, Wr as errorMessage, Gr as errorTag, ir as eventCatalog, Xn as filtersFromSchema, ct as formActionPath, lt as formCaptureSource, ft as formDataToInput, Pe as formField, Fe as formSections, ut as formSourcePath, De as freshIdempotencyKey, Ae as getMutationNotifier, Ce as getMutations, C as globalContext, Cr as indexedDbOutboxPersistence, se as installPlatform, ce as isPlatformInstalled, Ye as isRichTextDocument, Xe as isSafeHref, le as isStandaloneDisplay, ln as isUnauthenticated, T as isUnresolvedApi, Kr as jsonSchemaDocumentOf, qr as jsonSchemaOf, Ir as makeApiRoleSocketTracker, Lr as makeApiSocketTracker, Dt as makePreloadSeedBag, L as makeProtocolOpenRecovery, J as makeStoreSeedBag, kn as manifestUrl, pr as markConflict, mr as markFailed, hr as markSent, ve as matchDeepLink, ye as matchFirstDeepLink, ue as memoryTokenStore, An as openAccessReason, Jr as pairingLink, Yr as parsePairingLink, Ze as parseRichText, vn as provenanceUrl, m as publishClientError, n as publishClientTrace, cn as queryOnce, sr as readApiOnline, dt as readFormCaptureSource, Xr as readPairing, Ot as readPreloadedSeedOutcome, kt as readPreloadedSnapshot, c as recordClientDiagnostic, pt as recoverNativeFormValues, x as recoveryCoordinatorFor, de as refusingTokenStore, e as registerCellMerger, k as registerSsrDescriptors, t as registeredCellMerger, gr as replayable, h as reportClientError, jn as requiredScopes, fe as resetPlatformForTest, At as resetPreloadSeeds, Y as resetStoreRegistryForTests, V as resetStoreStorageForTest, F as resolveByTag, _r as resolveConflictEntry, S as resolveRecoveryOptions, H as resolveStoreStorage, Bn as resolveTrackingEvent, Be as resolveValidationMessage, Ve as restrictToSchema, en as resumableConsumeProgram, Qe as richTextToPlainText, hn as rowsToOptions, wr as rpcHttpOutcome, be as runDeepLink, Or as runLocalQuery, It as runSequence, Ie as schemaToColumns, Le as schemaToFields, jt as seedPreloadedSubscription, Mt as seedPreloadedSubscriptionFailure, X as seedStore, Lt as sequence, $e as serializeRichText, je as setMutationNotifier, Nt as setPreloadSeedResolver, Z as setStoreSeedResolver, U as setStoreStorage, we as settleMutation, Q as shallow, Gn as shallowArrayEqual, Kn as sourceValues, A as ssrClientProxy, j as ssrDescriptorsFor, M as ssrStubHandle, u as stableKey, R as startApiSupervisor, Te as startMutation, $ as storeHistory, cr as subscribeApiOnline, l as subscribeClientDiagnostics, g as subscribeClientErrors, r as subscribeClientTraces, Ee as subscribeMutations, ee as subscribeStoreHistory, p as supersedesConfirmedPatches, te as travelToStoreState, E as unknownApiError, Mn as useAccessDecision, Ne as useAction, rn as useAgent, nn as useAgentChat, $t as useAgentStream, lr as useApiOnline, $n as useAsyncValidation, wn as useCan, Tn as useCanAny, Nn as useCapabilityManifest, Pr as useConnection, wt as useConnectionSetup, Dr as useConnectionStatus, Fr as useConnections, an as useDataCopilot, _n as useDataTable, er as useDebounced, qn as useDerived, Ft as useEvent, bt as useFormBinding, xt as useFormBindingContext, gt as useFormCapture, St as useFormField, _t as useFormFlash, Un as useFormSkeleton, N as useFrameworkApi, P as useFrameworkRuntimes, kr as useLocalQuery, Me as useMutation, dn as useOnRawRpcError, fn as useOnRpcError, vr as useOutbox, En as usePermissions, pe as usePlatform, Pt as usePreloadedSubscription, or as usePreview, yn as useProvenance, gn as useQueryField, Zn as useQueryFilters, Qn as useRecord, on as useRefreshSubscription, sn as useRefreshSubscriptions, Jn as useResourceCan, Yn as useResourceCans, tn as useResumableAgentStream, zt as useRpcCaller, Ct as useSchemaFormBinding, Rt as useSequence, vt as useServerRequest, me as useShellExtension, xe as useSubscription, pn as useSubscriptionHealth, Wn as useTableSkeleton, Vn as useTracking, Vt as useTranscription, Pn as useUndo, Rn as useUndoLog, Bt as useUpload, We as useValidationMessages, Er as useWindowedSubscription, Ht as useWorkflow, Ut as useWorkflowDomainEvents, Wt as useWorkflowEventDeliveries, Gt as useWorkflowEvents, Kt as useWorkflowRun, qt as useWorkflowRunEvents, Qt as useWorkflowRunState, Jt as useWorkflowRunSteps, Yt as useWorkflowRuns, Xt as useWorkflowSignal, Zt as useWorkflowUpdate, ar as validateEventPayload, He as validateFields, tr as validationStatus, un as wireAuthRefresh, Oe as withIdempotencyKey, Hn as wrapTrackedCallbacks };
|
package/dist/liveRowSort.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/liveRowSort.ts
|
|
2
2
|
var e = (e, t) => e === t ? 0 : e == null ? 1 : t == null || e < t ? -1 : 1, t = (t, n) => [...t].sort((t, r) => e(t[n.column], r[n.column]) * (n.direction === "asc" ? 1 : -1)), n = () => {
|
|
3
3
|
let n;
|
|
4
4
|
return (r, i) => {
|
|
@@ -62,5 +62,4 @@ var e = (e, t) => e === t ? 0 : e == null ? 1 : t == null || e < t ? -1 : 1, t =
|
|
|
62
62
|
}, p;
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
//#endregion
|
|
66
65
|
export { n as createLiveRowSorter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/mutationConnectionSetup.ts
|
|
2
2
|
var e = /* @__PURE__ */ new WeakMap(), t = (t, n) => {
|
|
3
3
|
let r = Object.freeze({
|
|
4
4
|
apiName: t,
|
|
@@ -12,5 +12,4 @@ var e = /* @__PURE__ */ new WeakMap(), t = (t, n) => {
|
|
|
12
12
|
}, r = /* @__PURE__ */ new WeakMap(), i = (e, t) => {
|
|
13
13
|
r.set(e, t);
|
|
14
14
|
}, a = (e) => r.get(e)?.capture();
|
|
15
|
-
//#endregion
|
|
16
15
|
export { i as bindMutationConnectionSetup, a as captureMutationConnectionSetup, n as connectionSetupOwner, t as createConnectionSetupHandle };
|
package/dist/mutationIdentity.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Effect as e } from "effect";
|
|
2
2
|
import * as t from "effect/http/Headers";
|
|
3
3
|
import { RpcClient as n } from "effect/rpc";
|
|
4
|
-
|
|
4
|
+
// src/mutationIdentity.ts
|
|
5
5
|
var r = 0, i = () => {
|
|
6
6
|
let e = typeof crypto < "u" ? crypto : void 0;
|
|
7
7
|
return e && typeof e.randomUUID == "function" ? e.randomUUID() : `idem_${Date.now().toString(36)}_${r += 1}`;
|
|
8
8
|
}, a = (r, i) => r.pipe(e.updateService(n.CurrentHeaders, (e) => t.set(e, "idempotency-key", i)));
|
|
9
|
-
//#endregion
|
|
10
9
|
export { i as freshIdempotencyKey, a as withIdempotencyKey };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect as e, Semaphore as t } from "effect";
|
|
2
|
-
|
|
2
|
+
// src/mutationSerialExecution.ts
|
|
3
3
|
var n = class extends Error {
|
|
4
4
|
reason;
|
|
5
5
|
_tag = "MutationSerialExecutionError";
|
|
@@ -49,5 +49,4 @@ var n = class extends Error {
|
|
|
49
49
|
};
|
|
50
50
|
} };
|
|
51
51
|
};
|
|
52
|
-
//#endregion
|
|
53
52
|
export { n as MutationSerialExecutionError, r as makeMutationSerialExecution };
|
package/dist/mutationsBus.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/mutationsBus.ts
|
|
2
2
|
var e = [], t = /* @__PURE__ */ new Set(), n = [], r = () => {
|
|
3
3
|
n = e.slice();
|
|
4
4
|
}, i = () => {
|
|
@@ -36,5 +36,4 @@ var e = [], t = /* @__PURE__ */ new Set(), n = [], r = () => {
|
|
|
36
36
|
}), l = () => {
|
|
37
37
|
e.length !== 0 && (e.length = 0, i());
|
|
38
38
|
};
|
|
39
|
-
//#endregion
|
|
40
39
|
export { l as clearMutations, s as getMutations, o as settleMutation, a as startMutation, c as subscribeMutations };
|
package/dist/onlineSource.js
CHANGED
package/dist/outbox.js
CHANGED
|
@@ -7,7 +7,7 @@ import { withIdempotencyKey as o } from "./mutationIdentity.js";
|
|
|
7
7
|
import { useApiOnline as s } from "./useApiOnline.js";
|
|
8
8
|
import { OutboxState as c } from "./outboxState.js";
|
|
9
9
|
import { useCallback as l, useContext as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
10
|
-
|
|
10
|
+
// src/outbox.ts
|
|
11
11
|
var h = (e, t, n, r, i) => [...e, {
|
|
12
12
|
id: t,
|
|
13
13
|
tag: n,
|
|
@@ -209,5 +209,4 @@ var h = (e, t, n, r, i) => [...e, {
|
|
|
209
209
|
resolveConflict: ne
|
|
210
210
|
};
|
|
211
211
|
};
|
|
212
|
-
//#endregion
|
|
213
212
|
export { x as clearSent, C as defaultOutboxRetryDelay, h as enqueueEntry, y as markConflict, v as markFailed, _ as markSent, S as replayable, b as resolveConflictEntry, w as useOutbox };
|
package/dist/outboxHttp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { markConflict as e, markFailed as t, markSent as n, replayable as r } from "./outbox.js";
|
|
2
|
-
|
|
2
|
+
// src/outboxHttp.ts
|
|
3
3
|
var i = (e) => {
|
|
4
4
|
let t = e;
|
|
5
5
|
return t?.conflict === !0 || t?._tag === "UndoBoundaryError" && t?.boundary === "conflict";
|
|
@@ -100,5 +100,4 @@ var i = (e) => {
|
|
|
100
100
|
});
|
|
101
101
|
return r.sent + r.failed + r.conflicts > 0 && await t.save(r.queue), r;
|
|
102
102
|
};
|
|
103
|
-
//#endregion
|
|
104
103
|
export { s as OUTBOX_DB_NAME, p as OUTBOX_SYNC_TAG, m as drainOutboxInWorker, o as drainOutboxOverHttp, f as indexedDbOutboxPersistence, a as rpcHttpOutcome };
|
package/dist/outboxState.js
CHANGED
package/dist/permissions.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { scopeMembership as e } from "./scopeMembership.js";
|
|
2
2
|
import { createContext as t, createElement as n, useContext as r } from "react";
|
|
3
|
-
|
|
3
|
+
// src/permissions.tsx
|
|
4
4
|
var i = "admin:full", a = (e, t) => e.includes("admin:full") ? !0 : typeof t == "string" ? e.includes(t) : t.every((t) => e.includes(t)), o = (e, t) => t.length === 0 || e.includes("admin:full") ? !0 : t.some((t) => e.includes(t)), s = t({ scopes: [] });
|
|
5
5
|
function c(t) {
|
|
6
6
|
let r = e(t.scopes), i = r === void 0 ? { scopes: t.scopes } : {
|
|
@@ -16,5 +16,4 @@ var l = () => r(s), u = (e) => {
|
|
|
16
16
|
let t = r(s);
|
|
17
17
|
return t.membership === void 0 ? o(t.scopes, e) : e.length === 0 || t.membership.has("admin:full") || e.some((e) => t.membership.has(e));
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { i as ADMIN_SCOPE, c as PermissionProvider, a as canCall, o as canCallAny, u as useCan, d as useCanAny, l as usePermissions };
|