Skip to content

Commit

Permalink
Add new interfaces and dependencies for Civic API
Browse files Browse the repository at this point in the history
Added several interfaces related to petition signatures and Civic API details in `index.d.ts`. Updated `.env.example` with a default AI model, and `package.json` with new dependencies: `@mdxeditor/editor` and `react-error-boundary`. Enhanced global CSS with dark mode styles for the editor.

Took 1 hour 1 minute
  • Loading branch information
mikepsinn committed Nov 20, 2024
1 parent 9723f90 commit 2140d4e
Show file tree
Hide file tree
Showing 5 changed files with 1,466 additions and 74 deletions.
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,7 @@ SEARXNG_SAFESEARCH=0 # Safe search setting: 0 (off), 1 (moderate), 2 (strict)
DFDA_CLIENT_ID=
DFDA_CLIENT_SECRET=

GOOGLE_CIVIC_API_KEY=your_api_key_here
GOOGLE_CIVIC_API_KEY=your_api_key_here

# Default AI model to use for generation
DEFAULT_AI_MODEL=gpt-4o-mini
32 changes: 32 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,35 @@
@apply bg-background text-foreground;
}
}

@import '@mdxeditor/editor/style.css';

/* Add dark mode styles for the editor */
.dark .mdxeditor {
--mdxeditor-bg: hsl(var(--background));
--mdxeditor-text: hsl(var(--foreground));
--mdxeditor-border: hsl(var(--border));
--mdxeditor-toolbar-bg: hsl(var(--card));
--mdxeditor-toolbar-border: hsl(var(--border));
--mdxeditor-button-bg: transparent;
--mdxeditor-button-border: hsl(var(--border));
--mdxeditor-button-hover-bg: hsl(var(--accent));
--mdxeditor-button-hover-text: hsl(var(--accent-foreground));
--mdxeditor-button-active-bg: hsl(var(--accent));
--mdxeditor-button-active-text: hsl(var(--accent-foreground));
--mdxeditor-button-active-border: hsl(var(--border));
}

.dark .mdxeditor-toolbar {
background-color: hsl(var(--card));
border-color: hsl(var(--border));
}

.dark .mdxeditor-button {
color: hsl(var(--foreground));
}

.dark .mdxeditor-button:hover {
background-color: hsl(var(--accent));
color: hsl(var(--accent-foreground));
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"@langchain/textsplitters": "^0.0.3",
"@mdx-js/loader": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@mdxeditor/editor": "^3.19.0",
"@next-auth/prisma-adapter": "^1.0.7",
"@next/bundle-analyzer": "^14.2.15",
"@next/mdx": "^14.1.4",
Expand Down Expand Up @@ -184,6 +185,7 @@
"react-colorful": "^5.6.1",
"react-day-picker": "^8.10.0",
"react-dom": "18.2.0",
"react-error-boundary": "^4.1.2",
"react-hook-form": "^7.50.1",
"react-hot-toast": "^2.4.1",
"react-icons": "^5.0.1",
Expand Down
Loading

0 comments on commit 2140d4e

Please sign in to comment.