@farm.js/core 0.1.0-beta.21 → 0.1.0-beta.22

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 (210) hide show
  1. package/dist/after.d.mts +25 -0
  2. package/dist/after.d.ts +25 -0
  3. package/dist/agent-runtime.d.mts +96 -0
  4. package/dist/agent-runtime.d.ts +96 -0
  5. package/dist/api/route-manager.d.mts +68 -0
  6. package/dist/api/route-manager.d.ts +68 -0
  7. package/dist/api/runtime.d.mts +3 -0
  8. package/dist/api/runtime.d.ts +3 -0
  9. package/dist/api.cjs +22 -19
  10. package/dist/api.cjs.map +1 -1
  11. package/dist/api.d.mts +50 -0
  12. package/dist/api.d.ts +50 -0
  13. package/dist/api.mjs +2 -1
  14. package/dist/app-BB8GCH1g.d.ts +306 -0
  15. package/dist/app-DwsTpyNZ.d.mts +306 -0
  16. package/dist/app-markdown.d.mts +24 -0
  17. package/dist/app-markdown.d.ts +24 -0
  18. package/dist/cache.d.mts +192 -0
  19. package/dist/cache.d.ts +192 -0
  20. package/dist/{chunk-MIUW47JX.mjs → chunk-2PEJGY5V.mjs} +15 -20
  21. package/dist/chunk-2PEJGY5V.mjs.map +1 -0
  22. package/dist/{chunk-RIXKJPGI.mjs → chunk-42325TLU.mjs} +2 -2
  23. package/dist/{chunk-I3UWA2P2.mjs → chunk-DAUR3WUZ.mjs} +2 -2
  24. package/dist/{chunk-I3UWA2P2.mjs.map → chunk-DAUR3WUZ.mjs.map} +1 -1
  25. package/dist/chunk-GIELMNBG.mjs +15 -0
  26. package/dist/chunk-GIELMNBG.mjs.map +1 -0
  27. package/dist/{chunk-4EATUJFO.mjs → chunk-ICTGDDV4.mjs} +20 -22
  28. package/dist/chunk-ICTGDDV4.mjs.map +1 -0
  29. package/dist/{chunk-FKKM7HVF.mjs → chunk-XBKXKJX5.mjs} +30 -35
  30. package/dist/chunk-XBKXKJX5.mjs.map +1 -0
  31. package/dist/{chunk-VIC7NJ77.mjs → chunk-ZP73P4VR.mjs} +2 -2
  32. package/dist/chunk-recovery-lnQFzcQP.d.mts +26 -0
  33. package/dist/chunk-recovery-lnQFzcQP.d.ts +26 -0
  34. package/dist/client-BT1mFQas.d.mts +447 -0
  35. package/dist/client-Nn0q4eO4.d.ts +447 -0
  36. package/dist/client-cache-CIlyBlmx.d.ts +6 -0
  37. package/dist/client-cache-D-EZ7XVW.d.mts +6 -0
  38. package/dist/client-plugins-CbRum1fj.d.ts +2088 -0
  39. package/dist/client-plugins-QQntVkrv.d.mts +2088 -0
  40. package/dist/client-plugins.d.mts +24 -0
  41. package/dist/client-plugins.d.ts +24 -0
  42. package/dist/client.d.mts +452 -0
  43. package/dist/client.d.ts +452 -0
  44. package/dist/config.d.mts +31 -0
  45. package/dist/config.d.ts +31 -0
  46. package/dist/cron.d.mts +78 -0
  47. package/dist/cron.d.ts +78 -0
  48. package/dist/deferred.d.mts +42 -0
  49. package/dist/deferred.d.ts +42 -0
  50. package/dist/deployment.d.mts +36 -0
  51. package/dist/deployment.d.ts +36 -0
  52. package/dist/docs.d.mts +80 -0
  53. package/dist/docs.d.ts +80 -0
  54. package/dist/env-types.d.mts +12 -0
  55. package/dist/env-types.d.ts +12 -0
  56. package/dist/env.d.mts +45 -0
  57. package/dist/env.d.ts +45 -0
  58. package/dist/environment/vite.d.mts +22 -0
  59. package/dist/environment/vite.d.ts +22 -0
  60. package/dist/environment.d.mts +18 -0
  61. package/dist/environment.d.ts +18 -0
  62. package/dist/font.d.mts +95 -0
  63. package/dist/font.d.ts +95 -0
  64. package/dist/headers.d.mts +22 -0
  65. package/dist/headers.d.ts +22 -0
  66. package/dist/i18n/client.d.mts +32 -0
  67. package/dist/i18n/client.d.ts +32 -0
  68. package/dist/i18n/index.d.mts +20 -0
  69. package/dist/i18n/index.d.ts +20 -0
  70. package/dist/i18n/server.d.mts +30 -0
  71. package/dist/i18n/server.d.ts +30 -0
  72. package/dist/image/server.d.mts +37 -0
  73. package/dist/image/server.d.ts +37 -0
  74. package/dist/image/sharp.d.mts +7 -0
  75. package/dist/image/sharp.d.ts +7 -0
  76. package/dist/image-config-Duob7wER.d.mts +50 -0
  77. package/dist/image-config-Duob7wER.d.ts +50 -0
  78. package/dist/image.d.mts +39 -0
  79. package/dist/image.d.ts +39 -0
  80. package/dist/index.cjs +66 -69
  81. package/dist/index.cjs.map +1 -1
  82. package/dist/index.d.mts +477 -0
  83. package/dist/index.d.ts +477 -0
  84. package/dist/index.mjs +7 -6
  85. package/dist/index.mjs.map +1 -1
  86. package/dist/integration-api-CHT2OKAf.d.mts +93 -0
  87. package/dist/integration-api-CHT2OKAf.d.ts +93 -0
  88. package/dist/integrations.d.mts +24 -0
  89. package/dist/integrations.d.ts +24 -0
  90. package/dist/internal/build-runtime.cjs +50 -50
  91. package/dist/internal/build-runtime.cjs.map +1 -1
  92. package/dist/internal/build-runtime.d.mts +41 -0
  93. package/dist/internal/build-runtime.d.ts +41 -0
  94. package/dist/internal/build-runtime.mjs +5 -4
  95. package/dist/internal/client-runtime.d.mts +17 -0
  96. package/dist/internal/client-runtime.d.ts +17 -0
  97. package/dist/internal/config-runtime.d.mts +41 -0
  98. package/dist/internal/config-runtime.d.ts +41 -0
  99. package/dist/internal/metadata-image-runtime.d.mts +25 -0
  100. package/dist/internal/metadata-image-runtime.d.ts +25 -0
  101. package/dist/internal/production-node-env.d.mts +12 -0
  102. package/dist/internal/production-node-env.d.ts +12 -0
  103. package/dist/internal/production-runtime.d.mts +66 -0
  104. package/dist/internal/production-runtime.d.ts +66 -0
  105. package/dist/island-CfGru1MO.d.mts +9 -0
  106. package/dist/island-CfGru1MO.d.ts +9 -0
  107. package/dist/markdown.d.mts +60 -0
  108. package/dist/markdown.d.ts +60 -0
  109. package/dist/metadata-B5jBJHq1.d.ts +22 -0
  110. package/dist/metadata-BxOJ4FJl.d.mts +22 -0
  111. package/dist/middleware.cjs +17 -17
  112. package/dist/middleware.cjs.map +1 -1
  113. package/dist/middleware.d.mts +171 -0
  114. package/dist/middleware.d.ts +171 -0
  115. package/dist/middleware.mjs +3 -2
  116. package/dist/navigation-errors-Dvwpzaer.d.mts +13 -0
  117. package/dist/navigation-errors-Dvwpzaer.d.ts +13 -0
  118. package/dist/navigation.d.mts +14 -0
  119. package/dist/navigation.d.ts +14 -0
  120. package/dist/observability.d.mts +335 -0
  121. package/dist/observability.d.ts +335 -0
  122. package/dist/params-BALtrRim.d.ts +15 -0
  123. package/dist/params-ry-lxqmy.d.mts +15 -0
  124. package/dist/plugin-BJDf43dc.d.mts +165 -0
  125. package/dist/plugin-BJDf43dc.d.ts +165 -0
  126. package/dist/plugin.cjs +42 -48
  127. package/dist/plugin.cjs.map +1 -1
  128. package/dist/plugin.d.mts +24 -0
  129. package/dist/plugin.d.ts +24 -0
  130. package/dist/plugin.mjs +4 -3
  131. package/dist/production-runtime-Bxua86uR.d.mts +81 -0
  132. package/dist/production-runtime-CZqXjRVi.d.ts +81 -0
  133. package/dist/query/client.d.mts +61 -0
  134. package/dist/query/client.d.ts +61 -0
  135. package/dist/query/index.d.mts +90 -0
  136. package/dist/query/index.d.ts +90 -0
  137. package/dist/query/parsers.d.mts +25 -0
  138. package/dist/query/parsers.d.ts +25 -0
  139. package/dist/query/server.d.mts +55 -0
  140. package/dist/query/server.d.ts +55 -0
  141. package/dist/request-7V0GaZK_.d.mts +6 -0
  142. package/dist/request-B5XYBv5a.d.ts +6 -0
  143. package/dist/request.d.mts +25 -0
  144. package/dist/request.d.ts +25 -0
  145. package/dist/resolver-DJqjLMg_.d.mts +14 -0
  146. package/dist/resolver-IH4RmPEl.d.ts +14 -0
  147. package/dist/route-runtime-DoOHzCAD.d.mts +38 -0
  148. package/dist/route-runtime-DoOHzCAD.d.ts +38 -0
  149. package/dist/router.d.mts +36 -0
  150. package/dist/router.d.ts +36 -0
  151. package/dist/routes.d.mts +226 -0
  152. package/dist/routes.d.ts +226 -0
  153. package/dist/runtime-Bpp-c28k.d.ts +231 -0
  154. package/dist/runtime-Cxpq6xZN.d.mts +27 -0
  155. package/dist/runtime-Q3u74Nbq.d.mts +231 -0
  156. package/dist/runtime-bv63eUiO.d.ts +27 -0
  157. package/dist/server-action-security.d.mts +45 -0
  158. package/dist/server-action-security.d.ts +45 -0
  159. package/dist/server-fn-client.d.mts +33 -0
  160. package/dist/server-fn-client.d.ts +33 -0
  161. package/dist/server-fn-error-DDh14a0V.d.mts +26 -0
  162. package/dist/server-fn-error-DDh14a0V.d.ts +26 -0
  163. package/dist/server-fn.d.mts +121 -0
  164. package/dist/server-fn.d.ts +121 -0
  165. package/dist/server-plugins.d.mts +57 -0
  166. package/dist/server-plugins.d.ts +57 -0
  167. package/dist/server-query-client.d.mts +51 -0
  168. package/dist/server-query-client.d.ts +51 -0
  169. package/dist/server-query.d.mts +37 -0
  170. package/dist/server-query.d.ts +37 -0
  171. package/dist/server.cjs +45 -67
  172. package/dist/server.cjs.map +1 -1
  173. package/dist/server.d.mts +51 -0
  174. package/dist/server.d.ts +51 -0
  175. package/dist/server.mjs +8 -22
  176. package/dist/server.mjs.map +1 -1
  177. package/dist/storage.d.mts +52 -0
  178. package/dist/storage.d.ts +52 -0
  179. package/dist/testing.d.mts +103 -0
  180. package/dist/testing.d.ts +103 -0
  181. package/dist/transport-BmbGTXA5.d.mts +49 -0
  182. package/dist/transport-BmbGTXA5.d.ts +49 -0
  183. package/dist/types-BMxWr97v.d.mts +81 -0
  184. package/dist/types-BMxWr97v.d.ts +81 -0
  185. package/dist/types-D1A6-XvH.d.mts +73 -0
  186. package/dist/types-D1A6-XvH.d.ts +73 -0
  187. package/dist/types-DTzm4TCl.d.mts +78 -0
  188. package/dist/types-DTzm4TCl.d.ts +78 -0
  189. package/dist/utils-s9pN0Yep.d.mts +23 -0
  190. package/dist/utils-xTFxzu47.d.ts +23 -0
  191. package/dist/version.cjs +1 -1
  192. package/dist/version.cjs.map +1 -1
  193. package/dist/version.d.mts +3 -0
  194. package/dist/version.d.ts +3 -0
  195. package/dist/version.mjs +1 -1
  196. package/dist/vite.cjs +44 -50
  197. package/dist/vite.cjs.map +1 -1
  198. package/dist/vite.d.mts +24 -0
  199. package/dist/vite.d.ts +24 -0
  200. package/dist/vite.mjs +4 -3
  201. package/dist/workflows-CusFV6mn.d.mts +153 -0
  202. package/dist/workflows-CusFV6mn.d.ts +153 -0
  203. package/dist/workflows.d.mts +1 -0
  204. package/dist/workflows.d.ts +1 -0
  205. package/package.json +1 -1
  206. package/dist/chunk-4EATUJFO.mjs.map +0 -1
  207. package/dist/chunk-FKKM7HVF.mjs.map +0 -1
  208. package/dist/chunk-MIUW47JX.mjs.map +0 -1
  209. /package/dist/{chunk-RIXKJPGI.mjs.map → chunk-42325TLU.mjs.map} +0 -0
  210. /package/dist/{chunk-VIC7NJ77.mjs.map → chunk-ZP73P4VR.mjs.map} +0 -0
