@xyo-network/react-node 2.66.5 → 2.67.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/TestModule.d.cts +2 -1
- package/dist/browser/components/TestModule.d.cts.map +1 -1
- package/dist/browser/components/TestModule.d.mts +2 -1
- package/dist/browser/components/TestModule.d.mts.map +1 -1
- package/dist/browser/components/TestModule.d.ts +2 -1
- package/dist/browser/components/TestModule.d.ts.map +1 -1
- package/dist/browser/components/render/ModuleDescriptionBox.d.cts +1 -1
- package/dist/browser/components/render/ModuleDescriptionBox.d.cts.map +1 -1
- package/dist/browser/components/render/ModuleDescriptionBox.d.mts +1 -1
- package/dist/browser/components/render/ModuleDescriptionBox.d.mts.map +1 -1
- package/dist/browser/components/render/ModuleDescriptionBox.d.ts +1 -1
- package/dist/browser/components/render/ModuleDescriptionBox.d.ts.map +1 -1
- package/dist/browser/components/render/RenderModule.d.cts +1 -1
- package/dist/browser/components/render/RenderModule.d.cts.map +1 -1
- package/dist/browser/components/render/RenderModule.d.mts +1 -1
- package/dist/browser/components/render/RenderModule.d.mts.map +1 -1
- package/dist/browser/components/render/RenderModule.d.ts +1 -1
- package/dist/browser/components/render/RenderModule.d.ts.map +1 -1
- package/dist/browser/hooks/useModuleFilterOptions.d.cts +336 -6
- package/dist/browser/hooks/useModuleFilterOptions.d.cts.map +1 -1
- package/dist/browser/hooks/useModuleFilterOptions.d.mts +336 -6
- package/dist/browser/hooks/useModuleFilterOptions.d.mts.map +1 -1
- package/dist/browser/hooks/useModuleFilterOptions.d.ts +336 -6
- package/dist/browser/hooks/useModuleFilterOptions.d.ts.map +1 -1
- package/dist/browser/hooks/useModuleFromNode.d.cts.map +1 -1
- package/dist/browser/hooks/useModuleFromNode.d.mts.map +1 -1
- package/dist/browser/hooks/useModuleFromNode.d.ts.map +1 -1
- package/dist/browser/hooks/useModulesFromNode.d.cts +1 -2
- package/dist/browser/hooks/useModulesFromNode.d.cts.map +1 -1
- package/dist/browser/hooks/useModulesFromNode.d.mts +1 -2
- package/dist/browser/hooks/useModulesFromNode.d.mts.map +1 -1
- package/dist/browser/hooks/useModulesFromNode.d.ts +1 -2
- package/dist/browser/hooks/useModulesFromNode.d.ts.map +1 -1
- package/dist/browser/index.cjs +1 -2
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +1 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/node/components/TestModule.d.cts +2 -1
- package/dist/node/components/TestModule.d.cts.map +1 -1
- package/dist/node/components/TestModule.d.mts +2 -1
- package/dist/node/components/TestModule.d.mts.map +1 -1
- package/dist/node/components/TestModule.d.ts +2 -1
- package/dist/node/components/TestModule.d.ts.map +1 -1
- package/dist/node/components/render/ModuleDescriptionBox.d.cts +1 -1
- package/dist/node/components/render/ModuleDescriptionBox.d.cts.map +1 -1
- package/dist/node/components/render/ModuleDescriptionBox.d.mts +1 -1
- package/dist/node/components/render/ModuleDescriptionBox.d.mts.map +1 -1
- package/dist/node/components/render/ModuleDescriptionBox.d.ts +1 -1
- package/dist/node/components/render/ModuleDescriptionBox.d.ts.map +1 -1
- package/dist/node/components/render/RenderModule.d.cts +1 -1
- package/dist/node/components/render/RenderModule.d.cts.map +1 -1
- package/dist/node/components/render/RenderModule.d.mts +1 -1
- package/dist/node/components/render/RenderModule.d.mts.map +1 -1
- package/dist/node/components/render/RenderModule.d.ts +1 -1
- package/dist/node/components/render/RenderModule.d.ts.map +1 -1
- package/dist/node/hooks/useModuleFilterOptions.d.cts +336 -6
- package/dist/node/hooks/useModuleFilterOptions.d.cts.map +1 -1
- package/dist/node/hooks/useModuleFilterOptions.d.mts +336 -6
- package/dist/node/hooks/useModuleFilterOptions.d.mts.map +1 -1
- package/dist/node/hooks/useModuleFilterOptions.d.ts +336 -6
- package/dist/node/hooks/useModuleFilterOptions.d.ts.map +1 -1
- package/dist/node/hooks/useModuleFromNode.d.cts.map +1 -1
- package/dist/node/hooks/useModuleFromNode.d.mts.map +1 -1
- package/dist/node/hooks/useModuleFromNode.d.ts.map +1 -1
- package/dist/node/hooks/useModulesFromNode.d.cts +1 -2
- package/dist/node/hooks/useModulesFromNode.d.cts.map +1 -1
- package/dist/node/hooks/useModulesFromNode.d.mts +1 -2
- package/dist/node/hooks/useModulesFromNode.d.mts.map +1 -1
- package/dist/node/hooks/useModulesFromNode.d.ts +1 -2
- package/dist/node/hooks/useModulesFromNode.d.ts.map +1 -1
- package/dist/node/index.cjs +1 -2
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +1 -2
- package/dist/node/index.js.map +1 -1
- package/package.json +19 -19
- package/src/components/TestModule.ts +2 -1
- package/src/components/render/ModuleDescriptionBox.tsx +1 -1
- package/src/components/render/RenderModule.tsx +1 -1
- package/src/hooks/useModuleFromNode.ts +1 -2
- package/src/hooks/useModulesFromNode.ts +1 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ModuleFromNodeConfig } from './ModuleFromNodeConfig';
|
|
2
2
|
export declare const useModuleFilterOptions: (config?: ModuleFromNodeConfig) => {
|
|
3
3
|
direction: "up" | "down" | "all" | undefined;
|
|
4
|
-
identity: import("@xyo-network/module-model").InstanceTypeCheck<import("@xyo-network/module-model").ModuleInstance<import("@xyo-network/
|
|
4
|
+
identity: import("@xyo-network/module-model").InstanceTypeCheck<import("@xyo-network/module-model").ModuleInstance<import("@xyo-network/object").BaseParamsFields & {
|
|
5
5
|
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
6
|
-
config: import("@xyo-network/payload-model").SchemaFields & Omit<{
|
|
6
|
+
config: (import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
7
7
|
accountDerivationPath?: string | undefined;
|
|
8
8
|
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
9
9
|
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
@@ -19,7 +19,229 @@ export declare const useModuleFilterOptions: (config?: ModuleFromNodeConfig) =>
|
|
|
19
19
|
readonly sign?: boolean | undefined;
|
|
20
20
|
readonly storeQueries?: boolean | undefined;
|
|
21
21
|
readonly timestamp?: boolean | undefined;
|
|
22
|
-
} & import("@xyo-network/module-model").ArchivingModuleConfig &
|
|
22
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
23
|
+
schema: string;
|
|
24
|
+
} & Omit<(import("@xyo-network/payload-model").SchemaFields & object & {
|
|
25
|
+
accountDerivationPath?: string | undefined;
|
|
26
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
27
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
28
|
+
readonly name?: string | undefined;
|
|
29
|
+
readonly paging?: Record<string, {
|
|
30
|
+
size?: number | undefined;
|
|
31
|
+
}> | undefined;
|
|
32
|
+
readonly security?: {
|
|
33
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
34
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
35
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
readonly sign?: boolean | undefined;
|
|
38
|
+
readonly storeQueries?: boolean | undefined;
|
|
39
|
+
readonly timestamp?: boolean | undefined;
|
|
40
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
41
|
+
schema: "network.xyo.module.config";
|
|
42
|
+
}) | (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadMetaFields & {
|
|
43
|
+
accountDerivationPath?: string | undefined;
|
|
44
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
45
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
46
|
+
readonly name?: string | undefined;
|
|
47
|
+
readonly paging?: Record<string, {
|
|
48
|
+
size?: number | undefined;
|
|
49
|
+
}> | undefined;
|
|
50
|
+
readonly security?: {
|
|
51
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
52
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
53
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
readonly sign?: boolean | undefined;
|
|
56
|
+
readonly storeQueries?: boolean | undefined;
|
|
57
|
+
readonly timestamp?: boolean | undefined;
|
|
58
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
59
|
+
schema: "network.xyo.module.config";
|
|
60
|
+
} & object) | (import("@xyo-network/payload-model").SchemaFields & object & {
|
|
61
|
+
accountDerivationPath?: string | undefined;
|
|
62
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
63
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
64
|
+
readonly name?: string | undefined;
|
|
65
|
+
readonly paging?: Record<string, {
|
|
66
|
+
size?: number | undefined;
|
|
67
|
+
}> | undefined;
|
|
68
|
+
readonly security?: {
|
|
69
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
70
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
71
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
72
|
+
} | undefined;
|
|
73
|
+
readonly sign?: boolean | undefined;
|
|
74
|
+
readonly storeQueries?: boolean | undefined;
|
|
75
|
+
readonly timestamp?: boolean | undefined;
|
|
76
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
77
|
+
schema: "network.xyo.module.config";
|
|
78
|
+
} & import("@xyo-network/payload-model").PayloadMetaFields) | (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadMetaFields & {
|
|
79
|
+
accountDerivationPath?: string | undefined;
|
|
80
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
81
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
82
|
+
readonly name?: string | undefined;
|
|
83
|
+
readonly paging?: Record<string, {
|
|
84
|
+
size?: number | undefined;
|
|
85
|
+
}> | undefined;
|
|
86
|
+
readonly security?: {
|
|
87
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
88
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
89
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
90
|
+
} | undefined;
|
|
91
|
+
readonly sign?: boolean | undefined;
|
|
92
|
+
readonly storeQueries?: boolean | undefined;
|
|
93
|
+
readonly timestamp?: boolean | undefined;
|
|
94
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
95
|
+
schema: "network.xyo.module.config";
|
|
96
|
+
}), "schema">, "schema"> & {
|
|
97
|
+
schema: string;
|
|
98
|
+
}) | (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadMetaFields & Omit<{
|
|
99
|
+
accountDerivationPath?: string | undefined;
|
|
100
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
101
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
102
|
+
readonly name?: string | undefined;
|
|
103
|
+
readonly paging?: Record<string, {
|
|
104
|
+
size?: number | undefined;
|
|
105
|
+
}> | undefined;
|
|
106
|
+
readonly security?: {
|
|
107
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
108
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
109
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
110
|
+
} | undefined;
|
|
111
|
+
readonly sign?: boolean | undefined;
|
|
112
|
+
readonly storeQueries?: boolean | undefined;
|
|
113
|
+
readonly timestamp?: boolean | undefined;
|
|
114
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
115
|
+
schema: string;
|
|
116
|
+
} & Omit<(import("@xyo-network/payload-model").SchemaFields & object & {
|
|
117
|
+
accountDerivationPath?: string | undefined;
|
|
118
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
119
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
120
|
+
readonly name?: string | undefined;
|
|
121
|
+
readonly paging?: Record<string, {
|
|
122
|
+
size?: number | undefined;
|
|
123
|
+
}> | undefined;
|
|
124
|
+
readonly security?: {
|
|
125
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
126
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
127
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
128
|
+
} | undefined;
|
|
129
|
+
readonly sign?: boolean | undefined;
|
|
130
|
+
readonly storeQueries?: boolean | undefined;
|
|
131
|
+
readonly timestamp?: boolean | undefined;
|
|
132
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
133
|
+
schema: "network.xyo.module.config";
|
|
134
|
+
}) | (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadMetaFields & {
|
|
135
|
+
accountDerivationPath?: string | undefined;
|
|
136
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
137
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
138
|
+
readonly name?: string | undefined;
|
|
139
|
+
readonly paging?: Record<string, {
|
|
140
|
+
size?: number | undefined;
|
|
141
|
+
}> | undefined;
|
|
142
|
+
readonly security?: {
|
|
143
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
144
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
145
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
146
|
+
} | undefined;
|
|
147
|
+
readonly sign?: boolean | undefined;
|
|
148
|
+
readonly storeQueries?: boolean | undefined;
|
|
149
|
+
readonly timestamp?: boolean | undefined;
|
|
150
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
151
|
+
schema: "network.xyo.module.config";
|
|
152
|
+
} & object) | (import("@xyo-network/payload-model").SchemaFields & object & {
|
|
153
|
+
accountDerivationPath?: string | undefined;
|
|
154
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
155
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
156
|
+
readonly name?: string | undefined;
|
|
157
|
+
readonly paging?: Record<string, {
|
|
158
|
+
size?: number | undefined;
|
|
159
|
+
}> | undefined;
|
|
160
|
+
readonly security?: {
|
|
161
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
162
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
163
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
164
|
+
} | undefined;
|
|
165
|
+
readonly sign?: boolean | undefined;
|
|
166
|
+
readonly storeQueries?: boolean | undefined;
|
|
167
|
+
readonly timestamp?: boolean | undefined;
|
|
168
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
169
|
+
schema: "network.xyo.module.config";
|
|
170
|
+
} & import("@xyo-network/payload-model").PayloadMetaFields) | (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadMetaFields & {
|
|
171
|
+
accountDerivationPath?: string | undefined;
|
|
172
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
173
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
174
|
+
readonly name?: string | undefined;
|
|
175
|
+
readonly paging?: Record<string, {
|
|
176
|
+
size?: number | undefined;
|
|
177
|
+
}> | undefined;
|
|
178
|
+
readonly security?: {
|
|
179
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
180
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
181
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
182
|
+
} | undefined;
|
|
183
|
+
readonly sign?: boolean | undefined;
|
|
184
|
+
readonly storeQueries?: boolean | undefined;
|
|
185
|
+
readonly timestamp?: boolean | undefined;
|
|
186
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
187
|
+
schema: "network.xyo.module.config";
|
|
188
|
+
}), "schema">, "schema"> & {
|
|
189
|
+
schema: string;
|
|
190
|
+
} & object) | (import("@xyo-network/payload-model").SchemaFields & object & Omit<{
|
|
191
|
+
accountDerivationPath?: string | undefined;
|
|
192
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
193
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
194
|
+
readonly name?: string | undefined;
|
|
195
|
+
readonly paging?: Record<string, {
|
|
196
|
+
size?: number | undefined;
|
|
197
|
+
}> | undefined;
|
|
198
|
+
readonly security?: {
|
|
199
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
200
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
201
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
202
|
+
} | undefined;
|
|
203
|
+
readonly sign?: boolean | undefined;
|
|
204
|
+
readonly storeQueries?: boolean | undefined;
|
|
205
|
+
readonly timestamp?: boolean | undefined;
|
|
206
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
207
|
+
schema: string;
|
|
208
|
+
} & Omit<(import("@xyo-network/payload-model").SchemaFields & object & {
|
|
209
|
+
accountDerivationPath?: string | undefined;
|
|
210
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
211
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
212
|
+
readonly name?: string | undefined;
|
|
213
|
+
readonly paging?: Record<string, {
|
|
214
|
+
size?: number | undefined;
|
|
215
|
+
}> | undefined;
|
|
216
|
+
readonly security?: {
|
|
217
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
218
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
219
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
220
|
+
} | undefined;
|
|
221
|
+
readonly sign?: boolean | undefined;
|
|
222
|
+
readonly storeQueries?: boolean | undefined;
|
|
223
|
+
readonly timestamp?: boolean | undefined;
|
|
224
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
225
|
+
schema: "network.xyo.module.config";
|
|
226
|
+
}) | (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadMetaFields & {
|
|
227
|
+
accountDerivationPath?: string | undefined;
|
|
228
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
229
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
230
|
+
readonly name?: string | undefined;
|
|
231
|
+
readonly paging?: Record<string, {
|
|
232
|
+
size?: number | undefined;
|
|
233
|
+
}> | undefined;
|
|
234
|
+
readonly security?: {
|
|
235
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
236
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
237
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
238
|
+
} | undefined;
|
|
239
|
+
readonly sign?: boolean | undefined;
|
|
240
|
+
readonly storeQueries?: boolean | undefined;
|
|
241
|
+
readonly timestamp?: boolean | undefined;
|
|
242
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
243
|
+
schema: "network.xyo.module.config";
|
|
244
|
+
} & object) | (import("@xyo-network/payload-model").SchemaFields & object & {
|
|
23
245
|
accountDerivationPath?: string | undefined;
|
|
24
246
|
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
25
247
|
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
@@ -37,11 +259,119 @@ export declare const useModuleFilterOptions: (config?: ModuleFromNodeConfig) =>
|
|
|
37
259
|
readonly timestamp?: boolean | undefined;
|
|
38
260
|
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
39
261
|
schema: "network.xyo.module.config";
|
|
40
|
-
}
|
|
262
|
+
} & import("@xyo-network/payload-model").PayloadMetaFields) | (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadMetaFields & {
|
|
263
|
+
accountDerivationPath?: string | undefined;
|
|
264
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
265
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
266
|
+
readonly name?: string | undefined;
|
|
267
|
+
readonly paging?: Record<string, {
|
|
268
|
+
size?: number | undefined;
|
|
269
|
+
}> | undefined;
|
|
270
|
+
readonly security?: {
|
|
271
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
272
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
273
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
274
|
+
} | undefined;
|
|
275
|
+
readonly sign?: boolean | undefined;
|
|
276
|
+
readonly storeQueries?: boolean | undefined;
|
|
277
|
+
readonly timestamp?: boolean | undefined;
|
|
278
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
279
|
+
schema: "network.xyo.module.config";
|
|
280
|
+
}), "schema">, "schema"> & {
|
|
41
281
|
schema: string;
|
|
42
|
-
}
|
|
282
|
+
} & import("@xyo-network/payload-model").PayloadMetaFields) | (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadMetaFields & Omit<{
|
|
283
|
+
accountDerivationPath?: string | undefined;
|
|
284
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
285
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
286
|
+
readonly name?: string | undefined;
|
|
287
|
+
readonly paging?: Record<string, {
|
|
288
|
+
size?: number | undefined;
|
|
289
|
+
}> | undefined;
|
|
290
|
+
readonly security?: {
|
|
291
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
292
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
293
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
294
|
+
} | undefined;
|
|
295
|
+
readonly sign?: boolean | undefined;
|
|
296
|
+
readonly storeQueries?: boolean | undefined;
|
|
297
|
+
readonly timestamp?: boolean | undefined;
|
|
298
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
299
|
+
schema: string;
|
|
300
|
+
} & Omit<(import("@xyo-network/payload-model").SchemaFields & object & {
|
|
301
|
+
accountDerivationPath?: string | undefined;
|
|
302
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
303
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
304
|
+
readonly name?: string | undefined;
|
|
305
|
+
readonly paging?: Record<string, {
|
|
306
|
+
size?: number | undefined;
|
|
307
|
+
}> | undefined;
|
|
308
|
+
readonly security?: {
|
|
309
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
310
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
311
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
312
|
+
} | undefined;
|
|
313
|
+
readonly sign?: boolean | undefined;
|
|
314
|
+
readonly storeQueries?: boolean | undefined;
|
|
315
|
+
readonly timestamp?: boolean | undefined;
|
|
316
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
317
|
+
schema: "network.xyo.module.config";
|
|
318
|
+
}) | (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadMetaFields & {
|
|
319
|
+
accountDerivationPath?: string | undefined;
|
|
320
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
321
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
322
|
+
readonly name?: string | undefined;
|
|
323
|
+
readonly paging?: Record<string, {
|
|
324
|
+
size?: number | undefined;
|
|
325
|
+
}> | undefined;
|
|
326
|
+
readonly security?: {
|
|
327
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
328
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
329
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
330
|
+
} | undefined;
|
|
331
|
+
readonly sign?: boolean | undefined;
|
|
332
|
+
readonly storeQueries?: boolean | undefined;
|
|
333
|
+
readonly timestamp?: boolean | undefined;
|
|
334
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
335
|
+
schema: "network.xyo.module.config";
|
|
336
|
+
} & object) | (import("@xyo-network/payload-model").SchemaFields & object & {
|
|
337
|
+
accountDerivationPath?: string | undefined;
|
|
338
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
339
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
340
|
+
readonly name?: string | undefined;
|
|
341
|
+
readonly paging?: Record<string, {
|
|
342
|
+
size?: number | undefined;
|
|
343
|
+
}> | undefined;
|
|
344
|
+
readonly security?: {
|
|
345
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
346
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
347
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
348
|
+
} | undefined;
|
|
349
|
+
readonly sign?: boolean | undefined;
|
|
350
|
+
readonly storeQueries?: boolean | undefined;
|
|
351
|
+
readonly timestamp?: boolean | undefined;
|
|
352
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
353
|
+
schema: "network.xyo.module.config";
|
|
354
|
+
} & import("@xyo-network/payload-model").PayloadMetaFields) | (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadMetaFields & {
|
|
355
|
+
accountDerivationPath?: string | undefined;
|
|
356
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
357
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
358
|
+
readonly name?: string | undefined;
|
|
359
|
+
readonly paging?: Record<string, {
|
|
360
|
+
size?: number | undefined;
|
|
361
|
+
}> | undefined;
|
|
362
|
+
readonly security?: {
|
|
363
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
364
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
365
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
366
|
+
} | undefined;
|
|
367
|
+
readonly sign?: boolean | undefined;
|
|
368
|
+
readonly storeQueries?: boolean | undefined;
|
|
369
|
+
readonly timestamp?: boolean | undefined;
|
|
370
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
371
|
+
schema: "network.xyo.module.config";
|
|
372
|
+
}), "schema">, "schema"> & {
|
|
43
373
|
schema: string;
|
|
44
|
-
};
|
|
374
|
+
});
|
|
45
375
|
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
46
376
|
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
47
377
|
}, import("@xyo-network/module-model").ModuleEventData<object>>> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModuleFilterOptions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFilterOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,eAAO,MAAM,sBAAsB,YAAa,oBAAoB
|
|
1
|
+
{"version":3,"file":"useModuleFilterOptions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFilterOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,eAAO,MAAM,sBAAsB,YAAa,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGnE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFromNode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFromNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAsC,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG9F,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,eAAO,MAAM,iBAAiB,6BACF,MAAM,GAAG,cAAc,WACxC,oBAAoB,KAC5B,CAAC,cAAc,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CAkChD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFromNode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFromNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAsC,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG9F,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,eAAO,MAAM,iBAAiB,6BACF,MAAM,GAAG,cAAc,WACxC,oBAAoB,KAC5B,CAAC,cAAc,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CAkChD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFromNode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFromNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAsC,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG9F,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,eAAO,MAAM,iBAAiB,6BACF,MAAM,GAAG,cAAc,WACxC,oBAAoB,KAC5B,CAAC,cAAc,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CAkChD,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ModuleFilter } from '@xyo-network/module';
|
|
2
|
-
import { ModuleInstance } from '@xyo-network/module-model';
|
|
1
|
+
import { ModuleFilter, ModuleInstance } from '@xyo-network/module-model';
|
|
3
2
|
import { ModuleFromNodeConfig } from './ModuleFromNodeConfig';
|
|
4
3
|
export declare const useModulesFromNode: (filter?: ModuleFilter, config?: ModuleFromNodeConfig) => [ModuleInstance[] | undefined, Error | undefined];
|
|
5
4
|
//# sourceMappingURL=useModulesFromNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModulesFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModulesFromNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"useModulesFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModulesFromNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAI7D,eAAO,MAAM,kBAAkB,YAAa,YAAY,WAAW,oBAAoB,KAAG,CAAC,cAAc,EAAE,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CA2BzI,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ModuleFilter } from '@xyo-network/module';
|
|
2
|
-
import { ModuleInstance } from '@xyo-network/module-model';
|
|
1
|
+
import { ModuleFilter, ModuleInstance } from '@xyo-network/module-model';
|
|
3
2
|
import { ModuleFromNodeConfig } from './ModuleFromNodeConfig';
|
|
4
3
|
export declare const useModulesFromNode: (filter?: ModuleFilter, config?: ModuleFromNodeConfig) => [ModuleInstance[] | undefined, Error | undefined];
|
|
5
4
|
//# sourceMappingURL=useModulesFromNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModulesFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModulesFromNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"useModulesFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModulesFromNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAI7D,eAAO,MAAM,kBAAkB,YAAa,YAAY,WAAW,oBAAoB,KAAG,CAAC,cAAc,EAAE,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CA2BzI,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ModuleFilter } from '@xyo-network/module';
|
|
2
|
-
import { ModuleInstance } from '@xyo-network/module-model';
|
|
1
|
+
import { ModuleFilter, ModuleInstance } from '@xyo-network/module-model';
|
|
3
2
|
import { ModuleFromNodeConfig } from './ModuleFromNodeConfig';
|
|
4
3
|
export declare const useModulesFromNode: (filter?: ModuleFilter, config?: ModuleFromNodeConfig) => [ModuleInstance[] | undefined, Error | undefined];
|
|
5
4
|
//# sourceMappingURL=useModulesFromNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModulesFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModulesFromNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"useModulesFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModulesFromNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAI7D,eAAO,MAAM,kBAAkB,YAAa,YAAY,WAAW,oBAAoB,KAAG,CAAC,cAAc,EAAE,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CA2BzI,CAAA"}
|
package/dist/node/index.cjs
CHANGED
|
@@ -59,7 +59,6 @@ var useModuleFilterOptions = (config) => {
|
|
|
59
59
|
|
|
60
60
|
// src/hooks/useModuleFromNode.ts
|
|
61
61
|
var import_react_promise2 = require("@xylabs/react-promise");
|
|
62
|
-
var import_module = require("@xyo-network/module");
|
|
63
62
|
var import_module_model = require("@xyo-network/module-model");
|
|
64
63
|
var import_react3 = require("react");
|
|
65
64
|
|
|
@@ -100,7 +99,7 @@ var useModuleFromNode = (nameOrAddressOrInstance, config) => {
|
|
|
100
99
|
var _a;
|
|
101
100
|
logger == null ? void 0 : logger.debug(`useModuleFromNode: moduleAttached [${module2.config.name ?? module2.address}]`);
|
|
102
101
|
if (module2.address === nameOrAddressOrInstance || ((_a = module2.config) == null ? void 0 : _a.name) === nameOrAddressOrInstance) {
|
|
103
|
-
setResult((0,
|
|
102
|
+
setResult((0, import_module_model.asModuleInstance)(module2));
|
|
104
103
|
}
|
|
105
104
|
});
|
|
106
105
|
node.on("moduleDetached", ({ module: module2 }) => {
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/components/NodeDescriptionBox.tsx","../../src/hooks/ModuleFromNodeConfig.ts","../../src/hooks/provided/useProvidedNode.tsx","../../src/hooks/useModuleFilterOptions.ts","../../src/hooks/useModuleFromNode.ts","../../src/hooks/useNode.ts","../../src/hooks/useNodeConfigNodeField.ts","../../src/hooks/useModulesFromNode.ts","../../src/hooks/useNodeDescription.ts","../../src/hooks/useNodeFromNode.tsx","../../src/components/Node.tsx","../../src/components/NodeDrawer.tsx","../../src/components/render/ModuleDescriptionBox.tsx","../../src/components/render/RenderModule.tsx"],"sourcesContent":["export * from './components'\nexport * from './hooks'\nexport * from '@xyo-network/react-node-context'\nexport * from '@xyo-network/react-node-provider'\n","import { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport { NodeInstance } from '@xyo-network/node-model'\n\nimport { useNodeDescription } from '../hooks'\n\nexport interface NodeDescriptionBoxProps extends FlexBoxProps {\n node?: string | NodeInstance\n}\n\nexport const NodeDescriptionBox: React.FC<NodeDescriptionBoxProps> = ({ node, ...props }) => {\n const [description, error] = useNodeDescription({ node })\n\n return (\n <FlexCol {...props}>\n <code color={error ? 'red' : undefined}>{error ? error.message : JSON.stringify(description, null, 2)}</code>\n </FlexCol>\n )\n}\n","import { Logger } from '@xylabs/logger'\nimport { ModuleFilterOptions } from '@xyo-network/module-model'\nimport { NodeInstance } from '@xyo-network/node-model'\n\nexport type ModuleFromNodeConfig = ModuleFilterOptions & {\n logger?: Logger\n node?: NodeInstance | string\n}\n\nexport const useModuleFromNodeConfigLogger = (config?: ModuleFromNodeConfig) => {\n return config?.logger\n}\n","import { NodeInstance } from '@xyo-network/node-model'\nimport { NodeContext } from '@xyo-network/react-node-context'\nimport { useContext } from 'react'\n\nexport const useProvidedNode = (): [NodeInstance | null | undefined] => {\n const { node } = useContext(NodeContext)\n return [node]\n}\n","import { ModuleFromNodeConfig } from './ModuleFromNodeConfig'\n\nexport const useModuleFilterOptions = (config?: ModuleFromNodeConfig) => {\n const { direction, identity, maxDepth, visibility } = config ?? {}\n return { direction, identity, maxDepth, visibility }\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { asModuleInstance } from '@xyo-network/module'\nimport { isModuleInstance, ModuleInstance } from '@xyo-network/module-model'\nimport { useState } from 'react'\n\nimport { ModuleFromNodeConfig, useModuleFromNodeConfigLogger } from './ModuleFromNodeConfig'\nimport { useModuleFilterOptions } from './useModuleFilterOptions'\nimport { useNode } from './useNode'\n\nexport const useModuleFromNode = (\n nameOrAddressOrInstance?: string | ModuleInstance,\n config?: ModuleFromNodeConfig,\n): [ModuleInstance | undefined, Error | undefined] => {\n const [node, nodeError] = useNode(config)\n const logger = useModuleFromNodeConfigLogger(config)\n const filterOptions = useModuleFilterOptions(config)\n const [result, setResult] = useState<ModuleInstance | undefined>()\n const [, error] = usePromise(async () => {\n logger?.debug('useModuleFromNode: resolving')\n if (node && nameOrAddressOrInstance) {\n node.on('moduleAttached', ({ module }) => {\n logger?.debug(`useModuleFromNode: moduleAttached [${module.config.name ?? module.address}]`)\n if (module.address === nameOrAddressOrInstance || module.config?.name === nameOrAddressOrInstance) {\n setResult(asModuleInstance(module))\n }\n })\n node.on('moduleDetached', ({ module }) => {\n logger?.debug(`useModuleFromNode: moduleDetached [${module.config.name ?? module.address}]`)\n if (module.address === nameOrAddressOrInstance || module.config?.name === nameOrAddressOrInstance) {\n setResult(undefined)\n }\n })\n if (isModuleInstance(nameOrAddressOrInstance)) {\n setResult(nameOrAddressOrInstance)\n } else {\n const result = await node.resolve(nameOrAddressOrInstance, filterOptions)\n logger?.debug(`Result: ${result?.address}`)\n setResult(result)\n }\n return result\n }\n logger?.debug('Result: No Node')\n return undefined\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [node, nameOrAddressOrInstance])\n return [result, nodeError ?? error]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { asNodeInstance, NodeInstance } from '@xyo-network/node-model'\n\nimport { ModuleFromNodeConfig } from './ModuleFromNodeConfig'\nimport { useProvidedNode } from './provided'\nimport { useNodeConfigNodeField } from './useNodeConfigNodeField'\n\nexport const useNode = (config?: ModuleFromNodeConfig | undefined): [NodeInstance | undefined, Error | undefined] => {\n const [nodeAddress, nodeInstance] = useNodeConfigNodeField(config)\n const [providedNode] = useProvidedNode()\n const [nodeAddressNode, error] = usePromise(async () => {\n if (providedNode && nodeAddress) {\n return asNodeInstance(await providedNode.resolve(nodeAddress), 'Module is not a node')\n }\n }, [providedNode, nodeAddress])\n return [nodeAddressNode ?? nodeInstance ?? providedNode ?? undefined, error]\n}\n","import { NodeInstance } from '@xyo-network/node-model'\nimport { useMemo } from 'react'\n\nimport { ModuleFromNodeConfig } from './ModuleFromNodeConfig'\n\nexport const useNodeConfigNodeField = (config?: ModuleFromNodeConfig | undefined): [string | undefined, NodeInstance | undefined] => {\n const nodeAddress = useMemo(() => (typeof config?.node === 'string' ? config?.node : undefined), [config?.node])\n const nodeInstance = useMemo(() => (typeof config?.node === 'object' ? config?.node : undefined), [config?.node])\n return [nodeAddress, nodeInstance]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { ModuleFilter } from '@xyo-network/module'\nimport { ModuleInstance } from '@xyo-network/module-model'\nimport { useState } from 'react'\n\nimport { ModuleFromNodeConfig } from './ModuleFromNodeConfig'\nimport { useModuleFilterOptions } from './useModuleFilterOptions'\nimport { useNode } from './useNode'\n\nexport const useModulesFromNode = (filter?: ModuleFilter, config?: ModuleFromNodeConfig): [ModuleInstance[] | undefined, Error | undefined] => {\n const [node, nodeError] = useNode(config)\n const logger = config?.logger\n const filterOptions = useModuleFilterOptions()\n const [result, setResult] = useState<ModuleInstance[] | undefined>()\n const [, error] = usePromise(async () => {\n logger?.debug('useModuleFromNode: resolving')\n if (node) {\n node.on('moduleAttached', async ({ module }) => {\n logger?.debug(`useModuleFromNode: moduleAttached [${module.config.name ?? module.address}]`)\n const moduleInstances = await node.resolve(filter, filterOptions)\n setResult(moduleInstances)\n })\n node.on('moduleDetached', async ({ module }) => {\n logger?.debug(`useModuleFromNode: moduleDetached [${module.config.name ?? module.address}]`)\n const moduleInstances = await node.resolve(filter, filterOptions)\n setResult(moduleInstances)\n })\n const moduleInstances = await node.resolve(filter, filterOptions)\n setResult(moduleInstances)\n setResult(moduleInstances)\n return moduleInstances\n }\n console.log('Result: No Node')\n return undefined\n }, [node, filter])\n return [result, nodeError ?? error]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { ModuleDescription } from '@xyo-network/module-model'\n\nimport { ModuleFromNodeConfig } from './ModuleFromNodeConfig'\nimport { useNode } from './useNode'\n\nexport const useNodeDescription = (config?: ModuleFromNodeConfig | undefined): [ModuleDescription | undefined, Error | undefined] => {\n const [activeNode, nodeError] = useNode(config)\n const [description, error] = usePromise(async () => {\n return await activeNode?.describe()\n }, [activeNode])\n return [description, nodeError ?? error]\n}\n","import { asNodeInstance, NodeInstance } from '@xyo-network/node-model'\n\nimport { ModuleFromNodeConfig } from './ModuleFromNodeConfig'\nimport { useModuleFromNode } from './useModuleFromNode'\n\nexport const useNodeFromNode = (\n nameOrAddressOrInstance?: string | NodeInstance,\n config?: ModuleFromNodeConfig,\n): [NodeInstance | undefined, Error | undefined] => {\n const [module, error] = useModuleFromNode(nameOrAddressOrInstance, config)\n const instance = asNodeInstance(module)\n if (module && !instance) {\n const error = Error(`Resolved module is not a NodeInstance [${module.config?.schema}:${module.config?.name}:${module.address}]`)\n console.error(error.message)\n return [undefined, error]\n }\n return [instance, error]\n}\n","import { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { NodeInstance } from '@xyo-network/node-model'\n\nimport { NodeDescriptionBox } from './NodeDescriptionBox'\n\nexport interface NodeBoxProps extends FlexBoxProps {\n node?: string | NodeInstance\n variant?: 'description'\n}\n\nexport const NodeBox: React.FC<NodeBoxProps> = ({ variant, ...props }) => {\n switch (variant) {\n case 'description':\n default:\n return <NodeDescriptionBox {...props} />\n }\n}\n","import { Close as CloseIcon } from '@mui/icons-material'\nimport { ClickAwayListener, Drawer, DrawerProps, IconButton } from '@mui/material'\nimport { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport type { WithChildren } from '@xylabs/react-shared'\nimport { useNodeDrawer } from '@xyo-network/react-node-provider'\n\nimport { useProvidedNode } from '../hooks'\nimport { ModuleDescriptionBox } from './render'\n\nexport interface NodeDrawerProps extends WithChildren, Omit<DrawerProps, 'open'> {}\n\nexport const NodeDrawer: React.FC<NodeDrawerProps> = ({ children, ...props }) => {\n const { open, setOpen } = useNodeDrawer()\n const [node] = useProvidedNode()\n\n return (\n <Drawer open={open ?? false} anchor=\"right\" {...props}>\n <ClickAwayListener onClickAway={() => setOpen?.(false)}>\n <FlexGrowCol role=\"presentation\" justifyContent=\"start\" p={2} rowGap={2} minWidth=\"33vw\">\n <FlexRow alignContent=\"start\" justifyContent=\"start\" width=\"100%\">\n <IconButton onClick={() => setOpen?.(false)}>\n <CloseIcon />\n </IconButton>\n </FlexRow>\n <ModuleDescriptionBox module={node} />\n {children}\n </FlexGrowCol>\n </ClickAwayListener>\n </Drawer>\n )\n}\n","import { ChevronRight as ChevronRightIcon, ExpandMore as ExpandMoreIcon } from '@mui/icons-material'\nimport { styled, Typography } from '@mui/material'\nimport { TreeView } from '@mui/x-tree-view'\nimport { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { ModuleInstance } from '@xyo-network/module'\nimport { useRef } from 'react'\n\nimport { RenderModule } from './RenderModule'\n\nexport interface ModuleDescriptionProps extends FlexBoxProps {\n module?: ModuleInstance | null\n}\nexport const ModuleDescriptionBox: React.FC<ModuleDescriptionProps> = ({ module }) => {\n const idRef = useRef<{ idIncrementor: number; ids: string[] }>({ idIncrementor: 0, ids: [] })\n\n return (\n <>\n {module ? (\n <>\n <Typography variant=\"h4\">Node Configuration</Typography>\n <StyledTreeView\n aria-label=\"file system navigator\"\n defaultCollapseIcon={<ExpandMoreIcon />}\n defaultExpandIcon={<ChevronRightIcon />}\n sx={{ flexGrow: 1 }}\n >\n <RenderModule module={module} idRef={idRef} />\n </StyledTreeView>\n </>\n ) : module === null ? (\n <Typography variant=\"h4\">Node loading...</Typography>\n ) : (\n <Typography variant=\"h4\">Node not found</Typography>\n )}\n </>\n )\n}\n\nconst StyledTreeView = styled(TreeView, { name: 'StyledTreeView' })(() => ({\n height: 'auto',\n maxWidth: 'auto',\n}))\n","import { styled } from '@mui/material'\nimport { TreeItem } from '@mui/x-tree-view'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { ModuleInstance } from '@xyo-network/module'\nimport { MutableRefObject, useState } from 'react'\n\ninterface RenderModuleProps {\n idRef: MutableRefObject<{\n idIncrementor: number\n ids: string[]\n }>\n module: ModuleInstance\n}\n\nexport const RenderModule: React.FC<RenderModuleProps> = ({ module, idRef }) => {\n const { address, queries } = module ?? {}\n const [childModules, setChildModules] = useState<ModuleInstance[]>()\n\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async (mounted) => {\n const children = (await module.resolve()).filter((childModule) => childModule.address !== address)\n if (mounted()) {\n setChildModules(children)\n }\n },\n [module, address],\n )\n\n const increment = () => {\n const newId = (idRef.current.idIncrementor++).toString()\n idRef.current.ids.push(newId)\n return newId\n }\n\n return (\n <StyledAddressTreeItem nodeId={increment()} label={`address: ${address}`}>\n {queries.map((query, index) => {\n return <TreeItem key={query} nodeId={increment()} label={`query : ${query}`} sx={{ mb: index === queries.length - 1 ? 1.5 : 0.5 }} />\n })}\n {childModules && childModules.length > 0 ? (\n <TreeItem nodeId={increment()} label={'children'} sx={{ mb: 0.5 }}>\n {childModules.map((childModule) => (\n <RenderModule key={childModule.address} module={childModule} idRef={idRef} />\n ))}\n </TreeItem>\n ) : null}\n </StyledAddressTreeItem>\n )\n}\n\nconst StyledAddressTreeItem = styled(TreeItem, { name: 'Styled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KACH,GACF,GACF;AAEJ;;;AZ5BA,wBAAc,4CAFd;AAGA,wBAAc,6CAHd;","names":["import_react_promise","import_react","import_react","module","result","import_react_promise","import_react","module","moduleInstances","import_react_promise","import_node_model","module","error","import_jsx_runtime","import_icons_material","import_material","import_react_flexbox","import_material","import_x_tree_view","import_react","import_react","import_jsx_runtime","module","import_jsx_runtime","module","ExpandMoreIcon","ChevronRightIcon","import_jsx_runtime","CloseIcon"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/components/NodeDescriptionBox.tsx","../../src/hooks/ModuleFromNodeConfig.ts","../../src/hooks/provided/useProvidedNode.tsx","../../src/hooks/useModuleFilterOptions.ts","../../src/hooks/useModuleFromNode.ts","../../src/hooks/useNode.ts","../../src/hooks/useNodeConfigNodeField.ts","../../src/hooks/useModulesFromNode.ts","../../src/hooks/useNodeDescription.ts","../../src/hooks/useNodeFromNode.tsx","../../src/components/Node.tsx","../../src/components/NodeDrawer.tsx","../../src/components/render/ModuleDescriptionBox.tsx","../../src/components/render/RenderModule.tsx"],"sourcesContent":["export * from './components'\nexport * from './hooks'\nexport * from '@xyo-network/react-node-context'\nexport * from '@xyo-network/react-node-provider'\n","import { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport { NodeInstance } from '@xyo-network/node-model'\n\nimport { useNodeDescription } from '../hooks'\n\nexport interface NodeDescriptionBoxProps extends FlexBoxProps {\n node?: string | NodeInstance\n}\n\nexport const NodeDescriptionBox: React.FC<NodeDescriptionBoxProps> = ({ node, ...props }) => {\n const [description, error] = useNodeDescription({ node })\n\n return (\n <FlexCol {...props}>\n <code color={error ? 'red' : undefined}>{error ? error.message : JSON.stringify(description, null, 2)}</code>\n </FlexCol>\n )\n}\n","import { Logger } from '@xylabs/logger'\nimport { ModuleFilterOptions } from '@xyo-network/module-model'\nimport { NodeInstance } from '@xyo-network/node-model'\n\nexport type ModuleFromNodeConfig = ModuleFilterOptions & {\n logger?: Logger\n node?: NodeInstance | string\n}\n\nexport const useModuleFromNodeConfigLogger = (config?: ModuleFromNodeConfig) => {\n return config?.logger\n}\n","import { NodeInstance } from '@xyo-network/node-model'\nimport { NodeContext } from '@xyo-network/react-node-context'\nimport { useContext } from 'react'\n\nexport const useProvidedNode = (): [NodeInstance | null | undefined] => {\n const { node } = useContext(NodeContext)\n return [node]\n}\n","import { ModuleFromNodeConfig } from './ModuleFromNodeConfig'\n\nexport const useModuleFilterOptions = (config?: ModuleFromNodeConfig) => {\n const { direction, identity, maxDepth, visibility } = config ?? {}\n return { direction, identity, maxDepth, visibility }\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { asModuleInstance, isModuleInstance, ModuleInstance } from '@xyo-network/module-model'\nimport { useState } from 'react'\n\nimport { ModuleFromNodeConfig, useModuleFromNodeConfigLogger } from './ModuleFromNodeConfig'\nimport { useModuleFilterOptions } from './useModuleFilterOptions'\nimport { useNode } from './useNode'\n\nexport const useModuleFromNode = (\n nameOrAddressOrInstance?: string | ModuleInstance,\n config?: ModuleFromNodeConfig,\n): [ModuleInstance | undefined, Error | undefined] => {\n const [node, nodeError] = useNode(config)\n const logger = useModuleFromNodeConfigLogger(config)\n const filterOptions = useModuleFilterOptions(config)\n const [result, setResult] = useState<ModuleInstance | undefined>()\n const [, error] = usePromise(async () => {\n logger?.debug('useModuleFromNode: resolving')\n if (node && nameOrAddressOrInstance) {\n node.on('moduleAttached', ({ module }) => {\n logger?.debug(`useModuleFromNode: moduleAttached [${module.config.name ?? module.address}]`)\n if (module.address === nameOrAddressOrInstance || module.config?.name === nameOrAddressOrInstance) {\n setResult(asModuleInstance(module))\n }\n })\n node.on('moduleDetached', ({ module }) => {\n logger?.debug(`useModuleFromNode: moduleDetached [${module.config.name ?? module.address}]`)\n if (module.address === nameOrAddressOrInstance || module.config?.name === nameOrAddressOrInstance) {\n setResult(undefined)\n }\n })\n if (isModuleInstance(nameOrAddressOrInstance)) {\n setResult(nameOrAddressOrInstance)\n } else {\n const result = await node.resolve(nameOrAddressOrInstance, filterOptions)\n logger?.debug(`Result: ${result?.address}`)\n setResult(result)\n }\n return result\n }\n logger?.debug('Result: No Node')\n return undefined\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [node, nameOrAddressOrInstance])\n return [result, nodeError ?? error]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { asNodeInstance, NodeInstance } from '@xyo-network/node-model'\n\nimport { ModuleFromNodeConfig } from './ModuleFromNodeConfig'\nimport { useProvidedNode } from './provided'\nimport { useNodeConfigNodeField } from './useNodeConfigNodeField'\n\nexport const useNode = (config?: ModuleFromNodeConfig | undefined): [NodeInstance | undefined, Error | undefined] => {\n const [nodeAddress, nodeInstance] = useNodeConfigNodeField(config)\n const [providedNode] = useProvidedNode()\n const [nodeAddressNode, error] = usePromise(async () => {\n if (providedNode && nodeAddress) {\n return asNodeInstance(await providedNode.resolve(nodeAddress), 'Module is not a node')\n }\n }, [providedNode, nodeAddress])\n return [nodeAddressNode ?? nodeInstance ?? providedNode ?? undefined, error]\n}\n","import { NodeInstance } from '@xyo-network/node-model'\nimport { useMemo } from 'react'\n\nimport { ModuleFromNodeConfig } from './ModuleFromNodeConfig'\n\nexport const useNodeConfigNodeField = (config?: ModuleFromNodeConfig | undefined): [string | undefined, NodeInstance | undefined] => {\n const nodeAddress = useMemo(() => (typeof config?.node === 'string' ? config?.node : undefined), [config?.node])\n const nodeInstance = useMemo(() => (typeof config?.node === 'object' ? config?.node : undefined), [config?.node])\n return [nodeAddress, nodeInstance]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { ModuleFilter, ModuleInstance } from '@xyo-network/module-model'\nimport { useState } from 'react'\n\nimport { ModuleFromNodeConfig } from './ModuleFromNodeConfig'\nimport { useModuleFilterOptions } from './useModuleFilterOptions'\nimport { useNode } from './useNode'\n\nexport const useModulesFromNode = (filter?: ModuleFilter, config?: ModuleFromNodeConfig): [ModuleInstance[] | undefined, Error | undefined] => {\n const [node, nodeError] = useNode(config)\n const logger = config?.logger\n const filterOptions = useModuleFilterOptions()\n const [result, setResult] = useState<ModuleInstance[] | undefined>()\n const [, error] = usePromise(async () => {\n logger?.debug('useModuleFromNode: resolving')\n if (node) {\n node.on('moduleAttached', async ({ module }) => {\n logger?.debug(`useModuleFromNode: moduleAttached [${module.config.name ?? module.address}]`)\n const moduleInstances = await node.resolve(filter, filterOptions)\n setResult(moduleInstances)\n })\n node.on('moduleDetached', async ({ module }) => {\n logger?.debug(`useModuleFromNode: moduleDetached [${module.config.name ?? module.address}]`)\n const moduleInstances = await node.resolve(filter, filterOptions)\n setResult(moduleInstances)\n })\n const moduleInstances = await node.resolve(filter, filterOptions)\n setResult(moduleInstances)\n setResult(moduleInstances)\n return moduleInstances\n }\n console.log('Result: No Node')\n return undefined\n }, [node, filter])\n return [result, nodeError ?? error]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { ModuleDescription } from '@xyo-network/module-model'\n\nimport { ModuleFromNodeConfig } from './ModuleFromNodeConfig'\nimport { useNode } from './useNode'\n\nexport const useNodeDescription = (config?: ModuleFromNodeConfig | undefined): [ModuleDescription | undefined, Error | undefined] => {\n const [activeNode, nodeError] = useNode(config)\n const [description, error] = usePromise(async () => {\n return await activeNode?.describe()\n }, [activeNode])\n return [description, nodeError ?? error]\n}\n","import { asNodeInstance, NodeInstance } from '@xyo-network/node-model'\n\nimport { ModuleFromNodeConfig } from './ModuleFromNodeConfig'\nimport { useModuleFromNode } from './useModuleFromNode'\n\nexport const useNodeFromNode = (\n nameOrAddressOrInstance?: string | NodeInstance,\n config?: ModuleFromNodeConfig,\n): [NodeInstance | undefined, Error | undefined] => {\n const [module, error] = useModuleFromNode(nameOrAddressOrInstance, config)\n const instance = asNodeInstance(module)\n if (module && !instance) {\n const error = Error(`Resolved module is not a NodeInstance [${module.config?.schema}:${module.config?.name}:${module.address}]`)\n console.error(error.message)\n return [undefined, error]\n }\n return [instance, error]\n}\n","import { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { NodeInstance } from '@xyo-network/node-model'\n\nimport { NodeDescriptionBox } from './NodeDescriptionBox'\n\nexport interface NodeBoxProps extends FlexBoxProps {\n node?: string | NodeInstance\n variant?: 'description'\n}\n\nexport const NodeBox: React.FC<NodeBoxProps> = ({ variant, ...props }) => {\n switch (variant) {\n case 'description':\n default:\n return <NodeDescriptionBox {...props} />\n }\n}\n","import { Close as CloseIcon } from '@mui/icons-material'\nimport { ClickAwayListener, Drawer, DrawerProps, IconButton } from '@mui/material'\nimport { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport type { WithChildren } from '@xylabs/react-shared'\nimport { useNodeDrawer } from '@xyo-network/react-node-provider'\n\nimport { useProvidedNode } from '../hooks'\nimport { ModuleDescriptionBox } from './render'\n\nexport interface NodeDrawerProps extends WithChildren, Omit<DrawerProps, 'open'> {}\n\nexport const NodeDrawer: React.FC<NodeDrawerProps> = ({ children, ...props }) => {\n const { open, setOpen } = useNodeDrawer()\n const [node] = useProvidedNode()\n\n return (\n <Drawer open={open ?? false} anchor=\"right\" {...props}>\n <ClickAwayListener onClickAway={() => setOpen?.(false)}>\n <FlexGrowCol role=\"presentation\" justifyContent=\"start\" p={2} rowGap={2} minWidth=\"33vw\">\n <FlexRow alignContent=\"start\" justifyContent=\"start\" width=\"100%\">\n <IconButton onClick={() => setOpen?.(false)}>\n <CloseIcon />\n </IconButton>\n </FlexRow>\n <ModuleDescriptionBox module={node} />\n {children}\n </FlexGrowCol>\n </ClickAwayListener>\n </Drawer>\n )\n}\n","import { ChevronRight as ChevronRightIcon, ExpandMore as ExpandMoreIcon } from '@mui/icons-material'\nimport { styled, Typography } from '@mui/material'\nimport { TreeView } from '@mui/x-tree-view'\nimport { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { ModuleInstance } from '@xyo-network/module-model'\nimport { useRef } from 'react'\n\nimport { RenderModule } from './RenderModule'\n\nexport interface ModuleDescriptionProps extends FlexBoxProps {\n module?: ModuleInstance | null\n}\nexport const ModuleDescriptionBox: React.FC<ModuleDescriptionProps> = ({ module }) => {\n const idRef = useRef<{ idIncrementor: number; ids: string[] }>({ idIncrementor: 0, ids: [] })\n\n return (\n <>\n {module ? (\n <>\n <Typography variant=\"h4\">Node Configuration</Typography>\n <StyledTreeView\n aria-label=\"file system navigator\"\n defaultCollapseIcon={<ExpandMoreIcon />}\n defaultExpandIcon={<ChevronRightIcon />}\n sx={{ flexGrow: 1 }}\n >\n <RenderModule module={module} idRef={idRef} />\n </StyledTreeView>\n </>\n ) : module === null ? (\n <Typography variant=\"h4\">Node loading...</Typography>\n ) : (\n <Typography variant=\"h4\">Node not found</Typography>\n )}\n </>\n )\n}\n\nconst StyledTreeView = styled(TreeView, { name: 'StyledTreeView' })(() => ({\n height: 'auto',\n maxWidth: 'auto',\n}))\n","import { styled } from '@mui/material'\nimport { TreeItem } from '@mui/x-tree-view'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { ModuleInstance } from '@xyo-network/module-model'\nimport { MutableRefObject, useState } from 'react'\n\ninterface RenderModuleProps {\n idRef: MutableRefObject<{\n idIncrementor: number\n ids: string[]\n }>\n module: ModuleInstance\n}\n\nexport const RenderModule: React.FC<RenderModuleProps> = ({ module, idRef }) => {\n const { address, queries } = module ?? {}\n const [childModules, setChildModules] = useState<ModuleInstance[]>()\n\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async (mounted) => {\n const children = (await module.resolve()).filter((childModule) => childModule.address !== address)\n if (mounted()) {\n setChildModules(children)\n }\n },\n [module, address],\n )\n\n const increment = () => {\n const newId = (idRef.current.idIncrementor++).toString()\n idRef.current.ids.push(newId)\n return newId\n }\n\n return (\n <StyledAddressTreeItem nodeId={increment()} label={`address: ${address}`}>\n {queries.map((query, index) => {\n return <TreeItem key={query} nodeId={increment()} label={`query : ${query}`} sx={{ mb: index === queries.length - 1 ? 1.5 : 0.5 }} />\n })}\n {childModules && childModules.length > 0 ? (\n <TreeItem nodeId={increment()} label={'children'} sx={{ mb: 0.5 }}>\n {childModules.map((childModule) => (\n <RenderModule key={childModule.address} module={childModule} idRef={idRef} />\n ))}\n </TreeItem>\n ) : null}\n </StyledAddressTreeItem>\n )\n}\n\nconst StyledAddressTreeItem = styled(TreeItem, { name: 'StyledAddressTreeItem' })(({ theme }) => ({\n '& .MuiTreeItem-content': {\n marginBottom: theme.spacing(0.25),\n },\n}))\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,2BAAsC;;;ACS/B,IAAM,gCAAgC,CAAC,WAAkC;AAC9E,SAAO,iCAAQ;AACjB;;;ACVA,gCAA4B;AAC5B,mBAA2B;AAEpB,IAAM,kBAAkB,MAAyC;AACtE,QAAM,EAAE,KAAK,QAAI,yBAAW,qCAAW;AACvC,SAAO,CAAC,IAAI;AACd;;;ACLO,IAAM,yBAAyB,CAAC,WAAkC;AACvE,QAAM,EAAE,WAAW,UAAU,UAAU,WAAW,IAAI,UAAU,CAAC;AACjE,SAAO,EAAE,WAAW,UAAU,UAAU,WAAW;AACrD;;;ACLA,IAAAA,wBAA2B;AAC3B,0BAAmE;AACnE,IAAAC,gBAAyB;;;ACFzB,2BAA2B;AAC3B,wBAA6C;;;ACA7C,IAAAC,gBAAwB;AAIjB,IAAM,yBAAyB,CAAC,WAA8F;AACnI,QAAM,kBAAc,uBAAQ,MAAO,QAAO,iCAAQ,UAAS,WAAW,iCAAQ,OAAO,QAAY,CAAC,iCAAQ,IAAI,CAAC;AAC/G,QAAM,mBAAe,uBAAQ,MAAO,QAAO,iCAAQ,UAAS,WAAW,iCAAQ,OAAO,QAAY,CAAC,iCAAQ,IAAI,CAAC;AAChH,SAAO,CAAC,aAAa,YAAY;AACnC;;;ADFO,IAAM,UAAU,CAAC,WAA6F;AACnH,QAAM,CAAC,aAAa,YAAY,IAAI,uBAAuB,MAAM;AACjE,QAAM,CAAC,YAAY,IAAI,gBAAgB;AACvC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,SAAS,MAAM,mCAAU,QACnC,uDAAC,uBAAAC,OAAA,EAAU,GACb,GACF;AAAA,IACA,6CAAC,wBAAqB,QAAQ,MAAM;AAAA,IACnC;AAAA,KACH,GACF,GACF;AAEJ;;;AZ5BA,wBAAc,4CAFd;AAGA,wBAAc,6CAHd;","names":["import_react_promise","import_react","import_react","module","result","import_react_promise","import_react","module","moduleInstances","import_react_promise","import_node_model","module","error","import_jsx_runtime","import_icons_material","import_material","import_react_flexbox","import_material","import_x_tree_view","import_react","import_react","import_jsx_runtime","module","import_jsx_runtime","module","ExpandMoreIcon","ChevronRightIcon","import_jsx_runtime","CloseIcon"]}
|
package/dist/node/index.js
CHANGED
|
@@ -22,8 +22,7 @@ var useModuleFilterOptions = (config) => {
|
|
|
22
22
|
|
|
23
23
|
// src/hooks/useModuleFromNode.ts
|
|
24
24
|
import { usePromise as usePromise2 } from "@xylabs/react-promise";
|
|
25
|
-
import { asModuleInstance } from "@xyo-network/module";
|
|
26
|
-
import { isModuleInstance } from "@xyo-network/module-model";
|
|
25
|
+
import { asModuleInstance, isModuleInstance } from "@xyo-network/module-model";
|
|
27
26
|
import { useState } from "react";
|
|
28
27
|
|
|
29
28
|
// src/hooks/useNode.ts
|