@embedpdf/viewer-chrome 3.0.0-next.14 → 3.0.0-next.15

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.
Files changed (155) hide show
  1. package/README.md +175 -132
  2. package/dist/annotation-fonts-BqoLZ4Mp.js +80 -0
  3. package/dist/annotation-fonts-BqoLZ4Mp.js.map +1 -0
  4. package/dist/annotation-fonts-Dt0IQXhz.cjs +91 -0
  5. package/dist/annotation-fonts-Dt0IQXhz.cjs.map +1 -0
  6. package/dist/annotation-style--rPIZsuP.js +879 -0
  7. package/dist/annotation-style--rPIZsuP.js.map +1 -0
  8. package/dist/annotation-style-Bzvvp8-N.cjs +879 -0
  9. package/dist/annotation-style-Bzvvp8-N.cjs.map +1 -0
  10. package/dist/ar-D9XKAmDx.js +567 -0
  11. package/dist/ar-D9XKAmDx.js.map +1 -0
  12. package/dist/ar-DnEj5vbP.cjs +567 -0
  13. package/dist/ar-DnEj5vbP.cjs.map +1 -0
  14. package/dist/chrome.cjs +378 -242
  15. package/dist/chrome.cjs.map +1 -1
  16. package/dist/chrome.d.cts +5 -35
  17. package/dist/chrome.d.ts +5 -35
  18. package/dist/chrome.js +377 -239
  19. package/dist/chrome.js.map +1 -1
  20. package/dist/commands-BmgxhJ8B.js +953 -0
  21. package/dist/commands-BmgxhJ8B.js.map +1 -0
  22. package/dist/commands-CYt4SFUX.cjs +1060 -0
  23. package/dist/commands-CYt4SFUX.cjs.map +1 -0
  24. package/dist/commands.cjs +12 -649
  25. package/dist/commands.d.cts +28 -3
  26. package/dist/commands.d.ts +28 -3
  27. package/dist/commands.js +2 -647
  28. package/dist/comments-panel-MUVgLCBI.js +514 -0
  29. package/dist/comments-panel-MUVgLCBI.js.map +1 -0
  30. package/dist/comments-panel-pEcQg4Vs.cjs +514 -0
  31. package/dist/comments-panel-pEcQg4Vs.cjs.map +1 -0
  32. package/dist/de-Bdr4aWzm.js +566 -0
  33. package/dist/de-Bdr4aWzm.js.map +1 -0
  34. package/dist/de-Dv6zvbnd.cjs +566 -0
  35. package/dist/de-Dv6zvbnd.cjs.map +1 -0
  36. package/dist/dialog-B5GBisKv.js +55 -0
  37. package/dist/dialog-B5GBisKv.js.map +1 -0
  38. package/dist/dialog-t8F13BL_.cjs +60 -0
  39. package/dist/dialog-t8F13BL_.cjs.map +1 -0
  40. package/dist/{es-BXLlBo2b.cjs → es-BP09DR9w.cjs} +274 -29
  41. package/dist/es-BP09DR9w.cjs.map +1 -0
  42. package/dist/{es-CLgTsFDS.js → es-BSXz5tBv.js} +274 -29
  43. package/dist/es-BSXz5tBv.js.map +1 -0
  44. package/dist/form-design-panel-B5MXTZ96.cjs +418 -0
  45. package/dist/form-design-panel-B5MXTZ96.cjs.map +1 -0
  46. package/dist/form-design-panel-vWWU9uB-.js +418 -0
  47. package/dist/form-design-panel-vWWU9uB-.js.map +1 -0
  48. package/dist/fr-BBQQn7tJ.cjs +566 -0
  49. package/dist/fr-BBQQn7tJ.cjs.map +1 -0
  50. package/dist/fr-Ckn3K9v1.js +566 -0
  51. package/dist/fr-Ckn3K9v1.js.map +1 -0
  52. package/dist/he-DRsG7bH7.cjs +567 -0
  53. package/dist/he-DRsG7bH7.cjs.map +1 -0
  54. package/dist/he-wdGU5PkU.js +567 -0
  55. package/dist/he-wdGU5PkU.js.map +1 -0
  56. package/dist/icons-BrK5iVL8.js +856 -0
  57. package/dist/icons-BrK5iVL8.js.map +1 -0
  58. package/dist/icons-x0Tc05bs.cjs +1010 -0
  59. package/dist/icons-x0Tc05bs.cjs.map +1 -0
  60. package/dist/index.cjs +3091 -5456
  61. package/dist/index.cjs.map +1 -1
  62. package/dist/index.d.cts +632 -144
  63. package/dist/index.d.ts +632 -144
  64. package/dist/index.js +3060 -5367
  65. package/dist/index.js.map +1 -1
  66. package/dist/it-BuP4o0xQ.cjs +566 -0
  67. package/dist/it-BuP4o0xQ.cjs.map +1 -0
  68. package/dist/it-Us-VmvIu.js +566 -0
  69. package/dist/it-Us-VmvIu.js.map +1 -0
  70. package/dist/ja-Cizj0-5O.js +566 -0
  71. package/dist/ja-Cizj0-5O.js.map +1 -0
  72. package/dist/ja-DovEd6ts.cjs +566 -0
  73. package/dist/ja-DovEd6ts.cjs.map +1 -0
  74. package/dist/ko-B-qJEol2.cjs +566 -0
  75. package/dist/ko-B-qJEol2.cjs.map +1 -0
  76. package/dist/ko-DlrXliE1.js +566 -0
  77. package/dist/ko-DlrXliE1.js.map +1 -0
  78. package/dist/labels-BiM9wp9K.cjs +21 -0
  79. package/dist/labels-BiM9wp9K.cjs.map +1 -0
  80. package/dist/labels-C6_i87Oj.js +16 -0
  81. package/dist/labels-C6_i87Oj.js.map +1 -0
  82. package/dist/link-editor-CSjqPnj1.cjs +125 -0
  83. package/dist/link-editor-CSjqPnj1.cjs.map +1 -0
  84. package/dist/link-editor-SxM1nnJU.js +125 -0
  85. package/dist/link-editor-SxM1nnJU.js.map +1 -0
  86. package/dist/measurement-Bs61XWbJ.js +325 -0
  87. package/dist/measurement-Bs61XWbJ.js.map +1 -0
  88. package/dist/measurement-CcCsHPOX.cjs +326 -0
  89. package/dist/measurement-CcCsHPOX.cjs.map +1 -0
  90. package/dist/nl-0aF7M_0h.js +566 -0
  91. package/dist/nl-0aF7M_0h.js.map +1 -0
  92. package/dist/nl-D3KZDDiJ.cjs +566 -0
  93. package/dist/nl-D3KZDDiJ.cjs.map +1 -0
  94. package/dist/pl-BW--AaCI.js +566 -0
  95. package/dist/pl-BW--AaCI.js.map +1 -0
  96. package/dist/pl-DSFhAUqx.cjs +566 -0
  97. package/dist/pl-DSFhAUqx.cjs.map +1 -0
  98. package/dist/pt-C5S-8MC5.cjs +566 -0
  99. package/dist/pt-C5S-8MC5.cjs.map +1 -0
  100. package/dist/pt-DIhpU5pT.js +566 -0
  101. package/dist/pt-DIhpU5pT.js.map +1 -0
  102. package/dist/redact-confirm-B6j36TPw.js +83 -0
  103. package/dist/redact-confirm-B6j36TPw.js.map +1 -0
  104. package/dist/redact-confirm-CX_SY2ZN.cjs +83 -0
  105. package/dist/redact-confirm-CX_SY2ZN.cjs.map +1 -0
  106. package/dist/redaction-panel-BmoIl-Ll.cjs +96 -0
  107. package/dist/redaction-panel-BmoIl-Ll.cjs.map +1 -0
  108. package/dist/redaction-panel-IJDshSJI.js +96 -0
  109. package/dist/redaction-panel-IJDshSJI.js.map +1 -0
  110. package/dist/search-panel-HfIhJm1M.js +249 -0
  111. package/dist/search-panel-HfIhJm1M.js.map +1 -0
  112. package/dist/search-panel-s9IoiOtv.cjs +249 -0
  113. package/dist/search-panel-s9IoiOtv.cjs.map +1 -0
  114. package/dist/sheet-BDsa_Sup.cjs +442 -0
  115. package/dist/sheet-BDsa_Sup.cjs.map +1 -0
  116. package/dist/sheet-R6XDgyEf.js +365 -0
  117. package/dist/sheet-R6XDgyEf.js.map +1 -0
  118. package/dist/sign-dialog-CgnR7akj.cjs +155 -0
  119. package/dist/sign-dialog-CgnR7akj.cjs.map +1 -0
  120. package/dist/sign-dialog-GDqCoQhA.js +155 -0
  121. package/dist/sign-dialog-GDqCoQhA.js.map +1 -0
  122. package/dist/signature-inspector-DyO313Qf.cjs +166 -0
  123. package/dist/signature-inspector-DyO313Qf.cjs.map +1 -0
  124. package/dist/signature-inspector-okFz8do6.js +166 -0
  125. package/dist/signature-inspector-okFz8do6.js.map +1 -0
  126. package/dist/signature-maker-BhCmYyHD.js +393 -0
  127. package/dist/signature-maker-BhCmYyHD.js.map +1 -0
  128. package/dist/signature-maker-BoYa8vgA.cjs +393 -0
  129. package/dist/signature-maker-BoYa8vgA.cjs.map +1 -0
  130. package/dist/signatures-panel-B56PC6d9.cjs +300 -0
  131. package/dist/signatures-panel-B56PC6d9.cjs.map +1 -0
  132. package/dist/signatures-panel-CgnFfhFm.js +300 -0
  133. package/dist/signatures-panel-CgnFfhFm.js.map +1 -0
  134. package/dist/stamp-store-BHvRs-Do.cjs +147 -0
  135. package/dist/stamp-store-BHvRs-Do.cjs.map +1 -0
  136. package/dist/stamp-store-WuF-L3Jj.js +112 -0
  137. package/dist/stamp-store-WuF-L3Jj.js.map +1 -0
  138. package/dist/stamps-panel-B9NYGayn.cjs +231 -0
  139. package/dist/stamps-panel-B9NYGayn.cjs.map +1 -0
  140. package/dist/stamps-panel-CDO0FPyK.js +231 -0
  141. package/dist/stamps-panel-CDO0FPyK.js.map +1 -0
  142. package/dist/toolbar-CJu2wKTU.cjs +1659 -0
  143. package/dist/toolbar-CJu2wKTU.cjs.map +1 -0
  144. package/dist/toolbar-z9od3tKl.js +1564 -0
  145. package/dist/toolbar-z9od3tKl.js.map +1 -0
  146. package/dist/zh-cn-3tmMeHqv.cjs +566 -0
  147. package/dist/zh-cn-3tmMeHqv.cjs.map +1 -0
  148. package/dist/zh-cn-CxkUUBct.js +566 -0
  149. package/dist/zh-cn-CxkUUBct.js.map +1 -0
  150. package/package.json +6 -4
  151. package/src/styles.css +153 -89
  152. package/dist/commands.cjs.map +0 -1
  153. package/dist/commands.js.map +0 -1
  154. package/dist/es-BXLlBo2b.cjs.map +0 -1
  155. package/dist/es-CLgTsFDS.js.map +0 -1
