Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cosmograph/react

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cosmograph/react - npm Package Compare versions

Comparing version 0.0.3-beta.1 to 0.0.3-beta.2

2

components/histogram/index.d.ts

@@ -14,3 +14,3 @@ import React, { Ref, ForwardedRef } from 'react';

} & {
accessor?: string | undefined;
accessor?: ((node: N) => number) | undefined;
customExtent?: [number, number] | undefined;

@@ -17,0 +17,0 @@ onSelection?: ((selection?: [number, number] | undefined, nodes?: N[] | undefined, links?: L[] | undefined) => void) | undefined;

import React, { Ref, ForwardedRef } from 'react';
import { CosmographSearch as _CosmographSearch, CosmographSearchConfigInterface } from '@cosmograph/cosmograph';
import { CosmographSearch as _CosmographSearch, CosmographSearchConfigInterface, CosmographSearchInputConfig } from '@cosmograph/cosmograph';
import { CosmosInputLink, CosmosInputNode } from '@cosmograph/cosmos';
export type CosmographSearchProps<N extends CosmosInputNode, L extends CosmosInputLink> = {
export type CosmographSearchProps<N extends CosmosInputNode> = {
style?: object;
className?: string;
} & CosmographSearchConfigInterface;
} & CosmographSearchConfigInterface<N>;
export type CosmographSearchRef<N extends CosmosInputNode = CosmosInputNode, L extends CosmosInputLink = CosmosInputLink> = _CosmographSearch<N, L> | undefined;
export declare function CosmographSearchFC<N extends CosmosInputNode, L extends CosmosInputLink>({ style, className, ...config }: CosmographSearchProps<N, L>, ref: ForwardedRef<CosmographSearchRef<N, L>>): React.ReactElement;
export declare function CosmographSearchFC<N extends CosmosInputNode, L extends CosmosInputLink>({ style, className, ...config }: CosmographSearchProps<N>, ref: ForwardedRef<CosmographSearchRef<N, L>>): React.ReactElement;
export declare const CosmographSearch: <N extends CosmosInputNode, L extends CosmosInputLink>(props: {
style?: object | undefined;
className?: string | undefined;
} & CosmographSearchConfigInterface<import("packages/ui/dist/modules/search/types").SearchDataRecord> & {
} & CosmographSearchConfigInterface<N> & {
ref?: React.Ref<CosmographSearchRef<N, L>> | undefined;
}) => React.ReactElement;
export type { CosmographSearchConfigInterface };
export type { CosmographSearchInputConfig };

@@ -1,2 +0,2 @@

import r,{useRef as o,useEffect as e,useMemo as n,useImperativeHandle as t}from"react";import{CosmographSearch as s}from"@cosmograph/cosmograph";import{useCosmograph as l}from"../../context.js";import"../timeline/index.js";import"../histogram/index.js";import"../cosmograph/index.js";function a({style:a,className:i,...c},m){const u=l(),d=o(null),p=o();return e((()=>{var r;return d.current&&(null==u?void 0:u.cosmograph)&&(p.current=new s(null==u?void 0:u.cosmograph,d.current,c),(u.nodes||u.links)&&p.current.setData(null!==(r=u.nodes)&&void 0!==r?r:[])),()=>{}}),[null==u?void 0:u.cosmograph]),n((()=>{var r,o;null===(r=p.current)||void 0===r||r.setData(null!==(o=null==u?void 0:u.nodes)&&void 0!==o?o:[])}),[null==u?void 0:u.nodes]),n((()=>{var r;null===(r=p.current)||void 0===r||r.setConfig(c)}),[c]),t(m,(()=>p.current),[p.current]),r.createElement("div",{id:"CosmographSearch",style:a,className:i,ref:d})}const i=r.forwardRef(a);export{i as CosmographSearch,a as CosmographSearchFC};
import r,{useRef as o,useEffect as e,useMemo as n,useImperativeHandle as t}from"react";import{CosmographSearch as s}from"@cosmograph/cosmograph";import{useCosmograph as l}from"../../context.js";import"../timeline/index.js";import"../histogram/index.js";import"../cosmograph/index.js";function a({style:a,className:i,...c},m){const u=l(),d=o(null),v=o();return e((()=>{var r;return d.current&&(null==u?void 0:u.cosmograph)&&(v.current=new s(null==u?void 0:u.cosmograph,d.current,c),(u.nodes||u.links)&&v.current.setData(null!==(r=u.nodes)&&void 0!==r?r:[])),()=>{var r;null===(r=v.current)||void 0===r||r.remove()}}),[null==u?void 0:u.cosmograph]),n((()=>{var r,o;null===(r=v.current)||void 0===r||r.setData(null!==(o=null==u?void 0:u.nodes)&&void 0!==o?o:[])}),[null==u?void 0:u.nodes]),n((()=>{var r;null===(r=v.current)||void 0===r||r.setConfig(c)}),[c]),t(m,(()=>v.current),[v.current]),r.createElement("div",{id:"CosmographSearch",style:a,className:i,ref:d})}const i=r.forwardRef(a);export{i as CosmographSearch,a as CosmographSearchFC};
//# sourceMappingURL=index.js.map
import React, { Ref, ForwardedRef } from 'react';
import { CosmographTimeline as _CosmographTimeline, CosmographTimelineConfigInterface } from '@cosmograph/cosmograph';
import { CosmographTimeline as _CosmographTimeline, CosmographTimelineConfigInterface, CosmographTimelineInputConfig } from '@cosmograph/cosmograph';
import { CosmosInputLink, CosmosInputNode } from '@cosmograph/cosmos';

@@ -7,3 +7,3 @@ export type CosmographTimelineProps<N extends CosmosInputNode, L extends CosmosInputLink> = {

className?: string;
} & CosmographTimelineConfigInterface;
} & CosmographTimelineConfigInterface<N, L>;
export type CosmographTimelineRef<N extends CosmosInputNode = CosmosInputNode, L extends CosmosInputLink = CosmosInputLink> = _CosmographTimeline<N, L> | undefined;

