@urbicon-ui/i18n 8.26.1 → 8.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,7 +14,7 @@ The locale lives in **context**, not a module-global singleton — so concurrent
14
14
  bun add @urbicon-ui/i18n
15
15
  ```
16
16
 
17
- Peer dependencies: `svelte` (^5.57.0 — uses runes + `createContext`-era context). No SvelteKit needed: the package imports neither `$app/*` nor `@sveltejs/kit`, so it works in any Svelte 5 project — the request-scoped locale below is what keeps it SSR-correct wherever you render.
17
+ Peer dependencies: `svelte` (^5.57.1 — uses runes + `createContext`-era context). No SvelteKit needed: the package imports neither `$app/*` nor `@sveltejs/kit`, so it works in any Svelte 5 project — the request-scoped locale below is what keeps it SSR-correct wherever you render.
18
18
 
19
19
  ## Quick Start
20
20
 
@@ -126,7 +126,7 @@ export const useBlocksI18n = blocksI18n.useTranslate;
126
126
  ```svelte
127
127
  <!-- In a blocks component -->
128
128
  <script>
129
- import { useBlocksI18n } from '$lib';
129
+ import { useBlocksI18n } from '#lib/i18n/index.js';
130
130
  const bt = useBlocksI18n(); // call during component init
131
131
  </script>
132
132
 
@@ -260,7 +260,7 @@ If your app uses Paraglide (or any other i18n) for its **own** strings, you don'
260
260
  <!-- +layout.svelte -->
261
261
  <script>
262
262
  import { I18nProvider } from '@urbicon-ui/i18n';
263
- import { getLocale } from '$lib/paraglide/runtime'; // Paraglide's reactive locale
263
+ import { getLocale } from '#lib/paraglide/runtime.js'; // Paraglide's reactive locale
264
264
  let { children } = $props();
265
265
  </script>
266
266
 
@@ -289,8 +289,8 @@ configureI18n({ onError: (e) => reportToSentry(e) });
289
289
 
290
290
  ```ts
291
291
  import { validatePackageTranslations } from '@urbicon-ui/i18n';
292
- import en from '$lib/translations/en';
293
- import de from '$lib/translations/de'; // import lazy bundles directly for the check
292
+ import en from '#lib/translations/en.js';
293
+ import de from '#lib/translations/de.js'; // import lazy bundles directly for the check
294
294
 
295
295
  it('en/de key parity', () => {
296
296
  expect(validatePackageTranslations('blocks', { en, de }).errors).toEqual([]);
@@ -358,7 +358,7 @@ Three layers catch i18n problems — untranslated strings, unused keys, and copy
358
358
 
359
359
  ```ts
360
360
  import { auditTranslations } from '@urbicon-ui/i18n';
361
- import { appTranslations } from '$lib/i18n';
361
+ import { appTranslations } from '#lib/i18n.js';
362
362
 
363
363
  it('translations are in parity', () => {
364
364
  expect(auditTranslations('app', appTranslations).ok).toBe(true);
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { untrack, type Snippet } from 'svelte';
3
- import { provideI18n } from '../i18n/context.svelte';
4
- import type { Locale } from '../i18n/types';
3
+ import { provideI18n } from '../i18n/context.svelte.js';
4
+ import type { Locale } from '../i18n/types.js';
5
5
 
6
6
  interface I18nProviderProps {
7
7
  /**
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
- import { useI18n } from '../i18n/context.svelte';
3
- import type { TranslationParams, TranslationOptions } from '../i18n/types';
2
+ import { useI18n } from '../i18n/context.svelte.js';
3
+ import type { TranslationParams, TranslationOptions } from '../i18n/types.js';
4
4
 
5
5
  interface TProps {
6
6
  key: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urbicon-ui/i18n",
3
- "version": "8.26.1",
3
+ "version": "8.27.0",
4
4
  "description": "Runes-based localization for Svelte 5 apps and the Urbicon UI design system",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,18 +20,18 @@
20
20
  ],
21
21
  "dependencies": {},
22
22
  "devDependencies": {
23
- "@sveltejs/kit": "^2.70.3",
24
- "@sveltejs/package": "^2.5.8",
25
- "@sveltejs/vite-plugin-svelte": "^7.3.0",
23
+ "@sveltejs/kit": "^3.0.0",
24
+ "@sveltejs/package": "^3.0.0",
25
+ "@sveltejs/vite-plugin-svelte": "^7.3.1",
26
26
  "@types/node": "^26.4.0",
27
27
  "prettier": "^3.9.6",
28
28
  "prettier-plugin-svelte": "^4.1.1",
29
29
  "prettier-plugin-tailwindcss": "^0.8.1",
30
- "svelte": "^5.57.0",
30
+ "svelte": "^5.57.1",
31
31
  "svelte-check": "^4.7.6",
32
32
  "typescript": "^6.0.3",
33
33
  "vite": "^8.2.2",
34
- "vitest": "^4.1.11"
34
+ "vitest": "^5.0.3"
35
35
  },
36
36
  "exports": {
37
37
  ".": {
@@ -55,7 +55,7 @@
55
55
  "main": "dist/index.js",
56
56
  "sideEffects": false,
57
57
  "peerDependencies": {
58
- "svelte": "^5.57.0",
58
+ "svelte": "^5.57.1",
59
59
  "typescript": "^6.0.3"
60
60
  },
61
61
  "peerDependenciesMeta": {
@@ -79,5 +79,9 @@
79
79
  },
80
80
  "svelte": "./dist/index.js",
81
81
  "type": "module",
82
+ "imports": {
83
+ "#lib": "./src/lib/index.js",
84
+ "#lib/*": "./src/lib/*"
85
+ },
82
86
  "types": "./dist/index.d.ts"
83
87
  }