@ewjdev/anyclick-react 0.1.0 → 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.
- package/README.md +123 -19
- package/dist/index.d.mts +172 -12
- package/dist/index.d.ts +172 -12
- package/dist/index.js +859 -289
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +852 -288
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/FeedbackProvider.tsx","../src/context.ts","../src/ContextMenu.tsx","../src/styles.ts","../src/highlight.ts","../src/ScreenshotPreview.tsx","../../../node_modules/shared/src/utils.ts","../../../node_modules/lucide-react/src/defaultAttributes.ts","../../../node_modules/lucide-react/src/Icon.ts","../../../node_modules/lucide-react/src/createLucideIcon.ts","../../../node_modules/lucide-react/src/icons/camera.ts","../../../node_modules/lucide-react/src/icons/check.ts","../../../node_modules/lucide-react/src/icons/chevron-left.ts","../../../node_modules/lucide-react/src/icons/chevron-right.ts","../../../node_modules/lucide-react/src/icons/expand.ts","../../../node_modules/lucide-react/src/icons/flag.ts","../../../node_modules/lucide-react/src/icons/image.ts","../../../node_modules/lucide-react/src/icons/loader-circle.ts","../../../node_modules/lucide-react/src/icons/plus.ts","../../../node_modules/lucide-react/src/icons/refresh-cw.ts","../../../node_modules/lucide-react/src/icons/shrink.ts","../../../node_modules/lucide-react/src/icons/thumbs-up.ts","../../../node_modules/lucide-react/src/icons/x.ts","../src/types.ts","../src/index.ts"],"sourcesContent":["\"use client\";\n\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { createFeedbackClient } from \"@ewjdev/anyclick-core\";\nimport type {\n FeedbackClient,\n FeedbackType,\n ScreenshotData,\n} from \"@ewjdev/anyclick-core\";\nimport { FeedbackContext } from \"./context\";\nimport { ContextMenu } from \"./ContextMenu\";\nimport { findContainerParent } from \"./highlight\";\nimport type {\n FeedbackContextValue,\n FeedbackMenuItem,\n FeedbackProviderProps,\n} from \"./types\";\n\n/**\n * Default menu items\n */\nconst defaultMenuItems: FeedbackMenuItem[] = [\n { type: \"issue\", label: \"Report an issue\", showComment: true },\n { type: \"feature\", label: \"Request a feature\", showComment: true },\n { type: \"like\", label: \"I like this!\", showComment: false },\n];\n\n/**\n * FeedbackProvider component - wraps your app to enable feedback capture\n */\nexport function FeedbackProvider({\n adapter,\n children,\n targetFilter,\n menuItems = defaultMenuItems,\n maxInnerTextLength,\n maxOuterHTMLLength,\n maxAncestors,\n cooldownMs,\n stripAttributes,\n metadata,\n onSubmitSuccess,\n onSubmitError,\n menuStyle,\n menuClassName,\n disabled = false,\n highlightConfig,\n screenshotConfig,\n}: FeedbackProviderProps) {\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [menuVisible, setMenuVisible] = useState(false);\n const [menuPosition, setMenuPosition] = useState({ x: 0, y: 0 });\n const [targetElement, setTargetElement] = useState<Element | null>(null);\n const [containerElement, setContainerElement] = useState<Element | null>(\n null,\n );\n\n const clientRef = useRef<FeedbackClient | null>(null);\n\n // Create/update the feedback client\n useEffect(() => {\n const client = createFeedbackClient({\n adapter,\n targetFilter,\n maxInnerTextLength,\n maxOuterHTMLLength,\n maxAncestors,\n cooldownMs,\n stripAttributes,\n });\n\n // Set up callbacks\n client.onSubmitSuccess = onSubmitSuccess;\n client.onSubmitError = onSubmitError;\n\n // Set up context menu handler\n client.onContextMenu = (event, element) => {\n setTargetElement(element);\n // Find container element for screenshot capture\n const container = findContainerParent(element, highlightConfig);\n setContainerElement(container);\n setMenuPosition({ x: event.clientX, y: event.clientY });\n setMenuVisible(true);\n };\n\n clientRef.current = client;\n\n // Attach event listeners if not disabled\n if (!disabled) {\n client.attach();\n }\n\n return () => {\n client.detach();\n };\n }, [\n adapter,\n targetFilter,\n maxInnerTextLength,\n maxOuterHTMLLength,\n maxAncestors,\n cooldownMs,\n stripAttributes,\n onSubmitSuccess,\n onSubmitError,\n disabled,\n highlightConfig,\n ]);\n\n // Submit feedback with optional screenshots\n const submitFeedback = useCallback(\n async (\n element: Element,\n type: FeedbackType,\n comment?: string,\n screenshots?: ScreenshotData,\n ) => {\n const client = clientRef.current;\n if (!client) return;\n\n setIsSubmitting(true);\n try {\n await client.submitFeedback(element, type, {\n comment,\n metadata,\n screenshots,\n });\n } finally {\n setIsSubmitting(false);\n setMenuVisible(false);\n setTargetElement(null);\n setContainerElement(null);\n }\n },\n [metadata],\n );\n\n // Open menu programmatically\n const openMenu = useCallback(\n (element: Element, position: { x: number; y: number }) => {\n setTargetElement(element);\n const container = findContainerParent(element, highlightConfig);\n setContainerElement(container);\n setMenuPosition(position);\n setMenuVisible(true);\n },\n [highlightConfig],\n );\n\n // Close menu\n const closeMenu = useCallback(() => {\n setMenuVisible(false);\n setTargetElement(null);\n setContainerElement(null);\n }, []);\n\n // Handle menu selection\n const handleMenuSelect = useCallback(\n (type: FeedbackType, comment?: string, screenshots?: ScreenshotData) => {\n if (targetElement) {\n submitFeedback(targetElement, type, comment, screenshots);\n }\n },\n [targetElement, submitFeedback],\n );\n\n // Context value\n const contextValue: FeedbackContextValue = useMemo(\n () => ({\n isEnabled: !disabled,\n isSubmitting,\n submitFeedback,\n openMenu,\n closeMenu,\n }),\n [disabled, isSubmitting, submitFeedback, openMenu, closeMenu],\n );\n\n return (\n <FeedbackContext.Provider value={contextValue}>\n {children}\n <ContextMenu\n visible={menuVisible && !disabled}\n position={menuPosition}\n targetElement={targetElement}\n containerElement={containerElement}\n items={menuItems}\n onSelect={handleMenuSelect}\n onClose={closeMenu}\n isSubmitting={isSubmitting}\n style={menuStyle}\n className={menuClassName}\n highlightConfig={highlightConfig}\n screenshotConfig={screenshotConfig}\n />\n </FeedbackContext.Provider>\n );\n}\n","\"use client\";\n\nimport { createContext, useContext } from \"react\";\nimport type { FeedbackContextValue } from \"./types\";\n\n/**\n * React context for feedback functionality\n */\nexport const FeedbackContext = createContext<FeedbackContextValue | null>(null);\n\n/**\n * Hook to access feedback context\n * @throws Error if used outside of FeedbackProvider\n */\nexport function useFeedback(): FeedbackContextValue {\n const context = useContext(FeedbackContext);\n if (!context) {\n throw new Error(\"useFeedback must be used within a FeedbackProvider\");\n }\n return context;\n}\n","\"use client\";\n\nimport React, { useState, useRef, useEffect, useCallback } from \"react\";\nimport type { ContextMenuProps, FeedbackMenuItem } from \"./types\";\nimport type { FeedbackType, ScreenshotData } from \"@ewjdev/anyclick-core\";\nimport {\n captureAllScreenshots,\n isScreenshotSupported,\n DEFAULT_SCREENSHOT_CONFIG,\n} from \"@ewjdev/anyclick-core\";\nimport { menuStyles } from \"./styles\";\nimport { applyHighlights, clearHighlights } from \"./highlight\";\nimport { ScreenshotPreview } from \"./ScreenshotPreview\";\nimport {\n FlagIcon,\n PlusIcon,\n ThumbsUpIcon,\n ChevronRightIcon,\n ChevronLeftIcon,\n CameraIcon,\n} from \"lucide-react\";\n\n/**\n * Default icons for feedback types\n */\nconst defaultIcons: Record<string, React.ReactNode> = {\n issue: <FlagIcon className=\"w-4 h-4\" />,\n feature: <PlusIcon className=\"w-4 h-4\" />,\n like: <ThumbsUpIcon className=\"w-4 h-4\" />,\n};\n\n/**\n * Menu item component\n */\nfunction MenuItem({\n item,\n onClick,\n disabled,\n hasChildren,\n}: {\n item: FeedbackMenuItem;\n onClick: () => void;\n disabled: boolean;\n hasChildren?: boolean;\n}) {\n const [isHovered, setIsHovered] = useState(false);\n\n return (\n <button\n type=\"button\"\n onClick={onClick}\n disabled={disabled}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n style={{\n ...menuStyles.item,\n ...(isHovered ? menuStyles.itemHover : {}),\n ...(disabled ? { opacity: 0.5, cursor: \"not-allowed\" } : {}),\n }}\n >\n <span style={menuStyles.itemIcon}>\n {item.icon ?? defaultIcons[item.type]}\n </span>\n <span style={{ flex: 1 }}>{item.label}</span>\n {hasChildren && (\n <ChevronRightIcon\n className=\"w-4 h-4\"\n style={{ marginLeft: \"auto\", opacity: 0.5 }}\n />\n )}\n </button>\n );\n}\n\n/**\n * Back button for submenu navigation\n */\nfunction BackButton({ onClick }: { onClick: () => void }) {\n const [isHovered, setIsHovered] = useState(false);\n\n return (\n <button\n type=\"button\"\n onClick={onClick}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n style={{\n ...menuStyles.item,\n ...(isHovered ? menuStyles.itemHover : {}),\n borderBottom: \"1px solid #e5e5e5\",\n marginBottom: \"4px\",\n }}\n >\n <ChevronLeftIcon className=\"w-4 h-4\" style={{ opacity: 0.5 }} />\n <span style={{ opacity: 0.7 }}>Back</span>\n </button>\n );\n}\n\n/**\n * Comment form component\n */\nfunction CommentForm({\n onSubmit,\n onCancel,\n isSubmitting,\n}: {\n onSubmit: (comment: string) => void;\n onCancel: () => void;\n isSubmitting: boolean;\n}) {\n const [comment, setComment] = useState(\"\");\n const inputRef = useRef<HTMLTextAreaElement>(null);\n\n useEffect(() => {\n inputRef.current?.focus();\n }, []);\n\n const handleSubmit = () => {\n onSubmit(comment);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\" && (e.metaKey || e.ctrlKey)) {\n handleSubmit();\n } else if (e.key === \"Escape\") {\n onCancel();\n }\n };\n\n return (\n <div style={menuStyles.commentSection}>\n <textarea\n ref={inputRef}\n value={comment}\n onChange={(e) => setComment(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder=\"Add a comment (optional)...\"\n style={menuStyles.commentInput}\n disabled={isSubmitting}\n />\n <div style={menuStyles.buttonRow}>\n <button\n type=\"button\"\n onClick={onCancel}\n disabled={isSubmitting}\n style={{ ...menuStyles.button, ...menuStyles.cancelButton }}\n >\n Cancel\n </button>\n <button\n type=\"button\"\n onClick={handleSubmit}\n disabled={isSubmitting}\n style={{\n ...menuStyles.button,\n ...menuStyles.submitButton,\n ...(isSubmitting ? menuStyles.submitButtonDisabled : {}),\n }}\n >\n {isSubmitting ? \"Sending...\" : \"Send\"}\n </button>\n </div>\n </div>\n );\n}\n\n/** View states for the context menu */\ntype MenuView = \"menu\" | \"comment\" | \"screenshot-preview\";\n\n/**\n * Context menu component for selecting feedback type\n */\nexport function ContextMenu({\n visible,\n position,\n targetElement,\n containerElement,\n items,\n onSelect,\n onClose,\n isSubmitting,\n style,\n className,\n highlightConfig,\n screenshotConfig,\n}: ContextMenuProps) {\n const [selectedType, setSelectedType] = useState<FeedbackType | null>(null);\n const [currentView, setCurrentView] = useState<MenuView>(\"menu\");\n const [pendingComment, setPendingComment] = useState<string | undefined>();\n const [submenuStack, setSubmenuStack] = useState<FeedbackMenuItem[][]>([]);\n const [screenshots, setScreenshots] = useState<ScreenshotData | null>(null);\n const [isCapturing, setIsCapturing] = useState(false);\n const menuRef = useRef<HTMLDivElement>(null);\n\n // Merge screenshot config with defaults\n const mergedScreenshotConfig = {\n ...DEFAULT_SCREENSHOT_CONFIG,\n ...screenshotConfig,\n };\n\n const showPreview =\n mergedScreenshotConfig.showPreview && isScreenshotSupported();\n\n // Current items to display (either root items or submenu items)\n const currentItems =\n submenuStack.length > 0 ? submenuStack[submenuStack.length - 1] : items;\n\n // Capture screenshots\n const captureScreenshots = useCallback(async () => {\n if (!targetElement || !showPreview) return;\n\n setIsCapturing(true);\n try {\n const captured = await captureAllScreenshots(\n targetElement,\n containerElement,\n mergedScreenshotConfig,\n );\n setScreenshots(captured);\n } catch (error) {\n console.error(\"Failed to capture screenshots:\", error);\n setScreenshots(null);\n } finally {\n setIsCapturing(false);\n }\n }, [targetElement, containerElement, mergedScreenshotConfig, showPreview]);\n\n // Reset state when menu closes\n useEffect(() => {\n if (!visible) {\n setSelectedType(null);\n setCurrentView(\"menu\");\n setPendingComment(undefined);\n setSubmenuStack([]);\n setScreenshots(null);\n setIsCapturing(false);\n }\n }, [visible]);\n\n // Apply highlights to target element and container when menu opens\n useEffect(() => {\n if (visible && targetElement) {\n // Clear any existing highlights first to ensure clean state\n clearHighlights();\n // Apply highlights to the new target element\n applyHighlights(targetElement, highlightConfig);\n } else {\n // Clear highlights when menu is not visible\n clearHighlights();\n }\n\n return () => {\n clearHighlights();\n };\n }, [visible, targetElement, highlightConfig]);\n\n // Close menu when clicking outside of it\n useEffect(() => {\n if (!visible) {\n return;\n }\n\n const handlePointerDown = (event: PointerEvent) => {\n if (!menuRef.current) return;\n\n const target = event.target as Node;\n if (!menuRef.current.contains(target)) {\n onClose();\n }\n };\n\n document.addEventListener(\"pointerdown\", handlePointerDown);\n return () => {\n document.removeEventListener(\"pointerdown\", handlePointerDown);\n };\n }, [visible, onClose]);\n\n // Adjust position to stay within viewport\n useEffect(() => {\n if (visible && menuRef.current) {\n const rect = menuRef.current.getBoundingClientRect();\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n\n let adjustedX = position.x;\n let adjustedY = position.y;\n\n if (position.x + rect.width > viewportWidth) {\n adjustedX = viewportWidth - rect.width - 10;\n }\n if (position.y + rect.height > viewportHeight) {\n adjustedY = viewportHeight - rect.height - 10;\n }\n\n if (adjustedX !== position.x || adjustedY !== position.y) {\n menuRef.current.style.left = `${adjustedX}px`;\n menuRef.current.style.top = `${adjustedY}px`;\n }\n }\n }, [visible, position]);\n\n // Handle escape key\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") {\n if (currentView === \"screenshot-preview\") {\n setCurrentView(\"comment\");\n } else if (currentView === \"comment\") {\n setCurrentView(\"menu\");\n setSelectedType(null);\n setPendingComment(undefined);\n } else if (submenuStack.length > 0) {\n // Go back one level in submenu\n setSubmenuStack((prev) => prev.slice(0, -1));\n } else {\n onClose();\n }\n }\n };\n\n if (visible) {\n document.addEventListener(\"keydown\", handleKeyDown);\n return () => document.removeEventListener(\"keydown\", handleKeyDown);\n }\n }, [visible, currentView, submenuStack.length, onClose]);\n\n if (!visible || !targetElement) {\n return null;\n }\n\n const handleItemClick = (item: FeedbackMenuItem) => {\n // If item has children, navigate to submenu\n if (item.children && item.children.length > 0) {\n setSubmenuStack((prev) => [...prev, item.children!]);\n return;\n }\n\n // Otherwise, handle selection\n if (item.showComment) {\n setSelectedType(item.type);\n setCurrentView(\"comment\");\n } else {\n // If preview is enabled, capture and show preview\n if (showPreview) {\n setSelectedType(item.type);\n setCurrentView(\"screenshot-preview\");\n captureScreenshots();\n } else {\n onSelect(item.type);\n }\n }\n };\n\n const handleBack = () => {\n setSubmenuStack((prev) => prev.slice(0, -1));\n };\n\n const handleCommentSubmit = (comment: string) => {\n if (!selectedType) return;\n\n // If preview is enabled, capture and show preview\n if (showPreview) {\n setPendingComment(comment || undefined);\n setCurrentView(\"screenshot-preview\");\n captureScreenshots();\n } else {\n onSelect(selectedType, comment || undefined);\n }\n };\n\n const handleCommentCancel = () => {\n setCurrentView(\"menu\");\n setSelectedType(null);\n setPendingComment(undefined);\n };\n\n const handleScreenshotConfirm = (confirmedScreenshots: ScreenshotData) => {\n if (selectedType) {\n onSelect(selectedType, pendingComment, confirmedScreenshots);\n }\n };\n\n const handleScreenshotCancel = () => {\n // Go back to comment or menu\n if (pendingComment !== undefined) {\n setCurrentView(\"comment\");\n } else {\n setCurrentView(\"menu\");\n setSelectedType(null);\n }\n setScreenshots(null);\n };\n\n const handleRetakeScreenshots = () => {\n captureScreenshots();\n };\n\n // Determine container width based on view\n const containerWidth = currentView === \"screenshot-preview\" ? 360 : undefined;\n\n return (\n <div\n ref={menuRef}\n className={className}\n style={{\n ...menuStyles.container,\n left: position.x,\n top: position.y,\n ...(containerWidth\n ? { width: containerWidth, minWidth: containerWidth }\n : {}),\n ...style,\n }}\n role=\"menu\"\n aria-label=\"Feedback options\"\n >\n <div style={menuStyles.header}>\n {currentView === \"screenshot-preview\"\n ? \"Review Screenshots\"\n : \"Send Feedback\"}\n </div>\n\n {currentView === \"menu\" && (\n <div style={menuStyles.itemList}>\n {submenuStack.length > 0 && <BackButton onClick={handleBack} />}\n {currentItems.map((item) => (\n <MenuItem\n key={item.type}\n item={item}\n onClick={() => handleItemClick(item)}\n disabled={isSubmitting}\n hasChildren={item.children && item.children.length > 0}\n />\n ))}\n {showPreview && (\n <div style={screenshotIndicatorStyle}>\n <CameraIcon className=\"w-3 h-3\" />\n <span>Screenshots will be captured</span>\n </div>\n )}\n </div>\n )}\n\n {currentView === \"comment\" && (\n <CommentForm\n onSubmit={handleCommentSubmit}\n onCancel={handleCommentCancel}\n isSubmitting={isSubmitting}\n />\n )}\n\n {currentView === \"screenshot-preview\" && (\n <ScreenshotPreview\n screenshots={screenshots}\n isLoading={isCapturing}\n onConfirm={handleScreenshotConfirm}\n onCancel={handleScreenshotCancel}\n onRetake={handleRetakeScreenshots}\n isSubmitting={isSubmitting}\n />\n )}\n </div>\n );\n}\n\nconst screenshotIndicatorStyle: React.CSSProperties = {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"6px\",\n padding: \"8px 12px\",\n fontSize: \"11px\",\n color: \"#9ca3af\",\n borderTop: \"1px solid #f3f4f6\",\n marginTop: \"4px\",\n};\n","import type { CSSProperties } from \"react\";\n\nexport const menuStyles: Record<string, CSSProperties> = {\n overlay: {\n position: \"fixed\",\n inset: 0,\n zIndex: 9998,\n },\n container: {\n position: \"fixed\",\n zIndex: 9999,\n minWidth: \"200px\",\n backgroundColor: \"#ffffff\",\n borderRadius: \"8px\",\n boxShadow: \"0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05)\",\n overflow: \"hidden\",\n fontFamily:\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n fontSize: \"14px\",\n },\n header: {\n padding: \"12px 16px\",\n borderBottom: \"1px solid #e5e5e5\",\n color: \"#666\",\n fontSize: \"12px\",\n fontWeight: 500,\n textTransform: \"uppercase\" as const,\n letterSpacing: \"0.5px\",\n },\n itemList: {\n padding: \"4px 0\",\n },\n item: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"10px\",\n padding: \"10px 16px\",\n cursor: \"pointer\",\n transition: \"background-color 0.15s\",\n color: \"#333\",\n border: \"none\",\n background: \"none\",\n width: \"100%\",\n textAlign: \"left\" as const,\n fontSize: \"14px\",\n },\n itemHover: {\n backgroundColor: \"#f5f5f5\",\n },\n itemIcon: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"20px\",\n height: \"20px\",\n fontSize: \"16px\",\n },\n commentSection: {\n padding: \"12px 16px\",\n borderTop: \"1px solid #e5e5e5\",\n },\n commentInput: {\n width: \"100%\",\n minHeight: \"60px\",\n padding: \"8px 12px\",\n border: \"1px solid #ddd\",\n borderRadius: \"6px\",\n fontSize: \"14px\",\n fontFamily: \"inherit\",\n resize: \"vertical\" as const,\n outline: \"none\",\n boxSizing: \"border-box\" as const,\n },\n buttonRow: {\n display: \"flex\",\n justifyContent: \"flex-end\",\n gap: \"8px\",\n marginTop: \"8px\",\n },\n button: {\n padding: \"6px 12px\",\n borderRadius: \"6px\",\n fontSize: \"13px\",\n fontWeight: 500,\n cursor: \"pointer\",\n transition: \"background-color 0.15s, opacity 0.15s\",\n border: \"none\",\n },\n cancelButton: {\n backgroundColor: \"#f0f0f0\",\n color: \"#666\",\n display: \"flex\",\n alignItems: \"center\",\n gap: \"2px\",\n },\n submitButton: {\n backgroundColor: \"#0066cc\",\n color: \"#ffffff\",\n display: \"flex\",\n alignItems: \"center\",\n gap: \"2px\",\n },\n submitButtonDisabled: {\n opacity: 0.6,\n cursor: \"not-allowed\",\n },\n};\n\n// Dark mode styles\nexport const darkMenuStyles: Record<string, CSSProperties> = {\n container: {\n ...menuStyles.container,\n backgroundColor: \"#1a1a1a\",\n boxShadow:\n \"0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1)\",\n },\n header: {\n ...menuStyles.header,\n borderBottom: \"1px solid #333\",\n color: \"#888\",\n },\n item: {\n ...menuStyles.item,\n color: \"#e0e0e0\",\n },\n itemHover: {\n backgroundColor: \"#2a2a2a\",\n },\n commentSection: {\n ...menuStyles.commentSection,\n borderTop: \"1px solid #333\",\n },\n commentInput: {\n ...menuStyles.commentInput,\n backgroundColor: \"#2a2a2a\",\n border: \"1px solid #444\",\n color: \"#e0e0e0\",\n },\n cancelButton: {\n ...menuStyles.cancelButton,\n backgroundColor: \"#333\",\n color: \"#ccc\",\n },\n};\n","/**\n * Highlight utilities for feedback target elements\n */\n\nimport type { HighlightConfig, HighlightColors } from \"./types\";\n\nconst HIGHLIGHT_TARGET_CLASS = \"uifeedback-highlight-target\";\nconst HIGHLIGHT_CONTAINER_CLASS = \"uifeedback-highlight-container\";\nconst STYLE_ID = \"uifeedback-highlight-styles\";\n\n/**\n * Default highlight colors\n */\nexport const defaultHighlightColors: Required<HighlightColors> = {\n targetColor: \"#3b82f6\",\n containerColor: \"#8b5cf6\",\n targetShadowOpacity: 0.25,\n containerShadowOpacity: 0.1,\n};\n\n/**\n * Default container selectors\n */\nexport const defaultContainerSelectors: string[] = [\n \".container\",\n \".card\",\n \".panel\",\n \".section\",\n \".wrapper\",\n \".box\",\n \".modal\",\n \".dialog\",\n \".drawer\",\n '[role=\"dialog\"]',\n '[role=\"region\"]',\n '[role=\"article\"]',\n '[role=\"main\"]',\n \"article\",\n \"section\",\n \"main\",\n \"aside\",\n \"nav\",\n \"header\",\n \"footer\",\n];\n\n/**\n * Generate CSS for highlight effects based on configuration\n */\nfunction generateHighlightCSS(colors: Required<HighlightColors>): string {\n const { targetColor, containerColor, targetShadowOpacity, containerShadowOpacity } = colors;\n \n // Convert hex to rgba for shadows\n const hexToRgba = (hex: string, alpha: number): string => {\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n if (!result) return `rgba(0, 0, 0, ${alpha})`;\n return `rgba(${parseInt(result[1], 16)}, ${parseInt(result[2], 16)}, ${parseInt(result[3], 16)}, ${alpha})`;\n };\n\n return `\n.${HIGHLIGHT_TARGET_CLASS} {\n outline: 2px solid ${targetColor} !important;\n outline-offset: 2px !important;\n box-shadow: 0 0 0 4px ${hexToRgba(targetColor, targetShadowOpacity)}, 0 4px 12px ${hexToRgba(targetColor, targetShadowOpacity * 0.6)} !important;\n border-radius: 4px !important;\n position: relative;\n z-index: 9997;\n}\n\n.${HIGHLIGHT_CONTAINER_CLASS} {\n outline: 2px dashed ${hexToRgba(containerColor, 0.6)} !important;\n outline-offset: 4px !important;\n box-shadow: 0 0 0 6px ${hexToRgba(containerColor, containerShadowOpacity)} !important;\n border-radius: 6px !important;\n position: relative;\n z-index: 9996;\n}\n`;\n}\n\n/**\n * Inject or update highlight styles in document head\n */\nfunction injectStyles(colors: Required<HighlightColors>): void {\n if (typeof document === \"undefined\") return;\n\n // Remove existing styles if present\n const existingStyle = document.getElementById(STYLE_ID);\n if (existingStyle) {\n existingStyle.remove();\n }\n\n const style = document.createElement(\"style\");\n style.id = STYLE_ID;\n style.textContent = generateHighlightCSS(colors);\n document.head.appendChild(style);\n}\n\n/**\n * Find the closest container parent element\n */\nexport function findContainerParent(\n element: Element,\n config?: HighlightConfig,\n): Element | null {\n const containerSelectors = config?.containerSelectors ?? defaultContainerSelectors;\n const minChildren = config?.minChildrenForContainer ?? 2;\n\n let current = element.parentElement;\n let fallbackContainer: Element | null = null;\n\n while (current && current !== document.body) {\n // Check if element matches any container selector\n for (const selector of containerSelectors) {\n try {\n if (current.matches(selector)) {\n return current;\n }\n } catch {\n // Invalid selector, skip\n }\n }\n\n // Check if parent has multiple meaningful children (not just text nodes)\n const meaningfulChildren = Array.from(current.children).filter((child) => {\n const tag = child.tagName.toLowerCase();\n // Exclude script, style, and hidden elements\n if (tag === \"script\" || tag === \"style\" || tag === \"noscript\") {\n return false;\n }\n // Check if element is visible\n const style = window.getComputedStyle(child);\n if (style.display === \"none\" || style.visibility === \"hidden\") {\n return false;\n }\n return true;\n });\n\n // If this parent has enough children, it's likely a container\n if (meaningfulChildren.length >= minChildren && !fallbackContainer) {\n fallbackContainer = current;\n }\n\n // If parent has 3+ children, strongly consider it a container\n if (meaningfulChildren.length >= 3) {\n return current;\n }\n\n current = current.parentElement;\n }\n\n return fallbackContainer;\n}\n\n/**\n * Apply highlight to target element\n */\nexport function highlightTarget(element: Element, colors?: HighlightColors): void {\n const mergedColors = { ...defaultHighlightColors, ...colors };\n injectStyles(mergedColors);\n element.classList.add(HIGHLIGHT_TARGET_CLASS);\n}\n\n/**\n * Apply highlight to container element\n */\nexport function highlightContainer(element: Element, colors?: HighlightColors): void {\n const mergedColors = { ...defaultHighlightColors, ...colors };\n injectStyles(mergedColors);\n element.classList.add(HIGHLIGHT_CONTAINER_CLASS);\n}\n\n/**\n * Remove all highlights from the document\n */\nexport function clearHighlights(): void {\n if (typeof document === \"undefined\") return;\n\n document.querySelectorAll(`.${HIGHLIGHT_TARGET_CLASS}`).forEach((el) => {\n el.classList.remove(HIGHLIGHT_TARGET_CLASS);\n });\n\n document.querySelectorAll(`.${HIGHLIGHT_CONTAINER_CLASS}`).forEach((el) => {\n el.classList.remove(HIGHLIGHT_CONTAINER_CLASS);\n });\n}\n\n/**\n * Apply highlights to target element and its container parent\n */\nexport function applyHighlights(\n targetElement: Element,\n config?: HighlightConfig,\n): {\n target: Element;\n container: Element | null;\n} {\n // If highlights are disabled, don't apply anything\n if (config?.enabled === false) {\n return { target: targetElement, container: null };\n }\n\n clearHighlights();\n\n const colors = { ...defaultHighlightColors, ...config?.colors };\n \n highlightTarget(targetElement, colors);\n\n const container = findContainerParent(targetElement, config);\n if (container && container !== targetElement) {\n highlightContainer(container, colors);\n }\n\n return { target: targetElement, container };\n}\n","\"use client\";\n\nimport React, { useState } from \"react\";\nimport type { ScreenshotData } from \"@ewjdev/anyclick-core\";\nimport { formatBytes, estimateTotalSize } from \"@ewjdev/anyclick-core\";\nimport type { ScreenshotPreviewProps } from \"./types\";\nimport { menuStyles } from \"./styles\";\nimport {\n ImageIcon,\n RefreshCwIcon,\n CheckIcon,\n XIcon,\n Loader2Icon,\n ExpandIcon,\n ShrinkIcon,\n} from \"lucide-react\";\n\ntype TabType = \"element\" | \"container\" | \"viewport\";\n\n/**\n * Screenshot preview component - shows captured screenshots before sending\n */\nexport function ScreenshotPreview({\n screenshots,\n isLoading,\n onConfirm,\n onCancel,\n onRetake,\n isSubmitting,\n}: ScreenshotPreviewProps) {\n const [activeTab, setActiveTab] = useState<TabType>(\"element\");\n const [isExpanded, setIsExpanded] = useState(false);\n\n if (isLoading) {\n return (\n <div style={styles.container}>\n <div style={styles.loadingContainer}>\n <Loader2Icon\n className=\"w-6 h-6 animate-spin\"\n style={{ color: \"#3b82f6\" }}\n />\n <span style={styles.loadingText}>Capturing screenshots...</span>\n </div>\n </div>\n );\n }\n\n if (!screenshots) {\n return (\n <div style={styles.container}>\n <div style={styles.emptyContainer}>\n <ImageIcon className=\"w-8 h-8\" style={{ color: \"#9ca3af\" }} />\n <span style={styles.emptyText}>No screenshots captured</span>\n <button\n type=\"button\"\n onClick={onRetake}\n style={styles.retakeButton}\n disabled={isSubmitting}\n >\n <RefreshCwIcon className=\"w-4 h-4\" />\n Capture Screenshots\n </button>\n </div>\n </div>\n );\n }\n\n const allTabs: {\n key: TabType;\n label: string;\n data: typeof screenshots.element;\n }[] = [\n { key: \"element\" as const, label: \"Element\", data: screenshots.element },\n {\n key: \"container\" as const,\n label: \"Container\",\n data: screenshots.container,\n },\n { key: \"viewport\" as const, label: \"Viewport\", data: screenshots.viewport },\n ];\n const tabs = allTabs.filter((tab) => tab.data);\n\n const activeScreenshot =\n activeTab === \"element\"\n ? screenshots.element\n : activeTab === \"container\"\n ? screenshots.container\n : screenshots.viewport;\n\n const totalSize = estimateTotalSize(screenshots);\n\n return (\n <div\n style={{\n ...styles.container,\n ...(isExpanded ? styles.containerExpanded : {}),\n }}\n >\n <div style={styles.header}>\n <span style={styles.headerTitle}>Screenshot Preview</span>\n <div style={styles.headerActions}>\n <span style={styles.sizeLabel}>{formatBytes(totalSize)}</span>\n <button\n type=\"button\"\n onClick={() => setIsExpanded(!isExpanded)}\n style={styles.iconButton}\n title={isExpanded ? \"Collapse\" : \"Expand\"}\n >\n {isExpanded ? (\n <ShrinkIcon className=\"w-4 h-4\" />\n ) : (\n <ExpandIcon className=\"w-4 h-4\" />\n )}\n </button>\n </div>\n </div>\n\n {/* Tabs */}\n <div style={styles.tabContainer}>\n {tabs.map((tab) => (\n <button\n key={tab.key}\n type=\"button\"\n onClick={() => setActiveTab(tab.key)}\n style={{\n ...styles.tab,\n ...(activeTab === tab.key ? styles.tabActive : {}),\n }}\n >\n {tab.label}\n {tab.data && (\n <span style={styles.tabSize}>\n {formatBytes(tab.data.sizeBytes)}\n </span>\n )}\n </button>\n ))}\n </div>\n\n {/* Preview image */}\n <div\n style={{\n ...styles.previewContainer,\n ...(isExpanded ? styles.previewContainerExpanded : {}),\n }}\n >\n {activeScreenshot ? (\n <img\n src={activeScreenshot.dataUrl}\n alt={`${activeTab} screenshot`}\n style={styles.previewImage}\n />\n ) : (\n <div style={styles.noPreview}>\n <ImageIcon className=\"w-6 h-6\" style={{ color: \"#9ca3af\" }} />\n <span>No {activeTab} screenshot</span>\n </div>\n )}\n </div>\n\n {/* Dimensions info */}\n {activeScreenshot && (\n <div style={styles.dimensionsInfo}>\n {activeScreenshot.width} × {activeScreenshot.height}px\n </div>\n )}\n\n {/* Actions */}\n <div style={styles.actions}>\n <button\n type=\"button\"\n onClick={onRetake}\n disabled={isSubmitting}\n style={styles.retakeButtonSmall}\n >\n <RefreshCwIcon className=\"w-3 h-3\" />\n Retake\n </button>\n <div style={styles.actionsRight}>\n <button\n type=\"button\"\n onClick={onCancel}\n disabled={isSubmitting}\n className=\"flex items-center gap-1\"\n style={{ ...menuStyles.button, ...menuStyles.cancelButton }}\n >\n <XIcon className=\"w-3 h-3\" />\n Cancel\n </button>\n <button\n type=\"button\"\n onClick={() => onConfirm(screenshots)}\n disabled={isSubmitting}\n style={{\n ...menuStyles.button,\n ...menuStyles.submitButton,\n ...(isSubmitting ? menuStyles.submitButtonDisabled : {}),\n }}\n >\n {isSubmitting ? (\n <>\n <Loader2Icon className=\"w-3 h-3 animate-spin\" />\n Sending...\n </>\n ) : (\n <>\n <CheckIcon className=\"w-3 h-3\" />\n Send\n </>\n )}\n </button>\n </div>\n </div>\n </div>\n );\n}\n\nconst styles: Record<string, React.CSSProperties> = {\n container: {\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"8px\",\n },\n containerExpanded: {\n position: \"fixed\",\n top: \"50%\",\n left: \"50%\",\n transform: \"translate(-50%, -50%)\",\n width: \"90vw\",\n maxWidth: \"800px\",\n maxHeight: \"90vh\",\n backgroundColor: \"#fff\",\n borderRadius: \"12px\",\n boxShadow: \"0 25px 50px -12px rgba(0, 0, 0, 0.25)\",\n padding: \"16px\",\n zIndex: 10000,\n },\n loadingContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"12px\",\n padding: \"24px\",\n },\n loadingText: {\n fontSize: \"13px\",\n color: \"#6b7280\",\n },\n emptyContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"8px\",\n padding: \"24px\",\n },\n emptyText: {\n fontSize: \"13px\",\n color: \"#9ca3af\",\n },\n header: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n padding: \"0 4px\",\n },\n headerTitle: {\n fontSize: \"12px\",\n fontWeight: \"600\",\n color: \"#374151\",\n textTransform: \"uppercase\" as const,\n letterSpacing: \"0.05em\",\n },\n headerActions: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n },\n sizeLabel: {\n fontSize: \"11px\",\n color: \"#9ca3af\",\n },\n iconButton: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"24px\",\n height: \"24px\",\n border: \"none\",\n background: \"transparent\",\n borderRadius: \"4px\",\n cursor: \"pointer\",\n color: \"#6b7280\",\n },\n tabContainer: {\n display: \"flex\",\n gap: \"4px\",\n borderBottom: \"1px solid #e5e7eb\",\n paddingBottom: \"8px\",\n },\n tab: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"4px\",\n padding: \"6px 10px\",\n fontSize: \"12px\",\n color: \"#6b7280\",\n background: \"transparent\",\n border: \"none\",\n borderRadius: \"4px\",\n cursor: \"pointer\",\n transition: \"all 0.15s ease\",\n },\n tabActive: {\n backgroundColor: \"#eff6ff\",\n color: \"#3b82f6\",\n fontWeight: \"500\",\n },\n tabSize: {\n fontSize: \"10px\",\n color: \"#9ca3af\",\n },\n previewContainer: {\n position: \"relative\",\n width: \"100%\",\n height: \"150px\",\n backgroundColor: \"#f9fafb\",\n borderRadius: \"8px\",\n overflow: \"hidden\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n previewContainerExpanded: {\n height: \"60vh\",\n maxHeight: \"500px\",\n },\n previewImage: {\n maxWidth: \"100%\",\n maxHeight: \"100%\",\n objectFit: \"contain\",\n },\n noPreview: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n gap: \"8px\",\n fontSize: \"12px\",\n color: \"#9ca3af\",\n },\n dimensionsInfo: {\n fontSize: \"11px\",\n color: \"#9ca3af\",\n textAlign: \"center\" as const,\n },\n actions: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n paddingTop: \"8px\",\n borderTop: \"1px solid #e5e7eb\",\n },\n actionsRight: {\n display: \"flex\",\n gap: \"8px\",\n },\n retakeButton: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"6px\",\n padding: \"8px 16px\",\n fontSize: \"13px\",\n color: \"#fff\",\n backgroundColor: \"#3b82f6\",\n border: \"none\",\n borderRadius: \"6px\",\n cursor: \"pointer\",\n fontWeight: \"500\",\n },\n retakeButtonSmall: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"4px\",\n padding: \"4px 8px\",\n fontSize: \"11px\",\n color: \"#6b7280\",\n backgroundColor: \"transparent\",\n border: \"1px solid #e5e7eb\",\n borderRadius: \"4px\",\n cursor: \"pointer\",\n },\n};\n","import { CamelToPascal } from './utility-types';\n\n/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts string to camel case\n *\n * @param {string} string\n * @returns {string} A camelized string\n */\nexport const toCamelCase = <T extends string>(string: T) =>\n string.replace(/^([A-Z])|[\\s-_]+(\\w)/g, (match, p1, p2) =>\n p2 ? p2.toUpperCase() : p1.toLowerCase(),\n );\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = toCamelCase(string);\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n\n/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return (\n Boolean(className) &&\n (className as string).trim() !== '' &&\n array.indexOf(className) === index\n );\n })\n .join(' ')\n .trim();\n\n/**\n * Is empty string\n *\n * @param {unknown} value\n * @returns {boolean} Whether the value is an empty string\n */\nexport const isEmptyString = (value: unknown): boolean => value === '';\n\n/**\n * Check if a component has an accessibility prop\n *\n * @param {object} props\n * @returns {boolean} Whether the component has an accessibility prop\n */\nexport const hasA11yProp = (props: Record<string, any>) => {\n for (const prop in props) {\n if (prop.startsWith('aria-') || prop === 'role' || prop === 'title') {\n return true;\n }\n }\n};\n","export default {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 2,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n};\n","import { createElement, forwardRef } from 'react';\nimport defaultAttributes from './defaultAttributes';\nimport { IconNode, LucideProps } from './types';\nimport { mergeClasses, hasA11yProp } from '@lucide/shared';\n\ninterface IconComponentProps extends LucideProps {\n iconNode: IconNode;\n}\n\n/**\n * Lucide icon component\n *\n * @component Icon\n * @param {object} props\n * @param {string} props.color - The color of the icon\n * @param {number} props.size - The size of the icon\n * @param {number} props.strokeWidth - The stroke width of the icon\n * @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width\n * @param {string} props.className - The class name of the icon\n * @param {IconNode} props.children - The children of the icon\n * @param {IconNode} props.iconNode - The icon node of the icon\n *\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst Icon = forwardRef<SVGSVGElement, IconComponentProps>(\n (\n {\n color = 'currentColor',\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = '',\n children,\n iconNode,\n ...rest\n },\n ref,\n ) =>\n createElement(\n 'svg',\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? (Number(strokeWidth) * 24) / Number(size) : strokeWidth,\n className: mergeClasses('lucide', className),\n ...(!children && !hasA11yProp(rest) && { 'aria-hidden': 'true' }),\n ...rest,\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ],\n ),\n);\n\nexport default Icon;\n","import { createElement, forwardRef } from 'react';\nimport { mergeClasses, toKebabCase, toPascalCase } from '@lucide/shared';\nimport { IconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Create a Lucide icon component\n * @param {string} iconName\n * @param {array} iconNode\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst createLucideIcon = (iconName: string, iconNode: IconNode) => {\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className,\n ),\n ...props,\n }),\n );\n\n Component.displayName = toPascalCase(iconName);\n\n return Component;\n};\n\nexport default createLucideIcon;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z',\n key: '18u6gg',\n },\n ],\n ['circle', { cx: '12', cy: '13', r: '3', key: '1vg3eu' }],\n];\n\n/**\n * @component @name Camera\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/camera\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Camera = createLucideIcon('camera', __iconNode);\n\nexport default Camera;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'M20 6 9 17l-5-5', key: '1gmf2c' }]];\n\n/**\n * @component @name Check\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/check\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Check = createLucideIcon('check', __iconNode);\n\nexport default Check;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'm15 18-6-6 6-6', key: '1wnfg3' }]];\n\n/**\n * @component @name ChevronLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/chevron-left\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronLeft = createLucideIcon('chevron-left', __iconNode);\n\nexport default ChevronLeft;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'm9 18 6-6-6-6', key: 'mthhwq' }]];\n\n/**\n * @component @name ChevronRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/chevron-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronRight = createLucideIcon('chevron-right', __iconNode);\n\nexport default ChevronRight;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm15 15 6 6', key: '1s409w' }],\n ['path', { d: 'm15 9 6-6', key: 'ko1vev' }],\n ['path', { d: 'M21 16v5h-5', key: '1ck2sf' }],\n ['path', { d: 'M21 8V3h-5', key: '1qoq8a' }],\n ['path', { d: 'M3 16v5h5', key: '1t08am' }],\n ['path', { d: 'm3 21 6-6', key: 'wwnumi' }],\n ['path', { d: 'M3 8V3h5', key: '1ln10m' }],\n ['path', { d: 'M9 9 3 3', key: 'v551iv' }],\n];\n\n/**\n * @component @name Expand\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/expand\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Expand = createLucideIcon('expand', __iconNode);\n\nexport default Expand;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528',\n key: '1jaruq',\n },\n ],\n];\n\n/**\n * @component @name Flag\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/flag\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Flag = createLucideIcon('flag', __iconNode);\n\nexport default Flag;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n ['path', { d: 'm21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21', key: '1xmnt7' }],\n];\n\n/**\n * @component @name Image\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/image\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Image = createLucideIcon('image', __iconNode);\n\nexport default Image;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'M21 12a9 9 0 1 1-6.219-8.56', key: '13zald' }]];\n\n/**\n * @component @name LoaderCircle\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/loader-circle\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst LoaderCircle = createLucideIcon('loader-circle', __iconNode);\n\nexport default LoaderCircle;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M5 12h14', key: '1ays0h' }],\n ['path', { d: 'M12 5v14', key: 's699le' }],\n];\n\n/**\n * @component @name Plus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Plus = createLucideIcon('plus', __iconNode);\n\nexport default Plus;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8', key: 'v9h5vc' }],\n ['path', { d: 'M21 3v5h-5', key: '1q7to0' }],\n ['path', { d: 'M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16', key: '3uifl3' }],\n ['path', { d: 'M8 16H3v5', key: '1cv678' }],\n];\n\n/**\n * @component @name RefreshCw\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/refresh-cw\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst RefreshCw = createLucideIcon('refresh-cw', __iconNode);\n\nexport default RefreshCw;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm15 15 6 6m-6-6v4.8m0-4.8h4.8', key: '17vawe' }],\n ['path', { d: 'M9 19.8V15m0 0H4.2M9 15l-6 6', key: 'chjx8e' }],\n ['path', { d: 'M15 4.2V9m0 0h4.8M15 9l6-6', key: 'lav6yq' }],\n ['path', { d: 'M9 4.2V9m0 0H4.2M9 9 3 3', key: '1pxi2q' }],\n];\n\n/**\n * @component @name Shrink\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/shrink\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Shrink = createLucideIcon('shrink', __iconNode);\n\nexport default Shrink;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M7 10v12', key: '1qc93n' }],\n [\n 'path',\n {\n d: 'M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z',\n key: 'emmmcr',\n },\n ],\n];\n\n/**\n * @component @name ThumbsUp\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/thumbs-up\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ThumbsUp = createLucideIcon('thumbs-up', __iconNode);\n\nexport default ThumbsUp;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M18 6 6 18', key: '1bl5f8' }],\n ['path', { d: 'm6 6 12 12', key: 'd8bk6v' }],\n];\n\n/**\n * @component @name X\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/x\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst X = createLucideIcon('x', __iconNode);\n\nexport default X;\n","import type {\n FeedbackAdapter,\n FeedbackPayload,\n FeedbackType,\n ScreenshotConfig,\n ScreenshotData,\n} from \"@ewjdev/anyclick-core\";\nimport type { ReactNode, CSSProperties } from \"react\";\n\n/**\n * Configuration for highlight colors\n */\nexport interface HighlightColors {\n /** Color for the target element highlight (default: #3b82f6 - blue) */\n targetColor?: string;\n /** Color for the container element highlight (default: #8b5cf6 - purple) */\n containerColor?: string;\n /** Opacity for the target shadow (default: 0.25) */\n targetShadowOpacity?: number;\n /** Opacity for the container shadow (default: 0.1) */\n containerShadowOpacity?: number;\n}\n\n/**\n * Configuration for highlight behavior\n */\nexport interface HighlightConfig {\n /** Whether to show highlights (default: true) */\n enabled?: boolean;\n /** Custom colors for highlights */\n colors?: HighlightColors;\n /** CSS selectors to identify container elements */\n containerSelectors?: string[];\n /** Minimum number of children for an element to be considered a container (default: 2) */\n minChildrenForContainer?: number;\n}\n\n/**\n * Menu item displayed in the feedback context menu\n */\nexport interface FeedbackMenuItem {\n /** Feedback type for this option (use unique identifier for parent items with children) */\n type: FeedbackType;\n /** Display label */\n label: string;\n /** Optional icon */\n icon?: ReactNode;\n /** Whether to show a comment input for this type */\n showComment?: boolean;\n /** Optional role(s) required to see this menu item */\n requiredRoles?: string[];\n /** Child menu items (creates a submenu) */\n children?: FeedbackMenuItem[];\n}\n\n/**\n * User context for role-based menu filtering\n */\nexport interface FeedbackUserContext {\n /** User's role(s) */\n roles?: string[];\n /** User ID */\n id?: string;\n /** User email */\n email?: string;\n}\n\n/**\n * Filter menu items based on user context\n */\nexport function filterMenuItemsByRole(\n items: FeedbackMenuItem[],\n userContext?: FeedbackUserContext,\n): FeedbackMenuItem[] {\n if (!userContext) {\n // If no user context, only show items without required roles\n return items.filter(\n (item) => !item.requiredRoles || item.requiredRoles.length === 0,\n );\n }\n\n const userRoles = userContext.roles ?? [];\n\n return items.filter((item) => {\n // If no required roles, show to everyone\n if (!item.requiredRoles || item.requiredRoles.length === 0) {\n return true;\n }\n // Check if user has any of the required roles\n return item.requiredRoles.some((role) => userRoles.includes(role));\n });\n}\n\n/**\n * Props for the FeedbackProvider component\n */\nexport interface FeedbackProviderProps {\n /** The adapter to use for submitting feedback */\n adapter: FeedbackAdapter;\n /** Child components */\n children: ReactNode;\n /**\n * Filter function to determine if feedback should be captured for a target element\n * Return true to allow feedback, false to ignore\n */\n targetFilter?: (event: MouseEvent, target: Element) => boolean;\n /** Custom menu items (defaults to Issue, Feature, Like) */\n menuItems?: FeedbackMenuItem[];\n /** Maximum length for innerText capture */\n maxInnerTextLength?: number;\n /** Maximum length for outerHTML capture */\n maxOuterHTMLLength?: number;\n /** Maximum number of ancestors to capture */\n maxAncestors?: number;\n /** Cooldown in milliseconds between submissions (rate limiting) */\n cooldownMs?: number;\n /** Attributes to strip from outerHTML for privacy */\n stripAttributes?: string[];\n /** Additional metadata to include with every submission */\n metadata?: Record<string, unknown>;\n /** Callback after successful submission */\n onSubmitSuccess?: (payload: FeedbackPayload) => void;\n /** Callback after failed submission */\n onSubmitError?: (error: Error, payload: FeedbackPayload) => void;\n /** Custom styles for the context menu */\n menuStyle?: CSSProperties;\n /** Custom class name for the context menu */\n menuClassName?: string;\n /** Whether the provider is disabled */\n disabled?: boolean;\n /** Configuration for element highlighting */\n highlightConfig?: HighlightConfig;\n /** Configuration for screenshot capture */\n screenshotConfig?: ScreenshotConfig;\n}\n\n/**\n * Context value exposed by FeedbackProvider\n */\nexport interface FeedbackContextValue {\n /** Whether feedback is currently enabled */\n isEnabled: boolean;\n /** Whether a submission is in progress */\n isSubmitting: boolean;\n /** Submit feedback for a specific element */\n submitFeedback: (\n element: Element,\n type: FeedbackType,\n comment?: string,\n ) => Promise<void>;\n /** Open the feedback menu programmatically */\n openMenu: (element: Element, position: { x: number; y: number }) => void;\n /** Close the feedback menu */\n closeMenu: () => void;\n}\n\n/**\n * Props for the context menu component\n */\nexport interface ContextMenuProps {\n /** Whether the menu is visible */\n visible: boolean;\n /** Position of the menu */\n position: { x: number; y: number };\n /** Target element for feedback */\n targetElement: Element | null;\n /** Container element found by highlight logic */\n containerElement: Element | null;\n /** Menu items to display */\n items: FeedbackMenuItem[];\n /** Callback when an item is selected */\n onSelect: (\n type: FeedbackType,\n comment?: string,\n screenshots?: ScreenshotData,\n ) => void;\n /** Callback when menu is closed */\n onClose: () => void;\n /** Whether submission is in progress */\n isSubmitting: boolean;\n /** Custom styles */\n style?: CSSProperties;\n /** Custom class name */\n className?: string;\n /** Configuration for element highlighting */\n highlightConfig?: HighlightConfig;\n /** Configuration for screenshot capture */\n screenshotConfig?: ScreenshotConfig;\n}\n\n/**\n * Props for the screenshot preview component\n */\nexport interface ScreenshotPreviewProps {\n /** Captured screenshot data */\n screenshots: ScreenshotData | null;\n /** Whether screenshots are loading */\n isLoading: boolean;\n /** Callback when user confirms screenshots */\n onConfirm: (screenshots: ScreenshotData) => void;\n /** Callback when user cancels */\n onCancel: () => void;\n /** Callback when user wants to retake screenshots */\n onRetake: () => void;\n /** Whether submission is in progress */\n isSubmitting: boolean;\n}\n","// Components\n\"use client\";\n\nexport { FeedbackProvider } from \"./FeedbackProvider\";\nexport { ContextMenu } from \"./ContextMenu\";\nexport { ScreenshotPreview } from \"./ScreenshotPreview\";\n\n// Context and hooks\nexport { FeedbackContext, useFeedback } from \"./context\";\n\n// Types\nexport type {\n FeedbackMenuItem,\n FeedbackProviderProps,\n FeedbackContextValue,\n ContextMenuProps,\n HighlightColors,\n HighlightConfig,\n FeedbackUserContext,\n ScreenshotPreviewProps,\n} from \"./types\";\n\n// Utilities\nexport { filterMenuItemsByRole } from \"./types\";\n\n// Re-export core types for convenience\nexport type {\n FeedbackType,\n FeedbackPayload,\n FeedbackAdapter,\n ElementContext,\n PageContext,\n ScreenshotData,\n ScreenshotCapture,\n ScreenshotConfig,\n ScreenshotCaptureMode,\n} from \"@ewjdev/anyclick-core\";\n\n// Re-export screenshot utilities from core\nexport {\n captureAllScreenshots,\n captureScreenshot,\n isScreenshotSupported,\n formatBytes,\n estimateTotalSize,\n DEFAULT_SCREENSHOT_CONFIG,\n DEFAULT_SENSITIVE_SELECTORS,\n} from \"@ewjdev/anyclick-core\";\n\n// Styles (for customization)\nexport { menuStyles, darkMenuStyles } from \"./styles\";\n\n// Highlight utilities (for customization)\nexport {\n findContainerParent,\n highlightTarget,\n highlightContainer,\n clearHighlights,\n applyHighlights,\n defaultHighlightColors,\n defaultContainerSelectors,\n} from \"./highlight\";\n"],"mappings":";;;AAEA;AAAA,EACE,eAAAA;AAAA,EACA,aAAAC;AAAA,EACA;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,OACK;AACP,SAAS,4BAA4B;;;ACPrC,SAAS,eAAe,kBAAkB;AAMnC,IAAM,kBAAkB,cAA2C,IAAI;AAMvE,SAAS,cAAoC;AAClD,QAAM,UAAU,WAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;AClBA,SAAgB,YAAAC,WAAU,QAAQ,WAAW,mBAAmB;AAGhE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACPA,IAAM,aAA4C;AAAA,EACvD,SAAS;AAAA,IACP,UAAU;AAAA,IACV,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AAAA,EACA,WAAW;AAAA,IACT,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,iBAAiB;AAAA,IACjB,cAAc;AAAA,IACd,WAAW;AAAA,IACX,UAAU;AAAA,IACV,YACE;AAAA,IACF,UAAU;AAAA,EACZ;AAAA,EACA,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,cAAc;AAAA,IACd,OAAO;AAAA,IACP,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,eAAe;AAAA,EACjB;AAAA,EACA,UAAU;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,KAAK;AAAA,IACL,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,EACZ;AAAA,EACA,WAAW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,UAAU;AAAA,QACV,SAAS;AAAA,QACT;AAAA,QACA,OAAO;AAAA,QACP,WAAW;AAAA,QACX;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;;;AuBrIO,SAAS,sBACd,OACA,aACoB;AACpB,MAAI,CAAC,aAAa;AAEhB,WAAO,MAAM;AAAA,MACX,CAAC,SAAS,CAAC,KAAK,iBAAiB,KAAK,cAAc,WAAW;AAAA,IACjE;AAAA,EACF;AAEA,QAAM,YAAY,YAAY,SAAS,CAAC;AAExC,SAAO,MAAM,OAAO,CAAC,SAAS;AAE5B,QAAI,CAAC,KAAK,iBAAiB,KAAK,cAAc,WAAW,GAAG;AAC1D,aAAO;AAAA,IACT;AAEA,WAAO,KAAK,cAAc,KAAK,CAAC,SAAS,UAAU,SAAS,IAAI,CAAC;AAAA,EACnE,CAAC;AACH;;;ACpDA;AAAA,EACE,yBAAAM;AAAA,EACA;AAAA,EACA,yBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,6BAAAC;AAAA,EACA;AAAA,OACK;","names":["useCallback","useEffect","useRef","useState","useState","forwardRef","createElement","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","jsx","jsxs","useState","jsx","jsxs","useState","useRef","useEffect","useCallback","captureAllScreenshots","isScreenshotSupported","formatBytes","estimateTotalSize","DEFAULT_SCREENSHOT_CONFIG"]}
|
|
1
|
+
{"version":3,"sources":["../src/AnyclickProvider.tsx","../src/context.ts","../src/ContextMenu.tsx","../src/styles.ts","../src/highlight.ts","../src/ScreenshotPreview.tsx","../../../node_modules/shared/src/utils.ts","../../../node_modules/lucide-react/src/defaultAttributes.ts","../../../node_modules/lucide-react/src/Icon.ts","../../../node_modules/lucide-react/src/createLucideIcon.ts","../../../node_modules/lucide-react/src/icons/camera.ts","../../../node_modules/lucide-react/src/icons/check.ts","../../../node_modules/lucide-react/src/icons/chevron-left.ts","../../../node_modules/lucide-react/src/icons/chevron-right.ts","../../../node_modules/lucide-react/src/icons/circle-alert.ts","../../../node_modules/lucide-react/src/icons/expand.ts","../../../node_modules/lucide-react/src/icons/flag.ts","../../../node_modules/lucide-react/src/icons/image.ts","../../../node_modules/lucide-react/src/icons/loader-circle.ts","../../../node_modules/lucide-react/src/icons/plus.ts","../../../node_modules/lucide-react/src/icons/refresh-cw.ts","../../../node_modules/lucide-react/src/icons/shrink.ts","../../../node_modules/lucide-react/src/icons/thumbs-up.ts","../../../node_modules/lucide-react/src/icons/x.ts","../src/store.ts","../src/types.ts","../src/index.ts"],"sourcesContent":["\"use client\";\n\nimport React, {\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { createFeedbackClient } from \"@ewjdev/anyclick-core\";\nimport type {\n FeedbackClient,\n FeedbackType,\n ScreenshotData,\n} from \"@ewjdev/anyclick-core\";\nimport { AnyclickContext, useAnyclick } from \"./context\";\nimport { ContextMenu } from \"./ContextMenu\";\nimport { findContainerParent } from \"./highlight\";\nimport {\n useProviderStore,\n generateProviderId,\n type ProviderInstance,\n} from \"./store\";\nimport type {\n AnyclickContextValue,\n AnyclickProviderProps,\n AnyclickTheme,\n FeedbackMenuItem,\n} from \"./types\";\n\n/**\n * Default menu items\n */\nconst defaultMenuItems: FeedbackMenuItem[] = [\n { type: \"issue\", label: \"Report an issue\", showComment: true },\n { type: \"feature\", label: \"Request a feature\", showComment: true },\n { type: \"like\", label: \"I like this!\", showComment: false },\n];\n\n/**\n * AnyclickProvider component - wraps your app to enable feedback capture\n * Supports scoped providers and nested theming\n */\nexport function AnyclickProvider({\n adapter,\n children,\n targetFilter,\n menuItems = defaultMenuItems,\n maxInnerTextLength,\n maxOuterHTMLLength,\n maxAncestors,\n cooldownMs,\n stripAttributes,\n metadata,\n onSubmitSuccess,\n onSubmitError,\n menuStyle,\n menuClassName,\n disabled = false,\n highlightConfig,\n screenshotConfig,\n scoped = false,\n theme,\n}: AnyclickProviderProps) {\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [menuVisible, setMenuVisible] = useState(false);\n const [menuPosition, setMenuPosition] = useState({ x: 0, y: 0 });\n const [targetElement, setTargetElement] = useState<Element | null>(null);\n const [containerElement, setContainerElement] = useState<Element | null>(\n null,\n );\n\n // Generate a stable ID for this provider instance\n const providerIdRef = useRef<string>(generateProviderId());\n const providerId = providerIdRef.current;\n\n // Ref to the container element (for scoped providers)\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n // Track when container is ready for scoped providers\n const [containerReady, setContainerReady] = useState(!scoped);\n\n // Client reference\n const clientRef = useRef<FeedbackClient | null>(null);\n\n // Callback ref to detect when container element is mounted\n const setContainerRef = useCallback(\n (node: HTMLDivElement | null) => {\n if (process.env.NODE_ENV === \"development\") {\n console.log(`[AnyclickProvider:${providerId}] Container ref callback`, {\n scoped,\n nodeReceived: !!node,\n hadPreviousNode: !!containerRef.current,\n clientExists: !!clientRef.current,\n });\n }\n\n containerRef.current = node;\n if (scoped && node) {\n setContainerReady(true);\n // If client already exists, update its container\n if (clientRef.current) {\n clientRef.current.setContainer(node);\n }\n }\n },\n [scoped, providerId],\n );\n\n // Access parent context (if nested)\n let parentContext: AnyclickContextValue | null = null;\n try {\n // This will throw if there's no parent provider\n parentContext = useAnyclick();\n } catch {\n // No parent provider - this is a root provider\n parentContext = null;\n }\n\n // Store access\n const {\n registerProvider,\n unregisterProvider,\n updateProvider,\n getMergedTheme,\n isDisabledByAncestor,\n findParentProvider,\n isElementInDisabledScope,\n } = useProviderStore();\n\n // Determine parent ID\n const parentId = parentContext?.providerId ?? null;\n\n // Calculate depth\n const depth = parentContext ? (parentContext.scoped ? 1 : 0) : 0;\n const actualDepth = useMemo(() => {\n if (!parentContext) return 0;\n // Find actual depth by traversing store\n let d = 0;\n let currentId = parentId;\n const providers = useProviderStore.getState().providers;\n while (currentId) {\n d++;\n const parent = providers.get(currentId);\n currentId = parent?.parentId ?? null;\n }\n return d;\n }, [parentId]);\n\n // Determine if disabled by theme\n const isDisabledByTheme = theme === null || theme?.disabled === true;\n const effectiveDisabled = disabled || isDisabledByTheme;\n\n // Build the theme for this provider\n const localTheme: AnyclickTheme = useMemo(() => {\n // If theme is null, treat as disabled\n if (theme === null) {\n return { disabled: true };\n }\n\n // Merge explicit theme props with theme object\n const explicitThemeProps: AnyclickTheme = {};\n if (menuStyle) explicitThemeProps.menuStyle = menuStyle;\n if (menuClassName) explicitThemeProps.menuClassName = menuClassName;\n if (highlightConfig) explicitThemeProps.highlightConfig = highlightConfig;\n if (screenshotConfig)\n explicitThemeProps.screenshotConfig = screenshotConfig;\n\n return {\n ...explicitThemeProps,\n ...theme,\n };\n }, [theme, menuStyle, menuClassName, highlightConfig, screenshotConfig]);\n\n // Context menu handler\n // Returns false to allow native context menu (for disabled scopes)\n // Returns true (or void) to show custom menu\n const handleContextMenu = useCallback(\n (event: MouseEvent, element: Element): boolean => {\n // For non-scoped (global) providers, check if the element is inside\n // a disabled scoped provider's container - if so, allow native menu\n if (!scoped && isElementInDisabledScope(element)) {\n if (process.env.NODE_ENV === \"development\") {\n console.log(\n `[AnyclickProvider:${providerId}] Allowing native menu - element is in disabled scope`,\n {\n targetTag: element.tagName,\n },\n );\n }\n return false; // Allow native context menu\n }\n\n const mergedTheme = getMergedTheme(providerId);\n\n if (process.env.NODE_ENV === \"development\") {\n console.log(\n `[AnyclickProvider:${providerId}] handleContextMenu called`,\n {\n scoped,\n targetTag: element.tagName,\n mergedThemeColors: mergedTheme.highlightConfig?.colors,\n position: { x: event.clientX, y: event.clientY },\n },\n );\n }\n\n setTargetElement(element);\n // Get merged theme for highlight config\n const container = findContainerParent(\n element,\n mergedTheme.highlightConfig ?? highlightConfig,\n );\n setContainerElement(container);\n setMenuPosition({ x: event.clientX, y: event.clientY });\n setMenuVisible(true);\n\n return true; // Handled - prevent native menu\n },\n [\n providerId,\n getMergedTheme,\n highlightConfig,\n scoped,\n isElementInDisabledScope,\n ],\n );\n\n // Register this provider in the store\n useLayoutEffect(() => {\n const providerInstance: ProviderInstance = {\n id: providerId,\n containerRef: containerRef as React.RefObject<Element | null>,\n scoped,\n theme: localTheme,\n disabled: effectiveDisabled,\n parentId,\n depth: actualDepth,\n onContextMenu: handleContextMenu,\n };\n\n registerProvider(providerInstance);\n\n return () => {\n unregisterProvider(providerId);\n };\n }, [\n providerId,\n scoped,\n localTheme,\n effectiveDisabled,\n parentId,\n actualDepth,\n handleContextMenu,\n registerProvider,\n unregisterProvider,\n ]);\n\n // Update provider when config changes\n useEffect(() => {\n updateProvider(providerId, {\n theme: localTheme,\n disabled: effectiveDisabled,\n onContextMenu: handleContextMenu,\n });\n }, [\n providerId,\n localTheme,\n effectiveDisabled,\n handleContextMenu,\n updateProvider,\n ]);\n\n // Create/update the feedback client\n // Wait for container to be ready for scoped providers\n useEffect(() => {\n // Check if disabled by any ancestor\n if (isDisabledByAncestor(providerId)) {\n if (process.env.NODE_ENV === \"development\") {\n console.log(\n `[AnyclickProvider:${providerId}] Skipping - disabled by ancestor`,\n );\n }\n return;\n }\n\n // For scoped providers, wait until container is ready\n if (scoped && !containerReady) {\n if (process.env.NODE_ENV === \"development\") {\n console.log(\n `[AnyclickProvider:${providerId}] Waiting for container to be ready`,\n {\n scoped,\n containerReady,\n },\n );\n }\n return;\n }\n\n if (process.env.NODE_ENV === \"development\") {\n console.log(`[AnyclickProvider:${providerId}] Creating client`, {\n scoped,\n containerReady,\n hasContainer: !!containerRef.current,\n effectiveDisabled,\n localThemeColors: localTheme.highlightConfig?.colors,\n });\n }\n\n const client = createFeedbackClient({\n adapter,\n targetFilter,\n maxInnerTextLength,\n maxOuterHTMLLength,\n maxAncestors,\n cooldownMs,\n stripAttributes,\n // For scoped providers, pass the container\n container: scoped ? containerRef.current : null,\n });\n\n // Set up callbacks\n client.onSubmitSuccess = onSubmitSuccess;\n client.onSubmitError = onSubmitError;\n\n // Set up context menu handler\n client.onContextMenu = handleContextMenu;\n\n clientRef.current = client;\n\n // Attach event listeners if not disabled\n if (!effectiveDisabled) {\n client.attach();\n }\n\n return () => {\n client.detach();\n };\n }, [\n adapter,\n targetFilter,\n maxInnerTextLength,\n maxOuterHTMLLength,\n maxAncestors,\n cooldownMs,\n stripAttributes,\n onSubmitSuccess,\n onSubmitError,\n effectiveDisabled,\n scoped,\n containerReady,\n providerId,\n isDisabledByAncestor,\n handleContextMenu,\n ]);\n\n // Submit feedback with optional screenshots\n const submitFeedback = useCallback(\n async (\n element: Element,\n type: FeedbackType,\n comment?: string,\n screenshots?: ScreenshotData,\n ) => {\n const client = clientRef.current;\n if (!client) return;\n\n setIsSubmitting(true);\n try {\n await client.submitFeedback(element, type, {\n comment,\n metadata,\n screenshots,\n });\n } finally {\n setIsSubmitting(false);\n setMenuVisible(false);\n setTargetElement(null);\n setContainerElement(null);\n }\n },\n [metadata],\n );\n\n // Open menu programmatically\n const openMenu = useCallback(\n (element: Element, position: { x: number; y: number }) => {\n setTargetElement(element);\n const mergedTheme = getMergedTheme(providerId);\n const container = findContainerParent(\n element,\n mergedTheme.highlightConfig ?? highlightConfig,\n );\n setContainerElement(container);\n setMenuPosition(position);\n setMenuVisible(true);\n },\n [providerId, getMergedTheme, highlightConfig],\n );\n\n // Close menu\n const closeMenu = useCallback(() => {\n setMenuVisible(false);\n setTargetElement(null);\n setContainerElement(null);\n }, []);\n\n // Handle menu selection\n const handleMenuSelect = useCallback(\n (type: FeedbackType, comment?: string, screenshots?: ScreenshotData) => {\n if (targetElement) {\n submitFeedback(targetElement, type, comment, screenshots);\n }\n },\n [targetElement, submitFeedback],\n );\n\n // Get merged theme for this provider\n // We use the store's getMergedTheme for inherited values (like highlightConfig),\n // but for this provider's own theme values, we use localTheme directly to avoid\n // timing issues with useMemo running before the provider is registered.\n const inheritedTheme = getMergedTheme(providerId);\n\n // Merge: inherited theme first, then local theme overrides\n const mergedTheme: AnyclickTheme = useMemo(\n () => ({\n ...inheritedTheme,\n ...localTheme,\n // Deep merge for nested configs\n highlightConfig: {\n ...inheritedTheme.highlightConfig,\n ...localTheme.highlightConfig,\n colors: {\n ...inheritedTheme.highlightConfig?.colors,\n ...localTheme.highlightConfig?.colors,\n },\n },\n screenshotConfig: {\n ...inheritedTheme.screenshotConfig,\n ...localTheme.screenshotConfig,\n },\n }),\n [inheritedTheme, localTheme],\n );\n\n // Apply merged theme styles\n const effectiveMenuStyle = mergedTheme.menuStyle ?? menuStyle;\n const effectiveMenuClassName = mergedTheme.menuClassName ?? menuClassName;\n\n // Debug: Log theme flow\n if (process.env.NODE_ENV === \"development\") {\n console.log(`[AnyclickProvider:${providerId}] Theme Debug`, {\n scoped,\n localThemeHasMenuStyle: !!localTheme.menuStyle,\n localThemeMenuStyleKeys: localTheme.menuStyle\n ? Object.keys(localTheme.menuStyle)\n : [],\n mergedThemeHasMenuStyle: !!mergedTheme.menuStyle,\n mergedThemeMenuStyleKeys: mergedTheme.menuStyle\n ? Object.keys(mergedTheme.menuStyle)\n : [],\n effectiveMenuStyleExists: !!effectiveMenuStyle,\n effectiveMenuStyleKeys: effectiveMenuStyle\n ? Object.keys(effectiveMenuStyle)\n : [],\n menuStyleProp: !!menuStyle,\n });\n }\n const effectiveHighlightConfig =\n mergedTheme.highlightConfig ?? highlightConfig;\n const effectiveScreenshotConfig =\n mergedTheme.screenshotConfig ?? screenshotConfig;\n\n // Context value\n const contextValue: AnyclickContextValue = useMemo(\n () => ({\n isEnabled: !effectiveDisabled && !isDisabledByAncestor(providerId),\n isSubmitting,\n submitFeedback,\n openMenu,\n closeMenu,\n theme: mergedTheme,\n scoped,\n providerId,\n }),\n [\n effectiveDisabled,\n providerId,\n isDisabledByAncestor,\n isSubmitting,\n submitFeedback,\n openMenu,\n closeMenu,\n mergedTheme,\n scoped,\n ],\n );\n\n // For scoped providers, wrap children in a container div\n const content = scoped ? (\n <div ref={setContainerRef} style={{ display: \"contents\" }}>\n {children}\n </div>\n ) : (\n children\n );\n\n return (\n <AnyclickContext.Provider value={contextValue}>\n {content}\n <ContextMenu\n visible={menuVisible && !effectiveDisabled}\n position={menuPosition}\n targetElement={targetElement}\n containerElement={containerElement}\n items={menuItems}\n onSelect={handleMenuSelect}\n onClose={closeMenu}\n isSubmitting={isSubmitting}\n style={effectiveMenuStyle}\n className={effectiveMenuClassName}\n highlightConfig={effectiveHighlightConfig}\n screenshotConfig={effectiveScreenshotConfig}\n />\n </AnyclickContext.Provider>\n );\n}\n\n/**\n * @deprecated Use AnyclickProvider instead\n */\nexport const FeedbackProvider = AnyclickProvider;\n","\"use client\";\n\nimport { createContext, useContext } from \"react\";\nimport type { AnyclickContextValue } from \"./types\";\n\n/**\n * React context for anyclick functionality\n */\nexport const AnyclickContext = createContext<AnyclickContextValue | null>(null);\n\n/**\n * @deprecated Use AnyclickContext instead\n */\nexport const FeedbackContext = AnyclickContext;\n\n/**\n * Hook to access anyclick context\n * @throws Error if used outside of AnyclickProvider\n */\nexport function useAnyclick(): AnyclickContextValue {\n const context = useContext(AnyclickContext);\n if (!context) {\n throw new Error(\"useAnyclick must be used within an AnyclickProvider\");\n }\n return context;\n}\n\n/**\n * @deprecated Use useAnyclick instead\n */\nexport function useFeedback(): AnyclickContextValue {\n const context = useContext(AnyclickContext);\n if (!context) {\n throw new Error(\"useFeedback must be used within a FeedbackProvider\");\n }\n return context;\n}\n","\"use client\";\n\nimport React, { useState, useRef, useEffect, useCallback } from \"react\";\nimport type { ContextMenuProps, FeedbackMenuItem } from \"./types\";\nimport type { FeedbackType, ScreenshotData } from \"@ewjdev/anyclick-core\";\nimport {\n captureAllScreenshots,\n isScreenshotSupported,\n DEFAULT_SCREENSHOT_CONFIG,\n} from \"@ewjdev/anyclick-core\";\nimport { menuStyles } from \"./styles\";\nimport { applyHighlights, clearHighlights } from \"./highlight\";\nimport { ScreenshotPreview } from \"./ScreenshotPreview\";\nimport {\n FlagIcon,\n PlusIcon,\n ThumbsUpIcon,\n ChevronRightIcon,\n ChevronLeftIcon,\n CameraIcon,\n} from \"lucide-react\";\n\n/**\n * Default icons for feedback types\n */\nconst defaultIcons: Record<string, React.ReactNode> = {\n issue: <FlagIcon className=\"w-4 h-4\" />,\n feature: <PlusIcon className=\"w-4 h-4\" />,\n like: <ThumbsUpIcon className=\"w-4 h-4\" />,\n};\n\n/**\n * Menu item component\n */\nfunction MenuItem({\n item,\n onClick,\n disabled,\n hasChildren,\n}: {\n item: FeedbackMenuItem;\n onClick: () => void;\n disabled: boolean;\n hasChildren?: boolean;\n}) {\n const [isHovered, setIsHovered] = useState(false);\n\n return (\n <button\n type=\"button\"\n onClick={onClick}\n disabled={disabled}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n style={{\n ...menuStyles.item,\n ...(isHovered ? menuStyles.itemHover : {}),\n ...(disabled ? { opacity: 0.5, cursor: \"not-allowed\" } : {}),\n }}\n >\n <span style={menuStyles.itemIcon}>\n {item.icon ?? defaultIcons[item.type]}\n </span>\n <span style={{ flex: 1 }}>{item.label}</span>\n {hasChildren && (\n <ChevronRightIcon\n className=\"w-4 h-4\"\n style={{ marginLeft: \"auto\", opacity: 0.5 }}\n />\n )}\n </button>\n );\n}\n\n/**\n * Back button for submenu navigation\n */\nfunction BackButton({ onClick }: { onClick: () => void }) {\n const [isHovered, setIsHovered] = useState(false);\n\n return (\n <button\n type=\"button\"\n onClick={onClick}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n style={{\n ...menuStyles.item,\n ...(isHovered ? menuStyles.itemHover : {}),\n borderBottom: \"1px solid #e5e5e5\",\n marginBottom: \"4px\",\n }}\n >\n <ChevronLeftIcon className=\"w-4 h-4\" style={{ opacity: 0.5 }} />\n <span style={{ opacity: 0.7 }}>Back</span>\n </button>\n );\n}\n\n/**\n * Comment form component\n */\nfunction CommentForm({\n onSubmit,\n onCancel,\n isSubmitting,\n}: {\n onSubmit: (comment: string) => void;\n onCancel: () => void;\n isSubmitting: boolean;\n}) {\n const [comment, setComment] = useState(\"\");\n const inputRef = useRef<HTMLTextAreaElement>(null);\n\n useEffect(() => {\n inputRef.current?.focus();\n }, []);\n\n const handleSubmit = () => {\n onSubmit(comment);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\" && (e.metaKey || e.ctrlKey)) {\n handleSubmit();\n } else if (e.key === \"Escape\") {\n onCancel();\n }\n };\n\n return (\n <div style={menuStyles.commentSection}>\n <textarea\n ref={inputRef}\n value={comment}\n onChange={(e) => setComment(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder=\"Add a comment (optional)...\"\n style={menuStyles.commentInput}\n disabled={isSubmitting}\n />\n <div style={menuStyles.buttonRow}>\n <button\n type=\"button\"\n onClick={onCancel}\n disabled={isSubmitting}\n style={{ ...menuStyles.button, ...menuStyles.cancelButton }}\n >\n Cancel\n </button>\n <button\n type=\"button\"\n onClick={handleSubmit}\n disabled={isSubmitting}\n style={{\n ...menuStyles.button,\n ...menuStyles.submitButton,\n ...(isSubmitting ? menuStyles.submitButtonDisabled : {}),\n }}\n >\n {isSubmitting ? \"Sending...\" : \"Send\"}\n </button>\n </div>\n </div>\n );\n}\n\n/** View states for the context menu */\ntype MenuView = \"menu\" | \"comment\" | \"screenshot-preview\";\n\n/**\n * Context menu component for selecting feedback type\n */\nexport function ContextMenu({\n visible,\n position,\n targetElement,\n containerElement,\n items,\n onSelect,\n onClose,\n isSubmitting,\n style,\n className,\n highlightConfig,\n screenshotConfig,\n}: ContextMenuProps) {\n const [selectedType, setSelectedType] = useState<FeedbackType | null>(null);\n const [currentView, setCurrentView] = useState<MenuView>(\"menu\");\n const [pendingComment, setPendingComment] = useState<string | undefined>();\n const [submenuStack, setSubmenuStack] = useState<FeedbackMenuItem[][]>([]);\n const [screenshots, setScreenshots] = useState<ScreenshotData | null>(null);\n const [isCapturing, setIsCapturing] = useState(false);\n const menuRef = useRef<HTMLDivElement>(null);\n\n // Merge screenshot config with defaults\n const mergedScreenshotConfig = {\n ...DEFAULT_SCREENSHOT_CONFIG,\n ...screenshotConfig,\n };\n\n const showPreview =\n mergedScreenshotConfig.showPreview && isScreenshotSupported();\n\n // Current items to display (either root items or submenu items)\n const currentItems =\n submenuStack.length > 0 ? submenuStack[submenuStack.length - 1] : items;\n\n // Capture screenshots\n const captureScreenshots = useCallback(async () => {\n if (!targetElement || !showPreview) return;\n\n setIsCapturing(true);\n try {\n const captured = await captureAllScreenshots(\n targetElement,\n containerElement,\n mergedScreenshotConfig,\n );\n setScreenshots(captured);\n } catch (error) {\n console.error(\"Failed to capture screenshots:\", error);\n setScreenshots(null);\n } finally {\n setIsCapturing(false);\n }\n }, [targetElement, containerElement, mergedScreenshotConfig, showPreview]);\n\n // Reset state when menu closes\n useEffect(() => {\n if (!visible) {\n setSelectedType(null);\n setCurrentView(\"menu\");\n setPendingComment(undefined);\n setSubmenuStack([]);\n setScreenshots(null);\n setIsCapturing(false);\n }\n }, [visible]);\n\n // Apply highlights to target element and container when menu opens\n useEffect(() => {\n if (visible && targetElement) {\n // Clear any existing highlights first to ensure clean state\n clearHighlights();\n // Apply highlights to the new target element\n applyHighlights(targetElement, highlightConfig);\n } else {\n // Clear highlights when menu is not visible\n clearHighlights();\n }\n\n return () => {\n clearHighlights();\n };\n }, [visible, targetElement, highlightConfig]);\n\n // Close menu when clicking outside of it\n useEffect(() => {\n if (!visible) {\n return;\n }\n\n const handlePointerDown = (event: PointerEvent) => {\n if (!menuRef.current) return;\n\n const target = event.target as Node;\n if (!menuRef.current.contains(target)) {\n onClose();\n }\n };\n\n document.addEventListener(\"pointerdown\", handlePointerDown);\n return () => {\n document.removeEventListener(\"pointerdown\", handlePointerDown);\n };\n }, [visible, onClose]);\n\n // Adjust position to stay within viewport\n useEffect(() => {\n if (visible && menuRef.current) {\n const rect = menuRef.current.getBoundingClientRect();\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n\n let adjustedX = position.x;\n let adjustedY = position.y;\n\n if (position.x + rect.width > viewportWidth) {\n adjustedX = viewportWidth - rect.width - 10;\n }\n if (position.y + rect.height > viewportHeight) {\n adjustedY = viewportHeight - rect.height - 10;\n }\n\n if (adjustedX !== position.x || adjustedY !== position.y) {\n menuRef.current.style.left = `${adjustedX}px`;\n menuRef.current.style.top = `${adjustedY}px`;\n }\n }\n }, [visible, position]);\n\n // Handle escape key\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") {\n if (currentView === \"screenshot-preview\") {\n setCurrentView(\"comment\");\n } else if (currentView === \"comment\") {\n setCurrentView(\"menu\");\n setSelectedType(null);\n setPendingComment(undefined);\n } else if (submenuStack.length > 0) {\n // Go back one level in submenu\n setSubmenuStack((prev) => prev.slice(0, -1));\n } else {\n onClose();\n }\n }\n };\n\n if (visible) {\n document.addEventListener(\"keydown\", handleKeyDown);\n return () => document.removeEventListener(\"keydown\", handleKeyDown);\n }\n }, [visible, currentView, submenuStack.length, onClose]);\n\n if (!visible || !targetElement) {\n return null;\n }\n\n const handleItemClick = (item: FeedbackMenuItem) => {\n // If item has children, navigate to submenu\n if (item.children && item.children.length > 0) {\n setSubmenuStack((prev) => [...prev, item.children!]);\n return;\n }\n\n // Otherwise, handle selection\n if (item.showComment) {\n setSelectedType(item.type);\n setCurrentView(\"comment\");\n } else {\n // If preview is enabled, capture and show preview\n if (showPreview) {\n setSelectedType(item.type);\n setCurrentView(\"screenshot-preview\");\n captureScreenshots();\n } else {\n onSelect(item.type);\n }\n }\n };\n\n const handleBack = () => {\n setSubmenuStack((prev) => prev.slice(0, -1));\n };\n\n const handleCommentSubmit = (comment: string) => {\n if (!selectedType) return;\n\n // If preview is enabled, capture and show preview\n if (showPreview) {\n setPendingComment(comment || undefined);\n setCurrentView(\"screenshot-preview\");\n captureScreenshots();\n } else {\n onSelect(selectedType, comment || undefined);\n }\n };\n\n const handleCommentCancel = () => {\n setCurrentView(\"menu\");\n setSelectedType(null);\n setPendingComment(undefined);\n };\n\n const handleScreenshotConfirm = (confirmedScreenshots: ScreenshotData) => {\n if (selectedType) {\n onSelect(selectedType, pendingComment, confirmedScreenshots);\n }\n };\n\n const handleScreenshotCancel = () => {\n // Go back to comment or menu\n if (pendingComment !== undefined) {\n setCurrentView(\"comment\");\n } else {\n setCurrentView(\"menu\");\n setSelectedType(null);\n }\n setScreenshots(null);\n };\n\n const handleRetakeScreenshots = () => {\n captureScreenshots();\n };\n\n // Determine container width based on view\n const containerWidth = currentView === \"screenshot-preview\" ? 360 : undefined;\n\n // Debug: Log received style\n if (process.env.NODE_ENV === \"development\" && visible) {\n console.log(\"[ContextMenu] Style Debug\", {\n styleExists: !!style,\n styleKeys: style ? Object.keys(style) : [],\n styleValues: style,\n className,\n });\n }\n\n return (\n <div\n ref={menuRef}\n className={className}\n style={{\n ...menuStyles.container,\n left: position.x,\n top: position.y,\n ...(containerWidth\n ? { width: containerWidth, minWidth: containerWidth }\n : {}),\n ...style,\n }}\n role=\"menu\"\n aria-label=\"Feedback options\"\n >\n {currentView !== \"screenshot-preview\" && (\n <div style={menuStyles.header}>Send Feedback</div>\n )}\n\n {currentView === \"menu\" && (\n <div style={menuStyles.itemList}>\n {submenuStack.length > 0 && <BackButton onClick={handleBack} />}\n {currentItems.map((item) => (\n <MenuItem\n key={item.type}\n item={item}\n onClick={() => handleItemClick(item)}\n disabled={isSubmitting}\n hasChildren={item.children && item.children.length > 0}\n />\n ))}\n {showPreview && (\n <div style={screenshotIndicatorStyle}>\n <CameraIcon className=\"w-3 h-3\" />\n <span>Screenshots will be captured</span>\n </div>\n )}\n </div>\n )}\n\n {currentView === \"comment\" && (\n <CommentForm\n onSubmit={handleCommentSubmit}\n onCancel={handleCommentCancel}\n isSubmitting={isSubmitting}\n />\n )}\n\n {currentView === \"screenshot-preview\" && (\n <ScreenshotPreview\n screenshots={screenshots}\n isLoading={isCapturing}\n onConfirm={handleScreenshotConfirm}\n onCancel={handleScreenshotCancel}\n onRetake={handleRetakeScreenshots}\n isSubmitting={isSubmitting}\n />\n )}\n </div>\n );\n}\n\nconst screenshotIndicatorStyle: React.CSSProperties = {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"6px\",\n padding: \"8px 12px\",\n fontSize: \"11px\",\n color: \"var(--anyclick-menu-text-muted, #9ca3af)\",\n borderTop: \"1px solid var(--anyclick-menu-border, #f3f4f6)\",\n marginTop: \"4px\",\n};\n","import type { CSSProperties } from \"react\";\n\n/**\n * CSS custom properties for menu theming.\n * These can be overridden via the `style` prop on AnyclickProvider.\n * \n * Example:\n * ```tsx\n * <AnyclickProvider\n * theme={{\n * menuStyle: {\n * '--anyclick-menu-bg': 'rgba(0, 0, 0, 0.9)',\n * '--anyclick-menu-text': '#ffffff',\n * '--anyclick-menu-border': 'rgba(255, 255, 255, 0.1)',\n * '--anyclick-menu-hover': 'rgba(255, 255, 255, 0.1)',\n * '--anyclick-menu-accent': '#f59e0b',\n * }\n * }}\n * />\n * ```\n */\nexport const menuCSSVariables = {\n // Background colors\n \"--anyclick-menu-bg\": \"#ffffff\",\n \"--anyclick-menu-hover\": \"#f5f5f5\",\n // Text colors\n \"--anyclick-menu-text\": \"#333333\",\n \"--anyclick-menu-text-muted\": \"#666666\",\n // Border colors\n \"--anyclick-menu-border\": \"#e5e5e5\",\n // Accent/action colors\n \"--anyclick-menu-accent\": \"#0066cc\",\n \"--anyclick-menu-accent-text\": \"#ffffff\",\n // Input colors\n \"--anyclick-menu-input-bg\": \"#ffffff\",\n \"--anyclick-menu-input-border\": \"#dddddd\",\n // Cancel button\n \"--anyclick-menu-cancel-bg\": \"#f0f0f0\",\n \"--anyclick-menu-cancel-text\": \"#666666\",\n} as const;\n\nexport const menuStyles: Record<string, CSSProperties> = {\n overlay: {\n position: \"fixed\",\n inset: 0,\n zIndex: 9998,\n },\n container: {\n position: \"fixed\",\n zIndex: 9999,\n minWidth: \"200px\",\n backgroundColor: \"var(--anyclick-menu-bg, #ffffff)\",\n borderRadius: \"8px\",\n boxShadow: \"0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05)\",\n overflow: \"hidden\",\n fontFamily:\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n fontSize: \"14px\",\n // Set default CSS variables\n ...menuCSSVariables,\n },\n header: {\n padding: \"12px 16px\",\n borderBottom: \"1px solid var(--anyclick-menu-border, #e5e5e5)\",\n color: \"var(--anyclick-menu-text-muted, #666)\",\n fontSize: \"12px\",\n fontWeight: 500,\n textTransform: \"uppercase\" as const,\n letterSpacing: \"0.5px\",\n },\n itemList: {\n padding: \"4px 0\",\n },\n item: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"10px\",\n padding: \"10px 16px\",\n cursor: \"pointer\",\n transition: \"background-color 0.15s\",\n color: \"var(--anyclick-menu-text, #333)\",\n border: \"none\",\n backgroundColor: \"transparent\",\n width: \"100%\",\n textAlign: \"left\" as const,\n fontSize: \"14px\",\n },\n itemHover: {\n backgroundColor: \"var(--anyclick-menu-hover, #f5f5f5)\",\n },\n itemIcon: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"20px\",\n height: \"20px\",\n fontSize: \"16px\",\n },\n commentSection: {\n padding: \"12px 16px\",\n borderTop: \"1px solid var(--anyclick-menu-border, #e5e5e5)\",\n },\n commentInput: {\n width: \"100%\",\n minHeight: \"60px\",\n padding: \"8px 12px\",\n border: \"1px solid var(--anyclick-menu-input-border, #ddd)\",\n borderRadius: \"6px\",\n fontSize: \"14px\",\n fontFamily: \"inherit\",\n resize: \"vertical\" as const,\n outline: \"none\",\n boxSizing: \"border-box\" as const,\n backgroundColor: \"var(--anyclick-menu-input-bg, #ffffff)\",\n color: \"var(--anyclick-menu-text, #333)\",\n },\n buttonRow: {\n display: \"flex\",\n justifyContent: \"flex-end\",\n gap: \"8px\",\n marginTop: \"8px\",\n },\n button: {\n padding: \"6px 12px\",\n borderRadius: \"6px\",\n fontSize: \"13px\",\n fontWeight: 500,\n cursor: \"pointer\",\n transition: \"background-color 0.15s, opacity 0.15s\",\n border: \"none\",\n },\n cancelButton: {\n backgroundColor: \"var(--anyclick-menu-cancel-bg, #f0f0f0)\",\n color: \"var(--anyclick-menu-cancel-text, #666)\",\n display: \"flex\",\n alignItems: \"center\",\n gap: \"2px\",\n },\n submitButton: {\n backgroundColor: \"var(--anyclick-menu-accent, #0066cc)\",\n color: \"var(--anyclick-menu-accent-text, #ffffff)\",\n display: \"flex\",\n alignItems: \"center\",\n gap: \"2px\",\n },\n submitButtonDisabled: {\n opacity: 0.6,\n cursor: \"not-allowed\",\n },\n};\n\n// Dark mode styles\nexport const darkMenuStyles: Record<string, CSSProperties> = {\n container: {\n ...menuStyles.container,\n backgroundColor: \"#1a1a1a\",\n boxShadow:\n \"0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1)\",\n },\n header: {\n ...menuStyles.header,\n borderBottom: \"1px solid #333\",\n color: \"#888\",\n },\n item: {\n ...menuStyles.item,\n color: \"#e0e0e0\",\n },\n itemHover: {\n backgroundColor: \"#2a2a2a\",\n },\n commentSection: {\n ...menuStyles.commentSection,\n borderTop: \"1px solid #333\",\n },\n commentInput: {\n ...menuStyles.commentInput,\n backgroundColor: \"#2a2a2a\",\n border: \"1px solid #444\",\n color: \"#e0e0e0\",\n },\n cancelButton: {\n ...menuStyles.cancelButton,\n backgroundColor: \"#333\",\n color: \"#ccc\",\n },\n};\n\nexport const screenshotPreviewStyles: Record<string, React.CSSProperties> = {\n container: {\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"8px\",\n },\n containerExpanded: {\n position: \"fixed\",\n top: \"50%\",\n left: \"50%\",\n transform: \"translate(-50%, -50%)\",\n width: \"90vw\",\n maxWidth: \"800px\",\n maxHeight: \"90vh\",\n backgroundColor: \"#fff\",\n borderRadius: \"12px\",\n boxShadow: \"0 25px 50px -12px rgba(0, 0, 0, 0.25)\",\n padding: \"16px\",\n zIndex: 10000,\n },\n loadingContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"12px\",\n padding: \"24px\",\n },\n loadingText: {\n fontSize: \"13px\",\n color: \"#6b7280\",\n },\n emptyContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"8px\",\n padding: \"24px\",\n },\n emptyText: {\n fontSize: \"13px\",\n color: \"#6b7280\",\n fontWeight: \"500\",\n },\n emptySubtext: {\n fontSize: \"11px\",\n color: \"#9ca3af\",\n textAlign: \"center\" as const,\n },\n emptyActions: {\n display: \"flex\",\n gap: \"8px\",\n marginTop: \"8px\",\n },\n retakeButtonOutline: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"6px\",\n padding: \"8px 12px\",\n fontSize: \"12px\",\n color: \"#6b7280\",\n backgroundColor: \"transparent\",\n border: \"1px solid #e5e7eb\",\n borderRadius: \"6px\",\n cursor: \"pointer\",\n },\n continueButton: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"6px\",\n padding: \"8px 12px\",\n fontSize: \"12px\",\n color: \"#fff\",\n backgroundColor: \"#3b82f6\",\n border: \"none\",\n borderRadius: \"6px\",\n cursor: \"pointer\",\n fontWeight: \"500\",\n },\n header: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n padding: \"0 4px\",\n },\n headerTitle: {\n fontSize: \"12px\",\n fontWeight: \"600\",\n color: \"#374151\",\n textTransform: \"uppercase\" as const,\n letterSpacing: \"0.05em\",\n },\n headerActions: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n },\n sizeLabel: {\n fontSize: \"11px\",\n color: \"#9ca3af\",\n },\n iconButton: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"24px\",\n height: \"24px\",\n border: \"none\",\n backgroundColor: \"transparent\",\n borderRadius: \"4px\",\n cursor: \"pointer\",\n color: \"#6b7280\",\n },\n tabContainer: {\n display: \"flex\",\n gap: \"4px\",\n borderBottom: \"1px solid #e5e7eb\",\n paddingBottom: \"8px\",\n },\n tab: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"4px\",\n padding: \"2px 5px\",\n fontSize: \"12px\",\n color: \"#6b7280\",\n backgroundColor: \"transparent\",\n border: \"none\",\n borderRadius: \"4px\",\n cursor: \"pointer\",\n transition: \"all 0.15s ease\",\n },\n tabActive: {\n backgroundColor: \"#eff6ff\",\n color: \"#3b82f6\",\n fontWeight: \"500\",\n },\n tabError: {\n color: \"#ef4444\",\n },\n tabSize: {\n fontSize: \"10px\",\n color: \"#9ca3af\",\n },\n previewContainer: {\n position: \"relative\",\n width: \"100%\",\n height: \"150px\",\n backgroundColor: \"#f9fafb\",\n borderRadius: \"8px\",\n overflow: \"hidden\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n previewContainerExpanded: {\n height: \"60vh\",\n maxHeight: \"500px\",\n },\n previewImage: {\n maxWidth: \"100%\",\n maxHeight: \"100%\",\n objectFit: \"contain\",\n },\n noPreview: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n gap: \"8px\",\n fontSize: \"12px\",\n color: \"#9ca3af\",\n },\n errorPreview: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"8px\",\n padding: \"16px\",\n textAlign: \"center\" as const,\n },\n errorTitle: {\n fontSize: \"14px\",\n fontWeight: \"600\",\n color: \"#ef4444\",\n },\n errorMessage: {\n fontSize: \"12px\",\n color: \"#6b7280\",\n maxWidth: \"250px\",\n lineHeight: \"1.4\",\n },\n dimensionsInfo: {\n fontSize: \"11px\",\n color: \"#9ca3af\",\n textAlign: \"center\" as const,\n },\n actions: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n paddingTop: \"8px\",\n borderTop: \"1px solid #e5e7eb\",\n },\n actionsRight: {\n display: \"flex\",\n gap: \"8px\",\n },\n retakeButton: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"6px\",\n padding: \"8px 16px\",\n fontSize: \"13px\",\n color: \"#fff\",\n backgroundColor: \"#3b82f6\",\n border: \"none\",\n borderRadius: \"6px\",\n cursor: \"pointer\",\n fontWeight: \"500\",\n },\n retakeButtonSmall: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"4px\",\n padding: \"4px 8px\",\n fontSize: \"11px\",\n color: \"#6b7280\",\n backgroundColor: \"transparent\",\n border: \"1px solid #e5e7eb\",\n borderRadius: \"4px\",\n cursor: \"pointer\",\n },\n};\n","/**\n * Highlight utilities for feedback target elements\n */\n\nimport type { HighlightConfig, HighlightColors } from \"./types\";\n\nconst HIGHLIGHT_TARGET_CLASS = \"uifeedback-highlight-target\";\nconst HIGHLIGHT_CONTAINER_CLASS = \"uifeedback-highlight-container\";\nconst STYLE_ID = \"uifeedback-highlight-styles\";\n\n/**\n * Default highlight colors\n */\nexport const defaultHighlightColors: Required<HighlightColors> = {\n targetColor: \"#3b82f6\",\n containerColor: \"#8b5cf6\",\n targetShadowOpacity: 0.25,\n containerShadowOpacity: 0.1,\n};\n\n/**\n * Default container selectors\n */\nexport const defaultContainerSelectors: string[] = [\n \".container\",\n \".card\",\n \".panel\",\n \".section\",\n \".wrapper\",\n \".box\",\n \".modal\",\n \".dialog\",\n \".drawer\",\n '[role=\"dialog\"]',\n '[role=\"region\"]',\n '[role=\"article\"]',\n '[role=\"main\"]',\n \"article\",\n \"section\",\n \"main\",\n \"aside\",\n \"nav\",\n \"header\",\n \"footer\",\n];\n\n/**\n * Generate CSS for highlight effects based on configuration\n */\nfunction generateHighlightCSS(colors: Required<HighlightColors>): string {\n const {\n targetColor,\n containerColor,\n targetShadowOpacity,\n containerShadowOpacity,\n } = colors;\n\n // Convert hex to rgba for shadows\n const hexToRgba = (hex: string, alpha: number): string => {\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n if (!result) return `rgba(0, 0, 0, ${alpha})`;\n return `rgba(${parseInt(result[1], 16)}, ${parseInt(result[2], 16)}, ${parseInt(result[3], 16)}, ${alpha})`;\n };\n\n return `\n.${HIGHLIGHT_TARGET_CLASS} {\n outline: 2px dashed ${targetColor} !important;\n outline-offset: 2px !important;\n box-shadow: 0 0 0 4px ${hexToRgba(targetColor, targetShadowOpacity)}, 0 4px 12px ${hexToRgba(targetColor, targetShadowOpacity * 0.6)} !important;\n border-radius: 4px !important;\n position: relative;\n z-index: 9997;\n}\n\n.${HIGHLIGHT_CONTAINER_CLASS} {\n outline: 2px dashed ${hexToRgba(containerColor, 0.6)} !important;\n outline-offset: 4px !important;\n box-shadow: 0 0 0 6px ${hexToRgba(containerColor, containerShadowOpacity)} !important;\n border-radius: 6px !important;\n position: relative;\n z-index: 9996;\n}\n`;\n}\n\n/**\n * Inject or update highlight styles in document head\n */\nfunction injectStyles(colors: Required<HighlightColors>): void {\n if (typeof document === \"undefined\") return;\n\n // Remove existing styles if present\n const existingStyle = document.getElementById(STYLE_ID);\n if (existingStyle) {\n existingStyle.remove();\n }\n\n const style = document.createElement(\"style\");\n style.id = STYLE_ID;\n style.textContent = generateHighlightCSS(colors);\n document.head.appendChild(style);\n}\n\n/**\n * Find the closest container parent element\n */\nexport function findContainerParent(\n element: Element,\n config?: HighlightConfig,\n): Element | null {\n const containerSelectors =\n config?.containerSelectors ?? defaultContainerSelectors;\n const minChildren = config?.minChildrenForContainer ?? 2;\n\n let current = element.parentElement;\n let fallbackContainer: Element | null = null;\n\n while (current && current !== document.body) {\n // Check if element matches any container selector\n for (const selector of containerSelectors) {\n try {\n if (current.matches(selector)) {\n return current;\n }\n } catch {\n // Invalid selector, skip\n }\n }\n\n // Check if parent has multiple meaningful children (not just text nodes)\n const meaningfulChildren = Array.from(current.children).filter((child) => {\n const tag = child.tagName.toLowerCase();\n // Exclude script, style, and hidden elements\n if (tag === \"script\" || tag === \"style\" || tag === \"noscript\") {\n return false;\n }\n // Check if element is visible\n const style = window.getComputedStyle(child);\n if (style.display === \"none\" || style.visibility === \"hidden\") {\n return false;\n }\n return true;\n });\n\n // If this parent has enough children, it's likely a container\n if (meaningfulChildren.length >= minChildren && !fallbackContainer) {\n fallbackContainer = current;\n }\n\n // If parent has 3+ children, strongly consider it a container\n if (meaningfulChildren.length >= 3) {\n return current;\n }\n\n current = current.parentElement;\n }\n\n return fallbackContainer;\n}\n\n/**\n * Apply highlight to target element\n */\nexport function highlightTarget(\n element: Element,\n colors?: HighlightColors,\n): void {\n const mergedColors = { ...defaultHighlightColors, ...colors };\n injectStyles(mergedColors);\n element.classList.add(HIGHLIGHT_TARGET_CLASS);\n}\n\n/**\n * Apply highlight to container element\n */\nexport function highlightContainer(\n element: Element,\n colors?: HighlightColors,\n): void {\n const mergedColors = { ...defaultHighlightColors, ...colors };\n injectStyles(mergedColors);\n element.classList.add(HIGHLIGHT_CONTAINER_CLASS);\n}\n\n/**\n * Remove all highlights from the document\n */\nexport function clearHighlights(): void {\n if (typeof document === \"undefined\") return;\n\n document.querySelectorAll(`.${HIGHLIGHT_TARGET_CLASS}`).forEach((el) => {\n el.classList.remove(HIGHLIGHT_TARGET_CLASS);\n });\n\n document.querySelectorAll(`.${HIGHLIGHT_CONTAINER_CLASS}`).forEach((el) => {\n el.classList.remove(HIGHLIGHT_CONTAINER_CLASS);\n });\n}\n\n/**\n * Apply highlights to target element and its container parent\n */\nexport function applyHighlights(\n targetElement: Element,\n config?: HighlightConfig,\n): {\n target: Element;\n container: Element | null;\n} {\n // If highlights are disabled, don't apply anything\n if (config?.enabled === false) {\n return { target: targetElement, container: null };\n }\n\n clearHighlights();\n\n const colors = { ...defaultHighlightColors, ...config?.colors };\n\n highlightTarget(targetElement, colors);\n\n const container = findContainerParent(targetElement, config);\n if (container && container !== targetElement) {\n highlightContainer(container, colors);\n }\n\n return { target: targetElement, container };\n}\n","\"use client\";\n\nimport React, { useState } from \"react\";\nimport type { ScreenshotData, ScreenshotError } from \"@ewjdev/anyclick-core\";\nimport { formatBytes, estimateTotalSize } from \"@ewjdev/anyclick-core\";\nimport type { ScreenshotPreviewProps } from \"./types\";\nimport { menuStyles } from \"./styles\";\nimport { screenshotPreviewStyles as styles } from \"./styles\";\nimport {\n ImageIcon,\n RefreshCwIcon,\n CheckIcon,\n XIcon,\n Loader2Icon,\n ExpandIcon,\n ShrinkIcon,\n AlertCircleIcon,\n} from \"lucide-react\";\n\ntype TabType = \"element\" | \"container\" | \"viewport\";\n\n/**\n * Screenshot preview component - shows captured screenshots before sending\n */\nexport function ScreenshotPreview({\n screenshots,\n isLoading,\n onConfirm,\n onCancel,\n onRetake,\n isSubmitting,\n}: ScreenshotPreviewProps) {\n const [activeTab, setActiveTab] = useState<TabType>(\"element\");\n const [isExpanded, setIsExpanded] = useState(false);\n\n if (isLoading) {\n return (\n <div style={styles.container}>\n <div style={styles.loadingContainer}>\n <Loader2Icon\n className=\"w-6 h-6 animate-spin\"\n style={{ color: \"#3b82f6\" }}\n />\n <span style={styles.loadingText}>Capturing screenshots...</span>\n </div>\n </div>\n );\n }\n\n if (!screenshots) {\n return (\n <div style={styles.container}>\n <div style={styles.emptyContainer}>\n <ImageIcon className=\"w-8 h-8\" style={{ color: \"#9ca3af\" }} />\n <span style={styles.emptyText}>Screenshots unavailable</span>\n <span style={styles.emptySubtext}>\n Some elements can't be captured (e.g., gradient text)\n </span>\n <div style={styles.emptyActions}>\n <button\n type=\"button\"\n onClick={onRetake}\n style={styles.retakeButtonOutline}\n disabled={isSubmitting}\n >\n <RefreshCwIcon className=\"w-4 h-4\" />\n Try Again\n </button>\n <button\n type=\"button\"\n onClick={() =>\n onConfirm({ capturedAt: new Date().toISOString() })\n }\n style={styles.continueButton}\n disabled={isSubmitting}\n >\n <CheckIcon className=\"w-4 h-4\" />\n Continue Without\n </button>\n </div>\n </div>\n </div>\n );\n }\n\n // Get error for a specific tab\n const getError = (key: TabType): ScreenshotError | undefined => {\n return screenshots.errors?.[key];\n };\n\n const allTabs: {\n key: TabType;\n label: string;\n data: typeof screenshots.element;\n error?: ScreenshotError;\n }[] = [\n {\n key: \"element\" as const,\n label: \"Element\",\n data: screenshots.element,\n error: getError(\"element\"),\n },\n {\n key: \"container\" as const,\n label: \"Container\",\n data: screenshots.container,\n error: getError(\"container\"),\n },\n {\n key: \"viewport\" as const,\n label: \"Viewport\",\n data: screenshots.viewport,\n error: getError(\"viewport\"),\n },\n ];\n // Show tabs that have either data or errors\n const tabs = allTabs.filter((tab) => tab.data || tab.error);\n\n const activeScreenshot =\n activeTab === \"element\"\n ? screenshots.element\n : activeTab === \"container\"\n ? screenshots.container\n : screenshots.viewport;\n\n const activeError = getError(activeTab);\n\n const totalSize = estimateTotalSize(screenshots);\n\n console.log({ styles });\n\n return (\n <div\n style={{\n ...styles.container,\n ...(isExpanded ? styles.containerExpanded : {}),\n padding: \"8px\",\n }}\n >\n <div style={styles.header}>\n <span style={styles.headerTitle}>Review Screenshots</span>\n <div style={styles.headerActions}>\n <span style={styles.sizeLabel}>{formatBytes(totalSize)}</span>\n <button\n type=\"button\"\n onClick={() => setIsExpanded(!isExpanded)}\n style={styles.iconButton}\n title={isExpanded ? \"Collapse\" : \"Expand\"}\n >\n {isExpanded ? (\n <ShrinkIcon className=\"w-4 h-4\" />\n ) : (\n <ExpandIcon className=\"w-4 h-4\" />\n )}\n </button>\n </div>\n </div>\n\n {/* Tabs */}\n <div style={styles.tabContainer}>\n {tabs.map((tab) => (\n <button\n key={tab.key}\n type=\"button\"\n onClick={() => setActiveTab(tab.key)}\n style={{\n ...styles.tab,\n ...(activeTab === tab.key ? styles.tabActive : {}),\n ...(tab.error && !tab.data ? styles.tabError : {}),\n }}\n >\n {tab.error && !tab.data && (\n <AlertCircleIcon\n className=\"w-3 h-3\"\n style={{ color: \"#ef4444\" }}\n />\n )}\n {tab.label}\n {tab.data && (\n <span style={styles.tabSize}>\n {formatBytes(tab.data.sizeBytes)}\n </span>\n )}\n </button>\n ))}\n </div>\n\n {/* Preview image */}\n <div\n style={{\n ...styles.previewContainer,\n ...(isExpanded ? styles.previewContainerExpanded : {}),\n }}\n >\n {activeScreenshot ? (\n <img\n src={activeScreenshot.dataUrl}\n alt={`${activeTab} screenshot`}\n style={styles.previewImage}\n />\n ) : activeError ? (\n <div style={styles.errorPreview}>\n <AlertCircleIcon className=\"w-8 h-8\" style={{ color: \"#ef4444\" }} />\n <span style={styles.errorTitle}>Capture Failed</span>\n <span style={styles.errorMessage}>{activeError.message}</span>\n </div>\n ) : (\n <div style={styles.noPreview}>\n <ImageIcon className=\"w-6 h-6\" style={{ color: \"#9ca3af\" }} />\n <span>No {activeTab} screenshot</span>\n </div>\n )}\n </div>\n\n {/* Dimensions info */}\n {activeScreenshot && (\n <div style={styles.dimensionsInfo}>\n {activeScreenshot.width} × {activeScreenshot.height}px\n </div>\n )}\n\n {/* Actions */}\n <div style={styles.actions}>\n <button\n type=\"button\"\n onClick={onRetake}\n disabled={isSubmitting}\n style={styles.retakeButtonSmall}\n >\n <RefreshCwIcon className=\"w-3 h-3\" />\n Retake\n </button>\n <div style={styles.actionsRight}>\n <button\n type=\"button\"\n onClick={onCancel}\n disabled={isSubmitting}\n className=\"flex items-center gap-1\"\n style={{ ...menuStyles.button, ...menuStyles.cancelButton }}\n >\n <XIcon className=\"w-3 h-3\" />\n Cancel\n </button>\n <button\n type=\"button\"\n onClick={() => onConfirm(screenshots)}\n disabled={isSubmitting}\n style={{\n ...menuStyles.button,\n ...menuStyles.submitButton,\n ...(isSubmitting ? menuStyles.submitButtonDisabled : {}),\n }}\n >\n {isSubmitting ? (\n <>\n <Loader2Icon className=\"w-3 h-3 animate-spin\" />\n Sending...\n </>\n ) : (\n <>\n <CheckIcon className=\"w-3 h-3\" />\n Send\n </>\n )}\n </button>\n </div>\n </div>\n </div>\n );\n}\n","import { CamelToPascal } from './utility-types';\n\n/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts string to camel case\n *\n * @param {string} string\n * @returns {string} A camelized string\n */\nexport const toCamelCase = <T extends string>(string: T) =>\n string.replace(/^([A-Z])|[\\s-_]+(\\w)/g, (match, p1, p2) =>\n p2 ? p2.toUpperCase() : p1.toLowerCase(),\n );\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = toCamelCase(string);\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n\n/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return (\n Boolean(className) &&\n (className as string).trim() !== '' &&\n array.indexOf(className) === index\n );\n })\n .join(' ')\n .trim();\n\n/**\n * Is empty string\n *\n * @param {unknown} value\n * @returns {boolean} Whether the value is an empty string\n */\nexport const isEmptyString = (value: unknown): boolean => value === '';\n\n/**\n * Check if a component has an accessibility prop\n *\n * @param {object} props\n * @returns {boolean} Whether the component has an accessibility prop\n */\nexport const hasA11yProp = (props: Record<string, any>) => {\n for (const prop in props) {\n if (prop.startsWith('aria-') || prop === 'role' || prop === 'title') {\n return true;\n }\n }\n};\n","export default {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 2,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n};\n","import { createElement, forwardRef } from 'react';\nimport defaultAttributes from './defaultAttributes';\nimport { IconNode, LucideProps } from './types';\nimport { mergeClasses, hasA11yProp } from '@lucide/shared';\n\ninterface IconComponentProps extends LucideProps {\n iconNode: IconNode;\n}\n\n/**\n * Lucide icon component\n *\n * @component Icon\n * @param {object} props\n * @param {string} props.color - The color of the icon\n * @param {number} props.size - The size of the icon\n * @param {number} props.strokeWidth - The stroke width of the icon\n * @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width\n * @param {string} props.className - The class name of the icon\n * @param {IconNode} props.children - The children of the icon\n * @param {IconNode} props.iconNode - The icon node of the icon\n *\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst Icon = forwardRef<SVGSVGElement, IconComponentProps>(\n (\n {\n color = 'currentColor',\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = '',\n children,\n iconNode,\n ...rest\n },\n ref,\n ) =>\n createElement(\n 'svg',\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? (Number(strokeWidth) * 24) / Number(size) : strokeWidth,\n className: mergeClasses('lucide', className),\n ...(!children && !hasA11yProp(rest) && { 'aria-hidden': 'true' }),\n ...rest,\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ],\n ),\n);\n\nexport default Icon;\n","import { createElement, forwardRef } from 'react';\nimport { mergeClasses, toKebabCase, toPascalCase } from '@lucide/shared';\nimport { IconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Create a Lucide icon component\n * @param {string} iconName\n * @param {array} iconNode\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst createLucideIcon = (iconName: string, iconNode: IconNode) => {\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className,\n ),\n ...props,\n }),\n );\n\n Component.displayName = toPascalCase(iconName);\n\n return Component;\n};\n\nexport default createLucideIcon;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z',\n key: '18u6gg',\n },\n ],\n ['circle', { cx: '12', cy: '13', r: '3', key: '1vg3eu' }],\n];\n\n/**\n * @component @name Camera\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/camera\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Camera = createLucideIcon('camera', __iconNode);\n\nexport default Camera;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'M20 6 9 17l-5-5', key: '1gmf2c' }]];\n\n/**\n * @component @name Check\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/check\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Check = createLucideIcon('check', __iconNode);\n\nexport default Check;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'm15 18-6-6 6-6', key: '1wnfg3' }]];\n\n/**\n * @component @name ChevronLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/chevron-left\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronLeft = createLucideIcon('chevron-left', __iconNode);\n\nexport default ChevronLeft;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'm9 18 6-6-6-6', key: 'mthhwq' }]];\n\n/**\n * @component @name ChevronRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/chevron-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronRight = createLucideIcon('chevron-right', __iconNode);\n\nexport default ChevronRight;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['line', { x1: '12', x2: '12', y1: '8', y2: '12', key: '1pkeuh' }],\n ['line', { x1: '12', x2: '12.01', y1: '16', y2: '16', key: '4dfq90' }],\n];\n\n/**\n * @component @name CircleAlert\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/circle-alert\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CircleAlert = createLucideIcon('circle-alert', __iconNode);\n\nexport default CircleAlert;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm15 15 6 6', key: '1s409w' }],\n ['path', { d: 'm15 9 6-6', key: 'ko1vev' }],\n ['path', { d: 'M21 16v5h-5', key: '1ck2sf' }],\n ['path', { d: 'M21 8V3h-5', key: '1qoq8a' }],\n ['path', { d: 'M3 16v5h5', key: '1t08am' }],\n ['path', { d: 'm3 21 6-6', key: 'wwnumi' }],\n ['path', { d: 'M3 8V3h5', key: '1ln10m' }],\n ['path', { d: 'M9 9 3 3', key: 'v551iv' }],\n];\n\n/**\n * @component @name Expand\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/expand\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Expand = createLucideIcon('expand', __iconNode);\n\nexport default Expand;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528',\n key: '1jaruq',\n },\n ],\n];\n\n/**\n * @component @name Flag\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/flag\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Flag = createLucideIcon('flag', __iconNode);\n\nexport default Flag;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n ['path', { d: 'm21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21', key: '1xmnt7' }],\n];\n\n/**\n * @component @name Image\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/image\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Image = createLucideIcon('image', __iconNode);\n\nexport default Image;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'M21 12a9 9 0 1 1-6.219-8.56', key: '13zald' }]];\n\n/**\n * @component @name LoaderCircle\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/loader-circle\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst LoaderCircle = createLucideIcon('loader-circle', __iconNode);\n\nexport default LoaderCircle;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M5 12h14', key: '1ays0h' }],\n ['path', { d: 'M12 5v14', key: 's699le' }],\n];\n\n/**\n * @component @name Plus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Plus = createLucideIcon('plus', __iconNode);\n\nexport default Plus;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8', key: 'v9h5vc' }],\n ['path', { d: 'M21 3v5h-5', key: '1q7to0' }],\n ['path', { d: 'M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16', key: '3uifl3' }],\n ['path', { d: 'M8 16H3v5', key: '1cv678' }],\n];\n\n/**\n * @component @name RefreshCw\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/refresh-cw\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst RefreshCw = createLucideIcon('refresh-cw', __iconNode);\n\nexport default RefreshCw;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm15 15 6 6m-6-6v4.8m0-4.8h4.8', key: '17vawe' }],\n ['path', { d: 'M9 19.8V15m0 0H4.2M9 15l-6 6', key: 'chjx8e' }],\n ['path', { d: 'M15 4.2V9m0 0h4.8M15 9l6-6', key: 'lav6yq' }],\n ['path', { d: 'M9 4.2V9m0 0H4.2M9 9 3 3', key: '1pxi2q' }],\n];\n\n/**\n * @component @name Shrink\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/shrink\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Shrink = createLucideIcon('shrink', __iconNode);\n\nexport default Shrink;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M7 10v12', key: '1qc93n' }],\n [\n 'path',\n {\n d: 'M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z',\n key: 'emmmcr',\n },\n ],\n];\n\n/**\n * @component @name ThumbsUp\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/thumbs-up\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ThumbsUp = createLucideIcon('thumbs-up', __iconNode);\n\nexport default ThumbsUp;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M18 6 6 18', key: '1bl5f8' }],\n ['path', { d: 'm6 6 12 12', key: 'd8bk6v' }],\n];\n\n/**\n * @component @name X\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/x\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst X = createLucideIcon('x', __iconNode);\n\nexport default X;\n","\"use client\";\n\nimport { create } from \"zustand\";\nimport type { AnyclickTheme } from \"./types\";\n\n/**\n * Registered provider instance\n */\nexport interface ProviderInstance {\n /** Unique identifier for this provider instance */\n id: string;\n /** Reference to the provider's container element (null if not scoped) */\n containerRef: React.RefObject<Element | null>;\n /** Whether this provider is scoped to its container */\n scoped: boolean;\n /** The provider's theme configuration */\n theme: AnyclickTheme | null;\n /** Whether this provider is disabled */\n disabled: boolean;\n /** Parent provider ID (if nested) */\n parentId: string | null;\n /** Depth in the provider hierarchy (0 = root) */\n depth: number;\n /** Handler to call when an event occurs in this provider's scope */\n onContextMenu?: (event: MouseEvent, element: Element) => void;\n}\n\n/**\n * Provider registry store state\n */\ninterface ProviderStore {\n /** Map of provider ID to provider instance */\n providers: Map<string, ProviderInstance>;\n\n /**\n * Register a new provider\n */\n registerProvider: (provider: ProviderInstance) => void;\n\n /**\n * Unregister a provider\n */\n unregisterProvider: (id: string) => void;\n\n /**\n * Update a provider's configuration\n */\n updateProvider: (id: string, updates: Partial<ProviderInstance>) => void;\n\n /**\n * Find all providers that contain a given element, sorted by depth (nearest first)\n */\n findProvidersForElement: (element: Element) => ProviderInstance[];\n\n /**\n * Find the nearest parent provider for a given container\n */\n findParentProvider: (\n container: Element | null,\n excludeId?: string,\n ) => ProviderInstance | null;\n\n /**\n * Get merged theme for a provider (includes inherited parent themes)\n */\n getMergedTheme: (providerId: string) => AnyclickTheme;\n\n /**\n * Check if any ancestor provider has disabled anyclick\n */\n isDisabledByAncestor: (providerId: string) => boolean;\n\n /**\n * Check if an element is inside a disabled scoped provider's container\n * This is used to prevent the global provider from handling events\n * in areas where a disabled scoped provider should block them\n */\n isElementInDisabledScope: (element: Element) => boolean;\n}\n\n/**\n * Generate a unique ID for a provider instance\n */\nlet providerIdCounter = 0;\nexport function generateProviderId(): string {\n return `anyclick-provider-${++providerIdCounter}`;\n}\n\n/**\n * Zustand store for managing provider instances\n */\nexport const useProviderStore = create<ProviderStore>((set, get) => ({\n providers: new Map(),\n\n registerProvider: (provider) => {\n set((state) => {\n const newProviders = new Map(state.providers);\n newProviders.set(provider.id, provider);\n return { providers: newProviders };\n });\n },\n\n unregisterProvider: (id) => {\n set((state) => {\n const newProviders = new Map(state.providers);\n newProviders.delete(id);\n return { providers: newProviders };\n });\n },\n\n updateProvider: (id, updates) => {\n set((state) => {\n const newProviders = new Map(state.providers);\n const existing = newProviders.get(id);\n if (existing) {\n newProviders.set(id, { ...existing, ...updates });\n }\n return { providers: newProviders };\n });\n },\n\n findProvidersForElement: (element) => {\n const { providers } = get();\n const matching: ProviderInstance[] = [];\n\n for (const provider of providers.values()) {\n // Skip disabled providers\n if (provider.disabled) continue;\n\n const container = provider.containerRef.current;\n\n // For scoped providers, check if element is within container\n if (provider.scoped && container) {\n if (container.contains(element)) {\n matching.push(provider);\n }\n } else if (!provider.scoped) {\n // Non-scoped providers match all elements\n matching.push(provider);\n }\n }\n\n // Sort by depth (nearest/deepest first)\n return matching.sort((a, b) => b.depth - a.depth);\n },\n\n findParentProvider: (container, excludeId) => {\n const { providers } = get();\n\n if (!container) return null;\n\n let nearestParent: ProviderInstance | null = null;\n let nearestDepth = -1;\n\n for (const provider of providers.values()) {\n if (provider.id === excludeId) continue;\n\n const providerContainer = provider.containerRef.current;\n if (!providerContainer) continue;\n\n // Check if this provider's container contains our container\n if (providerContainer.contains(container)) {\n // This is a potential parent - check if it's the nearest one\n if (provider.depth > nearestDepth) {\n nearestParent = provider;\n nearestDepth = provider.depth;\n }\n }\n }\n\n return nearestParent;\n },\n\n getMergedTheme: (providerId) => {\n const { providers } = get();\n const provider = providers.get(providerId);\n\n if (!provider) {\n if (process.env.NODE_ENV === \"development\") {\n console.log(`[Store:getMergedTheme] Provider not found: ${providerId}`);\n }\n return {};\n }\n\n // Build ancestor chain\n const ancestors: ProviderInstance[] = [];\n let current: ProviderInstance | undefined = provider;\n\n while (current) {\n ancestors.unshift(current);\n current = current.parentId\n ? providers.get(current.parentId)\n : undefined;\n }\n\n if (process.env.NODE_ENV === \"development\") {\n console.log(`[Store:getMergedTheme] Provider: ${providerId}`, {\n ancestorCount: ancestors.length,\n ancestorIds: ancestors.map(a => a.id),\n providerHasTheme: !!provider.theme,\n providerThemeMenuStyle: provider.theme?.menuStyle ? Object.keys(provider.theme.menuStyle) : [],\n });\n }\n\n // Merge themes from root to current (later themes override earlier)\n const mergedTheme: AnyclickTheme = {};\n\n for (const ancestor of ancestors) {\n if (ancestor.theme) {\n // Deep merge for nested objects\n Object.assign(mergedTheme, ancestor.theme);\n\n // Special handling for highlightConfig and screenshotConfig\n if (ancestor.theme.highlightConfig) {\n mergedTheme.highlightConfig = {\n ...mergedTheme.highlightConfig,\n ...ancestor.theme.highlightConfig,\n colors: {\n ...mergedTheme.highlightConfig?.colors,\n ...ancestor.theme.highlightConfig.colors,\n },\n };\n }\n\n if (ancestor.theme.screenshotConfig) {\n mergedTheme.screenshotConfig = {\n ...mergedTheme.screenshotConfig,\n ...ancestor.theme.screenshotConfig,\n };\n }\n }\n }\n\n if (process.env.NODE_ENV === \"development\") {\n console.log(`[Store:getMergedTheme] Result for ${providerId}`, {\n hasMenuStyle: !!mergedTheme.menuStyle,\n menuStyleKeys: mergedTheme.menuStyle ? Object.keys(mergedTheme.menuStyle) : [],\n });\n }\n\n return mergedTheme;\n },\n\n isDisabledByAncestor: (providerId) => {\n const { providers } = get();\n const provider = providers.get(providerId);\n\n if (!provider) return false;\n\n // Check this provider and all ancestors\n let current: ProviderInstance | undefined = provider;\n\n while (current) {\n if (current.disabled || current.theme?.disabled) {\n return true;\n }\n current = current.parentId\n ? providers.get(current.parentId)\n : undefined;\n }\n\n return false;\n },\n\n isElementInDisabledScope: (element) => {\n const { providers } = get();\n\n // Check all scoped providers (including disabled ones)\n for (const provider of providers.values()) {\n // Only check scoped providers that are disabled\n if (!provider.scoped) continue;\n if (!provider.disabled && !provider.theme?.disabled) continue;\n\n const container = provider.containerRef.current;\n if (!container) continue;\n\n // If element is inside this disabled scoped provider's container\n if (container.contains(element)) {\n return true;\n }\n }\n\n return false;\n },\n}));\n\n/**\n * Dispatch a context menu event to all matching providers (bubble up)\n */\nexport function dispatchContextMenuEvent(\n event: MouseEvent,\n element: Element,\n): void {\n const store = useProviderStore.getState();\n const providers = store.findProvidersForElement(element);\n\n // Call handlers from nearest to outermost\n for (const provider of providers) {\n // Check if disabled by theme or prop\n if (store.isDisabledByAncestor(provider.id)) {\n continue;\n }\n\n if (provider.onContextMenu) {\n provider.onContextMenu(event, element);\n // After the first handler processes, we don't need to call others\n // unless we want to implement explicit bubbling control\n break;\n }\n }\n}\n\n","import type {\n FeedbackAdapter,\n FeedbackPayload,\n FeedbackType,\n ScreenshotConfig,\n ScreenshotData,\n} from \"@ewjdev/anyclick-core\";\nimport type { ReactNode, CSSProperties } from \"react\";\n\n/**\n * Theme configuration for AnyclickProvider\n * Supports nested theming with inheritance\n */\nexport interface AnyclickTheme {\n /** Custom styles for the context menu */\n menuStyle?: CSSProperties;\n /** Custom class name for the context menu */\n menuClassName?: string;\n /** Configuration for element highlighting */\n highlightConfig?: HighlightConfig;\n /** Configuration for screenshot capture */\n screenshotConfig?: ScreenshotConfig;\n /** Whether anyclick functionality is disabled in this theme */\n disabled?: boolean;\n}\n\n/**\n * Configuration for highlight colors\n */\nexport interface HighlightColors {\n /** Color for the target element highlight (default: #3b82f6 - blue) */\n targetColor?: string;\n /** Color for the container element highlight (default: #8b5cf6 - purple) */\n containerColor?: string;\n /** Opacity for the target shadow (default: 0.25) */\n targetShadowOpacity?: number;\n /** Opacity for the container shadow (default: 0.1) */\n containerShadowOpacity?: number;\n}\n\n/**\n * Configuration for highlight behavior\n */\nexport interface HighlightConfig {\n /** Whether to show highlights (default: true) */\n enabled?: boolean;\n /** Custom colors for highlights */\n colors?: HighlightColors;\n /** CSS selectors to identify container elements */\n containerSelectors?: string[];\n /** Minimum number of children for an element to be considered a container (default: 2) */\n minChildrenForContainer?: number;\n}\n\n/**\n * Menu item displayed in the feedback context menu\n */\nexport interface FeedbackMenuItem {\n /** Feedback type for this option (use unique identifier for parent items with children) */\n type: FeedbackType;\n /** Display label */\n label: string;\n /** Optional icon */\n icon?: ReactNode;\n /** Whether to show a comment input for this type */\n showComment?: boolean;\n /** Optional role(s) required to see this menu item */\n requiredRoles?: string[];\n /** Child menu items (creates a submenu) */\n children?: FeedbackMenuItem[];\n}\n\n/**\n * User context for role-based menu filtering\n */\nexport interface FeedbackUserContext {\n /** User's role(s) */\n roles?: string[];\n /** User ID */\n id?: string;\n /** User email */\n email?: string;\n}\n\n/**\n * Filter menu items based on user context\n */\nexport function filterMenuItemsByRole(\n items: FeedbackMenuItem[],\n userContext?: FeedbackUserContext,\n): FeedbackMenuItem[] {\n if (!userContext) {\n // If no user context, only show items without required roles\n return items.filter(\n (item) => !item.requiredRoles || item.requiredRoles.length === 0,\n );\n }\n\n const userRoles = userContext.roles ?? [];\n\n return items.filter((item) => {\n // If no required roles, show to everyone\n if (!item.requiredRoles || item.requiredRoles.length === 0) {\n return true;\n }\n // Check if user has any of the required roles\n return item.requiredRoles.some((role) => userRoles.includes(role));\n });\n}\n\n/**\n * Props for the AnyclickProvider component\n */\nexport interface AnyclickProviderProps {\n /** The adapter to use for submitting feedback */\n adapter: FeedbackAdapter;\n /** Child components */\n children: ReactNode;\n /**\n * Filter function to determine if feedback should be captured for a target element\n * Return true to allow feedback, false to ignore\n */\n targetFilter?: (event: MouseEvent, target: Element) => boolean;\n /** Custom menu items (defaults to Issue, Feature, Like) */\n menuItems?: FeedbackMenuItem[];\n /** Maximum length for innerText capture */\n maxInnerTextLength?: number;\n /** Maximum length for outerHTML capture */\n maxOuterHTMLLength?: number;\n /** Maximum number of ancestors to capture */\n maxAncestors?: number;\n /** Cooldown in milliseconds between submissions (rate limiting) */\n cooldownMs?: number;\n /** Attributes to strip from outerHTML for privacy */\n stripAttributes?: string[];\n /** Additional metadata to include with every submission */\n metadata?: Record<string, unknown>;\n /** Callback after successful submission */\n onSubmitSuccess?: (payload: FeedbackPayload) => void;\n /** Callback after failed submission */\n onSubmitError?: (error: Error, payload: FeedbackPayload) => void;\n /** Custom styles for the context menu */\n menuStyle?: CSSProperties;\n /** Custom class name for the context menu */\n menuClassName?: string;\n /** Whether the provider is disabled */\n disabled?: boolean;\n /** Configuration for element highlighting */\n highlightConfig?: HighlightConfig;\n /** Configuration for screenshot capture */\n screenshotConfig?: ScreenshotConfig;\n /**\n * Whether to scope this provider to its children only.\n * When true, events will only be captured for elements within this provider's subtree.\n * When false (default), events are captured for the entire document.\n */\n scoped?: boolean;\n /**\n * Theme configuration for this provider.\n * Themes are inherited from parent providers and merged (child overrides parent).\n * Set to null or { disabled: true } to disable anyclick in this subtree.\n */\n theme?: AnyclickTheme | null;\n}\n\n/**\n * @deprecated Use AnyclickProviderProps instead\n */\nexport type FeedbackProviderProps = AnyclickProviderProps;\n\n/**\n * Context value exposed by AnyclickProvider\n */\nexport interface AnyclickContextValue {\n /** Whether feedback is currently enabled */\n isEnabled: boolean;\n /** Whether a submission is in progress */\n isSubmitting: boolean;\n /** Submit feedback for a specific element */\n submitFeedback: (\n element: Element,\n type: FeedbackType,\n comment?: string,\n ) => Promise<void>;\n /** Open the feedback menu programmatically */\n openMenu: (element: Element, position: { x: number; y: number }) => void;\n /** Close the feedback menu */\n closeMenu: () => void;\n /** The current merged theme (inherited from ancestors) */\n theme: AnyclickTheme;\n /** Whether this provider is scoped */\n scoped: boolean;\n /** The provider's unique ID */\n providerId: string;\n}\n\n/**\n * @deprecated Use AnyclickContextValue instead\n */\nexport type FeedbackContextValue = AnyclickContextValue;\n\n/**\n * Props for the context menu component\n */\nexport interface ContextMenuProps {\n /** Whether the menu is visible */\n visible: boolean;\n /** Position of the menu */\n position: { x: number; y: number };\n /** Target element for feedback */\n targetElement: Element | null;\n /** Container element found by highlight logic */\n containerElement: Element | null;\n /** Menu items to display */\n items: FeedbackMenuItem[];\n /** Callback when an item is selected */\n onSelect: (\n type: FeedbackType,\n comment?: string,\n screenshots?: ScreenshotData,\n ) => void;\n /** Callback when menu is closed */\n onClose: () => void;\n /** Whether submission is in progress */\n isSubmitting: boolean;\n /** Custom styles */\n style?: CSSProperties;\n /** Custom class name */\n className?: string;\n /** Configuration for element highlighting */\n highlightConfig?: HighlightConfig;\n /** Configuration for screenshot capture */\n screenshotConfig?: ScreenshotConfig;\n}\n\n/**\n * Props for the screenshot preview component\n */\nexport interface ScreenshotPreviewProps {\n /** Captured screenshot data */\n screenshots: ScreenshotData | null;\n /** Whether screenshots are loading */\n isLoading: boolean;\n /** Callback when user confirms screenshots */\n onConfirm: (screenshots: ScreenshotData) => void;\n /** Callback when user cancels */\n onCancel: () => void;\n /** Callback when user wants to retake screenshots */\n onRetake: () => void;\n /** Whether submission is in progress */\n isSubmitting: boolean;\n}\n","// Components\n\"use client\";\n\n// New exports\nexport { AnyclickProvider } from \"./AnyclickProvider\";\nexport { ContextMenu } from \"./ContextMenu\";\nexport { ScreenshotPreview } from \"./ScreenshotPreview\";\n\n// Deprecated exports (for backward compatibility)\nexport { FeedbackProvider } from \"./AnyclickProvider\";\n\n// Context and hooks (new)\nexport { AnyclickContext, useAnyclick } from \"./context\";\n\n// Context and hooks (deprecated, for backward compatibility)\nexport { FeedbackContext, useFeedback } from \"./context\";\n\n// Store exports (for advanced use cases)\nexport {\n useProviderStore,\n generateProviderId,\n dispatchContextMenuEvent,\n type ProviderInstance,\n} from \"./store\";\n\n// Types (new)\nexport type {\n AnyclickProviderProps,\n AnyclickContextValue,\n AnyclickTheme,\n FeedbackMenuItem,\n ContextMenuProps,\n HighlightColors,\n HighlightConfig,\n FeedbackUserContext,\n ScreenshotPreviewProps,\n} from \"./types\";\n\n// Types (deprecated, for backward compatibility)\nexport type {\n FeedbackProviderProps,\n FeedbackContextValue,\n} from \"./types\";\n\n// Utilities\nexport { filterMenuItemsByRole } from \"./types\";\n\n// Re-export core types for convenience\nexport type {\n FeedbackType,\n FeedbackPayload,\n FeedbackAdapter,\n ElementContext,\n PageContext,\n ScreenshotData,\n ScreenshotCapture,\n ScreenshotConfig,\n ScreenshotCaptureMode,\n} from \"@ewjdev/anyclick-core\";\n\n// Re-export screenshot utilities from core\nexport {\n captureAllScreenshots,\n captureScreenshot,\n isScreenshotSupported,\n formatBytes,\n estimateTotalSize,\n DEFAULT_SCREENSHOT_CONFIG,\n DEFAULT_SENSITIVE_SELECTORS,\n} from \"@ewjdev/anyclick-core\";\n\n// Styles (for customization)\nexport { menuStyles, darkMenuStyles, menuCSSVariables } from \"./styles\";\n\n// Highlight utilities (for customization)\nexport {\n findContainerParent,\n highlightTarget,\n highlightContainer,\n clearHighlights,\n applyHighlights,\n defaultHighlightColors,\n defaultContainerSelectors,\n} from \"./highlight\";\n"],"mappings":";;;AAEA;AAAA,EACE,eAAAA;AAAA,EACA,aAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,OACK;AACP,SAAS,4BAA4B;;;ACRrC,SAAS,eAAe,kBAAkB;AAMnC,IAAM,kBAAkB,cAA2C,IAAI;AAKvE,IAAM,kBAAkB;AAMxB,SAAS,cAAoC;AAClD,QAAM,UAAU,WAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,qDAAqD;AAAA,EACvE;AACA,SAAO;AACT;AAKO,SAAS,cAAoC;AAClD,QAAM,UAAU,WAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;AClCA,SAAgB,YAAAC,WAAU,QAAQ,WAAW,mBAAmB;AAGhE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACYA,IAAM,mBAAmB;AAAA;AAAA,EAE9B,sBAAsB;AAAA,EACtB,yBAAyB;AAAA;AAAA,EAEzB,wBAAwB;AAAA,EACxB,8BAA8B;AAAA;AAAA,EAE9B,0BAA0B;AAAA;AAAA,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,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAGA,QAAM,UAAU,SACd,gBAAAJ,KAAC,SAAI,KAAK,iBAAiB,OAAO,EAAE,SAAS,WAAW,GACrD,UACH,IAEA;AAGF,SACE,gBAAAC,MAAC,gBAAgB,UAAhB,EAAyB,OAAO,cAC9B;AAAA;AAAA,IACD,gBAAAD;AAAA,MAAC;AAAA;AAAA,QACC,SAAS,eAAe,CAAC;AAAA,QACzB,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA,OAAO;AAAA,QACP,UAAU;AAAA,QACV,SAAS;AAAA,QACT;AAAA,QACA,OAAO;AAAA,QACP,WAAW;AAAA,QACX,iBAAiB;AAAA,QACjB,kBAAkB;AAAA;AAAA,IACpB;AAAA,KACF;AAEJ;AAKO,IAAM,mBAAmB;;;AyB9bzB,SAAS,sBACd,OACA,aACoB;AACpB,MAAI,CAAC,aAAa;AAEhB,WAAO,MAAM;AAAA,MACX,CAAC,SAAS,CAAC,KAAK,iBAAiB,KAAK,cAAc,WAAW;AAAA,IACjE;AAAA,EACF;AAEA,QAAM,YAAY,YAAY,SAAS,CAAC;AAExC,SAAO,MAAM,OAAO,CAAC,SAAS;AAE5B,QAAI,CAAC,KAAK,iBAAiB,KAAK,cAAc,WAAW,GAAG;AAC1D,aAAO;AAAA,IACT;AAEA,WAAO,KAAK,cAAc,KAAK,CAAC,SAAS,UAAU,SAAS,IAAI,CAAC;AAAA,EACnE,CAAC;AACH;;;AC/CA;AAAA,EACE,yBAAAO;AAAA,EACA;AAAA,EACA,yBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,6BAAAC;AAAA,EACA;AAAA,OACK;","names":["useCallback","useEffect","useRef","useState","useState","forwardRef","createElement","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","__iconNode","jsx","jsxs","useState","jsx","jsxs","useState","useRef","useCallback","mergedTheme","useEffect","captureAllScreenshots","isScreenshotSupported","formatBytes","estimateTotalSize","DEFAULT_SCREENSHOT_CONFIG"]}
|