@hussmartinez/pdf-sdk 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/assets/processing/processing.worker.js +1 -1
- package/dist/index.js +1 -1
- package/dist/lazy/{processing-worker-n7gK4h_F.js → processing-worker-D4qwaqbw.js} +2 -2
- package/dist/lazy/{processing-worker-n7gK4h_F.js.map → processing-worker-D4qwaqbw.js.map} +1 -1
- package/dist/react.js +4 -4
- package/dist/react.js.map +1 -1
- package/dist/shared/{en-BAoGup4H.js → en-DAmVF5wH.js} +3 -3
- package/dist/shared/{en-BAoGup4H.js.map → en-DAmVF5wH.js.map} +1 -1
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processing-worker-
|
|
1
|
+
{"version":3,"file":"processing-worker-D4qwaqbw.js","names":["ProcessingWorker"],"sources":["../../src/adapters/qpdf/processing-worker.ts"],"sourcesContent":["import ProcessingWorker from \"../../workers/processing.worker.ts?worker&inline\";\n\n/** Starts the inlined processing worker, from its own lazy chunk. */\nexport function createInlineWorker(): Worker {\n return new ProcessingWorker({ name: \"hm-pdf-processing\" });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA,SAAgB,qBAA6B;CAC3C,OAAO,IAAIA,cAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC3D"}
|
package/dist/react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { g as createPdfJsEngine, h as createPdfProcessor, n as createPdfSession, t as pdfMessages, v as linkDestination, w as isPdfError, y as safeLinkUrl } from "./shared/en-
|
|
2
|
+
import { g as createPdfJsEngine, h as createPdfProcessor, n as createPdfSession, t as pdfMessages, v as linkDestination, w as isPdfError, y as safeLinkUrl } from "./shared/en-DAmVF5wH.js";
|
|
3
3
|
import { MAX_FILE_NAME_LENGTH, cleanFileName, createMessages, createShortcutRegistry, createToolRegistry, defineMessages, defineTool, plural } from "@hussmartinez/sdk-core";
|
|
4
4
|
import { AnnouncerProvider, Button, DeleteIcon, DownloadIcon, IconButton, MoveDownIcon, MoveUpIcon, OpenIcon, PageAddIcon, RedoIcon, RotateLeftIcon, RotateRightIcon, Toolbar, ToolbarGroup, UiMessagesProvider, UndoIcon, useAnnounce, usePlatform } from "@hussmartinez/ui/react";
|
|
5
5
|
import { Component, createContext, forwardRef, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -148,7 +148,7 @@ function move({ session }, direction) {
|
|
|
148
148
|
const current = before.currentPage;
|
|
149
149
|
session.goToPage(current !== void 0 && found.pages.includes(current) ? current : found.pages[0]);
|
|
150
150
|
}
|
|
151
|
-
var canMove = (direction
|
|
151
|
+
var canMove = (direction, { snapshot }) => hasDocument({ snapshot }) && moveOf(snapshot, direction) !== void 0;
|
|
152
152
|
// src/features/tools.ts
|
|
153
153
|
var pdfTools = [
|
|
154
154
|
openTool,
|
|
@@ -162,7 +162,7 @@ var pdfTools = [
|
|
|
162
162
|
label: "tools.move-earlier",
|
|
163
163
|
icon: "move-up",
|
|
164
164
|
group: "pages",
|
|
165
|
-
isEnabled: canMove("earlier"),
|
|
165
|
+
isEnabled: (state) => canMove("earlier", state),
|
|
166
166
|
run: (context) => move(context, "earlier")
|
|
167
167
|
}),
|
|
168
168
|
/* @__PURE__ */ defineTool({
|
|
@@ -170,7 +170,7 @@ var pdfTools = [
|
|
|
170
170
|
label: "tools.move-later",
|
|
171
171
|
icon: "move-down",
|
|
172
172
|
group: "pages",
|
|
173
|
-
isEnabled: canMove("later"),
|
|
173
|
+
isEnabled: (state) => canMove("later", state),
|
|
174
174
|
run: (context) => move(context, "later")
|
|
175
175
|
}),
|
|
176
176
|
deletePagesTool,
|