@kandiforge/kandi-office 0.16.151 → 0.16.152

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.
@@ -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 import('@tauri-apps/api' + '/core');
15
15
  json = await invoke('pptx_get_slide_json', { slideIndex });
16
16
  }
17
17
  const service = getDocumentService();
@@ -1,5 +1,5 @@
1
1
  async function getInvoke() {
2
- const { invoke } = await import('@tauri-apps/api/core');
2
+ const { invoke } = await import('@tauri-apps/api' + '/core');
3
3
  return invoke;
4
4
  }
5
5
  export class TauriFormStorage {
@@ -1,5 +1,5 @@
1
1
  async function getInvoke() {
2
- const { invoke } = await import('@tauri-apps/api/core');
2
+ const { invoke } = await import('@tauri-apps/api' + '/core');
3
3
  return invoke;
4
4
  }
5
5
  export class TauriThemeStorage {
package/dist/index.d.ts CHANGED
@@ -12,5 +12,5 @@ export type { Slide, Shape, ShapeType, Position, Size, TextStyle, Background, Co
12
12
  export * from './forms';
13
13
  export * from './forms-builder';
14
14
  export { RustRenderer } from './RustRenderer';
15
- export declare const VERSION = "0.16.151";
15
+ export declare const VERSION = "0.16.152";
16
16
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -8,5 +8,5 @@ export { extractDocx, parseDocx, processDocx, renderDocxPage, layoutDocx } from
8
8
  export * from './forms';
9
9
  export * from './forms-builder';
10
10
  export { RustRenderer } from './RustRenderer';
11
- export const VERSION = '0.16.151';
11
+ export const VERSION = '0.16.152';
12
12
  //# sourceMappingURL=index.js.map
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 import('@tauri-apps/api' + '/core');
19
19
  await invoke(cmd, args);
20
20
  }
21
21
  catch {
@@ -1,5 +1,5 @@
1
1
  async function getInvoke() {
2
- const { invoke } = await import('@tauri-apps/api/core');
2
+ const { invoke } = await import('@tauri-apps/api' + '/core');
3
3
  return invoke;
4
4
  }
5
5
  export class TauriDocumentService {
@@ -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
- import './DocxViewer.css';
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 import('@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
- import './MarkdownViewer.css';
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
- import './PdfViewer.css';
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
- import './PdfFilmstrip.css';
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
- import './PdfToolbar.css';
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
- import './ViewStyles.css';
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
- import './ViewStyles.css';
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
- import './ViewStyles.css';
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
- import './ViewStyles.css';
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 import('@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.151",
3
+ "version": "0.16.152",
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
  },