@turingpaper/ui 0.0.1-test.6 → 0.0.1-test.8
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/dist/breadcrumb.mjs +37 -34
- package/dist/button.mjs +21 -18
- package/dist/components/command.d.ts +12 -12
- package/dist/components/map.d.ts +192 -0
- package/dist/input-otp.mjs +9 -9
- package/dist/input.mjs +9 -9
- package/dist/map.mjs +754 -0
- package/dist/provider.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/textarea.mjs +4 -4
- package/package.json +6 -1
package/dist/breadcrumb.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
1
|
+
import { jsx as s, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import * as t from "react";
|
|
3
|
-
import { Slot as
|
|
4
|
-
import { MoreHorizontal as
|
|
3
|
+
import { Slot as c } from "radix-ui";
|
|
4
|
+
import { MoreHorizontal as d, ChevronRight as l } from "lucide-react";
|
|
5
5
|
import { cn as o } from "./utils.mjs";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const
|
|
6
|
+
const p = t.forwardRef(({ ...r }, e) => /* @__PURE__ */ s("nav", { ref: e, "aria-label": "breadcrumb", ...r }));
|
|
7
|
+
p.displayName = "Breadcrumb";
|
|
8
|
+
const u = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
|
|
9
9
|
"ol",
|
|
10
10
|
{
|
|
11
11
|
ref: a,
|
|
@@ -16,8 +16,8 @@ const p = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
|
|
|
16
16
|
...e
|
|
17
17
|
}
|
|
18
18
|
));
|
|
19
|
-
|
|
20
|
-
const
|
|
19
|
+
u.displayName = "BreadcrumbList";
|
|
20
|
+
const f = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
|
|
21
21
|
"li",
|
|
22
22
|
{
|
|
23
23
|
ref: a,
|
|
@@ -25,17 +25,20 @@ const u = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
|
|
|
25
25
|
...e
|
|
26
26
|
}
|
|
27
27
|
));
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
r ?
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
f.displayName = "BreadcrumbItem";
|
|
29
|
+
const b = t.forwardRef(({ asChild: r, className: e, ...a }, m) => {
|
|
30
|
+
const i = r ? c.Root : "a";
|
|
31
|
+
return /* @__PURE__ */ s(
|
|
32
|
+
i,
|
|
33
|
+
{
|
|
34
|
+
ref: m,
|
|
35
|
+
className: o("transition-colors hover:text-foreground", e),
|
|
36
|
+
...a
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
b.displayName = "BreadcrumbLink";
|
|
41
|
+
const N = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
|
|
39
42
|
"span",
|
|
40
43
|
{
|
|
41
44
|
ref: a,
|
|
@@ -46,8 +49,8 @@ const b = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
|
|
|
46
49
|
...e
|
|
47
50
|
}
|
|
48
51
|
));
|
|
49
|
-
|
|
50
|
-
const
|
|
52
|
+
N.displayName = "BreadcrumbPage";
|
|
53
|
+
const B = ({
|
|
51
54
|
children: r,
|
|
52
55
|
className: e,
|
|
53
56
|
...a
|
|
@@ -58,14 +61,14 @@ const N = ({
|
|
|
58
61
|
"aria-hidden": "true",
|
|
59
62
|
className: o("[&>svg]:w-3.5 [&>svg]:h-3.5", e),
|
|
60
63
|
...a,
|
|
61
|
-
children: r ?? /* @__PURE__ */ s(
|
|
64
|
+
children: r ?? /* @__PURE__ */ s(l, {})
|
|
62
65
|
}
|
|
63
66
|
);
|
|
64
|
-
|
|
65
|
-
const
|
|
67
|
+
B.displayName = "BreadcrumbSeparator";
|
|
68
|
+
const g = ({
|
|
66
69
|
className: r,
|
|
67
70
|
...e
|
|
68
|
-
}) => /* @__PURE__ */
|
|
71
|
+
}) => /* @__PURE__ */ n(
|
|
69
72
|
"span",
|
|
70
73
|
{
|
|
71
74
|
role: "presentation",
|
|
@@ -73,18 +76,18 @@ const B = ({
|
|
|
73
76
|
className: o("flex h-9 w-9 items-center justify-center", r),
|
|
74
77
|
...e,
|
|
75
78
|
children: [
|
|
76
|
-
/* @__PURE__ */ s(
|
|
79
|
+
/* @__PURE__ */ s(d, { className: "h-4 w-4" }),
|
|
77
80
|
/* @__PURE__ */ s("span", { className: "sr-only", children: "More" })
|
|
78
81
|
]
|
|
79
82
|
}
|
|
80
83
|
);
|
|
81
|
-
|
|
84
|
+
g.displayName = "BreadcrumbElipssis";
|
|
82
85
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
p as Breadcrumb,
|
|
87
|
+
g as BreadcrumbEllipsis,
|
|
88
|
+
f as BreadcrumbItem,
|
|
89
|
+
b as BreadcrumbLink,
|
|
90
|
+
u as BreadcrumbList,
|
|
91
|
+
N as BreadcrumbPage,
|
|
92
|
+
B as BreadcrumbSeparator
|
|
90
93
|
};
|
package/dist/button.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { Slot as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { Slot as u } from "radix-ui";
|
|
4
4
|
import { cva as c } from "class-variance-authority";
|
|
5
|
-
import { cn as
|
|
6
|
-
const
|
|
5
|
+
import { cn as f } from "./utils.mjs";
|
|
6
|
+
const g = c(
|
|
7
7
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
12
12
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
13
|
-
outline: "border border-input bg-background hover:bg-
|
|
13
|
+
outline: "border border-input bg-background hover:bg-muted hover:text-foreground",
|
|
14
14
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
15
15
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
16
16
|
link: "text-primary underline-offset-4 hover:underline"
|
|
@@ -27,18 +27,21 @@ const f = c(
|
|
|
27
27
|
size: "default"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
),
|
|
31
|
-
({ className: e, variant: r, size: t, asChild: o = !1, ...n }, i) =>
|
|
32
|
-
o ?
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
), m = d.forwardRef(
|
|
31
|
+
({ className: e, variant: r, size: t, asChild: o = !1, ...n }, i) => {
|
|
32
|
+
const s = o ? u.Root : "button";
|
|
33
|
+
return /* @__PURE__ */ a(
|
|
34
|
+
s,
|
|
35
|
+
{
|
|
36
|
+
className: f(g({ variant: r, size: t, className: e })),
|
|
37
|
+
ref: i,
|
|
38
|
+
...n
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
39
42
|
);
|
|
40
|
-
|
|
43
|
+
m.displayName = "Button";
|
|
41
44
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
m as Button,
|
|
46
|
+
g as buttonVariants
|
|
44
47
|
};
|
|
@@ -3,11 +3,11 @@ import * as React from "react";
|
|
|
3
3
|
type DialogProps = React.ComponentProps<typeof Dialog>;
|
|
4
4
|
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
5
5
|
children?: React.ReactNode;
|
|
6
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
6
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
7
7
|
ref?: React.Ref<HTMLDivElement>;
|
|
8
8
|
} & {
|
|
9
9
|
asChild?: boolean;
|
|
10
|
-
}, "asChild" | keyof React.HTMLAttributes<HTMLDivElement
|
|
10
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
11
11
|
label?: string;
|
|
12
12
|
shouldFilter?: boolean;
|
|
13
13
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
@@ -29,45 +29,45 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
29
29
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
30
30
|
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
31
31
|
children?: React.ReactNode;
|
|
32
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
32
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
33
33
|
ref?: React.Ref<HTMLDivElement>;
|
|
34
34
|
} & {
|
|
35
35
|
asChild?: boolean;
|
|
36
|
-
}, "asChild" | keyof React.HTMLAttributes<HTMLDivElement
|
|
36
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
37
37
|
label?: string;
|
|
38
38
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
39
39
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
40
40
|
children?: React.ReactNode;
|
|
41
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
41
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
42
42
|
ref?: React.Ref<HTMLDivElement>;
|
|
43
43
|
} & {
|
|
44
44
|
asChild?: boolean;
|
|
45
|
-
}, "asChild" | keyof React.HTMLAttributes<HTMLDivElement
|
|
45
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
46
46
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
47
47
|
children?: React.ReactNode;
|
|
48
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
48
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
49
49
|
ref?: React.Ref<HTMLDivElement>;
|
|
50
50
|
} & {
|
|
51
51
|
asChild?: boolean;
|
|
52
|
-
}, "asChild" | keyof React.HTMLAttributes<HTMLDivElement
|
|
52
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
|
|
53
53
|
heading?: React.ReactNode;
|
|
54
54
|
value?: string;
|
|
55
55
|
forceMount?: boolean;
|
|
56
56
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
-
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
57
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
58
58
|
ref?: React.Ref<HTMLDivElement>;
|
|
59
59
|
} & {
|
|
60
60
|
asChild?: boolean;
|
|
61
|
-
}, "asChild" | keyof React.HTMLAttributes<HTMLDivElement
|
|
61
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
62
62
|
alwaysRender?: boolean;
|
|
63
63
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
64
64
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
65
65
|
children?: React.ReactNode;
|
|
66
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
66
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
67
67
|
ref?: React.Ref<HTMLDivElement>;
|
|
68
68
|
} & {
|
|
69
69
|
asChild?: boolean;
|
|
70
|
-
}, "asChild" | keyof React.HTMLAttributes<HTMLDivElement
|
|
70
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
|
|
71
71
|
disabled?: boolean;
|
|
72
72
|
onSelect?: (value: string) => void;
|
|
73
73
|
value?: string;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { default as MapLibreGL, PopupOptions, MarkerOptions } from 'maplibre-gl';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
type Theme = "light" | "dark";
|
|
4
|
+
type MapContextValue = {
|
|
5
|
+
map: MapLibreGL.Map | null;
|
|
6
|
+
isLoaded: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare function useMap(): MapContextValue;
|
|
9
|
+
/** Map viewport state */
|
|
10
|
+
type MapViewport = {
|
|
11
|
+
/** Center coordinates [longitude, latitude] */
|
|
12
|
+
center: [number, number];
|
|
13
|
+
/** Zoom level */
|
|
14
|
+
zoom: number;
|
|
15
|
+
/** Bearing (rotation) in degrees */
|
|
16
|
+
bearing: number;
|
|
17
|
+
/** Pitch (tilt) in degrees */
|
|
18
|
+
pitch: number;
|
|
19
|
+
};
|
|
20
|
+
type MapStyleOption = string | MapLibreGL.StyleSpecification;
|
|
21
|
+
type MapRef = MapLibreGL.Map;
|
|
22
|
+
declare const Map: import('react').ForwardRefExoticComponent<{
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
/** Additional CSS classes for the map container */
|
|
25
|
+
className?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Theme for the map. If not provided, automatically detects system preference.
|
|
28
|
+
* Pass your theme value here.
|
|
29
|
+
*/
|
|
30
|
+
theme?: Theme;
|
|
31
|
+
/** Custom map styles for light and dark themes. Overrides the default Carto styles. */
|
|
32
|
+
styles?: {
|
|
33
|
+
light?: MapStyleOption;
|
|
34
|
+
dark?: MapStyleOption;
|
|
35
|
+
};
|
|
36
|
+
/** Map projection type. Use `{ type: "globe" }` for 3D globe view. */
|
|
37
|
+
projection?: MapLibreGL.ProjectionSpecification;
|
|
38
|
+
/**
|
|
39
|
+
* Controlled viewport. When provided with onViewportChange,
|
|
40
|
+
* the map becomes controlled and viewport is driven by this prop.
|
|
41
|
+
*/
|
|
42
|
+
viewport?: Partial<MapViewport>;
|
|
43
|
+
/**
|
|
44
|
+
* Callback fired continuously as the viewport changes (pan, zoom, rotate, pitch).
|
|
45
|
+
* Can be used standalone to observe changes, or with `viewport` prop
|
|
46
|
+
* to enable controlled mode where the map viewport is driven by your state.
|
|
47
|
+
*/
|
|
48
|
+
onViewportChange?: (viewport: MapViewport) => void;
|
|
49
|
+
/** Show a loading indicator on the map */
|
|
50
|
+
loading?: boolean;
|
|
51
|
+
} & Omit<MapLibreGL.MapOptions, "style" | "container"> & import('react').RefAttributes<MapLibreGL.Map>>;
|
|
52
|
+
type MapMarkerProps = {
|
|
53
|
+
/** Longitude coordinate for marker position */
|
|
54
|
+
longitude: number;
|
|
55
|
+
/** Latitude coordinate for marker position */
|
|
56
|
+
latitude: number;
|
|
57
|
+
/** Marker subcomponents (MarkerContent, MarkerPopup, MarkerTooltip, MarkerLabel) */
|
|
58
|
+
children: ReactNode;
|
|
59
|
+
/** Callback when marker is clicked */
|
|
60
|
+
onClick?: (e: MouseEvent) => void;
|
|
61
|
+
/** Callback when mouse enters marker */
|
|
62
|
+
onMouseEnter?: (e: MouseEvent) => void;
|
|
63
|
+
/** Callback when mouse leaves marker */
|
|
64
|
+
onMouseLeave?: (e: MouseEvent) => void;
|
|
65
|
+
/** Callback when marker drag starts (requires draggable: true) */
|
|
66
|
+
onDragStart?: (lngLat: {
|
|
67
|
+
lng: number;
|
|
68
|
+
lat: number;
|
|
69
|
+
}) => void;
|
|
70
|
+
/** Callback during marker drag (requires draggable: true) */
|
|
71
|
+
onDrag?: (lngLat: {
|
|
72
|
+
lng: number;
|
|
73
|
+
lat: number;
|
|
74
|
+
}) => void;
|
|
75
|
+
/** Callback when marker drag ends (requires draggable: true) */
|
|
76
|
+
onDragEnd?: (lngLat: {
|
|
77
|
+
lng: number;
|
|
78
|
+
lat: number;
|
|
79
|
+
}) => void;
|
|
80
|
+
} & Omit<MarkerOptions, "element">;
|
|
81
|
+
declare function MapMarker({ longitude, latitude, children, onClick, onMouseEnter, onMouseLeave, onDragStart, onDrag, onDragEnd, draggable, ...markerOptions }: MapMarkerProps): import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
type MarkerContentProps = {
|
|
83
|
+
/** Custom marker content. Defaults to a blue dot if not provided */
|
|
84
|
+
children?: ReactNode;
|
|
85
|
+
/** Additional CSS classes for the marker container */
|
|
86
|
+
className?: string;
|
|
87
|
+
};
|
|
88
|
+
declare function MarkerContent({ children, className }: MarkerContentProps): import('react').ReactPortal;
|
|
89
|
+
type MarkerPopupProps = {
|
|
90
|
+
/** Popup content */
|
|
91
|
+
children: ReactNode;
|
|
92
|
+
/** Additional CSS classes for the popup container */
|
|
93
|
+
className?: string;
|
|
94
|
+
/** Show a close button in the popup (default: false) */
|
|
95
|
+
closeButton?: boolean;
|
|
96
|
+
} & Omit<PopupOptions, "className" | "closeButton">;
|
|
97
|
+
declare function MarkerPopup({ children, className, closeButton, ...popupOptions }: MarkerPopupProps): import('react').ReactPortal;
|
|
98
|
+
type MarkerTooltipProps = {
|
|
99
|
+
/** Tooltip content */
|
|
100
|
+
children: ReactNode;
|
|
101
|
+
/** Additional CSS classes for the tooltip container */
|
|
102
|
+
className?: string;
|
|
103
|
+
} & Omit<PopupOptions, "className" | "closeButton" | "closeOnClick">;
|
|
104
|
+
declare function MarkerTooltip({ children, className, ...popupOptions }: MarkerTooltipProps): import('react').ReactPortal;
|
|
105
|
+
type MarkerLabelProps = {
|
|
106
|
+
/** Label text content */
|
|
107
|
+
children: ReactNode;
|
|
108
|
+
/** Additional CSS classes for the label */
|
|
109
|
+
className?: string;
|
|
110
|
+
/** Position of the label relative to the marker (default: "top") */
|
|
111
|
+
position?: "top" | "bottom";
|
|
112
|
+
};
|
|
113
|
+
declare function MarkerLabel({ children, className, position, }: MarkerLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
114
|
+
type MapControlsProps = {
|
|
115
|
+
/** Position of the controls on the map (default: "bottom-right") */
|
|
116
|
+
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
117
|
+
/** Show zoom in/out buttons (default: true) */
|
|
118
|
+
showZoom?: boolean;
|
|
119
|
+
/** Show compass button to reset bearing (default: false) */
|
|
120
|
+
showCompass?: boolean;
|
|
121
|
+
/** Show locate button to find user's location (default: false) */
|
|
122
|
+
showLocate?: boolean;
|
|
123
|
+
/** Show fullscreen toggle button (default: false) */
|
|
124
|
+
showFullscreen?: boolean;
|
|
125
|
+
/** Additional CSS classes for the controls container */
|
|
126
|
+
className?: string;
|
|
127
|
+
/** Callback with user coordinates when located */
|
|
128
|
+
onLocate?: (coords: {
|
|
129
|
+
longitude: number;
|
|
130
|
+
latitude: number;
|
|
131
|
+
}) => void;
|
|
132
|
+
};
|
|
133
|
+
declare function MapControls({ position, showZoom, showCompass, showLocate, showFullscreen, className, onLocate, }: MapControlsProps): import("react/jsx-runtime").JSX.Element;
|
|
134
|
+
type MapPopupProps = {
|
|
135
|
+
/** Longitude coordinate for popup position */
|
|
136
|
+
longitude: number;
|
|
137
|
+
/** Latitude coordinate for popup position */
|
|
138
|
+
latitude: number;
|
|
139
|
+
/** Callback when popup is closed */
|
|
140
|
+
onClose?: () => void;
|
|
141
|
+
/** Popup content */
|
|
142
|
+
children: ReactNode;
|
|
143
|
+
/** Additional CSS classes for the popup container */
|
|
144
|
+
className?: string;
|
|
145
|
+
/** Show a close button in the popup (default: false) */
|
|
146
|
+
closeButton?: boolean;
|
|
147
|
+
} & Omit<PopupOptions, "className" | "closeButton">;
|
|
148
|
+
declare function MapPopup({ longitude, latitude, onClose, children, className, closeButton, ...popupOptions }: MapPopupProps): import('react').ReactPortal;
|
|
149
|
+
type MapRouteProps = {
|
|
150
|
+
/** Optional unique identifier for the route layer */
|
|
151
|
+
id?: string;
|
|
152
|
+
/** Array of [longitude, latitude] coordinate pairs defining the route */
|
|
153
|
+
coordinates: [number, number][];
|
|
154
|
+
/** Line color as CSS color value (default: "#4285F4") */
|
|
155
|
+
color?: string;
|
|
156
|
+
/** Line width in pixels (default: 3) */
|
|
157
|
+
width?: number;
|
|
158
|
+
/** Line opacity from 0 to 1 (default: 0.8) */
|
|
159
|
+
opacity?: number;
|
|
160
|
+
/** Dash pattern [dash length, gap length] for dashed lines */
|
|
161
|
+
dashArray?: [number, number];
|
|
162
|
+
/** Callback when the route line is clicked */
|
|
163
|
+
onClick?: () => void;
|
|
164
|
+
/** Callback when mouse enters the route line */
|
|
165
|
+
onMouseEnter?: () => void;
|
|
166
|
+
/** Callback when mouse leaves the route line */
|
|
167
|
+
onMouseLeave?: () => void;
|
|
168
|
+
/** Whether the route is interactive - shows pointer cursor on hover (default: true) */
|
|
169
|
+
interactive?: boolean;
|
|
170
|
+
};
|
|
171
|
+
declare function MapRoute({ id: propId, coordinates, color, width, opacity, dashArray, onClick, onMouseEnter, onMouseLeave, interactive, }: MapRouteProps): null;
|
|
172
|
+
type MapClusterLayerProps<P extends GeoJSON.GeoJsonProperties = GeoJSON.GeoJsonProperties> = {
|
|
173
|
+
/** GeoJSON FeatureCollection data or URL to fetch GeoJSON from */
|
|
174
|
+
data: string | GeoJSON.FeatureCollection<GeoJSON.Point, P>;
|
|
175
|
+
/** Maximum zoom level to cluster points on (default: 14) */
|
|
176
|
+
clusterMaxZoom?: number;
|
|
177
|
+
/** Radius of each cluster when clustering points in pixels (default: 50) */
|
|
178
|
+
clusterRadius?: number;
|
|
179
|
+
/** Colors for cluster circles: [small, medium, large] based on point count (default: ["#22c55e", "#eab308", "#ef4444"]) */
|
|
180
|
+
clusterColors?: [string, string, string];
|
|
181
|
+
/** Point count thresholds for color/size steps: [medium, large] (default: [100, 750]) */
|
|
182
|
+
clusterThresholds?: [number, number];
|
|
183
|
+
/** Color for unclustered individual points (default: "#3b82f6") */
|
|
184
|
+
pointColor?: string;
|
|
185
|
+
/** Callback when an unclustered point is clicked */
|
|
186
|
+
onPointClick?: (feature: GeoJSON.Feature<GeoJSON.Point, P>, coordinates: [number, number]) => void;
|
|
187
|
+
/** Callback when a cluster is clicked. If not provided, zooms into the cluster */
|
|
188
|
+
onClusterClick?: (clusterId: number, coordinates: [number, number], pointCount: number) => void;
|
|
189
|
+
};
|
|
190
|
+
declare function MapClusterLayer<P extends GeoJSON.GeoJsonProperties = GeoJSON.GeoJsonProperties>({ data, clusterMaxZoom, clusterRadius, clusterColors, clusterThresholds, pointColor, onPointClick, onClusterClick, }: MapClusterLayerProps<P>): null;
|
|
191
|
+
export { Map, useMap, MapMarker, MarkerContent, MarkerPopup, MarkerTooltip, MarkerLabel, MapPopup, MapControls, MapRoute, MapClusterLayer, };
|
|
192
|
+
export type { MapRef, MapViewport };
|
package/dist/input-otp.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "react";
|
|
3
3
|
import { OTPInput as m, OTPInputContext as u } from "input-otp";
|
|
4
4
|
import { Dot as f } from "lucide-react";
|
|
5
5
|
import { cn as n } from "./utils.mjs";
|
|
6
|
-
const x = a.forwardRef(({ className: e, containerClassName:
|
|
6
|
+
const x = a.forwardRef(({ className: e, containerClassName: r, ...o }, s) => /* @__PURE__ */ t(
|
|
7
7
|
m,
|
|
8
8
|
{
|
|
9
9
|
ref: s,
|
|
10
10
|
containerClassName: n(
|
|
11
11
|
"flex items-center gap-2 has-[:disabled]:opacity-50",
|
|
12
|
-
|
|
12
|
+
r
|
|
13
13
|
),
|
|
14
14
|
className: n("disabled:cursor-not-allowed", e),
|
|
15
15
|
...o
|
|
16
16
|
}
|
|
17
17
|
));
|
|
18
18
|
x.displayName = "InputOTP";
|
|
19
|
-
const O = a.forwardRef(({ className: e, ...
|
|
19
|
+
const O = a.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t("div", { ref: o, className: n("flex items-center", e), ...r }));
|
|
20
20
|
O.displayName = "InputOTPGroup";
|
|
21
|
-
const P = a.forwardRef(({ index: e, className:
|
|
21
|
+
const P = a.forwardRef(({ index: e, className: r, ...o }, s) => {
|
|
22
22
|
const i = a.useContext(u), { char: d, hasFakeCaret: l, isActive: p } = i.slots[e];
|
|
23
23
|
return /* @__PURE__ */ c(
|
|
24
24
|
"div",
|
|
@@ -26,19 +26,19 @@ const P = a.forwardRef(({ index: e, className: t, ...o }, s) => {
|
|
|
26
26
|
ref: s,
|
|
27
27
|
className: n(
|
|
28
28
|
"relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
|
|
29
|
-
p && "z-10 ring
|
|
30
|
-
|
|
29
|
+
p && "z-10 border-ring ring-3 ring-ring/50",
|
|
30
|
+
r
|
|
31
31
|
),
|
|
32
32
|
...o,
|
|
33
33
|
children: [
|
|
34
34
|
d,
|
|
35
|
-
l && /* @__PURE__ */
|
|
35
|
+
l && /* @__PURE__ */ t("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ t("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
36
36
|
]
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
});
|
|
40
40
|
P.displayName = "InputOTPSlot";
|
|
41
|
-
const T = a.forwardRef(({ ...e },
|
|
41
|
+
const T = a.forwardRef(({ ...e }, r) => /* @__PURE__ */ t("div", { ref: r, role: "separator", ...e, children: /* @__PURE__ */ t(f, {}) }));
|
|
42
42
|
T.displayName = "InputOTPSeparator";
|
|
43
43
|
export {
|
|
44
44
|
x as InputOTP,
|
package/dist/input.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as n from "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
5
|
-
({ className: e, type: r, ...o },
|
|
3
|
+
import { cn as d } from "./utils.mjs";
|
|
4
|
+
const l = n.forwardRef(
|
|
5
|
+
({ className: e, type: r, ...o }, i) => /* @__PURE__ */ t(
|
|
6
6
|
"input",
|
|
7
7
|
{
|
|
8
8
|
type: r,
|
|
9
|
-
className:
|
|
10
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base
|
|
9
|
+
className: d(
|
|
10
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
11
11
|
e
|
|
12
12
|
),
|
|
13
|
-
ref:
|
|
13
|
+
ref: i,
|
|
14
14
|
...o
|
|
15
15
|
}
|
|
16
16
|
)
|
|
17
17
|
);
|
|
18
|
-
|
|
18
|
+
l.displayName = "Input";
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
l as Input
|
|
21
21
|
};
|