capacitor-camera-multicapture 0.12.2
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/CameraMultiCapture.podspec +17 -0
- package/LICENSE +21 -0
- package/Package.swift +28 -0
- package/README.md +551 -0
- package/android/build.gradle +69 -0
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/dev/hemang/cameramulticapture/CameraConfig.java +45 -0
- package/android/src/main/java/dev/hemang/cameramulticapture/CameraConfigMapper.java +98 -0
- package/android/src/main/java/dev/hemang/cameramulticapture/CameraMultiCapture.java +10 -0
- package/android/src/main/java/dev/hemang/cameramulticapture/CameraMultiCapturePlugin.java +1340 -0
- package/android/src/main/java/dev/hemang/cameramulticapture/ExifWrapper.java +108 -0
- package/android/src/main/java/dev/hemang/cameramulticapture/GenericUploadWorker.java +173 -0
- package/android/src/main/java/dev/hemang/cameramulticapture/ImageUtils.java +215 -0
- package/android/src/main/java/dev/hemang/cameramulticapture/PluginVersion.java +6 -0
- package/android/src/main/java/dev/hemang/cameramulticapture/ThumbnailGenerator.java +48 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/esm/controllers/camera-controller.d.ts +127 -0
- package/dist/esm/controllers/camera-controller.js +388 -0
- package/dist/esm/controllers/camera-controller.js.map +1 -0
- package/dist/esm/controllers/gallery-controller.d.ts +66 -0
- package/dist/esm/controllers/gallery-controller.js +333 -0
- package/dist/esm/controllers/gallery-controller.js.map +1 -0
- package/dist/esm/definitions.d.ts +372 -0
- package/dist/esm/definitions.js +6 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/overlay-manager.d.ts +124 -0
- package/dist/esm/overlay-manager.js +732 -0
- package/dist/esm/overlay-manager.js.map +1 -0
- package/dist/esm/overlay.d.ts +2 -0
- package/dist/esm/overlay.js +39 -0
- package/dist/esm/overlay.js.map +1 -0
- package/dist/esm/registration.d.ts +5 -0
- package/dist/esm/registration.js +8 -0
- package/dist/esm/registration.js.map +1 -0
- package/dist/esm/types/ui-types.d.ts +78 -0
- package/dist/esm/types/ui-types.js +2 -0
- package/dist/esm/types/ui-types.js.map +1 -0
- package/dist/esm/ui/capture-gesture-handler.d.ts +15 -0
- package/dist/esm/ui/capture-gesture-handler.js +87 -0
- package/dist/esm/ui/capture-gesture-handler.js.map +1 -0
- package/dist/esm/ui/default-styles.d.ts +27 -0
- package/dist/esm/ui/default-styles.js +134 -0
- package/dist/esm/ui/default-styles.js.map +1 -0
- package/dist/esm/ui/image-editor.d.ts +10 -0
- package/dist/esm/ui/image-editor.js +103 -0
- package/dist/esm/ui/image-editor.js.map +1 -0
- package/dist/esm/ui/layout-manager.d.ts +42 -0
- package/dist/esm/ui/layout-manager.js +199 -0
- package/dist/esm/ui/layout-manager.js.map +1 -0
- package/dist/esm/ui/media-viewer.d.ts +2 -0
- package/dist/esm/ui/media-viewer.js +267 -0
- package/dist/esm/ui/media-viewer.js.map +1 -0
- package/dist/esm/ui/pinch-zoom-handler.d.ts +37 -0
- package/dist/esm/ui/pinch-zoom-handler.js +118 -0
- package/dist/esm/ui/pinch-zoom-handler.js.map +1 -0
- package/dist/esm/ui/ui-factory.d.ts +39 -0
- package/dist/esm/ui/ui-factory.js +272 -0
- package/dist/esm/ui/ui-factory.js.map +1 -0
- package/dist/esm/version.d.ts +1 -0
- package/dist/esm/version.js +3 -0
- package/dist/esm/version.js.map +1 -0
- package/dist/esm/web.d.ts +69 -0
- package/dist/esm/web.js +122 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +6274 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +6276 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Sources/CameraMultiCapturePlugin/CameraMultiCapture.swift +8 -0
- package/ios/Sources/CameraMultiCapturePlugin/CameraMultiCapturePlugin.swift +1551 -0
- package/ios/Sources/CameraMultiCapturePlugin/PluginVersion.swift +2 -0
- package/ios/Tests/CameraMultiCapturePluginTests/CameraMultiCapturePluginTests.swift +15 -0
- package/package.json +93 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay-manager.js","sourceRoot":"","sources":["../../src/overlay-manager.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAY3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACpG,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE;;GAEG;AACH,MAAM,OAAO,cAAc;IA0BzB,YAAY,MAAgC,EAAE,OAA+B;QAxBrE,mBAAc,GAAuB,IAAI,CAAC;QAE1C,sBAAiB,GAA6B,IAAI,CAAC;QACnD,aAAQ,GAAG,KAAK,CAAC;QACjB,mBAAc,GAAkD,IAAI,CAAC;QACrE,wBAAmB,GAAkB,IAAI,CAAC;QAC1C,kBAAa,GAAuB,IAAI,CAAC;QACzC,eAAU,GAAQ,IAAI,CAAC;QACvB,oBAAe,GAAwB,EAAE,CAAC;QAC1C,qBAAgB,GAAa,EAAE,CAAC;QAChC,gBAAW,GAAuB,IAAI,CAAC;QACvC,cAAS,GAAW,CAAC,CAAC;QACtB,gBAAW,GAA6B,IAAI,CAAC;Q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c,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACrE,CAAC;QAED,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,oCAAoC;QACxD,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC7B,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC;QACjE,CAAC;QACD,IAAI,IAAI,CAAC,uBAAuB,EAAE,CAAC;YACjC,MAAM,CAAC,mBAAmB,CAAC,mBAAmB,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;YAC9E,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;QACtC,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * Overlay Manager - Main controller for camera overlay UI\n */\nimport { TorchState } from './definitions';\nimport type {\n CameraMultiCapturePlugin,\n CameraOverlayResult,\n PhotoAddedEvent,\n PhotoUpdatedEvent,\n PhotoRemovedEvent,\n VideoAddedEvent,\n VideoRemovedEvent,\n VideoRecordingStartedEvent,\n VideoRecordingStoppedEvent,\n} from './definitions';\nimport { CameraController } from './controllers/camera-controller';\nimport { GalleryController } from './controllers/gallery-controller';\nimport { merge } from 'lodash';\nimport { defaultButtons } from './ui/default-styles';\nimport { createButton, createShotCounter, updateShotCounter, setButtonIcon } from './ui/ui-factory';\nimport {\n createOverlayContainer,\n createPositionContainers,\n createBottomGridCells,\n createGallery,\n} from './ui/layout-manager';\nimport type { ButtonsConfig, CameraOverlayUIOptions } from './types/ui-types';\nimport { PinchZoomHandler } from './ui/pinch-zoom-handler';\nimport { bindCaptureGestures } from './ui/capture-gesture-handler';\nimport type { CaptureGestureBinding } from './ui/capture-gesture-handler';\n\n/**\n * Main class to manage camera overlay UI\n */\nexport class OverlayManager {\n private options: CameraOverlayUIOptions;\n private overlayElement: HTMLElement | null = null;\n private cameraController: CameraController;\n private galleryController: GalleryController | null = null;\n private isActive = false;\n private resolvePromise: ((value: CameraOverlayResult) => void) | null = null;\n private bodyBackgroundColor: string | null = null;\n private zoomContainer: HTMLElement | null = null;\n private zoomConfig: any = null;\n private zoomButtonsList: HTMLButtonElement[] = [];\n private zoomButtonLevels: number[] = [];\n private shotCounter: HTMLElement | null = null;\n private shotCount: number = 0;\n private torchButton: HTMLButtonElement | null = null;\n private torchConfig: any | null = null;\n private pinchHandler: PinchZoomHandler | null = null;\n private isRecordingVideo = false;\n private captureButton: HTMLButtonElement | null = null;\n private captureGestureBinding: CaptureGestureBinding | null = null;\n private recordingIndicator: HTMLElement | null = null;\n private recordingTimerText: HTMLElement | null = null;\n private recordingStartedAt = 0;\n private recordingIntervalId: number | null = null;\n private boundOrientationHandler: (() => void) | null = null;\n\n constructor(plugin: CameraMultiCapturePlugin, options: CameraOverlayUIOptions) {\n this.options = options;\n this.cameraController = new CameraController(plugin, options);\n }\n\n /**\n * Emits photoAdded event using pure JavaScript events\n */\n private emitPhotoAddedEvent(eventData: PhotoAddedEvent): void {\n try {\n const event = new CustomEvent('photoAdded', { detail: eventData });\n window.dispatchEvent(event);\n } catch (error) {\n console.error('[CameraMultiCapture] Failed to emit photoAdded event:', error);\n }\n }\n\n /**\n * Emits photoUpdated event using pure JavaScript events\n */\n private emitPhotoUpdatedEvent(eventData: PhotoUpdatedEvent): void {\n try {\n const event = new CustomEvent('photoUpdated', { detail: eventData });\n window.dispatchEvent(event);\n } catch (error) {\n console.error('[CameraMultiCapture] Failed to emit photoUpdated event:', error);\n }\n }\n\n /**\n * Emits photoRemoved event using pure JavaScript events\n */\n private emitPhotoRemovedEvent(eventData: PhotoRemovedEvent): void {\n try {\n const event = new CustomEvent('photoRemoved', { detail: eventData });\n window.dispatchEvent(event);\n } catch (error) {\n console.error('[CameraMultiCapture] Failed to emit photoRemoved event:', error);\n }\n }\n\n /**\n * Emits videoRecordingStarted event using pure JavaScript events.\n */\n private emitVideoRecordingStartedEvent(eventData: VideoRecordingStartedEvent): void {\n try {\n const event = new CustomEvent('videoRecordingStarted', { detail: eventData });\n window.dispatchEvent(event);\n } catch (error) {\n console.error('[CameraMultiCapture] Failed to emit videoRecordingStarted event:', error);\n }\n }\n\n /**\n * Emits videoRecordingStopped event using pure JavaScript events.\n */\n private emitVideoRecordingStoppedEvent(eventData: VideoRecordingStoppedEvent): void {\n try {\n const event = new CustomEvent('videoRecordingStopped', { detail: eventData });\n window.dispatchEvent(event);\n } catch (error) {\n console.error('[CameraMultiCapture] Failed to emit videoRecordingStopped event:', error);\n }\n }\n\n /**\n * Emits videoAdded event using pure JavaScript events.\n */\n private emitVideoAddedEvent(eventData: VideoAddedEvent): void {\n try {\n const event = new CustomEvent('videoAdded', { detail: eventData });\n window.dispatchEvent(event);\n } catch (error) {\n console.error('[CameraMultiCapture] Failed to emit videoAdded event:', error);\n }\n }\n\n /**\n * Emits videoRemoved event using pure JavaScript events.\n */\n private emitVideoRemovedEvent(eventData: VideoRemovedEvent): void {\n try {\n const event = new CustomEvent('videoRemoved', { detail: eventData });\n window.dispatchEvent(event);\n } catch (error) {\n console.error('[CameraMultiCapture] Failed to emit videoRemoved event:', error);\n }\n }\n\n /**\n * Shows the camera overlay and returns captured images\n */\n async setup(): Promise<CameraOverlayResult> {\n // Only allow one active overlay at a time\n if (this.isActive) {\n throw new Error('Camera overlay is already active');\n }\n\n this.isActive = true;\n\n return new Promise<CameraOverlayResult>(async (resolve) => {\n this.resolvePromise = resolve;\n\n try {\n this.createOverlayUI();\n\n const container = document.getElementById(this.options.containerId);\n if (!container) {\n throw new Error(`Container with ID ${this.options.containerId} not found`);\n }\n\n this.bodyBackgroundColor = document.body.style.backgroundColor;\n document.body.style.backgroundColor = 'transparent';\n\n await this.cameraController.initialize(container, this.options.quality ?? 90);\n\n // Create zoom buttons after camera init\n if (this.zoomContainer && this.zoomConfig) {\n await this.createZoomButtonsAfterInit();\n }\n\n // JavaScript pinch-to-zoom when enabled\n if (this.options.pinchToZoom?.enabled) {\n this.pinchHandler = new PinchZoomHandler(\n this.cameraController,\n { options: this.options },\n (zoom) => this.updateZoomButtonSelection(zoom),\n );\n await this.pinchHandler.attach(container);\n }\n } catch (error) {\n console.error('Failed to initialize camera overlay', error);\n resolve({ images: [], videos: [], cancelled: true });\n this.cleanup();\n }\n });\n }\n\n async refresh(): Promise<void> {\n await this.cameraController.refresh();\n }\n\n private handleOrientationChange(): void {\n this.refresh();\n }\n\n /**\n * Creates the overlay UI\n */\n private createOverlayUI(): void {\n const container = document.getElementById(this.options.containerId);\n if (!container) {\n throw new Error(`Container with ID ${this.options.containerId} not found`);\n }\n\n // Create overlay container\n this.overlayElement = createOverlayContainer(this.options.containerId);\n\n // Create position containers\n const positions = createPositionContainers(this.overlayElement);\n\n // Create bottom grid cells\n const bottomCells = createBottomGridCells(positions.bottomGrid);\n\n const galleryElement = createGallery(this.overlayElement);\n if (this.options.maxCaptures === 1) {\n galleryElement.style.display = 'none';\n }\n this.galleryController = new GalleryController(\n galleryElement,\n this.options.thumbnailStyle,\n undefined,\n (eventData: PhotoAddedEvent) => {\n this.emitPhotoAddedEvent(eventData);\n },\n (eventData: PhotoUpdatedEvent) => {\n this.emitPhotoUpdatedEvent(eventData);\n },\n (eventData: PhotoRemovedEvent) => {\n this.emitPhotoRemovedEvent(eventData);\n },\n (eventData: VideoAddedEvent) => {\n this.emitVideoAddedEvent(eventData);\n },\n (eventData: VideoRemovedEvent) => {\n this.emitVideoRemovedEvent(eventData);\n },\n (totalCount: number) => {\n if (this.options.showShotCounter) {\n this.shotCount = totalCount;\n if (this.shotCounter) {\n updateShotCounter(this.shotCounter, this.shotCount);\n }\n }\n },\n typeof this.options.enableEditing === 'object' ? true : (this.options.enableEditing ?? false),\n typeof this.options.enableEditing === 'object' ? this.options.enableEditing.markerJsLicenseKey : undefined,\n );\n\n // Merge default buttons with user-provided options\n const buttons: ButtonsConfig = merge(defaultButtons, this.options.buttons || {});\n\n // Create buttons\n const captureBtn = createButton(buttons.capture);\n this.captureButton = captureBtn;\n\n // Create shot counter only if enabled\n if (this.options.showShotCounter) {\n this.shotCounter = createShotCounter();\n }\n\n // Place capture button back in center (no container needed)\n bottomCells.middle.appendChild(captureBtn);\n\n this.ensureRecordingGlowStyles();\n\n this.recordingIndicator = this.createRecordingIndicator();\n Object.assign(this.recordingIndicator.style, {\n position: 'absolute',\n top: '12px',\n left: '50%',\n transform: 'translateX(-50%)',\n });\n this.overlayElement.appendChild(this.recordingIndicator);\n\n this.captureGestureBinding = bindCaptureGestures(captureBtn, {\n onTap: () => this.handleCaptureTap(),\n onHoldStart: () => this.handleCaptureHoldStart(),\n onHoldEnd: () => this.handleCaptureRelease(),\n });\n\n // Only show Done button if not in single capture mode\n if (this.options.maxCaptures !== 1) {\n const doneBtn = createButton(buttons.done);\n\n // If counter is enabled, create a container with counter and done button\n if (this.shotCounter) {\n const rightContainer = document.createElement('div');\n Object.assign(rightContainer.style, {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '0.625rem',\n });\n\n rightContainer.appendChild(this.shotCounter);\n rightContainer.appendChild(doneBtn);\n bottomCells.right.appendChild(rightContainer);\n } else {\n // No counter, just add done button directly\n bottomCells.right.appendChild(doneBtn);\n }\n\n doneBtn.onclick = () => {\n this.completeCapture(false);\n };\n } else {\n // Single capture mode - if counter is enabled, show it in the right cell\n if (this.shotCounter) {\n bottomCells.right.appendChild(this.shotCounter);\n }\n }\n\n const cancelBtn = createButton(buttons.cancel);\n bottomCells.left.appendChild(cancelBtn);\n\n cancelBtn.onclick = () => {\n this.completeCapture(true);\n };\n\n if (buttons.switchCamera) {\n this.createSwitchCameraButton(buttons.switchCamera, positions.topRight);\n }\n\n if (buttons.torch) {\n this.createTorchButton(buttons.torch, positions.topRight);\n }\n\n if (buttons.flash) {\n this.createFlashButton(buttons.flash, positions.topLeft);\n }\n\n if (buttons.zoom) {\n // Store zoom config and container for later creation\n this.zoomConfig = buttons.zoom;\n this.zoomContainer = positions.zoomRow;\n }\n\n this.boundOrientationHandler = () => this.handleOrientationChange();\n window.addEventListener('orientationchange', this.boundOrientationHandler);\n }\n\n /**\n * Creates the switch camera button\n */\n private createSwitchCameraButton(config: any, container: HTMLElement): void {\n const switchBtn = createButton(config);\n\n switchBtn.onclick = async () => {\n try {\n await this.cameraController.switchCamera();\n await this.refreshTorchIconFromState();\n } catch (error) {\n console.error('Failed to switch camera', error);\n }\n };\n\n container.appendChild(switchBtn);\n }\n\n /**\n * Creates the torch (flashlight) toggle button, stacked below the switch camera button.\n */\n private createTorchButton(config: any, container: HTMLElement): void {\n const torchBtn = createButton({\n ...config,\n icon: config.offIcon,\n });\n\n this.torchButton = torchBtn;\n this.torchConfig = config;\n\n const updateTorchIcon = async (state: TorchState) => {\n const icon = state === TorchState.On ? config.onIcon : config.offIcon;\n if (icon) {\n await setButtonIcon(torchBtn, icon);\n }\n };\n\n torchBtn.onclick = async () => {\n try {\n const state = await this.cameraController.toggleTorch();\n await updateTorchIcon(state);\n } catch (error) {\n console.error('Failed to toggle torch', error);\n }\n };\n\n // Best-effort initial state sync; defaults to off if call fails.\n this.cameraController.getTorch()\n .then((state) => updateTorchIcon(state))\n .catch(() => { /* initial sync is optional */ });\n\n container.appendChild(torchBtn);\n }\n\n /**\n * Refreshes the torch icon based on current native torch state.\n */\n private async refreshTorchIconFromState(): Promise<void> {\n if (!this.torchButton || !this.torchConfig) return;\n try {\n const state = await this.cameraController.getTorch();\n const icon = state === TorchState.On ? this.torchConfig.onIcon : this.torchConfig.offIcon;\n if (icon) {\n await setButtonIcon(this.torchButton, icon);\n }\n } catch {\n // state sync failure is non-blocking; keep current icon\n }\n }\n\n /**\n * Creates zoom buttons after camera initialization\n */\n private async createZoomButtonsAfterInit(): Promise<void> {\n if (!this.zoomContainer || !this.zoomConfig) return;\n\n let smartZoomLevels: { level: number; isPhysicalCamera: boolean }[];\n\n try {\n // Get smart zoom levels that include physical camera switches\n smartZoomLevels = await this.cameraController.getSmartZoomLevels();\n } catch (error) {\n // Use fallback zoom levels\n const fallbackLevels = this.zoomConfig.levels || [1, 2, 3, 4];\n smartZoomLevels = fallbackLevels.map((level: number) => ({ level, isPhysicalCamera: false }));\n }\n\n // Create zoom buttons with the smart levels\n this.createZoomButtons(smartZoomLevels, this.zoomContainer);\n }\n\n /**\n * Creates smart zoom buttons with physical camera indication\n */\n private createZoomButtons(levels: { level: number; isPhysicalCamera: boolean }[], container: HTMLElement): void {\n const config = this.zoomConfig || {};\n\n // Track buttons and their corresponding zoom levels so we can update them from pinch and clicks\n this.zoomButtonsList = [];\n this.zoomButtonLevels = levels.map((z) => z.level);\n\n let currentZoomLevel = 1; // Default zoom level\n\n // Add zoom buttons in a horizontal row\n levels.forEach((zoomInfo) => {\n const level: any = zoomInfo.level;\n\n // Format zoom level display\n let displayText: string;\n if (level === 1) {\n // Special case for 1x - always show as \"1x\"\n displayText = '1x';\n } else if (level % 1 === 0) {\n // Show as integer for whole numbers (2x, 3x, etc.)\n displayText = `${Math.round(level)}x`;\n } else {\n // Round to one decimal place for fractional numbers (0.673434 -> 0.7x)\n displayText = `${Math.round(level * 10) / 10}x`;\n }\n\n // Create a button for each zoom level\n const zoomBtn = createButton({ ...config, text: displayText });\n\n // Make zoom buttons smaller and more compact\n Object.assign(zoomBtn.style, {\n padding: '5px 8px',\n minWidth: '40px',\n minHeight: '30px',\n margin: '0 3px',\n fontSize: '14px',\n fontWeight: '500',\n transition: 'all 0.2s ease',\n });\n\n zoomBtn.onclick = async () => {\n try {\n // Use smart zoom to handle physical camera switching\n await this.cameraController.performSmartZoom(level);\n currentZoomLevel = level;\n\n // Update button states based on the new zoom level\n this.updateZoomButtonSelection(currentZoomLevel);\n } catch (error) {\n console.error(`Failed to set zoom to ${level}x`, error);\n }\n };\n\n this.zoomButtonsList.push(zoomBtn);\n container.appendChild(zoomBtn);\n });\n\n // Initial highlight (typically 1x)\n this.updateZoomButtonSelection(currentZoomLevel);\n }\n\n /**\n * Updates zoom button styles so the button closest to currentZoom is highlighted.\n */\n private updateZoomButtonSelection(currentZoom: number): void {\n if (!this.zoomButtonsList.length || !this.zoomButtonLevels.length) return;\n \n // Find the zoom level closest to the current zoom\n let nearestIdx = 0;\n let bestDist = Math.abs(this.zoomButtonLevels[0] - currentZoom);\n\n for (let i = 1; i < this.zoomButtonLevels.length; i++) {\n const d = Math.abs(this.zoomButtonLevels[i] - currentZoom);\n if (d < bestDist) {\n bestDist = d;\n nearestIdx = i;\n }\n }\n\n // Highlight only the nearest button\n this.zoomButtonsList.forEach((btn, idx) => {\n if (idx === nearestIdx) {\n Object.assign(btn.style, {\n backgroundColor: '#ffffff',\n color: '#000000',\n fontWeight: '700',\n });\n } else {\n Object.assign(btn.style, {\n backgroundColor: 'rgba(0,0,0,0.5)',\n color: '#ffffff',\n fontWeight: '500',\n });\n }\n });\n }\n\n /**\n * Creates the flash toggle button\n */\n private createFlashButton(config: any, container: HTMLElement): void {\n const flashBtn = createButton({\n ...config,\n icon: config.offIcon // Start with off icon\n });\n\n const updateFlashIcon = async (mode: 'on' | 'off' | 'auto') => {\n let icon: string;\n switch (mode) {\n case 'on':\n icon = config.onIcon;\n break;\n case 'auto':\n // Only show auto icon if auto mode is enabled, otherwise show off icon\n icon = this.cameraController.isFlashAutoModeEnabled() ? config.autoIcon : config.offIcon;\n break;\n case 'off':\n default:\n icon = config.offIcon;\n break;\n }\n // Only update icon if one is provided\n if (icon) {\n await setButtonIcon(flashBtn, icon);\n }\n };\n\n flashBtn.onclick = async () => {\n try {\n const newMode = await this.cameraController.toggleFlash();\n await updateFlashIcon(newMode);\n } catch (error) {\n console.error('Failed to toggle flash', error);\n }\n };\n\n container.appendChild(flashBtn);\n }\n\n /**\n * Handles quick tap capture for still images.\n */\n private async handleCaptureTap(): Promise<void> {\n try {\n // Turn off torch before capture when flash is enabled to prevent LED conflict\n const flashMode = this.cameraController.getFlashMode();\n if (flashMode === 'on' || flashMode === 'auto') {\n const torchState = await this.cameraController.getTorch();\n if (torchState === TorchState.On) {\n await this.cameraController.setTorch(TorchState.Off);\n await this.refreshTorchIconFromState();\n }\n }\n\n const imageData = await this.cameraController.captureImage();\n if (!imageData || !this.galleryController) return;\n\n this.galleryController.addImage(imageData);\n\n if (this.options.maxCaptures && this.galleryController.getImages().length >= this.options.maxCaptures) {\n setTimeout(() => this.completeCapture(false), 100);\n }\n } catch (error) {\n console.error('Failed to capture image', error);\n }\n }\n\n /**\n * Handles long press start to begin video recording.\n */\n private async handleCaptureHoldStart(): Promise<void> {\n if (this.isRecordingVideo || this.cameraController.getRecordingState()) {\n return;\n }\n try {\n await this.cameraController.startVideoRecording();\n this.isRecordingVideo = true;\n this.recordingStartedAt = Date.now();\n this.startRecordingTimer();\n this.showRecordingIndicator(true);\n this.setCaptureGlow(true);\n this.emitVideoRecordingStartedEvent({ timestamp: this.recordingStartedAt });\n } catch (error) {\n this.isRecordingVideo = false;\n console.error('Failed to start video recording', error);\n }\n }\n\n /**\n * Handles pointer release for either tap photo or stop video recording.\n */\n private async handleCaptureRelease(): Promise<void> {\n if (!this.isRecordingVideo) {\n return;\n }\n\n try {\n const videoData = await this.cameraController.stopVideoRecording();\n this.isRecordingVideo = false;\n this.stopRecordingTimer();\n this.showRecordingIndicator(false);\n this.setCaptureGlow(false);\n\n if (videoData && this.galleryController) {\n this.galleryController.addVideo(videoData);\n this.emitVideoRecordingStoppedEvent({\n video: videoData,\n totalCount: this.galleryController.getVideos().length,\n });\n }\n await this.refreshTorchIconFromState();\n } catch (error) {\n this.isRecordingVideo = false;\n this.stopRecordingTimer();\n this.showRecordingIndicator(false);\n this.setCaptureGlow(false);\n console.error('Failed to stop video recording', error);\n }\n }\n\n private ensureRecordingGlowStyles(): void {\n const id = 'cmmc-recording-glow-styles';\n if (document.getElementById(id)) return;\n\n const style = document.createElement('style');\n style.id = id;\n style.textContent = `\n @keyframes cmmcCaptureGlow {\n 0% { filter: drop-shadow(0 0 6px rgba(255, 59, 48, 0.7)); }\n 50% { filter: drop-shadow(0 0 18px rgba(255, 59, 48, 1)) drop-shadow(0 0 40px rgba(255, 59, 48, 0.5)); }\n 100% { filter: drop-shadow(0 0 6px rgba(255, 59, 48, 0.7)); }\n }\n .cmmc-capture-recording {\n animation: cmmcCaptureGlow 1.2s ease-in-out infinite !important;\n filter: drop-shadow(0 0 6px rgba(255, 59, 48, 0.7)) !important;\n }\n `;\n document.head.appendChild(style);\n }\n\n private setCaptureGlow(active: boolean): void {\n if (!this.captureButton) return;\n if (active) {\n this.captureButton.classList.add('cmmc-capture-recording');\n } else {\n this.captureButton.classList.remove('cmmc-capture-recording');\n }\n }\n\n private createRecordingIndicator(): HTMLElement {\n const indicator = document.createElement('div');\n const dot = document.createElement('span');\n const timer = document.createElement('span');\n timer.textContent = '00:00';\n\n Object.assign(indicator.style, {\n display: 'none',\n alignItems: 'center',\n gap: '6px',\n padding: '6px 10px',\n borderRadius: '14px',\n background: 'rgba(0, 0, 0, 0.55)',\n color: '#ffffff',\n fontSize: '12px',\n fontWeight: '600',\n pointerEvents: 'none',\n zIndex: '4',\n });\n\n Object.assign(dot.style, {\n width: '8px',\n height: '8px',\n borderRadius: '50%',\n background: '#ff3b30',\n boxShadow: '0 0 10px rgba(255, 59, 48, 0.9)',\n animation: 'cmmcRecordPulse 1s infinite',\n });\n\n const styleTag = document.createElement('style');\n styleTag.textContent = `\n @keyframes cmmcRecordPulse {\n 0% { opacity: 1; transform: scale(1); }\n 50% { opacity: 0.35; transform: scale(0.9); }\n 100% { opacity: 1; transform: scale(1); }\n }\n `;\n indicator.appendChild(styleTag);\n indicator.appendChild(dot);\n indicator.appendChild(timer);\n this.recordingTimerText = timer;\n\n return indicator;\n }\n\n private showRecordingIndicator(visible: boolean): void {\n if (!this.recordingIndicator) return;\n this.recordingIndicator.style.display = visible ? 'flex' : 'none';\n if (!visible && this.recordingTimerText) {\n this.recordingTimerText.textContent = '00:00';\n }\n }\n\n private startRecordingTimer(): void {\n this.stopRecordingTimer();\n this.recordingIntervalId = window.setInterval(() => {\n if (!this.recordingTimerText) return;\n const elapsedSeconds = Math.floor((Date.now() - this.recordingStartedAt) / 1000);\n if (this.options.maxRecordingDuration && elapsedSeconds >= this.options.maxRecordingDuration) {\n // Prevent duplicate stop calls while awaiting native stop completion.\n this.stopRecordingTimer();\n void this.handleCaptureRelease();\n return;\n }\n const minutes = Math.floor(elapsedSeconds / 60);\n const seconds = elapsedSeconds % 60;\n this.recordingTimerText.textContent = `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;\n }, 200);\n }\n\n private stopRecordingTimer(): void {\n if (this.recordingIntervalId !== null) {\n clearInterval(this.recordingIntervalId);\n this.recordingIntervalId = null;\n }\n }\n\n /**\n * Completes the capture process\n */\n private completeCapture(cancelled: boolean): void {\n const images = this.galleryController?.getImages() || [];\n const videos = this.galleryController?.getVideos() || [];\n\n this.cleanup();\n\n if (this.resolvePromise) {\n this.resolvePromise({\n images: !cancelled ? images.map(img => img.data) : [],\n videos: !cancelled ? videos.map(vid => vid.data) : [],\n cancelled\n });\n this.resolvePromise = null;\n }\n }\n\n /**\n * Cleans up resources\n */\n private cleanup(): void {\n if (this.captureGestureBinding) {\n this.captureGestureBinding.detach();\n this.captureGestureBinding = null;\n }\n if (this.isRecordingVideo) {\n this.cameraController.stopVideoRecording().catch(() => {\n // best effort stop during cleanup\n });\n this.isRecordingVideo = false;\n }\n this.stopRecordingTimer();\n this.showRecordingIndicator(false);\n this.setCaptureGlow(false);\n this.recordingIndicator = null;\n this.recordingTimerText = null;\n this.captureButton = null;\n this.torchButton = null;\n this.torchConfig = null;\n if (this.pinchHandler) {\n this.pinchHandler.detach();\n this.pinchHandler = null;\n }\n this.cameraController.stop().catch((err) => {\n console.warn('Error stopping camera', err);\n });\n\n if (this.overlayElement && this.overlayElement.parentElement) {\n this.overlayElement.parentElement.removeChild(this.overlayElement);\n }\n\n this.overlayElement = null;\n this.galleryController = null;\n this.isActive = false;\n this.shotCounter = null;\n this.shotCount = 0; // Reset shot count for next session\n if (this.bodyBackgroundColor) {\n document.body.style.backgroundColor = this.bodyBackgroundColor;\n }\n if (this.boundOrientationHandler) {\n window.removeEventListener('orientationchange', this.boundOrientationHandler);\n this.boundOrientationHandler = null;\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { OverlayManager } from './overlay-manager';
|
|
2
|
+
import { CameraMultiCapture } from './registration';
|
|
3
|
+
// Helper function to convert CameraOverlayButtons to ButtonsConfig
|
|
4
|
+
function convertButtonsConfig(buttons) {
|
|
5
|
+
if (!buttons)
|
|
6
|
+
return undefined;
|
|
7
|
+
return {
|
|
8
|
+
capture: buttons.capture,
|
|
9
|
+
done: buttons.done,
|
|
10
|
+
cancel: buttons.cancel,
|
|
11
|
+
switchCamera: buttons.switchCamera,
|
|
12
|
+
zoom: buttons.zoom,
|
|
13
|
+
flash: buttons.flash,
|
|
14
|
+
torch: buttons.torch,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export const initialize = (options) => {
|
|
18
|
+
var _a;
|
|
19
|
+
const plugin = CameraMultiCapture;
|
|
20
|
+
// Create an overlay manager with the provided options
|
|
21
|
+
// Map the public API options to internal UI options
|
|
22
|
+
const uiOptions = {
|
|
23
|
+
containerId: options.containerId,
|
|
24
|
+
quality: options.quality,
|
|
25
|
+
thumbnailStyle: options.thumbnailStyle,
|
|
26
|
+
buttons: convertButtonsConfig(options.buttons),
|
|
27
|
+
maxCaptures: options.maxCaptures,
|
|
28
|
+
maxRecordingDuration: options.maxRecordingDuration,
|
|
29
|
+
flashAutoModeEnabled: options.flashAutoModeEnabled,
|
|
30
|
+
showShotCounter: (_a = options.showShotCounter) !== null && _a !== void 0 ? _a : true, // Default to true for backward compatibility
|
|
31
|
+
pinchToZoom: options.pinchToZoom,
|
|
32
|
+
enableEditing: options.enableEditing,
|
|
33
|
+
enableSaving: options.enableSaving,
|
|
34
|
+
galleryAlbumName: options.galleryAlbumName,
|
|
35
|
+
};
|
|
36
|
+
const overlayManager = new OverlayManager(plugin, uiOptions);
|
|
37
|
+
return overlayManager.setup();
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=overlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay.js","sourceRoot":"","sources":["../../src/overlay.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGpD,mEAAmE;AACnE,SAAS,oBAAoB,CAAC,OAA8B;IAC1D,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAE/B,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,KAAK,EAAE,OAAO,CAAC,KAAK;KACrB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAA6B,EAAgC,EAAE;;IACxF,MAAM,MAAM,GAAG,kBAAkB,CAAC;IAClC,sDAAsD;IACtD,oDAAoD;IACpD,MAAM,SAAS,GAA2B;QACxC,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC;QAC9C,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QAClD,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QAClD,eAAe,EAAE,MAAA,OAAO,CAAC,eAAe,mCAAI,IAAI,EAAE,6CAA6C;QAC/F,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;KAC3C,CAAC;IAEF,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAE7D,OAAO,cAAc,CAAC,KAAK,EAAE,CAAC;AAChC,CAAC,CAAA","sourcesContent":["import type { \n CameraOverlayOptions, \n CameraOverlayResult, \n CameraOverlayButtons,\n} from './definitions';\nimport { OverlayManager } from './overlay-manager';\nimport { CameraMultiCapture } from './registration';\nimport { CameraOverlayUIOptions, ButtonsConfig } from './types/ui-types';\n\n// Helper function to convert CameraOverlayButtons to ButtonsConfig\nfunction convertButtonsConfig(buttons?: CameraOverlayButtons): Partial<ButtonsConfig> | undefined {\n if (!buttons) return undefined;\n \n return {\n capture: buttons.capture,\n done: buttons.done,\n cancel: buttons.cancel,\n switchCamera: buttons.switchCamera,\n zoom: buttons.zoom,\n flash: buttons.flash,\n torch: buttons.torch,\n };\n}\n\nexport const initialize = (options: CameraOverlayOptions): Promise<CameraOverlayResult> => {\n const plugin = CameraMultiCapture;\n // Create an overlay manager with the provided options\n // Map the public API options to internal UI options\n const uiOptions: CameraOverlayUIOptions = {\n containerId: options.containerId,\n quality: options.quality,\n thumbnailStyle: options.thumbnailStyle,\n buttons: convertButtonsConfig(options.buttons),\n maxCaptures: options.maxCaptures,\n maxRecordingDuration: options.maxRecordingDuration,\n flashAutoModeEnabled: options.flashAutoModeEnabled,\n showShotCounter: options.showShotCounter ?? true, // Default to true for backward compatibility\n pinchToZoom: options.pinchToZoom,\n enableEditing: options.enableEditing,\n enableSaving: options.enableSaving,\n galleryAlbumName: options.galleryAlbumName,\n };\n \n const overlayManager = new OverlayManager(plugin, uiOptions);\n \n return overlayManager.setup();\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { registerPlugin } from '@capacitor/core';
|
|
2
|
+
/**
|
|
3
|
+
* Register the CameraMultiCapture plugin with Capacitor
|
|
4
|
+
*/
|
|
5
|
+
export const CameraMultiCapture = registerPlugin('CameraMultiCapture', {
|
|
6
|
+
web: () => import('./web').then((m) => new m.CameraMultiCaptureWeb()),
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=registration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration.js","sourceRoot":"","sources":["../../src/registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAA2B,oBAAoB,EAAE;IAC/F,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;CACtE,CAAC,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\nimport type { CameraMultiCapturePlugin } from './definitions';\n\n/**\n * Register the CameraMultiCapture plugin with Capacitor\n */\nexport const CameraMultiCapture = registerPlugin<CameraMultiCapturePlugin>('CameraMultiCapture', {\n web: () => import('./web').then((m) => new m.CameraMultiCaptureWeb()),\n});\n"]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { ButtonStyle as OriginalButtonStyle, ThumbnailStyle as PublicThumbnailStyle } from '../definitions';
|
|
2
|
+
/**
|
|
3
|
+
* Defines the style properties for camera buttons
|
|
4
|
+
*/
|
|
5
|
+
export type ButtonStyle = OriginalButtonStyle;
|
|
6
|
+
/**
|
|
7
|
+
* Defines the position options for UI elements
|
|
8
|
+
*/
|
|
9
|
+
export type UIPosition = 'topLeft' | 'topRight' | 'center' | 'left' | 'right' | 'custom';
|
|
10
|
+
/**
|
|
11
|
+
* Base interface for all camera buttons
|
|
12
|
+
*/
|
|
13
|
+
export interface BaseButtonConfig {
|
|
14
|
+
style?: ButtonStyle;
|
|
15
|
+
position?: UIPosition;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Configuration for buttons with icons
|
|
19
|
+
*/
|
|
20
|
+
export interface IconButtonConfig extends BaseButtonConfig {
|
|
21
|
+
icon?: string;
|
|
22
|
+
text?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Configuration for toggle buttons (like flash)
|
|
26
|
+
*/
|
|
27
|
+
export interface ToggleButtonConfig extends BaseButtonConfig {
|
|
28
|
+
onIcon?: string;
|
|
29
|
+
offIcon?: string;
|
|
30
|
+
autoIcon?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Configuration for zoom controls
|
|
34
|
+
*/
|
|
35
|
+
export interface ZoomButtonConfig extends IconButtonConfig {
|
|
36
|
+
levels?: number[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Configuration for all UI buttons
|
|
40
|
+
*/
|
|
41
|
+
export interface ButtonsConfig {
|
|
42
|
+
capture: IconButtonConfig;
|
|
43
|
+
done: IconButtonConfig;
|
|
44
|
+
cancel: IconButtonConfig;
|
|
45
|
+
switchCamera?: IconButtonConfig;
|
|
46
|
+
zoom?: ZoomButtonConfig;
|
|
47
|
+
flash?: ToggleButtonConfig;
|
|
48
|
+
torch?: ToggleButtonConfig;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Configuration for thumbnail display - extends the public API version with additional style properties
|
|
52
|
+
*/
|
|
53
|
+
export interface ThumbnailStyle extends PublicThumbnailStyle {
|
|
54
|
+
borderRadius?: string;
|
|
55
|
+
margin?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Camera overlay options
|
|
59
|
+
*/
|
|
60
|
+
export interface CameraOverlayUIOptions {
|
|
61
|
+
containerId: string;
|
|
62
|
+
buttons?: Partial<ButtonsConfig>;
|
|
63
|
+
thumbnailStyle?: ThumbnailStyle;
|
|
64
|
+
quality?: number;
|
|
65
|
+
maxCaptures?: number;
|
|
66
|
+
maxRecordingDuration?: number;
|
|
67
|
+
flashAutoModeEnabled?: boolean;
|
|
68
|
+
showShotCounter?: boolean;
|
|
69
|
+
pinchToZoom?: {
|
|
70
|
+
enabled?: boolean;
|
|
71
|
+
lockToNearestStep?: boolean;
|
|
72
|
+
};
|
|
73
|
+
enableEditing?: boolean | {
|
|
74
|
+
markerJsLicenseKey?: string;
|
|
75
|
+
};
|
|
76
|
+
enableSaving?: boolean;
|
|
77
|
+
galleryAlbumName?: string;
|
|
78
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-types.js","sourceRoot":"","sources":["../../../src/types/ui-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { \n ButtonStyle as OriginalButtonStyle, \n ThumbnailStyle as PublicThumbnailStyle\n} from '../definitions';\n\n/**\n * Defines the style properties for camera buttons\n */\nexport type ButtonStyle = OriginalButtonStyle;\n\n/**\n * Defines the position options for UI elements\n */\nexport type UIPosition = 'topLeft' | 'topRight' | 'center' | 'left' | 'right' | 'custom';\n\n/**\n * Base interface for all camera buttons\n */\nexport interface BaseButtonConfig {\n style?: ButtonStyle;\n position?: UIPosition;\n}\n\n/**\n * Configuration for buttons with icons\n */\nexport interface IconButtonConfig extends BaseButtonConfig {\n icon?: string;\n text?: string;\n}\n\n/**\n * Configuration for toggle buttons (like flash)\n */\nexport interface ToggleButtonConfig extends BaseButtonConfig {\n onIcon?: string;\n offIcon?: string;\n autoIcon?: string;\n}\n\n/**\n * Configuration for zoom controls\n */\nexport interface ZoomButtonConfig extends IconButtonConfig {\n levels?: number[];\n}\n\n/**\n * Configuration for all UI buttons\n */\nexport interface ButtonsConfig {\n capture: IconButtonConfig;\n done: IconButtonConfig;\n cancel: IconButtonConfig;\n switchCamera?: IconButtonConfig;\n zoom?: ZoomButtonConfig;\n flash?: ToggleButtonConfig;\n torch?: ToggleButtonConfig;\n}\n\n/**\n * Configuration for thumbnail display - extends the public API version with additional style properties\n */\nexport interface ThumbnailStyle extends PublicThumbnailStyle {\n borderRadius?: string;\n margin?: string;\n}\n\n\n/**\n * Camera overlay options\n */\nexport interface CameraOverlayUIOptions {\n containerId: string;\n buttons?: Partial<ButtonsConfig>;\n thumbnailStyle?: ThumbnailStyle;\n quality?: number;\n maxCaptures?: number;\n maxRecordingDuration?: number;\n flashAutoModeEnabled?: boolean;\n showShotCounter?: boolean;\n pinchToZoom?: {\n enabled?: boolean;\n lockToNearestStep?: boolean;\n };\n enableEditing?: boolean | { markerJsLicenseKey?: string };\n enableSaving?: boolean;\n galleryAlbumName?: string;\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface CaptureGestureHandlers {
|
|
2
|
+
onTap: () => Promise<void>;
|
|
3
|
+
onHoldStart: () => Promise<void>;
|
|
4
|
+
onHoldEnd: () => Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
export interface CaptureGestureBinding {
|
|
7
|
+
detach: () => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Binds capture button gestures:
|
|
11
|
+
* - quick tap triggers photo capture
|
|
12
|
+
* - hold for holdDelayMs triggers video recording start
|
|
13
|
+
* - release stops active video recording
|
|
14
|
+
*/
|
|
15
|
+
export declare function bindCaptureGestures(captureBtn: HTMLButtonElement, handlers: CaptureGestureHandlers, holdDelayMs?: number): CaptureGestureBinding;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Binds capture button gestures:
|
|
3
|
+
* - quick tap triggers photo capture
|
|
4
|
+
* - hold for holdDelayMs triggers video recording start
|
|
5
|
+
* - release stops active video recording
|
|
6
|
+
*/
|
|
7
|
+
export function bindCaptureGestures(captureBtn, handlers, holdDelayMs = 500) {
|
|
8
|
+
let holdTimerId = null;
|
|
9
|
+
let suppressNextClickAfterHold = false;
|
|
10
|
+
// Prevent iOS from hijacking long-press touches. On newer iPhones (15+)
|
|
11
|
+
// with Haptic Touch, without these properties iOS fires pointercancel or
|
|
12
|
+
// pointerleave ~4 seconds into a hold, interrupting video recording.
|
|
13
|
+
captureBtn.style.touchAction = 'none';
|
|
14
|
+
captureBtn.style.webkitTouchCallout = 'none';
|
|
15
|
+
captureBtn.style.webkitUserSelect = 'none';
|
|
16
|
+
captureBtn.style.userSelect = 'none';
|
|
17
|
+
const clearHoldTimer = () => {
|
|
18
|
+
if (holdTimerId === null)
|
|
19
|
+
return;
|
|
20
|
+
clearTimeout(holdTimerId);
|
|
21
|
+
holdTimerId = null;
|
|
22
|
+
};
|
|
23
|
+
const startHoldTimer = () => {
|
|
24
|
+
clearHoldTimer();
|
|
25
|
+
holdTimerId = window.setTimeout(async () => {
|
|
26
|
+
suppressNextClickAfterHold = true;
|
|
27
|
+
await handlers.onHoldStart();
|
|
28
|
+
}, holdDelayMs);
|
|
29
|
+
};
|
|
30
|
+
const clickHandler = async () => {
|
|
31
|
+
if (suppressNextClickAfterHold) {
|
|
32
|
+
suppressNextClickAfterHold = false;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
await handlers.onTap();
|
|
36
|
+
};
|
|
37
|
+
const releaseHandler = async () => {
|
|
38
|
+
clearHoldTimer();
|
|
39
|
+
await handlers.onHoldEnd();
|
|
40
|
+
};
|
|
41
|
+
captureBtn.addEventListener('click', clickHandler);
|
|
42
|
+
if ('PointerEvent' in window) {
|
|
43
|
+
const onPointerDown = (e) => {
|
|
44
|
+
// Capture the pointer so the element keeps receiving events even if the
|
|
45
|
+
// finger drifts slightly off the button. This prevents spurious
|
|
46
|
+
// pointerleave events on iOS that would stop recording prematurely.
|
|
47
|
+
captureBtn.setPointerCapture(e.pointerId);
|
|
48
|
+
startHoldTimer();
|
|
49
|
+
};
|
|
50
|
+
captureBtn.addEventListener('pointerdown', onPointerDown);
|
|
51
|
+
captureBtn.addEventListener('pointerup', releaseHandler);
|
|
52
|
+
captureBtn.addEventListener('pointercancel', releaseHandler);
|
|
53
|
+
return {
|
|
54
|
+
detach: () => {
|
|
55
|
+
clearHoldTimer();
|
|
56
|
+
captureBtn.removeEventListener('click', clickHandler);
|
|
57
|
+
captureBtn.removeEventListener('pointerdown', onPointerDown);
|
|
58
|
+
captureBtn.removeEventListener('pointerup', releaseHandler);
|
|
59
|
+
captureBtn.removeEventListener('pointercancel', releaseHandler);
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
// Touch/mouse fallback for browsers without PointerEvent
|
|
64
|
+
const onTouchStart = (e) => {
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
startHoldTimer();
|
|
67
|
+
};
|
|
68
|
+
captureBtn.addEventListener('touchstart', onTouchStart, { passive: false });
|
|
69
|
+
captureBtn.addEventListener('touchend', releaseHandler);
|
|
70
|
+
captureBtn.addEventListener('touchcancel', releaseHandler);
|
|
71
|
+
captureBtn.addEventListener('mousedown', startHoldTimer);
|
|
72
|
+
captureBtn.addEventListener('mouseup', releaseHandler);
|
|
73
|
+
captureBtn.addEventListener('mouseleave', releaseHandler);
|
|
74
|
+
return {
|
|
75
|
+
detach: () => {
|
|
76
|
+
clearHoldTimer();
|
|
77
|
+
captureBtn.removeEventListener('click', clickHandler);
|
|
78
|
+
captureBtn.removeEventListener('touchstart', onTouchStart);
|
|
79
|
+
captureBtn.removeEventListener('touchend', releaseHandler);
|
|
80
|
+
captureBtn.removeEventListener('touchcancel', releaseHandler);
|
|
81
|
+
captureBtn.removeEventListener('mousedown', startHoldTimer);
|
|
82
|
+
captureBtn.removeEventListener('mouseup', releaseHandler);
|
|
83
|
+
captureBtn.removeEventListener('mouseleave', releaseHandler);
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=capture-gesture-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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AC3D,UAAU,CAAC,gBAAgB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IACzD,UAAU,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IACvD,UAAU,CAAC,gBAAgB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAE1D,OAAO;QACL,MAAM,EAAE,GAAG,EAAE;YACX,cAAc,EAAE,CAAC;YACjB,UAAU,CAAC,mBAAmB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;YACtD,UAAU,CAAC,mBAAmB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;YAC3D,UAAU,CAAC,mBAAmB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;YAC3D,UAAU,CAAC,mBAAmB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;YAC9D,UAAU,CAAC,mBAAmB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;YAC5D,UAAU,CAAC,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;YAC1D,UAAU,CAAC,mBAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QAC/D,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["export interface CaptureGestureHandlers {\n onTap: () => Promise<void>;\n onHoldStart: () => Promise<void>;\n onHoldEnd: () => Promise<void>;\n}\n\nexport interface CaptureGestureBinding {\n detach: () => void;\n}\n\n/**\n * Binds capture button gestures:\n * - quick tap triggers photo capture\n * - hold for holdDelayMs triggers video recording start\n * - release stops active video recording\n */\nexport function bindCaptureGestures(\n captureBtn: HTMLButtonElement,\n handlers: CaptureGestureHandlers,\n holdDelayMs = 500\n): CaptureGestureBinding {\n let holdTimerId: number | null = null;\n let suppressNextClickAfterHold = false;\n\n // Prevent iOS from hijacking long-press touches. On newer iPhones (15+)\n // with Haptic Touch, without these properties iOS fires pointercancel or\n // pointerleave ~4 seconds into a hold, interrupting video recording.\n captureBtn.style.touchAction = 'none';\n (captureBtn.style as any).webkitTouchCallout = 'none';\n (captureBtn.style as any).webkitUserSelect = 'none';\n captureBtn.style.userSelect = 'none';\n\n const clearHoldTimer = () => {\n if (holdTimerId === null) return;\n clearTimeout(holdTimerId);\n holdTimerId = null;\n };\n\n const startHoldTimer = () => {\n clearHoldTimer();\n holdTimerId = window.setTimeout(async () => {\n suppressNextClickAfterHold = true;\n await handlers.onHoldStart();\n }, holdDelayMs);\n };\n\n const clickHandler = async () => {\n if (suppressNextClickAfterHold) {\n suppressNextClickAfterHold = false;\n return;\n }\n await handlers.onTap();\n };\n\n const releaseHandler = async () => {\n clearHoldTimer();\n await handlers.onHoldEnd();\n };\n\n captureBtn.addEventListener('click', clickHandler);\n\n if ('PointerEvent' in window) {\n const onPointerDown = (e: PointerEvent) => {\n // Capture the pointer so the element keeps receiving events even if the\n // finger drifts slightly off the button. This prevents spurious\n // pointerleave events on iOS that would stop recording prematurely.\n captureBtn.setPointerCapture(e.pointerId);\n startHoldTimer();\n };\n\n captureBtn.addEventListener('pointerdown', onPointerDown);\n captureBtn.addEventListener('pointerup', releaseHandler);\n captureBtn.addEventListener('pointercancel', releaseHandler);\n\n return {\n detach: () => {\n clearHoldTimer();\n captureBtn.removeEventListener('click', clickHandler);\n captureBtn.removeEventListener('pointerdown', onPointerDown);\n captureBtn.removeEventListener('pointerup', releaseHandler);\n captureBtn.removeEventListener('pointercancel', releaseHandler);\n },\n };\n }\n\n // Touch/mouse fallback for browsers without PointerEvent\n const onTouchStart = (e: TouchEvent) => {\n e.preventDefault();\n startHoldTimer();\n };\n\n captureBtn.addEventListener('touchstart', onTouchStart, { passive: false });\n captureBtn.addEventListener('touchend', releaseHandler);\n captureBtn.addEventListener('touchcancel', releaseHandler);\n captureBtn.addEventListener('mousedown', startHoldTimer);\n captureBtn.addEventListener('mouseup', releaseHandler);\n captureBtn.addEventListener('mouseleave', releaseHandler);\n\n return {\n detach: () => {\n clearHoldTimer();\n captureBtn.removeEventListener('click', clickHandler);\n captureBtn.removeEventListener('touchstart', onTouchStart);\n captureBtn.removeEventListener('touchend', releaseHandler);\n captureBtn.removeEventListener('touchcancel', releaseHandler);\n captureBtn.removeEventListener('mousedown', startHoldTimer);\n captureBtn.removeEventListener('mouseup', releaseHandler);\n captureBtn.removeEventListener('mouseleave', releaseHandler);\n },\n };\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default styles and icons for camera overlay UI
|
|
3
|
+
*/
|
|
4
|
+
import { ButtonStyle, ButtonsConfig } from '../types/ui-types';
|
|
5
|
+
/**
|
|
6
|
+
* Default SVG icons for camera controls
|
|
7
|
+
*/
|
|
8
|
+
export declare const defaultIcons: {
|
|
9
|
+
captureIcon: string;
|
|
10
|
+
doneIcon: string;
|
|
11
|
+
cancelIcon: string;
|
|
12
|
+
switchCameraIcon: string;
|
|
13
|
+
zoomIcon: string;
|
|
14
|
+
flashOffIcon: string;
|
|
15
|
+
flashOnIcon: string;
|
|
16
|
+
flashAutoIcon: string;
|
|
17
|
+
torchOffIcon: string;
|
|
18
|
+
torchOnIcon: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Default button style
|
|
22
|
+
*/
|
|
23
|
+
export declare const defaultButtonStyle: ButtonStyle;
|
|
24
|
+
/**
|
|
25
|
+
* Default button configurations
|
|
26
|
+
*/
|
|
27
|
+
export declare const defaultButtons: ButtonsConfig;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default SVG icons for camera controls
|
|
3
|
+
*/
|
|
4
|
+
export const defaultIcons = {
|
|
5
|
+
captureIcon: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><circle cx="12" cy="12" r="10" fill="currentColor"/></svg>`,
|
|
6
|
+
doneIcon: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" fill="currentColor"/></svg>`,
|
|
7
|
+
cancelIcon: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" fill="currentColor"/></svg>`,
|
|
8
|
+
switchCameraIcon: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 11.5V13H9v2.5L5.5 12 9 8.5V11h6V8.5l3.5 3.5-3.5 3.5z" fill="currentColor"/></svg>`,
|
|
9
|
+
zoomIcon: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" fill="currentColor"/><path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z" fill="currentColor"/></svg>`,
|
|
10
|
+
flashOffIcon: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M17 10h-4l3-8H7v11h3v9l7-12zm-7-8V4h2.17l-2.17 6H8.83L10 2z" fill="currentColor"/><path d="M2.81 2.81L1.39 4.22l6.39 6.39H7v11h3v9l1.68-2.9 9.12 9.12 1.41-1.41L2.81 2.81z" fill="currentColor"/></svg>`,
|
|
11
|
+
flashOnIcon: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M7 2v11h3v9l7-12h-4l3-8z" fill="currentColor"/></svg>`,
|
|
12
|
+
flashAutoIcon: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M7 2v11h3v9l7-12h-4l3-8z" fill="currentColor"/><text x="12" y="20" text-anchor="middle" font-size="8" font-weight="bold" fill="currentColor">A</text></svg>`,
|
|
13
|
+
torchOffIcon: `<svg width="194px" height="194px" viewBox="0 0 194 194" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
14
|
+
<title>Group 2</title>
|
|
15
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
16
|
+
<g id="Group-2" transform="translate(0.000000, 0.805826)" fill="currentColor">
|
|
17
|
+
<path d="M87.7530483,65.2720779 L127.351028,104.870058 L48.1550686,184.066017 L8.55708883,144.468037 L87.7530483,65.2720779 Z M92.9246212,94.2842712 C89.8004269,91.1600769 84.735107,91.1600769 81.6109127,94.2842712 L81.6109127,94.2842712 L63.9332432,111.961941 C60.8090488,115.086135 60.8090488,120.151455 63.9332432,123.275649 L63.9332432,123.275649 L68.8829906,128.225397 C72.007185,131.349591 77.0725048,131.349591 80.1966991,128.225397 L80.1966991,128.225397 L97.8743687,110.547727 C100.998563,107.423533 100.998563,102.358213 97.8743687,99.2340187 L97.8743687,99.2340187 Z" id="Combined-Shape"></path>
|
|
18
|
+
<rect id="Rectangle" transform="translate(149.500000, 44.194174) rotate(-45.000000) translate(-149.500000, -44.194174) " x="135" y="-3.80582618" width="29" height="96"></rect>
|
|
19
|
+
<polygon id="Polygon" transform="translate(122.916857, 69.909099) rotate(45.000000) translate(-122.916857, -69.909099) " points="122.916857 52.6185734 168.416857 52.409099 151.037404 87.409099 94.7963109 87.409099 77.4168574 52.409099"></polygon>
|
|
20
|
+
<circle id="Oval" cx="27.75" cy="164.944174" r="27.75"></circle>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
</svg>`,
|
|
24
|
+
torchOnIcon: `<svg width="223px" height="223px" viewBox="0 0 223 223" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
25
|
+
<title>Group 3</title>
|
|
26
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
27
|
+
<g id="Group-3" transform="translate(0.000000, 0.614339)" fill="currentColor">
|
|
28
|
+
<g id="Group-2" transform="translate(0.000000, 29.191487)">
|
|
29
|
+
<path d="M87.7530483,65.2720779 L127.351028,104.870058 L48.1550686,184.066017 L8.55708883,144.468037 L87.7530483,65.2720779 Z M92.9246212,94.2842712 C89.8004269,91.1600769 84.735107,91.1600769 81.6109127,94.2842712 L81.6109127,94.2842712 L63.9332432,111.961941 C60.8090488,115.086135 60.8090488,120.151455 63.9332432,123.275649 L63.9332432,123.275649 L68.8829906,128.225397 C72.007185,131.349591 77.0725048,131.349591 80.1966991,128.225397 L80.1966991,128.225397 L97.8743687,110.547727 C100.998563,107.423533 100.998563,102.358213 97.8743687,99.2340187 L97.8743687,99.2340187 Z" id="Combined-Shape"></path>
|
|
30
|
+
<rect id="Rectangle" transform="translate(149.500000, 44.194174) rotate(-45.000000) translate(-149.500000, -44.194174) " x="135" y="-3.80582618" width="29" height="96"></rect>
|
|
31
|
+
<polygon id="Polygon" transform="translate(122.916857, 69.909099) rotate(45.000000) translate(-122.916857, -69.909099) " points="122.916857 52.6185734 168.416857 52.409099 151.037404 87.409099 94.7963109 87.409099 77.4168574 52.409099"></polygon>
|
|
32
|
+
<circle id="Oval" cx="27.75" cy="164.944174" r="27.75"></circle>
|
|
33
|
+
</g>
|
|
34
|
+
<rect id="Rectangle" transform="translate(162.530697, 22.848726) rotate(9.000000) translate(-162.530697, -22.848726) " x="158.530697" y="0.348725524" width="8" height="45" rx="4"></rect>
|
|
35
|
+
<path d="M188.82359,10.0558323 C191.032729,10.0558323 192.82359,11.8466933 192.82359,14.0558323 L192.82359,53.0558323 C192.82359,55.2649713 191.032729,57.0558323 188.82359,57.0558323 C186.614451,57.0558323 184.82359,55.2649713 184.82359,53.0558323 L184.82359,25.3323417 L184.82359,25.3323417 L184.82359,14.0558323 C184.82359,11.8466933 186.614451,10.0558323 188.82359,10.0558323 Z" id="Rectangle" transform="translate(188.823590, 33.555832) rotate(45.000000) translate(-188.823590, -33.555832) "></path>
|
|
36
|
+
<path d="M199.327317,37.616767 C201.536456,37.616767 203.327317,39.407628 203.327317,41.616767 L203.327317,79.616767 C203.327317,81.825906 201.536456,83.616767 199.327317,83.616767 C197.118178,83.616767 195.327317,81.825906 195.327317,79.616767 L195.327317,52.5682443 L195.327317,52.5682443 L195.327317,41.616767 C195.327317,39.407628 197.118178,37.616767 199.327317,37.616767 Z" id="Rectangle" transform="translate(199.327317, 60.616767) rotate(83.000000) translate(-199.327317, -60.616767) "></path>
|
|
37
|
+
</g>
|
|
38
|
+
</g>
|
|
39
|
+
</svg>`,
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Default button style
|
|
43
|
+
*/
|
|
44
|
+
export const defaultButtonStyle = {
|
|
45
|
+
radius: 30,
|
|
46
|
+
backgroundColor: '#ffffff',
|
|
47
|
+
color: '#000000',
|
|
48
|
+
padding: '10px',
|
|
49
|
+
size: 24
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Default button configurations
|
|
53
|
+
*/
|
|
54
|
+
export const defaultButtons = {
|
|
55
|
+
capture: {
|
|
56
|
+
icon: defaultIcons.captureIcon,
|
|
57
|
+
style: {
|
|
58
|
+
radius: 40,
|
|
59
|
+
backgroundColor: '#ffffff',
|
|
60
|
+
color: '#000000',
|
|
61
|
+
padding: '12px',
|
|
62
|
+
size: 32
|
|
63
|
+
},
|
|
64
|
+
position: 'center'
|
|
65
|
+
},
|
|
66
|
+
done: {
|
|
67
|
+
icon: defaultIcons.doneIcon,
|
|
68
|
+
style: {
|
|
69
|
+
radius: 30,
|
|
70
|
+
backgroundColor: '#28a745',
|
|
71
|
+
color: '#ffffff',
|
|
72
|
+
padding: '10px',
|
|
73
|
+
size: 24
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
cancel: {
|
|
77
|
+
icon: defaultIcons.cancelIcon,
|
|
78
|
+
style: {
|
|
79
|
+
radius: 30,
|
|
80
|
+
backgroundColor: '#dc3545',
|
|
81
|
+
color: '#ffffff',
|
|
82
|
+
padding: '10px',
|
|
83
|
+
size: 24
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
switchCamera: {
|
|
87
|
+
icon: defaultIcons.switchCameraIcon,
|
|
88
|
+
style: {
|
|
89
|
+
radius: 30,
|
|
90
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
91
|
+
color: '#ffffff',
|
|
92
|
+
padding: '10px',
|
|
93
|
+
size: 24
|
|
94
|
+
},
|
|
95
|
+
position: 'topRight'
|
|
96
|
+
},
|
|
97
|
+
torch: {
|
|
98
|
+
offIcon: defaultIcons.torchOffIcon,
|
|
99
|
+
onIcon: defaultIcons.torchOnIcon,
|
|
100
|
+
style: {
|
|
101
|
+
radius: 30,
|
|
102
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
103
|
+
color: '#ffffff',
|
|
104
|
+
padding: '10px',
|
|
105
|
+
size: 24
|
|
106
|
+
},
|
|
107
|
+
position: 'topRight'
|
|
108
|
+
},
|
|
109
|
+
zoom: {
|
|
110
|
+
icon: defaultIcons.zoomIcon,
|
|
111
|
+
style: {
|
|
112
|
+
radius: 30,
|
|
113
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
114
|
+
color: '#ffffff',
|
|
115
|
+
padding: '10px',
|
|
116
|
+
size: 24
|
|
117
|
+
},
|
|
118
|
+
levels: [1, 2, 3, 4]
|
|
119
|
+
},
|
|
120
|
+
flash: {
|
|
121
|
+
offIcon: defaultIcons.flashOffIcon,
|
|
122
|
+
onIcon: defaultIcons.flashOnIcon,
|
|
123
|
+
autoIcon: defaultIcons.flashAutoIcon,
|
|
124
|
+
style: {
|
|
125
|
+
radius: 30,
|
|
126
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
127
|
+
color: '#ffffff',
|
|
128
|
+
padding: '10px',
|
|
129
|
+
size: 24
|
|
130
|
+
},
|
|
131
|
+
position: 'topLeft'
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=default-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-styles.js","sourceRoot":"","sources":["../../../src/ui/default-styles.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,WAAW,EAAE,+IAA+I;IAC5J,QAAQ,EAAE,oLAAoL;IAC9L,UAAU,EAAE,wOAAwO;IACpP,gBAAgB,EAAE,mRAAmR;IACrS,QAAQ,EAAE,saAAsa;IAChb,YAAY,EAAE,qSAAqS;IACnT,WAAW,EAAE,mJAAmJ;IAChK,aAAa,EAAE,yPAAyP;IACxQ,YAAY,EAAE;;;;;;;;;;SAUP;IACP,WAAW,EAAE;;;;;;;;;;;;;;;SAeN;CACR,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAgB;IAC7C,MAAM,EAAE,EAAE;IACV,eAAe,EAAE,SAAS;IAC1B,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,MAAM;IACf,IAAI,EAAE,EAAE;CACT,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkB;IAC3C,OAAO,EAAE;QACP,IAAI,EAAE,YAAY,CAAC,WAAW;QAC9B,KAAK,EAAE;YACL,MAAM,EAAE,EAAE;YACV,eAAe,EAAE,SAAS;YAC1B,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,EAAE;SACT;QACD,QAAQ,EAAE,QAAQ;KACnB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY,CAAC,QAAQ;QAC3B,KAAK,EAAE;YACL,MAAM,EAAE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EAAE;YACV,eAAe,EAAE,iBAAiB;YAClC,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,EAAE;SACT;QACD,QAAQ,EAAE,SAAS;KACpB;CACF,CAAC","sourcesContent":["/**\n * Default styles and icons for camera overlay UI\n */\nimport { \n ButtonStyle, \n ButtonsConfig \n} from '../types/ui-types';\n\n/**\n * Default SVG icons for camera controls\n */\nexport const defaultIcons = {\n captureIcon: `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"currentColor\"/></svg>`,\n doneIcon: `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z\" fill=\"currentColor\"/></svg>`,\n cancelIcon: `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z\" fill=\"currentColor\"/></svg>`,\n switchCameraIcon: `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 11.5V13H9v2.5L5.5 12 9 8.5V11h6V8.5l3.5 3.5-3.5 3.5z\" fill=\"currentColor\"/></svg>`,\n zoomIcon: `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\" fill=\"currentColor\"/><path d=\"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z\" fill=\"currentColor\"/></svg>`,\n flashOffIcon: `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M17 10h-4l3-8H7v11h3v9l7-12zm-7-8V4h2.17l-2.17 6H8.83L10 2z\" fill=\"currentColor\"/><path d=\"M2.81 2.81L1.39 4.22l6.39 6.39H7v11h3v9l1.68-2.9 9.12 9.12 1.41-1.41L2.81 2.81z\" fill=\"currentColor\"/></svg>`,\n flashOnIcon: `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M7 2v11h3v9l7-12h-4l3-8z\" fill=\"currentColor\"/></svg>`,\n flashAutoIcon: `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M7 2v11h3v9l7-12h-4l3-8z\" fill=\"currentColor\"/><text x=\"12\" y=\"20\" text-anchor=\"middle\" font-size=\"8\" font-weight=\"bold\" fill=\"currentColor\">A</text></svg>`,\n torchOffIcon: `<svg width=\"194px\" height=\"194px\" viewBox=\"0 0 194 194\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <title>Group 2</title>\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g id=\"Group-2\" transform=\"translate(0.000000, 0.805826)\" fill=\"currentColor\">\n <path d=\"M87.7530483,65.2720779 L127.351028,104.870058 L48.1550686,184.066017 L8.55708883,144.468037 L87.7530483,65.2720779 Z M92.9246212,94.2842712 C89.8004269,91.1600769 84.735107,91.1600769 81.6109127,94.2842712 L81.6109127,94.2842712 L63.9332432,111.961941 C60.8090488,115.086135 60.8090488,120.151455 63.9332432,123.275649 L63.9332432,123.275649 L68.8829906,128.225397 C72.007185,131.349591 77.0725048,131.349591 80.1966991,128.225397 L80.1966991,128.225397 L97.8743687,110.547727 C100.998563,107.423533 100.998563,102.358213 97.8743687,99.2340187 L97.8743687,99.2340187 Z\" id=\"Combined-Shape\"></path>\n <rect id=\"Rectangle\" transform=\"translate(149.500000, 44.194174) rotate(-45.000000) translate(-149.500000, -44.194174) \" x=\"135\" y=\"-3.80582618\" width=\"29\" height=\"96\"></rect>\n <polygon id=\"Polygon\" transform=\"translate(122.916857, 69.909099) rotate(45.000000) translate(-122.916857, -69.909099) \" points=\"122.916857 52.6185734 168.416857 52.409099 151.037404 87.409099 94.7963109 87.409099 77.4168574 52.409099\"></polygon>\n <circle id=\"Oval\" cx=\"27.75\" cy=\"164.944174\" r=\"27.75\"></circle>\n </g>\n </g>\n </svg>`,\n torchOnIcon: `<svg width=\"223px\" height=\"223px\" viewBox=\"0 0 223 223\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <title>Group 3</title>\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g id=\"Group-3\" transform=\"translate(0.000000, 0.614339)\" fill=\"currentColor\">\n <g id=\"Group-2\" transform=\"translate(0.000000, 29.191487)\">\n <path d=\"M87.7530483,65.2720779 L127.351028,104.870058 L48.1550686,184.066017 L8.55708883,144.468037 L87.7530483,65.2720779 Z M92.9246212,94.2842712 C89.8004269,91.1600769 84.735107,91.1600769 81.6109127,94.2842712 L81.6109127,94.2842712 L63.9332432,111.961941 C60.8090488,115.086135 60.8090488,120.151455 63.9332432,123.275649 L63.9332432,123.275649 L68.8829906,128.225397 C72.007185,131.349591 77.0725048,131.349591 80.1966991,128.225397 L80.1966991,128.225397 L97.8743687,110.547727 C100.998563,107.423533 100.998563,102.358213 97.8743687,99.2340187 L97.8743687,99.2340187 Z\" id=\"Combined-Shape\"></path>\n <rect id=\"Rectangle\" transform=\"translate(149.500000, 44.194174) rotate(-45.000000) translate(-149.500000, -44.194174) \" x=\"135\" y=\"-3.80582618\" width=\"29\" height=\"96\"></rect>\n <polygon id=\"Polygon\" transform=\"translate(122.916857, 69.909099) rotate(45.000000) translate(-122.916857, -69.909099) \" points=\"122.916857 52.6185734 168.416857 52.409099 151.037404 87.409099 94.7963109 87.409099 77.4168574 52.409099\"></polygon>\n <circle id=\"Oval\" cx=\"27.75\" cy=\"164.944174\" r=\"27.75\"></circle>\n </g>\n <rect id=\"Rectangle\" transform=\"translate(162.530697, 22.848726) rotate(9.000000) translate(-162.530697, -22.848726) \" x=\"158.530697\" y=\"0.348725524\" width=\"8\" height=\"45\" rx=\"4\"></rect>\n <path d=\"M188.82359,10.0558323 C191.032729,10.0558323 192.82359,11.8466933 192.82359,14.0558323 L192.82359,53.0558323 C192.82359,55.2649713 191.032729,57.0558323 188.82359,57.0558323 C186.614451,57.0558323 184.82359,55.2649713 184.82359,53.0558323 L184.82359,25.3323417 L184.82359,25.3323417 L184.82359,14.0558323 C184.82359,11.8466933 186.614451,10.0558323 188.82359,10.0558323 Z\" id=\"Rectangle\" transform=\"translate(188.823590, 33.555832) rotate(45.000000) translate(-188.823590, -33.555832) \"></path>\n <path d=\"M199.327317,37.616767 C201.536456,37.616767 203.327317,39.407628 203.327317,41.616767 L203.327317,79.616767 C203.327317,81.825906 201.536456,83.616767 199.327317,83.616767 C197.118178,83.616767 195.327317,81.825906 195.327317,79.616767 L195.327317,52.5682443 L195.327317,52.5682443 L195.327317,41.616767 C195.327317,39.407628 197.118178,37.616767 199.327317,37.616767 Z\" id=\"Rectangle\" transform=\"translate(199.327317, 60.616767) rotate(83.000000) translate(-199.327317, -60.616767) \"></path>\n </g>\n </g>\n </svg>`,\n};\n\n/**\n * Default button style\n */\nexport const defaultButtonStyle: ButtonStyle = {\n radius: 30,\n backgroundColor: '#ffffff',\n color: '#000000',\n padding: '10px',\n size: 24\n};\n\n/**\n * Default button configurations\n */\nexport const defaultButtons: ButtonsConfig = {\n capture: {\n icon: defaultIcons.captureIcon,\n style: {\n radius: 40,\n backgroundColor: '#ffffff',\n color: '#000000',\n padding: '12px',\n size: 32\n },\n position: 'center'\n },\n done: {\n icon: defaultIcons.doneIcon,\n style: {\n radius: 30,\n backgroundColor: '#28a745',\n color: '#ffffff',\n padding: '10px',\n size: 24\n }\n },\n cancel: {\n icon: defaultIcons.cancelIcon,\n style: {\n radius: 30,\n backgroundColor: '#dc3545',\n color: '#ffffff',\n padding: '10px',\n size: 24\n }\n },\n switchCamera: {\n icon: defaultIcons.switchCameraIcon,\n style: {\n radius: 30,\n backgroundColor: 'rgba(0,0,0,0.5)',\n color: '#ffffff',\n padding: '10px',\n size: 24\n },\n position: 'topRight'\n },\n torch: {\n offIcon: defaultIcons.torchOffIcon,\n onIcon: defaultIcons.torchOnIcon,\n style: {\n radius: 30,\n backgroundColor: 'rgba(0,0,0,0.5)',\n color: '#ffffff',\n padding: '10px',\n size: 24\n },\n position: 'topRight'\n },\n zoom: {\n icon: defaultIcons.zoomIcon,\n style: {\n radius: 30,\n backgroundColor: 'rgba(0,0,0,0.5)',\n color: '#ffffff',\n padding: '10px',\n size: 24\n },\n levels: [1, 2, 3, 4]\n },\n flash: {\n offIcon: defaultIcons.flashOffIcon,\n onIcon: defaultIcons.flashOnIcon,\n autoIcon: defaultIcons.flashAutoIcon,\n style: {\n radius: 30,\n backgroundColor: 'rgba(0,0,0,0.5)',\n color: '#ffffff',\n padding: '10px',\n size: 24\n },\n position: 'topLeft'\n }\n};\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ImageEditorResult = {
|
|
2
|
+
dataUrl: string;
|
|
3
|
+
state: unknown;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Opens the Marker.js 2 annotation editor on a given image source.
|
|
7
|
+
* Resolves with the annotated image data-URL and editor state, or null if cancelled.
|
|
8
|
+
*/
|
|
9
|
+
export declare function openImageEditor(src: string, previousState?: unknown, licenseKey?: string): Promise<ImageEditorResult | null>;
|
|
10
|
+
export declare function isEditorActive(): boolean;
|