@deftui/addons 0.1.2 → 0.1.4

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 (31) hide show
  1. package/dist/form.d.mts +2 -13
  2. package/dist/form.mjs +2 -13
  3. package/dist/map.d.mts +30 -0
  4. package/dist/map.mjs +18 -0
  5. package/dist/maplibregl/map.d.mts +388 -0
  6. package/dist/maplibregl/map.mjs +1641 -0
  7. package/dist/node_modules/.bun/@types_geojson@7946.0.16/node_modules/@types/geojson/index.d.mts +174 -0
  8. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/Icon.mjs +37 -0
  9. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/context.mjs +12 -0
  10. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/createLucideIcon.mjs +23 -0
  11. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/loader-circle.mjs +20 -0
  12. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/locate.mjs +51 -0
  13. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/maximize.mjs +33 -0
  14. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/minus.mjs +19 -0
  15. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/plus.mjs +22 -0
  16. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/x.mjs +22 -0
  17. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs +22 -0
  18. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs +57 -0
  19. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.mjs +19 -0
  20. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs +12 -0
  21. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs +11 -0
  22. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs +22 -0
  23. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs +9 -0
  24. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs +18 -0
  25. package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs +13 -0
  26. package/dist/react-hook-form/field.d.mts +11 -6
  27. package/dist/react-hook-form/field.mjs +3 -4
  28. package/dist/react-hook-form/form.d.mts +1 -1
  29. package/dist/react-hook-form/form.mjs +1 -1
  30. package/dist/styles.css +21 -0
  31. package/package.json +18 -9
