@krak-stack/registry 0.1.61 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/components/ui/color-picker.d.ts +30 -0
  3. package/dist/components/ui/color-picker.js +384 -0
  4. package/dist/components/ui/data-table.js +26 -14
  5. package/dist/components/ui/effect-form.js +2 -2
  6. package/dist/components/ui/error-component.js +4 -12
  7. package/dist/components/ui/form.d.ts +126 -330
  8. package/dist/components/ui/google-map.js +38 -6
  9. package/dist/components/ui/sidebar-layout.js +10 -13
  10. package/dist/lib/docs.d.ts +2 -2
  11. package/dist/lib/docs.js +16 -19
  12. package/dist/lib/docs.server.js +5 -5
  13. package/dist/lib/documentation-toolkit.d.ts +2 -2
  14. package/dist/lib/documentation-toolkit.js +4 -4
  15. package/dist/lib/httpapi-adapter.d.ts +11 -3
  16. package/dist/lib/httpapi-adapter.js +40 -13
  17. package/dist/lib/httpapi-cli.d.ts +13 -4
  18. package/dist/lib/httpapi-cli.js +63 -21
  19. package/dist/lib/httpapi-toolkit.js +40 -13
  20. package/dist/lib/query.d.ts +4 -4
  21. package/dist/lib/query.js +2 -2
  22. package/dist/lib/webfetch-toolkit.js +1 -1
  23. package/dist/services/agent/index.js +1 -1
  24. package/dist/services/events/browser.js +32 -17
  25. package/dist/services/events/client/audit-log-table.js +26 -14
  26. package/dist/services/events/client/tracking-notice.js +9 -4
  27. package/dist/services/events/index.d.ts +3 -1
  28. package/dist/services/events/index.js +22 -17
  29. package/dist/services/events/schema.d.ts +18 -10
  30. package/dist/services/events/schema.js +3 -3
  31. package/dist/services/file-extraction/schema.d.ts +3 -1
  32. package/dist/services/health/api.builder.d.ts +8 -8
  33. package/dist/services/health/api.group.d.ts +8 -8
  34. package/dist/services/health/index.d.ts +10 -6
  35. package/dist/services/health/index.js +8 -4
  36. package/dist/services/health/schema.d.ts +7 -7
  37. package/dist/services/notification/index.js +1 -1
  38. package/dist/services/notification/public.js +1 -1
  39. package/dist/services/notification/schema.d.ts +3 -1
  40. package/dist/services/opentelemetry/api.js +5 -3
  41. package/dist/services/opentelemetry/browser.js +2 -2
  42. package/dist/services/opentelemetry/index.js +2 -2
  43. package/dist/services/opentelemetry/processor.d.ts +3 -1
  44. package/dist/services/opentelemetry/web-vitals.js +10 -5
  45. package/dist/services/s3/schema.d.ts +3 -1
  46. package/dist/services/speech/api.js +3 -1
  47. package/dist/services/speech/index.js +15 -8
  48. package/dist/services/speech/schema.d.ts +3 -1
  49. package/dist/services/speech/schema.js +3 -1
  50. package/dist/services/webhooks/client/delivery-table.js +26 -14
  51. package/dist/services/webhooks/http-client.js +1 -1
  52. package/dist/services/webhooks/index.js +14 -14
  53. package/dist/services/webhooks/receiver.d.ts +6 -2
  54. package/dist/services/webhooks/schema.d.ts +7 -5
  55. package/dist/services/webhooks/schema.js +2 -2
  56. package/package.json +6 -1
@@ -61,6 +61,9 @@ export type DefaultOptions = {
61
61
  label: JSX.Element | string;
62
62
  description?: string;
63
63
  };
64
+ declare const TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
65
+ declare const TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
66
+ declare const CheckboxField: (props: DefaultOptions) => JSX.Element;
64
67
  type SelectFieldOption = {
65
68
  label: string;
66
69
  value: string;
@@ -73,6 +76,13 @@ type SelectFieldProps = DefaultOptions & {
73
76
  } | {
74
77
  multiple: true;
75
78
  });
