@forgedevstack/bear 1.0.8 → 1.1.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.
Files changed (227) hide show
  1. package/README.md +11 -1
  2. package/dist/components/ActivityItem/ActivityItem.cjs +1 -1
  3. package/dist/components/ActivityItem/ActivityItem.js +1 -0
  4. package/dist/components/Alert/Alert.const.cjs +1 -1
  5. package/dist/components/Alert/Alert.const.js +3 -2
  6. package/dist/components/AppBar/AppBar.cjs +1 -1
  7. package/dist/components/AppBar/AppBar.js +3 -2
  8. package/dist/components/Badge/Badge.cjs +1 -1
  9. package/dist/components/Badge/Badge.js +15 -14
  10. package/dist/components/BearLogo/EmberLogo.cjs +1 -1
  11. package/dist/components/BearLogo/EmberLogo.js +3 -2
  12. package/dist/components/BottomNavigation/BottomNavigation.cjs +1 -1
  13. package/dist/components/BottomNavigation/BottomNavigation.js +3 -2
  14. package/dist/components/Button/Button.cjs +1 -1
  15. package/dist/components/Button/Button.js +56 -55
  16. package/dist/components/Button/Button.types.d.ts +7 -0
  17. package/dist/components/Carousel/Carousel.cjs +1 -1
  18. package/dist/components/Carousel/Carousel.const.cjs +1 -0
  19. package/dist/components/Carousel/Carousel.const.d.ts +12 -0
  20. package/dist/components/Carousel/Carousel.const.js +9 -0
  21. package/dist/components/Carousel/Carousel.d.ts +14 -3
  22. package/dist/components/Carousel/Carousel.js +222 -75
  23. package/dist/components/Carousel/Carousel.types.d.ts +32 -2
  24. package/dist/components/Carousel/index.d.ts +1 -1
  25. package/dist/components/Chip/Chip.cjs +1 -1
  26. package/dist/components/Chip/Chip.js +3 -2
  27. package/dist/components/CodeEditor/CodeEditor.cjs +5 -0
  28. package/dist/components/CodeEditor/CodeEditor.const.cjs +1 -0
  29. package/dist/components/CodeEditor/CodeEditor.const.d.ts +21 -0
  30. package/dist/components/CodeEditor/CodeEditor.const.js +119 -0
  31. package/dist/components/CodeEditor/CodeEditor.d.ts +22 -0
  32. package/dist/components/CodeEditor/CodeEditor.js +250 -0
  33. package/dist/components/CodeEditor/CodeEditor.types.d.ts +80 -0
  34. package/dist/components/CodeEditor/CodeEditor.utils.cjs +1 -0
  35. package/dist/components/CodeEditor/CodeEditor.utils.d.ts +6 -0
  36. package/dist/components/CodeEditor/CodeEditor.utils.js +75 -0
  37. package/dist/components/CodeEditor/index.d.ts +2 -0
  38. package/dist/components/Columns/Columns.cjs +1 -1
  39. package/dist/components/Columns/Columns.js +9 -8
  40. package/dist/components/CountdownTimer/CountdownTimer.cjs +1 -0
  41. package/dist/components/CountdownTimer/CountdownTimer.const.cjs +1 -0
  42. package/dist/components/CountdownTimer/CountdownTimer.const.d.ts +27 -0
  43. package/dist/components/CountdownTimer/CountdownTimer.const.js +35 -0
  44. package/dist/components/CountdownTimer/CountdownTimer.d.ts +7 -0
  45. package/dist/components/CountdownTimer/CountdownTimer.js +115 -0
  46. package/dist/components/CountdownTimer/CountdownTimer.types.d.ts +56 -0
  47. package/dist/components/CountdownTimer/index.d.ts +2 -0
  48. package/dist/components/Cropper/Cropper.cjs +1 -0
  49. package/dist/components/Cropper/Cropper.const.cjs +1 -0
  50. package/dist/components/Cropper/Cropper.const.d.ts +31 -0
  51. package/dist/components/Cropper/Cropper.const.js +33 -0
  52. package/dist/components/Cropper/Cropper.d.ts +21 -0
  53. package/dist/components/Cropper/Cropper.js +362 -0
  54. package/dist/components/Cropper/Cropper.types.d.ts +72 -0
  55. package/dist/components/Cropper/index.d.ts +2 -0
  56. package/dist/components/DataTable/DataTable.cjs +1 -1
  57. package/dist/components/DataTable/DataTable.js +5 -4
  58. package/dist/components/Divider/Divider.cjs +1 -1
  59. package/dist/components/Divider/Divider.js +15 -14
  60. package/dist/components/Dock/Dock.cjs +1 -0
  61. package/dist/components/Dock/Dock.const.cjs +1 -0
  62. package/dist/components/Dock/Dock.const.d.ts +25 -0
  63. package/dist/components/Dock/Dock.const.js +22 -0
  64. package/dist/components/Dock/Dock.d.ts +7 -0
  65. package/dist/components/Dock/Dock.js +144 -0
  66. package/dist/components/Dock/Dock.types.d.ts +42 -0
  67. package/dist/components/Dock/index.d.ts +2 -0
  68. package/dist/components/EmptyState/EmptyState.cjs +1 -1
  69. package/dist/components/EmptyState/EmptyState.js +7 -6
  70. package/dist/components/FileTree/FileTree.cjs +1 -0
  71. package/dist/components/FileTree/FileTree.d.ts +3 -0
  72. package/dist/components/FileTree/FileTree.js +46 -0
  73. package/dist/components/FileTree/FileTree.types.d.ts +30 -0
  74. package/dist/components/FileTree/index.d.ts +2 -0
  75. package/dist/components/GradientText/GradientText.cjs +1 -0
  76. package/dist/components/GradientText/GradientText.const.cjs +1 -0
  77. package/dist/components/GradientText/GradientText.const.d.ts +15 -0
  78. package/dist/components/GradientText/GradientText.const.js +36 -0
  79. package/dist/components/GradientText/GradientText.d.ts +7 -0
  80. package/dist/components/GradientText/GradientText.js +52 -0
  81. package/dist/components/GradientText/GradientText.types.d.ts +27 -0
  82. package/dist/components/GradientText/index.d.ts +2 -0
  83. package/dist/components/Highlight/Highlight.cjs +1 -1
  84. package/dist/components/Highlight/Highlight.const.cjs +1 -0
  85. package/dist/components/Highlight/Highlight.const.d.ts +8 -0
  86. package/dist/components/Highlight/Highlight.const.js +15 -0
  87. package/dist/components/Highlight/Highlight.d.ts +4 -0
  88. package/dist/components/Highlight/Highlight.js +32 -24
  89. package/dist/components/Highlight/Highlight.types.d.ts +9 -1
  90. package/dist/components/Highlight/index.d.ts +1 -1
  91. package/dist/components/Icon/Icon.cjs +1 -1
  92. package/dist/components/Icon/Icon.js +17 -16
  93. package/dist/components/Icon/index.cjs +1 -1
  94. package/dist/components/Icon/index.js +12 -11
  95. package/dist/components/Kbd/Kbd.cjs +1 -1
  96. package/dist/components/Kbd/Kbd.js +17 -16
  97. package/dist/components/Map/Map.cjs +1 -0
  98. package/dist/components/Map/Map.const.cjs +1 -0
  99. package/dist/components/Map/Map.const.d.ts +20 -0
  100. package/dist/components/Map/Map.const.js +26 -0
  101. package/dist/components/Map/Map.d.ts +20 -0
  102. package/dist/components/Map/Map.js +259 -0
  103. package/dist/components/Map/Map.types.d.ts +81 -0
  104. package/dist/components/Map/index.d.ts +2 -0
  105. package/dist/components/Marquee/Marquee.cjs +1 -0
  106. package/dist/components/Marquee/Marquee.const.cjs +1 -0
  107. package/dist/components/Marquee/Marquee.const.d.ts +11 -0
  108. package/dist/components/Marquee/Marquee.const.js +12 -0
  109. package/dist/components/Marquee/Marquee.d.ts +7 -0
  110. package/dist/components/Marquee/Marquee.js +106 -0
  111. package/dist/components/Marquee/Marquee.types.d.ts +32 -0
  112. package/dist/components/Marquee/index.d.ts +2 -0
  113. package/dist/components/Masonry/Masonry.cjs +1 -0
  114. package/dist/components/Masonry/Masonry.const.cjs +1 -0
  115. package/dist/components/Masonry/Masonry.const.d.ts +9 -0
  116. package/dist/components/Masonry/Masonry.const.js +9 -0
  117. package/dist/components/Masonry/Masonry.d.ts +7 -0
  118. package/dist/components/Masonry/Masonry.js +51 -0
  119. package/dist/components/Masonry/Masonry.types.d.ts +21 -0
  120. package/dist/components/Masonry/index.d.ts +2 -0
  121. package/dist/components/NavigableSelect/NavigableSelect.cjs +1 -0
  122. package/dist/components/NavigableSelect/NavigableSelect.const.cjs +1 -0
  123. package/dist/components/NavigableSelect/NavigableSelect.const.d.ts +23 -0
  124. package/dist/components/NavigableSelect/NavigableSelect.const.js +33 -0
  125. package/dist/components/NavigableSelect/NavigableSelect.d.ts +7 -0
  126. package/dist/components/NavigableSelect/NavigableSelect.js +361 -0
  127. package/dist/components/NavigableSelect/NavigableSelect.types.d.ts +56 -0
  128. package/dist/components/NavigableSelect/index.d.ts +2 -0
  129. package/dist/components/Progress/Progress.cjs +1 -1
  130. package/dist/components/Progress/Progress.js +3 -2
  131. package/dist/components/ResizablePanel/ResizablePanel.cjs +1 -0
  132. package/dist/components/ResizablePanel/ResizablePanel.const.cjs +1 -0
  133. package/dist/components/ResizablePanel/ResizablePanel.const.d.ts +11 -0
  134. package/dist/components/ResizablePanel/ResizablePanel.const.js +11 -0
  135. package/dist/components/ResizablePanel/ResizablePanel.d.ts +17 -0
  136. package/dist/components/ResizablePanel/ResizablePanel.js +70 -0
  137. package/dist/components/ResizablePanel/ResizablePanel.types.d.ts +21 -0
  138. package/dist/components/ResizablePanel/ResizablePanel.utils.cjs +1 -0
  139. package/dist/components/ResizablePanel/ResizablePanel.utils.d.ts +10 -0
  140. package/dist/components/ResizablePanel/ResizablePanel.utils.js +11 -0
  141. package/dist/components/ResizablePanel/index.d.ts +2 -0
  142. package/dist/components/ResizableTextarea/ResizableTextarea.cjs +1 -0
  143. package/dist/components/ResizableTextarea/ResizableTextarea.const.cjs +1 -0
  144. package/dist/components/ResizableTextarea/ResizableTextarea.const.d.ts +2 -0
  145. package/dist/components/ResizableTextarea/ResizableTextarea.const.js +5 -0
  146. package/dist/components/ResizableTextarea/ResizableTextarea.d.ts +3 -0
  147. package/dist/components/ResizableTextarea/ResizableTextarea.js +60 -0
  148. package/dist/components/ResizableTextarea/ResizableTextarea.types.d.ts +15 -0
  149. package/dist/components/ResizableTextarea/index.d.ts +2 -0
  150. package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.cjs +1 -1
  151. package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.js +3 -2
  152. package/dist/components/ScrollArea/ScrollArea.cjs +1 -1
  153. package/dist/components/ScrollArea/ScrollArea.js +3 -2
  154. package/dist/components/Sidebar/Sidebar.cjs +1 -1
  155. package/dist/components/Sidebar/Sidebar.js +13 -12
  156. package/dist/components/Spinner/Spinner.cjs +1 -1
  157. package/dist/components/Spinner/Spinner.js +3 -2
  158. package/dist/components/Spotlight/Spotlight.cjs +1 -0
  159. package/dist/components/Spotlight/Spotlight.const.cjs +1 -0
  160. package/dist/components/Spotlight/Spotlight.const.d.ts +18 -0
  161. package/dist/components/Spotlight/Spotlight.const.js +9 -0
  162. package/dist/components/Spotlight/Spotlight.d.ts +7 -0
  163. package/dist/components/Spotlight/Spotlight.js +220 -0
  164. package/dist/components/Spotlight/Spotlight.types.d.ts +51 -0
  165. package/dist/components/Spotlight/index.d.ts +2 -0
  166. package/dist/components/StatCard/StatCard.cjs +1 -1
  167. package/dist/components/StatCard/StatCard.js +9 -8
  168. package/dist/components/Statistic/Statistic.cjs +1 -1
  169. package/dist/components/Statistic/Statistic.js +7 -6
  170. package/dist/components/Switch/Switch.cjs +1 -1
  171. package/dist/components/Switch/Switch.js +11 -10
  172. package/dist/components/TimePicker/components/TimePickerColumnsDropdown/TimePickerColumnsDropdown.cjs +1 -1
  173. package/dist/components/TimePicker/components/TimePickerColumnsDropdown/TimePickerColumnsDropdown.js +16 -15
  174. package/dist/components/TimePicker/helpers/ClockFaceSvg.cjs +1 -1
  175. package/dist/components/TimePicker/helpers/ClockFaceSvg.js +13 -12
  176. package/dist/components/Transition/Transition.cjs +1 -0
  177. package/dist/components/Transition/Transition.const.cjs +1 -0
  178. package/dist/components/Transition/Transition.const.d.ts +15 -0
  179. package/dist/components/Transition/Transition.const.js +73 -0
  180. package/dist/components/Transition/Transition.d.ts +37 -0
  181. package/dist/components/Transition/Transition.js +107 -0
  182. package/dist/components/Transition/Transition.types.d.ts +69 -0
  183. package/dist/components/Transition/index.d.ts +2 -0
  184. package/dist/components/Typewriter/Typewriter.cjs +1 -0
  185. package/dist/components/Typewriter/Typewriter.const.cjs +1 -0
  186. package/dist/components/Typewriter/Typewriter.const.d.ts +22 -0
  187. package/dist/components/Typewriter/Typewriter.const.js +11 -0
  188. package/dist/components/Typewriter/Typewriter.d.ts +7 -0
  189. package/dist/components/Typewriter/Typewriter.js +88 -0
  190. package/dist/components/Typewriter/Typewriter.types.d.ts +32 -0
  191. package/dist/components/Typewriter/index.d.ts +2 -0
  192. package/dist/components/Typography/Typography.cjs +1 -1
  193. package/dist/components/Typography/Typography.const.cjs +1 -0
  194. package/dist/components/Typography/Typography.const.d.ts +22 -0
  195. package/dist/components/Typography/Typography.const.js +91 -0
  196. package/dist/components/Typography/Typography.js +75 -138
  197. package/dist/components/Typography/Typography.types.d.ts +17 -0
  198. package/dist/components/Watermark/Watermark.cjs +1 -0
  199. package/dist/components/Watermark/Watermark.const.cjs +1 -0
  200. package/dist/components/Watermark/Watermark.const.d.ts +30 -0
  201. package/dist/components/Watermark/Watermark.const.js +18 -0
  202. package/dist/components/Watermark/Watermark.d.ts +7 -0
  203. package/dist/components/Watermark/Watermark.js +96 -0
  204. package/dist/components/Watermark/Watermark.types.d.ts +35 -0
  205. package/dist/components/Watermark/index.d.ts +2 -0
  206. package/dist/components/index.cjs +1 -1
  207. package/dist/components/index.d.ts +33 -1
  208. package/dist/components/index.js +270 -237
  209. package/dist/hooks/index.cjs +1 -1
  210. package/dist/hooks/index.d.ts +4 -0
  211. package/dist/hooks/index.js +24 -19
  212. package/dist/hooks/useAnimate.cjs +1 -0
  213. package/dist/hooks/useAnimate.d.ts +61 -0
  214. package/dist/hooks/useAnimate.js +125 -0
  215. package/dist/hooks/useResponsive.cjs +1 -0
  216. package/dist/hooks/useResponsive.d.ts +35 -0
  217. package/dist/hooks/useResponsive.js +74 -0
  218. package/dist/index.cjs +1 -1
  219. package/dist/index.js +335 -295
  220. package/dist/styles.css +1 -1
  221. package/dist/utils/createSlots.cjs +1 -0
  222. package/dist/utils/createSlots.d.ts +70 -0
  223. package/dist/utils/createSlots.js +65 -0
  224. package/dist/utils/index.cjs +1 -1
  225. package/dist/utils/index.d.ts +2 -0
  226. package/dist/utils/index.js +4 -2
  227. package/package.json +1 -1
