@krak-stack/registry 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -6
- package/README.md +8 -0
- package/dist/components/ui/color-picker.js +2 -3
- package/dist/components/ui/data-table.js +18 -11
- package/dist/components/ui/effect-form.js +2 -2
- package/dist/components/ui/form.d.ts +5 -5
- package/dist/components/ui/form.js +2 -2
- package/dist/components/ui/icon-input.js +2 -2
- package/dist/components/ui/{google-map.d.ts → map-menu-map.d.ts} +3 -1
- package/dist/components/ui/map-menu.d.ts +75 -0
- package/dist/components/ui/map-menu.js +1027 -0
- package/dist/components/ui/stepper.d.ts +37 -0
- package/dist/components/ui/stepper.js +244 -0
- package/dist/components/ui/virtualized-combobox.js +2 -2
- package/dist/services/events/client/audit-log-table.js +18 -11
- package/dist/services/webhooks/client/delivery-table.js +18 -11
- package/package.json +8 -4
- package/dist/components/ui/google-map.js +0 -441
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
# @krak-stack/registry
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.3.0
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Minor Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- 20be5ee: Replace the GoogleMap and GoogleMapPicker public entries with MapMenu at `@krak-stack/registry/map-menu` and `@krak-stack/map-menu` in the shadcn registry. Map rendering is now internal.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Use the exported `MapMenuMode.Point` enum member for pinpoint-only selection without radius props, controls, circle or hint. `MapMenuMode.Radius` remains the default and retains radius confirmation. Rename picker types and styling slots to their MapMenu equivalents. Old public imports are removed without compatibility aliases.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- 4e746f4: Add a controlled GoogleMapPicker with responsive toolbar layout, floating suggestions, configurable radius presets, localized source notices and a yellow default confirmation action. Keep lookup and persistence host-owned. GoogleMap radius fitting waits for updated overlays to paint and cancels stale scheduled fits.
|
|
12
|
+
|
|
13
|
+
The default confirmation colour uses KrakStack's `oklch(0.9247 0.0524 66.1732)` rather than Tailwind yellow.
|
|
12
14
|
|
|
13
|
-
-
|
|
15
|
+
- 86fc54f: Add a domain-neutral Stepper and optional StepperContent with controlled navigation, underline/labelled/segmented presentations, explicit completion/error states, bilingual defaults, and reduced-motion-aware directional slide transitions inside a stationary frame.
|
|
14
16
|
|
|
15
17
|
## 0.2.0
|
|
16
18
|
|
package/README.md
CHANGED
|
@@ -23,6 +23,14 @@ import { Speech } from "@krak-stack/registry/speech";
|
|
|
23
23
|
|
|
24
24
|
Speech-to-text and text-to-speech use Cloudflare AI Gateway. See the [speech setup and API contract](https://krakstack.net/docs/speech); authentication and quotas stay application-owned. Schemas and the optional HTTP API contract are available from `@krak-stack/registry/speech/schema` and `@krak-stack/registry/speech/api`.
|
|
25
25
|
|
|
26
|
+
For durable notifications, install `@krak-stack/notifications@0.3.0` for the Effect
|
|
27
|
+
backend and optionally `@krak-stack/notifications-admin@0.1.0` for React admin views
|
|
28
|
+
and Effect Atom helpers. The admin views reuse registry's generic tables and forms.
|
|
29
|
+
Import notification administration exclusively from notifications-admin; registry
|
|
30
|
+
does not export these screens or depend on either notification SDK. The admin SDK
|
|
31
|
+
can use the published registry 0.2.2 primitives without a new registry release.
|
|
32
|
+
Legacy engine exports remain unchanged and are not redirected to a new backend.
|
|
33
|
+
|
|
26
34
|
For packaged UI components, include the Tailwind source in your application stylesheet:
|
|
27
35
|
|
|
28
36
|
```css
|
|
@@ -256,11 +256,10 @@ var ColorPanel = ({
|
|
|
256
256
|
}, [copy.saturation, copy.hue, copy.saturationValue, copy.brightnessValue]);
|
|
257
257
|
return /* @__PURE__ */ jsx5("div", {
|
|
258
258
|
ref,
|
|
259
|
-
className: "[&_.react-colorful__hue]:h-4
|
|
259
|
+
className: "[&_.react-colorful]:h-48 [&_.react-colorful]:w-full [&_.react-colorful__hue]:h-4 [&_.react-colorful__pointer]:size-5",
|
|
260
260
|
children: /* @__PURE__ */ jsx5(HexColorPicker, {
|
|
261
261
|
color,
|
|
262
|
-
onChange
|
|
263
|
-
style: { width: "100%", height: "12rem" }
|
|
262
|
+
onChange
|
|
264
263
|
})
|
|
265
264
|
});
|
|
266
265
|
};
|
|
@@ -1449,7 +1449,9 @@ var DateInput = Schema2.Union([
|
|
|
1449
1449
|
Schema2.Int,
|
|
1450
1450
|
CalendarDate,
|
|
1451
1451
|
InstantString
|
|
1452
|
-
]).annotate({
|
|
1452
|
+
]).annotate({
|
|
1453
|
+
identifier: "DataTableDateInput"
|
|
1454
|
+
});
|
|
1453
1455
|
var decodeDateInput = Schema2.decodeUnknownOption(DateInput);
|
|
1454
1456
|
var resolveDate = (value, type) => Option2.getOrUndefined(Option2.flatMap(decodeDateInput(value), (input) => {
|
|
1455
1457
|
const calendarOnly = Schema2.is(CalendarDate)(input);
|
|
@@ -1851,7 +1853,7 @@ var renderCell = (row, column, locale = "en", labels = dataTableMessages(locale)
|
|
|
1851
1853
|
return /* @__PURE__ */ jsx15(DataTableReferenceCell, {
|
|
1852
1854
|
item: colDef.typeOptions.getItem(row.data),
|
|
1853
1855
|
emptyLabel: colDef.typeOptions.emptyLabel,
|
|
1854
|
-
imageVariant: colDef.typeOptions.imageVariant
|
|
1856
|
+
...colDef.typeOptions.imageVariant ? { imageVariant: colDef.typeOptions.imageVariant } : {}
|
|
1855
1857
|
});
|
|
1856
1858
|
}
|
|
1857
1859
|
if (colDef.type === "number") {
|
|
@@ -2417,21 +2419,26 @@ var FilterEditor = ({
|
|
|
2417
2419
|
event.preventDefault();
|
|
2418
2420
|
if (kind === "text")
|
|
2419
2421
|
apply({ id: column.id, kind, operator, value: primary.trim() });
|
|
2420
|
-
else if (kind === "date")
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
to
|
|
2426
|
-
|
|
2427
|
-
else {
|
|
2422
|
+
else if (kind === "date") {
|
|
2423
|
+
const draft = { id: column.id, kind };
|
|
2424
|
+
if (primary)
|
|
2425
|
+
draft.from = primary;
|
|
2426
|
+
if (secondary)
|
|
2427
|
+
draft.to = secondary;
|
|
2428
|
+
apply(draft);
|
|
2429
|
+
} else {
|
|
2428
2430
|
const min = primary ? Schema2.decodeOption(Schema2.FiniteFromString)(primary) : Option2.some(undefined);
|
|
2429
2431
|
const max = secondary ? Schema2.decodeOption(Schema2.FiniteFromString)(secondary) : Option2.some(undefined);
|
|
2430
2432
|
if (Option2.isNone(min) || Option2.isNone(max)) {
|
|
2431
2433
|
setInvalid(true);
|
|
2432
2434
|
return;
|
|
2433
2435
|
}
|
|
2434
|
-
|
|
2436
|
+
const draft = { id: column.id, kind };
|
|
2437
|
+
if (min.value !== undefined)
|
|
2438
|
+
draft.min = min.value;
|
|
2439
|
+
if (max.value !== undefined)
|
|
2440
|
+
draft.max = max.value;
|
|
2441
|
+
apply(draft);
|
|
2435
2442
|
}
|
|
2436
2443
|
},
|
|
2437
2444
|
children: [
|
|
@@ -995,7 +995,7 @@ var VirtualizedComboboxList = ({
|
|
|
995
995
|
}));
|
|
996
996
|
const selectedEntries = itemEntries.filter(({ item }) => selectedValues.has(item.value));
|
|
997
997
|
const availableEntries = itemEntries.filter(({ item }) => !selectedValues.has(item.value));
|
|
998
|
-
const entries =
|
|
998
|
+
const entries = groupSelections ? [
|
|
999
999
|
...selectedEntries.length > 0 ? [
|
|
1000
1000
|
{
|
|
1001
1001
|
kind: "group",
|
|
@@ -1114,7 +1114,7 @@ var VirtualizedComboboxContent = ({
|
|
|
1114
1114
|
side: "bottom",
|
|
1115
1115
|
sideOffset: 6,
|
|
1116
1116
|
children: /* @__PURE__ */ jsxs5(ComboboxPrimitive.Popup, {
|
|
1117
|
-
className: cn("bg-popover text-popover-foreground ring-foreground/10 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
|
|
1117
|
+
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),
|
|
1118
1118
|
children: [
|
|
1119
1119
|
/* @__PURE__ */ jsx12("div", {
|
|
1120
1120
|
className: "min-w-0 shrink-0 p-1 pb-0",
|
|
@@ -145,7 +145,7 @@ declare const RevertButton: ({ locale, messages, original, }: {
|
|
|
145
145
|
messages?: FormMessageTranslations;
|
|
146
146
|
original: string;
|
|
147
147
|
}) => JSX.Element | undefined;
|
|
148
|
-
declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tanstack/form
|
|
148
|
+
declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TSubmitMeta>(props: import("@tanstack/react-form").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, {
|
|
149
149
|
readonly TextField: typeof TextField;
|
|
150
150
|
readonly TextAreaField: typeof TextAreaField;
|
|
151
151
|
readonly SelectField: typeof SelectField;
|
|
@@ -161,7 +161,7 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
|
|
|
161
161
|
readonly FormError: typeof FormError;
|
|
162
162
|
readonly FieldWrapper: typeof FieldWrapper;
|
|
163
163
|
readonly BlockNavigation: typeof BlockNavigation;
|
|
164
|
-
}>, withForm: <TFormData, TOnMount extends undefined | import("@tanstack/form
|
|
164
|
+
}>, withForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").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, {
|
|
165
165
|
readonly TextField: typeof TextField;
|
|
166
166
|
readonly TextAreaField: typeof TextAreaField;
|
|
167
167
|
readonly SelectField: typeof SelectField;
|
|
@@ -178,7 +178,7 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
|
|
|
178
178
|
readonly FieldWrapper: typeof FieldWrapper;
|
|
179
179
|
readonly BlockNavigation: typeof BlockNavigation;
|
|
180
180
|
}, TRenderProps>) => import("react").FunctionComponent<import("react").PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
|
|
181
|
-
form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/form
|
|
181
|
+
form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
|
|
182
182
|
readonly TextField: typeof TextField;
|
|
183
183
|
readonly TextAreaField: typeof TextAreaField;
|
|
184
184
|
readonly SelectField: typeof SelectField;
|
|
@@ -211,8 +211,8 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
|
|
|
211
211
|
readonly FormError: typeof FormError;
|
|
212
212
|
readonly FieldWrapper: typeof FieldWrapper;
|
|
213
213
|
readonly BlockNavigation: typeof BlockNavigation;
|
|
214
|
-
}, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import("@tanstack/form
|
|
215
|
-
form: import("@tanstack/react-form").AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import("@tanstack/form
|
|
214
|
+
}, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import("@tanstack/react-form").DeepKeysOfType<TFormData, TFieldGroupData | null | undefined> | import("@tanstack/react-form").FieldsMap<TFormData, TFieldGroupData>, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TFormSubmitMeta>(params: import("react").PropsWithChildren<NoInfer<TRenderProps> & {
|
|
215
|
+
form: import("@tanstack/react-form").AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import("@tanstack/react-form").FieldsMap<unknown, TFormData>, any, any, any, any, any, any, any, any, any, any, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
|
|
216
216
|
readonly TextField: typeof TextField;
|
|
217
217
|
readonly TextAreaField: typeof TextAreaField;
|
|
218
218
|
readonly SelectField: typeof SelectField;
|
|
@@ -999,7 +999,7 @@ var VirtualizedComboboxList = ({
|
|
|
999
999
|
}));
|
|
1000
1000
|
const selectedEntries = itemEntries.filter(({ item }) => selectedValues.has(item.value));
|
|
1001
1001
|
const availableEntries = itemEntries.filter(({ item }) => !selectedValues.has(item.value));
|
|
1002
|
-
const entries =
|
|
1002
|
+
const entries = groupSelections ? [
|
|
1003
1003
|
...selectedEntries.length > 0 ? [
|
|
1004
1004
|
{
|
|
1005
1005
|
kind: "group",
|
|
@@ -1118,7 +1118,7 @@ var VirtualizedComboboxContent = ({
|
|
|
1118
1118
|
side: "bottom",
|
|
1119
1119
|
sideOffset: 6,
|
|
1120
1120
|
children: /* @__PURE__ */ jsxs5(ComboboxPrimitive.Popup, {
|
|
1121
|
-
className: cn("bg-popover text-popover-foreground ring-foreground/10 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
|
|
1121
|
+
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),
|
|
1122
1122
|
children: [
|
|
1123
1123
|
/* @__PURE__ */ jsx12("div", {
|
|
1124
1124
|
className: "min-w-0 shrink-0 p-1 pb-0",
|
|
@@ -172,7 +172,7 @@ var VirtualizedComboboxList = ({
|
|
|
172
172
|
}));
|
|
173
173
|
const selectedEntries = itemEntries.filter(({ item }) => selectedValues.has(item.value));
|
|
174
174
|
const availableEntries = itemEntries.filter(({ item }) => !selectedValues.has(item.value));
|
|
175
|
-
const entries =
|
|
175
|
+
const entries = groupSelections ? [
|
|
176
176
|
...selectedEntries.length > 0 ? [
|
|
177
177
|
{
|
|
178
178
|
kind: "group",
|
|
@@ -291,7 +291,7 @@ var VirtualizedComboboxContent = ({
|
|
|
291
291
|
side: "bottom",
|
|
292
292
|
sideOffset: 6,
|
|
293
293
|
children: /* @__PURE__ */ jsxs(ComboboxPrimitive.Popup, {
|
|
294
|
-
className: cn("bg-popover text-popover-foreground ring-foreground/10 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
|
|
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),
|
|
295
295
|
children: [
|
|
296
296
|
/* @__PURE__ */ jsx4("div", {
|
|
297
297
|
className: "min-w-0 shrink-0 p-1 pb-0",
|
|
@@ -38,6 +38,7 @@ export type GoogleMapProps = {
|
|
|
38
38
|
minZoom?: number | undefined;
|
|
39
39
|
maxZoom?: number | undefined;
|
|
40
40
|
className?: string | undefined;
|
|
41
|
+
controlsClassName?: string | undefined;
|
|
41
42
|
messages?: GoogleMapMessageTranslations | undefined;
|
|
42
43
|
locale?: string | undefined;
|
|
43
44
|
};
|
|
@@ -109,5 +110,6 @@ export type GoogleMapsApi = {
|
|
|
109
110
|
};
|
|
110
111
|
};
|
|
111
112
|
};
|
|
112
|
-
|
|
113
|
+
/** Internal renderer shipped with MapMenu; not a standalone registry/package entry. */
|
|
114
|
+
export declare const MapMenuMap: ({ apiKey, center, zoom, marker, radius, interactive, zoomControls, fitRadius, fitPadding, minZoom, maxZoom, className, controlsClassName, messages: messageOverrides, locale: localeOverride, }: GoogleMapProps) => import("react").JSX.Element;
|
|
113
115
|
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type GoogleMapPoint } from "./map-menu-map.js";
|
|
2
|
+
export declare enum MapMenuMode {
|
|
3
|
+
Point = "point",
|
|
4
|
+
Radius = "radius"
|
|
5
|
+
}
|
|
6
|
+
export type MapMenuPoint = GoogleMapPoint;
|
|
7
|
+
export declare const mapMenuRadiiKm: readonly [1, 2, 5, 10, 20, 40, 60, 80, 100, 250, 500];
|
|
8
|
+
export type MapMenuLocation = {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
title?: string | undefined;
|
|
12
|
+
details?: string | undefined;
|
|
13
|
+
center: MapMenuPoint;
|
|
14
|
+
};
|
|
15
|
+
export type MapMenuMessages = {
|
|
16
|
+
title: string;
|
|
17
|
+
location: string;
|
|
18
|
+
placeholder: string;
|
|
19
|
+
clear: string;
|
|
20
|
+
close: string;
|
|
21
|
+
currentLocation: string;
|
|
22
|
+
searchWithin: string;
|
|
23
|
+
suggestions: string;
|
|
24
|
+
loading: string;
|
|
25
|
+
noResults: string;
|
|
26
|
+
searchHint: string;
|
|
27
|
+
ipNotice: string;
|
|
28
|
+
browserNotice: string;
|
|
29
|
+
radiusHint: string;
|
|
30
|
+
cancel: string;
|
|
31
|
+
confirm: string;
|
|
32
|
+
confirmError: string;
|
|
33
|
+
};
|
|
34
|
+
type MapMenuCommonProps = {
|
|
35
|
+
apiKey: string;
|
|
36
|
+
open: boolean;
|
|
37
|
+
onOpenChange: (open: boolean) => void;
|
|
38
|
+
input: string;
|
|
39
|
+
onInputChange: (input: string) => void;
|
|
40
|
+
selectedLocation: MapMenuLocation | null;
|
|
41
|
+
suggestions: readonly MapMenuLocation[];
|
|
42
|
+
onSelectLocation: (location: MapMenuLocation) => void;
|
|
43
|
+
onUseCurrentLocation?: (() => void) | undefined;
|
|
44
|
+
locating?: boolean | undefined;
|
|
45
|
+
loadingSuggestions?: boolean | undefined;
|
|
46
|
+
suggestionsError?: string | undefined;
|
|
47
|
+
error?: string | undefined;
|
|
48
|
+
provenance?: "ip" | "browser" | undefined;
|
|
49
|
+
overlayColor?: string | undefined;
|
|
50
|
+
className?: string | undefined;
|
|
51
|
+
confirmClassName?: string | undefined;
|
|
52
|
+
locale?: string | undefined;
|
|
53
|
+
messages?: Partial<Record<string, Partial<MapMenuMessages>>> | undefined;
|
|
54
|
+
};
|
|
55
|
+
export type MapMenuProps = MapMenuCommonProps & ({
|
|
56
|
+
mode: MapMenuMode.Point;
|
|
57
|
+
radiusKm?: never;
|
|
58
|
+
onRadiusChange?: never;
|
|
59
|
+
radiusOptions?: never;
|
|
60
|
+
onConfirm: (selection: {
|
|
61
|
+
location: MapMenuLocation;
|
|
62
|
+
}) => void | Promise<void>;
|
|
63
|
+
} | {
|
|
64
|
+
mode?: MapMenuMode.Radius | undefined;
|
|
65
|
+
radiusKm: number;
|
|
66
|
+
onRadiusChange: (radiusKm: number) => void;
|
|
67
|
+
radiusOptions?: readonly number[] | undefined;
|
|
68
|
+
onConfirm: (selection: {
|
|
69
|
+
location: MapMenuLocation;
|
|
70
|
+
radiusKm: number;
|
|
71
|
+
}) => void | Promise<void>;
|
|
72
|
+
});
|
|
73
|
+
/** Controlled picker: the host owns lookup, location acquisition and persisted state. */
|
|
74
|
+
export declare const MapMenu: (props: MapMenuProps) => import("react").JSX.Element;
|
|
75
|
+
export {};
|