@@ -1,13 +1,32 @@
1
+ import { AnnotationToolInput } from "@embedpdf/react/annotation";
1
2
  import { CommandDef } from "@embedpdf/react/commands";
2
3
  //#region src/config/commands.d.ts
4
+ type Ctx = Parameters<NonNullable<CommandDef['run']>>[0];
5
+ /** The dialog the Go to Page command opens without a page to go to (ui/go-to-page.tsx). */
6
+ declare const GO_TO_PAGE_DIALOG = "go-to-page";
7
+ /** The keyboard shortcuts sheet, which `?` opens (ui/shortcuts-sheet.tsx). */
8
+ declare const SHORTCUTS_DIALOG = "shortcuts";
9
+ /** The confirmation before marked areas are removed for good (ui/redact-confirm.tsx). */
10
+ declare const REDACT_CONFIRM_DIALOG = "redact-confirm";
11
+ /** The form designer's sidebar (ui/form-design-panel.tsx), which `form:design` opens. */
12
+ declare const FORM_DESIGN_PANEL = "form-design";
13
+ /** Form design's resting tool, the form plugin's: widgets select, move and resize there. */
14
+ declare const FORM_DESIGN_TOOL = "form-edit";
15
+ /**
16
+ * Whether a tool designs a form: design's resting tool, or a field tool. Neither fills, so the
17
+ * form lends its widgets to be selected, moved and resized.
18
+ */
19
+ declare const isFormDesignTool: (tool: string | null | undefined) => boolean;
20
+ /** Whether a form is being designed: the active tool designs it. */
21
+ declare const isDesigningForm: (commandContext: Pick<Ctx, "tryGet">) => boolean;
3
22
  type ColorKey = 'color' | 'interiorColor' | 'fontColor';
