@xyo-network/react-payload-raw-info 2.81.10 → 2.83.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/index.d.ts +58 -2
- package/dist/browser/index.mjs +244 -0
- package/dist/browser/index.mjs.map +1 -0
- package/package.json +18 -34
- package/src/components/Button/RawInfoButton.stories.tsx +3 -3
- package/src/components/Button/RawInfoButton.tsx +17 -15
- package/src/components/Button/RawInfoIconButton.stories.tsx +3 -3
- package/src/components/Button/RawInfoIconButton.tsx +17 -15
- package/src/components/Button/index.ts +2 -2
- package/src/components/Button/lib/index.ts +2 -2
- package/src/components/Button/lib/presetIconSize.ts +1 -1
- package/src/components/img/index.tsx +1 -0
- package/src/components/index.ts +3 -3
- package/src/components/shared/Dialog/JsonViewerCollapse.tsx +24 -19
- package/src/components/shared/Dialog/RawInfoDialog.stories.tsx +3 -3
- package/src/components/shared/Dialog/RawInfoDialog.tsx +3 -3
- package/src/components/shared/Dialog/index.ts +2 -2
- package/src/components/shared/JsonViewerEx.tsx +1 -0
- package/src/components/shared/index.ts +2 -2
- package/src/components/styled/index.ts +1 -1
- package/src/index.ts +1 -1
- package/src/lib/index.ts +1 -1
- package/xy.config.ts +12 -0
- package/dist/browser/components/Button/RawInfoButton.d.cts +0 -14
- package/dist/browser/components/Button/RawInfoButton.d.cts.map +0 -1
- package/dist/browser/components/Button/RawInfoButton.d.mts +0 -14
- package/dist/browser/components/Button/RawInfoButton.d.mts.map +0 -1
- package/dist/browser/components/Button/RawInfoButton.d.ts +0 -14
- package/dist/browser/components/Button/RawInfoButton.d.ts.map +0 -1
- package/dist/browser/components/Button/RawInfoIconButton.d.cts +0 -14
- package/dist/browser/components/Button/RawInfoIconButton.d.cts.map +0 -1
- package/dist/browser/components/Button/RawInfoIconButton.d.mts +0 -14
- package/dist/browser/components/Button/RawInfoIconButton.d.mts.map +0 -1
- package/dist/browser/components/Button/RawInfoIconButton.d.ts +0 -14
- package/dist/browser/components/Button/RawInfoIconButton.d.ts.map +0 -1
- package/dist/browser/components/Button/index.d.cts +0 -3
- package/dist/browser/components/Button/index.d.cts.map +0 -1
- package/dist/browser/components/Button/index.d.mts +0 -3
- package/dist/browser/components/Button/index.d.mts.map +0 -1
- package/dist/browser/components/Button/index.d.ts +0 -3
- package/dist/browser/components/Button/index.d.ts.map +0 -1
- package/dist/browser/components/Button/lib/IconSize.d.cts +0 -2
- package/dist/browser/components/Button/lib/IconSize.d.cts.map +0 -1
- package/dist/browser/components/Button/lib/IconSize.d.mts +0 -2
- package/dist/browser/components/Button/lib/IconSize.d.mts.map +0 -1
- package/dist/browser/components/Button/lib/IconSize.d.ts +0 -2
- package/dist/browser/components/Button/lib/IconSize.d.ts.map +0 -1
- package/dist/browser/components/Button/lib/index.d.cts +0 -3
- package/dist/browser/components/Button/lib/index.d.cts.map +0 -1
- package/dist/browser/components/Button/lib/index.d.mts +0 -3
- package/dist/browser/components/Button/lib/index.d.mts.map +0 -1
- package/dist/browser/components/Button/lib/index.d.ts +0 -3
- package/dist/browser/components/Button/lib/index.d.ts.map +0 -1
- package/dist/browser/components/Button/lib/presetIconSize.d.cts +0 -3
- package/dist/browser/components/Button/lib/presetIconSize.d.cts.map +0 -1
- package/dist/browser/components/Button/lib/presetIconSize.d.mts +0 -3
- package/dist/browser/components/Button/lib/presetIconSize.d.mts.map +0 -1
- package/dist/browser/components/Button/lib/presetIconSize.d.ts +0 -3
- package/dist/browser/components/Button/lib/presetIconSize.d.ts.map +0 -1
- package/dist/browser/components/img/index.d.cts +0 -4
- package/dist/browser/components/img/index.d.cts.map +0 -1
- package/dist/browser/components/img/index.d.mts +0 -4
- package/dist/browser/components/img/index.d.mts.map +0 -1
- package/dist/browser/components/img/index.d.ts +0 -4
- package/dist/browser/components/img/index.d.ts.map +0 -1
- package/dist/browser/components/index.d.cts +0 -4
- package/dist/browser/components/index.d.cts.map +0 -1
- package/dist/browser/components/index.d.mts +0 -4
- package/dist/browser/components/index.d.mts.map +0 -1
- package/dist/browser/components/index.d.ts +0 -4
- package/dist/browser/components/index.d.ts.map +0 -1
- package/dist/browser/components/shared/Dialog/JsonViewerCollapse.d.cts +0 -8
- package/dist/browser/components/shared/Dialog/JsonViewerCollapse.d.cts.map +0 -1
- package/dist/browser/components/shared/Dialog/JsonViewerCollapse.d.mts +0 -8
- package/dist/browser/components/shared/Dialog/JsonViewerCollapse.d.mts.map +0 -1
- package/dist/browser/components/shared/Dialog/JsonViewerCollapse.d.ts +0 -8
- package/dist/browser/components/shared/Dialog/JsonViewerCollapse.d.ts.map +0 -1
- package/dist/browser/components/shared/Dialog/RawInfoDialog.d.cts +0 -11
- package/dist/browser/components/shared/Dialog/RawInfoDialog.d.cts.map +0 -1
- package/dist/browser/components/shared/Dialog/RawInfoDialog.d.mts +0 -11
- package/dist/browser/components/shared/Dialog/RawInfoDialog.d.mts.map +0 -1
- package/dist/browser/components/shared/Dialog/RawInfoDialog.d.ts +0 -11
- package/dist/browser/components/shared/Dialog/RawInfoDialog.d.ts.map +0 -1
- package/dist/browser/components/shared/Dialog/index.d.cts +0 -3
- package/dist/browser/components/shared/Dialog/index.d.cts.map +0 -1
- package/dist/browser/components/shared/Dialog/index.d.mts +0 -3
- package/dist/browser/components/shared/Dialog/index.d.mts.map +0 -1
- package/dist/browser/components/shared/Dialog/index.d.ts +0 -3
- package/dist/browser/components/shared/Dialog/index.d.ts.map +0 -1
- package/dist/browser/components/shared/JsonViewerEx.d.cts +0 -4
- package/dist/browser/components/shared/JsonViewerEx.d.cts.map +0 -1
- package/dist/browser/components/shared/JsonViewerEx.d.mts +0 -4
- package/dist/browser/components/shared/JsonViewerEx.d.mts.map +0 -1
- package/dist/browser/components/shared/JsonViewerEx.d.ts +0 -4
- package/dist/browser/components/shared/JsonViewerEx.d.ts.map +0 -1
- package/dist/browser/components/shared/index.d.cts +0 -3
- package/dist/browser/components/shared/index.d.cts.map +0 -1
- package/dist/browser/components/shared/index.d.mts +0 -3
- package/dist/browser/components/shared/index.d.mts.map +0 -1
- package/dist/browser/components/shared/index.d.ts +0 -3
- package/dist/browser/components/shared/index.d.ts.map +0 -1
- package/dist/browser/components/styled/StyledChipLabel.d.cts +0 -4
- package/dist/browser/components/styled/StyledChipLabel.d.cts.map +0 -1
- package/dist/browser/components/styled/StyledChipLabel.d.mts +0 -4
- package/dist/browser/components/styled/StyledChipLabel.d.mts.map +0 -1
- package/dist/browser/components/styled/StyledChipLabel.d.ts +0 -4
- package/dist/browser/components/styled/StyledChipLabel.d.ts.map +0 -1
- package/dist/browser/components/styled/index.d.cts +0 -2
- package/dist/browser/components/styled/index.d.cts.map +0 -1
- package/dist/browser/components/styled/index.d.mts +0 -2
- package/dist/browser/components/styled/index.d.mts.map +0 -1
- package/dist/browser/components/styled/index.d.ts +0 -2
- package/dist/browser/components/styled/index.d.ts.map +0 -1
- package/dist/browser/index.cjs +0 -273
- package/dist/browser/index.cjs.map +0 -1
- package/dist/browser/index.d.cts +0 -2
- package/dist/browser/index.d.cts.map +0 -1
- package/dist/browser/index.d.mts +0 -2
- package/dist/browser/index.d.mts.map +0 -1
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -250
- package/dist/browser/index.js.map +0 -1
- package/dist/browser/lib/ExpansionProps.d.cts +0 -5
- package/dist/browser/lib/ExpansionProps.d.cts.map +0 -1
- package/dist/browser/lib/ExpansionProps.d.mts +0 -5
- package/dist/browser/lib/ExpansionProps.d.mts.map +0 -1
- package/dist/browser/lib/ExpansionProps.d.ts +0 -5
- package/dist/browser/lib/ExpansionProps.d.ts.map +0 -1
- package/dist/browser/lib/index.d.cts +0 -2
- package/dist/browser/lib/index.d.cts.map +0 -1
- package/dist/browser/lib/index.d.mts +0 -2
- package/dist/browser/lib/index.d.mts.map +0 -1
- package/dist/browser/lib/index.d.ts +0 -2
- package/dist/browser/lib/index.d.ts.map +0 -1
- package/dist/neutral/components/Button/RawInfoButton.d.cts +0 -14
- package/dist/neutral/components/Button/RawInfoButton.d.cts.map +0 -1
- package/dist/neutral/components/Button/RawInfoButton.d.mts +0 -14
- package/dist/neutral/components/Button/RawInfoButton.d.mts.map +0 -1
- package/dist/neutral/components/Button/RawInfoButton.d.ts +0 -14
- package/dist/neutral/components/Button/RawInfoButton.d.ts.map +0 -1
- package/dist/neutral/components/Button/RawInfoIconButton.d.cts +0 -14
- package/dist/neutral/components/Button/RawInfoIconButton.d.cts.map +0 -1
- package/dist/neutral/components/Button/RawInfoIconButton.d.mts +0 -14
- package/dist/neutral/components/Button/RawInfoIconButton.d.mts.map +0 -1
- package/dist/neutral/components/Button/RawInfoIconButton.d.ts +0 -14
- package/dist/neutral/components/Button/RawInfoIconButton.d.ts.map +0 -1
- package/dist/neutral/components/Button/index.d.cts +0 -3
- package/dist/neutral/components/Button/index.d.cts.map +0 -1
- package/dist/neutral/components/Button/index.d.mts +0 -3
- package/dist/neutral/components/Button/index.d.mts.map +0 -1
- package/dist/neutral/components/Button/index.d.ts +0 -3
- package/dist/neutral/components/Button/index.d.ts.map +0 -1
- package/dist/neutral/components/Button/lib/IconSize.d.cts +0 -2
- package/dist/neutral/components/Button/lib/IconSize.d.cts.map +0 -1
- package/dist/neutral/components/Button/lib/IconSize.d.mts +0 -2
- package/dist/neutral/components/Button/lib/IconSize.d.mts.map +0 -1
- package/dist/neutral/components/Button/lib/IconSize.d.ts +0 -2
- package/dist/neutral/components/Button/lib/IconSize.d.ts.map +0 -1
- package/dist/neutral/components/Button/lib/index.d.cts +0 -3
- package/dist/neutral/components/Button/lib/index.d.cts.map +0 -1
- package/dist/neutral/components/Button/lib/index.d.mts +0 -3
- package/dist/neutral/components/Button/lib/index.d.mts.map +0 -1
- package/dist/neutral/components/Button/lib/index.d.ts +0 -3
- package/dist/neutral/components/Button/lib/index.d.ts.map +0 -1
- package/dist/neutral/components/Button/lib/presetIconSize.d.cts +0 -3
- package/dist/neutral/components/Button/lib/presetIconSize.d.cts.map +0 -1
- package/dist/neutral/components/Button/lib/presetIconSize.d.mts +0 -3
- package/dist/neutral/components/Button/lib/presetIconSize.d.mts.map +0 -1
- package/dist/neutral/components/Button/lib/presetIconSize.d.ts +0 -3
- package/dist/neutral/components/Button/lib/presetIconSize.d.ts.map +0 -1
- package/dist/neutral/components/img/index.d.cts +0 -4
- package/dist/neutral/components/img/index.d.cts.map +0 -1
- package/dist/neutral/components/img/index.d.mts +0 -4
- package/dist/neutral/components/img/index.d.mts.map +0 -1
- package/dist/neutral/components/img/index.d.ts +0 -4
- package/dist/neutral/components/img/index.d.ts.map +0 -1
- package/dist/neutral/components/index.d.cts +0 -4
- package/dist/neutral/components/index.d.cts.map +0 -1
- package/dist/neutral/components/index.d.mts +0 -4
- package/dist/neutral/components/index.d.mts.map +0 -1
- package/dist/neutral/components/index.d.ts +0 -4
- package/dist/neutral/components/index.d.ts.map +0 -1
- package/dist/neutral/components/shared/Dialog/JsonViewerCollapse.d.cts +0 -8
- package/dist/neutral/components/shared/Dialog/JsonViewerCollapse.d.cts.map +0 -1
- package/dist/neutral/components/shared/Dialog/JsonViewerCollapse.d.mts +0 -8
- package/dist/neutral/components/shared/Dialog/JsonViewerCollapse.d.mts.map +0 -1
- package/dist/neutral/components/shared/Dialog/JsonViewerCollapse.d.ts +0 -8
- package/dist/neutral/components/shared/Dialog/JsonViewerCollapse.d.ts.map +0 -1
- package/dist/neutral/components/shared/Dialog/RawInfoDialog.d.cts +0 -11
- package/dist/neutral/components/shared/Dialog/RawInfoDialog.d.cts.map +0 -1
- package/dist/neutral/components/shared/Dialog/RawInfoDialog.d.mts +0 -11
- package/dist/neutral/components/shared/Dialog/RawInfoDialog.d.mts.map +0 -1
- package/dist/neutral/components/shared/Dialog/RawInfoDialog.d.ts +0 -11
- package/dist/neutral/components/shared/Dialog/RawInfoDialog.d.ts.map +0 -1
- package/dist/neutral/components/shared/Dialog/index.d.cts +0 -3
- package/dist/neutral/components/shared/Dialog/index.d.cts.map +0 -1
- package/dist/neutral/components/shared/Dialog/index.d.mts +0 -3
- package/dist/neutral/components/shared/Dialog/index.d.mts.map +0 -1
- package/dist/neutral/components/shared/Dialog/index.d.ts +0 -3
- package/dist/neutral/components/shared/Dialog/index.d.ts.map +0 -1
- package/dist/neutral/components/shared/JsonViewerEx.d.cts +0 -4
- package/dist/neutral/components/shared/JsonViewerEx.d.cts.map +0 -1
- package/dist/neutral/components/shared/JsonViewerEx.d.mts +0 -4
- package/dist/neutral/components/shared/JsonViewerEx.d.mts.map +0 -1
- package/dist/neutral/components/shared/JsonViewerEx.d.ts +0 -4
- package/dist/neutral/components/shared/JsonViewerEx.d.ts.map +0 -1
- package/dist/neutral/components/shared/index.d.cts +0 -3
- package/dist/neutral/components/shared/index.d.cts.map +0 -1
- package/dist/neutral/components/shared/index.d.mts +0 -3
- package/dist/neutral/components/shared/index.d.mts.map +0 -1
- package/dist/neutral/components/shared/index.d.ts +0 -3
- package/dist/neutral/components/shared/index.d.ts.map +0 -1
- package/dist/neutral/components/styled/StyledChipLabel.d.cts +0 -4
- package/dist/neutral/components/styled/StyledChipLabel.d.cts.map +0 -1
- package/dist/neutral/components/styled/StyledChipLabel.d.mts +0 -4
- package/dist/neutral/components/styled/StyledChipLabel.d.mts.map +0 -1
- package/dist/neutral/components/styled/StyledChipLabel.d.ts +0 -4
- package/dist/neutral/components/styled/StyledChipLabel.d.ts.map +0 -1
- package/dist/neutral/components/styled/index.d.cts +0 -2
- package/dist/neutral/components/styled/index.d.cts.map +0 -1
- package/dist/neutral/components/styled/index.d.mts +0 -2
- package/dist/neutral/components/styled/index.d.mts.map +0 -1
- package/dist/neutral/components/styled/index.d.ts +0 -2
- package/dist/neutral/components/styled/index.d.ts.map +0 -1
- package/dist/neutral/index.cjs +0 -273
- package/dist/neutral/index.cjs.map +0 -1
- package/dist/neutral/index.d.cts +0 -2
- package/dist/neutral/index.d.cts.map +0 -1
- package/dist/neutral/index.d.mts +0 -2
- package/dist/neutral/index.d.mts.map +0 -1
- package/dist/neutral/index.d.ts +0 -2
- package/dist/neutral/index.d.ts.map +0 -1
- package/dist/neutral/index.js +0 -250
- package/dist/neutral/index.js.map +0 -1
- package/dist/neutral/lib/ExpansionProps.d.cts +0 -5
- package/dist/neutral/lib/ExpansionProps.d.cts.map +0 -1
- package/dist/neutral/lib/ExpansionProps.d.mts +0 -5
- package/dist/neutral/lib/ExpansionProps.d.mts.map +0 -1
- package/dist/neutral/lib/ExpansionProps.d.ts +0 -5
- package/dist/neutral/lib/ExpansionProps.d.ts.map +0 -1
- package/dist/neutral/lib/index.d.cts +0 -2
- package/dist/neutral/lib/index.d.cts.map +0 -1
- package/dist/neutral/lib/index.d.mts +0 -2
- package/dist/neutral/lib/index.d.mts.map +0 -1
- package/dist/neutral/lib/index.d.ts +0 -2
- package/dist/neutral/lib/index.d.ts.map +0 -1
- package/dist/node/components/Button/RawInfoButton.d.cts +0 -14
- package/dist/node/components/Button/RawInfoButton.d.cts.map +0 -1
- package/dist/node/components/Button/RawInfoButton.d.mts +0 -14
- package/dist/node/components/Button/RawInfoButton.d.mts.map +0 -1
- package/dist/node/components/Button/RawInfoButton.d.ts +0 -14
- package/dist/node/components/Button/RawInfoButton.d.ts.map +0 -1
- package/dist/node/components/Button/RawInfoIconButton.d.cts +0 -14
- package/dist/node/components/Button/RawInfoIconButton.d.cts.map +0 -1
- package/dist/node/components/Button/RawInfoIconButton.d.mts +0 -14
- package/dist/node/components/Button/RawInfoIconButton.d.mts.map +0 -1
- package/dist/node/components/Button/RawInfoIconButton.d.ts +0 -14
- package/dist/node/components/Button/RawInfoIconButton.d.ts.map +0 -1
- package/dist/node/components/Button/index.d.cts +0 -3
- package/dist/node/components/Button/index.d.cts.map +0 -1
- package/dist/node/components/Button/index.d.mts +0 -3
- package/dist/node/components/Button/index.d.mts.map +0 -1
- package/dist/node/components/Button/index.d.ts +0 -3
- package/dist/node/components/Button/index.d.ts.map +0 -1
- package/dist/node/components/Button/lib/IconSize.d.cts +0 -2
- package/dist/node/components/Button/lib/IconSize.d.cts.map +0 -1
- package/dist/node/components/Button/lib/IconSize.d.mts +0 -2
- package/dist/node/components/Button/lib/IconSize.d.mts.map +0 -1
- package/dist/node/components/Button/lib/IconSize.d.ts +0 -2
- package/dist/node/components/Button/lib/IconSize.d.ts.map +0 -1
- package/dist/node/components/Button/lib/index.d.cts +0 -3
- package/dist/node/components/Button/lib/index.d.cts.map +0 -1
- package/dist/node/components/Button/lib/index.d.mts +0 -3
- package/dist/node/components/Button/lib/index.d.mts.map +0 -1
- package/dist/node/components/Button/lib/index.d.ts +0 -3
- package/dist/node/components/Button/lib/index.d.ts.map +0 -1
- package/dist/node/components/Button/lib/presetIconSize.d.cts +0 -3
- package/dist/node/components/Button/lib/presetIconSize.d.cts.map +0 -1
- package/dist/node/components/Button/lib/presetIconSize.d.mts +0 -3
- package/dist/node/components/Button/lib/presetIconSize.d.mts.map +0 -1
- package/dist/node/components/Button/lib/presetIconSize.d.ts +0 -3
- package/dist/node/components/Button/lib/presetIconSize.d.ts.map +0 -1
- package/dist/node/components/img/index.d.cts +0 -4
- package/dist/node/components/img/index.d.cts.map +0 -1
- package/dist/node/components/img/index.d.mts +0 -4
- package/dist/node/components/img/index.d.mts.map +0 -1
- package/dist/node/components/img/index.d.ts +0 -4
- package/dist/node/components/img/index.d.ts.map +0 -1
- package/dist/node/components/index.d.cts +0 -4
- package/dist/node/components/index.d.cts.map +0 -1
- package/dist/node/components/index.d.mts +0 -4
- package/dist/node/components/index.d.mts.map +0 -1
- package/dist/node/components/index.d.ts +0 -4
- package/dist/node/components/index.d.ts.map +0 -1
- package/dist/node/components/shared/Dialog/JsonViewerCollapse.d.cts +0 -8
- package/dist/node/components/shared/Dialog/JsonViewerCollapse.d.cts.map +0 -1
- package/dist/node/components/shared/Dialog/JsonViewerCollapse.d.mts +0 -8
- package/dist/node/components/shared/Dialog/JsonViewerCollapse.d.mts.map +0 -1
- package/dist/node/components/shared/Dialog/JsonViewerCollapse.d.ts +0 -8
- package/dist/node/components/shared/Dialog/JsonViewerCollapse.d.ts.map +0 -1
- package/dist/node/components/shared/Dialog/RawInfoDialog.d.cts +0 -11
- package/dist/node/components/shared/Dialog/RawInfoDialog.d.cts.map +0 -1
- package/dist/node/components/shared/Dialog/RawInfoDialog.d.mts +0 -11
- package/dist/node/components/shared/Dialog/RawInfoDialog.d.mts.map +0 -1
- package/dist/node/components/shared/Dialog/RawInfoDialog.d.ts +0 -11
- package/dist/node/components/shared/Dialog/RawInfoDialog.d.ts.map +0 -1
- package/dist/node/components/shared/Dialog/index.d.cts +0 -3
- package/dist/node/components/shared/Dialog/index.d.cts.map +0 -1
- package/dist/node/components/shared/Dialog/index.d.mts +0 -3
- package/dist/node/components/shared/Dialog/index.d.mts.map +0 -1
- package/dist/node/components/shared/Dialog/index.d.ts +0 -3
- package/dist/node/components/shared/Dialog/index.d.ts.map +0 -1
- package/dist/node/components/shared/JsonViewerEx.d.cts +0 -4
- package/dist/node/components/shared/JsonViewerEx.d.cts.map +0 -1
- package/dist/node/components/shared/JsonViewerEx.d.mts +0 -4
- package/dist/node/components/shared/JsonViewerEx.d.mts.map +0 -1
- package/dist/node/components/shared/JsonViewerEx.d.ts +0 -4
- package/dist/node/components/shared/JsonViewerEx.d.ts.map +0 -1
- package/dist/node/components/shared/index.d.cts +0 -3
- package/dist/node/components/shared/index.d.cts.map +0 -1
- package/dist/node/components/shared/index.d.mts +0 -3
- package/dist/node/components/shared/index.d.mts.map +0 -1
- package/dist/node/components/shared/index.d.ts +0 -3
- package/dist/node/components/shared/index.d.ts.map +0 -1
- package/dist/node/components/styled/StyledChipLabel.d.cts +0 -4
- package/dist/node/components/styled/StyledChipLabel.d.cts.map +0 -1
- package/dist/node/components/styled/StyledChipLabel.d.mts +0 -4
- package/dist/node/components/styled/StyledChipLabel.d.mts.map +0 -1
- package/dist/node/components/styled/StyledChipLabel.d.ts +0 -4
- package/dist/node/components/styled/StyledChipLabel.d.ts.map +0 -1
- package/dist/node/components/styled/index.d.cts +0 -2
- package/dist/node/components/styled/index.d.cts.map +0 -1
- package/dist/node/components/styled/index.d.mts +0 -2
- package/dist/node/components/styled/index.d.mts.map +0 -1
- package/dist/node/components/styled/index.d.ts +0 -2
- package/dist/node/components/styled/index.d.ts.map +0 -1
- package/dist/node/index.cjs +0 -282
- package/dist/node/index.cjs.map +0 -1
- package/dist/node/index.d.cts +0 -2
- package/dist/node/index.d.cts.map +0 -1
- package/dist/node/index.d.mts +0 -2
- package/dist/node/index.d.mts.map +0 -1
- package/dist/node/index.d.ts +0 -2
- package/dist/node/index.d.ts.map +0 -1
- package/dist/node/index.js +0 -250
- package/dist/node/index.js.map +0 -1
- package/dist/node/lib/ExpansionProps.d.cts +0 -5
- package/dist/node/lib/ExpansionProps.d.cts.map +0 -1
- package/dist/node/lib/ExpansionProps.d.mts +0 -5
- package/dist/node/lib/ExpansionProps.d.mts.map +0 -1
- package/dist/node/lib/ExpansionProps.d.ts +0 -5
- package/dist/node/lib/ExpansionProps.d.ts.map +0 -1
- package/dist/node/lib/index.d.cts +0 -2
- package/dist/node/lib/index.d.cts.map +0 -1
- package/dist/node/lib/index.d.mts +0 -2
- package/dist/node/lib/index.d.mts.map +0 -1
- package/dist/node/lib/index.d.ts +0 -2
- package/dist/node/lib/index.d.ts.map +0 -1
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,2 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ButtonExProps } from '@xylabs/react-button';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default, { ReactNode } from 'react';
|
|
4
|
+
import * as _mui_material from '@mui/material';
|
|
5
|
+
import { IconButtonProps, CollapseProps, DialogProps } from '@mui/material';
|
|
6
|
+
import { JsonValue } from '@xylabs/object';
|
|
7
|
+
import { JsonViewerProps } from '@textea/json-viewer';
|
|
8
|
+
import * as _emotion_styled from '@emotion/styled';
|
|
9
|
+
import * as _mui_system from '@mui/system';
|
|
10
|
+
import * as _mui_material_OverridableComponent_js from '@mui/material/OverridableComponent.js';
|
|
11
|
+
|
|
12
|
+
interface ExpansionProps {
|
|
13
|
+
defaultExpandedJson?: boolean;
|
|
14
|
+
updateExpandedJson?: (expanded: boolean) => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type IconSize = 'small' | 'medium' | 'large';
|
|
18
|
+
|
|
19
|
+
interface RawInfoButtonProps extends ButtonExProps, ExpansionProps {
|
|
20
|
+
dialogContent?: ReactNode;
|
|
21
|
+
iconOnly?: boolean;
|
|
22
|
+
iconSize?: number;
|
|
23
|
+
onCloseCallback?: () => void;
|
|
24
|
+
presetIconSize?: IconSize;
|
|
25
|
+
rawValue?: unknown;
|
|
26
|
+
}
|
|
27
|
+
declare const RawInfoButton: React__default.FC<RawInfoButtonProps>;
|
|
28
|
+
|
|
29
|
+
interface RawInfoIconProps extends IconButtonProps, ExpansionProps {
|
|
30
|
+
dialogContent?: ReactNode;
|
|
31
|
+
iconOnly?: boolean;
|
|
32
|
+
iconSize?: number;
|
|
33
|
+
onCloseCallback?: () => void;
|
|
34
|
+
presetIconSize?: IconSize;
|
|
35
|
+
rawValue?: unknown;
|
|
36
|
+
}
|
|
37
|
+
declare const RawInfoIconButton: React__default.ForwardRefExoticComponent<Omit<RawInfoIconProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
38
|
+
|
|
39
|
+
interface RawInfoPayloadCollapse extends CollapseProps, ExpansionProps {
|
|
40
|
+
jsonValue?: JsonValue;
|
|
41
|
+
}
|
|
42
|
+
declare const JsonViewerCollapse: React__default.FC<RawInfoPayloadCollapse>;
|
|
43
|
+
|
|
44
|
+
interface RawInfoDialogProps extends DialogProps, ExpansionProps {
|
|
45
|
+
dialogContent?: ReactNode;
|
|
46
|
+
jsonValue?: JsonValue;
|
|
47
|
+
onCloseCallback?: () => void;
|
|
48
|
+
}
|
|
49
|
+
declare const RawInfoDialog: React__default.FC<RawInfoDialogProps>;
|
|
50
|
+
|
|
51
|
+
type JsonViewerExProps = JsonViewerProps;
|
|
52
|
+
declare const JsonViewerEx: React__default.FC<JsonViewerExProps>;
|
|
53
|
+
|
|
54
|
+
declare const StyledChipLabel: _emotion_styled.StyledComponent<Pick<_mui_material.TypographyOwnProps & _mui_material_OverridableComponent_js.CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
55
|
+
ref?: ((instance: HTMLSpanElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
56
|
+
}, "className" | "style" | "classes" | "p" | "color" | "children" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "sx" | "variant" | "variantMapping">, "ref" | "className" | "style" | "classes" | "p" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "sx" | "variant" | "variantMapping"> & _mui_system.MUIStyledCommonProps<_mui_material.Theme>, {}, {}>;
|
|
57
|
+
|
|
58
|
+
export { JsonViewerCollapse, JsonViewerEx, type JsonViewerExProps, RawInfoButton, type RawInfoButtonProps, RawInfoDialog, type RawInfoDialogProps, RawInfoIconButton, type RawInfoIconProps, type RawInfoPayloadCollapse, StyledChipLabel };
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/components/Button/RawInfoButton.tsx
|
|
5
|
+
import { toJson } from "@xylabs/object";
|
|
6
|
+
import { ButtonEx } from "@xylabs/react-button";
|
|
7
|
+
import React5, { useMemo, useState } from "react";
|
|
8
|
+
|
|
9
|
+
// src/components/img/index.tsx
|
|
10
|
+
import { createSvgIcon } from "@mui/material";
|
|
11
|
+
import React from "react";
|
|
12
|
+
var XyoColorLogo = createSvgIcon(/* @__PURE__ */ React.createElement("svg", {
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
viewBox: "0 0 256 238"
|
|
15
|
+
}, /* @__PURE__ */ React.createElement("path", {
|
|
16
|
+
className: "cls-1",
|
|
17
|
+
d: "M74.5,28.33,21.29,120.5,74.5,212.67H180.94l1.76-3,51.46-89.13L180.94,28.33ZM84.65,40.54h78.83L111.65,56.93a15.85,15.85,0,0,1,2,5l59.66-18.81L185.22,101a20.12,20.12,0,0,1,5.36-.78l-10-47.91,37.87,65.53h-7.62a24.21,24.21,0,0,1,.15,2.68,23.29,23.29,0,0,1-.15,2.68h7.62l-39.1,67.75,10.92-50.13A20.57,20.57,0,0,1,185,140l-12.88,59-58.37-19.53a17.61,17.61,0,0,1-1.7,5l47.5,15.92H84.65l4-6.85A20.17,20.17,0,0,1,83.93,191L80,197.78,42.67,133.13l37,32.66a20.52,20.52,0,0,1,3.6-4L36.69,120.66,85,77.79a17.45,17.45,0,0,1-3.19-4.32l-39.46,35L80,43.22l5.56,9.69A17.51,17.51,0,0,1,90.12,50Zm28.24,31.17a16.15,16.15,0,0,1-2.68,4.64l62,35.81a19.74,19.74,0,0,1,2.83-4.54Zm-20,10.51v75.33a18,18,0,0,1,2.47-.16,17.18,17.18,0,0,1,2.89.21v-75a11.21,11.21,0,0,1-1.29,0,17.57,17.57,0,0,1-4.07-.47Zm79.34,46.63-62.08,35.81a18.45,18.45,0,0,1,2.68,4.68l62.23-36a19.68,19.68,0,0,1-2.83-4.53Z",
|
|
18
|
+
fill: "#8d8fc6"
|
|
19
|
+
}), /* @__PURE__ */ React.createElement("path", {
|
|
20
|
+
className: "cls-2",
|
|
21
|
+
d: "M97,48.58a17.06,17.06,0,1,0,17,17,17.08,17.08,0,0,0-17-17Zm0,5.36a11.7,11.7,0,1,1-11.7,11.69A11.65,11.65,0,0,1,97,53.94Z",
|
|
22
|
+
fill: "#579fd6"
|
|
23
|
+
}), /* @__PURE__ */ React.createElement("path", {
|
|
24
|
+
className: "cls-3",
|
|
25
|
+
d: "M95.37,157.39a18.73,18.73,0,1,0,18.7,18.7,18.74,18.74,0,0,0-18.7-18.7Zm0,5.31A13.4,13.4,0,1,1,82,176.09a13.37,13.37,0,0,1,13.4-13.39Z",
|
|
26
|
+
fill: "#f27046"
|
|
27
|
+
}), /* @__PURE__ */ React.createElement("path", {
|
|
28
|
+
className: "cls-4",
|
|
29
|
+
d: "M190.73,100.2A20.3,20.3,0,1,0,211,120.5a20.34,20.34,0,0,0-20.3-20.3Zm0,5.36a14.94,14.94,0,1,1-14.94,14.94,14.88,14.88,0,0,1,14.94-14.94Z",
|
|
30
|
+
fill: "#eb407a"
|
|
31
|
+
})), "XyoColorLogo");
|
|
32
|
+
|
|
33
|
+
// src/components/shared/Dialog/JsonViewerCollapse.tsx
|
|
34
|
+
import { Button, Chip, Collapse, Typography as Typography2 } from "@mui/material";
|
|
35
|
+
import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
|
|
36
|
+
import { usePromise } from "@xylabs/react-promise";
|
|
37
|
+
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
38
|
+
import { isAnyPayload } from "@xyo-network/payload-model";
|
|
39
|
+
import { useDataState } from "@xyo-network/react-shared";
|
|
40
|
+
import React3 from "react";
|
|
41
|
+
|
|
42
|
+
// src/components/styled/StyledChipLabel.tsx
|
|
43
|
+
import { styled, Typography } from "@mui/material";
|
|
44
|
+
var StyledChipLabel = styled(Typography, {
|
|
45
|
+
name: "StyledChipLabel"
|
|
46
|
+
})(({ theme }) => ({
|
|
47
|
+
display: "block",
|
|
48
|
+
lineHeight: 1,
|
|
49
|
+
overflow: "hidden",
|
|
50
|
+
paddingRight: theme.spacing(0.95),
|
|
51
|
+
textOverflow: "ellipsis",
|
|
52
|
+
whiteSpace: "nowrap"
|
|
53
|
+
}));
|
|
54
|
+
|
|
55
|
+
// src/components/shared/JsonViewerEx.tsx
|
|
56
|
+
import { useTheme } from "@mui/material";
|
|
57
|
+
import { JsonViewer } from "@textea/json-viewer";
|
|
58
|
+
import { useColorSchemeEx } from "@xylabs/react-invertible-theme";
|
|
59
|
+
import React2 from "react";
|
|
60
|
+
var JsonViewerEx = /* @__PURE__ */ __name((props) => {
|
|
61
|
+
const theme = useTheme();
|
|
62
|
+
const { darkMode } = useColorSchemeEx();
|
|
63
|
+
return /* @__PURE__ */ React2.createElement(JsonViewer, {
|
|
64
|
+
theme: darkMode ? "dark" : "light",
|
|
65
|
+
collapseStringsAfterLength: 50,
|
|
66
|
+
style: {
|
|
67
|
+
background: darkMode ? theme.palette.background.paper : theme.palette.grey[200],
|
|
68
|
+
borderRadius: theme.shape.borderRadius,
|
|
69
|
+
padding: theme.spacing(2)
|
|
70
|
+
},
|
|
71
|
+
...props
|
|
72
|
+
});
|
|
73
|
+
}, "JsonViewerEx");
|
|
74
|
+
|
|
75
|
+
// src/components/shared/Dialog/JsonViewerCollapse.tsx
|
|
76
|
+
var JsonViewerCollapse = /* @__PURE__ */ __name(({ defaultExpandedJson, jsonValue, updateExpandedJson, ...props }) => {
|
|
77
|
+
const [expandedJson, setExpandedJson] = useDataState(defaultExpandedJson);
|
|
78
|
+
const [hash] = usePromise(async () => {
|
|
79
|
+
if (!jsonValue || !isAnyPayload(jsonValue)) return;
|
|
80
|
+
return await PayloadBuilder.dataHash(jsonValue);
|
|
81
|
+
}, [
|
|
82
|
+
jsonValue
|
|
83
|
+
]);
|
|
84
|
+
const actionText = expandedJson ? "Hide JSON" : "Show JSON";
|
|
85
|
+
const handleExpansion = /* @__PURE__ */ __name(() => {
|
|
86
|
+
updateExpandedJson?.(!expandedJson);
|
|
87
|
+
setExpandedJson(!expandedJson);
|
|
88
|
+
}, "handleExpansion");
|
|
89
|
+
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, jsonValue ? /* @__PURE__ */ React3.createElement(FlexRow, null, /* @__PURE__ */ React3.createElement(Button, {
|
|
90
|
+
onClick: handleExpansion,
|
|
91
|
+
size: "small",
|
|
92
|
+
variant: "outlined"
|
|
93
|
+
}, actionText)) : null, /* @__PURE__ */ React3.createElement(Collapse, {
|
|
94
|
+
in: expandedJson,
|
|
95
|
+
...props
|
|
96
|
+
}, jsonValue ? /* @__PURE__ */ React3.createElement(FlexCol, {
|
|
97
|
+
alignItems: "stretch",
|
|
98
|
+
gap: 1.5
|
|
99
|
+
}, /* @__PURE__ */ React3.createElement(Typography2, {
|
|
100
|
+
sx: {
|
|
101
|
+
lineHeight: 1
|
|
102
|
+
}
|
|
103
|
+
}, "Payload Hash:"), hash ? /* @__PURE__ */ React3.createElement(Chip, {
|
|
104
|
+
label: /* @__PURE__ */ React3.createElement(StyledChipLabel, null, hash),
|
|
105
|
+
sx: {
|
|
106
|
+
alignSelf: "start"
|
|
107
|
+
}
|
|
108
|
+
}) : null, /* @__PURE__ */ React3.createElement(JsonViewerEx, {
|
|
109
|
+
value: jsonValue
|
|
110
|
+
})) : null));
|
|
111
|
+
}, "JsonViewerCollapse");
|
|
112
|
+
|
|
113
|
+
// src/components/shared/Dialog/RawInfoDialog.tsx
|
|
114
|
+
import { Button as Button2, Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
|
|
115
|
+
import React4 from "react";
|
|
116
|
+
var RawInfoDialog = /* @__PURE__ */ __name(({ defaultExpandedJson, dialogContent, onCloseCallback, jsonValue: jsonObject, updateExpandedJson, open = false, ...props }) => {
|
|
117
|
+
const onDialogClick = /* @__PURE__ */ __name((event) => {
|
|
118
|
+
event.stopPropagation();
|
|
119
|
+
}, "onDialogClick");
|
|
120
|
+
return (
|
|
121
|
+
// Wrapping in a span so we can catch click events and prevent them from propagating outside the component
|
|
122
|
+
/* @__PURE__ */ React4.createElement("span", {
|
|
123
|
+
onClick: onDialogClick
|
|
124
|
+
}, /* @__PURE__ */ React4.createElement(Dialog, {
|
|
125
|
+
fullWidth: true,
|
|
126
|
+
maxWidth: "lg",
|
|
127
|
+
onClose: /* @__PURE__ */ __name(() => onCloseCallback?.(), "onClose"),
|
|
128
|
+
open,
|
|
129
|
+
...props
|
|
130
|
+
}, /* @__PURE__ */ React4.createElement(DialogTitle, null, "Raw Data"), /* @__PURE__ */ React4.createElement(DialogContent, {
|
|
131
|
+
sx: {
|
|
132
|
+
display: "flex",
|
|
133
|
+
flexDirection: "column",
|
|
134
|
+
gap: 2
|
|
135
|
+
}
|
|
136
|
+
}, dialogContent, /* @__PURE__ */ React4.createElement(JsonViewerCollapse, {
|
|
137
|
+
defaultExpandedJson,
|
|
138
|
+
jsonValue: jsonObject,
|
|
139
|
+
updateExpandedJson
|
|
140
|
+
})), /* @__PURE__ */ React4.createElement(DialogActions, null, /* @__PURE__ */ React4.createElement(Button2, {
|
|
141
|
+
variant: "contained",
|
|
142
|
+
onClick: /* @__PURE__ */ __name(() => onCloseCallback?.(), "onClick")
|
|
143
|
+
}, "Close"))))
|
|
144
|
+
);
|
|
145
|
+
}, "RawInfoDialog");
|
|
146
|
+
|
|
147
|
+
// src/components/Button/lib/presetIconSize.ts
|
|
148
|
+
var presetIconSizeValue = /* @__PURE__ */ __name((size) => {
|
|
149
|
+
switch (size) {
|
|
150
|
+
case "small": {
|
|
151
|
+
return 16;
|
|
152
|
+
}
|
|
153
|
+
case "medium": {
|
|
154
|
+
return 32;
|
|
155
|
+
}
|
|
156
|
+
case "large": {
|
|
157
|
+
return 48;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}, "presetIconSizeValue");
|
|
161
|
+
|
|
162
|
+
// src/components/Button/RawInfoButton.tsx
|
|
163
|
+
var RawInfoButton = /* @__PURE__ */ __name(({ defaultExpandedJson = true, dialogContent, iconOnly, iconSize = 24, onCloseCallback, children, rawValue, presetIconSize, updateExpandedJson, ...props }) => {
|
|
164
|
+
const [open, setOpen] = useState(false);
|
|
165
|
+
const size = presetIconSizeValue(presetIconSize);
|
|
166
|
+
const json = useMemo(() => toJson(rawValue), [
|
|
167
|
+
rawValue
|
|
168
|
+
]);
|
|
169
|
+
const handleClick = /* @__PURE__ */ __name((event) => {
|
|
170
|
+
event.stopPropagation();
|
|
171
|
+
setOpen(true);
|
|
172
|
+
}, "handleClick");
|
|
173
|
+
const onCloseCallBackWrapped = /* @__PURE__ */ __name(() => {
|
|
174
|
+
setOpen(false);
|
|
175
|
+
onCloseCallback?.();
|
|
176
|
+
}, "onCloseCallBackWrapped");
|
|
177
|
+
return /* @__PURE__ */ React5.createElement("span", null, /* @__PURE__ */ React5.createElement(ButtonEx, {
|
|
178
|
+
variant: "outlined",
|
|
179
|
+
size: "small",
|
|
180
|
+
startIcon: /* @__PURE__ */ React5.createElement(XyoColorLogo, {
|
|
181
|
+
sx: {
|
|
182
|
+
height: size ?? iconSize,
|
|
183
|
+
width: size ?? iconSize
|
|
184
|
+
}
|
|
185
|
+
}),
|
|
186
|
+
onClick: handleClick,
|
|
187
|
+
disabled: iconOnly ? false : !rawValue,
|
|
188
|
+
...props
|
|
189
|
+
}, children ?? /* @__PURE__ */ React5.createElement("span", null, "Data")), iconOnly ? null : /* @__PURE__ */ React5.createElement(RawInfoDialog, {
|
|
190
|
+
defaultExpandedJson,
|
|
191
|
+
jsonValue: json,
|
|
192
|
+
onCloseCallback: onCloseCallBackWrapped,
|
|
193
|
+
dialogContent,
|
|
194
|
+
open,
|
|
195
|
+
updateExpandedJson
|
|
196
|
+
}));
|
|
197
|
+
}, "RawInfoButton");
|
|
198
|
+
|
|
199
|
+
// src/components/Button/RawInfoIconButton.tsx
|
|
200
|
+
import { IconButton } from "@mui/material";
|
|
201
|
+
import { toJson as toJson2 } from "@xylabs/object";
|
|
202
|
+
import React6, { forwardRef, useMemo as useMemo2, useState as useState2 } from "react";
|
|
203
|
+
var RawInfoIconButton = /* @__PURE__ */ forwardRef(({ defaultExpandedJson = true, dialogContent, iconOnly, iconSize = 32, onCloseCallback, rawValue, presetIconSize, updateExpandedJson, ...props }, ref) => {
|
|
204
|
+
const [open, setOpen] = useState2(false);
|
|
205
|
+
const size = presetIconSizeValue(presetIconSize);
|
|
206
|
+
const json = useMemo2(() => toJson2(rawValue), [
|
|
207
|
+
rawValue
|
|
208
|
+
]);
|
|
209
|
+
const handleClick = /* @__PURE__ */ __name((event) => {
|
|
210
|
+
event.stopPropagation();
|
|
211
|
+
setOpen(true);
|
|
212
|
+
}, "handleClick");
|
|
213
|
+
const onCloseCallBackWrapped = /* @__PURE__ */ __name(() => {
|
|
214
|
+
setOpen(false);
|
|
215
|
+
onCloseCallback?.();
|
|
216
|
+
}, "onCloseCallBackWrapped");
|
|
217
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(IconButton, {
|
|
218
|
+
onClick: handleClick,
|
|
219
|
+
ref,
|
|
220
|
+
...props
|
|
221
|
+
}, /* @__PURE__ */ React6.createElement(XyoColorLogo, {
|
|
222
|
+
sx: {
|
|
223
|
+
height: size ?? iconSize,
|
|
224
|
+
width: size ?? iconSize
|
|
225
|
+
}
|
|
226
|
+
})), iconOnly ? null : /* @__PURE__ */ React6.createElement(RawInfoDialog, {
|
|
227
|
+
defaultExpandedJson,
|
|
228
|
+
jsonValue: json,
|
|
229
|
+
onCloseCallback: onCloseCallBackWrapped,
|
|
230
|
+
dialogContent,
|
|
231
|
+
open,
|
|
232
|
+
updateExpandedJson
|
|
233
|
+
}));
|
|
234
|
+
});
|
|
235
|
+
RawInfoIconButton.displayName = "RawInfoIcon";
|
|
236
|
+
export {
|
|
237
|
+
JsonViewerCollapse,
|
|
238
|
+
JsonViewerEx,
|
|
239
|
+
RawInfoButton,
|
|
240
|
+
RawInfoDialog,
|
|
241
|
+
RawInfoIconButton,
|
|
242
|
+
StyledChipLabel
|
|
243
|
+
};
|
|
244
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Button/RawInfoButton.tsx","../../src/components/img/index.tsx","../../src/components/shared/Dialog/JsonViewerCollapse.tsx","../../src/components/styled/StyledChipLabel.tsx","../../src/components/shared/JsonViewerEx.tsx","../../src/components/shared/Dialog/RawInfoDialog.tsx","../../src/components/Button/lib/presetIconSize.ts","../../src/components/Button/RawInfoIconButton.tsx"],"sourcesContent":["import { toJson } from '@xylabs/object'\nimport { ButtonEx, ButtonExProps } from '@xylabs/react-button'\nimport React, { MouseEventHandler, ReactNode, useMemo, useState } from 'react'\n\nimport { ExpansionProps } from '../../lib/index.ts'\nimport { XyoColorLogo } from '../img/index.tsx'\nimport { RawInfoDialog } from '../shared/index.ts'\nimport { IconSize, presetIconSizeValue } from './lib/index.ts'\n\nexport interface RawInfoButtonProps extends ButtonExProps, ExpansionProps {\n dialogContent?: ReactNode\n iconOnly?: boolean\n iconSize?: number\n onCloseCallback?: () => void\n presetIconSize?: IconSize\n rawValue?: unknown\n}\n\nexport const RawInfoButton: React.FC<RawInfoButtonProps> = ({\n defaultExpandedJson = true,\n dialogContent,\n iconOnly,\n iconSize = 24,\n onCloseCallback,\n children,\n rawValue,\n presetIconSize,\n updateExpandedJson,\n ...props\n}) => {\n const [open, setOpen] = useState(false)\n const size = presetIconSizeValue(presetIconSize)\n const json = useMemo(() => toJson(rawValue), [rawValue])\n\n const handleClick: MouseEventHandler<HTMLButtonElement> = (event) => {\n event.stopPropagation()\n setOpen(true)\n }\n\n const onCloseCallBackWrapped = () => {\n setOpen(false)\n onCloseCallback?.()\n }\n\n return (\n <span>\n <ButtonEx\n variant=\"outlined\"\n size=\"small\"\n startIcon={<XyoColorLogo sx={{ height: size ?? iconSize, width: size ?? iconSize }} />}\n onClick={handleClick}\n disabled={iconOnly ? false : !rawValue}\n {...props}\n >\n {children ?? <span>Data</span>}\n </ButtonEx>\n {iconOnly\n ? null\n : (\n <RawInfoDialog\n defaultExpandedJson={defaultExpandedJson}\n jsonValue={json}\n onCloseCallback={onCloseCallBackWrapped}\n dialogContent={dialogContent}\n open={open}\n updateExpandedJson={updateExpandedJson}\n />\n )}\n </span>\n )\n}\n","import { createSvgIcon } from '@mui/material'\nimport React from 'react'\n\nexport const XyoColorLogo = createSvgIcon(\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 238\">\n <path\n className=\"cls-1\"\n d=\"M74.5,28.33,21.29,120.5,74.5,212.67H180.94l1.76-3,51.46-89.13L180.94,28.33ZM84.65,40.54h78.83L111.65,56.93a15.85,15.85,0,0,1,2,5l59.66-18.81L185.22,101a20.12,20.12,0,0,1,5.36-.78l-10-47.91,37.87,65.53h-7.62a24.21,24.21,0,0,1,.15,2.68,23.29,23.29,0,0,1-.15,2.68h7.62l-39.1,67.75,10.92-50.13A20.57,20.57,0,0,1,185,140l-12.88,59-58.37-19.53a17.61,17.61,0,0,1-1.7,5l47.5,15.92H84.65l4-6.85A20.17,20.17,0,0,1,83.93,191L80,197.78,42.67,133.13l37,32.66a20.52,20.52,0,0,1,3.6-4L36.69,120.66,85,77.79a17.45,17.45,0,0,1-3.19-4.32l-39.46,35L80,43.22l5.56,9.69A17.51,17.51,0,0,1,90.12,50Zm28.24,31.17a16.15,16.15,0,0,1-2.68,4.64l62,35.81a19.74,19.74,0,0,1,2.83-4.54Zm-20,10.51v75.33a18,18,0,0,1,2.47-.16,17.18,17.18,0,0,1,2.89.21v-75a11.21,11.21,0,0,1-1.29,0,17.57,17.57,0,0,1-4.07-.47Zm79.34,46.63-62.08,35.81a18.45,18.45,0,0,1,2.68,4.68l62.23-36a19.68,19.68,0,0,1-2.83-4.53Z\"\n fill=\"#8d8fc6\"\n />\n <path\n className=\"cls-2\"\n d=\"M97,48.58a17.06,17.06,0,1,0,17,17,17.08,17.08,0,0,0-17-17Zm0,5.36a11.7,11.7,0,1,1-11.7,11.69A11.65,11.65,0,0,1,97,53.94Z\"\n fill=\"#579fd6\"\n />\n <path\n className=\"cls-3\"\n d=\"M95.37,157.39a18.73,18.73,0,1,0,18.7,18.7,18.74,18.74,0,0,0-18.7-18.7Zm0,5.31A13.4,13.4,0,1,1,82,176.09a13.37,13.37,0,0,1,13.4-13.39Z\"\n fill=\"#f27046\"\n />\n <path\n className=\"cls-4\"\n d=\"M190.73,100.2A20.3,20.3,0,1,0,211,120.5a20.34,20.34,0,0,0-20.3-20.3Zm0,5.36a14.94,14.94,0,1,1-14.94,14.94,14.88,14.88,0,0,1,14.94-14.94Z\"\n fill=\"#eb407a\"\n />\n </svg>,\n 'XyoColorLogo',\n)\n","import { Button, Chip, Collapse, CollapseProps, Typography } from '@mui/material'\nimport { JsonValue } from '@xylabs/object'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { usePromise } from '@xylabs/react-promise'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { isAnyPayload } from '@xyo-network/payload-model'\nimport { useDataState } from '@xyo-network/react-shared'\nimport React from 'react'\n\nimport { ExpansionProps } from '../../../lib/index.ts'\nimport { StyledChipLabel } from '../../styled/index.ts'\nimport { JsonViewerEx } from '../JsonViewerEx.tsx'\n\nexport interface RawInfoPayloadCollapse extends CollapseProps, ExpansionProps {\n jsonValue?: JsonValue\n}\n\nexport const JsonViewerCollapse: React.FC<RawInfoPayloadCollapse> = ({ defaultExpandedJson, jsonValue, updateExpandedJson, ...props }) => {\n const [expandedJson, setExpandedJson] = useDataState(defaultExpandedJson)\n\n const [hash] = usePromise(async () => {\n if (!jsonValue || !isAnyPayload(jsonValue)) return\n return await PayloadBuilder.dataHash(jsonValue)\n }, [jsonValue])\n\n const actionText = expandedJson ? 'Hide JSON' : 'Show JSON'\n\n const handleExpansion = () => {\n updateExpandedJson?.(!expandedJson)\n setExpandedJson(!expandedJson)\n }\n\n return (\n <>\n {jsonValue\n ? (\n <FlexRow>\n <Button onClick={handleExpansion} size=\"small\" variant=\"outlined\">\n {actionText}\n </Button>\n </FlexRow>\n )\n : null}\n <Collapse in={expandedJson} {...props}>\n {jsonValue\n ? (\n <FlexCol alignItems=\"stretch\" gap={1.5}>\n <Typography sx={{ lineHeight: 1 }}>Payload Hash:</Typography>\n {hash\n ? <Chip label={<StyledChipLabel>{hash}</StyledChipLabel>} sx={{ alignSelf: 'start' }} />\n : null}\n <JsonViewerEx value={jsonValue} />\n </FlexCol>\n )\n : null}\n </Collapse>\n </>\n )\n}\n","import { styled, Typography } from '@mui/material'\n\nexport const StyledChipLabel = styled(Typography, { name: 'StyledChipLabel' })(({ theme }) => ({\n display: 'block',\n lineHeight: 1,\n overflow: 'hidden',\n paddingRight: theme.spacing(0.95),\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n}))\n","import { useTheme } from '@mui/material'\nimport { JsonViewer, JsonViewerProps } from '@textea/json-viewer'\nimport { useColorSchemeEx } from '@xylabs/react-invertible-theme'\nimport React from 'react'\n\nexport type JsonViewerExProps = JsonViewerProps\n\nexport const JsonViewerEx: React.FC<JsonViewerExProps> = (props) => {\n const theme = useTheme()\n const { darkMode } = useColorSchemeEx()\n\n return (\n <JsonViewer\n theme={darkMode ? 'dark' : 'light'}\n collapseStringsAfterLength={50}\n style={{\n background: darkMode ? theme.palette.background.paper : theme.palette.grey[200],\n borderRadius: theme.shape.borderRadius,\n padding: theme.spacing(2),\n }}\n {...props}\n />\n )\n}\n","import { Button, Dialog, DialogActions, DialogContent, DialogProps, DialogTitle } from '@mui/material'\nimport { JsonValue } from '@xylabs/object'\nimport React, { MouseEventHandler, ReactNode } from 'react'\n\nimport { ExpansionProps } from '../../../lib/index.ts'\nimport { JsonViewerCollapse } from './JsonViewerCollapse.tsx'\n\nexport interface RawInfoDialogProps extends DialogProps, ExpansionProps {\n dialogContent?: ReactNode\n jsonValue?: JsonValue\n onCloseCallback?: () => void\n}\n\nexport const RawInfoDialog: React.FC<RawInfoDialogProps> = ({\n defaultExpandedJson,\n dialogContent,\n onCloseCallback,\n jsonValue: jsonObject,\n updateExpandedJson,\n open = false,\n ...props\n}) => {\n const onDialogClick: MouseEventHandler<HTMLSpanElement> = (event) => {\n event.stopPropagation()\n }\n\n return (\n // Wrapping in a span so we can catch click events and prevent them from propagating outside the component\n <span onClick={onDialogClick}>\n <Dialog fullWidth maxWidth=\"lg\" onClose={() => onCloseCallback?.()} open={open} {...props}>\n <DialogTitle>Raw Data</DialogTitle>\n <DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>\n {dialogContent}\n <JsonViewerCollapse defaultExpandedJson={defaultExpandedJson} jsonValue={jsonObject} updateExpandedJson={updateExpandedJson} />\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" onClick={() => onCloseCallback?.()}>\n Close\n </Button>\n </DialogActions>\n </Dialog>\n </span>\n )\n}\n","import { IconSize } from './IconSize.ts'\n\nexport const presetIconSizeValue = (size?: IconSize) => {\n switch (size) {\n case 'small': {\n return 16\n }\n case 'medium': {\n return 32\n }\n case 'large': {\n return 48\n }\n }\n}\n","import { IconButton, IconButtonProps } from '@mui/material'\nimport { toJson } from '@xylabs/object'\nimport React, { forwardRef, MouseEventHandler, ReactNode, useMemo, useState } from 'react'\n\nimport { ExpansionProps } from '../../lib/index.ts'\nimport { XyoColorLogo } from '../img/index.tsx'\nimport { RawInfoDialog } from '../shared/index.ts'\nimport { IconSize, presetIconSizeValue } from './lib/index.ts'\n\nexport interface RawInfoIconProps extends IconButtonProps, ExpansionProps {\n dialogContent?: ReactNode\n iconOnly?: boolean\n iconSize?: number\n onCloseCallback?: () => void\n presetIconSize?: IconSize\n rawValue?: unknown\n}\n\nexport const RawInfoIconButton = forwardRef<HTMLButtonElement, RawInfoIconProps>(\n (\n { defaultExpandedJson = true, dialogContent, iconOnly, iconSize = 32, onCloseCallback, rawValue, presetIconSize, updateExpandedJson, ...props },\n ref,\n ) => {\n const [open, setOpen] = useState(false)\n const size = presetIconSizeValue(presetIconSize)\n const json = useMemo(() => toJson(rawValue), [rawValue])\n\n const handleClick: MouseEventHandler<HTMLButtonElement> = (event) => {\n event.stopPropagation()\n setOpen(true)\n }\n\n const onCloseCallBackWrapped = () => {\n setOpen(false)\n onCloseCallback?.()\n }\n\n return (\n <>\n <IconButton onClick={handleClick} ref={ref} {...props}>\n <XyoColorLogo sx={{ height: size ?? iconSize, width: size ?? iconSize }} />\n </IconButton>\n {iconOnly\n ? null\n : (\n <RawInfoDialog\n defaultExpandedJson={defaultExpandedJson}\n jsonValue={json}\n onCloseCallback={onCloseCallBackWrapped}\n dialogContent={dialogContent}\n open={open}\n updateExpandedJson={updateExpandedJson}\n />\n )}\n </>\n )\n },\n)\n\nRawInfoIconButton.displayName = 'RawInfoIcon'\n"],"mappings":";;;;AAAA,SAASA,cAAc;AACvB,SAASC,gBAA+B;AACxC,OAAOC,UAAuCC,SAASC,gBAAgB;;;ACFvE,SAASC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GD;KAC9C,gBAAAc,OAAA,cAACG,cAAAA;IAAaC,IAAI;MAAEC,QAAQd,QAAQV;MAAUyB,OAAOf,QAAQV;IAAS;OAEvED,WACG,OAEE,gBAAAoB,OAAA,cAACO,eAAAA;IACC7B;IACA8B,WAAWf;IACXX,iBAAiBiB;IACjBpB;IACAS;IACAH;;AAKd,CAAA;AAGFT,kBAAkBiC,cAAc;","names":["toJson","ButtonEx","React","useMemo","useState","createSvgIcon","React","XyoColorLogo","svg","xmlns","viewBox","path","className","d","fill","Button","Chip","Collapse","Typography","FlexCol","FlexRow","usePromise","PayloadBuilder","isAnyPayload","useDataState","React","styled","Typography","StyledChipLabel","name","theme","display","lineHeight","overflow","paddingRight","spacing","textOverflow","whiteSpace","useTheme","JsonViewer","useColorSchemeEx","React","JsonViewerEx","props","theme","useTheme","darkMode","useColorSchemeEx","React","JsonViewer","collapseStringsAfterLength","style","background","palette","paper","grey","borderRadius","shape","padding","spacing","JsonViewerCollapse","defaultExpandedJson","jsonValue","updateExpandedJson","props","expandedJson","setExpandedJson","useDataState","hash","usePromise","isAnyPayload","PayloadBuilder","dataHash","actionText","handleExpansion","React","FlexRow","Button","onClick","size","variant","Collapse","in","FlexCol","alignItems","gap","Typography","sx","lineHeight","Chip","label","StyledChipLabel","alignSelf","JsonViewerEx","value","Button","Dialog","DialogActions","DialogContent","DialogTitle","React","RawInfoDialog","defaultExpandedJson","dialogContent","onCloseCallback","jsonValue","jsonObject","updateExpandedJson","open","props","onDialogClick","event","stopPropagation","React","span","onClick","Dialog","fullWidth","maxWidth","onClose","DialogTitle","DialogContent","sx","display","flexDirection","gap","JsonViewerCollapse","DialogActions","Button","variant","presetIconSizeValue","size","RawInfoButton","defaultExpandedJson","dialogContent","iconOnly","iconSize","onCloseCallback","children","rawValue","presetIconSize","updateExpandedJson","props","open","setOpen","useState","size","presetIconSizeValue","json","useMemo","toJson","handleClick","event","stopPropagation","onCloseCallBackWrapped","React","span","ButtonEx","variant","startIcon","XyoColorLogo","sx","height","width","onClick","disabled","RawInfoDialog","jsonValue","IconButton","toJson","React","forwardRef","useMemo","useState","RawInfoIconButton","forwardRef","defaultExpandedJson","dialogContent","iconOnly","iconSize","onCloseCallback","rawValue","presetIconSize","updateExpandedJson","props","ref","open","setOpen","useState","size","presetIconSizeValue","json","useMemo","toJson","handleClick","event","stopPropagation","onCloseCallBackWrapped","React","IconButton","onClick","XyoColorLogo","sx","height","width","RawInfoDialog","jsonValue","displayName"]}
|
package/package.json
CHANGED
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@textea/json-viewer": "^3.4.1",
|
|
14
|
-
"@xylabs/object": "^3.6.
|
|
15
|
-
"@xylabs/react-button": "^3.4.
|
|
16
|
-
"@xylabs/react-flexbox": "^3.4.
|
|
17
|
-
"@xylabs/react-invertible-theme": "^3.4.
|
|
18
|
-
"@xylabs/react-promise": "^3.4.
|
|
19
|
-
"@xyo-network/payload-builder": "^2.
|
|
20
|
-
"@xyo-network/payload-model": "^2.
|
|
21
|
-
"@xyo-network/react-shared": "^2.
|
|
14
|
+
"@xylabs/object": "^3.6.12",
|
|
15
|
+
"@xylabs/react-button": "^3.4.2",
|
|
16
|
+
"@xylabs/react-flexbox": "^3.4.2",
|
|
17
|
+
"@xylabs/react-invertible-theme": "^3.4.2",
|
|
18
|
+
"@xylabs/react-promise": "^3.4.2",
|
|
19
|
+
"@xyo-network/payload-builder": "^2.111.3",
|
|
20
|
+
"@xyo-network/payload-model": "^2.111.3",
|
|
21
|
+
"@xyo-network/react-shared": "^2.83.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@storybook/react": "^
|
|
25
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
26
|
-
"@xylabs/tsconfig-react": "^
|
|
24
|
+
"@storybook/react": "^8.2.7",
|
|
25
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.7",
|
|
26
|
+
"@xylabs/tsconfig-react": "^4.0.0-rc.7",
|
|
27
27
|
"typescript": "^5.5.4"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
@@ -39,32 +39,16 @@
|
|
|
39
39
|
"docs": "dist/docs.json",
|
|
40
40
|
"exports": {
|
|
41
41
|
".": {
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
"default": "./dist/node/index.js"
|
|
46
|
-
},
|
|
47
|
-
"require": {
|
|
48
|
-
"types": "./dist/node/index.d.cts",
|
|
49
|
-
"default": "./dist/node/index.cjs"
|
|
50
|
-
}
|
|
42
|
+
"import": {
|
|
43
|
+
"types": "./dist/browser/index.d.ts",
|
|
44
|
+
"default": "./dist/browser/index.mjs"
|
|
51
45
|
},
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
"types": "./dist/browser/index.d.mts",
|
|
55
|
-
"default": "./dist/browser/index.js"
|
|
56
|
-
},
|
|
57
|
-
"require": {
|
|
58
|
-
"types": "./dist/browser/index.d.cts",
|
|
59
|
-
"default": "./dist/browser/index.cjs"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"default": "./dist/browser/index.js"
|
|
46
|
+
"types": "./dist/browser/index.d.ts",
|
|
47
|
+
"default": "./dist/browser/index.mjs"
|
|
63
48
|
},
|
|
64
49
|
"./package.json": "./package.json"
|
|
65
50
|
},
|
|
66
|
-
"
|
|
67
|
-
"module": "dist/browser/index.js",
|
|
51
|
+
"module": "dist/browser/index.mjs",
|
|
68
52
|
"types": "dist/browser/index.d.ts",
|
|
69
53
|
"homepage": "https://xyo.network",
|
|
70
54
|
"keywords": [
|
|
@@ -86,6 +70,6 @@
|
|
|
86
70
|
"license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\""
|
|
87
71
|
},
|
|
88
72
|
"sideEffects": false,
|
|
89
|
-
"version": "2.
|
|
73
|
+
"version": "2.83.0",
|
|
90
74
|
"type": "module"
|
|
91
75
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react'
|
|
2
2
|
import { FlexCol } from '@xylabs/react-flexbox'
|
|
3
3
|
import { Payload } from '@xyo-network/payload-model'
|
|
4
|
+
import React from 'react'
|
|
4
5
|
|
|
5
|
-
import { RawInfoButton } from './RawInfoButton.
|
|
6
|
+
import { RawInfoButton } from './RawInfoButton.tsx'
|
|
6
7
|
|
|
7
8
|
type TestPayload = Payload<{ id: string; schema: string; type: string }, 'network.xyo.test'>
|
|
8
9
|
const TestPayload: TestPayload = {
|
|
@@ -11,13 +12,12 @@ const TestPayload: TestPayload = {
|
|
|
11
12
|
type: 'test',
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
// eslint-disable-next-line import/no-default-export
|
|
15
15
|
export default {
|
|
16
16
|
component: RawInfoButton,
|
|
17
17
|
title: 'payload/RawInfoButton',
|
|
18
18
|
} as Meta
|
|
19
19
|
|
|
20
|
-
const Template: StoryFn<typeof RawInfoButton> =
|
|
20
|
+
const Template: StoryFn<typeof RawInfoButton> = args => (
|
|
21
21
|
<FlexCol>
|
|
22
22
|
<RawInfoButton {...args} />
|
|
23
23
|
</FlexCol>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { toJson } from '@xylabs/object'
|
|
2
2
|
import { ButtonEx, ButtonExProps } from '@xylabs/react-button'
|
|
3
|
-
import { MouseEventHandler, ReactNode, useMemo, useState } from 'react'
|
|
3
|
+
import React, { MouseEventHandler, ReactNode, useMemo, useState } from 'react'
|
|
4
4
|
|
|
5
|
-
import { ExpansionProps } from '../../lib/index.
|
|
6
|
-
import { XyoColorLogo } from '../img/index.
|
|
7
|
-
import { RawInfoDialog } from '../shared/index.
|
|
8
|
-
import { IconSize, presetIconSizeValue } from './lib/index.
|
|
5
|
+
import { ExpansionProps } from '../../lib/index.ts'
|
|
6
|
+
import { XyoColorLogo } from '../img/index.tsx'
|
|
7
|
+
import { RawInfoDialog } from '../shared/index.ts'
|
|
8
|
+
import { IconSize, presetIconSizeValue } from './lib/index.ts'
|
|
9
9
|
|
|
10
10
|
export interface RawInfoButtonProps extends ButtonExProps, ExpansionProps {
|
|
11
11
|
dialogContent?: ReactNode
|
|
@@ -54,16 +54,18 @@ export const RawInfoButton: React.FC<RawInfoButtonProps> = ({
|
|
|
54
54
|
>
|
|
55
55
|
{children ?? <span>Data</span>}
|
|
56
56
|
</ButtonEx>
|
|
57
|
-
{iconOnly
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
{iconOnly
|
|
58
|
+
? null
|
|
59
|
+
: (
|
|
60
|
+
<RawInfoDialog
|
|
61
|
+
defaultExpandedJson={defaultExpandedJson}
|
|
62
|
+
jsonValue={json}
|
|
63
|
+
onCloseCallback={onCloseCallBackWrapped}
|
|
64
|
+
dialogContent={dialogContent}
|
|
65
|
+
open={open}
|
|
66
|
+
updateExpandedJson={updateExpandedJson}
|
|
67
|
+
/>
|
|
68
|
+
)}
|
|
67
69
|
</span>
|
|
68
70
|
)
|
|
69
71
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react'
|
|
2
2
|
import { FlexCol } from '@xylabs/react-flexbox'
|
|
3
3
|
import { Payload } from '@xyo-network/payload-model'
|
|
4
|
+
import React from 'react'
|
|
4
5
|
|
|
5
|
-
import { RawInfoIconButton } from './RawInfoIconButton.
|
|
6
|
+
import { RawInfoIconButton } from './RawInfoIconButton.tsx'
|
|
6
7
|
|
|
7
8
|
type TestPayload = Payload<{ id: string; schema: string; type: string }, 'network.xyo.test'>
|
|
8
9
|
const TestPayload: TestPayload = {
|
|
@@ -11,13 +12,12 @@ const TestPayload: TestPayload = {
|
|
|
11
12
|
type: 'test',
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
// eslint-disable-next-line import/no-default-export
|
|
15
15
|
export default {
|
|
16
16
|
component: RawInfoIconButton,
|
|
17
17
|
title: 'payload/RawInfoIconButton',
|
|
18
18
|
} as Meta
|
|
19
19
|
|
|
20
|
-
const Template: StoryFn<typeof RawInfoIconButton> =
|
|
20
|
+
const Template: StoryFn<typeof RawInfoIconButton> = args => (
|
|
21
21
|
<FlexCol>
|
|
22
22
|
<RawInfoIconButton {...args} />
|
|
23
23
|
</FlexCol>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IconButton, IconButtonProps } from '@mui/material'
|
|
2
2
|
import { toJson } from '@xylabs/object'
|
|
3
|
-
import { forwardRef, MouseEventHandler, ReactNode, useMemo, useState } from 'react'
|
|
3
|
+
import React, { forwardRef, MouseEventHandler, ReactNode, useMemo, useState } from 'react'
|
|
4
4
|
|
|
5
|
-
import { ExpansionProps } from '../../lib/index.
|
|
6
|
-
import { XyoColorLogo } from '../img/index.
|
|
7
|
-
import { RawInfoDialog } from '../shared/index.
|
|
8
|
-
import { IconSize, presetIconSizeValue } from './lib/index.
|
|
5
|
+
import { ExpansionProps } from '../../lib/index.ts'
|
|
6
|
+
import { XyoColorLogo } from '../img/index.tsx'
|
|
7
|
+
import { RawInfoDialog } from '../shared/index.ts'
|
|
8
|
+
import { IconSize, presetIconSizeValue } from './lib/index.ts'
|
|
9
9
|
|
|
10
10
|
export interface RawInfoIconProps extends IconButtonProps, ExpansionProps {
|
|
11
11
|
dialogContent?: ReactNode
|
|
@@ -40,16 +40,18 @@ export const RawInfoIconButton = forwardRef<HTMLButtonElement, RawInfoIconProps>
|
|
|
40
40
|
<IconButton onClick={handleClick} ref={ref} {...props}>
|
|
41
41
|
<XyoColorLogo sx={{ height: size ?? iconSize, width: size ?? iconSize }} />
|
|
42
42
|
</IconButton>
|
|
43
|
-
{iconOnly
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
{iconOnly
|
|
44
|
+
? null
|
|
45
|
+
: (
|
|
46
|
+
<RawInfoDialog
|
|
47
|
+
defaultExpandedJson={defaultExpandedJson}
|
|
48
|
+
jsonValue={json}
|
|
49
|
+
onCloseCallback={onCloseCallBackWrapped}
|
|
50
|
+
dialogContent={dialogContent}
|
|
51
|
+
open={open}
|
|
52
|
+
updateExpandedJson={updateExpandedJson}
|
|
53
|
+
/>
|
|
54
|
+
)}
|
|
53
55
|
</>
|
|
54
56
|
)
|
|
55
57
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './RawInfoButton.
|
|
2
|
-
export * from './RawInfoIconButton.
|
|
1
|
+
export * from './RawInfoButton.tsx'
|
|
2
|
+
export * from './RawInfoIconButton.tsx'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './IconSize.
|
|
2
|
-
export * from './presetIconSize.
|
|
1
|
+
export * from './IconSize.ts'
|
|
2
|
+
export * from './presetIconSize.ts'
|
package/src/components/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Button/index.
|
|
2
|
-
export * from './shared/index.
|
|
3
|
-
export * from './styled/index.
|
|
1
|
+
export * from './Button/index.ts'
|
|
2
|
+
export * from './shared/index.ts'
|
|
3
|
+
export * from './styled/index.ts'
|