@xyo-network/react-module 2.64.0-rc.6 → 2.64.0
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/ModuleRenderProps.cjs +19 -0
- package/dist/browser/ModuleRenderProps.cjs.map +1 -0
- package/dist/browser/ModuleRenderProps.d.cts +7 -0
- package/dist/browser/ModuleRenderProps.d.cts.map +1 -0
- package/dist/browser/components/Card/Diviner/Card.cjs +122 -0
- package/dist/browser/components/Card/Diviner/Card.cjs.map +1 -0
- package/dist/browser/components/Card/Diviner/Card.d.cts +6 -0
- package/dist/browser/components/Card/Diviner/Card.d.cts.map +1 -0
- package/dist/browser/components/Card/Diviner/CardActions.cjs +75 -0
- package/dist/browser/components/Card/Diviner/CardActions.cjs.map +1 -0
- package/dist/browser/components/Card/Diviner/CardActions.d.cts +6 -0
- package/dist/browser/components/Card/Diviner/CardActions.d.cts.map +1 -0
- package/dist/browser/components/Card/Diviner/CardContent.cjs +39 -0
- package/dist/browser/components/Card/Diviner/CardContent.cjs.map +1 -0
- package/dist/browser/components/Card/Diviner/CardContent.d.cts +6 -0
- package/dist/browser/components/Card/Diviner/CardContent.d.cts.map +1 -0
- package/dist/browser/components/Card/Diviner/CardHeader.cjs +54 -0
- package/dist/browser/components/Card/Diviner/CardHeader.cjs.map +1 -0
- package/dist/browser/components/Card/Diviner/CardHeader.d.cts +6 -0
- package/dist/browser/components/Card/Diviner/CardHeader.d.cts.map +1 -0
- package/dist/browser/components/Card/Diviner/index.cjs +126 -0
- package/dist/browser/components/Card/Diviner/index.cjs.map +1 -0
- package/dist/browser/components/Card/Diviner/index.d.cts +4 -0
- package/dist/browser/components/Card/Diviner/index.d.cts.map +1 -0
- package/dist/browser/components/Card/Module/Card.cjs +109 -0
- package/dist/browser/components/Card/Module/Card.cjs.map +1 -0
- package/dist/browser/components/Card/Module/Card.d.cts +5 -0
- package/dist/browser/components/Card/Module/Card.d.cts.map +1 -0
- package/dist/browser/components/Card/Module/CardActions.cjs +67 -0
- package/dist/browser/components/Card/Module/CardActions.cjs.map +1 -0
- package/dist/browser/components/Card/Module/CardActions.d.cts +5 -0
- package/dist/browser/components/Card/Module/CardActions.d.cts.map +1 -0
- package/dist/browser/components/Card/Module/CardContent.cjs +31 -0
- package/dist/{node/components/Card/Module/CardContent.mjs.map → browser/components/Card/Module/CardContent.cjs.map} +1 -1
- package/dist/browser/components/Card/Module/CardContent.d.cts +5 -0
- package/dist/browser/components/Card/Module/CardContent.d.cts.map +1 -0
- package/dist/browser/components/Card/Module/CardHeader.cjs +46 -0
- package/dist/{node/components/Card/Module/CardHeader.mjs.map → browser/components/Card/Module/CardHeader.cjs.map} +1 -1
- package/dist/browser/components/Card/Module/CardHeader.d.cts +5 -0
- package/dist/browser/components/Card/Module/CardHeader.d.cts.map +1 -0
- package/dist/browser/components/Card/Module/components/DiscoverDialog.cjs +46 -0
- package/dist/{node/components/Card/Module/components/DiscoverDialog.mjs.map → browser/components/Card/Module/components/DiscoverDialog.cjs.map} +1 -1
- package/dist/browser/components/Card/Module/components/DiscoverDialog.d.cts +9 -0
- package/dist/browser/components/Card/Module/components/DiscoverDialog.d.cts.map +1 -0
- package/dist/browser/components/Card/Module/components/index.cjs +48 -0
- package/dist/browser/components/Card/Module/components/index.cjs.map +1 -0
- package/dist/browser/components/Card/Module/components/index.d.cts +2 -0
- package/dist/browser/components/Card/Module/components/index.d.cts.map +1 -0
- package/dist/browser/components/Card/Module/index.cjs +114 -0
- package/dist/browser/components/Card/Module/index.cjs.map +1 -0
- package/dist/browser/components/Card/Module/index.d.cts +5 -0
- package/dist/browser/components/Card/Module/index.d.cts.map +1 -0
- package/dist/browser/components/Card/index.cjs +143 -0
- package/dist/browser/components/Card/index.cjs.map +1 -0
- package/dist/browser/components/Card/index.d.cts +3 -0
- package/dist/browser/components/Card/index.d.cts.map +1 -0
- package/dist/browser/components/DetailsBox.cjs +52 -0
- package/dist/{node/components/DetailsBox.mjs.map → browser/components/DetailsBox.cjs.map} +1 -1
- package/dist/browser/components/DetailsBox.d.cts +5 -0
- package/dist/browser/components/DetailsBox.d.cts.map +1 -0
- package/dist/browser/components/TableCell.cjs +36 -0
- package/dist/{node/components/TableCell.mjs.map → browser/components/TableCell.cjs.map} +1 -1
- package/dist/browser/components/TableCell.d.cts +5 -0
- package/dist/browser/components/TableCell.d.cts.map +1 -0
- package/dist/browser/components/index.cjs +185 -0
- package/dist/browser/components/index.cjs.map +1 -0
- package/dist/browser/components/index.d.cts +4 -0
- package/dist/browser/components/index.d.cts.map +1 -0
- package/dist/browser/hooks/index.cjs +41 -0
- package/dist/browser/hooks/index.cjs.map +1 -0
- package/dist/browser/hooks/index.d.cts +2 -0
- package/dist/browser/hooks/index.d.cts.map +1 -0
- package/dist/browser/hooks/useRefresh.cjs +39 -0
- package/dist/{node/hooks/useRefresh.mjs.map → browser/hooks/useRefresh.cjs.map} +1 -1
- package/dist/browser/hooks/useRefresh.d.cts +4 -0
- package/dist/browser/hooks/useRefresh.d.cts.map +1 -0
- package/dist/browser/index.cjs +201 -0
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.cts +4 -0
- package/dist/browser/index.d.cts.map +1 -0
- package/dist/docs.json +2921 -0
- package/dist/node/ModuleRenderProps.cjs +19 -0
- package/dist/node/ModuleRenderProps.cjs.map +1 -0
- package/dist/node/ModuleRenderProps.d.cts +7 -0
- package/dist/node/ModuleRenderProps.d.cts.map +1 -0
- package/dist/node/ModuleRenderProps.js +0 -16
- package/dist/node/ModuleRenderProps.js.map +1 -1
- package/dist/node/components/Card/Diviner/Card.cjs +127 -0
- package/dist/node/components/Card/Diviner/Card.cjs.map +1 -0
- package/dist/node/components/Card/Diviner/Card.d.cts +6 -0
- package/dist/node/components/Card/Diviner/Card.d.cts.map +1 -0
- package/dist/node/components/Card/Diviner/Card.js +97 -36
- package/dist/node/components/Card/Diviner/Card.js.map +1 -1
- package/dist/node/components/Card/Diviner/CardActions.cjs +79 -0
- package/dist/node/components/Card/Diviner/CardActions.cjs.map +1 -0
- package/dist/node/components/Card/Diviner/CardActions.d.cts +6 -0
- package/dist/node/components/Card/Diviner/CardActions.d.cts.map +1 -0
- package/dist/node/components/Card/Diviner/CardActions.js +47 -28
- package/dist/node/components/Card/Diviner/CardActions.js.map +1 -1
- package/dist/node/components/Card/Diviner/CardContent.cjs +43 -0
- package/dist/node/components/Card/Diviner/CardContent.cjs.map +1 -0
- package/dist/node/components/Card/Diviner/CardContent.d.cts +6 -0
- package/dist/node/components/Card/Diviner/CardContent.d.cts.map +1 -0
- package/dist/node/components/Card/Diviner/CardContent.js +12 -29
- package/dist/node/components/Card/Diviner/CardContent.js.map +1 -1
- package/dist/node/components/Card/Diviner/CardHeader.cjs +59 -0
- package/dist/node/components/Card/Diviner/CardHeader.cjs.map +1 -0
- package/dist/node/components/Card/Diviner/CardHeader.d.cts +6 -0
- package/dist/node/components/Card/Diviner/CardHeader.d.cts.map +1 -0
- package/dist/node/components/Card/Diviner/CardHeader.js +27 -28
- package/dist/node/components/Card/Diviner/CardHeader.js.map +1 -1
- package/dist/node/components/Card/Diviner/index.cjs +133 -0
- package/dist/node/components/Card/Diviner/index.cjs.map +1 -0
- package/dist/node/components/Card/Diviner/index.d.cts +4 -0
- package/dist/node/components/Card/Diviner/index.d.cts.map +1 -0
- package/dist/node/components/Card/Diviner/index.js +103 -26
- package/dist/node/components/Card/Diviner/index.js.map +1 -1
- package/dist/node/components/Card/Module/Card.cjs +114 -0
- package/dist/node/components/Card/Module/Card.cjs.map +1 -0
- package/dist/node/components/Card/Module/Card.d.cts +5 -0
- package/dist/node/components/Card/Module/Card.d.cts.map +1 -0
- package/dist/node/components/Card/Module/Card.js +83 -34
- package/dist/node/components/Card/Module/Card.js.map +1 -1
- package/dist/node/components/Card/Module/CardActions.cjs +71 -0
- package/dist/node/components/Card/Module/CardActions.cjs.map +1 -0
- package/dist/node/components/Card/Module/CardActions.d.cts +5 -0
- package/dist/node/components/Card/Module/CardActions.d.cts.map +1 -0
- package/dist/node/components/Card/Module/CardActions.js +39 -39
- package/dist/node/components/Card/Module/CardActions.js.map +1 -1
- package/dist/node/components/Card/Module/CardContent.cjs +35 -0
- package/dist/node/components/Card/Module/CardContent.cjs.map +1 -0
- package/dist/node/components/Card/Module/CardContent.d.cts +5 -0
- package/dist/node/components/Card/Module/CardContent.d.cts.map +1 -0
- package/dist/node/components/Card/Module/CardContent.js +7 -30
- package/dist/node/components/Card/Module/CardContent.js.map +1 -1
- package/dist/node/components/Card/Module/CardHeader.cjs +51 -0
- package/dist/node/components/Card/Module/CardHeader.cjs.map +1 -0
- package/dist/node/components/Card/Module/CardHeader.d.cts +5 -0
- package/dist/node/components/Card/Module/CardHeader.d.cts.map +1 -0
- package/dist/node/components/Card/Module/CardHeader.js +17 -39
- package/dist/node/components/Card/Module/CardHeader.js.map +1 -1
- package/dist/node/components/Card/Module/components/DiscoverDialog.cjs +50 -0
- package/dist/node/components/Card/Module/components/DiscoverDialog.cjs.map +1 -0
- package/dist/node/components/Card/Module/components/DiscoverDialog.d.cts +9 -0
- package/dist/node/components/Card/Module/components/DiscoverDialog.d.cts.map +1 -0
- package/dist/node/components/Card/Module/components/DiscoverDialog.js +18 -41
- package/dist/node/components/Card/Module/components/DiscoverDialog.js.map +1 -1
- package/dist/node/components/Card/Module/components/index.cjs +52 -0
- package/dist/node/components/Card/Module/components/index.cjs.map +1 -0
- package/dist/node/components/Card/Module/components/index.d.cts +2 -0
- package/dist/node/components/Card/Module/components/index.d.cts.map +1 -0
- package/dist/node/components/Card/Module/components/index.js +23 -21
- package/dist/node/components/Card/Module/components/index.js.map +1 -1
- package/dist/node/components/Card/Module/index.cjs +122 -0
- package/dist/node/components/Card/Module/index.cjs.map +1 -0
- package/dist/node/components/Card/Module/index.d.cts +5 -0
- package/dist/node/components/Card/Module/index.d.cts.map +1 -0
- package/dist/node/components/Card/Module/index.js +90 -27
- package/dist/node/components/Card/Module/index.js.map +1 -1
- package/dist/node/components/Card/index.cjs +154 -0
- package/dist/node/components/Card/index.cjs.map +1 -0
- package/dist/node/components/Card/index.d.cts +3 -0
- package/dist/node/components/Card/index.d.cts.map +1 -0
- package/dist/node/components/Card/index.js +120 -24
- package/dist/node/components/Card/index.js.map +1 -1
- package/dist/node/components/DetailsBox.cjs +57 -0
- package/dist/node/components/DetailsBox.cjs.map +1 -0
- package/dist/node/components/DetailsBox.d.cts +5 -0
- package/dist/node/components/DetailsBox.d.cts.map +1 -0
- package/dist/node/components/DetailsBox.js +23 -45
- package/dist/node/components/DetailsBox.js.map +1 -1
- package/dist/node/components/TableCell.cjs +40 -0
- package/dist/node/components/TableCell.cjs.map +1 -0
- package/dist/node/components/TableCell.d.cts +5 -0
- package/dist/node/components/TableCell.d.cts.map +1 -0
- package/dist/node/components/TableCell.js +10 -33
- package/dist/node/components/TableCell.js.map +1 -1
- package/dist/node/components/index.cjs +199 -0
- package/dist/node/components/index.cjs.map +1 -0
- package/dist/node/components/index.d.cts +4 -0
- package/dist/node/components/index.d.cts.map +1 -0
- package/dist/node/components/index.js +163 -26
- package/dist/node/components/index.js.map +1 -1
- package/dist/node/hooks/index.cjs +45 -0
- package/dist/node/hooks/index.cjs.map +1 -0
- package/dist/node/hooks/index.d.cts +2 -0
- package/dist/node/hooks/index.d.cts.map +1 -0
- package/dist/node/hooks/index.js +16 -21
- package/dist/node/hooks/index.js.map +1 -1
- package/dist/node/hooks/useRefresh.cjs +43 -0
- package/dist/node/hooks/useRefresh.cjs.map +1 -0
- package/dist/node/hooks/useRefresh.d.cts +4 -0
- package/dist/node/hooks/useRefresh.d.cts.map +1 -0
- package/dist/node/hooks/useRefresh.js +6 -29
- package/dist/node/hooks/useRefresh.js.map +1 -1
- package/dist/node/index.cjs +216 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +4 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.js +179 -26
- package/dist/node/index.js.map +1 -1
- package/package.json +26 -26
- package/dist/browser/components/Card/Diviner/Card.stories.js +0 -37
- package/dist/browser/components/Card/Diviner/Card.stories.js.map +0 -1
- package/dist/browser/components/Card/Module/Card.stories.js +0 -43
- package/dist/browser/components/Card/Module/Card.stories.js.map +0 -1
- package/dist/browser/components/DetailsBox.stories.js +0 -74
- package/dist/browser/components/DetailsBox.stories.js.map +0 -1
- package/dist/node/ModuleRenderProps.mjs +0 -1
- package/dist/node/ModuleRenderProps.mjs.map +0 -1
- package/dist/node/components/Card/Diviner/Card.mjs +0 -17
- package/dist/node/components/Card/Diviner/Card.mjs.map +0 -1
- package/dist/node/components/Card/Diviner/Card.stories.js +0 -61
- package/dist/node/components/Card/Diviner/Card.stories.js.map +0 -1
- package/dist/node/components/Card/Diviner/Card.stories.mjs +0 -37
- package/dist/node/components/Card/Diviner/Card.stories.mjs.map +0 -1
- package/dist/node/components/Card/Diviner/CardActions.mjs +0 -9
- package/dist/node/components/Card/Diviner/CardActions.mjs.map +0 -1
- package/dist/node/components/Card/Diviner/CardContent.mjs +0 -9
- package/dist/node/components/Card/Diviner/CardContent.mjs.map +0 -1
- package/dist/node/components/Card/Diviner/CardHeader.mjs +0 -9
- package/dist/node/components/Card/Diviner/CardHeader.mjs.map +0 -1
- package/dist/node/components/Card/Diviner/index.mjs +0 -4
- package/dist/node/components/Card/Diviner/index.mjs.map +0 -1
- package/dist/node/components/Card/Module/Card.mjs +0 -16
- package/dist/node/components/Card/Module/Card.mjs.map +0 -1
- package/dist/node/components/Card/Module/Card.stories.js +0 -67
- package/dist/node/components/Card/Module/Card.stories.js.map +0 -1
- package/dist/node/components/Card/Module/Card.stories.mjs +0 -43
- package/dist/node/components/Card/Module/Card.stories.mjs.map +0 -1
- package/dist/node/components/Card/Module/CardActions.mjs +0 -22
- package/dist/node/components/Card/Module/CardActions.mjs.map +0 -1
- package/dist/node/components/Card/Module/CardContent.mjs +0 -9
- package/dist/node/components/Card/Module/CardHeader.mjs +0 -24
- package/dist/node/components/Card/Module/components/DiscoverDialog.mjs +0 -24
- package/dist/node/components/Card/Module/components/index.mjs +0 -2
- package/dist/node/components/Card/Module/components/index.mjs.map +0 -1
- package/dist/node/components/Card/Module/index.mjs +0 -5
- package/dist/node/components/Card/Module/index.mjs.map +0 -1
- package/dist/node/components/Card/index.mjs +0 -3
- package/dist/node/components/Card/index.mjs.map +0 -1
- package/dist/node/components/DetailsBox.mjs +0 -30
- package/dist/node/components/DetailsBox.stories.js +0 -100
- package/dist/node/components/DetailsBox.stories.js.map +0 -1
- package/dist/node/components/DetailsBox.stories.mjs +0 -74
- package/dist/node/components/DetailsBox.stories.mjs.map +0 -1
- package/dist/node/components/TableCell.mjs +0 -14
- package/dist/node/components/index.mjs +0 -4
- package/dist/node/components/index.mjs.map +0 -1
- package/dist/node/hooks/index.mjs +0 -2
- package/dist/node/hooks/index.mjs.map +0 -1
- package/dist/node/hooks/useRefresh.mjs +0 -17
- package/dist/node/index.mjs +0 -4
- package/dist/node/index.mjs.map +0 -1
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { EthAddress } from "@xylabs/eth-address";
|
|
3
|
-
import { ButtonEx } from "@xylabs/react-button";
|
|
4
|
-
import { EthAccountBox } from "@xylabs/react-crypto";
|
|
5
|
-
import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
|
|
6
|
-
import { findNetworkComponent } from "@xyo-network/react-shared";
|
|
7
|
-
import { useState } from "react";
|
|
8
|
-
const getModuleIcon = (moduleType, module) => {
|
|
9
|
-
return module?.queries.find((query) => query.startsWith(`network.xyo.query.${moduleType}`)) ? findNetworkComponent(moduleType)?.icon() : null;
|
|
10
|
-
};
|
|
11
|
-
const ModuleDetailsBox = ({ children, module, ...props }) => {
|
|
12
|
-
const [showQueries, setShowQueries] = useState(false);
|
|
13
|
-
return /* @__PURE__ */ jsxs(FlexCol, { ...props, children: [
|
|
14
|
-
/* @__PURE__ */ jsxs(FlexRow, { children: [
|
|
15
|
-
module ? ["sentinel", "bridge", "archivist", "diviner", "node"].map((moduleType) => {
|
|
16
|
-
const icon = getModuleIcon(moduleType, module);
|
|
17
|
-
return icon ? /* @__PURE__ */ jsx(ButtonEx, { onClick: () => setShowQueries(!showQueries), children: icon }, moduleType) : null;
|
|
18
|
-
}) : null,
|
|
19
|
-
/* @__PURE__ */ jsx(EthAccountBox, { address: EthAddress.fromString(module?.address) })
|
|
20
|
-
] }),
|
|
21
|
-
showQueries ? module?.queries.map((query) => {
|
|
22
|
-
return /* @__PURE__ */ jsx(FlexRow, { children: query }, query);
|
|
23
|
-
}) : null,
|
|
24
|
-
children
|
|
25
|
-
] });
|
|
26
|
-
};
|
|
27
|
-
export {
|
|
28
|
-
ModuleDetailsBox
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=DetailsBox.mjs.map
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var DetailsBox_stories_exports = {};
|
|
20
|
-
__export(DetailsBox_stories_exports, {
|
|
21
|
-
ArchivistDetails: () => ArchivistDetails,
|
|
22
|
-
DivinerDetails: () => DivinerDetails,
|
|
23
|
-
NodeDetails: () => NodeDetails,
|
|
24
|
-
default: () => DetailsBox_stories_default
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(DetailsBox_stories_exports);
|
|
27
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
-
var import_react_async_effect = require("@xylabs/react-async-effect");
|
|
29
|
-
var import_react_flexbox = require("@xylabs/react-flexbox");
|
|
30
|
-
var import_archivist = require("@xyo-network/archivist");
|
|
31
|
-
var import_crypto_asset_plugin = require("@xyo-network/crypto-asset-plugin");
|
|
32
|
-
var import_node_memory = require("@xyo-network/node-memory");
|
|
33
|
-
var import_react2 = require("react");
|
|
34
|
-
var import_DetailsBox = require("./DetailsBox");
|
|
35
|
-
const StorybookEntry = {
|
|
36
|
-
argTypes: {},
|
|
37
|
-
component: import_DetailsBox.ModuleDetailsBox,
|
|
38
|
-
parameters: {
|
|
39
|
-
docs: {
|
|
40
|
-
page: null
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
title: "modules/module/DetailsBox"
|
|
44
|
-
};
|
|
45
|
-
const NodeTemplate = (args) => {
|
|
46
|
-
const [node, setNode] = (0, import_react2.useState)();
|
|
47
|
-
(0, import_react_async_effect.useAsyncEffect)(
|
|
48
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
49
|
-
async (mounted) => {
|
|
50
|
-
const node2 = await import_node_memory.MemoryNode.create();
|
|
51
|
-
if (mounted()) {
|
|
52
|
-
setNode(node2);
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
[]
|
|
56
|
-
);
|
|
57
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_flexbox.FlexCol, { minHeight: "80vh", alignItems: "stretch", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DetailsBox.ModuleDetailsBox, { module: node, ...args }) });
|
|
58
|
-
};
|
|
59
|
-
const NodeDetails = NodeTemplate.bind({});
|
|
60
|
-
NodeDetails.args = {};
|
|
61
|
-
const ArchivistTemplate = (args) => {
|
|
62
|
-
const [archivist, setArchivist] = (0, import_react2.useState)();
|
|
63
|
-
(0, import_react_async_effect.useAsyncEffect)(
|
|
64
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
65
|
-
async (mounted) => {
|
|
66
|
-
const archivist2 = await import_archivist.MemoryArchivist.create();
|
|
67
|
-
if (mounted()) {
|
|
68
|
-
setArchivist(archivist2);
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
[]
|
|
72
|
-
);
|
|
73
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_flexbox.FlexCol, { minHeight: "80vh", alignItems: "stretch", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DetailsBox.ModuleDetailsBox, { module: archivist, ...args }) });
|
|
74
|
-
};
|
|
75
|
-
const ArchivistDetails = ArchivistTemplate.bind({});
|
|
76
|
-
ArchivistDetails.args = {};
|
|
77
|
-
const DivinerTemplate = (args) => {
|
|
78
|
-
const [diviner, setDiviner] = (0, import_react2.useState)();
|
|
79
|
-
(0, import_react_async_effect.useAsyncEffect)(
|
|
80
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
81
|
-
async (mounted) => {
|
|
82
|
-
const diviner2 = await import_crypto_asset_plugin.CryptoMarketAssetDiviner.create();
|
|
83
|
-
if (mounted()) {
|
|
84
|
-
setDiviner(diviner2);
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
[]
|
|
88
|
-
);
|
|
89
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_flexbox.FlexCol, { minHeight: "80vh", alignItems: "stretch", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DetailsBox.ModuleDetailsBox, { module: diviner, ...args }) });
|
|
90
|
-
};
|
|
91
|
-
const DivinerDetails = DivinerTemplate.bind({});
|
|
92
|
-
DivinerDetails.args = {};
|
|
93
|
-
var DetailsBox_stories_default = StorybookEntry;
|
|
94
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
95
|
-
0 && (module.exports = {
|
|
96
|
-
ArchivistDetails,
|
|
97
|
-
DivinerDetails,
|
|
98
|
-
NodeDetails
|
|
99
|
-
});
|
|
100
|
-
//# sourceMappingURL=DetailsBox.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/DetailsBox.stories.tsx"],"sourcesContent":["import { Meta, StoryFn } from '@storybook/react'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { MemoryArchivist } from '@xyo-network/archivist'\nimport { CryptoMarketAssetDiviner } from '@xyo-network/crypto-asset-plugin'\nimport { DivinerInstance } from '@xyo-network/diviner'\nimport { MemoryNode } from '@xyo-network/node-memory'\nimport { useState } from 'react'\n\nimport { ModuleDetailsBox } from './DetailsBox'\n\nconst StorybookEntry = {\n argTypes: {},\n component: ModuleDetailsBox,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'modules/module/DetailsBox',\n} as Meta<typeof ModuleDetailsBox>\n\nconst NodeTemplate: StoryFn<typeof ModuleDetailsBox> = (args) => {\n const [node, setNode] = useState<MemoryNode>()\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async (mounted) => {\n const node = await MemoryNode.create()\n if (mounted()) {\n setNode(node)\n }\n },\n [],\n )\n return (\n <FlexCol minHeight=\"80vh\" alignItems=\"stretch\">\n <ModuleDetailsBox module={node} {...args} />\n </FlexCol>\n )\n}\n\nconst NodeDetails = NodeTemplate.bind({})\nNodeDetails.args = {}\n\nconst ArchivistTemplate: StoryFn<typeof ModuleDetailsBox> = (args) => {\n const [archivist, setArchivist] = useState<MemoryArchivist>()\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async (mounted) => {\n const archivist = await MemoryArchivist.create()\n if (mounted()) {\n setArchivist(archivist)\n }\n },\n [],\n )\n return (\n <FlexCol minHeight=\"80vh\" alignItems=\"stretch\">\n <ModuleDetailsBox module={archivist} {...args} />\n </FlexCol>\n )\n}\n\nconst ArchivistDetails = ArchivistTemplate.bind({})\nArchivistDetails.args = {}\n\nconst DivinerTemplate: StoryFn<typeof ModuleDetailsBox> = (args) => {\n const [diviner, setDiviner] = useState<DivinerInstance>()\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async (mounted) => {\n const diviner = await CryptoMarketAssetDiviner.create()\n if (mounted()) {\n setDiviner(diviner)\n }\n },\n [],\n )\n return (\n <FlexCol minHeight=\"80vh\" alignItems=\"stretch\">\n <ModuleDetailsBox module={diviner} {...args} />\n </FlexCol>\n )\n}\n\nconst DivinerDetails = DivinerTemplate.bind({})\nDivinerDetails.args = {}\n\nexport { ArchivistDetails, DivinerDetails, NodeDetails }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoCM;AAnCN,gCAA+B;AAC/B,2BAAwB;AACxB,uBAAgC;AAChC,iCAAyC;AAEzC,yBAA2B;AAC3B,IAAAA,gBAAyB;AAEzB,wBAAiC;AAEjC,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,eAAiD,CAAC,SAAS;AAC/D,QAAM,CAAC,MAAM,OAAO,QAAI,wBAAqB;AAC7C;AAAA;AAAA,IAEE,OAAO,YAAY;AACjB,YAAMC,QAAO,MAAM,8BAAW,OAAO;AACrC,UAAI,QAAQ,GAAG;AACb,gBAAQA,KAAI;AAAA,MACd;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AACA,SACE,4CAAC,gCAAQ,WAAU,QAAO,YAAW,WACnC,sDAAC,sCAAiB,QAAQ,MAAO,GAAG,MAAM,GAC5C;AAEJ;AAEA,MAAM,cAAc,aAAa,KAAK,CAAC,CAAC;AACxC,YAAY,OAAO,CAAC;AAEpB,MAAM,oBAAsD,CAAC,SAAS;AACpE,QAAM,CAAC,WAAW,YAAY,QAAI,wBAA0B;AAC5D;AAAA;AAAA,IAEE,OAAO,YAAY;AACjB,YAAMC,aAAY,MAAM,iCAAgB,OAAO;AAC/C,UAAI,QAAQ,GAAG;AACb,qBAAaA,UAAS;AAAA,MACxB;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AACA,SACE,4CAAC,gCAAQ,WAAU,QAAO,YAAW,WACnC,sDAAC,sCAAiB,QAAQ,WAAY,GAAG,MAAM,GACjD;AAEJ;AAEA,MAAM,mBAAmB,kBAAkB,KAAK,CAAC,CAAC;AAClD,iBAAiB,OAAO,CAAC;AAEzB,MAAM,kBAAoD,CAAC,SAAS;AAClE,QAAM,CAAC,SAAS,UAAU,QAAI,wBAA0B;AACxD;AAAA;AAAA,IAEE,OAAO,YAAY;AACjB,YAAMC,WAAU,MAAM,oDAAyB,OAAO;AACtD,UAAI,QAAQ,GAAG;AACb,mBAAWA,QAAO;AAAA,MACpB;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AACA,SACE,4CAAC,gCAAQ,WAAU,QAAO,YAAW,WACnC,sDAAC,sCAAiB,QAAQ,SAAU,GAAG,MAAM,GAC/C;AAEJ;AAEA,MAAM,iBAAiB,gBAAgB,KAAK,CAAC,CAAC;AAC9C,eAAe,OAAO,CAAC;AAKvB,IAAO,6BAAQ;","names":["import_react","node","archivist","diviner"]}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useAsyncEffect } from "@xylabs/react-async-effect";
|
|
3
|
-
import { FlexCol } from "@xylabs/react-flexbox";
|
|
4
|
-
import { MemoryArchivist } from "@xyo-network/archivist";
|
|
5
|
-
import { CryptoMarketAssetDiviner } from "@xyo-network/crypto-asset-plugin";
|
|
6
|
-
import { MemoryNode } from "@xyo-network/node-memory";
|
|
7
|
-
import { useState } from "react";
|
|
8
|
-
import { ModuleDetailsBox } from "./DetailsBox";
|
|
9
|
-
const StorybookEntry = {
|
|
10
|
-
argTypes: {},
|
|
11
|
-
component: ModuleDetailsBox,
|
|
12
|
-
parameters: {
|
|
13
|
-
docs: {
|
|
14
|
-
page: null
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
title: "modules/module/DetailsBox"
|
|
18
|
-
};
|
|
19
|
-
const NodeTemplate = (args) => {
|
|
20
|
-
const [node, setNode] = useState();
|
|
21
|
-
useAsyncEffect(
|
|
22
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
23
|
-
async (mounted) => {
|
|
24
|
-
const node2 = await MemoryNode.create();
|
|
25
|
-
if (mounted()) {
|
|
26
|
-
setNode(node2);
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
[]
|
|
30
|
-
);
|
|
31
|
-
return /* @__PURE__ */ jsx(FlexCol, { minHeight: "80vh", alignItems: "stretch", children: /* @__PURE__ */ jsx(ModuleDetailsBox, { module: node, ...args }) });
|
|
32
|
-
};
|
|
33
|
-
const NodeDetails = NodeTemplate.bind({});
|
|
34
|
-
NodeDetails.args = {};
|
|
35
|
-
const ArchivistTemplate = (args) => {
|
|
36
|
-
const [archivist, setArchivist] = useState();
|
|
37
|
-
useAsyncEffect(
|
|
38
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
39
|
-
async (mounted) => {
|
|
40
|
-
const archivist2 = await MemoryArchivist.create();
|
|
41
|
-
if (mounted()) {
|
|
42
|
-
setArchivist(archivist2);
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
[]
|
|
46
|
-
);
|
|
47
|
-
return /* @__PURE__ */ jsx(FlexCol, { minHeight: "80vh", alignItems: "stretch", children: /* @__PURE__ */ jsx(ModuleDetailsBox, { module: archivist, ...args }) });
|
|
48
|
-
};
|
|
49
|
-
const ArchivistDetails = ArchivistTemplate.bind({});
|
|
50
|
-
ArchivistDetails.args = {};
|
|
51
|
-
const DivinerTemplate = (args) => {
|
|
52
|
-
const [diviner, setDiviner] = useState();
|
|
53
|
-
useAsyncEffect(
|
|
54
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
55
|
-
async (mounted) => {
|
|
56
|
-
const diviner2 = await CryptoMarketAssetDiviner.create();
|
|
57
|
-
if (mounted()) {
|
|
58
|
-
setDiviner(diviner2);
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
[]
|
|
62
|
-
);
|
|
63
|
-
return /* @__PURE__ */ jsx(FlexCol, { minHeight: "80vh", alignItems: "stretch", children: /* @__PURE__ */ jsx(ModuleDetailsBox, { module: diviner, ...args }) });
|
|
64
|
-
};
|
|
65
|
-
const DivinerDetails = DivinerTemplate.bind({});
|
|
66
|
-
DivinerDetails.args = {};
|
|
67
|
-
var DetailsBox_stories_default = StorybookEntry;
|
|
68
|
-
export {
|
|
69
|
-
ArchivistDetails,
|
|
70
|
-
DivinerDetails,
|
|
71
|
-
NodeDetails,
|
|
72
|
-
DetailsBox_stories_default as default
|
|
73
|
-
};
|
|
74
|
-
//# sourceMappingURL=DetailsBox.stories.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/DetailsBox.stories.tsx"],"sourcesContent":["import { Meta, StoryFn } from '@storybook/react'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { MemoryArchivist } from '@xyo-network/archivist'\nimport { CryptoMarketAssetDiviner } from '@xyo-network/crypto-asset-plugin'\nimport { DivinerInstance } from '@xyo-network/diviner'\nimport { MemoryNode } from '@xyo-network/node-memory'\nimport { useState } from 'react'\n\nimport { ModuleDetailsBox } from './DetailsBox'\n\nconst StorybookEntry = {\n argTypes: {},\n component: ModuleDetailsBox,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'modules/module/DetailsBox',\n} as Meta<typeof ModuleDetailsBox>\n\nconst NodeTemplate: StoryFn<typeof ModuleDetailsBox> = (args) => {\n const [node, setNode] = useState<MemoryNode>()\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async (mounted) => {\n const node = await MemoryNode.create()\n if (mounted()) {\n setNode(node)\n }\n },\n [],\n )\n return (\n <FlexCol minHeight=\"80vh\" alignItems=\"stretch\">\n <ModuleDetailsBox module={node} {...args} />\n </FlexCol>\n )\n}\n\nconst NodeDetails = NodeTemplate.bind({})\nNodeDetails.args = {}\n\nconst ArchivistTemplate: StoryFn<typeof ModuleDetailsBox> = (args) => {\n const [archivist, setArchivist] = useState<MemoryArchivist>()\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async (mounted) => {\n const archivist = await MemoryArchivist.create()\n if (mounted()) {\n setArchivist(archivist)\n }\n },\n [],\n )\n return (\n <FlexCol minHeight=\"80vh\" alignItems=\"stretch\">\n <ModuleDetailsBox module={archivist} {...args} />\n </FlexCol>\n )\n}\n\nconst ArchivistDetails = ArchivistTemplate.bind({})\nArchivistDetails.args = {}\n\nconst DivinerTemplate: StoryFn<typeof ModuleDetailsBox> = (args) => {\n const [diviner, setDiviner] = useState<DivinerInstance>()\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async (mounted) => {\n const diviner = await CryptoMarketAssetDiviner.create()\n if (mounted()) {\n setDiviner(diviner)\n }\n },\n [],\n )\n return (\n <FlexCol minHeight=\"80vh\" alignItems=\"stretch\">\n <ModuleDetailsBox module={diviner} {...args} />\n </FlexCol>\n )\n}\n\nconst DivinerDetails = DivinerTemplate.bind({})\nDivinerDetails.args = {}\n\nexport { ArchivistDetails, DivinerDetails, NodeDetails }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAoCM;AAnCN,SAAS,sBAAsB;AAC/B,SAAS,eAAe;AACxB,SAAS,uBAAuB;AAChC,SAAS,gCAAgC;AAEzC,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AAEzB,SAAS,wBAAwB;AAEjC,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,eAAiD,CAAC,SAAS;AAC/D,QAAM,CAAC,MAAM,OAAO,IAAI,SAAqB;AAC7C;AAAA;AAAA,IAEE,OAAO,YAAY;AACjB,YAAMA,QAAO,MAAM,WAAW,OAAO;AACrC,UAAI,QAAQ,GAAG;AACb,gBAAQA,KAAI;AAAA,MACd;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AACA,SACE,oBAAC,WAAQ,WAAU,QAAO,YAAW,WACnC,8BAAC,oBAAiB,QAAQ,MAAO,GAAG,MAAM,GAC5C;AAEJ;AAEA,MAAM,cAAc,aAAa,KAAK,CAAC,CAAC;AACxC,YAAY,OAAO,CAAC;AAEpB,MAAM,oBAAsD,CAAC,SAAS;AACpE,QAAM,CAAC,WAAW,YAAY,IAAI,SAA0B;AAC5D;AAAA;AAAA,IAEE,OAAO,YAAY;AACjB,YAAMC,aAAY,MAAM,gBAAgB,OAAO;AAC/C,UAAI,QAAQ,GAAG;AACb,qBAAaA,UAAS;AAAA,MACxB;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AACA,SACE,oBAAC,WAAQ,WAAU,QAAO,YAAW,WACnC,8BAAC,oBAAiB,QAAQ,WAAY,GAAG,MAAM,GACjD;AAEJ;AAEA,MAAM,mBAAmB,kBAAkB,KAAK,CAAC,CAAC;AAClD,iBAAiB,OAAO,CAAC;AAEzB,MAAM,kBAAoD,CAAC,SAAS;AAClE,QAAM,CAAC,SAAS,UAAU,IAAI,SAA0B;AACxD;AAAA;AAAA,IAEE,OAAO,YAAY;AACjB,YAAMC,WAAU,MAAM,yBAAyB,OAAO;AACtD,UAAI,QAAQ,GAAG;AACb,mBAAWA,QAAO;AAAA,MACpB;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AACA,SACE,oBAAC,WAAQ,WAAU,QAAO,YAAW,WACnC,8BAAC,oBAAiB,QAAQ,SAAU,GAAG,MAAM,GAC/C;AAEJ;AAEA,MAAM,iBAAiB,gBAAgB,KAAK,CAAC,CAAC;AAC9C,eAAe,OAAO,CAAC;AAKvB,IAAO,6BAAQ;","names":["node","archivist","diviner"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { TableCell } from "@mui/material";
|
|
3
|
-
import { EthAddress } from "@xylabs/eth-address";
|
|
4
|
-
import { EthAccountBox } from "@xylabs/react-crypto";
|
|
5
|
-
const ModuleTableCell = ({ children, module, ...props }) => {
|
|
6
|
-
return /* @__PURE__ */ jsxs(TableCell, { ...props, children: [
|
|
7
|
-
/* @__PURE__ */ jsx(EthAccountBox, { address: EthAddress.fromString(module?.address) }),
|
|
8
|
-
children
|
|
9
|
-
] });
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
ModuleTableCell
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=TableCell.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './Card'\nexport * from './DetailsBox'\nexport * from './TableCell'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/hooks/index.ts"],"sourcesContent":["export * from './useRefresh'\n"],"mappings":"AAAA,cAAc;","names":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
const useRefresh = () => {
|
|
3
|
-
const [count, setCount] = useState(1);
|
|
4
|
-
return [
|
|
5
|
-
count,
|
|
6
|
-
() => {
|
|
7
|
-
const newCount = count + 1;
|
|
8
|
-
setCount(newCount);
|
|
9
|
-
return newCount;
|
|
10
|
-
},
|
|
11
|
-
() => setCount(0)
|
|
12
|
-
];
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
useRefresh
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=useRefresh.mjs.map
|
package/dist/node/index.mjs
DELETED
package/dist/node/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './components'\nexport * from './hooks'\nexport * from './ModuleRenderProps'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|