@xyo-network/react-payload-diviner 4.4.2 → 4.4.4
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/dist/browser/index.d.ts +47 -2
- package/package.json +14 -14
- package/dist/browser/contexts/DivinedPayload/Context.d.ts +0 -3
- package/dist/browser/contexts/DivinedPayload/Context.d.ts.map +0 -1
- package/dist/browser/contexts/DivinedPayload/Provider.d.ts +0 -9
- package/dist/browser/contexts/DivinedPayload/Provider.d.ts.map +0 -1
- package/dist/browser/contexts/DivinedPayload/State.d.ts +0 -9
- package/dist/browser/contexts/DivinedPayload/State.d.ts.map +0 -1
- package/dist/browser/contexts/DivinedPayload/index.d.ts +0 -5
- package/dist/browser/contexts/DivinedPayload/index.d.ts.map +0 -1
- package/dist/browser/contexts/DivinedPayload/use.d.ts +0 -2
- package/dist/browser/contexts/DivinedPayload/use.d.ts.map +0 -1
- package/dist/browser/contexts/PayloadDiviner/Context.d.ts +0 -4
- package/dist/browser/contexts/PayloadDiviner/Context.d.ts.map +0 -1
- package/dist/browser/contexts/PayloadDiviner/Provider.d.ts +0 -9
- package/dist/browser/contexts/PayloadDiviner/Provider.d.ts.map +0 -1
- package/dist/browser/contexts/PayloadDiviner/State.d.ts +0 -7
- package/dist/browser/contexts/PayloadDiviner/State.d.ts.map +0 -1
- package/dist/browser/contexts/PayloadDiviner/index.d.ts +0 -5
- package/dist/browser/contexts/PayloadDiviner/index.d.ts.map +0 -1
- package/dist/browser/contexts/PayloadDiviner/use.d.ts +0 -10
- package/dist/browser/contexts/PayloadDiviner/use.d.ts.map +0 -1
- package/dist/browser/contexts/index.d.ts +0 -3
- package/dist/browser/contexts/index.d.ts.map +0 -1
- package/dist/browser/index.d.ts.map +0 -1
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,2 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { Dispatch, PropsWithChildren } from 'react';
|
|
3
|
+
import * as _xyo_network_react_shared from '@xyo-network/react-shared';
|
|
4
|
+
import { ContextExState, ContextExProviderProps } from '@xyo-network/react-shared';
|
|
5
|
+
import * as _xyo_network_payload_model from '@xyo-network/payload-model';
|
|
6
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
7
|
+
import { PayloadDiviner } from '@xyo-network/diviner-payload-abstract';
|
|
8
|
+
import * as _xylabs_object from '@xylabs/object';
|
|
9
|
+
|
|
10
|
+
interface DivinedPayloadState extends ContextExState {
|
|
11
|
+
payload?: Payload | null;
|
|
12
|
+
payloadError?: Error;
|
|
13
|
+
setPayload?: Dispatch<Payload | null | undefined>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const DivinedPayloadContext: React.Context<DivinedPayloadState & _xyo_network_react_shared.ContextExState>;
|
|
17
|
+
|
|
18
|
+
interface DivinedPayloadProviderProps extends PropsWithChildren {
|
|
19
|
+
hash?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const DivinedPayloadProvider: React__default.FC<DivinedPayloadProviderProps>;
|
|
22
|
+
declare const DivinedPayloadWithHandleInner: React__default.FC<PropsWithChildren>;
|
|
23
|
+
declare const DivinedPayloadWithHandleProvider: React__default.FC<DivinedPayloadProviderProps>;
|
|
24
|
+
|
|
25
|
+
declare const useDivinedPayload: () => Omit<DivinedPayloadState & _xyo_network_react_shared.ContextExState, "provided">;
|
|
26
|
+
|
|
27
|
+
interface PayloadDivinerState {
|
|
28
|
+
diviner?: PayloadDiviner;
|
|
29
|
+
setDiviner?: Dispatch<PayloadDiviner>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare const PayloadDivinerContext: React.Context<PayloadDivinerState & _xyo_network_react_shared.ContextExState>;
|
|
33
|
+
|
|
34
|
+
type PayloadDivinerProviderProps = ContextExProviderProps<{
|
|
35
|
+
diviner?: PayloadDiviner;
|
|
36
|
+
}>;
|
|
37
|
+
declare const PayloadDivinerProvider: React__default.FC<PayloadDivinerProviderProps>;
|
|
38
|
+
|
|
39
|
+
declare const usePayloadDiviner: (required?: boolean) => Omit<PayloadDivinerState & _xyo_network_react_shared.ContextExState, "provided">;
|
|
40
|
+
declare const useDivinePayload: <T extends Payload = _xylabs_object.DeepRestrictToStringKeys<{
|
|
41
|
+
schema: _xyo_network_payload_model.Schema;
|
|
42
|
+
}>>(huri?: string) => [T | undefined | null, Dispatch<T | null | undefined>, Error | undefined];
|
|
43
|
+
declare const useDivinePayloads: <T extends Payload = _xylabs_object.DeepRestrictToStringKeys<{
|
|
44
|
+
schema: _xyo_network_payload_model.Schema;
|
|
45
|
+
}>>(huriList: string[]) => [(T | null)[] | undefined, Dispatch<(T | null)[] | undefined>, Error[] | undefined];
|
|
46
|
+
|
|
47
|
+
export { DivinedPayloadContext, DivinedPayloadProvider, type DivinedPayloadProviderProps, type DivinedPayloadState, DivinedPayloadWithHandleInner, DivinedPayloadWithHandleProvider, PayloadDivinerContext, PayloadDivinerProvider, type PayloadDivinerProviderProps, type PayloadDivinerState, useDivinePayload, useDivinePayloads, useDivinedPayload, usePayloadDiviner };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-payload-diviner",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.4",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -44,21 +44,21 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@xylabs/exists": "^4.5.1",
|
|
47
|
-
"@xylabs/react-async-effect": "^5.3.
|
|
48
|
-
"@xylabs/react-error": "^5.3.
|
|
49
|
-
"@xylabs/react-hooks": "^5.3.
|
|
50
|
-
"@xyo-network/diviner-huri": "^3.
|
|
51
|
-
"@xyo-network/diviner-payload-abstract": "^3.
|
|
52
|
-
"@xyo-network/payload-model": "^3.
|
|
53
|
-
"@xyo-network/react-payload-huri": "^4.4.
|
|
54
|
-
"@xyo-network/react-shared": "^4.4.
|
|
55
|
-
"react-router-dom": "^7.1.
|
|
47
|
+
"@xylabs/react-async-effect": "^5.3.23",
|
|
48
|
+
"@xylabs/react-error": "^5.3.23",
|
|
49
|
+
"@xylabs/react-hooks": "^5.3.23",
|
|
50
|
+
"@xyo-network/diviner-huri": "^3.9.2",
|
|
51
|
+
"@xyo-network/diviner-payload-abstract": "^3.9.2",
|
|
52
|
+
"@xyo-network/payload-model": "^3.9.2",
|
|
53
|
+
"@xyo-network/react-payload-huri": "^4.4.4",
|
|
54
|
+
"@xyo-network/react-shared": "^4.4.4",
|
|
55
|
+
"react-router-dom": "^7.1.5"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@mui/icons-material": "^6.4.
|
|
59
|
-
"@mui/material": "^6.4.
|
|
60
|
-
"@mui/styles": "^6.4.
|
|
61
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
58
|
+
"@mui/icons-material": "^6.4.4",
|
|
59
|
+
"@mui/material": "^6.4.4",
|
|
60
|
+
"@mui/styles": "^6.4.4",
|
|
61
|
+
"@xylabs/ts-scripts-yarn3": "^5.0.24",
|
|
62
62
|
"react": "^18.3.1",
|
|
63
63
|
"react-dom": "^18.3.1",
|
|
64
64
|
"typescript": "^5.7.3"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/Context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAErD,eAAO,MAAM,qBAAqB,mGAAyC,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { PropsWithChildren } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface DivinedPayloadProviderProps extends PropsWithChildren {
|
|
4
|
-
hash?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const DivinedPayloadProvider: React.FC<DivinedPayloadProviderProps>;
|
|
7
|
-
export declare const DivinedPayloadWithHandleInner: React.FC<PropsWithChildren>;
|
|
8
|
-
export declare const DivinedPayloadWithHandleProvider: React.FC<DivinedPayloadProviderProps>;
|
|
9
|
-
//# sourceMappingURL=Provider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/Provider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAkB,MAAM,OAAO,CAAA;AAOtC,MAAM,WAAW,2BAA4B,SAAQ,iBAAiB;IACpE,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAqBxE,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAerE,CAAA;AAED,eAAO,MAAM,gCAAgC,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAMlF,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Payload } from '@xyo-network/payload-model';
|
|
2
|
-
import type { ContextExState } from '@xyo-network/react-shared';
|
|
3
|
-
import type { Dispatch } from 'react';
|
|
4
|
-
export interface DivinedPayloadState extends ContextExState {
|
|
5
|
-
payload?: Payload | null;
|
|
6
|
-
payloadError?: Error;
|
|
7
|
-
setPayload?: Dispatch<Payload | null | undefined>;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=State.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAErC,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IACxB,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,UAAU,CAAC,EAAE,QAAQ,CAAC,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAA;CAClD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/use.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,uHAAoE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/PayloadDiviner/Context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAErD,QAAA,MAAM,qBAAqB,mGAAyC,CAAA;AAEpE,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { PayloadDiviner } from '@xyo-network/diviner-payload-abstract';
|
|
2
|
-
import type { ContextExProviderProps } from '@xyo-network/react-shared';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
export type PayloadDivinerProviderProps = ContextExProviderProps<{
|
|
5
|
-
/** Required */
|
|
6
|
-
diviner?: PayloadDiviner;
|
|
7
|
-
}>;
|
|
8
|
-
export declare const PayloadDivinerProvider: React.FC<PayloadDivinerProviderProps>;
|
|
9
|
-
//# sourceMappingURL=Provider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/PayloadDiviner/Provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAA;AAC3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,KAAkB,MAAM,OAAO,CAAA;AAItC,MAAM,MAAM,2BAA2B,GAAG,sBAAsB,CAAC;IAC/D,eAAe;IACf,OAAO,CAAC,EAAE,cAAc,CAAA;CACzB,CAAC,CAAA;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAoBxE,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { PayloadDiviner } from '@xyo-network/diviner-payload-abstract';
|
|
2
|
-
import type { Dispatch } from 'react';
|
|
3
|
-
export interface PayloadDivinerState {
|
|
4
|
-
diviner?: PayloadDiviner;
|
|
5
|
-
setDiviner?: Dispatch<PayloadDiviner>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=State.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/PayloadDiviner/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAA;AAC3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAErC,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,UAAU,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAA;CACtC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/contexts/PayloadDiviner/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Payload } from '@xyo-network/payload-model';
|
|
2
|
-
import type { Dispatch } from 'react';
|
|
3
|
-
export declare const usePayloadDiviner: (required?: boolean) => Omit<import("./State.ts").PayloadDivinerState & import("@xyo-network/react-shared").ContextExState, "provided">;
|
|
4
|
-
export declare const useDivinePayload: <T extends Payload = import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
5
|
-
schema: import("@xyo-network/payload-model").Schema;
|
|
6
|
-
}>>(huri?: string) => [T | undefined | null, Dispatch<T | null | undefined>, Error | undefined];
|
|
7
|
-
export declare const useDivinePayloads: <T extends Payload = import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
8
|
-
schema: import("@xyo-network/payload-model").Schema;
|
|
9
|
-
}>>(huriList: string[]) => [(T | null)[] | undefined, Dispatch<(T | null)[] | undefined>, Error[] | undefined];
|
|
10
|
-
//# sourceMappingURL=use.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/contexts/PayloadDiviner/use.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAKrC,eAAO,MAAM,iBAAiB,yIAE7B,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,OAAO;;WACzC,MAAM,KACZ,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,EAAE,QAAQ,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,KAAK,GAAG,SAAS,CAiC1E,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,OAAO;;cACvC,MAAM,EAAE,KACjB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,SAAS,CA4CpF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
|