@crownpeak/dqm-react-component 1.0.1 → 1.2.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/CHANGELOG.md +41 -0
- package/README.md +125 -23
- package/dist/DQMSidebar.d.ts.map +1 -1
- package/dist/ErrorBoundary.d.ts.map +1 -1
- package/dist/__tests__/setup.d.ts +1 -0
- package/dist/__tests__/setup.d.ts.map +1 -0
- package/dist/__tests__/utils.d.ts +145 -0
- package/dist/__tests__/utils.d.ts.map +1 -0
- package/dist/auth-ui/assets/index-YKFZYENy.js +158 -0
- package/dist/auth-ui/index.html +1 -1
- package/dist/components/auth/DQMLogin.d.ts.map +1 -1
- package/dist/components/auth/index.d.ts +0 -1
- package/dist/components/auth/index.d.ts.map +1 -1
- package/dist/components/cards/AISummaryCard.d.ts +2 -0
- package/dist/components/cards/AISummaryCard.d.ts.map +1 -0
- package/dist/components/cards/index.d.ts +1 -0
- package/dist/components/cards/index.d.ts.map +1 -1
- package/dist/components/common/LanguageSwitch.d.ts +5 -0
- package/dist/components/common/LanguageSwitch.d.ts.map +1 -0
- package/dist/components/common/LanguageSwitchBase.d.ts +16 -0
- package/dist/components/common/LanguageSwitchBase.d.ts.map +1 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/components/common/index.d.ts.map +1 -1
- package/dist/components/modals/AISettingsDialog.d.ts +61 -0
- package/dist/components/modals/AISettingsDialog.d.ts.map +1 -0
- package/dist/components/modals/HighlightModal.d.ts +45 -0
- package/dist/components/modals/HighlightModal.d.ts.map +1 -0
- package/dist/components/modals/LoginOverlay.d.ts +22 -0
- package/dist/components/modals/LoginOverlay.d.ts.map +1 -0
- package/dist/components/modals/index.d.ts +9 -0
- package/dist/components/modals/index.d.ts.map +1 -0
- package/dist/components/renderers/BrowserViewRenderer.d.ts.map +1 -1
- package/dist/components/renderers/ShadowDOMRenderer.d.ts.map +1 -1
- package/dist/components/sidebar/CloseButton.d.ts +6 -0
- package/dist/components/sidebar/CloseButton.d.ts.map +1 -0
- package/dist/components/sidebar/SidebarContent.d.ts.map +1 -1
- package/dist/components/sidebar/SidebarFooter.d.ts.map +1 -1
- package/dist/components/sidebar/SidebarHeader.d.ts.map +1 -1
- package/dist/components/sidebar/SidebarSkeleton.d.ts.map +1 -1
- package/dist/components/sidebar/StyledDrawer.d.ts +6 -1
- package/dist/components/sidebar/StyledDrawer.d.ts.map +1 -1
- package/dist/components/sidebar/StyledFab.d.ts +4 -1
- package/dist/components/sidebar/StyledFab.d.ts.map +1 -1
- package/dist/components/sidebar/index.d.ts +1 -0
- package/dist/components/sidebar/index.d.ts.map +1 -1
- package/dist/context/ai/AIContext.d.ts +13 -0
- package/dist/context/ai/AIContext.d.ts.map +1 -0
- package/dist/context/ai/index.d.ts +12 -0
- package/dist/context/ai/index.d.ts.map +1 -0
- package/dist/context/ai/types.d.ts +161 -0
- package/dist/context/ai/types.d.ts.map +1 -0
- package/dist/context/ai/useAIEngine.d.ts +10 -0
- package/dist/context/ai/useAIEngine.d.ts.map +1 -0
- package/dist/context/ai/useAISummary.d.ts +10 -0
- package/dist/context/ai/useAISummary.d.ts.map +1 -0
- package/dist/context/ai/useAITranslation.d.ts +10 -0
- package/dist/context/ai/useAITranslation.d.ts.map +1 -0
- package/dist/context/ai/useTranslationCache.d.ts +9 -0
- package/dist/context/ai/useTranslationCache.d.ts.map +1 -0
- package/dist/dqm-widget.d.ts +107 -0
- package/dist/dqm-widget.esm.js +516 -0
- package/dist/dqm-widget.iife.js +183 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useAnalysis.d.ts +43 -0
- package/dist/hooks/useAnalysis.d.ts.map +1 -0
- package/dist/hooks/useAuthentication.d.ts +49 -0
- package/dist/hooks/useAuthentication.d.ts.map +1 -0
- package/dist/hooks/useHighlightActions.d.ts +37 -0
- package/dist/hooks/useHighlightActions.d.ts.map +1 -0
- package/dist/hooks/useHighlights.d.ts +72 -0
- package/dist/hooks/useHighlights.d.ts.map +1 -0
- package/dist/html-pages/DQMWidget.d.ts +36 -0
- package/dist/html-pages/DQMWidget.d.ts.map +1 -0
- package/dist/html-pages/index.d.ts +32 -0
- package/dist/html-pages/index.d.ts.map +1 -0
- package/dist/i18n/auth/de.d.ts +25 -0
- package/dist/i18n/auth/de.d.ts.map +1 -0
- package/dist/i18n/auth/en.d.ts +26 -0
- package/dist/i18n/auth/en.d.ts.map +1 -0
- package/dist/i18n/auth/es.d.ts +25 -0
- package/dist/i18n/auth/es.d.ts.map +1 -0
- package/dist/i18n/auth/index.d.ts +8 -0
- package/dist/i18n/auth/index.d.ts.map +1 -0
- package/dist/i18n/common/de.d.ts +18 -0
- package/dist/i18n/common/de.d.ts.map +1 -0
- package/dist/i18n/common/en.d.ts +19 -0
- package/dist/i18n/common/en.d.ts.map +1 -0
- package/dist/i18n/common/es.d.ts +18 -0
- package/dist/i18n/common/es.d.ts.map +1 -0
- package/dist/i18n/common/index.d.ts +8 -0
- package/dist/i18n/common/index.d.ts.map +1 -0
- package/dist/i18n/demo/de.d.ts +104 -0
- package/dist/i18n/demo/de.d.ts.map +1 -0
- package/dist/i18n/demo/en.d.ts +105 -0
- package/dist/i18n/demo/en.d.ts.map +1 -0
- package/dist/i18n/demo/es.d.ts +104 -0
- package/dist/i18n/demo/es.d.ts.map +1 -0
- package/dist/i18n/demo/index.d.ts +8 -0
- package/dist/i18n/demo/index.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +673 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/sidebar/de.d.ts +89 -0
- package/dist/i18n/sidebar/de.d.ts.map +1 -0
- package/dist/i18n/sidebar/en.d.ts +90 -0
- package/dist/i18n/sidebar/en.d.ts.map +1 -0
- package/dist/i18n/sidebar/es.d.ts +89 -0
- package/dist/i18n/sidebar/es.d.ts.map +1 -0
- package/dist/i18n/sidebar/index.d.ts +8 -0
- package/dist/i18n/sidebar/index.d.ts.map +1 -0
- package/dist/i18n.d.ts +8 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/index.cjs +61 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.html +498 -0
- package/dist/index.js +18006 -7241
- package/dist/index.js.map +1 -1
- package/dist/locale.d.ts +25 -0
- package/dist/locale.d.ts.map +1 -0
- package/dist/mocks/browser.d.ts +23 -0
- package/dist/mocks/browser.d.ts.map +1 -0
- package/dist/mocks/handlers.d.ts +32 -0
- package/dist/mocks/handlers.d.ts.map +1 -0
- package/dist/mocks/index.d.ts +7 -0
- package/dist/mocks/index.d.ts.map +1 -0
- package/dist/mocks/server.d.ts +24 -0
- package/dist/mocks/server.d.ts.map +1 -0
- package/dist/server/routes/auth.js +0 -10
- package/dist/server/routes/auth.js.map +1 -1
- package/dist/store/api/dqmApi.d.ts +1793 -0
- package/dist/store/api/dqmApi.d.ts.map +1 -0
- package/dist/store/api/index.d.ts +6 -0
- package/dist/store/api/index.d.ts.map +1 -0
- package/dist/store/index.d.ts +57 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/localeSlice.d.ts +6 -0
- package/dist/store/localeSlice.d.ts.map +1 -0
- package/dist/store/slices/aiSlice.d.ts +134 -0
- package/dist/store/slices/aiSlice.d.ts.map +1 -0
- package/dist/store/slices/analysisSlice.d.ts +54 -0
- package/dist/store/slices/analysisSlice.d.ts.map +1 -0
- package/dist/store/slices/authSlice.d.ts +170 -0
- package/dist/store/slices/authSlice.d.ts.map +1 -0
- package/dist/store/slices/highlightSlice.d.ts +188 -0
- package/dist/store/slices/highlightSlice.d.ts.map +1 -0
- package/dist/store/slices/index.d.ts +12 -0
- package/dist/store/slices/index.d.ts.map +1 -0
- package/dist/types.d.ts +109 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/aiJsonClient.d.ts +23 -0
- package/dist/utils/aiJsonClient.d.ts.map +1 -0
- package/dist/utils/colors/GenerateCategoryColors.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +107 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/openaiJsonClient.d.ts +8 -0
- package/dist/utils/openaiJsonClient.d.ts.map +1 -0
- package/dist/utils/sanitizeHtmlDocument.d.ts +4 -0
- package/dist/utils/sanitizeHtmlDocument.d.ts.map +1 -0
- package/dist/utils/secureStorage.d.ts +95 -0
- package/dist/utils/secureStorage.d.ts.map +1 -0
- package/dist/utils/storage.d.ts.map +1 -1
- package/dist/utils/translationCache.d.ts +45 -0
- package/dist/utils/translationCache.d.ts.map +1 -0
- package/dist/utils/translationUtils.d.ts +52 -0
- package/dist/utils/translationUtils.d.ts.map +1 -0
- package/dist/utils/useDomPresence.d.ts +210 -0
- package/dist/utils/useDomPresence.d.ts.map +1 -0
- package/package.json +59 -12
- package/AUTHENTICATION.md +0 -281
- package/BACKEND-API.md +0 -1829
- package/DEVELOPMENT.md +0 -339
- package/EXAMPLES.md +0 -194
- package/QUICKSTART.md +0 -200
- package/dist/auth-ui/assets/index-CczTRrba.js +0 -158
- package/dist/components/auth/OAuth2CallbackHandler.d.ts +0 -15
- package/dist/components/auth/OAuth2CallbackHandler.d.ts.map +0 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
import { Checkpoint } from '../../types';
|
|
3
|
+
export type ViewMode = 'browser' | 'source';
|
|
4
|
+
export interface HighlightCacheEntry {
|
|
5
|
+
browser?: string;
|
|
6
|
+
source?: string;
|
|
7
|
+
timestamp: number;
|
|
8
|
+
}
|
|
9
|
+
export interface HighlightSliceState {
|
|
10
|
+
/** Currently selected checkpoint for highlighting */
|
|
11
|
+
selectedCheckpoint: Checkpoint | null;
|
|
12
|
+
/** Currently selected checkpoint ID */
|
|
13
|
+
selectedCheckpointId: string | null;
|
|
14
|
+
/** Current view mode (browser or source) */
|
|
15
|
+
viewMode: ViewMode;
|
|
16
|
+
/** Whether to show all highlights or just selected */
|
|
17
|
+
showAllHighlights: boolean;
|
|
18
|
+
/** Index of currently visible highlight (for navigation) - 1-based */
|
|
19
|
+
currentHighlightIndex: number;
|
|
20
|
+
/** Total number of highlights on current page */
|
|
21
|
+
totalHighlights: number;
|
|
22
|
+
/** Index of highlight visible via scroll observation - 1-based */
|
|
23
|
+
visibleHighlightIndex: number;
|
|
24
|
+
/** Cached highlight content by checkpoint ID */
|
|
25
|
+
cache: Record<string, HighlightCacheEntry>;
|
|
26
|
+
/** Scroll positions by checkpoint ID */
|
|
27
|
+
scrollPositions: Record<string, {
|
|
28
|
+
browser: number;
|
|
29
|
+
source: number;
|
|
30
|
+
}>;
|
|
31
|
+
/** Whether highlight modal is open */
|
|
32
|
+
isModalOpen: boolean;
|
|
33
|
+
/** Loading state for highlight content */
|
|
34
|
+
isLoading: boolean;
|
|
35
|
+
/** Error message if highlight loading failed */
|
|
36
|
+
error: string | null;
|
|
37
|
+
/** Current highlighted HTML content to display */
|
|
38
|
+
highlightedContent: string;
|
|
39
|
+
/** Whether scripts are disabled in browser view */
|
|
40
|
+
scriptsDisabled: boolean;
|
|
41
|
+
/** Whether auto-scroll to first highlight has occurred */
|
|
42
|
+
hasAutoScrolled: boolean;
|
|
43
|
+
/** Click indicator to trigger scroll (incremented on nav button click) */
|
|
44
|
+
clickedIndicator: number;
|
|
45
|
+
/** Asset ID for the current analysis */
|
|
46
|
+
currentAssetId: string | null;
|
|
47
|
+
}
|
|
48
|
+
export declare const highlightSlice: import('@reduxjs/toolkit').Slice<HighlightSliceState, {
|
|
49
|
+
/** Select a checkpoint for highlighting */
|
|
50
|
+
selectCheckpoint: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<Checkpoint | null>) => void;
|
|
51
|
+
/** Set checkpoint ID without full checkpoint object */
|
|
52
|
+
setSelectedCheckpointId: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<string | null>) => void;
|
|
53
|
+
/** Toggle between browser and source view */
|
|
54
|
+
setViewMode: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<ViewMode>) => void;
|
|
55
|
+
/** Toggle showing all highlights vs selected */
|
|
56
|
+
toggleShowAllHighlights: (state: import('immer').WritableDraft<HighlightSliceState>) => void;
|
|
57
|
+
/** Set show all highlights explicitly */
|
|
58
|
+
setShowAllHighlights: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<boolean>) => void;
|
|
59
|
+
/** Navigate to specific highlight */
|
|
60
|
+
setCurrentHighlightIndex: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<number>) => void;
|
|
61
|
+
/** Navigate to next highlight */
|
|
62
|
+
nextHighlight: (state: import('immer').WritableDraft<HighlightSliceState>) => void;
|
|
63
|
+
/** Navigate to previous highlight */
|
|
64
|
+
previousHighlight: (state: import('immer').WritableDraft<HighlightSliceState>) => void;
|
|
65
|
+
/** Set total highlights count */
|
|
66
|
+
setTotalHighlights: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<number>) => void;
|
|
67
|
+
/** Update visible highlight from scroll observation */
|
|
68
|
+
setVisibleHighlightIndex: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<number>) => void;
|
|
69
|
+
/** Cache highlight content */
|
|
70
|
+
cacheHighlight: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<{
|
|
71
|
+
checkpointId: string;
|
|
72
|
+
content: string;
|
|
73
|
+
type: "browser" | "source";
|
|
74
|
+
}>) => void;
|
|
75
|
+
/** Get cached content if valid */
|
|
76
|
+
clearExpiredCache: (state: import('immer').WritableDraft<HighlightSliceState>) => void;
|
|
77
|
+
/** Clear all cache */
|
|
78
|
+
clearCache: (state: import('immer').WritableDraft<HighlightSliceState>) => void;
|
|
79
|
+
/** Save scroll position for checkpoint */
|
|
80
|
+
saveScrollPosition: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<{
|
|
81
|
+
checkpointId: string;
|
|
82
|
+
position: {
|
|
83
|
+
browser?: number;
|
|
84
|
+
source?: number;
|
|
85
|
+
};
|
|
86
|
+
}>) => void;
|
|
87
|
+
/** Open highlight modal */
|
|
88
|
+
openModal: (state: import('immer').WritableDraft<HighlightSliceState>) => void;
|
|
89
|
+
/** Close highlight modal */
|
|
90
|
+
closeModal: (state: import('immer').WritableDraft<HighlightSliceState>) => void;
|
|
91
|
+
/** Set highlighted content */
|
|
92
|
+
setHighlightedContent: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<string>) => void;
|
|
93
|
+
/** Toggle scripts in browser view */
|
|
94
|
+
toggleScripts: (state: import('immer').WritableDraft<HighlightSliceState>) => void;
|
|
95
|
+
/** Set scripts disabled state */
|
|
96
|
+
setScriptsDisabled: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<boolean>) => void;
|
|
97
|
+
/** Set has auto scrolled flag */
|
|
98
|
+
setHasAutoScrolled: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<boolean>) => void;
|
|
99
|
+
/** Increment click indicator to trigger scroll */
|
|
100
|
+
incrementClickIndicator: (state: import('immer').WritableDraft<HighlightSliceState>) => void;
|
|
101
|
+
/** Set current asset ID */
|
|
102
|
+
setCurrentAssetId: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<string | null>) => void;
|
|
103
|
+
/** Navigate highlight with wrap-around */
|
|
104
|
+
navigateHighlight: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<"next" | "prev">) => void;
|
|
105
|
+
/** Set loading state */
|
|
106
|
+
setLoading: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<boolean>) => void;
|
|
107
|
+
/** Set error state */
|
|
108
|
+
setError: (state: import('immer').WritableDraft<HighlightSliceState>, action: PayloadAction<string | null>) => void;
|
|
109
|
+
/** Reset highlight state */
|
|
110
|
+
resetHighlight: (state: import('immer').WritableDraft<HighlightSliceState>) => void;
|
|
111
|
+
}, "highlight", "highlight", import('@reduxjs/toolkit').SliceSelectors<HighlightSliceState>>;
|
|
112
|
+
export declare const selectCheckpoint: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<Checkpoint, "highlight/selectCheckpoint">, setSelectedCheckpointId: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string, "highlight/setSelectedCheckpointId">, setViewMode: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<ViewMode, "highlight/setViewMode">, toggleShowAllHighlights: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"highlight/toggleShowAllHighlights">, setShowAllHighlights: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<boolean, "highlight/setShowAllHighlights">, setCurrentHighlightIndex: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<number, "highlight/setCurrentHighlightIndex">, nextHighlight: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"highlight/nextHighlight">, previousHighlight: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"highlight/previousHighlight">, setTotalHighlights: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<number, "highlight/setTotalHighlights">, setVisibleHighlightIndex: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<number, "highlight/setVisibleHighlightIndex">, cacheHighlight: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
113
|
+
checkpointId: string;
|
|
114
|
+
content: string;
|
|
115
|
+
type: "browser" | "source";
|
|
116
|
+
}, "highlight/cacheHighlight">, clearExpiredCache: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"highlight/clearExpiredCache">, clearCache: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"highlight/clearCache">, saveScrollPosition: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
117
|
+
checkpointId: string;
|
|
118
|
+
position: {
|
|
119
|
+
browser?: number;
|
|
120
|
+
source?: number;
|
|
121
|
+
};
|
|
122
|
+
}, "highlight/saveScrollPosition">, openModal: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"highlight/openModal">, closeModal: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"highlight/closeModal">, setLoading: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<boolean, "highlight/setLoading">, setError: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string, "highlight/setError">, resetHighlight: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"highlight/resetHighlight">, setHighlightedContent: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string, "highlight/setHighlightedContent">, toggleScripts: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"highlight/toggleScripts">, setScriptsDisabled: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<boolean, "highlight/setScriptsDisabled">, setHasAutoScrolled: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<boolean, "highlight/setHasAutoScrolled">, incrementClickIndicator: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"highlight/incrementClickIndicator">, setCurrentAssetId: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string, "highlight/setCurrentAssetId">, navigateHighlight: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<"next" | "prev", "highlight/navigateHighlight">;
|
|
123
|
+
declare const _default: import('redux').Reducer<HighlightSliceState>;
|
|
124
|
+
export default _default;
|
|
125
|
+
export declare const selectSelectedCheckpoint: (state: {
|
|
126
|
+
highlight: HighlightSliceState;
|
|
127
|
+
}) => Checkpoint;
|
|
128
|
+
export declare const selectSelectedCheckpointId: (state: {
|
|
129
|
+
highlight: HighlightSliceState;
|
|
130
|
+
}) => string;
|
|
131
|
+
export declare const selectViewMode: (state: {
|
|
132
|
+
highlight: HighlightSliceState;
|
|
133
|
+
}) => ViewMode;
|
|
134
|
+
export declare const selectShowAllHighlights: (state: {
|
|
135
|
+
highlight: HighlightSliceState;
|
|
136
|
+
}) => boolean;
|
|
137
|
+
export declare const selectCurrentHighlightIndex: (state: {
|
|
138
|
+
highlight: HighlightSliceState;
|
|
139
|
+
}) => number;
|
|
140
|
+
export declare const selectTotalHighlights: (state: {
|
|
141
|
+
highlight: HighlightSliceState;
|
|
142
|
+
}) => number;
|
|
143
|
+
export declare const selectVisibleHighlightIndex: (state: {
|
|
144
|
+
highlight: HighlightSliceState;
|
|
145
|
+
}) => number;
|
|
146
|
+
export declare const selectHighlightCache: (state: {
|
|
147
|
+
highlight: HighlightSliceState;
|
|
148
|
+
}) => Record<string, HighlightCacheEntry>;
|
|
149
|
+
export declare const selectScrollPositions: (state: {
|
|
150
|
+
highlight: HighlightSliceState;
|
|
151
|
+
}) => Record<string, {
|
|
152
|
+
browser: number;
|
|
153
|
+
source: number;
|
|
154
|
+
}>;
|
|
155
|
+
export declare const selectIsModalOpen: (state: {
|
|
156
|
+
highlight: HighlightSliceState;
|
|
157
|
+
}) => boolean;
|
|
158
|
+
export declare const selectIsHighlightLoading: (state: {
|
|
159
|
+
highlight: HighlightSliceState;
|
|
160
|
+
}) => boolean;
|
|
161
|
+
export declare const selectHighlightError: (state: {
|
|
162
|
+
highlight: HighlightSliceState;
|
|
163
|
+
}) => string;
|
|
164
|
+
export declare const selectHighlightedContent: (state: {
|
|
165
|
+
highlight: HighlightSliceState;
|
|
166
|
+
}) => string;
|
|
167
|
+
export declare const selectScriptsDisabled: (state: {
|
|
168
|
+
highlight: HighlightSliceState;
|
|
169
|
+
}) => boolean;
|
|
170
|
+
export declare const selectHasAutoScrolled: (state: {
|
|
171
|
+
highlight: HighlightSliceState;
|
|
172
|
+
}) => boolean;
|
|
173
|
+
export declare const selectClickedIndicator: (state: {
|
|
174
|
+
highlight: HighlightSliceState;
|
|
175
|
+
}) => number;
|
|
176
|
+
export declare const selectCurrentAssetId: (state: {
|
|
177
|
+
highlight: HighlightSliceState;
|
|
178
|
+
}) => string;
|
|
179
|
+
export declare const selectCachedContent: (checkpointId: string, type: "browser" | "source") => (state: {
|
|
180
|
+
highlight: HighlightSliceState;
|
|
181
|
+
}) => string;
|
|
182
|
+
export declare const selectScrollPosition: (checkpointId: string) => (state: {
|
|
183
|
+
highlight: HighlightSliceState;
|
|
184
|
+
}) => {
|
|
185
|
+
browser: number;
|
|
186
|
+
source: number;
|
|
187
|
+
};
|
|
188
|
+
//# sourceMappingURL=highlightSlice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlightSlice.d.ts","sourceRoot":"","sources":["../../../src/store/slices/highlightSlice.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5C,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,kBAAkB,EAAE,UAAU,GAAG,IAAI,CAAC;IACtC,uCAAuC;IACvC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,4CAA4C;IAC5C,QAAQ,EAAE,QAAQ,CAAC;IACnB,sDAAsD;IACtD,iBAAiB,EAAE,OAAO,CAAC;IAC3B,sEAAsE;IACtE,qBAAqB,EAAE,MAAM,CAAC;IAC9B,iDAAiD;IACjD,eAAe,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,qBAAqB,EAAE,MAAM,CAAC;IAC9B,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC3C,wCAAwC;IACxC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrE,sCAAsC;IACtC,WAAW,EAAE,OAAO,CAAC;IACrB,0CAA0C;IAC1C,SAAS,EAAE,OAAO,C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,MAAM,mBAAmB,GAAI,cAAc,MAAM,EAAE,MAAM,SAAS,GAAG,QAAQ,MACjF,OAAO;IAAE,SAAS,EAAE,mBAAmB,CAAA;CAAE,WAKzC,CAAC;AAEJ,eAAO,MAAM,oBAAoB,GAAI,cAAc,MAAM,MACtD,OAAO;IAAE,SAAS,EAAE,mBAAmB,CAAA;CAAE;aAvUC,MAAM;YAAU,MAAM;CAwUW,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Redux Slices exports
|
|
3
|
+
*/
|
|
4
|
+
export { analysisSlice, startAnalysis, setAssetId, analysisCompleted, analysisFailed, resetAnalysis, updateAnalysisState, selectAnalysisState, selectAnalysisData, selectAssetId, selectIsAnalyzing, selectAnalysisError, selectAnalysisDuration, } from './analysisSlice';
|
|
5
|
+
export type { AnalysisSliceState } from './analysisSlice';
|
|
6
|
+
export { highlightSlice, selectCheckpoint, setViewMode, toggleShowAllHighlights, setShowAllHighlights, setCurrentHighlightIndex, nextHighlight, previousHighlight, setTotalHighlights, setVisibleHighlightIndex, cacheHighlight, clearExpiredCache, clearCache, saveScrollPosition, openModal, closeModal, setLoading as setHighlightLoading, setError as setHighlightError, resetHighlight, selectSelectedCheckpoint, selectViewMode, selectShowAllHighlights, selectCurrentHighlightIndex, selectTotalHighlights, selectVisibleHighlightIndex, selectHighlightCache, selectScrollPositions, selectIsModalOpen, selectIsHighlightLoading, selectHighlightError, selectCachedContent, selectScrollPosition, } from './highlightSlice';
|
|
7
|
+
export type { HighlightSliceState, ViewMode, HighlightCacheEntry } from './highlightSlice';
|
|
8
|
+
export { authSlice, setApiKey, setWebsiteId, setCredentials, setSessionToken, setRememberMe, acknowledgeStorageWarning, setAuthLoading, setAuthError, logout, resetAuth, hydrateFromStorage, selectApiKey, selectWebsiteId, selectIsAuthenticated, selectSessionType, selectAccessToken, selectRememberMe, selectAuthLoading, selectAuthError, selectStorageWarningAcknowledged, STORAGE_KEYS, } from './authSlice';
|
|
9
|
+
export type { AuthSliceState } from './authSlice';
|
|
10
|
+
export { aiSlice, updateSettings, setProvider, setOpenAIApiKey, setOpenAIModel, setTranslationProvider, openSettings, closeSettings, toggleSettings, startGeneration, generationCompleted, generationFailed, clearError as clearAIError, clearSummaries, clearSummary, resetAI, hydrateSettings, selectAISettings, selectAIProvider, selectAIEnabled, selectOpenAIApiKey, selectOpenAIModel, selectTranslationProvider, selectIsSettingsOpen, selectIsGenerating, selectGeneratingFor, selectAIError, selectAllSummaries, selectSummary, AI_STORAGE_KEYS, } from './aiSlice';
|
|
11
|
+
export type { AISliceState, AISettings, AISummary, AIProvider, TranslationProvider } from './aiSlice';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/slices/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,EACxB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,UAAU,IAAI,mBAAmB,EACjC,QAAQ,IAAI,iBAAiB,EAC7B,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,uBAAuB,EACvB,2BAA2B,EAC3B,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,mBAAmB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE3F,OAAO,EACL,SAAS,EACT,SAAS,EACT,YAAY,EACZ,cAAc,EACd,eAAe,EACf,aAAa,EACb,yBAAyB,EACzB,cAAc,EACd,YAAY,EACZ,MAAM,EACN,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gCAAgC,EAChC,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EACL,OAAO,EACP,cAAc,EACd,WAAW,EACX,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,IAAI,YAAY,EAC1B,cAAc,EACd,YAAY,EACZ,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,eAAe,GAChB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -2,21 +2,122 @@ import { default as React } from 'react';
|
|
|
2
2
|
export type AnalysisState = 'idle' | 'analyzing' | 'completed' | 'error';
|
|
3
3
|
export type AuthMode = 'props' | 'localStorage' | 'backend';
|
|
4
4
|
export type SessionType = 'direct' | 'backend';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Position for manual overlay offset configuration.
|
|
7
|
+
* Specifies from which edge the offset should be applied.
|
|
8
|
+
*/
|
|
9
|
+
export type OverlayOffsetPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
10
|
+
/**
|
|
11
|
+
* Configuration for overlay/toolbar detection and offset handling.
|
|
12
|
+
*
|
|
13
|
+
* Use this to configure how the DQM sidebar adapts to overlays like
|
|
14
|
+
* toolbars or other fixed elements on the page.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Manual offset for a 50px toolbar at the top
|
|
18
|
+
* overlayConfig: {
|
|
19
|
+
* manualOffset: {
|
|
20
|
+
* position: 'top',
|
|
21
|
+
* pixels: 50
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // Custom selector with iFrame content validation
|
|
27
|
+
* overlayConfig: {
|
|
28
|
+
* selector: 'iframe.my-toolbar',
|
|
29
|
+
* validateIframe: true
|
|
30
|
+
* }
|
|
31
|
+
*/
|
|
32
|
+
export interface OverlayConfig {
|
|
33
|
+
/**
|
|
34
|
+
* CSS selector for the overlay element to detect.
|
|
35
|
+
*
|
|
36
|
+
* Set to `null` or empty string to disable auto-detection.
|
|
37
|
+
*/
|
|
38
|
+
selector?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to validate iFrame elements by checking if contentWindow exists.
|
|
41
|
+
* Only applies when the detected element is an iFrame.
|
|
42
|
+
* Default: true
|
|
43
|
+
*/
|
|
44
|
+
validateIframe?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Polling interval in milliseconds for detecting overlay changes.
|
|
47
|
+
* Useful for cross-origin iFrames where MutationObserver can't detect internal changes.
|
|
48
|
+
* Set to 0 to disable polling.
|
|
49
|
+
* Default: 1000
|
|
50
|
+
*/
|
|
51
|
+
pollMs?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Manual offset configuration. Use this when auto-detection doesn't work,
|
|
54
|
+
* e.g., for iFrames that fill the whole screen but have smaller internal content.
|
|
55
|
+
*
|
|
56
|
+
* When set, this takes precedence over auto-detected values.
|
|
57
|
+
*/
|
|
58
|
+
manualOffset?: {
|
|
59
|
+
/**
|
|
60
|
+
* The edge from which to apply the offset.
|
|
61
|
+
*/
|
|
62
|
+
position: OverlayOffsetPosition;
|
|
63
|
+
/**
|
|
64
|
+
* The offset value in pixels.
|
|
65
|
+
*/
|
|
66
|
+
pixels: number;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export interface TranslationConfig {
|
|
70
|
+
/**
|
|
71
|
+
* Enable auto-translation by default (user can still toggle at runtime).
|
|
72
|
+
* Default: false
|
|
73
|
+
*/
|
|
74
|
+
enabledByDefault?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Translation compute budget in milliseconds.
|
|
77
|
+
* Default: 15000
|
|
78
|
+
*/
|
|
79
|
+
computeBudgetMs?: number;
|
|
11
80
|
}
|
|
12
81
|
export interface DQMConfig {
|
|
13
82
|
apiKey?: string;
|
|
14
83
|
websiteId?: string;
|
|
15
84
|
authBackendUrl?: string;
|
|
16
|
-
oauth2Config?: OAuth2Config;
|
|
17
85
|
useLocalStorage?: boolean;
|
|
18
86
|
disabled?: boolean;
|
|
87
|
+
disableLogout?: boolean;
|
|
19
88
|
apiEndpoint?: string;
|
|
89
|
+
shadowDomMode?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Configuration for overlay detection and offset handling.
|
|
92
|
+
*
|
|
93
|
+
* Use this to adapt the sidebar position to fixed overlays like
|
|
94
|
+
* preview bars, admin toolbars, or other fixed-position elements.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* // Disable overlay detection
|
|
98
|
+
* overlayConfig: { selector: null }
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* // Manual 50px offset from top
|
|
102
|
+
* overlayConfig: { manualOffset: { position: 'top', pixels: 50 } }
|
|
103
|
+
*
|
|
104
|
+
* @see OverlayConfig for all available options
|
|
105
|
+
*/
|
|
106
|
+
overlayConfig?: OverlayConfig;
|
|
107
|
+
/**
|
|
108
|
+
* Optional translation configuration for DQM API results.
|
|
109
|
+
*/
|
|
110
|
+
translation?: TranslationConfig;
|
|
111
|
+
/**
|
|
112
|
+
* Optional AI summary configuration.
|
|
113
|
+
*/
|
|
114
|
+
summary?: {
|
|
115
|
+
/**
|
|
116
|
+
* Timeout in milliseconds for summary generation.
|
|
117
|
+
* Default: 45000
|
|
118
|
+
*/
|
|
119
|
+
timeoutMs?: number;
|
|
120
|
+
};
|
|
20
121
|
}
|
|
21
122
|
export interface DQMSidebarProps {
|
|
22
123
|
open: boolean;
|
|
@@ -73,4 +174,5 @@ export interface AnalysisData {
|
|
|
73
174
|
totalErrors: number;
|
|
74
175
|
checkpoints: Checkpoint[];
|
|
75
176
|
}
|
|
177
|
+
export type GroupedCategories = Record<string, Checkpoint[]>;
|
|
76
178
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,CAAC;AAGzE,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,cAAc,GAAG,SAAS,CAAC;AAG5D,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,C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AM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAGD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAGD,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type JsonChatResult = {
|
|
2
|
+
content: string;
|
|
3
|
+
finishReason?: string | null;
|
|
4
|
+
};
|
|
5
|
+
export interface JsonChatClient {
|
|
6
|
+
/**
|
|
7
|
+
* Run a non-streaming chat completion that is expected to return JSON.
|
|
8
|
+
* Implementations may enforce JSON mode (e.g. response_format).
|
|
9
|
+
*/
|
|
10
|
+
chatJson: (opts: {
|
|
11
|
+
system: string;
|
|
12
|
+
user: string;
|
|
13
|
+
maxTokens: number;
|
|
14
|
+
schema?: string;
|
|
15
|
+
resetChat?: boolean;
|
|
16
|
+
signal?: AbortSignal;
|
|
17
|
+
}) => Promise<JsonChatResult>;
|
|
18
|
+
/** Optional: reset internal state (KV cache, etc.). */
|
|
19
|
+
reset?: (keepStats?: boolean) => Promise<void>;
|
|
20
|
+
/** Optional: interrupt an ongoing generation. */
|
|
21
|
+
interrupt?: () => void;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=aiJsonClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aiJsonClient.d.ts","sourceRoot":"","sources":["../../src/utils/aiJsonClient.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE;QACf,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,MAAM,CAAC,EAAE,WAAW,CAAC;KACtB,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAE9B,uDAAuD;IACvD,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/C,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenerateCategoryColors.d.ts","sourceRoot":"","sources":["../../../src/utils/colors/GenerateCategoryColors.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GenerateCategoryColors.d.ts","sourceRoot":"","sources":["../../../src/utils/colors/GenerateCategoryColors.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB,GAAI,YAAY,MAAM,EAAE,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CA0BlF,CAAC;AACF,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM;;;;CAenC,CAAC;AACF,eAAO,MAAM,oBAAoB,GAAI,SAAS,MAAM,0BA0BnD,CAAC;AACF,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,EAAE,gBAAe,MAAM,EAAO,KAAG;IAC9E,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CAmBhB,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger Utility
|
|
3
|
+
*
|
|
4
|
+
* Provides debug-toggleable logging to replace console.log statements.
|
|
5
|
+
* In production, only warnings and errors are shown unless debug mode is enabled.
|
|
6
|
+
*/
|
|
7
|
+
/** Log levels as const object (avoids enum syntax for erasableSyntaxOnly) */
|
|
8
|
+
export declare const LogLevel: {
|
|
9
|
+
readonly DEBUG: 0;
|
|
10
|
+
readonly INFO: 1;
|
|
11
|
+
readonly WARN: 2;
|
|
12
|
+
readonly ERROR: 3;
|
|
13
|
+
readonly NONE: 4;
|
|
14
|
+
};
|
|
15
|
+
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
16
|
+
/** Logger configuration */
|
|
17
|
+
interface LoggerConfig {
|
|
18
|
+
/** Current log level */
|
|
19
|
+
level: LogLevel;
|
|
20
|
+
/** Prefix for all log messages */
|
|
21
|
+
prefix: string;
|
|
22
|
+
/** Whether to include timestamps */
|
|
23
|
+
timestamps: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if debug mode is enabled via localStorage
|
|
27
|
+
*/
|
|
28
|
+
declare function isDebugEnabled(): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Logger object with level-specific methods
|
|
31
|
+
*/
|
|
32
|
+
export declare const logger: {
|
|
33
|
+
/**
|
|
34
|
+
* Log debug message (only in development or when debug mode is enabled)
|
|
35
|
+
*/
|
|
36
|
+
debug(...args: unknown[]): void;
|
|
37
|
+
/**
|
|
38
|
+
* Log info message
|
|
39
|
+
*/
|
|
40
|
+
info(...args: unknown[]): void;
|
|
41
|
+
/**
|
|
42
|
+
* Log warning message
|
|
43
|
+
*/
|
|
44
|
+
warn(...args: unknown[]): void;
|
|
45
|
+
/**
|
|
46
|
+
* Log error message
|
|
47
|
+
*/
|
|
48
|
+
error(...args: unknown[]): void;
|
|
49
|
+
/**
|
|
50
|
+
* Log with custom level
|
|
51
|
+
*/
|
|
52
|
+
log(level: LogLevel, ...args: unknown[]): void;
|
|
53
|
+
/**
|
|
54
|
+
* Create a group of related logs (collapsed in console)
|
|
55
|
+
*/
|
|
56
|
+
group(label: string): void;
|
|
57
|
+
/**
|
|
58
|
+
* End a log group
|
|
59
|
+
*/
|
|
60
|
+
groupEnd(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Log a table (useful for arrays and objects)
|
|
63
|
+
*/
|
|
64
|
+
table(data: unknown, columns?: string[]): void;
|
|
65
|
+
/**
|
|
66
|
+
* Time a operation
|
|
67
|
+
*/
|
|
68
|
+
time(label: string): void;
|
|
69
|
+
/**
|
|
70
|
+
* End timing and log duration
|
|
71
|
+
*/
|
|
72
|
+
timeEnd(label: string): void;
|
|
73
|
+
/**
|
|
74
|
+
* Configure logger
|
|
75
|
+
*/
|
|
76
|
+
configure(newConfig: Partial<LoggerConfig>): void;
|
|
77
|
+
/**
|
|
78
|
+
* Reset to default configuration
|
|
79
|
+
*/
|
|
80
|
+
reset(): void;
|
|
81
|
+
/**
|
|
82
|
+
* Enable debug mode (persists in localStorage)
|
|
83
|
+
*/
|
|
84
|
+
enableDebug(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Disable debug mode
|
|
87
|
+
*/
|
|
88
|
+
disableDebug(): void;
|
|
89
|
+
/**
|
|
90
|
+
* Check if debug mode is enabled
|
|
91
|
+
*/
|
|
92
|
+
isDebugEnabled: typeof isDebugEnabled;
|
|
93
|
+
/**
|
|
94
|
+
* Get current log level
|
|
95
|
+
*/
|
|
96
|
+
getLevel(): LogLevel;
|
|
97
|
+
/**
|
|
98
|
+
* Set log level
|
|
99
|
+
*/
|
|
100
|
+
setLevel(level: LogLevel): void;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Create a scoped logger with a custom prefix
|
|
104
|
+
*/
|
|
105
|
+
export declare function createLogger(scope: string): typeof logger;
|
|
106
|
+
export default logger;
|
|
107
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.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e,MAAM,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JsonChatClient } from './aiJsonClient';
|
|
2
|
+
export type OpenAIClientConfig = {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
model: string;
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const createOpenAIJsonClient: (config: OpenAIClientConfig) => JsonChatClient;
|
|
8
|
+
//# sourceMappingURL=openaiJsonClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openaiJsonClient.d.ts","sourceRoot":"","sources":["../../src/utils/openaiJsonClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,gBAAgB,CAAC;AAErE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AASF,eAAO,MAAM,sBAAsB,GAAI,QAAQ,kBAAkB,KAAG,cA8CnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitizeHtmlDocument.d.ts","sourceRoot":"","sources":["../../src/utils/sanitizeHtmlDocument.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,EAAE,OAAO;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,KAAG,MA8BtF,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Secure Storage Utility
|
|
3
|
+
*
|
|
4
|
+
* Provides secure credential storage with options for:
|
|
5
|
+
* - sessionStorage (default, cleared on browser close)
|
|
6
|
+
* - localStorage (opt-in with "Remember me", persists across sessions)
|
|
7
|
+
*
|
|
8
|
+
* Security considerations:
|
|
9
|
+
* - sessionStorage is preferred as credentials are cleared when browser closes
|
|
10
|
+
* - localStorage should only be used with explicit user consent ("Remember me")
|
|
11
|
+
* - Users should be warned about the risks of storing credentials in localStorage
|
|
12
|
+
*/
|
|
13
|
+
/** Storage keys for DQM credentials */
|
|
14
|
+
export declare const SECURE_STORAGE_KEYS: {
|
|
15
|
+
readonly apiKey: "dqm_apiKey";
|
|
16
|
+
readonly websiteId: "dqm_websiteID";
|
|
17
|
+
readonly rememberMe: "dqm_rememberMe";
|
|
18
|
+
readonly storageWarningAcknowledged: "dqm_storageWarningAcknowledged";
|
|
19
|
+
};
|
|
20
|
+
export type SecureStorageKey = keyof typeof SECURE_STORAGE_KEYS;
|
|
21
|
+
/**
|
|
22
|
+
* Check if "Remember me" is enabled
|
|
23
|
+
*/
|
|
24
|
+
export declare function isRememberMeEnabled(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Get a value from secure storage
|
|
27
|
+
* Checks sessionStorage first, then localStorage if Remember me is enabled
|
|
28
|
+
*/
|
|
29
|
+
export declare function getSecureItem(key: SecureStorageKey): string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Set a value in secure storage
|
|
32
|
+
* Uses sessionStorage by default, localStorage if Remember me is enabled
|
|
33
|
+
*/
|
|
34
|
+
export declare function setSecureItem(key: SecureStorageKey, value: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* Remove a value from both storages
|
|
37
|
+
*/
|
|
38
|
+
export declare function removeSecureItem(key: SecureStorageKey): void;
|
|
39
|
+
/**
|
|
40
|
+
* Set the Remember me preference
|
|
41
|
+
* When disabling, clears credentials from localStorage
|
|
42
|
+
*/
|
|
43
|
+
export declare function setRememberMe(enabled: boolean): void;
|
|
44
|
+
/**
|
|
45
|
+
* Check if user has acknowledged the storage warning
|
|
46
|
+
*/
|
|
47
|
+
export declare function hasAcknowledgedStorageWarning(): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Set that user has acknowledged the storage warning
|
|
50
|
+
*/
|
|
51
|
+
export declare function acknowledgeStorageWarning(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Clear all DQM credentials from both storages
|
|
54
|
+
*/
|
|
55
|
+
export declare function clearAllCredentials(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Migrate credentials from localStorage to sessionStorage
|
|
58
|
+
* Call this when user disables "Remember me"
|
|
59
|
+
*/
|
|
60
|
+
export declare function migrateToSessionOnly(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Get all stored credentials
|
|
63
|
+
* Returns null for each missing credential
|
|
64
|
+
*/
|
|
65
|
+
export declare function getCredentials(): {
|
|
66
|
+
apiKey: string | null;
|
|
67
|
+
websiteId: string | null;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Set all credentials at once
|
|
71
|
+
*/
|
|
72
|
+
export declare function setCredentials(apiKey: string, websiteId: string): void;
|
|
73
|
+
/**
|
|
74
|
+
* Validate that credentials exist and are non-empty
|
|
75
|
+
*/
|
|
76
|
+
export declare function hasValidCredentials(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Validate API key encoding (ASCII-only for HTTP headers)
|
|
79
|
+
*/
|
|
80
|
+
export declare function validateApiKeyEncoding(apiKey: string): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Storage warning message for users
|
|
83
|
+
*/
|
|
84
|
+
export declare const STORAGE_WARNING_MESSAGE: string;
|
|
85
|
+
/**
|
|
86
|
+
* Hook to initialize storage from existing localStorage/sessionStorage
|
|
87
|
+
* Returns credentials if found
|
|
88
|
+
*/
|
|
89
|
+
export declare function hydrateCredentials(): {
|
|
90
|
+
apiKey: string | null;
|
|
91
|
+
websiteId: string | null;
|
|
92
|
+
rememberMe: boolean;
|
|
93
|
+
storageWarningAcknowledged: boolean;
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=secureStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secureStorage.d.ts","sourceRoot":"","sources":["../../src/utils/secureStorage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,uCAAuC;AACvC,eAAO,MAAM,mB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CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,0BAA0B,EAAE,OAAO,CAAC;CACrC,CAOA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/utils/storage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/utils/storage.ts"],"names":[],"mappings":"AAkCA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAU,KAAK,MAAM,EAAE,OAAO,MAAM,KAAG,OAAO,CAAC,IAAI,CAehF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAU,KAAK,MAAM,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAe5E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAU,KAAK,MAAM,KAAG,OAAO,CAAC,IAAI,CAerE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAU,KAAK,MAAM,KAAG,OAAO,CAAC,MAAM,CAMhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,MAQ3C,CAAC"}
|