79
+ declare const SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
80
+ declare const KeyValueField: (props: DefaultOptions & {
81
+ locale?: string;
82
+ messages?: FormMessageTranslations;
83
+ }) => JSX.Element;
84
+ /** @deprecated Use SelectField with the multiple prop. */
85
+ declare const MultiSelectField: (props: Omit<SelectFieldProps, "multiple">) => JSX.Element;
76
86
  type SearchableSelectFieldSharedProps<TData> = DefaultOptions & {
77
87
  emptyLabel: React.ReactNode;
78
88
  initialItems?: readonly VirtualizedComboboxOption<TData>[];
@@ -89,10 +99,37 @@ type SearchableSelectFieldProps<TData> = SearchableSelectFieldSharedProps<TData>
89
99
  } | {
90
100
  multiple: true;
91
101
  });
102
+ declare const SearchableSelectField: <TData>({ description, label, multiple, ...props }: SearchableSelectFieldProps<TData>) => JSX.Element;
103
+ declare const FileField: ({ label, accept, filePickerMessages, locale: localeOverride, messages, onFileChange, required, }: Omit<DefaultOptions, "description"> & {
104
+ accept: InputHTMLAttributes<HTMLInputElement>["accept"];
105
+ filePickerMessages?: FilePickerMessageTranslations;
106
+ locale?: string;
107
+ messages?: FormMessageTranslations;
108
+ onFileChange?: (file: File | "") => void;
109
+ required?: boolean;
110
+ }) => JSX.Element;
111
+ declare const ImageField: ({ filePickerMessages, label, locale: localeOverride, messages, size, }: {
112
+ filePickerMessages?: FilePickerMessageTranslations;
113
+ label: string;
114
+ locale?: string;
115
+ messages?: FormMessageTranslations;
116
+ size: {
117
+ width: number;
118
+ height: number;
119
+ suggestedWidth?: number;
120
+ suggestedHeight?: number;
121
+ };
122
+ }) => JSX.Element;
92
123
  export declare const BlockNavigation: ({ locale, messages, }: {
93
124
  locale?: string;
94
125
  messages?: FormMessageTranslations;
95
126
  }) => JSX.Element;
