diff --git a/gitrepublic-cli b/gitrepublic-cli index be48033..daafc00 160000 --- a/gitrepublic-cli +++ b/gitrepublic-cli @@ -1 +1 @@ -Subproject commit be480332ebd06991a3a88e22aa2d175596e20337 +Subproject commit daafc006e76eb25bf64b5a65901729faaea2d2eb diff --git a/nostr/commit-signatures.jsonl b/nostr/commit-signatures.jsonl index ce11747..7328460 100644 --- a/nostr/commit-signatures.jsonl +++ b/nostr/commit-signatures.jsonl @@ -1 +1,2 @@ {"kind":1640,"pubkey":"573634b648634cbad10f2451776089ea21090d9407f715e83c577b4611ae6edc","created_at":1771497264,"tags":[["author","Silberengel","silberengel7@protonmail.com"],["message","update docs"]],"content":"Signed commit: update docs","id":"5a14564a2b82b3b4ee4e21d28e7b362cc82e3c27eac38691c85f46480b100cf1","sig":"d1369aff4db39f61aba5f0954c0c8ba92df4aec96f1fab7cc5af51d1b0667734f35dec99363290de2c248b7074369f592b238b1b66987e09f267062073167131"} +{"kind":1640,"pubkey":"573634b648634cbad10f2451776089ea21090d9407f715e83c577b4611ae6edc","created_at":1771497680,"tags":[["author","Silberengel","silberengel7@protonmail.com"],["message","validate signatures"]],"content":"Signed commit: validate signatures","id":"47edd2e8cbea27854a429202ddfb3fde3531a355276c619258bc90c4d6ce54cc","sig":"a941abf1d2c8e7dae4d5b4d6424c2e5394b05c98898d88b7acc1501cd6d8d3d13aea8be8d797dcb0701f752a32bf72a3b02f3c814707e10ed18d6d24f11d8ae0"} diff --git a/package-lock.json b/package-lock.json index 4109b52..2802658 100644 --- a/package-lock.json +++ b/package-lock.json @@ -115,18 +115,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@asciidoctor/opal-runtime/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@babel/helper-string-parser": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", @@ -937,30 +925,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/@eslint/js": { "version": "8.57.1", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", @@ -987,30 +951,6 @@ "node": ">=10.10.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -2338,10 +2278,13 @@ } }, "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.3.tgz", + "integrity": "sha512-1pHv8LX9CpKut1Zp4EXey7Z8OfH11ONNH6Dhi2WDUt31VVZFXZzKwXcysBgqSumFCmR+0dqjMK5v5JiFHzi0+g==", + "license": "MIT", + "engines": { + "node": "20 || >=22" + } }, "node_modules/binary-extensions": { "version": "2.3.0", @@ -2357,12 +2300,15 @@ } }, "node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.2.tgz", + "integrity": "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==", "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" } }, "node_modules/braces": { @@ -2583,13 +2529,6 @@ "dev": true, "license": "MIT" }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, "node_modules/constantinople": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz", @@ -2962,30 +2901,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/esm-env": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz", @@ -3195,18 +3110,6 @@ "minimatch": "^5.0.1" } }, - "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -3369,30 +3272,6 @@ "node": ">=10.13.0" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/globals": { "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", @@ -3990,16 +3869,15 @@ } }, "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.1.tgz", + "integrity": "sha512-MClCe8IL5nRRmawL6ib/eT4oLyeKMGCghibcDWK+J0hh0Q8kqSdia6BvbRMVk6mPa6WqUa5uR2oxt6C5jd533A==", + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^5.0.2" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" diff --git a/package.json b/package.json index 0cab2a5..d98c530 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,8 @@ "overrides": { "ajv": "^8.17.1", "cookie": "^0.7.2", - "esbuild": "^0.24.0" + "esbuild": "^0.24.0", + "minimatch": "^10.0.0" }, "repository": { "type": "git", diff --git a/src/app.css b/src/app.css index e738fd7..b930166 100644 --- a/src/app.css +++ b/src/app.css @@ -1,9 +1,11 @@ /* Import fonts - IBM Plex Serif for classic Roman feel with modern tech aesthetic */ @import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap'); -/* GitRepublic Theme - Light/Dark Mode with Royal Plum Palette */ +/* GitRepublic Theme - Three Themes: Light, Dark (Purple), and Black */ -:root { +/* GitRepublic Light Theme */ +:root, +[data-theme="light"] { /* Light theme colors */ --royal-plum: #7B1E6D; --snow: #FBF7FA; @@ -43,6 +45,7 @@ --warning-text: #6a3000; /* Darker for better contrast */ } +/* GitRepublic Dark Theme (Purple) - Default */ [data-theme="dark"] { /* Dark theme colors - darker versions of the palette */ --royal-plum: #9a2a7f; @@ -83,6 +86,47 @@ --warning-text: #ffcc44; /* Brighter for better contrast */ } +/* GitRepublic Black Theme - GitHub-style all black */ +[data-theme="black"] { + /* Black theme colors - GitHub-inspired */ + --royal-plum: #9a2a7f; + --snow: #0d1117; /* GitHub's black background */ + --lavender-blush: #161b22; /* GitHub's slightly lighter black */ + --thistle: #21262d; /* GitHub's border color */ + --lilac: #30363d; /* GitHub's hover color */ + + /* Black theme semantic colors */ + --bg-primary: #0d1117; /* Pure black background */ + --bg-secondary: #161b22; /* Slightly lighter for cards */ + --bg-tertiary: #21262d; /* Even lighter for nested elements */ + --text-primary: #f0f6fc; /* GitHub's primary text color */ + --text-secondary: #c9d1d9; /* GitHub's secondary text color */ + --text-muted: #8b949e; /* GitHub's muted text color */ + --border-color: #30363d; /* GitHub's border color */ + --border-light: #21262d; /* Lighter border */ + --accent: var(--royal-plum); + --accent-hover: #b84a8a; + --accent-light: #6a3a5a; + --accent-text: #ffffff; + --link-color: #58a6ff; /* GitHub's link color */ + --link-hover: #79c0ff; /* GitHub's link hover */ + --card-bg: #161b22; /* GitHub's card background */ + --card-border: #30363d; /* GitHub's card border */ + --button-primary: var(--royal-plum); + --button-primary-hover: #b84a8a; + --button-secondary: #21262d; /* GitHub's secondary button */ + --button-secondary-hover: #30363d; /* GitHub's secondary button hover */ + --input-bg: #0d1117; /* GitHub's input background */ + --input-border: #30363d; /* GitHub's input border */ + --input-focus: var(--royal-plum); + --error-bg: #3d1f1f; + --error-text: #f85149; /* GitHub's error color */ + --success-bg: #1a3a2a; + --success-text: #3fb950; /* GitHub's success color */ + --warning-bg: #3d2f1f; + --warning-text: #d29922; /* GitHub's warning color */ +} + /* Base styles */ * { box-sizing: border-box; diff --git a/src/app.html b/src/app.html index 816135e..ff2c747 100644 --- a/src/app.html +++ b/src/app.html @@ -9,10 +9,12 @@ // Apply theme immediately to prevent flash (function() { const savedTheme = localStorage.getItem('theme'); - if (savedTheme === 'light') { - // Light theme is default, no attribute needed + if (savedTheme === 'gitrepublic-light') { + document.documentElement.setAttribute('data-theme', 'light'); + } else if (savedTheme === 'gitrepublic-black') { + document.documentElement.setAttribute('data-theme', 'black'); } else { - // Default to dark + // Default to gitrepublic-dark (purple) document.documentElement.setAttribute('data-theme', 'dark'); } })(); diff --git a/src/hooks.server.ts b/src/hooks.server.ts index a7c6570..8dcb417 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -127,7 +127,9 @@ export const handle: Handle = async ({ event, resolve }) => { const csp = [ "default-src 'self'", "script-src 'self' 'unsafe-inline' 'unsafe-eval'", // unsafe-eval needed for Svelte + "script-src-elem 'self' 'unsafe-inline'", "style-src 'self' 'unsafe-inline' https://fonts.googleapis.com", + "style-src-elem 'self' 'unsafe-inline' https://fonts.googleapis.com", "img-src 'self' data: https:", "font-src 'self' data: https://fonts.gstatic.com", "connect-src 'self' wss: https:", diff --git a/src/lib/components/NavBar.svelte b/src/lib/components/NavBar.svelte index a4a41f7..2cf0b42 100644 --- a/src/lib/components/NavBar.svelte +++ b/src/lib/components/NavBar.svelte @@ -160,6 +160,7 @@ Search Register Docs + API Docs
Interactive API documentation with Swagger UI. All endpoints use NIP-98 HTTP authentication.
+
+ Note: To authenticate, you need to provide a NIP-98 Authorization header.
+ The format is: Authorization: Nostr <base64-encoded-event-json>
+