Skip to content

Commit e3ef40a

Browse files
authored
Merge branch 'main' into fix/dependencies-complex-versions
2 parents b510770 + b3af9c6 commit e3ef40a

File tree

205 files changed

+10186
-29849
lines changed

Some content is hidden

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

205 files changed

+10186
-29849
lines changed

.github/workflows/chromatic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
node-version: lts/*
3232

33-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
33+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4e1c8eafbd745f64b1ef30a7d7ed7965034c486c
3434
name: 🟧 Install pnpm
3535
with:
3636
cache: true

.github/workflows/semantic-pull-requests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
with:
2525
scopes: |
2626
a11y
27+
blog
2728
deps
2829
docs
2930
cli

.storybook/.public/favicon.svg

Lines changed: 55 additions & 0 deletions
Loading
Lines changed: 96 additions & 0 deletions
Loading

.storybook/main.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,23 @@ import type { StorybookConfig } from '@storybook-vue/nuxt'
22

33
const config = {
44
stories: ['../app/**/*.stories.@(js|ts)'],
5-
addons: ['@storybook/addon-a11y', '@storybook/addon-docs'],
5+
addons: ['@storybook/addon-a11y', '@storybook/addon-docs', '@storybook/addon-themes'],
66
framework: '@storybook-vue/nuxt',
7+
staticDirs: ['./.public'],
78
features: {
89
backgrounds: false,
910
},
1011
async viteFinal(config) {
12+
config.plugins ??= []
13+
14+
config.plugins.push({
15+
name: 'ignore-internals',
16+
transform(_, id) {
17+
if (id.includes('/app/pages/blog/') && id.endsWith('.md')) {
18+
return 'export default {}'
19+
}
20+
},
21+
})
1122
// Replace the built-in vue-docgen plugin with a fault-tolerant version.
1223
// vue-docgen-api can crash on components that import types from other
1324
// .vue files (it tries to parse the SFC with @babel/parser as plain TS).

.storybook/manager.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { addons } from 'storybook/manager-api'
2+
import { create } from 'storybook/theming'
3+
4+
const npmxTheme = create({
5+
brandTitle: 'npmx Storybook',
6+
brandImage: '/npmx-storybook.svg',
7+
})
8+
9+
addons.setConfig({
10+
theme: npmxTheme,
11+
})

.storybook/preview.ts

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Preview } from '@storybook-vue/nuxt'
2+
import { withThemeByDataAttribute } from '@storybook/addon-themes'
23
import { currentLocales } from '../config/i18n'
34
import { fn } from 'storybook/test'
45
import { ACCENT_COLORS } from '../shared/utils/constants'
@@ -58,31 +59,22 @@ const preview: Preview = {
5859
],
5960
},
6061
},
61-
theme: {
62-
name: 'Theme',
63-
description: 'Color mode',
64-
defaultValue: 'dark',
65-
toolbar: {
66-
icon: 'moon',
67-
dynamicTitle: true,
68-
items: [
69-
{ value: 'light', icon: 'sun', title: 'Light' },
70-
{ value: 'dark', icon: 'moon', title: 'Dark' },
71-
],
72-
},
73-
},
7462
},
7563
decorators: [
64+
withThemeByDataAttribute({
65+
themes: {
66+
Light: 'light',
67+
Dark: 'dark',
68+
},
69+
defaultTheme: 'Dark',
70+
attributeName: 'data-theme',
71+
}),
7672
(story, context) => {
77-
const { locale, theme, accentColor } = context.globals as {
73+
const { locale, accentColor } = context.globals as {
7874
locale: string
79-
theme: string
8075
accentColor?: string
8176
}
8277

83-
// Set theme from globals
84-
document.documentElement.setAttribute('data-theme', theme)
85-
8678
// Set accent color from globals
8779
if (accentColor) {
8880
document.documentElement.style.setProperty('--accent-color', `var(--swatch-${accentColor})`)

CONTRIBUTING.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@ shared/ # Shared between app and server
179179
└── types/ # TypeScript type definitions
180180
181181
cli/ # Local connector CLI (separate workspace)
182+
182183
test/ # Vitest tests
183184
├── unit/ # Unit tests (*.spec.ts)
184-
── nuxt/ # Nuxt component tests
185-
tests/ # Playwright E2E tests
185+
── nuxt/ # Nuxt component tests
186+
└── e2e/ # Playwright E2E tests
186187
```
187188

188189
> [!TIP]
@@ -465,6 +466,7 @@ The following scripts help manage translation files. `en.json` is the reference
465466
| `pnpm i18n:check:fix [locale]` | Same as check, but adds missing keys to other locales with English placeholders. |
466467
| `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. |
467468
| `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. |
468470

469471
### Adding a new locale
470472

@@ -490,17 +492,8 @@ To add a new locale:
490492
},
491493
```
492494

493-
4. Copy your translation file to `lunaria/files/` for translation tracking:
494-
495-
```bash
496-
cp i18n/locales/uk-UA.json lunaria/files/uk-UA.json
497-
```
498-
499-
> **Important:**
500-
> This file must be committed. Lunaria uses git history to track translation progress, so the build will fail if this file is missing.
501-
502-
5. If the language is `right-to-left`, add `dir: 'rtl'` (see `ar-EG` in config for example)
503-
6. If the language requires special pluralization rules, add a `pluralRule` callback (see `ar-EG` or `ru-RU` in config for examples)
495+
4. If the language is `right-to-left`, add `dir: 'rtl'` (see `ar-EG` in config for example)
496+
5. If the language requires special pluralization rules, add a `pluralRule` callback (see `ar-EG` or `ru-RU` in config for examples)
504497

505498
Check [Pluralization rule callback](https://vue-i18n.intlify.dev/guide/essentials/pluralization#custom-pluralization) and [Plural Rules](https://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories) for more info.
506499

@@ -1031,7 +1024,7 @@ Format: `type(scope): description`
10311024
10321025
**Types:** `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`
10331026
1034-
**Scopes (optional):** `docs`, `i18n`, `deps`
1027+
**Scopes (optional):** `a11y`, `blog`, `deps`, `docs`, `cli`, `i18n`, `ui`
10351028
10361029
**Examples:**
10371030

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ What npmx offers:
2626

2727
## Shortcuts
2828

29-
> [!IMPORTANT]
30-
> We're keeping the website, repository, and our discord community low-profile until the browser is polished enough. We'll do a formal announcement at that point. Please avoid sharing the website or the invite link to discord on social media directly. The repo is public, so people who care about the project can easily find it and join us. Anyone who wants to help is more than welcome to [join the community](https://chat.npmx.dev). If you know others who would be interested, please invite them too!
31-
3229
- [chat.npmx.dev](https://chat.npmx.dev) - Discord Server
3330
- [social.npmx.dev](https://social.npmx.dev) - Bluesky Profile
3431
- [repo.npmx.dev](https://repo.npmx.dev) - GitHub Repository

app/app.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ if (import.meta.client) {
129129

130130
<AppHeader :show-logo="!isHomepage" />
131131

132+
<NuxtRouteAnnouncer v-slot="{ message }">
133+
{{ route.name === 'search' ? `${$t('search.title_packages')} - npmx` : message }}
134+
</NuxtRouteAnnouncer>
135+
132136
<div id="main-content" class="flex-1 flex flex-col" tabindex="-1">
133137
<NuxtPage />
134138
</div>

0 commit comments

Comments
 (0)