svelte-intlayer 8.2.4 → 8.3.0-canary.1

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.
@@ -1,4 +1,4 @@
1
- import type { LocalesValues } from '@intlayer/types';
1
+ import type { LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  /**
3
3
  * Gets the user's preferred locale from browser settings
4
4
  * @returns The detected browser locale or 'en' as fallback
@@ -1,4 +1,4 @@
1
- import type { LocalesValues } from '@intlayer/types';
1
+ import type { LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  export interface IntlayerContextType {
3
3
  locale: LocalesValues;
4
4
  setLocale: (locale: LocalesValues) => void;
@@ -1,4 +1,5 @@
1
- import type { Locale, LocalesValues } from '@intlayer/types';
1
+ import type { Locale } from '@intlayer/types/allLocales';
2
+ import type { LocalesValues } from '@intlayer/types/module_augmentation';
2
3
  import { type Readable } from 'svelte/store';
3
4
  export interface IntlayerStoreType {
4
5
  locale: Locale;
@@ -1,4 +1,4 @@
1
- import type { LocalesValues } from '@intlayer/types';
1
+ import type { LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  /**
3
3
  * Setups Intlayer in your Svelte application.
4
4
  *
@@ -1,4 +1,5 @@
1
- import type { Dictionary, LocalesValues } from '@intlayer/types';
1
+ import type { Dictionary } from '@intlayer/types/dictionary';
2
+ import type { LocalesValues } from '@intlayer/types/module_augmentation';
2
3
  import { type Readable } from 'svelte/store';
3
4
  import type { DeepTransformContent } from '../plugins';
4
5
  /**
@@ -1,4 +1,5 @@
1
- import type { Dictionary, LocalesValues, StrictModeLocaleMap } from '@intlayer/types';
1
+ import type { Dictionary } from '@intlayer/types/dictionary';
2
+ import type { LocalesValues, StrictModeLocaleMap } from '@intlayer/types/module_augmentation';
2
3
  import { type Readable } from 'svelte/store';
3
4
  /**
4
5
  * Svelte hook for handling dynamic dictionary loading
@@ -1,4 +1,5 @@
1
- import type { Dictionary, DictionaryKeys, LocalesValues, StrictModeLocaleMap } from '@intlayer/types';
1
+ import type { Dictionary } from '@intlayer/types/dictionary';
2
+ import type { DictionaryKeys, LocalesValues, StrictModeLocaleMap } from '@intlayer/types/module_augmentation';
2
3
  import { type Readable } from 'svelte/store';
3
4
  import type { DeepTransformContent } from '../plugins';
4
5
  /**
@@ -1,4 +1,4 @@
1
- import type { LocalesValues } from '@intlayer/types';
1
+ import type { LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  /**
3
3
  * Svelte hook that provides a locale-bound `Intl` object.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { DictionaryKeys, DictionaryRegistryContent, LocalesValues } from '@intlayer/types';
1
+ import type { DictionaryKeys, DictionaryRegistryContent, LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  import { type Readable } from 'svelte/store';
3
3
  import type { DeepTransformContent } from '../plugins';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import type { LocalesValues } from '@intlayer/types';
1
+ import type { LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  type useLocaleProps = {
3
3
  isCookieEnabled?: boolean;
4
4
  onLocaleChange?: (locale: LocalesValues) => void;
@@ -26,7 +26,7 @@ type useLocaleProps = {
26
26
  export declare const useLocale: ({ isCookieEnabled, onLocaleChange, }?: useLocaleProps) => {
27
27
  locale: import("svelte/store").Readable<LocalesValues>;
28
28
  setLocale: (locale: LocalesValues) => void;
29
- defaultLocale: import("@intlayer/types").Locale;
30
- availableLocales: import("@intlayer/types").Locale[];
29
+ defaultLocale: import("intlayer").Locale;
30
+ availableLocales: import("intlayer").Locale[];
31
31
  };
32
32
  export {};
@@ -1,14 +1,14 @@
1
- import type { LocalesValues } from '@intlayer/types';
1
+ import type { LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  /**
3
3
  * Get the locale cookie
4
4
  */
5
- export declare const localeInStorage: import("@intlayer/types").Locale | undefined;
5
+ export declare const localeInStorage: import("intlayer").Locale | undefined;
6
6
  /**
7
7
  * @deprecated Use localeInStorage instead
8
8
  *
9
9
  * Get the locale cookie
10
10
  */
11
- export declare const localeCookie: import("@intlayer/types").Locale | undefined;
11
+ export declare const localeCookie: import("intlayer").Locale | undefined;
12
12
  /**
13
13
  * Set the locale cookie
14
14
  */
@@ -2,7 +2,7 @@
2
2
  import type { NodeProps } from '@intlayer/core/interpreter';
3
3
  import { isSameKeyPath } from '@intlayer/core/utils';
4
4
  import { MessageKey } from '@intlayer/editor';
5
- import { NodeType } from '@intlayer/types';
5
+ import { NodeType } from '@intlayer/types/nodeType';
6
6
  import { get } from 'svelte/store';
7
7
  import ContentSelector from './ContentSelector.svelte';
8
8
  import { useCommunicator } from './communicator';
@@ -1,4 +1,4 @@
1
- import type { Dictionary, LocalDictionaryId } from '@intlayer/types';
1
+ import type { Dictionary, LocalDictionaryId } from '@intlayer/types/dictionary';
2
2
  export type DictionaryContent = Record<LocalDictionaryId, Dictionary>;
3
3
  export declare const useDictionariesRecord: () => {
4
4
  dictionariesRecord: import("svelte/store").Writable<DictionaryContent | undefined>;
@@ -1,4 +1,5 @@
1
- import type { DictionaryKeys, KeyPath } from '@intlayer/types';
1
+ import type { KeyPath } from '@intlayer/types/keyPath';
2
+ import type { DictionaryKeys } from '@intlayer/types/module_augmentation';
2
3
  import type { Writable } from 'svelte/store';
3
4
  export type FocusedContent = {
4
5
  dictionaryKey: DictionaryKeys;
@@ -1,5 +1,6 @@
1
1
  import { type Plugins } from '@intlayer/core/interpreter';
2
- import type { DeclaredLocales, Dictionary, LocalesValues } from '@intlayer/types';
2
+ import type { DeclaredLocales, LocalesValues } from '@intlayer/types/module_augmentation';
3
+ import type { Dictionary } from '@intlayer/types/dictionary';
3
4
  import { type DeepTransformContent } from './plugins';
4
5
  /**
5
6
  * Get dictionary content for a specific locale in Svelte applications
@@ -1,5 +1,5 @@
1
1
  import { type Plugins } from '@intlayer/core/interpreter';
2
- import type { DeclaredLocales, DictionaryKeys, DictionaryRegistryContent, LocalesValues } from '@intlayer/types';
2
+ import type { DeclaredLocales, DictionaryKeys, DictionaryRegistryContent, LocalesValues } from '@intlayer/types/module_augmentation';
3
3
  import { type DeepTransformContent } from './plugins';
4
4
  /**
5
5
  * Get dictionary content by key for Svelte applications
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { LocalesValues } from '@intlayer/types';
1
+ import type { LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  import type { IInterpreterPluginSvelte } from './plugins';
3
3
  declare module '@intlayer/core/interpreter' {
4
4
  interface IInterpreterPlugin<T, S, L extends LocalesValues> extends IInterpreterPluginSvelte<T, S, L> {
@@ -1,7 +1,9 @@
1
1
  <script lang="ts">
2
2
  import { getContentNodeByKeyPath } from '@intlayer/core/dictionaryManipulator';
3
3
  import { getMarkdownMetadata } from '@intlayer/core/markdown';
4
- import type { ContentNode, KeyPath, Locale } from '@intlayer/types';
4
+ import type { Locale } from '@intlayer/types/allLocales';
5
+ import type { ContentNode } from '@intlayer/types/dictionary';
6
+ import type { KeyPath } from '@intlayer/types/keyPath';
5
7
  import { useLocale } from '../client/useLocale';
6
8
 
7
9
  export const locale: Locale | undefined = undefined;
@@ -15,7 +17,7 @@ $: currentLocale = locale ?? $contextLocale;
15
17
  $: metadataEl = getContentNodeByKeyPath(
16
18
  metadata as ContentNode,
17
19
  metadataKeyPath,
18
- currentLocale
20
+ currentLocale as Locale
19
21
  );
20
22
  </script>
21
23
 
@@ -1,4 +1,5 @@
1
- import type { KeyPath, Locale } from '@intlayer/types';
1
+ import type { Locale } from '@intlayer/types/allLocales';
2
+ import type { KeyPath } from '@intlayer/types/keyPath';
2
3
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
4
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
5
  $$bindings?: Bindings;
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import type { KeyPath } from '@intlayer/types';
2
+ import type { KeyPath } from '@intlayer/types/keyPath';
3
3
  import ContentSelectorWrapper from '../editor/ContentSelectorWrapper.svelte';
4
4
  import MarkdownMetadataRenderer from './MarkdownMetadataRenderer.svelte';
5
5
 
@@ -1,4 +1,4 @@
1
- import type { KeyPath } from '@intlayer/types';
1
+ import type { KeyPath } from '@intlayer/types/keyPath';
2
2
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
3
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
4
  $$bindings?: Bindings;
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import type { KeyPath } from '@intlayer/types';
2
+ import type { KeyPath } from '@intlayer/types/keyPath';
3
3
  import ContentSelectorWrapper from '../editor/ContentSelectorWrapper.svelte';
4
4
  import MarkdownRenderer from './MarkdownRenderer.svelte';
5
5
 
@@ -1,4 +1,4 @@
1
- import type { KeyPath } from '@intlayer/types';
1
+ import type { KeyPath } from '@intlayer/types/keyPath';
2
2
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
3
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
4
  $$bindings?: Bindings;
package/dist/plugins.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { type DeepTransformContent as DeepTransformContentCore, type IInterpreterPluginState as IInterpreterPluginStateCore, type Plugins } from '@intlayer/core/interpreter';
2
- import { type DeclaredLocales, type LocalesValues, NodeType } from '@intlayer/types';
2
+ import type { DeclaredLocales, LocalesValues } from '@intlayer/types/module_augmentation';
3
+ import { NodeType } from '@intlayer/types/nodeType';
3
4
  import type { HTMLComponents } from './html/types';
4
5
  import { type IntlayerNode } from './renderIntlayerNode';
5
6
  /**
@@ -69,7 +70,7 @@ export type HTMLPluginCond<T> = T extends {
69
70
  export declare const htmlPlugin: Plugins;
70
71
  export interface IInterpreterPluginSvelte<T, S, L extends LocalesValues> {
71
72
  svelteIntlayerNode: T extends string | number ? IntlayerNode<T> : never;
72
- svelteInsertion: InsertionCond<T>;
73
+ svelteInsertion: InsertionCond<T, S, L>;
73
74
  svelteMarkdown: MarkdownCond<T, S, L>;
74
75
  svelteHtml: HTMLPluginCond<T>;
75
76
  }
package/dist/plugins.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { getHTML, } from '@intlayer/core/interpreter';
2
2
  import { compile, getMarkdownMetadata } from '@intlayer/core/markdown';
3
3
  import { HTML_TAGS, } from '@intlayer/core/transpiler';
4
- import { NodeType, } from '@intlayer/types';
4
+ import { NodeType } from '@intlayer/types/nodeType';
5
5
  import { ContentSelectorWrapper } from './editor';
6
6
  import MarkdownMetadataWithSelector from './markdown/MarkdownMetadataWithSelector.svelte';
7
7
  import MarkdownWithSelector from './markdown/MarkdownWithSelector.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-intlayer",
3
- "version": "8.2.4",
3
+ "version": "8.3.0-canary.1",
4
4
  "description": "Easily internationalize i18n your Svelte applications with type-safe multilingual content management.",
5
5
  "keywords": [
6
6
  "intlayer",
@@ -57,40 +57,40 @@
57
57
  "build": "svelte-package -i src -o dist",
58
58
  "build:ci": "svelte-package -i src -o dist",
59
59
  "check": "svelte-check --tsconfig ./tsconfig.types.json",
60
- "clean": "rimraf ./dist .turbo",
60
+ "clean": "bun --bun rimraf ./dist .turbo",
61
61
  "dev": "svelte-package -i src -o dist --watch",
62
- "format": "biome format . --check",
63
- "format:fix": "biome format --write .",
64
- "lint": "biome lint .",
65
- "lint:fix": "biome lint --write .",
62
+ "format": "bun --bun biome format . --check",
63
+ "format:fix": "bun --bun biome format --write .",
64
+ "lint": "bun --bun biome lint .",
65
+ "lint:fix": "bun --bun biome lint --write .",
66
66
  "prepublish": "cp -f ../../README.md ./README.md",
67
67
  "publish": "bun publish || true",
68
68
  "publish:canary": "bun publish --access public --tag canary || true",
69
69
  "publish:latest": "bun publish --access public --tag latest || true",
70
- "test": "vitest run",
71
- "test:watch": "vitest",
70
+ "test": "bun --bun vitest run",
71
+ "test:watch": "bun --bun vitest",
72
72
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
73
73
  },
74
74
  "dependencies": {
75
- "@intlayer/api": "8.2.3",
76
- "@intlayer/config": "8.2.3",
77
- "@intlayer/core": "8.2.3",
78
- "@intlayer/editor": "8.2.3",
79
- "@intlayer/types": "8.2.3",
80
- "@intlayer/unmerged-dictionaries-entry": "8.2.3"
75
+ "@intlayer/api": "8.3.0-canary.1",
76
+ "@intlayer/config": "8.3.0-canary.1",
77
+ "@intlayer/core": "8.3.0-canary.1",
78
+ "@intlayer/editor": "8.3.0-canary.1",
79
+ "@intlayer/types": "8.3.0-canary.1",
80
+ "@intlayer/unmerged-dictionaries-entry": "8.3.0-canary.1"
81
81
  },
82
82
  "devDependencies": {
83
83
  "@sveltejs/adapter-auto": "7.0.0",
84
84
  "@sveltejs/package": "2.5.4",
85
85
  "@sveltejs/vite-plugin-svelte": "4.0.0",
86
- "@types/node": "25.3.5",
86
+ "@types/node": "25.4.0",
87
87
  "@utils/ts-config": "1.0.4",
88
88
  "@utils/ts-config-types": "1.0.4",
89
89
  "@utils/tsdown-config": "1.0.4",
90
90
  "rimraf": "6.1.3",
91
91
  "svelte": "5.0.0",
92
92
  "svelte-check": "4.0.0",
93
- "tsdown": "0.21.0",
93
+ "tsdown": "0.21.2",
94
94
  "typescript": "5.9.3",
95
95
  "vite": "5.0.0",
96
96
  "vitest": "4.0.18"