Skip to content

Commit 409014b

Browse files
authored
Merge branch 'main' into use-setup-vp-instead
2 parents cdb2511 + 1d1f450 commit 409014b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1268
-1229
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pnpm npmx-connector # Start the real connector (requires npm login)
119119
pnpm mock-connector # Start the mock connector (no npm login needed)
120120

121121
# Code Quality
122-
pnpm lint # Run linter (oxlint + oxfmt)
122+
pnpm vp run lint # Run linter (oxlint + oxfmt)
123123
pnpm lint:fix # Auto-fix lint issues
124124
pnpm test:types # TypeScript type checking
125125

@@ -460,13 +460,13 @@ npmx.dev uses [@nuxtjs/i18n](https://i18n.nuxtjs.org/) for internationalization.
460460

461461
The following scripts help manage translation files. `en.json` is the reference locale.
462462

463-
| Command | Description |
464-
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
465-
| `pnpm i18n:check [locale]` | Compares `en.json` with other locale files. Shows missing and extra keys. Optionally filter output by locale (e.g. `pnpm i18n:check ja-JP`). |
466-
| `pnpm i18n:check:fix [locale]` | Same as check, but adds missing keys to other locales with English placeholders. |
467-
| `pnpm i18n:report` | Audits translation keys against code usage in `.vue` and `.ts` files. Reports missing keys (used in code but not in locale), unused keys (in locale but not in code), and dynamic keys. |
468-
| `pnpm i18n:report:fix` | Removes unused keys from `en.json` and all other locale files. |
469-
| `pnpm i18n:schema` | Generates a JSON Schema from `en.json` at `i18n/schema.json`. Locale files reference this schema for IDE validation and autocompletion. |
463+
| Command | Description |
464+
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
465+
| `pnpm i18n:check:fix [locale]` | Compares `en.json` with other locale files and adds missing keys with English placeholders. Optionally filter output by locale (e.g. `pnpm i18n:check:fix ja-JP`). |
466+
| `pnpm i18n:report:fix` | Removes unused keys from `en.json` and all other locale files. |
467+
| `pnpm vp run i18n:check [locale]` | Same as check:fix, but only show missing and extra keys. |
468+
| `pnpm vp run i18n:report` | Audits translation keys against code usage in `.vue` and `.ts` files. Reports missing keys (used in code but not in locale), unused keys (in locale but not in code), and dynamic keys. |
469+
| `pnpm vp run i18n:schema` | Generates a JSON Schema from `en.json` at `i18n/schema.json`. Locale files reference this schema for IDE validation and autocompletion. |
470470

471471
### Adding a new locale
472472

@@ -502,7 +502,7 @@ Check [Pluralization rule callback](https://vue-i18n.intlify.dev/guide/essential
502502
We track the current progress of translations with [Lunaria](https://lunaria.dev/) on this site: https://i18n.npmx.dev/
503503
If you see any outdated translations in your language, feel free to update the keys to match the English version.
504504

505-
Use `pnpm i18n:check` and `pnpm i18n:check:fix` to verify and fix your locale (see [i18n commands](#i18n-commands) above for details).
505+
Use `pnpm i18n:check:fix` to fix your locale (see [i18n commands](#i18n-commands) above for details).
506506

507507
#### Country variants (advanced)
508508

@@ -590,7 +590,7 @@ See how `es`, `es-ES`, and `es-419` are configured in [config/i18n.ts](./config/
590590
- Use `common.*` for shared strings (loading, retry, close, etc.)
591591
- Use component-specific prefixes: `package.card.*`, `settings.*`, `nav.*`
592592
- Do not use dashes (`-`) in translation keys; always use underscore (`_`): e.g., `privacy_policy` instead of `privacy-policy`
593-
- **Always use static string literals as translation keys.** Our i18n scripts (`pnpm i18n:report`) rely on static analysis to detect unused and missing keys. Dynamic keys cannot be analyzed and will be flagged as errors.
593+
- **Always use static string literals as translation keys.** Our i18n scripts (`pnpm i18n:report:fix`) rely on static analysis to detect unused and missing keys. Dynamic keys cannot be analyzed and will be flagged as errors.
594594

595595
**Bad:**
596596

app/components/Chart/PatternSlot.vue

Lines changed: 0 additions & 32 deletions
This file was deleted.

app/components/Chart/SplitSparkline.vue

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<script setup lang="ts">
22
import { VueUiSparkline } from 'vue-data-ui/vue-ui-sparkline'
3+
import { VueUiPatternSeed } from 'vue-data-ui/vue-ui-pattern-seed'
34
import { useCssVariables } from '~/composables/useColors'
45
import {
56
type VueUiSparklineConfig,
67
type VueUiSparklineDatasetItem,
78
type VueUiXyDatasetItem,
89
} from 'vue-data-ui'
910
import { getPalette, lightenColor } from 'vue-data-ui/utils'
11+
import { CHART_PATTERN_CONFIG } from '~/utils/charts'
1012
1113
import('vue-data-ui/style.css')
1214
@@ -194,19 +196,37 @@ const configs = computed(() => {
194196
<ClientOnly v-for="(config, i) in configs" :key="`config_${i}`">
195197
<div @mouseleave="resetHover" @keydown.esc="resetHover" class="w-full max-w-[400px] mx-auto">
196198
<div class="flex gap-2 place-items-center">
197-
<div class="h-3 w-3">
198-
<svg viewBox="0 0 2 2" class="w-full">
199+
<div class="h-5 w-5">
200+
<svg viewBox="0 0 30 30" class="w-full">
201+
<defs>
202+
<VueUiPatternSeed
203+
v-if="i != 0"
204+
:id="`marker_${i}`"
205+
:seed="i"
206+
:foreground-color="colors.bg!"
207+
:background-color="
208+
dataset?.[i]?.color ??
209+
palette[i] ??
210+
palette[i % palette.length] ??
211+
palette[0] ??
212+
'transparent'
213+
"
214+
:max-size="CHART_PATTERN_CONFIG.maxSize"
215+
:min-size="CHART_PATTERN_CONFIG.minSize"
216+
:disambiguator="CHART_PATTERN_CONFIG.disambiguator"
217+
/>
218+
</defs>
199219
<rect
200220
x="0"
201221
y="0"
202-
width="2"
203-
height="2"
204-
rx="0.3"
205-
:fill="dataset?.[i]?.color ?? palette[i]"
222+
width="30"
223+
height="30"
224+
rx="3"
225+
:fill="i === 0 ? (dataset?.[0]?.color ?? palette[0]) : `url(#marker_${i})`"
206226
/>
207227
</svg>
208228
</div>
209-
{{ applyEllipsis(dataset?.[i]?.name ?? '', 28) }}
229+
{{ applyEllipsis(dataset?.[i]?.name ?? '', 27) }}
210230
</div>
211231
<VueUiSparkline
212232
:key="`${i}_${step}`"

app/components/Code/DirectoryListing.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const bytesFormatter = useBytesFormatter()
5858
<div class="directory-listing">
5959
<!-- Empty state -->
6060
<div v-if="currentContents.length === 0" class="py-20 text-center text-fg-muted">
61+
<span class="i-lucide:folder-open w-12 h-12 text-fg-subtle mx-auto mb-4"> </span>
6162
<p>{{ $t('code.no_files') }}</p>
6263
</div>
6364

0 commit comments

Comments
 (0)