@xyo-network/react-module 2.81.9 → 2.82.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/components/Card/Diviner/Card.d.cts +2 -1
- package/dist/browser/components/Card/Diviner/Card.d.cts.map +1 -1
- package/dist/browser/components/Card/Diviner/Card.d.mts +2 -1
- package/dist/browser/components/Card/Diviner/Card.d.mts.map +1 -1
- package/dist/browser/components/Card/Diviner/Card.d.ts +2 -1
- package/dist/browser/components/Card/Diviner/Card.d.ts.map +1 -1
- package/dist/browser/components/Card/Diviner/CardActions.d.cts +2 -1
- package/dist/browser/components/Card/Diviner/CardActions.d.cts.map +1 -1
- package/dist/browser/components/Card/Diviner/CardActions.d.mts +2 -1
- package/dist/browser/components/Card/Diviner/CardActions.d.mts.map +1 -1
- package/dist/browser/components/Card/Diviner/CardActions.d.ts +2 -1
- package/dist/browser/components/Card/Diviner/CardActions.d.ts.map +1 -1
- package/dist/browser/components/Card/Diviner/CardContent.d.cts +2 -1
- package/dist/browser/components/Card/Diviner/CardContent.d.cts.map +1 -1
- package/dist/browser/components/Card/Diviner/CardContent.d.mts +2 -1
- package/dist/browser/components/Card/Diviner/CardContent.d.mts.map +1 -1
- package/dist/browser/components/Card/Diviner/CardContent.d.ts +2 -1
- package/dist/browser/components/Card/Diviner/CardContent.d.ts.map +1 -1
- package/dist/browser/components/Card/Diviner/CardHeader.d.cts +2 -1
- package/dist/browser/components/Card/Diviner/CardHeader.d.cts.map +1 -1
- package/dist/browser/components/Card/Diviner/CardHeader.d.mts +2 -1
- package/dist/browser/components/Card/Diviner/CardHeader.d.mts.map +1 -1
- package/dist/browser/components/Card/Diviner/CardHeader.d.ts +2 -1
- package/dist/browser/components/Card/Diviner/CardHeader.d.ts.map +1 -1
- package/dist/browser/components/Card/Diviner/index.d.cts +3 -3
- package/dist/browser/components/Card/Diviner/index.d.cts.map +1 -1
- package/dist/browser/components/Card/Diviner/index.d.mts +3 -3
- package/dist/browser/components/Card/Diviner/index.d.mts.map +1 -1
- package/dist/browser/components/Card/Diviner/index.d.ts +3 -3
- package/dist/browser/components/Card/Diviner/index.d.ts.map +1 -1
- package/dist/browser/components/Card/Module/Card.d.cts +2 -1
- package/dist/browser/components/Card/Module/Card.d.cts.map +1 -1
- package/dist/browser/components/Card/Module/Card.d.mts +2 -1
- package/dist/browser/components/Card/Module/Card.d.mts.map +1 -1
- package/dist/browser/components/Card/Module/Card.d.ts +2 -1
- package/dist/browser/components/Card/Module/Card.d.ts.map +1 -1
- package/dist/browser/components/Card/Module/CardActions.d.cts +2 -1
- package/dist/browser/components/Card/Module/CardActions.d.cts.map +1 -1
- package/dist/browser/components/Card/Module/CardActions.d.mts +2 -1
- package/dist/browser/components/Card/Module/CardActions.d.mts.map +1 -1
- package/dist/browser/components/Card/Module/CardActions.d.ts +2 -1
- package/dist/browser/components/Card/Module/CardActions.d.ts.map +1 -1
- package/dist/browser/components/Card/Module/CardContent.d.cts +2 -1
- package/dist/browser/components/Card/Module/CardContent.d.cts.map +1 -1
- package/dist/browser/components/Card/Module/CardContent.d.mts +2 -1
- package/dist/browser/components/Card/Module/CardContent.d.mts.map +1 -1
- package/dist/browser/components/Card/Module/CardContent.d.ts +2 -1
- package/dist/browser/components/Card/Module/CardContent.d.ts.map +1 -1
- package/dist/browser/components/Card/Module/CardHeader.d.cts +2 -1
- package/dist/browser/components/Card/Module/CardHeader.d.cts.map +1 -1
- package/dist/browser/components/Card/Module/CardHeader.d.mts +2 -1
- package/dist/browser/components/Card/Module/CardHeader.d.mts.map +1 -1
- package/dist/browser/components/Card/Module/CardHeader.d.ts +2 -1
- package/dist/browser/components/Card/Module/CardHeader.d.ts.map +1 -1
- package/dist/browser/components/Card/Module/components/DiscoverDialog.d.cts +1 -1
- package/dist/browser/components/Card/Module/components/DiscoverDialog.d.cts.map +1 -1
- package/dist/browser/components/Card/Module/components/DiscoverDialog.d.mts +1 -1
- package/dist/browser/components/Card/Module/components/DiscoverDialog.d.mts.map +1 -1
- package/dist/browser/components/Card/Module/components/DiscoverDialog.d.ts +1 -1
- package/dist/browser/components/Card/Module/components/DiscoverDialog.d.ts.map +1 -1
- package/dist/browser/components/Card/Module/components/index.d.cts +1 -1
- package/dist/browser/components/Card/Module/components/index.d.cts.map +1 -1
- package/dist/browser/components/Card/Module/components/index.d.mts +1 -1
- package/dist/browser/components/Card/Module/components/index.d.mts.map +1 -1
- package/dist/browser/components/Card/Module/components/index.d.ts +1 -1
- package/dist/browser/components/Card/Module/components/index.d.ts.map +1 -1
- package/dist/browser/components/Card/Module/index.d.cts +4 -4
- package/dist/browser/components/Card/Module/index.d.cts.map +1 -1
- package/dist/browser/components/Card/Module/index.d.mts +4 -4
- package/dist/browser/components/Card/Module/index.d.mts.map +1 -1
- package/dist/browser/components/Card/Module/index.d.ts +4 -4
- package/dist/browser/components/Card/Module/index.d.ts.map +1 -1
- package/dist/browser/components/Card/index.d.cts +2 -2
- package/dist/browser/components/Card/index.d.mts +2 -2
- package/dist/browser/components/Card/index.d.ts +2 -2
- package/dist/browser/components/DetailsBox.d.cts +2 -1
- package/dist/browser/components/DetailsBox.d.cts.map +1 -1
- package/dist/browser/components/DetailsBox.d.mts +2 -1
- package/dist/browser/components/DetailsBox.d.mts.map +1 -1
- package/dist/browser/components/DetailsBox.d.ts +2 -1
- package/dist/browser/components/DetailsBox.d.ts.map +1 -1
- package/dist/browser/components/TableCell.d.cts +2 -1
- package/dist/browser/components/TableCell.d.cts.map +1 -1
- package/dist/browser/components/TableCell.d.mts +2 -1
- package/dist/browser/components/TableCell.d.mts.map +1 -1
- package/dist/browser/components/TableCell.d.ts +2 -1
- package/dist/browser/components/TableCell.d.ts.map +1 -1
- package/dist/browser/components/index.d.cts +3 -3
- package/dist/browser/components/index.d.cts.map +1 -1
- package/dist/browser/components/index.d.mts +3 -3
- package/dist/browser/components/index.d.mts.map +1 -1
- package/dist/browser/components/index.d.ts +3 -3
- package/dist/browser/components/index.d.ts.map +1 -1
- package/dist/browser/hooks/index.d.cts +1 -1
- package/dist/browser/hooks/index.d.cts.map +1 -1
- package/dist/browser/hooks/index.d.mts +1 -1
- package/dist/browser/hooks/index.d.mts.map +1 -1
- package/dist/browser/hooks/index.d.ts +1 -1
- package/dist/browser/hooks/index.d.ts.map +1 -1
- package/dist/browser/index.cjs +152 -107
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +3 -3
- package/dist/browser/index.d.cts.map +1 -1
- package/dist/browser/index.d.mts +3 -3
- package/dist/browser/index.d.mts.map +1 -1
- package/dist/browser/index.d.ts +3 -3
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.mjs +216 -0
- package/dist/browser/index.mjs.map +1 -0
- package/dist/neutral/components/Card/Diviner/Card.d.cts +2 -1
- package/dist/neutral/components/Card/Diviner/Card.d.cts.map +1 -1
- package/dist/neutral/components/Card/Diviner/Card.d.mts +2 -1
- package/dist/neutral/components/Card/Diviner/Card.d.mts.map +1 -1
- package/dist/neutral/components/Card/Diviner/Card.d.ts +2 -1
- package/dist/neutral/components/Card/Diviner/Card.d.ts.map +1 -1
- package/dist/neutral/components/Card/Diviner/CardActions.d.cts +2 -1
- package/dist/neutral/components/Card/Diviner/CardActions.d.cts.map +1 -1
- package/dist/neutral/components/Card/Diviner/CardActions.d.mts +2 -1
- package/dist/neutral/components/Card/Diviner/CardActions.d.mts.map +1 -1
- package/dist/neutral/components/Card/Diviner/CardActions.d.ts +2 -1
- package/dist/neutral/components/Card/Diviner/CardActions.d.ts.map +1 -1
- package/dist/neutral/components/Card/Diviner/CardContent.d.cts +2 -1
- package/dist/neutral/components/Card/Diviner/CardContent.d.cts.map +1 -1
- package/dist/neutral/components/Card/Diviner/CardContent.d.mts +2 -1
- package/dist/neutral/components/Card/Diviner/CardContent.d.mts.map +1 -1
- package/dist/neutral/components/Card/Diviner/CardContent.d.ts +2 -1
- package/dist/neutral/components/Card/Diviner/CardContent.d.ts.map +1 -1
- package/dist/neutral/components/Card/Diviner/CardHeader.d.cts +2 -1
- package/dist/neutral/components/Card/Diviner/CardHeader.d.cts.map +1 -1
- package/dist/neutral/components/Card/Diviner/CardHeader.d.mts +2 -1
- package/dist/neutral/components/Card/Diviner/CardHeader.d.mts.map +1 -1
- package/dist/neutral/components/Card/Diviner/CardHeader.d.ts +2 -1
- package/dist/neutral/components/Card/Diviner/CardHeader.d.ts.map +1 -1
- package/dist/neutral/components/Card/Diviner/index.d.cts +3 -3
- package/dist/neutral/components/Card/Diviner/index.d.cts.map +1 -1
- package/dist/neutral/components/Card/Diviner/index.d.mts +3 -3
- package/dist/neutral/components/Card/Diviner/index.d.mts.map +1 -1
- package/dist/neutral/components/Card/Diviner/index.d.ts +3 -3
- package/dist/neutral/components/Card/Diviner/index.d.ts.map +1 -1
- package/dist/neutral/components/Card/Module/Card.d.cts +2 -1
- package/dist/neutral/components/Card/Module/Card.d.cts.map +1 -1
- package/dist/neutral/components/Card/Module/Card.d.mts +2 -1
- package/dist/neutral/components/Card/Module/Card.d.mts.map +1 -1
- package/dist/neutral/components/Card/Module/Card.d.ts +2 -1
- package/dist/neutral/components/Card/Module/Card.d.ts.map +1 -1
- package/dist/neutral/components/Card/Module/CardActions.d.cts +2 -1
- package/dist/neutral/components/Card/Module/CardActions.d.cts.map +1 -1
- package/dist/neutral/components/Card/Module/CardActions.d.mts +2 -1
- package/dist/neutral/components/Card/Module/CardActions.d.mts.map +1 -1
- package/dist/neutral/components/Card/Module/CardActions.d.ts +2 -1
- package/dist/neutral/components/Card/Module/CardActions.d.ts.map +1 -1
- package/dist/neutral/components/Card/Module/CardContent.d.cts +2 -1
- package/dist/neutral/components/Card/Module/CardContent.d.cts.map +1 -1
- package/dist/neutral/components/Card/Module/CardContent.d.mts +2 -1
- package/dist/neutral/components/Card/Module/CardContent.d.mts.map +1 -1
- package/dist/neutral/components/Card/Module/CardContent.d.ts +2 -1
- package/dist/neutral/components/Card/Module/CardContent.d.ts.map +1 -1
- package/dist/neutral/components/Card/Module/CardHeader.d.cts +2 -1
- package/dist/neutral/components/Card/Module/CardHeader.d.cts.map +1 -1
- package/dist/neutral/components/Card/Module/CardHeader.d.mts +2 -1
- package/dist/neutral/components/Card/Module/CardHeader.d.mts.map +1 -1
- package/dist/neutral/components/Card/Module/CardHeader.d.ts +2 -1
- package/dist/neutral/components/Card/Module/CardHeader.d.ts.map +1 -1
- package/dist/neutral/components/Card/Module/components/DiscoverDialog.d.cts +1 -1
- package/dist/neutral/components/Card/Module/components/DiscoverDialog.d.cts.map +1 -1
- package/dist/neutral/components/Card/Module/components/DiscoverDialog.d.mts +1 -1
- package/dist/neutral/components/Card/Module/components/DiscoverDialog.d.mts.map +1 -1
- package/dist/neutral/components/Card/Module/components/DiscoverDialog.d.ts +1 -1
- package/dist/neutral/components/Card/Module/components/DiscoverDialog.d.ts.map +1 -1
- package/dist/neutral/components/Card/Module/components/index.d.cts +1 -1
- package/dist/neutral/components/Card/Module/components/index.d.cts.map +1 -1
- package/dist/neutral/components/Card/Module/components/index.d.mts +1 -1
- package/dist/neutral/components/Card/Module/components/index.d.mts.map +1 -1
- package/dist/neutral/components/Card/Module/components/index.d.ts +1 -1
- package/dist/neutral/components/Card/Module/components/index.d.ts.map +1 -1
- package/dist/neutral/components/Card/Module/index.d.cts +4 -4
- package/dist/neutral/components/Card/Module/index.d.cts.map +1 -1
- package/dist/neutral/components/Card/Module/index.d.mts +4 -4
- package/dist/neutral/components/Card/Module/index.d.mts.map +1 -1
- package/dist/neutral/components/Card/Module/index.d.ts +4 -4
- package/dist/neutral/components/Card/Module/index.d.ts.map +1 -1
- package/dist/neutral/components/Card/index.d.cts +2 -2
- package/dist/neutral/components/Card/index.d.mts +2 -2
- package/dist/neutral/components/Card/index.d.ts +2 -2
- package/dist/neutral/components/DetailsBox.d.cts +2 -1
- package/dist/neutral/components/DetailsBox.d.cts.map +1 -1
- package/dist/neutral/components/DetailsBox.d.mts +2 -1
- package/dist/neutral/components/DetailsBox.d.mts.map +1 -1
- package/dist/neutral/components/DetailsBox.d.ts +2 -1
- package/dist/neutral/components/DetailsBox.d.ts.map +1 -1
- package/dist/neutral/components/TableCell.d.cts +2 -1
- package/dist/neutral/components/TableCell.d.cts.map +1 -1
- package/dist/neutral/components/TableCell.d.mts +2 -1
- package/dist/neutral/components/TableCell.d.mts.map +1 -1
- package/dist/neutral/components/TableCell.d.ts +2 -1
- package/dist/neutral/components/TableCell.d.ts.map +1 -1
- package/dist/neutral/components/index.d.cts +3 -3
- package/dist/neutral/components/index.d.cts.map +1 -1
- package/dist/neutral/components/index.d.mts +3 -3
- package/dist/neutral/components/index.d.mts.map +1 -1
- package/dist/neutral/components/index.d.ts +3 -3
- package/dist/neutral/components/index.d.ts.map +1 -1
- package/dist/neutral/hooks/index.d.cts +1 -1
- package/dist/neutral/hooks/index.d.cts.map +1 -1
- package/dist/neutral/hooks/index.d.mts +1 -1
- package/dist/neutral/hooks/index.d.mts.map +1 -1
- package/dist/neutral/hooks/index.d.ts +1 -1
- package/dist/neutral/hooks/index.d.ts.map +1 -1
- package/dist/neutral/index.cjs +152 -107
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.d.cts +3 -3
- package/dist/neutral/index.d.cts.map +1 -1
- package/dist/neutral/index.d.mts +3 -3
- package/dist/neutral/index.d.mts.map +1 -1
- package/dist/neutral/index.d.ts +3 -3
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +216 -0
- package/dist/neutral/index.mjs.map +1 -0
- package/dist/node/components/Card/Diviner/Card.d.cts +2 -1
- package/dist/node/components/Card/Diviner/Card.d.cts.map +1 -1
- package/dist/node/components/Card/Diviner/Card.d.mts +2 -1
- package/dist/node/components/Card/Diviner/Card.d.mts.map +1 -1
- package/dist/node/components/Card/Diviner/Card.d.ts +2 -1
- package/dist/node/components/Card/Diviner/Card.d.ts.map +1 -1
- package/dist/node/components/Card/Diviner/CardActions.d.cts +2 -1
- package/dist/node/components/Card/Diviner/CardActions.d.cts.map +1 -1
- package/dist/node/components/Card/Diviner/CardActions.d.mts +2 -1
- package/dist/node/components/Card/Diviner/CardActions.d.mts.map +1 -1
- package/dist/node/components/Card/Diviner/CardActions.d.ts +2 -1
- package/dist/node/components/Card/Diviner/CardActions.d.ts.map +1 -1
- package/dist/node/components/Card/Diviner/CardContent.d.cts +2 -1
- package/dist/node/components/Card/Diviner/CardContent.d.cts.map +1 -1
- package/dist/node/components/Card/Diviner/CardContent.d.mts +2 -1
- package/dist/node/components/Card/Diviner/CardContent.d.mts.map +1 -1
- package/dist/node/components/Card/Diviner/CardContent.d.ts +2 -1
- package/dist/node/components/Card/Diviner/CardContent.d.ts.map +1 -1
- package/dist/node/components/Card/Diviner/CardHeader.d.cts +2 -1
- package/dist/node/components/Card/Diviner/CardHeader.d.cts.map +1 -1
- package/dist/node/components/Card/Diviner/CardHeader.d.mts +2 -1
- package/dist/node/components/Card/Diviner/CardHeader.d.mts.map +1 -1
- package/dist/node/components/Card/Diviner/CardHeader.d.ts +2 -1
- package/dist/node/components/Card/Diviner/CardHeader.d.ts.map +1 -1
- package/dist/node/components/Card/Diviner/index.d.cts +3 -3
- package/dist/node/components/Card/Diviner/index.d.cts.map +1 -1
- package/dist/node/components/Card/Diviner/index.d.mts +3 -3
- package/dist/node/components/Card/Diviner/index.d.mts.map +1 -1
- package/dist/node/components/Card/Diviner/index.d.ts +3 -3
- package/dist/node/components/Card/Diviner/index.d.ts.map +1 -1
- package/dist/node/components/Card/Module/Card.d.cts +2 -1
- package/dist/node/components/Card/Module/Card.d.cts.map +1 -1
- package/dist/node/components/Card/Module/Card.d.mts +2 -1
- package/dist/node/components/Card/Module/Card.d.mts.map +1 -1
- package/dist/node/components/Card/Module/Card.d.ts +2 -1
- package/dist/node/components/Card/Module/Card.d.ts.map +1 -1
- package/dist/node/components/Card/Module/CardActions.d.cts +2 -1
- package/dist/node/components/Card/Module/CardActions.d.cts.map +1 -1
- package/dist/node/components/Card/Module/CardActions.d.mts +2 -1
- package/dist/node/components/Card/Module/CardActions.d.mts.map +1 -1
- package/dist/node/components/Card/Module/CardActions.d.ts +2 -1
- package/dist/node/components/Card/Module/CardActions.d.ts.map +1 -1
- package/dist/node/components/Card/Module/CardContent.d.cts +2 -1
- package/dist/node/components/Card/Module/CardContent.d.cts.map +1 -1
- package/dist/node/components/Card/Module/CardContent.d.mts +2 -1
- package/dist/node/components/Card/Module/CardContent.d.mts.map +1 -1
- package/dist/node/components/Card/Module/CardContent.d.ts +2 -1
- package/dist/node/components/Card/Module/CardContent.d.ts.map +1 -1
- package/dist/node/components/Card/Module/CardHeader.d.cts +2 -1
- package/dist/node/components/Card/Module/CardHeader.d.cts.map +1 -1
- package/dist/node/components/Card/Module/CardHeader.d.mts +2 -1
- package/dist/node/components/Card/Module/CardHeader.d.mts.map +1 -1
- package/dist/node/components/Card/Module/CardHeader.d.ts +2 -1
- package/dist/node/components/Card/Module/CardHeader.d.ts.map +1 -1
- package/dist/node/components/Card/Module/components/DiscoverDialog.d.cts +1 -1
- package/dist/node/components/Card/Module/components/DiscoverDialog.d.cts.map +1 -1
- package/dist/node/components/Card/Module/components/DiscoverDialog.d.mts +1 -1
- package/dist/node/components/Card/Module/components/DiscoverDialog.d.mts.map +1 -1
- package/dist/node/components/Card/Module/components/DiscoverDialog.d.ts +1 -1
- package/dist/node/components/Card/Module/components/DiscoverDialog.d.ts.map +1 -1
- package/dist/node/components/Card/Module/components/index.d.cts +1 -1
- package/dist/node/components/Card/Module/components/index.d.cts.map +1 -1
- package/dist/node/components/Card/Module/components/index.d.mts +1 -1
- package/dist/node/components/Card/Module/components/index.d.mts.map +1 -1
- package/dist/node/components/Card/Module/components/index.d.ts +1 -1
- package/dist/node/components/Card/Module/components/index.d.ts.map +1 -1
- package/dist/node/components/Card/Module/index.d.cts +4 -4
- package/dist/node/components/Card/Module/index.d.cts.map +1 -1
- package/dist/node/components/Card/Module/index.d.mts +4 -4
- package/dist/node/components/Card/Module/index.d.mts.map +1 -1
- package/dist/node/components/Card/Module/index.d.ts +4 -4
- package/dist/node/components/Card/Module/index.d.ts.map +1 -1
- package/dist/node/components/Card/index.d.cts +2 -2
- package/dist/node/components/Card/index.d.mts +2 -2
- package/dist/node/components/Card/index.d.ts +2 -2
- package/dist/node/components/DetailsBox.d.cts +2 -1
- package/dist/node/components/DetailsBox.d.cts.map +1 -1
- package/dist/node/components/DetailsBox.d.mts +2 -1
- package/dist/node/components/DetailsBox.d.mts.map +1 -1
- package/dist/node/components/DetailsBox.d.ts +2 -1
- package/dist/node/components/DetailsBox.d.ts.map +1 -1
- package/dist/node/components/TableCell.d.cts +2 -1
- package/dist/node/components/TableCell.d.cts.map +1 -1
- package/dist/node/components/TableCell.d.mts +2 -1
- package/dist/node/components/TableCell.d.mts.map +1 -1
- package/dist/node/components/TableCell.d.ts +2 -1
- package/dist/node/components/TableCell.d.ts.map +1 -1
- package/dist/node/components/index.d.cts +3 -3
- package/dist/node/components/index.d.cts.map +1 -1
- package/dist/node/components/index.d.mts +3 -3
- package/dist/node/components/index.d.mts.map +1 -1
- package/dist/node/components/index.d.ts +3 -3
- package/dist/node/components/index.d.ts.map +1 -1
- package/dist/node/hooks/index.d.cts +1 -1
- package/dist/node/hooks/index.d.cts.map +1 -1
- package/dist/node/hooks/index.d.mts +1 -1
- package/dist/node/hooks/index.d.mts.map +1 -1
- package/dist/node/hooks/index.d.ts +1 -1
- package/dist/node/hooks/index.d.ts.map +1 -1
- package/dist/node/index.cjs +152 -107
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +3 -3
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.mts +3 -3
- package/dist/node/index.d.mts.map +1 -1
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.mjs +218 -0
- package/dist/node/index.mjs.map +1 -0
- package/package.json +21 -21
- package/src/components/Card/Diviner/Card.stories.tsx +3 -4
- package/src/components/Card/Diviner/Card.tsx +5 -4
- package/src/components/Card/Diviner/CardActions.tsx +3 -2
- package/src/components/Card/Diviner/CardContent.tsx +3 -2
- package/src/components/Card/Diviner/CardHeader.tsx +3 -2
- package/src/components/Card/Diviner/index.ts +3 -3
- package/src/components/Card/Module/Card.stories.tsx +3 -4
- package/src/components/Card/Module/Card.tsx +5 -4
- package/src/components/Card/Module/CardActions.tsx +8 -8
- package/src/components/Card/Module/CardContent.tsx +2 -1
- package/src/components/Card/Module/CardHeader.tsx +7 -6
- package/src/components/Card/Module/components/DiscoverDialog.tsx +6 -3
- package/src/components/Card/Module/components/index.ts +1 -1
- package/src/components/Card/Module/index.ts +4 -4
- package/src/components/Card/index.ts +2 -2
- package/src/components/DetailsBox.stories.tsx +5 -6
- package/src/components/DetailsBox.tsx +18 -16
- package/src/components/TableCell.tsx +2 -1
- package/src/components/index.ts +3 -3
- package/src/hooks/index.ts +1 -1
- package/src/index.ts +3 -3
- package/dist/browser/index.js +0 -179
- package/dist/browser/index.js.map +0 -1
- package/dist/neutral/index.js +0 -179
- package/dist/neutral/index.js.map +0 -1
- package/dist/node/index.js +0 -181
- package/dist/node/index.js.map +0 -1
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/components/Card/Diviner/Card.tsx
|
|
5
|
+
import { Card as Card2 } from "@mui/material";
|
|
6
|
+
import React8 from "react";
|
|
7
|
+
|
|
8
|
+
// src/components/Card/Module/Card.tsx
|
|
9
|
+
import { Card } from "@mui/material";
|
|
10
|
+
import React5 from "react";
|
|
11
|
+
|
|
12
|
+
// src/components/Card/Module/CardActions.tsx
|
|
13
|
+
import { CardActions, Chip } from "@mui/material";
|
|
14
|
+
import { ButtonEx } from "@xylabs/react-button";
|
|
15
|
+
import { FlexRow } from "@xylabs/react-flexbox";
|
|
16
|
+
import React2, { useState } from "react";
|
|
17
|
+
|
|
18
|
+
// src/components/Card/Module/components/DiscoverDialog.tsx
|
|
19
|
+
import { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, Paper } from "@mui/material";
|
|
20
|
+
import { usePromise } from "@xylabs/react-promise";
|
|
21
|
+
import React from "react";
|
|
22
|
+
var DiscoverDialog = /* @__PURE__ */ __name(({ mod, setOpen, ...props }) => {
|
|
23
|
+
const [discoverPayloads] = usePromise(async () => {
|
|
24
|
+
return await (mod == null ? void 0 : mod.state());
|
|
25
|
+
}, [
|
|
26
|
+
mod
|
|
27
|
+
]);
|
|
28
|
+
return /* @__PURE__ */ React.createElement(Dialog, props, /* @__PURE__ */ React.createElement(DialogTitle, null, "Supported Queries for", (mod == null ? void 0 : mod.config.name) || (mod == null ? void 0 : mod.address)), /* @__PURE__ */ React.createElement(Divider, null), /* @__PURE__ */ React.createElement(DialogContent, null, /* @__PURE__ */ React.createElement(Paper, {
|
|
29
|
+
sx: {
|
|
30
|
+
p: 1
|
|
31
|
+
}
|
|
32
|
+
}, /* @__PURE__ */ React.createElement(DialogContentText, null, "All modules share a set of base queries along with ones specific to the module."), /* @__PURE__ */ React.createElement("pre", null, JSON.stringify(discoverPayloads, null, 2)))), /* @__PURE__ */ React.createElement(DialogActions, null, /* @__PURE__ */ React.createElement(Button, {
|
|
33
|
+
onClick: /* @__PURE__ */ __name(() => setOpen == null ? void 0 : setOpen(false), "onClick"),
|
|
34
|
+
variant: "outlined"
|
|
35
|
+
}, "Close")));
|
|
36
|
+
}, "DiscoverDialog");
|
|
37
|
+
|
|
38
|
+
// src/components/Card/Module/CardActions.tsx
|
|
39
|
+
var ModuleCardActions = /* @__PURE__ */ __name(({ children, mod, sx, ...props }) => {
|
|
40
|
+
const [discoverDialogOpen, setDiscoverDialogOpen] = useState(false);
|
|
41
|
+
const config = mod == null ? void 0 : mod.config;
|
|
42
|
+
return /* @__PURE__ */ React2.createElement(CardActions, {
|
|
43
|
+
sx: {
|
|
44
|
+
alignItems: "stretch",
|
|
45
|
+
flexDirection: "column",
|
|
46
|
+
ml: 1,
|
|
47
|
+
...sx
|
|
48
|
+
},
|
|
49
|
+
...props
|
|
50
|
+
}, /* @__PURE__ */ React2.createElement(FlexRow, {
|
|
51
|
+
justifyContent: "space-between",
|
|
52
|
+
gap: 1,
|
|
53
|
+
alignItems: "center"
|
|
54
|
+
}, mod ? /* @__PURE__ */ React2.createElement(Chip, {
|
|
55
|
+
label: config == null ? void 0 : config.schema,
|
|
56
|
+
size: "small"
|
|
57
|
+
}) : null, children, /* @__PURE__ */ React2.createElement(ButtonEx, {
|
|
58
|
+
onClick: /* @__PURE__ */ __name(() => setDiscoverDialogOpen(true), "onClick"),
|
|
59
|
+
size: "small",
|
|
60
|
+
variant: "outlined"
|
|
61
|
+
}, "Discover")), /* @__PURE__ */ React2.createElement(DiscoverDialog, {
|
|
62
|
+
fullWidth: true,
|
|
63
|
+
maxWidth: "md",
|
|
64
|
+
mod,
|
|
65
|
+
open: discoverDialogOpen,
|
|
66
|
+
setOpen: setDiscoverDialogOpen
|
|
67
|
+
}));
|
|
68
|
+
}, "ModuleCardActions");
|
|
69
|
+
|
|
70
|
+
// src/components/Card/Module/CardContent.tsx
|
|
71
|
+
import { CardContent } from "@mui/material";
|
|
72
|
+
import React3 from "react";
|
|
73
|
+
var ModuleCardContent = /* @__PURE__ */ __name(({ children, ...props }) => {
|
|
74
|
+
return /* @__PURE__ */ React3.createElement(CardContent, props, children);
|
|
75
|
+
}, "ModuleCardContent");
|
|
76
|
+
|
|
77
|
+
// src/components/Card/Module/CardHeader.tsx
|
|
78
|
+
import { CardHeader } from "@mui/material";
|
|
79
|
+
import { findNetworkComponent } from "@xyo-network/react-shared";
|
|
80
|
+
import React4 from "react";
|
|
81
|
+
var moduleTypes = [
|
|
82
|
+
"sentinel",
|
|
83
|
+
"bridge",
|
|
84
|
+
"archivist",
|
|
85
|
+
"diviner",
|
|
86
|
+
"node",
|
|
87
|
+
"witness"
|
|
88
|
+
];
|
|
89
|
+
var getModuleIcons = /* @__PURE__ */ __name((moduleType, mod) => {
|
|
90
|
+
var _a;
|
|
91
|
+
return (mod == null ? void 0 : mod.queries.find((query) => query.startsWith(`network.xyo.query.${moduleType}`))) ? (_a = findNetworkComponent(moduleType)) == null ? void 0 : _a.icon : null;
|
|
92
|
+
}, "getModuleIcons");
|
|
93
|
+
var ModuleCardHeader = /* @__PURE__ */ __name(({ subheader, avatar, title, mod, ...props }) => {
|
|
94
|
+
return /* @__PURE__ */ React4.createElement(CardHeader, {
|
|
95
|
+
title: title ?? (mod == null ? void 0 : mod.config.name) ?? "Module",
|
|
96
|
+
subheader: subheader ?? (mod == null ? void 0 : mod.address),
|
|
97
|
+
avatar: avatar ?? /* @__PURE__ */ React4.createElement(React4.Fragment, null, mod ? moduleTypes.map((moduleType) => {
|
|
98
|
+
const Icon = getModuleIcons(moduleType, mod);
|
|
99
|
+
return Icon ? /* @__PURE__ */ React4.createElement(Icon, {
|
|
100
|
+
key: moduleType,
|
|
101
|
+
fontSize: "large",
|
|
102
|
+
color: "primary"
|
|
103
|
+
}) : null;
|
|
104
|
+
}) : null),
|
|
105
|
+
...props
|
|
106
|
+
});
|
|
107
|
+
}, "ModuleCardHeader");
|
|
108
|
+
|
|
109
|
+
// src/components/Card/Module/Card.tsx
|
|
110
|
+
var ModuleCard = /* @__PURE__ */ __name(({ mod, ...props }) => {
|
|
111
|
+
return /* @__PURE__ */ React5.createElement(Card, props, /* @__PURE__ */ React5.createElement(ModuleCardHeader, {
|
|
112
|
+
mod
|
|
113
|
+
}), /* @__PURE__ */ React5.createElement(ModuleCardContent, {
|
|
114
|
+
mod
|
|
115
|
+
}), /* @__PURE__ */ React5.createElement(ModuleCardActions, {
|
|
116
|
+
mod
|
|
117
|
+
}));
|
|
118
|
+
}, "ModuleCard");
|
|
119
|
+
|
|
120
|
+
// src/components/Card/Diviner/CardContent.tsx
|
|
121
|
+
import React6 from "react";
|
|
122
|
+
var DivinerCardContent = /* @__PURE__ */ __name(({ children, ...props }) => {
|
|
123
|
+
return /* @__PURE__ */ React6.createElement(ModuleCardContent, props, children);
|
|
124
|
+
}, "DivinerCardContent");
|
|
125
|
+
|
|
126
|
+
// src/components/Card/Diviner/CardHeader.tsx
|
|
127
|
+
import React7 from "react";
|
|
128
|
+
var DivinerCardHeader = /* @__PURE__ */ __name(({ title, mod, ...props }) => {
|
|
129
|
+
return /* @__PURE__ */ React7.createElement(ModuleCardHeader, {
|
|
130
|
+
mod,
|
|
131
|
+
title: title ?? (mod == null ? void 0 : mod.config.name) ?? "Diviner",
|
|
132
|
+
...props
|
|
133
|
+
});
|
|
134
|
+
}, "DivinerCardHeader");
|
|
135
|
+
|
|
136
|
+
// src/components/Card/Diviner/Card.tsx
|
|
137
|
+
var DivinerCard = /* @__PURE__ */ __name(({ children, mod, ...props }) => {
|
|
138
|
+
return /* @__PURE__ */ React8.createElement(Card2, props, /* @__PURE__ */ React8.createElement(DivinerCardHeader, {
|
|
139
|
+
mod
|
|
140
|
+
}), /* @__PURE__ */ React8.createElement(DivinerCardContent, {
|
|
141
|
+
mod
|
|
142
|
+
}), children, /* @__PURE__ */ React8.createElement(ModuleCardActions, {
|
|
143
|
+
mod
|
|
144
|
+
}));
|
|
145
|
+
}, "DivinerCard");
|
|
146
|
+
|
|
147
|
+
// src/components/DetailsBox.tsx
|
|
148
|
+
import { EthAddress } from "@xylabs/eth-address";
|
|
149
|
+
import { ButtonEx as ButtonEx2 } from "@xylabs/react-button";
|
|
150
|
+
import { EthAccountBox } from "@xylabs/react-crypto";
|
|
151
|
+
import { FlexCol, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
|
|
152
|
+
import { findNetworkComponent as findNetworkComponent2 } from "@xyo-network/react-shared";
|
|
153
|
+
import React9, { useState as useState2 } from "react";
|
|
154
|
+
var getModuleIcon = /* @__PURE__ */ __name((moduleType, mod) => {
|
|
155
|
+
var _a;
|
|
156
|
+
return (mod == null ? void 0 : mod.queries.find((query) => query.startsWith(`network.xyo.query.${moduleType}`))) ? (_a = findNetworkComponent2(moduleType)) == null ? void 0 : _a.icon() : null;
|
|
157
|
+
}, "getModuleIcon");
|
|
158
|
+
var ModuleDetailsBox = /* @__PURE__ */ __name(({ children, mod, ...props }) => {
|
|
159
|
+
const [showQueries, setShowQueries] = useState2(false);
|
|
160
|
+
return /* @__PURE__ */ React9.createElement(FlexCol, props, /* @__PURE__ */ React9.createElement(FlexRow2, null, mod ? [
|
|
161
|
+
"sentinel",
|
|
162
|
+
"bridge",
|
|
163
|
+
"archivist",
|
|
164
|
+
"diviner",
|
|
165
|
+
"node"
|
|
166
|
+
].map((moduleType) => {
|
|
167
|
+
const icon = getModuleIcon(moduleType, mod);
|
|
168
|
+
return icon ? /* @__PURE__ */ React9.createElement(ButtonEx2, {
|
|
169
|
+
onClick: /* @__PURE__ */ __name(() => setShowQueries(!showQueries), "onClick"),
|
|
170
|
+
key: moduleType
|
|
171
|
+
}, icon) : null;
|
|
172
|
+
}) : null, /* @__PURE__ */ React9.createElement(EthAccountBox, {
|
|
173
|
+
address: EthAddress.fromString(mod == null ? void 0 : mod.address)
|
|
174
|
+
})), showQueries ? mod == null ? void 0 : mod.queries.map((query) => {
|
|
175
|
+
return /* @__PURE__ */ React9.createElement(FlexRow2, {
|
|
176
|
+
key: query
|
|
177
|
+
}, query);
|
|
178
|
+
}) : null, children);
|
|
179
|
+
}, "ModuleDetailsBox");
|
|
180
|
+
|
|
181
|
+
// src/components/TableCell.tsx
|
|
182
|
+
import { TableCell } from "@mui/material";
|
|
183
|
+
import { EthAddress as EthAddress2 } from "@xylabs/eth-address";
|
|
184
|
+
import { EthAccountBox as EthAccountBox2 } from "@xylabs/react-crypto";
|
|
185
|
+
import React10 from "react";
|
|
186
|
+
var ModuleTableCell = /* @__PURE__ */ __name(({ children, mod, ...props }) => {
|
|
187
|
+
return /* @__PURE__ */ React10.createElement(TableCell, props, /* @__PURE__ */ React10.createElement(EthAccountBox2, {
|
|
188
|
+
address: EthAddress2.fromString(mod == null ? void 0 : mod.address)
|
|
189
|
+
}), children);
|
|
190
|
+
}, "ModuleTableCell");
|
|
191
|
+
|
|
192
|
+
// src/hooks/useRefresh.tsx
|
|
193
|
+
import { useState as useState3 } from "react";
|
|
194
|
+
var useRefresh = /* @__PURE__ */ __name(() => {
|
|
195
|
+
const [count, setCount] = useState3(1);
|
|
196
|
+
return [
|
|
197
|
+
count,
|
|
198
|
+
() => {
|
|
199
|
+
const newCount = count + 1;
|
|
200
|
+
setCount(newCount);
|
|
201
|
+
return newCount;
|
|
202
|
+
},
|
|
203
|
+
() => setCount(0)
|
|
204
|
+
];
|
|
205
|
+
}, "useRefresh");
|
|
206
|
+
export {
|
|
207
|
+
DivinerCard,
|
|
208
|
+
DivinerCardContent,
|
|
209
|
+
DivinerCardHeader,
|
|
210
|
+
ModuleCard,
|
|
211
|
+
ModuleCardActions,
|
|
212
|
+
ModuleCardContent,
|
|
213
|
+
ModuleCardHeader,
|
|
214
|
+
ModuleDetailsBox,
|
|
215
|
+
ModuleTableCell,
|
|
216
|
+
useRefresh
|
|
217
|
+
};
|
|
218
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Card/Diviner/Card.tsx","../../src/components/Card/Module/Card.tsx","../../src/components/Card/Module/CardActions.tsx","../../src/components/Card/Module/components/DiscoverDialog.tsx","../../src/components/Card/Module/CardContent.tsx","../../src/components/Card/Module/CardHeader.tsx","../../src/components/Card/Diviner/CardContent.tsx","../../src/components/Card/Diviner/CardHeader.tsx","../../src/components/DetailsBox.tsx","../../src/components/TableCell.tsx","../../src/hooks/useRefresh.tsx"],"sourcesContent":["import { Card, CardProps } from '@mui/material'\nimport { DivinerInstance } from '@xyo-network/diviner-model'\nimport React from 'react'\n\nimport { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'\nimport { ModuleCardActions } from '../Module/index.ts'\nimport { DivinerCardContent } from './CardContent.tsx'\nimport { DivinerCardHeader } from './CardHeader.tsx'\n\nexport const DivinerCard: React.FC<CardProps & ModuleRenderProps<DivinerInstance>> = ({ children, mod, ...props }) => {\n return (\n <Card {...props}>\n <DivinerCardHeader mod={mod} />\n <DivinerCardContent mod={mod} />\n {children}\n <ModuleCardActions mod={mod} />\n </Card>\n )\n}\n","import { Card, CardProps } from '@mui/material'\nimport React from 'react'\n\nimport { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'\nimport { ModuleCardActions } from './CardActions.tsx'\nimport { ModuleCardContent } from './CardContent.tsx'\nimport { ModuleCardHeader } from './CardHeader.tsx'\n\nexport const ModuleCard: React.FC<CardProps & ModuleRenderProps> = ({ mod, ...props }) => {\n return (\n <Card {...props}>\n <ModuleCardHeader mod={mod} />\n <ModuleCardContent mod={mod} />\n <ModuleCardActions mod={mod} />\n </Card>\n )\n}\n","import { CardActions, CardActionsProps, Chip } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React, { useState } from 'react'\n\nimport { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'\nimport { DiscoverDialog } from './components/index.ts'\n\nexport const ModuleCardActions: React.FC<CardActionsProps & ModuleRenderProps> = ({ children, mod, sx, ...props }) => {\n const [discoverDialogOpen, setDiscoverDialogOpen] = useState(false)\n\n const config = mod?.config\n\n return (\n <CardActions sx={{ alignItems: 'stretch', flexDirection: 'column', ml: 1, ...sx }} {...props}>\n <FlexRow justifyContent=\"space-between\" gap={1} alignItems=\"center\">\n {mod\n ? <Chip label={config?.schema} size=\"small\" />\n : null}\n {children}\n <ButtonEx onClick={() => setDiscoverDialogOpen(true)} size=\"small\" variant=\"outlined\">\n Discover\n </ButtonEx>\n </FlexRow>\n <DiscoverDialog fullWidth maxWidth=\"md\" mod={mod} open={discoverDialogOpen} setOpen={setDiscoverDialogOpen} />\n </CardActions>\n )\n}\n","import { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogProps, DialogTitle, Divider, Paper } from '@mui/material'\nimport { usePromise } from '@xylabs/react-promise'\nimport { ModuleInstance } from '@xyo-network/module-model'\nimport React, { Dispatch, SetStateAction } from 'react'\n\nexport interface DiscoverDialogProps extends DialogProps {\n mod?: ModuleInstance\n setOpen?: Dispatch<SetStateAction<boolean>>\n}\n\n// Add a dialogue title and quick tip to show description of discover query\n\nexport const DiscoverDialog: React.FC<DiscoverDialogProps> = ({ mod, setOpen, ...props }) => {\n const [discoverPayloads] = usePromise(async () => {\n return await mod?.state()\n }, [mod])\n\n return (\n <Dialog {...props}>\n <DialogTitle>\n Supported Queries for\n {mod?.config.name || mod?.address}\n </DialogTitle>\n <Divider />\n <DialogContent>\n <Paper sx={{ p: 1 }}>\n <DialogContentText>All modules share a set of base queries along with ones specific to the module.</DialogContentText>\n <pre>{JSON.stringify(discoverPayloads, null, 2)}</pre>\n </Paper>\n </DialogContent>\n <DialogActions>\n <Button onClick={() => setOpen?.(false)} variant=\"outlined\">\n Close\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n","import { CardContent, CardContentProps } from '@mui/material'\nimport React from 'react'\n\nimport { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'\n\nexport const ModuleCardContent: React.FC<ModuleRenderProps & CardContentProps> = ({ children, ...props }) => {\n return <CardContent {...props}>{children}</CardContent>\n}\n","import { CardHeader, CardHeaderProps } from '@mui/material'\nimport { Module } from '@xyo-network/module-model'\nimport { findNetworkComponent } from '@xyo-network/react-shared'\nimport React from 'react'\n\nimport { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'\n\nconst moduleTypes = ['sentinel', 'bridge', 'archivist', 'diviner', 'node', 'witness']\n\nconst getModuleIcons = (moduleType: string, mod: Module) => {\n return mod?.queries.find(query => query.startsWith(`network.xyo.query.${moduleType}`)) ? findNetworkComponent(moduleType)?.icon : null\n}\n\nexport const ModuleCardHeader: React.FC<ModuleRenderProps & CardHeaderProps> = ({ subheader, avatar, title, mod, ...props }) => {\n return (\n <CardHeader\n title={title ?? mod?.config.name ?? 'Module'}\n subheader={subheader ?? mod?.address}\n avatar={\n avatar ?? (\n <>\n {mod\n ? moduleTypes.map((moduleType) => {\n const Icon = getModuleIcons(moduleType, mod)\n return Icon ? <Icon key={moduleType} fontSize=\"large\" color=\"primary\" /> : null\n })\n : null}\n </>\n )\n }\n {...props}\n />\n )\n}\n","import { CardContentProps } from '@mui/material'\nimport { DivinerInstance } from '@xyo-network/diviner-model'\nimport React from 'react'\n\nimport { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'\nimport { ModuleCardContent } from '../Module/index.ts'\n\nexport const DivinerCardContent: React.FC<ModuleRenderProps<DivinerInstance> & CardContentProps> = ({ children, ...props }) => {\n return <ModuleCardContent {...props}>{children}</ModuleCardContent>\n}\n","import { CardHeaderProps } from '@mui/material'\nimport { DivinerInstance } from '@xyo-network/diviner-model'\nimport React from 'react'\n\nimport { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'\nimport { ModuleCardHeader } from '../Module/index.ts'\n\nexport const DivinerCardHeader: React.FC<ModuleRenderProps<DivinerInstance> & CardHeaderProps> = ({ title, mod, ...props }) => {\n return <ModuleCardHeader mod={mod} title={title ?? mod?.config.name ?? 'Diviner'} {...props} />\n}\n","import { EthAddress } from '@xylabs/eth-address'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { EthAccountBox } from '@xylabs/react-crypto'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { Module } from '@xyo-network/module-model'\nimport { findNetworkComponent } from '@xyo-network/react-shared'\nimport React, { useState } from 'react'\n\nimport { ModuleRenderProps } from '../ModuleRenderProps.tsx'\n\nconst getModuleIcon = (moduleType: string, mod: Module) => {\n return mod?.queries.find(query => query.startsWith(`network.xyo.query.${moduleType}`)) ? findNetworkComponent(moduleType)?.icon() : null\n}\n\nexport const ModuleDetailsBox: React.FC<ModuleRenderProps & FlexBoxProps> = ({ children, mod, ...props }) => {\n const [showQueries, setShowQueries] = useState(false)\n return (\n <FlexCol {...props}>\n <FlexRow>\n {mod\n ? ['sentinel', 'bridge', 'archivist', 'diviner', 'node'].map((moduleType) => {\n const icon = getModuleIcon(moduleType, mod)\n return icon\n ? (\n <ButtonEx onClick={() => setShowQueries(!showQueries)} key={moduleType}>\n {icon}\n </ButtonEx>\n )\n : null\n })\n : null}\n <EthAccountBox address={EthAddress.fromString(mod?.address)} />\n </FlexRow>\n\n {showQueries\n ? mod?.queries.map((query) => {\n return <FlexRow key={query}>{query}</FlexRow>\n })\n : null}\n {children}\n </FlexCol>\n )\n}\n","import { TableCell, TableCellProps } from '@mui/material'\nimport { EthAddress } from '@xylabs/eth-address'\nimport { EthAccountBox } from '@xylabs/react-crypto'\nimport React from 'react'\n\nimport { ModuleRenderProps } from '../ModuleRenderProps.tsx'\n\nexport const ModuleTableCell: React.FC<ModuleRenderProps & TableCellProps> = ({ children, mod, ...props }) => {\n return (\n <TableCell {...props}>\n <EthAccountBox address={EthAddress.fromString(mod?.address)} />\n {children}\n </TableCell>\n )\n}\n","import { useState } from 'react'\n\nexport type RefreshCallback = () => number\nexport type DisableCallback = () => void\n\nexport const useRefresh = (): [number, RefreshCallback, DisableCallback] => {\n const [count, setCount] = useState(1)\n return [\n count,\n () => {\n const newCount = count + 1\n setCount(newCount)\n return newCount\n },\n () => setCount(0),\n ]\n}\n"],"mappings":"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","names":["Card","React","Card","React","CardActions","Chip","ButtonEx","FlexRow","React","useState","Button","Dialog","DialogActions","DialogContent","DialogContentText","DialogTitle","Divider","Paper","usePromise","React","DiscoverDialog","mod","setOpen","props","discoverPayloads","usePromise","state","Dialog","DialogTitle","config","name","address","Divider","DialogContent","Paper","sx","p","DialogContentText","pre","JSON","stringify","DialogActions","Button","onClick","variant","ModuleCardActions","children","mod","sx","props","discoverDialogOpen","setDiscoverDialogOpen","useState","config","React","CardActions","alignItems","flexDirection","ml","FlexRow","justifyContent","gap","Chip","label","schema","size","ButtonEx","onClick","variant","DiscoverDialog","fullWidth","maxWidth","open","setOpen","CardContent","React","ModuleCardContent","children","props","React","CardContent","CardHeader","findNetworkComponent","React","moduleTypes","getModuleIcons","moduleType","mod","queries","find","query","startsWith","findNetworkComponent","icon","ModuleCardHeader","subheader","avatar","title","props","React","CardHeader","config","name","address","map","Icon","key","fontSize","color","ModuleCard","mod","props","React","Card","ModuleCardHeader","ModuleCardContent","ModuleCardActions","React","DivinerCardContent","children","props","React","ModuleCardContent","React","DivinerCardHeader","title","mod","props","React","ModuleCardHeader","config","name","DivinerCard","children","mod","props","React","Card","DivinerCardHeader","DivinerCardContent","ModuleCardActions","EthAddress","ButtonEx","EthAccountBox","FlexCol","FlexRow","findNetworkComponent","React","useState","getModuleIcon","moduleType","mod","queries","find","query","startsWith","findNetworkComponent","icon","ModuleDetailsBox","children","props","showQueries","setShowQueries","useState","React","FlexCol","FlexRow","map","ButtonEx","onClick","key","EthAccountBox","address","EthAddress","fromString","TableCell","EthAddress","EthAccountBox","React","ModuleTableCell","children","mod","props","React","TableCell","EthAccountBox","address","EthAddress","fromString","useState","useRefresh","count","setCount","useState","newCount"]}
|
package/package.json
CHANGED
|
@@ -10,24 +10,24 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/eth-address": "^3.6.
|
|
14
|
-
"@xylabs/react-button": "^3.4.
|
|
15
|
-
"@xylabs/react-crypto": "^3.4.
|
|
16
|
-
"@xylabs/react-flexbox": "^3.4.
|
|
17
|
-
"@xylabs/react-promise": "^3.4.
|
|
18
|
-
"@xyo-network/diviner-model": "^2.
|
|
19
|
-
"@xyo-network/module-model": "^2.
|
|
20
|
-
"@xyo-network/react-shared": "^2.
|
|
13
|
+
"@xylabs/eth-address": "^3.6.12",
|
|
14
|
+
"@xylabs/react-button": "^3.4.2",
|
|
15
|
+
"@xylabs/react-crypto": "^3.4.2",
|
|
16
|
+
"@xylabs/react-flexbox": "^3.4.2",
|
|
17
|
+
"@xylabs/react-promise": "^3.4.2",
|
|
18
|
+
"@xyo-network/diviner-model": "^2.111.3",
|
|
19
|
+
"@xyo-network/module-model": "^2.111.3",
|
|
20
|
+
"@xyo-network/react-shared": "^2.82.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@storybook/react": "^
|
|
24
|
-
"@xylabs/react-async-effect": "^3.4.
|
|
25
|
-
"@xylabs/ts-scripts-yarn3": "^3.
|
|
26
|
-
"@xylabs/tsconfig-react": "^3.
|
|
27
|
-
"@xyo-network/archivist": "^2.
|
|
28
|
-
"@xyo-network/crypto-asset-plugin": "^2.99.
|
|
29
|
-
"@xyo-network/diviner-address-history": "^2.
|
|
30
|
-
"@xyo-network/node-memory": "^2.
|
|
23
|
+
"@storybook/react": "^8.2.7",
|
|
24
|
+
"@xylabs/react-async-effect": "^3.4.2",
|
|
25
|
+
"@xylabs/ts-scripts-yarn3": "^3.15.16",
|
|
26
|
+
"@xylabs/tsconfig-react": "^3.15.16",
|
|
27
|
+
"@xyo-network/archivist": "^2.111.3",
|
|
28
|
+
"@xyo-network/crypto-asset-plugin": "^2.99.6",
|
|
29
|
+
"@xyo-network/diviner-address-history": "^2.111.3",
|
|
30
|
+
"@xyo-network/node-memory": "^2.111.3",
|
|
31
31
|
"typescript": "^5.5.4"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"node": {
|
|
45
45
|
"import": {
|
|
46
46
|
"types": "./dist/node/index.d.mts",
|
|
47
|
-
"default": "./dist/node/index.
|
|
47
|
+
"default": "./dist/node/index.mjs"
|
|
48
48
|
},
|
|
49
49
|
"require": {
|
|
50
50
|
"types": "./dist/node/index.d.cts",
|
|
@@ -54,19 +54,19 @@
|
|
|
54
54
|
"browser": {
|
|
55
55
|
"import": {
|
|
56
56
|
"types": "./dist/browser/index.d.mts",
|
|
57
|
-
"default": "./dist/browser/index.
|
|
57
|
+
"default": "./dist/browser/index.mjs"
|
|
58
58
|
},
|
|
59
59
|
"require": {
|
|
60
60
|
"types": "./dist/browser/index.d.cts",
|
|
61
61
|
"default": "./dist/browser/index.cjs"
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
-
"default": "./dist/browser/index.
|
|
64
|
+
"default": "./dist/browser/index.mjs"
|
|
65
65
|
},
|
|
66
66
|
"./package.json": "./package.json"
|
|
67
67
|
},
|
|
68
68
|
"main": "dist/browser/index.cjs",
|
|
69
|
-
"module": "dist/browser/index.
|
|
69
|
+
"module": "dist/browser/index.mjs",
|
|
70
70
|
"homepage": "https://xyo.network",
|
|
71
71
|
"keywords": [
|
|
72
72
|
"xyo",
|
|
@@ -88,6 +88,6 @@
|
|
|
88
88
|
},
|
|
89
89
|
"sideEffects": false,
|
|
90
90
|
"types": "dist/browser/index.d.ts",
|
|
91
|
-
"version": "2.
|
|
91
|
+
"version": "2.82.0",
|
|
92
92
|
"type": "module"
|
|
93
93
|
}
|
|
@@ -2,9 +2,9 @@ import { Meta, StoryFn } from '@storybook/react'
|
|
|
2
2
|
import { useAsyncEffect } from '@xylabs/react-async-effect'
|
|
3
3
|
import { AddressHistoryDiviner, AddressHistoryDivinerConfigSchema } from '@xyo-network/diviner-address-history'
|
|
4
4
|
import { DivinerInstance } from '@xyo-network/diviner-model'
|
|
5
|
-
import { useState } from 'react'
|
|
5
|
+
import React, { useState } from 'react'
|
|
6
6
|
|
|
7
|
-
import { DivinerCard } from './Card.
|
|
7
|
+
import { DivinerCard } from './Card.tsx'
|
|
8
8
|
|
|
9
9
|
const StorybookEntry = {
|
|
10
10
|
title: 'modules/diviner/DivinerCard',
|
|
@@ -14,7 +14,7 @@ const Template: StoryFn<typeof DivinerCard> = () => {
|
|
|
14
14
|
const [mod, setModule] = useState<DivinerInstance>()
|
|
15
15
|
|
|
16
16
|
useAsyncEffect(
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
async (mounted) => {
|
|
19
19
|
if (!mod) {
|
|
20
20
|
const newModule = (await AddressHistoryDiviner.create({
|
|
@@ -39,5 +39,4 @@ const SingleModule = Template.bind({})
|
|
|
39
39
|
|
|
40
40
|
export { SingleModule }
|
|
41
41
|
|
|
42
|
-
// eslint-disable-next-line import/no-default-export
|
|
43
42
|
export default StorybookEntry
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Card, CardProps } from '@mui/material'
|
|
2
2
|
import { DivinerInstance } from '@xyo-network/diviner-model'
|
|
3
|
+
import React from 'react'
|
|
3
4
|
|
|
4
|
-
import { ModuleRenderProps } from '../../../ModuleRenderProps.
|
|
5
|
-
import { ModuleCardActions } from '../Module/index.
|
|
6
|
-
import { DivinerCardContent } from './CardContent.
|
|
7
|
-
import { DivinerCardHeader } from './CardHeader.
|
|
5
|
+
import { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'
|
|
6
|
+
import { ModuleCardActions } from '../Module/index.ts'
|
|
7
|
+
import { DivinerCardContent } from './CardContent.tsx'
|
|
8
|
+
import { DivinerCardHeader } from './CardHeader.tsx'
|
|
8
9
|
|
|
9
10
|
export const DivinerCard: React.FC<CardProps & ModuleRenderProps<DivinerInstance>> = ({ children, mod, ...props }) => {
|
|
10
11
|
return (
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CardActionsProps } from '@mui/material'
|
|
2
2
|
import { DivinerInstance } from '@xyo-network/diviner-model'
|
|
3
|
+
import React from 'react'
|
|
3
4
|
|
|
4
|
-
import { ModuleRenderProps } from '../../../ModuleRenderProps.
|
|
5
|
-
import { ModuleCardActions } from '../Module/index.
|
|
5
|
+
import { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'
|
|
6
|
+
import { ModuleCardActions } from '../Module/index.ts'
|
|
6
7
|
|
|
7
8
|
export const DivinerCardActions: React.FC<ModuleRenderProps<DivinerInstance> & CardActionsProps> = (props) => {
|
|
8
9
|
return <ModuleCardActions {...props} />
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CardContentProps } from '@mui/material'
|
|
2
2
|
import { DivinerInstance } from '@xyo-network/diviner-model'
|
|
3
|
+
import React from 'react'
|
|
3
4
|
|
|
4
|
-
import { ModuleRenderProps } from '../../../ModuleRenderProps.
|
|
5
|
-
import { ModuleCardContent } from '../Module/index.
|
|
5
|
+
import { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'
|
|
6
|
+
import { ModuleCardContent } from '../Module/index.ts'
|
|
6
7
|
|
|
7
8
|
export const DivinerCardContent: React.FC<ModuleRenderProps<DivinerInstance> & CardContentProps> = ({ children, ...props }) => {
|
|
8
9
|
return <ModuleCardContent {...props}>{children}</ModuleCardContent>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CardHeaderProps } from '@mui/material'
|
|
2
2
|
import { DivinerInstance } from '@xyo-network/diviner-model'
|
|
3
|
+
import React from 'react'
|
|
3
4
|
|
|
4
|
-
import { ModuleRenderProps } from '../../../ModuleRenderProps.
|
|
5
|
-
import { ModuleCardHeader } from '../Module/index.
|
|
5
|
+
import { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'
|
|
6
|
+
import { ModuleCardHeader } from '../Module/index.ts'
|
|
6
7
|
|
|
7
8
|
export const DivinerCardHeader: React.FC<ModuleRenderProps<DivinerInstance> & CardHeaderProps> = ({ title, mod, ...props }) => {
|
|
8
9
|
return <ModuleCardHeader mod={mod} title={title ?? mod?.config.name ?? 'Diviner'} {...props} />
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Card.
|
|
2
|
-
export * from './CardContent.
|
|
3
|
-
export * from './CardHeader.
|
|
1
|
+
export * from './Card.tsx'
|
|
2
|
+
export * from './CardContent.tsx'
|
|
3
|
+
export * from './CardHeader.tsx'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react'
|
|
2
2
|
import { useAsyncEffect } from '@xylabs/react-async-effect'
|
|
3
3
|
import { ArchivistInstance, MemoryArchivist } from '@xyo-network/archivist'
|
|
4
|
-
import { useState } from 'react'
|
|
4
|
+
import React, { useState } from 'react'
|
|
5
5
|
|
|
6
|
-
import { ModuleCard } from './Card.
|
|
6
|
+
import { ModuleCard } from './Card.tsx'
|
|
7
7
|
|
|
8
8
|
const StorybookEntry = {
|
|
9
9
|
argTypes: {
|
|
@@ -25,7 +25,7 @@ const Template: StoryFn<typeof ModuleCard> = () => {
|
|
|
25
25
|
const [mod, setModule] = useState<ArchivistInstance>()
|
|
26
26
|
|
|
27
27
|
useAsyncEffect(
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
async (mounted) => {
|
|
30
30
|
if (!mod) {
|
|
31
31
|
const newModule = await MemoryArchivist.create()
|
|
@@ -44,5 +44,4 @@ const SingleModule = Template.bind({})
|
|
|
44
44
|
|
|
45
45
|
export { SingleModule }
|
|
46
46
|
|
|
47
|
-
// eslint-disable-next-line import/no-default-export
|
|
48
47
|
export default StorybookEntry
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Card, CardProps } from '@mui/material'
|
|
2
|
+
import React from 'react'
|
|
2
3
|
|
|
3
|
-
import { ModuleRenderProps } from '../../../ModuleRenderProps.
|
|
4
|
-
import { ModuleCardActions } from './CardActions.
|
|
5
|
-
import { ModuleCardContent } from './CardContent.
|
|
6
|
-
import { ModuleCardHeader } from './CardHeader.
|
|
4
|
+
import { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'
|
|
5
|
+
import { ModuleCardActions } from './CardActions.tsx'
|
|
6
|
+
import { ModuleCardContent } from './CardContent.tsx'
|
|
7
|
+
import { ModuleCardHeader } from './CardHeader.tsx'
|
|
7
8
|
|
|
8
9
|
export const ModuleCard: React.FC<CardProps & ModuleRenderProps> = ({ mod, ...props }) => {
|
|
9
10
|
return (
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CardActions, CardActionsProps, Chip } from '@mui/material'
|
|
2
2
|
import { ButtonEx } from '@xylabs/react-button'
|
|
3
3
|
import { FlexRow } from '@xylabs/react-flexbox'
|
|
4
|
-
import { useState } from 'react'
|
|
4
|
+
import React, { useState } from 'react'
|
|
5
5
|
|
|
6
|
-
import { ModuleRenderProps } from '../../../ModuleRenderProps.
|
|
7
|
-
import { DiscoverDialog } from './components/index.
|
|
6
|
+
import { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'
|
|
7
|
+
import { DiscoverDialog } from './components/index.ts'
|
|
8
8
|
|
|
9
9
|
export const ModuleCardActions: React.FC<CardActionsProps & ModuleRenderProps> = ({ children, mod, sx, ...props }) => {
|
|
10
10
|
const [discoverDialogOpen, setDiscoverDialogOpen] = useState(false)
|
|
@@ -14,15 +14,15 @@ export const ModuleCardActions: React.FC<CardActionsProps & ModuleRenderProps> =
|
|
|
14
14
|
return (
|
|
15
15
|
<CardActions sx={{ alignItems: 'stretch', flexDirection: 'column', ml: 1, ...sx }} {...props}>
|
|
16
16
|
<FlexRow justifyContent="space-between" gap={1} alignItems="center">
|
|
17
|
-
{mod
|
|
18
|
-
<Chip label={config?.schema} size=
|
|
19
|
-
|
|
17
|
+
{mod
|
|
18
|
+
? <Chip label={config?.schema} size="small" />
|
|
19
|
+
: null}
|
|
20
20
|
{children}
|
|
21
|
-
<ButtonEx onClick={() => setDiscoverDialogOpen(true)} size=
|
|
21
|
+
<ButtonEx onClick={() => setDiscoverDialogOpen(true)} size="small" variant="outlined">
|
|
22
22
|
Discover
|
|
23
23
|
</ButtonEx>
|
|
24
24
|
</FlexRow>
|
|
25
|
-
<DiscoverDialog fullWidth maxWidth=
|
|
25
|
+
<DiscoverDialog fullWidth maxWidth="md" mod={mod} open={discoverDialogOpen} setOpen={setDiscoverDialogOpen} />
|
|
26
26
|
</CardActions>
|
|
27
27
|
)
|
|
28
28
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CardContent, CardContentProps } from '@mui/material'
|
|
2
|
+
import React from 'react'
|
|
2
3
|
|
|
3
|
-
import { ModuleRenderProps } from '../../../ModuleRenderProps.
|
|
4
|
+
import { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'
|
|
4
5
|
|
|
5
6
|
export const ModuleCardContent: React.FC<ModuleRenderProps & CardContentProps> = ({ children, ...props }) => {
|
|
6
7
|
return <CardContent {...props}>{children}</CardContent>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { CardHeader, CardHeaderProps } from '@mui/material'
|
|
2
2
|
import { Module } from '@xyo-network/module-model'
|
|
3
3
|
import { findNetworkComponent } from '@xyo-network/react-shared'
|
|
4
|
+
import React from 'react'
|
|
4
5
|
|
|
5
|
-
import { ModuleRenderProps } from '../../../ModuleRenderProps.
|
|
6
|
+
import { ModuleRenderProps } from '../../../ModuleRenderProps.tsx'
|
|
6
7
|
|
|
7
8
|
const moduleTypes = ['sentinel', 'bridge', 'archivist', 'diviner', 'node', 'witness']
|
|
8
9
|
|
|
9
10
|
const getModuleIcons = (moduleType: string, mod: Module) => {
|
|
10
|
-
return mod?.queries.find(
|
|
11
|
+
return mod?.queries.find(query => query.startsWith(`network.xyo.query.${moduleType}`)) ? findNetworkComponent(moduleType)?.icon : null
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
export const ModuleCardHeader: React.FC<ModuleRenderProps & CardHeaderProps> = ({ subheader, avatar, title, mod, ...props }) => {
|
|
@@ -18,12 +19,12 @@ export const ModuleCardHeader: React.FC<ModuleRenderProps & CardHeaderProps> = (
|
|
|
18
19
|
avatar={
|
|
19
20
|
avatar ?? (
|
|
20
21
|
<>
|
|
21
|
-
{mod
|
|
22
|
-
moduleTypes.map((moduleType) => {
|
|
22
|
+
{mod
|
|
23
|
+
? moduleTypes.map((moduleType) => {
|
|
23
24
|
const Icon = getModuleIcons(moduleType, mod)
|
|
24
|
-
return Icon ? <Icon key={moduleType} fontSize=
|
|
25
|
+
return Icon ? <Icon key={moduleType} fontSize="large" color="primary" /> : null
|
|
25
26
|
})
|
|
26
|
-
|
|
27
|
+
: null}
|
|
27
28
|
</>
|
|
28
29
|
)
|
|
29
30
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogProps, DialogTitle, Divider, Paper } from '@mui/material'
|
|
2
2
|
import { usePromise } from '@xylabs/react-promise'
|
|
3
3
|
import { ModuleInstance } from '@xyo-network/module-model'
|
|
4
|
-
import { Dispatch, SetStateAction } from 'react'
|
|
4
|
+
import React, { Dispatch, SetStateAction } from 'react'
|
|
5
5
|
|
|
6
6
|
export interface DiscoverDialogProps extends DialogProps {
|
|
7
7
|
mod?: ModuleInstance
|
|
@@ -17,7 +17,10 @@ export const DiscoverDialog: React.FC<DiscoverDialogProps> = ({ mod, setOpen, ..
|
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
19
|
<Dialog {...props}>
|
|
20
|
-
<DialogTitle>
|
|
20
|
+
<DialogTitle>
|
|
21
|
+
Supported Queries for
|
|
22
|
+
{mod?.config.name || mod?.address}
|
|
23
|
+
</DialogTitle>
|
|
21
24
|
<Divider />
|
|
22
25
|
<DialogContent>
|
|
23
26
|
<Paper sx={{ p: 1 }}>
|
|
@@ -26,7 +29,7 @@ export const DiscoverDialog: React.FC<DiscoverDialogProps> = ({ mod, setOpen, ..
|
|
|
26
29
|
</Paper>
|
|
27
30
|
</DialogContent>
|
|
28
31
|
<DialogActions>
|
|
29
|
-
<Button onClick={() => setOpen?.(false)} variant=
|
|
32
|
+
<Button onClick={() => setOpen?.(false)} variant="outlined">
|
|
30
33
|
Close
|
|
31
34
|
</Button>
|
|
32
35
|
</DialogActions>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './DiscoverDialog.
|
|
1
|
+
export * from './DiscoverDialog.tsx'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './Card.
|
|
2
|
-
export * from './CardActions.
|
|
3
|
-
export * from './CardContent.
|
|
4
|
-
export * from './CardHeader.
|
|
1
|
+
export * from './Card.tsx'
|
|
2
|
+
export * from './CardActions.tsx'
|
|
3
|
+
export * from './CardContent.tsx'
|
|
4
|
+
export * from './CardHeader.tsx'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './Diviner/index.
|
|
2
|
-
export * from './Module/index.
|
|
1
|
+
export * from './Diviner/index.ts'
|
|
2
|
+
export * from './Module/index.ts'
|