@xyo-network/react-diviner 2.45.0-rc.9 → 2.45.1

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.
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useDiviner = void 0;
4
4
  const diviner_1 = require("@xyo-network/diviner");
5
5
  const react_node_1 = require("@xyo-network/react-node");
6
- exports.useDiviner = (0, react_node_1.createUseModuleHook)((module) => diviner_1.DivinerWrapper.wrap(module), react_node_1.useNode);
6
+ exports.useDiviner = (0, react_node_1.WrappedModuleHookFactory)(diviner_1.DivinerWrapper, 'useDiviner');
7
7
  //# sourceMappingURL=useDiviner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDiviner.js","sourceRoot":"","sources":["../../../src/hooks/useDiviner.tsx"],"names":[],"mappings":";;;AAAA,kDAAoE;AACpE,wDAAsE;AAEzD,QAAA,UAAU,GAAG,IAAA,gCAAmB,EAAgC,CAAC,MAAM,EAAE,EAAE,CAAC,wBAAc,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,oBAAO,CAAC,CAAA"}
1
+ {"version":3,"file":"useDiviner.js","sourceRoot":"","sources":["../../../src/hooks/useDiviner.tsx"],"names":[],"mappings":";;;AAAA,kDAAqD;AACrD,wDAAkE;AAErD,QAAA,UAAU,GAAG,IAAA,qCAAwB,EAAC,wBAAc,EAAE,YAAY,CAAC,CAAA"}
package/dist/docs.json CHANGED
@@ -14,10 +14,10 @@
14
14
  "flags": {},
15
15
  "sources": [
16
16
  {
17
- "fileName": "packages/modules/packages/diviner/src/hooks/useDiviner.tsx",
17
+ "fileName": "diviner/src/hooks/useDiviner.tsx",
18
18
  "line": 4,
19
19
  "character": 13,
20
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/244a065a2a5/packages/modules/packages/diviner/src/hooks/useDiviner.tsx#L4"
20
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/410d82b41/packages/modules/packages/diviner/src/hooks/useDiviner.tsx#L4"
21
21
  }
22
22
  ],
