@fluenti/nuxt 0.2.0 → 0.3.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.
Files changed (100) hide show
  1. package/dist/detectors-BnmzZTww.cjs +2 -0
  2. package/dist/detectors-BnmzZTww.cjs.map +1 -0
  3. package/dist/detectors-CAqp_VCN.js +100 -0
  4. package/dist/detectors-CAqp_VCN.js.map +1 -0
  5. package/dist/devtools.d.ts +31 -0
  6. package/dist/devtools.d.ts.map +1 -0
  7. package/dist/isr-validation.d.ts +14 -0
  8. package/dist/isr-validation.d.ts.map +1 -0
  9. package/dist/locale-head-BuSO-fCZ.js +88 -0
  10. package/dist/locale-head-BuSO-fCZ.js.map +1 -0
  11. package/dist/locale-head-D1NAUQc8.cjs +2 -0
  12. package/dist/locale-head-D1NAUQc8.cjs.map +1 -0
  13. package/dist/module.cjs +1 -1
  14. package/dist/module.cjs.map +1 -1
  15. package/dist/module.d.ts +18 -0
  16. package/dist/module.d.ts.map +1 -0
  17. package/dist/module.js +231 -46
  18. package/dist/module.js.map +1 -1
  19. package/dist/page-extend-BrPO2RhM.js +36 -0
  20. package/dist/page-extend-BrPO2RhM.js.map +1 -0
  21. package/dist/page-extend-tRXsujtK.cjs +2 -0
  22. package/dist/page-extend-tRXsujtK.cjs.map +1 -0
  23. package/dist/page-meta-transform.d.ts +17 -0
  24. package/dist/page-meta-transform.d.ts.map +1 -0
  25. package/dist/runtime/client.cjs +1 -1
  26. package/dist/runtime/client.cjs.map +1 -1
  27. package/dist/runtime/client.js +2 -2
  28. package/dist/runtime/components/NuxtLinkLocale.cjs +1 -1
  29. package/dist/runtime/components/NuxtLinkLocale.cjs.map +1 -1
  30. package/dist/runtime/composables.cjs +1 -1
  31. package/dist/runtime/composables.cjs.map +1 -1
  32. package/dist/runtime/composables.d.ts +46 -0
  33. package/dist/runtime/composables.d.ts.map +1 -1
  34. package/dist/runtime/composables.js +55 -13
  35. package/dist/runtime/composables.js.map +1 -1
  36. package/dist/runtime/define-i18n-route.cjs +2 -0
  37. package/dist/runtime/define-i18n-route.cjs.map +1 -0
  38. package/dist/runtime/define-i18n-route.d.ts +27 -0
  39. package/dist/runtime/define-i18n-route.d.ts.map +1 -0
  40. package/dist/runtime/define-i18n-route.js +6 -0
  41. package/dist/runtime/define-i18n-route.js.map +1 -0
  42. package/dist/runtime/detectors/cookie.d.ts.map +1 -1
  43. package/dist/runtime/detectors/domain.cjs +2 -0
  44. package/dist/runtime/detectors/domain.cjs.map +1 -0
  45. package/dist/runtime/detectors/domain.d.ts +9 -0
  46. package/dist/runtime/detectors/domain.d.ts.map +1 -0
  47. package/dist/runtime/detectors/domain.js +15 -0
  48. package/dist/runtime/detectors/domain.js.map +1 -0
  49. package/dist/runtime/detectors/header.d.ts.map +1 -1
  50. package/dist/runtime/detectors/index.d.ts +1 -1
  51. package/dist/runtime/detectors/index.d.ts.map +1 -1
  52. package/dist/runtime/detectors/query.d.ts.map +1 -1
  53. package/dist/runtime/index.cjs +1 -1
  54. package/dist/runtime/index.d.ts +1 -1
  55. package/dist/runtime/index.d.ts.map +1 -1
  56. package/dist/runtime/index.js +5 -5
  57. package/dist/runtime/locale-head.d.ts +3 -0
  58. package/dist/runtime/locale-head.d.ts.map +1 -1
  59. package/dist/runtime/middleware/locale-redirect.cjs +1 -1
  60. package/dist/runtime/middleware/locale-redirect.cjs.map +1 -1
  61. package/dist/runtime/middleware/locale-redirect.js +1 -1
  62. package/dist/runtime/page-extend.d.ts +21 -5
  63. package/dist/runtime/page-extend.d.ts.map +1 -1
  64. package/dist/runtime/plugin.cjs +1 -1
  65. package/dist/runtime/plugin.cjs.map +1 -1
  66. package/dist/runtime/plugin.d.ts.map +1 -1
  67. package/dist/runtime/plugin.js +55 -23
  68. package/dist/runtime/plugin.js.map +1 -1
  69. package/dist/runtime/server/locale-redirect.cjs +2 -0
  70. package/dist/runtime/server/locale-redirect.cjs.map +1 -0
  71. package/dist/runtime/server/locale-redirect.d.ts +12 -0
  72. package/dist/runtime/server/locale-redirect.d.ts.map +1 -0
  73. package/dist/runtime/server/locale-redirect.js +51 -0
  74. package/dist/runtime/server/locale-redirect.js.map +1 -0
  75. package/dist/runtime/standalone-composables.cjs +2 -0
  76. package/dist/runtime/standalone-composables.cjs.map +1 -0
  77. package/dist/runtime/standalone-composables.d.ts +6 -0
  78. package/dist/runtime/standalone-composables.d.ts.map +1 -1
  79. package/dist/runtime/standalone-composables.js +34 -0
  80. package/dist/runtime/standalone-composables.js.map +1 -0
  81. package/dist/sitemap.d.ts +24 -0
  82. package/dist/sitemap.d.ts.map +1 -0
  83. package/dist/types.d.ts +210 -13
  84. package/dist/types.d.ts.map +1 -1
  85. package/llms-full.txt +411 -0
  86. package/llms-migration.txt +201 -0
  87. package/llms.txt +103 -0
  88. package/package.json +5 -4
  89. package/dist/detectors-CFJvuwzi.cjs +0 -2
  90. package/dist/detectors-CFJvuwzi.cjs.map +0 -1
  91. package/dist/detectors-DhkfHBHr.js +0 -84
  92. package/dist/detectors-DhkfHBHr.js.map +0 -1
  93. package/dist/locale-head-BfsESdd7.cjs +0 -2
  94. package/dist/locale-head-BfsESdd7.cjs.map +0 -1
  95. package/dist/locale-head-CqUlvy3O.js +0 -38
  96. package/dist/locale-head-CqUlvy3O.js.map +0 -1
  97. package/dist/page-extend-DJ7wpuVj.js +0 -25
  98. package/dist/page-extend-DJ7wpuVj.js.map +0 -1
  99. package/dist/page-extend-OvV-ZhFB.cjs +0 -2
  100. package/dist/page-extend-OvV-ZhFB.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"composables.cjs","names":[],"sources":["../../src/runtime/composables.ts"],"sourcesContent":["import { computed } from 'vue'\nimport type { ComputedRef } from 'vue'\nimport { useRoute, useRuntimeConfig } from '#imports'\nimport { useI18n } from '@fluenti/vue'\nimport { localePath, switchLocalePath } from './path-utils'\nimport type { FluentNuxtRuntimeConfig } from '../types'\nimport type { LocaleHeadMeta, LocaleHeadOptions } from './locale-head'\nimport { buildLocaleHead } from './locale-head'\n\n/** Resolve fluenti runtime config from Nuxt's public runtimeConfig */\nfunction useFluentiConfig(): FluentNuxtRuntimeConfig {\n const runtimeConfig = useRuntimeConfig()\n return runtimeConfig.public['fluenti'] as FluentNuxtRuntimeConfig\n}\n\n/**\n * Composable that returns a function to generate locale-prefixed paths.\n *\n * Zero-argument — automatically reads the current locale from @fluenti/vue\n * and routing config from Nuxt runtimeConfig.\n *\n * @example\n * ```ts\n * const localePath = useLocalePath()\n * localePath('/about') // '/ja/about' (current locale is 'ja')\n * localePath('/about', 'en') // '/about' (prefix_except_default, en is default)\n * ```\n */\nexport function useLocalePath(): (path: string, locale?: string) => string {\n const { locale } = useI18n()\n const config = useFluentiConfig()\n\n return (path: string, targetLocale?: string) => {\n return localePath(\n path,\n targetLocale ?? locale.value,\n config.defaultLocale,\n config.strategy,\n )\n }\n}\n\n/**\n * Composable that returns a function to get the current path in a different locale.\n *\n * @example\n * ```ts\n * const switchLocalePath = useSwitchLocalePath()\n * switchLocalePath('en') // '/about' (if on '/ja/about')\n * ```\n */\nexport function useSwitchLocalePath(): (locale: string) => string {\n const route = useRoute()\n const config = useFluentiConfig()\n\n return (newLocale: string) => {\n return switchLocalePath(\n route.path,\n newLocale,\n config.locales,\n config.defaultLocale,\n config.strategy,\n )\n }\n}\n\n/**\n * Composable that generates locale-aware HTML head metadata.\n *\n * @example\n * ```ts\n * const head = useLocaleHead({ addSeoAttributes: true, baseUrl: 'https://example.com' })\n * useHead(head.value) // Nuxt useHead\n * ```\n */\nexport function useLocaleHead(options?: LocaleHeadOptions): ComputedRef<LocaleHeadMeta> {\n const { locale } = useI18n()\n const route = useRoute()\n const config = useFluentiConfig()\n\n return computed(() => {\n return buildLocaleHead(locale.value, route.path, config, options)\n })\n}\n"],"mappings":"+NAUA,SAAS,GAA4C,CAEnD,OAAA,EAAA,EAAA,mBADwC,CACnB,OAAO,QAgB9B,SAAgB,GAA2D,CACzE,GAAM,CAAE,WAAA,EAAA,EAAA,UAAoB,CACtB,EAAS,GAAkB,CAEjC,OAAQ,EAAc,IACb,EAAA,EACL,EACA,GAAgB,EAAO,MACvB,EAAO,cACP,EAAO,SACR,CAaL,SAAgB,GAAkD,CAChE,IAAM,GAAA,EAAA,EAAA,WAAkB,CAClB,EAAS,GAAkB,CAEjC,MAAQ,IACC,EAAA,EACL,EAAM,KACN,EACA,EAAO,QACP,EAAO,cACP,EAAO,SACR,CAaL,SAAgB,EAAc,EAA0D,CACtF,GAAM,CAAE,WAAA,EAAA,EAAA,UAAoB,CACtB,GAAA,EAAA,EAAA,WAAkB,CAClB,EAAS,GAAkB,CAEjC,OAAA,EAAA,EAAA,cACS,EAAA,EAAgB,EAAO,MAAO,EAAM,KAAM,EAAQ,EAAQ,CACjE"}
