Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2d96bac
fix: Update exports
caweidmann May 29, 2026
9ce97b1
fix: Export all terms as `TERMS` instead of `terms` [BREAKING]
caweidmann May 29, 2026
ace20d3
fix: Export all terms as `TERMS` instead of `terms` [BREAKING CHANGE]
caweidmann May 29, 2026
4608455
refactor: Move locales to common dir
caweidmann May 29, 2026
a193863
fix: Expose sources
caweidmann May 29, 2026
ad5c1dc
refactor: Move file
caweidmann May 29, 2026
20eacf4
refactor: Move file
caweidmann May 29, 2026
fd6fc44
refactor: Move file
caweidmann May 29, 2026
37ef73d
refactor: Move file
caweidmann May 29, 2026
de12a3c
refactor: "types" to "term-types"
caweidmann May 29, 2026
0b704f3
refactor: "tags" to "term-tags"
caweidmann May 29, 2026
3cea3f9
refactor: "sources" to "term-sources"
caweidmann May 29, 2026
43b2f13
refactor: Export `TERM_TAGS` instead of `tags` [BREAKING CHANGE]
caweidmann May 29, 2026
1e66be5
refactor: Export from root
caweidmann May 29, 2026
d65e7fc
fix: Import
caweidmann May 29, 2026
3f39ea5
fix: Circular dependencies
caweidmann May 29, 2026
98c50a5
refactor: Dir name
caweidmann May 29, 2026
ad321bc
refactor: Dir name
caweidmann May 29, 2026
bac63b6
refactor: Dir name
caweidmann May 29, 2026
3ce58b2
fix: Imports
caweidmann May 29, 2026
a0168e0
feat: Export RAW
caweidmann May 29, 2026
968aa1e
feat: Export all utils
caweidmann May 29, 2026
1a5ee1d
refactor: Move methods
caweidmann May 29, 2026
45b3c45
fix: Update tests
caweidmann May 29, 2026
9cea3e1
chore(demo) Remove "completeness" logic
caweidmann May 29, 2026
2472702
docs: Update references
caweidmann May 29, 2026
3fe8d00
docs: Contribute
caweidmann May 29, 2026
73eabb0
fix(demo): Add "Edit" button
caweidmann May 29, 2026
88734ec
docs: Update README
caweidmann May 29, 2026
d288ead
fix(demo): Query param
caweidmann May 29, 2026
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
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Create `src/data/terms/{term_id}.ts` (lowercase with underscores only):

```typescript
import type { TTerm } from '@/types'
import { LOCALES } from '@/data/locales'
import { LOCALES } from '@/common'
import { SOURCES } from '@/data/sources'
import { TAGS } from '@/data/tags'
import { TYPES } from '@/data/types'
Expand Down Expand Up @@ -96,7 +96,7 @@ Create `src/data/types/{type_id}.ts` or `src/data/tags/{tag_id}.ts`:

```typescript
import type { TType } from '@/types'
import { LOCALES } from '@/data/locales'
import { LOCALES } from '@/common'

export default {
id: 'database',
Expand Down Expand Up @@ -141,7 +141,7 @@ label: {

## Adding a New Language

1. Add locale to `src/data/locales/index.ts`:
1. Add locale to `src/common/index.ts`:
```typescript
export const LOCALES = {
EN_US: 'en-US',
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# dev-dict

A collection of software development terms (with multilingual support). Useful for building developer tools, documentation sites, personal portfolios, etc.
A multilingual collection of software development terms. Useful for building developer tools, documentation sites, personal portfolios, etc.

**[Docs](https://kyco.github.io/dev-dict/docs)** · **[Browse all terms](https://kyco.github.io/dev-dict/)**

Expand All @@ -17,11 +17,10 @@ npm install dev-dict
## Usage

```typescript
import { terms } from 'dev-dict'
import { getTerms } from 'dev-dict/utils'
import { TERMS, getTerms } from 'dev-dict'

// Define dictionary
const dictionary = getTerms({ terms })
const dictionary = getTerms({ terms: TERMS, locale: 'en-US' })

// Display terms
dictionary.forEach(term => {
Expand All @@ -39,7 +38,7 @@ Dev-dict contains 220+ terms. To keep your bundle small import only the terms yo
import { react, typescript } from 'dev-dict/terms'

// BAD
import { terms } from 'dev-dict'
import { TERMS } from 'dev-dict'
```

The root entry is best suited for server-side or build-time use cases where you need the full dataset (e.g. generating a static glossary page).
Expand Down
181 changes: 0 additions & 181 deletions demo/src/components/CompletenessChart.tsx

This file was deleted.

21 changes: 14 additions & 7 deletions demo/src/components/TermCard.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Link } from '@tanstack/react-router'
import type { TTermLocalized, TTermTagLocalized, TTermTypeLocalized } from 'dev-dict'
import { Book, Check, Copy } from 'lucide-react'
import { Check, Copy, Pencil } from 'lucide-react'

import { getGithubEditUrl } from '~/shared/constants'
import { useCopyToClipboard } from '~/shared/hooks'
import { getTermCompleteness } from '~/shared/utils/termUtils'

import { Chip } from './Chip'
import { TermLinks } from './TermLinks'
Expand All @@ -16,7 +16,6 @@ interface TermCardProps {

export function TermCard({ term, searchQuery, populateEmpty = true }: TermCardProps) {
const { copied, copy } = useCopyToClipboard()
const completeness = getTermCompleteness(term.id)

const copyId = (e: React.MouseEvent) => {
e.preventDefault()
Expand Down Expand Up @@ -72,10 +71,18 @@ export function TermCard({ term, searchQuery, populateEmpty = true }: TermCardPr
)}
</button>
</div>
<div className="flex flex-col items-end gap-1">
<Book size={20} className="text-slate-300 group-hover:text-blue-400 transition-colors flex-shrink-0" />
<span className="text-xs font-semibold text-slate-400">{completeness.fullPercentage}%</span>
</div>

<a
href={getGithubEditUrl(term.id)}
target="_blank"
rel="noopener noreferrer"
onClick={(e) => e.stopPropagation()}
className="flex-shrink-0 px-2.5 py-1 text-xs font-medium text-slate-500 bg-slate-100 border border-slate-200 hover:bg-blue-50 hover:text-blue-600 hover:border-blue-200 rounded-lg transition-colors flex items-center gap-1"
title="Edit this term on GitHub"
>
<Pencil size={12} />
Edit
</a>
</div>

<p className="text-slate-600 text-sm leading-relaxed mb-4 line-clamp-2">
Expand Down
1 change: 0 additions & 1 deletion demo/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { Chip } from './Chip'
export { CompletenessChart } from './CompletenessChart'
export { Dropdown } from './Dropdown'
export { LanguageDropdown } from './LanguageDropdown'
export { SearchBar } from './SearchBar'
Expand Down
Loading