Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 22.14.0
8 changes: 8 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
approvedGitRepositories:
- "https://github.com/datacite/maltipoo.git"

enableScripts: false

nodeLinker: node-modules

npmMinimalAgeGate: 5d
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"lucide-react": "^0.545.0",
"maltipoo": "https://github.com/datacite/maltipoo#2.2.4",
"next": "16.0.10",
"radix-ui": "^1.4.3",
"react": "19.2.0",
Expand All @@ -47,5 +48,5 @@
"@types/react": "19.2.2",
"@types/react-dom": "19.2.2"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
"packageManager": "yarn@4.16.0+sha512.5374c94eb4ef6aa8188fb112f20c1aa6569f248d676c5e576e1fd2a1a4d8d87a96df65d9dfe1c2a0252cbe38bda46cf18d955005b81b43cc7607a5c9d56fd2b6"
}
7 changes: 4 additions & 3 deletions src/components/ResourceTypesChart.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";

import { RESOURCE_TYPE } from "maltipoo";
import { type LegendProps, Pie, PieChart } from "recharts";
import {
type ChartConfig,
Expand All @@ -8,7 +9,7 @@ import {
ChartTooltip,
ChartTooltipContent,
} from "@/components/ui/chart";
import { CHART, PALETTE_RESOURCE_TYPE } from "@/constants";
import { CHART } from "@/constants";

export type ResourceTypeData = {
type: string;
Expand All @@ -28,8 +29,8 @@ const chartConfig = {
export default function ResourceTypesChart(props: Props) {
const data = props.data.map((d) => ({
fill:
PALETTE_RESOURCE_TYPE[d.type as keyof typeof PALETTE_RESOURCE_TYPE] ||
PALETTE_RESOURCE_TYPE.Unknown,
RESOURCE_TYPE[d.type as keyof typeof RESOURCE_TYPE] ||
RESOURCE_TYPE.Unknown,
...d,
}));

Expand Down
44 changes: 0 additions & 44 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,50 +65,6 @@ export const STATUS_URLS = {
datacite: "http://status.datacite.org",
};

// Colors
const PALETTE_OTHER = {
Other: "gray",
Missing: "#555",
Unknown: "#555",
} as const;

// Source: https://gist.github.com/kjgarza/30558b663d4fd36e7d9970a6b5bdebe6
export const PALETTE_RESOURCE_TYPE = {
...PALETTE_OTHER,
Audiovisual: "#AEC7E8",
Award: "#D4AF37",
Book: "#FF7F0E",
"Book Chapter": "#FFBB78",
Collection: "#D62728",
"Computational Notebook": "#FF9896",
"Conference Paper": "#9467BD",
"Conference Proceeding": "#C5B0D5",
"Data Paper": "#8C564B",
Dataset: "#1F77B4",
Dissertation: "#C49C94",
Event: "#E377C2",
Image: "#F7B6D2",
Instrument: "#35424A",
"Interactive Resource": "#7F7F7F",
Journal: "#C7C7C7",
"Journal Article": "#BCBD22",
Model: "#DBDB8D",
"Output Management Plan": "#17BECF",
"Peer Review": "#9EDAE5",
"Physical Object": "#3182BD",
Preprint: "#6BAED6",
Project: "#AB8DF8",
Report: "#9ECAE1",
Service: "#C6DBEF",
Software: "#E6550D",
Sound: "#FD8D3C",
Standard: "#FDAE6B",
"Study Registration": "#6DBB5E",
Text: "#FDD0A2",
Workflow: "#9F4639",
Other: "#C59088",
} as const;

// Chart
export const CHART = {
bar: {
Expand Down
Loading