@@ -0,0 +1,36 @@
1
+ const t = {
2
+ primary: ["var(--bear-primary-400, #f472b6)", "var(--bear-primary-600, #db2777)"],
3
+ sunset: ["#f97316", "#ef4444", "#ec4899"],
4
+ ocean: ["#06b6d4", "#3b82f6", "#8b5cf6"],
5
+ forest: ["#22c55e", "#10b981", "#14b8a6"],
6
+ fire: ["#fbbf24", "#f97316", "#ef4444"],
7
+ purple: ["#a855f7", "#7c3aed", "#6366f1"],
8
+ neon: ["#22d3ee", "#a78bfa", "#f472b6"],
9
+ candy: ["#f472b6", "#fb923c", "#fbbf24"],
10
+ aurora: ["#34d399", "#22d3ee", "#818cf8", "#c084fc"],
11
+ midnight: ["#6366f1", "#8b5cf6", "#a78bfa"]
12
+ }, o = {
13
+ "to-r": "to right",
14
+ "to-l": "to left",
15
+ "to-t": "to top",
16
+ "to-b": "to bottom",
17
+ "to-tr": "to top right",
18
+ "to-tl": "to top left",
19
+ "to-br": "to bottom right",
20
+ "to-bl": "to bottom left"
21
+ }, b = 3, f = "200% 200%", e = {
22
+ normal: 400,
23
+ medium: 500,
24
+ semibold: 600,
25
+ bold: 700,
26
+ extrabold: 800
27
+ }, r = 700, a = 3;
28
+ export {
29
+ f as ANIMATED_BG_SIZE,
30
+ a as COLOR_REPEAT_COUNT,
31
+ b as DEFAULT_ANIMATION_SPEED,
32
+ r as DEFAULT_WEIGHT,
33
+ o as DIRECTION_MAP,
34
+ t as GRADIENT_PRESETS,
35
+ e as WEIGHT_MAP
36
+ };
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { GradientTextProps } from './GradientText.types';
3
+ /**
4
+ * GradientText - Text with gradient colors.
5
+ * 10 built-in presets, custom colors, animation, and theme integration via BearProvider.
6
+ */
7
+ export declare const GradientText: FC<GradientTextProps>;
@@ -0,0 +1,52 @@
1
+ import { jsx as A } from "react/jsx-runtime";
2
+ import { useMemo as o } from "react";
3
+ import { cn as I } from "../../utils/cn.js";
4
+ import { DEFAULT_ANIMATION_SPEED as _, GRADIENT_PRESETS as s, DIRECTION_MAP as b, COLOR_REPEAT_COUNT as x, ANIMATED_BG_SIZE as C, WEIGHT_MAP as N, DEFAULT_WEIGHT as S } from "./GradientText.const.js";
5
+ const y = (l) => {
6
+ const {
7
+ children: d,
8
+ preset: i = "primary",
9
+ colors: t,
10
+ direction: n = "to-r",
11
+ animate: e = !1,
12
+ animationSpeed: c = _,
13
+ as: m = "span",
14
+ weight: T = "bold",
15
+ className: g,
16
+ style: p,
17
+ testId: E
18
+ } = l, r = o(() => t && t.length > 0 ? t : s[i] ?? s.primary, [t, i]), f = o(() => {
19
+ const a = b[n] ?? "to right";
20
+ if (!e) return `linear-gradient(${a}, ${r.join(", ")})`;
21
+ const u = Array.from({ length: x }, () => r).flat();
22
+ return `linear-gradient(${a}, ${u.join(", ")})`;
23
+ }, [r, n, e]);
24
+ return /* @__PURE__ */ A(
25
+ m,
26
+ {
27
+ className: I(
28
+ "Bear-GradientText",
29
+ "bear-inline-block",
30
+ e && "Bear-GradientText--animated",
31
+ g
32
+ ),
33
+ style: {
34
+ background: f,
35
+ backgroundClip: "text",
36
+ WebkitBackgroundClip: "text",
37
+ WebkitTextFillColor: "transparent",
38
+ fontWeight: N[T] ?? S,
39
+ ...e && {
40
+ backgroundSize: C,
41
+ animation: `bear-gradient-shift ${c}s ease infinite`
42
+ },
43
+ ...p
44
+ },
45
+ "data-testid": E,
46
+ children: d
47
+ }
48
+ );
49
+ };
50
+ export {
51
+ y as GradientText
52
+ };
@@ -0,0 +1,27 @@
1
+ import { ReactNode } from 'react';
2
+ export type GradientDirection = 'to-r' | 'to-l' | 'to-t' | 'to-b' | 'to-tr' | 'to-tl' | 'to-br' | 'to-bl';
3
+ export type GradientPreset = 'primary' | 'sunset' | 'ocean' | 'forest' | 'fire' | 'purple' | 'neon' | 'candy' | 'aurora' | 'midnight';
4
+ export interface GradientTextProps {
5
+ /** Content to render with gradient */
6
+ children: ReactNode;
7
+ /** Gradient preset name */
8
+ preset?: GradientPreset | (string & {});
9
+ /** Custom colors array (overrides preset) */
10
+ colors?: string[];
11
+ /** Gradient direction */
12
+ direction?: GradientDirection;
13
+ /** Whether to animate the gradient */
14
+ animate?: boolean;
15
+ /** Animation speed in seconds */
16
+ animationSpeed?: number;
17
+ /** HTML tag to render */
18
+ as?: 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
19
+ /** Font weight */
20
+ weight?: 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold';
21
+ /** Custom class name */
22
+ className?: string;
23
+ /** Custom style */
24
+ style?: React.CSSProperties;
25
+ /** Test ID */
26
+ testId?: string;
27
+ }
@@ -0,0 +1,2 @@
1
+ export { GradientText } from './GradientText';
2
+ export type { GradientTextProps, GradientPreset, GradientDirection } from './GradientText.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("react"),b={yellow:"bg-yellow-200 dark:bg-yellow-500/30",pink:"bg-pink-200 dark:bg-pink-500/30",blue:"bg-blue-200 dark:bg-blue-500/30",green:"bg-green-200 dark:bg-green-500/30",purple:"bg-purple-200 dark:bg-purple-500/30",orange:"bg-orange-200 dark:bg-orange-500/30"},e=t.forwardRef(({children:r,color:g="yellow",animated:l=!1,className:a="",...i},n)=>o.jsx("span",{ref:n,className:`bear-highlight px-1 rounded ${b[g]} ${l?"animate-pulse":""} ${a}`.trim(),...i,children:r}));e.displayName="Highlight";exports.Highlight=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),h=require("react"),u=require("../../utils/cn.cjs"),e=require("./Highlight.const.cjs"),t=h.forwardRef((r,s)=>{const{children:i,color:a=e.DEFAULT_COLOR,animated:n=!1,className:c,testId:o,...l}=r,g=e.HIGHLIGHT_COLOR_CLASSES[a]??e.HIGHLIGHT_COLOR_CLASSES[e.DEFAULT_COLOR];return d.jsx("span",{ref:s,className:u.cn("Bear-Highlight","bear-px-1 bear-rounded",g,n&&"bear-animate-pulse",c),"data-testid":o,...l,children:i})});t.displayName="Highlight";exports.Highlight=t;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r={primary:"bear-bg-[var(--bear-primary-100,#fce7f3)] dark:bear-bg-[var(--bear-primary-900,#831843)]/30",yellow:"bear-bg-yellow-200 dark:bear-bg-yellow-500/30",pink:"bear-bg-pink-200 dark:bear-bg-pink-500/30",blue:"bear-bg-blue-200 dark:bear-bg-blue-500/30",green:"bear-bg-green-200 dark:bear-bg-green-500/30",purple:"bear-bg-purple-200 dark:bear-bg-purple-500/30",orange:"bear-bg-orange-200 dark:bear-bg-orange-500/30",red:"bear-bg-red-200 dark:bear-bg-red-500/30",cyan:"bear-bg-cyan-200 dark:bear-bg-cyan-500/30"},e="yellow";exports.DEFAULT_COLOR=e;exports.HIGHLIGHT_COLOR_CLASSES=r;
@@ -0,0 +1,8 @@
1
+ import { HighlightColor } from './Highlight.types';
2
+ /**
3
+ * Highlight color classes — uses CSS variables for theme integration.
4
+ * 'primary' maps to BearProvider's primary color.
5
+ */
6
+ export declare const HIGHLIGHT_COLOR_CLASSES: Record<HighlightColor, string>;
7
+ /** Default highlight color */
8
+ export declare const DEFAULT_COLOR: HighlightColor;
@@ -0,0 +1,15 @@
1
+ const r = {
2
+ primary: "bear-bg-[var(--bear-primary-100,#fce7f3)] dark:bear-bg-[var(--bear-primary-900,#831843)]/30",
3
+ yellow: "bear-bg-yellow-200 dark:bear-bg-yellow-500/30",
4
+ pink: "bear-bg-pink-200 dark:bear-bg-pink-500/30",
5
+ blue: "bear-bg-blue-200 dark:bear-bg-blue-500/30",
6
+ green: "bear-bg-green-200 dark:bear-bg-green-500/30",
7
+ purple: "bear-bg-purple-200 dark:bear-bg-purple-500/30",
8
+ orange: "bear-bg-orange-200 dark:bear-bg-orange-500/30",
9
+ red: "bear-bg-red-200 dark:bear-bg-red-500/30",
10
+ cyan: "bear-bg-cyan-200 dark:bear-bg-cyan-500/30"
11
+ }, e = "yellow";
12
+ export {
13
+ e as DEFAULT_COLOR,
14
+ r as HIGHLIGHT_COLOR_CLASSES
15
+ };
@@ -1,2 +1,6 @@
1
1
  import { HighlightProps } from './Highlight.types';
