@embedpdf/viewer-chrome 3.0.0-next.5 → 3.0.0-next.7

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/index.js CHANGED
@@ -3,10 +3,10 @@ import { TOOL_ICONS, defaultCommands } from "./commands.js";
3
3
  import { Fragment, createContext, useContext, useEffect, useMemo, useRef, useState } from "react";
4
4
  import { DocumentGate, DocumentsToken, Viewer, createCapabilityToken, definePlugin, useCapability, useDocumentId, useDocumentStatus, useDocuments, useKernel, useOptionalCapability, useOptionalSelector, useSelector } from "@embedpdf/react/runtime";
5
5
  import { Stage, StageToken, StageToken as StageToken$1, stagePlugin, usePages } from "@embedpdf/react/stage";
6
- import { RenderLayer, TileLayer, renderPlugin } from "@embedpdf/react/render";
6
+ import { RenderLayer, renderPlugin } from "@embedpdf/react/render";
7
7
  import { pageEditPlugin } from "@embedpdf/react/page-edit";
8
- import { InteractionToken, InteractionToken as InteractionToken$1, interactionPlugin, useTool, useToolCursor } from "@embedpdf/react/interaction";
9
- import { SelectionClipboard, SelectionLayer, SelectionMenu, SelectionToken, selectionPlugin } from "@embedpdf/react/selection";
8
+ import { InteractionToken, InteractionToken as InteractionToken$1, feedbackPlugin, interactionPlugin, useTool, useToolCursor, vibrationFeedback } from "@embedpdf/react/interaction";
9
+ import { SelectionClipboard, SelectionHandles, SelectionLayer, SelectionMenu, SelectionToken, selectionPlugin } from "@embedpdf/react/selection";
10
10
  import { AnnotationLayer, AnnotationToken, AnnotationToken as AnnotationToken$1, annotationPlugin, useAnnotation, useAnnotationDefaults, useAnnotationSelected, useFilePickerProvider, useSelectionFlags, useSelectionProps } from "@embedpdf/react/annotation";
11
11
  import { RedactionToken, RedactionToken as RedactionToken$1, redactionPlugin, usePendingRedactions, useRedaction } from "@embedpdf/react/redaction";
12
12
  import { FormToken, formPlugin, formWidgetRenderer, useFormScriptingProvider } from "@embedpdf/react/form";
@@ -3361,10 +3361,10 @@ function Shell() {
3361
3361
  /* @__PURE__ */ jsx(ArmedToolCursor, {}),
3362
3362
  /* @__PURE__ */ jsx(SelectionClipboard, {}),
3363
3363
  /* @__PURE__ */ jsx(Stage, {
3364
- interaction: true,
3365
3364
  overlay: /* @__PURE__ */ jsxs(Fragment$1, { children: [
3366
3365
  /* @__PURE__ */ jsx(AnnotationStrip, {}),
3367
3366
  /* @__PURE__ */ jsx(SelectionStrip, {}),
3367
+ /* @__PURE__ */ jsx(SelectionHandles, {}),
3368
3368
  /* @__PURE__ */ jsx(Scrollbar, { axis: "y" }),
3369
3369
  /* @__PURE__ */ jsx(Scrollbar, { axis: "x" })
3370
3370
  ] }),
@@ -3372,7 +3372,6 @@ function Shell() {
3372
3372
  style: { background: "var(--ep-canvas)" },
3373
3373
  children: () => /* @__PURE__ */ jsxs(Fragment$1, { children: [
3374
3374
  /* @__PURE__ */ jsx(RenderLayer, { annotations: false }),
3375
- /* @__PURE__ */ jsx(TileLayer, { annotations: false }),
3376
3375
  /* @__PURE__ */ jsx(SelectionLayer, {}),
3377
3376
  /* @__PURE__ */ jsx(SearchLayer, {}),
3378
3377
  /* @__PURE__ */ jsx(LinkLayer, {}),
@@ -3500,10 +3499,7 @@ function FullViewer({ engine, initialDocuments, fallback, commands, icons, strin
3500
3499
  for (const c of resolved.commands) if (c.icon && !(c.icon in ICON_PATHS) && !(c.icon in resolved.icons)) console.warn(`[embedpdf] command "${c.id}": unknown icon "${c.icon}"`);
3501
3500
  }, [resolved]);
3502
3501
  const [plugins] = useState(() => [
3503
- stagePlugin({
3504
- layout: "vertical",
3505
- interaction: true
3506
- }),
3502
+ stagePlugin({ layout: "vertical" }),
3507
3503
  stagePlugin({
3508
3504
  id: "stage-thumbs",
3509
3505
  token: ThumbsStageToken,
@@ -3528,6 +3524,7 @@ function FullViewer({ engine, initialDocuments, fallback, commands, icons, strin
3528
3524
  renderPlugin(),
3529
3525
  pageEditPlugin(),
3530
3526
  interactionPlugin({ defaultTool: "pointer" }),
3527
+ feedbackPlugin({ provider: vibrationFeedback }),
3531
3528
  selectionPlugin(),
3532
3529
  annotationPlugin({ tools: [{
3533
3530
  id: "arrow",