4
23
  interface ToolAccentDefinition {
5
24
  primary: ColorKey;
6
25
  secondary?: ColorKey;
7
26
  }
8
27
  /**
9
- * toolId → the SAME icon + accent definition its toolbar button uses, recorded
10
- * as a side effect of the `tool()` command definitions below — ONE source of
28
+ * toolId → the same icon + accent definition its toolbar button uses, recorded
29
+ * as a side effect of the `tool()` command definitions below — one source of
11
30
  * truth, so the tool cursor (ui/tool-cursor.tsx) and the button can never
12
31
  * drift apart.
13
32
  */
@@ -17,6 +36,12 @@ declare const TOOL_ICONS: Record<string, {
17
36
  }>;
18
37
  declare const defaultCommands: CommandDef[];
19
38
  declare const MODE_SURFACES: readonly ["mode:annotate", "mode:shapes", "mode:insert", "mode:form", "mode:redact", "mode:measure"];
39
+ /**
40
+ * A `tool:<id>` command for each tool of yours (`plugins.annotation.tools`) that no command has
41
+ * (`isTaken` says which ids do): labelled by its `meta.label`, else its id; drawn with its
42
+ * `meta.icon`, else the icon of the tool it extends; in that tool's feature, else `annotations`.
43
+ */
44
+ declare function toolCommandsFor(tools: readonly AnnotationToolInput[], isTaken: (id: string) => boolean): CommandDef[];
20
45
  //#endregion
