@kandiforge/kandi-office 0.16.151 → 0.16.153
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/dist/RustRenderer.js +1 -1
- package/dist/forms/storage/TauriFormStorage.js +1 -1
- package/dist/forms/storage/TauriThemeStorage.js +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/logger.js +1 -1
- package/dist/services/TauriDocumentService.js +1 -1
- package/dist/styles.css +15 -0
- package/dist/viewers/DocxViewer.js +2 -2
- package/dist/viewers/MarkdownViewer.js +1 -1
- package/dist/viewers/pdf/PdfViewer.js +1 -1
- package/dist/viewers/pdf/components/PdfFilmstrip.js +1 -1
- package/dist/viewers/pdf/components/PdfToolbar.js +1 -1
- package/dist/viewers/pdf/components/views/BookView.js +1 -1
- package/dist/viewers/pdf/components/views/ContinuousScrollView.js +1 -1
- package/dist/viewers/pdf/components/views/SinglePageView.js +1 -1
- package/dist/viewers/pdf/components/views/ThumbnailGridView.js +1 -1
- package/dist/viewers/pdf/hooks/useFileWatcher.js +1 -1
- package/package.json +8 -1
- package/dist/ai-sidebar.html +0 -18
- package/dist/assets/AISidebar-CQ5fP3eJ.css +0 -1
- package/dist/assets/AISidebar-DrYmsI3P.js +0 -1
- package/dist/assets/FileLogger-C_Ag2mq_.js +0 -5
- package/dist/assets/HelpSidebar-CE2_097f.js +0 -1
- package/dist/assets/HelpSidebar-CJCALl_s.css +0 -1
- package/dist/assets/LoggerAdapter-DkeqR1k8.js +0 -1
- package/dist/assets/aiSidebar-C7jRWkNR.js +0 -2
- package/dist/assets/event-BQOPLiga.js +0 -1
- package/dist/assets/helpWindow-CXeq0Xvl.js +0 -2
- package/dist/assets/index-BCQcZBWV.js +0 -9
- package/dist/assets/index-D7-2e4s_.css +0 -1
- package/dist/assets/kandi-agent-icon-C6wMIunM.png +0 -0
- package/dist/assets/kandi-profile-icon-DR9b6TxX.png +0 -0
- package/dist/assets/kandi-settings-icon-B7gXEjZE.png +0 -0
- package/dist/assets/kandi_office_wasm-DOF-sjXG.js +0 -2
- package/dist/assets/kandi_office_wasm_bg-PSbcZKTi.wasm +0 -0
- package/dist/assets/logs-C00nBFHe.js +0 -2
- package/dist/assets/logs-CteYkMat.css +0 -1
- package/dist/assets/main-BDYXdlok.js +0 -323
- package/dist/assets/main-CQ6LhAcC.css +0 -1
- package/dist/assets/pdf-DUPavs6M.js +0 -12
- package/dist/assets/pdf.worker.min-yatZIOMy.mjs +0 -21
- package/dist/assets/preload-helper-BXl3LOEh.js +0 -1
- package/dist/assets/webview-B8guzubV.js +0 -1
- package/dist/assets/webviewWindow-BSH5q3Fg.js +0 -1
- package/dist/help-window.html +0 -18
- package/dist/index.html +0 -22
- package/dist/kandi-icon.png +0 -0
- package/dist/office-context-map.json +0 -47
- package/dist/src/log-viewer.html +0 -16
package/dist/RustRenderer.js
CHANGED
|
@@ -11,7 +11,7 @@ export function RustRenderer({ slideIndex, slideJson, width = 960, height = 540,
|
|
|
11
11
|
try {
|
|
12
12
|
let json = slideJson;
|
|
13
13
|
if (!json) {
|
|
14
|
-
const { invoke } = await import('@tauri-apps/api/core');
|
|
14
|
+
const { invoke } = await new Function('m', 'return import(m)')('@tauri-apps/api/core');
|
|
15
15
|
json = await invoke('pptx_get_slide_json', { slideIndex });
|
|
16
16
|
}
|
|
17
17
|
const service = getDocumentService();
|
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,6 @@ export { initWasm, isWasmReady } from './wasm/index';
|
|
|
9
9
|
export { extractPptx, parsePptxSlides, renderSlideToCanvas, parseSlideJson } from './wasm/pptx';
|
|
10
10
|
export { extractDocx, parseDocx, processDocx, renderDocxPage, layoutDocx } from './wasm/docx';
|
|
11
11
|
export type { Slide, Shape, ShapeType, Position, Size, TextStyle, Background, Color, Fill, GradientFill, Stroke, TextParagraph, TextRun, ChartData, Theme, DocxDocument, DocxParagraph, DocxRun, LayoutPage, PptxExtractedData, DocxExtractedData, } from './wasm/types';
|
|
12
|
-
export * from './forms';
|
|
13
|
-
export * from './forms-builder';
|
|
14
12
|
export { RustRenderer } from './RustRenderer';
|
|
15
|
-
export declare const VERSION = "0.16.
|
|
13
|
+
export declare const VERSION = "0.16.153";
|
|
16
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAGnD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAA;AAC7F,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAGzI,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC/F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG7F,YAAY,EACV,KAAK,EACL,KAAK,EACL,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,UAAU,EACV,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,aAAa,EACb,OAAO,EACP,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,OAAO,EACP,UAAU,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,cAAc,CAAA;AAGrB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAGnD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAA;AAC7F,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAGzI,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC/F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG7F,YAAY,EACV,KAAK,EACL,KAAK,EACL,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,UAAU,EACV,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,aAAa,EACb,OAAO,EACP,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,OAAO,EACP,UAAU,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAG7C,eAAO,MAAM,OAAO,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -5,8 +5,6 @@ export { getDocumentService, resetDocumentService } from './services/documentSer
|
|
|
5
5
|
export { initWasm, isWasmReady } from './wasm/index';
|
|
6
6
|
export { extractPptx, parsePptxSlides, renderSlideToCanvas, parseSlideJson } from './wasm/pptx';
|
|
7
7
|
export { extractDocx, parseDocx, processDocx, renderDocxPage, layoutDocx } from './wasm/docx';
|
|
8
|
-
export * from './forms';
|
|
9
|
-
export * from './forms-builder';
|
|
10
8
|
export { RustRenderer } from './RustRenderer';
|
|
11
|
-
export const VERSION = '0.16.
|
|
9
|
+
export const VERSION = '0.16.153';
|
|
12
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAGnD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAA;AAI7F,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC/F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AA4B7F,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAGnD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAA;AAI7F,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC/F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AA4B7F,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAG7C,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAA"}
|
package/dist/logger.js
CHANGED
|
@@ -15,7 +15,7 @@ export var LogCategory;
|
|
|
15
15
|
})(LogCategory || (LogCategory = {}));
|
|
16
16
|
async function tryInvoke(cmd, args) {
|
|
17
17
|
try {
|
|
18
|
-
const { invoke } = await import('@tauri-apps/api/core');
|
|
18
|
+
const { invoke } = await new Function('m', 'return import(m)')('@tauri-apps/api/core');
|
|
19
19
|
await invoke(cmd, args);
|
|
20
20
|
}
|
|
21
21
|
catch {
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* Auto-generated: all @kandiforge/kandi-office component styles */
|
|
2
|
+
@import './forms/css/index.css';
|
|
3
|
+
@import './forms/css/kandi-forms.css';
|
|
4
|
+
@import './forms/css/themes/bauhaus.css';
|
|
5
|
+
@import './forms/css/themes/blue-rider.css';
|
|
6
|
+
@import './forms/css/themes/composition-viii.css';
|
|
7
|
+
@import './forms/css/themes/several-circles.css';
|
|
8
|
+
@import './forms/css/themes/yellow-red-blue.css';
|
|
9
|
+
@import './viewers/DocxViewer.css';
|
|
10
|
+
@import './viewers/MarkdownViewer.css';
|
|
11
|
+
@import './viewers/XlsxViewer.css';
|
|
12
|
+
@import './viewers/pdf/PdfViewer.css';
|
|
13
|
+
@import './viewers/pdf/components/PdfFilmstrip.css';
|
|
14
|
+
@import './viewers/pdf/components/PdfToolbar.css';
|
|
15
|
+
@import './viewers/pdf/components/views/ViewStyles.css';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState, useRef } from 'react';
|
|
3
3
|
import { getDocumentService } from '../services/documentServiceRegistry';
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
export function DocxViewer({ fileData, filePath } = {}) {
|
|
6
6
|
const [paragraphs, setParagraphs] = useState([]);
|
|
7
7
|
const [tables, setTables] = useState([]);
|
|
@@ -50,7 +50,7 @@ export function DocxViewer({ fileData, filePath } = {}) {
|
|
|
50
50
|
setTables([]);
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
|
-
const invoke = (await import('@tauri-apps/api/core')).invoke;
|
|
53
|
+
const invoke = (await new Function('m', 'return import(m)')('@tauri-apps/api/core')).invoke;
|
|
54
54
|
const structureData = await invoke('docx_get_structure', {});
|
|
55
55
|
setStructure(structureData);
|
|
56
56
|
const paraData = await invoke('docx_get_paragraphs', {});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState, useMemo } from 'react';
|
|
3
3
|
import { getDocumentService } from '../services/documentServiceRegistry';
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
export function MarkdownViewer({ fileData, filePath } = {}) {
|
|
6
6
|
const [content, setContent] = useState('');
|
|
7
7
|
const [headings, setHeadings] = useState([]);
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { useState, useCallback, useEffect, useRef, useMemo } from 'react';
|
|
3
3
|
import { usePdfDocument, usePdfNavigation, useZoom, useFileWatcher } from './hooks';
|
|
4
4
|
import { PdfToolbar, PdfFilmstrip, SinglePageView, BookView, ContinuousScrollView, ThumbnailGridView, } from './components';
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
export function PdfViewer({ path, fileData, initialViewMode = 'single', initialZoom = 'fit-width', initialPage = 0, enableFileWatcher = true, onPageChange, onViewModeChange, className, }) {
|
|
7
7
|
const [viewMode, setViewMode] = useState(initialViewMode);
|
|
8
8
|
const containerRef = useRef(null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
export function PdfFilmstrip({ totalPages, currentPage, thumbnails, onSelectPage, isLoading, }) {
|
|
5
5
|
const containerRef = useRef(null);
|
|
6
6
|
const activeRef = useRef(null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
const ViewModeIcons = {
|
|
4
4
|
single: (_jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: _jsx("rect", { x: "4", y: "3", width: "16", height: "18", rx: "2" }) })),
|
|
5
5
|
book: (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("path", { d: "M2 3h6a4 4 0 014 4v14a3 3 0 00-3-3H2z" }), _jsx("path", { d: "M22 3h-6a4 4 0 00-4 4v14a3 3 0 013-3h7z" })] })),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useCallback, forwardRef, useState } from 'react';
|
|
3
3
|
import HTMLFlipBook from 'react-pageflip';
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
const BookPage = forwardRef(({ pageNumber, rendered, width, height }, ref) => {
|
|
6
6
|
return (_jsx("div", { ref: ref, className: "pdf-book-page", style: { width, height }, children: rendered ? (_jsx("img", { src: rendered.dataUri, alt: `Page ${pageNumber + 1}`, style: {
|
|
7
7
|
width: '100%',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useCallback } from 'react';
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
export function ContinuousScrollView({ currentPage, totalPages, scale, renderedPages, renderPage, goToPage, pageInfo, }) {
|
|
5
5
|
const containerRef = useRef(null);
|
|
6
6
|
const pageRefs = useRef(new Map());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
export function SinglePageView({ currentPage, scale, renderedPages, renderPage, pageInfo, }) {
|
|
5
5
|
const baseDpi = 150;
|
|
6
6
|
const targetDpi = Math.max(72, Math.round(baseDpi * scale));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
export function ThumbnailGridView({ currentPage, totalPages, renderedPages, renderPage, goToPage, onSwitchToSinglePage, }) {
|
|
5
5
|
useEffect(() => {
|
|
6
6
|
const renderBatch = async () => {
|
|
@@ -34,7 +34,7 @@ export function useFileWatcher(options = {}) {
|
|
|
34
34
|
let unlisten = null;
|
|
35
35
|
const startWatching = async () => {
|
|
36
36
|
try {
|
|
37
|
-
const { listen } = await import('@tauri-apps/api/event');
|
|
37
|
+
const { listen } = await new Function('m', 'return import(m)')('@tauri-apps/api/event');
|
|
38
38
|
setIsWatching(true);
|
|
39
39
|
unlisten = await listen('pdf-file-changed', (event) => {
|
|
40
40
|
if (event.payload.path === path) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kandiforge/kandi-office",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.153",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "AbstractClass, Inc. <admin@abstractclass.net>",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"types": "./dist/wasm/index.d.ts",
|
|
26
26
|
"import": "./dist/wasm/index.js"
|
|
27
27
|
},
|
|
28
|
+
"./styles.css": "./dist/styles.css",
|
|
28
29
|
"./dist/*": "./dist/*",
|
|
29
30
|
"./package.json": "./package.json"
|
|
30
31
|
},
|
|
@@ -48,9 +49,15 @@
|
|
|
48
49
|
"react": "^18.0.0 || ^19.0.0",
|
|
49
50
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
50
51
|
"@mui/material": "^5.14.0 || ^6.0.0 || ^7.0.0",
|
|
52
|
+
"@mui/icons-material": "^5.14.0 || ^6.0.0 || ^7.0.0",
|
|
51
53
|
"@emotion/react": "^11.11.0",
|
|
52
54
|
"@emotion/styled": "^11.11.0"
|
|
53
55
|
},
|
|
56
|
+
"peerDependenciesMeta": {
|
|
57
|
+
"@mui/icons-material": {
|
|
58
|
+
"optional": true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
54
61
|
"dependencies": {
|
|
55
62
|
"jszip": "^3.10.1",
|
|
56
63
|
"marked": "^12.0.0",
|
package/dist/ai-sidebar.html
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/png" href="/kandi-icon.png" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>AI Coding Assistant</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/aiSidebar-C7jRWkNR.js"></script>
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/assets/index-BCQcZBWV.js">
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/preload-helper-BXl3LOEh.js">
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/AISidebar-DrYmsI3P.js">
|
|
12
|
-
<link rel="stylesheet" crossorigin href="/assets/index-D7-2e4s_.css">
|
|
13
|
-
<link rel="stylesheet" crossorigin href="/assets/AISidebar-CQ5fP3eJ.css">
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<div id="ai-sidebar-root"></div>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.ai-sidebar{position:fixed;background:linear-gradient(180deg,var(--surface) 0%,var(--background) 100%);display:flex;flex-direction:column;transition:all .3s cubic-bezier(.4,0,.2,1);z-index:1000;box-shadow:-4px 0 20px #0000004d}.ai-sidebar.standalone{position:relative;width:100%!important;height:100%!important;inset:0!important;transition:none;box-shadow:none;border:none}.ai-sidebar-right{right:-420px;top:0;bottom:0;width:420px;border-left:1px solid rgba(255,255,255,.1)}.ai-sidebar-right.open{right:0}.ai-sidebar-left{left:-420px;top:0;bottom:0;width:420px;border-right:1px solid rgba(255,255,255,.1);box-shadow:4px 0 20px #0000004d}.ai-sidebar-left.open{left:0}.ai-sidebar-bottom{left:0;right:0;bottom:-300px;height:300px;border-top:1px solid rgba(255,255,255,.1);box-shadow:0 -4px 20px #0000004d}.ai-sidebar-bottom.open{bottom:0}.ai-sidebar-detached{right:-420px;top:60px;bottom:60px;width:420px;border:1px solid rgba(255,255,255,.2);border-radius:8px;box-shadow:0 8px 32px #00000080}.ai-sidebar-detached.open{right:20px}.ai-sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem;background:#ffffff0d;border-bottom:1px solid rgba(255,255,255,.1)}.ai-sidebar.standalone .ai-sidebar-header{padding-left:80px;-webkit-app-region:drag}.ai-sidebar.standalone .ai-sidebar-header button,.ai-sidebar.standalone .ai-sidebar-header input,.ai-sidebar.standalone .ai-sidebar-header select,.ai-sidebar.standalone .ai-sidebar-header a,.ai-sidebar.standalone .ai-sidebar-header .ai-sidebar-position-menu{-webkit-app-region:no-drag}.ai-sidebar-title{display:flex;align-items:center;gap:.75rem;font-weight:600;font-size:.95rem;color:var(--text-primary)}.ai-sidebar-title svg{color:var(--accent-bright);animation:pulse 2s ease-in-out infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.6}}.ai-sidebar-controls{display:flex;align-items:center;gap:.5rem}.ai-sidebar-position-menu{position:relative}.ai-sidebar-menu-btn,.ai-sidebar-close{background:transparent;border:none;color:var(--text-muted);cursor:pointer;padding:.5rem;border-radius:4px;display:flex;align-items:center;justify-content:center;transition:all .2s}.ai-sidebar-menu-btn:hover,.ai-sidebar-close:hover{background:#ffffff1a;color:var(--text-primary)}.ai-position-dropdown{position:absolute;top:calc(100% + .5rem);right:0;background:var(--surface-elevated);border:1px solid var(--border-default);border-radius:6px;padding:.25rem;min-width:140px;box-shadow:0 4px 12px #00000080;z-index:1001}.ai-position-dropdown button{width:100%;padding:.5rem .75rem;background:transparent;border:none;color:var(--text-primary);cursor:pointer;border-radius:4px;display:flex;align-items:center;gap:.5rem;font-size:.875rem;transition:all .15s;text-align:left}.ai-position-dropdown button:hover{background:#00d4ff26;color:var(--accent-bright)}.ai-position-dropdown button span{font-size:1.1rem;width:20px;text-align:center}.ai-sidebar-messages{flex:1;overflow-y:auto;padding:1.5rem;display:flex;flex-direction:column;gap:1.25rem}.ai-sidebar-messages::-webkit-scrollbar{width:6px}.ai-sidebar-messages::-webkit-scrollbar-track{background:transparent}.ai-sidebar-messages::-webkit-scrollbar-thumb{background:#fff3;border-radius:3px}.ai-sidebar-messages::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.ai-sidebar-empty{text-align:center;color:var(--text-muted);padding:2rem 1rem}.ai-sidebar-empty p:first-child{font-size:1.1rem;margin-bottom:1.5rem;color:var(--text-secondary)}.ai-sidebar-empty ul{list-style:none;padding:0;margin:1rem 0 0;text-align:left}.ai-sidebar-empty li{padding:.5rem 0 .5rem 1.5rem;position:relative}.ai-sidebar-empty li:before{content:"→";position:absolute;left:0;color:var(--accent-bright)}.ai-message{display:flex;gap:.75rem;animation:slideIn .3s ease-out}@keyframes slideIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.ai-message-avatar{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.2rem;flex-shrink:0;background:#ffffff1a}.ai-message.user .ai-message-avatar{background:linear-gradient(135deg,#667eea,#764ba2)}.ai-message.assistant .ai-message-avatar{background:linear-gradient(135deg,#00d4ff,#0090ff)}.ai-message-content{flex:1;background:#ffffff0d;padding:.875rem 1rem;border-radius:12px;font-size:.9rem;line-height:1.6;color:var(--text-primary);word-wrap:break-word}.ai-message.user .ai-message-content{background:#667eea26;border:1px solid rgba(102,126,234,.3)}.ai-message.assistant .ai-message-content{background:#00d4ff14;border:1px solid rgba(0,212,255,.2)}.ai-loading{display:flex;gap:.4rem;padding:1rem}.ai-loading span{width:8px;height:8px;background:var(--accent-bright);border-radius:50%;animation:bounce 1.4s ease-in-out infinite}.ai-loading span:nth-child(1){animation-delay:-.32s}.ai-loading span:nth-child(2){animation-delay:-.16s}@keyframes bounce{0%,80%,to{transform:scale(.6);opacity:.5}40%{transform:scale(1);opacity:1}}.ai-sidebar-input{position:sticky;bottom:0;padding:1.25rem;background:#0000004d;backdrop-filter:blur(10px);border-top:1px solid rgba(255,255,255,.1);display:flex;gap:.75rem;z-index:10}.ai-sidebar-input textarea{flex:1;background:#ffffff0d;border:1px solid rgba(255,255,255,.15);border-radius:8px;padding:.875rem;color:var(--text-primary);font-size:.9rem;font-family:inherit;resize:none;outline:none;transition:all .2s}.ai-sidebar-input textarea:focus{border-color:var(--accent-bright);background:#ffffff14;box-shadow:0 0 0 2px #00d4ff1a}.ai-sidebar-input textarea::placeholder{color:var(--text-muted)}.ai-sidebar-input textarea:disabled{opacity:.5;cursor:not-allowed}.ai-sidebar-input button{background:linear-gradient(135deg,#00d4ff,#0090ff);border:none;border-radius:8px;width:44px;height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#fff;transition:all .2s;flex-shrink:0}.ai-sidebar-input button:hover:not(:disabled){transform:scale(1.05);box-shadow:0 4px 12px #00d4ff66}.ai-sidebar-input button:active:not(:disabled){transform:scale(.95)}.ai-sidebar-input button:disabled{opacity:.4;cursor:not-allowed}.ai-sidebar-input button svg{transform:rotate(45deg)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,j as s,i as f}from"./index-BCQcZBWV.js";function M({isOpen:p,onToggle:v,position:g,onPositionChange:t}){const[l,d]=o.useState([]),[n,x]=o.useState(""),[r,j]=o.useState(!1),[u,a]=o.useState(!1),m=async()=>{if(!n.trim()||r)return;const e={role:"user",content:n};d(i=>[...i,e]),x(""),j(!0);try{const c={role:"assistant",content:await f("ai_code_assist",{message:n,context:l})};d(h=>[...h,c])}catch(i){console.error("AI assist error:",i);const c={role:"assistant",content:`Error: ${i}`};d(h=>[...h,c])}finally{j(!1)}},b=e=>{e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),m())},k=typeof window<"u"&&window.location.pathname.includes("ai-sidebar");return s.jsxs("div",{className:`ai-sidebar ${p?"open":""} ${k?"standalone":`ai-sidebar-${g}`}`,children:[s.jsxs("div",{className:"ai-sidebar-header",children:[s.jsxs("div",{className:"ai-sidebar-title",children:[s.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})}),s.jsx("span",{children:"Kandi Vibe"})]}),s.jsxs("div",{className:"ai-sidebar-controls",children:[s.jsxs("div",{className:"ai-sidebar-position-menu",children:[s.jsx("button",{className:"ai-sidebar-menu-btn",onClick:()=>a(!u),title:"Change position",children:s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),u&&s.jsxs("div",{className:"ai-position-dropdown",children:[s.jsxs("button",{onClick:()=>{t("right"),a(!1)},children:[s.jsx("span",{children:"→"})," Right"]}),s.jsxs("button",{onClick:()=>{t("left"),a(!1)},children:[s.jsx("span",{children:"←"})," Left"]}),s.jsxs("button",{onClick:()=>{t("bottom"),a(!1)},children:[s.jsx("span",{children:"↓"})," Bottom"]}),s.jsxs("button",{onClick:()=>{t("detached"),a(!1)},children:[s.jsx("span",{children:"⊡"})," Detached"]})]})]}),s.jsx("button",{className:"ai-sidebar-close",onClick:v,title:"Close sidebar",children:s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),s.jsxs("div",{className:"ai-sidebar-messages",children:[l.length===0&&s.jsxs("div",{className:"ai-sidebar-empty",children:[s.jsx("p",{children:"👋 Hi! I'm your AI coding assistant."}),s.jsx("p",{children:"I can help you with:"}),s.jsxs("ul",{children:[s.jsx("li",{children:"Editing slide content"}),s.jsx("li",{children:"Formatting presentations"}),s.jsx("li",{children:"Document analysis"}),s.jsx("li",{children:"Code generation"})]})]}),l.map((e,i)=>s.jsxs("div",{className:`ai-message ${e.role}`,children:[s.jsx("div",{className:"ai-message-avatar",children:e.role==="user"?"👤":"🤖"}),s.jsx("div",{className:"ai-message-content",children:e.content})]},i)),r&&s.jsxs("div",{className:"ai-message assistant",children:[s.jsx("div",{className:"ai-message-avatar",children:"🤖"}),s.jsxs("div",{className:"ai-message-content ai-loading",children:[s.jsx("span",{}),s.jsx("span",{}),s.jsx("span",{})]})]})]}),s.jsxs("div",{className:"ai-sidebar-input",children:[s.jsx("textarea",{value:n,onChange:e=>x(e.target.value),onKeyDown:b,placeholder:"Ask me anything about this document...",rows:3,disabled:r}),s.jsx("button",{onClick:m,disabled:r||!n.trim(),children:s.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"})})})]})]})}export{M as A};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{_ as y}from"./preload-helper-BXl3LOEh.js";var p={};let s,n,d;const c=typeof window>"u";c&&(s=require("fs"),n=require("path"),d=require("os"));class h{static instance;logStream=null;currentLogFile="";logDirectory="";memoryBuffer=[];maxMemoryBuffer=100;maxFileSize=10*1024*1024;maxFiles=5;currentFileSize=0;writeQueue=[];writeTimer=null;batchWriteInterval=100;listeners=[];currentLogLevel="INFO";constructor(){c&&(this.initializeLogDirectory(),this.initializeLogFile(),typeof process<"u"&&process.on&&(process.on("exit",()=>this.destroy()),process.on("SIGINT",()=>this.destroy()),process.on("SIGTERM",()=>this.destroy()),process.on("uncaughtException",e=>{this.error("General","Uncaught exception",e),this.destroy()})))}static getInstance(){return h.instance||(h.instance=new h),h.instance}setLogLevel(e){this.currentLogLevel=e,this.info("General","Log level changed",{newLevel:e})}getLogLevel(){return this.currentLogLevel}shouldLog(e){const t={DEBUG:0,INFO:1,WARNING:2,ERROR:3,CRITICAL:4};return t[e]>=t[this.currentLogLevel]}serializeDetails(e){if(e){if(e instanceof Error)return{name:e.name,message:e.message,stack:e.stack,...e};if(typeof e=="object"&&e!==null){const t={};for(const[r,i]of Object.entries(e))i instanceof Error?t[r]={name:i.name,message:i.message,stack:i.stack,...i}:t[r]=i;return t}return e}}initializeLogDirectory(){try{if(c){const e=d.homedir(),t="kandiforge";process.platform==="darwin"?this.logDirectory=n.join(e,"Library","Application Support",t,"logs"):process.platform==="win32"?this.logDirectory=n.join(p.APPDATA||e,t,"logs"):this.logDirectory=n.join(e,".config",t,"logs"),s.mkdirSync(this.logDirectory,{recursive:!0})}else this.logDirectory=""}catch(e){if(c){console.error("Failed to initialize log directory:",e),this.logDirectory=n.join(d.tmpdir(),"kandiforge-logs");try{s.mkdirSync(this.logDirectory,{recursive:!0})}catch(t){console.error("Failed to create temp log directory:",t)}}}}initializeLogFile(){if(!(!c||!this.logDirectory))try{const e=new Date().toISOString().replace(/[:.]/g,"-");this.currentLogFile=n.join(this.logDirectory,`kandiforge-${e}.log`),this.logStream=s.createWriteStream(this.currentLogFile,{flags:"a",encoding:"utf8",highWaterMark:64*1024}),this.logStream.on("error",t=>{console.error("Log stream error:",t)});try{const t=s.statSync(this.currentLogFile);this.currentFileSize=t.size}catch{this.currentFileSize=0}this.logStream.write(JSON.stringify({type:"session_start",timestamp:new Date().toISOString(),pid:process.pid,platform:process.platform,version:process.versions})+`
|
|
2
|
-
`)}catch(e){console.error("Failed to initialize log file:",e)}}log(e,t,r,i,o){if(!this.shouldLog(e))return;const m=new Date,f={id:`${m.getTime()}-${t}-${Math.random().toString(36).substr(2,9)}`,timestamp:m,level:e,category:t,message:r,details:i,source:o||this.getCallSource()};if(c)this.writeQueue.push(f),this.scheduleWrite();else{const g=this.serializeDetails(i);y(async()=>{const{getLoggerAdapter:l}=await import("./LoggerAdapter-DkeqR1k8.js");return{getLoggerAdapter:l}},[]).then(({getLoggerAdapter:l})=>{l().writeLog(e.toString(),t.toString(),r,g,f.source).catch(()=>{})}).catch(()=>{console.log(`[${e}] [${t}] ${r}`,g||"")})}this.memoryBuffer.push(f),this.memoryBuffer.length>this.maxMemoryBuffer&&this.memoryBuffer.shift(),queueMicrotask(()=>{this.listeners.forEach(g=>{try{g(f)}catch(l){console.error("Log listener error:",l)}})})}scheduleWrite(){c&&!this.writeTimer&&(this.writeTimer=setTimeout(()=>{this.flushWriteQueue(),this.writeTimer=null},this.batchWriteInterval))}flushWriteQueue(){if(!(this.writeQueue.length===0||!this.logStream))try{const r=this.writeQueue.splice(0).map(o=>JSON.stringify({id:o.id,t:o.timestamp.toISOString(),l:o.level,c:o.category,m:o.message,d:this.serializeDetails(o.details),s:o.source})+`
|
|
3
|
-
`).join(""),i=Buffer.byteLength(r);this.currentFileSize+i>this.maxFileSize&&this.rotateLogFile(),this.logStream.write(r),this.currentFileSize+=i}catch(e){console.error("Failed to flush write queue:",e)}}rotateLogFile(){try{this.logStream&&this.logStream.end(),s.readdirSync(this.logDirectory).filter(t=>t.startsWith("kandiforge-")&&t.endsWith(".log")).sort().reverse().slice(this.maxFiles-1).forEach(t=>{try{s.unlinkSync(n.join(this.logDirectory,t))}catch(r){console.error(`Failed to delete old log file ${t}:`,r)}}),this.initializeLogFile()}catch(e){console.error("Failed to rotate log file:",e)}}debug(e,t,r){this.log("DEBUG",e,t,r)}info(e,t,r){this.log("INFO",e,t,r)}warning(e,t,r){this.log("WARNING",e,t,r)}error(e,t,r){this.log("ERROR",e,t,r)}critical(e,t,r){this.log("CRITICAL",e,t,r)}getLogs(e){let t=[...this.memoryBuffer];return e?.level&&(t=t.filter(r=>r.level===e.level)),e?.category&&(t=t.filter(r=>r.category===e.category)),e?.limit&&(t=t.slice(-e.limit)),t}async getLogsFromDisk(e){const t=[],r=e?.limit||1e3;if(!c||!s||!this.logDirectory)return t;try{const i=s.readdirSync(this.logDirectory).filter(o=>o.startsWith("kandiforge-")&&o.endsWith(".log")).sort().reverse();for(const o of i){if(t.length>=r)break;const m=n.join(this.logDirectory,o),g=s.readFileSync(m,"utf8").split(`
|
|
4
|
-
`).filter(l=>l.trim());for(const l of g.reverse()){if(t.length>=r)break;try{const a=JSON.parse(l);if(a.type==="session_start")continue;const u={timestamp:new Date(a.t),level:a.l,category:a.c,message:a.m,details:a.d,source:a.s};if(e?.level&&u.level!==e.level||e?.category&&u.category!==e.category||e?.startDate&&u.timestamp<e.startDate||e?.endDate&&u.timestamp>e.endDate)continue;t.push(u)}catch{}}}}catch(i){console.error("Failed to read logs from disk:",i)}return t}clearLogs(){if(this.memoryBuffer=[],c&&s&&this.logDirectory)try{s.readdirSync(this.logDirectory).filter(t=>t.startsWith("kandiforge-")&&t.endsWith(".log")).forEach(t=>{try{s.unlinkSync(n.join(this.logDirectory,t))}catch(r){console.error(`Failed to delete log file ${t}:`,r)}}),this.logStream&&this.logStream.end(),this.initializeLogFile()}catch(e){console.error("Failed to clear logs:",e)}this.listeners.forEach(e=>e({timestamp:new Date,level:"INFO",category:"General",message:"Logs cleared"}))}exportLogs(){return JSON.stringify(this.memoryBuffer,null,2)}async exportAllLogs(){const e=await this.getLogsFromDisk({limit:1e5});return JSON.stringify(e,null,2)}addListener(e){this.listeners.push(e)}removeListener(e){const t=this.listeners.indexOf(e);t>-1&&this.listeners.splice(t,1)}getCurrentLogFile(){return this.currentLogFile}getLogDirectory(){return this.logDirectory}destroy(){this.writeQueue.length>0&&this.flushWriteQueue(),this.logStream&&(this.logStream.end(),this.logStream=null)}getCallSource(){const e=new Error().stack;if(e){const r=e.split(`
|
|
5
|
-
`)[4];if(r){const i=r.match(/at\s+(.+?)\s+\(/);if(i)return i[1]}}return"Unknown"}consoleLog(e){try{const t=this.getConsoleColor(e.level),r=e.timestamp.toISOString().split("T")[1].split(".")[0];typeof window<"u"?console.log(`%c[${r}] [${e.level}] [${e.category}] ${e.message}`,`color: ${t}; font-weight: ${e.level==="ERROR"||e.level==="CRITICAL"?"bold":"normal"}`,e.details||""):console.log(`${{DEBUG:"\x1B[90m",INFO:"\x1B[36m",WARNING:"\x1B[33m",ERROR:"\x1B[31m",CRITICAL:"\x1B[35m"}[e.level]}[${r}] [${e.level}] [${e.category}] ${e.message}\x1B[0m`,e.details||"")}catch{}}getConsoleColor(e){switch(e){case"DEBUG":return"#888";case"INFO":return"#0066cc";case"WARNING":return"#ff9900";case"ERROR":return"#ff3333";case"CRITICAL":return"#ff0000";default:return"#000"}}}const S=h.getInstance();export{h as FileLogger,S as fileLogger};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,j as e,i as S}from"./index-BCQcZBWV.js";const E=[{value:"right",label:"Right",icon:"→"},{value:"left",label:"Left",icon:"←"},{value:"bottom",label:"Bottom",icon:"↓"},{value:"detached",label:"Detached",icon:"⊡"}];function H({isOpen:g,onToggle:C,position:d,onPositionChange:f,context:m="home"}){const[o,b]=s.useState(null),[a,j]=s.useState(""),[c,k]=s.useState(!1),[w,r]=s.useState(!0),[h,u]=s.useState(null),p=s.useRef(null),x=typeof window<"u"&&window.location.pathname.includes("help-window");s.useEffect(()=>{(async()=>{try{r(!0),u(null);const t=await fetch("/office-context-map.json");if(!t.ok)throw new Error(`Failed to load context map: ${t.status}`);const i=await t.json();b(i)}catch(t){console.error("Failed to load help context map:",t),u("Failed to load help. Try opening in browser."),b({version:"1.0.0",baseUrl:"https://docs.kandiforge.com",defaultContext:"home",contexts:{home:{url:"/docs/office/intro",title:"Kandi Office Help"}}})}finally{r(!1)}})()},[]),s.useEffect(()=>{if(!o)return;(async()=>{const t=o.contexts[m]||o.contexts[o.defaultContext]||o.contexts.home;if(!t){j(`${o.baseUrl}/docs/office/intro`);return}const i=new URL(t.url,o.baseUrl);try{const l=await S("get_auth");l.token&&(i.searchParams.set("ide_token",l.token),i.searchParams.set("ide_mode","true"))}catch(l){console.debug("Auth not available:",l)}j(i.toString())})()},[o,m]);const v=()=>{a&&window.open(a,"_blank")},L=s.useCallback(()=>{p.current&&a&&(r(!0),p.current.src=a)},[a]),N=()=>{r(!1)},y=()=>{u("Failed to load documentation. Try opening in browser."),r(!1)},M=s.useCallback(n=>{f(n),k(!1)},[f]);return e.jsxs("div",{className:`help-sidebar ${g?"open":""} ${x?"standalone":`help-sidebar-${d}`}`,children:[e.jsxs("div",{className:"help-sidebar-header",children:[e.jsxs("div",{className:"help-sidebar-title",children:[e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),e.jsx("span",{children:"Help"})]}),e.jsxs("div",{className:"help-sidebar-controls",children:[!x&&e.jsxs("div",{className:"help-sidebar-position-menu",children:[e.jsx("button",{className:"help-sidebar-btn",onClick:()=>k(!c),title:"Change position","aria-label":"Change panel position","aria-expanded":c,"aria-haspopup":"menu",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),c&&e.jsx("div",{className:"help-position-dropdown",role:"menu",children:E.map(n=>e.jsxs("button",{onClick:()=>M(n.value),className:d===n.value?"active":"",role:"menuitem","aria-current":d===n.value?"true":void 0,children:[e.jsx("span",{"aria-hidden":"true",children:n.icon})," ",n.label]},n.value))})]}),e.jsx("button",{className:"help-sidebar-btn",onClick:L,title:"Refresh","aria-label":"Refresh help content",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),e.jsx("button",{className:"help-sidebar-btn",onClick:v,title:"Open in browser","aria-label":"Open help in external browser",children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),e.jsx("polyline",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,points:"15 3 21 3 21 9"}),e.jsx("line",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,x1:"10",y1:"14",x2:"21",y2:"3"})]})}),!x&&e.jsx("button",{className:"help-sidebar-close",onClick:C,title:"Close help (F1)","aria-label":"Close help panel",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),e.jsxs("div",{className:"help-sidebar-content",children:[w&&e.jsxs("div",{className:"help-sidebar-loading",children:[e.jsx("div",{className:"help-loading-spinner"}),e.jsx("p",{children:"Loading help..."})]}),h&&!w&&e.jsxs("div",{className:"help-sidebar-error",children:[e.jsx("p",{children:h}),e.jsx("button",{onClick:v,children:"Open in Browser"})]}),a&&!h&&e.jsx("iframe",{ref:p,src:a,className:"help-sidebar-iframe",title:"Kandi Office Help",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms allow-downloads",onLoad:N,onError:y})]})]})}export{H};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.help-sidebar{position:fixed;background:linear-gradient(180deg,var(--surface) 0%,var(--background) 100%);display:flex;flex-direction:column;transition:all .3s cubic-bezier(.4,0,.2,1);z-index:1000;box-shadow:-4px 0 20px #0000004d}.help-sidebar.standalone{position:relative;width:100%!important;height:100%!important;inset:0!important;transition:none;box-shadow:none;border:none}.help-sidebar-right{right:-480px;top:0;bottom:0;width:480px;border-left:1px solid rgba(255,255,255,.1)}.help-sidebar-right.open{right:0}.help-sidebar-left{left:-480px;top:0;bottom:0;width:480px;border-right:1px solid rgba(255,255,255,.1);box-shadow:4px 0 20px #0000004d}.help-sidebar-left.open{left:0}.help-sidebar-bottom{left:0;right:0;bottom:-400px;height:400px;border-top:1px solid rgba(255,255,255,.1);box-shadow:0 -4px 20px #0000004d}.help-sidebar-bottom.open{bottom:0}.help-sidebar-detached{right:-480px;top:60px;bottom:60px;width:480px;border:1px solid rgba(255,255,255,.2);border-radius:8px;box-shadow:0 8px 32px #00000080}.help-sidebar-detached.open{right:20px}.help-sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;background:#ffffff0d;border-bottom:1px solid rgba(255,255,255,.1);flex-shrink:0}.help-sidebar.standalone .help-sidebar-header{padding-left:80px;-webkit-app-region:drag}.help-sidebar.standalone .help-sidebar-header button,.help-sidebar.standalone .help-sidebar-header .help-sidebar-position-menu{-webkit-app-region:no-drag}.help-sidebar-title{display:flex;align-items:center;gap:.5rem;font-weight:600;font-size:.9rem;color:var(--text-primary)}.help-sidebar-title svg{color:var(--warning, #ffd700)}.help-sidebar-controls{display:flex;align-items:center;gap:.25rem}.help-sidebar-position-menu{position:relative}.help-sidebar-btn,.help-sidebar-close{background:transparent;border:none;color:var(--text-muted);cursor:pointer;padding:.4rem;border-radius:4px;display:flex;align-items:center;justify-content:center;transition:all .2s}.help-sidebar-btn:hover,.help-sidebar-close:hover{background:#ffffff1a;color:var(--text-primary)}.help-position-dropdown{position:absolute;top:calc(100% + .5rem);right:0;background:var(--surface-elevated);border:1px solid var(--border-default);border-radius:6px;padding:.25rem;min-width:140px;box-shadow:0 4px 12px #00000080;z-index:1001}.help-position-dropdown button{width:100%;padding:.5rem .75rem;background:transparent;border:none;color:var(--text-primary);cursor:pointer;border-radius:4px;display:flex;align-items:center;gap:.5rem;font-size:.875rem;transition:all .15s;text-align:left}.help-position-dropdown button:hover{background:#ffd70026;color:var(--warning, #ffd700)}.help-position-dropdown button.active{background:#ffd70033;color:var(--warning, #ffd700)}.help-position-dropdown button span{font-size:1.1rem;width:20px;text-align:center}.help-sidebar-content{flex:1;display:flex;flex-direction:column;overflow:hidden;background:var(--surface)}.help-sidebar-iframe{flex:1;width:100%;height:100%;border:none;background:var(--document-surface)}.help-sidebar-loading{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;color:var(--text-muted)}.help-loading-spinner{width:32px;height:32px;border:3px solid rgba(255,215,0,.2);border-top-color:var(--warning, #ffd700);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.help-sidebar-error{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:2rem;text-align:center;color:var(--error)}.help-sidebar-error button{background:#ffd70026;border:1px solid rgba(255,215,0,.3);color:var(--warning, #ffd700);padding:.5rem 1rem;border-radius:6px;cursor:pointer;transition:all .2s}.help-sidebar-error button:hover{background:#ffd70040}.app.help-sidebar-right-open .main-content{margin-right:480px}.app.help-sidebar-left-open .main-content{margin-left:480px}.app.help-sidebar-bottom-open .main-content{margin-bottom:400px}.app.ai-sidebar-right-open.help-sidebar-right-open .help-sidebar-right{right:420px}.app.ai-sidebar-left-open.help-sidebar-left-open .help-sidebar-left{left:420px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const p={async writeLog(e,c,t,o,n){const s=new Date().toISOString().split("T")[1].split(".")[0],a=n?` (${n})`:"",r=`[${s}] [${e}] [${c}]${a}`;switch(e.toUpperCase()){case"ERROR":case"CRITICAL":console.error(r,t,o??"");break;case"WARNING":console.warn(r,t,o??"");break;default:console.log(r,t,o??"")}}};let g=p;function i(){return g}export{p as ConsoleLoggerAdapter,i as getLoggerAdapter};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/webviewWindow-BSH5q3Fg.js","assets/webview-B8guzubV.js","assets/index-BCQcZBWV.js","assets/index-D7-2e4s_.css","assets/event-BQOPLiga.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{d as t,j as e,b as i,K as o}from"./index-BCQcZBWV.js";import{_ as a}from"./preload-helper-BXl3LOEh.js";import{A as n}from"./AISidebar-DrYmsI3P.js";t.createRoot(document.getElementById("ai-sidebar-root")).render(e.jsx(i.StrictMode,{children:e.jsx(o,{children:e.jsxs("div",{style:{width:"100vw",height:"100vh",background:"var(--background)",display:"flex",flexDirection:"column"},children:[e.jsx("div",{className:"titlebar-drag-region"}),e.jsx(n,{isOpen:!0,onToggle:()=>{a(async()=>{const{getCurrentWebviewWindow:r}=await import("./webviewWindow-BSH5q3Fg.js");return{getCurrentWebviewWindow:r}},__vite__mapDeps([0,1,2,3,4])).then(({getCurrentWebviewWindow:r})=>{r().close()})},position:"detached",onPositionChange:()=>{}})]})})}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as r,t as c}from"./index-BCQcZBWV.js";var i;(function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"})(i||(i={}));async function _(e,a){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,a),await r("plugin:event|unlisten",{event:e,eventId:a})}async function d(e,a,t){var n;const l=typeof t?.target=="string"?{kind:"AnyLabel",label:t.target}:(n=t?.target)!==null&&n!==void 0?n:{kind:"Any"};return r("plugin:event|listen",{event:e,target:l,handler:c(a)}).then(u=>async()=>_(e,u))}async function o(e,a,t){return d(e,n=>{_(e,n.id),a(n)},t)}async function W(e,a){await r("plugin:event|emit",{event:e,payload:a})}async function s(e,a,t){await r("plugin:event|emit_to",{target:typeof e=="string"?{kind:"AnyLabel",label:e}:e,event:a,payload:t})}export{i as TauriEvent,W as emit,s as emitTo,d as listen,o as once};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/webviewWindow-BSH5q3Fg.js","assets/webview-B8guzubV.js","assets/index-BCQcZBWV.js","assets/index-D7-2e4s_.css","assets/event-BQOPLiga.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{d as t,j as o,b as r,K as i}from"./index-BCQcZBWV.js";import{_ as n}from"./preload-helper-BXl3LOEh.js";import{H as a}from"./HelpSidebar-CE2_097f.js";t.createRoot(document.getElementById("help-window-root")).render(o.jsx(r.StrictMode,{children:o.jsx(i,{children:o.jsxs("div",{style:{width:"100vw",height:"100vh",background:"var(--background)",display:"flex",flexDirection:"column"},children:[o.jsx("div",{className:"titlebar-drag-region"}),o.jsx(a,{isOpen:!0,onToggle:()=>{n(async()=>{const{getCurrentWebviewWindow:e}=await import("./webviewWindow-BSH5q3Fg.js");return{getCurrentWebviewWindow:e}},__vite__mapDeps([0,1,2,3,4])).then(({getCurrentWebviewWindow:e})=>{e().close()}).catch(e=>{console.error("Failed to close help window:",e),window.close()})},position:"detached",onPositionChange:()=>{},context:"home"})]})})}));
|