127
+ declare const SubmitButton: ({ children, locale, messages, }: {
128
+ children?: React.ReactNode;
129
+ locale?: string;
130
+ messages?: FormMessageTranslations;
131
+ }) => JSX.Element;
132
+ declare const FormError: () => JSX.Element;
96
133
  export declare const FieldWrapper: ({ children, legend, localized, description, locales, editingLocale, }: {
97
134
  children: React.ReactNode;
98
135
  } & DefaultFormOptions & {
@@ -103,351 +140,110 @@ export declare const FieldWrapper: ({ children, legend, localized, description,
103
140
  value: string;
104
141
  }[];
105
142
  }) => JSX.Element;
143
+ declare const RevertButton: ({ locale, messages, original, }: {
144
+ locale?: string;
145
+ messages?: FormMessageTranslations;
146
+ original: string;
147
+ }) => JSX.Element | undefined;
106
148
  declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TSubmitMeta>(props: import("@tanstack/form-core").FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => import("@tanstack/react-form").AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
107
- readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
108
- readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
109
- readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
110
- readonly MultiSelectField: (props: Omit<SelectFieldProps, "multiple">) => JSX.Element;
111
- readonly SearchableSelectField: <TData>({ description, label, multiple, ...props }: SearchableSelectFieldProps<TData>) => JSX.Element;
112
- readonly CheckboxField: (props: DefaultOptions) => JSX.Element;
113
- readonly FileField: ({ label, accept, filePickerMessages, locale: localeOverride, messages, onFileChange, required, }: Omit<DefaultOptions, "description"> & {
114
- accept: InputHTMLAttributes<HTMLInputElement>["accept"];
115
- filePickerMessages?: FilePickerMessageTranslations;
116
- locale?: string;
117
- messages?: FormMessageTranslations;
118
- onFileChange?: (file: File | "") => void;
119
- required?: boolean;
120
- }) => JSX.Element;
121
- readonly KeyValueField: (props: DefaultOptions & {
122
- locale?: string;
123
- messages?: FormMessageTranslations;
124
- }) => JSX.Element;
125
- readonly ImageField: ({ filePickerMessages, label, locale: localeOverride, messages, size, }: {
126
- filePickerMessages?: FilePickerMessageTranslations;
127
- label: string;
128
- locale?: string;
129
- messages?: FormMessageTranslations;
130
- size: {
131
- width: number;
132
- height: number;
133
- suggestedWidth?: number;
134
- suggestedHeight?: number;
135
- };
136
- }) => JSX.Element;
137
- readonly RevertButton: ({ locale, messages, original, }: {
138
- locale?: string;
139
- messages?: FormMessageTranslations;
140
- original: string;
141
- }) => JSX.Element | undefined;
149
+ readonly TextField: typeof TextField;
150
+ readonly TextAreaField: typeof TextAreaField;
151
+ readonly SelectField: typeof SelectField;
152
+ readonly MultiSelectField: typeof MultiSelectField;
153
+ readonly SearchableSelectField: typeof SearchableSelectField;
154
+ readonly CheckboxField: typeof CheckboxField;
155
+ readonly FileField: typeof FileField;
156
+ readonly KeyValueField: typeof KeyValueField;
157
+ readonly ImageField: typeof ImageField;
158
+ readonly RevertButton: typeof RevertButton;
142
159
  }, {
143
- readonly SubmitButton: ({ children, locale, messages, }: {
144
- children?: React.ReactNode;
145
- locale?: string;
146
- messages?: FormMessageTranslations;
147
- }) => JSX.Element;
148
- readonly FormError: () => JSX.Element;
149
- readonly FieldWrapper: ({ children, legend, localized, description, locales, editingLocale, }: {
150
- children: React.ReactNode;
151
- } & DefaultFormOptions & {
152
- localized?: boolean;
153
- editingLocale?: string;
154
- locales?: {
155
- label: string;
156
- value: string;
157
- }[];
158
- }) => JSX.Element;
159
- readonly BlockNavigation: ({ locale, messages, }: {
160
- locale?: string;
161
- messages?: FormMessageTranslations;
162
- }) => JSX.Element;
160
+ readonly SubmitButton: typeof SubmitButton;
161
+ readonly FormError: typeof FormError;
162
+ readonly FieldWrapper: typeof FieldWrapper;
163
+ readonly BlockNavigation: typeof BlockNavigation;
163
164
  }>, withForm: <TFormData, TOnMount extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: import("@tanstack/react-form").WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
164
- readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
165
- readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
166
- readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
167
- readonly MultiSelectField: (props: Omit<SelectFieldProps, "multiple">) => JSX.Element;
168
- readonly SearchableSelectField: <TData>({ description, label, multiple, ...props }: SearchableSelectFieldProps<TData>) => JSX.Element;
169
- readonly CheckboxField: (props: DefaultOptions) => JSX.Element;
170
- readonly FileField: ({ label, accept, filePickerMessages, locale: localeOverride, messages, onFileChange, required, }: Omit<DefaultOptions, "description"> & {
171
- accept: InputHTMLAttributes<HTMLInputElement>["accept"];
172
- filePickerMessages?: FilePickerMessageTranslations;
173
- locale?: string;
174
- messages?: FormMessageTranslations;
175
- onFileChange?: (file: File | "") => void;
176
- required?: boolean;
177
- }) => JSX.Element;
178
- readonly KeyValueField: (props: DefaultOptions & {
179
- locale?: string;
180
- messages?: FormMessageTranslations;
181
- }) => JSX.Element;
182
- readonly ImageField: ({ filePickerMessages, label, locale: localeOverride, messages, size, }: {
183
- filePickerMessages?: FilePickerMessageTranslations;
184
- label: string;
185
- locale?: string;
186
- messages?: FormMessageTranslations;
187
- size: {
188
- width: number;
189
- height: number;
190
- suggestedWidth?: number;
191
- suggestedHeight?: number;
192
- };
193
- }) => JSX.Element;
194
- readonly RevertButton: ({ locale, messages, original, }: {
195
- locale?: string;
196
- messages?: FormMessageTranslations;
197
- original: string;
198
- }) => JSX.Element | undefined;
165
+ readonly TextField: typeof TextField;
166
+ readonly TextAreaField: typeof TextAreaField;
167
+ readonly SelectField: typeof SelectField;
168
+ readonly MultiSelectField: typeof MultiSelectField;
169
+ readonly SearchableSelectField: typeof SearchableSelectField;
170
+ readonly CheckboxField: typeof CheckboxField;
171
+ readonly FileField: typeof FileField;
172
+ readonly KeyValueField: typeof KeyValueField;
173
+ readonly ImageField: typeof ImageField;
174
+ readonly RevertButton: typeof RevertButton;
199
175
  }, {
200
- readonly SubmitButton: ({ children, locale, messages, }: {
201
- children?: React.ReactNode;
202
- locale?: string;
203
- messages?: FormMessageTranslations;
204
- }) => JSX.Element;
205
- readonly FormError: () => JSX.Element;
206
- readonly FieldWrapper: ({ children, legend, localized, description, locales, editingLocale, }: {
207
- children: React.ReactNode;
208
- } & DefaultFormOptions & {
209
- localized?: boolean;
210
- editingLocale?: string;
211
- locales?: {
212
- label: string;
213
- value: string;
214
- }[];
215
- }) => JSX.Element;
216
- readonly BlockNavigation: ({ locale, messages, }: {
217
- locale?: string;
218
- messages?: FormMessageTranslations;
219
- }) => JSX.Element;
176
+ readonly SubmitButton: typeof SubmitButton;
177
+ readonly FormError: typeof FormError;
178
+ readonly FieldWrapper: typeof FieldWrapper;
179
+ readonly BlockNavigation: typeof BlockNavigation;
220
180
  }, TRenderProps>) => import("react").FunctionComponent<import("react").PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