21
- export { MODE_SURFACES, TOOL_ICONS, ToolAccentDefinition, defaultCommands };
46
+ export { FORM_DESIGN_PANEL, FORM_DESIGN_TOOL, GO_TO_PAGE_DIALOG, MODE_SURFACES, REDACT_CONFIRM_DIALOG, SHORTCUTS_DIALOG, TOOL_ICONS, ToolAccentDefinition, defaultCommands, isDesigningForm, isFormDesignTool, toolCommandsFor };
22
47
  //# sourceMappingURL=commands.d.cts.map
@@ -1,13 +1,32 @@
1
+ import { AnnotationToolInput } from "@embedpdf/react/annotation";
1
2
  import { CommandDef } from "@embedpdf/react/commands";
2
3
  //#region src/config/commands.d.ts
4
+ type Ctx = Parameters<NonNullable<CommandDef['run']>>[0];
5
+ /** The dialog the Go to Page command opens without a page to go to (ui/go-to-page.tsx). */
6
+ declare const GO_TO_PAGE_DIALOG = "go-to-page";
7
+ /** The keyboard shortcuts sheet, which `?` opens (ui/shortcuts-sheet.tsx). */
8
+ declare const SHORTCUTS_DIALOG = "shortcuts";
9
+ /** The confirmation before marked areas are removed for good (ui/redact-confirm.tsx). */
10
+ declare const REDACT_CONFIRM_DIALOG = "redact-confirm";
11
+ /** The form designer's sidebar (ui/form-design-panel.tsx), which `form:design` opens. */
12
+ declare const FORM_DESIGN_PANEL = "form-design";
13
+ /** Form design's resting tool, the form plugin's: widgets select, move and resize there. */
14
+ declare const FORM_DESIGN_TOOL = "form-edit";
15
+ /**
16
+ * Whether a tool designs a form: design's resting tool, or a field tool. Neither fills, so the
17
+ * form lends its widgets to be selected, moved and resized.
18
+ */
19
+ declare const isFormDesignTool: (tool: string | null | undefined) => boolean;
20
+ /** Whether a form is being designed: the active tool designs it. */
21
+ declare const isDesigningForm: (commandContext: Pick<Ctx, "tryGet">) => boolean;
3
22
  type ColorKey = 'color' | 'interiorColor' | 'fontColor';
4
23
  interface ToolAccentDefinition {
5
24
  primary: ColorKey;
6
25
  secondary?: ColorKey;
7
26
  }
8
27
  /**
9
- * toolId → the SAME icon + accent definition its toolbar button uses, recorded
10
- * as a side effect of the `tool()` command definitions below — ONE source of
28
+ * toolId → the same icon + accent definition its toolbar button uses, recorded
29
+ * as a side effect of the `tool()` command definitions below — one source of
11
30
  * truth, so the tool cursor (ui/tool-cursor.tsx) and the button can never
12
31
  * drift apart.
13
32
  */
@@ -17,6 +36,12 @@ declare const TOOL_ICONS: Record<string, {
17
36
  }>;
18
37
  declare const defaultCommands: CommandDef[];
19
38
  declare const MODE_SURFACES: readonly ["mode:annotate", "mode:shapes", "mode:insert", "mode:form", "mode:redact", "mode:measure"];
39
+ /**
40
+ * A `tool:<id>` command for each tool of yours (`plugins.annotation.tools`) that no command has
41
+ * (`isTaken` says which ids do): labelled by its `meta.label`, else its id; drawn with its
42
+ * `meta.icon`, else the icon of the tool it extends; in that tool's feature, else `annotations`.
43
+ */
44
+ declare function toolCommandsFor(tools: readonly AnnotationToolInput[], isTaken: (id: string) => boolean): CommandDef[];
20
45
  //#endregion
21
- export { MODE_SURFACES, TOOL_ICONS, ToolAccentDefinition, defaultCommands };
46
+ export { FORM_DESIGN_PANEL, FORM_DESIGN_TOOL, GO_TO_PAGE_DIALOG, MODE_SURFACES, REDACT_CONFIRM_DIALOG, SHORTCUTS_DIALOG, TOOL_ICONS, ToolAccentDefinition, defaultCommands, isDesigningForm, isFormDesignTool, toolCommandsFor };
22
47
  //# sourceMappingURL=commands.d.ts.map