2
+ /**
3
+ * Highlight - Inline text highlight with theme-aware colors.
4
+ * 'primary' color uses BearProvider's primary palette.
5
+ */
2
6
  export declare const Highlight: import('react').ForwardRefExoticComponent<HighlightProps & import('react').RefAttributes<HTMLSpanElement>>;
@@ -1,28 +1,36 @@
1
- import { jsx as b } from "react/jsx-runtime";
1
+ import { jsx as d } from "react/jsx-runtime";
2
2
  import { forwardRef as p } from "react";
3
- const n = {
4
- yellow: "bg-yellow-200 dark:bg-yellow-500/30",
5
- pink: "bg-pink-200 dark:bg-pink-500/30",
6
- blue: "bg-blue-200 dark:bg-blue-500/30",
7
- green: "bg-green-200 dark:bg-green-500/30",
8
- purple: "bg-purple-200 dark:bg-purple-500/30",
9
- orange: "bg-orange-200 dark:bg-orange-500/30"
10
- }, i = p(({
11
- children: e,
12
- color: r = "yellow",
13
- animated: g = !1,
14
- className: l = "",
15
- ...a
16
- }, o) => /* @__PURE__ */ b(
17
- "span",
18
- {
19
- ref: o,
20
- className: `bear-highlight px-1 rounded ${n[r]} ${g ? "animate-pulse" : ""} ${l}`.trim(),
21
- ...a,
22
- children: e
3
+ import { cn as f } from "../../utils/cn.js";
4
+ import { DEFAULT_COLOR as r, HIGHLIGHT_COLOR_CLASSES as t } from "./Highlight.const.js";
5
+ const h = p(
6
+ (a, e) => {
7
+ const {
8
+ children: o,
9
+ color: s = r,
10
+ animated: i = !1,
11
+ className: m,
12
+ testId: l,
13
+ ...n
14
+ } = a, c = t[s] ?? t[r];
15
+ return /* @__PURE__ */ d(
16
+ "span",
17
+ {
18
+ ref: e,
19
+ className: f(
20
+ "Bear-Highlight",
21
+ "bear-px-1 bear-rounded",
22
+ c,
23
+ i && "bear-animate-pulse",
24
+ m
25
+ ),
26
+ "data-testid": l,
27
+ ...n,
28
+ children: o
29
+ }
30
+ );
23
31
  }
24
- ));
25
- i.displayName = "Highlight";
32
+ );
33
+ h.displayName = "Highlight";
26
34
  export {
27
- i as Highlight
35
+ h as Highlight
28
36
  };
@@ -1,6 +1,14 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
+ export type HighlightColor = 'primary' | 'yellow' | 'pink' | 'blue' | 'green' | 'purple' | 'orange' | 'red' | 'cyan';
2
3
  export interface HighlightProps extends HTMLAttributes<HTMLSpanElement> {
4
+ /** Content to highlight */
3
5
  children?: ReactNode;
4
- color?: 'yellow' | 'pink' | 'blue' | 'green' | 'purple' | 'orange';
6
+ /** Highlight color 'primary' uses theme color from BearProvider */
7
+ color?: HighlightColor;
8
+ /** Whether to animate with pulse */
5
9
  animated?: boolean;
10
+ /** Additional class name */
11
+ className?: string;
12
+ /** Test ID */
13
+ testId?: string;
6
14
  }
@@ -1,2 +1,2 @@
1
1
  export { Highlight } from './Highlight';
2
- export type { HighlightProps } from './Highlight.types';
2
+ export type { HighlightProps, HighlightColor } from './Highlight.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),u=require("../../utils/cn.cjs"),d={xs:12,sm:16,md:20,lg:24,xl:32},m=({size:e="md",color:t="currentColor",strokeWidth:o=2,spin:r=!1,className:s,children:i,testId:a,...c})=>{const n=typeof e=="number"?e:d[e];return l.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round",className:u.cn("bear-inline-block bear-shrink-0",r&&"bear-animate-spin",s),"data-testid":a,...c,children:i})};exports.Icon=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),u=require("../../utils/cn.cjs");require("react");const d={xs:12,sm:16,md:20,lg:24,xl:32},m=({size:e="md",color:r="currentColor",strokeWidth:t=2,spin:o=!1,className:s,children:i,testId:a,...c})=>{const n=typeof e=="number"?e:d[e];return l.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round",className:u.cn("bear-inline-block bear-shrink-0",o&&"bear-animate-spin",s),"data-testid":a,...c,children:i})};exports.Icon=m;
@@ -1,44 +1,45 @@
1
- import { jsx as m } from "react/jsx-runtime";
1
+ import { jsx as l } from "react/jsx-runtime";
2
2
  import { cn as c } from "../../utils/cn.js";
3
- const d = {
3
+ import "react";
4
+ const p = {
4
5
  xs: 12,
5
6
  sm: 16,
6
7
  md: 20,
7
8
  lg: 24,
8
9
  xl: 32
9
- }, b = ({
10
+ }, f = ({
10
11
  size: e = "md",
11
- color: n = "currentColor",
12
- strokeWidth: r = 2,
12
+ color: r = "currentColor",
13
+ strokeWidth: n = 2,
13
14
  spin: t = !1,
14
- className: s,
15
- children: i,
15
+ className: i,
16
+ children: s,
16
17
  testId: a,
17
- ...l
18
+ ...m
18
19
  }) => {
19
- const o = typeof e == "number" ? e : d[e];
20
- return /* @__PURE__ */ m(
20
+ const o = typeof e == "number" ? e : p[e];
21
+ return /* @__PURE__ */ l(
21
22
  "svg",
22
23
  {
23
24
  width: o,
24
25
  height: o,
25
26
  viewBox: "0 0 24 24",
26
27
  fill: "none",
27
- stroke: n,
28
- strokeWidth: r,
28
+ stroke: r,
29
+ strokeWidth: n,
29
30
  strokeLinecap: "round",
30
31
  strokeLinejoin: "round",
31
32
  className: c(
32
33
  "bear-inline-block bear-shrink-0",
33
34
  t && "bear-animate-spin",
34
- s
35
+ i
35
36
  ),
36
37
  "data-testid": a,
37
- ...l,
38
- children: i
38
+ ...m,
39
+ children: s
39
40
  }
40
41
  );
41
42
  };
42
43
  export {
43
- b as Icon
44
+ f as Icon
44
45
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");const n=require("./icons/action.cjs"),o=require("./icons/navigation.cjs"),t=require("./icons/content.cjs"),r=require("./icons/communication.cjs"),c=require("./icons/status.cjs"),i=require("./icons/media.cjs"),s=require("./icons/editor.cjs"),e=require("./icons/misc.cjs"),I=c.CheckIcon,h=o.CloseIcon,C=n.EditIcon,v=o.ChevronDownIcon,u=o.ChevronRightIcon,a=o.ChevronLeftIcon,g=o.ChevronsLeftIcon,d=o.ChevronsRightIcon,q=e.XIcon,f={...n,...o,...t,...r,...c,...i,...s,...e,Action:n,Navigation:o,Content:t,Communication:r,Status:c,Media:i,Editor:s,Misc:e};exports.BearIcons=f;exports.CheckIcon=I;exports.ChevronDownIcon=v;exports.ChevronLeftIcon=a;exports.ChevronRightIcon=u;exports.ChevronsLeftIcon=g;exports.ChevronsRightIcon=d;exports.CloseIcon=h;exports.EditIcon=C;exports.XIcon=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const n=require("./icons/action.cjs"),o=require("./icons/navigation.cjs"),t=require("./icons/content.cjs"),r=require("./icons/communication.cjs"),e=require("./icons/status.cjs"),i=require("./icons/media.cjs"),s=require("./icons/editor.cjs"),c=require("./icons/misc.cjs"),I=e.CheckIcon,h=o.CloseIcon,C=n.EditIcon,v=o.ChevronDownIcon,u=o.ChevronRightIcon,a=o.ChevronLeftIcon,g=o.ChevronsLeftIcon,q=o.ChevronsRightIcon,d=c.XIcon,f={...n,...o,...t,...r,...e,...i,...s,...c,Action:n,Navigation:o,Content:t,Communication:r,Status:e,Media:i,Editor:s,Misc:c};exports.BearIcons=f;exports.CheckIcon=I;exports.ChevronDownIcon=v;exports.ChevronLeftIcon=a;exports.ChevronRightIcon=u;exports.ChevronsLeftIcon=g;exports.ChevronsRightIcon=q;exports.CloseIcon=h;exports.EditIcon=C;exports.XIcon=d;
@@ -1,4 +1,5 @@
1
1
  import "react/jsx-runtime";
2
+ import "react";
2
3
  import * as o from "./icons/action.js";
3
4
  import { EditIcon as m } from "./icons/action.js";
4
5
  import * as n from "./icons/navigation.js";
@@ -11,7 +12,7 @@ import * as s from "./icons/media.js";
11
12
  import * as i from "./icons/editor.js";
12
13
  import * as e from "./icons/misc.js";
13
14
  import { XIcon as $ } from "./icons/misc.js";
14
- const E = p, k = a, l = m, w = I, D = h, X = C, M = f, x = v, A = $, B = {
15
+ const k = p, l = a, w = m, D = I, X = h, M = C, x = f, A = v, B = $, N = {
15
16
  // Flat access to common icons (shortcuts)
16
17
  ...o,
17
18
  ...n,
@@ -32,14 +33,14 @@ const E = p, k = a, l = m, w = I, D = h, X = C, M = f, x = v, A = $, B = {
32
33
  Misc: e
33
34
  };
34
35
  export {
35
- B as BearIcons,
36
- E as CheckIcon,
37
- w as ChevronDownIcon,
38
- X as ChevronLeftIcon,
39
- D as ChevronRightIcon,
40
- M as ChevronsLeftIcon,
41
- x as ChevronsRightIcon,
42
- k as CloseIcon,
43
- l as EditIcon,
44
- A as XIcon
36
+ N as BearIcons,
37
+ k as CheckIcon,
38
+ D as ChevronDownIcon,
39
+ M as ChevronLeftIcon,
40
+ X as ChevronRightIcon,
41
+ x as ChevronsLeftIcon,
42
+ A as ChevronsRightIcon,
43
+ l as CloseIcon,
44
+ w as EditIcon,
45
+ B as XIcon
45
46
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../utils/cn.cjs"),x={cmd:"⌘",command:"⌘",ctrl:"⌃",control:"⌃",alt:"⌥",option:"⌥",shift:"⇧",enter:"↵",return:"↵",tab:"⇥",backspace:"⌫",delete:"⌦",escape:"⎋",esc:"⎋",up:"↑",down:"↓",left:"←",right:"→",space:"␣"},u=({children:l,keys:r,size:b="md",variant:s="default",className:c})=>{const i={sm:"bear-text-xs bear-px-1.5 bear-py-0.5 bear-min-w-[18px]",md:"bear-text-sm bear-px-2 bear-py-1 bear-min-w-[24px]",lg:"bear-text-base bear-px-2.5 bear-py-1.5 bear-min-w-[30px]"},o={default:"bear-bg-zinc-700 bear-border-zinc-600 bear-shadow-[0_1px_0_1px_rgba(0,0,0,0.3)]",outline:"bear-bg-transparent bear-border-zinc-500",ghost:"bear-bg-zinc-800/50 bear-border-transparent"},d=(a,n,m)=>{const p=x[a.toLowerCase()]||a.toUpperCase();return e.jsxs("span",{className:"bear-inline-flex bear-items-center",children:[e.jsx("kbd",{className:t.cn("bear-inline-flex bear-items-center bear-justify-center bear-rounded bear-border bear-font-mono bear-font-medium bear-text-zinc-300",i[b],o[s]),children:p}),!m&&e.jsx("span",{className:"bear-mx-1 bear-text-zinc-500",children:"+"})]},n)};return r&&r.length>0?e.jsx("span",{className:t.cn("bear-inline-flex bear-items-center",c),children:r.map((a,n)=>d(a,n,n===r.length-1))}):e.jsx("kbd",{className:t.cn("bear-inline-flex bear-items-center bear-justify-center bear-rounded bear-border bear-font-mono bear-font-medium bear-text-zinc-300",i[b],o[s],c),children:l})};exports.Kbd=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../utils/cn.cjs");require("react");const x={cmd:"⌘",command:"⌘",ctrl:"⌃",control:"⌃",alt:"⌥",option:"⌥",shift:"⇧",enter:"↵",return:"↵",tab:"⇥",backspace:"⌫",delete:"⌦",escape:"⎋",esc:"⎋",up:"↑",down:"↓",left:"←",right:"→",space:"␣"},u=({children:l,keys:r,size:b="md",variant:s="default",className:c})=>{const i={sm:"bear-text-xs bear-px-1.5 bear-py-0.5 bear-min-w-[18px]",md:"bear-text-sm bear-px-2 bear-py-1 bear-min-w-[24px]",lg:"bear-text-base bear-px-2.5 bear-py-1.5 bear-min-w-[30px]"},o={default:"bear-bg-zinc-700 bear-border-zinc-600 bear-shadow-[0_1px_0_1px_rgba(0,0,0,0.3)]",outline:"bear-bg-transparent bear-border-zinc-500",ghost:"bear-bg-zinc-800/50 bear-border-transparent"},d=(a,n,m)=>{const p=x[a.toLowerCase()]||a.toUpperCase();return e.jsxs("span",{className:"bear-inline-flex bear-items-center",children:[e.jsx("kbd",{className:t.cn("bear-inline-flex bear-items-center bear-justify-center bear-rounded bear-border bear-font-mono bear-font-medium bear-text-zinc-300",i[b],o[s]),children:p}),!m&&e.jsx("span",{className:"bear-mx-1 bear-text-zinc-500",children:"+"})]},n)};return r&&r.length>0?e.jsx("span",{className:t.cn("bear-inline-flex bear-items-center",c),children:r.map((a,n)=>d(a,n,n===r.length-1))}):e.jsx("kbd",{className:t.cn("bear-inline-flex bear-items-center bear-justify-center bear-rounded bear-border bear-font-mono bear-font-medium bear-text-zinc-300",i[b],o[s],c),children:l})};exports.Kbd=u;
@@ -1,5 +1,6 @@
1
- import { jsx as n, jsxs as x } from "react/jsx-runtime";
2
- import { cn as t } from "../../utils/cn.js";
1
+ import { jsx as t, jsxs as x } from "react/jsx-runtime";
2
+ import { cn as n } from "../../utils/cn.js";
3
+ import "react";
3
4
  const f = {
4
5
  cmd: "⌘",
5
6
  command: "⌘",
@@ -20,39 +21,39 @@ const f = {
20
21
  left: "←",
21
22
  right: "→",
22
23
  space: "␣"
23
- }, g = ({
24
- children: l,
24
+ }, z = ({
25
+ children: m,
25
26
  keys: e,
26
27
  size: b = "md",
27
28
  variant: s = "default",
28
29
  className: o
29
30
  }) => {
30
- const c = {
31
+ const i = {
31
32
  sm: "bear-text-xs bear-px-1.5 bear-py-0.5 bear-min-w-[18px]",
32
33
  md: "bear-text-sm bear-px-2 bear-py-1 bear-min-w-[24px]",
33
34
  lg: "bear-text-base bear-px-2.5 bear-py-1.5 bear-min-w-[30px]"
34
- }, i = {
35
+ }, c = {
35
36
  default: "bear-bg-zinc-700 bear-border-zinc-600 bear-shadow-[0_1px_0_1px_rgba(0,0,0,0.3)]",
36
37
  outline: "bear-bg-transparent bear-border-zinc-500",
37
38
  ghost: "bear-bg-zinc-800/50 bear-border-transparent"
38
- }, m = (r, a, d) => {
39
+ }, l = (r, a, d) => {
39
40
  const p = f[r.toLowerCase()] || r.toUpperCase();
40
41
  return /* @__PURE__ */ x("span", { className: "bear-inline-flex bear-items-center", children: [
41
- /* @__PURE__ */ n("kbd", { className: t(
42
+ /* @__PURE__ */ t("kbd", { className: n(
42
43
  "bear-inline-flex bear-items-center bear-justify-center bear-rounded bear-border bear-font-mono bear-font-medium bear-text-zinc-300",
43
- c[b],
44
- i[s]
44
+ i[b],
45
+ c[s]
45
46
  ), children: p }),
46
- !d && /* @__PURE__ */ n("span", { className: "bear-mx-1 bear-text-zinc-500", children: "+" })
47
+ !d && /* @__PURE__ */ t("span", { className: "bear-mx-1 bear-text-zinc-500", children: "+" })
47
48
  ] }, a);
48
49
  };
49
- return e && e.length > 0 ? /* @__PURE__ */ n("span", { className: t("bear-inline-flex bear-items-center", o), children: e.map((r, a) => m(r, a, a === e.length - 1)) }) : /* @__PURE__ */ n("kbd", { className: t(
50
+ return e && e.length > 0 ? /* @__PURE__ */ t("span", { className: n("bear-inline-flex bear-items-center", o), children: e.map((r, a) => l(r, a, a === e.length - 1)) }) : /* @__PURE__ */ t("kbd", { className: n(
50
51
  "bear-inline-flex bear-items-center bear-justify-center bear-rounded bear-border bear-font-mono bear-font-medium bear-text-zinc-300",
51
- c[b],
52
- i[s],
52
+ i[b],
53
+ c[s],
53
54
  o
54
- ), children: l });
55
+ ), children: m });
55
56
  };
56
57
  export {
57
- g as Kbd
58
+ z as Kbd
58
59
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("react"),x=require("../../utils/cn.cjs"),a=require("./Map.const.cjs"),xe=({markers:O=[],viewport:$,controlledViewport:v,onViewportChange:f,onMarkerClick:w,onMapClick:z,onMarkerDrag:Me,tileProvider:I="openstreetmap",customTileUrl:F,width:g="100%",height:p=400,showZoomControls:G=!0,showAttribution:J=!0,scrollWheelZoom:N=!0,doubleClickZoom:D=!0,draggable:X=!0,minZoom:L=a.MIN_ZOOM,maxZoom:j=a.MAX_ZOOM,className:Q,style:V,testId:ee})=>{const E=l.useRef(null),[ae,te]=l.useState($??a.DEFAULT_VIEWPORT),[R,U]=l.useState(!1),[S,Y]=l.useState(null),[M,A]=l.useState(null),[re,C]=l.useState(null),[B,oe]=l.useState(null),t=v??ae,c=l.useCallback(e=>{const r={...e,zoom:Math.max(L,Math.min(j,e.zoom)),lat:Math.max(-85,Math.min(85,e.lat)),lng:((e.lng+180)%360+360)%360-180};v||te(r),f==null||f(r)},[v,f,L,j]),y=(e,r)=>(e+180)/360*Math.pow(2,r),m=(e,r)=>{const n=e*Math.PI/180;return(1-Math.log(Math.tan(n)+1/Math.cos(n))/Math.PI)/2*Math.pow(2,r)},P=(e,r)=>e/Math.pow(2,r)*360-180,W=(e,r)=>{const n=Math.PI-2*Math.PI*e/Math.pow(2,r);return 180/Math.PI*Math.atan(.5*(Math.exp(n)-Math.exp(-n)))},ne=(e,r,n)=>(I==="custom"?F??a.TILE_URLS.openstreetmap:a.TILE_URLS[I]).replace("{x}",String(e)).replace("{y}",String(r)).replace("{z}",String(n)),se=l.useMemo(()=>{const e=E.current,r=(e==null?void 0:e.clientWidth)??(typeof g=="number"?g:800),n=typeof p=="number"?p:400,o=Math.round(t.zoom),i=y(t.lng,o),b=m(t.lat,o),d=Math.ceil(r/a.TILE_SIZE)+2,h=Math.ceil(n/a.TILE_SIZE)+2,u=Math.pow(2,o),T=[];for(let Z=-Math.floor(d/2);Z<=Math.ceil(d/2);Z++)for(let k=-Math.floor(h/2);k<=Math.ceil(h/2);k++){const q=Math.floor(i)+Z,_=Math.floor(b)+k;if(_<0||_>=u)continue;const ge=(q%u+u)%u,pe=r/2+(q-i)*a.TILE_SIZE,he=n/2+(_-b)*a.TILE_SIZE;T.push({x:ge,y:_,z:o,px:pe,py:he})}return T},[t.lat,t.lng,t.zoom,g,p]),le=l.useMemo(()=>{const e=E.current,r=(e==null?void 0:e.clientWidth)??(typeof g=="number"?g:800),n=typeof p=="number"?p:400,o=t.zoom,i=y(t.lng,o),b=m(t.lat,o);return O.map(d=>{const h=y(d.lng,o),u=m(d.lat,o);return{marker:d,px:r/2+(h-i)*a.TILE_SIZE,py:n/2+(u-b)*a.TILE_SIZE}})},[O,t,g,p]),be=l.useCallback(e=>{X&&(U(!0),Y({x:e.clientX,y:e.clientY}),A({...t}))},[X,t]),ce=l.useCallback(e=>{if(!R||!S||!M)return;const r=e.clientX-S.x,n=e.clientY-S.y,o=M.zoom,i=y(M.lng,o)-r/a.TILE_SIZE,b=m(M.lat,o)-n/a.TILE_SIZE;c({lat:W(b,o),lng:P(i,o),zoom:o})},[R,S,M,c]),K=l.useCallback(()=>{U(!1),Y(null),A(null)},[]),ie=l.useCallback(e=>{if(!N)return;e.preventDefault();const r=e.deltaY>0?-.5:.5;c({...t,zoom:t.zoom+r})},[N,t,c]),de=l.useCallback(e=>{D&&(e.preventDefault(),c({...t,zoom:t.zoom+1}))},[D,t,c]),ue=l.useCallback(e=>{if(!z)return;const r=E.current;if(!r)return;const n=r.getBoundingClientRect(),o=e.clientX-n.left,i=e.clientY-n.top,b=t.zoom,d=y(t.lng,b),h=m(t.lat,b),u=d+(o-r.clientWidth/2)/a.TILE_SIZE,T=h+(i-r.clientHeight/2)/a.TILE_SIZE;z(W(T,b),P(u,b))},[z,t]),H=I!=="custom"?a.TILE_ATTRIBUTIONS[I]:"";return s.jsxs("div",{ref:E,className:x.cn("bear-relative bear-overflow-hidden bear-rounded-lg bear-select-none","bear-border bear-border-gray-200 dark:bear-border-gray-700",R?"bear-cursor-grabbing":"bear-cursor-grab",Q),style:{width:g,height:p,...V},onMouseDown:be,onMouseMove:ce,onMouseUp:K,onMouseLeave:K,onWheel:ie,onDoubleClick:de,onClick:ue,"data-testid":ee,role:"application","aria-label":"Interactive map",children:[s.jsx("div",{className:"bear-absolute bear-inset-0 bear-overflow-hidden",children:se.map(e=>s.jsx("img",{src:ne(e.x,e.y,e.z),alt:"",className:"bear-absolute bear-pointer-events-none",style:{left:e.px,top:e.py,width:a.TILE_SIZE,height:a.TILE_SIZE},loading:"lazy",draggable:!1},`${e.z}-${e.x}-${e.y}`))}),le.map(({marker:e,px:r,py:n})=>s.jsxs("div",{className:"bear-absolute bear-z-10 bear-pointer-events-auto",style:{left:r-a.MARKER_SIZE/2,top:n-a.MARKER_SIZE,width:a.MARKER_SIZE,height:a.MARKER_SIZE},onClick:o=>{o.stopPropagation(),oe(B===e.id?null:e.id),w==null||w(e)},onMouseEnter:()=>C(e.id),onMouseLeave:()=>C(null),children:[e.icon?s.jsx("div",{className:"bear-text-2xl bear-flex bear-items-center bear-justify-center bear-w-full bear-h-full",children:e.icon}):s.jsxs("svg",{width:a.MARKER_SIZE,height:a.MARKER_SIZE,viewBox:"0 0 32 42",fill:"none",children:[s.jsx("path",{d:"M16 0C7.16 0 0 7.16 0 16c0 12 16 26 16 26s16-14 16-26C32 7.16 24.84 0 16 0z",fill:e.color??a.DEFAULT_MARKER_COLOR,className:x.cn("bear-transition-all bear-duration-200",re===e.id&&"bear-drop-shadow-lg")}),s.jsx("circle",{cx:"16",cy:"15",r:"6",fill:"white"})]}),e.label&&s.jsx("div",{className:x.cn("bear-absolute bear-left-1/2 bear--translate-x-1/2 bear-top-full bear-mt-1","bear-bg-white dark:bear-bg-gray-800 bear-text-xs bear-font-medium","bear-px-2 bear-py-0.5 bear-rounded bear-shadow-md bear-whitespace-nowrap","bear-text-gray-800 dark:bear-text-gray-200","bear-border bear-border-gray-200 dark:bear-border-gray-600"),children:e.label}),B===e.id&&e.popup&&s.jsx("div",{className:x.cn("bear-absolute bear-left-1/2 bear--translate-x-1/2 bear-bottom-full bear-mb-2","bear-bg-white dark:bear-bg-gray-800 bear-rounded-lg bear-shadow-xl","bear-p-3 bear-min-w-[150px] bear-max-w-[250px]","bear-border bear-border-gray-200 dark:bear-border-gray-600","bear-z-20"),onClick:o=>o.stopPropagation(),children:e.popup})]},e.id)),G&&s.jsxs("div",{className:"bear-absolute bear-top-3 bear-right-3 bear-z-20 bear-flex bear-flex-col bear-gap-1",children:[s.jsx("button",{onClick:e=>{e.stopPropagation(),c({...t,zoom:t.zoom+1})},disabled:t.zoom>=j,className:x.cn("bear-flex bear-items-center bear-justify-center bear-rounded-md","bear-bg-white dark:bear-bg-gray-800 bear-shadow-md","bear-text-gray-700 dark:bear-text-gray-200","hover:bear-bg-gray-50 dark:hover:bear-bg-gray-700","bear-border bear-border-gray-200 dark:bear-border-gray-600","bear-transition-colors bear-duration-150","disabled:bear-opacity-50 disabled:bear-cursor-not-allowed"),style:{width:a.ZOOM_BUTTON_SIZE,height:a.ZOOM_BUTTON_SIZE},"aria-label":"Zoom in",children:s.jsx("svg",{className:"bear-w-4 bear-h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}),s.jsx("button",{onClick:e=>{e.stopPropagation(),c({...t,zoom:t.zoom-1})},disabled:t.zoom<=L,className:x.cn("bear-flex bear-items-center bear-justify-center bear-rounded-md","bear-bg-white dark:bear-bg-gray-800 bear-shadow-md","bear-text-gray-700 dark:bear-text-gray-200","hover:bear-bg-gray-50 dark:hover:bear-bg-gray-700","bear-border bear-border-gray-200 dark:bear-border-gray-600","bear-transition-colors bear-duration-150","disabled:bear-opacity-50 disabled:bear-cursor-not-allowed"),style:{width:a.ZOOM_BUTTON_SIZE,height:a.ZOOM_BUTTON_SIZE},"aria-label":"Zoom out",children:s.jsx("svg",{className:"bear-w-4 bear-h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 12H4"})})})]}),J&&H&&s.jsx("div",{className:"bear-absolute bear-bottom-1 bear-right-1 bear-z-20 bear-text-[10px] bear-text-gray-500 bear-bg-white/80 dark:bear-bg-gray-900/80 bear-px-1.5 bear-py-0.5 bear-rounded",children:H})]})};exports.Map=xe;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={lat:40.7128,lng:-74.006,zoom:10},e="var(--bear-primary-500)",a=32,r=1,n=19,o=256,s={openstreetmap:"https://tile.openstreetmap.org/{z}/{x}/{y}.png","cartodb-light":"https://basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png","cartodb-dark":"https://basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png","stamen-terrain":"https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png"},p={openstreetmap:"© OpenStreetMap contributors","cartodb-light":"© CartoDB © OpenStreetMap","cartodb-dark":"© CartoDB © OpenStreetMap","stamen-terrain":"© Stamen Design © OpenStreetMap"},O=36;exports.DEFAULT_MARKER_COLOR=e;exports.DEFAULT_VIEWPORT=t;exports.MARKER_SIZE=a;exports.MAX_ZOOM=n;exports.MIN_ZOOM=r;exports.TILE_ATTRIBUTIONS=p;exports.TILE_SIZE=o;exports.TILE_URLS=s;exports.ZOOM_BUTTON_SIZE=O;
@@ -0,0 +1,20 @@
1
+ import { MapViewport, MapTileProvider } from './Map.types';
2
+ /** Default viewport - centered on the world */
3
+ export declare const DEFAULT_VIEWPORT: MapViewport;
4
+ /** Default marker color */
5
+ export declare const DEFAULT_MARKER_COLOR = "var(--bear-primary-500)";
6
+ /** Default marker size in px */
7
+ export declare const MARKER_SIZE = 32;
8
+ /** Marker pulse animation size in px */
9
+ export declare const MARKER_PULSE_SIZE = 48;
10
+ /** Min/Max zoom levels */
11
+ export declare const MIN_ZOOM = 1;
12
+ export declare const MAX_ZOOM = 19;
13
+ /** Tile size in px */
14
+ export declare const TILE_SIZE = 256;
15
+ /** Tile URL templates for providers */
16
+ export declare const TILE_URLS: Record<Exclude<MapTileProvider, 'custom'>, string>;
17
+ /** Attribution text for providers */
18
+ export declare const TILE_ATTRIBUTIONS: Record<Exclude<MapTileProvider, 'custom'>, string>;
19
+ /** Zoom button size */
20
+ export declare const ZOOM_BUTTON_SIZE = 36;
@@ -0,0 +1,26 @@
1
+ const t = {
2
+ lat: 40.7128,
3
+ lng: -74.006,
4
+ zoom: 10
5
+ }, a = "var(--bear-primary-500)", e = 32, n = 1, r = 19, o = 256, s = {
6
+ openstreetmap: "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
7
+ "cartodb-light": "https://basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",
8
+ "cartodb-dark": "https://basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png",
9
+ "stamen-terrain": "https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png"
10
+ }, p = {
11
+ openstreetmap: "© OpenStreetMap contributors",
12
+ "cartodb-light": "© CartoDB © OpenStreetMap",
13
+ "cartodb-dark": "© CartoDB © OpenStreetMap",
14
+ "stamen-terrain": "© Stamen Design © OpenStreetMap"
15
+ }, c = 36;
16
+ export {
17
+ a as DEFAULT_MARKER_COLOR,
18
+ t as DEFAULT_VIEWPORT,
19
+ e as MARKER_SIZE,
20
+ r as MAX_ZOOM,
21
+ n as MIN_ZOOM,
22
+ p as TILE_ATTRIBUTIONS,
23
+ o as TILE_SIZE,
24
+ s as TILE_URLS,
25
+ c as ZOOM_BUTTON_SIZE
26
+ };
@@ -0,0 +1,20 @@
1
+ import { FC } from 'react';
2
+ import { MapProps } from './Map.types';
3
+ /**
4
+ * Map - Interactive map component with markers, zoom, and tile providers
5
+ *
6
+ * @description
7
+ * Zero-dependency interactive map built on OpenStreetMap tiles.
8
+ * Supports markers, drag, zoom, and multiple tile providers.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <Map
13
+ * markers={[{ id: '1', lat: 40.71, lng: -74.00, label: 'NYC' }]}
14
+ * viewport={{ lat: 40.71, lng: -74.00, zoom: 12 }}
15
+ * onMarkerClick={(m) => console.log(m.label)}
16
+ * height={400}
17
+ * />
18
+ * ```
19
+ */
20
+ export declare const Map: FC<MapProps>;