221
181
  form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
222
- readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
223
- readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
224
- readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
225
- readonly MultiSelectField: (props: Omit<SelectFieldProps, "multiple">) => JSX.Element;
226
- readonly SearchableSelectField: <TData>({ description, label, multiple, ...props }: SearchableSelectFieldProps<TData>) => JSX.Element;
227
- readonly CheckboxField: (props: DefaultOptions) => JSX.Element;
228
- readonly FileField: ({ label, accept, filePickerMessages, locale: localeOverride, messages, onFileChange, required, }: Omit<DefaultOptions, "description"> & {
229
- accept: InputHTMLAttributes<HTMLInputElement>["accept"];
230
- filePickerMessages?: FilePickerMessageTranslations;
231
- locale?: string;
232
- messages?: FormMessageTranslations;
233
- onFileChange?: (file: File | "") => void;
234
- required?: boolean;
235
- }) => JSX.Element;
236
- readonly KeyValueField: (props: DefaultOptions & {
237
- locale?: string;
238
- messages?: FormMessageTranslations;
239
- }) => JSX.Element;
240
- readonly ImageField: ({ filePickerMessages, label, locale: localeOverride, messages, size, }: {
241
- filePickerMessages?: FilePickerMessageTranslations;
242
- label: string;
243
- locale?: string;
244
- messages?: FormMessageTranslations;
245
- size: {
246
- width: number;
247
- height: number;
248
- suggestedWidth?: number;
249
- suggestedHeight?: number;
250
- };
251
- }) => JSX.Element;
252
- readonly RevertButton: ({ locale, messages, original, }: {
253
- locale?: string;
254
- messages?: FormMessageTranslations;
255
- original: string;
256
- }) => JSX.Element | undefined;
182
+ readonly TextField: typeof TextField;
183
+ readonly TextAreaField: typeof TextAreaField;
184
+ readonly SelectField: typeof SelectField;
185
+ readonly MultiSelectField: typeof MultiSelectField;
186
+ readonly SearchableSelectField: typeof SearchableSelectField;
187
+ readonly CheckboxField: typeof CheckboxField;
188
+ readonly FileField: typeof FileField;
189
+ readonly KeyValueField: typeof KeyValueField;
190
+ readonly ImageField: typeof ImageField;
191
+ readonly RevertButton: typeof RevertButton;
257
192
  }, {
258
- readonly SubmitButton: ({ children, locale, messages, }: {
259
- children?: React.ReactNode;
260
- locale?: string;
261
- messages?: FormMessageTranslations;
262
- }) => JSX.Element;
263
- readonly FormError: () => JSX.Element;
264
- readonly FieldWrapper: ({ children, legend, localized, description, locales, editingLocale, }: {
265
- children: React.ReactNode;
266
- } & DefaultFormOptions & {
267
- localized?: boolean;
268
- editingLocale?: string;
269
- locales?: {
270
- label: string;
271
- value: string;
272
- }[];
273
- }) => JSX.Element;
274
- readonly BlockNavigation: ({ locale, messages, }: {
275
- locale?: string;
276
- messages?: FormMessageTranslations;
277
- }) => JSX.Element;
193
+ readonly SubmitButton: typeof SubmitButton;
194
+ readonly FormError: typeof FormError;
195
+ readonly FieldWrapper: typeof FieldWrapper;
196
+ readonly BlockNavigation: typeof BlockNavigation;
278
197
  }>;
