@xyo-network/react-schema 6.0.0 → 6.1.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.
- package/dist/browser/components/Property/SchemaProperty.stories.d.ts +9 -0
- package/dist/browser/components/Property/SchemaProperty.stories.d.ts.map +1 -0
- package/dist/browser/hooks/stories/TestSchemaHooks.stories.d.ts +6 -0
- package/dist/browser/hooks/stories/TestSchemaHooks.stories.d.ts.map +1 -0
- package/dist/browser/hooks/useGetSchema.stories.d.ts +11 -0
- package/dist/browser/hooks/useGetSchema.stories.d.ts.map +1 -0
- package/dist/browser/index.d.ts +99 -0
- package/package.json +34 -33
- package/dist/types/index.d.ts +0 -4
- /package/dist/{types → browser}/components/Property/SchemaProperty.d.ts +0 -0
- /package/dist/{types → browser}/components/Property/SchemaProperty.d.ts.map +0 -0
- /package/dist/{types → browser}/components/Property/index.d.ts +0 -0
- /package/dist/{types → browser}/components/Property/index.d.ts.map +0 -0
- /package/dist/{types → browser}/components/SelectEx/SchemaSelectEx.d.ts +0 -0
- /package/dist/{types → browser}/components/SelectEx/SchemaSelectEx.d.ts.map +0 -0
- /package/dist/{types → browser}/components/SelectEx/index.d.ts +0 -0
- /package/dist/{types → browser}/components/SelectEx/index.d.ts.map +0 -0
- /package/dist/{types → browser}/components/index.d.ts +0 -0
- /package/dist/{types → browser}/components/index.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/Schema/Context.d.ts +0 -0
- /package/dist/{types → browser}/contexts/Schema/Context.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/Schema/Provider/Memory.d.ts +0 -0
- /package/dist/{types → browser}/contexts/Schema/Provider/Memory.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/Schema/Provider/Props.d.ts +0 -0
- /package/dist/{types → browser}/contexts/Schema/Provider/Props.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/Schema/Provider/Route.d.ts +0 -0
- /package/dist/{types → browser}/contexts/Schema/Provider/Route.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/Schema/Provider/index.d.ts +0 -0
- /package/dist/{types → browser}/contexts/Schema/Provider/index.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/Schema/State.d.ts +0 -0
- /package/dist/{types → browser}/contexts/Schema/State.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/Schema/index.d.ts +0 -0
- /package/dist/{types → browser}/contexts/Schema/index.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/Schema/use.d.ts +0 -0
- /package/dist/{types → browser}/contexts/Schema/use.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/index.d.ts +0 -0
- /package/dist/{types → browser}/contexts/index.d.ts.map +0 -0
- /package/dist/{types → browser}/hooks/index.d.ts +0 -0
- /package/dist/{types → browser}/hooks/index.d.ts.map +0 -0
- /package/dist/{types → browser}/hooks/useGetSchema.d.ts +0 -0
- /package/dist/{types → browser}/hooks/useGetSchema.d.ts.map +0 -0
- /package/dist/{types → browser}/hooks/useSchemaDefinitions.d.ts +0 -0
- /package/dist/{types → browser}/hooks/useSchemaDefinitions.d.ts.map +0 -0
- /package/dist/{types → browser}/hooks/useSchemaList.d.ts +0 -0
- /package/dist/{types → browser}/hooks/useSchemaList.d.ts.map +0 -0
- /package/dist/{types → browser}/hooks/useSchemaStats.d.ts +0 -0
- /package/dist/{types → browser}/hooks/useSchemaStats.d.ts.map +0 -0
- /package/dist/{types → browser}/index.d.ts.map +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react-vite';
|
|
2
|
+
declare const StorybookEntry: Meta;
|
|
3
|
+
declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("@storybook/react-vite").Args>;
|
|
4
|
+
declare const WithVerifiedValue: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("@storybook/react-vite").Args>;
|
|
5
|
+
declare const WithVerifiedValuePaper: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("@storybook/react-vite").Args>;
|
|
6
|
+
declare const WithUnverifiedValue: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("@storybook/react-vite").Args>;
|
|
7
|
+
export { Default, WithUnverifiedValue, WithVerifiedValue, WithVerifiedValuePaper, };
|
|
8
|
+
export default StorybookEntry;
|
|
9
|
+
//# sourceMappingURL=SchemaProperty.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaProperty.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Property/SchemaProperty.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;AAO1D,QAAA,MAAM,cAAc,EAAE,IAIrB,CAAA;AAaD,QAAA,MAAM,OAAO,wIAAoB,CAAA;AAGjC,QAAA,MAAM,iBAAiB,wIAAoB,CAAA;AAG3C,QAAA,MAAM,sBAAsB,wIAAoB,CAAA;AAGhD,QAAA,MAAM,mBAAmB,wIAAoB,CAAA;AAG7C,OAAO,EACL,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,sBAAsB,GACxE,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react-vite';
|
|
2
|
+
declare const _default: Meta;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, {}>;
|
|
5
|
+
export { Default };
|
|
6
|
+
//# sourceMappingURL=TestSchemaHooks.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestSchemaHooks.stories.d.ts","sourceRoot":"","sources":["../../../../src/hooks/stories/TestSchemaHooks.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACC,IAAI,EAChB,MAAM,uBAAuB,CAAA;wBAoDzB,IAAI;AAHT,wBAGS;AAyCT,QAAA,MAAM,OAAO,sGAAoB,CAAA;AAEjC,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react-vite';
|
|
2
|
+
declare const StorybookEntry: Meta;
|
|
3
|
+
declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, {
|
|
4
|
+
schema: string;
|
|
5
|
+
}>;
|
|
6
|
+
declare const Domain: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, {
|
|
7
|
+
schema: string;
|
|
8
|
+
}>;
|
|
9
|
+
export { Default, Domain };
|
|
10
|
+
export default StorybookEntry;
|
|
11
|
+
//# sourceMappingURL=useGetSchema.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetSchema.stories.d.ts","sourceRoot":"","sources":["../../../src/hooks/useGetSchema.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;AA0C1D,QAAA,MAAM,cAAc,EAAE,IAKrB,CAAA;AAMD,QAAA,MAAM,OAAO;YA1CmC,MAAM;EA0CrB,CAAA;AAGjC,QAAA,MAAM,MAAM;YA7CoC,MAAM;EA6CtB,CAAA;AAGhC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAA;AAE1B,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { PropertyProps } from '@xyo-network/react-property';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import react__default, { PropsWithChildren, Dispatch, SetStateAction } from 'react';
|
|
4
|
+
import { SelectExProps } from '@xylabs/react-select';
|
|
5
|
+
import * as _xylabs_react_shared from '@xylabs/react-shared';
|
|
6
|
+
import { ContextExState } from '@xylabs/react-shared';
|
|
7
|
+
import * as _xyo_network_huri from '@xyo-network/huri';
|
|
8
|
+
import * as _xyo_network_payload_model from '@xyo-network/payload-model';
|
|
9
|
+
import { WithSources, ModuleError } from '@xyo-network/payload-model';
|
|
10
|
+
import { SchemaPayload } from '@xyo-network/schema-payload-plugin';
|
|
11
|
+
import { Address } from '@xylabs/hex';
|
|
12
|
+
import { SchemaListPayload } from '@xyo-network/diviner-schema-list-model';
|
|
13
|
+
import { SchemaStatsPayload } from '@xyo-network/diviner-schema-stats-model';
|
|
14
|
+
|
|
15
|
+
type SchemaPropertyProps = PropertyProps & {
|
|
16
|
+
showLinkNames?: boolean;
|
|
17
|
+
showOpenNewWindowLink?: boolean;
|
|
18
|
+
showStatusIcon?: boolean;
|
|
19
|
+
value?: string;
|
|
20
|
+
};
|
|
21
|
+
declare const SchemaProperty: react__default.FC<SchemaPropertyProps>;
|
|
22
|
+
|
|
23
|
+
type SchemaSelectExProps = SelectExProps<string>;
|
|
24
|
+
declare const SchemaSelectEx: react__default.FC<SchemaSelectExProps>;
|
|
25
|
+
|
|
26
|
+
declare const SchemaContext: react.Context<({
|
|
27
|
+
schema?: string;
|
|
28
|
+
schemaList?: string[];
|
|
29
|
+
setSchema?: react.Dispatch<string>;
|
|
30
|
+
setSchemaList?: react.Dispatch<string[]>;
|
|
31
|
+
} & {
|
|
32
|
+
provided: true;
|
|
33
|
+
}) | (_xylabs_react_shared.FixedValues<_xylabs_react_shared.ProvidedContextExState<{
|
|
34
|
+
schema?: string;
|
|
35
|
+
schemaList?: string[];
|
|
36
|
+
setSchema?: react.Dispatch<string>;
|
|
37
|
+
setSchemaList?: react.Dispatch<string[]>;
|
|
38
|
+
}>, never> & {
|
|
39
|
+
provided: false;
|
|
40
|
+
}) | (_xylabs_react_shared.FixedValues<_xylabs_react_shared.NotProvidedContextExState<{
|
|
41
|
+
schema?: string;
|
|
42
|
+
schemaList?: string[];
|
|
43
|
+
setSchema?: react.Dispatch<string>;
|
|
44
|
+
setSchemaList?: react.Dispatch<string[]>;
|
|
45
|
+
}>, never> & {
|
|
46
|
+
provided: false;
|
|
47
|
+
})>;
|
|
48
|
+
|
|
49
|
+
interface SchemaProviderProps {
|
|
50
|
+
defaultSchema?: string;
|
|
51
|
+
knownSchemaList?: string[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare const SchemaMemoryProvider: react__default.FC<PropsWithChildren<SchemaProviderProps>>;
|
|
55
|
+
|
|
56
|
+
declare const SchemaRouteProvider: react__default.FC<PropsWithChildren<SchemaProviderProps>>;
|
|
57
|
+
|
|
58
|
+
type SchemaContextState = ContextExState<{
|
|
59
|
+
/** @field The currently selected XYO Schema */
|
|
60
|
+
schema?: string;
|
|
61
|
+
/** @field The list of known available schema */
|
|
62
|
+
schemaList?: string[];
|
|
63
|
+
/** @field Function to set the selected Schema */
|
|
64
|
+
setSchema?: Dispatch<string>;
|
|
65
|
+
/** @field Function to set the list of known available schema */
|
|
66
|
+
setSchemaList?: Dispatch<string[]>;
|
|
67
|
+
}>;
|
|
68
|
+
|
|
69
|
+
declare const useSchema: (required?: boolean) => Omit<{
|
|
70
|
+
schema?: string;
|
|
71
|
+
schemaList?: string[];
|
|
72
|
+
setSchema?: react.Dispatch<string>;
|
|
73
|
+
setSchemaList?: react.Dispatch<string[]>;
|
|
74
|
+
} & {
|
|
75
|
+
provided: true;
|
|
76
|
+
}, "provided"> | Omit<_xylabs_react_shared.NotProvidedContextExState<SchemaContextState>, "provided">;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Gets a Huri and schema payload from a schema string
|
|
80
|
+
*/
|
|
81
|
+
declare const useGetSchemaPayload: (schema?: string) => {
|
|
82
|
+
notFound: boolean;
|
|
83
|
+
schemaHuri: _xyo_network_huri.Huri<_xyo_network_payload_model.Payload> | undefined;
|
|
84
|
+
schemaPayload: SchemaPayload | null | undefined;
|
|
85
|
+
xyoError: WithSources<ModuleError> | undefined;
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=useGetSchema.d.ts.map
|
|
88
|
+
|
|
89
|
+
type SchemaList = {
|
|
90
|
+
name: string;
|
|
91
|
+
};
|
|
92
|
+
declare const useSchemaDefinitions: (schemaList?: SchemaList[]) => SchemaPayload[] | undefined;
|
|
93
|
+
|
|
94
|
+
declare const useSchemaList: (address?: Address, nameOrAddress?: string) => [SchemaListPayload | null | undefined, Error | undefined];
|
|
95
|
+
|
|
96
|
+
declare const useSchemaStats: (statsAddress?: Address, nameOrAddress?: string) => [SchemaStatsPayload[] | undefined, Error | undefined, Dispatch<SetStateAction<number>>];
|
|
97
|
+
|
|
98
|
+
export { SchemaContext, SchemaMemoryProvider, SchemaProperty, SchemaRouteProvider, SchemaSelectEx, useGetSchemaPayload, useSchema, useSchemaDefinitions, useSchemaList, useSchemaStats };
|
|
99
|
+
export type { SchemaContextState, SchemaList, SchemaPropertyProps, SchemaProviderProps, SchemaSelectExProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-schema",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -28,35 +28,35 @@
|
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
30
|
"browser": {
|
|
31
|
-
"types": "./dist/
|
|
31
|
+
"types": "./dist/browser/index.d.ts",
|
|
32
32
|
"default": "./dist/browser/index.mjs"
|
|
33
33
|
},
|
|
34
|
-
"types": "./dist/
|
|
34
|
+
"types": "./dist/browser/index.d.ts",
|
|
35
35
|
"default": "./dist/browser/index.mjs"
|
|
36
36
|
},
|
|
37
37
|
"./package.json": "./package.json"
|
|
38
38
|
},
|
|
39
39
|
"module": "dist/browser/index.mjs",
|
|
40
|
-
"types": "dist/
|
|
40
|
+
"types": "dist/browser/index.d.ts",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@xylabs/exists": "^4.
|
|
43
|
-
"@xylabs/hex": "^4.
|
|
44
|
-
"@xylabs/react-async-effect": "^6.3.
|
|
45
|
-
"@xylabs/react-flexbox": "^6.3.
|
|
46
|
-
"@xylabs/react-link": "^6.3.
|
|
47
|
-
"@xylabs/react-promise": "^6.3.
|
|
48
|
-
"@xylabs/react-select": "^6.3.
|
|
49
|
-
"@xylabs/react-shared": "^6.3.
|
|
50
|
-
"@xyo-network/diviner-schema-list-model": "^4.
|
|
51
|
-
"@xyo-network/diviner-schema-stats-model": "^4.
|
|
42
|
+
"@xylabs/exists": "^4.13.15",
|
|
43
|
+
"@xylabs/hex": "^4.13.15",
|
|
44
|
+
"@xylabs/react-async-effect": "^6.3.10",
|
|
45
|
+
"@xylabs/react-flexbox": "^6.3.10",
|
|
46
|
+
"@xylabs/react-link": "^6.3.10",
|
|
47
|
+
"@xylabs/react-promise": "^6.3.10",
|
|
48
|
+
"@xylabs/react-select": "^6.3.10",
|
|
49
|
+
"@xylabs/react-shared": "^6.3.10",
|
|
50
|
+
"@xyo-network/diviner-schema-list-model": "^4.1.1",
|
|
51
|
+
"@xyo-network/diviner-schema-stats-model": "^4.1.1",
|
|
52
52
|
"@xyo-network/node-core-types": "^3.7.16",
|
|
53
|
-
"@xyo-network/payload-builder": "^4.
|
|
54
|
-
"@xyo-network/payload-model": "^4.
|
|
55
|
-
"@xyo-network/react-diviner": "^6.
|
|
56
|
-
"@xyo-network/react-event": "^6.
|
|
57
|
-
"@xyo-network/react-property": "^6.
|
|
58
|
-
"@xyo-network/schema-cache": "^4.
|
|
59
|
-
"@xyo-network/schema-payload-plugin": "^4.
|
|
53
|
+
"@xyo-network/payload-builder": "^4.1.1",
|
|
54
|
+
"@xyo-network/payload-model": "^4.1.1",
|
|
55
|
+
"@xyo-network/react-diviner": "^6.1.1",
|
|
56
|
+
"@xyo-network/react-event": "^6.1.1",
|
|
57
|
+
"@xyo-network/react-property": "^6.1.1",
|
|
58
|
+
"@xyo-network/schema-cache": "^4.1.1",
|
|
59
|
+
"@xyo-network/schema-payload-plugin": "^4.1.1",
|
|
60
60
|
"react-router-dom": "^7.6.3"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
@@ -64,21 +64,22 @@
|
|
|
64
64
|
"@emotion/styled": "^11.14.1",
|
|
65
65
|
"@mui/icons-material": "^7.2.0",
|
|
66
66
|
"@mui/material": "^7.2.0",
|
|
67
|
+
"@storybook/react-vite": "^9.0.16",
|
|
67
68
|
"@types/react": "^19.1.8",
|
|
68
|
-
"@xylabs/react-flexbox": "^6.3.
|
|
69
|
-
"@xylabs/react-hooks": "^6.3.
|
|
70
|
-
"@xylabs/ts-scripts-yarn3": "
|
|
71
|
-
"@xylabs/tsconfig-react": "
|
|
72
|
-
"@xyo-network/bridge-http": "^4.
|
|
73
|
-
"@xyo-network/node-memory": "^4.
|
|
74
|
-
"@xyo-network/node-model": "^4.
|
|
75
|
-
"@xyo-network/react-node": "^6.
|
|
76
|
-
"@xyo-network/react-payload-raw-info": "^6.
|
|
77
|
-
"@xyo-network/react-storybook": "^6.
|
|
78
|
-
"@xyo-network/react-wallet": "^6.
|
|
69
|
+
"@xylabs/react-flexbox": "^6.3.10",
|
|
70
|
+
"@xylabs/react-hooks": "^6.3.10",
|
|
71
|
+
"@xylabs/ts-scripts-yarn3": "next",
|
|
72
|
+
"@xylabs/tsconfig-react": "next",
|
|
73
|
+
"@xyo-network/bridge-http": "^4.1.1",
|
|
74
|
+
"@xyo-network/node-memory": "^4.1.1",
|
|
75
|
+
"@xyo-network/node-model": "^4.1.1",
|
|
76
|
+
"@xyo-network/react-node": "^6.1.1",
|
|
77
|
+
"@xyo-network/react-payload-raw-info": "^6.1.1",
|
|
78
|
+
"@xyo-network/react-storybook": "^6.1.1",
|
|
79
|
+
"@xyo-network/react-wallet": "^6.1.1",
|
|
79
80
|
"react": "^19.1.0",
|
|
80
81
|
"react-dom": "^19.1.0",
|
|
81
|
-
"storybook": "^9.0.
|
|
82
|
+
"storybook": "^9.0.16",
|
|
82
83
|
"typescript": "^5.8.3"
|
|
83
84
|
},
|
|
84
85
|
"peerDependencies": {
|
package/dist/types/index.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|