markupr 2.1.8 → 2.5.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 +292 -15
- package/dist/cli/index.mjs +3593 -0
- package/dist/main/index.mjs +743 -220
- package/dist/mcp/index.mjs +4053 -0
- package/package.json +32 -7
- package/.claude/commands/review-feedback.md +0 -47
- package/.eslintrc.json +0 -35
- package/.github/CODEOWNERS +0 -16
- package/.github/FUNDING.yml +0 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -56
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -54
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -89
- package/.github/dependabot.yml +0 -70
- package/.github/workflows/ci.yml +0 -184
- package/.github/workflows/deploy-landing.yml +0 -134
- package/.github/workflows/nightly.yml +0 -288
- package/.github/workflows/release.yml +0 -318
- package/CHANGELOG.md +0 -127
- package/CLAUDE.md +0 -137
- package/CODE_OF_CONDUCT.md +0 -9
- package/CONTRIBUTING.md +0 -390
- package/PRODUCT_VISION.md +0 -277
- package/SECURITY.md +0 -51
- package/SIGNING_INSTRUCTIONS.md +0 -284
- package/assets/DMG_BACKGROUND_INSTRUCTIONS.md +0 -130
- package/assets/svg-source/dmg-background.svg +0 -70
- package/assets/svg-source/icon.svg +0 -20
- package/assets/svg-source/tray-icon-processing.svg +0 -7
- package/assets/svg-source/tray-icon-recording.svg +0 -7
- package/assets/svg-source/tray-icon.svg +0 -6
- package/assets/tray-complete.png +0 -0
- package/assets/tray-complete@2x.png +0 -0
- package/assets/tray-completeTemplate.png +0 -0
- package/assets/tray-completeTemplate@2x.png +0 -0
- package/assets/tray-error.png +0 -0
- package/assets/tray-error@2x.png +0 -0
- package/assets/tray-errorTemplate.png +0 -0
- package/assets/tray-errorTemplate@2x.png +0 -0
- package/assets/tray-icon-processing.png +0 -0
- package/assets/tray-icon-processing@2x.png +0 -0
- package/assets/tray-icon-processingTemplate.png +0 -0
- package/assets/tray-icon-processingTemplate@2x.png +0 -0
- package/assets/tray-icon-recording.png +0 -0
- package/assets/tray-icon-recording@2x.png +0 -0
- package/assets/tray-icon-recordingTemplate.png +0 -0
- package/assets/tray-icon-recordingTemplate@2x.png +0 -0
- package/assets/tray-icon.png +0 -0
- package/assets/tray-icon@2x.png +0 -0
- package/assets/tray-iconTemplate.png +0 -0
- package/assets/tray-iconTemplate@2x.png +0 -0
- package/assets/tray-idle.png +0 -0
- package/assets/tray-idle@2x.png +0 -0
- package/assets/tray-idleTemplate.png +0 -0
- package/assets/tray-idleTemplate@2x.png +0 -0
- package/assets/tray-processing-0.png +0 -0
- package/assets/tray-processing-0@2x.png +0 -0
- package/assets/tray-processing-0Template.png +0 -0
- package/assets/tray-processing-0Template@2x.png +0 -0
- package/assets/tray-processing-1.png +0 -0
- package/assets/tray-processing-1@2x.png +0 -0
- package/assets/tray-processing-1Template.png +0 -0
- package/assets/tray-processing-1Template@2x.png +0 -0
- package/assets/tray-processing-2.png +0 -0
- package/assets/tray-processing-2@2x.png +0 -0
- package/assets/tray-processing-2Template.png +0 -0
- package/assets/tray-processing-2Template@2x.png +0 -0
- package/assets/tray-processing-3.png +0 -0
- package/assets/tray-processing-3@2x.png +0 -0
- package/assets/tray-processing-3Template.png +0 -0
- package/assets/tray-processing-3Template@2x.png +0 -0
- package/assets/tray-processing.png +0 -0
- package/assets/tray-processing@2x.png +0 -0
- package/assets/tray-processingTemplate.png +0 -0
- package/assets/tray-processingTemplate@2x.png +0 -0
- package/assets/tray-recording.png +0 -0
- package/assets/tray-recording@2x.png +0 -0
- package/assets/tray-recordingTemplate.png +0 -0
- package/assets/tray-recordingTemplate@2x.png +0 -0
- package/build/DMG_BACKGROUND_SPEC.md +0 -50
- package/build/dmg-background.png +0 -0
- package/build/dmg-background@2x.png +0 -0
- package/build/entitlements.mac.inherit.plist +0 -27
- package/build/entitlements.mac.plist +0 -41
- package/build/favicon-16.png +0 -0
- package/build/favicon-180.png +0 -0
- package/build/favicon-192.png +0 -0
- package/build/favicon-32.png +0 -0
- package/build/favicon-48.png +0 -0
- package/build/favicon-512.png +0 -0
- package/build/favicon-64.png +0 -0
- package/build/icon-128.png +0 -0
- package/build/icon-16.png +0 -0
- package/build/icon-24.png +0 -0
- package/build/icon-256.png +0 -0
- package/build/icon-32.png +0 -0
- package/build/icon-48.png +0 -0
- package/build/icon-64.png +0 -0
- package/build/icon.icns +0 -0
- package/build/icon.ico +0 -0
- package/build/icon.iconset/icon_128x128.png +0 -0
- package/build/icon.iconset/icon_128x128@2x.png +0 -0
- package/build/icon.iconset/icon_16x16.png +0 -0
- package/build/icon.iconset/icon_16x16@2x.png +0 -0
- package/build/icon.iconset/icon_256x256.png +0 -0
- package/build/icon.iconset/icon_256x256@2x.png +0 -0
- package/build/icon.iconset/icon_32x32.png +0 -0
- package/build/icon.iconset/icon_32x32@2x.png +0 -0
- package/build/icon.iconset/icon_512x512.png +0 -0
- package/build/icon.iconset/icon_512x512@2x.png +0 -0
- package/build/icon.png +0 -0
- package/build/installer-header.bmp +0 -0
- package/build/installer-header.png +0 -0
- package/build/installer-sidebar.bmp +0 -0
- package/build/installer-sidebar.png +0 -0
- package/build/installer.nsh +0 -45
- package/build/overlay-processing.png +0 -0
- package/build/overlay-recording.png +0 -0
- package/build/toolbar-record.png +0 -0
- package/build/toolbar-screenshot.png +0 -0
- package/build/toolbar-settings.png +0 -0
- package/build/toolbar-stop.png +0 -0
- package/dist/preload/index.mjs +0 -907
- package/dist/renderer/assets/index-CCmUjl9K.js +0 -19495
- package/dist/renderer/assets/index-CUqz_Gs6.css +0 -2270
- package/dist/renderer/index.html +0 -27
- package/docs/AI_AGENT_QUICKSTART.md +0 -42
- package/docs/AI_PIPELINE_DESIGN.md +0 -595
- package/docs/API.md +0 -514
- package/docs/ARCHITECTURE.md +0 -460
- package/docs/CONFIGURATION.md +0 -336
- package/docs/DEVELOPMENT.md +0 -508
- package/docs/EXPORT_FORMATS.md +0 -451
- package/docs/GETTING_STARTED.md +0 -236
- package/docs/KEYBOARD_SHORTCUTS.md +0 -334
- package/docs/TROUBLESHOOTING.md +0 -418
- package/docs/landing/index.html +0 -672
- package/docs/landing/script.js +0 -342
- package/docs/landing/styles.css +0 -1543
- package/electron-builder.yml +0 -140
- package/electron.vite.config.ts +0 -63
- package/railway.json +0 -12
- package/scripts/build.mjs +0 -51
- package/scripts/generate-icons.mjs +0 -314
- package/scripts/generate-installer-images.cjs +0 -253
- package/scripts/generate-tray-icons.mjs +0 -258
- package/scripts/notarize.cjs +0 -180
- package/scripts/one-click-clean-test.sh +0 -147
- package/scripts/postinstall.mjs +0 -36
- package/scripts/setup-markupr.sh +0 -55
- package/setup +0 -17
- package/site/index.html +0 -1835
- package/site/package.json +0 -11
- package/site/railway.json +0 -12
- package/site/server.js +0 -31
- package/src/main/AutoUpdater.ts +0 -392
- package/src/main/CrashRecovery.ts +0 -655
- package/src/main/ErrorHandler.ts +0 -703
- package/src/main/HotkeyManager.ts +0 -399
- package/src/main/MenuManager.ts +0 -529
- package/src/main/PermissionManager.ts +0 -420
- package/src/main/SessionController.ts +0 -1465
- package/src/main/TrayManager.ts +0 -540
- package/src/main/ai/AIPipelineManager.ts +0 -199
- package/src/main/ai/ClaudeAnalyzer.ts +0 -339
- package/src/main/ai/ImageOptimizer.ts +0 -176
- package/src/main/ai/StructuredMarkdownBuilder.ts +0 -379
- package/src/main/ai/index.ts +0 -16
- package/src/main/ai/types.ts +0 -258
- package/src/main/analysis/ClarificationGenerator.ts +0 -385
- package/src/main/analysis/FeedbackAnalyzer.ts +0 -531
- package/src/main/analysis/index.ts +0 -19
- package/src/main/audio/AudioCapture.ts +0 -978
- package/src/main/audio/audioUtils.ts +0 -100
- package/src/main/audio/index.ts +0 -20
- package/src/main/capture/index.ts +0 -1
- package/src/main/index.ts +0 -1693
- package/src/main/ipc/captureHandlers.ts +0 -272
- package/src/main/ipc/index.ts +0 -45
- package/src/main/ipc/outputHandlers.ts +0 -302
- package/src/main/ipc/sessionHandlers.ts +0 -56
- package/src/main/ipc/settingsHandlers.ts +0 -471
- package/src/main/ipc/types.ts +0 -56
- package/src/main/ipc/windowHandlers.ts +0 -277
- package/src/main/output/ClipboardService.ts +0 -369
- package/src/main/output/ExportService.ts +0 -539
- package/src/main/output/FileManager.ts +0 -416
- package/src/main/output/MarkdownGenerator.ts +0 -791
- package/src/main/output/MarkdownPatcher.ts +0 -299
- package/src/main/output/index.ts +0 -186
- package/src/main/output/sessionAdapter.ts +0 -207
- package/src/main/output/templates/html-template.ts +0 -553
- package/src/main/pipeline/FrameExtractor.ts +0 -330
- package/src/main/pipeline/PostProcessor.ts +0 -399
- package/src/main/pipeline/TranscriptAnalyzer.ts +0 -226
- package/src/main/pipeline/index.ts +0 -36
- package/src/main/platform/WindowsTaskbar.ts +0 -600
- package/src/main/platform/index.ts +0 -16
- package/src/main/settings/SettingsManager.ts +0 -730
- package/src/main/settings/index.ts +0 -19
- package/src/main/transcription/ModelDownloadManager.ts +0 -494
- package/src/main/transcription/TierManager.ts +0 -219
- package/src/main/transcription/TranscriptionRecoveryService.ts +0 -340
- package/src/main/transcription/WhisperService.ts +0 -748
- package/src/main/transcription/index.ts +0 -56
- package/src/main/transcription/types.ts +0 -135
- package/src/main/windows/PopoverManager.ts +0 -284
- package/src/main/windows/TaskbarIntegration.ts +0 -452
- package/src/main/windows/index.ts +0 -23
- package/src/preload/index.ts +0 -1047
- package/src/renderer/App.tsx +0 -515
- package/src/renderer/AppWrapper.tsx +0 -28
- package/src/renderer/assets/logo-dark.svg +0 -7
- package/src/renderer/assets/logo.svg +0 -7
- package/src/renderer/audio/AudioCaptureRenderer.ts +0 -454
- package/src/renderer/capture/ScreenRecordingRenderer.ts +0 -492
- package/src/renderer/components/AnnotationOverlay.tsx +0 -836
- package/src/renderer/components/AudioWaveform.tsx +0 -811
- package/src/renderer/components/ClarificationQuestions.tsx +0 -656
- package/src/renderer/components/CountdownTimer.tsx +0 -495
- package/src/renderer/components/CrashRecoveryDialog.tsx +0 -632
- package/src/renderer/components/DonateButton.tsx +0 -127
- package/src/renderer/components/ErrorBoundary.tsx +0 -308
- package/src/renderer/components/ExportDialog.tsx +0 -872
- package/src/renderer/components/HotkeyHint.tsx +0 -261
- package/src/renderer/components/KeyboardShortcuts.tsx +0 -787
- package/src/renderer/components/ModelDownloadDialog.tsx +0 -844
- package/src/renderer/components/Onboarding.tsx +0 -1830
- package/src/renderer/components/ProcessingOverlay.tsx +0 -157
- package/src/renderer/components/RecordingOverlay.tsx +0 -423
- package/src/renderer/components/SessionHistory.tsx +0 -1746
- package/src/renderer/components/SessionReview.tsx +0 -1321
- package/src/renderer/components/SettingsPanel.tsx +0 -217
- package/src/renderer/components/Skeleton.tsx +0 -347
- package/src/renderer/components/StatusIndicator.tsx +0 -86
- package/src/renderer/components/ThemeProvider.tsx +0 -429
- package/src/renderer/components/Tooltip.tsx +0 -370
- package/src/renderer/components/TranscriptionPreview.tsx +0 -183
- package/src/renderer/components/TranscriptionTierSelector.tsx +0 -640
- package/src/renderer/components/UpdateNotification.tsx +0 -377
- package/src/renderer/components/WindowSelector.tsx +0 -947
- package/src/renderer/components/index.ts +0 -99
- package/src/renderer/components/primitives/ApiKeyInput.tsx +0 -98
- package/src/renderer/components/primitives/ColorPicker.tsx +0 -65
- package/src/renderer/components/primitives/DangerButton.tsx +0 -45
- package/src/renderer/components/primitives/DirectoryPicker.tsx +0 -41
- package/src/renderer/components/primitives/Dropdown.tsx +0 -34
- package/src/renderer/components/primitives/KeyRecorder.tsx +0 -117
- package/src/renderer/components/primitives/SettingsSection.tsx +0 -32
- package/src/renderer/components/primitives/Slider.tsx +0 -43
- package/src/renderer/components/primitives/Toggle.tsx +0 -36
- package/src/renderer/components/primitives/index.ts +0 -10
- package/src/renderer/components/settings/AdvancedTab.tsx +0 -174
- package/src/renderer/components/settings/AppearanceTab.tsx +0 -77
- package/src/renderer/components/settings/GeneralTab.tsx +0 -40
- package/src/renderer/components/settings/HotkeysTab.tsx +0 -79
- package/src/renderer/components/settings/RecordingTab.tsx +0 -84
- package/src/renderer/components/settings/index.ts +0 -9
- package/src/renderer/components/settings/settingsStyles.ts +0 -673
- package/src/renderer/components/settings/tabConfig.tsx +0 -85
- package/src/renderer/components/settings/useSettingsPanel.ts +0 -447
- package/src/renderer/contexts/ProcessingContext.tsx +0 -227
- package/src/renderer/contexts/RecordingContext.tsx +0 -683
- package/src/renderer/contexts/UIContext.tsx +0 -326
- package/src/renderer/contexts/index.ts +0 -24
- package/src/renderer/donateMessages.ts +0 -69
- package/src/renderer/hooks/index.ts +0 -75
- package/src/renderer/hooks/useAnimation.tsx +0 -544
- package/src/renderer/hooks/useTheme.ts +0 -313
- package/src/renderer/index.html +0 -26
- package/src/renderer/main.tsx +0 -52
- package/src/renderer/styles/animations.css +0 -1093
- package/src/renderer/styles/app-shell.css +0 -662
- package/src/renderer/styles/globals.css +0 -515
- package/src/renderer/styles/theme.ts +0 -578
- package/src/renderer/types/electron.d.ts +0 -385
- package/src/shared/hotkeys.ts +0 -283
- package/src/shared/types.ts +0 -809
- package/tests/clipboard.test.ts +0 -228
- package/tests/e2e/criticalPaths.test.ts +0 -594
- package/tests/feedbackAnalyzer.test.ts +0 -303
- package/tests/integration/sessionFlow.test.ts +0 -583
- package/tests/markdownGenerator.test.ts +0 -418
- package/tests/output.test.ts +0 -96
- package/tests/setup.ts +0 -486
- package/tests/unit/appIntegration.test.ts +0 -676
- package/tests/unit/appViewState.test.ts +0 -281
- package/tests/unit/audioIpcChannels.test.ts +0 -17
- package/tests/unit/exportService.test.ts +0 -492
- package/tests/unit/hotkeys.test.ts +0 -92
- package/tests/unit/navigationPreload.test.ts +0 -94
- package/tests/unit/onboardingFlow.test.ts +0 -345
- package/tests/unit/permissionManager.test.ts +0 -175
- package/tests/unit/permissionManagerExpanded.test.ts +0 -296
- package/tests/unit/screenRecordingRenderer.test.ts +0 -368
- package/tests/unit/sessionController.test.ts +0 -515
- package/tests/unit/tierManager.test.ts +0 -61
- package/tests/unit/tierManagerExpanded.test.ts +0 -142
- package/tests/unit/transcriptAnalyzer.test.ts +0 -64
- package/tsconfig.json +0 -25
- package/vitest.config.ts +0 -46
|
@@ -1,872 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ExportDialog - Premium Export Experience for markupr
|
|
3
|
-
*
|
|
4
|
-
* A beautiful modal dialog for selecting export format and options.
|
|
5
|
-
*
|
|
6
|
-
* Features:
|
|
7
|
-
* - Format cards with descriptions and icons
|
|
8
|
-
* - Live preview panel (Markdown/HTML/JSON)
|
|
9
|
-
* - Theme toggle for HTML/PDF
|
|
10
|
-
* - Include images option
|
|
11
|
-
* - Custom filename input
|
|
12
|
-
* - Export progress indicator
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import React, { useState, useMemo, useCallback, useEffect } from 'react';
|
|
16
|
-
import type { ReviewSession as Session } from '../../shared/types';
|
|
17
|
-
import { useTheme } from '../hooks/useTheme';
|
|
18
|
-
|
|
19
|
-
// ============================================================================
|
|
20
|
-
// Types
|
|
21
|
-
// ============================================================================
|
|
22
|
-
|
|
23
|
-
type ExportFormat = 'markdown' | 'pdf' | 'html' | 'json';
|
|
24
|
-
|
|
25
|
-
interface ExportDialogProps {
|
|
26
|
-
session: Session;
|
|
27
|
-
isOpen: boolean;
|
|
28
|
-
onClose: () => void;
|
|
29
|
-
onExport: (options: ExportOptions) => Promise<void>;
|
|
30
|
-
defaultProjectName?: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
interface ExportOptions {
|
|
34
|
-
format: ExportFormat;
|
|
35
|
-
projectName: string;
|
|
36
|
-
includeImages: boolean;
|
|
37
|
-
theme: 'dark' | 'light';
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
interface FormatCardData {
|
|
41
|
-
format: ExportFormat;
|
|
42
|
-
name: string;
|
|
43
|
-
description: string;
|
|
44
|
-
icon: React.ReactNode;
|
|
45
|
-
extension: string;
|
|
46
|
-
features: string[];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// ============================================================================
|
|
50
|
-
// Icons
|
|
51
|
-
// ============================================================================
|
|
52
|
-
|
|
53
|
-
const MarkdownIcon = () => (
|
|
54
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
|
|
55
|
-
<path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" />
|
|
56
|
-
<polyline points="14 2 14 8 20 8" />
|
|
57
|
-
<line x1="9" y1="15" x2="15" y2="15" />
|
|
58
|
-
<line x1="9" y1="11" x2="15" y2="11" />
|
|
59
|
-
</svg>
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
const PdfIcon = () => (
|
|
63
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
|
|
64
|
-
<path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" />
|
|
65
|
-
<polyline points="14 2 14 8 20 8" />
|
|
66
|
-
<path d="M9 15v-2a1 1 0 011-1h1a1 1 0 011 1v0a1 1 0 01-1 1h-1" />
|
|
67
|
-
<path d="M14 15v-4h1.5a1.5 1.5 0 010 3H14" />
|
|
68
|
-
</svg>
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
const HtmlIcon = () => (
|
|
72
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
|
|
73
|
-
<polyline points="16 18 22 12 16 6" />
|
|
74
|
-
<polyline points="8 6 2 12 8 18" />
|
|
75
|
-
<line x1="12" y1="2" x2="12" y2="22" strokeDasharray="2 2" />
|
|
76
|
-
</svg>
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
const JsonIcon = () => (
|
|
80
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
|
|
81
|
-
<path d="M8 3H7a2 2 0 00-2 2v5a2 2 0 01-2 2 2 2 0 012 2v5a2 2 0 002 2h1" />
|
|
82
|
-
<path d="M16 21h1a2 2 0 002-2v-5a2 2 0 012-2 2 2 0 01-2-2V5a2 2 0 00-2-2h-1" />
|
|
83
|
-
</svg>
|
|
84
|
-
);
|
|
85
|
-
|
|
86
|
-
const CloseIcon = () => (
|
|
87
|
-
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
|
88
|
-
<line x1="18" y1="6" x2="6" y2="18" />
|
|
89
|
-
<line x1="6" y1="6" x2="18" y2="18" />
|
|
90
|
-
</svg>
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
const CheckIcon = () => (
|
|
94
|
-
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
|
|
95
|
-
<polyline points="20 6 9 17 4 12" />
|
|
96
|
-
</svg>
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
const SpinnerIcon = () => (
|
|
100
|
-
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
|
101
|
-
<path d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83" />
|
|
102
|
-
</svg>
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
// ============================================================================
|
|
106
|
-
// Format Data
|
|
107
|
-
// ============================================================================
|
|
108
|
-
|
|
109
|
-
const FORMAT_DATA: FormatCardData[] = [
|
|
110
|
-
{
|
|
111
|
-
format: 'markdown',
|
|
112
|
-
name: 'Markdown',
|
|
113
|
-
description: 'AI-ready format for Claude, ChatGPT, and other assistants',
|
|
114
|
-
icon: <MarkdownIcon />,
|
|
115
|
-
extension: '.md',
|
|
116
|
-
features: ['Structured headings', 'Image references', 'Summary table'],
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
format: 'pdf',
|
|
120
|
-
name: 'PDF',
|
|
121
|
-
description: 'Beautiful document for sharing and printing',
|
|
122
|
-
icon: <PdfIcon />,
|
|
123
|
-
extension: '.pdf',
|
|
124
|
-
features: ['Embedded images', 'Print-ready', 'Professional layout'],
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
format: 'html',
|
|
128
|
-
name: 'HTML',
|
|
129
|
-
description: 'Standalone web page with no dependencies',
|
|
130
|
-
icon: <HtmlIcon />,
|
|
131
|
-
extension: '.html',
|
|
132
|
-
features: ['Self-contained', 'Dark/Light themes', 'Mobile responsive'],
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
format: 'json',
|
|
136
|
-
name: 'JSON',
|
|
137
|
-
description: 'Machine-readable for integrations and APIs',
|
|
138
|
-
icon: <JsonIcon />,
|
|
139
|
-
extension: '.json',
|
|
140
|
-
features: ['Structured data', 'API-friendly', 'Full metadata'],
|
|
141
|
-
},
|
|
142
|
-
];
|
|
143
|
-
|
|
144
|
-
// ============================================================================
|
|
145
|
-
// Sub-Components
|
|
146
|
-
// ============================================================================
|
|
147
|
-
|
|
148
|
-
interface FormatCardProps {
|
|
149
|
-
data: FormatCardData;
|
|
150
|
-
isSelected: boolean;
|
|
151
|
-
onSelect: () => void;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const FormatCard: React.FC<FormatCardProps> = ({ data, isSelected, onSelect }) => {
|
|
155
|
-
const { colors } = useTheme();
|
|
156
|
-
return (
|
|
157
|
-
<button
|
|
158
|
-
onClick={onSelect}
|
|
159
|
-
style={{
|
|
160
|
-
...styles.formatCard,
|
|
161
|
-
borderColor: isSelected ? `${colors.accent.default}b3` : 'rgba(51, 65, 85, 0.5)',
|
|
162
|
-
backgroundColor: isSelected ? `${colors.accent.default}1a` : 'rgba(31, 41, 55, 0.5)',
|
|
163
|
-
boxShadow: isSelected ? `0 0 0 2px ${colors.accent.default}4d` : 'none',
|
|
164
|
-
}}
|
|
165
|
-
>
|
|
166
|
-
<div style={styles.formatIcon}>{data.icon}</div>
|
|
167
|
-
<div style={styles.formatInfo}>
|
|
168
|
-
<div style={styles.formatHeader}>
|
|
169
|
-
<span style={styles.formatName}>{data.name}</span>
|
|
170
|
-
<span style={styles.formatExtension}>{data.extension}</span>
|
|
171
|
-
</div>
|
|
172
|
-
<p style={styles.formatDescription}>{data.description}</p>
|
|
173
|
-
<div style={styles.formatFeatures}>
|
|
174
|
-
{data.features.map((feature) => (
|
|
175
|
-
<span key={feature} style={styles.featureTag}>
|
|
176
|
-
{feature}
|
|
177
|
-
</span>
|
|
178
|
-
))}
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
{isSelected && (
|
|
182
|
-
<div style={styles.selectedBadge}>
|
|
183
|
-
<CheckIcon />
|
|
184
|
-
</div>
|
|
185
|
-
)}
|
|
186
|
-
</button>
|
|
187
|
-
);
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
interface PreviewPanelProps {
|
|
191
|
-
session: Session;
|
|
192
|
-
format: ExportFormat;
|
|
193
|
-
projectName: string;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
const PreviewPanel: React.FC<PreviewPanelProps> = ({ session, format, projectName }) => {
|
|
197
|
-
const preview = useMemo(() => {
|
|
198
|
-
const items = session.feedbackItems.slice(0, 3); // Show first 3 items
|
|
199
|
-
|
|
200
|
-
switch (format) {
|
|
201
|
-
case 'markdown': {
|
|
202
|
-
let md = `# ${projectName} Feedback Report\n\n`;
|
|
203
|
-
md += `## Feedback Items\n\n`;
|
|
204
|
-
items.forEach((item, i) => {
|
|
205
|
-
md += `### FB-${(i + 1).toString().padStart(3, '0')}: ${item.transcription.slice(0, 40)}...\n`;
|
|
206
|
-
md += `**Type:** ${item.category || 'General'}\n\n`;
|
|
207
|
-
md += `> ${item.transcription.slice(0, 100)}...\n\n`;
|
|
208
|
-
});
|
|
209
|
-
if (session.feedbackItems.length > 3) {
|
|
210
|
-
md += `\n*...and ${session.feedbackItems.length - 3} more items*`;
|
|
211
|
-
}
|
|
212
|
-
return md;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
case 'html':
|
|
216
|
-
return `<!DOCTYPE html>
|
|
217
|
-
<html>
|
|
218
|
-
<head>
|
|
219
|
-
<title>${projectName} - Feedback</title>
|
|
220
|
-
</head>
|
|
221
|
-
<body>
|
|
222
|
-
<h1>${projectName} Feedback Report</h1>
|
|
223
|
-
<p>${session.feedbackItems.length} items</p>
|
|
224
|
-
<!-- Full content in exported file -->
|
|
225
|
-
</body>
|
|
226
|
-
</html>`;
|
|
227
|
-
|
|
228
|
-
case 'json':
|
|
229
|
-
return JSON.stringify(
|
|
230
|
-
{
|
|
231
|
-
version: '1.0',
|
|
232
|
-
session: {
|
|
233
|
-
id: session.id,
|
|
234
|
-
items: items.map((item, i) => ({
|
|
235
|
-
id: `FB-${(i + 1).toString().padStart(3, '0')}`,
|
|
236
|
-
transcription: item.transcription.slice(0, 50) + '...',
|
|
237
|
-
category: item.category,
|
|
238
|
-
})),
|
|
239
|
-
},
|
|
240
|
-
'...': session.feedbackItems.length > 3 ? `${session.feedbackItems.length - 3} more items` : undefined,
|
|
241
|
-
},
|
|
242
|
-
null,
|
|
243
|
-
2
|
|
244
|
-
);
|
|
245
|
-
|
|
246
|
-
case 'pdf':
|
|
247
|
-
return `[PDF Preview]
|
|
248
|
-
|
|
249
|
-
${projectName} Feedback Report
|
|
250
|
-
${'='.repeat(40)}
|
|
251
|
-
|
|
252
|
-
This will generate a beautifully formatted
|
|
253
|
-
PDF document with:
|
|
254
|
-
|
|
255
|
-
- Embedded screenshots
|
|
256
|
-
- Professional typography
|
|
257
|
-
- Print-ready layout
|
|
258
|
-
- ${session.feedbackItems.length} feedback items
|
|
259
|
-
|
|
260
|
-
Export to see the full PDF.`;
|
|
261
|
-
|
|
262
|
-
default:
|
|
263
|
-
return '';
|
|
264
|
-
}
|
|
265
|
-
}, [session, format, projectName]);
|
|
266
|
-
|
|
267
|
-
return (
|
|
268
|
-
<div style={styles.previewPanel}>
|
|
269
|
-
<div style={styles.previewHeader}>
|
|
270
|
-
<span style={styles.previewTitle}>Preview</span>
|
|
271
|
-
<span style={styles.previewFormat}>{format.toUpperCase()}</span>
|
|
272
|
-
</div>
|
|
273
|
-
<pre style={styles.previewContent}>{preview}</pre>
|
|
274
|
-
</div>
|
|
275
|
-
);
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
// ============================================================================
|
|
279
|
-
// Main Component
|
|
280
|
-
// ============================================================================
|
|
281
|
-
|
|
282
|
-
const ExportDialog: React.FC<ExportDialogProps> = ({
|
|
283
|
-
session,
|
|
284
|
-
isOpen,
|
|
285
|
-
onClose,
|
|
286
|
-
onExport,
|
|
287
|
-
defaultProjectName,
|
|
288
|
-
}) => {
|
|
289
|
-
const { colors } = useTheme();
|
|
290
|
-
const [format, setFormat] = useState<ExportFormat>('markdown');
|
|
291
|
-
const [projectName, setProjectName] = useState(
|
|
292
|
-
defaultProjectName || session.metadata?.sourceName || 'Feedback Report'
|
|
293
|
-
);
|
|
294
|
-
const [includeImages, setIncludeImages] = useState(true);
|
|
295
|
-
const [theme, setTheme] = useState<'dark' | 'light'>('dark');
|
|
296
|
-
const [isExporting, setIsExporting] = useState(false);
|
|
297
|
-
const [exportSuccess, setExportSuccess] = useState(false);
|
|
298
|
-
|
|
299
|
-
// Reset state when dialog opens
|
|
300
|
-
useEffect(() => {
|
|
301
|
-
if (isOpen) {
|
|
302
|
-
setExportSuccess(false);
|
|
303
|
-
setIsExporting(false);
|
|
304
|
-
}
|
|
305
|
-
}, [isOpen]);
|
|
306
|
-
|
|
307
|
-
// Handle escape key
|
|
308
|
-
useEffect(() => {
|
|
309
|
-
const handleKeyDown = (e: KeyboardEvent) => {
|
|
310
|
-
if (e.key === 'Escape' && isOpen && !isExporting) {
|
|
311
|
-
onClose();
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
window.addEventListener('keydown', handleKeyDown);
|
|
315
|
-
return () => window.removeEventListener('keydown', handleKeyDown);
|
|
316
|
-
}, [isOpen, isExporting, onClose]);
|
|
317
|
-
|
|
318
|
-
const handleExport = useCallback(async () => {
|
|
319
|
-
setIsExporting(true);
|
|
320
|
-
try {
|
|
321
|
-
await onExport({
|
|
322
|
-
format,
|
|
323
|
-
projectName,
|
|
324
|
-
includeImages,
|
|
325
|
-
theme,
|
|
326
|
-
});
|
|
327
|
-
setExportSuccess(true);
|
|
328
|
-
setTimeout(() => {
|
|
329
|
-
onClose();
|
|
330
|
-
}, 1500);
|
|
331
|
-
} catch (error) {
|
|
332
|
-
console.error('Export failed:', error);
|
|
333
|
-
} finally {
|
|
334
|
-
setIsExporting(false);
|
|
335
|
-
}
|
|
336
|
-
}, [format, projectName, includeImages, theme, onExport, onClose]);
|
|
337
|
-
|
|
338
|
-
if (!isOpen) return null;
|
|
339
|
-
|
|
340
|
-
const selectedFormat = FORMAT_DATA.find((f) => f.format === format)!;
|
|
341
|
-
const showThemeOption = format === 'html' || format === 'pdf';
|
|
342
|
-
const showImagesOption = format !== 'json';
|
|
343
|
-
|
|
344
|
-
return (
|
|
345
|
-
<div style={styles.overlay} onClick={onClose}>
|
|
346
|
-
{/* dialogEnter, spin, successPop keyframes provided by animations.css */}
|
|
347
|
-
|
|
348
|
-
<div
|
|
349
|
-
style={styles.dialog}
|
|
350
|
-
onClick={(e) => e.stopPropagation()}
|
|
351
|
-
>
|
|
352
|
-
{/* Header */}
|
|
353
|
-
<div style={styles.header}>
|
|
354
|
-
<h2 style={styles.title}>Export Feedback</h2>
|
|
355
|
-
<button onClick={onClose} style={styles.closeButton} disabled={isExporting}>
|
|
356
|
-
<CloseIcon />
|
|
357
|
-
</button>
|
|
358
|
-
</div>
|
|
359
|
-
|
|
360
|
-
{/* Content */}
|
|
361
|
-
<div style={styles.content}>
|
|
362
|
-
{/* Left: Format Selection */}
|
|
363
|
-
<div style={styles.leftPane}>
|
|
364
|
-
<div style={styles.sectionTitle}>Choose Format</div>
|
|
365
|
-
<div style={styles.formatGrid}>
|
|
366
|
-
{FORMAT_DATA.map((data) => (
|
|
367
|
-
<FormatCard
|
|
368
|
-
key={data.format}
|
|
369
|
-
data={data}
|
|
370
|
-
isSelected={format === data.format}
|
|
371
|
-
onSelect={() => setFormat(data.format)}
|
|
372
|
-
/>
|
|
373
|
-
))}
|
|
374
|
-
</div>
|
|
375
|
-
|
|
376
|
-
{/* Options */}
|
|
377
|
-
<div style={styles.optionsSection}>
|
|
378
|
-
<div style={styles.sectionTitle}>Options</div>
|
|
379
|
-
|
|
380
|
-
{/* Project Name */}
|
|
381
|
-
<div style={styles.optionRow}>
|
|
382
|
-
<label style={styles.optionLabel}>Project Name</label>
|
|
383
|
-
<input
|
|
384
|
-
type="text"
|
|
385
|
-
value={projectName}
|
|
386
|
-
onChange={(e) => setProjectName(e.target.value)}
|
|
387
|
-
style={styles.textInput}
|
|
388
|
-
placeholder="Enter project name..."
|
|
389
|
-
/>
|
|
390
|
-
</div>
|
|
391
|
-
|
|
392
|
-
{/* Include Images */}
|
|
393
|
-
{showImagesOption && (
|
|
394
|
-
<div style={styles.optionRow}>
|
|
395
|
-
<label style={styles.optionLabel}>Include Images</label>
|
|
396
|
-
<button
|
|
397
|
-
onClick={() => setIncludeImages(!includeImages)}
|
|
398
|
-
style={{
|
|
399
|
-
...styles.toggleButton,
|
|
400
|
-
backgroundColor: includeImages
|
|
401
|
-
? `${colors.accent.default}cc`
|
|
402
|
-
: 'rgba(51, 65, 85, 0.5)',
|
|
403
|
-
}}
|
|
404
|
-
>
|
|
405
|
-
<div
|
|
406
|
-
style={{
|
|
407
|
-
...styles.toggleKnob,
|
|
408
|
-
transform: includeImages ? 'translateX(16px)' : 'translateX(0)',
|
|
409
|
-
}}
|
|
410
|
-
/>
|
|
411
|
-
</button>
|
|
412
|
-
</div>
|
|
413
|
-
)}
|
|
414
|
-
|
|
415
|
-
{/* Theme Toggle */}
|
|
416
|
-
{showThemeOption && (
|
|
417
|
-
<div style={styles.optionRow}>
|
|
418
|
-
<label style={styles.optionLabel}>Theme</label>
|
|
419
|
-
<div style={styles.themeToggle}>
|
|
420
|
-
<button
|
|
421
|
-
onClick={() => setTheme('dark')}
|
|
422
|
-
style={{
|
|
423
|
-
...styles.themeButton,
|
|
424
|
-
backgroundColor: theme === 'dark' ? `${colors.accent.default}cc` : 'transparent',
|
|
425
|
-
color: theme === 'dark' ? colors.text.inverse : colors.text.secondary,
|
|
426
|
-
}}
|
|
427
|
-
>
|
|
428
|
-
Dark
|
|
429
|
-
</button>
|
|
430
|
-
<button
|
|
431
|
-
onClick={() => setTheme('light')}
|
|
432
|
-
style={{
|
|
433
|
-
...styles.themeButton,
|
|
434
|
-
backgroundColor: theme === 'light' ? `${colors.accent.default}cc` : 'transparent',
|
|
435
|
-
color: theme === 'light' ? colors.text.inverse : colors.text.secondary,
|
|
436
|
-
}}
|
|
437
|
-
>
|
|
438
|
-
Light
|
|
439
|
-
</button>
|
|
440
|
-
</div>
|
|
441
|
-
</div>
|
|
442
|
-
)}
|
|
443
|
-
</div>
|
|
444
|
-
</div>
|
|
445
|
-
|
|
446
|
-
{/* Right: Preview */}
|
|
447
|
-
<div style={styles.rightPane}>
|
|
448
|
-
<PreviewPanel session={session} format={format} projectName={projectName} />
|
|
449
|
-
</div>
|
|
450
|
-
</div>
|
|
451
|
-
|
|
452
|
-
{/* Footer */}
|
|
453
|
-
<div style={styles.footer}>
|
|
454
|
-
<div style={styles.footerInfo}>
|
|
455
|
-
<span style={styles.footerItemCount}>
|
|
456
|
-
{session.feedbackItems.length} items
|
|
457
|
-
</span>
|
|
458
|
-
<span style={styles.footerDot}>*</span>
|
|
459
|
-
<span style={styles.footerFormat}>
|
|
460
|
-
{selectedFormat.name} ({selectedFormat.extension})
|
|
461
|
-
</span>
|
|
462
|
-
</div>
|
|
463
|
-
|
|
464
|
-
<div style={styles.footerActions}>
|
|
465
|
-
<button onClick={onClose} style={styles.cancelButton} disabled={isExporting}>
|
|
466
|
-
Cancel
|
|
467
|
-
</button>
|
|
468
|
-
<button
|
|
469
|
-
onClick={handleExport}
|
|
470
|
-
style={{
|
|
471
|
-
...styles.exportButton,
|
|
472
|
-
opacity: isExporting ? 0.7 : 1,
|
|
473
|
-
}}
|
|
474
|
-
disabled={isExporting}
|
|
475
|
-
>
|
|
476
|
-
{isExporting ? (
|
|
477
|
-
<>
|
|
478
|
-
<span style={{ animation: 'spin 1s linear infinite', display: 'inline-flex' }}>
|
|
479
|
-
<SpinnerIcon />
|
|
480
|
-
</span>
|
|
481
|
-
<span>Exporting...</span>
|
|
482
|
-
</>
|
|
483
|
-
) : exportSuccess ? (
|
|
484
|
-
<>
|
|
485
|
-
<span style={{ animation: 'successPop 0.3s ease-out' }}>
|
|
486
|
-
<CheckIcon />
|
|
487
|
-
</span>
|
|
488
|
-
<span>Exported!</span>
|
|
489
|
-
</>
|
|
490
|
-
) : (
|
|
491
|
-
<>
|
|
492
|
-
<span>Export as {selectedFormat.name}</span>
|
|
493
|
-
</>
|
|
494
|
-
)}
|
|
495
|
-
</button>
|
|
496
|
-
</div>
|
|
497
|
-
</div>
|
|
498
|
-
</div>
|
|
499
|
-
</div>
|
|
500
|
-
);
|
|
501
|
-
};
|
|
502
|
-
|
|
503
|
-
// ============================================================================
|
|
504
|
-
// Styles
|
|
505
|
-
// ============================================================================
|
|
506
|
-
|
|
507
|
-
const styles: Record<string, React.CSSProperties> = {
|
|
508
|
-
overlay: {
|
|
509
|
-
position: 'fixed',
|
|
510
|
-
inset: 0,
|
|
511
|
-
backgroundColor: 'rgba(0, 0, 0, 0.75)',
|
|
512
|
-
display: 'flex',
|
|
513
|
-
alignItems: 'center',
|
|
514
|
-
justifyContent: 'center',
|
|
515
|
-
zIndex: 1000,
|
|
516
|
-
backdropFilter: 'blur(4px)',
|
|
517
|
-
},
|
|
518
|
-
|
|
519
|
-
dialog: {
|
|
520
|
-
width: '90%',
|
|
521
|
-
maxWidth: 900,
|
|
522
|
-
maxHeight: '85vh',
|
|
523
|
-
backgroundColor: 'var(--bg-primary)',
|
|
524
|
-
borderRadius: 16,
|
|
525
|
-
border: '1px solid rgba(51, 65, 85, 0.5)',
|
|
526
|
-
boxShadow: '0 25px 50px -12px rgba(0, 0, 0, 0.5)',
|
|
527
|
-
display: 'flex',
|
|
528
|
-
flexDirection: 'column',
|
|
529
|
-
overflow: 'hidden',
|
|
530
|
-
animation: 'dialogEnter 0.2s ease-out',
|
|
531
|
-
},
|
|
532
|
-
|
|
533
|
-
// Header
|
|
534
|
-
header: {
|
|
535
|
-
display: 'flex',
|
|
536
|
-
alignItems: 'center',
|
|
537
|
-
justifyContent: 'space-between',
|
|
538
|
-
padding: '16px 20px',
|
|
539
|
-
borderBottom: '1px solid rgba(51, 65, 85, 0.5)',
|
|
540
|
-
},
|
|
541
|
-
|
|
542
|
-
title: {
|
|
543
|
-
fontSize: 18,
|
|
544
|
-
fontWeight: 600,
|
|
545
|
-
color: 'var(--text-inverse)',
|
|
546
|
-
margin: 0,
|
|
547
|
-
},
|
|
548
|
-
|
|
549
|
-
closeButton: {
|
|
550
|
-
display: 'flex',
|
|
551
|
-
alignItems: 'center',
|
|
552
|
-
justifyContent: 'center',
|
|
553
|
-
width: 32,
|
|
554
|
-
height: 32,
|
|
555
|
-
padding: 0,
|
|
556
|
-
backgroundColor: 'transparent',
|
|
557
|
-
border: 'none',
|
|
558
|
-
borderRadius: 8,
|
|
559
|
-
color: 'var(--text-secondary)',
|
|
560
|
-
cursor: 'pointer',
|
|
561
|
-
transition: 'all 0.15s ease',
|
|
562
|
-
},
|
|
563
|
-
|
|
564
|
-
// Content
|
|
565
|
-
content: {
|
|
566
|
-
display: 'flex',
|
|
567
|
-
flex: 1,
|
|
568
|
-
overflow: 'hidden',
|
|
569
|
-
},
|
|
570
|
-
|
|
571
|
-
leftPane: {
|
|
572
|
-
width: '55%',
|
|
573
|
-
padding: 20,
|
|
574
|
-
overflowY: 'auto',
|
|
575
|
-
borderRight: '1px solid rgba(51, 65, 85, 0.5)',
|
|
576
|
-
},
|
|
577
|
-
|
|
578
|
-
rightPane: {
|
|
579
|
-
width: '45%',
|
|
580
|
-
padding: 20,
|
|
581
|
-
backgroundColor: 'rgba(15, 23, 42, 0.5)',
|
|
582
|
-
overflow: 'hidden',
|
|
583
|
-
display: 'flex',
|
|
584
|
-
flexDirection: 'column',
|
|
585
|
-
},
|
|
586
|
-
|
|
587
|
-
sectionTitle: {
|
|
588
|
-
fontSize: 12,
|
|
589
|
-
fontWeight: 600,
|
|
590
|
-
color: 'var(--text-tertiary)',
|
|
591
|
-
textTransform: 'uppercase',
|
|
592
|
-
letterSpacing: '0.05em',
|
|
593
|
-
marginBottom: 12,
|
|
594
|
-
},
|
|
595
|
-
|
|
596
|
-
// Format Grid
|
|
597
|
-
formatGrid: {
|
|
598
|
-
display: 'grid',
|
|
599
|
-
gridTemplateColumns: 'repeat(2, 1fr)',
|
|
600
|
-
gap: 12,
|
|
601
|
-
marginBottom: 24,
|
|
602
|
-
},
|
|
603
|
-
|
|
604
|
-
formatCard: {
|
|
605
|
-
display: 'flex',
|
|
606
|
-
alignItems: 'flex-start',
|
|
607
|
-
gap: 12,
|
|
608
|
-
padding: 14,
|
|
609
|
-
borderRadius: 12,
|
|
610
|
-
border: '1px solid',
|
|
611
|
-
cursor: 'pointer',
|
|
612
|
-
textAlign: 'left',
|
|
613
|
-
transition: 'all 0.15s ease',
|
|
614
|
-
position: 'relative',
|
|
615
|
-
},
|
|
616
|
-
|
|
617
|
-
formatIcon: {
|
|
618
|
-
flexShrink: 0,
|
|
619
|
-
width: 40,
|
|
620
|
-
height: 40,
|
|
621
|
-
display: 'flex',
|
|
622
|
-
alignItems: 'center',
|
|
623
|
-
justifyContent: 'center',
|
|
624
|
-
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
|
625
|
-
borderRadius: 10,
|
|
626
|
-
color: 'var(--text-link)',
|
|
627
|
-
},
|
|
628
|
-
|
|
629
|
-
formatInfo: {
|
|
630
|
-
flex: 1,
|
|
631
|
-
minWidth: 0,
|
|
632
|
-
},
|
|
633
|
-
|
|
634
|
-
formatHeader: {
|
|
635
|
-
display: 'flex',
|
|
636
|
-
alignItems: 'center',
|
|
637
|
-
gap: 6,
|
|
638
|
-
marginBottom: 4,
|
|
639
|
-
},
|
|
640
|
-
|
|
641
|
-
formatName: {
|
|
642
|
-
fontSize: 14,
|
|
643
|
-
fontWeight: 600,
|
|
644
|
-
color: 'var(--text-inverse)',
|
|
645
|
-
},
|
|
646
|
-
|
|
647
|
-
formatExtension: {
|
|
648
|
-
fontSize: 11,
|
|
649
|
-
color: 'var(--text-tertiary)',
|
|
650
|
-
fontFamily: 'ui-monospace, monospace',
|
|
651
|
-
},
|
|
652
|
-
|
|
653
|
-
formatDescription: {
|
|
654
|
-
fontSize: 12,
|
|
655
|
-
color: 'var(--text-secondary)',
|
|
656
|
-
margin: 0,
|
|
657
|
-
lineHeight: 1.4,
|
|
658
|
-
marginBottom: 8,
|
|
659
|
-
},
|
|
660
|
-
|
|
661
|
-
formatFeatures: {
|
|
662
|
-
display: 'flex',
|
|
663
|
-
flexWrap: 'wrap',
|
|
664
|
-
gap: 4,
|
|
665
|
-
},
|
|
666
|
-
|
|
667
|
-
featureTag: {
|
|
668
|
-
fontSize: 10,
|
|
669
|
-
color: 'var(--text-tertiary)',
|
|
670
|
-
backgroundColor: 'rgba(51, 65, 85, 0.5)',
|
|
671
|
-
padding: '2px 6px',
|
|
672
|
-
borderRadius: 4,
|
|
673
|
-
},
|
|
674
|
-
|
|
675
|
-
selectedBadge: {
|
|
676
|
-
position: 'absolute',
|
|
677
|
-
top: 8,
|
|
678
|
-
right: 8,
|
|
679
|
-
width: 20,
|
|
680
|
-
height: 20,
|
|
681
|
-
display: 'flex',
|
|
682
|
-
alignItems: 'center',
|
|
683
|
-
justifyContent: 'center',
|
|
684
|
-
backgroundColor: 'var(--accent-default)',
|
|
685
|
-
borderRadius: '50%',
|
|
686
|
-
color: 'var(--text-inverse)',
|
|
687
|
-
},
|
|
688
|
-
|
|
689
|
-
// Options
|
|
690
|
-
optionsSection: {
|
|
691
|
-
marginTop: 8,
|
|
692
|
-
},
|
|
693
|
-
|
|
694
|
-
optionRow: {
|
|
695
|
-
display: 'flex',
|
|
696
|
-
alignItems: 'center',
|
|
697
|
-
justifyContent: 'space-between',
|
|
698
|
-
padding: '12px 0',
|
|
699
|
-
borderBottom: '1px solid rgba(51, 65, 85, 0.3)',
|
|
700
|
-
},
|
|
701
|
-
|
|
702
|
-
optionLabel: {
|
|
703
|
-
fontSize: 13,
|
|
704
|
-
fontWeight: 500,
|
|
705
|
-
color: 'var(--text-primary)',
|
|
706
|
-
},
|
|
707
|
-
|
|
708
|
-
textInput: {
|
|
709
|
-
width: 200,
|
|
710
|
-
padding: '8px 12px',
|
|
711
|
-
backgroundColor: 'rgba(31, 41, 55, 0.5)',
|
|
712
|
-
border: '1px solid rgba(51, 65, 85, 0.5)',
|
|
713
|
-
borderRadius: 8,
|
|
714
|
-
color: 'var(--text-primary)',
|
|
715
|
-
fontSize: 13,
|
|
716
|
-
outline: 'none',
|
|
717
|
-
transition: 'border-color 0.15s ease',
|
|
718
|
-
},
|
|
719
|
-
|
|
720
|
-
toggleButton: {
|
|
721
|
-
width: 44,
|
|
722
|
-
height: 24,
|
|
723
|
-
borderRadius: 12,
|
|
724
|
-
border: 'none',
|
|
725
|
-
cursor: 'pointer',
|
|
726
|
-
position: 'relative',
|
|
727
|
-
transition: 'background-color 0.2s ease',
|
|
728
|
-
padding: 2,
|
|
729
|
-
},
|
|
730
|
-
|
|
731
|
-
toggleKnob: {
|
|
732
|
-
width: 20,
|
|
733
|
-
height: 20,
|
|
734
|
-
backgroundColor: 'var(--text-inverse)',
|
|
735
|
-
borderRadius: '50%',
|
|
736
|
-
transition: 'transform 0.2s ease',
|
|
737
|
-
boxShadow: '0 1px 3px rgba(0, 0, 0, 0.2)',
|
|
738
|
-
},
|
|
739
|
-
|
|
740
|
-
themeToggle: {
|
|
741
|
-
display: 'flex',
|
|
742
|
-
backgroundColor: 'rgba(31, 41, 55, 0.5)',
|
|
743
|
-
borderRadius: 8,
|
|
744
|
-
padding: 2,
|
|
745
|
-
},
|
|
746
|
-
|
|
747
|
-
themeButton: {
|
|
748
|
-
padding: '6px 12px',
|
|
749
|
-
borderRadius: 6,
|
|
750
|
-
border: 'none',
|
|
751
|
-
fontSize: 12,
|
|
752
|
-
fontWeight: 500,
|
|
753
|
-
cursor: 'pointer',
|
|
754
|
-
transition: 'all 0.15s ease',
|
|
755
|
-
},
|
|
756
|
-
|
|
757
|
-
// Preview
|
|
758
|
-
previewPanel: {
|
|
759
|
-
flex: 1,
|
|
760
|
-
display: 'flex',
|
|
761
|
-
flexDirection: 'column',
|
|
762
|
-
backgroundColor: 'rgba(31, 41, 55, 0.3)',
|
|
763
|
-
borderRadius: 12,
|
|
764
|
-
border: '1px solid rgba(51, 65, 85, 0.5)',
|
|
765
|
-
overflow: 'hidden',
|
|
766
|
-
},
|
|
767
|
-
|
|
768
|
-
previewHeader: {
|
|
769
|
-
display: 'flex',
|
|
770
|
-
alignItems: 'center',
|
|
771
|
-
justifyContent: 'space-between',
|
|
772
|
-
padding: '10px 14px',
|
|
773
|
-
borderBottom: '1px solid rgba(51, 65, 85, 0.5)',
|
|
774
|
-
},
|
|
775
|
-
|
|
776
|
-
previewTitle: {
|
|
777
|
-
fontSize: 12,
|
|
778
|
-
fontWeight: 500,
|
|
779
|
-
color: 'var(--text-tertiary)',
|
|
780
|
-
textTransform: 'uppercase',
|
|
781
|
-
letterSpacing: '0.05em',
|
|
782
|
-
},
|
|
783
|
-
|
|
784
|
-
previewFormat: {
|
|
785
|
-
fontSize: 10,
|
|
786
|
-
fontWeight: 600,
|
|
787
|
-
color: 'var(--text-link)',
|
|
788
|
-
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
|
789
|
-
padding: '2px 8px',
|
|
790
|
-
borderRadius: 4,
|
|
791
|
-
},
|
|
792
|
-
|
|
793
|
-
previewContent: {
|
|
794
|
-
flex: 1,
|
|
795
|
-
padding: 14,
|
|
796
|
-
margin: 0,
|
|
797
|
-
fontSize: 11,
|
|
798
|
-
lineHeight: 1.5,
|
|
799
|
-
color: 'var(--text-secondary)',
|
|
800
|
-
fontFamily: 'ui-monospace, SFMono-Regular, monospace',
|
|
801
|
-
whiteSpace: 'pre-wrap',
|
|
802
|
-
overflowY: 'auto',
|
|
803
|
-
overflowX: 'hidden',
|
|
804
|
-
wordBreak: 'break-word',
|
|
805
|
-
},
|
|
806
|
-
|
|
807
|
-
// Footer
|
|
808
|
-
footer: {
|
|
809
|
-
display: 'flex',
|
|
810
|
-
alignItems: 'center',
|
|
811
|
-
justifyContent: 'space-between',
|
|
812
|
-
padding: '14px 20px',
|
|
813
|
-
borderTop: '1px solid rgba(51, 65, 85, 0.5)',
|
|
814
|
-
backgroundColor: 'rgba(15, 23, 42, 0.5)',
|
|
815
|
-
},
|
|
816
|
-
|
|
817
|
-
footerInfo: {
|
|
818
|
-
display: 'flex',
|
|
819
|
-
alignItems: 'center',
|
|
820
|
-
gap: 8,
|
|
821
|
-
fontSize: 12,
|
|
822
|
-
color: 'var(--text-tertiary)',
|
|
823
|
-
},
|
|
824
|
-
|
|
825
|
-
footerItemCount: {
|
|
826
|
-
fontWeight: 500,
|
|
827
|
-
},
|
|
828
|
-
|
|
829
|
-
footerDot: {
|
|
830
|
-
opacity: 0.5,
|
|
831
|
-
},
|
|
832
|
-
|
|
833
|
-
footerFormat: {
|
|
834
|
-
color: 'var(--text-secondary)',
|
|
835
|
-
},
|
|
836
|
-
|
|
837
|
-
footerActions: {
|
|
838
|
-
display: 'flex',
|
|
839
|
-
alignItems: 'center',
|
|
840
|
-
gap: 10,
|
|
841
|
-
},
|
|
842
|
-
|
|
843
|
-
cancelButton: {
|
|
844
|
-
padding: '10px 16px',
|
|
845
|
-
backgroundColor: 'transparent',
|
|
846
|
-
border: '1px solid rgba(51, 65, 85, 0.5)',
|
|
847
|
-
borderRadius: 8,
|
|
848
|
-
color: 'var(--text-secondary)',
|
|
849
|
-
fontSize: 13,
|
|
850
|
-
fontWeight: 500,
|
|
851
|
-
cursor: 'pointer',
|
|
852
|
-
transition: 'all 0.15s ease',
|
|
853
|
-
},
|
|
854
|
-
|
|
855
|
-
exportButton: {
|
|
856
|
-
display: 'flex',
|
|
857
|
-
alignItems: 'center',
|
|
858
|
-
gap: 8,
|
|
859
|
-
padding: '10px 20px',
|
|
860
|
-
backgroundColor: 'var(--accent-default)',
|
|
861
|
-
border: 'none',
|
|
862
|
-
borderRadius: 8,
|
|
863
|
-
color: 'var(--text-inverse)',
|
|
864
|
-
fontSize: 13,
|
|
865
|
-
fontWeight: 600,
|
|
866
|
-
cursor: 'pointer',
|
|
867
|
-
transition: 'all 0.15s ease',
|
|
868
|
-
},
|
|
869
|
-
};
|
|
870
|
-
|
|
871
|
-
export { ExportDialog };
|
|
872
|
-
export type { ExportDialogProps, ExportOptions, ExportFormat };
|