279
198
  }>>, withFieldGroup: <TFieldGroupData, TSubmitMeta, TRenderProps extends object = {}>({ render, props, defaultValues, }: import("@tanstack/react-form").WithFieldGroupProps<TFieldGroupData, {
280
- readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
281
- readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
282
- readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
283
- readonly MultiSelectField: (props: Omit<SelectFieldProps, "multiple">) => JSX.Element;
284
- readonly SearchableSelectField: <TData>({ description, label, multiple, ...props }: SearchableSelectFieldProps<TData>) => JSX.Element;
285
- readonly CheckboxField: (props: DefaultOptions) => JSX.Element;
286
- readonly FileField: ({ label, accept, filePickerMessages, locale: localeOverride, messages, onFileChange, required, }: Omit<DefaultOptions, "description"> & {
287
- accept: InputHTMLAttributes<HTMLInputElement>["accept"];
288
- filePickerMessages?: FilePickerMessageTranslations;
289
- locale?: string;
290
- messages?: FormMessageTranslations;
291
- onFileChange?: (file: File | "") => void;
292
- required?: boolean;
293
- }) => JSX.Element;
294
- readonly KeyValueField: (props: DefaultOptions & {
295
- locale?: string;
296
- messages?: FormMessageTranslations;
297
- }) => JSX.Element;
298
- readonly ImageField: ({ filePickerMessages, label, locale: localeOverride, messages, size, }: {
299
- filePickerMessages?: FilePickerMessageTranslations;
300
- label: string;
301
- locale?: string;
302
- messages?: FormMessageTranslations;
303
- size: {
304
- width: number;
305
- height: number;
306
- suggestedWidth?: number;
307
- suggestedHeight?: number;
308
- };
309
- }) => JSX.Element;
310
- readonly RevertButton: ({ locale, messages, original, }: {
311
- locale?: string;
312
- messages?: FormMessageTranslations;
313
- original: string;
314
- }) => JSX.Element | undefined;
199
+ readonly TextField: typeof TextField;
200
+ readonly TextAreaField: typeof TextAreaField;
201
+ readonly SelectField: typeof SelectField;
202
+ readonly MultiSelectField: typeof MultiSelectField;
203
+ readonly SearchableSelectField: typeof SearchableSelectField;
204
+ readonly CheckboxField: typeof CheckboxField;
205
+ readonly FileField: typeof FileField;
206
+ readonly KeyValueField: typeof KeyValueField;
207
+ readonly ImageField: typeof ImageField;
208
+ readonly RevertButton: typeof RevertButton;
315
209
  }, {
316
- readonly SubmitButton: ({ children, locale, messages, }: {
317
- children?: React.ReactNode;
318
- locale?: string;
319
- messages?: FormMessageTranslations;
320
- }) => JSX.Element;
321
- readonly FormError: () => JSX.Element;
322
- readonly FieldWrapper: ({ children, legend, localized, description, locales, editingLocale, }: {
323
- children: React.ReactNode;
324
- } & DefaultFormOptions & {
325
- localized?: boolean;
326
- editingLocale?: string;
327
- locales?: {
328
- label: string;
329
- value: string;
330
- }[];
331
- }) => JSX.Element;
332
- readonly BlockNavigation: ({ locale, messages, }: {
333
- locale?: string;
334
- messages?: FormMessageTranslations;
335
- }) => JSX.Element;
210
+ readonly SubmitButton: typeof SubmitButton;
211
+ readonly FormError: typeof FormError;
212
+ readonly FieldWrapper: typeof FieldWrapper;
213
+ readonly BlockNavigation: typeof BlockNavigation;
336
214
  }, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import("@tanstack/form-core").DeepKeysOfType<TFormData, TFieldGroupData | null | undefined> | import("@tanstack/form-core").FieldsMap<TFormData, TFieldGroupData>, TOnMount extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TFormSubmitMeta>(params: import("react").PropsWithChildren<NoInfer<TRenderProps> & {
337
215
  form: import("@tanstack/react-form").AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import("@tanstack/form-core").FieldsMap<unknown, TFormData>, any, any, any, any, any, any, any, any, any, any, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
338
- readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
339
- readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
340
- readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
341
- readonly MultiSelectField: (props: Omit<SelectFieldProps, "multiple">) => JSX.Element;
342
- readonly SearchableSelectField: <TData>({ description, label, multiple, ...props }: SearchableSelectFieldProps<TData>) => JSX.Element;
343
- readonly CheckboxField: (props: DefaultOptions) => JSX.Element;
344
- readonly FileField: ({ label, accept, filePickerMessages, locale: localeOverride, messages, onFileChange, required, }: Omit<DefaultOptions, "description"> & {
345
- accept: InputHTMLAttributes<HTMLInputElement>["accept"];
346
- filePickerMessages?: FilePickerMessageTranslations;
347
- locale?: string;
348
- messages?: FormMessageTranslations;
349
- onFileChange?: (file: File | "") => void;
350
- required?: boolean;
351
- }) => JSX.Element;
352
- readonly KeyValueField: (props: DefaultOptions & {
353
- locale?: string;
354
- messages?: FormMessageTranslations;
355
- }) => JSX.Element;
356
- readonly ImageField: ({ filePickerMessages, label, locale: localeOverride, messages, size, }: {
357
- filePickerMessages?: FilePickerMessageTranslations;
358
- label: string;
359
- locale?: string;
360
- messages?: FormMessageTranslations;
361
- size: {
362
- width: number;
363
- height: number;
364
- suggestedWidth?: number;
365
- suggestedHeight?: number;
366
- };
367
- }) => JSX.Element;
368
- readonly RevertButton: ({ locale, messages, original, }: {
369
- locale?: string;
370
- messages?: FormMessageTranslations;
371
- original: string;
372
- }) => JSX.Element | undefined;
216
+ readonly TextField: typeof TextField;
217
+ readonly TextAreaField: typeof TextAreaField;
218
+ readonly SelectField: typeof SelectField;
219
+ readonly MultiSelectField: typeof MultiSelectField;
220
+ readonly SearchableSelectField: typeof SearchableSelectField;
221
+ readonly CheckboxField: typeof CheckboxField;
222
+ readonly FileField: typeof FileField;
223
+ readonly KeyValueField: typeof KeyValueField;
224
+ readonly ImageField: typeof ImageField;
225
+ readonly RevertButton: typeof RevertButton;
373
226
  }, {
374
- readonly SubmitButton: ({ children, locale, messages, }: {
375
- children?: React.ReactNode;
376
- locale?: string;
377
- messages?: FormMessageTranslations;
378
- }) => JSX.Element;
379
- readonly FormError: () => JSX.Element;
380
- readonly FieldWrapper: ({ children, legend, localized, description, locales, editingLocale, }: {
381
- children: React.ReactNode;
382
- } & DefaultFormOptions & {
383
- localized?: boolean;
384
- editingLocale?: string;
385
- locales?: {
386
- label: string;
387
- value: string;
388
- }[];
389
- }) => JSX.Element;
390
- readonly BlockNavigation: ({ locale, messages, }: {
391
- locale?: string;
392
- messages?: FormMessageTranslations;
393
- }) => JSX.Element;
227
+ readonly SubmitButton: typeof SubmitButton;
228
+ readonly FormError: typeof FormError;
229
+ readonly FieldWrapper: typeof FieldWrapper;
230
+ readonly BlockNavigation: typeof BlockNavigation;
394
231
  }> | import("@tanstack/react-form").AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
395
- readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
396
- readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
397
- readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
398
- readonly MultiSelectField: (props: Omit<SelectFieldProps, "multiple">) => JSX.Element;
399
- readonly SearchableSelectField: <TData>({ description, label, multiple, ...props }: SearchableSelectFieldProps<TData>) => JSX.Element;
400
- readonly CheckboxField: (props: DefaultOptions) => JSX.Element;
401
- readonly FileField: ({ label, accept, filePickerMessages, locale: localeOverride, messages, onFileChange, required, }: Omit<DefaultOptions, "description"> & {
402
- accept: InputHTMLAttributes<HTMLInputElement>["accept"];
403
- filePickerMessages?: FilePickerMessageTranslations;
404
- locale?: string;
405
- messages?: FormMessageTranslations;
406
- onFileChange?: (file: File | "") => void;
407
- required?: boolean;
408
- }) => JSX.Element;
409
- readonly KeyValueField: (props: DefaultOptions & {
410
- locale?: string;
411
- messages?: FormMessageTranslations;
412
- }) => JSX.Element;
413
- readonly ImageField: ({ filePickerMessages, label, locale: localeOverride, messages, size, }: {
414
- filePickerMessages?: FilePickerMessageTranslations;
415
- label: string;
416
- locale?: string;
417
- messages?: FormMessageTranslations;
418
- size: {
419
- width: number;
420
- height: number;
421
- suggestedWidth?: number;
422
- suggestedHeight?: number;
423
- };
424
- }) => JSX.Element;
425
- readonly RevertButton: ({ locale, messages, original, }: {
426
- locale?: string;
427
- messages?: FormMessageTranslations;
428
- original: string;
429
- }) => JSX.Element | undefined;
232
+ readonly TextField: typeof TextField;
233
+ readonly TextAreaField: typeof TextAreaField;
234
+ readonly SelectField: typeof SelectField;
235
+ readonly MultiSelectField: typeof MultiSelectField;
236
+ readonly SearchableSelectField: typeof SearchableSelectField;
237
+ readonly CheckboxField: typeof CheckboxField;
238
+ readonly FileField: typeof FileField;
239
+ readonly KeyValueField: typeof KeyValueField;
240
+ readonly ImageField: typeof ImageField;
241
+ readonly RevertButton: typeof RevertButton;
430
242
  }, {
431
- readonly SubmitButton: ({ children, locale, messages, }: {
432
- children?: React.ReactNode;
433
- locale?: string;
434
- messages?: FormMessageTranslations;
435
- }) => JSX.Element;
436
- readonly FormError: () => JSX.Element;
437
- readonly FieldWrapper: ({ children, legend, localized, description, locales, editingLocale, }: {
438
- children: React.ReactNode;
439
- } & DefaultFormOptions & {
440
- localized?: boolean;
441
- editingLocale?: string;
442
- locales?: {
443
- label: string;
444
- value: string;
445
- }[];
446
- }) => JSX.Element;
447
- readonly BlockNavigation: ({ locale, messages, }: {
448
- locale?: string;
449
- messages?: FormMessageTranslations;
450
- }) => JSX.Element;
243
+ readonly SubmitButton: typeof SubmitButton;
244
+ readonly FormError: typeof FormError;
245
+ readonly FieldWrapper: typeof FieldWrapper;
246
+ readonly BlockNavigation: typeof BlockNavigation;
451
247
  }>;
452
248
  fields: TFields;
453
249
  }>) => ReturnType<import("react").FunctionComponent>;