1
+ {"version":3,"file":"composables.cjs","names":[],"sources":["../../src/runtime/composables.ts"],"sourcesContent":["import { computed } from 'vue'\nimport type { ComputedRef } from 'vue'\nimport { useRoute, useRouter, useRuntimeConfig } from '#imports'\nimport type { RouteLocationRaw, RouteLocationResolved } from 'vue-router'\nimport { useI18n } from '@fluenti/vue'\nimport { localePath, switchLocalePath } from './path-utils'\nimport type { FluentNuxtRuntimeConfig } from '../types'\nimport type { LocaleHeadMeta, LocaleHeadOptions } from './locale-head'\nimport { buildLocaleHead } from './locale-head'\n\n/** Resolve fluenti runtime config from Nuxt's public runtimeConfig */\nfunction useFluentiConfig(): FluentNuxtRuntimeConfig {\n const runtimeConfig = useRuntimeConfig()\n return runtimeConfig.public['fluenti'] as FluentNuxtRuntimeConfig\n}\n\n/**\n * Composable that returns a function to generate locale-prefixed paths.\n *\n * Zero-argument — automatically reads the current locale from @fluenti/vue\n * and routing config from Nuxt runtimeConfig.\n *\n * @example\n * ```ts\n * const localePath = useLocalePath()\n * localePath('/about') // '/ja/about' (current locale is 'ja')\n * localePath('/about', 'en') // '/about' (prefix_except_default, en is default)\n * ```\n */\nexport function useLocalePath(): (path: string, locale?: string) => string {\n const { locale } = useI18n()\n const config = useFluentiConfig()\n\n return (path: string, targetLocale?: string) => {\n return localePath(\n path,\n targetLocale ?? locale.value,\n config.defaultLocale,\n config.strategy,\n )\n }\n}\n\n/**\n * Composable that returns a function to get the current path in a different locale.\n *\n * @example\n * ```ts\n * const switchLocalePath = useSwitchLocalePath()\n * switchLocalePath('en') // '/about' (if on '/ja/about')\n * ```\n */\nexport function useSwitchLocalePath(): (locale: string) => string {\n const route = useRoute()\n const config = useFluentiConfig()\n\n return (newLocale: string) => {\n return switchLocalePath(\n route.path,\n newLocale,\n config.locales,\n config.defaultLocale,\n config.strategy,\n )\n }\n}\n\n/**\n * Composable that returns a function to resolve a locale-prefixed route object.\n *\n * Unlike `useLocalePath()` which returns a path string, this returns a full\n * resolved `RouteLocationResolved` that can be passed to `router.push()`.\n *\n * @example\n * ```ts\n * const localeRoute = useLocaleRoute()\n * const route = localeRoute('/about') // resolved route for '/ja/about'\n * const route = localeRoute('/about', 'en') // resolved route for '/about'\n * router.push(route)\n * ```\n */\nexport function useLocaleRoute(): (to: RouteLocationRaw, locale?: string) => RouteLocationResolved {\n const { locale } = useI18n()\n const router = useRouter()\n const config = useFluentiConfig()\n\n return (to: RouteLocationRaw, targetLocale?: string) => {\n const resolvedLocale = targetLocale ?? locale.value\n if (typeof to === 'string') {\n const path = localePath(to, resolvedLocale, config.defaultLocale, config.strategy)\n return router.resolve(path)\n }\n // For object routes, prefix the path if present\n if ('path' in to && to.path) {\n const path = localePath(to.path, resolvedLocale, config.defaultLocale, config.strategy)\n return router.resolve({ ...to, path })\n }\n // For named routes, resolve as-is\n return router.resolve(to)\n }\n}\n\n/**\n * Composable that returns a namespace-scoped i18n context.\n *\n * The `t()` function automatically prepends the namespace to message keys,\n * reducing boilerplate when a component only uses messages from one section.\n *\n * @example\n * ```ts\n * const { t } = useI18nScoped('Navbar')\n * t('home') // looks up 'Navbar.home'\n * t('about') // looks up 'Navbar.about'\n * ```\n */\nexport function useI18nScoped(namespace: string) {\n const ctx = useI18n()\n const separator = '.'\n\n return {\n ...ctx,\n t(idOrDescriptor: unknown, values?: Record<string, unknown>): string {\n if (typeof idOrDescriptor === 'string') {\n return ctx.t(`${namespace}${separator}${idOrDescriptor}`, values)\n }\n // MessageDescriptor — prefix the id\n if (idOrDescriptor && typeof idOrDescriptor === 'object' && 'id' in idOrDescriptor) {\n const desc = idOrDescriptor as { id: string }\n return ctx.t({ ...desc, id: `${namespace}${separator}${desc.id}` }, values)\n }\n // Tagged template — pass through (no namespacing for tagged templates)\n return (ctx.t as Function)(idOrDescriptor, values)\n },\n te(key: string, locale?: string): boolean {\n return ctx.te(`${namespace}${separator}${key}`, locale)\n },\n tm(key: string, locale?: string) {\n return ctx.tm(`${namespace}${separator}${key}`, locale)\n },\n /** The namespace this context is scoped to */\n namespace,\n }\n}\n\n/**\n * Composable that generates locale-aware HTML head metadata.\n *\n * @example\n * ```ts\n * const head = useLocaleHead({ addSeoAttributes: true, baseUrl: 'https://example.com' })\n * useHead(head.value) // Nuxt useHead\n * ```\n */\nexport function useLocaleHead(options?: LocaleHeadOptions): ComputedRef<LocaleHeadMeta> {\n const { locale } = useI18n()\n const route = useRoute()\n const config = useFluentiConfig()\n\n return computed(() => {\n return buildLocaleHead(locale.value, route.path, config, options)\n })\n}\n"],"mappings":"wPAWA,SAAS,GAA4C,CAEnD,OAAA,EAAA,EAAA,mBADwC,CACnB,OAAO,QAgB9B,SAAgB,GAA2D,CACzE,GAAM,CAAE,WAAA,EAAA,EAAA,UAAoB,CACtB,EAAS,GAAkB,CAEjC,OAAQ,EAAc,IACb,EAAA,EACL,EACA,GAAgB,EAAO,MACvB,EAAO,cACP,EAAO,SACR,CAaL,SAAgB,GAAkD,CAChE,IAAM,GAAA,EAAA,EAAA,WAAkB,CAClB,EAAS,GAAkB,CAEjC,MAAQ,IACC,EAAA,EACL,EAAM,KACN,EACA,EAAO,QACP,EAAO,cACP,EAAO,SACR,CAkBL,SAAgB,GAAmF,CACjG,GAAM,CAAE,WAAA,EAAA,EAAA,UAAoB,CACtB,GAAA,EAAA,EAAA,YAAoB,CACpB,EAAS,GAAkB,CAEjC,OAAQ,EAAsB,IAA0B,CACtD,IAAM,EAAiB,GAAgB,EAAO,MAC9C,GAAI,OAAO,GAAO,SAAU,CAC1B,IAAM,EAAO,EAAA,EAAW,EAAI,EAAgB,EAAO,cAAe,EAAO,SAAS,CAClF,OAAO,EAAO,QAAQ,EAAK,CAG7B,GAAI,SAAU,GAAM,EAAG,KAAM,CAC3B,IAAM,EAAO,EAAA,EAAW,EAAG,KAAM,EAAgB,EAAO,cAAe,EAAO,SAAS,CACvF,OAAO,EAAO,QAAQ,CAAE,GAAG,EAAI,OAAM,CAAC,CAGxC,OAAO,EAAO,QAAQ,EAAG,EAiB7B,SAAgB,EAAc,EAAmB,CAC/C,IAAM,GAAA,EAAA,EAAA,UAAe,CAGrB,MAAO,CACL,GAAG,EACH,EAAE,EAAyB,EAA0C,CACnE,GAAI,OAAO,GAAmB,SAC5B,OAAO,EAAI,EAAE,GAAG,KAAwB,IAAkB,EAAO,CAGnE,GAAI,GAAkB,OAAO,GAAmB,UAAY,OAAQ,EAAgB,CAClF,IAAM,EAAO,EACb,OAAO,EAAI,EAAE,CAAE,GAAG,EAAM,GAAI,GAAG,KAAwB,EAAK,KAAM,CAAE,EAAO,CAG7E,OAAQ,EAAI,EAAe,EAAgB,EAAO,EAEpD,GAAG,EAAa,EAA0B,CACxC,OAAO,EAAI,GAAG,GAAG,KAAwB,IAAO,EAAO,EAEzD,GAAG,EAAa,EAAiB,CAC/B,OAAO,EAAI,GAAG,GAAG,KAAwB,IAAO,EAAO,EAGzD,YACD,CAYH,SAAgB,EAAc,EAA0D,CACtF,GAAM,CAAE,WAAA,EAAA,EAAA,UAAoB,CACtB,GAAA,EAAA,EAAA,WAAkB,CAClB,EAAS,GAAkB,CAEjC,OAAA,EAAA,EAAA,cACS,EAAA,EAAgB,EAAO,MAAO,EAAM,KAAM,EAAQ,EAAQ,CACjE"}
@@ -1,4 +1,5 @@
1
1
  import { ComputedRef } from 'vue';
2
+ import { RouteLocationRaw, RouteLocationResolved } from 'vue-router';
2
3
  import { LocaleHeadMeta, LocaleHeadOptions } from './locale-head';
3
4
  /**
4
5
  * Composable that returns a function to generate locale-prefixed paths.
@@ -24,6 +25,51 @@ export declare function useLocalePath(): (path: string, locale?: string) => stri
24
25
  * ```
25
26
  */
26
27
  export declare function useSwitchLocalePath(): (locale: string) => string;
