@embedpdf/vue 0.0.0-stage → 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.
- package/LICENSE +192 -0
- package/README.md +258 -2
- package/dist/Anchored.vue_vue_type_script_setup_true_lang-BEImlFso.cjs +124 -0
- package/dist/Anchored.vue_vue_type_script_setup_true_lang-BEImlFso.cjs.map +1 -0
- package/dist/Anchored.vue_vue_type_script_setup_true_lang-Brhh5jyF.js +125 -0
- package/dist/Anchored.vue_vue_type_script_setup_true_lang-Brhh5jyF.js.map +1 -0
- package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-BwtHXw73.cjs +20 -0
- package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-BwtHXw73.cjs.map +1 -0
- package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-Ulkr3a6R.js +21 -0
- package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-Ulkr3a6R.js.map +1 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-CtTu1FGX.js +191 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-CtTu1FGX.js.map +1 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-loLSm4lV.cjs +190 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-loLSm4lV.cjs.map +1 -0
- package/dist/FormLayer.vue_vue_type_script_setup_true_lang-BA0_VwFc.cjs +682 -0
- package/dist/FormLayer.vue_vue_type_script_setup_true_lang-BA0_VwFc.cjs.map +1 -0
- package/dist/FormLayer.vue_vue_type_script_setup_true_lang-DUqft-xs.js +683 -0
- package/dist/FormLayer.vue_vue_type_script_setup_true_lang-DUqft-xs.js.map +1 -0
- package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-C5-eQD34.cjs +174 -0
- package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-C5-eQD34.cjs.map +1 -0
- package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-EzLaOP3g.js +175 -0
- package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-EzLaOP3g.js.map +1 -0
- package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-CJt3vdBW.js +33 -0
- package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-CJt3vdBW.js.map +1 -0
- package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-Cw29c8Oa.cjs +32 -0
- package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-Cw29c8Oa.cjs.map +1 -0
- package/dist/PageView.vue_vue_type_script_setup_true_lang-CjrpumX2.cjs +151 -0
- package/dist/PageView.vue_vue_type_script_setup_true_lang-CjrpumX2.cjs.map +1 -0
- package/dist/PageView.vue_vue_type_script_setup_true_lang-O4AFc0_R.js +152 -0
- package/dist/PageView.vue_vue_type_script_setup_true_lang-O4AFc0_R.js.map +1 -0
- package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-DrOORC1H.cjs +480 -0
- package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-DrOORC1H.cjs.map +1 -0
- package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-HbCryx1B.js +481 -0
- package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-HbCryx1B.js.map +1 -0
- package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-BlLIPH1B.js +118 -0
- package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-BlLIPH1B.js.map +1 -0
- package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-CQozZCvB.cjs +117 -0
- package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-CQozZCvB.cjs.map +1 -0
- package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C4TUDuyu.js +302 -0
- package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C4TUDuyu.js.map +1 -0
- package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C8T9q6Kb.cjs +301 -0
- package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C8T9q6Kb.cjs.map +1 -0
- package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-D_c-wINF.cjs +38 -0
- package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-D_c-wINF.cjs.map +1 -0
- package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-fOTs4aqv.js +39 -0
- package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-fOTs4aqv.js.map +1 -0
- package/dist/actions.cjs +42 -0
- package/dist/actions.cjs.map +1 -0
- package/dist/actions.d.cts +41 -0
- package/dist/actions.d.ts +41 -0
- package/dist/actions.js +37 -0
- package/dist/actions.js.map +1 -0
- package/dist/anchored/Anchored.vue.d.cts +40 -0
- package/dist/anchored/Anchored.vue.d.ts +40 -0
- package/dist/anchored/AnchoredScope.vue.d.cts +17 -0
- package/dist/anchored/AnchoredScope.vue.d.ts +17 -0
- package/dist/anchored/PlacedAnchored.vue.d.cts +19 -0
- package/dist/anchored/PlacedAnchored.vue.d.ts +19 -0
- package/dist/anchored/projector.d.cts +32 -0
- package/dist/anchored/projector.d.ts +32 -0
- package/dist/anchored.cjs +13 -0
- package/dist/anchored.cjs.map +1 -0
- package/dist/anchored.d.cts +15 -0
- package/dist/anchored.d.ts +15 -0
- package/dist/anchored.js +13 -0
- package/dist/anchored.js.map +1 -0
- package/dist/annotation/AnnotationChrome.vue.d.cts +20 -0
- package/dist/annotation/AnnotationChrome.vue.d.ts +20 -0
- package/dist/annotation/AnnotationDraftMenu.vue.d.cts +26 -0
- package/dist/annotation/AnnotationDraftMenu.vue.d.ts +26 -0
- package/dist/annotation/AnnotationFrame.vue.d.cts +25 -0
- package/dist/annotation/AnnotationFrame.vue.d.ts +25 -0
- package/dist/annotation/AnnotationLayer.vue.d.cts +23 -0
- package/dist/annotation/AnnotationLayer.vue.d.ts +23 -0
- package/dist/annotation/AnnotationLook.vue.d.cts +21 -0
- package/dist/annotation/AnnotationLook.vue.d.ts +21 -0
- package/dist/annotation/AnnotationMenu.vue.d.cts +23 -0
- package/dist/annotation/AnnotationMenu.vue.d.ts +23 -0
- package/dist/annotation/AnnotationRotationBadge.vue.d.cts +26 -0
- package/dist/annotation/AnnotationRotationBadge.vue.d.ts +26 -0
- package/dist/annotation/AnnotationScene.vue.d.cts +7 -0
- package/dist/annotation/AnnotationScene.vue.d.ts +7 -0
- package/dist/annotation/FreeTextBox.vue.d.cts +9 -0
- package/dist/annotation/FreeTextBox.vue.d.ts +9 -0
- package/dist/annotation/NativeDrawing.vue.d.cts +10 -0
- package/dist/annotation/NativeDrawing.vue.d.ts +10 -0
- package/dist/annotation/StampGhost.vue.d.cts +7 -0
- package/dist/annotation/StampGhost.vue.d.ts +7 -0
- package/dist/annotation/composables.d.cts +76 -0
- package/dist/annotation/composables.d.ts +76 -0
- package/dist/annotation/state.d.cts +19 -0
- package/dist/annotation/state.d.ts +19 -0
- package/dist/annotation/text-box.d.cts +27 -0
- package/dist/annotation/text-box.d.ts +27 -0
- package/dist/annotation/types.d.cts +154 -0
- package/dist/annotation/types.d.ts +154 -0
- package/dist/annotation.cjs +29 -0
- package/dist/annotation.cjs.map +1 -0
- package/dist/annotation.d.cts +35 -0
- package/dist/annotation.d.ts +35 -0
- package/dist/annotation.js +23 -0
- package/dist/annotation.js.map +1 -0
- package/dist/capabilities-C7YzgPCX.js +164 -0
- package/dist/capabilities-C7YzgPCX.js.map +1 -0
- package/dist/capabilities-DVNJmgy7.cjs +163 -0
- package/dist/capabilities-DVNJmgy7.cjs.map +1 -0
- package/dist/commands.cjs +81 -0
- package/dist/commands.cjs.map +1 -0
- package/dist/commands.d.cts +61 -0
- package/dist/commands.d.ts +61 -0
- package/dist/commands.js +76 -0
- package/dist/commands.js.map +1 -0
- package/dist/composables-BGBsNDf9.cjs +25 -0
- package/dist/composables-BGBsNDf9.cjs.map +1 -0
- package/dist/composables-BuHvnUlo.cjs +1003 -0
- package/dist/composables-BuHvnUlo.cjs.map +1 -0
- package/dist/composables-CIkhKwAg.js +1004 -0
- package/dist/composables-CIkhKwAg.js.map +1 -0
- package/dist/composables-DwsZdg06.js +26 -0
- package/dist/composables-DwsZdg06.js.map +1 -0
- package/dist/dev-CtMlvxjZ.js +17 -0
- package/dist/dev-CtMlvxjZ.js.map +1 -0
- package/dist/dev-eeIS2B4c.cjs +16 -0
- package/dist/dev-eeIS2B4c.cjs.map +1 -0
- package/dist/dev.d.cts +11 -0
- package/dist/dev.d.ts +11 -0
- package/dist/documents-DUu5H4yH.js +34 -0
- package/dist/documents-DUu5H4yH.js.map +1 -0
- package/dist/documents-TQ1fMdWI.cjs +33 -0
- package/dist/documents-TQ1fMdWI.cjs.map +1 -0
- package/dist/form/ButtonControl.vue.d.cts +11 -0
- package/dist/form/ButtonControl.vue.d.ts +11 -0
- package/dist/form/ComboControl.vue.d.cts +11 -0
- package/dist/form/ComboControl.vue.d.ts +11 -0
- package/dist/form/FieldPictures.vue.d.cts +3 -0
- package/dist/form/FieldPictures.vue.d.ts +3 -0
- package/dist/form/FormFocusRing.vue.d.cts +8 -0
- package/dist/form/FormFocusRing.vue.d.ts +8 -0
- package/dist/form/FormLayer.vue.d.cts +3 -0
- package/dist/form/FormLayer.vue.d.ts +3 -0
- package/dist/form/ListControl.vue.d.cts +11 -0
- package/dist/form/ListControl.vue.d.ts +11 -0
- package/dist/form/NativeListBox.vue.d.cts +27 -0
- package/dist/form/NativeListBox.vue.d.ts +27 -0
- package/dist/form/SignatureControl.vue.d.cts +11 -0
- package/dist/form/SignatureControl.vue.d.ts +11 -0
- package/dist/form/TextControl.vue.d.cts +11 -0
- package/dist/form/TextControl.vue.d.ts +11 -0
- package/dist/form/ToggleControl.vue.d.cts +11 -0
- package/dist/form/ToggleControl.vue.d.ts +11 -0
- package/dist/form/composables.d.cts +52 -0
- package/dist/form/composables.d.ts +52 -0
- package/dist/form/widget-box.d.cts +34 -0
- package/dist/form/widget-box.d.ts +34 -0
- package/dist/form.cjs +17 -0
- package/dist/form.cjs.map +1 -0
- package/dist/form.d.cts +12 -0
- package/dist/form.d.ts +12 -0
- package/dist/form.js +11 -0
- package/dist/form.js.map +1 -0
- package/dist/history.cjs +22 -0
- package/dist/history.cjs.map +1 -0
- package/dist/history.d.cts +31 -0
- package/dist/history.d.ts +31 -0
- package/dist/history.js +17 -0
- package/dist/history.js.map +1 -0
- package/dist/i18n.cjs +29 -0
- package/dist/i18n.cjs.map +1 -0
- package/dist/i18n.d.cts +36 -0
- package/dist/i18n.d.ts +36 -0
- package/dist/i18n.js +24 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.cjs +391 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +30 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +223 -0
- package/dist/index.js.map +1 -0
- package/dist/interaction/PagePointerSource.vue.d.cts +3 -0
- package/dist/interaction/PagePointerSource.vue.d.ts +3 -0
- package/dist/interaction.cjs +63 -0
- package/dist/interaction.cjs.map +1 -0
- package/dist/interaction.d.cts +40 -0
- package/dist/interaction.d.ts +40 -0
- package/dist/interaction.js +47 -0
- package/dist/interaction.js.map +1 -0
- package/dist/link/LinkAnchor.vue.d.cts +9 -0
- package/dist/link/LinkAnchor.vue.d.ts +9 -0
- package/dist/link/LinkLayer.vue.d.cts +22 -0
- package/dist/link/LinkLayer.vue.d.ts +22 -0
- package/dist/link/composables.d.cts +29 -0
- package/dist/link/composables.d.ts +29 -0
- package/dist/link.cjs +14 -0
- package/dist/link.cjs.map +1 -0
- package/dist/link.d.cts +11 -0
- package/dist/link.d.ts +11 -0
- package/dist/link.js +8 -0
- package/dist/link.js.map +1 -0
- package/dist/measurement.cjs +43 -0
- package/dist/measurement.cjs.map +1 -0
- package/dist/measurement.d.cts +51 -0
- package/dist/measurement.d.ts +51 -0
- package/dist/measurement.js +38 -0
- package/dist/measurement.js.map +1 -0
- package/dist/metadata.cjs +22 -0
- package/dist/metadata.cjs.map +1 -0
- package/dist/metadata.d.cts +31 -0
- package/dist/metadata.d.ts +31 -0
- package/dist/metadata.js +17 -0
- package/dist/metadata.js.map +1 -0
- package/dist/page-D9XIuLSj.js +16 -0
- package/dist/page-D9XIuLSj.js.map +1 -0
- package/dist/page-Doy4_Sdz.cjs +15 -0
- package/dist/page-Doy4_Sdz.cjs.map +1 -0
- package/dist/page-edit.cjs +15 -0
- package/dist/page-edit.cjs.map +1 -0
- package/dist/page-edit.d.cts +16 -0
- package/dist/page-edit.d.ts +16 -0
- package/dist/page-edit.js +10 -0
- package/dist/page-edit.js.map +1 -0
- package/dist/page-layers-c-CJYAUO.cjs +30 -0
- package/dist/page-layers-c-CJYAUO.cjs.map +1 -0
- package/dist/page-layers-rlh4-1qr.js +31 -0
- package/dist/page-layers-rlh4-1qr.js.map +1 -0
- package/dist/page-layers.d.cts +21 -0
- package/dist/page-layers.d.ts +21 -0
- package/dist/page-view/PageView.vue.d.cts +42 -0
- package/dist/page-view/PageView.vue.d.ts +42 -0
- package/dist/page-view.cjs +5 -0
- package/dist/page-view.cjs.map +1 -0
- package/dist/page-view.d.cts +10 -0
- package/dist/page-view.d.ts +10 -0
- package/dist/page-view.js +5 -0
- package/dist/page-view.js.map +1 -0
- package/dist/projector-CDZn1kh1.js +32 -0
- package/dist/projector-CDZn1kh1.js.map +1 -0
- package/dist/projector-Cf7879sx.cjs +31 -0
- package/dist/projector-Cf7879sx.cjs.map +1 -0
- package/dist/redaction.cjs +34 -0
- package/dist/redaction.cjs.map +1 -0
- package/dist/redaction.d.cts +44 -0
- package/dist/redaction.d.ts +44 -0
- package/dist/redaction.js +29 -0
- package/dist/redaction.js.map +1 -0
- package/dist/render/RenderLayer.vue.d.cts +23 -0
- package/dist/render/RenderLayer.vue.d.ts +23 -0
- package/dist/render/TileImage.vue.d.cts +13 -0
- package/dist/render/TileImage.vue.d.ts +13 -0
- package/dist/render/TilePlane.vue.d.cts +7 -0
- package/dist/render/TilePlane.vue.d.ts +7 -0
- package/dist/render.cjs +262 -0
- package/dist/render.cjs.map +1 -0
- package/dist/render.d.cts +16 -0
- package/dist/render.d.ts +16 -0
- package/dist/render.js +257 -0
- package/dist/render.js.map +1 -0
- package/dist/runtime/DocumentGate.vue.d.cts +24 -0
- package/dist/runtime/DocumentGate.vue.d.ts +24 -0
- package/dist/runtime/DocumentScope.vue.d.cts +16 -0
- package/dist/runtime/DocumentScope.vue.d.ts +16 -0
- package/dist/runtime/KernelProvider.vue.d.cts +17 -0
- package/dist/runtime/KernelProvider.vue.d.ts +17 -0
- package/dist/runtime/SvgShapes.vue.d.cts +7 -0
- package/dist/runtime/SvgShapes.vue.d.ts +7 -0
- package/dist/runtime/Viewer.vue.d.cts +57 -0
- package/dist/runtime/Viewer.vue.d.ts +57 -0
- package/dist/runtime/capabilities.d.cts +52 -0
- package/dist/runtime/capabilities.d.ts +52 -0
- package/dist/runtime/documents.d.cts +42 -0
- package/dist/runtime/documents.d.ts +42 -0
- package/dist/runtime/kernel.d.cts +36 -0
- package/dist/runtime/kernel.d.ts +36 -0
- package/dist/runtime/page.d.cts +15 -0
- package/dist/runtime/page.d.ts +15 -0
- package/dist/runtime/refs.d.cts +12 -0
- package/dist/runtime/refs.d.ts +12 -0
- package/dist/runtime/surface-box.d.cts +12 -0
- package/dist/runtime/surface-box.d.ts +12 -0
- package/dist/runtime.cjs +53 -0
- package/dist/runtime.cjs.map +1 -0
- package/dist/runtime.d.cts +24 -0
- package/dist/runtime.d.ts +24 -0
- package/dist/runtime.js +38 -0
- package/dist/runtime.js.map +1 -0
- package/dist/scope-BQA4toWB.cjs +17 -0
- package/dist/scope-BQA4toWB.cjs.map +1 -0
- package/dist/scope-BgdCqnYb.js +18 -0
- package/dist/scope-BgdCqnYb.js.map +1 -0
- package/dist/search/SearchLayer.vue.d.cts +17 -0
- package/dist/search/SearchLayer.vue.d.ts +17 -0
- package/dist/search/composables.d.cts +31 -0
- package/dist/search/composables.d.ts +31 -0
- package/dist/search.cjs +17 -0
- package/dist/search.cjs.map +1 -0
- package/dist/search.d.cts +10 -0
- package/dist/search.d.ts +10 -0
- package/dist/search.js +11 -0
- package/dist/search.js.map +1 -0
- package/dist/selection/SelectionClipboard.vue.d.cts +24 -0
- package/dist/selection/SelectionClipboard.vue.d.ts +24 -0
- package/dist/selection/SelectionHandles.vue.d.cts +8 -0
- package/dist/selection/SelectionHandles.vue.d.ts +8 -0
- package/dist/selection/SelectionLayer.vue.d.cts +3 -0
- package/dist/selection/SelectionLayer.vue.d.ts +3 -0
- package/dist/selection/SelectionMenu.vue.d.cts +23 -0
- package/dist/selection/SelectionMenu.vue.d.ts +23 -0
- package/dist/selection/composables.d.cts +24 -0
- package/dist/selection/composables.d.ts +24 -0
- package/dist/selection.cjs +24 -0
- package/dist/selection.cjs.map +1 -0
- package/dist/selection.d.cts +16 -0
- package/dist/selection.d.ts +16 -0
- package/dist/selection.js +15 -0
- package/dist/selection.js.map +1 -0
- package/dist/shell.cjs +72 -0
- package/dist/shell.cjs.map +1 -0
- package/dist/shell.d.cts +56 -0
- package/dist/shell.d.ts +56 -0
- package/dist/shell.js +67 -0
- package/dist/shell.js.map +1 -0
- package/dist/signature/composables.d.cts +39 -0
- package/dist/signature/composables.d.ts +39 -0
- package/dist/signature.cjs +16 -0
- package/dist/signature.cjs.map +1 -0
- package/dist/signature.d.cts +15 -0
- package/dist/signature.d.ts +15 -0
- package/dist/signature.js +10 -0
- package/dist/signature.js.map +1 -0
- package/dist/stage/PageSurface.vue.d.cts +29 -0
- package/dist/stage/PageSurface.vue.d.ts +29 -0
- package/dist/stage/Scrollbar.vue.d.cts +32 -0
- package/dist/stage/Scrollbar.vue.d.ts +32 -0
- package/dist/stage/Stage.vue.d.cts +44 -0
- package/dist/stage/Stage.vue.d.ts +44 -0
- package/dist/stage/StageScope.vue.d.cts +17 -0
- package/dist/stage/StageScope.vue.d.ts +17 -0
- package/dist/stage/composables.d.cts +41 -0
- package/dist/stage/composables.d.ts +41 -0
- package/dist/stage/scope.d.cts +12 -0
- package/dist/stage/scope.d.ts +12 -0
- package/dist/stage.cjs +21 -0
- package/dist/stage.cjs.map +1 -0
- package/dist/stage.d.cts +17 -0
- package/dist/stage.d.ts +17 -0
- package/dist/stage.js +15 -0
- package/dist/stage.js.map +1 -0
- package/dist/stamp.cjs +68 -0
- package/dist/stamp.cjs.map +1 -0
- package/dist/stamp.d.cts +61 -0
- package/dist/stamp.d.ts +61 -0
- package/dist/stamp.js +61 -0
- package/dist/stamp.js.map +1 -0
- package/dist/state-DZg8q3v6.js +52 -0
- package/dist/state-DZg8q3v6.js.map +1 -0
- package/dist/state-M22NDJQo.cjs +51 -0
- package/dist/state-M22NDJQo.cjs.map +1 -0
- package/dist/state.d.cts +32 -0
- package/dist/state.d.ts +32 -0
- package/dist/strip-BSDB39Xh.cjs +743 -0
- package/dist/strip-BSDB39Xh.cjs.map +1 -0
- package/dist/strip-C3wLonKB.js +744 -0
- package/dist/strip-C3wLonKB.js.map +1 -0
- package/dist/surface-box-B9oa4YoG.js +12 -0
- package/dist/surface-box-B9oa4YoG.js.map +1 -0
- package/dist/surface-box-C7EvUOXp.cjs +11 -0
- package/dist/surface-box-C7EvUOXp.cjs.map +1 -0
- package/dist/theme.d.cts +13 -0
- package/dist/theme.d.ts +13 -0
- package/dist/toolbar/DefaultCollapsed.vue.d.cts +9 -0
- package/dist/toolbar/DefaultCollapsed.vue.d.ts +9 -0
- package/dist/toolbar/DefaultCommand.vue.d.cts +8 -0
- package/dist/toolbar/DefaultCommand.vue.d.ts +8 -0
- package/dist/toolbar/DefaultGroupTrigger.vue.d.cts +9 -0
- package/dist/toolbar/DefaultGroupTrigger.vue.d.ts +9 -0
- package/dist/toolbar/DefaultOverflowMenu.vue.d.cts +9 -0
- package/dist/toolbar/DefaultOverflowMenu.vue.d.ts +9 -0
- package/dist/toolbar/DefaultOverflowTrigger.vue.d.cts +10 -0
- package/dist/toolbar/DefaultOverflowTrigger.vue.d.ts +10 -0
- package/dist/toolbar/Measured.vue.d.cts +21 -0
- package/dist/toolbar/Measured.vue.d.ts +21 -0
- package/dist/toolbar/NativeSlotSocket.vue.d.cts +22 -0
- package/dist/toolbar/NativeSlotSocket.vue.d.ts +22 -0
- package/dist/toolbar/Toolbar.vue.d.cts +82 -0
- package/dist/toolbar/Toolbar.vue.d.ts +82 -0
- package/dist/toolbar/ToolbarPart.vue.d.cts +42 -0
- package/dist/toolbar/ToolbarPart.vue.d.ts +42 -0
- package/dist/toolbar/paint.d.cts +3 -0
- package/dist/toolbar/paint.d.ts +3 -0
- package/dist/toolbar/strip.d.cts +14 -0
- package/dist/toolbar/strip.d.ts +14 -0
- package/dist/toolbar/views.d.cts +15 -0
- package/dist/toolbar/views.d.ts +15 -0
- package/dist/toolbar.cjs +27 -0
- package/dist/toolbar.cjs.map +1 -0
- package/dist/toolbar.d.cts +14 -0
- package/dist/toolbar.d.ts +14 -0
- package/dist/toolbar.js +12 -0
- package/dist/toolbar.js.map +1 -0
- package/dist/view-manager.cjs +22 -0
- package/dist/view-manager.cjs.map +1 -0
- package/dist/view-manager.d.cts +24 -0
- package/dist/view-manager.d.ts +24 -0
- package/dist/view-manager.js +17 -0
- package/dist/view-manager.js.map +1 -0
- package/package.json +169 -3
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/commands: the Vue surface of `@embedpdf/plugin-commands`. The
|
|
3
|
+
* standard commands, a command as a button needs it, the settings, and keyboard
|
|
4
|
+
* shortcuts. A command's state is derived from live state on read, so
|
|
5
|
+
* `useCommand` re-reads it on the kernel's one change stream and its ref
|
|
6
|
+
* changes only when what the command shows changed.
|
|
7
|
+
*/
|
|
8
|
+
export * from '@embedpdf/plugin-commands';
|
|
9
|
+
import type { MaybeRefOrGetter, Ref } from 'vue';
|
|
10
|
+
import type { BoundCommand, CommandId, CommandRefusal, CommandsCapability } from '@embedpdf/plugin-commands';
|
|
11
|
+
import type { EventHook } from '@embedpdf/core';
|
|
12
|
+
/**
|
|
13
|
+
* The commands every viewer has: zoom, pages, view rotation, `tool:<id>` for every tool, copy,
|
|
14
|
+
* delete, download and print, with shortcuts and labels in EmbedPDF's eight languages. Spread
|
|
15
|
+
* them into `commandsPlugin({ commands })`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const standardCommands: readonly (import("@embedpdf/plugin-commands").CommandDef | import("@embedpdf/plugin-commands").CommandFamily)[];
|
|
18
|
+
/** The commands API: `execute`, `searchCommands`, `registerCommand`, the categories, the settings calls. The object never changes. */
|
|
19
|
+
export declare function useCommands(): CommandsCapability;
|
|
20
|
+
/** Subscribe to one commands event while the component lives: `useCommandsEvent((commands) => commands.onExecuted, handler)`. */
|
|
21
|
+
export declare function useCommandsEvent<Event>(select: (commands: CommandsCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
22
|
+
/**
|
|
23
|
+
* The commands settings (`commands`, `disabledCategories`, `disabledCommands`, `notAllowed`) as refs,
|
|
24
|
+
* with or without a document. Takes a selector.
|
|
25
|
+
*/
|
|
26
|
+
export declare const useCommandsSettings: import("./state.cjs").SettingsComposable<import("@embedpdf/plugin-commands").CommandsSettings & object>;
|
|
27
|
+
/** A shortcut as a tooltip shows it, for this platform: `'⌘K'` on a Mac, `'Ctrl+K'` elsewhere. */
|
|
28
|
+
export declare function formatShortcut(shortcut: string, options?: {
|
|
29
|
+
isMac?: boolean;
|
|
30
|
+
}): string;
|
|
31
|
+
/**
|
|
32
|
+
* A command for this component's document (the nearest `<DocumentScope>`, else
|
|
33
|
+
* the active one), as a ref: its label, icon, state, `run` and `shortcut`. Pass
|
|
34
|
+
* a getter to follow a prop: `useCommand(() => props.id)`. The ref changes only
|
|
35
|
+
* when what the command shows does. Always a command: an id no plugin
|
|
36
|
+
* registered is labelled with its id, neither visible nor enabled, and warns
|
|
37
|
+
* once in development.
|
|
38
|
+
*/
|
|
39
|
+
export declare function useCommand(id: MaybeRefOrGetter<string>): Readonly<Ref<BoundCommand>>;
|
|
40
|
+
/** Where {@link useCommandShortcuts} listens, and how it reads `Mod`. */
|
|
41
|
+
export interface CommandShortcutsOptions {
|
|
42
|
+
/** Whether `Mod` is Cmd (a Mac) or Ctrl. Default: what the browser says. */
|
|
43
|
+
isMac?: MaybeRefOrGetter<boolean | undefined>;
|
|
44
|
+
/**
|
|
45
|
+
* Listen only while focus is inside this element (a template ref), for a
|
|
46
|
+
* page with more than one viewer. The keys work once it has mounted.
|
|
47
|
+
*/
|
|
48
|
+
target?: MaybeRefOrGetter<HTMLElement | null | undefined>;
|
|
49
|
+
/** Called when a key's command is turned off or not allowed, with why: say so to the user. */
|
|
50
|
+
onRefused?: (commandId: CommandId, refusal: CommandRefusal) => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Turn every command's shortcut into a working key, for the active document.
|
|
54
|
+
* Call it once, near the top of your viewer. Keys typed into text fields are
|
|
55
|
+
* left alone, and so is a key whose command can't run right now. A command
|
|
56
|
+
* that's turned off or not allowed still takes its key, and `onRefused` says
|
|
57
|
+
* why. The keys work anywhere on the page; with `target`, only while focus is
|
|
58
|
+
* inside that element.
|
|
59
|
+
* They stop when the component unmounts.
|
|
60
|
+
*/
|
|
61
|
+
export declare function useCommandShortcuts(options?: CommandShortcutsOptions): void;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/commands: the Vue surface of `@embedpdf/plugin-commands`. The
|
|
3
|
+
* standard commands, a command as a button needs it, the settings, and keyboard
|
|
4
|
+
* shortcuts. A command's state is derived from live state on read, so
|
|
5
|
+
* `useCommand` re-reads it on the kernel's one change stream and its ref
|
|
6
|
+
* changes only when what the command shows changed.
|
|
7
|
+
*/
|
|
8
|
+
export * from '@embedpdf/plugin-commands';
|
|
9
|
+
import type { MaybeRefOrGetter, Ref } from 'vue';
|
|
10
|
+
import type { BoundCommand, CommandId, CommandRefusal, CommandsCapability } from '@embedpdf/plugin-commands';
|
|
11
|
+
import type { EventHook } from '@embedpdf/core';
|
|
12
|
+
/**
|
|
13
|
+
* The commands every viewer has: zoom, pages, view rotation, `tool:<id>` for every tool, copy,
|
|
14
|
+
* delete, download and print, with shortcuts and labels in EmbedPDF's eight languages. Spread
|
|
15
|
+
* them into `commandsPlugin({ commands })`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const standardCommands: readonly (import("@embedpdf/plugin-commands").CommandDef | import("@embedpdf/plugin-commands").CommandFamily)[];
|
|
18
|
+
/** The commands API: `execute`, `searchCommands`, `registerCommand`, the categories, the settings calls. The object never changes. */
|
|
19
|
+
export declare function useCommands(): CommandsCapability;
|
|
20
|
+
/** Subscribe to one commands event while the component lives: `useCommandsEvent((commands) => commands.onExecuted, handler)`. */
|
|
21
|
+
export declare function useCommandsEvent<Event>(select: (commands: CommandsCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
22
|
+
/**
|
|
23
|
+
* The commands settings (`commands`, `disabledCategories`, `disabledCommands`, `notAllowed`) as refs,
|
|
24
|
+
* with or without a document. Takes a selector.
|
|
25
|
+
*/
|
|
26
|
+
export declare const useCommandsSettings: import("./state.js").SettingsComposable<import("@embedpdf/plugin-commands").CommandsSettings & object>;
|
|
27
|
+
/** A shortcut as a tooltip shows it, for this platform: `'⌘K'` on a Mac, `'Ctrl+K'` elsewhere. */
|
|
28
|
+
export declare function formatShortcut(shortcut: string, options?: {
|
|
29
|
+
isMac?: boolean;
|
|
30
|
+
}): string;
|
|
31
|
+
/**
|
|
32
|
+
* A command for this component's document (the nearest `<DocumentScope>`, else
|
|
33
|
+
* the active one), as a ref: its label, icon, state, `run` and `shortcut`. Pass
|
|
34
|
+
* a getter to follow a prop: `useCommand(() => props.id)`. The ref changes only
|
|
35
|
+
* when what the command shows does. Always a command: an id no plugin
|
|
36
|
+
* registered is labelled with its id, neither visible nor enabled, and warns
|
|
37
|
+
* once in development.
|
|
38
|
+
*/
|
|
39
|
+
export declare function useCommand(id: MaybeRefOrGetter<string>): Readonly<Ref<BoundCommand>>;
|
|
40
|
+
/** Where {@link useCommandShortcuts} listens, and how it reads `Mod`. */
|
|
41
|
+
export interface CommandShortcutsOptions {
|
|
42
|
+
/** Whether `Mod` is Cmd (a Mac) or Ctrl. Default: what the browser says. */
|
|
43
|
+
isMac?: MaybeRefOrGetter<boolean | undefined>;
|
|
44
|
+
/**
|
|
45
|
+
* Listen only while focus is inside this element (a template ref), for a
|
|
46
|
+
* page with more than one viewer. The keys work once it has mounted.
|
|
47
|
+
*/
|
|
48
|
+
target?: MaybeRefOrGetter<HTMLElement | null | undefined>;
|
|
49
|
+
/** Called when a key's command is turned off or not allowed, with why: say so to the user. */
|
|
50
|
+
onRefused?: (commandId: CommandId, refusal: CommandRefusal) => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Turn every command's shortcut into a working key, for the active document.
|
|
54
|
+
* Call it once, near the top of your viewer. Keys typed into text fields are
|
|
55
|
+
* left alone, and so is a key whose command can't run right now. A command
|
|
56
|
+
* that's turned off or not allowed still takes its key, and `onRefused` says
|
|
57
|
+
* why. The keys work anywhere on the page; with `target`, only while focus is
|
|
58
|
+
* inside that element.
|
|
59
|
+
* They stop when the component unmounts.
|
|
60
|
+
*/
|
|
61
|
+
export declare function useCommandShortcuts(options?: CommandShortcutsOptions): void;
|
package/dist/commands.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { resolvedCommandsEqual, unknownCommandWarning, boundCommandOf, unregisteredCommand, CommandsToken } from "@embedpdf/plugin-commands";
|
|
2
|
+
export * from "@embedpdf/plugin-commands";
|
|
3
|
+
import { toValue, computed, watch } from "vue";
|
|
4
|
+
import { formatShortcut as formatShortcut$1 } from "@embedpdf/core-ui";
|
|
5
|
+
import { CommandsToken as CommandsToken$1 } from "@embedpdf/plugin-commands/contract/host";
|
|
6
|
+
import { createStandardCommands } from "@embedpdf/plugin-commands/standard";
|
|
7
|
+
import { isMacPlatform, standardCommandsBrowser, bindCommandShortcuts } from "@embedpdf/web";
|
|
8
|
+
import { d as devWarn } from "./dev-CtMlvxjZ.js";
|
|
9
|
+
import { a as useCapability, d as useDocumentId, g as useKernelValue, b as useCapabilityEvent } from "./capabilities-C7YzgPCX.js";
|
|
10
|
+
import { s as settingsComposable } from "./state-DZg8q3v6.js";
|
|
11
|
+
const standardCommands = /* @__PURE__ */ createStandardCommands(standardCommandsBrowser);
|
|
12
|
+
function useCommands() {
|
|
13
|
+
return useCapability(CommandsToken);
|
|
14
|
+
}
|
|
15
|
+
function useCommandsEvent(select, handler) {
|
|
16
|
+
useCapabilityEvent(CommandsToken, select, handler);
|
|
17
|
+
}
|
|
18
|
+
const useCommandsSettings = settingsComposable(CommandsToken);
|
|
19
|
+
function formatShortcut(shortcut, options = {}) {
|
|
20
|
+
return formatShortcut$1(shortcut, { isMac: options.isMac ?? isMacPlatform() });
|
|
21
|
+
}
|
|
22
|
+
function useCommand(id) {
|
|
23
|
+
const commands = useCapability(CommandsToken);
|
|
24
|
+
const documentId = useDocumentId();
|
|
25
|
+
const resolved = useKernelValue(
|
|
26
|
+
() => commands.resolveCommand(toValue(id), documentId.value ?? void 0),
|
|
27
|
+
resolvedCommandsEqual
|
|
28
|
+
);
|
|
29
|
+
return computed(() => {
|
|
30
|
+
const command = resolved.value;
|
|
31
|
+
const requested = toValue(id);
|
|
32
|
+
if (command === null) {
|
|
33
|
+
devWarn(
|
|
34
|
+
`useCommand:${requested}`,
|
|
35
|
+
`useCommand(): ${unknownCommandWarning(requested, commands.listCommandIds())}`
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
const scope = documentId.value ?? void 0;
|
|
39
|
+
return boundCommandOf(
|
|
40
|
+
command ?? unregisteredCommand(requested),
|
|
41
|
+
(commandId) => commands.execute(commandId, { documentId: scope }),
|
|
42
|
+
{ isMac: isMacPlatform() }
|
|
43
|
+
);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function useCommandShortcuts(options = {}) {
|
|
47
|
+
const commands = useCapability(CommandsToken$1);
|
|
48
|
+
const scoped = options.target !== void 0;
|
|
49
|
+
watch(
|
|
50
|
+
() => [toValue(options.isMac), toValue(options.target)],
|
|
51
|
+
([isMac, target], _previous, onCleanup) => {
|
|
52
|
+
if (scoped && !target) return;
|
|
53
|
+
onCleanup(
|
|
54
|
+
bindCommandShortcuts(commands, {
|
|
55
|
+
isMac,
|
|
56
|
+
target: target ?? void 0,
|
|
57
|
+
onRefused: (commandId, refusal) => {
|
|
58
|
+
var _a;
|
|
59
|
+
return (_a = options.onRefused) == null ? void 0 : _a.call(options, commandId, refusal);
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
);
|
|
63
|
+
},
|
|
64
|
+
{ immediate: true, flush: "post" }
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
formatShortcut,
|
|
69
|
+
standardCommands,
|
|
70
|
+
useCommand,
|
|
71
|
+
useCommandShortcuts,
|
|
72
|
+
useCommands,
|
|
73
|
+
useCommandsEvent,
|
|
74
|
+
useCommandsSettings
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.js","sources":["../src/commands.ts"],"sourcesContent":["/**\n * @embedpdf/vue/commands: the Vue surface of `@embedpdf/plugin-commands`. The\n * standard commands, a command as a button needs it, the settings, and keyboard\n * shortcuts. A command's state is derived from live state on read, so\n * `useCommand` re-reads it on the kernel's one change stream and its ref\n * changes only when what the command shows changed.\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-commands';\nimport { computed, toValue, watch } from 'vue';\nimport type { MaybeRefOrGetter, Ref } from 'vue';\nimport { formatShortcut as formatKeys } from '@embedpdf/core-ui';\nimport {\n CommandsToken,\n boundCommandOf,\n resolvedCommandsEqual,\n unknownCommandWarning,\n unregisteredCommand,\n} from '@embedpdf/plugin-commands';\nimport type {\n BoundCommand,\n CommandId,\n CommandRefusal,\n CommandsCapability,\n} from '@embedpdf/plugin-commands';\nimport { CommandsToken as CommandsHostToken } from '@embedpdf/plugin-commands/contract/host';\nimport { createStandardCommands } from '@embedpdf/plugin-commands/standard';\nimport type { EventHook } from '@embedpdf/core';\nimport { bindCommandShortcuts, isMacPlatform, standardCommandsBrowser } from '@embedpdf/web';\nimport { devWarn } from './dev';\nimport { useCapability, useCapabilityEvent } from './runtime/capabilities';\nimport { useDocumentId, useKernelValue } from './runtime/kernel';\nimport { settingsComposable } from './state';\n\n/**\n * The commands every viewer has: zoom, pages, view rotation, `tool:<id>` for every tool, copy,\n * delete, download and print, with shortcuts and labels in EmbedPDF's eight languages. Spread\n * them into `commandsPlugin({ commands })`.\n */\nexport const standardCommands = /* @__PURE__ */ createStandardCommands(standardCommandsBrowser);\n\n/** The commands API: `execute`, `searchCommands`, `registerCommand`, the categories, the settings calls. The object never changes. */\nexport function useCommands(): CommandsCapability {\n return useCapability(CommandsToken);\n}\n\n/** Subscribe to one commands event while the component lives: `useCommandsEvent((commands) => commands.onExecuted, handler)`. */\nexport function useCommandsEvent<Event>(\n select: (commands: CommandsCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(CommandsToken, select, handler);\n}\n\n/**\n * The commands settings (`commands`, `disabledCategories`, `disabledCommands`, `notAllowed`) as refs,\n * with or without a document. Takes a selector.\n */\nexport const useCommandsSettings = settingsComposable(CommandsToken);\n\n/** A shortcut as a tooltip shows it, for this platform: `'⌘K'` on a Mac, `'Ctrl+K'` elsewhere. */\nexport function formatShortcut(shortcut: string, options: { isMac?: boolean } = {}): string {\n return formatKeys(shortcut, { isMac: options.isMac ?? isMacPlatform() });\n}\n\n/**\n * A command for this component's document (the nearest `<DocumentScope>`, else\n * the active one), as a ref: its label, icon, state, `run` and `shortcut`. Pass\n * a getter to follow a prop: `useCommand(() => props.id)`. The ref changes only\n * when what the command shows does. Always a command: an id no plugin\n * registered is labelled with its id, neither visible nor enabled, and warns\n * once in development.\n */\nexport function useCommand(id: MaybeRefOrGetter<string>): Readonly<Ref<BoundCommand>> {\n const commands = useCapability(CommandsToken);\n const documentId = useDocumentId();\n const resolved = useKernelValue(\n () => commands.resolveCommand(toValue(id), documentId.value ?? undefined),\n resolvedCommandsEqual,\n );\n return computed(() => {\n const command = resolved.value;\n const requested = toValue(id);\n if (command === null) {\n devWarn(\n `useCommand:${requested}`,\n `useCommand(): ${unknownCommandWarning(requested, commands.listCommandIds())}`,\n );\n }\n const scope = documentId.value ?? undefined;\n return boundCommandOf(\n command ?? unregisteredCommand(requested),\n (commandId) => commands.execute(commandId, { documentId: scope }),\n { isMac: isMacPlatform() },\n );\n });\n}\n\n/** Where {@link useCommandShortcuts} listens, and how it reads `Mod`. */\nexport interface CommandShortcutsOptions {\n /** Whether `Mod` is Cmd (a Mac) or Ctrl. Default: what the browser says. */\n isMac?: MaybeRefOrGetter<boolean | undefined>;\n /**\n * Listen only while focus is inside this element (a template ref), for a\n * page with more than one viewer. The keys work once it has mounted.\n */\n target?: MaybeRefOrGetter<HTMLElement | null | undefined>;\n /** Called when a key's command is turned off or not allowed, with why: say so to the user. */\n onRefused?: (commandId: CommandId, refusal: CommandRefusal) => void;\n}\n\n/**\n * Turn every command's shortcut into a working key, for the active document.\n * Call it once, near the top of your viewer. Keys typed into text fields are\n * left alone, and so is a key whose command can't run right now. A command\n * that's turned off or not allowed still takes its key, and `onRefused` says\n * why. The keys work anywhere on the page; with `target`, only while focus is\n * inside that element.\n * They stop when the component unmounts.\n */\nexport function useCommandShortcuts(options: CommandShortcutsOptions = {}): void {\n const commands = useCapability(CommandsHostToken);\n const scoped = options.target !== undefined;\n watch(\n () => [toValue(options.isMac), toValue(options.target)] as const,\n ([isMac, target], _previous, onCleanup) => {\n // A target that hasn't mounted yet binds nothing; its ref being set runs this again.\n if (scoped && !target) return;\n onCleanup(\n bindCommandShortcuts(commands, {\n isMac,\n target: target ?? undefined,\n onRefused: (commandId, refusal) => options.onRefused?.(commandId, refusal),\n }),\n );\n },\n { immediate: true, flush: 'post' },\n );\n}\n"],"names":["formatKeys","CommandsHostToken"],"mappings":";;;;;;;;;;AAwCO,MAAM,0DAA0D,uBAAuB;AAGvF,SAAS,cAAkC;AAChD,SAAO,cAAc,aAAa;AACpC;AAGO,SAAS,iBACd,QACA,SACM;AACN,qBAAmB,eAAe,QAAQ,OAAO;AACnD;AAMO,MAAM,sBAAsB,mBAAmB,aAAa;AAG5D,SAAS,eAAe,UAAkB,UAA+B,IAAY;AAC1F,SAAOA,iBAAW,UAAU,EAAE,OAAO,QAAQ,SAAS,cAAA,GAAiB;AACzE;AAUO,SAAS,WAAW,IAA2D;AACpF,QAAM,WAAW,cAAc,aAAa;AAC5C,QAAM,aAAa,cAAA;AACnB,QAAM,WAAW;AAAA,IACf,MAAM,SAAS,eAAe,QAAQ,EAAE,GAAG,WAAW,SAAS,MAAS;AAAA,IACxE;AAAA,EAAA;AAEF,SAAO,SAAS,MAAM;AACpB,UAAM,UAAU,SAAS;AACzB,UAAM,YAAY,QAAQ,EAAE;AAC5B,QAAI,YAAY,MAAM;AACpB;AAAA,QACE,cAAc,SAAS;AAAA,QACvB,iBAAiB,sBAAsB,WAAW,SAAS,eAAA,CAAgB,CAAC;AAAA,MAAA;AAAA,IAEhF;AACA,UAAM,QAAQ,WAAW,SAAS;AAClC,WAAO;AAAA,MACL,WAAW,oBAAoB,SAAS;AAAA,MACxC,CAAC,cAAc,SAAS,QAAQ,WAAW,EAAE,YAAY,OAAO;AAAA,MAChE,EAAE,OAAO,cAAA,EAAc;AAAA,IAAE;AAAA,EAE7B,CAAC;AACH;AAwBO,SAAS,oBAAoB,UAAmC,IAAU;AAC/E,QAAM,WAAW,cAAcC,eAAiB;AAChD,QAAM,SAAS,QAAQ,WAAW;AAClC;AAAA,IACE,MAAM,CAAC,QAAQ,QAAQ,KAAK,GAAG,QAAQ,QAAQ,MAAM,CAAC;AAAA,IACtD,CAAC,CAAC,OAAO,MAAM,GAAG,WAAW,cAAc;AAEzC,UAAI,UAAU,CAAC,OAAQ;AACvB;AAAA,QACE,qBAAqB,UAAU;AAAA,UAC7B;AAAA,UACA,QAAQ,UAAU;AAAA,UAClB,WAAW,CAAC,WAAW;;AAAY,iCAAQ,cAAR,iCAAoB,WAAW;AAAA;AAAA,QAAO,CAC1E;AAAA,MAAA;AAAA,IAEL;AAAA,IACA,EAAE,WAAW,MAAM,OAAO,OAAA;AAAA,EAAO;AAErC;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const pluginSignature = require("@embedpdf/plugin-signature");
|
|
4
|
+
const capabilities = require("./capabilities-DVNJmgy7.cjs");
|
|
5
|
+
const stamp = require("./stamp.cjs");
|
|
6
|
+
const state = require("./state-M22NDJQo.cjs");
|
|
7
|
+
function useSignature() {
|
|
8
|
+
return capabilities.useCapability(pluginSignature.SignatureToken);
|
|
9
|
+
}
|
|
10
|
+
const useSignatureState = state.stateComposable(pluginSignature.signatureState);
|
|
11
|
+
const useSignatureSettings = state.settingsComposable(pluginSignature.SignatureToken);
|
|
12
|
+
function useSignatureEvent(select, handler) {
|
|
13
|
+
capabilities.useCapabilityEvent(pluginSignature.SignatureToken, select, handler);
|
|
14
|
+
}
|
|
15
|
+
function useSignerRows() {
|
|
16
|
+
const libraries = stamp.useStampLibraries({ kind: pluginSignature.SIGNATURES_LIBRARY_KIND });
|
|
17
|
+
const assets = stamp.useStampAssets();
|
|
18
|
+
return vue.computed(() => pluginSignature.signerRowsOf(libraries.value, assets.value));
|
|
19
|
+
}
|
|
20
|
+
exports.useSignature = useSignature;
|
|
21
|
+
exports.useSignatureEvent = useSignatureEvent;
|
|
22
|
+
exports.useSignatureSettings = useSignatureSettings;
|
|
23
|
+
exports.useSignatureState = useSignatureState;
|
|
24
|
+
exports.useSignerRows = useSignerRows;
|
|
25
|
+
//# sourceMappingURL=composables-BGBsNDf9.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composables-BGBsNDf9.cjs","sources":["../src/signature/composables.ts"],"sourcesContent":["/**\n * The signature composables: `useSignature()` (the API), the state and the\n * settings as refs, `useSignatureEvent()`, and `useSignerRows()`, the people\n * whose marks this browser holds, for a signature picker.\n */\nimport { computed } from 'vue';\nimport type { Ref } from 'vue';\nimport type { EventHook } from '@embedpdf/core';\nimport {\n signatureState,\n signerRowsOf,\n SIGNATURES_LIBRARY_KIND,\n SignatureToken,\n} from '@embedpdf/plugin-signature';\nimport type { SignatureCapability, SignerRow } from '@embedpdf/plugin-signature';\nimport { useCapability, useCapabilityEvent } from '../runtime/capabilities';\nimport { useStampAssets, useStampLibraries } from '../stamp';\nimport { settingsComposable, stateComposable } from '../state';\nimport type { StateComposable } from '../state';\n\n/**\n * The signature API for the document in scope: sign, place a mark, fill or\n * clear a field, check the signatures. The object never changes, so it's\n * safe to keep in a closure; keep it whole (`signature.sign(…)`), since a\n * member taken out of it once stays the one of that moment.\n */\nexport function useSignature(): SignatureCapability {\n return useCapability(SignatureToken);\n}\n\n/**\n * The signatures' state as refs: the signed fields with their verdicts\n * (`signatures`), what they allow, the `target`, whether a signing runs\n * (`busy`), a two-step signing in progress, and whether they're read,\n * declared once in `signatureState`. With a selector, one ref that updates\n * only when the value it picks changes. Empty without a document.\n *\n * Typed through the declaration, so the published types name it from\n * `@embedpdf/plugin-signature`, a dependency of this package, and not from the\n * engine package `protection`'s type comes from, which isn't one.\n */\nexport const useSignatureState: StateComposable<ReturnType<typeof signatureState.read>> =\n stateComposable(signatureState);\n\n/**\n * The signature settings (`key`, `mode`, `trust`, `allowCertify`) as refs, or\n * one ref for the value `select` picks. They belong to the plugin, so they\n * read without a document.\n */\nexport const useSignatureSettings = settingsComposable(SignatureToken);\n\n/** Subscribe to one signature event while the component lives: `useSignatureEvent((signature) => signature.onSigned, handler)`. */\nexport function useSignatureEvent<Event>(\n select: (signature: SignatureCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(SignatureToken, select, handler);\n}\n\n/**\n * The people whose marks this browser holds, one row per library of kind\n * `signatures`, for a picker, as a ref: `const rows = useSignerRows()`.\n * Derived from the stamp plugin, so it needs `stampPlugin()`: rename, delete\n * and export are the library verbs, and nothing is stored beyond the file.\n */\nexport function useSignerRows(): Readonly<Ref<readonly SignerRow[]>> {\n const libraries = useStampLibraries({ kind: SIGNATURES_LIBRARY_KIND });\n const assets = useStampAssets();\n return computed(() => signerRowsOf(libraries.value, assets.value));\n}\n"],"names":["useCapability","SignatureToken","stateComposable","signatureState","settingsComposable","useCapabilityEvent","useStampLibraries","SIGNATURES_LIBRARY_KIND","useStampAssets","computed","signerRowsOf"],"mappings":";;;;;;AA0BO,SAAS,eAAoC;AAClD,SAAOA,aAAAA,cAAcC,gBAAAA,cAAc;AACrC;AAaO,MAAM,oBACXC,MAAAA,gBAAgBC,gBAAAA,cAAc;AAOzB,MAAM,uBAAuBC,MAAAA,mBAAmBH,gBAAAA,cAAc;AAG9D,SAAS,kBACd,QACA,SACM;AACNI,kCAAmBJ,gBAAAA,gBAAgB,QAAQ,OAAO;AACpD;AAQO,SAAS,gBAAqD;AACnE,QAAM,YAAYK,MAAAA,kBAAkB,EAAE,MAAMC,gBAAAA,yBAAyB;AACrE,QAAM,SAASC,MAAAA,eAAA;AACf,SAAOC,IAAAA,SAAS,MAAMC,6BAAa,UAAU,OAAO,OAAO,KAAK,CAAC;AACnE;;;;;;"}
|