diff --git a/LICENSE b/LICENSE index 14e2530..fc1ec48 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2025 Revanite Incorporated + Copyright 2025 Gemara contributors, a Series of LF Projects, LLC. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9c71714 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +.PHONY: test test-watch lint typecheck build generate + +test: + npm test + +test-watch: + npm run test:watch + +lint: + npm run lint + +typecheck: + npm run typecheck + +build: + npm run build + +generate: + npm run generate diff --git a/eslint.config.js b/eslint.config.js index 7617e7c..e00ab73 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import tseslint from "@typescript-eslint/eslint-plugin"; import tsparser from "@typescript-eslint/parser"; import reactHooks from "eslint-plugin-react-hooks"; diff --git a/package-lock.json b/package-lock.json index 88a3286..de94c3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1159,9 +1159,6 @@ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1176,9 +1173,6 @@ "arm" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1193,9 +1187,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1210,9 +1201,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1227,9 +1215,6 @@ "loong64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1244,9 +1229,6 @@ "loong64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1261,9 +1243,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1278,9 +1257,6 @@ "ppc64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1295,9 +1271,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1312,9 +1285,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1329,9 +1299,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1346,9 +1313,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1363,9 +1327,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ diff --git a/scripts/generate-types.ts b/scripts/generate-types.ts index 5e9b5a0..477d2f8 100644 --- a/scripts/generate-types.ts +++ b/scripts/generate-types.ts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * Type generation pipeline. * diff --git a/src/capability-catalog/CapabilityCatalog.tsx b/src/capability-catalog/CapabilityCatalog.tsx index 1502d41..e2693e6 100644 --- a/src/capability-catalog/CapabilityCatalog.tsx +++ b/src/capability-catalog/CapabilityCatalog.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import type { ReactNode } from "react"; import { DateTime } from "../primitives/DateTime.js"; import { EntityRef } from "../primitives/EntityRef.js"; diff --git a/src/capability-catalog/index.ts b/src/capability-catalog/index.ts index c5b1d8b..33b1c94 100644 --- a/src/capability-catalog/index.ts +++ b/src/capability-catalog/index.ts @@ -1 +1,2 @@ +// SPDX-License-Identifier: Apache-2.0 export { CapabilityCatalog, type CapabilityCatalogProps } from "./CapabilityCatalog.js"; diff --git a/src/control-catalog/ControlCatalog.tsx b/src/control-catalog/ControlCatalog.tsx index a3e4f8c..9c96e15 100644 --- a/src/control-catalog/ControlCatalog.tsx +++ b/src/control-catalog/ControlCatalog.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import type { ReactNode } from "react"; import { ArtifactRef } from "../primitives/ArtifactRef.js"; import { DateTime } from "../primitives/DateTime.js"; diff --git a/src/control-catalog/index.ts b/src/control-catalog/index.ts index d5cad04..47cdaab 100644 --- a/src/control-catalog/index.ts +++ b/src/control-catalog/index.ts @@ -1 +1,2 @@ +// SPDX-License-Identifier: Apache-2.0 export { ControlCatalog, type ControlCatalogProps } from "./ControlCatalog.js"; diff --git a/src/guidance-catalog/GuidanceCatalog.tsx b/src/guidance-catalog/GuidanceCatalog.tsx index 5199ca7..ba0fb62 100644 --- a/src/guidance-catalog/GuidanceCatalog.tsx +++ b/src/guidance-catalog/GuidanceCatalog.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import type { ReactNode } from "react"; import { ArtifactRef } from "../primitives/ArtifactRef.js"; import { DateTime } from "../primitives/DateTime.js"; diff --git a/src/guidance-catalog/index.ts b/src/guidance-catalog/index.ts index 03e7e15..0e9be3d 100644 --- a/src/guidance-catalog/index.ts +++ b/src/guidance-catalog/index.ts @@ -1 +1,2 @@ +// SPDX-License-Identifier: Apache-2.0 export { GuidanceCatalog, type GuidanceCatalogProps } from "./GuidanceCatalog.js"; diff --git a/src/index.ts b/src/index.ts index 193c36e..2c3a2e1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // Top-level barrel — provider + primitives only. // Renderers live behind subpath imports so consumers tree-shake per artifact. export * from "./provider/index.js"; diff --git a/src/interactive/CollapsibleGroup.tsx b/src/interactive/CollapsibleGroup.tsx index d960c73..401f12e 100644 --- a/src/interactive/CollapsibleGroup.tsx +++ b/src/interactive/CollapsibleGroup.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 "use client"; import { useId, useState, type ReactNode } from "react"; diff --git a/src/interactive/index.ts b/src/interactive/index.ts index 52ec5b5..389ac9c 100644 --- a/src/interactive/index.ts +++ b/src/interactive/index.ts @@ -1 +1,2 @@ +// SPDX-License-Identifier: Apache-2.0 export { CollapsibleGroup, type CollapsibleGroupProps } from "./CollapsibleGroup.js"; diff --git a/src/primitives/ArtifactRef.tsx b/src/primitives/ArtifactRef.tsx index d0d2995..1bc408d 100644 --- a/src/primitives/ArtifactRef.tsx +++ b/src/primitives/ArtifactRef.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import { Slot } from "@radix-ui/react-slot"; import type { ReactNode } from "react"; import { useLinkResolver, type ArtifactReference } from "../provider/index.js"; diff --git a/src/primitives/DateTime.tsx b/src/primitives/DateTime.tsx index 39cee24..17ca29d 100644 --- a/src/primitives/DateTime.tsx +++ b/src/primitives/DateTime.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 export interface DateTimeProps { /** ISO 8601 datetime string, as produced by Gemara's #Datetime format. */ value: string | undefined; diff --git a/src/primitives/EntityRef.tsx b/src/primitives/EntityRef.tsx index d326b24..dbef2c1 100644 --- a/src/primitives/EntityRef.tsx +++ b/src/primitives/EntityRef.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import type { ReactNode } from "react"; /** Minimal shape we accept for any "entity-like" actor / contact / author. */ diff --git a/src/primitives/Heading.tsx b/src/primitives/Heading.tsx index 14e7c7b..9b9b4de 100644 --- a/src/primitives/Heading.tsx +++ b/src/primitives/Heading.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import { createContext, useContext, diff --git a/src/primitives/Prose.tsx b/src/primitives/Prose.tsx index 550fece..b7c6775 100644 --- a/src/primitives/Prose.tsx +++ b/src/primitives/Prose.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 export interface ProseProps { content: string | undefined; /** Optional element override — defaults to `
`. */ diff --git a/src/primitives/index.ts b/src/primitives/index.ts index d1072e4..8784ae0 100644 --- a/src/primitives/index.ts +++ b/src/primitives/index.ts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 export { ArtifactRef, type ArtifactRefProps } from "./ArtifactRef.js"; export { EntityRef, type EntityRefProps, type EntityLike } from "./EntityRef.js"; export { DateTime, type DateTimeProps } from "./DateTime.js"; diff --git a/src/principle-catalog/PrincipleCatalog.tsx b/src/principle-catalog/PrincipleCatalog.tsx index f7901f0..dae8f42 100644 --- a/src/principle-catalog/PrincipleCatalog.tsx +++ b/src/principle-catalog/PrincipleCatalog.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import type { ReactNode } from "react"; import { DateTime } from "../primitives/DateTime.js"; import { EntityRef } from "../primitives/EntityRef.js"; diff --git a/src/principle-catalog/index.ts b/src/principle-catalog/index.ts index d97f24b..8a8e2f7 100644 --- a/src/principle-catalog/index.ts +++ b/src/principle-catalog/index.ts @@ -1 +1,2 @@ +// SPDX-License-Identifier: Apache-2.0 export { PrincipleCatalog, type PrincipleCatalogProps } from "./PrincipleCatalog.js"; diff --git a/src/provider/GemaraProvider.tsx b/src/provider/GemaraProvider.tsx index 600df0b..0aeaea6 100644 --- a/src/provider/GemaraProvider.tsx +++ b/src/provider/GemaraProvider.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import { createContext, type ReactElement, type ReactNode } from "react"; /** diff --git a/src/provider/index.ts b/src/provider/index.ts index 3979ae1..b27dd07 100644 --- a/src/provider/index.ts +++ b/src/provider/index.ts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 export { GemaraProvider, GemaraContext, diff --git a/src/provider/useLinkResolver.ts b/src/provider/useLinkResolver.ts index 5b03b53..6038b29 100644 --- a/src/provider/useLinkResolver.ts +++ b/src/provider/useLinkResolver.ts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import { useContext } from "react"; import { GemaraContext, type LinkResolver } from "./GemaraProvider.js"; diff --git a/src/threat-catalog/ThreatCatalog.tsx b/src/threat-catalog/ThreatCatalog.tsx index 3aaebe1..50792c1 100644 --- a/src/threat-catalog/ThreatCatalog.tsx +++ b/src/threat-catalog/ThreatCatalog.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import type { ReactNode } from "react"; import { ArtifactRef } from "../primitives/ArtifactRef.js"; import { DateTime } from "../primitives/DateTime.js"; diff --git a/src/threat-catalog/index.ts b/src/threat-catalog/index.ts index 8a51516..64f37a8 100644 --- a/src/threat-catalog/index.ts +++ b/src/threat-catalog/index.ts @@ -1 +1,2 @@ +// SPDX-License-Identifier: Apache-2.0 export { ThreatCatalog, type ThreatCatalogProps } from "./ThreatCatalog.js"; diff --git a/src/vector-catalog/VectorCatalog.tsx b/src/vector-catalog/VectorCatalog.tsx index 2eb0e70..3941444 100644 --- a/src/vector-catalog/VectorCatalog.tsx +++ b/src/vector-catalog/VectorCatalog.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import type { ReactNode } from "react"; import { DateTime } from "../primitives/DateTime.js"; import { EntityRef } from "../primitives/EntityRef.js"; diff --git a/src/vector-catalog/index.ts b/src/vector-catalog/index.ts index b9de6ff..a0cbbd9 100644 --- a/src/vector-catalog/index.ts +++ b/src/vector-catalog/index.ts @@ -1 +1,2 @@ +// SPDX-License-Identifier: Apache-2.0 export { VectorCatalog, type VectorCatalogProps } from "./VectorCatalog.js"; diff --git a/tests/CapabilityCatalog.test.tsx b/tests/CapabilityCatalog.test.tsx index 8ca5b0c..e3f8e7d 100644 --- a/tests/CapabilityCatalog.test.tsx +++ b/tests/CapabilityCatalog.test.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import { describe, it, expect } from "vitest"; import { readFileSync } from "node:fs"; import { resolve } from "node:path"; diff --git a/tests/ControlCatalog.test.tsx b/tests/ControlCatalog.test.tsx index 7e33e4f..28c48e1 100644 --- a/tests/ControlCatalog.test.tsx +++ b/tests/ControlCatalog.test.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import { describe, it, expect } from "vitest"; import { readFileSync } from "node:fs"; import { resolve } from "node:path"; diff --git a/tests/GuidanceCatalog.test.tsx b/tests/GuidanceCatalog.test.tsx index 9b75d46..d6fc4da 100644 --- a/tests/GuidanceCatalog.test.tsx +++ b/tests/GuidanceCatalog.test.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import { describe, it, expect } from "vitest"; import { readFileSync } from "node:fs"; import { resolve } from "node:path"; diff --git a/tests/PrincipleCatalog.test.tsx b/tests/PrincipleCatalog.test.tsx index 765fb48..cdbff03 100644 --- a/tests/PrincipleCatalog.test.tsx +++ b/tests/PrincipleCatalog.test.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import { describe, it, expect } from "vitest"; import { readFileSync } from "node:fs"; import { resolve } from "node:path"; diff --git a/tests/ThreatCatalog.test.tsx b/tests/ThreatCatalog.test.tsx index 0aa3962..e796213 100644 --- a/tests/ThreatCatalog.test.tsx +++ b/tests/ThreatCatalog.test.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import { describe, it, expect } from "vitest"; import { readFileSync } from "node:fs"; import { resolve } from "node:path"; diff --git a/tests/VectorCatalog.test.tsx b/tests/VectorCatalog.test.tsx index dff725e..2d8feef 100644 --- a/tests/VectorCatalog.test.tsx +++ b/tests/VectorCatalog.test.tsx @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import { describe, it, expect } from "vitest"; import { readFileSync } from "node:fs"; import { resolve } from "node:path"; diff --git a/tsup.config.ts b/tsup.config.ts index dc05a3e..2277789 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import { defineConfig } from "tsup"; import { readFile, writeFile, readdir } from "node:fs/promises"; import { join } from "node:path"; diff --git a/vitest.config.ts b/vitest.config.ts index 48d33e7..4e1ecf4 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 import { defineConfig } from "vitest/config"; export default defineConfig({