28
+ /**
29
+ * Composable that returns a function to resolve a locale-prefixed route object.
30
+ *
31
+ * Unlike `useLocalePath()` which returns a path string, this returns a full
32
+ * resolved `RouteLocationResolved` that can be passed to `router.push()`.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const localeRoute = useLocaleRoute()
37
+ * const route = localeRoute('/about') // resolved route for '/ja/about'
38
+ * const route = localeRoute('/about', 'en') // resolved route for '/about'
39
+ * router.push(route)
40
+ * ```
41
+ */
42
+ export declare function useLocaleRoute(): (to: RouteLocationRaw, locale?: string) => RouteLocationResolved;
43
+ /**
44
+ * Composable that returns a namespace-scoped i18n context.
45
+ *
46
+ * The `t()` function automatically prepends the namespace to message keys,
47
+ * reducing boilerplate when a component only uses messages from one section.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const { t } = useI18nScoped('Navbar')
52
+ * t('home') // looks up 'Navbar.home'
53
+ * t('about') // looks up 'Navbar.about'
54
+ * ```
55
+ */
56
+ export declare function useI18nScoped(namespace: string): {
57
+ t(idOrDescriptor: unknown, values?: Record<string, unknown>): string;
58
+ te(key: string, locale?: string): boolean;
59
+ tm(key: string, locale?: string): import('@fluenti/core').CompiledMessage | undefined;
60
+ /** The namespace this context is scoped to */
61
+ namespace: string;
62
+ locale: Readonly<import('vue').Ref<import('@fluenti/core').Locale>>;
63
+ setLocale(locale: import('@fluenti/core').Locale): Promise<void>;
64
+ loadMessages(locale: import('@fluenti/core').Locale, messages: import('@fluenti/core').Messages): void;
65
+ getLocales(): import('@fluenti/core').Locale[];
66
+ d(value: Date | number, style?: string): import('@fluenti/core').LocalizedString;
67
+ n(value: number, style?: string): import('@fluenti/core').LocalizedString;
68
+ format(message: string, values?: Record<string, unknown>): import('@fluenti/core').LocalizedString;
69
+ isLoading: Readonly<import('vue').Ref<boolean>>;
70
+ loadedLocales: Readonly<import('vue').Ref<ReadonlySet<string>>>;
71
+ preloadLocale(locale: string): void;
72
+ };
27
73
  /**
28
74
  * Composable that generates locale-aware HTML head metadata.
29
75
  *
@@ -1 +1 @@
1
- {"version":3,"file":"composables.d.ts","sourceRoot":"","sources":["../../src/runtime/composables.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAA;AAKtC,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAStE;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,MAAM,CAYzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,IAAI,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAahE;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,WAAW,CAAC,cAAc,CAAC,CAQtF"}
1
+ {"version":3,"file":"composables.d.ts","sourceRoot":"","sources":["../../src/runtime/composables.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAA;AAEtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAIzE,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAStE;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,MAAM,CAYzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,IAAI,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAahE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,IAAI,CAAC,EAAE,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,qBAAqB,CAmBjG;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM;sBAMzB,OAAO,WAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;YAY5D,MAAM,WAAW,MAAM,GAAG,OAAO;YAGjC,MAAM,WAAW,MAAM;IAG/B,8CAA8C;;;;;;;;;;;;EAGjD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,WAAW,CAAC,cAAc,CAAC,CAQtF"}
@@ -1,25 +1,67 @@
1
1
  import { n as e, r as t } from "../path-utils-BcvXLCGi.js";
2
- import { t as n } from "../locale-head-CqUlvy3O.js";
2
+ import { t as n } from "../locale-head-BuSO-fCZ.js";
3
3
  import { computed as r } from "vue";
4
- import { useRoute as i, useRuntimeConfig as a } from "#imports";
5
- import { useI18n as o } from "@fluenti/vue";
4
+ import { useRoute as i, useRouter as a, useRuntimeConfig as o } from "#imports";
5
+ import { useI18n as s } from "@fluenti/vue";
6
6
  //#region src/runtime/composables.ts
7
- function s() {
8
- return a().public.fluenti;
9
- }
10
7
  function c() {
11
- let { locale: t } = o(), n = s();
12
- return (r, i) => e(r, i ?? t.value, n.defaultLocale, n.strategy);
8
+ return o().public.fluenti;
13
9
  }
14
10
  function l() {
15
- let e = i(), n = s();
11
+ let { locale: t } = s(), n = c();
12
+ return (r, i) => e(r, i ?? t.value, n.defaultLocale, n.strategy);
13
+ }
14
+ function u() {
15
+ let e = i(), n = c();
16
16
  return (r) => t(e.path, r, n.locales, n.defaultLocale, n.strategy);
17
17
  }
18
- function u(e) {
19
- let { locale: t } = o(), a = i(), c = s();
20
- return r(() => n(t.value, a.path, c, e));
18
+ function d() {
19
+ let { locale: t } = s(), n = a(), r = c();
20
+ return (i, a) => {
21
+ let o = a ?? t.value;
22
+ if (typeof i == "string") {
23
+ let t = e(i, o, r.defaultLocale, r.strategy);
24
+ return n.resolve(t);
25
+ }
26
+ if ("path" in i && i.path) {
27
+ let t = e(i.path, o, r.defaultLocale, r.strategy);
28
+ return n.resolve({
29
+ ...i,
30
+ path: t
31
+ });
32
+ }
33
+ return n.resolve(i);
34
+ };
35
+ }
36
+ function f(e) {
37
+ let t = s();
38
+ return {
39
+ ...t,
40
+ t(n, r) {
41
+ if (typeof n == "string") return t.t(`${e}.${n}`, r);
42
+ if (n && typeof n == "object" && "id" in n) {
43
+ let i = n;
44
+ return t.t({
45
+ ...i,
46
+ id: `${e}.${i.id}`
47
+ }, r);
48
+ }
49
+ return t.t(n, r);
50
+ },
51
+ te(n, r) {
52
+ return t.te(`${e}.${n}`, r);
53
+ },
54
+ tm(n, r) {
55
+ return t.tm(`${e}.${n}`, r);
56
+ },
57
+ namespace: e
58
+ };
59
+ }
60
+ function p(e) {
61
+ let { locale: t } = s(), a = i(), o = c();
62
+ return r(() => n(t.value, a.path, o, e));
21
63
  }
22
64
  //#endregion
23
- export { u as useLocaleHead, c as useLocalePath, l as useSwitchLocalePath };
65
+ export { f as useI18nScoped, p as useLocaleHead, l as useLocalePath, d as useLocaleRoute, u as useSwitchLocalePath };
24
66
 
25
67
  //# sourceMappingURL=composables.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"composables.js","names":[],"sources":["../../src/runtime/composables.ts"],"sourcesContent":["import { computed } from 'vue'\nimport type { ComputedRef } from 'vue'\nimport { useRoute, useRuntimeConfig } from '#imports'\nimport { useI18n } from '@fluenti/vue'\nimport { localePath, switchLocalePath } from './path-utils'\nimport type { FluentNuxtRuntimeConfig } from '../types'\nimport type { LocaleHeadMeta, LocaleHeadOptions } from './locale-head'\nimport { buildLocaleHead } from './locale-head'\n\n/** Resolve fluenti runtime config from Nuxt's public runtimeConfig */\nfunction useFluentiConfig(): FluentNuxtRuntimeConfig {\n const runtimeConfig = useRuntimeConfig()\n return runtimeConfig.public['fluenti'] as FluentNuxtRuntimeConfig\n}\n\n/**\n * Composable that returns a function to generate locale-prefixed paths.\n *\n * Zero-argument — automatically reads the current locale from @fluenti/vue\n * and routing config from Nuxt runtimeConfig.\n *\n * @example\n * ```ts\n * const localePath = useLocalePath()\n * localePath('/about') // '/ja/about' (current locale is 'ja')\n * localePath('/about', 'en') // '/about' (prefix_except_default, en is default)\n * ```\n */\nexport function useLocalePath(): (path: string, locale?: string) => string {\n const { locale } = useI18n()\n const config = useFluentiConfig()\n\n return (path: string, targetLocale?: string) => {\n return localePath(\n path,\n targetLocale ?? locale.value,\n config.defaultLocale,\n config.strategy,\n )\n }\n}\n\n/**\n * Composable that returns a function to get the current path in a different locale.\n *\n * @example\n * ```ts\n * const switchLocalePath = useSwitchLocalePath()\n * switchLocalePath('en') // '/about' (if on '/ja/about')\n * ```\n */\nexport function useSwitchLocalePath(): (locale: string) => string {\n const route = useRoute()\n const config = useFluentiConfig()\n\n return (newLocale: string) => {\n return switchLocalePath(\n route.path,\n newLocale,\n config.locales,\n config.defaultLocale,\n config.strategy,\n )\n }\n}\n\n/**\n * Composable that generates locale-aware HTML head metadata.\n *\n * @example\n * ```ts\n * const head = useLocaleHead({ addSeoAttributes: true, baseUrl: 'https://example.com' })\n * useHead(head.value) // Nuxt useHead\n * ```\n */\nexport function useLocaleHead(options?: LocaleHeadOptions): ComputedRef<LocaleHeadMeta> {\n const { locale } = useI18n()\n const route = useRoute()\n const config = useFluentiConfig()\n\n return computed(() => {\n return buildLocaleHead(locale.value, route.path, config, options)\n })\n}\n"],"mappings":";;;;;;AAUA,SAAS,IAA4C;AAEnD,QADsB,GAAkB,CACnB,OAAO;;AAgB9B,SAAgB,IAA2D;CACzE,IAAM,EAAE,cAAW,GAAS,EACtB,IAAS,GAAkB;AAEjC,SAAQ,GAAc,MACb,EACL,GACA,KAAgB,EAAO,OACvB,EAAO,eACP,EAAO,SACR;;AAaL,SAAgB,IAAkD;CAChE,IAAM,IAAQ,GAAU,EAClB,IAAS,GAAkB;AAEjC,SAAQ,MACC,EACL,EAAM,MACN,GACA,EAAO,SACP,EAAO,eACP,EAAO,SACR;;AAaL,SAAgB,EAAc,GAA0D;CACtF,IAAM,EAAE,cAAW,GAAS,EACtB,IAAQ,GAAU,EAClB,IAAS,GAAkB;AAEjC,QAAO,QACE,EAAgB,EAAO,OAAO,EAAM,MAAM,GAAQ,EAAQ,CACjE"}