23
23
  "signatures": [
@@ -30,7 +30,7 @@
30
30
  "parameters": [
31
31
  {
32
32
  "id": 3,
33
- "name": "name",
33
+ "name": "nameOrAddress",
34
34
  "kind": 32768,
35
35
  "kindString": "Parameter",
36
36
  "flags": {
@@ -40,429 +40,33 @@
40
40
  "type": "intrinsic",
41
41
  "name": "string"
42
42
  }
43
- }
44
- ],
45
- "type": {
46
- "type": "tuple",
47
- "elements": [
48
- {
49
- "type": "union",
50
- "types": [
51
- {
52
- "type": "intrinsic",
53
- "name": "undefined"
54
- },
55
- {
56
- "type": "reference",
57
- "typeArguments": [
58
- {
59
- "type": "intersection",
60
- "types": [
61
- {
62
- "type": "reference",
63
- "name": "SchemaFields",
64
- "qualifiedName": "SchemaFields",
65
- "package": "@xyo-network/payload-model"
66
- },
67
- {
68
- "type": "reference",
69
- "name": "PayloadFields",
70
- "qualifiedName": "PayloadFields",
71
- "package": "@xyo-network/payload-model"
72
- },
73
- {
74
- "type": "reflection",
75
- "declaration": {
76
- "id": 4,
77
- "name": "__type",
78
- "kind": 65536,
79
- "kindString": "Type literal",
80
- "flags": {},
81
- "sources": [
82
- {
83
- "fileName": "node_modules/@xyo-network/module-model/dist/types/Config.d.ts",
84
- "line": 8,
85
- "character": 75
86
- }
87
- ]
88
- }
89
- },
90
- {
91
- "type": "reflection",
92
- "declaration": {
93
- "id": 5,
94
- "name": "__type",
95
- "kind": 65536,
96
- "kindString": "Type literal",
97
- "flags": {},
98
- "sources": [
99
- {
100
- "fileName": "node_modules/@xyo-network/diviner-model/dist/types/Config.d.ts",
101
- "line": 5,
102
- "character": 123
103
- }
104
- ]
105
- }
106
- },
107
- {
108
- "type": "reflection",
109
- "declaration": {
110
- "id": 6,
111
- "name": "__type",
112
- "kind": 65536,
113
- "kindString": "Type literal",
114
- "flags": {},
115
- "sources": [
116
- {
117
- "fileName": "node_modules/@xyo-network/payload-model/dist/types/XyoPayload.d.ts",
118
- "line": 18,
119
- "character": 17
120
- }
121
- ]
122
- }
123
- }
124
- ]
125
- }
126
- ],
127
- "name": "DivinerModule",
128
- "qualifiedName": "DivinerModule",
129
- "package": "@xyo-network/diviner-model"
130
- }
131
- ]
132
- },
133
- {
134
- "type": "union",
135
- "types": [
136
- {
137
- "type": "intrinsic",
138
- "name": "undefined"
139
- },
140
- {
141
- "type": "reference",
142
- "name": "Error",
143
- "qualifiedName": "Error",
144
- "package": "typescript"
145
- }
146
- ]
147
- }
148
- ]
149
- }
150
- },
151
- {
152
- "id": 7,
153
- "name": "useDiviner",
154
- "kind": 4096,
155
- "kindString": "Call signature",
156
- "flags": {},
157
- "parameters": [
158
- {
159
- "id": 8,
160
- "name": "name",
161
- "kind": 32768,
162
- "kindString": "Parameter",
163
- "flags": {},
164
- "type": {
165
- "type": "union",
166
- "types": [
167
- {
168
- "type": "intrinsic",
169
- "name": "undefined"
170
- },
171
- {
172
- "type": "intrinsic",
173
- "name": "string"
174
- }
175
- ]
176
- }
177
43
  },
178
44
  {
179
- "id": 9,
180
- "name": "wrap",
45
+ "id": 4,
46
+ "name": "account",
181
47
  "kind": 32768,
182
48
  "kindString": "Parameter",
183
- "flags": {},
184
- "type": {
185
- "type": "union",
186
- "types": [
187
- {
188
- "type": "literal",
189
- "value": true
190
- },
191
- {
192
- "type": "reference",
193
- "name": "Account",
194
- "qualifiedName": "Account",
195
- "package": "@xyo-network/account"
196
- }
197
- ]
198
- }
199
- }
200
- ],
201
- "type": {
202
- "type": "tuple",
203
- "elements": [
204
- {
205
- "type": "union",
206
- "types": [
207
- {
208
- "type": "intrinsic",
209
- "name": "undefined"
210
- },
211
- {
212
- "type": "reference",
213
- "name": "DivinerWrapper",
214
- "qualifiedName": "DivinerWrapper",
215
- "package": "@xyo-network/diviner-wrapper"
216
- }
217
- ]
49
+ "flags": {
50
+ "isOptional": true
218
51
  },
219
- {
220
- "type": "union",
221
- "types": [
222
- {
223
- "type": "intrinsic",
224
- "name": "undefined"
225
- },
226
- {
227
- "type": "reference",
228
- "name": "Error",
229
- "qualifiedName": "Error",
230
- "package": "typescript"
231
- }
232
- ]
233
- }
234
- ]
235
- }
236
- },
237
- {
238
- "id": 10,
239
- "name": "useDiviner",
240
- "kind": 4096,
241
- "kindString": "Call signature",
242
- "flags": {},
243
- "parameters": [
244
- {
245
- "id": 11,
246
- "name": "wrap",
247
- "kind": 32768,
248
- "kindString": "Parameter",
249
- "flags": {},
250
52
  "type": {
251
- "type": "union",
252
- "types": [
253
- {
254
- "type": "literal",
255
- "value": true
256
- },
257
- {
258
- "type": "reference",
259
- "name": "Account",
260
- "qualifiedName": "Account",
261
- "package": "@xyo-network/account"
262
- }
263
- ]
53
+ "type": "reference",
54
+ "name": "AccountInstance",
55
+ "qualifiedName": "AccountInstance",
56
+ "package": "@xyo-network/account-model"
264
57
  }
265
- }
266
- ],
267
- "type": {
268
- "type": "tuple",
269
- "elements": [
270
- {
271
- "type": "union",
272
- "types": [
273
- {
274
- "type": "intrinsic",
275
- "name": "undefined"
276
- },
277
- {
278
- "type": "reference",
279
- "name": "DivinerWrapper",
280
- "qualifiedName": "DivinerWrapper",
281
- "package": "@xyo-network/diviner-wrapper"
282
- }
283
- ]
284
- },
285
- {
286
- "type": "union",
287
- "types": [
288
- {
289
- "type": "intrinsic",
290
- "name": "undefined"
291
- },
292
- {
293
- "type": "reference",
294
- "name": "Error",
295
- "qualifiedName": "Error",
296
- "package": "typescript"
297
- }
298
- ]
299
- }
300
- ]
301
- }
302
- },
303
- {
304
- "id": 12,
305
- "name": "useDiviner",
306
- "kind": 4096,
307
- "kindString": "Call signature",
308
- "flags": {},
309
- "parameters": [
58
+ },
310
59
  {
311
- "id": 13,
312
- "name": "address",
60
+ "id": 5,
61
+ "name": "spinCheck",
313
62
  "kind": 32768,
314
63
  "kindString": "Parameter",
315
- "flags": {},
316
- "type": {
317
- "type": "intrinsic",
318
- "name": "string"
319
- }
320
- }
321
- ],
322
- "type": {
323
- "type": "tuple",
324
- "elements": [
325
- {
326
- "type": "union",
327
- "types": [
328
- {
329
- "type": "intrinsic",
330
- "name": "undefined"
331
- },
332
- {
333
- "type": "reference",
334
- "typeArguments": [
335
- {
336
- "type": "intersection",
337
- "types": [
338
- {
339
- "type": "reference",
340
- "name": "SchemaFields",
341
- "qualifiedName": "SchemaFields",
342
- "package": "@xyo-network/payload-model"
343
- },
344
- {
345
- "type": "reference",
346
- "name": "PayloadFields",
347
- "qualifiedName": "PayloadFields",
348
- "package": "@xyo-network/payload-model"
349
- },
350
- {
351
- "type": "reflection",
352
- "declaration": {
353
- "id": 14,
354
- "name": "__type",
355
- "kind": 65536,
356
- "kindString": "Type literal",
357
- "flags": {},
358
- "sources": [
359
- {
360
- "fileName": "node_modules/@xyo-network/module-model/dist/types/Config.d.ts",
361
- "line": 8,
362
- "character": 75
363
- }
364
- ]
365
- }
366
- },
367
- {
368
- "type": "reflection",
369
- "declaration": {
370
- "id": 15,
371
- "name": "__type",
372
- "kind": 65536,
373
- "kindString": "Type literal",
374
- "flags": {},
375
- "sources": [
376
- {
377
- "fileName": "node_modules/@xyo-network/diviner-model/dist/types/Config.d.ts",
378
- "line": 5,
379
- "character": 123
380
- }
381
- ]
382
- }
383
- },
384
- {
385
- "type": "reflection",
386
- "declaration": {
387
- "id": 16,
388
- "name": "__type",
389
- "kind": 65536,
390
- "kindString": "Type literal",
391
- "flags": {},
392
- "sources": [
393
- {
394
- "fileName": "node_modules/@xyo-network/payload-model/dist/types/XyoPayload.d.ts",
395
- "line": 18,
396
- "character": 17
397
- }
398
- ]
399
- }
400
- }
401
- ]
402
- }
403
- ],
404
- "name": "DivinerModule",
405
- "qualifiedName": "DivinerModule",
406
- "package": "@xyo-network/diviner-model"
407
- }
408
- ]
64
+ "flags": {
65
+ "isOptional": true
409
66
  },
410
- {
411
- "type": "union",
412
- "types": [
413
- {
414
- "type": "intrinsic",
415
- "name": "undefined"
416
- },
417
- {
418
- "type": "reference",
419
- "name": "Error",
420
- "qualifiedName": "Error",
421
- "package": "typescript"
422
- }
423
- ]
424
- }
425
- ]
426
- }
427
- },
428
- {
429
- "id": 17,
430
- "name": "useDiviner",
431
- "kind": 4096,
432
- "kindString": "Call signature",
433
- "flags": {},
434
- "parameters": [
435
- {
436
- "id": 18,
437
- "name": "address",
438
- "kind": 32768,
439
- "kindString": "Parameter",
440
- "flags": {},
441
67
  "type": {
442
68
  "type": "intrinsic",
443
- "name": "string"
444
- }
445
- },
446
- {
447
- "id": 19,
448
- "name": "wrap",
449
- "kind": 32768,
450
- "kindString": "Parameter",
451
- "flags": {},
452
- "type": {
453
- "type": "union",
454
- "types": [
455
- {
456
- "type": "literal",
457
- "value": true
458
- },
459
- {
460
- "type": "reference",
461
- "name": "Account",
462
- "qualifiedName": "Account",
463
- "package": "@xyo-network/account"
464
- }
465
- ]
69
+ "name": "boolean"
466
70
  }
467
71
  }
468
72
  ],
@@ -515,10 +119,10 @@
515
119
  ],
516
120
  "sources": [
517
121
  {
518
- "fileName": "packages/modules/packages/diviner/src/index.ts",
122
+ "fileName": "diviner/src/index.ts",
519
123
  "line": 1,
520
124
  "character": 0,
521
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/244a065a2a5/packages/modules/packages/diviner/src/index.ts#L1"
125
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/410d82b41/packages/modules/packages/diviner/src/index.ts#L1"
522
126
  }
523
127
  ]
524
128
  }
