Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
ipld-explorer-components
Advanced tools
React components for https://explore.ipld.io (https://github.com/ipfs/explore.ipld.io) and ipfs-webui
This module was extracted from the explore.ipld.io so it could be reused from the IPFS Web UI.
WARNING: This module is not intended to be re-used in it's current form by other projects. There is more work to do to make this a nice set of generic components.
Install it from npm:
npm install ipld-explorer-components
The ES5 friendly version of the src
dir is generated to the dist
dir and the
page components are all provided as named exports so you can import them like so:
import {ExplorePage, StartExploringPage} from `ipld-explorer-components`
The following Components are available:
export {
StartExploringPage,
ExplorePage,
IpldExploreForm,
IpldCarExploreForm,
CidInfo,
IpldGraph
ObjectInfo,
exploreBundle,
heliaBundle
}
There are peerDependencies
so that the parent app can pick the versions of common deps. You'll need to add relevant deps to your project.
And, assuming you are using create-react-app
or a similar webpack set up, you'll need the following CSS imports:
import 'tachyons'
import 'ipfs-css'
import 'react-virtualized/styles.css'
import 'ipld-explorer-components/dist/components/object-info/LinksTable.css'
import 'ipld-explorer-components/dist/components/loader/Loader.css'
NOTE: PRs adding an old IPLDFormat codec would need the old blockcodec-to-ipld-format
tool which has many out of date deps. We will only accept PRs for adding BlockCodec interface codecs.
To add another codec you will need to:
resolveIpldPath
returns the expected resultsresolveFn
in src/lib/get-codec-for-cid.ts doesn't resolve your paths correctly, you will need to add a resolver method for your codec to the codecResolverMap
in src/lib/get-codec-for-cid.tssee https://github.com/ipfs/ipld-explorer-components/pull/360#discussion_r1206251817 for history.
These components use redux-bundler and your app will need to use a redux-bundler provider in order to propogate the properties and selectors. You can find a basic example of this in ./dev/devPage.jsx.
In short, these components export two bundles found in ./src/bundles: explore
and heliaBundle
. The explore bundle and components herein have a few redux-bundler selector dependencies that you need to make sure exist and are called properly.
Dependent | redux-bundler selector | Notes |
---|---|---|
explore bundle | selectHeliaReady | The explore bundle depends on this selector so it knows when the Helia node is available for use |
explore & other bundles | selectHelia | The explore bundle gets the Helia node via this selector |
Main page (or any) | doInitHelia | A consuming app needs to call this selector to tell the bundle that provides the Helia node to instantiate it. |
If you don't want to use the heliaBundle
, i.e. like we won't in ipfs-webui, then you will need to make sure you adapt the selectors as appropriate.
Feel free to dive in! Open an issue or submit PRs.
To contribute to IPFS in general, see the contributing guide.
tx pull -a
to pull the latest translations from Transifex (i18n#transifex-101))npm version major/minor/patch
)git push && git push --follow-tags
)npm publish
)MIT © Protocol Labs
FAQs
React components for https://explore.ipld.io
The npm package ipld-explorer-components receives a total of 28 weekly downloads. As such, ipld-explorer-components popularity was classified as not popular.
We found that ipld-explorer-components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.