@@ -14,5 +14,8 @@ export declare function CosmographTimelineFC<N extends CosmosInputNode, L extends CosmosInputLink>({ style, className, ...config }: CosmographTimelineProps<N, L>, ref: ForwardedRef<CosmographTimelineRef<N, L>>): React.ReactElement;

className?: string | undefined;
} & CosmographTimelineConfigInterface & {
} & {
accessor?: ((link: L) => number | Date) | undefined;
onSelection?: ((selection?: [number, number] | [Date, Date] | undefined, nodes?: N[] | undefined, links?: L[] | undefined) => void) | undefined;
} & import("@cosmograph/ui").TimelineEvents & {
ref?: React.Ref<CosmographTimelineRef<N, L>> | undefined;
}) => React.ReactElement;
export type { CosmographTimelineConfigInterface };
export type { CosmographTimelineInputConfig };

@@ -1,2 +0,2 @@

import o,{useRef as n,useEffect as r,useMemo as l,useImperativeHandle as e}from"react";import{CosmographTimeline as t}from"@cosmograph/cosmograph";import{useCosmograph as i}from"../../context.js";function s({style:s,className:u,...a},c){const d=i(),m=n(null),v=n();return r((()=>{var o,n;return m.current&&(null==d?void 0:d.cosmograph)&&(v.current=new t(null==d?void 0:d.cosmograph,m.current,a),(d.nodes||d.links)&&v.current.setData(null!==(o=d.nodes)&&void 0!==o?o:[],null!==(n=d.links)&&void 0!==n?n:[])),()=>{}}),[null==d?void 0:d.cosmograph]),l((()=>{var o,n,r;null===(o=v.current)||void 0===o||o.setData(null!==(n=null==d?void 0:d.nodes)&&void 0!==n?n:[],null!==(r=null==d?void 0:d.links)&&void 0!==r?r:[])}),[null==d?void 0:d.nodes,null==d?void 0:d.links]),l((()=>{var o;null===(o=v.current)||void 0===o||o.setConfig(a)}),[a]),e(c,(()=>v.current),[v.current]),o.createElement("div",{id:"CosmographTimeline",style:s,className:u,ref:m})}const u=o.forwardRef(s);export{u as CosmographTimeline,s as CosmographTimelineFC};
import o,{useRef as r,useEffect as n,useMemo as l,useImperativeHandle as e}from"react";import{CosmographTimeline as t}from"@cosmograph/cosmograph";import{useCosmograph as i}from"../../context.js";function s({style:s,className:u,...a},c){const d=i(),v=r(null),m=r();return n((()=>{var o,r;return v.current&&(null==d?void 0:d.cosmograph)&&(m.current=new t(null==d?void 0:d.cosmograph,v.current,a),(d.nodes||d.links)&&m.current.setData(null!==(o=d.nodes)&&void 0!==o?o:[],null!==(r=d.links)&&void 0!==r?r:[])),()=>{var o;null===(o=m.current)||void 0===o||o.remove()}}),[null==d?void 0:d.cosmograph]),l((()=>{var o,r,n;null===(o=m.current)||void 0===o||o.setData(null!==(r=null==d?void 0:d.nodes)&&void 0!==r?r:[],null!==(n=null==d?void 0:d.links)&&void 0!==n?n:[])}),[null==d?void 0:d.nodes,null==d?void 0:d.links]),l((()=>{var o;null===(o=m.current)||void 0===o||o.setConfig(a)}),[a]),e(c,(()=>m.current),[m.current]),o.createElement("div",{id:"CosmographTimeline",style:s,className:u,ref:v})}const u=o.forwardRef(s);export{u as CosmographTimeline,s as CosmographTimelineFC};
//# sourceMappingURL=index.js.map
{
"name": "@cosmograph/react",
"version": "0.0.3-beta.1",
"version": "0.0.3-beta.2",
"description": "Cosmograph React Wrapper",

@@ -11,3 +11,3 @@ "author": "cosmograph-org",

"peerDependencies": {
"@cosmograph/cosmograph": "0.0.3-beta.1",
"@cosmograph/cosmograph": "0.0.3-beta.2",
"react": ">=16.8.0 || ^17 || ^18",

@@ -14,0 +14,0 @@ "react-dom": ">=16.8.0 || ^17 || ^18"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc