intor 2.5.0 → 2.6.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 (322) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/dist/core/export/index.js +1 -0
  4. package/dist/core/src/client/shared/helpers/get-client-locale.js +5 -20
  5. package/dist/core/src/client/shared/utils/locale/detect-browser-locale.js +2 -8
  6. package/dist/core/src/client/shared/utils/locale/get-locale-from-cookie.js +5 -12
  7. package/dist/core/src/config/constants/cookie.js +9 -9
  8. package/dist/core/src/config/constants/routing.js +13 -14
  9. package/dist/core/src/config/define-intor-config.js +28 -44
  10. package/dist/core/src/config/resolvers/resolve-cookie-options.js +4 -4
  11. package/dist/core/src/config/resolvers/resolve-fallback-locales.js +33 -50
  12. package/dist/core/src/config/resolvers/resolve-routing-options.js +32 -61
  13. package/dist/core/src/config/validators/validate-default-locale.js +8 -13
  14. package/dist/core/src/config/validators/validate-id.js +8 -13
  15. package/dist/core/src/config/validators/validate-supported-locales.js +8 -13
  16. package/dist/core/src/core/constants/locale-placeholder.js +0 -1
  17. package/dist/core/src/core/error/intor-error.js +14 -29
  18. package/dist/core/src/core/locale/canonicalize-locale.js +7 -18
  19. package/dist/core/src/core/locale/match-locale.js +24 -50
  20. package/dist/core/src/core/locale/parse-locale.js +12 -22
  21. package/dist/core/src/core/logger/get-logger.js +26 -31
  22. package/dist/core/src/core/logger/global-logger-pool.js +4 -4
  23. package/dist/core/src/core/messages/internal-metadata.js +1 -1
  24. package/dist/core/src/core/messages/load-remote-messages/collect-remote-resources.js +13 -22
  25. package/dist/core/src/core/messages/load-remote-messages/fetch-remote-resource.js +30 -39
  26. package/dist/core/src/core/messages/load-remote-messages/load-remote-messages.js +72 -89
  27. package/dist/core/src/core/messages/load-remote-messages/resolve-remote-resources.js +7 -17
  28. package/dist/core/src/core/messages/merge-messages.js +17 -28
  29. package/dist/core/src/core/messages/utils/is-valid-messages.js +22 -37
  30. package/dist/core/src/core/messages/utils/nest-object-from-path.js +5 -17
  31. package/dist/core/src/core/render/create-html-renderer.js +29 -37
  32. package/dist/core/src/core/render/utils/escape-html.js +1 -6
  33. package/dist/core/src/core/render/utils/render-attributes.js +6 -11
  34. package/dist/core/src/core/translator/create-t-rich.js +6 -15
  35. package/dist/core/src/core/translator/create-translator.js +16 -24
  36. package/dist/core/src/core/utils/deep-merge.js +24 -42
  37. package/dist/core/src/core/utils/normalizers/normalize-cache-key.js +14 -40
  38. package/dist/core/src/core/utils/normalizers/normalize-pathname.js +19 -37
  39. package/dist/core/src/core/utils/normalizers/normalize-query.js +6 -20
  40. package/dist/core/src/core/utils/parse-cookie-header.js +11 -18
  41. package/dist/core/src/core/utils/resolve-loader-options.js +6 -32
  42. package/dist/core/src/edge/helpers/get-translator.js +14 -20
  43. package/dist/core/src/edge/translator/init-translator.js +23 -31
  44. package/dist/core/src/routing/inbound/helpers/resolve-inbound-from-request.js +21 -28
  45. package/dist/core/src/routing/inbound/resolve-inbound.js +22 -37
  46. package/dist/core/src/routing/inbound/resolve-locale/resolve-locale.js +22 -39
  47. package/dist/core/src/routing/inbound/resolve-pathname/resolve-pathname.js +24 -30
  48. package/dist/core/src/routing/inbound/resolve-pathname/strategies/all.js +10 -23
  49. package/dist/core/src/routing/inbound/resolve-pathname/strategies/except-default.js +11 -24
  50. package/dist/core/src/routing/inbound/resolve-pathname/strategies/none.js +1 -4
  51. package/dist/core/src/routing/locale/get-locale-from-accept-language.js +21 -36
  52. package/dist/core/src/routing/locale/get-locale-from-host.js +5 -28
  53. package/dist/core/src/routing/locale/get-locale-from-pathname.js +11 -37
  54. package/dist/core/src/routing/locale/get-locale-from-query.js +2 -17
  55. package/dist/core/src/routing/pathname/canonicalize-pathname.js +25 -67
  56. package/dist/core/src/routing/pathname/localize-pathname.js +12 -30
  57. package/dist/core/src/routing/pathname/materialize-pathname.js +9 -44
  58. package/dist/core/src/routing/pathname/standardize-pathname.js +6 -30
  59. package/dist/core/src/server/helpers/get-translator.js +26 -23
  60. package/dist/core/src/server/intor/intor.js +20 -25
  61. package/dist/core/src/server/messages/load-local-messages/cache/messages-pool.js +4 -7
  62. package/dist/core/src/server/messages/load-local-messages/load-local-messages.js +76 -92
  63. package/dist/core/src/server/messages/load-local-messages/read-locale-messages/collect-file-entries/collect-file-entries.js +59 -80
  64. package/dist/core/src/server/messages/load-local-messages/read-locale-messages/parse-file-entries/parse-file-entries.js +53 -87
  65. package/dist/core/src/server/messages/load-local-messages/read-locale-messages/parse-file-entries/utils/json-reader.js +3 -6
  66. package/dist/core/src/server/messages/load-local-messages/read-locale-messages/read-locale-messages.js +23 -35
  67. package/dist/core/src/server/messages/load-messages.js +56 -69
  68. package/dist/core/src/server/translator/init-translator.js +28 -30
  69. package/dist/express/src/adapters/express/create-intor-handler.js +35 -46
  70. package/dist/express/src/adapters/express/get-translator.js +2 -9
  71. package/dist/express/src/core/constants/locale-placeholder.js +0 -1
  72. package/dist/express/src/core/locale/canonicalize-locale.js +7 -18
  73. package/dist/express/src/core/locale/match-locale.js +24 -50
  74. package/dist/express/src/core/locale/parse-locale.js +12 -22
  75. package/dist/express/src/core/utils/normalizers/normalize-pathname.js +19 -37
  76. package/dist/express/src/core/utils/normalizers/normalize-query.js +6 -20
  77. package/dist/express/src/core/utils/parse-cookie-header.js +11 -18
  78. package/dist/express/src/routing/inbound/resolve-inbound.js +22 -37
  79. package/dist/express/src/routing/inbound/resolve-locale/resolve-locale.js +22 -39
  80. package/dist/express/src/routing/inbound/resolve-pathname/resolve-pathname.js +24 -30
  81. package/dist/express/src/routing/inbound/resolve-pathname/strategies/all.js +10 -23
  82. package/dist/express/src/routing/inbound/resolve-pathname/strategies/except-default.js +11 -24
  83. package/dist/express/src/routing/inbound/resolve-pathname/strategies/none.js +1 -4
  84. package/dist/express/src/routing/locale/get-locale-from-accept-language.js +21 -36
  85. package/dist/express/src/routing/locale/get-locale-from-host.js +5 -28
  86. package/dist/express/src/routing/locale/get-locale-from-pathname.js +11 -37
  87. package/dist/express/src/routing/locale/get-locale-from-query.js +2 -17
  88. package/dist/express/src/routing/pathname/canonicalize-pathname.js +25 -67
  89. package/dist/express/src/routing/pathname/localize-pathname.js +12 -30
  90. package/dist/express/src/routing/pathname/materialize-pathname.js +9 -44
  91. package/dist/express/src/routing/pathname/standardize-pathname.js +6 -30
  92. package/dist/fastify/src/adapters/fastify/create-intor-handler.js +35 -47
  93. package/dist/fastify/src/adapters/fastify/get-translator.js +2 -9
  94. package/dist/fastify/src/adapters/fastify/intor-fastify-plugin.js +29 -38
  95. package/dist/fastify/src/core/constants/locale-placeholder.js +0 -1
  96. package/dist/fastify/src/core/locale/canonicalize-locale.js +7 -18
  97. package/dist/fastify/src/core/locale/match-locale.js +24 -50
  98. package/dist/fastify/src/core/locale/parse-locale.js +12 -22
  99. package/dist/fastify/src/core/utils/normalizers/normalize-pathname.js +19 -37
  100. package/dist/fastify/src/core/utils/normalizers/normalize-query.js +6 -20
  101. package/dist/fastify/src/core/utils/parse-cookie-header.js +11 -18
  102. package/dist/fastify/src/routing/inbound/resolve-inbound.js +22 -37
  103. package/dist/fastify/src/routing/inbound/resolve-locale/resolve-locale.js +22 -39
  104. package/dist/fastify/src/routing/inbound/resolve-pathname/resolve-pathname.js +24 -30
  105. package/dist/fastify/src/routing/inbound/resolve-pathname/strategies/all.js +10 -23
  106. package/dist/fastify/src/routing/inbound/resolve-pathname/strategies/except-default.js +11 -24
  107. package/dist/fastify/src/routing/inbound/resolve-pathname/strategies/none.js +1 -4
  108. package/dist/fastify/src/routing/locale/get-locale-from-accept-language.js +21 -36
  109. package/dist/fastify/src/routing/locale/get-locale-from-host.js +5 -28
  110. package/dist/fastify/src/routing/locale/get-locale-from-pathname.js +11 -37
  111. package/dist/fastify/src/routing/locale/get-locale-from-query.js +2 -17
  112. package/dist/fastify/src/routing/pathname/canonicalize-pathname.js +25 -67
  113. package/dist/fastify/src/routing/pathname/localize-pathname.js +12 -30
  114. package/dist/fastify/src/routing/pathname/materialize-pathname.js +9 -44
  115. package/dist/fastify/src/routing/pathname/standardize-pathname.js +6 -30
  116. package/dist/hono/src/adapters/hono/create-intor-handler.js +33 -44
  117. package/dist/hono/src/adapters/hono/get-translator.js +2 -9
  118. package/dist/hono/src/core/constants/locale-placeholder.js +0 -1
  119. package/dist/hono/src/core/locale/canonicalize-locale.js +7 -18
  120. package/dist/hono/src/core/locale/match-locale.js +24 -50
  121. package/dist/hono/src/core/locale/parse-locale.js +12 -22
  122. package/dist/hono/src/core/utils/normalizers/normalize-pathname.js +19 -37
  123. package/dist/hono/src/core/utils/normalizers/normalize-query.js +6 -20
  124. package/dist/hono/src/core/utils/parse-cookie-header.js +11 -18
  125. package/dist/hono/src/routing/inbound/resolve-inbound.js +22 -37
  126. package/dist/hono/src/routing/inbound/resolve-locale/resolve-locale.js +22 -39
  127. package/dist/hono/src/routing/inbound/resolve-pathname/resolve-pathname.js +24 -30
  128. package/dist/hono/src/routing/inbound/resolve-pathname/strategies/all.js +10 -23
  129. package/dist/hono/src/routing/inbound/resolve-pathname/strategies/except-default.js +11 -24
  130. package/dist/hono/src/routing/inbound/resolve-pathname/strategies/none.js +1 -4
  131. package/dist/hono/src/routing/locale/get-locale-from-accept-language.js +21 -36
  132. package/dist/hono/src/routing/locale/get-locale-from-host.js +5 -28
  133. package/dist/hono/src/routing/locale/get-locale-from-pathname.js +11 -37
  134. package/dist/hono/src/routing/locale/get-locale-from-query.js +2 -17
  135. package/dist/hono/src/routing/pathname/canonicalize-pathname.js +25 -67
  136. package/dist/hono/src/routing/pathname/localize-pathname.js +12 -30
  137. package/dist/hono/src/routing/pathname/materialize-pathname.js +9 -44
  138. package/dist/hono/src/routing/pathname/standardize-pathname.js +6 -30
  139. package/dist/next/export/next/server/index.js +1 -0
  140. package/dist/next/src/adapters/next/create-intor-handler.js +39 -48
  141. package/dist/next/src/adapters/next/header-keys.js +9 -0
  142. package/dist/next/src/adapters/next/link.js +33 -28
  143. package/dist/next/src/adapters/next/redirect.js +12 -15
  144. package/dist/next/src/adapters/next/server/get-locale.js +13 -24
  145. package/dist/next/src/adapters/next/server/get-translator.js +2 -9
  146. package/dist/next/src/adapters/next/server/intor.js +5 -13
  147. package/dist/next/src/adapters/next/server/read-intor-url-state.js +13 -0
  148. package/dist/next/src/adapters/next/use-router.js +47 -66
  149. package/dist/next/src/client/shared/navigation/execute-navigation.js +20 -38
  150. package/dist/next/src/client/shared/utils/build-cookie-string.js +18 -27
  151. package/dist/next/src/client/shared/utils/locale/set-locale-cookie.js +2 -9
  152. package/dist/next/src/core/constants/locale-placeholder.js +0 -1
  153. package/dist/next/src/core/locale/canonicalize-locale.js +7 -18
  154. package/dist/next/src/core/locale/match-locale.js +24 -50
  155. package/dist/next/src/core/locale/parse-locale.js +12 -22
  156. package/dist/next/src/core/utils/normalizers/normalize-pathname.js +19 -37
  157. package/dist/next/src/core/utils/normalizers/normalize-query.js +6 -20
  158. package/dist/next/src/core/utils/resolve-loader-options.js +6 -29
  159. package/dist/next/src/policies/shoud-full-reload.js +2 -5
  160. package/dist/next/src/policies/should-sync-locale.js +1 -4
  161. package/dist/next/src/routing/inbound/resolve-inbound.js +24 -39
  162. package/dist/next/src/routing/inbound/resolve-locale/resolve-locale.js +22 -39
  163. package/dist/next/src/routing/inbound/resolve-pathname/resolve-pathname.js +24 -30
  164. package/dist/next/src/routing/inbound/resolve-pathname/strategies/all.js +13 -29
  165. package/dist/next/src/routing/inbound/resolve-pathname/strategies/except-default.js +14 -30
  166. package/dist/next/src/routing/inbound/resolve-pathname/strategies/none.js +1 -4
  167. package/dist/next/src/routing/locale/get-locale-from-accept-language.js +21 -36
  168. package/dist/next/src/routing/locale/get-locale-from-host.js +5 -28
  169. package/dist/next/src/routing/locale/get-locale-from-pathname.js +11 -37
  170. package/dist/next/src/routing/locale/get-locale-from-query.js +2 -17
  171. package/dist/next/src/routing/outbound/decide-strategy.js +9 -9
  172. package/dist/next/src/routing/outbound/determine-target.js +28 -44
  173. package/dist/next/src/routing/outbound/resolve-outbound.js +12 -16
  174. package/dist/next/src/routing/outbound/utils/derive-host-destination.js +5 -9
  175. package/dist/next/src/routing/outbound/utils/derive-query-destination.js +4 -7
  176. package/dist/next/src/routing/outbound/utils/is-external-destination.js +1 -7
  177. package/dist/next/src/routing/pathname/canonicalize-pathname.js +25 -67
  178. package/dist/next/src/routing/pathname/localize-pathname.js +12 -30
  179. package/dist/next/src/routing/pathname/materialize-pathname.js +9 -44
  180. package/dist/next/src/routing/pathname/standardize-pathname.js +6 -30
  181. package/dist/react/src/client/react/helpers/use-intor.js +25 -44
  182. package/dist/react/src/client/react/provider/effects/use-locale-effects.js +20 -25
  183. package/dist/react/src/client/react/provider/effects/use-messages-effects.js +17 -16
  184. package/dist/react/src/client/react/provider/intor-provider.js +63 -66
  185. package/dist/react/src/client/react/provider/use-intor-context.js +4 -4
  186. package/dist/react/src/client/react/render/create-react-renderer.js +18 -24
  187. package/dist/react/src/client/react/translator/create-t-rich.js +9 -22
  188. package/dist/react/src/client/react/translator/use-translator.js +11 -16
  189. package/dist/react/src/client/shared/messages/create-refetch-messages.js +41 -51
  190. package/dist/react/src/client/shared/provider/effective-state.js +2 -6
  191. package/dist/react/src/client/shared/utils/build-cookie-string.js +18 -27
  192. package/dist/react/src/client/shared/utils/locale/get-locale-from-cookie.js +5 -12
  193. package/dist/react/src/client/shared/utils/locale/set-document-locale.js +2 -8
  194. package/dist/react/src/client/shared/utils/locale/set-locale-cookie.js +2 -9
  195. package/dist/react/src/core/logger/get-logger.js +26 -31
  196. package/dist/react/src/core/logger/global-logger-pool.js +4 -4
  197. package/dist/react/src/core/messages/load-remote-messages/collect-remote-resources.js +13 -22
  198. package/dist/react/src/core/messages/load-remote-messages/fetch-remote-resource.js +30 -39
  199. package/dist/react/src/core/messages/load-remote-messages/load-remote-messages.js +72 -89
  200. package/dist/react/src/core/messages/load-remote-messages/resolve-remote-resources.js +7 -17
  201. package/dist/react/src/core/messages/merge-messages.js +17 -28
  202. package/dist/react/src/core/messages/utils/is-valid-messages.js +22 -37
  203. package/dist/react/src/core/messages/utils/nest-object-from-path.js +5 -17
  204. package/dist/react/src/core/utils/deep-merge.js +24 -42
  205. package/dist/react/src/core/utils/resolve-loader-options.js +6 -29
  206. package/dist/react/src/policies/should-persist-on-first-visit.js +1 -4
  207. package/dist/svelte/export/svelte/index.js +0 -6
  208. package/dist/svelte/src/client/shared/messages/create-refetch-messages.js +41 -51
  209. package/dist/svelte/src/client/shared/provider/effective-state.js +2 -6
  210. package/dist/svelte/src/client/shared/utils/build-cookie-string.js +18 -27
  211. package/dist/svelte/src/client/shared/utils/locale/get-locale-from-cookie.js +5 -12
  212. package/dist/svelte/src/client/shared/utils/locale/set-document-locale.js +2 -8
  213. package/dist/svelte/src/client/shared/utils/locale/set-locale-cookie.js +2 -9
  214. package/dist/svelte/src/client/svelte/provider/create-intor-store.js +59 -63
  215. package/dist/svelte/src/client/svelte/provider/effects/attach-locale-effects.js +20 -25
  216. package/dist/svelte/src/client/svelte/provider/effects/attach-messages-effects.js +21 -18
  217. package/dist/svelte/src/client/svelte/provider/get-intor-context.js +4 -4
  218. package/dist/svelte/src/client/svelte/translator/use-translator.js +11 -16
  219. package/dist/svelte/src/core/logger/get-logger.js +26 -31
  220. package/dist/svelte/src/core/logger/global-logger-pool.js +4 -4
  221. package/dist/svelte/src/core/messages/load-remote-messages/collect-remote-resources.js +13 -22
  222. package/dist/svelte/src/core/messages/load-remote-messages/fetch-remote-resource.js +30 -39
  223. package/dist/svelte/src/core/messages/load-remote-messages/load-remote-messages.js +72 -89
  224. package/dist/svelte/src/core/messages/load-remote-messages/resolve-remote-resources.js +7 -17
  225. package/dist/svelte/src/core/messages/merge-messages.js +17 -28
  226. package/dist/svelte/src/core/messages/utils/is-valid-messages.js +22 -37
  227. package/dist/svelte/src/core/messages/utils/nest-object-from-path.js +5 -17
  228. package/dist/svelte/src/core/render/create-html-renderer.js +29 -37
  229. package/dist/svelte/src/core/render/utils/escape-html.js +1 -6
  230. package/dist/svelte/src/core/render/utils/render-attributes.js +6 -11
  231. package/dist/svelte/src/core/translator/create-t-rich.js +6 -15
  232. package/dist/svelte/src/core/utils/deep-merge.js +24 -42
  233. package/dist/svelte/src/core/utils/resolve-loader-options.js +6 -29
  234. package/dist/svelte/src/policies/should-persist-on-first-visit.js +1 -4
  235. package/dist/svelte-kit/src/adapters/svelte-kit/create-intor-handler.js +37 -57
  236. package/dist/svelte-kit/src/adapters/svelte-kit/use-navigation.js +29 -27
  237. package/dist/svelte-kit/src/adapters/svelte-kit/utils/is-svelte-kit-ssg.js +4 -11
  238. package/dist/svelte-kit/src/client/shared/navigation/execute-navigation.js +19 -37
  239. package/dist/svelte-kit/src/client/shared/utils/build-cookie-string.js +18 -27
  240. package/dist/svelte-kit/src/client/shared/utils/locale/set-locale-cookie.js +2 -9
  241. package/dist/svelte-kit/src/core/constants/locale-placeholder.js +0 -1
  242. package/dist/svelte-kit/src/core/locale/canonicalize-locale.js +7 -18
  243. package/dist/svelte-kit/src/core/locale/match-locale.js +24 -50
  244. package/dist/svelte-kit/src/core/locale/parse-locale.js +12 -22
  245. package/dist/svelte-kit/src/core/utils/normalizers/normalize-pathname.js +19 -37
  246. package/dist/svelte-kit/src/core/utils/normalizers/normalize-query.js +6 -20
  247. package/dist/svelte-kit/src/core/utils/resolve-loader-options.js +6 -29
  248. package/dist/svelte-kit/src/policies/shoud-full-reload.js +2 -5
  249. package/dist/svelte-kit/src/policies/should-sync-locale.js +1 -4
  250. package/dist/svelte-kit/src/routing/inbound/resolve-inbound.js +22 -37
  251. package/dist/svelte-kit/src/routing/inbound/resolve-locale/resolve-locale.js +22 -39
  252. package/dist/svelte-kit/src/routing/inbound/resolve-pathname/resolve-pathname.js +24 -30
  253. package/dist/svelte-kit/src/routing/inbound/resolve-pathname/strategies/all.js +10 -23
  254. package/dist/svelte-kit/src/routing/inbound/resolve-pathname/strategies/except-default.js +11 -24
  255. package/dist/svelte-kit/src/routing/inbound/resolve-pathname/strategies/none.js +1 -4
  256. package/dist/svelte-kit/src/routing/locale/get-locale-from-accept-language.js +21 -36
  257. package/dist/svelte-kit/src/routing/locale/get-locale-from-host.js +5 -28
  258. package/dist/svelte-kit/src/routing/locale/get-locale-from-pathname.js +11 -37
  259. package/dist/svelte-kit/src/routing/locale/get-locale-from-query.js +2 -17
  260. package/dist/svelte-kit/src/routing/outbound/decide-strategy.js +9 -9
  261. package/dist/svelte-kit/src/routing/outbound/determine-target.js +28 -44
  262. package/dist/svelte-kit/src/routing/outbound/resolve-outbound.js +12 -16
  263. package/dist/svelte-kit/src/routing/outbound/utils/derive-host-destination.js +5 -9
  264. package/dist/svelte-kit/src/routing/outbound/utils/derive-query-destination.js +4 -7
  265. package/dist/svelte-kit/src/routing/outbound/utils/is-external-destination.js +1 -7
  266. package/dist/svelte-kit/src/routing/pathname/canonicalize-pathname.js +25 -67
  267. package/dist/svelte-kit/src/routing/pathname/localize-pathname.js +12 -30
  268. package/dist/svelte-kit/src/routing/pathname/materialize-pathname.js +9 -44
  269. package/dist/svelte-kit/src/routing/pathname/standardize-pathname.js +6 -30
  270. package/dist/types/export/index.d.ts +1 -1
  271. package/dist/types/export/index.d.ts.map +1 -1
  272. package/dist/types/export/next/server/index.d.ts +1 -1
  273. package/dist/types/export/next/server/index.d.ts.map +1 -1
  274. package/dist/types/src/adapters/fastify/intor-fastify-plugin.d.ts.map +1 -1
  275. package/dist/types/src/adapters/next/create-intor-handler.d.ts.map +1 -1
  276. package/dist/types/src/{core/constants/headers.d.ts → adapters/next/header-keys.d.ts} +3 -2
  277. package/dist/types/src/adapters/next/header-keys.d.ts.map +1 -0
  278. package/dist/types/src/adapters/next/server/get-locale.d.ts.map +1 -1
  279. package/dist/types/src/adapters/next/server/index.d.ts +1 -0
  280. package/dist/types/src/adapters/next/server/index.d.ts.map +1 -1
  281. package/dist/types/src/adapters/next/server/read-intor-url-state.d.ts +13 -0
  282. package/dist/types/src/adapters/next/server/read-intor-url-state.d.ts.map +1 -0
  283. package/dist/types/src/core/constants/index.d.ts +0 -1
  284. package/dist/types/src/core/constants/index.d.ts.map +1 -1
  285. package/dist/types/src/core/constants/locale-placeholder.d.ts +5 -0
  286. package/dist/types/src/core/constants/locale-placeholder.d.ts.map +1 -1
  287. package/dist/types/src/core/index.d.ts +1 -1
  288. package/dist/types/src/core/index.d.ts.map +1 -1
  289. package/dist/types/src/edge/translator/init-translator.d.ts.map +1 -1
  290. package/dist/types/src/routing/outbound/decide-strategy.d.ts +1 -1
  291. package/dist/types/src/routing/outbound/decide-strategy.d.ts.map +1 -1
  292. package/dist/types/src/server/translator/init-translator.d.ts.map +1 -1
  293. package/dist/vue/src/client/shared/messages/create-refetch-messages.js +41 -51
  294. package/dist/vue/src/client/shared/provider/effective-state.js +2 -6
  295. package/dist/vue/src/client/shared/utils/build-cookie-string.js +18 -27
  296. package/dist/vue/src/client/shared/utils/locale/get-locale-from-cookie.js +5 -12
  297. package/dist/vue/src/client/shared/utils/locale/set-document-locale.js +2 -8
  298. package/dist/vue/src/client/shared/utils/locale/set-locale-cookie.js +2 -9
  299. package/dist/vue/src/client/vue/helpers/use-intor.js +20 -42
  300. package/dist/vue/src/client/vue/provider/effects/use-locale-effects.js +23 -24
  301. package/dist/vue/src/client/vue/provider/effects/use-messages-effects.js +15 -24
  302. package/dist/vue/src/client/vue/provider/inject-intor-context.js +4 -4
  303. package/dist/vue/src/client/vue/provider/intor-provider.js +61 -66
  304. package/dist/vue/src/client/vue/render/create-vue-renderer.js +18 -24
  305. package/dist/vue/src/client/vue/translator/create-t-rich.js +5 -17
  306. package/dist/vue/src/client/vue/translator/trans.js +24 -31
  307. package/dist/vue/src/client/vue/translator/use-translator.js +12 -17
  308. package/dist/vue/src/core/logger/get-logger.js +26 -31
  309. package/dist/vue/src/core/logger/global-logger-pool.js +4 -4
  310. package/dist/vue/src/core/messages/load-remote-messages/collect-remote-resources.js +13 -22
  311. package/dist/vue/src/core/messages/load-remote-messages/fetch-remote-resource.js +30 -39
  312. package/dist/vue/src/core/messages/load-remote-messages/load-remote-messages.js +72 -89
  313. package/dist/vue/src/core/messages/load-remote-messages/resolve-remote-resources.js +7 -17
  314. package/dist/vue/src/core/messages/merge-messages.js +17 -28
  315. package/dist/vue/src/core/messages/utils/is-valid-messages.js +22 -37
  316. package/dist/vue/src/core/messages/utils/nest-object-from-path.js +5 -17
  317. package/dist/vue/src/core/utils/deep-merge.js +24 -42
  318. package/dist/vue/src/core/utils/resolve-loader-options.js +6 -29
  319. package/dist/vue/src/policies/should-persist-on-first-visit.js +1 -4
  320. package/package.json +53 -65
  321. package/dist/next/src/core/constants/headers.js +0 -8
  322. package/dist/types/src/core/constants/headers.d.ts.map +0 -1
@@ -4,98 +4,81 @@ import { collectRemoteResources } from './collect-remote-resources.js';
4
4
  import { fetchRemoteResource } from './fetch-remote-resource.js';
5
5
  import { resolveRemoteResources } from './resolve-remote-resources.js';
6
6
 
7
- /**
8
- * Load locale messages from a remote source.
9
- *
10
- * This function serves as the orchestration layer for remote message loading.
11
- * It coordinates:
12
- *
13
- * - Locale resolution with fallbacks
14
- * - Concurrency control for network requests
15
- * - Remote resource fetching and message merging
16
- *
17
- * Remote messages are fetched on demand and are not memoized at the process level.
18
- *
19
- * Network requests and response validation are delegated to lower-level utilities.
20
- */
21
- const loadRemoteMessages = async ({ locale, fallbackLocales, namespaces, concurrency, fetch, url: baseUrl, headers, signal, loggerOptions, }) => {
22
- const baseLogger = getLogger(loggerOptions);
23
- const logger = baseLogger.child({ scope: "load-remote-messages" });
24
- // Abort early if the request has already been cancelled
25
- if (signal?.aborted) {
26
- logger.debug("Remote message loading aborted before fetch.");
7
+ const loadRemoteMessages = async ({
8
+ locale,
9
+ fallbackLocales,
10
+ namespaces,
11
+ concurrency,
12
+ fetch,
13
+ url: baseUrl,
14
+ headers,
15
+ signal,
16
+ loggerOptions
17
+ }) => {
18
+ const baseLogger = getLogger(loggerOptions);
19
+ const logger = baseLogger.child({ scope: "load-remote-messages" });
20
+ if (signal?.aborted) {
21
+ logger.debug("Remote message loading aborted before fetch.");
22
+ return;
23
+ }
24
+ const start = performance.now();
25
+ logger.debug("Loading remote messages.", { baseUrl });
26
+ const limit = concurrency ? pLimit(concurrency) : void 0;
27
+ const candidateLocales = [locale, ...fallbackLocales || []];
28
+ let messages;
29
+ for (const candidateLocale of candidateLocales) {
30
+ const isLast = candidateLocale === candidateLocales[candidateLocales.length - 1];
31
+ try {
32
+ const resources = collectRemoteResources({
33
+ locale: candidateLocale,
34
+ baseUrl,
35
+ ...namespaces !== void 0 ? { namespaces } : {}
36
+ });
37
+ const fetchUrl = (url) => fetchRemoteResource({
38
+ url,
39
+ ...headers !== void 0 ? { headers } : {},
40
+ ...signal !== void 0 ? { signal } : {},
41
+ loggerOptions,
42
+ fetch
43
+ });
44
+ const results = await Promise.all(
45
+ resources.map(
46
+ ({ url }) => limit ? limit(() => fetchUrl(url)) : fetchUrl(url)
47
+ )
48
+ );
49
+ if (!results.some(Boolean)) continue;
50
+ const resolved = resolveRemoteResources(
51
+ resources.map((res, i) => {
52
+ const data = results[i];
53
+ return { path: res.path, ...data !== void 0 ? { data } : {} };
54
+ })
55
+ );
56
+ messages = { [candidateLocale]: resolved };
57
+ break;
58
+ } catch {
59
+ if (signal?.aborted) {
60
+ logger.debug("Remote message loading aborted.");
27
61
  return;
28
- }
29
- const start = performance.now();
30
- logger.debug("Loading remote messages.", { baseUrl });
31
- // ----------------------------------------------------------------
32
- // Resolve locale messages with ordered fallback strategy
33
- // ----------------------------------------------------------------
34
- const limit = concurrency ? pLimit(concurrency) : undefined;
35
- const candidateLocales = [locale, ...(fallbackLocales || [])];
36
- let messages;
37
- for (const candidateLocale of candidateLocales) {
38
- const isLast = candidateLocale === candidateLocales[candidateLocales.length - 1];
39
- try {
40
- // -----------------------------------------------------------------
41
- // Collect remote message resources for the locale
42
- // -----------------------------------------------------------------
43
- const resources = collectRemoteResources({
44
- locale: candidateLocale,
45
- baseUrl,
46
- ...(namespaces !== undefined ? { namespaces } : {}),
47
- });
48
- // -----------------------------------------------------------------
49
- // Fetch all message chunks in parallel
50
- // -----------------------------------------------------------------
51
- const fetchUrl = (url) => fetchRemoteResource({
52
- url,
53
- ...(headers !== undefined ? { headers } : {}),
54
- ...(signal !== undefined ? { signal } : {}),
55
- loggerOptions,
56
- fetch,
57
- });
58
- const results = await Promise.all(resources.map(({ url }) => limit ? limit(() => fetchUrl(url)) : fetchUrl(url)));
59
- // Guard: no valid remote resources
60
- if (!results.some(Boolean))
61
- continue;
62
- // -----------------------------------------------------------------
63
- // Resolve and merge remote message resources
64
- // -----------------------------------------------------------------
65
- const resolved = resolveRemoteResources(resources.map((res, i) => {
66
- const data = results[i];
67
- return { path: res.path, ...(data !== undefined ? { data } : {}) };
68
- }));
69
- // -----------------------------------------------------------------
70
- // Wrap resolved messages into locale-scoped LocaleMessages
71
- // -----------------------------------------------------------------
72
- messages = { [candidateLocale]: resolved };
73
- break;
74
- }
75
- catch {
76
- if (signal?.aborted) {
77
- logger.debug("Remote message loading aborted.");
78
- return;
79
- }
80
- if (isLast) {
81
- logger.warn("Failed to load messages for all candidate locales.", {
82
- locale,
83
- fallbackLocales,
84
- });
85
- }
86
- else {
87
- logger.warn(`Failed to load locale messages for "${candidateLocale}", trying next fallback.`);
88
- }
89
- }
90
- }
91
- // Final success log with resolved locale and timing
92
- if (messages) {
93
- logger.trace("Finished loading remote messages.", {
94
- loadedLocale: Object.keys(messages)[0],
95
- duration: `${Math.round(performance.now() - start)} ms`,
62
+ }
63
+ if (isLast) {
64
+ logger.warn("Failed to load messages for all candidate locales.", {
65
+ locale,
66
+ fallbackLocales
96
67
  });
68
+ } else {
69
+ logger.warn(
70
+ `Failed to load locale messages for "${candidateLocale}", trying next fallback.`
71
+ );
72
+ }
97
73
  }
98
- return messages;
74
+ }
75
+ if (messages) {
76
+ logger.trace("Finished loading remote messages.", {
77
+ loadedLocale: Object.keys(messages)[0],
78
+ duration: `${Math.round(performance.now() - start)} ms`
79
+ });
80
+ }
81
+ return messages;
99
82
  };
100
83
 
101
84
  export { loadRemoteMessages };
@@ -1,24 +1,14 @@
1
1
  import { deepMerge } from '../../utils/deep-merge.js';
2
2
  import { nestObjectFromPath } from '../utils/nest-object-from-path.js';
3
3
 
4
- /**
5
- * Resolve remote message resources into a single MessageObject.
6
- *
7
- * - Applies semantic nesting based on resource path
8
- * - Merges all resolved message chunks
9
- *
10
- * Always returns a MessageObject.
11
- * An empty object represents an empty translation domain.
12
- */
13
4
  function resolveRemoteResources(resources) {
14
- let result = {};
15
- for (const { path, data } of resources) {
16
- if (!data)
17
- continue;
18
- const resolved = path.length > 0 ? nestObjectFromPath(path, data) : data;
19
- result = deepMerge(result, resolved);
20
- }
21
- return result;
5
+ let result = {};
6
+ for (const { path, data } of resources) {
7
+ if (!data) continue;
8
+ const resolved = path.length > 0 ? nestObjectFromPath(path, data) : data;
9
+ result = deepMerge(result, resolved);
10
+ }
11
+ return result;
22
12
  }
23
13
 
24
14
  export { resolveRemoteResources };
@@ -1,35 +1,24 @@
1
1
  import { getLogger } from '../logger/get-logger.js';
2
2
  import { deepMerge } from '../utils/deep-merge.js';
3
3
 
4
- /**
5
- * Merge locale-specific messages with runtime overrides.
6
- *
7
- * - Only merges messages under the given locale
8
- * - Emits debug logs for add / override events
9
- *
10
- * @public
11
- */
12
4
  function mergeMessages(a, b, { config, locale, onEvent }) {
13
- const baseLogger = getLogger({ ...config.logger, id: config.id });
14
- const logger = baseLogger.child({ scope: "merge-messages" });
15
- // Merge messages for the active locale only
16
- const merged = deepMerge(a?.[locale] ?? {}, b?.[locale] ?? {}, {
17
- onOverride: (event) => {
18
- if (onEvent) {
19
- onEvent(event);
20
- return;
21
- }
22
- const { kind, path, next, prev } = event;
23
- if (kind === "add")
24
- return;
25
- logger.debug(`Override | ${locale}: "${path}"`, { prev, next });
26
- },
27
- });
28
- // Preserve other locales, update only the target one
29
- return {
30
- ...a,
31
- [locale]: merged,
32
- };
5
+ const baseLogger = getLogger({ ...config.logger, id: config.id });
6
+ const logger = baseLogger.child({ scope: "merge-messages" });
7
+ const merged = deepMerge(a?.[locale] ?? {}, b?.[locale] ?? {}, {
8
+ onOverride: (event) => {
9
+ if (onEvent) {
10
+ onEvent(event);
11
+ return;
12
+ }
13
+ const { kind, path, next, prev } = event;
14
+ if (kind === "add") return;
15
+ logger.debug(`Override | ${locale}: "${path}"`, { prev, next });
16
+ }
17
+ });
18
+ return {
19
+ ...a,
20
+ [locale]: merged
21
+ };
33
22
  }
34
23
 
35
24
  export { mergeMessages };
@@ -1,44 +1,29 @@
1
- /** Check if a value is a plain object (not null, not array) */
2
1
  function isPlainObject(value) {
3
- return typeof value === "object" && value !== null && !Array.isArray(value);
2
+ return typeof value === "object" && value !== null && !Array.isArray(value);
4
3
  }
5
- /**
6
- * Check if a value is a valid MessageObject.
7
- *
8
- * - Supports all MessageValue variants (primitive, array, object).
9
- * - Uses an iterative approach to avoid stack overflow.
10
- */
11
4
  function isValidMessages(value) {
12
- if (!isPlainObject(value))
13
- return false;
14
- const stack = [value];
15
- while (stack.length > 0) {
16
- const current = stack.pop();
17
- // primitives are always valid
18
- if (current === null ||
19
- typeof current === "string" ||
20
- typeof current === "number" ||
21
- typeof current === "boolean") {
22
- continue;
23
- }
24
- // array → validate each item
25
- if (Array.isArray(current)) {
26
- for (const item of current) {
27
- stack.push(item);
28
- }
29
- continue;
30
- }
31
- // object → validate each value
32
- if (isPlainObject(current)) {
33
- for (const v of Object.values(current)) {
34
- stack.push(v);
35
- }
36
- continue;
37
- }
38
- // everything else is invalid
39
- return false;
5
+ if (!isPlainObject(value)) return false;
6
+ const stack = [value];
7
+ while (stack.length > 0) {
8
+ const current = stack.pop();
9
+ if (current === null || typeof current === "string" || typeof current === "number" || typeof current === "boolean") {
10
+ continue;
40
11
  }
41
- return true;
12
+ if (Array.isArray(current)) {
13
+ for (const item of current) {
14
+ stack.push(item);
15
+ }
16
+ continue;
17
+ }
18
+ if (isPlainObject(current)) {
19
+ for (const v of Object.values(current)) {
20
+ stack.push(v);
21
+ }
22
+ continue;
23
+ }
24
+ return false;
25
+ }
26
+ return true;
42
27
  }
43
28
 
44
29
  export { isPlainObject, isValidMessages };
@@ -1,21 +1,9 @@
1
- /**
2
- * Wraps a value inside nested objects according to a given path.
3
- *
4
- * @example
5
- * ```ts
6
- * const value = { a: "A" };
7
- *
8
- * nestObjectFromPath(["auth", "verify"], value); // → { auth: { verify: { a: "A" } } }
9
- *
10
- * nestObjectFromPath([], value); // → { a: "A" }
11
- * ```
12
- */
13
1
  function nestObjectFromPath(path, value) {
14
- let obj = value;
15
- for (let i = path.length - 1; i >= 0; i--) {
16
- obj = { [path[i]]: obj };
17
- }
18
- return obj;
2
+ let obj = value;
3
+ for (let i = path.length - 1; i >= 0; i--) {
4
+ obj = { [path[i]]: obj };
5
+ }
6
+ return obj;
19
7
  }
20
8
 
21
9
  export { nestObjectFromPath };
@@ -1,47 +1,29 @@
1
- /**
2
- * Deeply merges two plain objects.
3
- *
4
- * - Nested plain objects → merged recursively
5
- * - Arrays / primitives → `b` overwrites `a`
6
- *
7
- * Debug behavior (optional):
8
- * - Emits override events via `onOverride`
9
- * - Zero overhead when no options are provided
10
- *
11
- * This function always returns a new plain object.
12
- */
13
1
  const deepMerge = (a = {}, b = {}, options) => {
14
- const result = { ...a };
15
- const basePath = options?._path ?? [];
16
- // Iterate only over b's own enumerable properties
17
- for (const key in b) {
18
- if (!Object.prototype.hasOwnProperty.call(b, key))
19
- continue;
20
- const aValue = a[key];
21
- const bValue = b[key];
22
- const nextPath = [...basePath, key];
23
- // Recursively merge when both sides are plain objects
24
- if (aValue &&
25
- bValue &&
26
- typeof aValue === "object" &&
27
- typeof bValue === "object" &&
28
- !Array.isArray(aValue) &&
29
- !Array.isArray(bValue)) {
30
- result[key] = deepMerge(aValue, bValue, options ? { ...options, _path: nextPath } : undefined);
31
- }
32
- else {
33
- // Emit override event only when debugging is enabled
34
- const isAdd = aValue === undefined;
35
- options?.onOverride?.({
36
- path: nextPath.join("."),
37
- prev: aValue,
38
- next: bValue,
39
- kind: isAdd ? "add" : "override",
40
- });
41
- result[key] = bValue;
42
- }
2
+ const result = { ...a };
3
+ const basePath = options?._path ?? [];
4
+ for (const key in b) {
5
+ if (!Object.prototype.hasOwnProperty.call(b, key)) continue;
6
+ const aValue = a[key];
7
+ const bValue = b[key];
8
+ const nextPath = [...basePath, key];
9
+ if (aValue && bValue && typeof aValue === "object" && typeof bValue === "object" && !Array.isArray(aValue) && !Array.isArray(bValue)) {
10
+ result[key] = deepMerge(
11
+ aValue,
12
+ bValue,
13
+ options ? { ...options, _path: nextPath } : void 0
14
+ );
15
+ } else {
16
+ const isAdd = aValue === void 0;
17
+ options?.onOverride?.({
18
+ path: nextPath.join("."),
19
+ prev: aValue,
20
+ next: bValue,
21
+ kind: isAdd ? "add" : "override"
22
+ });
23
+ result[key] = bValue;
43
24
  }
44
- return result;
25
+ }
26
+ return result;
45
27
  };
46
28
 
47
29
  export { deepMerge };
@@ -1,34 +1,11 @@
1
- /**
2
- * Resolve the effective message loader for a given runtime.
3
- *
4
- * Loader resolution follows an inheritance-based priority model:
5
- *
6
- * - client runtime:
7
- * client.loader → server.loader → root loader
8
- *
9
- * - server runtime:
10
- * server.loader → root loader
11
- *
12
- * This allows the client runtime to inherit server behavior
13
- * when no explicit client loader is provided.
14
- *
15
- * Notes:
16
- * - Static `messages` are intentionally NOT handled here.
17
- * - Returning `undefined` indicates that no loader is enabled
18
- * for the given runtime.
19
- */
20
1
  const resolveLoaderOptions = (config, runtime) => {
21
- // ------------------------------------------------
22
- // runtime: client
23
- // ------------------------------------------------
24
- {
25
- const client = config.client?.loader;
26
- if (client) {
27
- // Client loader is always remote by design
28
- return { mode: "remote", ...client };
29
- }
30
- return config.server?.loader ?? config.loader;
2
+ {
3
+ const client = config.client?.loader;
4
+ if (client) {
5
+ return { mode: "remote", ...client };
31
6
  }
7
+ return config.server?.loader ?? config.loader;
8
+ }
32
9
  };
33
10
 
34
11
  export { resolveLoaderOptions };
@@ -1,8 +1,5 @@
1
- /**
2
- * Allow locale persistence based on first-visit policy.
3
- */
4
1
  function shouldPersistOnFirstVisit(isFirstVisit, persistOnFirstVisit) {
5
- return !isFirstVisit || persistOnFirstVisit;
2
+ return !isFirstVisit || persistOnFirstVisit;
6
3
  }
7
4
 
8
5
  export { shouldPersistOnFirstVisit };
package/package.json CHANGED
@@ -1,12 +1,17 @@
1
1
  {
2
2
  "name": "intor",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "The i18n library for modern JavaScript",
5
- "author": "Yiming Liao",
5
+ "author": {
6
+ "name": "Yiming Liao",
7
+ "email": "yimingliao.official@gmail.com",
8
+ "url": "https://github.com/yiming-liao"
9
+ },
6
10
  "homepage": "https://intor.dev",
7
11
  "repository": {
8
12
  "type": "git",
9
- "url": "https://github.com/yiming-liao/intor"
13
+ "url": "https://github.com/yiming-liao/intor",
14
+ "directory": "packages/intor"
10
15
  },
11
16
  "bugs": {
12
17
  "url": "https://github.com/yiming-liao/intor/issues"
@@ -101,76 +106,59 @@
101
106
  ],
102
107
  "sideEffects": false,
103
108
  "engines": {
104
- "node": ">=20"
109
+ "node": ">=20.0.0"
110
+ },
111
+ "dependencies": {
112
+ "logry": "2.1.6",
113
+ "p-limit": "7.2.0",
114
+ "intor-translator": "1.5.0"
115
+ },
116
+ "peerDependencies": {
117
+ "react": "^19",
118
+ "vue": "^3",
119
+ "svelte": "^5",
120
+ "next": "^16",
121
+ "@sveltejs/kit": "^2",
122
+ "hono": "^4",
123
+ "fastify": "^5",
124
+ "fastify-plugin": "^5"
125
+ },
126
+ "peerDependenciesMeta": {
127
+ "react": {
128
+ "optional": true
129
+ },
130
+ "vue": {
131
+ "optional": true
132
+ },
133
+ "svelte": {
134
+ "optional": true
135
+ },
136
+ "next": {
137
+ "optional": true
138
+ },
139
+ "@sveltejs/kit": {
140
+ "optional": true
141
+ },
142
+ "hono": {
143
+ "optional": true
144
+ },
145
+ "fastify": {
146
+ "optional": true
147
+ },
148
+ "fastify-plugin": {
149
+ "optional": true
150
+ }
105
151
  },
106
152
  "scripts": {
107
153
  "type": "tsc -p tsconfig.json --noEmit",
108
- "lint": "eslint",
109
154
  "test": "vitest",
110
155
  "test:types": "tsx scripts/test-types.ts",
111
156
  "test:check": "tsx scripts/check-test-structure.ts",
112
- "knip": "knip --config .config/knip.config.ts",
113
157
  "clean": "rm -rf dist",
114
158
  "build": "tsx scripts/build.ts",
115
159
  "build:types": "tsc -p tsconfig.build.json && tsc-alias tsconfig.build.json --outDir dist/types",
116
- "build:release": "yarn clean && yarn build && yarn build:types && yarn api:build",
160
+ "build:release": "pnpm clean && pnpm build && pnpm build:types && pnpm api:build",
117
161
  "api:build": "tsx scripts/api-extractor/build.ts",
118
- "api:check": "tsx scripts/api-extractor/check.ts",
119
- "prepublishOnly": "yarn build:release"
120
- },
121
- "dependencies": {
122
- "intor-translator": "^1.5.0",
123
- "logry": "2.1.6",
124
- "p-limit": "7.2.0"
125
- },
126
- "devDependencies": {
127
- "@microsoft/api-extractor": "^7.57.6",
128
- "@rollup/plugin-alias": "6.0.0",
129
- "@rollup/plugin-typescript": "12.3.0",
130
- "@rollup/pluginutils": "5.3.0",
131
- "@sveltejs/kit": "2.50.1",
132
- "@testing-library/dom": "10.4.1",
133
- "@testing-library/jest-dom": "6.9.1",
134
- "@testing-library/react": "16.3.1",
135
- "@types/express": "5.0.6",
136
- "@types/node": "24.10.1",
137
- "@types/react": "19.0.0",
138
- "@types/react-dom": "19.0.0",
139
- "@vitejs/plugin-react": "5.1.2",
140
- "@vitest/coverage-v8": "4.0.16",
141
- "@vue/test-utils": "^2.4.6",
142
- "eslint": "9.39.2",
143
- "eslint-config-prettier": "10.1.8",
144
- "eslint-import-resolver-typescript": "4.4.4",
145
- "eslint-plugin-import": "2.31.0",
146
- "eslint-plugin-prettier": "5.5.4",
147
- "eslint-plugin-react": "7.37.5",
148
- "eslint-plugin-react-hooks": "7.0.1",
149
- "eslint-plugin-unicorn": "62.0.0",
150
- "eslint-plugin-unused-imports": "4.1.4",
151
- "fastify": "^5.7.4",
152
- "fastify-plugin": "^5.1.0",
153
- "hono": "^4.11.8",
154
- "jsdom": "27.3.0",
155
- "knip": "5.69.1",
156
- "magic-string": "0.30.21",
157
- "next": "16.0.3",
158
- "prettier": "3.6.2",
159
- "react": "19.0.0",
160
- "react-dom": "19.0.0",
161
- "remark": "15.0.1",
162
- "remark-gfm": "4.0.1",
163
- "rollup": "4.53.3",
164
- "rollup-plugin-copy": "3.5.0",
165
- "svelte": "5.46.1",
166
- "tsc-alias": "1.8.16",
167
- "tsd": "0.33.0",
168
- "tsx": "^4.21.0",
169
- "typescript": "5.8.3",
170
- "typescript-eslint": "^8.56.1",
171
- "vite": "7.3.0",
172
- "vite-tsconfig-paths": "6.0.3",
173
- "vitest": "4.0.16",
174
- "vue": "3.5.26"
162
+ "api:check": "tsx scripts/api-extractor/check.ts"
175
163
  }
176
- }
164
+ }
@@ -1,8 +0,0 @@
1
- const INTOR_HEADERS = {
2
- LOCALE: "x-intor-locale",
3
- LOCALE_SOURCE: "x-intor-locale-source",
4
- PATHNAME: "x-intor-pathname",
5
- REDIRECTED: "x-intor-redirected",
6
- };
7
-
8
- export { INTOR_HEADERS };
@@ -1 +0,0 @@
1
- {"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../../../../src/core/constants/headers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC"}