package/dist/font.d.ts ADDED
@@ -0,0 +1,95 @@
1
+ type FarmFontDisplay = "auto" | "block" | "swap" | "fallback" | "optional";
2
+ interface FarmFontSource {
3
+ /** Local file path or remote URL, depending on the loader. */
4
+ path: string;
5
+ /** A fixed weight (`400`) or variable range (`100 900`). */
6
+ weight?: number | string;
7
+ /** Font style for this source. */
8
+ style?: string;
9
+ /** Optional CSS unicode-range descriptor. */
10
+ unicodeRange?: string;
11
+ }
12
+ interface FarmFontOptions {
13
+ /** CSS font-family name. */
14
+ family: string;
15
+ /** A fixed weight (`400`) or variable range (`100 900`). */
16
+ weight?: number | string;
17
+ /** Font style. @default "normal" */
18
+ style?: string;
19
+ /** Browser loading behavior. @default "swap" */
20
+ display?: FarmFontDisplay;
21
+ /** CSS custom property populated by `variable`, for example `--font-sans`. */
22
+ variable?: `--${string}`;
23
+ /** Fallback family names appended to the generated stack. */
24
+ fallback?: string[];
25
+ /** Emit font preload hints. @default true */
26
+ preload?: boolean;
27
+ }
28
+ interface LocalFontOptions extends FarmFontOptions {
29
+ /**
30
+ * A file relative to this module, a package font specifier, or explicit
31
+ * sources for a multi-weight family.
32
+ */
33
+ src: string | FarmFontSource[];
34
+ }
35
+ interface RemoteFontSource extends FarmFontSource {
36
+ /** Optional integrity value for this source. Overrides the family-level value. */
37
+ integrity?: string;
38
+ }
39
+ interface RemoteFontOptions extends FarmFontOptions {
40
+ /** HTTPS font URL, or explicit remote sources for a multi-weight family. */
41
+ src: string | RemoteFontSource[];
42
+ /** Download and fingerprint the font during the build, or retain its URL. */
43
+ strategy?: "self-host" | "external";
44
+ /** Optional Subresource Integrity value checked while self-hosting. */
45
+ integrity?: string;
46
+ }
47
+ interface FarmFont {
48
+ /** Generated class that applies the font family and fallback stack. */
49
+ className: string;
50
+ /** Generated class that defines the configured CSS custom property. */
51
+ variable: string;
52
+ /** Inline-style equivalent of the generated family. */
53
+ style: Readonly<{
54
+ fontFamily: string;
55
+ fontStyle?: string;
56
+ fontWeight?: number | string;
57
+ }>;
58
+ /** Compiled resources that should be preloaded when this font is selected. */
59
+ preloads: readonly Readonly<{
60
+ href: string;
61
+ type: string;
62
+ }>[];
63
+ }
64
+ /** Semantic font roles inherited by framework-owned surfaces such as Farm Docs. */
65
+ interface FarmLayoutFonts {
66
+ /** Default text and prose font. */
67
+ body?: FarmFont;
68
+ /** Code, keyboard input, and other technical UI font. */
69
+ code?: FarmFont;
70
+ }
71
+ interface FarmLayoutFontModule {
72
+ fonts?: FarmLayoutFonts;
73
+ }
74
+ /**
75
+ * Define the semantic fonts exported by a layout.
76
+ *
77
+ * Layouts are resolved from the root toward the requested route. A nearer
78
+ * layout overrides only the roles it defines, so it can replace `body` while
79
+ * continuing to inherit `code` from a parent layout.
80
+ */
81
+ declare function defineLayoutFonts<const T extends FarmLayoutFonts>(fonts: T): T;
82
+ /** Resolve semantic font roles from root layout to nearest layout. */
83
+ declare function resolveFarmLayoutFonts(layouts: readonly FarmLayoutFontModule[]): FarmLayoutFonts | undefined;
84
+ /**
85
+ * Compile local font files into hashed application assets and generated CSS.
86
+ * The call is removed at build time and adds no font-loader runtime code.
87
+ */
88
+ declare function localFont(_options: LocalFontOptions): FarmFont;
89
+ /**
90
+ * Compile a remote font into a self-hosted application asset by default.
91
+ * Use `strategy: "external"` only when the browser should retain the remote URL.
92
+ */
93
+ declare function remoteFont(_options: RemoteFontOptions): FarmFont;
94
+
95
+ export { type FarmFont, type FarmFontDisplay, type FarmFontOptions, type FarmFontSource, type FarmLayoutFontModule, type FarmLayoutFonts, type LocalFontOptions, type RemoteFontOptions, type RemoteFontSource, defineLayoutFonts, localFont, remoteFont, resolveFarmLayoutFonts };
@@ -0,0 +1,22 @@
1
+ interface RequestCookie {
2
+ name: string;
3
+ value: string;
4
+ }
5
+ interface ReadonlyHeaders extends Iterable<[string, string]> {
6
+ get(name: string): string | null;
7
+ has(name: string): boolean;
8
+ forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
9
+ entries(): IterableIterator<[string, string]>;
10
+ keys(): IterableIterator<string>;
11
+ values(): IterableIterator<string>;
12
+ }
13
+ interface ReadonlyRequestCookies extends Iterable<RequestCookie> {
14
+ get(name: string): RequestCookie | undefined;
15
+ getAll(name?: string): RequestCookie[];
16
+ has(name: string): boolean;
17
+ toString(): string;
18
+ }
19
+ declare function headers(): ReadonlyHeaders;
20
+ declare function cookies(): ReadonlyRequestCookies;
21
+
22
+ export { type ReadonlyHeaders, type ReadonlyRequestCookies, type RequestCookie, cookies, headers };
@@ -0,0 +1,22 @@
1
+ interface RequestCookie {
2
+ name: string;
3
+ value: string;
4
+ }
5
+ interface ReadonlyHeaders extends Iterable<[string, string]> {
6
+ get(name: string): string | null;
7
+ has(name: string): boolean;
8
+ forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
9
+ entries(): IterableIterator<[string, string]>;
10
+ keys(): IterableIterator<string>;
11
+ values(): IterableIterator<string>;
12
+ }
13
+ interface ReadonlyRequestCookies extends Iterable<RequestCookie> {
14
+ get(name: string): RequestCookie | undefined;
15
+ getAll(name?: string): RequestCookie[];
16
+ has(name: string): boolean;
17
+ toString(): string;
18
+ }
19
+ declare function headers(): ReadonlyHeaders;
20
+ declare function cookies(): ReadonlyRequestCookies;
21
+
22
+ export { type ReadonlyHeaders, type ReadonlyRequestCookies, type RequestCookie, cookies, headers };
@@ -0,0 +1,32 @@
1
+ import { d as FarmTranslator, c as FarmI18nLocale, a as FarmI18nClientSnapshot } from '../types-BMxWr97v.mjs';
2
+ export { e as FarmI18nMessageArgs, f as FarmI18nMessageKey } from '../types-BMxWr97v.mjs';
3
+
4
+ declare const t: FarmTranslator;
5
+
6
+ interface FarmLocaleState {
7
+ locale: FarmI18nLocale;
8
+ locales: readonly FarmI18nLocale[];
9
+ direction: "ltr" | "rtl";
10
+ setLocale(locale: FarmI18nLocale): void;
11
+ }
12
+ interface FarmListFormatOptions {
13
+ localeMatcher?: "lookup" | "best fit";
14
+ type?: "conjunction" | "disjunction" | "unit";
15
+ style?: "long" | "short" | "narrow";
16
+ }
17
+ declare function useLocale(): FarmLocaleState;
18
+ declare function useTranslations(): FarmTranslator;
19
+ declare function getLocale(): FarmI18nLocale;
20
+ declare function getLocaleSource(): FarmI18nClientSnapshot["source"];
21
+ declare function createTranslator(): FarmTranslator;
22
+ declare function setLocale(locale: FarmI18nLocale): void;
23
+ declare function _setFarmI18nClientSnapshot(snapshot: FarmI18nClientSnapshot): void;
24
+ declare const format: {
25
+ number(value: number, options?: Intl.NumberFormatOptions): string;
26
+ currency(value: number, currency: string, options?: Omit<Intl.NumberFormatOptions, "style" | "currency">): string;
27
+ date(value: Date | number, options?: Intl.DateTimeFormatOptions): string;
28
+ relativeTime(value: number, unit: Intl.RelativeTimeFormatUnit, options?: Intl.RelativeTimeFormatOptions): string;
29
+ list(values: Iterable<string>, options?: FarmListFormatOptions): string;
30
+ };
31
+
32
+ export { FarmI18nClientSnapshot, FarmI18nLocale, type FarmLocaleState, _setFarmI18nClientSnapshot, createTranslator, format, getLocale, getLocaleSource, setLocale, t, useLocale, useTranslations };
@@ -0,0 +1,32 @@
1
+ import { d as FarmTranslator, c as FarmI18nLocale, a as FarmI18nClientSnapshot } from '../types-BMxWr97v.js';
2
+ export { e as FarmI18nMessageArgs, f as FarmI18nMessageKey } from '../types-BMxWr97v.js';
3
+
4
+ declare const t: FarmTranslator;
5
+
6
+ interface FarmLocaleState {
7
+ locale: FarmI18nLocale;
8
+ locales: readonly FarmI18nLocale[];
9
+ direction: "ltr" | "rtl";
10
+ setLocale(locale: FarmI18nLocale): void;
11
+ }
12
+ interface FarmListFormatOptions {
13
+ localeMatcher?: "lookup" | "best fit";
14
+ type?: "conjunction" | "disjunction" | "unit";
15
+ style?: "long" | "short" | "narrow";
16
+ }
17
+ declare function useLocale(): FarmLocaleState;
18
+ declare function useTranslations(): FarmTranslator;
19
+ declare function getLocale(): FarmI18nLocale;
20
+ declare function getLocaleSource(): FarmI18nClientSnapshot["source"];
21
+ declare function createTranslator(): FarmTranslator;
22
+ declare function setLocale(locale: FarmI18nLocale): void;
23
+ declare function _setFarmI18nClientSnapshot(snapshot: FarmI18nClientSnapshot): void;
24
+ declare const format: {
25
+ number(value: number, options?: Intl.NumberFormatOptions): string;
26
+ currency(value: number, currency: string, options?: Omit<Intl.NumberFormatOptions, "style" | "currency">): string;
27
+ date(value: Date | number, options?: Intl.DateTimeFormatOptions): string;
28
+ relativeTime(value: number, unit: Intl.RelativeTimeFormatUnit, options?: Intl.RelativeTimeFormatOptions): string;
29
+ list(values: Iterable<string>, options?: FarmListFormatOptions): string;
30
+ };
31
+
32
+ export { FarmI18nClientSnapshot, FarmI18nLocale, type FarmLocaleState, _setFarmI18nClientSnapshot, createTranslator, format, getLocale, getLocaleSource, setLocale, t, useLocale, useTranslations };
@@ -0,0 +1,20 @@
1
+ import { j as FarmI18nRouting } from '../types-BMxWr97v.mjs';
2
+ export { l as FarmI18nCatalog, F as FarmI18nCatalogs, a as FarmI18nClientSnapshot, g as FarmI18nCookieConfig, h as FarmI18nDetectionSignal, i as FarmI18nDirection, c as FarmI18nLocale, m as FarmI18nLocaleRegistry, b as FarmI18nLocaleSource, e as FarmI18nMessageArgs, f as FarmI18nMessageKey, n as FarmI18nMessageRegistry, o as FarmI18nMessageValues, k as FarmI18nUserConfig, d as FarmTranslator, R as ResolvedFarmI18nConfig } from '../types-BMxWr97v.mjs';
3
+ export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders, m as matchFarmLocale } from '../resolver-DJqjLMg_.mjs';
4
+
5
+ interface FarmLocalePathConfig {
6
+ locales: readonly string[];
7
+ defaultLocale: string;
8
+ routing: FarmI18nRouting;
9
+ }
10
+ interface FarmLocalePathMatch {
11
+ locale?: string;
12
+ pathname: string;
13
+ explicit: boolean;
14
+ }
15
+ declare function resolveFarmLocalePath(pathname: string, config: FarmLocalePathConfig): FarmLocalePathMatch;
16
+ declare function stripFarmLocaleFromPathname(pathname: string, config: FarmLocalePathConfig): string;
17
+ declare function localizeFarmPathname(pathname: string, locale: string, config: FarmLocalePathConfig): string;
18
+ declare function localizeFarmHref(href: string, locale: string, config: FarmLocalePathConfig): string;
19
+
20
+ export { FarmI18nRouting, localizeFarmHref, localizeFarmPathname, resolveFarmLocalePath, stripFarmLocaleFromPathname };
@@ -0,0 +1,20 @@
1
+ import { j as FarmI18nRouting } from '../types-BMxWr97v.js';
2
+ export { l as FarmI18nCatalog, F as FarmI18nCatalogs, a as FarmI18nClientSnapshot, g as FarmI18nCookieConfig, h as FarmI18nDetectionSignal, i as FarmI18nDirection, c as FarmI18nLocale, m as FarmI18nLocaleRegistry, b as FarmI18nLocaleSource, e as FarmI18nMessageArgs, f as FarmI18nMessageKey, n as FarmI18nMessageRegistry, o as FarmI18nMessageValues, k as FarmI18nUserConfig, d as FarmTranslator, R as ResolvedFarmI18nConfig } from '../types-BMxWr97v.js';
3
+ export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders, m as matchFarmLocale } from '../resolver-IH4RmPEl.js';
4
+
5
+ interface FarmLocalePathConfig {
6
+ locales: readonly string[];
7
+ defaultLocale: string;
8
+ routing: FarmI18nRouting;
9
+ }
10
+ interface FarmLocalePathMatch {
11
+ locale?: string;
12
+ pathname: string;
13
+ explicit: boolean;
14
+ }
15
+ declare function resolveFarmLocalePath(pathname: string, config: FarmLocalePathConfig): FarmLocalePathMatch;
16
+ declare function stripFarmLocaleFromPathname(pathname: string, config: FarmLocalePathConfig): string;
17
+ declare function localizeFarmPathname(pathname: string, locale: string, config: FarmLocalePathConfig): string;
18
+ declare function localizeFarmHref(href: string, locale: string, config: FarmLocalePathConfig): string;
19
+
20
+ export { FarmI18nRouting, localizeFarmHref, localizeFarmPathname, resolveFarmLocalePath, stripFarmLocaleFromPathname };
@@ -0,0 +1,30 @@
1
+ import { F as FarmLocaleResolution } from '../resolver-DJqjLMg_.mjs';
2
+ import { F as FarmI18nRuntime } from '../runtime-Cxpq6xZN.mjs';
3
+ export { c as createFarmI18nRuntime } from '../runtime-Cxpq6xZN.mjs';
4
+ import { c as FarmI18nLocale, b as FarmI18nLocaleSource, d as FarmTranslator, a as FarmI18nClientSnapshot } from '../types-BMxWr97v.mjs';
5
+ export { e as FarmI18nMessageArgs, f as FarmI18nMessageKey } from '../types-BMxWr97v.mjs';
6
+
7
+ interface FarmListFormatOptions {
8
+ localeMatcher?: "lookup" | "best fit";
9
+ type?: "conjunction" | "disjunction" | "unit";
10
+ style?: "long" | "short" | "narrow";
11
+ }
12
+ declare function _setDefaultFarmI18nRuntime(runtime: FarmI18nRuntime | undefined): void;
13
+ declare function _runWithFarmI18nRequest<T>(runtime: FarmI18nRuntime, request: Request, fn: (resolution: FarmLocaleResolution) => T | Promise<T>, options?: {
14
+ redirect?: boolean;
15
+ }): Promise<T>;
16
+ declare function runWithLocale<T>(locale: FarmI18nLocale, fn: () => T | Promise<T>): Promise<T>;
17
+ declare function getLocale(): FarmI18nLocale;
18
+ declare function getLocaleSource(): FarmI18nLocaleSource;
19
+ declare const t: FarmTranslator;
20
+ declare function createTranslator(locale: FarmI18nLocale): FarmTranslator;
21
+ declare function getFarmI18nClientSnapshot(): FarmI18nClientSnapshot | undefined;
22
+ declare const format: {
23
+ number(value: number, options?: Intl.NumberFormatOptions): string;
24
+ currency(value: number, currency: string, options?: Omit<Intl.NumberFormatOptions, "style" | "currency">): string;
25
+ date(value: Date | number, options?: Intl.DateTimeFormatOptions): string;
26
+ relativeTime(value: number, unit: Intl.RelativeTimeFormatUnit, options?: Intl.RelativeTimeFormatOptions): string;
27
+ list(values: Iterable<string>, options?: FarmListFormatOptions): string;
28
+ };
29
+
30
+ export { FarmI18nClientSnapshot, FarmI18nLocale, FarmI18nRuntime, _runWithFarmI18nRequest, _setDefaultFarmI18nRuntime, createTranslator, format, getFarmI18nClientSnapshot, getLocale, getLocaleSource, runWithLocale, t };
@@ -0,0 +1,30 @@
1
+ import { F as FarmLocaleResolution } from '../resolver-IH4RmPEl.js';
2
+ import { F as FarmI18nRuntime } from '../runtime-bv63eUiO.js';
3
+ export { c as createFarmI18nRuntime } from '../runtime-bv63eUiO.js';
4
+ import { c as FarmI18nLocale, b as FarmI18nLocaleSource, d as FarmTranslator, a as FarmI18nClientSnapshot } from '../types-BMxWr97v.js';
5
+ export { e as FarmI18nMessageArgs, f as FarmI18nMessageKey } from '../types-BMxWr97v.js';
6
+
7
+ interface FarmListFormatOptions {
8
+ localeMatcher?: "lookup" | "best fit";
9
+ type?: "conjunction" | "disjunction" | "unit";
10
+ style?: "long" | "short" | "narrow";
11
+ }
12
+ declare function _setDefaultFarmI18nRuntime(runtime: FarmI18nRuntime | undefined): void;
13
+ declare function _runWithFarmI18nRequest<T>(runtime: FarmI18nRuntime, request: Request, fn: (resolution: FarmLocaleResolution) => T | Promise<T>, options?: {
14
+ redirect?: boolean;
15
+ }): Promise<T>;
16
+ declare function runWithLocale<T>(locale: FarmI18nLocale, fn: () => T | Promise<T>): Promise<T>;
17
+ declare function getLocale(): FarmI18nLocale;
18
+ declare function getLocaleSource(): FarmI18nLocaleSource;
19
+ declare const t: FarmTranslator;
20
+ declare function createTranslator(locale: FarmI18nLocale): FarmTranslator;
21
+ declare function getFarmI18nClientSnapshot(): FarmI18nClientSnapshot | undefined;
22
+ declare const format: {
23
+ number(value: number, options?: Intl.NumberFormatOptions): string;
24
+ currency(value: number, currency: string, options?: Omit<Intl.NumberFormatOptions, "style" | "currency">): string;
25
+ date(value: Date | number, options?: Intl.DateTimeFormatOptions): string;
26
+ relativeTime(value: number, unit: Intl.RelativeTimeFormatUnit, options?: Intl.RelativeTimeFormatOptions): string;
27
+ list(values: Iterable<string>, options?: FarmListFormatOptions): string;
28
+ };
29
+
30
+ export { FarmI18nClientSnapshot, FarmI18nLocale, FarmI18nRuntime, _runWithFarmI18nRequest, _setDefaultFarmI18nRuntime, createTranslator, format, getFarmI18nClientSnapshot, getLocale, getLocaleSource, runWithLocale, t };
@@ -0,0 +1,37 @@
1
+ import { a as FarmImageFormat, R as ResolvedFarmImageConfig } from '../image-config-Duob7wER.mjs';
2
+
3
+ interface FarmImageTransformInput {
4
+ source: Uint8Array;
5
+ sourceUrl: URL;
6
+ sourceType: string;
7
+ width: number;
8
+ quality: number;
9
+ accept: string;
10
+ formats: readonly FarmImageFormat[];
11
+ signal: AbortSignal;
12
+ }
13
+ interface FarmImageTransformResult {
14
+ body: Uint8Array;
15
+ contentType: string;
16
+ }
17
+ type FarmImageTransformer = (input: FarmImageTransformInput) => Promise<FarmImageTransformResult>;
18
+ interface CreateFarmImageHandlerOptions {
19
+ fetch?: typeof globalThis.fetch;
20
+ transform: FarmImageTransformer;
21
+ validateRemoteUrl?: (url: URL) => void | Promise<void>;
22
+ onError?: (error: unknown, request: Request) => void;
23
+ cacheEntries?: number;
24
+ }
25
+ type FarmImageHandler = (request: Request) => Promise<Response | null>;
26
+ type FarmImageRequestErrorCode = "BODY_TOO_LARGE" | "DISALLOWED_SOURCE" | "INVALID_METHOD" | "INVALID_PARAMETER" | "PRIVATE_SOURCE" | "TOO_MANY_REDIRECTS" | "UNSUPPORTED_IMAGE";
27
+ declare class FarmImageRequestError extends Error {
28
+ readonly code: FarmImageRequestErrorCode;
29
+ readonly status: number;
30
+ constructor(code: FarmImageRequestErrorCode, status: number, message: string);
31
+ }
32
+ declare function createFarmImageHandler(config: ResolvedFarmImageConfig, options: CreateFarmImageHandlerOptions): FarmImageHandler;
33
+ declare function createCloudflareImageTransformer(fetcher?: typeof globalThis.fetch): FarmImageTransformer;
34
+ declare function selectOutputFormat(accept: string, formats: readonly FarmImageFormat[]): FarmImageFormat | undefined;
35
+ declare function isPrivateImageAddress(address: string): boolean;
36
+
37
+ export { type CreateFarmImageHandlerOptions, type FarmImageHandler, FarmImageRequestError, type FarmImageTransformInput, type FarmImageTransformResult, type FarmImageTransformer, createCloudflareImageTransformer, createFarmImageHandler, isPrivateImageAddress, selectOutputFormat };
@@ -0,0 +1,37 @@
1
+ import { a as FarmImageFormat, R as ResolvedFarmImageConfig } from '../image-config-Duob7wER.js';
2
+
3
+ interface FarmImageTransformInput {
4
+ source: Uint8Array;
5
+ sourceUrl: URL;
6
+ sourceType: string;
7
+ width: number;
8
+ quality: number;
9
+ accept: string;
10
+ formats: readonly FarmImageFormat[];
11
+ signal: AbortSignal;
12
+ }
13
+ interface FarmImageTransformResult {
14
+ body: Uint8Array;
15
+ contentType: string;
16
+ }
17
+ type FarmImageTransformer = (input: FarmImageTransformInput) => Promise<FarmImageTransformResult>;
18
+ interface CreateFarmImageHandlerOptions {
19
+ fetch?: typeof globalThis.fetch;
20
+ transform: FarmImageTransformer;
21
+ validateRemoteUrl?: (url: URL) => void | Promise<void>;
22
+ onError?: (error: unknown, request: Request) => void;
23
+ cacheEntries?: number;
24
+ }
25
+ type FarmImageHandler = (request: Request) => Promise<Response | null>;
26
+ type FarmImageRequestErrorCode = "BODY_TOO_LARGE" | "DISALLOWED_SOURCE" | "INVALID_METHOD" | "INVALID_PARAMETER" | "PRIVATE_SOURCE" | "TOO_MANY_REDIRECTS" | "UNSUPPORTED_IMAGE";
27
+ declare class FarmImageRequestError extends Error {
28
+ readonly code: FarmImageRequestErrorCode;
29
+ readonly status: number;
30
+ constructor(code: FarmImageRequestErrorCode, status: number, message: string);
31
+ }
32
+ declare function createFarmImageHandler(config: ResolvedFarmImageConfig, options: CreateFarmImageHandlerOptions): FarmImageHandler;
33
+ declare function createCloudflareImageTransformer(fetcher?: typeof globalThis.fetch): FarmImageTransformer;
34
+ declare function selectOutputFormat(accept: string, formats: readonly FarmImageFormat[]): FarmImageFormat | undefined;
35
+ declare function isPrivateImageAddress(address: string): boolean;
36
+
37
+ export { type CreateFarmImageHandlerOptions, type FarmImageHandler, FarmImageRequestError, type FarmImageTransformInput, type FarmImageTransformResult, type FarmImageTransformer, createCloudflareImageTransformer, createFarmImageHandler, isPrivateImageAddress, selectOutputFormat };
@@ -0,0 +1,7 @@
1
+ import { R as ResolvedFarmImageConfig } from '../image-config-Duob7wER.mjs';
2
+ import { FarmImageTransformer } from './server.mjs';
3
+
4
+ declare function createSharpImageTransformer(): FarmImageTransformer;
5
+ declare function createNodeImageUrlValidator(config: ResolvedFarmImageConfig): (url: URL) => Promise<void>;
6
+
7
+ export { createNodeImageUrlValidator, createSharpImageTransformer };
@@ -0,0 +1,7 @@
1
+ import { R as ResolvedFarmImageConfig } from '../image-config-Duob7wER.js';
2
+ import { FarmImageTransformer } from './server.js';
3
+
4
+ declare function createSharpImageTransformer(): FarmImageTransformer;
5
+ declare function createNodeImageUrlValidator(config: ResolvedFarmImageConfig): (url: URL) => Promise<void>;
6
+
7
+ export { createNodeImageUrlValidator, createSharpImageTransformer };
@@ -0,0 +1,50 @@
1
+ type FarmImageFormat = "image/avif" | "image/webp";
2
+ type FarmImageProvider = "auto" | "node" | "cloudflare" | "none";
3
+ interface FarmImageRemotePattern {
4
+ protocol?: "http" | "https";
5
+ hostname: string;
6
+ port?: string;
7
+ pathname?: string;
8
+ search?: string;
9
+ }
10
+ interface FarmImageLocalPattern {
11
+ pathname: string;
12
+ search?: string;
13
+ }
14
+ interface FarmImageConfig {
15
+ /** Runtime optimizer. Auto selects Cloudflare Images on Cloudflare and Sharp elsewhere. */
16
+ provider?: FarmImageProvider;
17
+ /** Public optimizer endpoint. */
18
+ path?: string;
19
+ /** @deprecated Prefer remotePatterns, which also restricts protocol, path, port, and query. */
20
+ domains?: readonly string[];
21
+ remotePatterns?: readonly FarmImageRemotePattern[];
22
+ localPatterns?: readonly FarmImageLocalPattern[];
23
+ deviceSizes?: readonly number[];
24
+ imageSizes?: readonly number[];
25
+ qualities?: readonly number[];
26
+ formats?: readonly FarmImageFormat[];
27
+ minimumCacheTTL?: number;
28
+ maximumResponseBody?: number | string;
29
+ maximumRedirects?: number;
30
+ dangerouslyAllowSVG?: boolean;
31
+ dangerouslyAllowLocalIP?: boolean;
32
+ }
33
+ interface ResolvedFarmImageConfig {
34
+ provider: FarmImageProvider;
35
+ path: string;
36
+ domains: readonly string[];
37
+ remotePatterns: readonly FarmImageRemotePattern[];
38
+ localPatterns: readonly FarmImageLocalPattern[];
39
+ deviceSizes: readonly number[];
40
+ imageSizes: readonly number[];
41
+ qualities: readonly number[];
42
+ formats: readonly FarmImageFormat[];
43
+ minimumCacheTTL: number;
44
+ maximumResponseBody: number;
45
+ maximumRedirects: number;
46
+ dangerouslyAllowSVG: boolean;
47
+ dangerouslyAllowLocalIP: boolean;
48
+ }
49
+
50
+ export type { FarmImageConfig as F, ResolvedFarmImageConfig as R, FarmImageFormat as a, FarmImageLocalPattern as b, FarmImageProvider as c, FarmImageRemotePattern as d };
@@ -0,0 +1,50 @@
1
+ type FarmImageFormat = "image/avif" | "image/webp";
2
+ type FarmImageProvider = "auto" | "node" | "cloudflare" | "none";
3
+ interface FarmImageRemotePattern {
4
+ protocol?: "http" | "https";
5
+ hostname: string;
6
+ port?: string;
7
+ pathname?: string;
8
+ search?: string;
9
+ }
10
+ interface FarmImageLocalPattern {
11
+ pathname: string;
12
+ search?: string;
13
+ }
14
+ interface FarmImageConfig {
15
+ /** Runtime optimizer. Auto selects Cloudflare Images on Cloudflare and Sharp elsewhere. */
16
+ provider?: FarmImageProvider;
17
+ /** Public optimizer endpoint. */
18
+ path?: string;
19
+ /** @deprecated Prefer remotePatterns, which also restricts protocol, path, port, and query. */
20
+ domains?: readonly string[];
21
+ remotePatterns?: readonly FarmImageRemotePattern[];
22
+ localPatterns?: readonly FarmImageLocalPattern[];
23
+ deviceSizes?: readonly number[];
24
+ imageSizes?: readonly number[];
25
+ qualities?: readonly number[];
26
+ formats?: readonly FarmImageFormat[];
27
+ minimumCacheTTL?: number;
28
+ maximumResponseBody?: number | string;
29
+ maximumRedirects?: number;
30
+ dangerouslyAllowSVG?: boolean;
31
+ dangerouslyAllowLocalIP?: boolean;
32
+ }
33
+ interface ResolvedFarmImageConfig {
34
+ provider: FarmImageProvider;
35
+ path: string;
36
+ domains: readonly string[];
37
+ remotePatterns: readonly FarmImageRemotePattern[];
38
+ localPatterns: readonly FarmImageLocalPattern[];
39
+ deviceSizes: readonly number[];
40
+ imageSizes: readonly number[];
41
+ qualities: readonly number[];
42
+ formats: readonly FarmImageFormat[];
43
+ minimumCacheTTL: number;
44
+ maximumResponseBody: number;
45
+ maximumRedirects: number;
46
+ dangerouslyAllowSVG: boolean;
47
+ dangerouslyAllowLocalIP: boolean;
48
+ }
49
+
50
+ export type { FarmImageConfig as F, ResolvedFarmImageConfig as R, FarmImageFormat as a, FarmImageLocalPattern as b, FarmImageProvider as c, FarmImageRemotePattern as d };
@@ -0,0 +1,39 @@
1
+ import * as React from 'react';
2
+ import { ImgHTMLAttributes, SyntheticEvent } from 'react';
3
+ export { F as FarmImageConfig, a as FarmImageFormat, b as FarmImageLocalPattern, c as FarmImageProvider, d as FarmImageRemotePattern, R as ResolvedFarmImageConfig } from './image-config-Duob7wER.mjs';
4
+
5
+ interface StaticImageData {
6
+ src: string;
7
+ width: number;
8
+ height: number;
9
+ blurDataURL?: string;
10
+ }
11
+ interface FarmImageLoaderProps {
12
+ src: string;
13
+ width: number;
14
+ quality: number;
15
+ }
16
+ type FarmImageLoader = (props: FarmImageLoaderProps) => string;
17
+ interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "srcSet" | "width" | "height" | "loading" | "placeholder"> {
18
+ src: string | StaticImageData;
19
+ alt: string;
20
+ width?: number | `${number}`;
21
+ height?: number | `${number}`;
22
+ fill?: boolean;
23
+ quality?: number;
24
+ sizes?: string;
25
+ loading?: "eager" | "lazy";
26
+ preload?: boolean;
27
+ placeholder?: "empty" | "blur";
28
+ blurDataURL?: string;
29
+ unoptimized?: boolean;
30
+ loader?: FarmImageLoader;
31
+ onLoad?: (event: SyntheticEvent<HTMLImageElement>) => void;
32
+ }
33
+ interface ImagePropsResult {
34
+ props: ImgHTMLAttributes<HTMLImageElement>;
35
+ }
36
+ declare function getImageProps(input: ImageProps): ImagePropsResult;
37
+ declare const Image: React.ForwardRefExoticComponent<ImageProps & React.RefAttributes<HTMLImageElement>>;
38
+
39
+ export { type FarmImageLoader, type FarmImageLoaderProps, Image, type ImageProps, type ImagePropsResult, type StaticImageData, Image as default, getImageProps };
@@ -0,0 +1,39 @@
1
+ import * as React from 'react';
2
+ import { ImgHTMLAttributes, SyntheticEvent } from 'react';
3
+ export { F as FarmImageConfig, a as FarmImageFormat, b as FarmImageLocalPattern, c as FarmImageProvider, d as FarmImageRemotePattern, R as ResolvedFarmImageConfig } from './image-config-Duob7wER.js';
4
+
5
+ interface StaticImageData {
6
+ src: string;
7
+ width: number;
8
+ height: number;
9
+ blurDataURL?: string;
10
+ }
11
+ interface FarmImageLoaderProps {
12
+ src: string;
13
+ width: number;
14
+ quality: number;
15
+ }
16
+ type FarmImageLoader = (props: FarmImageLoaderProps) => string;
17
+ interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "srcSet" | "width" | "height" | "loading" | "placeholder"> {
18
+ src: string | StaticImageData;
19
+ alt: string;
20
+ width?: number | `${number}`;
21
+ height?: number | `${number}`;
22
+ fill?: boolean;
23
+ quality?: number;
24
+ sizes?: string;
25
+ loading?: "eager" | "lazy";
26
+ preload?: boolean;
27
+ placeholder?: "empty" | "blur";
28
+ blurDataURL?: string;
29
+ unoptimized?: boolean;
30
+ loader?: FarmImageLoader;
31
+ onLoad?: (event: SyntheticEvent<HTMLImageElement>) => void;
32
+ }
33
+ interface ImagePropsResult {
34
+ props: ImgHTMLAttributes<HTMLImageElement>;
35
+ }
36
+ declare function getImageProps(input: ImageProps): ImagePropsResult;
37
+ declare const Image: React.ForwardRefExoticComponent<ImageProps & React.RefAttributes<HTMLImageElement>>;
38
+
39
+ export { type FarmImageLoader, type FarmImageLoaderProps, Image, type ImageProps, type ImagePropsResult, type StaticImageData, Image as default, getImageProps };