d3-state-visualizer

This commit is contained in:
Nathan Bierema 2023-12-15 00:07:10 -05:00
parent 15add8d1be
commit e629c248ea
10 changed files with 21 additions and 39 deletions

View File

@ -1,7 +0,0 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -1,7 +0,0 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults" }],
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -20,19 +20,16 @@
"lib",
"src"
],
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"types": "lib/types/index.d.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/reduxjs/redux-devtools.git"
},
"scripts": {
"build": "pnpm run build:cjs && pnpm run build:esm && pnpm run build:types",
"build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"build": "tsc",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts",
"type-check": "tsc --noEmit",
@ -40,7 +37,6 @@
"prepublish": "pnpm run type-check && pnpm run lint"
},
"dependencies": {
"@babel/runtime": "^7.23.5",
"@types/d3": "^7.4.3",
"d3": "^7.8.5",
"d3tooltip": "^3.0.0",
@ -49,11 +45,6 @@
"ramda": "^0.29.1"
},
"devDependencies": {
"@babel/cli": "^7.23.4",
"@babel/core": "^7.23.5",
"@babel/eslint-parser": "^7.23.3",
"@babel/preset-env": "^7.23.5",
"@babel/preset-typescript": "^7.23.3",
"@types/ramda": "^0.29.9",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",

View File

@ -1,4 +1,4 @@
export type { HierarchyPointNode } from 'd3';
export type { StyleValue } from 'd3tooltip';
export { default as tree } from './tree/tree';
export type { Node, Options } from './tree/tree';
export { default as tree } from './tree/tree.js';
export type { Node, Options } from './tree/tree.js';

View File

@ -4,14 +4,14 @@ import { isEmpty } from 'ramda';
import { map2tree } from 'map2tree';
import type { Node } from 'map2tree';
import deepmerge from 'deepmerge';
import { tooltip } from 'd3tooltip';
import type { StyleValue } from 'd3tooltip';
import {
getTooltipString,
toggleChildren,
visit,
getNodeGroupByDepthCount,
} from './utils';
import { tooltip } from 'd3tooltip';
import type { StyleValue } from 'd3tooltip';
} from './utils.js';
export interface Options {
// eslint-disable-next-line @typescript-eslint/ban-types

View File

@ -1,6 +1,6 @@
import { is, join, pipe, replace } from 'ramda';
import sortAndSerialize from './sortAndSerialize';
import type { InternalNode } from './tree';
import sortAndSerialize from './sortAndSerialize.js';
import type { InternalNode } from './tree.js';
export function collapseChildren(node: InternalNode) {
if (node.children) {

View File

@ -1,2 +1,7 @@
export { tree } from './charts';
export type { HierarchyPointNode, Node, Options, StyleValue } from './charts';
export { tree } from './charts/index.js';
export type {
HierarchyPointNode,
Node,
Options,
StyleValue,
} from './charts/index.js';

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"extends": "../../tsconfig.esm.base.json",
"compilerOptions": {
"outDir": "lib/types"
"outDir": "lib"
},
"include": ["src"]
}

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.esm.base.json",
"compilerOptions": {
"outDir": "lib/types"
"outDir": "lib"
},
"include": ["src"]
}