@@ -0,0 +1,174 @@
1
+ /**
2
+ * The value values for the "type" property of GeoJSON Objects.
3
+ * https://tools.ietf.org/html/rfc7946#section-1.4
4
+ */
5
+ export type GeoJsonTypes = GeoJSON["type"];
6
+ /**
7
+ * Bounding box
8
+ * https://tools.ietf.org/html/rfc7946#section-5
9
+ */
10
+ export type BBox = [number, number, number, number] | [number, number, number, number, number, number];
11
+ /**
12
+ * A Position is an array of coordinates.
13
+ * https://tools.ietf.org/html/rfc7946#section-3.1.1
14
+ * Array should contain between two and three elements.
15
+ * The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),
16
+ * but the current specification only allows X, Y, and (optionally) Z to be defined.
17
+ *
18
+ * Note: the type will not be narrowed down to `[number, number] | [number, number, number]` due to
19
+ * marginal benefits and the large impact of breaking change.
20
+ *
21
+ * See previous discussions on the type narrowing:
22
+ * - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21590|Nov 2017}
23
+ * - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/67773|Dec 2023}
24
+ * - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/71441| Dec 2024}
25
+ *
26
+ * One can use a
27
+ * {@link https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates|user-defined type guard that returns a type predicate}
28
+ * to determine if a position is a 2D or 3D position.
29
+ *
30
+ * @example
31
+ * import type { Position } from 'geojson';
32
+ *
33
+ * type StrictPosition = [x: number, y: number] | [x: number, y: number, z: number]
34
+ *
35
+ * function isStrictPosition(position: Position): position is StrictPosition {
36
+ * return position.length === 2 || position.length === 3
37
+ * };
38
+ *
39
+ * let position: Position = [-116.91, 45.54];
40
+ *
41
+ * let x: number;
42
+ * let y: number;
43
+ * let z: number | undefined;
44
+ *
45
+ * if (isStrictPosition(position)) {
46
+ * // `tsc` would throw an error if we tried to destructure a fourth parameter
47
+ * [x, y, z] = position;
48
+ * } else {
49
+ * throw new TypeError("Position is not a 2D or 3D point");
50
+ * }
51
+ */
52
+ export type Position = number[];
53
+ /**
54
+ * The base GeoJSON object.
55
+ * https://tools.ietf.org/html/rfc7946#section-3
56
+ * The GeoJSON specification also allows foreign members
57
+ * (https://tools.ietf.org/html/rfc7946#section-6.1)
58
+ * Developers should use "&" type in TypeScript or extend the interface
59
+ * to add these foreign members.
60
+ */
61
+ export interface GeoJsonObject {
62
+ // Don't include foreign members directly into this type def.
63
+ // in order to preserve type safety.
64
+ // [key: string]: any;
65
+ /**
66
+ * Specifies the type of GeoJSON object.
67
+ */
68
+ type: GeoJsonTypes;
69
+ /**
70
+ * Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.
71
+ * The value of the bbox member is an array of length 2*n where n is the number of dimensions
72
+ * represented in the contained geometries, with all axes of the most southwesterly point
73
+ * followed by all axes of the more northeasterly point.
74
+ * The axes order of a bbox follows the axes order of geometries.
75
+ * https://tools.ietf.org/html/rfc7946#section-5
76
+ */
77
+ bbox?: BBox | undefined;
78
+ }
79
+ /**
80
+ * Union of GeoJSON objects.
81
+ */
82
+ export type GeoJSON<G extends Geometry | null = Geometry, P = GeoJsonProperties> = G | Feature<G, P> | FeatureCollection<G, P>;
83
+ /**
84
+ * Geometry object.
85
+ * https://tools.ietf.org/html/rfc7946#section-3
86
+ */
87
+ export type Geometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | GeometryCollection;
88
+ /**
89
+ * Point geometry object.
90
+ * https://tools.ietf.org/html/rfc7946#section-3.1.2
91
+ */
92
+ export interface Point extends GeoJsonObject {
93
+ type: "Point";
94
+ coordinates: Position;
95
+ }
96
+ /**
97
+ * MultiPoint geometry object.
98
+ * https://tools.ietf.org/html/rfc7946#section-3.1.3
99
+ */
100
+ export interface MultiPoint extends GeoJsonObject {
101
+ type: "MultiPoint";
102
+ coordinates: Position[];
103
+ }
104
+ /**
105
+ * LineString geometry object.
106
+ * https://tools.ietf.org/html/rfc7946#section-3.1.4
107
+ */
108
+ export interface LineString extends GeoJsonObject {
109
+ type: "LineString";
110
+ coordinates: Position[];
111
+ }
112
+ /**
113
+ * MultiLineString geometry object.
114
+ * https://tools.ietf.org/html/rfc7946#section-3.1.5
115
+ */
116
+ export interface MultiLineString extends GeoJsonObject {
117
+ type: "MultiLineString";
118
+ coordinates: Position[][];
119
+ }
120
+ /**
121
+ * Polygon geometry object.
122
+ * https://tools.ietf.org/html/rfc7946#section-3.1.6
123
+ */
124
+ export interface Polygon extends GeoJsonObject {
125
+ type: "Polygon";
126
+ coordinates: Position[][];
127
+ }
128
+ /**
129
+ * MultiPolygon geometry object.
130
+ * https://tools.ietf.org/html/rfc7946#section-3.1.7
131
+ */
132
+ export interface MultiPolygon extends GeoJsonObject {
133
+ type: "MultiPolygon";
134
+ coordinates: Position[][][];
135
+ }
136
+ /**
137
+ * Geometry Collection
138
+ * https://tools.ietf.org/html/rfc7946#section-3.1.8
139
+ */
140
+ export interface GeometryCollection<G extends Geometry = Geometry> extends GeoJsonObject {
141
+ type: "GeometryCollection";
142
+ geometries: G[];
143
+ }
144
+ export type GeoJsonProperties = {
145
+ [name: string]: any;
146
+ } | null;
147
+ /**
148
+ * A feature object which contains a geometry and associated properties.
149
+ * https://tools.ietf.org/html/rfc7946#section-3.2
150
+ */
151
+ export interface Feature<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject {
152
+ type: "Feature";
153
+ /**
154
+ * The feature's geometry
155
+ */
156
+ geometry: G;
157
+ /**
158
+ * A value that uniquely identifies this feature in a
159
+ * https://tools.ietf.org/html/rfc7946#section-3.2.
160
+ */
161
+ id?: string | number | undefined;
162
+ /**
163
+ * Properties associated with this feature.
164
+ */
165
+ properties: P;
166
+ }
167
+ /**
168
+ * A collection of feature objects.
169
+ * https://tools.ietf.org/html/rfc7946#section-3.3
170
+ */
171
+ export interface FeatureCollection<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject {
172
+ type: "FeatureCollection";
173
+ features: Array<Feature<G, P>>;
174
+ }
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { mergeClasses } from "./shared/src/utils/mergeClasses.mjs";
3
+ import buildLucideIconForReact from "./shared/src/build/buildLucideIconForReact.mjs";
4
+ import { hasA11yProp } from "./shared/src/utils/hasA11yProp.mjs";
5
+ import { useLucideContext } from "./context.mjs";
6
+ import { createElement, forwardRef } from "react";
7
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/Icon.mjs
8
+ /**
9
+ * @license lucide-react v1.66.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */
14
+ const Icon = forwardRef(({ color, size, width, height, strokeWidth, absoluteStrokeWidth, nonScalingStroke, className = "", children, iconNode = [], icon = {
15
+ node: iconNode,
16
+ aliases: [],
17
+ size: 24
18
+ }, ...rest }, ref) => {
19
+ const { size: contextSize = 24, strokeWidth: contextStrokeWidth = 2, absoluteStrokeWidth: contextAbsoluteStrokeWidth = false, nonScalingStroke: contextNonScalingStroke = false, color: contextColor = "currentColor", className: contextClass = "" } = useLucideContext() ?? {};
20
+ const hasAccessibleProp = Boolean(children) || hasA11yProp(rest);
21
+ const [name, svgAttributes, builtIconNode = []] = buildLucideIconForReact(icon, {
22
+ color: color ?? contextColor,
23
+ width: width ?? size ?? contextSize,
24
+ height: height ?? size ?? contextSize,
25
+ strokeWidth: strokeWidth ?? contextStrokeWidth,
26
+ absoluteStrokeWidth: absoluteStrokeWidth ?? contextAbsoluteStrokeWidth,
27
+ nonScalingStroke: nonScalingStroke ?? contextNonScalingStroke,
28
+ className: mergeClasses(contextClass, className),
29
+ hasA11yProp: hasAccessibleProp,
30
+ attributes: rest
31
+ });
32
+ return createElement(name, {
33
+ ref,
34
+ ...svgAttributes
35
+ }, [...builtIconNode.map(([tag, attrs]) => createElement(tag, attrs)), ...Array.isArray(children) ? children : [children]]);
36
+ });
37
+ export { Icon as default };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { createContext, useContext } from "react";
3
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/context.mjs
4
+ /**
5
+ * @license lucide-react v1.66.0 - ISC
6
+ *
7
+ * This source code is licensed under the ISC license.
8
+ * See the LICENSE file in the root directory of this source tree.
9
+ */
10
+ const LucideContext = createContext({});
11
+ const useLucideContext = () => useContext(LucideContext);
12
+ export { useLucideContext };
@@ -0,0 +1,23 @@
1
+ import { toLucideIconData } from "./shared/src/utils/toLucideIconData.mjs";
2
+ import { toPascalCase } from "./shared/src/utils/toPascalCase.mjs";
3
+ import Icon from "./Icon.mjs";
4
+ import { createElement, forwardRef } from "react";
5
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/createLucideIcon.mjs
6
+ /**
7
+ * @license lucide-react v1.66.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */
12
+ function createLucideIcon(iconDataOrName, iconNode = [], aliases = []) {
13
+ const iconData = typeof iconDataOrName === "string" ? toLucideIconData(iconDataOrName, iconNode, aliases) : iconDataOrName;
14
+ const Component = forwardRef(({ className, ...props }, ref) => createElement(Icon, {
15
+ ref,
16
+ icon: iconData,
17
+ className,
18
+ ...props
19
+ }));
20
+ if (iconData.name) Component.displayName = toPascalCase(iconData.name);
21
+ return Component;
22
+ }
23
+ export { createLucideIcon as default };
@@ -0,0 +1,20 @@
1
+ import createLucideIcon from "../createLucideIcon.mjs";
2
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/loader-circle.mjs
3
+ /**
4
+ * @license lucide-react v1.66.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+ const __iconData = {
10
+ name: "loader-circle",
11
+ size: 24,
12
+ node: [["path", {
13
+ d: "M21 12a9 9 0 1 1-6.219-8.56",
14
+ key: "13zald"
15
+ }]],
16
+ aliases: ["loader-2"]
17
+ };
18
+ __iconData.node;
19
+ const LoaderCircle = createLucideIcon(__iconData);
20
+ export { __iconData, LoaderCircle as default };
@@ -0,0 +1,51 @@
1
+ import createLucideIcon from "../createLucideIcon.mjs";
2
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/locate.mjs
3
+ /**
4
+ * @license lucide-react v1.66.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+ const __iconData = {
10
+ name: "locate",
11
+ size: 24,
12
+ node: [
13
+ ["line", {
14
+ x1: "2",
15
+ x2: "5",
16
+ y1: "12",
17
+ y2: "12",
18
+ key: "bvdh0s"
19
+ }],
20
+ ["line", {
21
+ x1: "19",
22
+ x2: "22",
23
+ y1: "12",
24
+ y2: "12",
25
+ key: "1tbv5k"
26
+ }],
27
+ ["line", {
28
+ x1: "12",
29
+ x2: "12",
30
+ y1: "2",
31
+ y2: "5",
32
+ key: "11lu5j"
33
+ }],
34
+ ["line", {
35
+ x1: "12",
36
+ x2: "12",
37
+ y1: "19",
38
+ y2: "22",
39
+ key: "x3vr5v"
40
+ }],
41
+ ["circle", {
42
+ cx: "12",
43
+ cy: "12",
44
+ r: "7",
45
+ key: "fim9np"
46
+ }]
47
+ ]
48
+ };
49
+ __iconData.node;
50
+ const Locate = createLucideIcon(__iconData);
51
+ export { __iconData, Locate as default };
@@ -0,0 +1,33 @@
1
+ import createLucideIcon from "../createLucideIcon.mjs";
2
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/maximize.mjs
3
+ /**
4
+ * @license lucide-react v1.66.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+ const __iconData = {
10
+ name: "maximize",
11
+ size: 24,
12
+ node: [
13
+ ["path", {
14
+ d: "M8 3H5a2 2 0 0 0-2 2v3",
15
+ key: "1dcmit"
16
+ }],
17
+ ["path", {
18
+ d: "M21 8V5a2 2 0 0 0-2-2h-3",
19
+ key: "1e4gt3"
20
+ }],
21
+ ["path", {
22
+ d: "M3 16v3a2 2 0 0 0 2 2h3",
23
+ key: "wsl5sc"
24
+ }],
25
+ ["path", {
26
+ d: "M16 21h3a2 2 0 0 0 2-2v-3",
27
+ key: "18trek"
28
+ }]
29
+ ]
30
+ };
31
+ __iconData.node;
32
+ const Maximize = createLucideIcon(__iconData);
33
+ export { __iconData, Maximize as default };
@@ -0,0 +1,19 @@
1
+ import createLucideIcon from "../createLucideIcon.mjs";
2
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/minus.mjs
3
+ /**
4
+ * @license lucide-react v1.66.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+ const __iconData = {
10
+ name: "minus",
11
+ size: 24,
12
+ node: [["path", {
13
+ d: "M5 12h14",
14
+ key: "1ays0h"
15
+ }]]
16
+ };
17
+ __iconData.node;
18
+ const Minus = createLucideIcon(__iconData);
19
+ export { __iconData, Minus as default };
@@ -0,0 +1,22 @@
1
+ import createLucideIcon from "../createLucideIcon.mjs";
2
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/plus.mjs
3
+ /**
4
+ * @license lucide-react v1.66.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+ const __iconData = {
10
+ name: "plus",
11
+ size: 24,
12
+ node: [["path", {
13
+ d: "M5 12h14",
14
+ key: "1ays0h"
15
+ }], ["path", {
16
+ d: "M12 5v14",
17
+ key: "s699le"
18
+ }]]
19
+ };
20
+ __iconData.node;
21
+ const Plus = createLucideIcon(__iconData);
22
+ export { __iconData, Plus as default };
@@ -0,0 +1,22 @@
1
+ import createLucideIcon from "../createLucideIcon.mjs";
2
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/x.mjs
3
+ /**
4
+ * @license lucide-react v1.66.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+ const __iconData = {
10
+ name: "x",
11
+ size: 24,
12
+ node: [["path", {
13
+ d: "M18 6 6 18",
14
+ key: "1bl5f8"
15
+ }], ["path", {
16
+ d: "m6 6 12 12",
17
+ key: "d8bk6v"
18
+ }]]
19
+ };
20
+ __iconData.node;
21
+ const X = createLucideIcon(__iconData);
22
+ export { __iconData, X as default };
@@ -0,0 +1,22 @@
1
+ import buildLucideIconNode from "./buildLucideIconNode.mjs";
2
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs
3
+ /**
4
+ * @license lucide-react v1.66.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+ function buildLucideIconForReact(icon, params = {}) {
10
+ return buildLucideIconNode(icon, {
11
+ ...params,
12
+ attributeNames: {
13
+ ...params.attributeNames,
14
+ class: "className",
15
+ "stroke-width": "strokeWidth",
16
+ "stroke-linecap": "strokeLinecap",
17
+ "stroke-linejoin": "strokeLinejoin",
18
+ "vector-effect": "vectorEffect"
19
+ }
20
+ });
21
+ }
22
+ export { buildLucideIconForReact as default };
@@ -0,0 +1,57 @@
1
+ import { mergeClasses } from "../utils/mergeClasses.mjs";
2
+ import defaultAttributes from "./defaultAttributes.mjs";
3
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs
4
+ /**
5
+ * @license lucide-react v1.66.0 - ISC
6
+ *
7
+ * This source code is licensed under the ISC license.
8
+ * See the LICENSE file in the root directory of this source tree.
9
+ */
10
+ function isDefined(value) {
11
+ return value !== null && value !== void 0;
12
+ }
13
+ function buildLucideIconNode(icon, params = {}) {
14
+ const attributeNames = params.attributeNames ?? {};
15
+ const getAttributeName = (attributeName) => attributeNames[attributeName] ?? attributeName;
16
+ const viewBoxWidth = icon.size ?? icon.width ?? defaultAttributes["width"];
17
+ const viewBoxHeight = icon.size ?? icon.height ?? defaultAttributes["height"];
18
+ const aliasClassNames = icon.aliases?.filter((alias) => typeof alias === "string" && alias.trim() !== "").map((alias) => `lucide-${alias}`) ?? [];
19
+ const iconClassNames = [...icon.name ? [`lucide-${icon.name}`] : [], ...aliasClassNames];
20
+ const classNamesFromClassName = params.className?.split(" ").filter(Boolean) ?? [];
21
+ const className = params.includeDefaultClasses === false ? mergeClasses(...classNamesFromClassName) : mergeClasses("lucide", ...iconClassNames, ...classNamesFromClassName);
22
+ const calculatedStrokeWidth = params.absoluteStrokeWidth ? Number(params.strokeWidth ?? defaultAttributes["stroke-width"]) * Number(icon.size ?? icon.width ?? defaultAttributes["width"]) / Number(params.size ?? params.width ?? defaultAttributes["width"]) : params.strokeWidth ?? defaultAttributes["stroke-width"];
23
+ return [
24
+ "svg",
25
+ {
26
+ ...Object.entries(defaultAttributes).reduce((attrs, [attrName, value]) => {
27
+ attrs[getAttributeName(attrName)] = value;
28
+ return attrs;
29
+ }, {}),
30
+ ..."color" in params && params.color && { [getAttributeName("stroke")]: params.color },
31
+ ..."size" in params && isDefined(params.size) && {
32
+ [getAttributeName("width")]: params.size,
33
+ [getAttributeName("height")]: params.size
34
+ },
35
+ ..."width" in params && isDefined(params.width) && { [getAttributeName("width")]: params.width },
36
+ ..."height" in params && isDefined(params.height) && { [getAttributeName("height")]: params.height },
37
+ [getAttributeName("stroke-width")]: calculatedStrokeWidth,
38
+ ...className && { [getAttributeName("class")]: className },
39
+ [getAttributeName("viewBox")]: `0 0 ${viewBoxWidth} ${viewBoxHeight}`,
40
+ ...params.hasA11yProp === false ? { [getAttributeName("aria-hidden")]: "true" } : {},
41
+ ..."attributes" in params && params.attributes
42
+ },
43
+ icon.node.map((child) => {
44
+ const [name, attrs, children] = child;
45
+ const nextAttrs = params.nonScalingStroke ? {
46
+ [getAttributeName("vector-effect")]: "non-scaling-stroke",
47
+ ...attrs
48
+ } : attrs;
49
+ return children ? [
50
+ name,
51
+ nextAttrs,
52
+ children
53
+ ] : [name, nextAttrs];
54
+ })
55
+ ];
56
+ }
57
+ export { buildLucideIconNode as default };
@@ -0,0 +1,19 @@
1
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.mjs
2
+ /**
3
+ * @license lucide-react v1.66.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const defaultAttributes = {
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ width: 24,
11
+ height: 24,
12
+ viewBox: "0 0 24 24",
13
+ fill: "none",
14
+ stroke: "currentColor",
15
+ "stroke-width": 2,
16
+ "stroke-linecap": "round",
17
+ "stroke-linejoin": "round"
18
+ };
19
+ export { defaultAttributes as default };
@@ -0,0 +1,12 @@
1
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs
2
+ /**
3
+ * @license lucide-react v1.66.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const hasA11yProp = (props) => {
9
+ for (const prop in props) if (prop.startsWith("aria-") || prop === "role" || prop === "title") return true;
10
+ return false;
11
+ };
12
+ export { hasA11yProp };
@@ -0,0 +1,11 @@
1
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
2
+ /**
3
+ * @license lucide-react v1.66.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const mergeClasses = (...classes) => classes.filter((className, index, array) => {
9
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
10
+ }).join(" ").trim();
11
+ export { mergeClasses };
@@ -0,0 +1,22 @@
1
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
2
+ /**
3
+ * @license lucide-react v1.66.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const toCamelCase = (string) => {
9
+ let out = "";
10
+ let upperNext = false;
11
+ for (const ch of string) {
12
+ if (ch === "-" || ch === "_" || ch <= " ") {
13
+ upperNext = out.length > 0;
14
+ continue;
15
+ }
16
+ if (out.length === 0) out += ch.toLowerCase();
17
+ else out += upperNext ? ch.toUpperCase() : ch;
18
+ upperNext = false;
19
+ }
20
+ return out;
21
+ };
22
+ export { toCamelCase };
@@ -0,0 +1,9 @@
1
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
2
+ /**
3
+ * @license lucide-react v1.66.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const toKebabCase = (string) => string?.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
9
+ export { toKebabCase };
@@ -0,0 +1,18 @@
1
+ import { toKebabCase } from "./toKebabCase.mjs";
2
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs
3
+ /**
4
+ * @license lucide-react v1.66.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+ function toLucideIconData(iconName, iconNode, aliases = []) {
10
+ if (iconNode == null) throw new Error("[lucide]: iconNode is required when icon name is used");
11
+ return {
12
+ name: toKebabCase(iconName),
13
+ size: 24,
14
+ node: iconNode,
15
+ ...aliases.length > 0 ? { aliases } : {}
16
+ };
17
+ }
18
+ export { toLucideIconData };
@@ -0,0 +1,13 @@
1
+ import { toCamelCase } from "./toCamelCase.mjs";
2
+ // ../../node_modules/.bun/lucide-react@1.66.0+c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs
3
+ /**
4
+ * @license lucide-react v1.66.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+ const toPascalCase = (string) => {
10
+ const camelCase = toCamelCase(string);
11
+ return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
12
+ };
13
+ export { toPascalCase };
@@ -1,19 +1,24 @@
1
1
  import React from "react";
2
- import { Field } from "@deftui/react";
3
2
  import { FieldPath, FieldValues, UseControllerProps, UseControllerReturn } from "react-hook-form";
4
- type FieldStateKeys = "name" | "disabled" | "invalid" | "dirty" | "touched";
5
- type FieldValidKeys = "validate" | "validationMode" | "validationDebounceTime";
6
- type FieldRootProps = Omit<React.ComponentProps<typeof Field>, FieldStateKeys | FieldValidKeys | "children">;
7
3
  interface ControlProps {
8
4
  "id": string;
9
5
  "aria-invalid": boolean;
10
6
  "aria-describedby": string | undefined;
11
7
  }
12
8
  interface RHFFieldProps<Values extends FieldValues, Name extends FieldPath<Values> = FieldPath<Values>, Output = Values> extends UseControllerProps<Values, Name, Output> {
9
+ /** Label associated with the control's ID. */
13
10
  label?: React.ReactNode;
11
+ /** Supporting text referenced by the control's aria-describedby. */
14
12
  description?: React.ReactNode;
15
- fieldProps?: FieldRootProps;
16
- /** A single non-fragment element receives control props automatically; spread them manually for nested controls. */
13
+ /**
14
+ * Injects id, aria-invalid, and aria-describedby into a single non-Fragment element returned by children.
15
+ *
16
+ * Set to false for wrapper elements or when binding `controlProps` to an inner control manually.
17
+ *
18
+ * @default true
19
+ */
20
+ injectControlProps?: boolean;
21
+ /** Callback with `useController` states and `controllerProps` for rendering JSX. */
17
22
  children: (state: UseControllerReturn<Values, Name>, controlProps: ControlProps) => React.ReactNode;
18
23
  }
19
24
  export declare function RHFField<T extends FieldValues, Name extends FieldPath<T>, Output = T>(props: RHFFieldProps<T, Name, Output>): React.JSX.Element;