@@ -1,4 +1,4 @@
1
1
  import { DivinerWrapper } from '@xyo-network/diviner';
2
- import { createUseModuleHook, useNode } from '@xyo-network/react-node';
3
- export const useDiviner = createUseModuleHook((module) => DivinerWrapper.wrap(module), useNode);
2
+ import { WrappedModuleHookFactory } from '@xyo-network/react-node';
3
+ export const useDiviner = WrappedModuleHookFactory(DivinerWrapper, 'useDiviner');
4
4
  //# sourceMappingURL=useDiviner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDiviner.js","sourceRoot":"","sources":["../../../src/hooks/useDiviner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEtE,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,CAAgC,CAAC,MAAM,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAA"}
1
+ {"version":3,"file":"useDiviner.js","sourceRoot":"","sources":["../../../src/hooks/useDiviner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAElE,MAAM,CAAC,MAAM,UAAU,GAAG,wBAAwB,CAAC,cAAc,EAAE,YAAY,CAAC,CAAA"}
@@ -1,33 +1,3 @@
1
- import { DivinerModule, DivinerWrapper } from '@xyo-network/diviner';
2
- export declare const useDiviner: {
3
- (name?: string | undefined): [DivinerModule<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
4
- name?: string | undefined;
5
- security?: {
6
- allowAnonymous?: boolean | undefined;
7
- allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
8
- disallowed?: Record<string, string[]> | undefined;
9
- } | undefined;
10
- storeQueries?: boolean | undefined;
11
- } & {
12
- targetSchema?: string | undefined;
13
- } & {
14
- schema: string;
15
- }> | undefined, Error | undefined];
16
- (name: string | undefined, wrap: true | import("@xyo-network/account").Account): [DivinerWrapper | undefined, Error | undefined];
17
- (wrap: true | import("@xyo-network/account").Account): [DivinerWrapper | undefined, Error | undefined];
18
- (address: string): [DivinerModule<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
19
- name?: string | undefined;
20
- security?: {
21
- allowAnonymous?: boolean | undefined;
22
- allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
23
- disallowed?: Record<string, string[]> | undefined;
24
- } | undefined;
25
- storeQueries?: boolean | undefined;
26
- } & {
27
- targetSchema?: string | undefined;
28
- } & {
29
- schema: string;
30
- }> | undefined, Error | undefined];
31
- (address: string, wrap: true | import("@xyo-network/account").Account): [DivinerWrapper | undefined, Error | undefined];
32
- };
1
+ import { DivinerWrapper } from '@xyo-network/diviner';
2
+ export declare const useDiviner: (nameOrAddress?: string | undefined, account?: import("@xyo-network/account-model").AccountInstance | undefined, spinCheck?: boolean | undefined) => [DivinerWrapper | undefined, Error | undefined];
33
3
  //# sourceMappingURL=useDiviner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDiviner.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDiviner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAGpE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAuG,CAAA"}
