@xyo-network/react-payload-diviner 2.41.26 → 2.41.28
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/cjs/contexts/DivinedPayload/Provider.js +3 -3
- package/dist/cjs/contexts/DivinedPayload/Provider.js.map +1 -1
- package/dist/cjs/contexts/DivinedPayload/index.d.ts +0 -1
- package/dist/cjs/contexts/DivinedPayload/index.d.ts.map +1 -1
- package/dist/cjs/contexts/DivinedPayload/index.js +0 -1
- package/dist/cjs/contexts/DivinedPayload/index.js.map +1 -1
- package/dist/docs.json +83 -136
- package/dist/esm/contexts/DivinedPayload/Provider.js +2 -2
- package/dist/esm/contexts/DivinedPayload/Provider.js.map +1 -1
- package/dist/esm/contexts/DivinedPayload/index.d.ts +0 -1
- package/dist/esm/contexts/DivinedPayload/index.d.ts.map +1 -1
- package/dist/esm/contexts/DivinedPayload/index.js +0 -1
- package/dist/esm/contexts/DivinedPayload/index.js.map +1 -1
- package/package.json +4 -4
- package/src/contexts/DivinedPayload/Provider.tsx +2 -2
- package/src/contexts/DivinedPayload/index.ts +0 -1
- package/dist/cjs/contexts/DivinedPayload/hooks/index.d.ts +0 -2
- package/dist/cjs/contexts/DivinedPayload/hooks/index.d.ts.map +0 -1
- package/dist/cjs/contexts/DivinedPayload/hooks/index.js +0 -5
- package/dist/cjs/contexts/DivinedPayload/hooks/index.js.map +0 -1
- package/dist/cjs/contexts/DivinedPayload/hooks/useBuildHuri.d.ts +0 -2
- package/dist/cjs/contexts/DivinedPayload/hooks/useBuildHuri.d.ts.map +0 -1
- package/dist/cjs/contexts/DivinedPayload/hooks/useBuildHuri.js +0 -15
- package/dist/cjs/contexts/DivinedPayload/hooks/useBuildHuri.js.map +0 -1
- package/dist/esm/contexts/DivinedPayload/hooks/index.d.ts +0 -2
- package/dist/esm/contexts/DivinedPayload/hooks/index.d.ts.map +0 -1
- package/dist/esm/contexts/DivinedPayload/hooks/index.js +0 -2
- package/dist/esm/contexts/DivinedPayload/hooks/index.js.map +0 -1
- package/dist/esm/contexts/DivinedPayload/hooks/useBuildHuri.d.ts +0 -2
- package/dist/esm/contexts/DivinedPayload/hooks/useBuildHuri.d.ts.map +0 -1
- package/dist/esm/contexts/DivinedPayload/hooks/useBuildHuri.js +0 -10
- package/dist/esm/contexts/DivinedPayload/hooks/useBuildHuri.js.map +0 -1
- package/src/contexts/DivinedPayload/hooks/index.ts +0 -1
- package/src/contexts/DivinedPayload/hooks/useBuildHuri.tsx +0 -12
|
@@ -5,18 +5,18 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const module_1 = require("@xyo-network/module");
|
|
7
7
|
const react_error_1 = require("@xyo-network/react-error");
|
|
8
|
+
const react_payload_huri_1 = require("@xyo-network/react-payload-huri");
|
|
8
9
|
const react_router_dom_1 = require("react-router-dom");
|
|
9
10
|
const PayloadDiviner_1 = require("../PayloadDiviner");
|
|
10
11
|
const Context_1 = require("./Context");
|
|
11
|
-
const hooks_1 = require("./hooks");
|
|
12
12
|
const use_1 = require("./use");
|
|
13
13
|
const DivinedPayloadProvider = ({ children, hash }) => {
|
|
14
14
|
const { hash: hashParam } = (0, react_router_dom_1.useParams)();
|
|
15
|
-
const huriFromHashParam = (0,
|
|
15
|
+
const huriFromHashParam = (0, react_payload_huri_1.useBuildHuri)(hashParam);
|
|
16
16
|
const [params] = (0, react_router_dom_1.useSearchParams)();
|
|
17
17
|
const huriSearchParameter = params.get('huri');
|
|
18
18
|
const decodedHuriParam = decodeURIComponent(huriSearchParameter !== null && huriSearchParameter !== void 0 ? huriSearchParameter : '');
|
|
19
|
-
const huriUri =
|
|
19
|
+
const huriUri = hash !== null && hash !== void 0 ? hash : (decodedHuriParam ? decodedHuriParam : huriFromHashParam);
|
|
20
20
|
const [payload, setPayload, payloadError] = (0, PayloadDiviner_1.useDivinePayload)(huriUri);
|
|
21
21
|
return (0, jsx_runtime_1.jsx)(Context_1.DivinedPayloadContext.Provider, Object.assign({ value: { payload, payloadError, provided: true, setPayload } }, { children: children }));
|
|
22
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/Provider.tsx"],"names":[],"mappings":";;;;;AACA,gDAAoD;AACpD,0DAAyD;AACzD,uDAA6D;AAE7D,sDAAoD;AACpD,uCAAiD;AACjD
|
|
1
|
+
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/Provider.tsx"],"names":[],"mappings":";;;;;AACA,gDAAoD;AACpD,0DAAyD;AACzD,wEAA8D;AAC9D,uDAA6D;AAE7D,sDAAoD;AACpD,uCAAiD;AACjD,+BAAyC;AAMlC,MAAM,sBAAsB,GAA0C,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE;IAClG,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAA,4BAAS,GAAE,CAAA;IAEvC,MAAM,iBAAiB,GAAG,IAAA,iCAAY,EAAC,SAAS,CAAC,CAAA;IAEjD,MAAM,CAAC,MAAM,CAAC,GAAG,IAAA,kCAAe,GAAE,CAAA;IAClC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAC9C,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,mBAAmB,aAAnB,mBAAmB,cAAnB,mBAAmB,GAAI,EAAE,CAAC,CAAA;IACtE,MAAM,OAAO,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAEjF,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,CAAC,GAAG,IAAA,iCAAgB,EAAC,OAAO,CAAC,CAAA;IAErE,OAAO,uBAAC,+BAAqB,CAAC,QAAQ,kBAAC,KAAK,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAG,QAAQ,IAAkC,CAAA;AAClJ,CAAC,CAAA;AAbY,QAAA,sBAAsB,0BAalC;AAEM,MAAM,6BAA6B,GAA2B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpF,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,uBAAiB,GAAE,CAAA;IAE5C,OAAO,CACL,uBAAC,4BAAc,kBACb,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,uBAAc,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,EAC3G,YAAY,EAAC,0BAA0B,gBAEtC,QAAQ,IACM,CAClB,CAAA;AACH,CAAC,CAAA;AAXY,QAAA,6BAA6B,iCAWzC;AAEM,MAAM,gCAAgC,GAA0C,CAAC,EAAsB,EAAE,EAAE;QAA1B,EAAE,QAAQ,OAAY,EAAP,KAAK,sBAApB,YAAsB,CAAF;IAC1G,OAAO,CACL,uBAAC,8BAAsB,oBAAK,KAAK,cAC/B,uBAAC,qCAA6B,cAAE,QAAQ,GAAiC,IAClD,CAC1B,CAAA;AACH,CAAC,CAAA;AANY,QAAA,gCAAgC,oCAM5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./Context"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./hooks"), exports);
|
|
6
5
|
tslib_1.__exportStar(require("./Provider"), exports);
|
|
7
6
|
tslib_1.__exportStar(require("./use"), exports);
|
|
8
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/index.ts"],"names":[],"mappings":";;;AAAA,oDAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/index.ts"],"names":[],"mappings":";;;AAAA,oDAAyB;AACzB,qDAA0B;AAC1B,gDAAqB"}
|
package/dist/docs.json
CHANGED
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
"originalName": "",
|
|
8
8
|
"children": [
|
|
9
9
|
{
|
|
10
|
-
"id":
|
|
10
|
+
"id": 24,
|
|
11
11
|
"name": "PayloadDivinerState",
|
|
12
12
|
"kind": 256,
|
|
13
13
|
"kindString": "Interface",
|
|
14
14
|
"flags": {},
|
|
15
15
|
"children": [
|
|
16
16
|
{
|
|
17
|
-
"id":
|
|
17
|
+
"id": 25,
|
|
18
18
|
"name": "diviner",
|
|
19
19
|
"kind": 1024,
|
|
20
20
|
"kindString": "Property",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/State.ts",
|
|
27
27
|
"line": 5,
|
|
28
28
|
"character": 2,
|
|
29
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
29
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/State.ts#L5"
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
32
|
"type": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
{
|
|
51
51
|
"type": "reflection",
|
|
52
52
|
"declaration": {
|
|
53
|
-
"id":
|
|
53
|
+
"id": 26,
|
|
54
54
|
"name": "__type",
|
|
55
55
|
"kind": 65536,
|
|
56
56
|
"kindString": "Type literal",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
{
|
|
68
68
|
"type": "reflection",
|
|
69
69
|
"declaration": {
|
|
70
|
-
"id":
|
|
70
|
+
"id": 27,
|
|
71
71
|
"name": "__type",
|
|
72
72
|
"kind": 65536,
|
|
73
73
|
"kindString": "Type literal",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
{
|
|
85
85
|
"type": "reflection",
|
|
86
86
|
"declaration": {
|
|
87
|
-
"id":
|
|
87
|
+
"id": 28,
|
|
88
88
|
"name": "__type",
|
|
89
89
|
"kind": 65536,
|
|
90
90
|
"kindString": "Type literal",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
|
-
"id":
|
|
110
|
+
"id": 29,
|
|
111
111
|
"name": "setDiviner",
|
|
112
112
|
"kind": 1024,
|
|
113
113
|
"kindString": "Property",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/State.ts",
|
|
120
120
|
"line": 6,
|
|
121
121
|
"character": 2,
|
|
122
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
122
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/State.ts#L6"
|
|
123
123
|
}
|
|
124
124
|
],
|
|
125
125
|
"type": {
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
{
|
|
147
147
|
"type": "reflection",
|
|
148
148
|
"declaration": {
|
|
149
|
-
"id":
|
|
149
|
+
"id": 30,
|
|
150
150
|
"name": "__type",
|
|
151
151
|
"kind": 65536,
|
|
152
152
|
"kindString": "Type literal",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
{
|
|
164
164
|
"type": "reflection",
|
|
165
165
|
"declaration": {
|
|
166
|
-
"id":
|
|
166
|
+
"id": 31,
|
|
167
167
|
"name": "__type",
|
|
168
168
|
"kind": 65536,
|
|
169
169
|
"kindString": "Type literal",
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
{
|
|
181
181
|
"type": "reflection",
|
|
182
182
|
"declaration": {
|
|
183
|
-
"id":
|
|
183
|
+
"id": 32,
|
|
184
184
|
"name": "__type",
|
|
185
185
|
"kind": 65536,
|
|
186
186
|
"kindString": "Type literal",
|
|
@@ -212,8 +212,8 @@
|
|
|
212
212
|
{
|
|
213
213
|
"title": "Properties",
|
|
214
214
|
"children": [
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
25,
|
|
216
|
+
29
|
|
217
217
|
]
|
|
218
218
|
}
|
|
219
219
|
],
|
|
@@ -222,12 +222,12 @@
|
|
|
222
222
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/State.ts",
|
|
223
223
|
"line": 4,
|
|
224
224
|
"character": 17,
|
|
225
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
225
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/State.ts#L4"
|
|
226
226
|
}
|
|
227
227
|
]
|
|
228
228
|
},
|
|
229
229
|
{
|
|
230
|
-
"id":
|
|
230
|
+
"id": 17,
|
|
231
231
|
"name": "PayloadDivinerProviderProps",
|
|
232
232
|
"kind": 4194304,
|
|
233
233
|
"kindString": "Type alias",
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/Provider.tsx",
|
|
238
238
|
"line": 7,
|
|
239
239
|
"character": 12,
|
|
240
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
240
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/Provider.tsx#L7"
|
|
241
241
|
}
|
|
242
242
|
],
|
|
243
243
|
"type": {
|
|
@@ -246,14 +246,14 @@
|
|
|
246
246
|
{
|
|
247
247
|
"type": "reflection",
|
|
248
248
|
"declaration": {
|
|
249
|
-
"id":
|
|
249
|
+
"id": 18,
|
|
250
250
|
"name": "__type",
|
|
251
251
|
"kind": 65536,
|
|
252
252
|
"kindString": "Type literal",
|
|
253
253
|
"flags": {},
|
|
254
254
|
"children": [
|
|
255
255
|
{
|
|
256
|
-
"id":
|
|
256
|
+
"id": 19,
|
|
257
257
|
"name": "diviner",
|
|
258
258
|
"kind": 1024,
|
|
259
259
|
"kindString": "Property",
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/Provider.tsx",
|
|
274
274
|
"line": 9,
|
|
275
275
|
"character": 2,
|
|
276
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
276
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/Provider.tsx#L9"
|
|
277
277
|
}
|
|
278
278
|
],
|
|
279
279
|
"type": {
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
{
|
|
289
289
|
"title": "Properties",
|
|
290
290
|
"children": [
|
|
291
|
-
|
|
291
|
+
19
|
|
292
292
|
]
|
|
293
293
|
}
|
|
294
294
|
],
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/Provider.tsx",
|
|
298
298
|
"line": 7,
|
|
299
299
|
"character": 65,
|
|
300
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
300
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/Provider.tsx#L7"
|
|
301
301
|
}
|
|
302
302
|
]
|
|
303
303
|
}
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/DivinedPayload/Context.tsx",
|
|
320
320
|
"line": 5,
|
|
321
321
|
"character": 13,
|
|
322
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
322
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/DivinedPayload/Context.tsx#L5"
|
|
323
323
|
}
|
|
324
324
|
],
|
|
325
325
|
"type": {
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
"defaultValue": "..."
|
|
347
347
|
},
|
|
348
348
|
{
|
|
349
|
-
"id":
|
|
349
|
+
"id": 16,
|
|
350
350
|
"name": "PayloadDivinerContext",
|
|
351
351
|
"kind": 32,
|
|
352
352
|
"kindString": "Variable",
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/Context.ts",
|
|
359
359
|
"line": 5,
|
|
360
360
|
"character": 6,
|
|
361
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
361
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/Context.ts#L5"
|
|
362
362
|
}
|
|
363
363
|
],
|
|
364
364
|
"type": {
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
"types": [
|
|
370
370
|
{
|
|
371
371
|
"type": "reference",
|
|
372
|
-
"id":
|
|
372
|
+
"id": 24,
|
|
373
373
|
"name": "PayloadDivinerState"
|
|
374
374
|
},
|
|
375
375
|
{
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
"defaultValue": "..."
|
|
387
387
|
},
|
|
388
388
|
{
|
|
389
|
-
"id":
|
|
389
|
+
"id": 2,
|
|
390
390
|
"name": "DivinedPayloadProvider",
|
|
391
391
|
"kind": 64,
|
|
392
392
|
"kindString": "Function",
|
|
@@ -396,19 +396,19 @@
|
|
|
396
396
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/DivinedPayload/Provider.tsx",
|
|
397
397
|
"line": 15,
|
|
398
398
|
"character": 13,
|
|
399
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
399
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/DivinedPayload/Provider.tsx#L15"
|
|
400
400
|
}
|
|
401
401
|
],
|
|
402
402
|
"signatures": [
|
|
403
403
|
{
|
|
404
|
-
"id":
|
|
404
|
+
"id": 3,
|
|
405
405
|
"name": "DivinedPayloadProvider",
|
|
406
406
|
"kind": 4096,
|
|
407
407
|
"kindString": "Call signature",
|
|
408
408
|
"flags": {},
|
|
409
409
|
"parameters": [
|
|
410
410
|
{
|
|
411
|
-
"id":
|
|
411
|
+
"id": 4,
|
|
412
412
|
"name": "props",
|
|
413
413
|
"kind": 32768,
|
|
414
414
|
"kindString": "Parameter",
|
|
@@ -419,7 +419,7 @@
|
|
|
419
419
|
}
|
|
420
420
|
},
|
|
421
421
|
{
|
|
422
|
-
"id":
|
|
422
|
+
"id": 5,
|
|
423
423
|
"name": "context",
|
|
424
424
|
"kind": 32768,
|
|
425
425
|
"kindString": "Parameter",
|
|
@@ -461,7 +461,7 @@
|
|
|
461
461
|
]
|
|
462
462
|
},
|
|
463
463
|
{
|
|
464
|
-
"id":
|
|
464
|
+
"id": 6,
|
|
465
465
|
"name": "DivinedPayloadWithHandleInner",
|
|
466
466
|
"kind": 64,
|
|
467
467
|
"kindString": "Function",
|
|
@@ -471,19 +471,19 @@
|
|
|
471
471
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/DivinedPayload/Provider.tsx",
|
|
472
472
|
"line": 30,
|
|
473
473
|
"character": 13,
|
|
474
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
474
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/DivinedPayload/Provider.tsx#L30"
|
|
475
475
|
}
|
|
476
476
|
],
|
|
477
477
|
"signatures": [
|
|
478
478
|
{
|
|
479
|
-
"id":
|
|
479
|
+
"id": 7,
|
|
480
480
|
"name": "DivinedPayloadWithHandleInner",
|
|
481
481
|
"kind": 4096,
|
|
482
482
|
"kindString": "Call signature",
|
|
483
483
|
"flags": {},
|
|
484
484
|
"parameters": [
|
|
485
485
|
{
|
|
486
|
-
"id":
|
|
486
|
+
"id": 8,
|
|
487
487
|
"name": "props",
|
|
488
488
|
"kind": 32768,
|
|
489
489
|
"kindString": "Parameter",
|
|
@@ -502,7 +502,7 @@
|
|
|
502
502
|
}
|
|
503
503
|
},
|
|
504
504
|
{
|
|
505
|
-
"id":
|
|
505
|
+
"id": 9,
|
|
506
506
|
"name": "context",
|
|
507
507
|
"kind": 32768,
|
|
508
508
|
"kindString": "Parameter",
|
|
@@ -544,7 +544,7 @@
|
|
|
544
544
|
]
|
|
545
545
|
},
|
|
546
546
|
{
|
|
547
|
-
"id":
|
|
547
|
+
"id": 10,
|
|
548
548
|
"name": "DivinedPayloadWithHandleProvider",
|
|
549
549
|
"kind": 64,
|
|
550
550
|
"kindString": "Function",
|
|
@@ -554,19 +554,19 @@
|
|
|
554
554
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/DivinedPayload/Provider.tsx",
|
|
555
555
|
"line": 43,
|
|
556
556
|
"character": 13,
|
|
557
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
557
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/DivinedPayload/Provider.tsx#L43"
|
|
558
558
|
}
|
|
559
559
|
],
|
|
560
560
|
"signatures": [
|
|
561
561
|
{
|
|
562
|
-
"id":
|
|
562
|
+
"id": 11,
|
|
563
563
|
"name": "DivinedPayloadWithHandleProvider",
|
|
564
564
|
"kind": 4096,
|
|
565
565
|
"kindString": "Call signature",
|
|
566
566
|
"flags": {},
|
|
567
567
|
"parameters": [
|
|
568
568
|
{
|
|
569
|
-
"id":
|
|
569
|
+
"id": 12,
|
|
570
570
|
"name": "props",
|
|
571
571
|
"kind": 32768,
|
|
572
572
|
"kindString": "Parameter",
|
|
@@ -577,7 +577,7 @@
|
|
|
577
577
|
}
|
|
578
578
|
},
|
|
579
579
|
{
|
|
580
|
-
"id":
|
|
580
|
+
"id": 13,
|
|
581
581
|
"name": "context",
|
|
582
582
|
"kind": 32768,
|
|
583
583
|
"kindString": "Parameter",
|
|
@@ -619,7 +619,7 @@
|
|
|
619
619
|
]
|
|
620
620
|
},
|
|
621
621
|
{
|
|
622
|
-
"id":
|
|
622
|
+
"id": 20,
|
|
623
623
|
"name": "PayloadDivinerProvider",
|
|
624
624
|
"kind": 64,
|
|
625
625
|
"kindString": "Function",
|
|
@@ -629,31 +629,31 @@
|
|
|
629
629
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/Provider.tsx",
|
|
630
630
|
"line": 12,
|
|
631
631
|
"character": 13,
|
|
632
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
632
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/Provider.tsx#L12"
|
|
633
633
|
}
|
|
634
634
|
],
|
|
635
635
|
"signatures": [
|
|
636
636
|
{
|
|
637
|
-
"id":
|
|
637
|
+
"id": 21,
|
|
638
638
|
"name": "PayloadDivinerProvider",
|
|
639
639
|
"kind": 4096,
|
|
640
640
|
"kindString": "Call signature",
|
|
641
641
|
"flags": {},
|
|
642
642
|
"parameters": [
|
|
643
643
|
{
|
|
644
|
-
"id":
|
|
644
|
+
"id": 22,
|
|
645
645
|
"name": "props",
|
|
646
646
|
"kind": 32768,
|
|
647
647
|
"kindString": "Parameter",
|
|
648
648
|
"flags": {},
|
|
649
649
|
"type": {
|
|
650
650
|
"type": "reference",
|
|
651
|
-
"id":
|
|
651
|
+
"id": 17,
|
|
652
652
|
"name": "PayloadDivinerProviderProps"
|
|
653
653
|
}
|
|
654
654
|
},
|
|
655
655
|
{
|
|
656
|
-
"id":
|
|
656
|
+
"id": 23,
|
|
657
657
|
"name": "context",
|
|
658
658
|
"kind": 32768,
|
|
659
659
|
"kindString": "Parameter",
|
|
@@ -695,59 +695,7 @@
|
|
|
695
695
|
]
|
|
696
696
|
},
|
|
697
697
|
{
|
|
698
|
-
"id":
|
|
699
|
-
"name": "useBuildHuri",
|
|
700
|
-
"kind": 64,
|
|
701
|
-
"kindString": "Function",
|
|
702
|
-
"flags": {},
|
|
703
|
-
"sources": [
|
|
704
|
-
{
|
|
705
|
-
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/DivinedPayload/hooks/useBuildHuri.tsx",
|
|
706
|
-
"line": 3,
|
|
707
|
-
"character": 13,
|
|
708
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/6c65f786a/packages/sdk/packages/payload/packages/diviner/src/contexts/DivinedPayload/hooks/useBuildHuri.tsx#L3"
|
|
709
|
-
}
|
|
710
|
-
],
|
|
711
|
-
"signatures": [
|
|
712
|
-
{
|
|
713
|
-
"id": 3,
|
|
714
|
-
"name": "useBuildHuri",
|
|
715
|
-
"kind": 4096,
|
|
716
|
-
"kindString": "Call signature",
|
|
717
|
-
"flags": {},
|
|
718
|
-
"parameters": [
|
|
719
|
-
{
|
|
720
|
-
"id": 4,
|
|
721
|
-
"name": "hash",
|
|
722
|
-
"kind": 32768,
|
|
723
|
-
"kindString": "Parameter",
|
|
724
|
-
"flags": {
|
|
725
|
-
"isOptional": true
|
|
726
|
-
},
|
|
727
|
-
"type": {
|
|
728
|
-
"type": "intrinsic",
|
|
729
|
-
"name": "string"
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
],
|
|
733
|
-
"type": {
|
|
734
|
-
"type": "union",
|
|
735
|
-
"types": [
|
|
736
|
-
{
|
|
737
|
-
"type": "intrinsic",
|
|
738
|
-
"name": "undefined"
|
|
739
|
-
},
|
|
740
|
-
{
|
|
741
|
-
"type": "intrinsic",
|
|
742
|
-
"name": "string"
|
|
743
|
-
}
|
|
744
|
-
]
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
]
|
|
748
|
-
},
|
|
749
|
-
{
|
|
750
|
-
"id": 39,
|
|
698
|
+
"id": 36,
|
|
751
699
|
"name": "useDivinePayload",
|
|
752
700
|
"kind": 64,
|
|
753
701
|
"kindString": "Function",
|
|
@@ -757,19 +705,19 @@
|
|
|
757
705
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/use.ts",
|
|
758
706
|
"line": 14,
|
|
759
707
|
"character": 13,
|
|
760
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
708
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/use.ts#L14"
|
|
761
709
|
}
|
|
762
710
|
],
|
|
763
711
|
"signatures": [
|
|
764
712
|
{
|
|
765
|
-
"id":
|
|
713
|
+
"id": 37,
|
|
766
714
|
"name": "useDivinePayload",
|
|
767
715
|
"kind": 4096,
|
|
768
716
|
"kindString": "Call signature",
|
|
769
717
|
"flags": {},
|
|
770
718
|
"typeParameter": [
|
|
771
719
|
{
|
|
772
|
-
"id":
|
|
720
|
+
"id": 40,
|
|
773
721
|
"name": "T",
|
|
774
722
|
"kind": 131072,
|
|
775
723
|
"kindString": "Type parameter",
|
|
@@ -792,7 +740,7 @@
|
|
|
792
740
|
{
|
|
793
741
|
"type": "reflection",
|
|
794
742
|
"declaration": {
|
|
795
|
-
"id":
|
|
743
|
+
"id": 38,
|
|
796
744
|
"name": "__type",
|
|
797
745
|
"kind": 65536,
|
|
798
746
|
"kindString": "Type literal",
|
|
@@ -826,7 +774,7 @@
|
|
|
826
774
|
{
|
|
827
775
|
"type": "reflection",
|
|
828
776
|
"declaration": {
|
|
829
|
-
"id":
|
|
777
|
+
"id": 39,
|
|
830
778
|
"name": "__type",
|
|
831
779
|
"kind": 65536,
|
|
832
780
|
"kindString": "Type literal",
|
|
@@ -846,7 +794,7 @@
|
|
|
846
794
|
],
|
|
847
795
|
"parameters": [
|
|
848
796
|
{
|
|
849
|
-
"id":
|
|
797
|
+
"id": 41,
|
|
850
798
|
"name": "huri",
|
|
851
799
|
"kind": 32768,
|
|
852
800
|
"kindString": "Parameter",
|
|
@@ -875,7 +823,7 @@
|
|
|
875
823
|
},
|
|
876
824
|
{
|
|
877
825
|
"type": "reference",
|
|
878
|
-
"id":
|
|
826
|
+
"id": 40,
|
|
879
827
|
"name": "T"
|
|
880
828
|
}
|
|
881
829
|
]
|
|
@@ -896,7 +844,7 @@
|
|
|
896
844
|
},
|
|
897
845
|
{
|
|
898
846
|
"type": "reference",
|
|
899
|
-
"id":
|
|
847
|
+
"id": 40,
|
|
900
848
|
"name": "T"
|
|
901
849
|
}
|
|
902
850
|
]
|
|
@@ -927,7 +875,7 @@
|
|
|
927
875
|
]
|
|
928
876
|
},
|
|
929
877
|
{
|
|
930
|
-
"id":
|
|
878
|
+
"id": 42,
|
|
931
879
|
"name": "useDivinePayloads",
|
|
932
880
|
"kind": 64,
|
|
933
881
|
"kindString": "Function",
|
|
@@ -937,19 +885,19 @@
|
|
|
937
885
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/use.ts",
|
|
938
886
|
"line": 51,
|
|
939
887
|
"character": 13,
|
|
940
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
888
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/use.ts#L51"
|
|
941
889
|
}
|
|
942
890
|
],
|
|
943
891
|
"signatures": [
|
|
944
892
|
{
|
|
945
|
-
"id":
|
|
893
|
+
"id": 43,
|
|
946
894
|
"name": "useDivinePayloads",
|
|
947
895
|
"kind": 4096,
|
|
948
896
|
"kindString": "Call signature",
|
|
949
897
|
"flags": {},
|
|
950
898
|
"typeParameter": [
|
|
951
899
|
{
|
|
952
|
-
"id":
|
|
900
|
+
"id": 46,
|
|
953
901
|
"name": "T",
|
|
954
902
|
"kind": 131072,
|
|
955
903
|
"kindString": "Type parameter",
|
|
@@ -972,7 +920,7 @@
|
|
|
972
920
|
{
|
|
973
921
|
"type": "reflection",
|
|
974
922
|
"declaration": {
|
|
975
|
-
"id":
|
|
923
|
+
"id": 44,
|
|
976
924
|
"name": "__type",
|
|
977
925
|
"kind": 65536,
|
|
978
926
|
"kindString": "Type literal",
|
|
@@ -1006,7 +954,7 @@
|
|
|
1006
954
|
{
|
|
1007
955
|
"type": "reflection",
|
|
1008
956
|
"declaration": {
|
|
1009
|
-
"id":
|
|
957
|
+
"id": 45,
|
|
1010
958
|
"name": "__type",
|
|
1011
959
|
"kind": 65536,
|
|
1012
960
|
"kindString": "Type literal",
|
|
@@ -1026,7 +974,7 @@
|
|
|
1026
974
|
],
|
|
1027
975
|
"parameters": [
|
|
1028
976
|
{
|
|
1029
|
-
"id":
|
|
977
|
+
"id": 47,
|
|
1030
978
|
"name": "huriList",
|
|
1031
979
|
"kind": 32768,
|
|
1032
980
|
"kindString": "Parameter",
|
|
@@ -1061,7 +1009,7 @@
|
|
|
1061
1009
|
},
|
|
1062
1010
|
{
|
|
1063
1011
|
"type": "reference",
|
|
1064
|
-
"id":
|
|
1012
|
+
"id": 46,
|
|
1065
1013
|
"name": "T"
|
|
1066
1014
|
}
|
|
1067
1015
|
]
|
|
@@ -1090,7 +1038,7 @@
|
|
|
1090
1038
|
},
|
|
1091
1039
|
{
|
|
1092
1040
|
"type": "reference",
|
|
1093
|
-
"id":
|
|
1041
|
+
"id": 46,
|
|
1094
1042
|
"name": "T"
|
|
1095
1043
|
}
|
|
1096
1044
|
]
|
|
@@ -1127,7 +1075,7 @@
|
|
|
1127
1075
|
]
|
|
1128
1076
|
},
|
|
1129
1077
|
{
|
|
1130
|
-
"id":
|
|
1078
|
+
"id": 14,
|
|
1131
1079
|
"name": "useDivinedPayload",
|
|
1132
1080
|
"kind": 64,
|
|
1133
1081
|
"kindString": "Function",
|
|
@@ -1137,12 +1085,12 @@
|
|
|
1137
1085
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/DivinedPayload/use.ts",
|
|
1138
1086
|
"line": 5,
|
|
1139
1087
|
"character": 13,
|
|
1140
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
1088
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/DivinedPayload/use.ts#L5"
|
|
1141
1089
|
}
|
|
1142
1090
|
],
|
|
1143
1091
|
"signatures": [
|
|
1144
1092
|
{
|
|
1145
|
-
"id":
|
|
1093
|
+
"id": 15,
|
|
1146
1094
|
"name": "useDivinedPayload",
|
|
1147
1095
|
"kind": 4096,
|
|
1148
1096
|
"kindString": "Call signature",
|
|
@@ -1176,7 +1124,7 @@
|
|
|
1176
1124
|
]
|
|
1177
1125
|
},
|
|
1178
1126
|
{
|
|
1179
|
-
"id":
|
|
1127
|
+
"id": 33,
|
|
1180
1128
|
"name": "usePayloadDiviner",
|
|
1181
1129
|
"kind": 64,
|
|
1182
1130
|
"kindString": "Function",
|
|
@@ -1186,19 +1134,19 @@
|
|
|
1186
1134
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/use.ts",
|
|
1187
1135
|
"line": 10,
|
|
1188
1136
|
"character": 13,
|
|
1189
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
1137
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/contexts/PayloadDiviner/use.ts#L10"
|
|
1190
1138
|
}
|
|
1191
1139
|
],
|
|
1192
1140
|
"signatures": [
|
|
1193
1141
|
{
|
|
1194
|
-
"id":
|
|
1142
|
+
"id": 34,
|
|
1195
1143
|
"name": "usePayloadDiviner",
|
|
1196
1144
|
"kind": 4096,
|
|
1197
1145
|
"kindString": "Call signature",
|
|
1198
1146
|
"flags": {},
|
|
1199
1147
|
"parameters": [
|
|
1200
1148
|
{
|
|
1201
|
-
"id":
|
|
1149
|
+
"id": 35,
|
|
1202
1150
|
"name": "required",
|
|
1203
1151
|
"kind": 32768,
|
|
1204
1152
|
"kindString": "Parameter",
|
|
@@ -1218,7 +1166,7 @@
|
|
|
1218
1166
|
"types": [
|
|
1219
1167
|
{
|
|
1220
1168
|
"type": "reference",
|
|
1221
|
-
"id":
|
|
1169
|
+
"id": 24,
|
|
1222
1170
|
"name": "PayloadDivinerState"
|
|
1223
1171
|
},
|
|
1224
1172
|
{
|
|
@@ -1244,34 +1192,33 @@
|
|
|
1244
1192
|
{
|
|
1245
1193
|
"title": "Interfaces",
|
|
1246
1194
|
"children": [
|
|
1247
|
-
|
|
1195
|
+
24
|
|
1248
1196
|
]
|
|
1249
1197
|
},
|
|
1250
1198
|
{
|
|
1251
1199
|
"title": "Type Aliases",
|
|
1252
1200
|
"children": [
|
|
1253
|
-
|
|
1201
|
+
17
|
|
1254
1202
|
]
|
|
1255
1203
|
},
|
|
1256
1204
|
{
|
|
1257
1205
|
"title": "Variables",
|
|
1258
1206
|
"children": [
|
|
1259
1207
|
1,
|
|
1260
|
-
|
|
1208
|
+
16
|
|
1261
1209
|
]
|
|
1262
1210
|
},
|
|
1263
1211
|
{
|
|
1264
1212
|
"title": "Functions",
|
|
1265
1213
|
"children": [
|
|
1266
|
-
5,
|
|
1267
|
-
9,
|
|
1268
|
-
13,
|
|
1269
|
-
23,
|
|
1270
1214
|
2,
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
36
|
|
1215
|
+
6,
|
|
1216
|
+
10,
|
|
1217
|
+
20,
|
|
1218
|
+
36,
|
|
1219
|
+
42,
|
|
1220
|
+
14,
|
|
1221
|
+
33
|
|
1275
1222
|
]
|
|
1276
1223
|
}
|
|
1277
1224
|
],
|
|
@@ -1280,7 +1227,7 @@
|
|
|
1280
1227
|
"fileName": "packages/sdk/packages/payload/packages/diviner/src/index.ts",
|
|
1281
1228
|
"line": 1,
|
|
1282
1229
|
"character": 0,
|
|
1283
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
1230
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/08f06386a/packages/sdk/packages/payload/packages/diviner/src/index.ts#L1"
|
|
1284
1231
|
}
|
|
1285
1232
|
]
|
|
1286
1233
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { XyoErrorSchema } from '@xyo-network/module';
|
|
3
3
|
import { XyoErrorRender } from '@xyo-network/react-error';
|
|
4
|
+
import { useBuildHuri } from '@xyo-network/react-payload-huri';
|
|
4
5
|
import { useParams, useSearchParams } from 'react-router-dom';
|
|
5
6
|
import { useDivinePayload } from '../PayloadDiviner';
|
|
6
7
|
import { DivinedPayloadContext } from './Context';
|
|
7
|
-
import { useBuildHuri } from './hooks';
|
|
8
8
|
import { useDivinedPayload } from './use';
|
|
9
9
|
export const DivinedPayloadProvider = ({ children, hash }) => {
|
|
10
10
|
const { hash: hashParam } = useParams();
|
|
@@ -12,7 +12,7 @@ export const DivinedPayloadProvider = ({ children, hash }) => {
|
|
|
12
12
|
const [params] = useSearchParams();
|
|
13
13
|
const huriSearchParameter = params.get('huri');
|
|
14
14
|
const decodedHuriParam = decodeURIComponent(huriSearchParameter ?? '');
|
|
15
|
-
const huriUri = hash ?? decodedHuriParam ? decodedHuriParam : huriFromHashParam;
|
|
15
|
+
const huriUri = hash ?? (decodedHuriParam ? decodedHuriParam : huriFromHashParam);
|
|
16
16
|
const [payload, setPayload, payloadError] = useDivinePayload(huriUri);
|
|
17
17
|
return _jsx(DivinedPayloadContext.Provider, { value: { payload, payloadError, provided: true, setPayload }, children: children });
|
|
18
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/Provider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/Provider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAMzC,MAAM,CAAC,MAAM,sBAAsB,GAA0C,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE;IAClG,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAAA;IAEvC,MAAM,iBAAiB,GAAG,YAAY,CAAC,SAAS,CAAC,CAAA;IAEjD,MAAM,CAAC,MAAM,CAAC,GAAG,eAAe,EAAE,CAAA;IAClC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAC9C,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAA;IACtE,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAEjF,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAErE,OAAO,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,YAAG,QAAQ,GAAkC,CAAA;AAClJ,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,6BAA6B,GAA2B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpF,MAAM,EAAE,YAAY,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAE5C,OAAO,CACL,KAAC,cAAc,IACb,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,EAC3G,YAAY,EAAC,0BAA0B,YAEtC,QAAQ,GACM,CAClB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,gCAAgC,GAA0C,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAChH,OAAO,CACL,KAAC,sBAAsB,OAAK,KAAK,YAC/B,KAAC,6BAA6B,cAAE,QAAQ,GAAiC,GAClD,CAC1B,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/contexts/DivinedPayload/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA"}
|
package/package.json
CHANGED
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"@xyo-network/diviner": "^2.43.6",
|
|
15
15
|
"@xyo-network/module": "^2.43.6",
|
|
16
16
|
"@xyo-network/payload-model": "^2.43.6",
|
|
17
|
-
"@xyo-network/react-error": "^2.41.
|
|
18
|
-
"@xyo-network/react-
|
|
19
|
-
"@xyo-network/react-shared": "^2.41.
|
|
17
|
+
"@xyo-network/react-error": "^2.41.28",
|
|
18
|
+
"@xyo-network/react-payload-huri": "^2.41.28",
|
|
19
|
+
"@xyo-network/react-shared": "^2.41.28",
|
|
20
20
|
"lodash": "^4.17.21"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
},
|
|
74
74
|
"sideEffects": false,
|
|
75
75
|
"types": "dist/esm/index.d.ts",
|
|
76
|
-
"version": "2.41.
|
|
76
|
+
"version": "2.41.28"
|
|
77
77
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { WithChildren } from '@xylabs/react-shared'
|
|
2
2
|
import { XyoErrorSchema } from '@xyo-network/module'
|
|
3
3
|
import { XyoErrorRender } from '@xyo-network/react-error'
|
|
4
|
+
import { useBuildHuri } from '@xyo-network/react-payload-huri'
|
|
4
5
|
import { useParams, useSearchParams } from 'react-router-dom'
|
|
5
6
|
|
|
6
7
|
import { useDivinePayload } from '../PayloadDiviner'
|
|
7
8
|
import { DivinedPayloadContext } from './Context'
|
|
8
|
-
import { useBuildHuri } from './hooks'
|
|
9
9
|
import { useDivinedPayload } from './use'
|
|
10
10
|
|
|
11
11
|
interface DivinedPayloadProviderProps extends WithChildren {
|
|
@@ -20,7 +20,7 @@ export const DivinedPayloadProvider: React.FC<DivinedPayloadProviderProps> = ({
|
|
|
20
20
|
const [params] = useSearchParams()
|
|
21
21
|
const huriSearchParameter = params.get('huri')
|
|
22
22
|
const decodedHuriParam = decodeURIComponent(huriSearchParameter ?? '')
|
|
23
|
-
const huriUri = hash ?? decodedHuriParam ? decodedHuriParam : huriFromHashParam
|
|
23
|
+
const huriUri = hash ?? (decodedHuriParam ? decodedHuriParam : huriFromHashParam)
|
|
24
24
|
|
|
25
25
|
const [payload, setPayload, payloadError] = useDivinePayload(huriUri)
|
|
26
26
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/contexts/DivinedPayload/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/contexts/DivinedPayload/hooks/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBuildHuri.d.ts","sourceRoot":"","sources":["../../../../../src/contexts/DivinedPayload/hooks/useBuildHuri.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,UAAW,MAAM,uBASzC,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useBuildHuri = void 0;
|
|
4
|
-
const react_network_1 = require("@xyo-network/react-network");
|
|
5
|
-
const useBuildHuri = (hash) => {
|
|
6
|
-
var _a, _b;
|
|
7
|
-
const { network } = (0, react_network_1.useNetwork)();
|
|
8
|
-
const networkUri = (_b = (_a = network === null || network === void 0 ? void 0 : network.nodes) === null || _a === void 0 ? void 0 : _a.find((node) => node.type === 'archivist')) === null || _b === void 0 ? void 0 : _b.uri;
|
|
9
|
-
if (!hash) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
return `${networkUri}/${hash}`;
|
|
13
|
-
};
|
|
14
|
-
exports.useBuildHuri = useBuildHuri;
|
|
15
|
-
//# sourceMappingURL=useBuildHuri.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBuildHuri.js","sourceRoot":"","sources":["../../../../../src/contexts/DivinedPayload/hooks/useBuildHuri.tsx"],"names":[],"mappings":";;;AAAA,8DAAuD;AAEhD,MAAM,YAAY,GAAG,CAAC,IAAa,EAAE,EAAE;;IAC5C,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,0BAAU,GAAE,CAAA;IAChC,MAAM,UAAU,GAAG,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC,0CAAE,GAAG,CAAA;IAEjF,IAAI,CAAC,IAAI,EAAE;QACT,OAAM;KACP;IAED,OAAO,GAAG,UAAU,IAAI,IAAI,EAAE,CAAA;AAChC,CAAC,CAAA;AATY,QAAA,YAAY,gBASxB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/contexts/DivinedPayload/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/contexts/DivinedPayload/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBuildHuri.d.ts","sourceRoot":"","sources":["../../../../../src/contexts/DivinedPayload/hooks/useBuildHuri.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,UAAW,MAAM,uBASzC,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useNetwork } from '@xyo-network/react-network';
|
|
2
|
-
export const useBuildHuri = (hash) => {
|
|
3
|
-
const { network } = useNetwork();
|
|
4
|
-
const networkUri = network?.nodes?.find((node) => node.type === 'archivist')?.uri;
|
|
5
|
-
if (!hash) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
return `${networkUri}/${hash}`;
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=useBuildHuri.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBuildHuri.js","sourceRoot":"","sources":["../../../../../src/contexts/DivinedPayload/hooks/useBuildHuri.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAEvD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAa,EAAE,EAAE;IAC5C,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,CAAA;IAChC,MAAM,UAAU,GAAG,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC,EAAE,GAAG,CAAA;IAEjF,IAAI,CAAC,IAAI,EAAE;QACT,OAAM;KACP;IAED,OAAO,GAAG,UAAU,IAAI,IAAI,EAAE,CAAA;AAChC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './useBuildHuri'
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { useNetwork } from '@xyo-network/react-network'
|
|
2
|
-
|
|
3
|
-
export const useBuildHuri = (hash?: string) => {
|
|
4
|
-
const { network } = useNetwork()
|
|
5
|
-
const networkUri = network?.nodes?.find((node) => node.type === 'archivist')?.uri
|
|
6
|
-
|
|
7
|
-
if (!hash) {
|
|
8
|
-
return
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return `${networkUri}/${hash}`
|
|
12
|
-
}
|