@@ -1,6 +1,12 @@
1
1
  // ../../src/components/ui/google-map.tsx
2
2
  import { LocateFixed, Minus, Plus } from "lucide-react";
3
- import { useEffect, useEffectEvent, useRef, useState } from "react";
3
+ import {
4
+ useEffect,
5
+ useEffectEvent,
6
+ useRef,
7
+ useState,
8
+ useSyncExternalStore
9
+ } from "react";
4
10
  import { Schema } from "effect";
5
11
 
6
12
  // ../../src/lib/utils.ts
@@ -98,6 +104,28 @@ var mapOptions = (center, zoom, interactive, minZoom, maxZoom) => ({
98
104
  streetViewControl: false,
99
105
  zoomControl: false
100
106
  });
107
+ var createMapState = (loadState, currentZoom) => {
108
+ let snapshot = { loadState, currentZoom };
109
+ const listeners = new Set;
110
+ const update = (next) => {
111
+ if (next.loadState === snapshot.loadState && next.currentZoom === snapshot.currentZoom)
112
+ return;
113
+ snapshot = next;
114
+ for (const listener of listeners)
115
+ listener();
116
+ };
117
+ return {
118
+ getSnapshot: () => snapshot,
119
+ subscribe: (listener) => {
120
+ listeners.add(listener);
121
+ return () => {
122
+ listeners.delete(listener);
123
+ };
124
+ },
125
+ setLoadState: (loadState) => update({ ...snapshot, loadState }),
126
+ setCurrentZoom: (currentZoom) => update({ ...snapshot, currentZoom })
127
+ };
128
+ };
101
129
  function GoogleMap({
102
130
  apiKey,
103
131
  center,
@@ -125,8 +153,9 @@ function GoogleMap({
125
153
  const normalizedMinZoom = Math.min(minZoom, maxZoom);
126
154
  const normalizedMaxZoom = Math.max(minZoom, maxZoom);
127
155
  const initialZoom = clampZoom(zoom, normalizedMinZoom, normalizedMaxZoom);
128
- const [loadState, setLoadState] = useState(normalizedApiKey ? "loading" : "missing-key");
129
- const [currentZoom, setCurrentZoom] = useState(initialZoom);
156
+ const [mapState] = useState(() => createMapState(normalizedApiKey ? "loading" : "missing-key", initialZoom));
157
+ const { loadState, currentZoom } = useSyncExternalStore(mapState.subscribe, mapState.getSnapshot, mapState.getSnapshot);
158
+ const { setLoadState, setCurrentZoom } = mapState;
130
159
  const labels = googleMapMessages(locale, messageOverrides);
131
160
  const markerOptions = Schema.is(Schema.Struct({ icon: Schema.optional(Schema.String) }))(marker) ? marker : undefined;
132
161
  const markerEnabled = marker === true || markerOptions !== undefined;
@@ -196,7 +225,7 @@ function GoogleMap({
196
225
  apiRef.current = null;
197
226
  element.replaceChildren();
198
227
  };
199
- }, [normalizedApiKey]);
228
+ }, [normalizedApiKey, setLoadState]);
200
229
  useEffect(() => {
201
230
  const map = mapRef.current;
202
231
  if (loadState !== "ready" || !map)
@@ -219,7 +248,9 @@ function GoogleMap({
219
248
  fitRadius,
220
249
  normalizedMinZoom,
221
250
  normalizedMaxZoom,
222
- loadState
251
+ loadState,
252
+ setLoadState,
253
+ setCurrentZoom
223
254
  ]);
224
255
  useEffect(() => {
225
256
  const api = apiRef.current;
@@ -284,7 +315,8 @@ function GoogleMap({
284
315
  radiusMeters,
285
316
  radiusStrokeColor,
286
317
  radiusStrokeOpacity,
287
- radiusStrokeWeight
318
+ radiusStrokeWeight,
319
+ setLoadState
288
320
  ]);
289
321
  useEffect(() => {
290
322
  const element = mapElementRef.current;
@@ -2,7 +2,7 @@
2
2
  import { Link, Outlet } from "@tanstack/react-router";
3
3
  import { Option, Schema as Schema2 } from "effect";
4
4
  import { Cookies } from "effect/http";
5
- import { useState as useState3 } from "react";
5
+ import { useState as useState2 } from "react";
6
6
 
7
7
  // ../../src/components/ui/badge.tsx
8
8
  import { mergeProps } from "@base-ui/react/merge-props";
@@ -56,18 +56,15 @@ import { cva as cva3 } from "class-variance-authority";
56
56
  // ../../src/hooks/use-mobile.ts
57
57
  import * as React from "react";
58
58
  var MOBILE_BREAKPOINT = 768;
59
+ var subscribe = (onChange) => {
60
+ const query = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
61
+ query.addEventListener("change", onChange);
62
+ return () => query.removeEventListener("change", onChange);
63
+ };
64
+ var getSnapshot = () => window.innerWidth < MOBILE_BREAKPOINT;
65
+ var getServerSnapshot = () => false;
59
66
  function useIsMobile() {
60
- const [isMobile, setIsMobile] = React.useState(undefined);
61
- React.useEffect(() => {
62
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
63
- const onChange = () => {
64
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
65
- };
66
- mql.addEventListener("change", onChange);
67
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
68
- return () => mql.removeEventListener("change", onChange);
69
- }, []);
70
- return !!isMobile;
67
+ return React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
71
68
  }
72
69
 
73
70
  // ../../src/components/ui/button.tsx
@@ -720,7 +717,7 @@ function SidebarLayout({
720
717
  sidebarCollapsible = "icon",
721
718
  defaultOpen = true
722
719
  }) {
723
- const [sidebarOpen, setSidebarOpen] = useState3(() => getSidebarDefaultOpen(defaultOpen));
720
+ const [sidebarOpen, setSidebarOpen] = useState2(() => getSidebarDefaultOpen(defaultOpen));
724
721
  return /* @__PURE__ */ jsxs4(SidebarProvider, {
725
722
  open: sidebarOpen,
726
723
  onOpenChange: setSidebarOpen,