1
+ {"version":3,"file":"composables.js","names":[],"sources":["../../src/runtime/composables.ts"],"sourcesContent":["import { computed } from 'vue'\nimport type { ComputedRef } from 'vue'\nimport { useRoute, useRouter, useRuntimeConfig } from '#imports'\nimport type { RouteLocationRaw, RouteLocationResolved } from 'vue-router'\nimport { useI18n } from '@fluenti/vue'\nimport { localePath, switchLocalePath } from './path-utils'\nimport type { FluentNuxtRuntimeConfig } from '../types'\nimport type { LocaleHeadMeta, LocaleHeadOptions } from './locale-head'\nimport { buildLocaleHead } from './locale-head'\n\n/** Resolve fluenti runtime config from Nuxt's public runtimeConfig */\nfunction useFluentiConfig(): FluentNuxtRuntimeConfig {\n const runtimeConfig = useRuntimeConfig()\n return runtimeConfig.public['fluenti'] as FluentNuxtRuntimeConfig\n}\n\n/**\n * Composable that returns a function to generate locale-prefixed paths.\n *\n * Zero-argument — automatically reads the current locale from @fluenti/vue\n * and routing config from Nuxt runtimeConfig.\n *\n * @example\n * ```ts\n * const localePath = useLocalePath()\n * localePath('/about') // '/ja/about' (current locale is 'ja')\n * localePath('/about', 'en') // '/about' (prefix_except_default, en is default)\n * ```\n */\nexport function useLocalePath(): (path: string, locale?: string) => string {\n const { locale } = useI18n()\n const config = useFluentiConfig()\n\n return (path: string, targetLocale?: string) => {\n return localePath(\n path,\n targetLocale ?? locale.value,\n config.defaultLocale,\n config.strategy,\n )\n }\n}\n\n/**\n * Composable that returns a function to get the current path in a different locale.\n *\n * @example\n * ```ts\n * const switchLocalePath = useSwitchLocalePath()\n * switchLocalePath('en') // '/about' (if on '/ja/about')\n * ```\n */\nexport function useSwitchLocalePath(): (locale: string) => string {\n const route = useRoute()\n const config = useFluentiConfig()\n\n return (newLocale: string) => {\n return switchLocalePath(\n route.path,\n newLocale,\n config.locales,\n config.defaultLocale,\n config.strategy,\n )\n }\n}\n\n/**\n * Composable that returns a function to resolve a locale-prefixed route object.\n *\n * Unlike `useLocalePath()` which returns a path string, this returns a full\n * resolved `RouteLocationResolved` that can be passed to `router.push()`.\n *\n * @example\n * ```ts\n * const localeRoute = useLocaleRoute()\n * const route = localeRoute('/about') // resolved route for '/ja/about'\n * const route = localeRoute('/about', 'en') // resolved route for '/about'\n * router.push(route)\n * ```\n */\nexport function useLocaleRoute(): (to: RouteLocationRaw, locale?: string) => RouteLocationResolved {\n const { locale } = useI18n()\n const router = useRouter()\n const config = useFluentiConfig()\n\n return (to: RouteLocationRaw, targetLocale?: string) => {\n const resolvedLocale = targetLocale ?? locale.value\n if (typeof to === 'string') {\n const path = localePath(to, resolvedLocale, config.defaultLocale, config.strategy)\n return router.resolve(path)\n }\n // For object routes, prefix the path if present\n if ('path' in to && to.path) {\n const path = localePath(to.path, resolvedLocale, config.defaultLocale, config.strategy)\n return router.resolve({ ...to, path })\n }\n // For named routes, resolve as-is\n return router.resolve(to)\n }\n}\n\n/**\n * Composable that returns a namespace-scoped i18n context.\n *\n * The `t()` function automatically prepends the namespace to message keys,\n * reducing boilerplate when a component only uses messages from one section.\n *\n * @example\n * ```ts\n * const { t } = useI18nScoped('Navbar')\n * t('home') // looks up 'Navbar.home'\n * t('about') // looks up 'Navbar.about'\n * ```\n */\nexport function useI18nScoped(namespace: string) {\n const ctx = useI18n()\n const separator = '.'\n\n return {\n ...ctx,\n t(idOrDescriptor: unknown, values?: Record<string, unknown>): string {\n if (typeof idOrDescriptor === 'string') {\n return ctx.t(`${namespace}${separator}${idOrDescriptor}`, values)\n }\n // MessageDescriptor — prefix the id\n if (idOrDescriptor && typeof idOrDescriptor === 'object' && 'id' in idOrDescriptor) {\n const desc = idOrDescriptor as { id: string }\n return ctx.t({ ...desc, id: `${namespace}${separator}${desc.id}` }, values)\n }\n // Tagged template — pass through (no namespacing for tagged templates)\n return (ctx.t as Function)(idOrDescriptor, values)\n },\n te(key: string, locale?: string): boolean {\n return ctx.te(`${namespace}${separator}${key}`, locale)\n },\n tm(key: string, locale?: string) {\n return ctx.tm(`${namespace}${separator}${key}`, locale)\n },\n /** The namespace this context is scoped to */\n namespace,\n }\n}\n\n/**\n * Composable that generates locale-aware HTML head metadata.\n *\n * @example\n * ```ts\n * const head = useLocaleHead({ addSeoAttributes: true, baseUrl: 'https://example.com' })\n * useHead(head.value) // Nuxt useHead\n * ```\n */\nexport function useLocaleHead(options?: LocaleHeadOptions): ComputedRef<LocaleHeadMeta> {\n const { locale } = useI18n()\n const route = useRoute()\n const config = useFluentiConfig()\n\n return computed(() => {\n return buildLocaleHead(locale.value, route.path, config, options)\n })\n}\n"],"mappings":";;;;;;AAWA,SAAS,IAA4C;AAEnD,QADsB,GAAkB,CACnB,OAAO;;AAgB9B,SAAgB,IAA2D;CACzE,IAAM,EAAE,cAAW,GAAS,EACtB,IAAS,GAAkB;AAEjC,SAAQ,GAAc,MACb,EACL,GACA,KAAgB,EAAO,OACvB,EAAO,eACP,EAAO,SACR;;AAaL,SAAgB,IAAkD;CAChE,IAAM,IAAQ,GAAU,EAClB,IAAS,GAAkB;AAEjC,SAAQ,MACC,EACL,EAAM,MACN,GACA,EAAO,SACP,EAAO,eACP,EAAO,SACR;;AAkBL,SAAgB,IAAmF;CACjG,IAAM,EAAE,cAAW,GAAS,EACtB,IAAS,GAAW,EACpB,IAAS,GAAkB;AAEjC,SAAQ,GAAsB,MAA0B;EACtD,IAAM,IAAiB,KAAgB,EAAO;AAC9C,MAAI,OAAO,KAAO,UAAU;GAC1B,IAAM,IAAO,EAAW,GAAI,GAAgB,EAAO,eAAe,EAAO,SAAS;AAClF,UAAO,EAAO,QAAQ,EAAK;;AAG7B,MAAI,UAAU,KAAM,EAAG,MAAM;GAC3B,IAAM,IAAO,EAAW,EAAG,MAAM,GAAgB,EAAO,eAAe,EAAO,SAAS;AACvF,UAAO,EAAO,QAAQ;IAAE,GAAG;IAAI;IAAM,CAAC;;AAGxC,SAAO,EAAO,QAAQ,EAAG;;;AAiB7B,SAAgB,EAAc,GAAmB;CAC/C,IAAM,IAAM,GAAS;AAGrB,QAAO;EACL,GAAG;EACH,EAAE,GAAyB,GAA0C;AACnE,OAAI,OAAO,KAAmB,SAC5B,QAAO,EAAI,EAAE,GAAG,KAAwB,KAAkB,EAAO;AAGnE,OAAI,KAAkB,OAAO,KAAmB,YAAY,QAAQ,GAAgB;IAClF,IAAM,IAAO;AACb,WAAO,EAAI,EAAE;KAAE,GAAG;KAAM,IAAI,GAAG,KAAwB,EAAK;KAAM,EAAE,EAAO;;AAG7E,UAAQ,EAAI,EAAe,GAAgB,EAAO;;EAEpD,GAAG,GAAa,GAA0B;AACxC,UAAO,EAAI,GAAG,GAAG,KAAwB,KAAO,EAAO;;EAEzD,GAAG,GAAa,GAAiB;AAC/B,UAAO,EAAI,GAAG,GAAG,KAAwB,KAAO,EAAO;;EAGzD;EACD;;AAYH,SAAgB,EAAc,GAA0D;CACtF,IAAM,EAAE,cAAW,GAAS,EACtB,IAAQ,GAAU,EAClB,IAAS,GAAkB;AAEjC,QAAO,QACE,EAAgB,EAAO,OAAO,EAAM,MAAM,GAAQ,EAAQ,CACjE"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){}exports.defineI18nRoute=e;
2
+ //# sourceMappingURL=define-i18n-route.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-i18n-route.cjs","names":[],"sources":["../../src/runtime/define-i18n-route.ts"],"sourcesContent":["import type { I18nRouteConfig } from '../types'\n\n/**\n * Define per-page i18n route configuration.\n *\n * Use in `<script setup>` to restrict which locales a page supports,\n * or set to `false` to disable i18n routing for a page.\n *\n * Under the hood, this stores the config in `definePageMeta` via `meta.i18nRoute`.\n *\n * @example\n * ```vue\n * <script setup>\n * // Only generate /en/pricing and /ja/pricing routes\n * defineI18nRoute({ locales: ['en', 'ja'] })\n * </script>\n * ```\n *\n * @example\n * ```vue\n * <script setup>\n * // Skip i18n routing for this page entirely\n * defineI18nRoute(false)\n * </script>\n * ```\n */\nexport function defineI18nRoute(config: I18nRouteConfig): void {\n // This is a compile-time macro. At runtime, the config is read from\n // page meta during route extension. This function exists only for type\n // checking and IDE support. The actual page meta injection is handled\n // by a Vite transform or by the user calling definePageMeta manually.\n //\n // Usage: definePageMeta({ i18nRoute: defineI18nRoute({ locales: ['en', 'ja'] }) })\n // Or the module can provide a Vite plugin to auto-transform this.\n void config\n}\n"],"mappings":"mEA0BA,SAAgB,EAAgB,EAA+B"}
@@ -0,0 +1,27 @@
1
+ import { I18nRouteConfig } from '../types';
2
+ /**
3
+ * Define per-page i18n route configuration.
4
+ *
5
+ * Use in `<script setup>` to restrict which locales a page supports,
6
+ * or set to `false` to disable i18n routing for a page.
7
+ *
8
+ * Under the hood, this stores the config in `definePageMeta` via `meta.i18nRoute`.
9
+ *
10
+ * @example
11
+ * ```vue
12
+ * <script setup>
13
+ * // Only generate /en/pricing and /ja/pricing routes
14
+ * defineI18nRoute({ locales: ['en', 'ja'] })
15
+ * </script>
16
+ * ```
17
+ *
18
+ * @example
19
+ * ```vue
20
+ * <script setup>
21
+ * // Skip i18n routing for this page entirely
22
+ * defineI18nRoute(false)
23
+ * </script>
24
+ * ```
25
+ */
26
+ export declare function defineI18nRoute(config: I18nRouteConfig): void;
27
+ //# sourceMappingURL=define-i18n-route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-i18n-route.d.ts","sourceRoot":"","sources":["../../src/runtime/define-i18n-route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAS7D"}
@@ -0,0 +1,6 @@
1
+ //#region src/runtime/define-i18n-route.ts
2
+ function e(e) {}
3
+ //#endregion
4
+ export { e as defineI18nRoute };
5
+
6
+ //# sourceMappingURL=define-i18n-route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-i18n-route.js","names":[],"sources":["../../src/runtime/define-i18n-route.ts"],"sourcesContent":["import type { I18nRouteConfig } from '../types'\n\n/**\n * Define per-page i18n route configuration.\n *\n * Use in `<script setup>` to restrict which locales a page supports,\n * or set to `false` to disable i18n routing for a page.\n *\n * Under the hood, this stores the config in `definePageMeta` via `meta.i18nRoute`.\n *\n * @example\n * ```vue\n * <script setup>\n * // Only generate /en/pricing and /ja/pricing routes\n * defineI18nRoute({ locales: ['en', 'ja'] })\n * </script>\n * ```\n *\n * @example\n * ```vue\n * <script setup>\n * // Skip i18n routing for this page entirely\n * defineI18nRoute(false)\n * </script>\n * ```\n */\nexport function defineI18nRoute(config: I18nRouteConfig): void {\n // This is a compile-time macro. At runtime, the config is read from\n // page meta during route extension. This function exists only for type\n // checking and IDE support. The actual page meta injection is handled\n // by a Vite transform or by the user calling definePageMeta manually.\n //\n // Usage: definePageMeta({ i18nRoute: defineI18nRoute({ locales: ['en', 'ja'] }) })\n // Or the module can provide a Vite plugin to auto-transform this.\n void config\n}\n"],"mappings":";AA0BA,SAAgB,EAAgB,GAA+B"}
@@ -1 +1 @@
1
- {"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../src/runtime/detectors/cookie.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,sCAAsC;AACtC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI,CAWnE"}
1
+ {"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../src/runtime/detectors/cookie.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,sCAAsC;AACtC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI,CAqBnE"}
@@ -0,0 +1,2 @@
1
+ function e(e){if(e.strategy!==`domains`||!e.host)return;let t=e.domains;if(!t?.length)return;let n=e.host.toLowerCase().replace(/:\d+$/,``);for(let r of t)if(r.domain.toLowerCase()===n){e.setLocale(r.locale);return}}module.exports=e;
2
+ //# sourceMappingURL=domain.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain.cjs","names":[],"sources":["../../../src/runtime/detectors/domain.ts"],"sourcesContent":["import type { LocaleDetectContext } from '../../types'\nimport type { DomainConfig } from '../../types'\n\n/**\n * Detect locale from the request hostname.\n *\n * Matches the current host against the `domains` config to determine locale.\n * Only active when `strategy: 'domains'` is configured.\n */\nexport default function detectDomain(ctx: LocaleDetectContext): void {\n if (ctx.strategy !== 'domains') return\n if (!ctx.host) return\n\n // Access domains from the runtime config injected by the module\n const domains = (ctx as unknown as { domains?: DomainConfig[] }).domains\n if (!domains?.length) return\n\n const host = ctx.host.toLowerCase().replace(/:\\d+$/, '') // strip port\n\n for (const entry of domains) {\n if (entry.domain.toLowerCase() === host) {\n ctx.setLocale(entry.locale)\n return\n }\n }\n}\n"],"mappings":"AASA,SAAwB,EAAa,EAAgC,CAEnE,GADI,EAAI,WAAa,WACjB,CAAC,EAAI,KAAM,OAGf,IAAM,EAAW,EAAgD,QACjE,GAAI,CAAC,GAAS,OAAQ,OAEtB,IAAM,EAAO,EAAI,KAAK,aAAa,CAAC,QAAQ,QAAS,GAAG,CAExD,IAAK,IAAM,KAAS,EAClB,GAAI,EAAM,OAAO,aAAa,GAAK,EAAM,CACvC,EAAI,UAAU,EAAM,OAAO,CAC3B"}
@@ -0,0 +1,9 @@
1
+ import { LocaleDetectContext } from '../../types';
2
+ /**
3
+ * Detect locale from the request hostname.
4
+ *
5
+ * Matches the current host against the `domains` config to determine locale.
6
+ * Only active when `strategy: 'domains'` is configured.
7
+ */
8
+ export default function detectDomain(ctx: LocaleDetectContext): void;
9
+ //# sourceMappingURL=domain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../../src/runtime/detectors/domain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAGtD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI,CAgBnE"}
@@ -0,0 +1,15 @@
1
+ //#region src/runtime/detectors/domain.ts
2
+ function e(e) {
3
+ if (e.strategy !== "domains" || !e.host) return;
4
+ let t = e.domains;
5
+ if (!t?.length) return;
6
+ let n = e.host.toLowerCase().replace(/:\d+$/, "");
7
+ for (let r of t) if (r.domain.toLowerCase() === n) {
8
+ e.setLocale(r.locale);
9
+ return;
10
+ }
11
+ }
12
+ //#endregion
13
+ export { e as default };
14
+
15
+ //# sourceMappingURL=domain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain.js","names":[],"sources":["../../../src/runtime/detectors/domain.ts"],"sourcesContent":["import type { LocaleDetectContext } from '../../types'\nimport type { DomainConfig } from '../../types'\n\n/**\n * Detect locale from the request hostname.\n *\n * Matches the current host against the `domains` config to determine locale.\n * Only active when `strategy: 'domains'` is configured.\n */\nexport default function detectDomain(ctx: LocaleDetectContext): void {\n if (ctx.strategy !== 'domains') return\n if (!ctx.host) return\n\n // Access domains from the runtime config injected by the module\n const domains = (ctx as unknown as { domains?: DomainConfig[] }).domains\n if (!domains?.length) return\n\n const host = ctx.host.toLowerCase().replace(/:\\d+$/, '') // strip port\n\n for (const entry of domains) {\n if (entry.domain.toLowerCase() === host) {\n ctx.setLocale(entry.locale)\n return\n }\n }\n}\n"],"mappings":";AASA,SAAwB,EAAa,GAAgC;AAEnE,KADI,EAAI,aAAa,aACjB,CAAC,EAAI,KAAM;CAGf,IAAM,IAAW,EAAgD;AACjE,KAAI,CAAC,GAAS,OAAQ;CAEtB,IAAM,IAAO,EAAI,KAAK,aAAa,CAAC,QAAQ,SAAS,GAAG;AAExD,MAAK,IAAM,KAAS,EAClB,KAAI,EAAM,OAAO,aAAa,KAAK,GAAM;AACvC,IAAI,UAAU,EAAM,OAAO;AAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/runtime/detectors/header.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,2DAA2D;AAC3D,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI,CAcnE"}
1
+ {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/runtime/detectors/header.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,2DAA2D;AAC3D,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI,CAWnE"}
@@ -6,7 +6,7 @@ declare const builtinDetectors: Record<string, LocaleDetectorFn>;
6
6
  *
7
7
  * Returns the detected locale or the defaultLocale as fallback.
8
8
  */
9
- export declare function runDetectors(path: string, config: FluentNuxtRuntimeConfig, customDetectors?: Map<string, LocaleDetectorFn>, hookFn?: (ctx: LocaleDetectContext) => void | Promise<void>): Promise<string>;
9
+ export declare function runDetectors(path: string, config: FluentNuxtRuntimeConfig, customDetectors?: Map<string, LocaleDetectorFn>, hookFn?: (ctx: LocaleDetectContext) => void | Promise<void>, host?: string, cookieValue?: string | null, acceptLanguage?: string): Promise<string>;
10
10
  export { builtinDetectors };
11
11
  export type { LocaleDetectContext, LocaleDetectorFn };
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/detectors/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAMjG,8DAA8D;AAC9D,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAKtD,CAAA;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,uBAAuB,EAC/B,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC/C,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAC1D,OAAO,CAAC,MAAM,CAAC,CAsCjB;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA;AAC3B,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/detectors/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAOjG,8DAA8D;AAC9D,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAMtD,CAAA;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,uBAAuB,EAC/B,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC/C,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EAC3D,IAAI,CAAC,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,EAC3B,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,MAAM,CAAC,CA8CjB;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA;AAC3B,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/runtime/detectors/query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,2DAA2D;AAC3D,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI,CAUlE"}
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/runtime/detectors/query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAGtD,2DAA2D;AAC3D,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI,CAYlE"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../page-extend-OvV-ZhFB.cjs`),t=require(`../path-utils-BQIsp_or.cjs`),n=require(`../locale-head-BfsESdd7.cjs`),r=require(`./composables.cjs`),i=require(`./components/NuxtLinkLocale.cjs`);exports.NuxtLinkLocale=i.NuxtLinkLocale,exports.buildLocaleHead=n.t,exports.extendPages=e.t,exports.extractLocaleFromPath=t.t,exports.localePath=t.n,exports.switchLocalePath=t.r,exports.useLocaleHead=r.useLocaleHead,exports.useLocalePath=r.useLocalePath,exports.useSwitchLocalePath=r.useSwitchLocalePath;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../page-extend-tRXsujtK.cjs`),t=require(`../path-utils-BQIsp_or.cjs`),n=require(`../locale-head-D1NAUQc8.cjs`),r=require(`./composables.cjs`),i=require(`./components/NuxtLinkLocale.cjs`);exports.NuxtLinkLocale=i.NuxtLinkLocale,exports.buildLocaleHead=n.t,exports.extendPages=e.t,exports.extractLocaleFromPath=t.t,exports.localePath=t.n,exports.switchLocalePath=t.r,exports.useI18nScoped=r.useI18nScoped,exports.useLocaleHead=r.useLocaleHead,exports.useLocalePath=r.useLocalePath,exports.useLocaleRoute=r.useLocaleRoute,exports.useSwitchLocalePath=r.useSwitchLocalePath;
@@ -3,6 +3,6 @@ export { extendPages } from './page-extend';
3
3
  export type { PageRoute } from './page-extend';
4
4
  export { buildLocaleHead } from './locale-head';
5
5
  export type { LocaleHeadMeta, LocaleHeadOptions } from './locale-head';
6
- export { useLocalePath, useSwitchLocalePath, useLocaleHead } from './composables';
6
+ export { useLocalePath, useSwitchLocalePath, useLocaleRoute, useLocaleHead, useI18nScoped } from './composables';
7
7
  export { NuxtLinkLocale } from './components/NuxtLinkLocale';
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGlF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAGtE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAGjF,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGlF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAGtE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAGhH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA"}
@@ -1,6 +1,6 @@
1
- import { t as e } from "../page-extend-DJ7wpuVj.js";
1
+ import { t as e } from "../page-extend-BrPO2RhM.js";
2
2
  import { n as t, r as n, t as r } from "../path-utils-BcvXLCGi.js";
3
- import { t as i } from "../locale-head-CqUlvy3O.js";
4
- import { useLocaleHead as a, useLocalePath as o, useSwitchLocalePath as s } from "./composables.js";
5
- import { NuxtLinkLocale as c } from "./components/NuxtLinkLocale.js";
6
- export { c as NuxtLinkLocale, i as buildLocaleHead, e as extendPages, r as extractLocaleFromPath, t as localePath, n as switchLocalePath, a as useLocaleHead, o as useLocalePath, s as useSwitchLocalePath };
3
+ import { t as i } from "../locale-head-BuSO-fCZ.js";
4
+ import { useI18nScoped as a, useLocaleHead as o, useLocalePath as s, useLocaleRoute as c, useSwitchLocalePath as l } from "./composables.js";
5
+ import { NuxtLinkLocale as u } from "./components/NuxtLinkLocale.js";
6
+ export { u as NuxtLinkLocale, i as buildLocaleHead, e as extendPages, r as extractLocaleFromPath, t as localePath, n as switchLocalePath, a as useI18nScoped, o as useLocaleHead, s as useLocalePath, c as useLocaleRoute, l as useSwitchLocalePath };
@@ -3,6 +3,7 @@ import { FluentNuxtRuntimeConfig } from '../types';
3
3
  export interface LocaleHeadMeta {
4
4
  htmlAttrs: {
5
5
  lang: string;
6
+ dir?: string;
6
7
  };
7
8
  link: Array<{
8
9
  rel: string;
@@ -19,6 +20,8 @@ export interface LocaleHeadOptions {
19
20
  addSeoAttributes?: boolean;
20
21
  /** Base URL for absolute hreflang links (e.g. 'https://example.com') */
21
22
  baseUrl?: string;
23
+ /** Add a canonical link tag for the current page (default: true when addSeoAttributes is true) */
24
+ addCanonical?: boolean;
22
25
  }
23
26
  /**
24
27
  * Pure function that builds locale-aware HTML head metadata.
@@ -1 +1 @@
1
- {"version":3,"file":"locale-head.d.ts","sourceRoot":"","sources":["../../src/runtime/locale-head.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAEvD,mCAAmC;AACnC,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3B,IAAI,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC5D,IAAI,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACnD;AAED,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,uBAAuB,EAC/B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,cAAc,CAoDhB"}
1
+ {"version":3,"file":"locale-head.d.ts","sourceRoot":"","sources":["../../src/runtime/locale-head.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAEvD,mCAAmC;AACnC,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACzC,IAAI,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC5D,IAAI,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACnD;AAED,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,kGAAkG;IAClG,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,uBAAuB,EAC/B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,cAAc,CAsHhB"}
@@ -1,2 +1,2 @@
1
- const e=require(`../../path-utils-BQIsp_or.cjs`),t=require(`../../detectors-CFJvuwzi.cjs`);let n=require(`#imports`);var r=(0,n.defineNuxtRouteMiddleware)(async r=>{let i=(0,n.useRuntimeConfig)().public.fluenti;if(i.strategy===`no_prefix`)return;let{locale:a}=e.t(r.path,i.locales);if(a||i.strategy===`prefix_except_default`)return;let o=(0,n.useNuxtApp)(),s={...i,detectOrder:i.detectOrder.filter(e=>e!==`path`)},c=await t.t(r.path,s),l=e.n(r.path,c,i.defaultLocale,i.strategy);if(l!==r.path)return o.runWithContext(()=>(0,n.navigateTo)(l,{redirectCode:302}))});module.exports=r;
1
+ const e=require(`../../path-utils-BQIsp_or.cjs`);require(`../../module.cjs`);const t=require(`../../detectors-BnmzZTww.cjs`);let n=require(`#imports`);var r=(0,n.defineNuxtRouteMiddleware)(async r=>{let i=(0,n.useRuntimeConfig)().public.fluenti;if(i.strategy===`no_prefix`)return;let{locale:a}=e.t(r.path,i.locales);if(a||i.strategy===`prefix_except_default`)return;let o=(0,n.useNuxtApp)(),s={...i,detectOrder:i.detectOrder.filter(e=>e!==`path`)},c=await t.t(r.path,s),l=e.n(r.path,c,i.defaultLocale,i.strategy);if(l!==r.path)return o.runWithContext(()=>(0,n.navigateTo)(l,{redirectCode:302}))});module.exports=r;
2
2
  //# sourceMappingURL=locale-redirect.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"locale-redirect.cjs","names":[],"sources":["../../../src/runtime/middleware/locale-redirect.ts"],"sourcesContent":["import { defineNuxtRouteMiddleware, navigateTo, useNuxtApp, useRuntimeConfig } from '#imports'\nimport { extractLocaleFromPath, localePath } from '../path-utils'\nimport { runDetectors } from '../detectors'\nimport type { FluentNuxtRuntimeConfig } from '../../types'\n\n/**\n * Route middleware that redirects users to locale-prefixed URLs\n * based on the locale detection chain (detectors + hook).\n *\n * Only active when strategy is not 'no_prefix'.\n * Skips redirect when the URL already contains a valid locale prefix.\n */\nexport default defineNuxtRouteMiddleware(async (to) => {\n const config = useRuntimeConfig().public['fluenti'] as FluentNuxtRuntimeConfig\n\n if (config.strategy === 'no_prefix') return\n\n // If the path already has a locale prefix, do nothing\n const { locale: pathLocale } = extractLocaleFromPath(to.path, config.locales)\n if (pathLocale) return\n\n // For prefix_except_default / prefix_and_default, an unprefixed path\n // means the default locale — no redirect needed for prefix_except_default\n if (config.strategy === 'prefix_except_default') return\n\n // Capture nuxtApp BEFORE any await — async local storage (composable\n // context) is lost after awaiting, so navigateTo would fail without this.\n const nuxtApp = useNuxtApp()\n\n // For 'prefix' strategy, we must redirect to a locale-prefixed URL\n // Run detectors excluding 'path' (since we know path has no locale)\n const configWithoutPath = {\n ...config,\n detectOrder: config.detectOrder.filter((d) => d !== 'path'),\n }\n const detectedLocale = await runDetectors(to.path, configWithoutPath)\n const targetPath = localePath(to.path, detectedLocale, config.defaultLocale, config.strategy)\n\n if (targetPath !== to.path) {\n return nuxtApp.runWithContext(() => navigateTo(targetPath, { redirectCode: 302 }))\n }\n})\n"],"mappings":"qHAYA,IAAA,GAAA,EAAA,EAAA,2BAAyC,KAAO,IAAO,CACrD,IAAM,GAAA,EAAA,EAAA,mBAA2B,CAAC,OAAO,QAEzC,GAAI,EAAO,WAAa,YAAa,OAGrC,GAAM,CAAE,OAAQ,GAAe,EAAA,EAAsB,EAAG,KAAM,EAAO,QAAQ,CAK7E,GAJI,GAIA,EAAO,WAAa,wBAAyB,OAIjD,IAAM,GAAA,EAAA,EAAA,aAAsB,CAItB,EAAoB,CACxB,GAAG,EACH,YAAa,EAAO,YAAY,OAAQ,GAAM,IAAM,OAAO,CAC5D,CACK,EAAiB,MAAM,EAAA,EAAa,EAAG,KAAM,EAAkB,CAC/D,EAAa,EAAA,EAAW,EAAG,KAAM,EAAgB,EAAO,cAAe,EAAO,SAAS,CAE7F,GAAI,IAAe,EAAG,KACpB,OAAO,EAAQ,oBAAA,EAAA,EAAA,YAAgC,EAAY,CAAE,aAAc,IAAK,CAAC,CAAC,EAEpF"}
1
+ {"version":3,"file":"locale-redirect.cjs","names":[],"sources":["../../../src/runtime/middleware/locale-redirect.ts"],"sourcesContent":["import { defineNuxtRouteMiddleware, navigateTo, useNuxtApp, useRuntimeConfig } from '#imports'\nimport { extractLocaleFromPath, localePath } from '../path-utils'\nimport { runDetectors } from '../detectors'\nimport type { FluentNuxtRuntimeConfig } from '../../types'\n\n/**\n * Route middleware that redirects users to locale-prefixed URLs\n * based on the locale detection chain (detectors + hook).\n *\n * Only active when strategy is not 'no_prefix'.\n * Skips redirect when the URL already contains a valid locale prefix.\n */\nexport default defineNuxtRouteMiddleware(async (to) => {\n const config = useRuntimeConfig().public['fluenti'] as FluentNuxtRuntimeConfig\n\n if (config.strategy === 'no_prefix') return\n\n // If the path already has a locale prefix, do nothing\n const { locale: pathLocale } = extractLocaleFromPath(to.path, config.locales)\n if (pathLocale) return\n\n // For prefix_except_default / prefix_and_default, an unprefixed path\n // means the default locale — no redirect needed for prefix_except_default\n if (config.strategy === 'prefix_except_default') return\n\n // Capture nuxtApp BEFORE any await — async local storage (composable\n // context) is lost after awaiting, so navigateTo would fail without this.\n const nuxtApp = useNuxtApp()\n\n // For 'prefix' strategy, we must redirect to a locale-prefixed URL\n // Run detectors excluding 'path' (since we know path has no locale)\n const configWithoutPath = {\n ...config,\n detectOrder: config.detectOrder.filter((d) => d !== 'path'),\n }\n const detectedLocale = await runDetectors(to.path, configWithoutPath)\n const targetPath = localePath(to.path, detectedLocale, config.defaultLocale, config.strategy)\n\n if (targetPath !== to.path) {\n return nuxtApp.runWithContext(() => navigateTo(targetPath, { redirectCode: 302 }))\n }\n})\n"],"mappings":"uJAYA,IAAA,GAAA,EAAA,EAAA,2BAAyC,KAAO,IAAO,CACrD,IAAM,GAAA,EAAA,EAAA,mBAA2B,CAAC,OAAO,QAEzC,GAAI,EAAO,WAAa,YAAa,OAGrC,GAAM,CAAE,OAAQ,GAAe,EAAA,EAAsB,EAAG,KAAM,EAAO,QAAQ,CAK7E,GAJI,GAIA,EAAO,WAAa,wBAAyB,OAIjD,IAAM,GAAA,EAAA,EAAA,aAAsB,CAItB,EAAoB,CACxB,GAAG,EACH,YAAa,EAAO,YAAY,OAAQ,GAAM,IAAM,OAAO,CAC5D,CACK,EAAiB,MAAM,EAAA,EAAa,EAAG,KAAM,EAAkB,CAC/D,EAAa,EAAA,EAAW,EAAG,KAAM,EAAgB,EAAO,cAAe,EAAO,SAAS,CAE7F,GAAI,IAAe,EAAG,KACpB,OAAO,EAAQ,oBAAA,EAAA,EAAA,YAAgC,EAAY,CAAE,aAAc,IAAK,CAAC,CAAC,EAEpF"}
@@ -1,5 +1,5 @@
1
1
  import { n as e, t } from "../../path-utils-BcvXLCGi.js";
2
- import { t as n } from "../../detectors-DhkfHBHr.js";
2
+ import { t as n } from "../../detectors-CAqp_VCN.js";
3
3
  import { defineNuxtRouteMiddleware as r, navigateTo as i, useNuxtApp as a, useRuntimeConfig as o } from "#imports";
4
4
  //#region src/runtime/middleware/locale-redirect.ts
5
5
  var s = r(async (r) => {
@@ -4,6 +4,26 @@ export interface PageRoute {
4
4
  path: string;
5
5
  name?: string;
6
6
  children?: PageRoute[];
7
+ meta?: Record<string, unknown>;
8
+ }
9
+ /** Route name template: (originalName, locale) => newName */
10
+ export type RouteNameTemplate = (name: string, locale: string) => string;
11
+ export interface ExtendPagesOptions {
12
+ locales: string[];
13
+ defaultLocale: string;
14
+ strategy: Strategy;
15
+ routeNameTemplate?: RouteNameTemplate;
16
+ /**
17
+ * Custom route paths per locale.
18
+ * Keys are original route paths; values map locale → custom path.
19
+ */
20
+ routeOverrides?: Record<string, Record<string, string>>;
21
+ /**
22
+ * Route generation mode.
23
+ * - `'all'` (default): All pages get locale variants unless opted out via `i18nRoute: false`.
24
+ * - `'opt-in'`: Only pages with explicit `i18nRoute` meta get locale variants.
25
+ */
26
+ routeMode?: 'all' | 'opt-in';
7
27
  }
8
28
  /**
9
29
  * Extend page routes with locale-prefixed variants.
@@ -11,9 +31,5 @@ export interface PageRoute {
11
31
  *
12
32
  * This is a build-time utility used in the module's `pages:extend` hook.
13
33
  */
14
- export declare function extendPages(pages: PageRoute[], options: {
15
- locales: string[];
16
- defaultLocale: string;
17
- strategy: Strategy;
18
- }): void;
34
+ export declare function extendPages(pages: PageRoute[], options: ExtendPagesOptions): void;
19
35
  //# sourceMappingURL=page-extend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"page-extend.d.ts","sourceRoot":"","sources":["../../src/runtime/page-extend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,qDAAqD;AACrD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAA;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,EAAE,EAClB,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GACxE,IAAI,CAsBN"}
1
+ {"version":3,"file":"page-extend.d.ts","sourceRoot":"","sources":["../../src/runtime/page-extend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,qDAAqD;AACrD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B;AAED,6DAA6D;AAC7D,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;AAKxE,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,QAAQ,CAAA;IAClB,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACvD;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,EAAE,EAClB,OAAO,EAAE,kBAAkB,GAC1B,IAAI,CAkDN"}
@@ -1,2 +1,2 @@
1
- const e=require(`../path-utils-BQIsp_or.cjs`),t=require(`../detectors-CFJvuwzi.cjs`);let n=require(`vue`),r=require(`#imports`);var i=(0,r.defineNuxtPlugin)(async i=>{let a=(0,r.useRuntimeConfig)().public.fluenti,o=(0,r.useRoute)(),s=a.detectBrowserLanguage?.useCookie?a.detectBrowserLanguage:null,c=s?.cookieKey??`fluenti_locale`,l=s?(0,r.useCookie)(c):null,u;if({}.server)u=await t.t(o.path,a,void 0,async e=>{await i.callHook(`fluenti:detect-locale`,e)}),i.payload.fluentiLocale=u;else if(i.payload.fluentiLocale)u=i.payload.fluentiLocale;else{let{locale:t}=e.t(o.path,a.locales);u=t||(l&&l.value&&a.locales.includes(l.value)?l.value:a.defaultLocale)}let d=(0,n.ref)(u);return a.strategy!==`no_prefix`&&(0,n.watch)(()=>o.path,t=>{let{locale:n}=e.t(t,a.locales);n?d.value=n:a.strategy===`prefix_except_default`&&(d.value=a.defaultLocale)}),l&&(0,n.watch)(d,e=>{l.value=e}),i.vueApp.config.globalProperties.$localePath=(t,n)=>e.n(t,n??d.value,a.defaultLocale,a.strategy),{provide:{fluentiLocale:d,fluentiConfig:a}}});module.exports=i;
1
+ const e=require(`../path-utils-BQIsp_or.cjs`);require(`../module.cjs`);const t=require(`../detectors-BnmzZTww.cjs`);let n=require(`vue`),r=require(`#imports`);var i=(0,r.defineNuxtPlugin)(async i=>{let a=(0,r.useRuntimeConfig)().public.fluenti,o=(0,r.useRoute)(),s=a.detectBrowserLanguage?.useCookie?a.detectBrowserLanguage:null,c=s?.cookieKey??`fluenti_locale`,l=s?(0,r.useCookie)(c):null,u,d;if({}.server)try{let e=(0,r.useRequestHeaders)([`host`,`accept-language`]);d=e[`accept-language`],a.strategy===`domains`&&(u=e.host)}catch(e){({}).dev&&console.debug(`[fluenti] Header read failed:`,e)}else if(a.strategy===`domains`)try{u=window.location.host}catch(e){({}).dev&&console.debug(`[fluenti] Domain detection failed:`,e)}let f;if({}.server){f=await t.t(o.path,a,void 0,async e=>{await i.callHook(`fluenti:detect-locale`,e)},u,l?.value??void 0,d),i.payload.fluentiLocale=f;try{let e=i.ssrContext?.event;e&&(e.context.locale=f)}catch(e){({}).dev&&console.debug(`[fluenti] Event context not available:`,e)}}else if(i.payload.fluentiLocale)f=i.payload.fluentiLocale;else if(a.strategy===`domains`&&u&&a.domains?.length){let e=u.toLowerCase().replace(/:\d+$/,``),t=a.domains.find(t=>t.domain.toLowerCase()===e);f=t?t.locale:a.defaultLocale}else{let{locale:t}=e.t(o.path,a.locales);f=t||(l&&l.value&&a.locales.includes(l.value)?l.value:a.defaultLocale)}let p=(0,n.ref)(f);if(a.strategy!==`no_prefix`&&a.strategy!==`domains`&&(0,n.watch)(()=>o.path,t=>{let{locale:n}=e.t(t,a.locales);n?p.value=n:a.strategy===`prefix_except_default`&&(p.value=a.defaultLocale)}),l&&(0,n.watch)(p,e=>{l.value=e}),a.injectGlobalProperties){let t=i.vueApp.config.globalProperties;t.$localePath=(t,n)=>e.n(t,n??p.value,a.defaultLocale,a.strategy),t.$switchLocalePath=t=>e.r(o.path,t,a.locales,a.defaultLocale,a.strategy);try{let{useI18n:e}=await import(`@fluenti/vue`),n=e();t.$t||=n.t,t.$d||=n.d,t.$n||=n.n}catch(e){({}).dev&&console.debug(`[fluenti] Vue plugin not yet installed, skipping $t/$d/$n injection:`,e)}}return{provide:{fluentiLocale:p,fluentiConfig:a}}});module.exports=i;
2
2
  //# sourceMappingURL=plugin.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs","names":[],"sources":["../../src/runtime/plugin.ts"],"sourcesContent":["import { defineNuxtPlugin, useRuntimeConfig, useRoute, useCookie } from '#imports'\nimport { ref, watch } from 'vue'\nimport { localePath, extractLocaleFromPath } from './path-utils'\nimport { runDetectors } from './detectors'\nimport type { FluentNuxtRuntimeConfig, LocaleDetectContext } from '../types'\n\n/**\n * Nuxt runtime plugin that:\n * 1. Server: runs the locale detection chain, stores locale in payload for hydration\n * 2. Client: reads locale from payload to avoid hydration mismatch\n * 3. Provides reactive locale state and global helpers\n */\nexport default defineNuxtPlugin(async (nuxtApp) => {\n const config = useRuntimeConfig().public['fluenti'] as FluentNuxtRuntimeConfig\n const route = useRoute()\n\n // Hoist useCookie calls BEFORE any await to avoid losing the Nuxt\n // composable context (async local storage is dropped after await).\n const cookieCfg = config.detectBrowserLanguage?.useCookie\n ? config.detectBrowserLanguage\n : null\n const cookieKey = cookieCfg?.cookieKey ?? 'fluenti_locale'\n const localeCookie = cookieCfg ? useCookie(cookieKey) : null\n\n let detectedLocale: string\n\n if (import.meta.server) {\n // --- Server (SSR / SSG / ISR): run full detection chain ---\n detectedLocale = await runDetectors(\n route.path,\n config,\n undefined,\n async (ctx: LocaleDetectContext) => {\n await (nuxtApp.callHook as Function)('fluenti:detect-locale', ctx)\n },\n )\n // Store in payload — Nuxt serializes this to HTML automatically.\n // The client reads it back to ensure hydration uses the same locale.\n nuxtApp.payload['fluentiLocale'] = detectedLocale\n } else if (nuxtApp.payload['fluentiLocale']) {\n // --- Client (SSR hydration): read from payload to avoid mismatch ---\n detectedLocale = nuxtApp.payload['fluentiLocale'] as string\n } else {\n // --- Client (SPA mode / no payload): detect from path and cookie ---\n const { locale: pathLocale } = extractLocaleFromPath(route.path, config.locales)\n if (pathLocale) {\n detectedLocale = pathLocale\n } else if (localeCookie) {\n detectedLocale = (localeCookie.value && config.locales.includes(localeCookie.value))\n ? localeCookie.value\n : config.defaultLocale\n } else {\n detectedLocale = config.defaultLocale\n }\n }\n\n const currentLocale = ref(detectedLocale)\n\n // Sync locale when route changes (path-based detection)\n if (config.strategy !== 'no_prefix') {\n watch(() => route.path, (newPath) => {\n const { locale } = extractLocaleFromPath(newPath, config.locales)\n if (locale) {\n currentLocale.value = locale\n } else if (config.strategy === 'prefix_except_default') {\n // No locale prefix found — this means we're on a default locale route\n currentLocale.value = config.defaultLocale\n }\n })\n }\n\n // Persist locale in cookie if detectBrowserLanguage is configured\n if (localeCookie) {\n watch(currentLocale, (newLocale) => {\n localeCookie.value = newLocale\n })\n }\n\n // --- Inject global helpers ---\n nuxtApp.vueApp.config.globalProperties.$localePath = (path: string, locale?: string) => {\n return localePath(\n path,\n locale ?? currentLocale.value,\n config.defaultLocale,\n config.strategy,\n )\n }\n\n return {\n provide: {\n fluentiLocale: currentLocale,\n fluentiConfig: config,\n },\n }\n})\n"],"mappings":"gIAYA,IAAA,GAAA,EAAA,EAAA,kBAAgC,KAAO,IAAY,CACjD,IAAM,GAAA,EAAA,EAAA,mBAA2B,CAAC,OAAO,QACnC,GAAA,EAAA,EAAA,WAAkB,CAIlB,EAAY,EAAO,uBAAuB,UAC5C,EAAO,sBACP,KACE,EAAY,GAAW,WAAa,iBACpC,EAAe,GAAA,EAAA,EAAA,WAAsB,EAAU,CAAG,KAEpD,EAEJ,GAAA,EAAA,CAAgB,OAEd,EAAiB,MAAM,EAAA,EACrB,EAAM,KACN,EACA,IAAA,GACA,KAAO,IAA6B,CAClC,MAAO,EAAQ,SAAsB,wBAAyB,EAAI,EAErE,CAGD,EAAQ,QAAQ,cAAmB,UAC1B,EAAQ,QAAQ,cAEzB,EAAiB,EAAQ,QAAQ,kBAC5B,CAEL,GAAM,CAAE,OAAQ,GAAe,EAAA,EAAsB,EAAM,KAAM,EAAO,QAAQ,CAChF,AAOE,EAPE,IAEO,GACS,EAAa,OAAS,EAAO,QAAQ,SAAS,EAAa,MAAM,CAC/E,EAAa,MACb,EAAO,eAMf,IAAM,GAAA,EAAA,EAAA,KAAoB,EAAe,CAgCzC,OA7BI,EAAO,WAAa,cACtB,EAAA,EAAA,WAAY,EAAM,KAAO,GAAY,CACnC,GAAM,CAAE,UAAW,EAAA,EAAsB,EAAS,EAAO,QAAQ,CAC7D,EACF,EAAc,MAAQ,EACb,EAAO,WAAa,0BAE7B,EAAc,MAAQ,EAAO,gBAE/B,CAIA,IACF,EAAA,EAAA,OAAM,EAAgB,GAAc,CAClC,EAAa,MAAQ,GACrB,CAIJ,EAAQ,OAAO,OAAO,iBAAiB,aAAe,EAAc,IAC3D,EAAA,EACL,EACA,GAAU,EAAc,MACxB,EAAO,cACP,EAAO,SACR,CAGI,CACL,QAAS,CACP,cAAe,EACf,cAAe,EAChB,CACF,EACD"}
1
+ {"version":3,"file":"plugin.cjs","names":[],"sources":["../../src/runtime/plugin.ts"],"sourcesContent":["import { defineNuxtPlugin, useRuntimeConfig, useRoute, useCookie, useRequestHeaders } from '#imports'\nimport { ref, watch } from 'vue'\nimport { localePath, extractLocaleFromPath, switchLocalePath } from './path-utils'\nimport { runDetectors } from './detectors'\nimport type { FluentNuxtRuntimeConfig, LocaleDetectContext } from '../types'\n\n/**\n * Nuxt runtime plugin that:\n * 1. Server: runs the locale detection chain, stores locale in payload for hydration\n * 2. Client: reads locale from payload to avoid hydration mismatch\n * 3. Provides reactive locale state and global helpers\n */\nexport default defineNuxtPlugin(async (nuxtApp) => {\n const config = useRuntimeConfig().public['fluenti'] as FluentNuxtRuntimeConfig\n const route = useRoute()\n\n // Hoist useCookie calls BEFORE any await to avoid losing the Nuxt\n // composable context (async local storage is dropped after await).\n const cookieCfg = config.detectBrowserLanguage?.useCookie\n ? config.detectBrowserLanguage\n : null\n const cookieKey = cookieCfg?.cookieKey ?? 'fluenti_locale'\n const localeCookie = cookieCfg ? useCookie(cookieKey) : null\n\n // Hoist all server-side header/cookie reads BEFORE any await.\n // Nuxt composables rely on async local storage that is dropped after await.\n let host: string | undefined\n let acceptLanguage: string | undefined\n if (import.meta.server) {\n try {\n const reqHeaders = useRequestHeaders(['host', 'accept-language'])\n acceptLanguage = reqHeaders['accept-language']\n if (config.strategy === 'domains') {\n host = reqHeaders['host']\n }\n } catch (err) {\n if (import.meta.dev) console.debug('[fluenti] Header read failed:', err)\n }\n } else if (config.strategy === 'domains') {\n try {\n host = window.location.host\n } catch (err) {\n if (import.meta.dev) console.debug('[fluenti] Domain detection failed:', err)\n }\n }\n\n let detectedLocale: string\n\n if (import.meta.server) {\n // --- Server (SSR / SSG / ISR): run full detection chain ---\n detectedLocale = await runDetectors(\n route.path,\n config,\n undefined,\n async (ctx: LocaleDetectContext) => {\n await (nuxtApp.callHook as Function)('fluenti:detect-locale', ctx)\n },\n host,\n localeCookie?.value ?? undefined,\n acceptLanguage,\n )\n // Store in payload — Nuxt serializes this to HTML automatically.\n // The client reads it back to ensure hydration uses the same locale.\n nuxtApp.payload['fluentiLocale'] = detectedLocale\n // Also set on event context so other plugins (e.g. i18n.ts) can read it\n try {\n const event = (nuxtApp as unknown as { ssrContext?: { event?: { context: Record<string, unknown> } } }).ssrContext?.event\n if (event) event.context['locale'] = detectedLocale\n } catch (err) {\n if (import.meta.dev) console.debug('[fluenti] Event context not available:', err)\n }\n } else if (nuxtApp.payload['fluentiLocale']) {\n // --- Client (SSR hydration): read from payload to avoid mismatch ---\n detectedLocale = nuxtApp.payload['fluentiLocale'] as string\n } else {\n // --- Client (SPA mode / no payload): detect from path and cookie ---\n if (config.strategy === 'domains' && host && config.domains?.length) {\n const cleanHost = host.toLowerCase().replace(/:\\d+$/, '')\n const domainMatch = config.domains.find((d) => d.domain.toLowerCase() === cleanHost)\n if (domainMatch) {\n detectedLocale = domainMatch.locale\n } else {\n detectedLocale = config.defaultLocale\n }\n } else {\n const { locale: pathLocale } = extractLocaleFromPath(route.path, config.locales)\n if (pathLocale) {\n detectedLocale = pathLocale\n } else if (localeCookie) {\n detectedLocale = (localeCookie.value && config.locales.includes(localeCookie.value))\n ? localeCookie.value\n : config.defaultLocale\n } else {\n detectedLocale = config.defaultLocale\n }\n }\n }\n\n const currentLocale = ref(detectedLocale)\n\n // Sync locale when route changes (path-based detection)\n if (config.strategy !== 'no_prefix' && config.strategy !== 'domains') {\n watch(() => route.path, (newPath) => {\n const { locale } = extractLocaleFromPath(newPath, config.locales)\n if (locale) {\n currentLocale.value = locale\n } else if (config.strategy === 'prefix_except_default') {\n // No locale prefix found — this means we're on a default locale route\n currentLocale.value = config.defaultLocale\n }\n })\n }\n\n // Persist locale in cookie if detectBrowserLanguage is configured\n if (localeCookie) {\n watch(currentLocale, (newLocale) => {\n localeCookie.value = newLocale\n })\n }\n\n // --- Inject global helpers ---\n if (config.injectGlobalProperties) {\n const gp = nuxtApp.vueApp.config.globalProperties\n gp.$localePath = (path: string, locale?: string) => {\n return localePath(\n path,\n locale ?? currentLocale.value,\n config.defaultLocale,\n config.strategy,\n )\n }\n gp.$switchLocalePath = (newLocale: string) => {\n return switchLocalePath(\n route.path,\n newLocale,\n config.locales,\n config.defaultLocale,\n config.strategy,\n )\n }\n\n // Inject $t, $d, $n if @fluenti/vue plugin hasn't already injected them\n // (the Vue plugin handles injection when installed directly, but in Nuxt\n // the module may load before the Vue plugin is installed)\n try {\n const { useI18n } = await import('@fluenti/vue')\n const ctx = useI18n()\n if (!gp['$t']) gp['$t'] = ctx.t\n if (!gp['$d']) gp['$d'] = ctx.d\n if (!gp['$n']) gp['$n'] = ctx.n\n } catch (err) {\n // @fluenti/vue plugin not yet installed — $t/$d/$n will be provided by it\n if (import.meta.dev) console.debug('[fluenti] Vue plugin not yet installed, skipping $t/$d/$n injection:', err)\n }\n }\n\n return {\n provide: {\n fluentiLocale: currentLocale,\n fluentiConfig: config,\n },\n }\n})\n"],"mappings":"+JAYA,IAAA,GAAA,EAAA,EAAA,kBAAgC,KAAO,IAAY,CACjD,IAAM,GAAA,EAAA,EAAA,mBAA2B,CAAC,OAAO,QACnC,GAAA,EAAA,EAAA,WAAkB,CAIlB,EAAY,EAAO,uBAAuB,UAC5C,EAAO,sBACP,KACE,EAAY,GAAW,WAAa,iBACpC,EAAe,GAAA,EAAA,EAAA,WAAsB,EAAU,CAAG,KAIpD,EACA,EACJ,GAAA,EAAA,CAAgB,OACd,GAAI,CACF,IAAM,GAAA,EAAA,EAAA,mBAA+B,CAAC,OAAQ,kBAAkB,CAAC,CACjE,EAAiB,EAAW,mBACxB,EAAO,WAAa,YACtB,EAAO,EAAW,YAEb,EAAK,EACZ,EAAA,EAAgB,KAAK,QAAQ,MAAM,gCAAiC,EAAI,SAEjE,EAAO,WAAa,UAC7B,GAAI,CACF,EAAO,OAAO,SAAS,WAChB,EAAK,EACZ,EAAA,EAAgB,KAAK,QAAQ,MAAM,qCAAsC,EAAI,CAIjF,IAAI,EAEJ,GAAA,EAAA,CAAgB,OAAQ,CAEtB,EAAiB,MAAM,EAAA,EACrB,EAAM,KACN,EACA,IAAA,GACA,KAAO,IAA6B,CAClC,MAAO,EAAQ,SAAsB,wBAAyB,EAAI,EAEpE,EACA,GAAc,OAAS,IAAA,GACvB,EACD,CAGD,EAAQ,QAAQ,cAAmB,EAEnC,GAAI,CACF,IAAM,EAAS,EAAyF,YAAY,MAChH,IAAO,EAAM,QAAQ,OAAY,SAC9B,EAAK,EACZ,EAAA,EAAgB,KAAK,QAAQ,MAAM,yCAA0C,EAAI,UAE1E,EAAQ,QAAQ,cAEzB,EAAiB,EAAQ,QAAQ,sBAG7B,EAAO,WAAa,WAAa,GAAQ,EAAO,SAAS,OAAQ,CACnE,IAAM,EAAY,EAAK,aAAa,CAAC,QAAQ,QAAS,GAAG,CACnD,EAAc,EAAO,QAAQ,KAAM,GAAM,EAAE,OAAO,aAAa,GAAK,EAAU,CACpF,AAGE,EAHE,EACe,EAAY,OAEZ,EAAO,kBAErB,CACL,GAAM,CAAE,OAAQ,GAAe,EAAA,EAAsB,EAAM,KAAM,EAAO,QAAQ,CAChF,AAOE,EAPE,IAEO,GACS,EAAa,OAAS,EAAO,QAAQ,SAAS,EAAa,MAAM,CAC/E,EAAa,MACb,EAAO,eAOjB,IAAM,GAAA,EAAA,EAAA,KAAoB,EAAe,CAuBzC,GApBI,EAAO,WAAa,aAAe,EAAO,WAAa,YACzD,EAAA,EAAA,WAAY,EAAM,KAAO,GAAY,CACnC,GAAM,CAAE,UAAW,EAAA,EAAsB,EAAS,EAAO,QAAQ,CAC7D,EACF,EAAc,MAAQ,EACb,EAAO,WAAa,0BAE7B,EAAc,MAAQ,EAAO,gBAE/B,CAIA,IACF,EAAA,EAAA,OAAM,EAAgB,GAAc,CAClC,EAAa,MAAQ,GACrB,CAIA,EAAO,uBAAwB,CACjC,IAAM,EAAK,EAAQ,OAAO,OAAO,iBACjC,EAAG,aAAe,EAAc,IACvB,EAAA,EACL,EACA,GAAU,EAAc,MACxB,EAAO,cACP,EAAO,SACR,CAEH,EAAG,kBAAqB,GACf,EAAA,EACL,EAAM,KACN,EACA,EAAO,QACP,EAAO,cACP,EAAO,SACR,CAMH,GAAI,CACF,GAAM,CAAE,WAAY,MAAM,OAAO,gBAC3B,EAAM,GAAS,CACrB,AAAe,EAAG,KAAQ,EAAI,EAC9B,AAAe,EAAG,KAAQ,EAAI,EAC9B,AAAe,EAAG,KAAQ,EAAI,QACvB,EAAK,EAEZ,EAAA,EAAgB,KAAK,QAAQ,MAAM,uEAAwE,EAAI,EAInH,MAAO,CACL,QAAS,CACP,cAAe,EACf,cAAe,EAChB,CACF,EACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/runtime/plugin.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;;AACH,wBAkFE"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/runtime/plugin.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;;AACH,wBAsJE"}