intlayer 8.2.4 → 8.3.0-canary.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.
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./_virtual/_rolldown/runtime.cjs`);let t=require(`@intlayer/types`),n=require(`@intlayer/config/built`);n=e.__toESM(n);let r=require(`@intlayer/core/file`),i=require(`@intlayer/core/formatters`),a=require(`@intlayer/core/interpreter`),o=require(`@intlayer/core/localization`),s=require(`@intlayer/core/markdown`),c=require(`@intlayer/core/transpiler`),l=require(`@intlayer/core/utils`);t.Locales.ALL_LOCALES;const u=()=>n.default,d=n.default.internationalization.locales,f=n.default.internationalization.requiredLocales,p=n.default.internationalization.defaultLocale;Object.defineProperty(exports,`Intl`,{enumerable:!0,get:function(){return i.Intl}}),Object.defineProperty(exports,`Locales`,{enumerable:!0,get:function(){return t.Locales}}),Object.defineProperty(exports,`compact`,{enumerable:!0,get:function(){return i.compact}}),Object.defineProperty(exports,`cond`,{enumerable:!0,get:function(){return c.cond}}),exports.configuration=n.default,Object.defineProperty(exports,`currency`,{enumerable:!0,get:function(){return i.currency}}),Object.defineProperty(exports,`date`,{enumerable:!0,get:function(){return i.date}}),exports.defaultLocale=p,Object.defineProperty(exports,`enu`,{enumerable:!0,get:function(){return c.enu}}),Object.defineProperty(exports,`file`,{enumerable:!0,get:function(){return r.file}}),Object.defineProperty(exports,`gender`,{enumerable:!0,get:function(){return c.gender}}),Object.defineProperty(exports,`getBrowserLocale`,{enumerable:!0,get:function(){return o.getBrowserLocale}}),Object.defineProperty(exports,`getCanonicalPath`,{enumerable:!0,get:function(){return o.getCanonicalPath}}),exports.getConfiguration=u,Object.defineProperty(exports,`getCookie`,{enumerable:!0,get:function(){return l.getCookie}}),Object.defineProperty(exports,`getDictionary`,{enumerable:!0,get:function(){return a.getDictionary}}),Object.defineProperty(exports,`getEnumeration`,{enumerable:!0,get:function(){return a.getEnumeration}}),Object.defineProperty(exports,`getEnumerationContent`,{enumerable:!0,get:function(){return a.getEnumeration}}),Object.defineProperty(exports,`getHTMLTextDir`,{enumerable:!0,get:function(){return o.getHTMLTextDir}}),Object.defineProperty(exports,`getIntlayer`,{enumerable:!0,get:function(){return a.getIntlayer}}),Object.defineProperty(exports,`getLocale`,{enumerable:!0,get:function(){return o.getLocale}}),Object.defineProperty(exports,`getLocaleFromPath`,{enumerable:!0,get:function(){return o.getLocaleFromPath}}),Object.defineProperty(exports,`getLocaleFromStorage`,{enumerable:!0,get:function(){return l.getLocaleFromStorage}}),Object.defineProperty(exports,`getLocaleLang`,{enumerable:!0,get:function(){return o.getLocaleLang}}),Object.defineProperty(exports,`getLocaleName`,{enumerable:!0,get:function(){return o.getLocaleName}}),Object.defineProperty(exports,`getLocalizedPath`,{enumerable:!0,get:function(){return o.getLocalizedPath}}),Object.defineProperty(exports,`getLocalizedUrl`,{enumerable:!0,get:function(){return o.getLocalizedUrl}}),Object.defineProperty(exports,`getMarkdownMetadata`,{enumerable:!0,get:function(){return s.getMarkdownMetadata}}),Object.defineProperty(exports,`getMultilingualUrls`,{enumerable:!0,get:function(){return o.getMultilingualUrls}}),Object.defineProperty(exports,`getNesting`,{enumerable:!0,get:function(){return a.getNesting}}),Object.defineProperty(exports,`getPathWithoutLocale`,{enumerable:!0,get:function(){return o.getPathWithoutLocale}}),Object.defineProperty(exports,`getPrefix`,{enumerable:!0,get:function(){return o.getPrefix}}),Object.defineProperty(exports,`getRewriteRules`,{enumerable:!0,get:function(){return o.getRewriteRules}}),Object.defineProperty(exports,`getTranslation`,{enumerable:!0,get:function(){return a.getTranslation}}),Object.defineProperty(exports,`getTranslationContent`,{enumerable:!0,get:function(){return a.getTranslation}}),Object.defineProperty(exports,`html`,{enumerable:!0,get:function(){return c.html}}),Object.defineProperty(exports,`insert`,{enumerable:!0,get:function(){return c.insert}}),Object.defineProperty(exports,`localeDetector`,{enumerable:!0,get:function(){return o.localeDetector}}),Object.defineProperty(exports,`localeFlatMap`,{enumerable:!0,get:function(){return o.localeFlatMap}}),Object.defineProperty(exports,`localeMap`,{enumerable:!0,get:function(){return o.localeMap}}),Object.defineProperty(exports,`localeRecord`,{enumerable:!0,get:function(){return o.localeRecord}}),Object.defineProperty(exports,`localeResolver`,{enumerable:!0,get:function(){return o.localeResolver}}),exports.locales=d,Object.defineProperty(exports,`md`,{enumerable:!0,get:function(){return c.md}}),Object.defineProperty(exports,`nest`,{enumerable:!0,get:function(){return c.nest}}),Object.defineProperty(exports,`number`,{enumerable:!0,get:function(){return i.number}}),Object.defineProperty(exports,`percentage`,{enumerable:!0,get:function(){return i.percentage}}),Object.defineProperty(exports,`relativeTime`,{enumerable:!0,get:function(){return i.relativeTime}}),exports.requiredLocales=f,Object.defineProperty(exports,`setLocaleInStorage`,{enumerable:!0,get:function(){return l.setLocaleInStorage}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c.t}}),Object.defineProperty(exports,`units`,{enumerable:!0,get:function(){return i.units}}),Object.defineProperty(exports,`validatePrefix`,{enumerable:!0,get:function(){return o.validatePrefix}});
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./_virtual/_rolldown/runtime.cjs`);let t=require(`@intlayer/types/allLocales`),n=require(`@intlayer/types/locales`);n=e.__toESM(n);let r=require(`@intlayer/config/built`);r=e.__toESM(r);let i=require(`@intlayer/core/file`),a=require(`@intlayer/core/formatters`),o=require(`@intlayer/core/interpreter`),s=require(`@intlayer/core/localization`),c=require(`@intlayer/core/markdown`),l=require(`@intlayer/core/transpiler`),u=require(`@intlayer/core/utils`);const d=()=>r.default,f=r.default.internationalization.locales,p=r.default.internationalization.requiredLocales,m=r.default.internationalization.defaultLocale;Object.defineProperty(exports,`ALL_LOCALES`,{enumerable:!0,get:function(){return t.ALL_LOCALES}}),Object.defineProperty(exports,`Intl`,{enumerable:!0,get:function(){return a.Intl}}),Object.defineProperty(exports,`Locales`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`compact`,{enumerable:!0,get:function(){return a.compact}}),Object.defineProperty(exports,`cond`,{enumerable:!0,get:function(){return l.cond}}),exports.configuration=r.default,Object.defineProperty(exports,`currency`,{enumerable:!0,get:function(){return a.currency}}),Object.defineProperty(exports,`date`,{enumerable:!0,get:function(){return a.date}}),exports.defaultLocale=m,Object.defineProperty(exports,`enu`,{enumerable:!0,get:function(){return l.enu}}),Object.defineProperty(exports,`file`,{enumerable:!0,get:function(){return i.file}}),Object.defineProperty(exports,`gender`,{enumerable:!0,get:function(){return l.gender}}),Object.defineProperty(exports,`getBrowserLocale`,{enumerable:!0,get:function(){return s.getBrowserLocale}}),Object.defineProperty(exports,`getCanonicalPath`,{enumerable:!0,get:function(){return s.getCanonicalPath}}),exports.getConfiguration=d,Object.defineProperty(exports,`getCookie`,{enumerable:!0,get:function(){return u.getCookie}}),Object.defineProperty(exports,`getDictionary`,{enumerable:!0,get:function(){return o.getDictionary}}),Object.defineProperty(exports,`getEnumeration`,{enumerable:!0,get:function(){return o.getEnumeration}}),Object.defineProperty(exports,`getEnumerationContent`,{enumerable:!0,get:function(){return o.getEnumeration}}),Object.defineProperty(exports,`getHTMLTextDir`,{enumerable:!0,get:function(){return s.getHTMLTextDir}}),Object.defineProperty(exports,`getIntlayer`,{enumerable:!0,get:function(){return o.getIntlayer}}),Object.defineProperty(exports,`getLocale`,{enumerable:!0,get:function(){return s.getLocale}}),Object.defineProperty(exports,`getLocaleFromPath`,{enumerable:!0,get:function(){return s.getLocaleFromPath}}),Object.defineProperty(exports,`getLocaleFromStorage`,{enumerable:!0,get:function(){return u.getLocaleFromStorage}}),Object.defineProperty(exports,`getLocaleLang`,{enumerable:!0,get:function(){return s.getLocaleLang}}),Object.defineProperty(exports,`getLocaleName`,{enumerable:!0,get:function(){return s.getLocaleName}}),Object.defineProperty(exports,`getLocalizedPath`,{enumerable:!0,get:function(){return s.getLocalizedPath}}),Object.defineProperty(exports,`getLocalizedUrl`,{enumerable:!0,get:function(){return s.getLocalizedUrl}}),Object.defineProperty(exports,`getMarkdownMetadata`,{enumerable:!0,get:function(){return c.getMarkdownMetadata}}),Object.defineProperty(exports,`getMultilingualUrls`,{enumerable:!0,get:function(){return s.getMultilingualUrls}}),Object.defineProperty(exports,`getNesting`,{enumerable:!0,get:function(){return o.getNesting}}),Object.defineProperty(exports,`getPathWithoutLocale`,{enumerable:!0,get:function(){return s.getPathWithoutLocale}}),Object.defineProperty(exports,`getPrefix`,{enumerable:!0,get:function(){return s.getPrefix}}),Object.defineProperty(exports,`getRewriteRules`,{enumerable:!0,get:function(){return s.getRewriteRules}}),Object.defineProperty(exports,`getTranslation`,{enumerable:!0,get:function(){return o.getTranslation}}),Object.defineProperty(exports,`getTranslationContent`,{enumerable:!0,get:function(){return o.getTranslation}}),Object.defineProperty(exports,`html`,{enumerable:!0,get:function(){return l.html}}),Object.defineProperty(exports,`insert`,{enumerable:!0,get:function(){return l.insert}}),Object.defineProperty(exports,`localeDetector`,{enumerable:!0,get:function(){return s.localeDetector}}),Object.defineProperty(exports,`localeFlatMap`,{enumerable:!0,get:function(){return s.localeFlatMap}}),Object.defineProperty(exports,`localeMap`,{enumerable:!0,get:function(){return s.localeMap}}),Object.defineProperty(exports,`localeRecord`,{enumerable:!0,get:function(){return s.localeRecord}}),Object.defineProperty(exports,`localeResolver`,{enumerable:!0,get:function(){return s.localeResolver}}),exports.locales=f,Object.defineProperty(exports,`md`,{enumerable:!0,get:function(){return l.md}}),Object.defineProperty(exports,`nest`,{enumerable:!0,get:function(){return l.nest}}),Object.defineProperty(exports,`number`,{enumerable:!0,get:function(){return a.number}}),Object.defineProperty(exports,`percentage`,{enumerable:!0,get:function(){return a.percentage}}),Object.defineProperty(exports,`relativeTime`,{enumerable:!0,get:function(){return a.relativeTime}}),exports.requiredLocales=p,Object.defineProperty(exports,`setLocaleInStorage`,{enumerable:!0,get:function(){return u.setLocaleInStorage}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l.t}}),Object.defineProperty(exports,`units`,{enumerable:!0,get:function(){return a.units}}),Object.defineProperty(exports,`validatePrefix`,{enumerable:!0,get:function(){return s.validatePrefix}});
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["Locales","configuration"],"sources":["../../src/index.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noEmptyInterface: Intlayer module augmentation registries */\nimport {\n type Dictionary as DictionaryCore,\n type CustomIntlayerConfig as IntlayerConfig,\n Locales,\n type SchemaKeys,\n} from '@intlayer/types';\n\n/**\n * The dictionary type used to define the structure of a dictionary.\n * It is used to provide type safety and autocompletion when defining a dictionary.\n *\n * @example\n * ```ts\n * import { Dictionary } from 'intlayer';\n *\n * const dictionary: Dictionary = { ... };\n * ```\n */\ntype Dictionary<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = DictionaryCore<T, SchemaKey, true>;\n\n/**\n * The content of a dictionary.\n *\n * @deprecated Use `Dictionary<T>` instead.\n */\ntype DeclarationContent<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = Dictionary<T, SchemaKey>;\n\n/**\n * A list of all supported locales.\n *\n * @deprecated Use `Locales.ALL_LOCALES` instead.\n */\nconst localeList = Locales.ALL_LOCALES;\n\nexport {\n type ContentNode,\n type Locale,\n Locales,\n type LocalesValues,\n type StrictModeLocaleMap,\n} from '@intlayer/types';\nexport type { DeclarationContent, Dictionary, IntlayerConfig, localeList };\n\n/**\n * Rexport using named import because πof Tsup bug in CJS\n */\n/**\n * The configuration of Intlayer.\n */\nimport configuration from '@intlayer/config/built';\n\n/**\n * Returns the configuration of Intlayer.\n */\nconst getConfiguration = () => configuration;\n\n/**\n * The locales defined in the configuration.\n */\nconst locales = configuration.internationalization.locales;\n\n/**\n * The required locales defined in the configuration.\n */\nconst requiredLocales = configuration.internationalization.requiredLocales;\n\n/**\n * The default locale defined in the configuration.\n */\nconst defaultLocale = configuration.internationalization.defaultLocale;\n\n// Reexport here for CJS compatibility\n// Fix ReferenceError: Cannot access 'xxx' before initialization\nexport {\n configuration,\n getConfiguration,\n locales,\n requiredLocales,\n defaultLocale,\n};\n\nexport { file } from '@intlayer/core/file'; // Include specific export for browser because of node js function that can't be used in browser\nexport {\n compact,\n currency,\n date,\n Intl,\n number,\n percentage,\n relativeTime,\n units,\n} from '@intlayer/core/formatters';\nexport {\n getDictionary,\n getEnumeration /**\n * @deprecated Use `getEnumeration` instead.\n */,\n getEnumeration as getEnumerationContent,\n getIntlayer,\n getNesting,\n getTranslation /**\n * @deprecated Use `getTranslation` instead.\n */,\n getTranslation as getTranslationContent,\n} from '@intlayer/core/interpreter';\nexport {\n getBrowserLocale,\n getCanonicalPath,\n getHTMLTextDir,\n getLocale,\n getLocaleFromPath,\n getLocaleLang,\n getLocaleName,\n getLocalizedPath,\n getLocalizedUrl,\n getMultilingualUrls,\n getPathWithoutLocale,\n getPrefix,\n getRewriteRules,\n localeDetector,\n localeFlatMap,\n localeMap,\n localeRecord,\n localeResolver,\n validatePrefix,\n} from '@intlayer/core/localization';\nexport { getMarkdownMetadata } from '@intlayer/core/markdown';\nexport {\n cond,\n enu,\n gender,\n html,\n insert,\n md,\n nest,\n t,\n} from '@intlayer/core/transpiler';\nexport {\n getCookie,\n getLocaleFromStorage,\n setLocaleInStorage,\n} from '@intlayer/core/utils';\n\n// --- Registries to be augmented by the generator ---\nexport interface __DictionaryRegistry {} // id -> interfaceof ictionary\nexport interface __DeclaredLocalesRegistry {} // 'fr': 1, 'en': 1, ...\nexport interface __RequiredLocalesRegistry {} // 'en': 1, ...\nexport interface __SchemaRegistry {} // id -> interface of schema\nexport interface __StrictModeRegistry {} // one of: { strict: true } | { inclusive: true } | { loose: true }\n"],"mappings":"sdAuCmBA,EAAAA,QAAQ,YAsB3B,MAAM,MAAyBC,EAAAA,QAKzB,EAAUA,EAAAA,QAAc,qBAAqB,QAK7C,EAAkBA,EAAAA,QAAc,qBAAqB,gBAKrD,EAAgBA,EAAAA,QAAc,qBAAqB"}
1
+ {"version":3,"file":"index.cjs","names":["configuration"],"sources":["../../src/index.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noEmptyInterface: Intlayer module augmentation registries */\n\nimport type { CustomIntlayerConfig as IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary as DictionaryCore } from '@intlayer/types/dictionary';\nimport type { SchemaKeys } from '@intlayer/types/module_augmentation';\n\n/**\n * The dictionary type used to define the structure of a dictionary.\n * It is used to provide type safety and autocompletion when defining a dictionary.\n *\n * @example\n * ```ts\n * import { Dictionary } from 'intlayer';\n *\n * const dictionary: Dictionary = { ... };\n * ```\n */\ntype Dictionary<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = DictionaryCore<T, SchemaKey, true>;\n\n/**\n * The content of a dictionary.\n *\n * @deprecated Use `Dictionary<T>` instead.\n */\ntype DeclarationContent<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = Dictionary<T, SchemaKey>;\n\nexport { ALL_LOCALES, type Locale } from '@intlayer/types/allLocales';\nexport type { ContentNode } from '@intlayer/types/dictionary';\nexport type {\n LocalesValues,\n StrictModeLocaleMap,\n} from '@intlayer/types/module_augmentation';\n\nimport * as Locales from '@intlayer/types/locales';\nexport type { DeclarationContent, Dictionary, IntlayerConfig };\n\n/**\n * Rexport using named import because πof Tsup bug in CJS\n */\n/**\n * The configuration of Intlayer.\n */\nimport configuration from '@intlayer/config/built';\n\n/**\n * Returns the configuration of Intlayer.\n */\nconst getConfiguration = () => configuration;\n\n/**\n * The locales defined in the configuration.\n */\nconst locales = configuration.internationalization.locales;\n\n/**\n * The required locales defined in the configuration.\n */\nconst requiredLocales = configuration.internationalization.requiredLocales;\n\n/**\n * The default locale defined in the configuration.\n */\nconst defaultLocale = configuration.internationalization.defaultLocale;\n\n// Reexport here for CJS compatibility\n// Fix ReferenceError: Cannot access 'xxx' before initialization\nexport {\n configuration,\n getConfiguration,\n locales,\n requiredLocales,\n defaultLocale,\n Locales,\n};\n\nexport { file } from '@intlayer/core/file'; // Include specific export for browser because of node js function that can't be used in browser\nexport {\n compact,\n currency,\n date,\n Intl,\n number,\n percentage,\n relativeTime,\n units,\n} from '@intlayer/core/formatters';\nexport {\n getDictionary,\n getEnumeration,\n /**\n * @deprecated Use `getEnumeration` instead.\n */\n getEnumeration as getEnumerationContent,\n getIntlayer,\n getNesting,\n getTranslation,\n /**\n * @deprecated Use `getTranslation` instead.\n */\n getTranslation as getTranslationContent,\n} from '@intlayer/core/interpreter';\nexport {\n getBrowserLocale,\n getCanonicalPath,\n getHTMLTextDir,\n getLocale,\n getLocaleFromPath,\n getLocaleLang,\n getLocaleName,\n getLocalizedPath,\n getLocalizedUrl,\n getMultilingualUrls,\n getPathWithoutLocale,\n getPrefix,\n getRewriteRules,\n localeDetector,\n localeFlatMap,\n localeMap,\n localeRecord,\n localeResolver,\n validatePrefix,\n} from '@intlayer/core/localization';\nexport { getMarkdownMetadata } from '@intlayer/core/markdown';\nexport {\n cond,\n enu,\n gender,\n html,\n insert,\n md,\n nest,\n t,\n} from '@intlayer/core/transpiler';\nexport {\n getCookie,\n getLocaleFromStorage,\n setLocaleInStorage,\n} from '@intlayer/core/utils';\n\n// --- Registries to be augmented by the generator ---\nexport interface __DictionaryRegistry {} // id -> interfaceof ictionary\nexport interface __DeclaredLocalesRegistry {} // 'fr': 1, 'en': 1, ...\nexport interface __RequiredLocalesRegistry {} // 'en': 1, ...\nexport interface __SchemaRegistry {} // id -> interface of schema\nexport interface __StrictModeRegistry {} // one of: { strict: true } | { inclusive: true } | { loose: true }\n"],"mappings":"yhBAqDA,MAAM,MAAyBA,EAAAA,QAKzB,EAAUA,EAAAA,QAAc,qBAAqB,QAK7C,EAAkBA,EAAAA,QAAc,qBAAqB,gBAKrD,EAAgBA,EAAAA,QAAc,qBAAqB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/routing/index.ts"],"sourcesContent":["import type {\n RewriteObject,\n RewriteRule,\n RewriteRules,\n StrictModeLocaleMap,\n} from '@intlayer/types';\n\nconst buildRules = (\n rules: Record<string, StrictModeLocaleMap<string>>,\n processor: (pattern: string) => string\n): RewriteRules => ({\n rules: Object.entries(rules).map(([canonical, localized]) => ({\n canonical: processor(canonical),\n localized: Object.fromEntries(\n Object.entries(localized).map(([locale, pattern]) => [\n locale,\n pattern ? processor(pattern) : pattern,\n ])\n ) as StrictModeLocaleMap<string>,\n })) as RewriteRule[],\n});\n\nconst cleanPath = (pattern: string) =>\n pattern.startsWith('/') ? pattern : `/${pattern}`;\n\n/**\n * Standardizes pattern to :param syntax.\n * Supports:\n * - Next.js/SvelteKit/Nuxt: [slug], [...slug], [[slug]]\n * - TanStack Router: $slug\n * - Solid Router: *slug\n * - React/Vue Router: :slug, *\n */\nconst normalizePattern = (pattern: string, framework?: string) => {\n let normalized = pattern;\n\n if (framework === 'nextjs') {\n normalized = normalized\n .replace(/\\[\\[\\.\\.\\.([^\\]]+)\\]\\]/g, ':$1*') // [[...slug]] -> :slug* (0+)\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1+') // [...slug] -> :slug+ (1+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'sveltekit') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...path] -> :path* (0+)\n .replace(/\\[\\[([^\\]]+)\\]\\]/g, ':$1?') // [[optional]] -> :optional? (0-1)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'nuxt') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...slug] -> :slug* (0+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else {\n // Default / Generic (React Router, Vue Router, Solid Router, TanStack Router)\n normalized = normalized\n .replace(/\\$([^/]+)/g, ':$1') // TanStack $slug -> :slug\n .replace(/\\*([^/]+)/g, ':$1*') // Solid *slug -> :slug*\n .replace(/:([^/]+)\\?/g, ':$1?') // Vue Router/React Router :slug? -> :slug?\n .replace(/\\*/g, ':path*'); // React Router * -> :path*\n }\n\n return normalized;\n};\n\n/**\n * Removes locale markers from the pattern.\n */\nconst stripLocale = (pattern: string) =>\n pattern\n .replace(/\\/?(:locale|\\[locale\\]|\\$locale)\\/?/g, '/')\n .replace(/\\/+/g, '/')\n .replace(/\\/$/, '') || '/';\n\n/**\n * Factory to create formatters that populate 'url' and a specific proxy key.\n */\nconst createFormatter =\n (proxyKey: 'nextjs' | 'vite', framework?: string) =>\n <T extends string = string>(\n rules: Record<T, StrictModeLocaleMap<string>>\n ): RewriteObject => {\n const normalize = (pattern: string) => normalizePattern(pattern, framework);\n const strip = (pattern: string) => stripLocale(normalize(pattern));\n\n return {\n url: buildRules(rules as any, (pattern) => cleanPath(strip(pattern))),\n [proxyKey]: buildRules(rules as any, (pattern) =>\n cleanPath(normalize(pattern))\n ),\n } as RewriteObject;\n };\n\n/**\n * Formatter for Next.js style rewrites.\n * Patterns use Next.js dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (1+)\n * - Optional catch-all: `[[...slug]]` (0+)\n * - Locale: `[locale]`\n */\nexport const nextjsRewrite = createFormatter('nextjs', 'nextjs');\n\n/**\n * Formatter for SvelteKit style rewrites.\n * Patterns use SvelteKit dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const svelteKitRewrite = createFormatter('vite', 'sveltekit');\n\n/**\n * Formatter for React Router style rewrites.\n * Patterns use React Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `*`\n * - Locale: `:locale`\n */\nexport const reactRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Vue style rewrites.\n * Patterns use Vue Router 4 dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `:slug*` or `:slug+`\n * - Locale: `:locale`\n */\nexport const vueRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Solid Router style rewrites.\n * Patterns use Solid Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Catch-all: `*slug`\n * - Locale: `:locale`\n */\nexport const solidRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Nuxt style rewrites.\n * Patterns use Nuxt 3 dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const nuxtRewrite = createFormatter('vite', 'nuxt');\n\n/**\n * Formatter for TanStack Router style rewrites.\n * Patterns use TanStack Router dynamic routing syntax:\n * - Slug: `$slug`\n * - Catch-all: `*`\n * - Locale: `$locale`\n */\nexport const tanstackRouterRewrite = createFormatter('vite');\n\n/**\n * Generic formatter for Vite-based projects.\n * Supports most dynamic routing syntaxes and normalizes them for the Vite proxy.\n */\nexport const viteRewrite = createFormatter('vite');\n"],"mappings":"mEAOA,MAAM,GACJ,EACA,KACkB,CAClB,MAAO,OAAO,QAAQ,EAAM,CAAC,KAAK,CAAC,EAAW,MAAgB,CAC5D,UAAW,EAAU,EAAU,CAC/B,UAAW,OAAO,YAChB,OAAO,QAAQ,EAAU,CAAC,KAAK,CAAC,EAAQ,KAAa,CACnD,EACA,GAAU,EAAU,EAAQ,CAC7B,CAAC,CACH,CACF,EAAE,CACJ,EAEK,EAAa,GACjB,EAAQ,WAAW,IAAI,CAAG,EAAU,IAAI,IAUpC,GAAoB,EAAiB,IAAuB,CAChE,IAAI,EAAa,EAyBjB,MAvBA,CAgBE,EAhBE,IAAc,SACH,EACV,QAAQ,0BAA2B,OAAO,CAC1C,QAAQ,sBAAuB,OAAO,CACtC,QAAQ,gBAAiB,MAAM,CACzB,IAAc,YACV,EACV,QAAQ,sBAAuB,OAAO,CACtC,QAAQ,oBAAqB,OAAO,CACpC,QAAQ,gBAAiB,MAAM,CACzB,IAAc,OACV,EACV,QAAQ,sBAAuB,OAAO,CACtC,QAAQ,gBAAiB,MAAM,CAGrB,EACV,QAAQ,aAAc,MAAM,CAC5B,QAAQ,aAAc,OAAO,CAC7B,QAAQ,cAAe,OAAO,CAC9B,QAAQ,MAAO,SAAS,CAGtB,GAMH,EAAe,GACnB,EACG,QAAQ,uCAAwC,IAAI,CACpD,QAAQ,OAAQ,IAAI,CACpB,QAAQ,MAAO,GAAG,EAAI,IAKrB,GACH,EAA6B,IAE5B,GACkB,CAClB,IAAM,EAAa,GAAoB,EAAiB,EAAS,EAAU,CACrE,EAAS,GAAoB,EAAY,EAAU,EAAQ,CAAC,CAElE,MAAO,CACL,IAAK,EAAW,EAAe,GAAY,EAAU,EAAM,EAAQ,CAAC,CAAC,EACpE,GAAW,EAAW,EAAe,GACpC,EAAU,EAAU,EAAQ,CAAC,CAC9B,CACF,EAWQ,EAAgB,EAAgB,SAAU,SAAS,CASnD,EAAmB,EAAgB,OAAQ,YAAY,CAUvD,EAAqB,EAAgB,OAAO,CAU5C,EAAmB,EAAgB,OAAO,CAS1C,EAAqB,EAAgB,OAAO,CAS5C,EAAc,EAAgB,OAAQ,OAAO,CAS7C,EAAwB,EAAgB,OAAO,CAM/C,EAAc,EAAgB,OAAO"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/routing/index.ts"],"sourcesContent":["import type { RewriteObject, RewriteRule, RewriteRules } from '@intlayer/types/config';\nimport type { StrictModeLocaleMap } from '@intlayer/types/module_augmentation';\n\nconst buildRules = (\n rules: Record<string, StrictModeLocaleMap<string>>,\n processor: (pattern: string) => string\n): RewriteRules => ({\n rules: Object.entries(rules).map(([canonical, localized]) => ({\n canonical: processor(canonical),\n localized: Object.fromEntries(\n Object.entries(localized).map(([locale, pattern]) => [\n locale,\n pattern ? processor(pattern) : pattern,\n ])\n ) as StrictModeLocaleMap<string>,\n })) as RewriteRule[],\n});\n\nconst cleanPath = (pattern: string) =>\n pattern.startsWith('/') ? pattern : `/${pattern}`;\n\n/**\n * Standardizes pattern to :param syntax.\n * Supports:\n * - Next.js/SvelteKit/Nuxt: [slug], [...slug], [[slug]]\n * - TanStack Router: $slug\n * - Solid Router: *slug\n * - React/Vue Router: :slug, *\n */\nconst normalizePattern = (pattern: string, framework?: string) => {\n let normalized = pattern;\n\n if (framework === 'nextjs') {\n normalized = normalized\n .replace(/\\[\\[\\.\\.\\.([^\\]]+)\\]\\]/g, ':$1*') // [[...slug]] -> :slug* (0+)\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1+') // [...slug] -> :slug+ (1+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'sveltekit') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...path] -> :path* (0+)\n .replace(/\\[\\[([^\\]]+)\\]\\]/g, ':$1?') // [[optional]] -> :optional? (0-1)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'nuxt') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...slug] -> :slug* (0+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else {\n // Default / Generic (React Router, Vue Router, Solid Router, TanStack Router)\n normalized = normalized\n .replace(/\\$([^/]+)/g, ':$1') // TanStack $slug -> :slug\n .replace(/\\*([^/]+)/g, ':$1*') // Solid *slug -> :slug*\n .replace(/:([^/]+)\\?/g, ':$1?') // Vue Router/React Router :slug? -> :slug?\n .replace(/\\*/g, ':path*'); // React Router * -> :path*\n }\n\n return normalized;\n};\n\n/**\n * Removes locale markers from the pattern.\n */\nconst stripLocale = (pattern: string) =>\n pattern\n .replace(/\\/?(:locale|\\[locale\\]|\\$locale)\\/?/g, '/')\n .replace(/\\/+/g, '/')\n .replace(/\\/$/, '') || '/';\n\n/**\n * Factory to create formatters that populate 'url' and a specific proxy key.\n */\nconst createFormatter =\n (proxyKey: 'nextjs' | 'vite', framework?: string) =>\n <T extends string = string>(\n rules: Record<T, StrictModeLocaleMap<string>>\n ): RewriteObject => {\n const normalize = (pattern: string) => normalizePattern(pattern, framework);\n const strip = (pattern: string) => stripLocale(normalize(pattern));\n\n return {\n url: buildRules(rules as any, (pattern) => cleanPath(strip(pattern))),\n [proxyKey]: buildRules(rules as any, (pattern) =>\n cleanPath(normalize(pattern))\n ),\n } as RewriteObject;\n };\n\n/**\n * Formatter for Next.js style rewrites.\n * Patterns use Next.js dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (1+)\n * - Optional catch-all: `[[...slug]]` (0+)\n * - Locale: `[locale]`\n */\nexport const nextjsRewrite = createFormatter('nextjs', 'nextjs');\n\n/**\n * Formatter for SvelteKit style rewrites.\n * Patterns use SvelteKit dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const svelteKitRewrite = createFormatter('vite', 'sveltekit');\n\n/**\n * Formatter for React Router style rewrites.\n * Patterns use React Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `*`\n * - Locale: `:locale`\n */\nexport const reactRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Vue style rewrites.\n * Patterns use Vue Router 4 dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `:slug*` or `:slug+`\n * - Locale: `:locale`\n */\nexport const vueRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Solid Router style rewrites.\n * Patterns use Solid Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Catch-all: `*slug`\n * - Locale: `:locale`\n */\nexport const solidRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Nuxt style rewrites.\n * Patterns use Nuxt 3 dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const nuxtRewrite = createFormatter('vite', 'nuxt');\n\n/**\n * Formatter for TanStack Router style rewrites.\n * Patterns use TanStack Router dynamic routing syntax:\n * - Slug: `$slug`\n * - Catch-all: `*`\n * - Locale: `$locale`\n */\nexport const tanstackRouterRewrite = createFormatter('vite');\n\n/**\n * Generic formatter for Vite-based projects.\n * Supports most dynamic routing syntaxes and normalizes them for the Vite proxy.\n */\nexport const viteRewrite = createFormatter('vite');\n"],"mappings":"mEAGA,MAAM,GACJ,EACA,KACkB,CAClB,MAAO,OAAO,QAAQ,EAAM,CAAC,KAAK,CAAC,EAAW,MAAgB,CAC5D,UAAW,EAAU,EAAU,CAC/B,UAAW,OAAO,YAChB,OAAO,QAAQ,EAAU,CAAC,KAAK,CAAC,EAAQ,KAAa,CACnD,EACA,GAAU,EAAU,EAAQ,CAC7B,CAAC,CACH,CACF,EAAE,CACJ,EAEK,EAAa,GACjB,EAAQ,WAAW,IAAI,CAAG,EAAU,IAAI,IAUpC,GAAoB,EAAiB,IAAuB,CAChE,IAAI,EAAa,EAyBjB,MAvBA,CAgBE,EAhBE,IAAc,SACH,EACV,QAAQ,0BAA2B,OAAO,CAC1C,QAAQ,sBAAuB,OAAO,CACtC,QAAQ,gBAAiB,MAAM,CACzB,IAAc,YACV,EACV,QAAQ,sBAAuB,OAAO,CACtC,QAAQ,oBAAqB,OAAO,CACpC,QAAQ,gBAAiB,MAAM,CACzB,IAAc,OACV,EACV,QAAQ,sBAAuB,OAAO,CACtC,QAAQ,gBAAiB,MAAM,CAGrB,EACV,QAAQ,aAAc,MAAM,CAC5B,QAAQ,aAAc,OAAO,CAC7B,QAAQ,cAAe,OAAO,CAC9B,QAAQ,MAAO,SAAS,CAGtB,GAMH,EAAe,GACnB,EACG,QAAQ,uCAAwC,IAAI,CACpD,QAAQ,OAAQ,IAAI,CACpB,QAAQ,MAAO,GAAG,EAAI,IAKrB,GACH,EAA6B,IAE5B,GACkB,CAClB,IAAM,EAAa,GAAoB,EAAiB,EAAS,EAAU,CACrE,EAAS,GAAoB,EAAY,EAAU,EAAQ,CAAC,CAElE,MAAO,CACL,IAAK,EAAW,EAAe,GAAY,EAAU,EAAM,EAAQ,CAAC,CAAC,EACpE,GAAW,EAAW,EAAe,GACpC,EAAU,EAAU,EAAQ,CAAC,CAC9B,CACF,EAWQ,EAAgB,EAAgB,SAAU,SAAS,CASnD,EAAmB,EAAgB,OAAQ,YAAY,CAUvD,EAAqB,EAAgB,OAAO,CAU5C,EAAmB,EAAgB,OAAO,CAS1C,EAAqB,EAAgB,OAAO,CAS5C,EAAc,EAAgB,OAAQ,OAAO,CAS7C,EAAwB,EAAgB,OAAO,CAM/C,EAAc,EAAgB,OAAO"}
@@ -1,2 +1,2 @@
1
- import{Locales as e,Locales as t}from"@intlayer/types";import n from"@intlayer/config/built";import{file as r}from"@intlayer/core/file";import{Intl as i,compact as a,currency as o,date as s,number as c,percentage as l,relativeTime as u,units as d}from"@intlayer/core/formatters";import{getDictionary as f,getEnumeration as p,getEnumeration as m,getIntlayer as h,getNesting as g,getTranslation as _,getTranslation as v}from"@intlayer/core/interpreter";import{getBrowserLocale as y,getCanonicalPath as b,getHTMLTextDir as x,getLocale as S,getLocaleFromPath as C,getLocaleLang as w,getLocaleName as T,getLocalizedPath as E,getLocalizedUrl as D,getMultilingualUrls as O,getPathWithoutLocale as k,getPrefix as A,getRewriteRules as j,localeDetector as M,localeFlatMap as N,localeMap as P,localeRecord as F,localeResolver as I,validatePrefix as L}from"@intlayer/core/localization";import{getMarkdownMetadata as R}from"@intlayer/core/markdown";import{cond as z,enu as B,gender as V,html as H,insert as U,md as W,nest as G,t as K}from"@intlayer/core/transpiler";import{getCookie as q,getLocaleFromStorage as J,setLocaleInStorage as Y}from"@intlayer/core/utils";t.ALL_LOCALES;const X=()=>n,Z=n.internationalization.locales,Q=n.internationalization.requiredLocales,$=n.internationalization.defaultLocale;export{i as Intl,e as Locales,a as compact,z as cond,n as configuration,o as currency,s as date,$ as defaultLocale,B as enu,r as file,V as gender,y as getBrowserLocale,b as getCanonicalPath,X as getConfiguration,q as getCookie,f as getDictionary,p as getEnumeration,m as getEnumerationContent,x as getHTMLTextDir,h as getIntlayer,S as getLocale,C as getLocaleFromPath,J as getLocaleFromStorage,w as getLocaleLang,T as getLocaleName,E as getLocalizedPath,D as getLocalizedUrl,R as getMarkdownMetadata,O as getMultilingualUrls,g as getNesting,k as getPathWithoutLocale,A as getPrefix,j as getRewriteRules,_ as getTranslation,v as getTranslationContent,H as html,U as insert,M as localeDetector,N as localeFlatMap,P as localeMap,F as localeRecord,I as localeResolver,Z as locales,W as md,G as nest,c as number,l as percentage,u as relativeTime,Q as requiredLocales,Y as setLocaleInStorage,K as t,d as units,L as validatePrefix};
1
+ import{ALL_LOCALES as e}from"@intlayer/types/allLocales";import*as t from"@intlayer/types/locales";import n from"@intlayer/config/built";import{file as r}from"@intlayer/core/file";import{Intl as i,compact as a,currency as o,date as s,number as c,percentage as l,relativeTime as u,units as d}from"@intlayer/core/formatters";import{getDictionary as f,getEnumeration as p,getEnumeration as m,getIntlayer as h,getNesting as g,getTranslation as _,getTranslation as v}from"@intlayer/core/interpreter";import{getBrowserLocale as y,getCanonicalPath as b,getHTMLTextDir as x,getLocale as S,getLocaleFromPath as C,getLocaleLang as w,getLocaleName as T,getLocalizedPath as E,getLocalizedUrl as D,getMultilingualUrls as O,getPathWithoutLocale as k,getPrefix as A,getRewriteRules as j,localeDetector as M,localeFlatMap as N,localeMap as P,localeRecord as F,localeResolver as I,validatePrefix as L}from"@intlayer/core/localization";import{getMarkdownMetadata as R}from"@intlayer/core/markdown";import{cond as z,enu as B,gender as V,html as H,insert as U,md as W,nest as G,t as K}from"@intlayer/core/transpiler";import{getCookie as q,getLocaleFromStorage as J,setLocaleInStorage as Y}from"@intlayer/core/utils";const X=()=>n,Z=n.internationalization.locales,Q=n.internationalization.requiredLocales,$=n.internationalization.defaultLocale;export{e as ALL_LOCALES,i as Intl,t as Locales,a as compact,z as cond,n as configuration,o as currency,s as date,$ as defaultLocale,B as enu,r as file,V as gender,y as getBrowserLocale,b as getCanonicalPath,X as getConfiguration,q as getCookie,f as getDictionary,p as getEnumeration,m as getEnumerationContent,x as getHTMLTextDir,h as getIntlayer,S as getLocale,C as getLocaleFromPath,J as getLocaleFromStorage,w as getLocaleLang,T as getLocaleName,E as getLocalizedPath,D as getLocalizedUrl,R as getMarkdownMetadata,O as getMultilingualUrls,g as getNesting,k as getPathWithoutLocale,A as getPrefix,j as getRewriteRules,_ as getTranslation,v as getTranslationContent,H as html,U as insert,M as localeDetector,N as localeFlatMap,P as localeMap,F as localeRecord,I as localeResolver,Z as locales,W as md,G as nest,c as number,l as percentage,u as relativeTime,Q as requiredLocales,Y as setLocaleInStorage,K as t,d as units,L as validatePrefix};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Locales"],"sources":["../../src/index.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noEmptyInterface: Intlayer module augmentation registries */\nimport {\n type Dictionary as DictionaryCore,\n type CustomIntlayerConfig as IntlayerConfig,\n Locales,\n type SchemaKeys,\n} from '@intlayer/types';\n\n/**\n * The dictionary type used to define the structure of a dictionary.\n * It is used to provide type safety and autocompletion when defining a dictionary.\n *\n * @example\n * ```ts\n * import { Dictionary } from 'intlayer';\n *\n * const dictionary: Dictionary = { ... };\n * ```\n */\ntype Dictionary<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = DictionaryCore<T, SchemaKey, true>;\n\n/**\n * The content of a dictionary.\n *\n * @deprecated Use `Dictionary<T>` instead.\n */\ntype DeclarationContent<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = Dictionary<T, SchemaKey>;\n\n/**\n * A list of all supported locales.\n *\n * @deprecated Use `Locales.ALL_LOCALES` instead.\n */\nconst localeList = Locales.ALL_LOCALES;\n\nexport {\n type ContentNode,\n type Locale,\n Locales,\n type LocalesValues,\n type StrictModeLocaleMap,\n} from '@intlayer/types';\nexport type { DeclarationContent, Dictionary, IntlayerConfig, localeList };\n\n/**\n * Rexport using named import because πof Tsup bug in CJS\n */\n/**\n * The configuration of Intlayer.\n */\nimport configuration from '@intlayer/config/built';\n\n/**\n * Returns the configuration of Intlayer.\n */\nconst getConfiguration = () => configuration;\n\n/**\n * The locales defined in the configuration.\n */\nconst locales = configuration.internationalization.locales;\n\n/**\n * The required locales defined in the configuration.\n */\nconst requiredLocales = configuration.internationalization.requiredLocales;\n\n/**\n * The default locale defined in the configuration.\n */\nconst defaultLocale = configuration.internationalization.defaultLocale;\n\n// Reexport here for CJS compatibility\n// Fix ReferenceError: Cannot access 'xxx' before initialization\nexport {\n configuration,\n getConfiguration,\n locales,\n requiredLocales,\n defaultLocale,\n};\n\nexport { file } from '@intlayer/core/file'; // Include specific export for browser because of node js function that can't be used in browser\nexport {\n compact,\n currency,\n date,\n Intl,\n number,\n percentage,\n relativeTime,\n units,\n} from '@intlayer/core/formatters';\nexport {\n getDictionary,\n getEnumeration /**\n * @deprecated Use `getEnumeration` instead.\n */,\n getEnumeration as getEnumerationContent,\n getIntlayer,\n getNesting,\n getTranslation /**\n * @deprecated Use `getTranslation` instead.\n */,\n getTranslation as getTranslationContent,\n} from '@intlayer/core/interpreter';\nexport {\n getBrowserLocale,\n getCanonicalPath,\n getHTMLTextDir,\n getLocale,\n getLocaleFromPath,\n getLocaleLang,\n getLocaleName,\n getLocalizedPath,\n getLocalizedUrl,\n getMultilingualUrls,\n getPathWithoutLocale,\n getPrefix,\n getRewriteRules,\n localeDetector,\n localeFlatMap,\n localeMap,\n localeRecord,\n localeResolver,\n validatePrefix,\n} from '@intlayer/core/localization';\nexport { getMarkdownMetadata } from '@intlayer/core/markdown';\nexport {\n cond,\n enu,\n gender,\n html,\n insert,\n md,\n nest,\n t,\n} from '@intlayer/core/transpiler';\nexport {\n getCookie,\n getLocaleFromStorage,\n setLocaleInStorage,\n} from '@intlayer/core/utils';\n\n// --- Registries to be augmented by the generator ---\nexport interface __DictionaryRegistry {} // id -> interfaceof ictionary\nexport interface __DeclaredLocalesRegistry {} // 'fr': 1, 'en': 1, ...\nexport interface __RequiredLocalesRegistry {} // 'en': 1, ...\nexport interface __SchemaRegistry {} // id -> interface of schema\nexport interface __StrictModeRegistry {} // one of: { strict: true } | { inclusive: true } | { loose: true }\n"],"mappings":"goCAuCmBA,EAAQ,YAsB3B,MAAM,MAAyB,EAKzB,EAAU,EAAc,qBAAqB,QAK7C,EAAkB,EAAc,qBAAqB,gBAKrD,EAAgB,EAAc,qBAAqB"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noEmptyInterface: Intlayer module augmentation registries */\n\nimport type { CustomIntlayerConfig as IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary as DictionaryCore } from '@intlayer/types/dictionary';\nimport type { SchemaKeys } from '@intlayer/types/module_augmentation';\n\n/**\n * The dictionary type used to define the structure of a dictionary.\n * It is used to provide type safety and autocompletion when defining a dictionary.\n *\n * @example\n * ```ts\n * import { Dictionary } from 'intlayer';\n *\n * const dictionary: Dictionary = { ... };\n * ```\n */\ntype Dictionary<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = DictionaryCore<T, SchemaKey, true>;\n\n/**\n * The content of a dictionary.\n *\n * @deprecated Use `Dictionary<T>` instead.\n */\ntype DeclarationContent<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = Dictionary<T, SchemaKey>;\n\nexport { ALL_LOCALES, type Locale } from '@intlayer/types/allLocales';\nexport type { ContentNode } from '@intlayer/types/dictionary';\nexport type {\n LocalesValues,\n StrictModeLocaleMap,\n} from '@intlayer/types/module_augmentation';\n\nimport * as Locales from '@intlayer/types/locales';\nexport type { DeclarationContent, Dictionary, IntlayerConfig };\n\n/**\n * Rexport using named import because πof Tsup bug in CJS\n */\n/**\n * The configuration of Intlayer.\n */\nimport configuration from '@intlayer/config/built';\n\n/**\n * Returns the configuration of Intlayer.\n */\nconst getConfiguration = () => configuration;\n\n/**\n * The locales defined in the configuration.\n */\nconst locales = configuration.internationalization.locales;\n\n/**\n * The required locales defined in the configuration.\n */\nconst requiredLocales = configuration.internationalization.requiredLocales;\n\n/**\n * The default locale defined in the configuration.\n */\nconst defaultLocale = configuration.internationalization.defaultLocale;\n\n// Reexport here for CJS compatibility\n// Fix ReferenceError: Cannot access 'xxx' before initialization\nexport {\n configuration,\n getConfiguration,\n locales,\n requiredLocales,\n defaultLocale,\n Locales,\n};\n\nexport { file } from '@intlayer/core/file'; // Include specific export for browser because of node js function that can't be used in browser\nexport {\n compact,\n currency,\n date,\n Intl,\n number,\n percentage,\n relativeTime,\n units,\n} from '@intlayer/core/formatters';\nexport {\n getDictionary,\n getEnumeration,\n /**\n * @deprecated Use `getEnumeration` instead.\n */\n getEnumeration as getEnumerationContent,\n getIntlayer,\n getNesting,\n getTranslation,\n /**\n * @deprecated Use `getTranslation` instead.\n */\n getTranslation as getTranslationContent,\n} from '@intlayer/core/interpreter';\nexport {\n getBrowserLocale,\n getCanonicalPath,\n getHTMLTextDir,\n getLocale,\n getLocaleFromPath,\n getLocaleLang,\n getLocaleName,\n getLocalizedPath,\n getLocalizedUrl,\n getMultilingualUrls,\n getPathWithoutLocale,\n getPrefix,\n getRewriteRules,\n localeDetector,\n localeFlatMap,\n localeMap,\n localeRecord,\n localeResolver,\n validatePrefix,\n} from '@intlayer/core/localization';\nexport { getMarkdownMetadata } from '@intlayer/core/markdown';\nexport {\n cond,\n enu,\n gender,\n html,\n insert,\n md,\n nest,\n t,\n} from '@intlayer/core/transpiler';\nexport {\n getCookie,\n getLocaleFromStorage,\n setLocaleInStorage,\n} from '@intlayer/core/utils';\n\n// --- Registries to be augmented by the generator ---\nexport interface __DictionaryRegistry {} // id -> interfaceof ictionary\nexport interface __DeclaredLocalesRegistry {} // 'fr': 1, 'en': 1, ...\nexport interface __RequiredLocalesRegistry {} // 'en': 1, ...\nexport interface __SchemaRegistry {} // id -> interface of schema\nexport interface __StrictModeRegistry {} // one of: { strict: true } | { inclusive: true } | { loose: true }\n"],"mappings":"4qCAqDA,MAAM,MAAyB,EAKzB,EAAU,EAAc,qBAAqB,QAK7C,EAAkB,EAAc,qBAAqB,gBAKrD,EAAgB,EAAc,qBAAqB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/routing/index.ts"],"sourcesContent":["import type {\n RewriteObject,\n RewriteRule,\n RewriteRules,\n StrictModeLocaleMap,\n} from '@intlayer/types';\n\nconst buildRules = (\n rules: Record<string, StrictModeLocaleMap<string>>,\n processor: (pattern: string) => string\n): RewriteRules => ({\n rules: Object.entries(rules).map(([canonical, localized]) => ({\n canonical: processor(canonical),\n localized: Object.fromEntries(\n Object.entries(localized).map(([locale, pattern]) => [\n locale,\n pattern ? processor(pattern) : pattern,\n ])\n ) as StrictModeLocaleMap<string>,\n })) as RewriteRule[],\n});\n\nconst cleanPath = (pattern: string) =>\n pattern.startsWith('/') ? pattern : `/${pattern}`;\n\n/**\n * Standardizes pattern to :param syntax.\n * Supports:\n * - Next.js/SvelteKit/Nuxt: [slug], [...slug], [[slug]]\n * - TanStack Router: $slug\n * - Solid Router: *slug\n * - React/Vue Router: :slug, *\n */\nconst normalizePattern = (pattern: string, framework?: string) => {\n let normalized = pattern;\n\n if (framework === 'nextjs') {\n normalized = normalized\n .replace(/\\[\\[\\.\\.\\.([^\\]]+)\\]\\]/g, ':$1*') // [[...slug]] -> :slug* (0+)\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1+') // [...slug] -> :slug+ (1+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'sveltekit') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...path] -> :path* (0+)\n .replace(/\\[\\[([^\\]]+)\\]\\]/g, ':$1?') // [[optional]] -> :optional? (0-1)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'nuxt') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...slug] -> :slug* (0+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else {\n // Default / Generic (React Router, Vue Router, Solid Router, TanStack Router)\n normalized = normalized\n .replace(/\\$([^/]+)/g, ':$1') // TanStack $slug -> :slug\n .replace(/\\*([^/]+)/g, ':$1*') // Solid *slug -> :slug*\n .replace(/:([^/]+)\\?/g, ':$1?') // Vue Router/React Router :slug? -> :slug?\n .replace(/\\*/g, ':path*'); // React Router * -> :path*\n }\n\n return normalized;\n};\n\n/**\n * Removes locale markers from the pattern.\n */\nconst stripLocale = (pattern: string) =>\n pattern\n .replace(/\\/?(:locale|\\[locale\\]|\\$locale)\\/?/g, '/')\n .replace(/\\/+/g, '/')\n .replace(/\\/$/, '') || '/';\n\n/**\n * Factory to create formatters that populate 'url' and a specific proxy key.\n */\nconst createFormatter =\n (proxyKey: 'nextjs' | 'vite', framework?: string) =>\n <T extends string = string>(\n rules: Record<T, StrictModeLocaleMap<string>>\n ): RewriteObject => {\n const normalize = (pattern: string) => normalizePattern(pattern, framework);\n const strip = (pattern: string) => stripLocale(normalize(pattern));\n\n return {\n url: buildRules(rules as any, (pattern) => cleanPath(strip(pattern))),\n [proxyKey]: buildRules(rules as any, (pattern) =>\n cleanPath(normalize(pattern))\n ),\n } as RewriteObject;\n };\n\n/**\n * Formatter for Next.js style rewrites.\n * Patterns use Next.js dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (1+)\n * - Optional catch-all: `[[...slug]]` (0+)\n * - Locale: `[locale]`\n */\nexport const nextjsRewrite = createFormatter('nextjs', 'nextjs');\n\n/**\n * Formatter for SvelteKit style rewrites.\n * Patterns use SvelteKit dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const svelteKitRewrite = createFormatter('vite', 'sveltekit');\n\n/**\n * Formatter for React Router style rewrites.\n * Patterns use React Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `*`\n * - Locale: `:locale`\n */\nexport const reactRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Vue style rewrites.\n * Patterns use Vue Router 4 dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `:slug*` or `:slug+`\n * - Locale: `:locale`\n */\nexport const vueRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Solid Router style rewrites.\n * Patterns use Solid Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Catch-all: `*slug`\n * - Locale: `:locale`\n */\nexport const solidRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Nuxt style rewrites.\n * Patterns use Nuxt 3 dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const nuxtRewrite = createFormatter('vite', 'nuxt');\n\n/**\n * Formatter for TanStack Router style rewrites.\n * Patterns use TanStack Router dynamic routing syntax:\n * - Slug: `$slug`\n * - Catch-all: `*`\n * - Locale: `$locale`\n */\nexport const tanstackRouterRewrite = createFormatter('vite');\n\n/**\n * Generic formatter for Vite-based projects.\n * Supports most dynamic routing syntaxes and normalizes them for the Vite proxy.\n */\nexport const viteRewrite = createFormatter('vite');\n"],"mappings":"AAOA,MAAM,GACJ,EACA,KACkB,CAClB,MAAO,OAAO,QAAQ,EAAM,CAAC,KAAK,CAAC,EAAW,MAAgB,CAC5D,UAAW,EAAU,EAAU,CAC/B,UAAW,OAAO,YAChB,OAAO,QAAQ,EAAU,CAAC,KAAK,CAAC,EAAQ,KAAa,CACnD,EACA,GAAU,EAAU,EAAQ,CAC7B,CAAC,CACH,CACF,EAAE,CACJ,EAEK,EAAa,GACjB,EAAQ,WAAW,IAAI,CAAG,EAAU,IAAI,IAUpC,GAAoB,EAAiB,IAAuB,CAChE,IAAI,EAAa,EAyBjB,MAvBA,CAgBE,EAhBE,IAAc,SACH,EACV,QAAQ,0BAA2B,OAAO,CAC1C,QAAQ,sBAAuB,OAAO,CACtC,QAAQ,gBAAiB,MAAM,CACzB,IAAc,YACV,EACV,QAAQ,sBAAuB,OAAO,CACtC,QAAQ,oBAAqB,OAAO,CACpC,QAAQ,gBAAiB,MAAM,CACzB,IAAc,OACV,EACV,QAAQ,sBAAuB,OAAO,CACtC,QAAQ,gBAAiB,MAAM,CAGrB,EACV,QAAQ,aAAc,MAAM,CAC5B,QAAQ,aAAc,OAAO,CAC7B,QAAQ,cAAe,OAAO,CAC9B,QAAQ,MAAO,SAAS,CAGtB,GAMH,EAAe,GACnB,EACG,QAAQ,uCAAwC,IAAI,CACpD,QAAQ,OAAQ,IAAI,CACpB,QAAQ,MAAO,GAAG,EAAI,IAKrB,GACH,EAA6B,IAE5B,GACkB,CAClB,IAAM,EAAa,GAAoB,EAAiB,EAAS,EAAU,CACrE,EAAS,GAAoB,EAAY,EAAU,EAAQ,CAAC,CAElE,MAAO,CACL,IAAK,EAAW,EAAe,GAAY,EAAU,EAAM,EAAQ,CAAC,CAAC,EACpE,GAAW,EAAW,EAAe,GACpC,EAAU,EAAU,EAAQ,CAAC,CAC9B,CACF,EAWQ,EAAgB,EAAgB,SAAU,SAAS,CASnD,EAAmB,EAAgB,OAAQ,YAAY,CAUvD,EAAqB,EAAgB,OAAO,CAU5C,EAAmB,EAAgB,OAAO,CAS1C,EAAqB,EAAgB,OAAO,CAS5C,EAAc,EAAgB,OAAQ,OAAO,CAS7C,EAAwB,EAAgB,OAAO,CAM/C,EAAc,EAAgB,OAAO"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/routing/index.ts"],"sourcesContent":["import type { RewriteObject, RewriteRule, RewriteRules } from '@intlayer/types/config';\nimport type { StrictModeLocaleMap } from '@intlayer/types/module_augmentation';\n\nconst buildRules = (\n rules: Record<string, StrictModeLocaleMap<string>>,\n processor: (pattern: string) => string\n): RewriteRules => ({\n rules: Object.entries(rules).map(([canonical, localized]) => ({\n canonical: processor(canonical),\n localized: Object.fromEntries(\n Object.entries(localized).map(([locale, pattern]) => [\n locale,\n pattern ? processor(pattern) : pattern,\n ])\n ) as StrictModeLocaleMap<string>,\n })) as RewriteRule[],\n});\n\nconst cleanPath = (pattern: string) =>\n pattern.startsWith('/') ? pattern : `/${pattern}`;\n\n/**\n * Standardizes pattern to :param syntax.\n * Supports:\n * - Next.js/SvelteKit/Nuxt: [slug], [...slug], [[slug]]\n * - TanStack Router: $slug\n * - Solid Router: *slug\n * - React/Vue Router: :slug, *\n */\nconst normalizePattern = (pattern: string, framework?: string) => {\n let normalized = pattern;\n\n if (framework === 'nextjs') {\n normalized = normalized\n .replace(/\\[\\[\\.\\.\\.([^\\]]+)\\]\\]/g, ':$1*') // [[...slug]] -> :slug* (0+)\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1+') // [...slug] -> :slug+ (1+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'sveltekit') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...path] -> :path* (0+)\n .replace(/\\[\\[([^\\]]+)\\]\\]/g, ':$1?') // [[optional]] -> :optional? (0-1)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'nuxt') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...slug] -> :slug* (0+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else {\n // Default / Generic (React Router, Vue Router, Solid Router, TanStack Router)\n normalized = normalized\n .replace(/\\$([^/]+)/g, ':$1') // TanStack $slug -> :slug\n .replace(/\\*([^/]+)/g, ':$1*') // Solid *slug -> :slug*\n .replace(/:([^/]+)\\?/g, ':$1?') // Vue Router/React Router :slug? -> :slug?\n .replace(/\\*/g, ':path*'); // React Router * -> :path*\n }\n\n return normalized;\n};\n\n/**\n * Removes locale markers from the pattern.\n */\nconst stripLocale = (pattern: string) =>\n pattern\n .replace(/\\/?(:locale|\\[locale\\]|\\$locale)\\/?/g, '/')\n .replace(/\\/+/g, '/')\n .replace(/\\/$/, '') || '/';\n\n/**\n * Factory to create formatters that populate 'url' and a specific proxy key.\n */\nconst createFormatter =\n (proxyKey: 'nextjs' | 'vite', framework?: string) =>\n <T extends string = string>(\n rules: Record<T, StrictModeLocaleMap<string>>\n ): RewriteObject => {\n const normalize = (pattern: string) => normalizePattern(pattern, framework);\n const strip = (pattern: string) => stripLocale(normalize(pattern));\n\n return {\n url: buildRules(rules as any, (pattern) => cleanPath(strip(pattern))),\n [proxyKey]: buildRules(rules as any, (pattern) =>\n cleanPath(normalize(pattern))\n ),\n } as RewriteObject;\n };\n\n/**\n * Formatter for Next.js style rewrites.\n * Patterns use Next.js dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (1+)\n * - Optional catch-all: `[[...slug]]` (0+)\n * - Locale: `[locale]`\n */\nexport const nextjsRewrite = createFormatter('nextjs', 'nextjs');\n\n/**\n * Formatter for SvelteKit style rewrites.\n * Patterns use SvelteKit dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const svelteKitRewrite = createFormatter('vite', 'sveltekit');\n\n/**\n * Formatter for React Router style rewrites.\n * Patterns use React Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `*`\n * - Locale: `:locale`\n */\nexport const reactRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Vue style rewrites.\n * Patterns use Vue Router 4 dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `:slug*` or `:slug+`\n * - Locale: `:locale`\n */\nexport const vueRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Solid Router style rewrites.\n * Patterns use Solid Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Catch-all: `*slug`\n * - Locale: `:locale`\n */\nexport const solidRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Nuxt style rewrites.\n * Patterns use Nuxt 3 dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const nuxtRewrite = createFormatter('vite', 'nuxt');\n\n/**\n * Formatter for TanStack Router style rewrites.\n * Patterns use TanStack Router dynamic routing syntax:\n * - Slug: `$slug`\n * - Catch-all: `*`\n * - Locale: `$locale`\n */\nexport const tanstackRouterRewrite = createFormatter('vite');\n\n/**\n * Generic formatter for Vite-based projects.\n * Supports most dynamic routing syntaxes and normalizes them for the Vite proxy.\n */\nexport const viteRewrite = createFormatter('vite');\n"],"mappings":"AAGA,MAAM,GACJ,EACA,KACkB,CAClB,MAAO,OAAO,QAAQ,EAAM,CAAC,KAAK,CAAC,EAAW,MAAgB,CAC5D,UAAW,EAAU,EAAU,CAC/B,UAAW,OAAO,YAChB,OAAO,QAAQ,EAAU,CAAC,KAAK,CAAC,EAAQ,KAAa,CACnD,EACA,GAAU,EAAU,EAAQ,CAC7B,CAAC,CACH,CACF,EAAE,CACJ,EAEK,EAAa,GACjB,EAAQ,WAAW,IAAI,CAAG,EAAU,IAAI,IAUpC,GAAoB,EAAiB,IAAuB,CAChE,IAAI,EAAa,EAyBjB,MAvBA,CAgBE,EAhBE,IAAc,SACH,EACV,QAAQ,0BAA2B,OAAO,CAC1C,QAAQ,sBAAuB,OAAO,CACtC,QAAQ,gBAAiB,MAAM,CACzB,IAAc,YACV,EACV,QAAQ,sBAAuB,OAAO,CACtC,QAAQ,oBAAqB,OAAO,CACpC,QAAQ,gBAAiB,MAAM,CACzB,IAAc,OACV,EACV,QAAQ,sBAAuB,OAAO,CACtC,QAAQ,gBAAiB,MAAM,CAGrB,EACV,QAAQ,aAAc,MAAM,CAC5B,QAAQ,aAAc,OAAO,CAC7B,QAAQ,cAAe,OAAO,CAC9B,QAAQ,MAAO,SAAS,CAGtB,GAMH,EAAe,GACnB,EACG,QAAQ,uCAAwC,IAAI,CACpD,QAAQ,OAAQ,IAAI,CACpB,QAAQ,MAAO,GAAG,EAAI,IAKrB,GACH,EAA6B,IAE5B,GACkB,CAClB,IAAM,EAAa,GAAoB,EAAiB,EAAS,EAAU,CACrE,EAAS,GAAoB,EAAY,EAAU,EAAQ,CAAC,CAElE,MAAO,CACL,IAAK,EAAW,EAAe,GAAY,EAAU,EAAM,EAAQ,CAAC,CAAC,EACpE,GAAW,EAAW,EAAe,GACpC,EAAU,EAAU,EAAQ,CAAC,CAC9B,CACF,EAWQ,EAAgB,EAAgB,SAAU,SAAS,CASnD,EAAmB,EAAgB,OAAQ,YAAY,CAUvD,EAAqB,EAAgB,OAAO,CAU5C,EAAmB,EAAgB,OAAO,CAS1C,EAAqB,EAAgB,OAAO,CAS5C,EAAc,EAAgB,OAAQ,OAAO,CAS7C,EAAwB,EAAgB,OAAO,CAM/C,EAAc,EAAgB,OAAO"}
@@ -1,5 +1,10 @@
1
- import * as _intlayer_types0 from "@intlayer/types";
2
- import { ContentNode, CustomIntlayerConfig as IntlayerConfig, Dictionary as Dictionary$1, Locale, Locales, Locales as Locales$1, LocalesValues, SchemaKeys, StrictModeLocaleMap } from "@intlayer/types";
1
+ import * as _intlayer_types_config0 from "@intlayer/types/config";
2
+ import { CustomIntlayerConfig as IntlayerConfig } from "@intlayer/types/config";
3
+ import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
4
+ import { ALL_LOCALES, Locale } from "@intlayer/types/allLocales";
5
+ import { ContentNode, Dictionary as Dictionary$1 } from "@intlayer/types/dictionary";
6
+ import { LocalesValues, SchemaKeys, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
7
+ import * as Locales from "@intlayer/types/locales";
3
8
  import configuration from "@intlayer/config/built";
4
9
  import { file } from "@intlayer/core/file";
5
10
  import { Intl, compact, currency, date, number, percentage, relativeTime, units } from "@intlayer/core/formatters";
@@ -28,336 +33,27 @@ type Dictionary<T = undefined, SchemaKey extends SchemaKeys | undefined = undefi
28
33
  * @deprecated Use `Dictionary<T>` instead.
29
34
  */
30
35
  type DeclarationContent<T = undefined, SchemaKey extends SchemaKeys | undefined = undefined> = Dictionary<T, SchemaKey>;
31
- /**
32
- * A list of all supported locales.
33
- *
34
- * @deprecated Use `Locales.ALL_LOCALES` instead.
35
- */
36
- declare const localeList: {
37
- readonly AFRIKAANS: "af";
38
- readonly AFRIKAANS_SOUTH_AFRICA: "af-ZA";
39
- readonly ARABIC: "ar";
40
- readonly ARABIC_UNITED_ARAB_EMIRATES: "ar-AE";
41
- readonly ARABIC_BAHRAIN: "ar-BH";
42
- readonly ARABIC_ALGERIA: "ar-DZ";
43
- readonly ARABIC_EGYPT: "ar-EG";
44
- readonly ARABIC_IRAQ: "ar-IQ";
45
- readonly ARABIC_JORDAN: "ar-JO";
46
- readonly ARABIC_KUWAIT: "ar-KW";
47
- readonly ARABIC_LEBANON: "ar-LB";
48
- readonly ARABIC_LIBYA: "ar-LY";
49
- readonly ARABIC_MOROCCO: "ar-MA";
50
- readonly ARABIC_OMAN: "ar-OM";
51
- readonly ARABIC_QATAR: "ar-QA";
52
- readonly ARABIC_SAUDI_ARABIA: "ar-SA";
53
- readonly ARABIC_SYRIA: "ar-SY";
54
- readonly ARABIC_TUNISIA: "ar-TN";
55
- readonly ARABIC_YEMEN: "ar-YE";
56
- readonly AZERI_LATIN: "az";
57
- readonly AZERI_LATIN_AZERBAIJAN: "az-AZ";
58
- readonly BELARUSIAN: "be";
59
- readonly BELARUSIAN_BELARUS: "be-BY";
60
- readonly BULGARIAN: "bg";
61
- readonly BULGARIAN_BULGARIA: "bg-BG";
62
- readonly BOSNIAN: "bs";
63
- readonly BOSNIAN_BOSNIA_AND_HERZEGOVINA: "bs-BA";
64
- readonly CATALAN: "ca";
65
- readonly CATALAN_SPAIN: "ca-ES";
66
- readonly CZECH: "cs";
67
- readonly CZECH_CZECH_REPUBLIC: "cs-CZ";
68
- readonly WELSH: "cy";
69
- readonly WELSH_UNITED_KINGDOM: "cy-GB";
70
- readonly DANISH: "da";
71
- readonly DANISH_DENMARK: "da-DK";
72
- readonly GERMAN: "de";
73
- readonly GERMAN_AUSTRIA: "de-AT";
74
- readonly GERMAN_SWITZERLAND: "de-CH";
75
- readonly GERMAN_GERMANY: "de-DE";
76
- readonly GERMAN_LIECHTENSTEIN: "de-LI";
77
- readonly GERMAN_LUXEMBOURG: "de-LU";
78
- readonly DIVEHI: "dv";
79
- readonly DIVEHI_MALDIVES: "dv-MV";
80
- readonly GREEK: "el";
81
- readonly GREEK_GREECE: "el-GR";
82
- readonly ENGLISH: "en";
83
- readonly ENGLISH_AUSTRALIA: "en-AU";
84
- readonly ENGLISH_BELIZE: "en-BZ";
85
- readonly ENGLISH_CANADA: "en-CA";
86
- readonly ENGLISH_CARIBBEAN: "en-CB";
87
- readonly ENGLISH_UNITED_KINGDOM: "en-GB";
88
- readonly ENGLISH_IRELAND: "en-IE";
89
- readonly ENGLISH_JAMAICA: "en-JM";
90
- readonly ENGLISH_NEW_ZEALAND: "en-NZ";
91
- readonly ENGLISH_PHILIPPINES: "en-PH";
92
- readonly ENGLISH_TRINIDAD_AND_TOBAGO: "en-TT";
93
- readonly ENGLISH_UNITED_STATES: "en-US";
94
- readonly ENGLISH_SOUTH_AFRICA: "en-ZA";
95
- readonly ENGLISH_ZIMBABWE: "en-ZW";
96
- readonly ESPERANTO: "eo";
97
- readonly SPANISH: "es";
98
- readonly SPANISH_ARGENTINA: "es-AR";
99
- readonly SPANISH_BOLIVIA: "es-BO";
100
- readonly SPANISH_CHILE: "es-CL";
101
- readonly SPANISH_COLOMBIA: "es-CO";
102
- readonly SPANISH_COSTA_RICA: "es-CR";
103
- readonly SPANISH_DOMINICAN_REPUBLIC: "es-DO";
104
- readonly SPANISH_ECUADOR: "es-EC";
105
- readonly SPANISH_SPAIN: "es-ES";
106
- readonly SPANISH_GUATEMALA: "es-GT";
107
- readonly SPANISH_HONDURAS: "es-HN";
108
- readonly SPANISH_MEXICO: "es-MX";
109
- readonly SPANISH_NICARAGUA: "es-NI";
110
- readonly SPANISH_PANAMA: "es-PA";
111
- readonly SPANISH_PERU: "es-PE";
112
- readonly SPANISH_PUERTO_RICO: "es-PR";
113
- readonly SPANISH_PARAGUAY: "es-PY";
114
- readonly SPANISH_EL_SALVADOR: "es-SV";
115
- readonly SPANISH_URUGUAY: "es-UY";
116
- readonly SPANISH_VENEZUELA: "es-VE";
117
- readonly ESTONIAN: "et";
118
- readonly ESTONIAN_ESTONIA: "et-EE";
119
- readonly BASQUE: "eu";
120
- readonly BASQUE_SPAIN: "eu-ES";
121
- readonly FARSI: "fa";
122
- readonly FARSI_IRAN: "fa-IR";
123
- readonly FINNISH: "fi";
124
- readonly FINNISH_FINLAND: "fi-FI";
125
- readonly FAROESE: "fo";
126
- readonly FAROESE_FAROE_ISLANDS: "fo-FO";
127
- readonly FRENCH: "fr";
128
- readonly FRENCH_BELGIUM: "fr-BE";
129
- readonly FRENCH_CANADA: "fr-CA";
130
- readonly FRENCH_SWITZERLAND: "fr-CH";
131
- readonly FRENCH_FRANCE: "fr-FR";
132
- readonly FRENCH_LUXEMBOURG: "fr-LU";
133
- readonly FRENCH_PRINCIPALITY_OF_MONACO: "fr-MC";
134
- readonly IRISH: "ga";
135
- readonly IRISH_IRELAND: "ga-IE";
136
- readonly SCOTTISH_GAELIC: "gd";
137
- readonly SCOTTISH_GAELIC_UNITED_KINGDOM: "gd-GB";
138
- readonly GALICIAN: "gl";
139
- readonly GALICIAN_SPAIN: "gl-ES";
140
- readonly GUJARATI: "gu";
141
- readonly GUJARATI_INDIA: "gu-IN";
142
- readonly HEBREW: "he";
143
- readonly HEBREW_ISRAEL: "he-IL";
144
- readonly HINDI: "hi";
145
- readonly HINDI_INDIA: "hi-IN";
146
- readonly CROATIAN: "hr";
147
- readonly CROATIAN_BOSNIA_AND_HERZEGOVINA: "hr-BA";
148
- readonly CROATIAN_CROATIA: "hr-HR";
149
- readonly HUNGARIAN: "hu";
150
- readonly HUNGARIAN_HUNGARY: "hu-HU";
151
- readonly ARMENIAN: "hy";
152
- readonly ARMENIAN_ARMENIA: "hy-AM";
153
- readonly INDONESIAN: "id";
154
- readonly INDONESIAN_INDONESIA: "id-ID";
155
- readonly ICELANDIC: "is";
156
- readonly ICELANDIC_ICELAND: "is-IS";
157
- readonly ITALIAN: "it";
158
- readonly ITALIAN_SWITZERLAND: "it-CH";
159
- readonly ITALIAN_ITALY: "it-IT";
160
- readonly JAPANESE: "ja";
161
- readonly JAPANESE_JAPAN: "ja-JP";
162
- readonly GEORGIAN: "ka";
163
- readonly GEORGIAN_GEORGIA: "ka-GE";
164
- readonly KAZAKH: "kk";
165
- readonly KAZAKH_KAZAKHSTAN: "kk-KZ";
166
- readonly KANNADA: "kn";
167
- readonly KANNADA_INDIA: "kn-IN";
168
- readonly KOREAN: "ko";
169
- readonly KOREAN_KOREA: "ko-KR";
170
- readonly KONKANI: "kok";
171
- readonly KONKANI_INDIA: "kok-IN";
172
- readonly KURDISH: "ku";
173
- readonly KURDISH_TURKEY: "ku-TR";
174
- readonly KYRGYZ: "ky";
175
- readonly KYRGYZ_KYRGYZSTAN: "ky-KG";
176
- readonly LITHUANIAN: "lt";
177
- readonly LITHUANIAN_LITHUANIA: "lt-LT";
178
- readonly LATVIAN: "lv";
179
- readonly LATVIAN_LATVIA: "lv-LV";
180
- readonly MAORI: "mi";
181
- readonly MAORI_NEW_ZEALAND: "mi-NZ";
182
- readonly FYRO_MACEDONIAN: "mk";
183
- readonly FYRO_MACEDONIAN_MACEDONIA: "mk-MK";
184
- readonly MONGOLIAN: "mn";
185
- readonly MONGOLIAN_MONGOLIA: "mn-MN";
186
- readonly MARATHI: "mr";
187
- readonly MARATHI_INDIA: "mr-IN";
188
- readonly MALAY: "ms";
189
- readonly MALAY_BRUNEI_DARUSSALAM: "ms-BN";
190
- readonly MALAY_MALAYSIA: "ms-MY";
191
- readonly MALTESE: "mt";
192
- readonly MALTESE_MALTA: "mt-MT";
193
- readonly MALAYALAM: "ml";
194
- readonly MALAYALAM_INDIA: "ml-IN";
195
- readonly NORWEGIAN: "no";
196
- readonly NORWEGIAN_BOKMAL: "nb";
197
- readonly NORWEGIAN_BOKMAL_NORWAY: "nb-NO";
198
- readonly DUTCH: "nl";
199
- readonly DUTCH_BELGIUM: "nl-BE";
200
- readonly DUTCH_NETHERLANDS: "nl-NL";
201
- readonly NORWEGIAN_NYNORSK: "nn";
202
- readonly NORWEGIAN_NYNORSK_NORWAY: "nn-NO";
203
- readonly NORTHERN_SOTHO: "ns";
204
- readonly NORTHERN_SOTHO_SOUTH_AFRICA: "ns-ZA";
205
- readonly PUNJABI: "pa";
206
- readonly PUNJABI_INDIA: "pa-IN";
207
- readonly POLISH: "pl";
208
- readonly POLISH_POLAND: "pl-PL";
209
- readonly PASHTO: "ps";
210
- readonly PASHTO_AFGHANISTAN: "ps-AR";
211
- readonly PORTUGUESE: "pt";
212
- readonly PORTUGUESE_BRAZIL: "pt-BR";
213
- readonly PORTUGUESE_PORTUGAL: "pt-PT";
214
- readonly QUECHUA: "qu";
215
- readonly QUECHUA_BOLIVIA: "qu-BO";
216
- readonly QUECHUA_ECUADOR: "qu-EC";
217
- readonly QUECHUA_PERU: "qu-PE";
218
- readonly ROMANIAN: "ro";
219
- readonly ROMANIAN_ROMANIA: "ro-RO";
220
- readonly ROMANIAN_MOLDOVA: "ro-MD";
221
- readonly ROMANSH: "rm";
222
- readonly ROMANSH_SWITZERLAND: "rm-CH";
223
- readonly RUSSIAN: "ru";
224
- readonly RUSSIAN_RUSSIA: "ru-RU";
225
- readonly RUSSIAN_MOLDOVA: "ru-MD";
226
- readonly SANSKRIT: "sa";
227
- readonly SANSKRIT_INDIA: "sa-IN";
228
- readonly SAMI_NORTHERN: "se";
229
- readonly SAMI_NORTHERN_FINLAND: "se-FI";
230
- readonly SAMI_NORTHERN_NORWAY: "se-NO";
231
- readonly SAMI_NORTHERN_SWEDEN: "se-SE";
232
- readonly UPPER_SORBIAN: "hsb";
233
- readonly UPPER_SORBIAN_GERMANY: "hsb-DE";
234
- readonly LOWER_SORBIAN: "dsb";
235
- readonly LOWER_SORBIAN_GERMANY: "dsb-DE";
236
- readonly SLOVAK: "sk";
237
- readonly SLOVAK_SLOVAKIA: "sk-SK";
238
- readonly SLOVENIAN: "sl";
239
- readonly SLOVENIAN_SLOVENIA: "sl-SI";
240
- readonly ALBANIAN: "sq";
241
- readonly ALBANIAN_ALBANIA: "sq-AL";
242
- readonly SERBIAN_LATIN: "sr";
243
- readonly SERBIAN_LATIN_BOSNIA_AND_HERZEGOVINA: "sr-BA";
244
- readonly SERBIAN_LATIN_SERBIA_AND_MONTENEGRO: "sr-SP";
245
- readonly SWEDISH: "sv";
246
- readonly SWEDISH_FINLAND: "sv-FI";
247
- readonly SWEDISH_SWEDEN: "sv-SE";
248
- readonly SWAHILI: "sw";
249
- readonly SWAHILI_KENYA: "sw-KE";
250
- readonly SYRIAC: "syr";
251
- readonly SYRIAC_SYRIA: "syr-SY";
252
- readonly TAMIL: "ta";
253
- readonly TAMIL_INDIA: "ta-IN";
254
- readonly TELUGU: "te";
255
- readonly TELUGU_INDIA: "te-IN";
256
- readonly THAI: "th";
257
- readonly THAI_THAILAND: "th-TH";
258
- readonly TAGALOG: "tl";
259
- readonly TAGALOG_PHILIPPINES: "tl-PH";
260
- readonly TSWANA: "tn";
261
- readonly TSWANA_SOUTH_AFRICA: "tn-ZA";
262
- readonly TURKISH: "tr";
263
- readonly TURKISH_TURKEY: "tr-TR";
264
- readonly TATAR: "tt";
265
- readonly TATAR_RUSSIA: "tt-RU";
266
- readonly TSOGA: "ts";
267
- readonly UKRAINIAN: "uk";
268
- readonly UKRAINIAN_UKRAINE: "uk-UA";
269
- readonly URDU: "ur";
270
- readonly URDU_ISLAMIC_REPUBLIC_OF_PAKISTAN: "ur-PK";
271
- readonly UZBEK_LATIN: "uz";
272
- readonly UZBEK_LATIN_UZBEKISTAN: "uz-UZ";
273
- readonly VIETNAMESE: "vi";
274
- readonly VIETNAMESE_VIET_NAM: "vi-VN";
275
- readonly VENDA: "ve";
276
- readonly VENDA_SOUTH_AFRICA: "ve-ZA";
277
- readonly XHOSA: "xh";
278
- readonly XHOSA_SOUTH_AFRICA: "xh-ZA";
279
- readonly CHINESE: "zh";
280
- readonly CHINESE_SIMPLIFIED: "zh-Hans";
281
- readonly CHINESE_SIMPLIFIED_CHINA: "zh-CN";
282
- readonly CHINESE_HONG_KONG: "zh-HK";
283
- readonly CHINESE_MACAU: "zh-MO";
284
- readonly CHINESE_SINGAPORE: "zh-SG";
285
- readonly CHINESE_TRADITIONAL: "zh-Hant";
286
- readonly ZULU: "zu";
287
- readonly ZULU_SOUTH_AFRICA: "zu-ZA";
288
- readonly BENGALI: "bn";
289
- readonly BENGALI_BANGLADESH: "bn-BD";
290
- readonly BENGALI_INDIA: "bn-IN";
291
- readonly BENGALI_MYANMAR: "bn-MM";
292
- readonly BURMESE: "my";
293
- readonly BURMESE_MYANMAR: "my-MM";
294
- readonly KHMER: "km";
295
- readonly KHMER_CAMBODIA: "km-KH";
296
- readonly LAO: "lo";
297
- readonly LAO_LAOS: "lo-LA";
298
- readonly YORUBA: "yo";
299
- readonly YORUBA_NIGERIA: "yo-NG";
300
- readonly YIDDISH: "yi";
301
- readonly YIDDISH_WORLD: "yi-001";
302
- readonly AMHARIC: "am";
303
- readonly AMHARIC_ETHIOPIA: "am-ET";
304
- readonly NEPALI: "ne";
305
- readonly NEPALI_NEPAL: "ne-NP";
306
- readonly SINHALA: "si";
307
- readonly SINHALA_SRI_LANKA: "si-LK";
308
- readonly SERBIAN_CYRILLIC: "sr-Cyrl";
309
- readonly SERBIAN_CYRILLIC_SERBIA: "sr-RS";
310
- readonly SERBIAN_CYRILLIC_BOSNIA_AND_HERZEGOVINA: "sr-BA";
311
- readonly ENGLISH_INDIA: "en-IN";
312
- readonly ENGLISH_SINGAPORE: "en-SG";
313
- readonly ENGLISH_HONG_KONG: "en-HK";
314
- readonly ENGLISH_NIGERIA: "en-NG";
315
- readonly ENGLISH_PAKISTAN: "en-PK";
316
- readonly ENGLISH_MALAYSIA: "en-MY";
317
- readonly ENGLISH_BOTSWANA: "en-BW";
318
- readonly ENGLISH_KENYA: "en-KE";
319
- readonly ENGLISH_TANZANIA: "en-TZ";
320
- readonly ENGLISH_GHANA: "en-GH";
321
- readonly ENGLISH_UGANDA: "en-UG";
322
- readonly SPANISH_CUBA: "es-CU";
323
- readonly SPANISH_UNITED_STATES: "es-US";
324
- readonly PORTUGUESE_GUINEA_BISSAU: "pt-GW";
325
- readonly PORTUGUESE_MOZAMBIQUE: "pt-MZ";
326
- readonly PORTUGUESE_SAO_TOME_AND_PRINCIPE: "pt-ST";
327
- readonly PORTUGUESE_CAPE_VERDE: "pt-CV";
328
- readonly PORTUGUESE_TIMOR_LESTE: "pt-TL";
329
- readonly PORTUGUESE_MACAU: "pt-MO";
330
- readonly CHINESE_TAIWAN: "zh-TW";
331
- readonly ARABIC_MAURITANIA: "ar-MR";
332
- readonly ARABIC_PALESTINE: "ar-PS";
333
- readonly ARABIC_SUDAN: "ar-SD";
334
- readonly ARABIC_DJIBOUTI: "ar-DJ";
335
- readonly ARABIC_SOMALIA: "ar-SO";
336
- readonly ARABIC_CHAD: "ar-TD";
337
- readonly ARABIC_COMOROS: "ar-KM";
338
- readonly MALAGASY_MADAGASCAR: "mg-MG";
339
- };
340
36
  /**
341
37
  * Returns the configuration of Intlayer.
342
38
  */
343
- declare const getConfiguration: () => _intlayer_types0.IntlayerConfig;
39
+ declare const getConfiguration: () => _intlayer_types_config0.IntlayerConfig;
344
40
  /**
345
41
  * The locales defined in the configuration.
346
42
  */
347
- declare const locales: Locales$1.Locale[];
43
+ declare const locales: _intlayer_types_allLocales0.Locale[];
348
44
  /**
349
45
  * The required locales defined in the configuration.
350
46
  */
351
- declare const requiredLocales: Locales$1.Locale[];
47
+ declare const requiredLocales: _intlayer_types_allLocales0.Locale[];
352
48
  /**
353
49
  * The default locale defined in the configuration.
354
50
  */
355
- declare const defaultLocale: Locales$1.Locale;
51
+ declare const defaultLocale: _intlayer_types_allLocales0.Locale;
356
52
  interface __DictionaryRegistry {}
357
53
  interface __DeclaredLocalesRegistry {}
358
54
  interface __RequiredLocalesRegistry {}
359
55
  interface __SchemaRegistry {}
360
56
  interface __StrictModeRegistry {}
361
57
  //#endregion
362
- export { type ContentNode, type DeclarationContent, type Dictionary, Intl, type IntlayerConfig, type Locale, Locales, type LocalesValues, type StrictModeLocaleMap, __DeclaredLocalesRegistry, __DictionaryRegistry, __RequiredLocalesRegistry, __SchemaRegistry, __StrictModeRegistry, compact, cond, configuration, currency, date, defaultLocale, enu, file, gender, getBrowserLocale, getCanonicalPath, getConfiguration, getCookie, getDictionary, getEnumeration, getEnumerationContent, getHTMLTextDir, getIntlayer, getLocale, getLocaleFromPath, getLocaleFromStorage, getLocaleLang, getLocaleName, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMultilingualUrls, getNesting, getPathWithoutLocale, getPrefix, getRewriteRules, getTranslation, getTranslationContent, html, insert, localeDetector, localeFlatMap, type localeList, localeMap, localeRecord, localeResolver, locales, md, nest, number, percentage, relativeTime, requiredLocales, setLocaleInStorage, t, units, validatePrefix };
58
+ export { ALL_LOCALES, type ContentNode, type DeclarationContent, type Dictionary, Intl, type IntlayerConfig, type Locale, Locales, type LocalesValues, type StrictModeLocaleMap, __DeclaredLocalesRegistry, __DictionaryRegistry, __RequiredLocalesRegistry, __SchemaRegistry, __StrictModeRegistry, compact, cond, configuration, currency, date, defaultLocale, enu, file, gender, getBrowserLocale, getCanonicalPath, getConfiguration, getCookie, getDictionary, getEnumeration, getEnumerationContent, getHTMLTextDir, getIntlayer, getLocale, getLocaleFromPath, getLocaleFromStorage, getLocaleLang, getLocaleName, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMultilingualUrls, getNesting, getPathWithoutLocale, getPrefix, getRewriteRules, getTranslation, getTranslationContent, html, insert, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, locales, md, nest, number, percentage, relativeTime, requiredLocales, setLocaleInStorage, t, units, validatePrefix };
363
59
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMyB;KAapB,UAAA,kCAEe,UAAA,4BAChB,YAAA,CAAe,CAAA,EAAG,SAAA;;;;;;KAOjB,kBAAA,kCAEe,UAAA,4BAChB,UAAA,CAAW,CAAA,EAAG,SAAA;;;;;;cAOZ,UAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsBA,gBAAA,QAAsC,gBAAA,CAAtB,cAAA;;;;cAKhB,OAAA,EAAO,SAAA,CAAA,MAAA;;;;cAKP,eAAA,EAAe,SAAA,CAAA,MAAA;;;;cAKf,aAAA,EAAa,SAAA,CAAA,MAAA;AAAA,UA2EF,oBAAA;AAAA,UACA,yBAAA;AAAA,UACA,yBAAA;AAAA,UACA,gBAAA;AAAA,UACA,oBAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiBK,UAAA,kCAEe,UAAA,4BAChB,YAAA,CAAe,CAAA,EAAG,SAAA;;AAhBgD;;;;KAuBjE,kBAAA,kCAEe,UAAA,4BAChB,UAAA,CAAW,CAAA,EAAG,SAAA;AAVa;;;AAAA,cAiCzB,gBAAA,QAAsC,uBAAA,CAAtB,cAAA;;;;cAKhB,OAAA,EAAoD,2BAAA,CAA7C,MAAA;;;;cAKP,eAAA,EAAoE,2BAAA,CAArD,MAAA;;;;cAKf,aAAA,EAAgE,2BAAA,CAAnD,MAAA;AAAA,UA8EF,oBAAA;AAAA,UACA,yBAAA;AAAA,UACA,yBAAA;AAAA,UACA,gBAAA;AAAA,UACA,oBAAA"}
@@ -1,4 +1,5 @@
1
- import { RewriteObject, StrictModeLocaleMap } from "@intlayer/types";
1
+ import { RewriteObject } from "@intlayer/types/config";
2
+ import { StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
2
3
 
3
4
  //#region src/routing/index.d.ts
4
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/routing/index.ts"],"mappings":";;;;;AAkGA;;;;;;cAAa,aAAA,8BAtBM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;;;;;;;cA6BQ,gBAAA,8BA/BM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;;AA6BL;;;;;;cAUa,kBAAA,8BAzCM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;;;;;;;;cAiDQ,gBAAA,8BAnDM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;AAuCL;;;;;;cAmBa,kBAAA,8BA5DM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;;;;;;;cAmEQ,WAAA,8BArEM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;;AAiDL;;;;;cA2Ba,qBAAA,8BA9EM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;;;;cAkFQ,WAAA,8BApFM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/routing/index.ts"],"mappings":";;;;;;AA8FA;;;;;;cAAa,aAAA,8BAtBM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;;;;;;;cA6BQ,gBAAA,8BA/BM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;;AA6BL;;;;;;cAUa,kBAAA,8BAzCM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;;;;;;;;cAiDQ,gBAAA,8BAnDM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;AAuCL;;;;;;cAmBa,kBAAA,8BA5DM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;;;;;;;cAmEQ,WAAA,8BArEM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;;AAiDL;;;;;cA2Ba,qBAAA,8BA9EM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA;;;;;cAkFQ,WAAA,8BApFM,KAAA,EACR,MAAA,CAAO,CAAA,EAAG,mBAAA,cAChB,aAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intlayer",
3
- "version": "8.2.4",
3
+ "version": "8.3.0-canary.0",
4
4
  "private": false,
5
5
  "description": "Manage internationalization i18n in a simple way, through TypeScript, declaration file, declare your multilingual content every where in your code.",
6
6
  "keywords": [
@@ -81,27 +81,27 @@
81
81
  "./package.json"
82
82
  ],
83
83
  "scripts": {
84
- "build": "tsdown --config tsdown.config.ts",
85
- "build:ci": "tsdown --config tsdown.config.ts",
86
- "clean": "rimraf ./dist .turbo",
87
- "dev": "tsdown --config tsdown.config.ts --watch",
88
- "format": "biome format . --check",
89
- "format:fix": "biome format --write .",
90
- "lint": "biome lint .",
91
- "lint:fix": "biome lint --write .",
84
+ "build": "bun --bun tsdown --config tsdown.config.ts",
85
+ "build:ci": "bun --bun tsdown --config tsdown.config.ts",
86
+ "clean": "bun --bun rimraf ./dist .turbo",
87
+ "dev": "bun --bun tsdown --config tsdown.config.ts --watch",
88
+ "format": "bun --bun biome format . --check",
89
+ "format:fix": "bun --bun biome format --write .",
90
+ "lint": "bun --bun biome lint .",
91
+ "lint:fix": "bun --bun biome lint --write .",
92
92
  "prepublish": "cp -f ../../README.md ./README.md",
93
93
  "publish": "bun publish || true",
94
94
  "publish:canary": "bun publish --access public --tag canary || true",
95
95
  "publish:latest": "bun publish --access public --tag latest || true",
96
- "test": "vitest run",
97
- "test:watch": "vitest",
96
+ "test": "bun --bun vitest run",
97
+ "test:watch": "bun --bun vitest",
98
98
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
99
99
  },
100
100
  "dependencies": {
101
- "@intlayer/cli": "8.2.3",
102
- "@intlayer/config": "8.2.3",
103
- "@intlayer/core": "8.2.3",
104
- "@intlayer/types": "8.2.3"
101
+ "@intlayer/cli": "8.3.0-canary.0",
102
+ "@intlayer/config": "8.3.0-canary.0",
103
+ "@intlayer/core": "8.3.0-canary.0",
104
+ "@intlayer/types": "8.3.0-canary.0"
105
105
  },
106
106
  "devDependencies": {
107
107
  "@types/node": "25.3.5",
@@ -109,7 +109,7 @@
109
109
  "@utils/ts-config-types": "1.0.4",
110
110
  "@utils/tsdown-config": "1.0.4",
111
111
  "rimraf": "6.1.3",
112
- "tsdown": "0.21.0",
112
+ "tsdown": "0.21.1",
113
113
  "typescript": "5.9.3",
114
114
  "vitest": "4.0.18"
115
115
  },