1
+ {"version":3,"file":"useDiviner.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDiviner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAGrD,eAAO,MAAM,UAAU,sMAAyD,CAAA"}
package/package.json CHANGED
@@ -10,14 +10,8 @@
10
10
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/react-button": "^2.16.8",
14
- "@xylabs/react-flexbox": "^2.16.8",
15
- "@xylabs/react-shared": "^2.16.8",
16
- "@xyo-network/node": "^2.51.2",
17
- "@xyo-network/react-module": "^2.45.0-rc.9",
18
- "@xyo-network/react-node": "^2.45.0-rc.9",
19
- "@xyo-network/react-shared": "^2.45.0-rc.9",
20
- "lodash": "^4.17.21"
13
+ "@xyo-network/diviner": "^2.51.7",
14
+ "@xyo-network/react-node": "^2.45.1"
21
15
  },
22
16
  "peerDependencies": {
23
17
  "@mui/icons-material": "^5",
@@ -31,16 +25,8 @@
31
25
  },
32
26
  "description": "Common React library for all XYO projects that use React",
33
27
  "devDependencies": {
34
- "@storybook/react": "^6.5.16",
35
- "@types/lodash": "^4.14.191",
36
- "@xylabs/ts-scripts-yarn3": "^2.16.0",
37
- "@xylabs/tsconfig-react": "^2.16.0",
38
- "@xyo-network/archivist": "^2.51.2",
39
- "@xyo-network/archivist-wrapper": "^2.51.2",
40
- "@xyo-network/module": "^2.51.2",
41
- "@xyo-network/payload-model": "^2.51.2",
42
- "@xyo-network/react-storybook": "^2.45.0-rc.9",
43
- "require-from-string": "^2.0.2",
28
+ "@xylabs/ts-scripts-yarn3": "^2.16.1",
29
+ "@xylabs/tsconfig-react": "^2.16.1",
44
30
  "typescript": "^4.9.5"
45
31
  },
46
32
  "browser": "dist/esm/index.js",
@@ -85,6 +71,5 @@
85
71
  },
86
72
  "sideEffects": false,
87
73
  "types": "dist/types/index.d.ts",
88
- "version": "2.45.0-rc.9",
89
- "stableVersion": "2.44.1"
74
+ "version": "2.45.1"
90
75
  }
@@ -1,4 +1,4 @@
1
- import { DivinerModule, DivinerWrapper } from '@xyo-network/diviner'
2
- import { createUseModuleHook, useNode } from '@xyo-network/react-node'
1
+ import { DivinerWrapper } from '@xyo-network/diviner'
2
+ import { WrappedModuleHookFactory } from '@xyo-network/react-node'
3
3
 
4
- export const useDiviner = createUseModuleHook<DivinerModule, DivinerWrapper>((module) => DivinerWrapper.wrap(module), useNode)
4
+ export const useDiviner = WrappedModuleHookFactory(DivinerWrapper, 'useDiviner')