@krak-stack/registry 0.2.0 → 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.
- package/CHANGELOG.md +6 -0
- package/dist/components/ui/app-brand.js +17 -17
- package/dist/components/ui/code-block.js +6 -6
- package/dist/components/ui/color-picker.js +26 -28
- package/dist/components/ui/copy-button.js +4 -4
- package/dist/components/ui/data-table.js +441 -442
- package/dist/components/ui/editing-locale-switcher.js +10 -10
- package/dist/components/ui/effect-form.js +183 -184
- package/dist/components/ui/error-component.js +6 -6
- package/dist/components/ui/file-picker.js +2 -2
- package/dist/components/ui/form.d.ts +5 -5
- package/dist/components/ui/form.js +136 -137
- package/dist/components/ui/google-map.js +2 -2
- package/dist/components/ui/icon-input.js +45 -48
- package/dist/components/ui/krakstack-provider.js +2 -2
- package/dist/components/ui/locale-switcher.js +4 -4
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/search-menu.js +2 -2
- package/dist/components/ui/sidebar-layout.js +67 -72
- package/dist/components/ui/theme-switcher.js +6 -6
- package/dist/components/ui/virtualized-combobox.js +31 -34
- package/dist/lib/docs.js +166 -171
- package/dist/lib/docs.server.js +18 -40
- package/dist/lib/documentation-toolkit.js +19 -41
- package/dist/lib/httpapi-adapter.js +2 -2
- package/dist/lib/httpapi-cli.js +7 -7
- package/dist/lib/query.js +11 -11
- package/dist/lib/seo.js +2 -2
- package/dist/lib/webfetch-toolkit.js +6 -6
- package/dist/oxlint/anti-slop/index.js +2 -2
- package/dist/services/agent/client/index.js +153 -155
- package/dist/services/agent/index.js +2 -2
- package/dist/services/agent/schema.js +5 -5
- package/dist/services/events/browser.js +6 -6
- package/dist/services/events/client/audit-log-table.js +445 -446
- package/dist/services/events/index.js +59 -59
- package/dist/services/events/migrations.js +2 -2
- package/dist/services/events/record.js +2 -2
- package/dist/services/events/schema.js +39 -39
- package/dist/services/file-extraction/index.js +4 -4
- package/dist/services/file-extraction/schema.js +2 -2
- package/dist/services/health/index.js +9 -9
- package/dist/services/notification/channels/ses/index.js +2 -2
- package/dist/services/notification/channels/ses/schema.js +2 -2
- package/dist/services/notification/client/index.js +5 -5
- package/dist/services/notification/index.js +2 -2
- package/dist/services/notification/persistence/drizzle.js +2 -2
- package/dist/services/notification/persistence/index.js +15 -15
- package/dist/services/notification/persistence/schema.js +12 -12
- package/dist/services/notification/public.js +7 -7
- package/dist/services/notification/schema.js +2 -2
- package/dist/services/opentelemetry/api.js +2 -2
- package/dist/services/opentelemetry/browser.js +7 -7
- package/dist/services/opentelemetry/web-vitals.js +2 -2
- package/dist/services/s3/index.js +2 -2
- package/dist/services/s3/schema.js +2 -2
- package/dist/services/speech/schema.js +9 -9
- package/dist/services/webhooks/client/delivery-table.js +479 -480
- package/dist/services/webhooks/http-client.js +5 -5
- package/dist/services/webhooks/index.js +34 -34
- package/dist/services/webhooks/migrations.js +5 -5
- package/dist/services/webhooks/schema.js +20 -20
- package/dist/services/webhooks/url.js +5 -5
- package/package.json +1 -1
|
@@ -122,8 +122,8 @@ var createMapState = (loadState, currentZoom) => {
|
|
|
122
122
|
listeners.delete(listener);
|
|
123
123
|
};
|
|
124
124
|
},
|
|
125
|
-
setLoadState: (
|
|
126
|
-
setCurrentZoom: (
|
|
125
|
+
setLoadState: (loadState) => update({ ...snapshot, loadState }),
|
|
126
|
+
setCurrentZoom: (currentZoom) => update({ ...snapshot, currentZoom })
|
|
127
127
|
};
|
|
128
128
|
};
|
|
129
129
|
function GoogleMap({
|
|
@@ -86,13 +86,10 @@ function Input({ className, type, ...props }) {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
// ../../src/components/ui/textarea.tsx
|
|
90
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
91
|
-
|
|
92
89
|
// ../../src/components/ui/input-group.tsx
|
|
93
|
-
import { jsx as
|
|
90
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
94
91
|
function InputGroup({ className, ...props }) {
|
|
95
|
-
return /* @__PURE__ */
|
|
92
|
+
return /* @__PURE__ */ jsx3("div", {
|
|
96
93
|
"data-slot": "input-group",
|
|
97
94
|
role: "group",
|
|
98
95
|
className: cn("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
|
|
@@ -125,7 +122,7 @@ function InputGroupInput({
|
|
|
125
122
|
className,
|
|
126
123
|
...props
|
|
127
124
|
}) {
|
|
128
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ jsx3(Input, {
|
|
129
126
|
"data-slot": "input-group-control",
|
|
130
127
|
className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
|
|
131
128
|
...props
|
|
@@ -134,7 +131,7 @@ function InputGroupInput({
|
|
|
134
131
|
|
|
135
132
|
// ../../src/components/ui/virtualized-combobox.tsx
|
|
136
133
|
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider";
|
|
137
|
-
import { jsx as
|
|
134
|
+
import { jsx as jsx4, jsxs, Fragment } from "react/jsx-runtime";
|
|
138
135
|
"use client";
|
|
139
136
|
var messages = {
|
|
140
137
|
en: {
|
|
@@ -213,11 +210,11 @@ var VirtualizedComboboxList = ({
|
|
|
213
210
|
}, [virtualizer]);
|
|
214
211
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
215
212
|
children: [
|
|
216
|
-
filteredItems.length === 0 && /* @__PURE__ */
|
|
213
|
+
filteredItems.length === 0 && /* @__PURE__ */ jsx4("div", {
|
|
217
214
|
className: "text-muted-foreground flex min-h-0 flex-1 flex-col items-center justify-center overflow-auto py-6 text-center text-sm",
|
|
218
215
|
children: emptyLabel
|
|
219
216
|
}),
|
|
220
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ jsx4(ComboboxPrimitive.List, {
|
|
221
218
|
className: "min-h-0 flex-1 scroll-py-1 overflow-auto overscroll-contain p-1",
|
|
222
219
|
hidden: filteredItems.length === 0,
|
|
223
220
|
ref: handleScrollElementRef,
|
|
@@ -225,7 +222,7 @@ var VirtualizedComboboxList = ({
|
|
|
225
222
|
height: Math.min(virtualizer.getTotalSize() + 8, 288),
|
|
226
223
|
maxHeight: "var(--available-height)"
|
|
227
224
|
},
|
|
228
|
-
children: /* @__PURE__ */
|
|
225
|
+
children: /* @__PURE__ */ jsx4("div", {
|
|
229
226
|
className: "relative w-full",
|
|
230
227
|
role: "presentation",
|
|
231
228
|
style: { height: virtualizer.getTotalSize() },
|
|
@@ -238,9 +235,9 @@ var VirtualizedComboboxList = ({
|
|
|
238
235
|
transform: `translateY(${virtualItem.start}px)`
|
|
239
236
|
};
|
|
240
237
|
if (entry.kind === "group") {
|
|
241
|
-
return /* @__PURE__ */
|
|
238
|
+
return /* @__PURE__ */ jsx4(ComboboxPrimitive.Group, {
|
|
242
239
|
className: "contents",
|
|
243
|
-
children: /* @__PURE__ */
|
|
240
|
+
children: /* @__PURE__ */ jsx4(ComboboxPrimitive.GroupLabel, {
|
|
244
241
|
className: "text-muted-foreground absolute top-0 left-0 w-full px-2 pt-3 pb-1 text-xs",
|
|
245
242
|
"data-index": virtualItem.index,
|
|
246
243
|
ref: virtualizer.measureElement,
|
|
@@ -259,13 +256,13 @@ var VirtualizedComboboxList = ({
|
|
|
259
256
|
style,
|
|
260
257
|
value: entry.item,
|
|
261
258
|
children: [
|
|
262
|
-
renderItem?.(entry.item) ?? /* @__PURE__ */
|
|
259
|
+
renderItem?.(entry.item) ?? /* @__PURE__ */ jsx4("span", {
|
|
263
260
|
className: "min-w-0 truncate",
|
|
264
261
|
children: entry.item.label
|
|
265
262
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ jsx4(ComboboxPrimitive.ItemIndicator, {
|
|
267
264
|
className: "absolute right-2 flex size-4 items-center justify-center",
|
|
268
|
-
children: /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ jsx4(Check, {})
|
|
269
266
|
})
|
|
270
267
|
]
|
|
271
268
|
}, entry.item.value);
|
|
@@ -287,8 +284,8 @@ var VirtualizedComboboxContent = ({
|
|
|
287
284
|
virtualizerRef
|
|
288
285
|
}) => {
|
|
289
286
|
const labels = virtualizedComboboxMessages(locale, messageOverrides);
|
|
290
|
-
return /* @__PURE__ */
|
|
291
|
-
children: /* @__PURE__ */
|
|
287
|
+
return /* @__PURE__ */ jsx4(ComboboxPrimitive.Portal, {
|
|
288
|
+
children: /* @__PURE__ */ jsx4(ComboboxPrimitive.Positioner, {
|
|
292
289
|
align: "start",
|
|
293
290
|
className: "isolate z-50",
|
|
294
291
|
side: "bottom",
|
|
@@ -296,17 +293,17 @@ var VirtualizedComboboxContent = ({
|
|
|
296
293
|
children: /* @__PURE__ */ jsxs(ComboboxPrimitive.Popup, {
|
|
297
294
|
className: cn("relative flex max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) flex-col overflow-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-in-95", contentClassName),
|
|
298
295
|
children: [
|
|
299
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ jsx4("div", {
|
|
300
297
|
className: "min-w-0 shrink-0 p-1 pb-0",
|
|
301
|
-
children: /* @__PURE__ */
|
|
298
|
+
children: /* @__PURE__ */ jsx4(InputGroup, {
|
|
302
299
|
className: "border-input/30 bg-input/30 h-8 w-full min-w-0 shadow-none",
|
|
303
|
-
children: /* @__PURE__ */
|
|
300
|
+
children: /* @__PURE__ */ jsx4(ComboboxPrimitive.Input, {
|
|
304
301
|
placeholder: labels.search,
|
|
305
|
-
render: /* @__PURE__ */
|
|
302
|
+
render: /* @__PURE__ */ jsx4(InputGroupInput, {})
|
|
306
303
|
})
|
|
307
304
|
})
|
|
308
305
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ jsx4(VirtualizedComboboxList, {
|
|
310
307
|
emptyLabel,
|
|
311
308
|
groupSelections,
|
|
312
309
|
itemIndexRef,
|
|
@@ -330,20 +327,20 @@ var defaultTrigger = (ariaLabel, ariaInvalid, disabled, label, triggerId) => /*
|
|
|
330
327
|
type: "button",
|
|
331
328
|
variant: "outline",
|
|
332
329
|
children: [
|
|
333
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ jsx4("span", {
|
|
334
331
|
className: "min-w-0 flex-1 truncate pr-7 text-left",
|
|
335
332
|
children: label
|
|
336
333
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ jsx4(ChevronsUpDown, {
|
|
338
335
|
className: "text-muted-foreground shrink-0 opacity-70"
|
|
339
336
|
})
|
|
340
337
|
]
|
|
341
338
|
});
|
|
342
|
-
var defaultClear = (label) => /* @__PURE__ */
|
|
339
|
+
var defaultClear = (label) => /* @__PURE__ */ jsx4(ComboboxPrimitive.Clear, {
|
|
343
340
|
"aria-label": label,
|
|
344
341
|
className: "text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute top-1/2 right-7 z-10 flex size-6 -translate-y-1/2 items-center justify-center rounded-sm outline-none focus-visible:border focus-visible:ring-3",
|
|
345
342
|
type: "button",
|
|
346
|
-
children: /* @__PURE__ */
|
|
343
|
+
children: /* @__PURE__ */ jsx4(X, {
|
|
347
344
|
className: "size-3.5"
|
|
348
345
|
})
|
|
349
346
|
});
|
|
@@ -382,13 +379,13 @@ var VirtualizedComboboxSingle = (props) => {
|
|
|
382
379
|
/* @__PURE__ */ jsxs("div", {
|
|
383
380
|
className: "relative",
|
|
384
381
|
children: [
|
|
385
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ jsx4(ComboboxPrimitive.Trigger, {
|
|
386
383
|
render: props.trigger ?? defaultTrigger(props.ariaLabel, props.ariaInvalid, props.disabled, selectedLabel(props.value, props.placeholder), props.triggerId)
|
|
387
384
|
}),
|
|
388
385
|
props.trigger ? null : defaultClear(labels.clear)
|
|
389
386
|
]
|
|
390
387
|
}),
|
|
391
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ jsx4(VirtualizedComboboxContent, {
|
|
392
389
|
...props,
|
|
393
390
|
groupSelections: false,
|
|
394
391
|
itemIndexRef,
|
|
@@ -424,13 +421,13 @@ var VirtualizedComboboxMultiple = (props) => {
|
|
|
424
421
|
/* @__PURE__ */ jsxs("div", {
|
|
425
422
|
className: "relative",
|
|
426
423
|
children: [
|
|
427
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ jsx4(ComboboxPrimitive.Trigger, {
|
|
428
425
|
render: props.trigger ?? defaultTrigger(props.ariaLabel, props.ariaInvalid, props.disabled, selectedLabel(props.value, props.placeholder), props.triggerId)
|
|
429
426
|
}),
|
|
430
427
|
props.trigger ? null : defaultClear(labels.clear)
|
|
431
428
|
]
|
|
432
429
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ jsx4(VirtualizedComboboxContent, {
|
|
434
431
|
...props,
|
|
435
432
|
groupSelections: true,
|
|
436
433
|
itemIndexRef,
|
|
@@ -442,10 +439,10 @@ var VirtualizedComboboxMultiple = (props) => {
|
|
|
442
439
|
};
|
|
443
440
|
function VirtualizedCombobox(props) {
|
|
444
441
|
const locale = useKrakstackLocale(props.locale);
|
|
445
|
-
return props.multiple ? /* @__PURE__ */
|
|
442
|
+
return props.multiple ? /* @__PURE__ */ jsx4(VirtualizedComboboxMultiple, {
|
|
446
443
|
...props,
|
|
447
444
|
locale
|
|
448
|
-
}) : /* @__PURE__ */
|
|
445
|
+
}) : /* @__PURE__ */ jsx4(VirtualizedComboboxSingle, {
|
|
449
446
|
...props,
|
|
450
447
|
locale
|
|
451
448
|
});
|
|
@@ -453,7 +450,7 @@ function VirtualizedCombobox(props) {
|
|
|
453
450
|
|
|
454
451
|
// ../../src/components/ui/icon-input.tsx
|
|
455
452
|
import { useKrakstackLocale as useKrakstackLocale2 } from "@krak-stack/registry/krakstack-provider";
|
|
456
|
-
import { jsx as
|
|
453
|
+
import { jsx as jsx5, jsxs as jsxs2, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
457
454
|
var IconifySearchResponse = Schema.Struct({
|
|
458
455
|
icons: Schema.Array(Schema.String)
|
|
459
456
|
}).pipe(Schema.annotate({ identifier: "IconifySearchResponse" }));
|
|
@@ -491,10 +488,10 @@ var labels = {
|
|
|
491
488
|
select: "Sélectionner une icône"
|
|
492
489
|
}
|
|
493
490
|
};
|
|
494
|
-
var iconInputLabels = (locale,
|
|
491
|
+
var iconInputLabels = (locale, messages) => ({
|
|
495
492
|
...locale.startsWith("fr") ? labels.fr : labels.en,
|
|
496
|
-
...
|
|
497
|
-
...
|
|
493
|
+
...messages?.[locale.split("-")[0] ?? locale],
|
|
494
|
+
...messages?.[locale]
|
|
498
495
|
});
|
|
499
496
|
var iconifyCollectionUrl = (collection) => `https://icon-sets.iconify.design/${encodeURIComponent(collection)}/`;
|
|
500
497
|
function IconInput({
|
|
@@ -502,7 +499,7 @@ function IconInput({
|
|
|
502
499
|
disabled,
|
|
503
500
|
id,
|
|
504
501
|
locale: localeOverride,
|
|
505
|
-
messages
|
|
502
|
+
messages,
|
|
506
503
|
onValueChange,
|
|
507
504
|
value
|
|
508
505
|
}) {
|
|
@@ -512,24 +509,24 @@ function IconInput({
|
|
|
512
509
|
const deferredQuery = useDeferredValue(query);
|
|
513
510
|
const iconSearchResult = useIconSearchAtom(collection, deferredQuery);
|
|
514
511
|
const icons = AsyncResult.isSuccess(iconSearchResult) ? iconSearchResult.value : [];
|
|
515
|
-
const copy = iconInputLabels(locale,
|
|
512
|
+
const copy = iconInputLabels(locale, messages);
|
|
516
513
|
const isWaiting = deferredQuery.trim() !== "" && AsyncResult.isWaiting(iconSearchResult);
|
|
517
514
|
const items = icons.map((icon) => ({ label: icon, value: icon }));
|
|
518
515
|
const selectedItem = value ? { label: value, value } : null;
|
|
519
|
-
return /* @__PURE__ */
|
|
516
|
+
return /* @__PURE__ */ jsx5(VirtualizedCombobox, {
|
|
520
517
|
ariaLabel: copy.select,
|
|
521
518
|
contentClassName: "h-80 w-80",
|
|
522
519
|
emptyLabel: isWaiting ? null : /* @__PURE__ */ jsxs2("div", {
|
|
523
520
|
className: "text-muted-foreground flex flex-col items-center gap-2 px-3",
|
|
524
521
|
children: [
|
|
525
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ jsx5(Search, {
|
|
526
523
|
className: "size-5"
|
|
527
524
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ jsx5("p", {
|
|
529
526
|
children: query ? copy.empty : copy.searchPrompt
|
|
530
527
|
}),
|
|
531
528
|
/* @__PURE__ */ jsxs2(Button, {
|
|
532
|
-
render: /* @__PURE__ */
|
|
529
|
+
render: /* @__PURE__ */ jsx5("a", {
|
|
533
530
|
href: iconifyCollectionUrl(collection),
|
|
534
531
|
rel: "noreferrer",
|
|
535
532
|
target: "_blank"
|
|
@@ -539,7 +536,7 @@ function IconInput({
|
|
|
539
536
|
children: [
|
|
540
537
|
copy.browse,
|
|
541
538
|
" ",
|
|
542
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ jsx5(ExternalLink, {
|
|
543
540
|
className: "inline size-3"
|
|
544
541
|
})
|
|
545
542
|
]
|
|
@@ -573,22 +570,22 @@ function IconInput({
|
|
|
573
570
|
placeholder: copy.select,
|
|
574
571
|
renderItem: (item) => /* @__PURE__ */ jsxs2(Fragment2, {
|
|
575
572
|
children: [
|
|
576
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ jsx5(Icon, {
|
|
577
574
|
className: "size-5 shrink-0",
|
|
578
575
|
icon: `${collection}:${item.value}`
|
|
579
576
|
}),
|
|
580
|
-
/* @__PURE__ */
|
|
577
|
+
/* @__PURE__ */ jsx5("span", {
|
|
581
578
|
className: "truncate",
|
|
582
579
|
children: item.label
|
|
583
580
|
}),
|
|
584
|
-
/* @__PURE__ */
|
|
581
|
+
/* @__PURE__ */ jsx5("span", {
|
|
585
582
|
className: "sr-only",
|
|
586
583
|
children: copy.select
|
|
587
584
|
})
|
|
588
585
|
]
|
|
589
586
|
}),
|
|
590
587
|
searchValue: query,
|
|
591
|
-
trigger: /* @__PURE__ */
|
|
588
|
+
trigger: /* @__PURE__ */ jsx5(Button, {
|
|
592
589
|
"aria-label": copy.select,
|
|
593
590
|
disabled,
|
|
594
591
|
id,
|
|
@@ -596,7 +593,7 @@ function IconInput({
|
|
|
596
593
|
title: value,
|
|
597
594
|
type: "button",
|
|
598
595
|
variant: "outline",
|
|
599
|
-
children: /* @__PURE__ */
|
|
596
|
+
children: /* @__PURE__ */ jsx5(Icon, {
|
|
600
597
|
className: "size-5",
|
|
601
598
|
icon: `${collection}:${value}`
|
|
602
599
|
})
|
|
@@ -166,12 +166,12 @@ var localeMessages = (locale, translations) => {
|
|
|
166
166
|
var LocaleSwitcher = ({
|
|
167
167
|
locale: localeOverride,
|
|
168
168
|
locales: localeOverrides,
|
|
169
|
-
messages
|
|
169
|
+
messages,
|
|
170
170
|
onLocaleChange
|
|
171
171
|
}) => {
|
|
172
172
|
const locale = useKrakstackLocale(localeOverride);
|
|
173
173
|
const localeOptions = useKrakstackLocales(localeOverrides);
|
|
174
|
-
const labels = localeMessages(locale,
|
|
174
|
+
const labels = localeMessages(locale, messages);
|
|
175
175
|
const LocaleSchema = Schema.String.check(Schema.makeFilter((value) => localeOptions.includes(value))).annotate({ identifier: "Locale" });
|
|
176
176
|
return /* @__PURE__ */ jsxs2(DropdownMenu, {
|
|
177
177
|
children: [
|
|
@@ -219,6 +219,6 @@ var LocaleSwitcher = ({
|
|
|
219
219
|
});
|
|
220
220
|
};
|
|
221
221
|
export {
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
LocaleSwitcher,
|
|
223
|
+
locales
|
|
224
224
|
};
|
|
@@ -284,7 +284,7 @@ function SearchMenu({
|
|
|
284
284
|
placeholder,
|
|
285
285
|
inputPlaceholder,
|
|
286
286
|
emptyMessage,
|
|
287
|
-
messages
|
|
287
|
+
messages,
|
|
288
288
|
shortcutLabel = "⌘K",
|
|
289
289
|
className,
|
|
290
290
|
open,
|
|
@@ -295,7 +295,7 @@ function SearchMenu({
|
|
|
295
295
|
shouldFilter
|
|
296
296
|
}) {
|
|
297
297
|
const locale = useKrakstackLocale(localeOverride);
|
|
298
|
-
const labels = searchMenuMessages(locale,
|
|
298
|
+
const labels = searchMenuMessages(locale, messages);
|
|
299
299
|
const resolvedTitle = title ?? labels.title;
|
|
300
300
|
const resolvedDescription = description ?? labels.description;
|
|
301
301
|
const resolvedPlaceholder = placeholder ?? labels.placeholder;
|