@embedpdf/vue 0.0.0-stage → 3.0.0-next.16
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-C-7yeEGh.js +192 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-C-7yeEGh.js.map +1 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-czzeUzPl.cjs +191 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-czzeUzPl.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 +28 -0
- package/dist/annotation/text-box.d.ts +28 -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/attachment.cjs +22 -0
- package/dist/attachment.cjs.map +1 -0
- package/dist/attachment.d.cts +34 -0
- package/dist/attachment.d.ts +34 -0
- package/dist/attachment.js +17 -0
- package/dist/attachment.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-Bi6QvJpj.cjs +978 -0
- package/dist/composables-Bi6QvJpj.cjs.map +1 -0
- package/dist/composables-DK3lwh38.js +979 -0
- package/dist/composables-DK3lwh38.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 +414 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +32 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +234 -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/outline.cjs +22 -0
- package/dist/outline.cjs.map +1 -0
- package/dist/outline.d.cts +36 -0
- package/dist/outline.d.ts +36 -0
- package/dist/outline.js +17 -0
- package/dist/outline.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 +18 -0
- package/dist/page-edit.cjs.map +1 -0
- package/dist/page-edit.d.cts +28 -0
- package/dist/page-edit.d.ts +28 -0
- package/dist/page-edit.js +13 -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 +179 -3
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const web = require("@embedpdf/web");
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
function usePaintsPagePart(pageRef, part) {
|
|
5
|
+
vue.watch(
|
|
6
|
+
pageRef,
|
|
7
|
+
(ref, _previous, onCleanup) => {
|
|
8
|
+
if (ref) onCleanup(web.pageLayersOf(ref).paint(part));
|
|
9
|
+
},
|
|
10
|
+
{ immediate: true }
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
function usePaintedParts(pageRef) {
|
|
14
|
+
const painted = vue.shallowRef(null);
|
|
15
|
+
vue.onMounted(() => {
|
|
16
|
+
vue.watch(
|
|
17
|
+
pageRef,
|
|
18
|
+
(ref, _previous, onCleanup) => {
|
|
19
|
+
const layers = web.pageLayersOf(ref);
|
|
20
|
+
painted.value = layers.painted();
|
|
21
|
+
onCleanup(layers.subscribe(() => painted.value = layers.painted()));
|
|
22
|
+
},
|
|
23
|
+
{ immediate: true }
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
return painted;
|
|
27
|
+
}
|
|
28
|
+
exports.usePaintedParts = usePaintedParts;
|
|
29
|
+
exports.usePaintsPagePart = usePaintsPagePart;
|
|
30
|
+
//# sourceMappingURL=page-layers-c-CJYAUO.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-layers-c-CJYAUO.cjs","sources":["../src/page-layers.ts"],"sourcesContent":["/**\n * The Vue side of `@embedpdf/web`'s page layers: a layer says, for as long as\n * it lives, which part of its page it paints, and the render layer reads which\n * parts are painted, to leave them out of the page's picture.\n */\nimport { pageLayersOf, type PagePart, type PaintedParts } from '@embedpdf/web';\nimport { onMounted, shallowRef, watch } from 'vue';\nimport type { Ref, ShallowRef } from 'vue';\n\n/**\n * Say, for as long as this component lives, that it paints `part` of its page\n * (`pageRef`, the page context's `ref`; `null` while it paints nothing). Said\n * at setup, so a render layer set up alongside knows it by the time it's\n * mounted.\n */\nexport function usePaintsPagePart(pageRef: Readonly<Ref<object | null>>, part: PagePart): void {\n watch(\n pageRef,\n (ref, _previous, onCleanup) => {\n if (ref) onCleanup(pageLayersOf(ref).paint(part));\n },\n { immediate: true },\n );\n}\n\n/**\n * Which parts of the page (`pageRef`, the page context's `ref`) the layers on\n * it paint: `null` until this component is mounted, when every layer set up\n * with it has said what it paints, so the page's picture is never asked for\n * with a part another layer is about to take.\n */\nexport function usePaintedParts(\n pageRef: Readonly<Ref<object>>,\n): Readonly<ShallowRef<PaintedParts | null>> {\n const painted = shallowRef<PaintedParts | null>(null);\n onMounted(() => {\n watch(\n pageRef,\n (ref, _previous, onCleanup) => {\n const layers = pageLayersOf(ref);\n painted.value = layers.painted();\n onCleanup(layers.subscribe(() => (painted.value = layers.painted())));\n },\n { immediate: true },\n );\n });\n return painted;\n}\n"],"names":["watch","pageLayersOf","shallowRef","onMounted"],"mappings":";;;AAeO,SAAS,kBAAkB,SAAuC,MAAsB;AAC7FA,MAAAA;AAAAA,IACE;AAAA,IACA,CAAC,KAAK,WAAW,cAAc;AAC7B,UAAI,IAAK,WAAUC,IAAAA,aAAa,GAAG,EAAE,MAAM,IAAI,CAAC;AAAA,IAClD;AAAA,IACA,EAAE,WAAW,KAAA;AAAA,EAAK;AAEtB;AAQO,SAAS,gBACd,SAC2C;AAC3C,QAAM,UAAUC,IAAAA,WAAgC,IAAI;AACpDC,MAAAA,UAAU,MAAM;AACdH,QAAAA;AAAAA,MACE;AAAA,MACA,CAAC,KAAK,WAAW,cAAc;AAC7B,cAAM,SAASC,IAAAA,aAAa,GAAG;AAC/B,gBAAQ,QAAQ,OAAO,QAAA;AACvB,kBAAU,OAAO,UAAU,MAAO,QAAQ,QAAQ,OAAO,QAAA,CAAU,CAAC;AAAA,MACtE;AAAA,MACA,EAAE,WAAW,KAAA;AAAA,IAAK;AAAA,EAEtB,CAAC;AACD,SAAO;AACT;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { pageLayersOf } from "@embedpdf/web";
|
|
2
|
+
import { watch, shallowRef, onMounted } from "vue";
|
|
3
|
+
function usePaintsPagePart(pageRef, part) {
|
|
4
|
+
watch(
|
|
5
|
+
pageRef,
|
|
6
|
+
(ref, _previous, onCleanup) => {
|
|
7
|
+
if (ref) onCleanup(pageLayersOf(ref).paint(part));
|
|
8
|
+
},
|
|
9
|
+
{ immediate: true }
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
function usePaintedParts(pageRef) {
|
|
13
|
+
const painted = shallowRef(null);
|
|
14
|
+
onMounted(() => {
|
|
15
|
+
watch(
|
|
16
|
+
pageRef,
|
|
17
|
+
(ref, _previous, onCleanup) => {
|
|
18
|
+
const layers = pageLayersOf(ref);
|
|
19
|
+
painted.value = layers.painted();
|
|
20
|
+
onCleanup(layers.subscribe(() => painted.value = layers.painted()));
|
|
21
|
+
},
|
|
22
|
+
{ immediate: true }
|
|
23
|
+
);
|
|
24
|
+
});
|
|
25
|
+
return painted;
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
usePaintsPagePart as a,
|
|
29
|
+
usePaintedParts as u
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=page-layers-rlh4-1qr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-layers-rlh4-1qr.js","sources":["../src/page-layers.ts"],"sourcesContent":["/**\n * The Vue side of `@embedpdf/web`'s page layers: a layer says, for as long as\n * it lives, which part of its page it paints, and the render layer reads which\n * parts are painted, to leave them out of the page's picture.\n */\nimport { pageLayersOf, type PagePart, type PaintedParts } from '@embedpdf/web';\nimport { onMounted, shallowRef, watch } from 'vue';\nimport type { Ref, ShallowRef } from 'vue';\n\n/**\n * Say, for as long as this component lives, that it paints `part` of its page\n * (`pageRef`, the page context's `ref`; `null` while it paints nothing). Said\n * at setup, so a render layer set up alongside knows it by the time it's\n * mounted.\n */\nexport function usePaintsPagePart(pageRef: Readonly<Ref<object | null>>, part: PagePart): void {\n watch(\n pageRef,\n (ref, _previous, onCleanup) => {\n if (ref) onCleanup(pageLayersOf(ref).paint(part));\n },\n { immediate: true },\n );\n}\n\n/**\n * Which parts of the page (`pageRef`, the page context's `ref`) the layers on\n * it paint: `null` until this component is mounted, when every layer set up\n * with it has said what it paints, so the page's picture is never asked for\n * with a part another layer is about to take.\n */\nexport function usePaintedParts(\n pageRef: Readonly<Ref<object>>,\n): Readonly<ShallowRef<PaintedParts | null>> {\n const painted = shallowRef<PaintedParts | null>(null);\n onMounted(() => {\n watch(\n pageRef,\n (ref, _previous, onCleanup) => {\n const layers = pageLayersOf(ref);\n painted.value = layers.painted();\n onCleanup(layers.subscribe(() => (painted.value = layers.painted())));\n },\n { immediate: true },\n );\n });\n return painted;\n}\n"],"names":[],"mappings":";;AAeO,SAAS,kBAAkB,SAAuC,MAAsB;AAC7F;AAAA,IACE;AAAA,IACA,CAAC,KAAK,WAAW,cAAc;AAC7B,UAAI,IAAK,WAAU,aAAa,GAAG,EAAE,MAAM,IAAI,CAAC;AAAA,IAClD;AAAA,IACA,EAAE,WAAW,KAAA;AAAA,EAAK;AAEtB;AAQO,SAAS,gBACd,SAC2C;AAC3C,QAAM,UAAU,WAAgC,IAAI;AACpD,YAAU,MAAM;AACd;AAAA,MACE;AAAA,MACA,CAAC,KAAK,WAAW,cAAc;AAC7B,cAAM,SAAS,aAAa,GAAG;AAC/B,gBAAQ,QAAQ,OAAO,QAAA;AACvB,kBAAU,OAAO,UAAU,MAAO,QAAQ,QAAQ,OAAO,QAAA,CAAU,CAAC;AAAA,MACtE;AAAA,MACA,EAAE,WAAW,KAAA;AAAA,IAAK;AAAA,EAEtB,CAAC;AACD,SAAO;AACT;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Vue side of `@embedpdf/web`'s page layers: a layer says, for as long as
|
|
3
|
+
* it lives, which part of its page it paints, and the render layer reads which
|
|
4
|
+
* parts are painted, to leave them out of the page's picture.
|
|
5
|
+
*/
|
|
6
|
+
import { type PagePart, type PaintedParts } from '@embedpdf/web';
|
|
7
|
+
import type { Ref, ShallowRef } from 'vue';
|
|
8
|
+
/**
|
|
9
|
+
* Say, for as long as this component lives, that it paints `part` of its page
|
|
10
|
+
* (`pageRef`, the page context's `ref`; `null` while it paints nothing). Said
|
|
11
|
+
* at setup, so a render layer set up alongside knows it by the time it's
|
|
12
|
+
* mounted.
|
|
13
|
+
*/
|
|
14
|
+
export declare function usePaintsPagePart(pageRef: Readonly<Ref<object | null>>, part: PagePart): void;
|
|
15
|
+
/**
|
|
16
|
+
* Which parts of the page (`pageRef`, the page context's `ref`) the layers on
|
|
17
|
+
* it paint: `null` until this component is mounted, when every layer set up
|
|
18
|
+
* with it has said what it paints, so the page's picture is never asked for
|
|
19
|
+
* with a part another layer is about to take.
|
|
20
|
+
*/
|
|
21
|
+
export declare function usePaintedParts(pageRef: Readonly<Ref<object>>): Readonly<ShallowRef<PaintedParts | null>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Vue side of `@embedpdf/web`'s page layers: a layer says, for as long as
|
|
3
|
+
* it lives, which part of its page it paints, and the render layer reads which
|
|
4
|
+
* parts are painted, to leave them out of the page's picture.
|
|
5
|
+
*/
|
|
6
|
+
import { type PagePart, type PaintedParts } from '@embedpdf/web';
|
|
7
|
+
import type { Ref, ShallowRef } from 'vue';
|
|
8
|
+
/**
|
|
9
|
+
* Say, for as long as this component lives, that it paints `part` of its page
|
|
10
|
+
* (`pageRef`, the page context's `ref`; `null` while it paints nothing). Said
|
|
11
|
+
* at setup, so a render layer set up alongside knows it by the time it's
|
|
12
|
+
* mounted.
|
|
13
|
+
*/
|
|
14
|
+
export declare function usePaintsPagePart(pageRef: Readonly<Ref<object | null>>, part: PagePart): void;
|
|
15
|
+
/**
|
|
16
|
+
* Which parts of the page (`pageRef`, the page context's `ref`) the layers on
|
|
17
|
+
* it paint: `null` until this component is mounted, when every layer set up
|
|
18
|
+
* with it has said what it paints, so the page's picture is never asked for
|
|
19
|
+
* with a part another layer is about to take.
|
|
20
|
+
*/
|
|
21
|
+
export declare function usePaintedParts(pageRef: Readonly<Ref<object>>): Readonly<ShallowRef<PaintedParts | null>>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { PageRef } from '@embedpdf/core';
|
|
2
|
+
import type { PageFrame } from '@embedpdf/core-geometry';
|
|
3
|
+
import type { PageContextValue } from '../runtime/page.cjs';
|
|
4
|
+
declare const _default: typeof __VLS_export;
|
|
5
|
+
export default _default;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
7
|
+
/** The page: its `ref`, which follows it when pages move, or its index, from 0. */
|
|
8
|
+
page: PageRef | number;
|
|
9
|
+
/** Which document to show. Defaults to the document in scope, else the active one. */
|
|
10
|
+
documentId?: string;
|
|
11
|
+
/** The width of the page upright, in pixels: a page turned a quarter is that tall. Default 240. */
|
|
12
|
+
width?: number;
|
|
13
|
+
/** Space reserved around the page for your own labels, in pixels per side; the sides left out are 0. */
|
|
14
|
+
pageFrame?: Partial<PageFrame>;
|
|
15
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
16
|
+
/** The page: its `ref`, which follows it when pages move, or its index, from 0. */
|
|
17
|
+
page: PageRef | number;
|
|
18
|
+
/** Which document to show. Defaults to the document in scope, else the active one. */
|
|
19
|
+
documentId?: string;
|
|
20
|
+
/** The width of the page upright, in pixels: a page turned a quarter is that tall. Default 240. */
|
|
21
|
+
width?: number;
|
|
22
|
+
/** Space reserved around the page for your own labels, in pixels per side; the sides left out are 0. */
|
|
23
|
+
pageFrame?: Partial<PageFrame>;
|
|
24
|
+
}> & Readonly<{}>, {
|
|
25
|
+
width: number;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
27
|
+
/** Page-space content (layers): it turns with the page. */
|
|
28
|
+
default?(props: {
|
|
29
|
+
page: PageContextValue;
|
|
30
|
+
}): unknown;
|
|
31
|
+
/** The page's box and its reserved `pageFrame` (a label, a border): never turned. */
|
|
32
|
+
'page-chrome'?(props: {
|
|
33
|
+
page: PageContextValue;
|
|
34
|
+
}): unknown;
|
|
35
|
+
/** Shown while the document or the page isn't available yet (default: nothing). */
|
|
36
|
+
fallback?(): unknown;
|
|
37
|
+
}>;
|
|
38
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { PageRef } from '@embedpdf/core';
|
|
2
|
+
import type { PageFrame } from '@embedpdf/core-geometry';
|
|
3
|
+
import type { PageContextValue } from '../runtime/page.js';
|
|
4
|
+
declare const _default: typeof __VLS_export;
|
|
5
|
+
export default _default;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
7
|
+
/** The page: its `ref`, which follows it when pages move, or its index, from 0. */
|
|
8
|
+
page: PageRef | number;
|
|
9
|
+
/** Which document to show. Defaults to the document in scope, else the active one. */
|
|
10
|
+
documentId?: string;
|
|
11
|
+
/** The width of the page upright, in pixels: a page turned a quarter is that tall. Default 240. */
|
|
12
|
+
width?: number;
|
|
13
|
+
/** Space reserved around the page for your own labels, in pixels per side; the sides left out are 0. */
|
|
14
|
+
pageFrame?: Partial<PageFrame>;
|
|
15
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
16
|
+
/** The page: its `ref`, which follows it when pages move, or its index, from 0. */
|
|
17
|
+
page: PageRef | number;
|
|
18
|
+
/** Which document to show. Defaults to the document in scope, else the active one. */
|
|
19
|
+
documentId?: string;
|
|
20
|
+
/** The width of the page upright, in pixels: a page turned a quarter is that tall. Default 240. */
|
|
21
|
+
width?: number;
|
|
22
|
+
/** Space reserved around the page for your own labels, in pixels per side; the sides left out are 0. */
|
|
23
|
+
pageFrame?: Partial<PageFrame>;
|
|
24
|
+
}> & Readonly<{}>, {
|
|
25
|
+
width: number;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
27
|
+
/** Page-space content (layers): it turns with the page. */
|
|
28
|
+
default?(props: {
|
|
29
|
+
page: PageContextValue;
|
|
30
|
+
}): unknown;
|
|
31
|
+
/** The page's box and its reserved `pageFrame` (a label, a border): never turned. */
|
|
32
|
+
'page-chrome'?(props: {
|
|
33
|
+
page: PageContextValue;
|
|
34
|
+
}): unknown;
|
|
35
|
+
/** Shown while the document or the page isn't available yet (default: nothing). */
|
|
36
|
+
fallback?(): unknown;
|
|
37
|
+
}>;
|
|
38
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const PageView_vue_vue_type_script_setup_true_lang = require("./PageView.vue_vue_type_script_setup_true_lang-CjrpumX2.cjs");
|
|
4
|
+
exports.PageView = PageView_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
5
|
+
//# sourceMappingURL=page-view.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-view.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/page-view: one page on its own, without a Stage.
|
|
3
|
+
*
|
|
4
|
+
* `<PageView :page :width>` shows a page anywhere in your app (a preview card,
|
|
5
|
+
* a page picker, the page a comment belongs to) with the same layers, rotation
|
|
6
|
+
* and chrome frame as a Stage page. Loop over `usePageList()` (from
|
|
7
|
+
* `@embedpdf/vue/runtime`) for a picker; for a long strip that scrolls, a
|
|
8
|
+
* second Stage mounts only what's on screen.
|
|
9
|
+
*/
|
|
10
|
+
export { default as PageView } from './page-view/PageView.vue.cjs';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/page-view: one page on its own, without a Stage.
|
|
3
|
+
*
|
|
4
|
+
* `<PageView :page :width>` shows a page anywhere in your app (a preview card,
|
|
5
|
+
* a page picker, the page a comment belongs to) with the same layers, rotation
|
|
6
|
+
* and chrome frame as a Stage page. Loop over `usePageList()` (from
|
|
7
|
+
* `@embedpdf/vue/runtime`) for a picker; for a long strip that scrolls, a
|
|
8
|
+
* second Stage mounts only what's on screen.
|
|
9
|
+
*/
|
|
10
|
+
export { default as PageView } from './page-view/PageView.vue.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-view.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { inject, provide } from "vue";
|
|
2
|
+
const ProjectorKey = Symbol("embedpdf projector");
|
|
3
|
+
const ShownPagesKey = Symbol("embedpdf shown pages");
|
|
4
|
+
function provideProjector(binding) {
|
|
5
|
+
provide(ProjectorKey, binding);
|
|
6
|
+
}
|
|
7
|
+
function provideShownPages(shown) {
|
|
8
|
+
provide(ShownPagesKey, shown);
|
|
9
|
+
}
|
|
10
|
+
function useOptionalProjectorBinding() {
|
|
11
|
+
return inject(ProjectorKey, null);
|
|
12
|
+
}
|
|
13
|
+
function useProjectorBinding() {
|
|
14
|
+
const binding = useOptionalProjectorBinding();
|
|
15
|
+
if (!binding) {
|
|
16
|
+
throw new Error(
|
|
17
|
+
"No ViewProjector in scope: mount anchored UI in a <Stage>'s #overlay slot."
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
return binding;
|
|
21
|
+
}
|
|
22
|
+
function useShownPages() {
|
|
23
|
+
return inject(ShownPagesKey, null);
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
provideShownPages as a,
|
|
27
|
+
useProjectorBinding as b,
|
|
28
|
+
useShownPages as c,
|
|
29
|
+
provideProjector as p,
|
|
30
|
+
useOptionalProjectorBinding as u
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=projector-CDZn1kh1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projector-CDZn1kh1.js","sources":["../src/anchored/projector.ts"],"sourcesContent":["/**\n * How anchored UI finds where to sit. A page surface (`<Stage>`'s overlay)\n * provides a {@link ProjectorBinding}: the projection snapshot plus Vue's way\n * of knowing it changed, and the pages it shows. The placement math is shared,\n * framework-neutral, in `@embedpdf/web` (`projectAnchoredTarget`).\n *\n * The scheduling law that keeps menus glued to the content: a state-driven\n * projection change (the Stage camera) reaches anchored UI as a new binding\n * value in the same update that moves the pages, so the two never paint a\n * frame apart. `subscribe` exists only for browser-driven invalidation (a\n * surface that moves because the document scrolled), which no state change\n * announces.\n */\nimport { inject, provide } from 'vue';\nimport type { InjectionKey, Ref } from 'vue';\nimport type { ViewProjector } from '@embedpdf/web';\n\n/** What a page surface provides: the pure projection snapshot, bound to Vue's reactivity. */\nexport interface ProjectorBinding {\n projector: ViewProjector;\n /**\n * Changes exactly when projection may have changed for state-driven reasons:\n * the Stage uses its visible pages (one value that already folds camera,\n * viewport, scene and pixel ratio). Nothing reads it; it is what makes the\n * binding a new value, so don't leave it out.\n */\n revision: unknown;\n /** Browser-driven invalidation only (a surface the document's scroll moves). The Stage provides none. */\n subscribe?: (callback: () => void) => () => void;\n}\n\n/**\n * The pages a surface shows right now, by object number. A value of its own,\n * next to the projection, because it changes only when a page comes on screen\n * or leaves it: anchored UI on the other pages reads only this, so it sits out\n * every camera frame.\n */\nexport type ShownPages = ReadonlySet<number>;\n\nconst ProjectorKey: InjectionKey<Readonly<Ref<ProjectorBinding>>> = Symbol('embedpdf projector');\nconst ShownPagesKey: InjectionKey<Readonly<Ref<ShownPages>>> = Symbol('embedpdf shown pages');\n\n/** Installed by page surfaces (through `<AnchoredScope>`), not by app code. */\nexport function provideProjector(binding: Readonly<Ref<ProjectorBinding>>): void {\n provide(ProjectorKey, binding);\n}\n\n/** Installed by page surfaces (through `<AnchoredScope>`), not by app code. */\nexport function provideShownPages(shown: Readonly<Ref<ShownPages>>): void {\n provide(ShownPagesKey, shown);\n}\n\n/** The surface's projector binding, or null outside any page surface: for chrome that degrades instead of throwing. */\nexport function useOptionalProjectorBinding(): Readonly<Ref<ProjectorBinding>> | null {\n return inject(ProjectorKey, null);\n}\n\n/** The surface's projector binding. Reading its value makes a render follow projection changes. */\nexport function useProjectorBinding(): Readonly<Ref<ProjectorBinding>> {\n const binding = useOptionalProjectorBinding();\n if (!binding) {\n throw new Error(\n \"No ViewProjector in scope: mount anchored UI in a <Stage>'s #overlay slot.\",\n );\n }\n return binding;\n}\n\n/** The pages the surface shows, or null outside a surface that says. */\nexport function useShownPages(): Readonly<Ref<ShownPages>> | null {\n return inject(ShownPagesKey, null);\n}\n"],"names":[],"mappings":";AAuCA,MAAM,eAA8D,OAAO,oBAAoB;AAC/F,MAAM,gBAAyD,OAAO,sBAAsB;AAGrF,SAAS,iBAAiB,SAAgD;AAC/E,UAAQ,cAAc,OAAO;AAC/B;AAGO,SAAS,kBAAkB,OAAwC;AACxE,UAAQ,eAAe,KAAK;AAC9B;AAGO,SAAS,8BAAsE;AACpF,SAAO,OAAO,cAAc,IAAI;AAClC;AAGO,SAAS,sBAAuD;AACrE,QAAM,UAAU,4BAAA;AAChB,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACA,SAAO;AACT;AAGO,SAAS,gBAAkD;AAChE,SAAO,OAAO,eAAe,IAAI;AACnC;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const ProjectorKey = Symbol("embedpdf projector");
|
|
4
|
+
const ShownPagesKey = Symbol("embedpdf shown pages");
|
|
5
|
+
function provideProjector(binding) {
|
|
6
|
+
vue.provide(ProjectorKey, binding);
|
|
7
|
+
}
|
|
8
|
+
function provideShownPages(shown) {
|
|
9
|
+
vue.provide(ShownPagesKey, shown);
|
|
10
|
+
}
|
|
11
|
+
function useOptionalProjectorBinding() {
|
|
12
|
+
return vue.inject(ProjectorKey, null);
|
|
13
|
+
}
|
|
14
|
+
function useProjectorBinding() {
|
|
15
|
+
const binding = useOptionalProjectorBinding();
|
|
16
|
+
if (!binding) {
|
|
17
|
+
throw new Error(
|
|
18
|
+
"No ViewProjector in scope: mount anchored UI in a <Stage>'s #overlay slot."
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
return binding;
|
|
22
|
+
}
|
|
23
|
+
function useShownPages() {
|
|
24
|
+
return vue.inject(ShownPagesKey, null);
|
|
25
|
+
}
|
|
26
|
+
exports.provideProjector = provideProjector;
|
|
27
|
+
exports.provideShownPages = provideShownPages;
|
|
28
|
+
exports.useOptionalProjectorBinding = useOptionalProjectorBinding;
|
|
29
|
+
exports.useProjectorBinding = useProjectorBinding;
|
|
30
|
+
exports.useShownPages = useShownPages;
|
|
31
|
+
//# sourceMappingURL=projector-Cf7879sx.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projector-Cf7879sx.cjs","sources":["../src/anchored/projector.ts"],"sourcesContent":["/**\n * How anchored UI finds where to sit. A page surface (`<Stage>`'s overlay)\n * provides a {@link ProjectorBinding}: the projection snapshot plus Vue's way\n * of knowing it changed, and the pages it shows. The placement math is shared,\n * framework-neutral, in `@embedpdf/web` (`projectAnchoredTarget`).\n *\n * The scheduling law that keeps menus glued to the content: a state-driven\n * projection change (the Stage camera) reaches anchored UI as a new binding\n * value in the same update that moves the pages, so the two never paint a\n * frame apart. `subscribe` exists only for browser-driven invalidation (a\n * surface that moves because the document scrolled), which no state change\n * announces.\n */\nimport { inject, provide } from 'vue';\nimport type { InjectionKey, Ref } from 'vue';\nimport type { ViewProjector } from '@embedpdf/web';\n\n/** What a page surface provides: the pure projection snapshot, bound to Vue's reactivity. */\nexport interface ProjectorBinding {\n projector: ViewProjector;\n /**\n * Changes exactly when projection may have changed for state-driven reasons:\n * the Stage uses its visible pages (one value that already folds camera,\n * viewport, scene and pixel ratio). Nothing reads it; it is what makes the\n * binding a new value, so don't leave it out.\n */\n revision: unknown;\n /** Browser-driven invalidation only (a surface the document's scroll moves). The Stage provides none. */\n subscribe?: (callback: () => void) => () => void;\n}\n\n/**\n * The pages a surface shows right now, by object number. A value of its own,\n * next to the projection, because it changes only when a page comes on screen\n * or leaves it: anchored UI on the other pages reads only this, so it sits out\n * every camera frame.\n */\nexport type ShownPages = ReadonlySet<number>;\n\nconst ProjectorKey: InjectionKey<Readonly<Ref<ProjectorBinding>>> = Symbol('embedpdf projector');\nconst ShownPagesKey: InjectionKey<Readonly<Ref<ShownPages>>> = Symbol('embedpdf shown pages');\n\n/** Installed by page surfaces (through `<AnchoredScope>`), not by app code. */\nexport function provideProjector(binding: Readonly<Ref<ProjectorBinding>>): void {\n provide(ProjectorKey, binding);\n}\n\n/** Installed by page surfaces (through `<AnchoredScope>`), not by app code. */\nexport function provideShownPages(shown: Readonly<Ref<ShownPages>>): void {\n provide(ShownPagesKey, shown);\n}\n\n/** The surface's projector binding, or null outside any page surface: for chrome that degrades instead of throwing. */\nexport function useOptionalProjectorBinding(): Readonly<Ref<ProjectorBinding>> | null {\n return inject(ProjectorKey, null);\n}\n\n/** The surface's projector binding. Reading its value makes a render follow projection changes. */\nexport function useProjectorBinding(): Readonly<Ref<ProjectorBinding>> {\n const binding = useOptionalProjectorBinding();\n if (!binding) {\n throw new Error(\n \"No ViewProjector in scope: mount anchored UI in a <Stage>'s #overlay slot.\",\n );\n }\n return binding;\n}\n\n/** The pages the surface shows, or null outside a surface that says. */\nexport function useShownPages(): Readonly<Ref<ShownPages>> | null {\n return inject(ShownPagesKey, null);\n}\n"],"names":["provide","inject"],"mappings":";;AAuCA,MAAM,eAA8D,OAAO,oBAAoB;AAC/F,MAAM,gBAAyD,OAAO,sBAAsB;AAGrF,SAAS,iBAAiB,SAAgD;AAC/EA,MAAAA,QAAQ,cAAc,OAAO;AAC/B;AAGO,SAAS,kBAAkB,OAAwC;AACxEA,MAAAA,QAAQ,eAAe,KAAK;AAC9B;AAGO,SAAS,8BAAsE;AACpF,SAAOC,IAAAA,OAAO,cAAc,IAAI;AAClC;AAGO,SAAS,sBAAuD;AACrE,QAAM,UAAU,4BAAA;AAChB,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACA,SAAO;AACT;AAGO,SAAS,gBAAkD;AAChE,SAAOA,IAAAA,OAAO,eAAe,IAAI;AACnC;;;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pluginRedaction = require("@embedpdf/plugin-redaction");
|
|
4
|
+
const vue = require("vue");
|
|
5
|
+
const capabilities = require("./capabilities-DVNJmgy7.cjs");
|
|
6
|
+
const state = require("./state-M22NDJQo.cjs");
|
|
7
|
+
function useRedaction() {
|
|
8
|
+
return capabilities.useCapability(pluginRedaction.RedactionToken);
|
|
9
|
+
}
|
|
10
|
+
function useRedactionEvent(select, handler) {
|
|
11
|
+
capabilities.useCapabilityEvent(pluginRedaction.RedactionToken, select, handler);
|
|
12
|
+
}
|
|
13
|
+
const useRedactionState = state.stateComposable(pluginRedaction.redactionState);
|
|
14
|
+
const useRedactionSettings = state.settingsComposable(pluginRedaction.RedactionToken);
|
|
15
|
+
const NO_MARKS = Object.freeze([]);
|
|
16
|
+
function usePendingRedactions(filter) {
|
|
17
|
+
return capabilities.useOptionalSelector(
|
|
18
|
+
pluginRedaction.RedactionToken,
|
|
19
|
+
(redaction) => redaction.listPending(vue.toValue(filter)),
|
|
20
|
+
NO_MARKS
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
exports.usePendingRedactions = usePendingRedactions;
|
|
24
|
+
exports.useRedaction = useRedaction;
|
|
25
|
+
exports.useRedactionEvent = useRedactionEvent;
|
|
26
|
+
exports.useRedactionSettings = useRedactionSettings;
|
|
27
|
+
exports.useRedactionState = useRedactionState;
|
|
28
|
+
Object.keys(pluginRedaction).forEach((k) => {
|
|
29
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: () => pluginRedaction[k]
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=redaction.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redaction.cjs","sources":["../src/redaction.ts"],"sourcesContent":["/**\n * @embedpdf/vue/redaction: the Vue view of `@embedpdf/plugin-redaction`. The\n * four composables every plugin has, plus the pending marks. Marking rides\n * the annotation plane (the composed `redact` tool); these composables surface\n * the workflow around it.\n *\n * const redaction = useRedaction();\n * const { pendingCount, applying } = useRedactionState();\n * await redaction.applyAll(); // irreversible: confirm first\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-redaction';\nimport { toValue } from 'vue';\nimport type { MaybeRefOrGetter, Ref } from 'vue';\nimport type { EventHook } from '@embedpdf/core';\nimport { RedactionToken, redactionState } from '@embedpdf/plugin-redaction';\nimport type {\n RedactionCapability,\n RedactionMark,\n RedactionMarkFilter,\n} from '@embedpdf/plugin-redaction';\nimport { useCapability, useCapabilityEvent, useOptionalSelector } from './runtime/capabilities';\nimport { settingsComposable, stateComposable } from './state';\nimport type { StateComposable } from './state';\n\n/**\n * The redaction API (marking, the pending marks, applying them) of the\n * nearest `<DocumentScope>`'s document, else the active one. The object never\n * changes; outside a document every method throws `not-ready`.\n */\nexport function useRedaction(): RedactionCapability {\n return useCapability(RedactionToken);\n}\n\n/** Subscribe to one redaction event while the component lives: `useRedactionEvent((redaction) => redaction.onApplied, handler)`. */\nexport function useRedactionEvent<Event>(\n select: (redaction: RedactionCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(RedactionToken, select, handler);\n}\n\n/**\n * The redaction state as refs: how many marks wait, whether marks are being\n * applied, and the last apply's result (the page's State table, declared once\n * in `redactionState`). With a selector, one ref that updates only when the\n * value it picks changes.\n *\n * Typed through the declaration, so the published types name it from\n * `@embedpdf/plugin-redaction`, a dependency of this package, and not from the\n * engine package `lastResult`'s type comes from, which isn't one.\n */\nexport const useRedactionState: StateComposable<ReturnType<typeof redactionState.read>> =\n stateComposable(redactionState);\n\n/** The redaction settings (`overlay`), with or without a document, as refs. Takes a selector. */\nexport const useRedactionSettings = settingsComposable(RedactionToken);\n\nconst NO_MARKS: readonly RedactionMark[] = Object.freeze([]);\n\n/**\n * The marks waiting to be applied, in page order, or one page's (its ref or\n * its index; a getter to follow a prop), as a ref. The plugin's lists are\n * reference-stable, so the ref updates only when the marks change. Empty\n * without a document.\n */\nexport function usePendingRedactions(\n filter?: MaybeRefOrGetter<RedactionMarkFilter | undefined>,\n): Readonly<Ref<readonly RedactionMark[]>> {\n return useOptionalSelector(\n RedactionToken,\n (redaction) => redaction.listPending(toValue(filter)),\n NO_MARKS,\n );\n}\n"],"names":["useCapability","RedactionToken","useCapabilityEvent","stateComposable","redactionState","settingsComposable","useOptionalSelector","toValue"],"mappings":";;;;;;AA+BO,SAAS,eAAoC;AAClD,SAAOA,aAAAA,cAAcC,gBAAAA,cAAc;AACrC;AAGO,SAAS,kBACd,QACA,SACM;AACNC,kCAAmBD,gBAAAA,gBAAgB,QAAQ,OAAO;AACpD;AAYO,MAAM,oBACXE,MAAAA,gBAAgBC,gBAAAA,cAAc;AAGzB,MAAM,uBAAuBC,MAAAA,mBAAmBJ,gBAAAA,cAAc;AAErE,MAAM,WAAqC,OAAO,OAAO,EAAE;AAQpD,SAAS,qBACd,QACyC;AACzC,SAAOK,aAAAA;AAAAA,IACLL,gBAAAA;AAAAA,IACA,CAAC,cAAc,UAAU,YAAYM,IAAAA,QAAQ,MAAM,CAAC;AAAA,IACpD;AAAA,EAAA;AAEJ;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/redaction: the Vue view of `@embedpdf/plugin-redaction`. The
|
|
3
|
+
* four composables every plugin has, plus the pending marks. Marking rides
|
|
4
|
+
* the annotation plane (the composed `redact` tool); these composables surface
|
|
5
|
+
* the workflow around it.
|
|
6
|
+
*
|
|
7
|
+
* const redaction = useRedaction();
|
|
8
|
+
* const { pendingCount, applying } = useRedactionState();
|
|
9
|
+
* await redaction.applyAll(); // irreversible: confirm first
|
|
10
|
+
*/
|
|
11
|
+
export * from '@embedpdf/plugin-redaction';
|
|
12
|
+
import type { MaybeRefOrGetter, Ref } from 'vue';
|
|
13
|
+
import type { EventHook } from '@embedpdf/core';
|
|
14
|
+
import { redactionState } from '@embedpdf/plugin-redaction';
|
|
15
|
+
import type { RedactionCapability, RedactionMark, RedactionMarkFilter } from '@embedpdf/plugin-redaction';
|
|
16
|
+
import type { StateComposable } from './state.cjs';
|
|
17
|
+
/**
|
|
18
|
+
* The redaction API (marking, the pending marks, applying them) of the
|
|
19
|
+
* nearest `<DocumentScope>`'s document, else the active one. The object never
|
|
20
|
+
* changes; outside a document every method throws `not-ready`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useRedaction(): RedactionCapability;
|
|
23
|
+
/** Subscribe to one redaction event while the component lives: `useRedactionEvent((redaction) => redaction.onApplied, handler)`. */
|
|
24
|
+
export declare function useRedactionEvent<Event>(select: (redaction: RedactionCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
25
|
+
/**
|
|
26
|
+
* The redaction state as refs: how many marks wait, whether marks are being
|
|
27
|
+
* applied, and the last apply's result (the page's State table, declared once
|
|
28
|
+
* in `redactionState`). With a selector, one ref that updates only when the
|
|
29
|
+
* value it picks changes.
|
|
30
|
+
*
|
|
31
|
+
* Typed through the declaration, so the published types name it from
|
|
32
|
+
* `@embedpdf/plugin-redaction`, a dependency of this package, and not from the
|
|
33
|
+
* engine package `lastResult`'s type comes from, which isn't one.
|
|
34
|
+
*/
|
|
35
|
+
export declare const useRedactionState: StateComposable<ReturnType<typeof redactionState.read>>;
|
|
36
|
+
/** The redaction settings (`overlay`), with or without a document, as refs. Takes a selector. */
|
|
37
|
+
export declare const useRedactionSettings: import("./state.cjs").SettingsComposable<import("@embedpdf/plugin-redaction").RedactionSettings & object>;
|
|
38
|
+
/**
|
|
39
|
+
* The marks waiting to be applied, in page order, or one page's (its ref or
|
|
40
|
+
* its index; a getter to follow a prop), as a ref. The plugin's lists are
|
|
41
|
+
* reference-stable, so the ref updates only when the marks change. Empty
|
|
42
|
+
* without a document.
|
|
43
|
+
*/
|
|
44
|
+
export declare function usePendingRedactions(filter?: MaybeRefOrGetter<RedactionMarkFilter | undefined>): Readonly<Ref<readonly RedactionMark[]>>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/redaction: the Vue view of `@embedpdf/plugin-redaction`. The
|
|
3
|
+
* four composables every plugin has, plus the pending marks. Marking rides
|
|
4
|
+
* the annotation plane (the composed `redact` tool); these composables surface
|
|
5
|
+
* the workflow around it.
|
|
6
|
+
*
|
|
7
|
+
* const redaction = useRedaction();
|
|
8
|
+
* const { pendingCount, applying } = useRedactionState();
|
|
9
|
+
* await redaction.applyAll(); // irreversible: confirm first
|
|
10
|
+
*/
|
|
11
|
+
export * from '@embedpdf/plugin-redaction';
|
|
12
|
+
import type { MaybeRefOrGetter, Ref } from 'vue';
|
|
13
|
+
import type { EventHook } from '@embedpdf/core';
|
|
14
|
+
import { redactionState } from '@embedpdf/plugin-redaction';
|
|
15
|
+
import type { RedactionCapability, RedactionMark, RedactionMarkFilter } from '@embedpdf/plugin-redaction';
|
|
16
|
+
import type { StateComposable } from './state.js';
|
|
17
|
+
/**
|
|
18
|
+
* The redaction API (marking, the pending marks, applying them) of the
|
|
19
|
+
* nearest `<DocumentScope>`'s document, else the active one. The object never
|
|
20
|
+
* changes; outside a document every method throws `not-ready`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useRedaction(): RedactionCapability;
|
|
23
|
+
/** Subscribe to one redaction event while the component lives: `useRedactionEvent((redaction) => redaction.onApplied, handler)`. */
|
|
24
|
+
export declare function useRedactionEvent<Event>(select: (redaction: RedactionCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
25
|
+
/**
|
|
26
|
+
* The redaction state as refs: how many marks wait, whether marks are being
|
|
27
|
+
* applied, and the last apply's result (the page's State table, declared once
|
|
28
|
+
* in `redactionState`). With a selector, one ref that updates only when the
|
|
29
|
+
* value it picks changes.
|
|
30
|
+
*
|
|
31
|
+
* Typed through the declaration, so the published types name it from
|
|
32
|
+
* `@embedpdf/plugin-redaction`, a dependency of this package, and not from the
|
|
33
|
+
* engine package `lastResult`'s type comes from, which isn't one.
|
|
34
|
+
*/
|
|
35
|
+
export declare const useRedactionState: StateComposable<ReturnType<typeof redactionState.read>>;
|
|
36
|
+
/** The redaction settings (`overlay`), with or without a document, as refs. Takes a selector. */
|
|
37
|
+
export declare const useRedactionSettings: import("./state.js").SettingsComposable<import("@embedpdf/plugin-redaction").RedactionSettings & object>;
|
|
38
|
+
/**
|
|
39
|
+
* The marks waiting to be applied, in page order, or one page's (its ref or
|
|
40
|
+
* its index; a getter to follow a prop), as a ref. The plugin's lists are
|
|
41
|
+
* reference-stable, so the ref updates only when the marks change. Empty
|
|
42
|
+
* without a document.
|
|
43
|
+
*/
|
|
44
|
+
export declare function usePendingRedactions(filter?: MaybeRefOrGetter<RedactionMarkFilter | undefined>): Readonly<Ref<readonly RedactionMark[]>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RedactionToken, redactionState } from "@embedpdf/plugin-redaction";
|
|
2
|
+
export * from "@embedpdf/plugin-redaction";
|
|
3
|
+
import { toValue } from "vue";
|
|
4
|
+
import { i as useOptionalSelector, a as useCapability, b as useCapabilityEvent } from "./capabilities-C7YzgPCX.js";
|
|
5
|
+
import { s as settingsComposable, a as stateComposable } from "./state-DZg8q3v6.js";
|
|
6
|
+
function useRedaction() {
|
|
7
|
+
return useCapability(RedactionToken);
|
|
8
|
+
}
|
|
9
|
+
function useRedactionEvent(select, handler) {
|
|
10
|
+
useCapabilityEvent(RedactionToken, select, handler);
|
|
11
|
+
}
|
|
12
|
+
const useRedactionState = stateComposable(redactionState);
|
|
13
|
+
const useRedactionSettings = settingsComposable(RedactionToken);
|
|
14
|
+
const NO_MARKS = Object.freeze([]);
|
|
15
|
+
function usePendingRedactions(filter) {
|
|
16
|
+
return useOptionalSelector(
|
|
17
|
+
RedactionToken,
|
|
18
|
+
(redaction) => redaction.listPending(toValue(filter)),
|
|
19
|
+
NO_MARKS
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
usePendingRedactions,
|
|
24
|
+
useRedaction,
|
|
25
|
+
useRedactionEvent,
|
|
26
|
+
useRedactionSettings,
|
|
27
|
+
useRedactionState
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=redaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redaction.js","sources":["../src/redaction.ts"],"sourcesContent":["/**\n * @embedpdf/vue/redaction: the Vue view of `@embedpdf/plugin-redaction`. The\n * four composables every plugin has, plus the pending marks. Marking rides\n * the annotation plane (the composed `redact` tool); these composables surface\n * the workflow around it.\n *\n * const redaction = useRedaction();\n * const { pendingCount, applying } = useRedactionState();\n * await redaction.applyAll(); // irreversible: confirm first\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-redaction';\nimport { toValue } from 'vue';\nimport type { MaybeRefOrGetter, Ref } from 'vue';\nimport type { EventHook } from '@embedpdf/core';\nimport { RedactionToken, redactionState } from '@embedpdf/plugin-redaction';\nimport type {\n RedactionCapability,\n RedactionMark,\n RedactionMarkFilter,\n} from '@embedpdf/plugin-redaction';\nimport { useCapability, useCapabilityEvent, useOptionalSelector } from './runtime/capabilities';\nimport { settingsComposable, stateComposable } from './state';\nimport type { StateComposable } from './state';\n\n/**\n * The redaction API (marking, the pending marks, applying them) of the\n * nearest `<DocumentScope>`'s document, else the active one. The object never\n * changes; outside a document every method throws `not-ready`.\n */\nexport function useRedaction(): RedactionCapability {\n return useCapability(RedactionToken);\n}\n\n/** Subscribe to one redaction event while the component lives: `useRedactionEvent((redaction) => redaction.onApplied, handler)`. */\nexport function useRedactionEvent<Event>(\n select: (redaction: RedactionCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(RedactionToken, select, handler);\n}\n\n/**\n * The redaction state as refs: how many marks wait, whether marks are being\n * applied, and the last apply's result (the page's State table, declared once\n * in `redactionState`). With a selector, one ref that updates only when the\n * value it picks changes.\n *\n * Typed through the declaration, so the published types name it from\n * `@embedpdf/plugin-redaction`, a dependency of this package, and not from the\n * engine package `lastResult`'s type comes from, which isn't one.\n */\nexport const useRedactionState: StateComposable<ReturnType<typeof redactionState.read>> =\n stateComposable(redactionState);\n\n/** The redaction settings (`overlay`), with or without a document, as refs. Takes a selector. */\nexport const useRedactionSettings = settingsComposable(RedactionToken);\n\nconst NO_MARKS: readonly RedactionMark[] = Object.freeze([]);\n\n/**\n * The marks waiting to be applied, in page order, or one page's (its ref or\n * its index; a getter to follow a prop), as a ref. The plugin's lists are\n * reference-stable, so the ref updates only when the marks change. Empty\n * without a document.\n */\nexport function usePendingRedactions(\n filter?: MaybeRefOrGetter<RedactionMarkFilter | undefined>,\n): Readonly<Ref<readonly RedactionMark[]>> {\n return useOptionalSelector(\n RedactionToken,\n (redaction) => redaction.listPending(toValue(filter)),\n NO_MARKS,\n );\n}\n"],"names":[],"mappings":";;;;;AA+BO,SAAS,eAAoC;AAClD,SAAO,cAAc,cAAc;AACrC;AAGO,SAAS,kBACd,QACA,SACM;AACN,qBAAmB,gBAAgB,QAAQ,OAAO;AACpD;AAYO,MAAM,oBACX,gBAAgB,cAAc;AAGzB,MAAM,uBAAuB,mBAAmB,cAAc;AAErE,MAAM,WAAqC,OAAO,OAAO,EAAE;AAQpD,SAAS,qBACd,QACyC;AACzC,SAAO;AAAA,IACL;AAAA,IACA,CAAC,cAAc,UAAU,YAAY,QAAQ,MAAM,CAAC;AAAA,IACpD;AAAA,EAAA;AAEJ;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/**
|
|
3
|
+
* Draw the annotations into the page's picture (`true`) or leave them out
|
|
4
|
+
* (`false`). Left unset, the picture leaves them to an `<AnnotationLayer>`
|
|
5
|
+
* on the page, and otherwise draws them when the user may read them.
|
|
6
|
+
*/
|
|
7
|
+
annotations?: boolean;
|
|
8
|
+
/** The same for the form fields, which a `<FormLayer>` paints. */
|
|
9
|
+
formFields?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Mount the tile plane. Whether it spends anything is the plugin's
|
|
12
|
+
* arithmetic: leave it on, and pass `false` only for a view that must never
|
|
13
|
+
* tile, even at deep zoom.
|
|
14
|
+
*/
|
|
15
|
+
tiles?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
annotations: boolean;
|
|
19
|
+
formFields: boolean;
|
|
20
|
+
tiles: boolean;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/**
|
|
3
|
+
* Draw the annotations into the page's picture (`true`) or leave them out
|
|
4
|
+
* (`false`). Left unset, the picture leaves them to an `<AnnotationLayer>`
|
|
5
|
+
* on the page, and otherwise draws them when the user may read them.
|
|
6
|
+
*/
|
|
7
|
+
annotations?: boolean;
|
|
8
|
+
/** The same for the form fields, which a `<FormLayer>` paints. */
|
|
9
|
+
formFields?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Mount the tile plane. Whether it spends anything is the plugin's
|
|
12
|
+
* arithmetic: leave it on, and pass `false` only for a view that must never
|
|
13
|
+
* tile, even at deep zoom.
|
|
14
|
+
*/
|
|
15
|
+
tiles?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
annotations: boolean;
|
|
19
|
+
formFields: boolean;
|
|
20
|
+
tiles: boolean;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PageRef } from '@embedpdf/core';
|
|
2
|
+
import type { TilePaintSource, ViewDemand } from '@embedpdf/plugin-render/contract/host';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
source: TilePaintSource;
|
|
5
|
+
/** The view's tile surface, told when this tile is painted and when it leaves. */
|
|
6
|
+
view: ViewDemand;
|
|
7
|
+
page: PageRef;
|
|
8
|
+
/** View px per page point. */
|
|
9
|
+
viewScale: number;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PageRef } from '@embedpdf/core';
|
|
2
|
+
import type { TilePaintSource, ViewDemand } from '@embedpdf/plugin-render/contract/host';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
source: TilePaintSource;
|
|
5
|
+
/** The view's tile surface, told when this tile is painted and when it leaves. */
|
|
6
|
+
view: ViewDemand;
|
|
7
|
+
page: PageRef;
|
|
8
|
+
/** View px per page point. */
|
|
9
|
+
viewScale: number;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PageLayerOptions } from '@embedpdf/plugin-render/contract/host';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
layers: PageLayerOptions;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PageLayerOptions } from '@embedpdf/plugin-render/contract/host';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
layers: PageLayerOptions;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|